Skip to content

Autotools: Sync CS in bz2 extension #15163

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 8 additions & 14 deletions ext/bz2/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,17 @@ PHP_ARG_WITH([bz2],
[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])
AS_IF([test -r $PHP_BZ2/include/bzlib.h], [BZIP_DIR=$PHP_BZ2], [
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
AS_IF([test -r $i/include/bzlib.h], [BZIP_DIR=$i; break;])
done
fi
])

if test -z "$BZIP_DIR"; then
AC_MSG_RESULT([not found])
AC_MSG_ERROR([Please reinstall the BZip2 distribution])
fi
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])
Expand Down
Loading