1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
diff --git a/configure.ac b/configure.ac
index e4f9299..401ded7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,21 +9,12 @@ AC_CHECK_HEADER(openssl/ssl.h, [], [AC_MSG_ERROR([couldn't find openssl headers,
PKG_CHECK_MODULES([check], [check >= 0.9.4], [], [AC_MSG_WARN([libcheck not found; unit tests will not be compilable])])
AC_ARG_WITH([libxml2],
- [AS_HELP_STRING([--with-libxml2], [use libxml2 for XML parsing])],
- [with_libxml2=check],
- [with_libxml2=no])
+ [AS_HELP_STRING([--with-libxml2], [use libxml2 for XML parsing])])
-if test "x$with_libxml2" != xno; then
+if test "x$with_libxml2" = xyes; then
PKG_CHECK_MODULES([libxml2], [libxml-2.0 >= 2.7],
- [with_libxml2=yes], [dummy=1])
- if test "x$with_libxml2" != yes; then
- old_CFLAGS=$CFLAGS
- CFLAGS="-I /usr/include/libxml2"
- AC_CHECK_HEADER([libxml/parser.h],
- [with_libxml2=yes; libxml2_CFLAGS="-I /usr/include/libxml2"; libxml2_LIBS="-lxml2"],
- [AC_MSG_ERROR([couldn't find libxml2])])
- CFLAGS=$old_CFLAGS
- fi
+ [with_libxml2=yes],
+ [AC_MSG_ERROR([couldn't find libxml2])])
else
AC_CHECK_HEADER(expat.h, [], [AC_MSG_ERROR([couldn't find expat headers; expat required])])
fi
|