--- configure.ac.orig 2014-11-25 22:44:27.000000000 -0500 +++ configure.ac 2014-11-26 15:16:02.000000000 -0500 @@ -36,7 +36,11 @@ AM_CONFIG_HEADER(config.h) # Base set of required pkg-config packages -XLOGO_DEPS="sm xaw7 xmu xt xext x11" +dnl jdh +dnl XLOGO_DEPS="sm xaw7 xmu xt xext x11" +XLOGO_DEPS="x11 xext xpm ice sm xt xmu xaw7" +dnl add +PKG_CHECK_MODULES(XLOGO, x11 xext xpm ice sm xt xmu xaw7) # Use render & xft2 to draw logo? @@ -54,6 +58,67 @@ AC_DEFINE(XRENDER, 1, [Define to 1 to use Xrender & Xft2 to draw logo]) fi +dnl jdh +dnl added +# +# freetype2 autoconf +# +LIBFREETYPE2="freetype2 >= 10.0" +AC_ARG_WITH(freetype2, + AC_HELP_STRING([--with-freetype2], + [Use freetype2 for xft (default YES for xft)]), + [USE_FREETYPE2="$withval"], + PKG_CHECK_EXISTS(freetype2, [USE_FREETYPE2="yes"], [USE_FREETYPE2="no"])) +if test "x$USE_FREETYPE2" = "xyes" ; then + PKG_CHECK_MODULES([FREETYPE2], [$LIBFREETYPE2], [HAVE_FREETYPE2="yes"], [HAVE_FREETYPE2="no"]) + if test "x$HAVE_FREETYPE2" = xyes ; then + AC_DEFINE(FREETYPE2, 1, [Support freetyp2]) + AC_DEFINE(HAVE_FREETYPE2, 1, [Support freetyp2]) + AC_DEFINE([USE_FREETYPE2], 1, [Define to 1 to use freetype2 for text]) + REQUIRED_MODULES="$REQUIRED_MODULES $LIBFREETYPE2" + REQUIRED_LIBS="$REQUIRED_LIBS $LIBFREETYPE2" + fi +fi +if ! test "x$HAVE_LIBFREETYPE2" = xyes ; then + unset FREETYPE2 HAVE_LIBFREETYPE2 +fi +# +# Xft autoconf ; for using such fonts on greeter screen +# +LIBXFT="xft >= 1.0" +AC_ARG_WITH(xft, + AC_HELP_STRING([--with-xft], + [Use Xft to draw text (default is YES if installed)]), + [USE_XFT="$withval"], + PKG_CHECK_EXISTS(xft, [USE_XFT="yes"], [USE_XFT="no"]) +) +if test "x$USE_XFT" = "xyes" ; then + PKG_CHECK_MODULES([XFT], [$LIBXFT], [HAVE_XFT="yes"], [HAVE_XFT="no"]) + if test "x$HAVE_XFT" = xyes ; then + AC_DEFINE(XFT, 1, [Support Xft]) + AC_DEFINE(HAVE_XFT, 1, [Support Xft]) + AC_DEFINE([USE_XFT], 1, [Define to 1 to use Xft for text ]) + REQUIRED_MODULES="$REQUIRED_MODULES $LIBXFT $LIBFREETYPE2" + REQUIRED_LIBS="$REQUIRED_LIBS $LIBXFT $LIBFREETYPE2" + XFT_CFLAGS="$XFT_CFLAGS $FREETYPE2_CFLAGS" + XFT_LIBS="$XFT_LIBS $FREETYPE2_LIBS" + fi +fi +if ! test "x$HAVE_XFT" = xyes ; then + unset XFT HAVE_XFT +fi +dnl incl freetype2 into xft since app knows of that or REQ but not of freetype2 +dnl bug: many pkg .h use #if(def) IDENT not HAVE_IDENT, "no" is bad, undef var +dnl Xft depends on freetype +if ! test c"$HAVE_XFT" = c"yes" && ! test c"$HAVE_XFT" = c"yes" ; then + unset XFT HAVE_XFT + unset FREETYPE2 HAVE_FREETYPE2 +else + XLOGO_CFLAGS="$XLOGO_CFLAGS $XFT_CFLAGS" + XLOGO_LIBS="$XLOGO_LIBS $XFT_LIBS" +fi +# + PKG_CHECK_MODULES(XLOGO, $XLOGO_DEPS) PKG_CHECK_MODULES(APPDEFS, xt)