summaryrefslogtreecommitdiff
path: root/ext/zlib/config.m4
diff options
context:
space:
mode:
authorStig Bakken <ssb@php.net>1999-04-22 02:48:28 +0000
committerStig Bakken <ssb@php.net>1999-04-22 02:48:28 +0000
commit2c0ad3ee25cd8e449b02c4668a39f48998507739 (patch)
tree8064c7ee59309ffed3d9c5b8fd5c329ede193561 /ext/zlib/config.m4
parent2a78f92804ae6f3e32cd278afbb9aa8ec3d2f52d (diff)
downloadphp-git-2c0ad3ee25cd8e449b02c4668a39f48998507739.tar.gz
last bunch of extensions moving to ext/
fhttpd module taken out of functions, functions is ready to go. The only extensions I have tested are gd+freetype and odbc(solid). Please try compiling in your favourite extensions and let me know how it works.
Diffstat (limited to 'ext/zlib/config.m4')
-rw-r--r--ext/zlib/config.m438
1 files changed, 38 insertions, 0 deletions
diff --git a/ext/zlib/config.m4 b/ext/zlib/config.m4
new file mode 100644
index 0000000000..d9d3d75554
--- /dev/null
+++ b/ext/zlib/config.m4
@@ -0,0 +1,38 @@
+dnl $Id$
+
+AC_MSG_CHECKING(whether to include zlib support)
+AC_ARG_WITH(zlib,
+[ --with-zlib[=DIR] Include zlib support (requires zlib >= 1.0.9).
+ DIR is the zlib install directory,
+ defaults to /usr.],
+[
+ case "$withval" in
+ no)
+ AC_MSG_RESULT(no) ;;
+ yes)
+ AC_MSG_RESULT(yes)
+ PHP_EXTENSION(zlib)
+ AC_CHECK_LIB(z, gzgets, [AC_DEFINE(HAVE_ZLIB) ZLIB_LIBS="-lz"],
+ [AC_MSG_ERROR(Zlib module requires zlib >= 1.0.9.)])
+ EXTRA_LIBS="$EXTRA_LIBS $ZLIB_LIBS"
+ ;;
+ *)
+ test -f $withval/include/zlib/zlib.h && ZLIB_INCLUDE="-I$withval/include/zlib"
+ test -f $withval/include/zlib.h && ZLIB_INCLUDE="-I$withval/include"
+ if test -n "$ZLIB_INCLUDE" ; then
+ AC_MSG_RESULT(yes)
+ PHP_EXTENSION(zlib)
+ old_LIBS=$LIBS
+ LIBS="$LIBS -L$withval/lib"
+ AC_CHECK_LIB(z, gzgets, [AC_DEFINE(HAVE_ZLIB) ZLIB_LIBS="-L$withval/lib -lz"],
+ [AC_MSG_ERROR(Zlib module requires zlib >= 1.0.9.)])
+ LIBS=$old_LIBS
+ EXTRA_LIBS="$EXTRA_LIBS $ZLIB_LIBS"
+ INCLUDES="$INCLUDES $ZLIB_INCLUDE"
+ else
+ AC_MSG_RESULT(no)
+ fi ;;
+ esac
+],[
+ AC_MSG_RESULT(no)
+])