aboutsummaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m434
1 files changed, 34 insertions, 0 deletions
diff --git a/acinclude.m4 b/acinclude.m4
new file mode 100644
index 0000000..840f88b
--- /dev/null
+++ b/acinclude.m4
@@ -0,0 +1,34 @@
1dnl This file is part of GNU mailutils.
2dnl Copyright (C) 2001 Free Software Foundation, Inc.
3dnl
4dnl This file is free software; as a special exception the author gives
5dnl unlimited permission to copy and/or distribute it, with or without
6dnl modifications, as long as this notice is preserved.
7dnl
8dnl This program is distributed in the hope that it will be useful, but
9dnl WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
10dnl implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11dnl
12dnl Check for --enable-debug switch. When the switch is specified, add
13dnl -ggdb to CFLAGS and remove any optimization options from there.
14dnl
15
16AC_DEFUN([MU_DEBUG_MODE],
17 [AC_ARG_ENABLE(debug,
18 [ --enable-debug enable debugging mode],
19 [if test x"$enableval" = xyes; then
20 if test x"$GCC" = xyes; then
21 AC_MSG_CHECKING(whether gcc accepts -ggdb)
22 save_CFLAGS=$CFLAGS
23 CFLAGS="-ggdb -Wall"
24 AC_TRY_COMPILE([],void f(){},
25 AC_MSG_RESULT(yes),
26 [if test x"$ac_cv_prog_cc_g" = xyes; then
27 CFLAGS="-g -Wall"
28 else
29 CFLAGS=
30 fi
31 AC_MSG_RESULT(no)])
32 CFLAGS="`echo $save_CFLAGS | sed 's/-O[[0-9]]//g'` $CFLAGS"
33 fi
34 fi])])

Return to:

Send suggestions and report system problems to the System administrator.