view m4/libxml.m4 @ 0:d39e1d0d75b6

initial add
author paulo@hit-nxdomain.opendns.com
date Sat, 20 Feb 2010 21:18:28 -0800
parents
children
line source
1 ###############################################################################
2 ## $Id: libxml.m4,v 1.1 2003/09/17 23:25:51 hipnod Exp $
3 ###############################################################################
5 AC_DEFUN([GIFT_GNUTELLA_CHECK_LIBXML],[
6 #
7 # Check on the user's PATH if no path was specified in OPT_LIBXML,
8 # when the user has passed --with-libxml without a directory,
9 # or check the directory if one was supplied.
10 #
11 if test x"$OPT_LIBXML" = xyes; then
12 AC_PATH_PROG(XML2_CONFIG, xml2-config, [no])
13 else
14 XMLPATH="$OPT_LIBXML/bin"
15 AC_PATH_PROG(XML2_CONFIG, xml2-config, [no], [$XMLPATH])
16 fi
18 if test x"$XML2_CONFIG" != xno; then
19 LIBXML2_CFLAGS=`$XML2_CONFIG --cflags`
20 LIBXML2_LIBS=`$XML2_CONFIG --libs`
22 AC_SUBST(LIBXML2_CFLAGS)
23 AC_SUBST(LIBXML2_LIBS)
24 AC_DEFINE(USE_LIBXML2)
25 else
26 AC_MSG_ERROR([
27 Couldn't run ${OPT_LIBXML}/bin/xml2-config
29 ])
30 fi
31 ])