[libgda] Use $enableval in AC_ARG_ENABLE(), fixes bug #636439



commit 48bebbc72bf2629a25041f8579f82be0d2ea2a2f
Author: Vivien Malerba <malerba gnome-db org>
Date:   Sat Dec 4 15:35:12 2010 +0100

    Use $enableval in AC_ARG_ENABLE(), fixes bug #636439

 configure.ac |   26 ++++++++++++++++----------
 1 files changed, 16 insertions(+), 10 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 99e83f1..005b166 100644
--- a/configure.ac
+++ b/configure.ac
@@ -405,7 +405,7 @@ dnl ******************************
 have_json=no
 AC_ARG_ENABLE([json],
 	AS_HELP_STRING([--enable-json], [Enable support for JSON, disabled by default]),
-	[enable_json=yes],[enable_json=no])
+	[enable_json=$enableval],[enable_json=no])
 
 if test "x$enable_json" = xyes
 then
@@ -430,7 +430,7 @@ dnl Checks for libcrypto
 dnl ******************************
 AC_ARG_ENABLE([crypto],
 	AS_HELP_STRING([--disable-crypto], [Disable SqlCipher database provider (using the libcrypto library)]),
-	[enable_crypto=no],[enable_crypto=yes])
+	[enable_crypto=$enableval],[enable_crypto=yes])
 
 if test "x$enable_crypto" = xyes
 then
@@ -574,10 +574,10 @@ then
         AM_CONDITIONAL(HAVE_SQLITE, 0)
 else
 	AC_ARG_ENABLE(system-sqlite,
-        [  --enable-system-sqlite  Use SQLite installed on the system [default=no]],
-        use_syst_sqlite="Yes", use_syst_sqlite="No")
+		AS_HELP_STRING([--enable-system-sqlite], [Use SQLite installed on the system [default=no]]),
+        	[use_syst_sqlite=$enableval], [use_syst_sqlite="no"])
 
-	if test "x$use_syst_sqlite" = "xYes"; then
+	if test "x$use_syst_sqlite" = "xyes"; then
 		SQLITE_MODULES="sqlite3 >= 3.6.11"
 		PKG_CHECK_MODULES(SQLITE, $SQLITE_MODULES, have_sqlite=yes, have_sqlite=no)
 		if test x"$have_sqlite" = "xyes"
@@ -706,17 +706,20 @@ dnl
 dnl Check if lib should be build with the debug mode
 dnl
 AC_ARG_ENABLE(debug,
-        [  --enable-debug          debug [default=no]],
-        use_debug="Yes", use_debug="No")
+	AS_HELP_STRING([--enable-debug], [Enable debug mode [default=no]]),
+        [use_debug=$enableval], [use_debug="no"])
 
-if test "x$use_debug" = "xYes"; then
+if test "x$use_debug" = "xyes"
+then
 	AC_DEFINE(GDA_DEBUG)
 	GDA_DEBUG_FLAGS=-DGDA_DEBUG
 	AC_SUBST(GDA_DEBUG_FLAGS)
 fi
 
 dnl Disable rebuild of glib-mkenum -generated source code:
-AC_ARG_ENABLE(rebuilds, [  --disable-rebuilds      disable all source autogeneration rules],,enable_rebuilds=yes)
+AC_ARG_ENABLE(rebuilds,
+	AS_HELP_STRING([--disable-rebuilds], [disable all source autogeneration rules]),
+	[enable_rebuilds=$enableval], [enable_rebuilds=yes])
 
 # define a MAINT-like variable REBUILD which is set if Perl
 # is found, so autogenerated sources can be rebuilt
@@ -733,7 +736,10 @@ AC_SUBST(REBUILD)
 #
 # enable setting the Gda SQL console as default version (makes a symlink)
 #
-AC_ARG_ENABLE(default-binary, [ --enable-default-binary install binaries as default (default=gda_stable)], , enable_default_binary=gda_stable)
+AC_ARG_ENABLE(default-binary,
+	AS_HELP_STRING([--enable-default-binary], [install binaries as default (default=gda_stable)]),
+	[enable_default_binary=$enableval], [enable_default_binary=gda_stable])
+
 AM_CONDITIONAL(DEFAULT_BINARY, test "x$enable_default_binary" = xyes)
 
 AC_SUBST(LIBGDA_CFLAGS)



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