jani            Wed Jul 30 23:57:15 2008 UTC

  Modified files:              (Branch: PHP_5_2)
    /php-src    Makefile.global configure.in 
    /php-src/scripts    phpize.m4 
  Log:
  MFH: sync build stuff
  
http://cvs.php.net/viewvc.cgi/php-src/Makefile.global?r1=1.57.2.5.2.14&r2=1.57.2.5.2.15&diff_format=u
Index: php-src/Makefile.global
diff -u php-src/Makefile.global:1.57.2.5.2.14 
php-src/Makefile.global:1.57.2.5.2.15
--- php-src/Makefile.global:1.57.2.5.2.14       Fri Aug  3 14:01:56 2007
+++ php-src/Makefile.global     Wed Jul 30 23:57:14 2008
@@ -11,7 +11,7 @@
        @echo "Don't forget to run 'make test'."
        @echo
        
-build-modules: $(PHP_MODULES)
+build-modules: $(PHP_MODULES) $(PHP_ZEND_EX)
 
 libphp$(PHP_MAJOR_VERSION).la: $(PHP_GLOBAL_OBJS) $(PHP_SAPI_OBJS)
        $(LIBTOOL) --mode=link $(CC) $(CFLAGS) $(EXTRA_CFLAGS) -rpath 
$(phptempdir) $(EXTRA_LDFLAGS) $(LDFLAGS) $(PHP_RPATHS) $(PHP_GLOBAL_OBJS) 
$(PHP_SAPI_OBJS) $(EXTRA_LIBS) $(ZEND_EXTRA_LIBS) -o $@
@@ -73,6 +73,11 @@
                for i in $(PHP_MODULES)""; do \
                        . $$i; $(top_srcdir)/build/shtool echo -n -- " -d 
extension=$$dlname"; \
                done; \
+       fi; \
+       if test "x$(PHP_ZEND_EX)" != "x"; then \
+               for i in $(PHP_ZEND_EX)""; do \
+                       . $$i; $(top_srcdir)/build/shtool echo -n -- " -d 
$(ZEND_EXT_TYPE)=$(top_builddir)/modules/$$dlname"; \
+               done; \
        fi`
 
 test: all
@@ -80,50 +85,18 @@
                TEST_PHP_EXECUTABLE=$(PHP_EXECUTABLE) \
                TEST_PHP_SRCDIR=$(top_srcdir) \
                CC="$(CC)" \
-                       $(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) 
$(top_srcdir)/run-tests.php -U -d extension_dir=modules/ 
$(PHP_TEST_SHARED_EXTENSIONS) tests/; \
+                       $(PHP_EXECUTABLE) $(PHP_TEST_SETTINGS) 
$(top_srcdir)/run-tests.php -d extension_dir=modules/ 
$(PHP_TEST_SHARED_EXTENSIONS) tests/; \
        elif test ! -z "$(SAPI_CLI_PATH)" && test -x "$(SAPI_CLI_PATH)"; then \
                INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo 
