mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-23 22:52:34 +01:00
configure: Less intrusive CFLAGS change when --enable-debug is chosen
The previous code made a dumb change to CFLAGS which would cause user supplied CFLAGS to be ignored, and possible compiler compatibility issues. The new code does the same changes in a smoother way, so we do not totally drop user specified or script detected compiler options. When debug is enabled, we also include a reminder for the final CFLAGS value. Signed-off-by: Christophe CURIS <christophe.curis@free.fr>
This commit is contained in:
committed by
Carlos R. Mafra
parent
59f5aeeec5
commit
4cf72c990d
16
configure.ac
16
configure.ac
@@ -84,7 +84,18 @@ AC_ARG_ENABLE(debug,
|
||||
[AC_MSG_ERROR([bad value $enableval for --enable-debug])] )],
|
||||
[debug=no])
|
||||
AS_IF([test "x$debug" = "xyes"],
|
||||
[CFLAGS="-g -O0" ; CPPFLAGS="$CPPFLAGS -DDEBUG"])
|
||||
[dnl This flag should have already been detected and added, but if user
|
||||
dnl provided an explicit CFLAGS it may not be the case
|
||||
AS_IF([echo " $CFLAGS " | grep " -g " 2>&1 > /dev/null],
|
||||
[@%:@ Debug symbol already activated],
|
||||
[AX_CFLAGS_GCC_OPTION([-g])])
|
||||
dnl
|
||||
dnl This flag generally makes debugging nightmarish, remove it if present
|
||||
CFLAGS="`echo "$CFLAGS" | sed -e 's/-fomit-frame-pointer *//' `"
|
||||
dnl
|
||||
dnl Enable internal debug code
|
||||
CPPFLAGS="$CPPFLAGS -DDEBUG"
|
||||
])
|
||||
|
||||
|
||||
AX_CFLAGS_GCC_OPTION(-Wall)
|
||||
@@ -841,7 +852,8 @@ dnl echo "Supported languages beside English : $languages"
|
||||
if test "x$MOFILES" != "x"; then
|
||||
echo "Installation path for translations : $NLSDIR" | sed -e 's|\$(prefix)|'"$prefix|"
|
||||
fi
|
||||
AS_IF([test "x$debug" = "xyes"], [echo "Debug information enabled : $debug"])
|
||||
AS_IF([test "x$debug" = "xyes"],
|
||||
[AS_ECHO(["Debug enabled: CFLAGS = $CFLAGS"]) ])
|
||||
echo
|
||||
|
||||
dnl WM_PRINT_REDCRAP_BUG_STATUS
|
||||
|
||||
Reference in New Issue
Block a user