summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
authorSascha Schumann <sas@php.net>1999-11-27 11:33:13 +0000
committerSascha Schumann <sas@php.net>1999-11-27 11:33:13 +0000
commite4812c0fa368b958357c0430e01780090aebc44f (patch)
treed94e3bd1ccaf5a6bedb157fcc2c47d1f2705d302 /configure.in
parent8812857f3565e8ca038c1e6ccb65440959279bb6 (diff)
downloadphp-git-e4812c0fa368b958357c0430e01780090aebc44f.tar.gz
Add --enable-experimental-zts
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in42
1 files changed, 29 insertions, 13 deletions
diff --git a/configure.in b/configure.in
index 4a8067210f..154c8454c7 100644
--- a/configure.in
+++ b/configure.in
@@ -571,7 +571,15 @@ AC_ARG_ENABLE(dmalloc,
])
AC_MSG_RESULT($DMALLOC_RESULT)
-dnl ## This is the default server API.
+AC_MSG_CHECKING(whether to enable experimental ZTS mode)
+AC_ARG_ENABLE(experimental-zts,
+[ --enable-experimental-zts This will most likely break your build.],[
+ PHP_EXPERIMENTAL_ZTS=$enableval
+],[
+ PHP_EXPERIMENTAL_ZTS=no
+])
+AC_MSG_RESULT($PHP_EXPERIMENTAL_ZTS)
+
PHP_SAPI=cgi
PHP_BUILD_PROGRAM
dnl paths to the targets relative to the build directory
@@ -591,19 +599,23 @@ esyscmd(./scripts/config-stubs ext)
PHP_OUTPUT(sapi/$PHP_SAPI/Makefile)
-RESULT=no
AC_MSG_CHECKING(whether to enable versioning)
AC_ARG_ENABLE(versioning,
[ --enable-versioning Export only required symbols.
- See INSTALL for more information],
-[
+ See INSTALL for more information],[
+ PHP_VERSIONING=$enableval
+],[
+ PHP_VERSIONING=no
+])
+AC_MSG_RESULT($PHP_VERSIONING)
+
+if test "$PHP_VERSIONING" = "yes"; then
test -z "$PHP_SYM_FILE" && PHP_SYM_FILE="$abs_srcdir/sapi/$PHP_SAPI/php.sym"
- if test "$enableval" = "yes" && test -f "$PHP_SYM_FILE"; then
+ if test -f "$PHP_SYM_FILE"; then
EXTRA_LDFLAGS="-export-symbols $PHP_SYM_FILE"
- RESULT="yes"
fi
-])
-AC_MSG_RESULT($RESULT)
+fi
+
divert(4)
@@ -639,22 +651,26 @@ PHP_REGEX
dnl If we are using gcc and the user has not specified CFLAGS, add -O2.
test -n "$auto_cflags" && test -n "$GCC" && CFLAGS="$CFLAGS -O2"
-AC_MSG_CHECKING(whether to build PHP thread-safe)
+
+
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
export CPPFLAGS
-if test "$enable_thread_safety" = "yes"; then
+if test "$PHP_THREAD_SAFETY" = "yes" || test "$PHP_EXPERIMENTAL_ZTS" = "yes"; then
+ passthru="$passthru --enable-thread-safety"
TSRM_LIB='TSRM/libtsrm.la'
TSRM_DIR=TSRM
AC_DEFINE(ZTS)
CPPFLAGS="$CPPFLAGS -D_REENTRANT"
INCLUDES="$INCLUDES -I\$(top_builddir)/TSRM -I\$(top_srcdir)/TSRM"
-else
- enable_thread_safety=no
+ PHP_THREAD_SAFETY=yes
+else
+ PHP_THREAD_SAFETY=no
fi
-AC_MSG_RESULT($enable_thread_safety)
+AC_MSG_CHECKING(whether to build PHP thread-safe)
+AC_MSG_RESULT($PHP_THREAD_SAFETY)
AC_SUBST(TSRM_DIR)
AC_SUBST(TSRM_LIB)