FS-9858: add configure switches to disable libpng and freetype support

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit is contained in:
Sebastian Kemper 2016-12-20 19:21:37 +01:00
parent 5fa4374451
commit ca7e3694a5
1 changed files with 28 additions and 10 deletions

View File

@ -1279,17 +1279,35 @@ module_enabled() {
grep -v -e "\#" -e "^\$" modules.conf | sed -e "s|^.*/||" | grep "^${1}\$" >/dev/null grep -v -e "\#" -e "^\$" modules.conf | sed -e "s|^.*/||" | grep "^${1}\$" >/dev/null
} }
AC_ARG_WITH(png,
[AS_HELP_STRING([--without-png],
[disable support for libpng])],
[with_png="$withval"],
[with_png="yes"])
if test "$with_png" = "yes"; then
PKG_CHECK_MODULES([LIBPNG], [libpng >= 1.6.16],[
AM_CONDITIONAL([HAVE_PNG],[true])],[
PKG_CHECK_MODULES([LIBPNG], [libpng16 >= 1.6.16],[
AM_CONDITIONAL([HAVE_PNG],[true])],[
PKG_CHECK_MODULES([LIBPNG], [libpng >= 1.2.49],[
AM_CONDITIONAL([HAVE_PNG],[true])],[
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_PNG],[false])])])])
else
AM_CONDITIONAL([HAVE_PNG],[false])
fi
PKG_CHECK_MODULES([LIBPNG], [libpng >= 1.6.16],[ AC_ARG_WITH(freetype,
AM_CONDITIONAL([HAVE_PNG],[true])],[ [AS_HELP_STRING([--without-freetype],
PKG_CHECK_MODULES([LIBPNG], [libpng16 >= 1.6.16],[ [disable support for freetype])],
AM_CONDITIONAL([HAVE_PNG],[true])],[ [with_freetype="$withval"],
PKG_CHECK_MODULES([LIBPNG], [libpng >= 1.2.49],[ [with_freetype="yes"])
AM_CONDITIONAL([HAVE_PNG],[true])],[ if test "$with_freetype" = "yes"; then
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_PNG],[false])])])]) PKG_CHECK_MODULES([FREETYPE], [freetype2 >= 2.4.9],[
PKG_CHECK_MODULES([FREETYPE], [freetype2 >= 2.4.9],[ AM_CONDITIONAL([HAVE_FREETYPE],[true])],[
AM_CONDITIONAL([HAVE_FREETYPE],[true])],[ AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_FREETYPE],[false])])
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_FREETYPE],[false])]) else
AM_CONDITIONAL([HAVE_FREETYPE],[false])
fi
PKG_CHECK_MODULES([GUMBO], [gumbo >= 0.10.1],[ PKG_CHECK_MODULES([GUMBO], [gumbo >= 0.10.1],[
AM_CONDITIONAL([HAVE_GUMBO],[true])],[ AM_CONDITIONAL([HAVE_GUMBO],[true])],[