xref: /PHP-7.3/ext/phar/config.m4 (revision 8d3f8ca1)
1dnl config.m4 for extension phar
2
3PHP_ARG_ENABLE(phar, for phar archive support,
4[  --disable-phar          Disable phar support], yes)
5
6if test "$PHP_PHAR" != "no"; then
7  PHP_NEW_EXTENSION(phar, util.c tar.c zip.c stream.c func_interceptors.c dirstream.c phar.c phar_object.c phar_path_check.c, $ext_shared,, -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1)
8  AC_MSG_CHECKING([for phar openssl support])
9  if test "$PHP_HASH_SHARED" != "yes"; then
10    if test "$PHP_HASH" != "no"; then
11      AC_DEFINE(PHAR_HASH_OK,1,[ ])
12    fi
13  else
14    AC_MSG_WARN([Phar: sha256/sha512 signature support disabled if ext/hash is built shared])
15  fi
16  if test "$PHP_OPENSSL_SHARED" = "yes"; then
17    AC_MSG_RESULT([no (shared openssl)])
18  else
19    if test "$PHP_OPENSSL" = "yes"; then
20      AC_MSG_RESULT([yes])
21      AC_DEFINE(PHAR_HAVE_OPENSSL,1,[ ])
22    else
23      AC_MSG_RESULT([no])
24    fi
25  fi
26  PHP_ADD_EXTENSION_DEP(phar, hash, true)
27  PHP_ADD_EXTENSION_DEP(phar, spl, true)
28  PHP_ADD_MAKEFILE_FRAGMENT
29
30  PHP_INSTALL_HEADERS([ext/phar], [php_phar.h])
31
32  PHP_OUTPUT(ext/phar/phar.1 ext/phar/phar.phar.1)
33fi
34