--- aclocal.m4.orig 2014-11-27 18:03:12.000000000 -0500 +++ aclocal.m4 2014-11-27 18:07:48.000000000 -0500 @@ -4128,6 +4128,7 @@ AC_DEFUN([CF_X_FONTCONFIG], [ AC_REQUIRE([CF_X_FREETYPE]) +AC_REQUIRE([CF_X_XFT]) if test "$cf_cv_found_freetype" = yes ; then AC_CACHE_CHECK(for usable Xft/fontconfig package,cf_cv_xft_compat,[ @@ -4162,6 +4163,7 @@ fi fi ])dnl +dnl jdh 1 dnl --------------------------------------------------------------------------- dnl CF_X_FREETYPE version: 26 updated: 2012/10/04 20:12:20 dnl ------------- @@ -4212,16 +4214,16 @@ AC_MSG_RESULT($cf_cv_x_freetype_libs) ;; auto) #(vi - if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then + if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists freetype; then FREETYPE_CONFIG=$PKG_CONFIG - FREETYPE_PARAMS=xft + FREETYPE_PARAMS=freetype else AC_PATH_PROG(FREETYPE_CONFIG, freetype-config, none) if test "$FREETYPE_CONFIG" != none; then FREETYPE_CONFIG=$FREETYPE_CONFIG - cf_extra_freetype_libs="-lXft" + cf_extra_freetype_libs="-lfreetype" else - AC_PATH_PROG(FREETYPE_OLD_CONFIG, xft-config, none) + AC_PATH_PROG(FREETYPE_OLD_CONFIG, freetype-config, none) if test "$FREETYPE_OLD_CONFIG" != none; then FREETYPE_CONFIG=$FREETYPE_OLD_CONFIG fi @@ -4229,19 +4231,19 @@ fi ;; pkg*) #(vi - if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then + if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists freetype; then FREETYPE_CONFIG=$cf_cv_x_freetype_cfgs - FREETYPE_PARAMS=xft + FREETYPE_PARAMS=freetype else - AC_MSG_WARN(cannot find pkg-config for Xft) + AC_MSG_WARN(cannot find pkg-config for freetype) fi ;; *) #(vi - AC_PATH_PROG(FREETYPE_XFT_CONFIG, $cf_cv_x_freetype_cfgs, none) - if test "$FREETYPE_XFT_CONFIG" != none; then - FREETYPE_CONFIG=$FREETYPE_XFT_CONFIG + AC_PATH_PROG(FREETYPE_CONFIG, $cf_cv_x_freetype_cfgs, none) + if test "$FREETYPE_CONFIG" != none; then + FREETYPE_CONFIG=$FREETYPE_CONFIG else - AC_MSG_WARN(cannot find config script for Xft) + AC_MSG_WARN(cannot find config script for freetype) fi ;; esac @@ -4264,13 +4266,136 @@ fi if test "$cf_cv_x_freetype_incs" = no ; then - cf_cv_x_freetype_incs= + cf_cv_x_freetype_incs=-I/usr/local/include/freetype2 fi if test "$cf_cv_x_freetype_libs" = no ; then - cf_cv_x_freetype_libs=-lXft + cf_cv_x_freetype_libs=-lfreetype +fi + +dnl XFT checks linkage as if freetype +])dnl +dnl jdh 2 +dnl --------------------------------------------------------------------------- +dnl CF_X_XFT version: 26 updated: 2012/10/04 20:12:20 +dnl ------------- +dnl Check for X Xft headers and libraries (XFree86 4.x, etc). +dnl +dnl First check for the appropriate config program, since the developers for +dnl these libraries change their configuration (and config program) more or +dnl less randomly. If we cannot find the config program, do not bother trying +dnl to guess the latest variation of include/lib directories. +dnl +dnl If either or both of these configure-script options are not given, rely on +dnl the output of the config program to provide the cflags/libs options: +dnl --with-xft-cflags +dnl --with-xft-libs +AC_DEFUN([CF_X_XFT], +[ +AC_REQUIRE([CF_PKG_CONFIG]) + +cf_cv_x_xft_incs=no +cf_cv_x_xft_libs=no +cf_extra_xft_libs= +XFT_CONFIG=none +XFT_PARAMS= + +AC_MSG_CHECKING(for Xft configuration script) +AC_ARG_WITH(xft-config, + [ --with-xft-config configure script to use for Xft], + [cf_cv_x_xft_cfgs="$withval"], + [cf_cv_x_xft_cfgs=auto]) +test -z $cf_cv_x_xft_cfgs && cf_cv_x_xft_cfgs=auto +test $cf_cv_x_xft_cfgs = no && cf_cv_x_xft_cfgs=none +AC_MSG_RESULT($cf_cv_x_xft_cfgs) + +case $cf_cv_x_xft_cfgs in +none) #(vi + AC_MSG_CHECKING(if you specified -D/-I options for Xft) + AC_ARG_WITH(xft-cflags, + [ --with-xft-cflags -D/-I options for compiling with Xft], + [cf_cv_x_xft_incs="$with_xft_cflags"], + [cf_cv_x_xft_incs=no]) + AC_MSG_RESULT($cf_cv_x_xft_incs) + + AC_MSG_CHECKING(if you specified -L/-l options for Xft) + AC_ARG_WITH(xft-libs, + [ --with-xft-libs -L/-l options to link Xft], + [cf_cv_x_xft_libs="$with_xft_libs"], + [cf_cv_x_xft_libs=no]) + AC_MSG_RESULT($cf_cv_x_xft_libs) + ;; +auto) #(vi + if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then + XFT_CONFIG=$PKG_CONFIG + XFT_PARAMS=xft + else + AC_PATH_PROG(XFT_CONFIG, xft-config, none) + if test "$XFT_CONFIG" != none; then + XFT_CONFIG=$XFT_CONFIG + cf_extra_xft_libs="-lXft" + else + AC_PATH_PROG(XFT_OLD_CONFIG, xft-config, none) + if test "$XFT_OLD_CONFIG" != none; then + XFT_CONFIG=$XFT_OLD_CONFIG + fi + fi + fi + ;; +pkg*) #(vi + if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then + XFT_CONFIG=$cf_cv_x_xft_cfgs + XFT_PARAMS=xft + else + AC_MSG_WARN(cannot find pkg-config for Xft) + fi + ;; +*) #(vi + AC_PATH_PROG(XFT_XFT_CONFIG, $cf_cv_x_xft_cfgs, none) + if test "$XFT_XFT_CONFIG" != none; then + XFT_CONFIG=$XFT_XFT_CONFIG + else + AC_MSG_WARN(cannot find config script for Xft) + fi + ;; +esac + +if test "$XFT_CONFIG" != none ; then + AC_MSG_CHECKING(for Xft config) + AC_MSG_RESULT($XFT_CONFIG $XFT_PARAMS) + + if test "$cf_cv_x_xft_incs" = no ; then + AC_MSG_CHECKING(for $XFT_CONFIG cflags) + cf_cv_x_xft_incs="`$XFT_CONFIG $XFT_PARAMS --cflags 2>/dev/null`" + AC_MSG_RESULT($cf_cv_x_xft_incs) + fi + + if test "$cf_cv_x_xft_libs" = no ; then + AC_MSG_CHECKING(for $XFT_CONFIG libs) + cf_cv_x_xft_libs="$cf_extra_xft_libs `$XFT_CONFIG $XFT_PARAMS --libs 2>/dev/null`" + AC_MSG_RESULT($cf_cv_x_xft_libs) + fi +fi + +if test "$cf_cv_x_xft_incs" = no ; then + cf_cv_x_xft_incs= fi +if test "$cf_cv_x_xft_libs" = no ; then + cf_cv_x_xft_libs=-lXft +fi + +dnl jdh 3 +dnl if used before addition above works +dnl cf_cv_x_freetype_incs="$cf_cv_x_freetype_incs -I /usr/local/include/freetype2" +dnl +dnl cf_cv_x_freetype_libs="$cf_cv_x_freetype_libs -lfreetype" + +dnl catenate the result since the aclocal.m4 configure.in see only freetype +cf_cv_x_freetype_incs="$cf_cv_x_freetype_incs $cf_cv_x_xft_incs" +cf_cv_x_freetype_cfgs="$cf_cv_x_freetype_cfgs $cf_cv_x_xft_cfgs" +cf_cv_x_freetype_libs="$cf_cv_x_freetype_libs $cf_cv_x_xft_libs" + AC_MSG_CHECKING(if we can link with FreeType libraries) cf_save_LIBS="$LIBS" @@ -4310,7 +4435,8 @@ # FIXME: revisit this if needed AC_SUBST(HAVE_TYPE_FCCHAR32) AC_SUBST(HAVE_TYPE_XFTCHARSPEC) -]) +])dnl +dnl jdh 4 dnl --------------------------------------------------------------------------- dnl CF_X_TOOLKIT version: 22 updated: 2014/07/13 14:33:27 dnl ------------