Support pkg-config for detecting freetype2 includes and libs. Fixes Ubuntu 19.10 missing the freetype-config binary.
This commit is contained in:
@@ -402,13 +402,28 @@ AC_SUBST([XTOOLLIB])
|
|||||||
dnl Check for freetype libraries/headers
|
dnl Check for freetype libraries/headers
|
||||||
AC_CHECK_TOOLS([FREETYPE_CONFIG], [freetype-config])
|
AC_CHECK_TOOLS([FREETYPE_CONFIG], [freetype-config])
|
||||||
if test -z "$FREETYPE_CONFIG"; then
|
if test -z "$FREETYPE_CONFIG"; then
|
||||||
AC_MSG_ERROR([Missing freetype-config. Install freetype development headers and library.])
|
dnl freetype-config not available try pkg-config
|
||||||
fi
|
|
||||||
|
|
||||||
FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
|
AC_CHECK_TOOLS([FREETYPE_CONFIG], [pkg-config])
|
||||||
AC_SUBST(FREETYPE_CFLAGS)
|
if test -z "$FREETYPE_CONFIG"; then
|
||||||
FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
|
AC_MSG_ERROR([Missing freetype-config or pkg-config. Install freetype development headers and library.])
|
||||||
AC_SUBST(FREETYPE_LIBS)
|
fi
|
||||||
|
|
||||||
|
dnl check specific package is available
|
||||||
|
PKG_CHECK_MODULES([FREETYPE_CHECK], [freetype2])
|
||||||
|
|
||||||
|
FREETYPE_CFLAGS=`$FREETYPE_CONFIG freetype2 --cflags`
|
||||||
|
AC_SUBST(FREETYPE_CFLAGS)
|
||||||
|
FREETYPE_LIBS=`$FREETYPE_CONFIG freetype2 --libs`
|
||||||
|
AC_SUBST(FREETYPE_LIBS)
|
||||||
|
else
|
||||||
|
dnl freetype-config is available
|
||||||
|
|
||||||
|
FREETYPE_CFLAGS=`$FREETYPE_CONFIG --cflags`
|
||||||
|
AC_SUBST(FREETYPE_CFLAGS)
|
||||||
|
FREETYPE_LIBS=`$FREETYPE_CONFIG --libs`
|
||||||
|
AC_SUBST(FREETYPE_LIBS)
|
||||||
|
fi
|
||||||
|
|
||||||
dnl check MISSING_PROGS - error out here if there's stuff in it.
|
dnl check MISSING_PROGS - error out here if there's stuff in it.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user