1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-23 20:15:19 -07:00

autoconf: move the last switch, --enable-debug

This commit is contained in:
Frank Denis 2013-07-07 22:25:20 -07:00
parent 1d921e45da
commit 51d91d1115

View File

@ -35,6 +35,8 @@ AC_SUBST(SODIUM_LIBRARY_VERSION_MINOR)
AC_SUBST(SODIUM_LIBRARY_VERSION) AC_SUBST(SODIUM_LIBRARY_VERSION)
AC_SUBST(DLL_VERSION) AC_SUBST(DLL_VERSION)
LX_CFLAGS=${CFLAGS-NONE}
dnl Switches dnl Switches
AC_ARG_ENABLE(ssp, 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]) AC_SUBST([MAINT])
dnl Checks dnl Checks
LX_CFLAGS=${CFLAGS-NONE}
AC_PROG_CC_C99 AC_PROG_CC_C99
AM_PROG_AS AM_PROG_AS
AC_USE_SYSTEM_EXTENSIONS AC_USE_SYSTEM_EXTENSIONS
@ -329,25 +347,6 @@ AC_CHECK_FUNC(fegetenv, , [AC_CHECK_LIB(m, fegetenv)])
AC_CHECK_FUNCS([SecureZeroMemory]) 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]) AC_SUBST([LIBTOOL_EXTRA_FLAGS])
dnl Libtool. dnl Libtool.