xref: /php-src/ext/phar/config.m4 (revision d7bdf902)
1PHP_ARG_ENABLE([phar],
2  [for phar archive support],
3  [AS_HELP_STRING([--disable-phar],
4    [Disable phar support])],
5  [yes])
6
7if test "$PHP_PHAR" != "no"; then
8  PHP_NEW_EXTENSION([phar], m4_normalize([
9      dirstream.c
10      func_interceptors.c
11      phar_object.c
12      phar_path_check.c
13      phar.c
14      stream.c
15      tar.c
16      util.c
17      zip.c
18    ]),
19    [$ext_shared],,
20    [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
21
22  AC_MSG_CHECKING([for phar openssl support])
23  AS_VAR_IF([PHP_OPENSSL_SHARED], [yes],
24    [AC_MSG_RESULT([no (shared openssl)])],
25    [AS_VAR_IF([PHP_OPENSSL], [yes], [
26      AC_MSG_RESULT([yes])
27      AC_DEFINE([PHAR_HAVE_OPENSSL], [1],
28        [Define to 1 if phar extension has native OpenSSL support.])
29    ], [AC_MSG_RESULT([no])])])
30
31  PHP_ADD_EXTENSION_DEP(phar, hash)
32  PHP_ADD_EXTENSION_DEP(phar, spl)
33  PHP_ADD_MAKEFILE_FRAGMENT
34
35  AC_CONFIG_FILES([
36    $ext_dir/phar.1
37    $ext_dir/phar.phar.1
38  ])
39fi
40