1dnl 2dnl $Id$ 3dnl 4 5PHP_ARG_WITH(bz2, for BZip2 support, 6[ --with-bz2[=DIR] Include BZip2 support]) 7 8if test "$PHP_BZ2" != "no"; then 9 if test -r $PHP_BZ2/include/bzlib.h; then 10 BZIP_DIR=$PHP_BZ2 11 else 12 AC_MSG_CHECKING(for BZip2 in default path) 13 for i in /usr/local /usr; do 14 if test -r $i/include/bzlib.h; then 15 BZIP_DIR=$i 16 AC_MSG_RESULT(found in $i) 17 break 18 fi 19 done 20 fi 21 22 if test -z "$BZIP_DIR"; then 23 AC_MSG_RESULT(not found) 24 AC_MSG_ERROR(Please reinstall the BZip2 distribution) 25 fi 26 27 PHP_CHECK_LIBRARY(bz2, BZ2_bzerror, 28 [ 29 PHP_ADD_INCLUDE($BZIP_DIR/include) 30 PHP_ADD_LIBRARY_WITH_PATH(bz2, $BZIP_DIR/$PHP_LIBDIR, BZ2_SHARED_LIBADD) 31 AC_DEFINE(HAVE_BZ2,1,[ ]) 32 ], [ 33 AC_MSG_ERROR(bz2 module requires libbz2 >= 1.0.0) 34 ], [ 35 -L$BZIP_DIR/$PHP_LIBDIR 36 ]) 37 38 PHP_NEW_EXTENSION(bz2, bz2.c bz2_filter.c, $ext_shared) 39 PHP_SUBST(BZ2_SHARED_LIBADD) 40fi 41