From 72fbb947027dd4c399eeea7f98d659f39f9b1e2d Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 8 Nov 2018 22:44:51 -0800 Subject: [PATCH] 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. --- src/microcode/configure.ac | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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}" -- 2.25.1