diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2011-06-30 16:00:26 +0200 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2011-06-30 16:00:26 +0200 |
commit | 9851bfc58dcf38d05e469112790c514c3fd6fbf7 (patch) | |
tree | 1931ced33d357c5100d1ce73a3e0a07e28eb7b98 /configure.in | |
parent | 656e1aab13d416dc06ca1138997e6396317321bc (diff) | |
download | emacs-9851bfc58dcf38d05e469112790c514c3fd6fbf7.tar.gz |
Add GSettings support (GConf is going away).
* configure.in (gsettings): New option and check for GSettings.
* src/Makefile.in (SETTINGS_CFLAGS, SETTINGS_LIBS): Renamed from
GCONF_CFLAGS/LIBS.
* src/xsettings.c: Include glib.h if HAVE_GSETTINGS.
Let HAVE_GSETTINGS override HAVE_GCONF.
(store_monospaced_changed): New function.
(EMACS_SETTINGS): A new type derived from GObject to handle
GSettings notifications.
(emacs_settings_constructor, emacs_settings_get_property)
(emacs_settings_set_property, emacs_settings_class_init):
New functions.
(gsettings_client, gsettings_obj): New variables.
(GSETTINGS_SCHEMA): New define.
(something_changedCB): Call store_monospaced_changed.
(init_gsettings): New function.
(xsettings_initialize): Call init_gsettings.
(syms_of_xsettings): Initialize gsettings_client, gsettings_obj
to NULL.
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 31 |
1 files changed, 29 insertions, 2 deletions
diff --git a/configure.in b/configure.in index d7e4efe51ed..ee091f3e2bc 100644 --- a/configure.in +++ b/configure.in @@ -172,6 +172,7 @@ OPTION_DEFAULT_OFF([ns],[use NeXTstep (Cocoa or GNUstep) windowing system]) OPTION_DEFAULT_ON([gpm],[don't use -lgpm for mouse support on a GNU/Linux console]) OPTION_DEFAULT_ON([dbus],[don't compile with D-Bus support]) OPTION_DEFAULT_ON([gconf],[don't compile with GConf support]) +OPTION_DEFAULT_ON([gsettings],[don't compile with GSettings support]) OPTION_DEFAULT_ON([selinux],[don't compile with SELinux support]) OPTION_DEFAULT_ON([gnutls],[don't use -lgnutls for SSL/TLS support]) @@ -1981,18 +1982,43 @@ if test "${with_dbus}" = "yes"; then fi AC_SUBST(DBUS_OBJ) +dnl GSettings has been tested under GNU/Linux only. +HAVE_GSETTINGS=no +if test "${HAVE_X11}" = "yes" && test "${with_gsettings}" = "yes"; then + PKG_CHECK_MODULES(GSETTINGS, glib-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" + fi +fi + dnl GConf has been tested under GNU/Linux only. dnl The version is really arbitrary, it is about the same age as Gtk+ 2.6. HAVE_GCONF=no -if test "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then +if test "${HAVE_GSETTINGS}" = "no" && "${HAVE_X11}" = "yes" && test "${with_gconf}" = "yes"; then PKG_CHECK_MODULES(GCONF, gconf-2.0 >= 2.13, HAVE_GCONF=yes, HAVE_GCONF=no) if test "$HAVE_GCONF" = yes; then AC_DEFINE(HAVE_GCONF, 1, [Define to 1 if using GConf.]) dnl Newer GConf doesn't link with g_objects, so this is not defined. - AC_CHECK_FUNCS([g_type_init]) + SETTINGS_CFLAGS="$GSETTINGS_CFLAGS" + SETTINGS_LIBS="$GSETTINGS_LIBS" fi fi +if test "$HAVE_GSETTINGS" = "yes" || "$HAVE_GCONF" = yes; then + SAVE_CFLAGS="$CFLAGS" + SAVE_LDFLAGS="$LDFLAGS" + CFLAGS="$SETTINGS_CFLAGS $CFLAGS" + LDFLAGS="$SETTINGS_LIBS $LDFLAGS" + AC_CHECK_FUNCS([g_type_init]) + CFLAGS="$SAVE_CFLAGS" + LDFLAGS="$SAVE_LDFLAGS" +fi +AC_SUBST(SETTINGS_CFLAGS) +AC_SUBST(SETTINGS_LIBS) + + dnl SELinux is available for GNU/Linux only. HAVE_LIBSELINUX=no LIBSELINUX_LIBS= @@ -3674,6 +3700,7 @@ echo " Does Emacs use imagemagick? ${HAVE_IMAGEMAGI echo " Does Emacs use -lgpm? ${HAVE_GPM}" echo " Does Emacs use -ldbus? ${HAVE_DBUS}" echo " Does Emacs use -lgconf? ${HAVE_GCONF}" +echo " Does Emacs use GSettings? ${HAVE_GSETTINGS}" echo " Does Emacs use -lselinux? ${HAVE_LIBSELINUX}" echo " Does Emacs use -lgnutls (2.6.x or higher)? ${HAVE_GNUTLS}" echo " Does Emacs use -lxml2? ${HAVE_LIBXML2}" |