Commit edfb44c9 authored by Alan Coopersmith's avatar Alan Coopersmith
Browse files

If --with-freetype-config is not specified, try pkgconfig freetype2, then

    fall back to freetype-config if pkgconfig fails.
parent a09401af
...@@ -79,12 +79,26 @@ no) ...@@ -79,12 +79,26 @@ no)
esac esac
# Check freetype configuration # Check freetype configuration
AC_CHECK_PROG(ft_config, freetype-config, freetype-config) AC_ARG_WITH(freetype-config, [ --with-freetype-config=PROG Use FreeType configuration program PROG], freetype_config=$withval, freetype_config=auto)
if test "x$ft_config" = "x" ; then
AC_MSG_ERROR([freetype-config not found. freetype is required. Please make sure you have the freetype development packages installed.]) if test "$freetype_config" = "auto"; then
PKG_CHECK_MODULES(FREETYPE, freetype2,
freetype_config=no, freetype_config=yes)
fi
if test "$freetype_config" = "yes"; then
AC_PATH_PROG(ft_config,freetype-config,no)
if test "$ft_config" = "no"; then
AC_MSG_ERROR([You must have freetype installed; see http://www.freetype.org/])
fi
else
ft_config="$freetype_config"
fi
if test "$freetype_config" != "no"; then
FREETYPE_CFLAGS="`$ft_config --cflags`"
FREETYPE_LIBS="`$ft_config --libs`"
fi fi
FREETYPE_CFLAGS="`$ft_config --cflags`"
FREETYPE_LIBS="`$ft_config --libs`"
# Check fontconfig configuration # Check fontconfig configuration
PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.2) PKG_CHECK_MODULES(FONTCONFIG, fontconfig >= 2.2)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment