xref: /php-src/ext/openssl/config0.m4 (revision 9d3907fd)
1PHP_ARG_WITH([openssl],
2  [for OpenSSL support],
3  [AS_HELP_STRING([--with-openssl],
4    [Include OpenSSL support (requires OpenSSL >= 1.1.1)])])
5
6PHP_ARG_WITH([system-ciphers],
7  [whether to use system default cipher list instead of hardcoded value],
8  [AS_HELP_STRING([--with-system-ciphers],
9    [OPENSSL: Use system default cipher list instead of hardcoded value])],
10  [no],
11  [no])
12
13PHP_ARG_WITH([openssl-legacy-provider],
14  [whether to load legacy algorithm provider],
15  [AS_HELP_STRING([--with-openssl-legacy-provider],
16    [OPENSSL: Load legacy algorithm provider in addition to default provider])],
17  [no],
18  [no])
19
20if test "$PHP_OPENSSL" != "no"; then
21  PHP_NEW_EXTENSION(openssl, openssl.c xp_ssl.c, $ext_shared)
22  PHP_SUBST(OPENSSL_SHARED_LIBADD)
23  PHP_SETUP_OPENSSL([OPENSSL_SHARED_LIBADD],
24    [AC_DEFINE([HAVE_OPENSSL_EXT], [1],
25      [Define to 1 if the openssl extension is available.])])
26
27  PHP_CHECK_LIBRARY([crypto], [RAND_egd],
28    [AC_DEFINE([HAVE_RAND_EGD], [1],
29      [Define to 1 if OpenSSL crypto library has the 'RAND_egd' function.])],,
30    [$OPENSSL_LIBS])
31
32  if test "$PHP_SYSTEM_CIPHERS" != "no"; then
33    AC_DEFINE(USE_OPENSSL_SYSTEM_CIPHERS,1,[ Use system default cipher list instead of hardcoded value ])
34  fi
35
36  if test "$PHP_OPENSSL_LEGACY_PROVIDER" != "no"; then
37    AC_DEFINE(LOAD_OPENSSL_LEGACY_PROVIDER,1,[ Load legacy algorithm provider in addition to default provider ])
38  fi
39fi
40