do not define NDEBUG if '--enable-assertions' passed to configure
* configure.ac (CFLAGS): Do not add "-DNDEBUG".
* configure.ac (assertions): New AC argument.
* configure.ac (NDEBUG): New AC macro (defined only if "assertions"
AC argument is not set to "yes").
;;
esac
fi
-CFLAGS="-DNDEBUG $CFLAGS"
+
+AC_ARG_ENABLE(assertions,
+ [AC_HELP_STRING([--enable-assertions], [Assertion checking])])
+if test "$enable_assertions" != yes; then
+ AC_DEFINE([NDEBUG], 1, [Define to disable assertion checking.])
+fi
+
AC_SUBST(PICFLAG)
AC_SUBST(DEFS)