xref: /PHP-8.2/ext/openssl/config0.m4 (revision 60fe575c)
1PHP_ARG_WITH([openssl],
2  [for OpenSSL support],
3  [AS_HELP_STRING([--with-openssl],
4    [Include OpenSSL support (requires OpenSSL >= 1.0.2)])])
5
6PHP_ARG_WITH([kerberos],
7  [for Kerberos support],
8  [AS_HELP_STRING([--with-kerberos],
9    [OPENSSL: Include Kerberos support])],
10  [no],
11  [no])
12
13PHP_ARG_WITH([system-ciphers],
14  [whether to use system default cipher list instead of hardcoded value],
15  [AS_HELP_STRING([--with-system-ciphers],
16    [OPENSSL: Use system default cipher list instead of hardcoded value])],
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
24  if test "$PHP_KERBEROS" != "no"; then
25    PKG_CHECK_MODULES([KERBEROS], [krb5-gssapi krb5])
26
27    PHP_EVAL_INCLINE($KERBEROS_CFLAGS)
28    PHP_EVAL_LIBLINE($KERBEROS_LIBS, OPENSSL_SHARED_LIBADD)
29  fi
30
31  PHP_SETUP_OPENSSL(OPENSSL_SHARED_LIBADD,
32  [
33    AC_DEFINE(HAVE_OPENSSL_EXT,1,[ ])
34  ], [
35    AC_MSG_ERROR([OpenSSL check failed. Please check config.log for more information.])
36  ])
37
38  AC_CHECK_FUNCS([RAND_egd])
39
40  if test "$PHP_SYSTEM_CIPHERS" != "no"; then
41    AC_DEFINE(USE_OPENSSL_SYSTEM_CIPHERS,1,[ Use system default cipher list instead of hardcoded value ])
42  fi
43fi
44