Add --enable-experimental-zts

This commit is contained in:
Sascha Schumann 1999-11-27 11:33:13 +00:00
parent 8812857f35
commit e4812c0fa3
2 changed files with 32 additions and 17 deletions

View File

@ -16,8 +16,7 @@ dnl
dnl PHP_BUILD_THREAD_SAFE dnl PHP_BUILD_THREAD_SAFE
dnl dnl
AC_DEFUN(PHP_BUILD_THREAD_SAFE,[ AC_DEFUN(PHP_BUILD_THREAD_SAFE,[
enable_thread_safety=yes PHP_THREAD_SAFETY=yes
passthru="$passthru --enable-thread-safety"
]) ])
dnl dnl

View File

@ -571,7 +571,15 @@ AC_ARG_ENABLE(dmalloc,
]) ])
AC_MSG_RESULT($DMALLOC_RESULT) 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_SAPI=cgi
PHP_BUILD_PROGRAM PHP_BUILD_PROGRAM
dnl paths to the targets relative to the build directory 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) PHP_OUTPUT(sapi/$PHP_SAPI/Makefile)
RESULT=no
AC_MSG_CHECKING(whether to enable versioning) AC_MSG_CHECKING(whether to enable versioning)
AC_ARG_ENABLE(versioning, AC_ARG_ENABLE(versioning,
[ --enable-versioning Export only required symbols. [ --enable-versioning Export only required symbols.
See INSTALL for more information], See INSTALL for more information],[
[ PHP_VERSIONING=$enableval
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 PHP_VERSIONING=no
EXTRA_LDFLAGS="-export-symbols $PHP_SYM_FILE"
RESULT="yes"
fi
]) ])
AC_MSG_RESULT($RESULT) 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 -f "$PHP_SYM_FILE"; then
EXTRA_LDFLAGS="-export-symbols $PHP_SYM_FILE"
fi
fi
divert(4) divert(4)
@ -639,22 +651,26 @@ PHP_REGEX
dnl If we are using gcc and the user has not specified CFLAGS, add -O2. 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" 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" CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS"
export CPPFLAGS 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_LIB='TSRM/libtsrm.la'
TSRM_DIR=TSRM TSRM_DIR=TSRM
AC_DEFINE(ZTS) AC_DEFINE(ZTS)
CPPFLAGS="$CPPFLAGS -D_REENTRANT" CPPFLAGS="$CPPFLAGS -D_REENTRANT"
INCLUDES="$INCLUDES -I\$(top_builddir)/TSRM -I\$(top_srcdir)/TSRM" INCLUDES="$INCLUDES -I\$(top_builddir)/TSRM -I\$(top_srcdir)/TSRM"
else PHP_THREAD_SAFETY=yes
enable_thread_safety=no else
PHP_THREAD_SAFETY=no
fi 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_DIR)
AC_SUBST(TSRM_LIB) AC_SUBST(TSRM_LIB)