diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
---|---|---|
committer | <> | 2013-04-03 16:25:08 +0000 |
commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /ext/bz2/config.m4 | |
download | php2-master.tar.gz |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/bz2/config.m4')
-rw-r--r-- | ext/bz2/config.m4 | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/ext/bz2/config.m4 b/ext/bz2/config.m4 new file mode 100644 index 0000000..3e6aa78 --- /dev/null +++ b/ext/bz2/config.m4 @@ -0,0 +1,40 @@ +dnl +dnl $Id$ +dnl + +PHP_ARG_WITH(bz2, for BZip2 support, +[ --with-bz2[=DIR] Include BZip2 support]) + +if test "$PHP_BZ2" != "no"; then + if test -r $PHP_BZ2/include/bzlib.h; then + BZIP_DIR=$PHP_BZ2 + else + AC_MSG_CHECKING(for BZip2 in default path) + for i in /usr/local /usr; do + if test -r $i/include/bzlib.h; then + BZIP_DIR=$i + AC_MSG_RESULT(found in $i) + break + fi + done + fi + + if test -z "$BZIP_DIR"; then + AC_MSG_RESULT(not found) + AC_MSG_ERROR(Please reinstall the BZip2 distribution) + fi + + PHP_CHECK_LIBRARY(bz2, BZ2_bzerror, + [ + PHP_ADD_INCLUDE($BZIP_DIR/include) + PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_DIR/$PHP_LIBDIR, BZ2_SHARED_LIBADD) + AC_DEFINE(HAVE_BZ2,1,[ ]) + ], [ + AC_MSG_ERROR(bz2 module requires libbz2 >= 1.0.0) + ], [ + -L$BZIP_DIR/$PHP_LIBDIR + ]) + + PHP_NEW_EXTENSION(bz2, bz2.c bz2_filter.c, $ext_shared) + PHP_SUBST(BZ2_SHARED_LIBADD) +fi |