diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2014-03-30 12:44:33 +0200 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2014-03-30 12:44:33 +0200 |
commit | 4e6c9f7b2e67521f3b6835622c71852cec2d612f (patch) | |
tree | a9a29983f0e1c92f068f61f59bddaf139d3f2d5d /configure.ac | |
parent | 8778eb5efac3bf8936fdf22231b46ac0f88e0ab5 (diff) | |
download | emacs-4e6c9f7b2e67521f3b6835622c71852cec2d612f.tar.gz |
* configure.ac: Add check that GSettings is in libgio. Backport from trunk.
Fixes: debbugs:17118
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/configure.ac b/configure.ac index e112f7926a5..44199c1fb50 100644 --- a/configure.ac +++ b/configure.ac @@ -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 |