Skip to content

ext/zip: Remove un-needed check for zip_open #4189

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

Closed
wants to merge 2 commits into from
Closed
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
13 changes: 2 additions & 11 deletions ext/zip/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,13 @@ if test "$PHP_ZIP" != "no"; then
PKG_CHECK_MODULES([LIBZIP], [libzip >= 0.11])

PHP_EVAL_INCLINE($LIBZIP_CFLAGS)
PHP_EVAL_LIBLINE($LIBZIP_LIBS, ZIP_SHARED_LIBADD)
LIBZIP_LIBDIR=`$PKG_CONFIG --variable=libdir libzip`

dnl Could not think of a simple way to check libzip for overwrite support
PHP_CHECK_LIBRARY(zip, zip_open,
[
PHP_ADD_LIBRARY_WITH_PATH(zip, $LIBZIP_LIBDIR, ZIP_SHARED_LIBADD)
AC_DEFINE(HAVE_LIBZIP,1,[ ])
], [
AC_MSG_ERROR(could not find usable libzip)
], [
-L$LIBZIP_LIBDIR
])
AC_DEFINE(HAVE_LIBZIP, 1, [ ])

PHP_CHECK_LIBRARY(zip, zip_file_set_encryption,
[
PHP_ADD_LIBRARY_WITH_PATH(zip, $LIBZIP_LIBDIR, ZIP_SHARED_LIBADD)
AC_DEFINE(HAVE_ENCRYPTION, 1, [Libzip >= 1.2.0 with encryption support])
], [
AC_MSG_WARN(Libzip >= 1.2.0 needed for encryption support)
Expand Down