All pastes #28620 Raw Edit

config_m4.patch

public text v1 · immutable
#28620 ·published 2005-11-14 00:53 UTC
rendered paste body
--- config.m4.orig	2005-11-13 18:50:46.000000000 -0600
+++ config.m4	2005-11-13 18:46:48.000000000 -0600
@@ -10,6 +10,16 @@
 [  --with-zlib-dir[=DIR]   memcache: Set the path to libz install prefix.], no, no)
 fi
 
+for i in /usr/local /usr $PHP_ZLIB_DIR; do
+  if test -f $i/include/zlib/zlib.h; then
+    PHP_ZLIB_DIR=$i
+    PHP_ZLIB_INCDIR=$i/include/zlib
+  elif test -f $i/include/zlib.h; then
+    PHP_ZLIB_DIR=$i
+    PHP_ZLIB_INCDIR=$i/include
+  fi
+done 
+
 if test "$PHP_MEMCACHE" != "no"; then
 
   dnl # zlib
@@ -18,7 +28,7 @@
     AC_MSG_ERROR([memcache support requires ZLIB. Use --with-zlib-dir=<DIR>])
   else
     AC_MSG_RESULT([$PHP_ZLIB_DIR])
-    PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_DIR/lib, MEMCACHE_SHARED_LIBADD)
+    PHP_ADD_LIBRARY_WITH_PATH(z, $PHP_ZLIB_INCDIR, MEMCACHE_SHARED_LIBADD)
   fi
 
   AC_DEFINE(HAVE_MEMCACHE,1,[Whether you want memcache support])