Skip to content

Commit 565a31c

Browse files
authored
Autotools: Simplify PHP_SELECT_SAPI in apache2handler SAPI (#15444)
1 parent 4c5767f commit 565a31c

File tree

1 file changed

+9
-15
lines changed

1 file changed

+9
-15
lines changed

sapi/apache2handler/config.m4

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,10 @@ if test "$PHP_APXS2" != "no"; then
7979
LIBPHP_CFLAGS="-shared"
8080
PHP_SUBST([LIBPHP_CFLAGS])
8181

82+
php_sapi_apache2handler_type=shared
8283
AS_CASE([$host_alias],
8384
[*aix*], [
8485
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp"
85-
PHP_SELECT_SAPI([apache2handler],
86-
[shared],
87-
[mod_php.c sapi_apache2.c apache_config.c php_functions.c],
88-
[$APACHE_CFLAGS])
8986
INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
9087
],
9188
[*darwin*], [
@@ -101,19 +98,16 @@ if test "$PHP_APXS2" != "no"; then
10198
fi
10299
MH_BUNDLE_FLAGS="-bundle -bundle_loader $APXS_HTTPD $MH_BUNDLE_FLAGS"
103100
PHP_SUBST([MH_BUNDLE_FLAGS])
104-
PHP_SELECT_SAPI([apache2handler],
105-
[bundle],
106-
[mod_php.c sapi_apache2.c apache_config.c php_functions.c],
107-
[$APACHE_CFLAGS])
101+
php_sapi_apache2handler_type=bundle
108102
SAPI_SHARED=libs/libphp.so
109103
INSTALL_IT="$INSTALL_IT $SAPI_SHARED"
110-
], [
111-
PHP_SELECT_SAPI([apache2handler],
112-
[shared],
113-
[mod_php.c sapi_apache2.c apache_config.c php_functions.c],
114-
[$APACHE_CFLAGS])
115-
INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
116-
])
104+
],
105+
[INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"])
106+
107+
PHP_SELECT_SAPI([apache2handler],
108+
[$php_sapi_apache2handler_type],
109+
[mod_php.c sapi_apache2.c apache_config.c php_functions.c],
110+
[$APACHE_CFLAGS])
117111

118112
AS_IF([$APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes' >/dev/null 2>&1], [
119113
APACHE_THREADED_MPM=yes

0 commit comments

Comments
 (0)