summaryrefslogtreecommitdiff
path: root/am/debug.m4
diff options
context:
space:
mode:
Diffstat (limited to 'am/debug.m4')
-rw-r--r--am/debug.m430
1 files changed, 19 insertions, 11 deletions
diff --git a/am/debug.m4 b/am/debug.m4
index 1f8a947a5..f31700836 100644
--- a/am/debug.m4
+++ b/am/debug.m4
@@ -1,5 +1,5 @@
dnl This file is part of GNU mailutils.
-dnl Copyright (C) 2001-2019 Free Software Foundation, Inc.
+dnl Copyright (C) 2001-2024 Free Software Foundation, Inc.
dnl
dnl This file is free software; as a special exception the author gives
dnl unlimited permission to copy and/or distribute it, with or without
@@ -15,27 +15,35 @@ dnl
AC_DEFUN([MU_DEBUG_MODE],
[AC_ARG_ENABLE(debug,
- AC_HELP_STRING([--enable-debug], [enable debugging mode]),
+ AS_HELP_STRING([--enable-debug], [enable debugging mode]),
[mu_debug_mode=$enableval],
[mu_debug_mode=maybe])
save_CC=$CC
CC="$CC -Wall"
- AC_TRY_COMPILE([],[void main(){}],
- [CFLAGS="$CFLAGS -Wall"])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([],
+ [[void main(){}]])],
+ [],
+ [CFLAGS="$CFLAGS -Wall"])
CC="$CC -Wdeclaration-after-statement"
- AC_TRY_COMPILE([],[void main(){}],
- [CFLAGS="$CFLAGS -Wdeclaration-after-statement"])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([],
+ [[void main(){}]])],
+ [],
+ [CFLAGS="$CFLAGS -Wdeclaration-after-statement"])
if test "$mu_debug_mode" != no; then
CFLAGS=`echo $CFLAGS | sed 's/-O[[0-9]]//g'`
AC_MSG_CHECKING([whether cc accepts -ggdb])
CC="$CC -ggdb"
- AC_TRY_COMPILE([],[void main(){}],
- [AC_MSG_RESULT(yes)
- CFLAGS="$CFLAGS -ggdb"],
- [AC_MSG_RESULT(no)
- CFLAGS="$CFLAGS -g"])
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([],
+ [[void main(){}]])],
+ [AC_MSG_RESULT(yes)
+ CFLAGS="$CFLAGS -ggdb"],
+ [AC_MSG_RESULT(no)
+ CFLAGS="$CFLAGS -g"])
fi
CC=$save_CC])

Return to:

Send suggestions and report system problems to the System administrator.