From: Chris Hanson Date: Fri, 9 Nov 2018 06:44:51 +0000 (-0800) Subject: Allow --enable-debugging to have a third value. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~117 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=72fbb947027dd4c399eeea7f98d659f39f9b1e2d;p=mit-scheme.git Allow --enable-debugging to have a third value. Anything other than "yes" or "no" will be interpreted as setting the C compiler to generate debugging symbols, but not turn on all of the debugging helpers in the microcode. --- diff --git a/src/microcode/configure.ac b/src/microcode/configure.ac index 337c9ea96..b69e23bcd 100644 --- a/src/microcode/configure.ac +++ b/src/microcode/configure.ac @@ -196,16 +196,19 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET -if test ${GCC} = yes; then +if test x"${GCC}" = xyes; then dnl Discard flags computed by AC_PROG_CC; we'll use our own. CFLAGS=${SAVED_CFLAGS} LDFLAGS=${SAVED_LDFLAGS} - if test ${enable_debugging} = no; then + if test x"${enable_debugging}" = xno; then CFLAGS="-O3 ${CFLAGS}" else - CFLAGS="-O0 -g -DENABLE_DEBUGGING_TOOLS ${CFLAGS}" + if test x"${enable_debugging}" = xyes; then + CFLAGS="-DENABLE_DEBUGGING_TOOLS ${CFLAGS}" + fi + CFLAGS="-O0 -g ${CFLAGS}" LDFLAGS="${LDFLAGS} -g" fi CFLAGS="-Wall -Wundef -Wpointer-arith -Winline ${CFLAGS}"