summaryrefslogtreecommitdiffstats
blob: f9e9d4e664fe390ccd73faa536290867590a3e38 (plain)
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
# Author: Remko Tronçon

AC_DEFUN([AX_LIBXML],
[
	AC_ARG_WITH(
		[libxml],
		AC_HELP_STRING([--with-libxml=@<:@ARG@:>@],[Path to LibXML installation]),
		[
			WITH_LIBXML="$withval"
			if test "$withval" != "no" -a "$withval" != "yes"; then
				LIBXML_CPPFLAGS="-I$withval/include/libxml2"
				LIBXML_LDFLAGS="-L$withval/lib"
				CPPFLAGS="$CPPFLAGS $LIBXML_CPPFLAGS"
				LDFLAGS="$LDFLAGS $LIBXML_LDFLAGS"
			fi
		],
		[WITH_LIBXML="yes"])

	if test "$WITH_LIBXML" != "no"; then
		AC_CHECK_HEADER(libxml/parser.h, 
			[
				HAVE_LIBXML=yes
				# TODO: Check if this lib exists
				LIBXML_LIBS="-lxml2"
			], 
			[])
	fi
])