[libgsf] configure: implement --without-gconf



commit d8488610a54f23881ef5da1d39b71a270c455d5d
Author: Morten Welinder <terra gnome org>
Date:   Mon Mar 28 11:07:03 2011 -0400

    configure: implement --without-gconf
    
    From: Gilles Dartiguelongue <eva gentoo org>
    Date: Wed, 13 Jan 2010 23:10:44 +0100
    Subject: [PATCH] Make gconf/thumbnailer dependency optional
    
    This just needs gconf-2.m4 to be present in m4/ directory in order to
    run correctly.
    
    Gentoo: https://bugs.gentoo.org/show_bug.cgi?id=289856

 ChangeLog    |    5 +++++
 NEWS         |    3 +++
 configure.in |   39 +++++++++++++++++++++++++--------------
 3 files changed, 33 insertions(+), 14 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 06235e6..ad67037 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-03-28  Morten Welinder  <terra gnome org>
+
+	* configure.in: Implement --without-gconf (as opposed to looking
+	for gconftool-2.
+
 2011-03-24  Morten Welinder <terra gnome org>
 
 	* Release 1.14.20
diff --git a/NEWS b/NEWS
index b43834b..bf6bcdf 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
 libgsf 1.14.21
 
+Gilles Dartiguelongue:
+	* Implement --without-gconf for explicit dependency control.
+
 --------------------------------------------------------------------------
 libgsf 1.14.20
 
diff --git a/configure.in b/configure.in
index 46e0cd3..db64cca 100644
--- a/configure.in
+++ b/configure.in
@@ -501,21 +501,32 @@ AM_CONDITIONAL(WITH_LIBGSF_BONOBO, test $have_bonobo = yes)
 
 # ===================
 # GConf configuration
+AC_ARG_WITH([gconf],
+    AC_HELP_STRING([--without-gconf],[disable the use of gconf (default: auto)]),
+    [],
+    [with_gconf=auto])
+
+AS_IF([test "$with_gconf" != "no"], [
+    PKG_CHECK_EXISTS([gconf-2.0 >= 2.24.0],[
+        AC_CHECK_PROG([GCONFTOOL], [gconftool-2], [gconftool-2], [no])
+        AS_IF([test "$GCONFTOOL" = "no"], [
+            AC_MSG_WARN([thumbnailer will not be built, unable to find gconftool-2])
+            have_gconf=no
+            ], [
+            have_gconf=yes
+            ])
+        ],[have_gconf=no])
+    ], [have_gconf=no])
+
+AS_IF([test "$have_gconf" = "yes"], [], [
+    AS_IF([test "$with_gconf" = "yes"],
+        [AC_MSG_ERROR([gconf support requested, but not available.])])
+    ])
+
+AM_GCONF_SOURCE_2
+AM_CONDITIONAL(WITH_GCONF, test "$have_gconf" = "yes")
 
-dnl The following conditional is set in AM_GCONF_SOURCE_2.
-dnl Because we may skip its execution, we have to set a default here.
-AM_CONDITIONAL([GCONF_SCHEMAS_INSTALL], [false])
-
-dnl Don't publish the GCONFTOOL variable, AM_GCONF_SOURCE_2 has ``gconftool-2'' hardwired.
-m4_pattern_allow([^AM_GCONF_SOURCE_2$])
-GCONFTOOL=
-AC_CHECK_PROG([GCONFTOOL], [gconftool-2], [gconftool-2], [no])
-if test "x$GCONFTOOL" = "xno"; then
-    AC_MSG_WARN([thumbnailer will not be built, unable to find gconftool-2])
-else
-    AM_GCONF_SOURCE_2
-fi
-AM_CONDITIONAL(WITH_GCONF, test "x$GCONFTOOL" != "xno")
+# ===================
 
 LDFLAGS="-no-undefined $LDFLAGS"
 



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