summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorDick Porter <dick@ximian.com>2001-06-15 14:17:42 +0000
committerDick Porter <dick@src.gnome.org>2001-06-15 14:17:42 +0000
commit510c51088304c9da59b3b494b0b61392f16bd6ce (patch)
tree7d72ae0972294bbcedbe6a64818d93de92d6edf3 /configure.in
parentc4740d63cd347551df0623a561928cd0b4faa3d7 (diff)
downloadlibsoup-510c51088304c9da59b3b494b0b61392f16bd6ce.tar.gz
replace 'childs' with 'xmlChildrenNode', 'root' with 'xmlRootNode' and
2001-06-15 Dick Porter <dick@ximian.com> * src/soup-wsdl-runtime/wsdl-schema.h: * src/soup-wsdl-runtime/wsdl-schema.c: * src/soup-wsdl-runtime/wsdl-schema-glib.h: * src/soup-wsdl-runtime/wsdl-schema-glib.c: * src/soup-wsdl/wsdl-parse.c: * src/soup-core/soup-serializer.c: * src/soup-core/soup-parser.c: replace 'childs' with 'xmlChildrenNode', 'root' with 'xmlRootNode' and 'CHAR' with 'xmlChar' for compatibility with both libxml1 and libxml2 * configure.in: Check for either libxml1 or libxml2, favouring libxml1 but selectable with --with-libxml=[1,2]
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in50
1 files changed, 42 insertions, 8 deletions
diff --git a/configure.in b/configure.in
index 8584a778..4cfe07ab 100644
--- a/configure.in
+++ b/configure.in
@@ -78,16 +78,50 @@ AC_SUBST(GLIB_LIBS)
AC_SUBST(GMODULE_LIBS)
-dnl ******************************
-dnl *** Checks for gnome-xml 1 ***
-dnl ******************************
+dnl ****************************
+dnl *** Checks for gnome-xml ***
+dnl ****************************
-AC_PATH_PROG(XML_CONFIG,xml-config,no)
-if test x$XML_CONFIG = xno; then
- AC_MSG_ERROR([Cannot find LIBXML: Is xml-config in path?])
+FAVOUR_LIBXML=1
+AC_ARG_WITH(libxml,
+ [ --with-libxml=[1/2] which version of libxml to use [default=$FAVOUR_LIBXML]],,
+ with_libxml=$FAVOUR_LIBXML)
+
+if test "x$with_libxml" = "x" -o "$with_libxml" = "yes"; then
+ with_libxml=$FAVOUR_LIBXML
+fi
+
+if test "$with_libxml" = "1"; then
+ AC_PATH_PROG(XML_CONFIG,xml-config,no)
+ if test x$XML_CONFIG = xno; then
+ AC_MSG_ERROR([Cannot find LIBXML: Is xml-config in path?])
+ fi
+
+ XML_MIN_VERSION=1.8.8
+else
+ if test "$with_libxml" = "2"; then
+ AC_PATH_PROG(XML_CONFIG,xml2-config,no)
+ if test x$XML_CONFIG = xno; then
+ AC_MSG_ERROR([Cannot find LIBXML2: Is xml2-config in path?])
+ fi
+
+ XML_MIN_VERSION=2.3.10
+ else
+ AC_MSG_ERROR(Can't use libxml version $with_libxml)
+ fi
fi
-XML_CFLAGS=`xml-config --cflags`
-XML_LIBS=`xml-config --libs`
+
+dnl Check version
+XML_VERSION=`$XML_CONFIG --version`
+ver=`echo $XML_VERSION | awk -F. '{printf("%d", ($1*1000+$2)*1000+$3);}'`
+minver=`echo $XML_MIN_VERSION | awk -F. '{printf("%d", ($1*1000+$2)*1000+$3);}'`
+if test "$minver" -gt "$ver"
+then
+ AC_MSG_ERROR(Found libxml version $XML_VERSION. You need $XML_MIN_VERSION or newer)
+fi
+
+XML_CFLAGS=`$XML_CONFIG --cflags`
+XML_LIBS=`$XML_CONFIG --libs`
AC_SUBST(XML_CFLAGS)
AC_SUBST(XML_LIBS)