# reading config stubs
esyscmd(./scripts/config-stubs ext)
+dnl if it's still the default choice, enable this implicitly
+if test "$PHP_SAPI" = "cgi"; then
+ PHP_OUTPUT(sapi/cgi/Makefile)
+fi
+
divert(4)
dnl If we are using gcc and the user has not specified CFLAGS, add -O2.
AC_SUBST(PHP_SAPI)
AC_SUBST(SAPI_TARGET)
-test -d sapi || mkdir sapi
-test -d ext || mkdir ext
-
#libphp4.module
-AC_OUTPUT([Makefile php4.spec $PHP_OUTPUT_FILES
+AC_OUTPUT([Makefile php4.spec ext/Makefile sapi/Makefile $PHP_OUTPUT_FILES
scripts/mkextlib regex/Makefile build-defs.h], [], [
if test ! -f $srcdir/ext/bcmath/number.c; then
AC_DEFINE(HAVE_BUNDLED_PCRE, 1)
AC_MSG_RESULT(yes)
PHP_EXTENSION(pcre)
+ PHP_OUTPUT(ext/pcre/pcrelib/Makefile)
;;
*)
if test -f $withval/pcre.h ; then
AC_DEFINE(HAVE_BUNDLED_PCRE, 1)
AC_MSG_RESULT(yes)
PHP_EXTENSION(pcre)
+ PHP_OUTPUT(ext/pcre/pcrelib/Makefile)
])
AC_SUBST(PCRE_SUBDIR)
AC_DEFINE(HAVE_BUNDLED_PCRE, 1)
AC_MSG_RESULT(yes)
PHP_EXTENSION(pcre)
+ PHP_OUTPUT(ext/pcre/pcrelib/Makefile)
;;
*)
if test -f $withval/pcre.h ; then
AC_DEFINE(HAVE_BUNDLED_PCRE, 1)
AC_MSG_RESULT(yes)
PHP_EXTENSION(pcre)
+ PHP_OUTPUT(ext/pcre/pcrelib/Makefile)
])
AC_SUBST(PCRE_SUBDIR)
AC_DEFINE(HAVE_AP_CONFIG_H)
AC_DEFINE(HAVE_AP_COMPAT_H)
AC_MSG_RESULT(yes)
+ PHP_OUTPUT(sapi/apache/Makefile)
],[
AC_MSG_RESULT(no)
])
-APACHE_INSTALL_FILES="sapi/apache/mod_php4.* sapi/apache/libphp4.module"
-PHP_OUTPUT(sapi/apache/libphp4.module)
+APACHE_INSTALL_FILES="\$(srcdir)/sapi/apache/mod_php4.* sapi/apache/libphp4.module"
if test "$SAPI_TARGET" != "libmodphp4-so.a"; then
if test "$SAPI_TARGET" != "libphp4.so"; then
withval=/usr/local/apache
fi
if test "$withval" != "no"; then
+ APACHE_MODULE=yes
+ PHP_OUTPUT(sapi/apache/Makefile)
AC_EXPAND_PATH($withval, withval)
# For Apache 1.2.x
if test -f $withval/src/httpd.h; then
AC_MSG_RESULT(no)
])
+if test -n "$APACHE_MODULE"; then
+ PHP_OUTPUT(sapi/apache/libphp4.module)
+fi
+
+
dnl ## Local Variables:
dnl ## tab-width: 4
dnl ## End: