X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=aclocal.m4;h=48d0b77b748d6dd9b3462eb79bfbc20293c53792;hb=45c9b27033acc2890f44e7eb08c29c737ca9111f;hp=74cf3bcb2c4030321bc796a313bdddd2e70805f9;hpb=414804cfb0f79dd0e591b3a3e2d2255461618a10;p=lilypond.git diff --git a/aclocal.m4 b/aclocal.m4 index 74cf3bcb2c..48d0b77b74 100644 --- a/aclocal.m4 +++ b/aclocal.m4 @@ -173,6 +173,7 @@ AC_DEFUN(STEPMAKE_COMPILE_BEFORE, [ CXXFLAGS=${CXXFLAGS-$CFLAGS} LDFLAGS=${LDFLAGS-""} optimise_b=yes + checks_b=no profile_b=no debug_b=yes pipe_b=yes @@ -182,6 +183,11 @@ AC_DEFUN(STEPMAKE_COMPILE_BEFORE, [ [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])], @@ -198,9 +204,17 @@ AC_DEFUN(STEPMAKE_COMPILE_BEFORE, [ [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 @@ -1128,6 +1142,8 @@ AC_DEFUN(STEPMAKE_PYTHON_DEVEL, [ 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) ])