]> git.eshelyaron.com Git - emacs.git/commitdiff
* configure.ac: Add check that GSettings is in libgio. Backport from trunk.
authorJan Djärv <jan.h.d@swipnet.se>
Sun, 30 Mar 2014 10:44:33 +0000 (12:44 +0200)
committerJan Djärv <jan.h.d@swipnet.se>
Sun, 30 Mar 2014 10:44:33 +0000 (12:44 +0200)
Fixes: debbugs:17118
ChangeLog
configure.ac

index 04f5bed7ee29a5691f80b587a24bb3263f42adcd..e5e69669293ff96a2370f05824922262854abef7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-30  Jan Djärv  <jan.h.d@swipnet.se>
+
+       * configure.ac: Add check that GSettings is in libgio (Bug#17118).
+       Backport from trunk.
+
 2014-03-26  Paul Eggert  <eggert@cs.ucla.edu>
 
        Merge from gnulib, incorporating:
index e112f7926a57529737d1ca96ef743ee24644c684..44199c1fb50b20ef958382aa8be58aa06f4efd29 100644 (file)
@@ -2432,9 +2432,26 @@ HAVE_GSETTINGS=no
 if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then
    PKG_CHECK_MODULES(GSETTINGS, gio-2.0 >= 2.26, HAVE_GSETTINGS=yes, HAVE_GSETTINGS=no)
    if test "$HAVE_GSETTINGS" = "yes"; then
-      AC_DEFINE(HAVE_GSETTINGS, 1, [Define to 1 if using GSettings.])
-      SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
-      SETTINGS_LIBS="$GSETTINGS_LIBS"
+      AC_MSG_CHECKING([whether GSettings is in gio])
+      GSETTINGS_COMPILES=no
+      AC_LINK_IFELSE(
+         [AC_LANG_PROGRAM(
+            [[/* Check that gsettings really is present.  */
+             #include <glib-object.h>
+            #include <gio/gio.h>
+            ]],
+            [[
+              GSettings *settings;
+              GVariant *val = g_settings_get_value (settings, "");
+            ]])],
+        [GSETTINGS_COMPILES=yes])
+      AC_MSG_RESULT([$GSETTINGS_COMPILES])
+
+      if test "$$GSETTINGS_COMPILES" = "yes"; then
+        AC_DEFINE(HAVE_GSETTINGS, 1, [Define to 1 if using GSettings.])
+       SETTINGS_CFLAGS="$GSETTINGS_CFLAGS"
+       SETTINGS_LIBS="$GSETTINGS_LIBS"
+      fi
    fi
 fi