summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac66
1 files changed, 28 insertions, 38 deletions
diff --git a/configure.ac b/configure.ac
index 325a7bea..05b4e862 100644
--- a/configure.ac
+++ b/configure.ac
@@ -508,37 +508,31 @@ dnl
dnl Override other variables if LIBXML_SRC is set
dnl
-if test "x$LIBXML_SRC" != "x"; then
- CWD=`pwd`
- if cd $LIBXML_SRC; then
- LIBXML_SRC=`pwd`
- XML_CONFIG="${LIBXML_SRC}/xml2-config"
- LIBXML_CFLAGS="-I${LIBXML_SRC}/include"
- if test "$build_static_libs" = "no"; then
- LIBXML_LIBS="-L${LIBXML_SRC} `$XML_CONFIG --libs --dynamic`"
- else
- LIBXML_LIBS="-L${LIBXML_SRC} `$XML_CONFIG --libs`"
- fi
- WITH_MODULES="`$XML_CONFIG --modules`"
- cd $CWD
- else
- AC_MSG_ERROR([libxml source dir not found (${LIBXML_SRC}), typo?])
- fi
+if test "x$LIBXML_SRC" != "x"
+then
+ CWD=`pwd`
+ if cd $LIBXML_SRC
+ then
+ LIBXML_SRC=`pwd`
+ XML_CONFIG="${LIBXML_SRC}/xml2-config"
+ LIBXML_CFLAGS="-I${LIBXML_SRC}/include"
+ LIBXML_LIBS="-L${LIBXML_SRC} `$XML_CONFIG --libs`"
+ WITH_MODULES="`$XML_CONFIG --modules`"
+ cd $CWD
+ else
+ AC_MSG_ERROR([libxml source dir not found (${LIBXML_SRC}), typo?])
+ fi
fi
dnl
dnl Try pkg-config first if nothing is set
dnl
-if test "x$LIBXML_CONFIG_PREFIX" = "x" -a "x$LIBXML_LIBS" = "x"; then
- if test "$build_static_libs" = "no"; then
- PKG_CHECK_MODULES([LIBXML], [libxml-2.0 >= $LIBXML_REQUIRED_VERSION], [
- WITH_MODULES="`$PKG_CONFIG --variable=modules libxml-2.0`"
- ], [ ])
- else
- PKG_CHECK_MODULES_STATIC([LIBXML], [libxml-2.0 >= $LIBXML_REQUIRED_VERSION],
- [ ], [ ])
- fi
+if test "x$LIBXML_CONFIG_PREFIX" = "x" -a "x$LIBXML_LIBS" = "x"
+then
+ PKG_CHECK_MODULES([LIBXML], [libxml-2.0 >= $LIBXML_REQUIRED_VERSION], [
+ WITH_MODULES="`$PKG_CONFIG --variable=modules libxml-2.0`"
+ ], [ ])
fi
dnl
@@ -548,19 +542,15 @@ dnl
if test "x$LIBXML_LIBS" = "x" && ${XML_CONFIG} --libs print > /dev/null 2>&1
then
- AC_MSG_CHECKING(for libxml libraries >= $LIBXML_REQUIRED_VERSION)
- XMLVERS=`$XML_CONFIG --version`
- if test VERSION_TO_NUMBER(echo $XMLVERS) -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION); then
- AC_MSG_RESULT($XMLVERS found)
- else
- AC_MSG_ERROR(Version $XMLVERS found. You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt)
- fi
-
- if test "$build_static_libs" = "no"; then
- LIBXML_LIBS="`$XML_CONFIG --libs --dynamic`"
- else
- LIBXML_LIBS="`$XML_CONFIG --libs`"
- fi
+ AC_MSG_CHECKING(for libxml libraries >= $LIBXML_REQUIRED_VERSION)
+ XMLVERS=`$XML_CONFIG --version`
+ if test VERSION_TO_NUMBER(echo $XMLVERS) -ge VERSION_TO_NUMBER(echo $LIBXML_REQUIRED_VERSION)
+ then
+ AC_MSG_RESULT($XMLVERS found)
+ else
+ AC_MSG_ERROR(Version $XMLVERS found. You need at least libxml2 $LIBXML_REQUIRED_VERSION for this version of libxslt)
+ fi
+ LIBXML_LIBS="`$XML_CONFIG --libs`"
LIBXML_CFLAGS="`$XML_CONFIG --cflags`"
WITH_MODULES="`$XML_CONFIG --modules`"
fi