From: Sterling Hughes Date: Wed, 25 Jun 2003 18:06:06 +0000 (+0000) Subject: autodetect zlib if dom is enabled X-Git-Tag: RELEASE_1_0_2~48 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=edd1db3f0ff1f194e44bfc69269bd84c3e27e4ce;p=php autodetect zlib if dom is enabled --- diff --git a/ext/dom/config.m4 b/ext/dom/config.m4 index 39d19acb33..9c1b753a7d 100644 --- a/ext/dom/config.m4 +++ b/ext/dom/config.m4 @@ -29,7 +29,6 @@ if test -z "$PHP_ZLIB_DIR"; then fi if test "$PHP_DOM" != "no"; then - DOM_DIR_ADD="" if test -r $PHP_DOM/include/libxml2/libxml/tree.h; then DOM_DIR=$PHP_DOM @@ -67,6 +66,16 @@ if test "$PHP_DOM" != "no"; then PHP_ADD_INCLUDE($DOM_DIR/include$DOM_DIR_ADD) + dnl Search for the zlib directory + + if test "$PHP_ZLIB_DIR" = "no"; then + for i in /usr /usr/local; do + if test -r $i/lib/libz.so; then + PHP_ZLIB_DIR=$i + fi + done + fi + if test "$PHP_ZLIB_DIR" = "no"; then AC_MSG_ERROR(DOM requires ZLIB. Use --with-zlib-dir=) else