1999-07-21 14:43:12 +00:00
|
|
|
# $Source$
|
|
|
|
# $Id$
|
1999-04-22 02:48:28 +00:00
|
|
|
|
|
|
|
AC_MSG_CHECKING(for XML support)
|
|
|
|
AC_ARG_WITH(xml,
|
1999-07-23 15:20:48 +00:00
|
|
|
[ --with-xml[=DIR] Include XML support. Will look for expat
|
|
|
|
in DIR if specified. Set DIR to "shared" to
|
|
|
|
build as a dl, or "shared,DIR" to build as a dl
|
|
|
|
and still specify DIR.],[
|
1999-07-21 21:56:25 +00:00
|
|
|
case $withval in
|
|
|
|
shared)
|
|
|
|
shared=yes
|
|
|
|
withval=yes
|
|
|
|
;;
|
|
|
|
shared,*)
|
|
|
|
shared=yes
|
|
|
|
withval=`echo $withval | sed -e 's/^shared,//'`
|
|
|
|
;;
|
|
|
|
*)
|
|
|
|
shared=no
|
|
|
|
;;
|
|
|
|
esac
|
1999-04-22 02:48:28 +00:00
|
|
|
if test "$withval" != "no"; then
|
1999-07-21 21:56:25 +00:00
|
|
|
if test "$shared" = "yes"; then
|
|
|
|
AC_MSG_RESULT([yes (shared)])
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT([yes (static)])
|
|
|
|
fi
|
1999-09-17 01:47:15 +00:00
|
|
|
|
|
|
|
if test -z "$XML_INCLUDE" ; then
|
1999-04-22 02:48:28 +00:00
|
|
|
if test "$withval" = "yes"; then
|
1999-07-24 21:40:37 +00:00
|
|
|
test -d /usr/include/xml && XML_INCLUDE="/usr/include/xml"
|
|
|
|
test -d /usr/local/include/xml && XML_INCLUDE="/usr/local/include/xml"
|
1999-09-03 16:37:00 +00:00
|
|
|
test -d /usr/include/xmltok && XML_INCLUDE="/usr/include/xmltok"
|
|
|
|
AC_CHECK_LIB(expat, main, XML_LIBS="-lexpat",
|
|
|
|
AC_CHECK_LIB(xmltok, main,
|
|
|
|
AC_CHECK_LIB(xmlparse, main, XML_LIBS="-lxmlparse -lxmltok",
|
|
|
|
AC_MSG_ERROR(No expat library found for the xml module),"-lxmltok"),
|
|
|
|
AC_MSG_ERROR(No expart library found for the xml module))
|
|
|
|
)
|
1999-04-22 02:48:28 +00:00
|
|
|
else
|
|
|
|
XML_LIBS="-L$withval/lib -lexpat"
|
1999-07-21 14:43:12 +00:00
|
|
|
if test -d $withval/include/xml; then
|
1999-07-24 00:56:56 +00:00
|
|
|
XML_INCLUDE="$withval/include/xml"
|
1999-07-21 14:43:12 +00:00
|
|
|
else
|
1999-07-24 00:56:56 +00:00
|
|
|
XML_INCLUDE="$withval/include"
|
1999-07-21 14:43:12 +00:00
|
|
|
fi
|
1999-04-22 02:48:28 +00:00
|
|
|
fi
|
1999-09-17 01:47:15 +00:00
|
|
|
fi
|
1999-04-22 02:48:28 +00:00
|
|
|
AC_DEFINE(HAVE_LIBEXPAT, 1)
|
1999-07-21 21:56:25 +00:00
|
|
|
PHP_EXTENSION(xml, $shared)
|
|
|
|
if test "$shared" != "yes"; then
|
|
|
|
EXTRA_LIBS="$EXTRA_LIBS $XML_LIBS"
|
1999-09-02 18:22:07 +00:00
|
|
|
AC_ADD_INCLUDE($XML_INCLUDE)
|
|
|
|
XML_INCLUDE=""
|
|
|
|
XML_STATIC="libphpext_xml.a"
|
|
|
|
else
|
|
|
|
XML_INCLUDE="-I$XML_INCLUDE"
|
|
|
|
XML_SHARED="xml.la"
|
1999-07-21 21:56:25 +00:00
|
|
|
fi
|
1999-04-22 02:48:28 +00:00
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|
1999-07-21 21:56:25 +00:00
|
|
|
AC_SUBST(XML_LIBS)
|
1999-09-02 18:22:07 +00:00
|
|
|
AC_SUBST(XML_INCLUDE)
|
|
|
|
AC_SUBST(XML_STATIC)
|
|
|
|
AC_SUBST(XML_SHARED)
|