Skip to content

Commit 1f847a0

Browse files
authored
Check Apache HTTP Server command-line utility (#14173)
The Apache HTTP server command-line tool (/usr/sbin/apache2) might be part of a separate package, such as apache2-bin or similar. If not installed, the configure script can still find the apxs tool, but previously didn't check for the HTTP server tool separately. Otherwise, configure syntax errors (integer expression expected) are thrown when checking for the Apache version.
1 parent 05b9345 commit 1f847a0

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

build/php.m4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2040,6 +2040,7 @@ dnl
20402040
dnl This macro is used to get a comparable version for Apache.
20412041
dnl
20422042
AC_DEFUN([PHP_AP_EXTRACT_VERSION],[
2043+
AS_IF([test -x "$1"], [
20432044
ac_output=`$1 -v 2>&1 | grep version | $SED -e 's/Oracle-HTTP-//'`
20442045
ac_IFS=$IFS
20452046
IFS="- /.
@@ -2049,6 +2050,7 @@ IFS="- /.
20492050
20502051
APACHE_VERSION=`expr [$]4 \* 1000000 + [$]5 \* 1000 + [$]6`
20512052
])
2053+
])
20522054

20532055
dnl
20542056
dnl PHP_CONFIG_NICE(filename)

sapi/apache2handler/config.m4

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,11 @@ if test "$PHP_APXS2" != "no"; then
3434

3535
APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR`
3636
APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
37+
AS_IF([test ! -x "$APXS_HTTPD"], [AC_MSG_ERROR([m4_normalize([
38+
$APXS_HTTPD executable not found. Please, install Apache HTTP Server
39+
command-line utility.
40+
])])])
41+
3742
APXS_CFLAGS=`$APXS -q CFLAGS`
3843
APU_BINDIR=`$APXS -q APU_BINDIR`
3944
APR_BINDIR=`$APXS -q APR_BINDIR`

0 commit comments

Comments
 (0)