Commit 620ea88c authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

configure: use pkg-config for GNOME-XML

We need libxml version 2.5 for text reader.
pkg-config is present since version 2.3 at least (over 8 years ago).
parent 72d26571
...@@ -4310,41 +4310,17 @@ dnl libxml2 module ...@@ -4310,41 +4310,17 @@ dnl libxml2 module
dnl dnl
AC_ARG_ENABLE(libxml2, AC_ARG_ENABLE(libxml2,
[ --enable-libxml2 libxml2 support (default enabled)]) [ --enable-libxml2 libxml2 support (default enabled)])
if test "${enable_libxml2}" != "no" AS_IF([test "${enable_libxml2}" != "no"], [
then PKG_CHECK_MODULES([XML2], [libxml-2.0 >= 2.5], [
XML2_PATH="${PATH}" VLC_ADD_CPPFLAGS([xml],[${XML2_CFLAGS}])
AC_ARG_WITH(xml2-config-path, VLC_ADD_LIBS([xml],[${XML2_LIBS}])
[ --with-xml2-config-path=PATH xml2-config path (default search in \$PATH)], VLC_ADD_PLUGIN([xml])
[ if test "${with_xml2_config_path}" != "no"; then ], [
XML2_PATH="${with_xml2_config_path}:${PATH}" AS_IF([test "x${enable_xml2}" != "x"], [
fi ])
AC_PATH_PROG(XML2_CONFIG, xml2-config, no, ${XML2_PATH})
if test "${XML2_CONFIG}" != "no"; then
VLC_ADD_CPPFLAGS([xml],[`${XML2_CONFIG} --cflags`])
VLC_ADD_LIBS([xml],[`${XML2_CONFIG} --libs`])
dnl depends on the xmlTextReader extension
CPPFLAGS="${CPPFLAGS_save} ${CPPFLAGS_xml}"
LDFLAGS="${LDFLAGS_save} ${LIBS_xml}"
AC_CHECK_LIB(xml2,xmlTextReaderConstName,[
AC_EGREP_HEADER(xmlTextReaderConstName,libxml/xmlreader.h,[
VLC_ADD_PLUGIN([xml]) ],[
AC_MSG_WARN([libxml2 missing the xmlTextReader extension, you should update your version])
if test "${enable_xml2}" = "yes"; then
AC_MSG_ERROR([libxml2 missing the xmlTextReader extension])
fi])
],[
AC_MSG_WARN([libxml2 missing the xmlTextReader extension, you should update your version])
if test "${enable_xml2}" = "yes"; then
AC_MSG_ERROR([libxml2 missing the xmlTextReader extension])
fi])
LDFLAGS="${LDFLAGS_save}"
CPPFLAGS="${CPPFLAGS_save}"
else
if test "${enable_xml2}" = "yes"; then
AC_MSG_ERROR([Could not find libxml2]) AC_MSG_ERROR([Could not find libxml2])
fi ])
fi ])
fi ])
dnl dnl
dnl SVG module dnl SVG module
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment