[Xfce4-commits] <xfce4-dev-tools:master> Fix default detection and $enable_debug value in XDT_FEATURE_DEBUG().

Jannis Pohlmann noreply at xfce.org
Sat Sep 19 16:10:01 CEST 2009


Updating branch refs/heads/master
         to 678b9705cb2424d0d690aee12ac56ba24e8aaebd (commit)
       from 0b00f6c1ea8c7e7d1ca772bf46f4c0e770970925 (commit)

commit 678b9705cb2424d0d690aee12ac56ba24e8aaebd
Author: Jannis Pohlmann <jannis at xfce.org>
Date:   Sat Sep 19 16:04:57 2009 +0200

    Fix default detection and $enable_debug value in XDT_FEATURE_DEBUG().
    
    This uses the m4_default() macro instead of the custom code to check
    which debug level should be used as the default. $default_level was
    not set when running configure with --help before.
    
    It seems we also need to use [enable_debug=$enableval] in
    AC_ARG_ENABLE() for enable_debug to be set. Tested it and it works fine.

 m4macros/xdt-features.m4 |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diff --git a/m4macros/xdt-features.m4 b/m4macros/xdt-features.m4
index 7c72f81..5ec90d5 100644
--- a/m4macros/xdt-features.m4
+++ b/m4macros/xdt-features.m4
@@ -58,14 +58,12 @@ dnl XDT_FEATURE_DEBUG(default_level=minimum)
 dnl
 AC_DEFUN([XDT_FEATURE_DEBUG],
 [
-  test "$1" && default_level=$1 || default_level=minimum
-
   AC_ARG_ENABLE([debug],
                 AC_HELP_STRING([--enable-debug@<:@=no|minimum|yes|full@:>@],
-                               [Build with debugging support (default=$default_level)])
+                               [Build with debugging support @<:@default=m4_default([$1], [minimum])@:>@]),
                 AC_HELP_STRING([--disable-debug],
-                               [Include no debugging support [default]]),
-                [], [enable_debug=$default_level])
+                               [Include no debugging support]),
+                [enable_debug=$enableval], [enable_debug=m4_default([$1], [minimum])])
 
   AC_MSG_CHECKING([whether to build with debugging support])
   if test x"$enable_debug" = x"full" -o x"$enable_debug" = x"yes"; then



More information about the Xfce4-commits mailing list