1999-11-24 06:21:48 +00:00
|
|
|
dnl $Id$
|
|
|
|
|
|
|
|
AC_MSG_CHECKING(whether to include DOM support)
|
|
|
|
AC_ARG_WITH(dom,
|
2000-03-26 19:47:28 +00:00
|
|
|
[ --with-dom[=DIR] Include DOM support (requires libxml >= 1.0).
|
1999-11-24 06:21:48 +00:00
|
|
|
DIR is the libxml install directory,
|
|
|
|
defaults to /usr.],
|
|
|
|
[
|
|
|
|
case "$withval" in
|
|
|
|
no)
|
|
|
|
AC_MSG_RESULT(no) ;;
|
|
|
|
yes)
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
PHP_EXTENSION(domxml)
|
1999-11-25 06:56:40 +00:00
|
|
|
old_LIBS=$LIBS
|
2000-03-15 08:09:14 +00:00
|
|
|
LIBS="$LIBS -lz"
|
1999-12-30 04:52:19 +00:00
|
|
|
AC_CHECK_LIB(xml, xmlNewDoc, [AC_DEFINE(HAVE_DOMXML,1,[ ])],
|
1999-11-24 06:21:48 +00:00
|
|
|
[AC_MSG_ERROR(DOM module requires libxml >= 1.0)])
|
1999-11-25 06:56:40 +00:00
|
|
|
LIBS=$old_LIBS
|
2000-03-15 08:09:14 +00:00
|
|
|
AC_ADD_LIBRARY(z)
|
1999-12-09 07:15:36 +00:00
|
|
|
AC_ADD_LIBRARY(xml)
|
1999-11-25 06:56:40 +00:00
|
|
|
AC_ADD_INCLUDE(/usr/local/include)
|
1999-11-24 06:21:48 +00:00
|
|
|
;;
|
|
|
|
*)
|
2000-03-15 15:08:08 +00:00
|
|
|
test -f $withval/include/gnome-xml/tree.h && DOMXML_INCLUDE="$withval/include"
|
1999-11-24 06:21:48 +00:00
|
|
|
if test -n "$DOMXML_INCLUDE" ; then
|
|
|
|
AC_MSG_RESULT(yes)
|
|
|
|
PHP_EXTENSION(domxml)
|
|
|
|
old_LIBS=$LIBS
|
|
|
|
LIBS="$LIBS -L$withval/lib"
|
|
|
|
|
|
|
|
if test $HAVE_ZLIB; then
|
|
|
|
old_withval=$withval
|
|
|
|
AC_MSG_CHECKING([for zlib (needed by DOM support)])
|
|
|
|
AC_ARG_WITH(zlib-dir,
|
|
|
|
[ --with-zlib-dir[=DIR] zlib dir for pdflib 2.0 or include zlib support],[
|
|
|
|
AC_MSG_RESULT( )
|
|
|
|
if test -z $withval; then
|
|
|
|
withval="/usr/local"
|
|
|
|
fi
|
|
|
|
LIBS="$LIBS -L$withval/lib -lz"
|
|
|
|
AC_CHECK_LIB(z,deflate, ,[AC_MSG_RESULT(no)],)
|
|
|
|
AC_ADD_LIBRARY_WITH_PATH(z, $withval/lib)
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
AC_MSG_WARN(If configure fails try --with-zlib=<DIR>)
|
|
|
|
])
|
|
|
|
withval=$old_withval
|
|
|
|
else
|
|
|
|
echo "checking for libz needed by pdflib 2.0... already zlib support"
|
|
|
|
LIBS="$LIBS -L$withval/lib -lz"
|
|
|
|
fi
|
|
|
|
|
1999-12-30 04:52:19 +00:00
|
|
|
AC_CHECK_LIB(xml, xmlNewDoc, [AC_DEFINE(HAVE_DOMXML,1,[ ])],
|
1999-11-24 06:21:48 +00:00
|
|
|
[AC_MSG_ERROR(DOM module requires libxml >= 1.0.)])
|
|
|
|
LIBS=$old_LIBS
|
|
|
|
AC_ADD_LIBRARY_WITH_PATH(xml, $withval/lib)
|
|
|
|
AC_ADD_INCLUDE($DOMXML_INCLUDE)
|
|
|
|
else
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
fi ;;
|
|
|
|
esac
|
|
|
|
],[
|
|
|
|
AC_MSG_RESULT(no)
|
|
|
|
])
|