Skip to content

Commit 7438046

Browse files
committed
Fix bug #79112: IMAP can't find OpenSSL during configure
Remove the check of PHP_OPENSSL inside SETUP_OPENSSL. It's the responsibility of the caller to determine whether they want to enable openssl or not. This makes SSL detection in IMAP work, which uses a different option. Additionally also clarify that --with-openssl-dir cannot actually be used to specify an OpenSSL directory -- these options just serve as a way to enable OpenSSL in extensions without also enabling the OpenSSL extension. They need to be renamed to something clearer in master. Closes GH-5091.
1 parent b6506ab commit 7438046

File tree

5 files changed

+12
-20
lines changed

5 files changed

+12
-20
lines changed

NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ PHP NEWS
99
- FFI:
1010
. Fixed bug #79096 (FFI Struct Segfault). (cmb)
1111

12+
- IMAP:
13+
. Fixed bug #79112 (IMAP extension can't find OpenSSL libraries at configure
14+
time). (Nikita)
15+
1216
- MySQLnd:
1317
. Fixed bug #79084 (mysqlnd may fetch wrong column indexes with MYSQLI_BOTH).
1418
(cmb)

build/php.m4

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1917,13 +1917,7 @@ dnl
19171917
AC_DEFUN([PHP_SETUP_OPENSSL],[
19181918
found_openssl=no
19191919
1920-
dnl Empty variable means 'no'.
1921-
test -z "$PHP_OPENSSL" && PHP_OPENSSL=no
1922-
test -z "$PHP_IMAP_SSL" && PHP_IMAP_SSL=no
1923-
1924-
if test "$PHP_OPENSSL" != "no"; then
1925-
PKG_CHECK_MODULES([OPENSSL], [openssl >= 1.0.1], [found_openssl=yes])
1926-
fi
1920+
PKG_CHECK_MODULES([OPENSSL], [openssl >= 1.0.1], [found_openssl=yes])
19271921
19281922
if test "$found_openssl" = "yes"; then
19291923
PHP_EVAL_LIBLINE($OPENSSL_LIBS, $1)

ext/ftp/config.m4

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,11 @@ PHP_ARG_ENABLE([ftp],
33
[AS_HELP_STRING([--enable-ftp],
44
[Enable FTP support])])
55

6+
dnl TODO: Rename this option for master.
67
PHP_ARG_WITH([openssl-dir],
7-
[OpenSSL dir for FTP],
8-
[AS_HELP_STRING([[--with-openssl-dir[=DIR]]],
9-
[FTP: openssl install prefix])],
8+
[whether to explicitly enable FTP SSL support],
9+
[AS_HELP_STRING([[--with-openssl-dir]],
10+
[FTP: Whether to enable FTP SSL support without ext/openssl])],
1011
[no],
1112
[no])
1213

ext/imap/config.m4

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ AC_DEFUN([PHP_IMAP_SSL_CHK], [
7373
], [
7474
AC_MSG_ERROR([OpenSSL libraries not found.
7575
76-
Check the path given to --with-openssl-dir and output in config.log)
76+
Check whether openssl is on your PKG_CONFIG_PATH and the output in config.log)
7777
])
7878
])
7979
elif test -f "$IMAP_INC_DIR/linkage.c"; then
@@ -100,8 +100,8 @@ PHP_ARG_WITH([kerberos],
100100

101101
PHP_ARG_WITH([imap-ssl],
102102
[for IMAP SSL support],
103-
[AS_HELP_STRING([[--with-imap-ssl[=DIR]]],
104-
[IMAP: Include SSL support. DIR is the OpenSSL install prefix])],
103+
[AS_HELP_STRING([[--with-imap-ssl]],
104+
[IMAP: Include SSL support])],
105105
[no],
106106
[no])
107107

ext/snmp/config.m4

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,6 @@ PHP_ARG_WITH([snmp],
33
[AS_HELP_STRING([[--with-snmp[=DIR]]],
44
[Include SNMP support])])
55

6-
PHP_ARG_WITH([openssl-dir],
7-
[OpenSSL dir for SNMP],
8-
[AS_HELP_STRING([[--with-openssl-dir[=DIR]]],
9-
[SNMP: openssl install prefix])],
10-
[no],
11-
[no])
12-
136
if test "$PHP_SNMP" != "no"; then
147

158
if test "$PHP_SNMP" = "yes"; then

0 commit comments

Comments
 (0)