changeset: 4328:dfd878799ef0724973cd47b1bbfc3aa3db777fdc
tag: tip
user: Aidan Kehoe <kehoea(a)parhasard.net>
date: Fri Dec 14 14:25:04 2007 +0100
files: ChangeLog configure configure.ac src/ChangeLog src/config.h.in src/font-mgr.c
src/font-mgr.h
description:
Autoconfiscate the recent fontconfig spelling change.
ChangeLog addition:
2007-12-12 Aidan Kehoe <kehoea(a)parhasard.net>
* configure.ac :
Check for FcConfigGetRescanInterval, FcConfigSetRescanInterval.
* configure :
Rebuild.
src/ChangeLog additon:
2007-12-12 Aidan Kehoe <kehoea(a)parhasard.net>
* config.h.in:
Make the results of the checks for
FcConfigGetRescanInterval, FcConfigSetRescanInterval
available.
* font-mgr.h:
If FcConfigSetRescanInterval and FcConfigGetRescanInterval are not
available as functions, #define them to map to their old
misspelled names.
* font-mgr.c (Ffc_config_get_rescan_interval):
* font-mgr.c (Ffc_config_set_rescan_interval):
Use the correct spelling in
FcConfigGetRescanInterval, FcConfigSetRescanInterval
diff -r 466ad8ad5f136d806a71190b582f6c0eda0ecdf5 -r
dfd878799ef0724973cd47b1bbfc3aa3db777fdc ChangeLog
--- a/ChangeLog Fri Dec 14 14:13:02 2007 +0100
+++ b/ChangeLog Fri Dec 14 14:25:04 2007 +0100
@@ -1,3 +1,10 @@ 2007-08-27 Mike Sperber <mike(a)xemacs.o
+2007-12-12 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * configure.ac :
+ Check for FcConfigGetRescanInterval, FcConfigSetRescanInterval.
+ * configure :
+ Rebuild.
+
2007-08-27 Mike Sperber <mike(a)xemacs.org>
* configure.ac: Try to use pkg-config for finding Xft includes and
diff -r 466ad8ad5f136d806a71190b582f6c0eda0ecdf5 -r
dfd878799ef0724973cd47b1bbfc3aa3db777fdc configure
--- a/configure Fri Dec 14 14:13:02 2007 +0100
+++ b/configure Fri Dec 14 14:25:04 2007 +0100
@@ -20123,6 +20123,195 @@ else
{ echo "Error:" "Unable to find libXft for --with-xft" >&2;
exit 1; }
fi
+
+
+for ac_func in FcConfigGetRescanInterval
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; };
then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+for ac_func in FcConfigSetRescanInterval
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; };
then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext &&
+ $as_test_x conftest$ac_exeext; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval echo '${'$as_ac_var'}'`
+ { echo "$as_me:$LINENO: result: $ac_res" >&5
+echo "${ECHO_T}$ac_res" >&6; }
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
with_fontconfig=yes
cat >>confdefs.h <<\_ACEOF
#define HAVE_FONTCONFIG 1
diff -r 466ad8ad5f136d806a71190b582f6c0eda0ecdf5 -r
dfd878799ef0724973cd47b1bbfc3aa3db777fdc configure.ac
--- a/configure.ac Fri Dec 14 14:13:02 2007 +0100
+++ b/configure.ac Fri Dec 14 14:25:04 2007 +0100
@@ -3532,6 +3532,9 @@ extern Bool XRegisterIMInstantiateCallba
[XE_DIE(["Unable to find libfontconfig for --with-xft"])])
AC_CHECK_LIB(Xft, XftFontOpen, XE_PREPEND(-lXft, libs_x),
[XE_DIE(["Unable to find libXft for --with-xft"])])
+
+ AC_CHECK_FUNCS(FcConfigGetRescanInterval)
+ AC_CHECK_FUNCS(FcConfigSetRescanInterval)
dnl #### detect fontconfig properly!!!!
with_fontconfig=yes
AC_DEFINE(HAVE_FONTCONFIG)
diff -r 466ad8ad5f136d806a71190b582f6c0eda0ecdf5 -r
dfd878799ef0724973cd47b1bbfc3aa3db777fdc src/ChangeLog
--- a/src/ChangeLog Fri Dec 14 14:13:02 2007 +0100
+++ b/src/ChangeLog Fri Dec 14 14:25:04 2007 +0100
@@ -1,3 +1,18 @@ 2007-12-11 Aidan Kehoe <kehoea@parhasa
+2007-12-12 Aidan Kehoe <kehoea(a)parhasard.net>
+
+ * config.h.in:
+ Make the results of the checks for
+ FcConfigGetRescanInterval, FcConfigSetRescanInterval
+ available.
+ * font-mgr.h:
+ If FcConfigSetRescanInterval and FcConfigGetRescanInterval are not
+ available as functions, #define them to map to their old
+ misspelled names.
+ * font-mgr.c (Ffc_config_get_rescan_interval):
+ * font-mgr.c (Ffc_config_set_rescan_interval):
+ Use the correct spelling in
+ FcConfigGetRescanInterval, FcConfigSetRescanInterval
+
2007-12-11 Aidan Kehoe <kehoea(a)parhasard.net>
* glyphs-eimage.c:
diff -r 466ad8ad5f136d806a71190b582f6c0eda0ecdf5 -r
dfd878799ef0724973cd47b1bbfc3aa3db777fdc src/config.h.in
--- a/src/config.h.in Fri Dec 14 14:13:02 2007 +0100
+++ b/src/config.h.in Fri Dec 14 14:25:04 2007 +0100
@@ -208,6 +208,14 @@ things are arranged in config.h.in. In
/* Compile with support for fontconfig? */
#undef HAVE_FONTCONFIG
+
+/* Was the spelling of FcConfigGetRescanInterval corrected in this
+ fontconfig version? */
+#undef HAVE_FCCONFIGGETRESCANINTERVAL
+
+/* Was the spelling of FcConfigSetRescanInterval corrected in this
+ fontconfig version? */
+#undef HAVE_FCCONFIGSETRESCANINTERVAL
/* Compile with support for Xft? */
#undef USE_XFT
diff -r 466ad8ad5f136d806a71190b582f6c0eda0ecdf5 -r
dfd878799ef0724973cd47b1bbfc3aa3db777fdc src/font-mgr.c
--- a/src/font-mgr.c Fri Dec 14 14:13:02 2007 +0100
+++ b/src/font-mgr.c Fri Dec 14 14:25:04 2007 +0100
@@ -898,10 +898,8 @@ XEmacs: should convert to a chartable.
intern ("fc-config-get-blanks"));
}
-/* The misspelling in the fontconfig function name accurately corresponds to
- the version of fontconfig.h I had on 2007-04-13. -- sjt */
DEFUN("fc-config-get-rescan-interval", Ffc_config_get_rescan_interval, 1, 1, 0,
/*
- -- Function: int FcConfigGetRescanInverval (FcConfig *config)
+ -- Function: int FcConfigGetRescanInterval (FcConfig *config)
Returns the interval between automatic checks of the configuration
(in seconds) specified in 'config'. The configuration is checked
during a call to FcFontList when this interval has passed since
@@ -909,13 +907,11 @@ DEFUN("fc-config-get-rescan-interval", F
(config))
{
CHECK_FCCONFIG (config);
- return make_int (FcConfigGetRescanInverval (XFCCONFIG_PTR (config)));
-}
-
-/* The misspelling in the fontconfig function name accurately corresponds to
- the version of fontconfig.h I had on 2007-04-13. -- sjt */
+ return make_int (FcConfigGetRescanInterval (XFCCONFIG_PTR (config)));
+}
+
DEFUN("fc-config-set-rescan-interval", Ffc_config_set_rescan_interval, 2, 2, 0,
/*
- -- Function: FcBool FcConfigSetRescanInverval (FcConfig *config, int
+ -- Function: FcBool FcConfigSetRescanInterval (FcConfig *config, int
rescanInterval)
Sets the rescan interval; returns FcFalse if an error occurred.
XEmacs: signal such error, or return nil on success. */
@@ -923,7 +919,7 @@ DEFUN("fc-config-set-rescan-interval", F
{
CHECK_FCCONFIG (config);
CHECK_INT (rescan_interval);
- if (FcConfigSetRescanInverval (XFCCONFIG_PTR (config),
+ if (FcConfigSetRescanInterval (XFCCONFIG_PTR (config),
XINT (rescan_interval)) == FcFalse)
signal_error (Qio_error, "FcConfigSetRescanInverval barfed",
intern ("fc-config-set-rescan-interval"));
diff -r 466ad8ad5f136d806a71190b582f6c0eda0ecdf5 -r
dfd878799ef0724973cd47b1bbfc3aa3db777fdc src/font-mgr.h
--- a/src/font-mgr.h Fri Dec 14 14:13:02 2007 +0100
+++ b/src/font-mgr.h Fri Dec 14 14:25:04 2007 +0100
@@ -90,6 +90,17 @@ DECLARE_LRECORD(fc_config, struct fc_con
#endif /* FONTCONFIG_EXPOSE_CONFIG */
#ifdef USE_XFT
+
+#ifndef HAVE_FCCONFIGGETRESCANINTERVAL
+/* Older fontconfig versions misspell this function name. */
+#define FcConfigGetRescanInterval FcConfigGetRescanInverval
+#endif /* */
+
+#ifndef HAVE_FCCONFIGSETRESCANINTERVAL
+/* Older fontconfig versions misspell this function name. */
+#define FcConfigSetRescanInterval FcConfigSetRescanInverval
+#endif /* */
+
/*
The format of a fontname (as returned by fontconfig) is not well-documented,
But the character repertoire is represented in an ASCII-compatible way. See
_______________________________________________
XEmacs-Patches mailing list
XEmacs-Patches(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-patches