1
0
Fork 0

Allow to disable manually libxml2

This can be useful to build smaller packages
This commit is contained in:
Jean-Baptiste Kempf 2011-11-30 02:23:10 +01:00 committed by hpi1
parent 4a4a9e3740
commit 8ec6687967
1 changed files with 10 additions and 3 deletions

View File

@ -99,6 +99,12 @@ AC_ARG_ENABLE([bdjava],
[use_bdjava=$enableval],
[use_bdjava=no])
AC_ARG_ENABLE([libxml2],
[AS_HELP_STRING([--enable-libxml2],
[enable libxml2 support (default is yes)])],
[use_libxml2=$enableval],
[use_libxml2=yes])
# required programs
AC_PROG_CC
AC_PROG_LIBTOOL
@ -143,14 +149,15 @@ fi
AC_CHECK_PROG(HAVE_PKG_CONFIG, pkg-config, yes)
# libxml2 for metadata parser
if test "x$HAVE_PKG_CONFIG" = "xyes"
then
if test "x$use_libxml2" = "xyes"; then
if test "x$HAVE_PKG_CONFIG" = "xyes"; then
PKG_CHECK_MODULES([LIBXML2], libxml-2.0 >= 2.6,
[AC_DEFINE([HAVE_LIBXML2], [1],
[Define to 1 if libxml2 is to be used for metadata parsing])],
[AC_MSG_NOTICE($libxml2_missing)])
else
else
AC_MSG_NOTICE($pkg_config_missing $libxml2_missing)
fi
fi
# function testing for supported compiler options