]> granicus.if.org Git - php/commitdiff
Determine first whether we will use ZTS mode or not.
authorSascha Schumann <sas@php.net>
Thu, 4 May 2000 09:42:27 +0000 (09:42 +0000)
committerSascha Schumann <sas@php.net>
Thu, 4 May 2000 09:42:27 +0000 (09:42 +0000)
This is important, because the system checks will yield different
results depending on whether POSIX threads are enabled or not.

We also use PTHREADS_CFLAGS only in ZTS mode now. Using these flags
in non-ZTS mode causes complete build failures on some platforms
(i.e. FreeBSD 2.2.x). This will cause harmless warnings on some
platforms (i.e. Solaris 2).

acinclude.m4
configure.in
ext/db/config.m4
ext/informix/config.m4
ext/standard/config.m4

index 9d91db82067262e5e700d51ee8c92722c67f75a9..31551a36eafa2edeaa5e3fa562cb6f2cb3988790 100644 (file)
@@ -260,6 +260,9 @@ dnl PHP_BUILD_THREAD_SAFE
 dnl
 AC_DEFUN(PHP_BUILD_THREAD_SAFE,[
   enable_experimental_zts=yes
+  if test "$pthreads_working" != "yes"; then
+    AC_MSG_ERROR(ZTS currently requires working POSIX threads. Your system does not support this.)
+  fi
 ])
 
 dnl
index b5a328a6eb8e1267f7752867b209dfe40b5f563d..666c2ab18dc35a9ae562a3dc93881c68533a885a 100644 (file)
@@ -48,10 +48,6 @@ dnl ## All of these are normally in the extension directories.
 
 dnl ## Diversion 5 is the last one.  Here we generate files and clean up.
 
-divert(2)
-
-PHP_CONFIGURE_PART(Running system checks)
-       
 dnl ## This is where the version number is changed from now on!
 AM_INIT_AUTOMAKE(php, 4.0RC2-dev)
 
@@ -74,12 +70,6 @@ AC_CANONICAL_HOST
 dnl We want this one before the checks, so the checks can modify CFLAGS.
 test -z "$CFLAGS" && auto_cflags=1
 
-dnl ## If we're using cc on HP-UX, add -Ae -D_HPUX_SOURCE [obsolete]
-dnl ## if test -n "$auto_cflags" && test "`uname -s 2>/dev/null`" = "HP-UX"
-dnl ## then
-dnl ##  test -n "$GCC" || CFLAGS="-Ae $CFLAGS -D_HPUX_SOURCE"
-dnl ## fi
-
 dnl Checks for programs.
 AC_PROG_YACC
 if test "$YACC" != "bison -y"; then
@@ -95,11 +85,8 @@ else
     AC_MSG_RESULT($1.$2 (ok))
 fi
 
-dnl ## there has to be a better way...
-dnl ## OLDLIBS=$LIBS; LIBS=""
 AC_PROG_CC
 AC_AIX
-dnl ## LIBS=$OLDLIBS
 
 AM_PROG_CC_STDC
 
@@ -121,6 +108,35 @@ sinclude(Zend/acinclude.m4)
 sinclude(Zend/Zend.m4)
 sinclude(TSRM/tsrm.m4)
 
