Re: New Build System Committed to HEAD

From: Date: Fri, 08 Mar 2002 17:32:49 +0000
Subject: Re: New Build System Committed to HEAD
Groups: php.dev 
Request: Send a blank email to php-dev+get-80938@lists.php.net to get a copy of this message
Date: Fri, 08 Mar 2002 13:05:03 +0100 To: Sascha Schumann <sascha@schumann.cx> From: Marcus Börger <marcus.boerger@post.rwth-aachen.de> Subject: [PHP-DEV] New Build System Committed to HEAD Onother question i wonder about, can i compile only the cli version? I allways get CGI and i do not see any switche to configure for that. marcus
Had to patch configure: To build only the cli version you have to add --disable-cgi This results in PHP_SAPI being 'default' after executing m4 files. When default and not disable cli are present then PHP_SAPI will be set to cli. Additional only one line has to be executed for building cli. I changed the default to build it in ./sapi/cli in this case to ./ so it becomes ./php. What's left: I suppose we add a notice that one did not build any server/cgi module. regards marcus Index: acinclude.m4 =================================================================== RCS file: /repository/php4/acinclude.m4,v retrieving revision 1.159 diff -u -w -r1.159 acinclude.m4
--- acinclude.m4        7 Mar 2002 18:16:57 -0000       1.159
+++ acinclude.m4        8 Mar 2002 17:26:02 -0000
@@ -129,6 +129,14 @@ ]) dnl +dnl Disable building CGI +dnl +AC_DEFUN(PHP_DISABLE_CGI,[ + disable_cgi=1 +]) + + +dnl dnl Separator into the configure --help display. dnl AC_DEFUN(PHP_HELP_SEPARATOR,[ Index: configure.in =================================================================== RCS file: /repository/php4/configure.in,v retrieving revision 1.307 diff -u -w -r1.307 configure.in
--- configure.in        7 Mar 2002 19:56:53 -0000       1.307
+++ configure.in        8 Mar 2002 17:26:03 -0000
@@ -236,9 +236,16 @@ esyscmd(./scripts/config-stubs sapi) -if test "$PHP_SAPI" = "default"; then +if test "$PHP_SAPI" = "default"; && test "$disable_cgi" != "1"; then PHP_SELECT_SAPI(cgi, program, cgi_main.c getopt.c) fi +if test "$PHP_SAPI" = "default"; && test "$disable_cli" != "1"; then + PHP_SAPI=cli +fi +if test "$PHP_SAPI" = "cli"; then + PHP_DISABLE_CLI + PHP_SELECT_SAPI(cli, program, php_cli.c getopt.c) +fi AC_MSG_CHECKING([for chosen SAPI module]) AC_MSG_RESULT([$PHP_SAPI]) @@ -1100,7 +1107,11 @@ PHP_ADD_BUILD_DIR(main) PHP_ADD_BUILD_DIR(regex) -PHP_ADD_BUILD_DIR(sapi/$PHP_SAPI sapi/cli) +PHP_ADD_BUILD_DIR(sapi/$PHP_SAPI) +dnl Do not include cli if it is already invoked from PHP_SAPI +if test "$PHP_SAPI" != "cli"; then + PHP_ADD_BUILD_DIR(sapi/cli) +fi PHP_ADD_BUILD_DIR(TSRM) PHP_ADD_BUILD_DIR(Zend) Index: sapi/cgi/config.m4 =================================================================== RCS file: /repository/php4/sapi/cgi/config.m4,v retrieving revision 1.13 diff -u -w -r1.13 config.m4
--- sapi/cgi/config.m4  7 Mar 2002 14:19:51 -0000       1.13
+++ sapi/cgi/config.m4 8 Mar 2002 17:26:03 -0000 @@ -2,6 +2,22 @@ dnl $Id: config.m4,v 1.13 2002/03/07 14:19:51 sas Exp $ dnl +AC_MSG_CHECKING(for CGI build) + +AC_ARG_ENABLE(cgi,
+[  --disable-cgi           Disable building CGI version of PHP.],
+[ + if test "$enable_cgi" != "no"; then
+    PHP_SAPI_CGI=yes
+ else
+    PHP_SAPI_CGI=no
+ fi +], +[PHP_SAPI_CGI=yes] +) + +if test "$PHP_SAPI_CGI" != "no"; then + AC_DEFUN(PHP_TEST_WRITE_STDOUT,[ AC_CACHE_CHECK(whether writing to stdout works,ac_cv_write_stdout,[
     AC_TRY_RUN([
@@ -97,3 +113,9 @@ dnl## AC_SUBST(FHTTPD_INCLUDE) PHP_SUBST(FHTTPD_LIB) PHP_SUBST(FHTTPD_TARGET) + +else + PHP_DISABLE_CGI +fi + +AC_MSG_RESULT($PHP_SAPI_CGI)

« previous php.dev (#80938) next »