diff options
author | John Ralls <jralls@ceridwen.us> | 2012-08-21 14:37:36 -0700 |
---|---|---|
committer | John Ralls <jralls@ceridwen.us> | 2012-08-21 14:49:39 -0700 |
commit | 42e01e32cd8ac070883f3456c65024019f1f73ac (patch) | |
tree | 642437a0ded6cca00ed3aab709946b9bd8c322f6 | |
parent | 81af952c3715c4784ecf25999862e2683827834c (diff) | |
download | pango-42e01e32cd8ac070883f3456c65024019f1f73ac.tar.gz |
Fix configuring for Xft even when it's not present
Must declare have_xft=false before the pkg-check otherwise it's always
true. Then do the checks for Freetype and Xft, *then* check for Harfbuzz
and disable Freetype and Xft if it's not there. Finally set the
environment and config.h for Freetype and Xft.
-rw-r--r-- | configure.in | 45 |
1 files changed, 26 insertions, 19 deletions
diff --git a/configure.in b/configure.in index bb2dfd0a..6322feff 100644 --- a/configure.in +++ b/configure.in @@ -226,17 +226,6 @@ AM_CONDITIONAL(CROSS_COMPILING, [test $cross_compiling = yes]) # -# Checks for HarfBuzz -# -have_harfbuzz=false -PKG_CHECK_MODULES(HARFBUZZ, harfbuzz >= 0.9.3, have_harfbuzz=true, AC_MSG_RESULT([no])) -AM_CONDITIONAL(HAVE_HARFBUZZ, $have_harfbuzz) -if ! $have_harfbuzz; then - have_freetype=false - have_xft=false -fi - -# # Check for fontconfig # have_fontconfig=false @@ -245,7 +234,7 @@ if $have_harfbuzz ; then fi # -# Checks for FreeType +# Checks for FreeType. Set the environment after checking for HarfBuzz. # have_freetype=false if $have_fontconfig ; then @@ -253,20 +242,38 @@ if $have_fontconfig ; then # enough for all the functions we use I guess. No version check needed. PKG_CHECK_MODULES(FREETYPE, freetype2, have_freetype=true, AC_MSG_RESULT([no])) fi + +# +# Checks for Xft/XRender. Set the environment after checking for HarfBuzz +# +have_xft=false if $have_freetype ; then - AC_DEFINE(HAVE_FREETYPE, 1, [Have FreeType 2 library]) - # By freetype, we really always mean freetype+fontconfig - FREETYPE_CFLAGS="$FREETYPE_CFLAGS $FONTCONFIG_CFLAGS" - FREETYPE_LIBS="$FREETYPE_LIBS $FONTCONFIG_LIBS" + PKG_CHECK_MODULES(XFT, xft >= 2.0.0 xrender, have_xft=true, AC_MSG_RESULT([no])) fi -AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype) # -# Checks for Xft/XRender +# Checks for HarfBuzz, disables Freetype and Xft if it's not present. +# +have_harfbuzz=false +PKG_CHECK_MODULES(HARFBUZZ, harfbuzz >= 0.9.3, have_harfbuzz=true, AC_MSG_RESULT([no])) +AM_CONDITIONAL(HAVE_HARFBUZZ, $have_harfbuzz) +if ! $have_harfbuzz; then + have_freetype=false + have_xft=false +fi + +# +# Now set the environment for Freetype and Xft. CFLAGS and LDFLAGS are +# already set for each, but shouldn't matter since anything requiring +# them will be ifdeffed or not built at all. # if $have_freetype ; then - PKG_CHECK_MODULES(XFT, xft >= 2.0.0 xrender, have_xft=true, AC_MSG_RESULT([no])) + AC_DEFINE(HAVE_FREETYPE, 1, [Have FreeType 2 library]) + # By freetype, we really always mean freetype+fontconfig + FREETYPE_CFLAGS="$FREETYPE_CFLAGS $FONTCONFIG_CFLAGS" + FREETYPE_LIBS="$FREETYPE_LIBS $FONTCONFIG_LIBS" fi +AM_CONDITIONAL(HAVE_FREETYPE, $have_freetype) if $have_xft ; then AC_DEFINE(HAVE_XFT, 1, [Have Xft library]) fi |