--- configure.ac.orig 2014-11-25 17:55:31.000000000 -0500 +++ configure.ac 2014-11-26 14:22:27.000000000 -0500 @@ -325,27 +325,83 @@ GREETER_LIBS="$GREETER_LIBS $XINERAMA_LIBS" ]) -# Xft text drawing for the greeter screen -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"])) - +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, xft) - GREETER_CFLAGS="$GREETER_CFLAGS $XFT_CFLAGS" - GREETER_LIBS="$GREETER_LIBS $XFT_LIBS" - AC_DEFINE([USE_XFT], 1, - [Define to 1 to use Xft for text on greeter screen]) + 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 + GREETER_CFLAGS="$GREETER_CFLAGS $XFT_CFLAGS" + GREETER_LIBS="$GREETER_LIBS $XFT_LIBS" +fi +# +dnl greeter only knows this not XFT + + +dnl orig +dnl PKG_CHECK_MODULES(XFT, xft) +dnl GREETER_CFLAGS="$GREETER_CFLAGS $XFT_CFLAGS" +dnl GREETER_LIBS="$GREETER_LIBS $XFT_LIBS" +dnl AC_DEFINE([USE_XFT], 1, +dnl [Define to 1 to use Xft for text on greeter screen]) # XPM logos for the greeter screen -AC_ARG_ENABLE(xpm-logos, - AC_HELP_STRING([--enable-xpm-logos], - [Display xpm logos in greeter (default is YES)]), - [USE_XPM="$enableval"], +AC_ARG_ENABLE(xpm-logos, + AC_HELP_STRING([--enable-xpm-logos], + [Display xpm logos in greeter (default is YES)]), + [USE_XPM="$enableval"], PKG_CHECK_EXISTS(xpm, [USE_XPM="yes"], [USE_XPM="no"])) + if test "x$USE_XPM" = "xyes" ; then PKG_CHECK_MODULES(XPM, xpm) XDM_CFLAGS="$XDM_CFLAGS $XPM_CFLAGS" @@ -355,6 +411,7 @@ AC_DEFINE([XPM], 1, [Define to 1 to display XPM logos on greeter screen]) fi + AM_CONDITIONAL(USE_XPM, test "x$USE_XPM" = "xyes") AC_ARG_WITH(color-pixmap,