[json-glib] [build] Use AS_CASE m4 macro, instead of AS_IF



commit 97fc00b1a5e3878074488ee93d9b52570983da1f
Author: Emmanuele Bassi <ebassi linux intel com>
Date:   Thu Jun 18 10:03:05 2009 +0100

    [build] Use AS_CASE m4 macro, instead of AS_IF

 configure.ac |   30 ++++++++++++++++--------------
 1 files changed, 16 insertions(+), 14 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 8997d02..04be1a5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -75,23 +75,25 @@ AC_ARG_ENABLE([debug],
               [],
               [enable_debug=debug_default])
 
-AS_IF([test "x$enable_debug" = "xyes"],
-      [
-        test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
-        JSON_DEBUG_CFLAGS="-DJSON_ENABLE_DEBUG"
-      ],
+AS_CASE([$enable_debug],
 
-      [test "x$enable_debug" = "xminimum"],
-      [
-        JSON_DEBUG_CFLAGS="-DJSON_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"
-      ],
+        [yes],
+        [
+          test "$cflags_set" = set || CFLAGS="$CFLAGS -g"
+          JSON_DEBUG_CFLAGS="-DJSON_ENABLE_DEBUG"
+        ],
 
-      [test "x$enable_debug" = "xno"],
-      [
-        JSON_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
-      ],
+        [minimum],
+        [
+          JSON_DEBUG_CFLAGS="-DJSON_ENABLE_DEBUG -DG_DISABLE_CAST_CHECKS"
+        ],
+
+        [no],
+        [
+          JSON_DEBUG_CFLAGS="-DG_DISABLE_ASSERT -DG_DISABLE_CHECKS -DG_DISABLE_CAST_CHECKS"
+        ],
 
-      [AC_MSG_ERROR([Unknown argument to --enable-debug])]
+        [AC_MSG_ERROR([Unknown argument to --enable-debug])]
 )
 
 AC_SUBST(JSON_DEBUG_CFLAGS)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]