php_ini_loaded_file();'`; \
                if test "$$INI_FILE"; then \
-                       $(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > 
$(top_builddir)/tmp-php.ini; \
-               else \
-                       echo > $(top_builddir)/tmp-php.ini; \
-               fi; \
-               TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
-               TEST_PHP_SRCDIR=$(top_srcdir) \
-               CC="$(CC)" \
-                       $(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) 
$(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -U -d 
extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
-       else \
-               echo "ERROR: Cannot run tests without CLI sapi."; \
-       fi
-
-utest: all
-       [EMAIL PROTECTED] test ! -z "$(SAPI_CLI_PATH)" && test -x 
"$(SAPI_CLI_PATH)"; then \
-               INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo 
php_ini_loaded_file();'`; \
-               if test "$$INI_FILE"; then \
-                       $(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > 
$(top_builddir)/tmp-php.ini; \
-               else \
-                       echo > $(top_builddir)/tmp-php.ini; \
-               fi; \
-               TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
-               TEST_PHP_SRCDIR=$(top_srcdir) \
-               CC="$(CC)" \
-                       $(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) 
$(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -u -d 
extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
-       else \
-               echo "ERROR: Cannot run tests without CLI sapi."; \
-       fi
-
-ntest: all
-       [EMAIL PROTECTED] test ! -z "$(SAPI_CLI_PATH)" && test -x 
"$(SAPI_CLI_PATH)"; then \
-               INI_FILE=`$(top_builddir)/$(SAPI_CLI_PATH) -r 'echo 
php_ini_loaded_file();'`; \
-               if test "$$INI_FILE"; then \
-                       $(EGREP) -v '^extension[\t\ ]*=' "$$INI_FILE" > 
$(top_builddir)/tmp-php.ini; \
+                       $(EGREP) -v '^(zend_)?extension(_debug)?(_ts)?[\t\ ]*=' 
"$$INI_FILE" > $(top_builddir)/tmp-php.ini; \
                else \
                        echo > $(top_builddir)/tmp-php.ini; \
                fi; \
                TEST_PHP_EXECUTABLE=$(top_builddir)/$(SAPI_CLI_PATH) \
                TEST_PHP_SRCDIR=$(top_srcdir) \
                CC="$(CC)" \
-                       $(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) 
$(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -N -d 
extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
+                       $(top_builddir)/$(SAPI_CLI_PATH) $(PHP_TEST_SETTINGS) 
$(top_srcdir)/run-tests.php -c $(top_builddir)/tmp-php.ini -d 
extension_dir=$(top_builddir)/modules/ $(PHP_TEST_SHARED_EXTENSIONS) $(TESTS); \
        else \
                echo "ERROR: Cannot run tests without CLI sapi."; \
        fi
http://cvs.php.net/viewvc.cgi/php-src/configure.in?r1=1.579.2.52.2.104&r2=1.579.2.52.2.105&diff_format=u
Index: php-src/configure.in
diff -u php-src/configure.in:1.579.2.52.2.104 
php-src/configure.in:1.579.2.52.2.105
--- php-src/configure.in:1.579.2.52.2.104       Tue Jul 29 08:33:52 2008
+++ php-src/configure.in        Wed Jul 30 23:57:14 2008
@@ -1,4 +1,4 @@
-## $Id: configure.in,v 1.579.2.52.2.104 2008/07/29 08:33:52 tony2001 Exp $ -*- 
autoconf -*-
+## $Id: configure.in,v 1.579.2.52.2.105 2008/07/30 23:57:14 jani Exp $ -*- 
autoconf -*-
 dnl ## Process this file with autoconf to produce a configure script.
 
 divert(1)
@@ -931,7 +931,7 @@
 case $php_build_target in
   program|static)
     standard_libtool_flag='-prefer-non-pic -static'
-    if test -z "$PHP_MODULES"; then
+    if test -z "$PHP_MODULES" && test -z "$PHP_ZEND_EX"; then
         enable_shared=no
     fi
     ;;
@@ -1201,6 +1201,7 @@
 PHP_SUBST(PHP_GLOBAL_OBJS)
 
 PHP_SUBST(PHP_MODULES)
+PHP_SUBST(PHP_ZEND_EX)
 
 PHP_SUBST(EXT_LIBS)
 
@@ -1282,6 +1283,17 @@
   CPPFLAGS="$CPPFLAGS -DTHREAD=1"
 fi
 
+if test "$PHP_DEBUG" = "yes" && test "$PHP_THREAD_SAFETY" = "yes; then
+  ZEND_EXT_TYPE="zend_extension_debug_ts"
+elif test "$PHP_DEBUG" = "yes"; then
+  ZEND_EXT_TYPE="zend_extension_debug"
+elif test "$PHP_THREAD_SAFETY" = "yes; then
+  ZEND_EXT_TYPE="zend_extension_ts"
+else
+  ZEND_EXT_TYPE="zend_extension"
+fi
+PHP_SUBST(ZEND_EXT_TYPE)
+
 dnl
 dnl Libtool creation
 dnl
@@ -1331,7 +1343,7 @@
 INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
 CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
 
-all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) 
\$(PHP_CLI_TARGET)"
+all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_ZEND_EX) 
\$(PHP_CLI_TARGET)"
 install_targets="$install_modules install-build install-headers 
install-programs $install_pear"
 
 case $PHP_SAPI in
http://cvs.php.net/viewvc.cgi/php-src/scripts/phpize.m4?r1=1.17.2.3.2.7&r2=1.17.2.3.2.8&diff_format=u
Index: php-src/scripts/phpize.m4
diff -u php-src/scripts/phpize.m4:1.17.2.3.2.7 
php-src/scripts/phpize.m4:1.17.2.3.2.8
--- php-src/scripts/phpize.m4:1.17.2.3.2.7      Sun Jul 27 20:42:56 2008
+++ php-src/scripts/phpize.m4   Wed Jul 30 23:57:14 2008
@@ -21,6 +21,7 @@
 abs_builddir=`pwd`
 
 AC_PROG_CC
+PHP_DETECT_ICC
 AC_PROG_CC_C_O
 
 dnl Support systems with system libraries in e.g. /usr/lib64
@@ -58,13 +59,47 @@
 AC_MSG_CHECKING([for PHP installed headers prefix])
 AC_MSG_RESULT([$phpincludedir])
 
+dnl Check for PHP_DEBUG / ZEND_DEBUG
+AC_MSG_CHECKING([if debug is enabled])
+old_CPPFLAGS=$CPPFLAGS
+CPPFLAGS="-I$phpincludedir"
+AC_EGREP_CPP(php_debug_is_enabled,[
+#include <main/php_config.h>
+#if ZEND_DEBUG
+php_debug_is_enabled
+#endif
+],[
+  PHP_DEBUG=yes
+],[
+  PHP_DEBUG=no
+])
+CPPFLAGS=$old_CPPFLAGS
+AC_MSG_RESULT([$PHP_DEBUG])
+
+if test "$PHP_DEBUG" = "yes"; then
+  PHP_DEBUG=1
+  ZEND_DEBUG=yes
+  changequote({,})
+  CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9s]*//g'`
+  CXXFLAGS=`echo "$CXXFLAGS" | $SED -e 's/-O[0-9s]*//g'`
+  changequote([,])
+  dnl add -O0 only if GCC or ICC is used
+  if test "$GCC" = "yes" || test "$ICC" = "yes"; then
+    CFLAGS="$CFLAGS -O0"
+    CXXFLAGS="$CXXFLAGS -O0"
+  fi
+else
+  PHP_DEBUG=0
+  ZEND_DEBUG=no
+fi
+
 dnl Always shared
 PHP_BUILD_SHARED
 
 dnl Required programs
 PHP_PROG_RE2C
 PHP_PROG_AWK
-    
+
 sinclude(config.m4)
 
 enable_static=no



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to