From 039636e34c8a8565cfafaff49d6939df7a142a88 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sat, 16 Mar 2013 20:06:00 -0700 Subject: [PATCH] Add a new --enable-debug autoconf switch Remove duplicate --enable-blocking-random by the way --- configure.ac | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/configure.ac b/configure.ac index 2ef9a64b..b811ba5a 100644 --- a/configure.ac +++ b/configure.ac @@ -178,9 +178,22 @@ AC_ARG_ENABLE(blocking-random, [AS_HELP_STRING(--enable-blocking-random,Use /dev/random instead of /dev/urandom)], [AC_DEFINE([USE_BLOCKING_RANDOM], [1], [Use blocking random])]) -AC_ARG_ENABLE(blocking-random, -[AS_HELP_STRING(--enable-blocking-random,Use /dev/random instead of /dev/urandom)], -[AC_DEFINE([USE_BLOCKING_RANDOM], [1], [Use blocking random])]) +AC_ARG_ENABLE(debug, +[AS_HELP_STRING(--enable-debug,For maintainers only - please do not use)], +[ + AS_IF([test "x$LX_CFLAGS" = "xNONE"], [ + nxflags="" + for flag in `echo $CFLAGS`; do + case "$flag" in + -O*) ;; + -g*) ;; + *) AS_VAR_APPEND([nxflags], [" $flag"]) ;; + esac + done + CFLAGS="$nxflags -O0 -g3" + ]) + CPPFLAGS="$CPPFLAGS -DDEBUG=1" +]) AC_ARG_WITH(safecode, [AS_HELP_STRING(--with-safecode,For maintainers only - please do not use)],