| 232 | ## Check what to do with ACE library |
| 233 | AC_LANG_PUSH([C++]) |
| 234 | AC_CHECK_HEADER([ace/Reactor.h], [tri_have_ace_headers=yes], [tri_have_ace_headers=no]) |
| 235 | AC_CHECK_LIB([ACE], [main], [tri_have_ace_lib=yes], [tri_have_ace_lib=no]) |
| 236 | AC_LANG_POP([C++]) |
| 237 | |
| 238 | AC_MSG_CHECKING([whether to build ACE]) |
| 239 | if test X$tri_have_ace_headers = Xyes -a X$tri_have_ace_lib = Xyes; |
| 240 | then |
| 241 | tri_need_to_build_ace=no |
| 242 | ACE_LIBS="-lACE" |
| 243 | ACE_INCLUDES="" |
| 244 | AC_MSG_RESULT([no]) |
| 245 | else |
| 246 | if test X$tri_have_ace_headers = Xno -a X$tri_have_ace_lib = Xno; then |
| 247 | tri_need_to_build_ace=yes |
| 248 | AC_MSG_RESULT([yes]) |
| 249 | else |
| 250 | if test X$tri_have_ace_headers = Xyes; then |
| 251 | AC_MSG_ERROR([looks like you have ACE headers, but you do not have ACE libs installed]) |
| 252 | else |
| 253 | tri_need_to_build_ace=yes |
| 254 | AC_MSG_RESULT([yes, over-install]) |
| 255 | fi |
| 256 | fi |
| 257 | fi |
| 258 | |
| 259 | if test X$tri_need_to_build_ace = Xyes; then |
| 260 | CXXFLAGS="-I\$(top_srcdir)/dep/ACE_wrappers -I\$(top_builddir)/dep/ACE_wrappers $CXXFLAGS" |
| 261 | ACE_LIBS="\$(top_builddir)/dep/ACE_wrappers/ace/libACE.la" |
| 262 | else |
| 263 | ACE_LIBS="-lACE" |
| 264 | fi |
| 265 | |
| 266 | AM_CONDITIONAL([TRI_BUILD_ACE], [test X$tri_need_to_build_ace = Xyes]) |
| 267 | |