CXXFLAGS=${CXXFLAGS-$CFLAGS}
LDFLAGS=${LDFLAGS-""}
optimise_b=yes
+ checks_b=no
profile_b=no
debug_b=yes
pipe_b=yes
[compile with debugging info. Default: on])],
[debug_b=$enableval])
+ AC_ARG_ENABLE(checking,
+ [AS_HELP_STRING([--enable-checking],
+ [compile with expensive run-time checks. Default: off])],
+ [checks_b=$enableval])
+
AC_ARG_ENABLE(optimising,
[AS_HELP_STRING([--enable-optimising],
[compile with optimising. Default: on])],
[pipe_b=$enableval])
if test "$optimise_b" = yes; then
- AC_DEFINE(NDEBUG)
- DEFINES="$DEFINES -DNDEBUG"
OPTIMIZE=" -O2 -finline-functions"
+ # following two lines are compatibility while Patchy has not
+ # yet learnt about --enable-checking. But once it has, we
+ # don't want -DDEBUG twice, so we omit it here if it is going
+ # to get added anyway later.
+ elif test "$checks_b" != yes; then
+ DEFINES="$DEFINES -DDEBUG"
+ fi
+
+ if test "$checks_b" = yes; then
+ DEFINES="$DEFINES -DDEBUG"
fi
if test $profile_b = yes; then
warn="Python.h (python-devel, python-dev or libpython-dev package)"
STEPMAKE_ADD_ENTRY($1, $warn)
fi
+ AC_SUBST(PYTHON_CFLAGS)
+ AC_SUBST(PYTHON_LDFLAGS)
])