emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] trunk r116906: * configure.ac: Add check that GSettings is


From: Jan D.
Subject: [Emacs-diffs] trunk r116906: * configure.ac: Add check that GSettings is in libgio.
Date: Sat, 29 Mar 2014 12:08:52 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 116906
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/17118
committer: Jan D. <address@hidden>
branch nick: trunk
timestamp: Sat 2014-03-29 13:08:47 +0100
message:
  * configure.ac: Add check that GSettings is in libgio.
modified:
  ChangeLog                      changelog-20091113204419-o5vbwnq5f7feedwu-1538
  configure.ac                   
configure.in-20091113204419-o5vbwnq5f7feedwu-783
=== modified file 'ChangeLog'
--- a/ChangeLog 2014-03-29 00:14:16 +0000
+++ b/ChangeLog 2014-03-29 12:08:47 +0000
@@ -1,3 +1,7 @@
+2014-03-29  Jan Djärv  <address@hidden>
+
+       * configure.ac: Add check that GSettings is in libgio (Bug#17118).
+
 2014-03-28  Glenn Morris  <address@hidden>
 
        * configure.ac (AC_INIT): Add "GNU" in package, add bug address.

=== modified file 'configure.ac'
--- a/configure.ac      2014-03-28 23:11:39 +0000
+++ b/configure.ac      2014-03-29 12:08:47 +0000
@@ -2432,9 +2432,26 @@
 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
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]