summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
authorJan Djärv <jan.h.d@swipnet.se>2009-11-17 08:21:23 +0000
committerJan Djärv <jan.h.d@swipnet.se>2009-11-17 08:21:23 +0000
commit29f54ba975b22e0279baaa4df0f8a15ba87ef31b (patch)
treebebdf482fb850eb3f36cfcb552cebfcfc65186c7 /configure
parent81e7a43518ec459a9f9c702c4e4f5217b8faf198 (diff)
downloademacs-29f54ba975b22e0279baaa4df0f8a15ba87ef31b.tar.gz
Handle system default font and changing font parameters.
* xterm.h (struct x_display_info): Add atoms and Window for xsettings. * xterm.c (handle_one_xevent): Call xft_settings_event for ClientMessage, PropertyNotify and DestroyNotify. (x_term_init): If we have XFT, get DPI from Xft.dpi. Call xsettings_initialize. * xftfont.c (xftfont_fix_match): New function. (xftfont_open): Call XftDefaultSubstitute before XftFontMatch. Call xftfont_fix_match after XftFontMatch. * xfont.c (xfont_driver): Initialize all members. * xfns.c (x_default_font_parameter): Try font from Ffont_get_system_font. Do not get font from x_default_parameter if we got one from Ffont_get_system_font. (Fx_select_font): Get the defaut font name from :name of FRAME_FONT (f). * w32font.c (w32font_driver): Initialize all members. * termhooks.h (enum event_kind): CONFIG_CHANGED_EVENT is new. * lisp.h: Declare syms_of_xsettings. * keyboard.c (kbd_buffer_get_event, make_lispy_event): Handle CONFIG_CHANGED_EVENT. * ftfont.c (ftfont_filter_properties): New function. * frame.c (x_set_font): Remove unused variable lval. * font.h (struct font_driver): filter_properties is new. * font.c (font_put_extra): Don't return if val is nil, it means boolean option is off. (font_parse_fcname): Collect all extra properties in extra_props and call filter_properties for all drivers with extra_props and font as parameter. (font_open_entity): Do not use cache, it does not pick up new fontconfig settings like hinting. (font_load_for_lface): If spec had a name in it, store it in entity. * emacs.c (main): Call syms_of_xsettings * config.in: HAVE_GCONF is new. * Makefile.in (GCONF_CFLAGS, GCONF_LIBS): New variables for HAVE_GCONF. xsettings.o is new. * menu-bar.el: Put "Use system font" in Option-menu. * loadup.el: If feature system-font-setting or font-render-setting is there, load font-setting. * Makefile.in (ELCFILES): font-settings.el is new. * font-setting.el: New file. * NEWS: Mention dynamic font changes (font-use-system-font). * configure.in: New option: --with(out)-gconf. Set HAVE_GCONF if we find gconf.
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure118
1 files changed, 118 insertions, 0 deletions
diff --git a/configure b/configure
index 01dd6f1cfbc..3f1b2bcde69 100755
--- a/configure
+++ b/configure
@@ -716,6 +716,8 @@ GTK_CFLAGS
GTK_LIBS
DBUS_CFLAGS
DBUS_LIBS
+GCONF_CFLAGS
+GCONF_LIBS
FONTCONFIG_CFLAGS
FONTCONFIG_LIBS
XFT_CFLAGS
@@ -791,6 +793,7 @@ with_xim
with_ns
with_gpm
with_dbus
+with_gconf
with_makeinfo
with_gtk
with_gcc
@@ -1499,6 +1502,7 @@ Optional Packages:
--without-gpm don't use -lgpm for mouse support on a GNU/Linux
console
--without-dbus don't compile with D-Bus support
+ --without-gconf don't compile with GConf support
--without-makeinfo don't require makeinfo for building manuals
--with-pkg-config-prog=PATH
@@ -2240,6 +2244,14 @@ else
fi
+# Check whether --with-gconf was given.
+if test "${with_gconf+set}" = set; then
+ withval=$with_gconf;
+else
+ with_gconf=yes
+fi
+
+
## For the times when you want to build Emacs but don't have
## a suitable makeinfo, and can live without the manuals.
@@ -12519,6 +12531,111 @@ done
fi
fi
+HAVE_GCONF=no
+if test "${with_gconf}" = "yes"; then
+
+ succeeded=no
+
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no"
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ if test "$PKG_CONFIG" = "no" ; then
+ HAVE_GCONF=no
+ else
+ PKG_CONFIG_MIN_VERSION=0.9.0
+ if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then
+ { $as_echo "$as_me:$LINENO: checking for gconf-2.0 >= 2.13" >&5
+$as_echo_n "checking for gconf-2.0 >= 2.13... " >&6; }
+
+ if $PKG_CONFIG --exists "gconf-2.0 >= 2.13" 2>&5; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ succeeded=yes
+
+ { $as_echo "$as_me:$LINENO: checking GCONF_CFLAGS" >&5
+$as_echo_n "checking GCONF_CFLAGS... " >&6; }
+ GCONF_CFLAGS=`$PKG_CONFIG --cflags "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
+ { $as_echo "$as_me:$LINENO: result: $GCONF_CFLAGS" >&5
+$as_echo "$GCONF_CFLAGS" >&6; }
+
+ { $as_echo "$as_me:$LINENO: checking GCONF_LIBS" >&5
+$as_echo_n "checking GCONF_LIBS... " >&6; }
+ GCONF_LIBS=`$PKG_CONFIG --libs "gconf-2.0 >= 2.13"|sed -e 's,///*,/,g'`
+ { $as_echo "$as_me:$LINENO: result: $GCONF_LIBS" >&5
+$as_echo "$GCONF_LIBS" >&6; }
+ else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ GCONF_CFLAGS=""
+ GCONF_LIBS=""
+ ## If we have a custom action on failure, don't print errors, but
+ ## do set a variable so people can do so.
+ GCONF_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gconf-2.0 >= 2.13"`
+
+ fi
+
+
+
+ else
+ echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer."
+ echo "*** See http://www.freedesktop.org/software/pkgconfig"
+ fi
+ fi
+
+ if test $succeeded = yes; then
+ HAVE_GCONF=yes
+ else
+ HAVE_GCONF=no
+ fi
+
+ if test "$HAVE_GCONF" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GCONF 1
+_ACEOF
+
+ fi
+fi
+
HAVE_XAW3D=no
if test x"${USE_X_TOOLKIT}" = xmaybe || test x"${USE_X_TOOLKIT}" = xLUCID; then
if test "$with_xaw3d" != no; then
@@ -25513,6 +25630,7 @@ echo " Does Emacs use -lpng? ${HAVE_PNG}"
echo " Does Emacs use -lrsvg-2? ${HAVE_RSVG}"
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 -lfreetype? ${HAVE_FREETYPE}"
echo " Does Emacs use -lm17n-flt? ${HAVE_M17N_FLT}"