@@ -7,15 +7,14 @@ PHP_ARG_WITH([apxs2],
7
7
[ no] )
8
8
9
9
if test "$PHP_APXS2" != "no"; then
10
- if test "$ PHP_APXS2" = " yes"; then
10
+ AS_VAR_IF ( [ PHP_APXS2] , [ yes] , [
11
11
APXS=apxs
12
12
$APXS -q CFLAGS >/dev/null 2>&1
13
13
if test "$?" != "0" && test -x /usr/sbin/apxs; then
14
14
APXS=/usr/sbin/apxs
15
15
fi
16
- else
17
- PHP_EXPAND_PATH([ $PHP_APXS2] , [ APXS] )
18
- fi
16
+ ] ,
17
+ [ PHP_EXPAND_PATH([ $PHP_APXS2] , [ APXS] )] )
19
18
20
19
$APXS -q CFLAGS >/dev/null 2>&1
21
20
if test "$?" != "0"; then
@@ -53,9 +52,7 @@ if test "$PHP_APXS2" != "no"; then
53
52
APU_CFLAGS="`$APU_CONFIG --includes`"
54
53
55
54
for flag in $APXS_CFLAGS; do
56
- case $flag in
57
- -D*) APACHE_CPPFLAGS="$APACHE_CPPFLAGS $flag";;
58
- esac
55
+ AS_CASE ( [ $flag] , [ -D*] , [ APACHE_CPPFLAGS="$APACHE_CPPFLAGS $flag"] )
59
56
done
60
57
61
58
APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APR_CFLAGS $APU_CFLAGS -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
@@ -82,42 +79,41 @@ if test "$PHP_APXS2" != "no"; then
82
79
LIBPHP_CFLAGS="-shared"
83
80
PHP_SUBST([ LIBPHP_CFLAGS] )
84
81
85
- case $host_alias in
86
- *aix*)
87
- EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp"
88
- PHP_SELECT_SAPI([ apache2handler] ,
89
- [ shared] ,
90
- [ mod_php.c sapi_apache2.c apache_config.c php_functions.c] ,
91
- [ $APACHE_CFLAGS] )
92
- INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
93
- ;;
94
- *darwin*)
95
- dnl When using bundles on Darwin, we must resolve all symbols. However, the
96
- dnl linker does not recursively look at the bundle loader and pull in its
97
- dnl dependencies. Therefore, we must pull in the APR and APR-util libraries.
98
- if test -x "$APR_CONFIG"; then
82
+ AS_CASE ( [ $host_alias] ,
83
+ [ *aix*] , [
84
+ 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] )
89
+ INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
90
+ ] ,
91
+ [ *darwin*] , [
92
+ dnl When using bundles on Darwin, we must resolve all symbols. However,
93
+ dnl the linker does not recursively look at the bundle loader and pull in
94
+ dnl its dependencies. Therefore, we must pull in the APR and APR-util
95
+ dnl libraries.
96
+ if test -x "$APR_CONFIG"; then
99
97
MH_BUNDLE_FLAGS="`$APR_CONFIG --ldflags --link-ld --libs`"
100
- fi
101
- if test -x "$APU_CONFIG"; then
98
+ fi
99
+ if test -x "$APU_CONFIG"; then
102
100
MH_BUNDLE_FLAGS="`$APU_CONFIG --ldflags --link-ld --libs` $MH_BUNDLE_FLAGS"
103
- fi
104
- MH_BUNDLE_FLAGS="-bundle -bundle_loader $APXS_HTTPD $MH_BUNDLE_FLAGS"
105
- PHP_SUBST([ MH_BUNDLE_FLAGS] )
106
- PHP_SELECT_SAPI([ apache2handler] ,
107
- [ bundle] ,
108
- [ mod_php.c sapi_apache2.c apache_config.c php_functions.c] ,
109
- [ $APACHE_CFLAGS] )
110
- SAPI_SHARED=libs/libphp.so
111
- INSTALL_IT="$INSTALL_IT $SAPI_SHARED"
112
- ;;
113
- *)
114
- PHP_SELECT_SAPI([ apache2handler] ,
115
- [ shared] ,
116
- [ mod_php.c sapi_apache2.c apache_config.c php_functions.c] ,
117
- [ $APACHE_CFLAGS] )
118
- INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
119
- ;;
120
- esac
101
+ fi
102
+ MH_BUNDLE_FLAGS="-bundle -bundle_loader $APXS_HTTPD $MH_BUNDLE_FLAGS"
103
+ 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] )
108
+ SAPI_SHARED=libs/libphp.so
109
+ 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
+ ] )
121
117
122
118
AS_IF ( [ $APXS_HTTPD -V 2>/dev/null | grep 'threaded:.*yes' >/dev/null 2>&1] , [
123
119
APACHE_THREADED_MPM=yes
0 commit comments