+divert(2)
+
+PTHREADS_CHECK
+
+PHP_SAPI=cgi
+PHP_BUILD_PROGRAM
+dnl paths to the targets relative to the build directory
+SAPI_PROGRAM=php
+dnl on HP-UX, the extension is .sl. Need to improve this
+SAPI_SHARED=libs/libphp4.so
+SAPI_STATIC=libs/libphp4.a
+
+PHP_CONFIGURE_PART(Configuring SAPI modules)
+
+esyscmd(./scripts/config-stubs sapi)
+
+AC_MSG_CHECKING(for chosen SAPI module)
+AC_MSG_RESULT($PHP_SAPI)
+
+if test "$enable_experimental_zts" = "yes"; then
+  PTHREADS_ASSIGN_VARS
+  PTHREADS_FLAGS
+fi
+
+divert(3)
+
+PHP_CONFIGURE_PART(Running system checks)
+
+
 dnl check for -R, etc. switch
 AC_MSG_CHECKING(whether compiler supports -R)
 AC_CACHE_VAL(php_cv_cc_dashr,[
@@ -365,7 +381,7 @@ if test $ac_cv_type_in_addr_t = no; then
   AC_DEFINE(in_addr_t, u_int)
 fi
 
-divert(3)
+divert(4)
 
 
        
@@ -539,23 +555,8 @@ if test "$PHP_PEAR" = "yes"; then
   PEAR_DIR=pear
 fi
 
-
-PHP_SAPI=cgi
-PHP_BUILD_PROGRAM
-dnl paths to the targets relative to the build directory
-SAPI_PROGRAM=php
-dnl on HP-UX, the extension is .sl. Need to improve this
-SAPI_SHARED=libs/libphp4.so
-SAPI_STATIC=libs/libphp4.a
-
-PHP_CONFIGURE_PART(Configuring SAPI modules)
-
-esyscmd(./scripts/config-stubs sapi)
-
-AC_MSG_CHECKING(for chosen SAPI module)
-AC_MSG_RESULT($PHP_SAPI)
        
-divert(4)
+divert(5)
 
 PHP_CONFIGURE_PART(Configuring extensions)
        
@@ -581,7 +582,7 @@ if test "$PHP_VERSIONING" = "yes"; then
   fi
 fi
 
-divert(5)
+divert(6)
 
 enable_shared=yes
 enable_static=yes
@@ -605,8 +606,6 @@ fi
 
 PHP_REGEX
 
-PTHREADS_FLAGS
-
 PHP_CONFIGURE_PART(Configuring Zend)
 LIBZEND_BASIC_CHECKS
 LIBZEND_OTHER_CHECKS
index 9cc9b38c6d4d05d839278a5571de9b0218d8b178..a602cb4674615293d9f77ea0d7444da34c6d8d74 100644 (file)
@@ -2,7 +2,7 @@ dnl $Id$
 dnl config.m4 for extension db
 dnl don't forget to call PHP_EXTENSION(db)
 
-divert(2)dnl
+divert(3)dnl
 
 AC_CHECK_HEADERS(db1/ndbm.h)
 
@@ -27,7 +27,7 @@ AC_DEFUN(AC_PREFERRED_DB_LIB,[
 
 AC_PREFERRED_DB_LIB
 
-divert(4)dnl
+divert(5)dnl
 
 if test "$DBM_LIB" = "-lgdbm"; then
   AC_CHECK_HEADER(gdbm.h, [ GDBM_INCLUDE="" ], [ 
index c00e9d4d45244c71d58c4091e046a8f7c8b9d35d..0aee98933e57a2598b9231e4ce131e29d61bfdc2 100644 (file)
@@ -100,7 +100,7 @@ WARNING: You specified Informix base install directory that is different
 PHP_SUBST(INFORMIXDIR)
 PHP_SUBST(IFX_LIBS)
        
-divert(6)dnl
+divert(7)dnl
 
 dnl Warn if Informix support was requested but environment is not set up correctly.
 if test "$INFORMIX_WARNING" != ""; then
index 5a1ccf913bffa92d2771c13421fce98788508c4c..22382f9c5a4dbd211c4e04b1ed11d0512eefe998 100644 (file)
@@ -1,6 +1,6 @@
 dnl $Id$ -*- sh -*-
 
-divert(2)dnl
+divert(3)dnl
 
 dnl
 dnl Check for crypt() capabilities
@@ -133,7 +133,7 @@ AC_CHECK_LIB(crypt, crypt, [
 AC_CHECK_FUNCS(getcwd)
 AC_CHECK_FUNCS(getwd)
 
-divert(4)dnl
+divert(5)dnl
 
 AC_ARG_WITH(regex,
 [  --with-regex=TYPE       regex library type: system, apache, php],