mirror of
https://github.com/php/php-src.git
synced 2026-03-24 00:02:20 +01:00
This replaces the AC_MSG_ERROR with AC_MSG_FAILURE, where appropriate. The AC_MSG_ERROR outputs given message and exits the configure step. The AC_MSG_FAILURE does the same but also automatically outputs additional message "See 'config.log' for more details." which might help directing the user where to look further. The AC_MSG_ERROR is used for errors where current test step isn't logged in the config.log and wouldn't make sense, and AC_MSG_FAILURE is mostly used in cases of library checks, compilation tests, headers checked with AC_CHECK_HEADER* and similar tests that are also logged in the config.log. AC_MSG_ERROR([Sanity check failed.]) output: ``` configure: error: Sanity check failed. ``` AC_MSG_FAILURE([Sanity check failed.]) output: ``` configure: error: in '/path/to/php-src': configure: error: Sanity check failed. See 'config.log' for more details ```
33 lines
1013 B
Plaintext
33 lines
1013 B
Plaintext
PHP_ARG_WITH([bz2],
|
|
[for BZip2 support],
|
|
[AS_HELP_STRING([[--with-bz2[=DIR]]],
|
|
[Include BZip2 support])])
|
|
|
|
if test "$PHP_BZ2" != "no"; then
|
|
AS_IF([test -r $PHP_BZ2/include/bzlib.h], [BZIP_DIR=$PHP_BZ2], [
|
|
for i in /usr/local /usr; do
|
|
AS_IF([test -r $i/include/bzlib.h], [BZIP_DIR=$i; break;])
|
|
done
|
|
])
|
|
|
|
AC_MSG_CHECKING([for BZip2])
|
|
AS_VAR_IF([BZIP_DIR],, [
|
|
AC_MSG_RESULT([bzlib.h not found])
|
|
AC_MSG_ERROR([Please reinstall the BZip2 library package])
|
|
], [AC_MSG_RESULT([found in $BZIP_DIR])])
|
|
|
|
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],
|
|
[Define to 1 if the PHP extension 'bz2' is available.])
|
|
],
|
|
[AC_MSG_FAILURE([The bz2 extension 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
|