mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Autotools: Improve ftp and mysqlnd SSL configure options (#15164)
This makes the configure log messages and help text more intuitive what is being enabled and when.
This commit is contained in:
parent
4f07cdc584
commit
cf6bbdfb0c
4 changed files with 29 additions and 27 deletions
|
@ -3,13 +3,17 @@ PHP_ARG_ENABLE([ftp],
|
|||
[AS_HELP_STRING([--enable-ftp],
|
||||
[Enable FTP support])])
|
||||
|
||||
dnl Empty variable means 'no' (for phpize builds).
|
||||
AS_VAR_IF([PHP_OPENSSL],, [PHP_OPENSSL=no])
|
||||
|
||||
PHP_ARG_WITH([ftp-ssl],
|
||||
[whether to explicitly enable FTP SSL support],
|
||||
[whether to enable FTP over SSL support],
|
||||
[AS_HELP_STRING([--with-ftp-ssl],
|
||||
[Explicitly enable SSL support in ext/ftp when not building with
|
||||
ext/openssl. If ext/openssl is enabled at the configure step, SSL is enabled
|
||||
implicitly.])],
|
||||
[no],
|
||||
[Explicitly enable FTP over SSL support when building without openssl
|
||||
extension or when using phpize. If the openssl extension is enabled at the
|
||||
configure step (--with-openssl), FTP-SSL is enabled implicitly regardless of
|
||||
this option.])],
|
||||
[$PHP_OPENSSL],
|
||||
[no])
|
||||
|
||||
if test "$PHP_FTP" = "yes"; then
|
||||
|
@ -17,12 +21,9 @@ if test "$PHP_FTP" = "yes"; then
|
|||
[Define to 1 if the PHP extension 'ftp' is available.])
|
||||
PHP_NEW_EXTENSION([ftp], [php_ftp.c ftp.c], [$ext_shared])
|
||||
|
||||
dnl Empty variable means 'no' (for phpize builds).
|
||||
test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
|
||||
|
||||
if test "$PHP_OPENSSL" != "no" || test "$PHP_FTP_SSL" != "no"; then
|
||||
AS_VAR_IF([PHP_FTP_SSL], [no],, [
|
||||
PHP_SETUP_OPENSSL([FTP_SHARED_LIBADD])
|
||||
PHP_SUBST([FTP_SHARED_LIBADD])
|
||||
AC_DEFINE(HAVE_FTP_SSL,1,[Whether FTP over SSL is supported])
|
||||
fi
|
||||
AC_DEFINE([HAVE_FTP_SSL], [1], [Define to 1 if FTP over SSL is enabled.])
|
||||
])
|
||||
fi
|
||||
|
|
|
@ -10,7 +10,7 @@ if (PHP_FTP != "no") {
|
|||
|
||||
if (ret >= 2) {
|
||||
MESSAGE("Enabling SSL support for ext\\ftp");
|
||||
AC_DEFINE('HAVE_FTP_SSL', 1, 'Have FTP over SSL support');
|
||||
AC_DEFINE('HAVE_FTP_SSL', 1, 'Define to 1 if FTP over SSL is enabled.');
|
||||
}
|
||||
|
||||
AC_DEFINE('HAVE_FTP', 1, "Define to 1 if the PHP extension 'ftp' is available.");
|
||||
|
|
|
@ -35,9 +35,9 @@ if (PHP_MYSQLND != "no") {
|
|||
)
|
||||
{
|
||||
AC_DEFINE("MYSQLND_COMPRESSION_ENABLED", 1, "Define to 1 if mysqlnd has compressed protocol support.");
|
||||
AC_DEFINE("MYSQLND_SSL_SUPPORTED", 1, "SSL support");
|
||||
AC_DEFINE("MYSQLND_SSL_SUPPORTED", 1, "Define to 1 if mysqlnd core SSL is enabled.");
|
||||
if (CHECK_LIB("crypt32.lib", "mysqlnd")) {
|
||||
AC_DEFINE("MYSQLND_HAVE_SSL", 1, "Define to 1 if mysqlnd has extended SSL support through OpenSSL.");
|
||||
AC_DEFINE("MYSQLND_HAVE_SSL", 1, "Define to 1 if mysqlnd extended SSL is enabled through OpenSSL.");
|
||||
}
|
||||
}
|
||||
PHP_INSTALL_HEADERS("", "ext/mysqlnd");
|
||||
|
|
|
@ -6,13 +6,17 @@ PHP_ARG_ENABLE([mysqlnd],
|
|||
[no],
|
||||
[yes])
|
||||
|
||||
dnl Empty variable means 'no' (for phpize builds).
|
||||
AS_VAR_IF([PHP_OPENSSL],, [PHP_OPENSSL=no])
|
||||
|
||||
PHP_ARG_WITH([mysqlnd-ssl],
|
||||
[whether to explicitly enable SSL support in mysqlnd],
|
||||
[whether to enable extended SSL support in mysqlnd],
|
||||
[AS_HELP_STRING([--with-mysqlnd-ssl],
|
||||
[Explicitly enable SSL support in ext/mysqlnd when not building with
|
||||
ext/openssl. If ext/openssl is enabled at the configure step, SSL is enabled
|
||||
implicitly.])],
|
||||
[no],
|
||||
[Explicitly enable extended SSL support in the mysqlnd extension when
|
||||
building without openssl extension or when using phpize. If the openssl
|
||||
extension is enabled at the configure step (--with-openssl), extended SSL is
|
||||
enabled implicitly regardless of this option.])],
|
||||
[$PHP_OPENSSL],
|
||||
[no])
|
||||
|
||||
PHP_ARG_ENABLE([mysqlnd-compression-support],
|
||||
|
@ -29,16 +33,13 @@ if test "$PHP_MYSQLND" != "no" || test "$PHP_MYSQLND_ENABLED" = "yes"; then
|
|||
[AC_DEFINE([MYSQLND_COMPRESSION_ENABLED], [1],
|
||||
[Define to 1 if mysqlnd has compressed protocol support.])])])
|
||||
|
||||
AC_DEFINE([MYSQLND_SSL_SUPPORTED], 1, [Enable core mysqlnd SSL code])
|
||||
AC_DEFINE([MYSQLND_SSL_SUPPORTED], [1],
|
||||
[Define to 1 if mysqlnd core SSL is enabled.])
|
||||
|
||||
dnl Empty variable means 'no' (for phpize builds).
|
||||
test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
|
||||
|
||||
if test "$PHP_OPENSSL" != "no" || test "$PHP_MYSQLND_SSL" != "no"; then
|
||||
PHP_SETUP_OPENSSL([MYSQLND_SHARED_LIBADD],
|
||||
AS_VAR_IF([PHP_MYSQLND_SSL], [no],,
|
||||
[PHP_SETUP_OPENSSL([MYSQLND_SHARED_LIBADD],
|
||||
[AC_DEFINE([MYSQLND_HAVE_SSL], [1],
|
||||
[Define to 1 if mysqlnd has extended SSL support through OpenSSL.])])
|
||||
fi
|
||||
[Define to 1 if mysqlnd extended SSL is enabled through OpenSSL.])])])
|
||||
|
||||
PHP_NEW_EXTENSION([mysqlnd], m4_normalize([
|
||||
mysqlnd_alloc.c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue