[libbluray-devel] Allow to disable manually libxml2
Jean-Baptiste Kempf
git at videolan.org
Wed Nov 30 10:07:39 CET 2011
libbluray | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Wed Nov 30 02:23:10 2011 +0100| [8ec66879676bd6fcba429f946a164b18685f939a] | committer: hpi1
Allow to disable manually libxml2
This can be useful to build smaller packages
> http://git.videolan.org/gitweb.cgi/libbluray.git/?a=commit;h=8ec66879676bd6fcba429f946a164b18685f939a
---
configure.ac | 13 ++++++++++---
1 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/configure.ac b/configure.ac
index 88bb989..dcbf621 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
More information about the libbluray-devel
mailing list