Re: unspecified symbol: uncompress
| From: | Ignacio Vazquez-Abrams | Date: | Fri, 15 Dec 2000 15:02:51 +0000 |
| Subject: | Re: unspecified symbol: uncompress | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-41470@lists.php.net to get a copy of this message | ||
On Fri, 15 Dec 2000, Sascha Schumann wrote:
> Adding zlib unconditionally cannot be right.
>
> - Sascha
>
I agree. If somebody can come up with a method for differentiating between
3.23.x and earlier, then go for it. Otherwise...
Also, I have a better patch. Take a look at this one instead; ignore the
previous. The point is not to add anything unconditionally, just to link with
-lz if required.
--
Ignacio Vazquez-Abrams <ignacio@openservices.net>
--- php4/ext/mysql/config.m4 Tue Nov 21 06:07:50 2000
+++ php4.lz/ext/mysql/config.m4 Fri Dec 15 09:59:18 2000
@@ -77,7 +77,21 @@
AC_MSG_ERROR(Cannot find mysqlclient library under $MYSQL_DIR)
fi
+ for i in /usr/local /usr do
+ if test -f $i/lib/libz.a; then
+ ZLIB_DIR=$i
+ elif test -f $i/lib/libz.so; then
+ ZLIB_DIR=$i
+ fi
+ done
+
+ if test -z "$ZLIB_DIR"; then
+ AC_MSG_ERROR(Cannot find libz)
+ fi
+
AC_ADD_LIBRARY_WITH_PATH(mysqlclient, $MYSQL_LIB_DIR, MYSQL_SHARED_LIBADD)
+
+ AC_ADD_LIBRARY_WITH_PATH(z, $ZLIB_LIBDIR, ZLIB_SHARED_LIBADD)
AC_ADD_INCLUDE($MYSQL_INC_DIR)
else