@ -112,17 +112,9 @@ if test "$ac_cv_c_const" = "yes" ; then
fi
AC_SUBST(LEX_CFLAGS)
dnl Hack to work around a Mac OS X cpp problem
dnl Known versions needing this workaround are 5.3 and 5.4
if test "$ac_cv_prog_gcc" = "yes" -a "`uname -s`" = "Rhapsody"; then
CPPFLAGS="$CPPFLAGS -traditional-cpp"
fi
dnl Ugly hack to get around a problem with gcc on AIX.
if test "$CC" = "gcc" -a "$ac_cv_prog_cc_g" = "yes" -a \
"`uname -sv`" = "AIX 4"; then
CFLAGS=`echo $CFLAGS | sed -e 's/-g//'`
fi
sinclude(libzend/acinclude.m4)
sinclude(libzend/libzend.m4)
sinclude(TSRM/tsrm.m4)
dnl check for -R, etc. switch
AC_MSG_CHECKING(if compiler supports -R)
@ -443,33 +435,29 @@ AC_ARG_WITH(config-file-path,
])
AC_MSG_CHECKING(whether to include debugging symbols)
AC_ARG_ENABLE(debug,
[ --disable-debug Compile without debugging symbols],
[
if test "$enableval" = "yes"; then
AC_MSG_RESULT(yes)
AC_DEFINE(DEBUG,1)
PHP_DEBUG=1
DEBUG_CFLAGS="-g"
test -n "$GCC" && DEBUG_CFLAGS="$DEBUG_CFLAGS -Wall"
test -n "$GCC" && test "$USE_MAINTAINER_MODE" = "yes" && \
DEBUG_CFLAGS="$DEBUG_CFLAGS -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations"
else
AC_MSG_RESULT(no)
AC_DEFINE(DEBUG,0)
PHP_DEBUG=0
DEBUG_CFLAGS=""
fi
[ --disable-debug Compile without debugging symbols], [
PHP_DEBUG=$enableval
],[
AC_MSG_RESULT(yes)
PHP_DEBUG=yes
])
AC_MSG_CHECKING(whether to include debugging symbols)
AC_MSG_RESULT($PHP_DEBUG)
if test "$PHP_DEBUG"; then
AC_DEFINE(DEBUG,1)
PHP_DEBUG=1
DEBUG_CFLAGS="-g"
])
ZEND_DEBUG=yes
else
AC_DEFINE(DEBUG,0)
PHP_DEBUG=0
ZEND_DEBUG=no
fi
AC_SUBST(DEBUG_CFLAGS)
AC_SUBST(PHP_DEBUG)
CFLAGS="$CFLAGS $DEBUG_CFLAGS"
test -n "$DEBUG_CFLAGS" && CFLAGS="$CFLAGS $DEBUG_CFLAGS"
AC_MSG_CHECKING(whether to enable safe mode by default)
@ -609,15 +597,6 @@ AC_ARG_ENABLE(dmalloc,
])
AC_MSG_RESULT($DMALLOC_RESULT)
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)
AC_MSG_CHECKING(whether to try to stay below resource limits)
AC_ARG_ENABLE(low-memory,
[ --enable-low-memory Try to stay below resource limits],[
@ -703,22 +682,21 @@ test -n "$auto_cflags" && test -n "$GCC" && CFLAGS="$CFLAGS -O2"
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT"
export CPPFLAGS
LIBZEND_BASIC_CHECKS
LIBZEND_OTHER_CHECKS
if test "$PHP_THREAD_SAFETY" = "yes" || test "$PHP_EXPERIMENTAL_ZTS" = "yes"; then
passthru="$passthru --enable-thread-safety"
if test "$PHP_THREAD_SAFETY" = "yes" || test "$ZEND_EXPERIMENTAL_ZTS" = "yes"; then
TSRM_LIB='TSRM/libtsrm.la'
TSRM_DIR=TSRM
AC_DEFINE(ZTS)
INCLUDES="$INCLUDES -I\$(top_builddir)/TSRM -I\$(top_srcdir)/TSRM"
PHP_THREAD_SAFETY=yes
PHP_OUTPUT(TSRM/Makefile)
else
PHP_THREAD_SAFETY=no
fi
AC_MSG_CHECKING(whether to build PHP thread-safe)
AC_MSG_RESULT($PHP_THREAD_SAFETY)
AC_SUBST(TSRM_DIR)
AC_SUBST(TSRM_LIB)
@ -763,8 +741,13 @@ AC_SUBST(PHP_LIBS)
AC_SUBST(PHP_SAPI)
AC_SUBST(INSTALL_IT)
if test "$PHP_THREAD_SAFETY" = "yes"; then
TSRM_BASIC_CHECKS
TSRM_PTHREAD
fi
#libphp4.module
AC_OUTPUT([Makefile php4.spec ext/Makefile sapi/Makefile pear/Makefile
AC_OUTPUT([Makefile php4.spec libzend/Makefile ext/Makefile sapi/Makefile pear/Makefile
$PHP_OUTPUT_FILES
scripts/mkextlib build-defs.h], [], [
@ -775,13 +758,8 @@ if test ! -f $srcdir/ext/bcmath/number.c; then
echo "/* Dummy File */" > $srcdir/ext/bcmath/number.h
fi
if test "$no_recursion" != "yes"; then
(set -x; test -d libzend || mkdir libzend; cd libzend; $cwd/$srcdir/libzend/configure --cache-file=../$cache_file $passthru) || exit 1
if test "$PHP_THREAD_SAFETY" = "yes"; then
(set -x; test -d TSRM || mkdir TSRM; cd TSRM && $cwd/$srcdir/TSRM/configure --cache-file=../$cache_file $passthru) || exit 1
fi
dnl (set -x; cd $srcdir; sh ltconfig --disable-static --enable-dlopen --cache-file=$cache_file ltmain.sh)
fi
test -d TSRM && echo '#include "../php_config.h"' > TSRM/tsrm_config.h
echo '#include "../php_config.h"' > libzend/zend_config.h
# run this only when generating all the files?
if true; then