You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
816 B

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.
27 years ago
  1. #!/bin/sh
  2. #
  3. # $Id$
  4. disclaimer="Do NOT edit - this file is generated by preconfig"
  5. # security check - simply overwriting existing files could be harmful
  6. if test -w acconfig.h.new ; then
  7. echo "Please remove acconfig.h.new and rerun this command"
  8. exit 1
  9. fi
  10. echo "/* $disclaimer */" > acconfig.h.new
  11. cat acconfig.h.in >> acconfig.h.new
  12. confighfiles=`echo ext/*/config.h.stub`
  13. if test "$confighfiles" != "ext/*/config.h.stub"; then
  14. for file in $confighfiles; do
  15. cat $file >> acconfig.h.new
  16. done
  17. fi
  18. confighfiles=`echo sapi/*/config.h.stub`
  19. if test "$confighfiles" != "sapi/*/config.h.stub"; then
  20. for file in $confighfiles; do
  21. cat $file >> acconfig.h.new
  22. done
  23. fi
  24. cmp acconfig.h acconfig.h.new > /dev/null 2>&1
  25. if test $? -ne 0 ; then
  26. mv acconfig.h.new acconfig.h
  27. else
  28. rm -f acconfig.h.new
  29. fi