From: Rui Hirokawa Date: Tue, 9 Jan 2001 22:15:56 +0000 (+0000) Subject: added a option to dedine libexpat install directory (by Jani Taskinen) X-Git-Tag: php-4.0.5RC1~640 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c172daa6d1059abfd6454e53a88a4797183bc97d;p=php added a option to dedine libexpat install directory (by Jani Taskinen) --- diff --git a/ext/sablot/config.m4 b/ext/sablot/config.m4 index 038dad7563..3bf43264c9 100644 --- a/ext/sablot/config.m4 +++ b/ext/sablot/config.m4 @@ -1,6 +1,9 @@ dnl $Id$ dnl config.m4 for extension Sablot +PHP_ARG_WITH(expat-dir, for Sablotron XSL support, +[ --with-expat-dir=DIR Sablotron: libexpat dir for Sablotron 0.50]) + PHP_ARG_WITH(sablot, for Sablotron XSL support, [ --with-sablot[=DIR] Include Sablotron support]) @@ -27,13 +30,22 @@ if test "$PHP_SABLOT" != "no"; then PHP_SUBST(SABLOT_SHARED_LIBADD) AC_ADD_LIBRARY_WITH_PATH(sablot, $SABLOT_DIR/lib, SABLOT_SHARED_LIBADD) - if test -f $SABLOT_DIR/lib/libexpat.a -o -f $SABLOT_DIR/lib/libexpat.so ; then - AC_ADD_LIBRARY(expat) - AC_CHECK_LIB(sablot, SablotSetEncoding, - AC_DEFINE(HAVE_SABLOT_SET_ENCODING,1,[ ])) - else - AC_ADD_LIBRARY(xmlparse) - AC_ADD_LIBRARY(xmltok) + if test -z "$PHP_EXPAT_DIR"; then + PHP_EXPAT_DIR="" + fi + + testval=no + for i in $PHP_EXPAT_DIR $SABLOT_DIR; do + if test -f $i/lib/libexpat.a -o -f $i/lib/libexpat.so; then + AC_ADD_LIBRARY_WITH_PATH(expat, $i/lib) + AC_CHECK_LIB(sablot, SablotSetEncoding, AC_DEFINE(HAVE_SABLOT_SET_ENCODING,1,[ ])) + testval=yes + fi + done + + if test "$testval" == "no"; then + AC_ADD_LIBRARY(xmlparse) + AC_ADD_LIBRARY(xmltok) fi AC_DEFINE(HAVE_SABLOT,1,[ ])