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 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55
|
dnl $Id: config.m4,v 1.12 2000/10/05 00:51:46 sniper Exp $
AC_MSG_CHECKING(whether to include DOM support)
PHP_ARG_WITH(dom,for DOMXML support,
[ --with-dom[=DIR] Include DOM support (requires libxml >= 2.0).
DIR is the libxml install directory,
defaults to /usr.])
if test "$PHP_DOM" != "no"; then
old_LIBS=$LIBS
old_LDFLAGS=$LDFLAGS
if test -f $withval/include/libxml/tree.h && DOMXML_INCLUDE="$withval/include"; then
LDFLAGS="$LDFLAGS -L$withval/lib"
fi
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 libxml 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 3.0... already zlib support"
LIBS="$LIBS -L$withval/lib -lz"
fi
AC_CHECK_LIB(xml, xmlFreeURI, [AC_DEFINE(HAVE_DOMXML,1,[ ])],
[AC_MSG_ERROR(DOM module requires libxml >= 2.0.)])
DOMXML_LIBS=$LIBS
LIBS=$old_LIBS
DOMXML_LDFLAGS=$LDFLAGS
LDFLAGS=$old_LDFLAGS
if test "$ext_shared" = "yes"; then
DOMXML_LIBS="-lxml"
else
AC_ADD_LIBRARY_WITH_PATH(xml, $withval/lib)
AC_ADD_INCLUDE($DOMXML_INCLUDE)
fi
PHP_EXTENSION(domxml, $ext_shared)
fi
PHP_SUBST(DOMXML_LDFLAGS)
PHP_SUBST(DOMXML_LIBS)
|