| | 112 | |
| | 113 | |
| | 114 | dnl Check if it is possible to turn off exceptions support |
| | 115 | AC_DEFUN(LICQDAEMON_CXX_FLAGS, |
| | 116 | [AC_CACHE_CHECK(whether ${CXX-g++} accepts -fno-exceptions -fno-check-new, licqdaemon_prog_cxx_fno_exceptions, |
| | 117 | [echo 'void f(){}' > conftest.cc |
| | 118 | if test -z "`${CXX-g++} -fno-exceptions -fno-check-new -c conftest.cc 2>&1`"; then |
| | 119 | licqdaemon_prog_cxx_fno_exceptions=yes |
| | 120 | else |
| | 121 | licqdaemon_prog_cxx_fno_exceptions=no |
| | 122 | fi |
| | 123 | rm -f conftest* |
| | 124 | ]) |
| | 125 | |
| | 126 | if test "$licqdaemon_prog_cxx_fno_exceptions" = "yes"; then |
| | 127 | CXXFLAGS="${CXXFLAGS} -fno-exceptions -fno-check-new" |
| | 128 | fi |
| | 129 | |
| | 130 | AC_ARG_ENABLE(debug, |
| | 131 | [ --enable-debug creates debugging code], |
| | 132 | [ licqdaemon_use_debug="$enableval"], [licqdaemon_use_debug="no"]) |
| | 133 | |
| | 134 | if test "$licqdaemon_use_debug" = "no"; then |
| | 135 | CXXFLAGS="`echo $CXXFLAGS | sed s/-g//`" |
| | 136 | CFLAGS="`echo $CFLAGS | sed s/-g//`" |
| | 137 | fi |
| | 138 | ]) |