]> code.delx.au - gnu-emacs/blobdiff - configure
Merge from emacs--devo--0
[gnu-emacs] / configure
index cbde07567a2ebc37042fda313734a74390dc93a0..92347c927ec027bfbac0f920ec07ad4c9dcdfa27 100755 (executable)
--- a/configure
+++ b/configure
@@ -689,6 +689,15 @@ SET_MAKE
 XMKMF
 GTK_CFLAGS
 GTK_LIBS
+XFT_CFLAGS
+XFT_LIBS
+FREETYPE_CFLAGS
+FREETYPE_LIBS
+FONTCONFIG_CFLAGS
+FONTCONFIG_LIBS
+HAVE_LIBOTF
+LIBOTF_CFLAGS
+LIBOTF_LIBS
 ALLOCA
 liblockfile
 LIBOBJS
@@ -1314,6 +1323,7 @@ Optional Features:
   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
   --enable-carbon-app[=DIR]  [DIR=/Application]
                           specify install directory for Emacs.app on Mac OS X
+  --enable-font-backend   compile code of font-backend support
   --enable-asserts        compile code with asserts enabled
   --enable-maintainer-mode enable make rules and dependencies not useful
                           (and sometimes confusing) to the casual installer
@@ -1338,6 +1348,8 @@ Optional Packages:
   --with-tiff             use -ltiff for displaying TIFF images
   --with-gif              use -lungif for displaying GIF images
   --with-png              use -lpng for displaying PNG images
+  --with-freetype         use -lfreetype for local fonts support
+  --with-xft              use -lXft for anti aliased fonts
   --with-gtk              use GTK (same as --with-x-toolkit=gtk)
   --with-pkg-config-prog  Path to pkg-config to use for finding GTK
   --without-toolkit-scroll-bars
@@ -1936,6 +1948,18 @@ if test "${with_png+set}" = set; then
 fi
 
 
+# Check whether --with-freetype was given.
+if test "${with_freetype+set}" = set; then
+  withval=$with_freetype;
+fi
+
+
+# Check whether --with-xft was given.
+if test "${with_xft+set}" = set; then
+  withval=$with_xft;
+fi
+
+
 # Check whether --with-gtk was given.
 if test "${with_gtk+set}" = set; then
   withval=$with_gtk;
@@ -1971,6 +1995,14 @@ if test "${enable_carbon_app+set}" = set; then
 fi
 
 
+# Check whether --enable-font-backend was given.
+if test "${enable_font_backend+set}" = set; then
+  enableval=$enable_font_backend; USE_FONT_BACKEND=$enableval
+else
+  USE_FONT_BACKEND=no
+fi
+
+
 # Check whether --enable-asserts was given.
 if test "${enable_asserts+set}" = set; then
   enableval=$enable_asserts; USE_XASSERTS=$enableval
@@ -12462,6 +12494,612 @@ _ACEOF
 
   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 { 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"
+    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
+  { 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
+     HAVE_XFT=no
+  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" 2>&5; 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
+            { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+            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 <X11/Xft/Xft.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+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_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); } && {
+        test -z "$ac_c_werror_flag" ||
+        test ! -s conftest.err
+       } && test -s conftest.$ac_objext; 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 core 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 <X11/Xft/Xft.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+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_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 && {
+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+        test ! -s conftest.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;}
+
+    ;;
+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 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 XftFontOpen ();
+int
+main ()
+{
+return XftFontOpen ();
+  ;
+  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
+  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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+      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 { 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"
+    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
+  { 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
+     HAVE_FREETYPE=no
+  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" 2>&5; 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
+            { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+            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 { 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"
+    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
+  { 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
+     HAVE_FC=no
+  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" 2>&5; 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
+            { echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; }
+            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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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
+IFS=$as_save_IFS
+
+  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'.
@@ -23506,6 +24144,15 @@ SET_MAKE!$SET_MAKE$ac_delim
 XMKMF!$XMKMF$ac_delim
 GTK_CFLAGS!$GTK_CFLAGS$ac_delim
 GTK_LIBS!$GTK_LIBS$ac_delim
+XFT_CFLAGS!$XFT_CFLAGS$ac_delim
+XFT_LIBS!$XFT_LIBS$ac_delim
+FREETYPE_CFLAGS!$FREETYPE_CFLAGS$ac_delim
+FREETYPE_LIBS!$FREETYPE_LIBS$ac_delim
+FONTCONFIG_CFLAGS!$FONTCONFIG_CFLAGS$ac_delim
+FONTCONFIG_LIBS!$FONTCONFIG_LIBS$ac_delim
+HAVE_LIBOTF!$HAVE_LIBOTF$ac_delim
+LIBOTF_CFLAGS!$LIBOTF_CFLAGS$ac_delim
+LIBOTF_LIBS!$LIBOTF_LIBS$ac_delim
 ALLOCA!$ALLOCA$ac_delim
 liblockfile!$liblockfile$ac_delim
 LIBOBJS!$LIBOBJS$ac_delim
@@ -23522,15 +24169,6 @@ lispdir!$lispdir$ac_delim
 locallisppath!$locallisppath$ac_delim
 lisppath!$lisppath$ac_delim
 x_default_search_path!$x_default_search_path$ac_delim
-etcdir!$etcdir$ac_delim
-archlibdir!$archlibdir$ac_delim
-bitmapdir!$bitmapdir$ac_delim
-gamedir!$gamedir$ac_delim
-gameuser!$gameuser$ac_delim
-c_switch_system!$c_switch_system$ac_delim
-c_switch_machine!$c_switch_machine$ac_delim
-LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
-LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
 _ACEOF
 
   if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@@ -23572,6 +24210,15 @@ _ACEOF
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   cat >conf$$subs.sed <<_ACEOF
+etcdir!$etcdir$ac_delim
+archlibdir!$archlibdir$ac_delim
+bitmapdir!$bitmapdir$ac_delim
+gamedir!$gamedir$ac_delim
+gameuser!$gameuser$ac_delim
+c_switch_system!$c_switch_system$ac_delim
+c_switch_machine!$c_switch_machine$ac_delim
+LD_SWITCH_X_SITE!$LD_SWITCH_X_SITE$ac_delim
+LD_SWITCH_X_SITE_AUX!$LD_SWITCH_X_SITE_AUX$ac_delim
 C_SWITCH_X_SITE!$C_SWITCH_X_SITE$ac_delim
 X_TOOLKIT_TYPE!$X_TOOLKIT_TYPE$ac_delim
 machfile!$machfile$ac_delim
@@ -23580,7 +24227,7 @@ carbon_appdir!$carbon_appdir$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 6; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 15; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -24039,6 +24686,9 @@ echo creating src/Makefile
   sed -e '1,/start of cpp stuff/d'\
       -e 's,/\*\*/#\(.*\)$,/* \1 */,' \
       < Makefile.c > junk.c
+  if test -f ${srcdir}/admin/unidata/UnicodeData.txt; then
+    CPPFLAGS="$CPPFLAGS -DHAVE_UNIDATA"
+  fi
   $CPP $undefs -I. -I$srcdir/src $CPPFLAGS junk.c | \
       sed -e 's/^ /    /' -e '/^#/d' -e '/^[   \f]*$/d' > junk2.c
   cat junk1.c junk2.c > Makefile.new