X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=aclocal.m4;h=48d0b77b748d6dd9b3462eb79bfbc20293c53792;hb=c05019d37b7d5d973965f1fbac6bd88603a64d04;hp=7ed315124636ee063be84135d3c159e822781b61;hpb=e8d5061834a5a658c5ffd078237e9cd660069a7d;p=lilypond.git diff --git a/aclocal.m4 b/aclocal.m4 index 7ed3151246..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