From: Miles Bader Date: Tue, 21 Nov 2006 08:56:38 +0000 (+0000) Subject: Merge from emacs--devo--0 X-Git-Tag: emacs-pretest-23.0.90~8295^2~684 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=eeb7eaa88482114822730380196f4e7a3c0870dd;p=emacs.git Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 505-522) - Update from CVS - Merge from gnus--rel--5.10 - Update from CVS: etc/TUTORIAL.cn: Updated. - Merge from erc--emacs--22 * gnus--rel--5.10 (patch 164-167) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-137 --- eeb7eaa88482114822730380196f4e7a3c0870dd diff --cc configure index f492a52d8aa,bb40aace3cc..6dd945a539c --- a/configure +++ b/configure @@@ -11781,623 -11845,6 +11868,625 @@@ _ACEO fi CFLAGS=$late_CFLAGS +fi + +### For font-backend +if test "${USE_FONT_BACKEND}" = "yes"; then + + +cat >>confdefs.h <<\_ACEOF +#define USE_FONT_BACKEND 1 +_ACEOF + + +### Use -lXft if available, unless `--with-freetype=no' nor `--with-xft=no'. +HAVE_XFT=maybe +if test "${HAVE_X11}" = "yes"; then + if test "x${with_freetype}" = "xno"; then + with_xft="no"; + fi + if test "x${with_xft}" != "xno"; then + + if test "X${with_pkg_config_prog}" != X; then + PKG_CONFIG="${with_pkg_config_prog}" + fi + + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + 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 + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or give the full path to pkg-config with" + echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo "$as_me:$LINENO: checking for xft >= 0.13.0" >&5 +echo $ECHO_N "checking for xft >= 0.13.0... $ECHO_C" >&6 + + if $PKG_CONFIG --exists "xft >= 0.13.0" ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + succeeded=yes + + echo "$as_me:$LINENO: checking XFT_CFLAGS" >&5 +echo $ECHO_N "checking XFT_CFLAGS... $ECHO_C" >&6 + XFT_CFLAGS=`$PKG_CONFIG --cflags "xft >= 0.13.0"` + echo "$as_me:$LINENO: result: $XFT_CFLAGS" >&5 +echo "${ECHO_T}$XFT_CFLAGS" >&6 + + echo "$as_me:$LINENO: checking XFT_LIBS" >&5 +echo $ECHO_N "checking XFT_LIBS... $ECHO_C" >&6 + XFT_LIBS=`$PKG_CONFIG --libs "xft >= 0.13.0"` + echo "$as_me:$LINENO: result: $XFT_LIBS" >&5 +echo "${ECHO_T}$XFT_LIBS" >&6 + else + XFT_CFLAGS="" + XFT_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + XFT_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "xft >= 0.13.0"` + + 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 + : + else + HAVE_XFT=no + fi + + if test "$HAVE_XFT" != no; then + OLD_CPPFLAGS="$CPPFLAGS" + OLD_CFLAGS="$CFLAGS" + OLD_LIBS="$LIBS" + CPPFLAGS="$CPPFLAGS $XFT_CFLAGS" + CFLAGS="$CFLAGS $XFT_CFLAGS" + LIBS="$XFT_LIBS $LIBS" + if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then + echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5 +echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6 +if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking X11/Xft/Xft.h usability" >&5 +echo $ECHO_N "checking X11/Xft/Xft.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 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); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking X11/Xft/Xft.h presence" >&5 +echo $ECHO_N "checking X11/Xft/Xft.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 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); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: X11/Xft/Xft.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: X11/Xft/Xft.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: X11/Xft/Xft.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: X11/Xft/Xft.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: X11/Xft/Xft.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: X11/Xft/Xft.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: X11/Xft/Xft.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------------------ ## +## Report this to the AC_PACKAGE_NAME lists. ## +## ------------------------------------------ ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for X11/Xft/Xft.h" >&5 +echo $ECHO_N "checking for X11/Xft/Xft.h... $ECHO_C" >&6 +if test "${ac_cv_header_X11_Xft_Xft_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_X11_Xft_Xft_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_X11_Xft_Xft_h" >&5 +echo "${ECHO_T}$ac_cv_header_X11_Xft_Xft_h" >&6 + +fi +if test $ac_cv_header_X11_Xft_Xft_h = yes; then + echo "$as_me:$LINENO: checking for XftFontOpen in -lXft" >&5 +echo $ECHO_N "checking for XftFontOpen in -lXft... $ECHO_C" >&6 +if test "${ac_cv_lib_Xft_XftFontOpen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lXft $XFT_LIBS $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char XftFontOpen (); +int +main () +{ +XftFontOpen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&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); } && - { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' ++ { ac_try='test -z "$ac_c_werror_flag" ++ || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_Xft_XftFontOpen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_Xft_XftFontOpen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_Xft_XftFontOpen" >&5 +echo "${ECHO_T}$ac_cv_lib_Xft_XftFontOpen" >&6 +if test $ac_cv_lib_Xft_XftFontOpen = yes; then + HAVE_XFT=yes +fi + +fi + + + + if test "${HAVE_XFT}" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_XFT 1 +_ACEOF + + + C_SWITCH_X_SITE="$C_SWITCH_X_SITE $XFT_CFLAGS" + else + CFLAGS="$OLD_CPPFLAGS" + CFLAGS="$OLD_CFLAGS" + LIBS="$OLD_LIBS" + fi + fi + fi +fi + +HAVE_FREETYPE=no +### Use -lfreetype if available, unless `--with-freetype=no'. +if test "${HAVE_XFT}" = "yes"; then + HAVE_FREETYPE=yes +elif test "x${with_freetype}" != "xno"; then + if test "X${with_pkg_config_prog}" != X; then + PKG_CONFIG="${with_pkg_config_prog}" + fi + + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + 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 + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or give the full path to pkg-config with" + echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo "$as_me:$LINENO: checking for freetype2" >&5 +echo $ECHO_N "checking for freetype2... $ECHO_C" >&6 + + if $PKG_CONFIG --exists "freetype2" ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + succeeded=yes + + echo "$as_me:$LINENO: checking FREETYPE_CFLAGS" >&5 +echo $ECHO_N "checking FREETYPE_CFLAGS... $ECHO_C" >&6 + FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2"` + echo "$as_me:$LINENO: result: $FREETYPE_CFLAGS" >&5 +echo "${ECHO_T}$FREETYPE_CFLAGS" >&6 + + echo "$as_me:$LINENO: checking FREETYPE_LIBS" >&5 +echo $ECHO_N "checking FREETYPE_LIBS... $ECHO_C" >&6 + FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2"` + echo "$as_me:$LINENO: result: $FREETYPE_LIBS" >&5 +echo "${ECHO_T}$FREETYPE_LIBS" >&6 + else + FREETYPE_CFLAGS="" + FREETYPE_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + FREETYPE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "freetype2"` + + 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_FREETYPE=yes + else + HAVE_FREETYPE=no + fi + + if test "${HAVE_FREETYPE}" = "yes"; then + + succeeded=no + + if test -z "$PKG_CONFIG"; then + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PKG_CONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + 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 + echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 +echo "${ECHO_T}$PKG_CONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + fi + + if test "$PKG_CONFIG" = "no" ; then + echo "*** The pkg-config script could not be found. Make sure it is" + echo "*** in your path, or give the full path to pkg-config with" + echo "*** the PKG_CONFIG environment variable or --with-pkg-config-prog." + echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." + else + PKG_CONFIG_MIN_VERSION=0.9.0 + if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then + echo "$as_me:$LINENO: checking for fontconfig" >&5 +echo $ECHO_N "checking for fontconfig... $ECHO_C" >&6 + + if $PKG_CONFIG --exists "fontconfig" ; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + succeeded=yes + + echo "$as_me:$LINENO: checking FONTCONFIG_CFLAGS" >&5 +echo $ECHO_N "checking FONTCONFIG_CFLAGS... $ECHO_C" >&6 + FONTCONFIG_CFLAGS=`$PKG_CONFIG --cflags "fontconfig"` + echo "$as_me:$LINENO: result: $FONTCONFIG_CFLAGS" >&5 +echo "${ECHO_T}$FONTCONFIG_CFLAGS" >&6 + + echo "$as_me:$LINENO: checking FONTCONFIG_LIBS" >&5 +echo $ECHO_N "checking FONTCONFIG_LIBS... $ECHO_C" >&6 + FONTCONFIG_LIBS=`$PKG_CONFIG --libs "fontconfig"` + echo "$as_me:$LINENO: result: $FONTCONFIG_LIBS" >&5 +echo "${ECHO_T}$FONTCONFIG_LIBS" >&6 + else + FONTCONFIG_CFLAGS="" + FONTCONFIG_LIBS="" + ## If we have a custom action on failure, don't print errors, but + ## do set a variable so people can do so. + FONTCONFIG_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "fontconfig"` + + 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_FC=yes + else + HAVE_FC=no + fi + + if test "${HAVE_FC}" = "no"; then + HAVE_FREETYPE=no + fi + fi +fi +if test "${HAVE_FREETYPE}" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FREETYPE 1 +_ACEOF + + # Extract the first word of "libotf-config", so it can be a program name with args. +set dummy libotf-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_HAVE_LIBOTF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$HAVE_LIBOTF"; then + ac_cv_prog_HAVE_LIBOTF="$HAVE_LIBOTF" # Let the user override the test. +else +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 $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_HAVE_LIBOTF="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_HAVE_LIBOTF" && ac_cv_prog_HAVE_LIBOTF="no" +fi +fi +HAVE_LIBOTF=$ac_cv_prog_HAVE_LIBOTF +if test -n "$HAVE_LIBOTF"; then + echo "$as_me:$LINENO: result: $HAVE_LIBOTF" >&5 +echo "${ECHO_T}$HAVE_LIBOTF" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + if test "${HAVE_LIBOTF}" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBOTF 1 +_ACEOF + + LIBOTF_CFLAGS=`libotf-config --cflags` + LIBOTF_LIBS=`libotf-config --libs` + fi +fi + + + + + + + fi ### Use -lXpm if available, unless `--with-xpm=no'. diff --cc src/category.c index b9f80982ee7,d7178055b27..cb6385fdb25 --- a/src/category.c +++ b/src/category.c @@@ -272,15 -283,9 +272,16 @@@ Return TABLE. */ } +Lisp_Object +char_category_set (c) + int c; +{ + return CHAR_TABLE_REF (current_buffer->category_table, c); +} + DEFUN ("char-category-set", Fchar_category_set, Schar_category_set, 1, 1, 0, - doc: /* Return the category set of CHAR. */) + doc: /* Return the category set of CHAR. + usage: (char-category-set CHAR) */) (ch) Lisp_Object ch; { diff --cc src/coding.c index 644f649ad36,cf6bab2aeba..28ab86c43fc --- a/src/coding.c +++ b/src/coding.c @@@ -8168,48 -7269,44 +8168,48 @@@ Return the corresponding character. */ } else { - if ((s1 < 0x80 || (s1 > 0x9F && s1 < 0xE0) || s1 > 0xEF) - || (s2 < 0x40 || s2 == 0x7F || s2 > 0xFC)) - error ("Invalid Shift JIS code: %x", XFASTINT (code)); - DECODE_SJIS (s1, s2, c1, c2); - XSETFASTINT (val, MAKE_CHAR (charset_jisx0208, c1, c2)); + int s1 = c >> 8, s2 = c & 0xFF; + + if (s1 < 0x81 || (s1 > 0x9F && s1 < 0xE0) || s1 > 0xEF + || s2 < 0x40 || s2 == 0x7F || s2 > 0xFC) + error ("Invalid code: %d", code); + SJIS_TO_JIS (c); + charset = charset_kanji; } - return val; + c = DECODE_CHAR (charset, c); + if (c < 0) + error ("Invalid code: %d", code); + return make_number (c); } + DEFUN ("encode-sjis-char", Fencode_sjis_char, Sencode_sjis_char, 1, 1, 0, - doc: /* Encode a Japanese character CHAR to shift_jis encoding. + doc: /* Encode a Japanese character CH to shift_jis encoding. Return the corresponding code in SJIS. */) (ch) - Lisp_Object ch; + Lisp_Object ch; { - int charset, c1, c2, s1, s2; - Lisp_Object val; + Lisp_Object spec, attrs, charset_list; + int c; + struct charset *charset; + unsigned code; - CHECK_NUMBER (ch); - SPLIT_CHAR (XFASTINT (ch), charset, c1, c2); - if (charset == CHARSET_ASCII) - { - val = ch; - } - else if (charset == charset_jisx0208 - && c1 > 0x20 && c1 < 0x7F && c2 > 0x20 && c2 < 0x7F) - { - ENCODE_SJIS (c1, c2, s1, s2); - XSETFASTINT (val, (s1 << 8) | s2); - } - else if (charset == charset_katakana_jisx0201 - && c1 > 0x20 && c2 < 0xE0) - { - XSETFASTINT (val, c1 | 0x80); - } - else - error ("Can't encode to shift_jis: %d", XFASTINT (ch)); - return val; + CHECK_CHARACTER (ch); + c = XFASTINT (ch); + CHECK_CODING_SYSTEM_GET_SPEC (Vsjis_coding_system, spec); + attrs = AREF (spec, 0); + + if (ASCII_CHAR_P (c) + && ! NILP (CODING_ATTR_ASCII_COMPAT (attrs))) + return ch; + + charset_list = CODING_ATTR_CHARSET_LIST (attrs); + charset = char_charset (c, charset_list, &code); + if (code == CHARSET_INVALID_CODE (charset)) + error ("Can't encode by shift_jis encoding: %d", c); + JIS_TO_SJIS (code); + + return make_number (code); } DEFUN ("decode-big5-char", Fdecode_big5_char, Sdecode_big5_char, 1, 1, 0, diff --cc src/fns.c index 64223d83e8c,3aa8cf4f6b4..e6b83b8e4e1 --- a/src/fns.c +++ b/src/fns.c @@@ -215,7 -217,7 +215,7 @@@ which is at least the number of distinc DEFUN ("string-bytes", Fstring_bytes, Sstring_bytes, 1, 1, 0, doc: /* Return the number of bytes in STRING. - If STRING is multibyte, this may be greater than the length of STRING. */) -If STRING is a multibyte string, this is greater than the length of STRING. */) ++If STRING is multibyte, this may be greater than the length of STRING. */) (string) Lisp_Object string; { diff --cc src/search.c index 7c1090aa2bf,d6572c5397a..15a7d54852a --- a/src/search.c +++ b/src/search.c @@@ -1534,7 -1560,7 +1534,7 @@@ simple_search (n, pat, len, len_byte, t int this_len = len; unsigned char *p = pat; -- if (pos - len < lim) ++ if (this_pos < lim || this_pos_byte < lim_byte) goto stop; while (this_len > 0)