1
0
Fork 0
mirror of git://git.code.sf.net/p/cdesktopenv/code synced 2025-03-09 15:50:02 +00:00

Support pkg-config for detecting freetype2 includes and libs. Fixes Ubuntu 19.10 missing the freetype-config binary.

This commit is contained in:
Peter Howkins 2020-02-07 02:26:02 +00:00
parent 04b2d175aa
commit 2dd656b919

View file

@ -402,13 +402,28 @@ AC_SUBST([XTOOLLIB])
dnl Check for freetype libraries/headers
AC_CHECK_TOOLS([FREETYPE_CONFIG], [freetype-config])
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
AC_CHECK_TOOLS([FREETYPE_CONFIG], [pkg-config])
if test -z "$FREETYPE_CONFIG"; then
AC_MSG_ERROR([Missing freetype-config or pkg-config. Install freetype development headers and library.])
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.