mirror of
https://github.com/php/php-src.git
synced 2024-09-23 02:47:26 +00:00
- Fixed bug #24537 (apache2 compile missing include directories)
This commit is contained in:
parent
79d1a39b48
commit
64cad72284
@ -2,7 +2,7 @@ dnl
|
||||
dnl $Id$
|
||||
dnl
|
||||
|
||||
AC_MSG_CHECKING(for Apache 2.0 module support via DSO through APXS)
|
||||
AC_MSG_CHECKING(for Apache 2.0 filter-module support via DSO through APXS)
|
||||
AC_ARG_WITH(apxs2filter,
|
||||
[ --with-apxs2filter[=FILE] EXPERIMENTAL: Build shared Apache 2.0 module. FILE is the optional
|
||||
pathname to the Apache apxs tool; defaults to "apxs".],[
|
||||
@ -32,22 +32,28 @@ AC_ARG_WITH(apxs2filter,
|
||||
fi
|
||||
|
||||
APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR`
|
||||
APXS_BINDIR=`$APXS -q BINDIR`
|
||||
APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
|
||||
APXS_CFLAGS=`$APXS -q CFLAGS`
|
||||
APXS_MPM=`$APXS -q MPM_NAME`
|
||||
|
||||
APU_INCLUDEDIR="`$APXS_BINDIR/apu-config --includes`"
|
||||
APR_INCLUDEDIR="`$APXS_BINDIR/apr-config --includes`"
|
||||
|
||||
for flag in $APXS_CFLAGS; do
|
||||
case $flag in
|
||||
-D*) CPPFLAGS="$CPPFLAGS $flag";;
|
||||
-D*) APACHE_CPPFLAGS="$APACHE_CPPFLAGS $flag";;
|
||||
esac
|
||||
done
|
||||
|
||||
APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APU_INCLUDEDIR $APR_INCLUDEDIR"
|
||||
|
||||
# Test that we're trying to configure with apache 2.x
|
||||
PHP_AP_EXTRACT_VERSION($APXS_HTTPD)
|
||||
if test "$APACHE_VERSION" -le 2000000; then
|
||||
AC_MSG_ERROR([You have enabled Apache 2 support while your server is Apache 1.3. Please use the appropiate switch --with-apxs (without the 2)])
|
||||
elif test "$APACHE_VERSION" -lt 2000040; then
|
||||
AC_MSG_ERROR([Please note that Apache version >= 2.0.40 is required.])
|
||||
elif test "$APACHE_VERSION" -lt 2000044; then
|
||||
AC_MSG_ERROR([Please note that Apache version >= 2.0.44 is required.])
|
||||
fi
|
||||
|
||||
APXS_LIBEXECDIR='$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR`
|
||||
@ -67,7 +73,7 @@ AC_ARG_WITH(apxs2filter,
|
||||
case $host_alias in
|
||||
*aix*)
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp"
|
||||
PHP_SELECT_SAPI(apache2filter, shared, sapi_apache2.c apache_config.c php_functions.c)
|
||||
PHP_SELECT_SAPI(apache2filter, shared, sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
|
||||
INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
|
||||
;;
|
||||
*darwin*)
|
||||
@ -75,44 +81,41 @@ AC_ARG_WITH(apxs2filter,
|
||||
dnl the linker does not recursively look at the bundle loader and
|
||||
dnl pull in its dependencies. Therefore, we must pull in the APR
|
||||
dnl and APR-util libraries.
|
||||
APXS_BINDIR=`$APXS -q BINDIR`
|
||||
if test -f $APXS_BINDIR/apr-config; then
|
||||
if test -x "$APXS_BINDIR/apr-config"; then
|
||||
MH_BUNDLE_FLAGS="`$APXS_BINDIR/apr-config --ldflags --link-ld --libs`"
|
||||
fi
|
||||
if test -f $APXS_BINDIR/apu-config; then
|
||||
if test -x "$APXS_BINDIR/apu-config"; then
|
||||
MH_BUNDLE_FLAGS="`$APXS_BINDIR/apu-config --ldflags --link-ld --libs` $MH_BUNDLE_FLAGS"
|
||||
fi
|
||||
MH_BUNDLE_FLAGS="-bundle -bundle_loader $APXS_HTTPD $MH_BUNDLE_FLAGS"
|
||||
PHP_SUBST(MH_BUNDLE_FLAGS)
|
||||
PHP_SELECT_SAPI(apache2filter, bundle, sapi_apache2.c apache_config.c php_functions.c)
|
||||
PHP_SELECT_SAPI(apache2filter, bundle, sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
|
||||
SAPI_SHARED=libs/libphp5.so
|
||||
INSTALL_IT="$INSTALL_IT $SAPI_SHARED"
|
||||
;;
|
||||
*beos*)
|
||||
APXS_BINDIR=`$APXS -q BINDIR`
|
||||
if test -f _APP_; then `rm _APP_`; fi
|
||||
`ln -s $APXS_BINDIR/httpd _APP_`
|
||||
EXTRA_LIBS="$EXTRA_LIBS _APP_"
|
||||
PHP_SELECT_SAPI(apache2filter, shared, sapi_apache2.c apache_config.c php_functions.c)
|
||||
PHP_SELECT_SAPI(apache2filter, shared, sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
|
||||
INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
|
||||
;;
|
||||
*)
|
||||
PHP_SELECT_SAPI(apache2filter, shared, sapi_apache2.c apache_config.c php_functions.c)
|
||||
PHP_SELECT_SAPI(apache2filter, shared, sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
|
||||
INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_ADD_INCLUDE($APXS_INCLUDEDIR)
|
||||
if test "$APXS_MPM" != "prefork"; then
|
||||
PHP_BUILD_THREAD_SAFE
|
||||
fi
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
PHP_SUBST(APXS)
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
PHP_SUBST(APXS)
|
||||
|
||||
dnl ## Local Variables:
|
||||
dnl ## tab-width: 4
|
||||
dnl ## End:
|
||||
|
@ -32,16 +32,22 @@ AC_ARG_WITH(apxs2,
|
||||
fi
|
||||
|
||||
APXS_INCLUDEDIR=`$APXS -q INCLUDEDIR`
|
||||
APXS_BINDIR=`$APXS -q BINDIR`
|
||||
APXS_HTTPD=`$APXS -q SBINDIR`/`$APXS -q TARGET`
|
||||
APXS_CFLAGS=`$APXS -q CFLAGS`
|
||||
APXS_MPM=`$APXS -q MPM_NAME`
|
||||
|
||||
APU_INCLUDEDIR="`$APXS_BINDIR/apu-config --includes`"
|
||||
APR_INCLUDEDIR="`$APXS_BINDIR/apr-config --includes`"
|
||||
|
||||
for flag in $APXS_CFLAGS; do
|
||||
case $flag in
|
||||
-D*) CPPFLAGS="$CPPFLAGS $flag";;
|
||||
-D*) APACHE_CPPFLAGS="$APACHE_CPPFLAGS $flag";;
|
||||
esac
|
||||
done
|
||||
|
||||
APACHE_CFLAGS="$APACHE_CPPFLAGS -I$APXS_INCLUDEDIR $APU_INCLUDEDIR $APR_INCLUDEDIR"
|
||||
|
||||
# Test that we're trying to configure with apache 2.x
|
||||
PHP_AP_EXTRACT_VERSION($APXS_HTTPD)
|
||||
if test "$APACHE_VERSION" -le 2000000; then
|
||||
@ -67,7 +73,7 @@ AC_ARG_WITH(apxs2,
|
||||
case $host_alias in
|
||||
*aix*)
|
||||
EXTRA_LDFLAGS="$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/httpd.exp"
|
||||
PHP_SELECT_SAPI(apache2handler, shared, sapi_apache2.c apache_config.c php_functions.c)
|
||||
PHP_SELECT_SAPI(apache2handler, shared, sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
|
||||
INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
|
||||
;;
|
||||
*darwin*)
|
||||
@ -75,44 +81,41 @@ AC_ARG_WITH(apxs2,
|
||||
dnl the linker does not recursively look at the bundle loader and
|
||||
dnl pull in its dependencies. Therefore, we must pull in the APR
|
||||
dnl and APR-util libraries.
|
||||
APXS_BINDIR=`$APXS -q BINDIR`
|
||||
if test -f $APXS_BINDIR/apr-config; then
|
||||
if test -x "$APXS_BINDIR/apr-config"; then
|
||||
MH_BUNDLE_FLAGS="`$APXS_BINDIR/apr-config --ldflags --link-ld --libs`"
|
||||
fi
|
||||
if test -f $APXS_BINDIR/apu-config; then
|
||||
if test -x "$APXS_BINDIR/apu-config"; then
|
||||
MH_BUNDLE_FLAGS="`$APXS_BINDIR/apu-config --ldflags --link-ld --libs` $MH_BUNDLE_FLAGS"
|
||||
fi
|
||||
MH_BUNDLE_FLAGS="-bundle -bundle_loader $APXS_HTTPD $MH_BUNDLE_FLAGS"
|
||||
PHP_SUBST(MH_BUNDLE_FLAGS)
|
||||
PHP_SELECT_SAPI(apache2handler, bundle, sapi_apache2.c apache_config.c php_functions.c)
|
||||
PHP_SELECT_SAPI(apache2handler, bundle, sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
|
||||
SAPI_SHARED=libs/libphp5.so
|
||||
INSTALL_IT="$INSTALL_IT $SAPI_SHARED"
|
||||
;;
|
||||
*beos*)
|
||||
APXS_BINDIR=`$APXS -q BINDIR`
|
||||
if test -f _APP_; then `rm _APP_`; fi
|
||||
`ln -s $APXS_BINDIR/httpd _APP_`
|
||||
EXTRA_LIBS="$EXTRA_LIBS _APP_"
|
||||
PHP_SELECT_SAPI(apache2handler, shared, sapi_apache2.c apache_config.c php_functions.c)
|
||||
PHP_SELECT_SAPI(apache2handler, shared, sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
|
||||
INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
|
||||
;;
|
||||
*)
|
||||
PHP_SELECT_SAPI(apache2handler, shared, sapi_apache2.c apache_config.c php_functions.c)
|
||||
PHP_SELECT_SAPI(apache2handler, shared, sapi_apache2.c apache_config.c php_functions.c, $APACHE_CFLAGS)
|
||||
INSTALL_IT="$INSTALL_IT $SAPI_LIBTOOL"
|
||||
;;
|
||||
esac
|
||||
|
||||
PHP_ADD_INCLUDE($APXS_INCLUDEDIR)
|
||||
if test "$APXS_MPM" != "prefork"; then
|
||||
PHP_BUILD_THREAD_SAFE
|
||||
fi
|
||||
AC_MSG_RESULT(yes)
|
||||
|
||||
PHP_SUBST(APXS)
|
||||
],[
|
||||
AC_MSG_RESULT(no)
|
||||
])
|
||||
|
||||
PHP_SUBST(APXS)
|
||||
|
||||
dnl ## Local Variables:
|
||||
dnl ## tab-width: 4
|
||||
dnl ## End:
|
||||
|
Loading…
Reference in New Issue
Block a user