summaryrefslogtreecommitdiff
path: root/configure.in.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in.in')
-rw-r--r--configure.in.in169
1 files changed, 102 insertions, 67 deletions
diff --git a/configure.in.in b/configure.in.in
index c1a9293861..1369c8783a 100644
--- a/configure.in.in
+++ b/configure.in.in
@@ -1,6 +1,8 @@
dnl $Id$ -*- sh -*-
dnl Process this file with autoconf to produce a configure script.
+
+
divert(0)
AC_INIT(main.c)
recurse=yes
@@ -14,25 +16,14 @@ for arg in $@; do
esac
done
-if test "$with_shared_apache" != "no" && test -n "$with_shared_apache" ; then
- echo ""
- echo "ERROR: --with-shared-apache is not supported."
- echo " Please read INSTALL.DSO for instructions on using APXS."
- exit 1
-fi
-
-cwd=`pwd`
-cachefile=$cwd/config.cache
-
if test "$recurse" = "yes"; then
- (set -x; test -d libzend || mkdir libzend ; cd libzend; $cwd/$srcdir/libzend/configure --cache-file=$cachefile $@)
+ cwd=`pwd`
+ (set -x; test -d libzend || mkdir libzend ; cd libzend; $cwd/$srcdir/libzend/configure --cache-file=$cwd/config.cache $@)
if test "$threadsafe" = "yes"; then
- (set -x; test -d TSRM || mkdir TSRM; cd TSRM; $cwd/$srcdir/TSRM/configure --cache-file=$cachefile $@)
+ (set -x; test -d TSRM || mkdir TSRM; cd TSRM; $cwd/$srcdir/TSRM/configure --cache-file=$cwd/config.cache $@)
fi
fi
-(set -x; cd $srcdir; ./ltconfig --disable-static --enable-dlopen --cache-file=$cachefile ltmain.sh)
-
dnl ## Diversion 1 is the initial checking of OS features, programs,
dnl ## libraries and so on.
@@ -51,14 +42,12 @@ dnl ## Diversion 4 is the last one. Here we generate files and clean up.
divert(1)
dnl ## This is where the version number is changed from now on!
-AM_INIT_AUTOMAKE(php, 4.0b2-dev)
+AM_INIT_AUTOMAKE(php, 4.0B1)
PHP_VERSION=$VERSION
-echo "/* automatically generated by configure */" > php_version.h.new
-echo "/* edit configure.in.in to change version number */" >> php_version.h.new
-echo "#define PHP_VERSION \"$PHP_VERSION\"" >> php_version.h.new
+echo "#define PHP_VERSION \"$PHP_VERSION\"" > php_version.h.new
cmp php_version.h.new php_version.h >/dev/null 2>&1
if test $? -ne 0 ; then
rm -f php_version.h && mv php_version.h.new php_version.h && \
@@ -74,13 +63,7 @@ AM_MAINTAINER_MODE
dnl We want this one before the checks, so the checks can modify CFLAGS.
test -z "$CFLAGS" && auto_cflags=1
-dnl If we're using cc on HP-UX, add the -Ae to CFLAGS
-if test -n "$auto_cflags" && test "`uname -s 2>/dev/null`" = "HP-UX"; then
- test -n "$GCC" || CFLAGS="-Ae $CFLAGS -D_HPUX_SOURCE"
-fi
-
dnl Checks for programs.
-AM_PROG_LIBTOOL
AC_PROG_YACC
if test "$YACC" != "bison -y"; then
AC_MSG_WARN(You will need bison if you want to regenerate the PHP parsers.)
@@ -314,9 +297,7 @@ AC_CHECK_FUNCS(memcpy memmove strdup strerror strcasecmp strstr flock lockf pute
AC_FUNC_UTIME_NULL
AC_FUNC_ALLOCA
dnl## OLDLIBS=$LIBS; LIBS=""
-dnl This is also defined/used in libzend. To avoid a redefinition
-dnl we use that version
-dnl AC_BROKEN_SPRINTF
+AC_BROKEN_SPRINTF
dnl## LIBS=$OLDLIBS
AC_REPLACE_FUNCS(getopt)
@@ -384,6 +365,64 @@ AC_ARG_WITH(apxs,
APACHE_INSTALL_FILES="$srcdir/mod_php4.* libphp4.module"
+AC_MSG_CHECKING(for Apache module support via DSO through APACI)
+AC_ARG_WITH(shared-apache,
+[ --with-shared-apache[=DIR] Build shared Apache module. DIR is the top-level
+ Apache build directory, defaults to /usr/local/etc/httpd.
+ (This option needs Perl installed)],
+[
+ if test "$withval" = "yes"; then
+ # Apache's default directory
+ withval=/usr/local/etc/httpd
+ fi
+ if test "$withval" != "no"; then
+ rpath_raw=yes
+ if test -f $withval/src/include/httpd.h; then
+ AC_EXPAND_PATH($withval, withval)
+ APACHE_INCLUDE="-I$withval/src/include -I$withval/src/os/unix"
+ APACHE_TARGET=$withval/src/modules/php4
+ if test ! -d $APACHE_TARGET; then
+ mkdir $APACHE_TARGET
+ fi
+ CFLAGS_SHLIB=`perl -V:cccdlflags | cut -d\' -f2`
+ LDFLAGS_SHLIB=`perl -V:lddlflags | cut -d\' -f2`
+ LDFLAGS_SHLIB_EXPORT=`perl -V:ccdlflags | cut -d\' -f2`
+ PHP_LIBS=
+ BINNAME=libmodphp4-so.a
+ INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $APACHE_INSTALL_FILES $APACHE_TARGET; cp apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp apMakefile.libdir $APACHE_TARGET/Makefile.libdir"
+ AC_DEFINE(APACHE)
+ AC_MSG_RESULT(yes - Shared Apache 1.3.x)
+ STRONGHOLD=
+ if test -f $withval/src/include/ap_config.h; then
+ AC_DEFINE(HAVE_AP_CONFIG_H)
+ fi
+ if test -f $withval/src/include/ap_compat.h; then
+ AC_DEFINE(HAVE_AP_COMPAT_H)
+ if test ! -f $withval/src/include/ap_config_auto.h; then
+ AC_MSG_ERROR(Please run Apache's configure or src/Configure program once and try again)
+ fi
+ else
+ if test -f $withval/src/include/compat.h; then
+ AC_DEFINE(HAVE_OLD_COMPAT_H)
+ fi
+ fi
+ else
+ AC_MSG_RESULT(no)
+ AC_MSG_ERROR(Invalid Apache directory - unable to find httpd.h under $withval/src/include)
+ fi
+ fi
+ INCLUDES="$INCLUDES $APACHE_INCLUDE"
+ AC_SUBST(APACHE_INCLUDE)
+ AC_SUBST(APACHE_TARGET)
+ AC_SUBST(INSTALL_IT)
+ AC_SUBST(BINNAME)
+ AC_SUBST(PHP_LIBS)
+],[
+ AC_MSG_RESULT(no)
+])
+
+
+
if test "$BINNAME" != "libmodphp4-so.a"; then
if test "$BINNAME" != "libphp4.so"; then
AC_MSG_CHECKING(for Apache module support)
@@ -877,8 +916,7 @@ AC_SUBST(CFLAGS_SHLIB)
AC_SUBST(LDFLAGS_SHLIB)
AC_SUBST(LDFLAGS_SHLIB_EXPORT)
AC_SUBST(RPATHS)
-AC_SUBST(RAW_RPATHS)
-
+
PHP_BUILD_DATE=`date '+%Y-%m-%d'`
AC_SUBST(PHP_BUILD_DATE)
AC_DEFINE_UNQUOTED(PHP_BUILD_DATE,"$PHP_BUILD_DATE")
@@ -899,48 +937,45 @@ if test ! -f $srcdir/ext/bcmath/number.c; then
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.h
fi
-if test "" = ""; then
-
- chmod +x scripts/mkextlib
- # Hacking while airborne considered harmful.
- #
- echo "creating internal_functions.c"
- extensions=\`grep '^s.@EXT_STATIC@' \$0|sed -e 's/^.*@% *//' -e 's/%.*$//'\`
- mv -f internal_functions.c internal_functions.c.old 2>/dev/null
- sh $srcdir/genif.sh $srcdir/internal_functions.c.in $srcdir \$extensions > internal_functions.c
- if cmp internal_functions.c.old internal_functions.c > /dev/null 2>&1; then
- echo "internal_functions.c is unchanged"
- mv internal_functions.c.old internal_functions.c
- else
- rm -f internal_functions.c.old
- fi
-
- # Warn about CGI version with no extra security options.
- if test "$BINNAME" = "php"; then
- if test "$REDIRECT" = "0"; then
- if test "$DISCARD_PATH" = "0"; then
- echo "+--------------------------------------------------------------------+"
- echo "| Warning: |"
- echo "| You will be compiling the CGI version of PHP without any |"
- echo "| redirection checking. By putting this cgi binary somewhere in |"
- echo "| your web space, users may be able to circumvent existing .htaccess |"
- echo "| security by loading files directly through the parser. See |"
- echo "| http://www.php.net/manual/config-security.php3 for more details. |"
- fi
- fi
- fi
+chmod +x scripts/mkextlib
+# Hacking while airborne considered harmful.
+#
+echo "creating internal_functions.c"
+extensions=\`grep '^s.@EXT_SUBDIRS@' \$0|sed -e 's/^.*@% *//' -e 's/%.*$//'\`
+mv -f internal_functions.c internal_functions.c.old 2>/dev/null
+sh $srcdir/genif.sh $srcdir/internal_functions.c.in $srcdir \$extensions > internal_functions.c
+if cmp internal_functions.c.old internal_functions.c > /dev/null 2>&1; then
+ echo "internal_functions.c is unchanged"
+ mv internal_functions.c.old internal_functions.c
+else
+ rm -f internal_functions.c.old
+fi
- echo "+--------------------------------------------------------------------+"
- echo "| License: |"
- echo "| This software is subject to the PHP License, available in this |"
- echo "| distribution in the file LICENSE. By continuing this installation |"
- echo "| process, you are bound by the terms of this license agreement. |"
- echo "| If you do not agree with the terms of this license, you must abort |"
- echo "| the installation process at this point. |"
- echo "+--------------------------------------------------------------------+"
+dnl Warn about CGI version with no extra security options.
+if test "$BINNAME" = "php"; then
+ if test "$REDIRECT" = "0"; then
+ if test "$DISCARD_PATH" = "0"; then
+ echo "+--------------------------------------------------------------------+"
+ echo "| Warning: |"
+ echo "| You will be compiling the CGI version of PHP without any |"
+ echo "| redirection checking. By putting this cgi binary somewhere in |"
+ echo "| your web space, users may be able to circumvent existing .htaccess |"
+ echo "| security by loading files directly through the parser. See |"
+ echo "| http://www.php.net/manual/config-security.php3 for more details. |"
+ fi
+ fi
fi
+echo "+--------------------------------------------------------------------+"
+echo "| License: |"
+echo "| This software is subject to the PHP License, available in this |"
+echo "| distribution in the file LICENSE. By continuing this installation |"
+echo "| process, you are bound by the terms of this license agreement. |"
+echo "| If you do not agree with the terms of this license, you must abort |"
+echo "| the installation process at this point. |"
+echo "+--------------------------------------------------------------------+"
+
])
divert