cvs: /php4/sapi .cvsignore Makefile.am /php4/sapi/apache .cvsignore Makefile.am Makefile.inc config.h.stub config.m4 mod_php4.c mod_php4.exp
mod_php4.h /php4/sapi/cgi .cvsignore Makefile.am Makefile.inc cgi_main.c config.h.in config.m4 /php4/sapi/isapi .cvsignore Makefile.am Makefile.inc
config.m4 php4isapi.c php4isapi.def php4isapi.dsp /php4/sapi/nsapi .cvsignore Makefile.am Makefile.inc aolserver.c config.m4 /php4 aolserver.c
cgi_main.c mod_php4.c mod_php4.exp mod_php4.h /php4 ChangeLog Makefile.in configure.in.in header main.c /php4/ext/apache apache.c /php4/scripts
config-stubs preconfig

From: Date: Mon, 27 Sep 1999 16:34:29 +0000
Subject: cvs: /php4/sapi .cvsignore Makefile.am /php4/sapi/apache .cvsignore Makefile.am Makefile.inc config.h.stub config.m4 mod_php4.c mod_php4.exp
mod_php4.h /php4/sapi/cgi .cvsignore Makefile.am Makefile.inc cgi_main.c config.h.in config.m4 /php4/sapi/isapi .cvsignore Makefile.am Makefile.inc
config.m4 php4isapi.c php4isapi.def php4isapi.dsp /php4/sapi/nsapi .cvsignore Makefile.am Makefile.inc aolserver.c config.m4 /php4 aolserver.c
cgi_main.c mod_php4.c mod_php4.exp mod_php4.h /php4 ChangeLog Makefile.in configure.in.in header main.c /php4/ext/apache apache.c /php4/scripts
config-stubs preconfig
Groups: php.version4 
Request: Send a blank email to php-version4+get-4960@lists.php.net to get a copy of this message
ssb Mon Sep 27 12:34:29 1999 EDT Added files: /php4/sapi .cvsignore Makefile.am /php4/sapi/apache .cvsignore Makefile.am Makefile.inc config.h.stub config.m4 mod_php4.c mod_php4.exp mod_php4.h /php4/sapi/cgi .cvsignore Makefile.am Makefile.inc cgi_main.c config.h.in config.m4 /php4/sapi/isapi .cvsignore Makefile.am Makefile.inc config.m4 php4isapi.c php4isapi.def php4isapi.dsp /php4/sapi/nsapi .cvsignore Makefile.am Makefile.inc aolserver.c config.m4 Removed files: /php4 aolserver.c cgi_main.c mod_php4.c mod_php4.exp mod_php4.h Modified files: /php4 ChangeLog Makefile.in configure.in.in header main.c /php4/ext/apache apache.c /php4/scripts config-stubs preconfig Log: Generalized server-API build process on UNIX. Each SAPI implementation now has its own directory under sapi/, just like extensions have theirs under ext/. To make the final targets appear in the main dir, the top-level Makefile includes sapi/NN/Makefile.inc from the selected sapi backend. This is a plan Makefile stub without any autoconf substitutions. Each SAPI backend also has its own config.m4 like extensions (read at the end of diversion 2) and config.h.stub files. Each SAPI backend has to contain: config.m4: just like for extensions, this file contains autoconf/automake directives that end up in the configure script. The only difference is that the sapi config.m4 files are read in diversion (output block) 2 instead of 3. The sapi config.m4 files should set two variables: PHP_SAPI (which sapi backend to choose) and SAPI_TARGET (the name of the resulting library or program, previously BINNAME). If they are not specified, they will default to "cgi" and "php", respectively. Makefile.inc: has to exist, has to define "INSTALL_IT" to the command used to install the final target (or ":" for no operation). It also has to define a plain Makefile rule (without autoconf substitutions) to build $(SAPI_TARGET) Makefile.am: just what you think. Make sure your target is called "libphpsapi_NNN.a", where NNN is the value of PHP_SAPI. Some testing and fixing probably remains. To make everything hang together, I've done some ugly tricks that I can imagine causing some problems. I've built and run the CGI version and built the Apache DSO. Index: php4/ChangeLog diff -u php4/ChangeLog:1.149 php4/ChangeLog:1.150 --- php4/ChangeLog:1.149 Sun Sep 26 05:05:56 1999 +++ php4/ChangeLog Mon Sep 27 12:34:26 1999 @@ -2,6 +2,7 @@ ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ?? 1999, Version 4.0 Beta 3 +- Generalized server-API build procedure on UNIX (Stig) - Added '--disable-rpath' option (Sascha) - Added AOLserver SAPI module (Sascha) - Fixed XML Callbacks. (Thies) Index: php4/Makefile.in diff -u php4/Makefile.in:1.65 php4/Makefile.in:1.66 --- php4/Makefile.in:1.65 Sun Sep 26 16:17:27 1999 +++ php4/Makefile.in Mon Sep 27 12:34:27 1999 @@ -24,7 +24,7 @@ # +----------------------------------------------------------------------+ # -# $Id: Makefile.in,v 1.65 1999/09/26 20:17:27 sas Exp $ +# $Id: Makefile.in,v 1.66 1999/09/27 16:34:27 ssb Exp $ # prefix = @prefix@ @@ -37,14 +37,15 @@ ZEND_DIR = $(srcdir)/libzend TSRM_DIR = @TSRM_DIR@ -SUBDIRS=libzend ext $(TSRM_DIR) +SUBDIRS=libzend ext $(TSRM_DIR) sapi PACKAGE = @PACKAGE@ VERSION = @VERSION@ LN_S = @LN_S@ CC = @CC@ AR = ar rc -BINNAME = @BINNAME@ +PHP_SAPI = @PHP_SAPI@ +SAPI_TARGET = @SAPI_TARGET@ INSTALL_IT = @INSTALL_IT@ EXTRA_LIBS = @EXTRA_LIBS@ EXT_LIBS = @EXT_LIBS@ @@ -56,9 +57,11 @@ LDFLAGS_SHLIB_EXPORT = @LDFLAGS_SHLIB_EXPORT@ CPPFLAGS = @CPPFLAGS@ DEFS = @DEFS@ +VERSION_SCRIPT = @VERSION_SCRIPT@ +RPATHS = @RPATHS@ CFLAGS = @CFLAGS@ @DEBUG_CFLAGS@ $(PROF_CFLAGS) COMPILE = $(CC) $(CFLAGS) $(CFLAGS_SHLIB) $(CPPFLAGS) $(INCLUDE) $(DEFS) @STRONGHOLD@ -LDFLAGS = @VERSION_SCRIPT@ @RPATHS@ @LDFLAGS@ $(LDFLAGS_SHLIB) $(LDFLAGS_SHLIB_EXPORT) -L$(ZEND_DIR) +LDFLAGS = $(VERSION_SCRIPT) $(RPATHS) @LDFLAGS@ $(LDFLAGS_SHLIB) $(LDFLAGS_SHLIB_EXPORT) -L$(ZEND_DIR) REGCFLAGS = $(CFLAGS) RANLIB = @RANLIB@ YACC = @YACC@ @@ -70,18 +73,20 @@ LEX_CFLAGS = -w$(WARNING_LEVEL) @LEX_CFLAGS@ EXT_SHARED = @EXT_SHARED@ LIBOBJS=@LIBOBJS@ +REGEX_LIB=@REGEX_LIB@ +FHTTPD_LIB=@FHTTPD_LIB@ +TSRM_LIB=@TSRM_LIB@ SOURCE = main.c internal_functions.c snprintf.c php3_sprintf.c \ configuration-parser.c configuration-scanner.c request_info.c \ safe_mode.c fopen-wrappers.c php3_realpath.c alloca.c output.c \ - php_ini.c SAPI.c cgi_main.c rfc1867.c dlist.c php_content_types.c \ - aolserver.c + php_ini.c SAPI.c rfc1867.c dlist.c php_content_types.c OBJS = $(SOURCE:.c=.o) $(LIBOBJS) PHPLIBS = -Llibzend -lzend -Lext -lphpext LIBS = $(PHPLIBS) $(EXTRA_LIBS) @LIBS@ -all: $(BINNAME) +all: $(SAPI_TARGET) all-recursive clean-recursive distclean-recursive \ maintainer-clean-depend-recursive: @@ -92,33 +97,8 @@ (cd $$subdir && $(MAKE) $$target) || fail=yes; \ done && test -z "$$fail" -# CGI binary or fhttpd module -php: all-recursive $(OBJS) @REGEX_LIB@ @FHTTPD_LIB@ - $(CC) $(CFLAGS) -o $(BINNAME) $(LDFLAGS) $(OBJS) $(LIBS) - -# Apache modules -libphp4.a libmodphp4.a: all-recursive $(OBJS) @REGEX_LIB@ - $(AR) $@.tmp $(OBJS) - $(srcdir)/scripts/armerge $@ $@.tmp ext/libphpext.a libzend/libzend.a @TSRM_LIB@ - @rm -f $@.tmp - $(RANLIB) $(BINNAME) - -# Apache modules -libmodphp4-so.a: all-recursive $(OBJS) @REGEX_LIB@ - $(AR) $@.tmp $(OBJS) - $(srcdir)/scripts/armerge $@ $@.tmp ext/libphpext.a libzend/libzend.a @TSRM_LIB@ - @rm -f $@.tmp - $(RANLIB) libmodphp4-so.a - -# Apache 1.3 shared module -libphp4.so: $(srcdir)/mod_php4.c libmodphp4-so.a @REGEX_LIB@ - -@test -f ./mod_php4.c || test -L ./mod_php4.c || $(LN_S) $(srcdir)/mod_php4.c ./mod_php4.c - -@test -f ./mod_php4.c || test -h ./mod_php4.c || $(LN_S) $(srcdir)/mod_php4.c ./mod_php4.c - $(APXS) $(INCLUDE) -c -o libphp4.so @VERSION_SCRIPT@ @RPATHS@ ./mod_php4.c libmodphp4-so.a $(APXS_LDFLAGS) $(APXS_EXP) - -php4_aol.so: libmodphp4-so.a - g++ $(LDFLAGS) -shared aolserver.o -o $@ libmodphp4-so.a $(LIBS) - +include sapi/$(PHP_SAPI)/Makefile.inc + regex/libregex.a: (cd regex; $(MAKE) lib) @@ -179,12 +159,12 @@ maintainer-clean-depend: maintainer-clean-depend-recursive -bench: $(BINNAME) - ./$(BINNAME) -c. tests/bench.phtml +bench: php + ./php -c. tests/bench.phtml # can't use a single rule for this because 'test' is a directory test: regression -regression check: $(BINNAME) +regression check: php cd test && ./testall config.status: configure @@ -208,7 +188,7 @@ stamp-h.in: configure.in aclocal.m4 acconfig.h cd ${srcdir} && autoheader && touch ${srcdir}/stamp-h.in -install: install-recursive $(BINNAME) +install: install-recursive $(SAPI_TARGET) $(INSTALL_IT) install-recursive: Index: php4/configure.in.in diff -u php4/configure.in.in:1.94 php4/configure.in.in:1.95 --- php4/configure.in.in:1.94 Sun Sep 26 16:17:28 1999 +++ php4/configure.in.in Mon Sep 27 12:34:27 1999 @@ -1,18 +1,9 @@ -dnl $Id: configure.in.in,v 1.94 1999/09/26 20:17:28 sas Exp $ -*- sh -*- -dnl Process this file with autoconf to produce a configure script. +dnl ## $Id: configure.in.in,v 1.95 1999/09/27 16:34:27 ssb Exp $ -*- sh -*- +dnl ## Process this file with autoconf to produce a configure script. divert(0) + AC_INIT(main.c) -recurse=yes -for arg in $@; do - case $arg in - ## This is to prevent "./config.status --recheck" from - ## running configure in libzend again. - --no-recursion) recurse=no;; - --enable-thread-safety) threadsafe=yes;; - *) ;; - esac -done if test "$with_shared_apache" != "no" && test -n "$with_shared_apache" ; then echo "" @@ -20,14 +11,13 @@ 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 $@) || exit 1 - if test "$threadsafe" = "yes"; then - (set -x; test -d TSRM || mkdir TSRM; cd TSRM; $cwd/$srcdir/TSRM/configure --cache-file=$cachefile $@) || exit 1 +if test "$no_recursion" != "yes"; then + cwd=pwd + cachefile=$cwd/config.cache + (set -x; cd libzend; $cwd/$srcdir/libzend/configure --cache-file=$cachefile $@) || exit 1 + if test "$enable_thread_safety" = "yes"; then + (set -x; cd TSRM && $cwd/$srcdir/TSRM/configure --cache-file=$cachefile $@) || exit 1 fi (set -x; cd $srcdir; sh ltconfig --disable-static --enable-dlopen --cache-file=$cachefile ltmain.sh) fi @@ -124,11 +114,6 @@ CPPFLAGS="$CPPFLAGS -traditional-cpp" fi -if test "uname -sv" = "AIX 4" -a "$GCC" != "yes"; then - APXS_EXP="-bE:mod_php4.exp" -fi -AC_SUBST(APXS_EXP) - dnl Ugly hack to get around a problem with gcc on AIX. if test "$CC" = "gcc" -a "$ac_cv_prog_cc_g" = "yes" -a \ "uname -sv" = "AIX 4"; then @@ -426,44 +411,6 @@ AC_SUBST(abs_srcdir) AC_SUBST(abs_builddir) -AC_MSG_CHECKING(for Apache module support via DSO through APXS) -AC_ARG_WITH(apxs, -[ --with-apxs[=FILE] Build shared Apache module. FILE is the optional - pathname to the Apache apxs tool; defaults to "apxs". - (This option needs Perl installed)], -[ - if test "$withval" = "yes"; then - withval=apxs - fi - AC_EXPAND_PATH($withval, APXS) - APXS_LDFLAGS="@SYBASE_LFLAGS@ @SYBASE_LIBS@ @SYBASE_CT_LFLAGS@ @SYBASE_CT_LIBS@" - APXS_INCLUDEDIR=$APXS -q INCLUDEDIR - if test -d "$APXS_INCLUDEDIR/xml" ; then - XML_INCLUDE="$APXS_INCLUDEDIR/xml" - fi - APACHE_INCLUDE="-I$APXS_INCLUDEDIR" - BINNAME=libphp4.so - INSTALL_IT="\$(APXS) -i -a -n php4 $BINNAME" - 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= - STRONGHOLD= - INCLUDES="$INCLUDES $APACHE_INCLUDE" - AC_DEFINE(APACHE) - AC_SUBST(APXS) - AC_SUBST(APXS_LDFLAGS) - AC_SUBST(BINNAME) - AC_SUBST(INSTALL_IT) - AC_SUBST(PHP_LIBS) - AC_SUBST(APACHE_INCLUDE) - AC_DEFINE(HAVE_AP_CONFIG_H) - AC_DEFINE(HAVE_AP_COMPAT_H) - AC_MSG_RESULT(yes) -],[ - AC_MSG_RESULT(no) -]) - versioning="no" AC_MSG_CHECKING(whether to enable versioning) AC_ARG_ENABLE(versioning, @@ -489,160 +436,6 @@ AC_MSG_RESULT($versioning) AC_SUBST(VERSION_SCRIPT) - -APACHE_INSTALL_FILES="$srcdir/mod_php4.* libphp4.module" - -if test "$BINNAME" != "libmodphp4-so.a"; then -if test "$BINNAME" != "libphp4.so"; then -AC_MSG_CHECKING(for Apache module support) -AC_ARG_WITH(apache, -[ --with-apache[=DIR] Build Apache module. DIR is the top-level Apache - build directory, defaults to /usr/local/etc/httpd.], -[ - if test "$withval" = "yes"; then - # Apache's default directory - withval=/usr/local/etc/httpd - fi - if test "$withval" != "no"; then -# For Apache 1.2.x - AC_EXPAND_PATH($withval, withval) - if test -f $withval/src/httpd.h; then - APACHE_INCLUDE=-I$withval/src - APACHE_TARGET=$withval/src - BINNAME=libphp4.a - INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $APACHE_INSTALL_FILES $APACHE_TARGET" - PHP_LIBS="-L. -lphp3" - AC_DEFINE(APACHE) - AC_MSG_RESULT(yes - Apache 1.2.x) - STRONGHOLD= - if test -f $withval/src/ap_config.h; then - AC_DEFINE(HAVE_AP_CONFIG_H) - fi -# For Apache 1.3.x - elif test -f $withval/src/main/httpd.h; then - APACHE_INCLUDE="-I$withval/src/main -I$withval/src/os/unix -I$withval/src/ap" - APACHE_TARGET=$withval/src/modules/php4 - if test ! -d $APACHE_TARGET; then - mkdir $APACHE_TARGET - fi - BINNAME=libmodphp4.a - INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/apMakefile.libdir $APACHE_TARGET/Makefile.libdir" - PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4" - AC_DEFINE(APACHE) - AC_MSG_RESULT(yes - 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 -# Also for Apache 1.3.x - elif test -f $withval/src/include/httpd.h; then - APACHE_INCLUDE="-I$withval/src/include -I$withval/src/os/unix" - APACHE_TARGET=$withval/src/modules/php4 - if test -d $withval/src/lib/expat-lite ; then - XML_INCLUDE=$withval/src/lib/expat-lite - fi - if test ! -d $APACHE_TARGET; then - mkdir $APACHE_TARGET - fi - BINNAME=libmodphp4.a - PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4" - INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $APACHE_INSTALL_FILES $APACHE_TARGET; cp $srcdir/apMakefile.tmpl $APACHE_TARGET/Makefile.tmpl; cp $srcdir/apMakefile.libdir $APACHE_TARGET/Makefile.libdir" - AC_DEFINE(APACHE) - AC_MSG_RESULT(yes - 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 -# For StrongHold 2.2 - elif test -f $withval/apache/httpd.h; then - APACHE_INCLUDE=-"I$withval/apache -I$withval/ssl/include" - APACHE_TARGET=$withval/apache - BINNAME=libmodphp4.a - PHP_LIBS="-Lmodules/php4 -L../modules/php4 -L../../modules/php4 -lmodphp4" - INSTALL_IT="mkdir -p $APACHE_TARGET; cp $BINNAME $APACHE_INSTALL_FILES $APACHE_TARGET" - STRONGHOLD=-DSTRONGHOLD=1 - AC_DEFINE(APACHE) - AC_MSG_RESULT(yes - StrongHold) - if test -f $withval/apache/ap_config.h; then - AC_DEFINE(HAVE_AP_CONFIG_H) - fi - if test -f $withval/src/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/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) - fi - else - AC_MSG_RESULT(no) - BINNAME=php - fi -],[ - AC_MSG_RESULT(no) - BINNAME=php -]) - -if test "$BINNAME" = "php" ; then - INSTALL_IT="\$(SHELL) \$(srcdir)/install-sh -m 0755 $BINNAME \$(bindir)/$BINNAME" -fi - -INCLUDES="$INCLUDES $APACHE_INCLUDE" -dnl## AC_SUBST(APACHE_INCLUDE) -AC_SUBST(APACHE_TARGET) -AC_SUBST(INSTALL_IT) -AC_SUBST(BINNAME) -AC_SUBST(STRONGHOLD) -AC_SUBST(PHP_LIBS) -fi -fi - -RESULT=no -AC_MSG_CHECKING(for AOLserver support) -AC_ARG_WITH(aolserver, -[ --with-aolserver=DIR], -[ - if test ! -d $withval ; then - AC_MSG_ERROR(You did not specify a directory) - fi - if test "$enable_thread_safety" != "yes"; then - AC_MSG_ERROR(AOLserver must be compiled using --enable-thread-safety) - fi - NS_DIR=$withval - AC_ADD_INCLUDE($NS_DIR/include) - AC_DEFINE(HAVE_AOLSERVER) - BINNAME=php4_aol.so - INSTALL_IT="\$(SHELL) \$(srcdir)/install-sh -m 0755 $BINNAME $NS_DIR/root/bin/$BINNAME" - RESULT=yes -]) -AC_MSG_RESULT($RESULT) - AC_MSG_CHECKING(whether to use bundled regex library) AC_ARG_WITH(system-regex, [ --with-system-regex Do not use the bundled regex library], @@ -686,50 +479,7 @@ AC_SUBST(REGEX_LIB) AC_SUBST(HSREGEX) -AC_MSG_CHECKING(for mod_charset compatibility option) -AC_ARG_WITH(mod_charset, -[ --with-mod_charset Enable transfer tables for mod_charset (Rus Apache).], -[ - AC_MSG_RESULT(yes) - AC_DEFINE(USE_TRANSFER_TABLES) -],[ - AC_MSG_RESULT(no) -]) - -AC_MSG_CHECKING(for fhttpd module support) -AC_ARG_WITH(fhttpd, -[ --with-fhttpd[=DIR] Build fhttpd module. DIR is the fhttpd sources - directory, defaults to /usr/local/src/fhttpd.], -[ - if test "$withval" = "yes"; then - # fhttpd source directory - withval=/usr/local/src/fhttpd - fi - if test "$withval" != "no"; then -# For fhttpd 0.3.x - if test -f $withval/servproc.h; then - FHTTPD_INCLUDE=-I$withval/ - FHTTPD_LIB=$withval/servproc.o - FHTTPD_TARGET=$withval/ - BINNAME=php - AC_DEFINE(FHTTPD) - AC_MSG_RESULT(yes - fhttpd 0.3.x) - else - AC_MSG_RESULT(no) - AC_MSG_ERROR(Invalid fhttpd directory - unable to find servproc.h under $withval) - fi - else - AC_MSG_RESULT(no) - fi -],[ - AC_MSG_RESULT(no) -]) -INCLUDES="$INCLUDES $FHTTPD_INCLUDE" -dnl## AC_SUBST(FHTTPD_INCLUDE) -AC_SUBST(FHTTPD_LIB) -AC_SUBST(FHTTPD_TARGET) - AC_MSG_CHECKING(whether to use a configuration file) AC_ARG_WITH(config-file-path, [ --with-config-file-path=PATH @@ -889,68 +639,6 @@ ]) AC_MSG_RESULT($enable_rpath) -dnl AC_MSG_CHECKING(whether to enable PHP RPC support) -dnl AC_ARG_ENABLE(php-rpc, -dnl [ --enable-php-rpc Compile with PHP RPC support.], -dnl [ -dnl if test "$enableval" = "yes"; then -dnl AC_DEFINE(PHP_RPC, 1) -dnl AC_MSG_RESULT(yes) -dnl else -dnl AC_DEFINE(PHP_RPC, 0) -dnl AC_MSG_RESULT(no) -dnl fi -dnl ],[ -dnl AC_DEFINE(PHP_RPC, 0) -dnl AC_MSG_RESULT(no) -dnl ]) - -if test "$BINNAME" = "php"; then -AC_MSG_CHECKING(whether to force Apache CGI redirect) -AC_ARG_ENABLE(force-cgi-redirect, -[ --enable-force-cgi-redirect - Enable the security check for internal server - redirects. You should use this if you are - running the CGI version with Apache. ], -[ - if test "$enableval" = "yes"; then - AC_DEFINE(FORCE_CGI_REDIRECT, 1) - AC_MSG_RESULT(yes) - REDIRECT=1 - else - AC_DEFINE(FORCE_CGI_REDIRECT, 0) - AC_MSG_RESULT(no) - REDIRECT=0 - fi -],[ - AC_DEFINE(FORCE_CGI_REDIRECT, 0) - AC_MSG_RESULT(no) - REDIRECT=0 -]) - -AC_MSG_CHECKING(whether to discard path_info + path_translated) -AC_ARG_ENABLE(discard_path, -[ --enable-discard-path If this is enabled, the PHP CGI binary - can safely be placed outside of the - web tree and people will not be able - to circumvent .htaccess security. ], -[ - if test "$enableval" = "yes"; then - AC_DEFINE(DISCARD_PATH, 1) - AC_MSG_RESULT(yes) - DISCARD_PATH=1 - else - AC_DEFINE(DISCARD_PATH, 0) - AC_MSG_RESULT(no) - DISCARD_PATH=0 - fi -],[ - AC_DEFINE(DISCARD_PATH, 0) - AC_MSG_RESULT(no) - DISCARD_PATH=0 -]) -fi - AC_MSG_CHECKING(whether to enable short tags by default) AC_ARG_ENABLE(short-tags, [ --disable-short-tags Disable the short-form <? start tag by default.], @@ -999,16 +687,22 @@ ]) AC_MSG_RESULT($DMALLOC_RESULT) +dnl ## This is the default server API. +PHP_SAPI=cgi +SAPI_TARGET=php + +esyscmd(./scripts/config-stubs sapi) + divert(3) AC_SUBST(EXTRA_LIBS) # reading config stubs -esyscmd(./scripts/config-stubs) +esyscmd(./scripts/config-stubs ext) divert(4) -dnl If we're using gcc and the user hasn't specified CFLAGS, add -O2. +dnl If we are using gcc and the user has not specified CFLAGS, add -O2. test -n "$auto_cflags" && test -n "$GCC" && CFLAGS="$CFLAGS -O2" dnl *** Commented out - generates slow code and consumes a lot of @@ -1037,6 +731,10 @@ PHP_OS=uname AC_DEFINE_UNQUOTED(PHP_OS,"$PHP_OS") +AC_SUBST(PHP_LIBS) +AC_SUBST(PHP_SAPI) +AC_SUBST(SAPI_TARGET) + AC_OUTPUT(Makefile libphp4.module php4.spec scripts/mkextlib regex/Makefile @@EXT_MAKEFILES@@ build-defs.h, [ @@ -1066,7 +764,7 @@ fi # Warn about CGI version with no extra security options. - if test "$BINNAME" = "php"; then + if test "$SAPI_TARGET" = "php"; then if test "$REDIRECT" = "0"; then if test "$DISCARD_PATH" = "0"; then echo "+--------------------------------------------------------------------+" Index: php4/header diff -u php4/header:1.1 php4/header:1.2 --- php4/header:1.1 Wed Apr 7 17:02:07 1999 +++ php4/header Mon Sep 27 12:34:27 1999 @@ -1,27 +1,16 @@ /* +----------------------------------------------------------------------+ - | PHP HTML Embedded Scripting Language Version 3.0 | + | PHP version 4.0 | +----------------------------------------------------------------------+ - | Copyright (c) 1997,1998 PHP Development Team (See Credits file) | + | Copyright (c) 1997, 1998, 1999 The PHP Group | +----------------------------------------------------------------------+ - | This program is free software; you can redistribute it and/or modify | - | it under the terms of one of the following licenses: | - | | - | A) the GNU General Public License as published by the Free Software | - | Foundation; either version 2 of the License, or (at your option) | - | any later version. | - | | - | B) the PHP License as published by the PHP Development Team and | - | included in the distribution in the file: LICENSE | - | | - | This program is distributed in the hope that it will be useful, | - | but WITHOUT ANY WARRANTY; without even the implied warranty of | - | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | - | GNU General Public License for more details. | - | | - | You should have received a copy of both licenses referred to here. | - | If you did not, or have any questions about PHP licensing, please | - | contact core@php.net. | + | This source file is subject to version 2.0 of the PHP license, | + | that is bundled with this package in the file LICENSE, and is | + | available at through the world-wide-web at | + | http://www.php.net/license/2_0.txt. | + | If you did not receive a copy of the PHP license and are unable to | + | obtain it through the world-wide-web, please send a note to | + | license@php.net so we can mail you a copy immediately. | +----------------------------------------------------------------------+ | Authors: | | | Index: php4/main.c diff -u php4/main.c:1.124 php4/main.c:1.125 --- php4/main.c:1.124 Thu Sep 16 21:16:54 1999 +++ php4/main.c Mon Sep 27 12:34:27 1999 @@ -19,7 +19,7 @@ */ -/* $Id: main.c,v 1.124 1999/09/17 01:16:54 sas Exp $ */ +/* $Id: main.c,v 1.125 1999/09/27 16:34:27 ssb Exp $ */ #include <stdio.h> @@ -1171,53 +1171,6 @@ zend_execute(EG(main_op_array) ELS_CC); } } - - - -/* some systems are missing these from their header files */ - -#if APACHE -PHPAPI int apache_php_module_main(request_rec *r, int fd, int display_source_mode SLS_DC) -{ - zend_file_handle file_handle; -#ifdef ZTS - zend_compiler_globals cg; - zend_executor_globals eg; - php_core_globals pcg; - zend_compiler_globals *compiler_globals=&cg; - zend_executor_globals *executor_globals=&eg; - php_core_globals *core_globals=&pcg; -#endif - SLS_FETCH(); - - if (php_request_startup(CLS_C ELS_CC PLS_CC SLS_CC) == FAILURE) { - return FAILURE; - } - file_handle.type = ZEND_HANDLE_FD; - file_handle.handle.fd = fd; - file_handle.filename = SG(request_info).path_translated; - - if (display_source_mode) { - zend_syntax_highlighter_ini syntax_highlighter_ini; - - if (open_file_for_scanning(&file_handle CLS_CC)==SUCCESS) { - php_get_highlight_struct(&syntax_highlighter_ini); - zend_highlight(&syntax_highlighter_ini); - fclose(file_handle.handle.fp); - return OK; - } else { - return NOT_FOUND; - } - } else { - (void) php_execute_script(&file_handle CLS_CC ELS_CC); - } - - php3_header(); /* Make sure headers have been sent */ - php_end_ob_buffering(1); - return (OK); -} -#endif /* APACHE */ - #if WIN32||WINNT /* just so that this symbol gets exported... */ Index: php4/ext/apache/apache.c diff -u php4/ext/apache/apache.c:1.20 php4/ext/apache/apache.c:1.21 --- php4/ext/apache/apache.c:1.20 Tue Sep 14 16:15:32 1999 +++ php4/ext/apache/apache.c Mon Sep 27 12:34:27 1999 @@ -18,13 +18,13 @@ +----------------------------------------------------------------------+ */ -/* $Id: apache.c,v 1.20 1999/09/14 20:15:32 andi Exp $ */ +/* $Id: apache.c,v 1.21 1999/09/27 16:34:27 ssb Exp $ */ #include "php.h" #include "ext/standard/head.h" #include "php_globals.h" #include "php_ini.h" #include "SAPI.h" -#include "mod_php4.h" +#include "sapi/apache/mod_php4.h" #include "ext/standard/info.h" #include <stdlib.h> Index: php4/scripts/config-stubs diff -u php4/scripts/config-stubs:1.1 php4/scripts/config-stubs:1.2 --- php4/scripts/config-stubs:1.1 Fri Apr 16 20:37:12 1999 +++ php4/scripts/config-stubs Mon Sep 27 12:34:28 1999 @@ -1,7 +1,8 @@ #!/bin/sh # -# $Id: config-stubs,v 1.1 1999/04/17 00:37:12 ssb Exp $ +# $Id: config-stubs,v 1.2 1999/09/27 16:34:28 ssb Exp $ -for stubfile in ext/*/config.m4; do +dir=$1; shift +for stubfile in $dir/*/config.m4; do echo "sinclude($stubfile)" done Index: php4/scripts/preconfig diff -u php4/scripts/preconfig:1.10 php4/scripts/preconfig:1.11 --- php4/scripts/preconfig:1.10 Sat May 29 11:10:06 1999 +++ php4/scripts/preconfig Mon Sep 27 12:34:28 1999 @@ -1,6 +1,6 @@ #!/bin/sh # -# $Id: preconfig,v 1.10 1999/05/29 15:10:06 zeev Exp $ +# $Id: preconfig,v 1.11 1999/09/27 16:34:28 ssb Exp $ disclaimer="Do NOT edit - this file is generated by preconfig" @@ -10,7 +10,7 @@ exit 1 fi -makefileams=find ext -name Makefile.am -print | sort +makefileams=find ext sapi -name Makefile.am -print | sort makefiles=echo $makefileams | sed -e 's/\.am//g' echo "dnl $disclaimer" > configure.in.new sed -e "s#@@EXT_MAKEFILES@@#$makefiles#" configure.in.in >> configure.in.new @@ -25,6 +25,12 @@ cat acconfig.h.in >> acconfig.h.new confighfiles=echo ext/*/config.h.stub if test "$confighfiles" != "ext/*/config.h.stub"; then + for file in $confighfiles; do + cat $file >> acconfig.h.new + done +fi +confighfiles=echo sapi/*/config.h.stub +if test "$confighfiles" != "sapi/*/config.h.stub"; then for file in $confighfiles; do cat $file >> acconfig.h.new done

« previous php.version4 (#4960) next »