Merge pull request #1115 in FS/freeswitch from ~SEBASTIAN/freeswitch:enhancement/FS-9858-add-switches-to-disable-freetype-and-libpng to master

* commit 'ca7e3694a56d5a817b78b8802d9c24269b1c4138':
  FS-9858: add configure switches to disable libpng and freetype support
This commit is contained in:
Mike Jerris 2016-12-20 18:13:40 -06:00
commit 43f3b0b789
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
}
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],[
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])])])])
PKG_CHECK_MODULES([FREETYPE], [freetype2 >= 2.4.9],[
AM_CONDITIONAL([HAVE_FREETYPE],[true])],[
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_FREETYPE],[false])])
AC_ARG_WITH(freetype,
[AS_HELP_STRING([--without-freetype],
[disable support for freetype])],
[with_freetype="$withval"],
[with_freetype="yes"])
if test "$with_freetype" = "yes"; then
PKG_CHECK_MODULES([FREETYPE], [freetype2 >= 2.4.9],[
AM_CONDITIONAL([HAVE_FREETYPE],[true])],[
AC_MSG_RESULT([no]); AM_CONDITIONAL([HAVE_FREETYPE],[false])])
else
AM_CONDITIONAL([HAVE_FREETYPE],[false])
fi
PKG_CHECK_MODULES([GUMBO], [gumbo >= 0.10.1],[
AM_CONDITIONAL([HAVE_GUMBO],[true])],[