On Wed, Apr 02, 2003 at 02:16:56PM +0200, Wojtek Meler wrote:
> Is there a way to tell PHP to not include some sources in CLI build?
> PHP_NEW_EXTENSION( mymodule , mymodule.c , nocli) doesn't work as I expected - it 
> doesn't include extension in main/internal_functions_cli.c but it link mymodule.o 
> to sapi/cli/php.

attached patch helps :)

Would you be so kind and put it into CVS?

regards,
Wojtek
--- aclocal.m4  Thu Apr  3 07:09:13 2003
+++ aclocal.m4  Thu Apr  3 07:18:03 2003
@@ -1310,10 +1310,12 @@
   if test "$3" != "shared" && test "$3" != "yes" && test "$4" != "cli"; then
 dnl ---------------------------------------------- Static module
 
-    PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
     EXT_STATIC="$EXT_STATIC $1"
     if test "$3" != "nocli"; then
       EXT_CLI_STATIC="$EXT_CLI_STATIC $1"
+      PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,)
+    else
+      PHP_ADD_SOURCES(PHP_EXT_DIR($1),$2,$ac_extra,sapi)
     fi
   else
     if test "$3" = "shared" || test "$3" = "yes"; then

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to