summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrbuj <[email protected]>2019-09-27 17:20:38 +0200
committerraveit65 <[email protected]>2019-10-01 12:06:08 +0200
commita876fa43e7bc35267712b597dc728fd2b42eb3df (patch)
tree8184ec57b9350cd290a6dc1f9e4121581df47af6
parent23d5fe713a843cae2cc6da77ca64af10bd9a6a75 (diff)
downloadmate-utils-a876fa43e7bc35267712b597dc728fd2b42eb3df.tar.bz2
mate-utils-a876fa43e7bc35267712b597dc728fd2b42eb3df.tar.xz
Use MATE_DEBUG_CHECK for setting compiler debug flags
By default, it disables the debugging.
-rw-r--r--configure.ac28
1 files changed, 5 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac
index 8bc94f76..ec0e67c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -15,6 +15,7 @@ AM_INIT_AUTOMAKE([1.11 dist-xz no-dist-gzip check-news])
AM_SILENT_RULES([yes])
MATE_COMMON_INIT
+MATE_DEBUG_CHECK([no])
IT_PROG_INTLTOOL([0.50.1])
@@ -171,30 +172,11 @@ dnl Other miscellaneous checks
dnl ***************************************************************
dnl Enable debug messages
-m4_define([debug_default], [m4_if(m4_eval(gdict_minor_version % 2), [1], [yes], [minimum])])
-AC_ARG_ENABLE([debug],
- [AC_HELP_STRING([--enable-debug=@<:@no/minimum/yes@:>@],
- [Enable debug messages @<:@default=debug_default@:>@])],
- [],
- [enable_debug=debug_default])
-
-AS_CASE([$enable_debug],
-
- [yes],
- [
- test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
- GDICT_DEBUG_CFLAGS="-DGDICT_ENABLE_DEBUG"
- ],
-
- [minimum],
- [GDICT_DEBUG_CFLAGS="-DG_DISABLE_CAST_CHECKS"],
-
- [no],
- [GDICT_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"],
-
- [*], [AC_MSG_ERROR([Unknown argument to --enable-debug])]
+AS_CASE([$ax_enable_debug],
+ [yes],[GDICT_DEBUG_CFLAGS="-DGDICT_ENABLE_DEBUG"],
+ [no],[GDICT_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"],
+ [*],[GDICT_DEBUG_CFLAGS="-DG_DISABLE_CAST_CHECKS"]
)
-
AC_SUBST(GDICT_DEBUG_CFLAGS)
dnl IPv6 support