From b0e04df615638ef21023420f564fcee1c9f2060d Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20Dj=C3=A4rv?= Date: Sat, 29 Mar 2014 13:08:47 +0100 Subject: [PATCH] * configure.ac: Add check that GSettings is in libgio. Fixes: debbugs:17118 --- ChangeLog | 4 ++++ configure.ac | 23 ++++++++++++++++++++--- 2 files changed, 24 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index e7db8858752..00547c36a08 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2014-03-29 Jan Djärv + + * configure.ac: Add check that GSettings is in libgio (Bug#17118). + 2014-03-28 Glenn Morris * configure.ac (AC_INIT): Add "GNU" in package, add bug address. diff --git a/configure.ac b/configure.ac index 2ac1828562c..bf404069a9f 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 + #include + ]], + [[ + 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 -- 2.39.2