From 51d91d111531203038aaeb14abce647d91ad1fba Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Sun, 7 Jul 2013 22:25:20 -0700 Subject: [PATCH] autoconf: move the last switch, --enable-debug --- configure.ac | 39 +++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/configure.ac b/configure.ac index 1fa9d22b..d2b7722b 100644 --- a/configure.ac +++ b/configure.ac @@ -35,6 +35,8 @@ AC_SUBST(SODIUM_LIBRARY_VERSION_MINOR) AC_SUBST(SODIUM_LIBRARY_VERSION) AC_SUBST(DLL_VERSION) +LX_CFLAGS=${CFLAGS-NONE} + dnl Switches AC_ARG_ENABLE(ssp, @@ -87,11 +89,27 @@ AC_ARG_WITH(safecode, ]) ]) +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_SUBST([MAINT]) dnl Checks -LX_CFLAGS=${CFLAGS-NONE} AC_PROG_CC_C99 AM_PROG_AS AC_USE_SYSTEM_EXTENSIONS @@ -329,25 +347,6 @@ AC_CHECK_FUNC(fegetenv, , [AC_CHECK_LIB(m, fegetenv)]) AC_CHECK_FUNCS([SecureZeroMemory]) -dnl Switches, continued - -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_SUBST([LIBTOOL_EXTRA_FLAGS]) dnl Libtool.