… | |
… | |
170 | support_perl=yes |
170 | support_perl=yes |
171 | codesets=all |
171 | codesets=all |
172 | fi |
172 | fi |
173 | ]) |
173 | ]) |
174 | |
174 | |
175 | ASSERTIONS=no |
175 | support_assertions=no |
176 | AC_ARG_ENABLE(assert, |
176 | AC_ARG_ENABLE(assert, |
177 | [ --enable-assert enable assertions], |
177 | [ --enable-assert enable assertions], |
178 | [if test x$enableval = xyes; then |
178 | [if test x$enableval = xyes; then |
179 | ASSERTIONS=yes |
179 | support_assertions=yes |
180 | fi]) |
180 | fi]) |
181 | if test x$ASSERTIONS = xno; then |
181 | if test x$support_assertions = xno; then |
182 | AC_DEFINE(NDEBUG, 1, Disable assertions (good for debugging)) |
182 | AC_DEFINE(NDEBUG, 1, Disable assertions (good for debugging)) |
183 | fi |
183 | fi |
184 | |
184 | |
185 | WARNINGS=no |
185 | support_warnings=no |
186 | AC_ARG_ENABLE(warnings, |
186 | AC_ARG_ENABLE(warnings, |
187 | [ --enable-warnings turn on g++ warnings], |
187 | [ --enable-warnings turn on g++ warnings], |
188 | [if test x$enableval = xyes; then |
188 | [if test x$enableval = xyes; then |
189 | WARNINGS=yes |
189 | support_warnings=yes |
190 | fi]) |
190 | fi]) |
191 | if test x$GXX = xyes; then |
191 | if test x$GXX = xyes; then |
192 | if test $WARNINGS = yes; then |
192 | if test $support_warnings = yes; then |
193 | save_CXXFLAGS="$CXXFLAGS" |
193 | save_CXXFLAGS="$CXXFLAGS" |
194 | CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-non-virtual-dtor" |
194 | CXXFLAGS="$CXXFLAGS -Wall -Wno-sign-compare -Wno-reorder -Wno-non-virtual-dtor" |
195 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"]) |
195 | AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])], [], [CXXFLAGS="$save_CXXFLAGS"]) |
196 | else |
196 | else |
197 | CXXFLAGS="$CXXFLAGS -w" |
197 | CXXFLAGS="$CXXFLAGS -w" |