summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorStig Bakken <ssb@php.net>1999-09-27 16:34:28 +0000
committerStig Bakken <ssb@php.net>1999-09-27 16:34:28 +0000
commit2a854ca8b9e94ea75e949edb1283157b0daad617 (patch)
tree6eafc28bd9403f91354068a364254bde5d9afc7a /scripts
parent154663e9a2ee5310172886384a7c2a8598f66bc8 (diff)
downloadphp-git-2a854ca8b9e94ea75e949edb1283157b0daad617.tar.gz
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.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/config-stubs3
-rwxr-xr-xscripts/preconfig8
2 files changed, 9 insertions, 2 deletions
diff --git a/scripts/config-stubs b/scripts/config-stubs
index 9985066648..7c774f8407 100755
--- a/scripts/config-stubs
+++ b/scripts/config-stubs
@@ -2,6 +2,7 @@
#
# $Id$
-for stubfile in ext/*/config.m4; do
+dir=$1; shift
+for stubfile in $dir/*/config.m4; do
echo "sinclude($stubfile)"
done
diff --git a/scripts/preconfig b/scripts/preconfig
index 59b48fe545..4813fb2687 100755
--- a/scripts/preconfig
+++ b/scripts/preconfig
@@ -10,7 +10,7 @@ if test -w configure.in.new || test -w acconfig.h.new ; then
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
@@ -29,6 +29,12 @@ if test "$confighfiles" != "ext/*/config.h.stub"; then
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
+fi
cmp acconfig.h acconfig.h.new > /dev/null 2>&1
if test $? -ne 0 ; then
mv acconfig.h.new acconfig.h