- dnl Check whether we have bool
- AC_MSG_CHECKING(whether C++ has bool)
- AC_TRY_RUN([main() { bool b1=true; bool b2=false; }],
- [ AC_MSG_RESULT(yes) ],
- [ AC_MSG_RESULT(no)
- AC_DEFINE(CXX_HAS_NO_BOOL,[],[Define if C++ is missing bool type]) ],
- [ AC_MSG_WARN(Don't cross-compile)]
- )
-
- dnl Test whether C++ has buggy for-loops
- AC_MSG_CHECKING(whether C++ has buggy scoping in for-loops)
- AC_TRY_COMPILE([#include <iostream.h>], [
- for (int i=0;i<10;i++) { }
- for (int i=0;i<10;i++) { }
-], [ AC_MSG_RESULT(no) ],
- [ AC_MSG_RESULT(yes)
- AC_DEFINE(CXX_HAS_BUGGY_FOR_LOOPS,[],[Define if for loop scoping is broken]) ])
-
- dnl Test whether the user wants to enable assertions
- AC_MSG_CHECKING(whether user wants assertions)
- AC_ARG_ENABLE(assert,
- [ --disable-assert don't use cpp.h assert],
- [ AC_DEFINE(NDEBUG,[],[Define to disable asserts (don't doit!)])
- AC_MSG_RESULT(no) ],
- [ AC_MSG_RESULT(yes) ],
- )