cvs: /php4 build.mk configure.in
| From: | Sascha Schumann | Date: | Fri, 17 Dec 1999 14:29:06 +0000 |
| Subject: | cvs: /php4 build.mk configure.in | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-8037@lists.php.net to get a copy of this message | ||
sas Fri Dec 17 09:29:06 1999 EDT
Modified files:
/php4 build.mk configure.in
Log:
Build structure change. Instead of using an external configure for libzend
and TSRM, the core code of these configures was separated into extra m4
files which we can now include into PHP's configure. Advantages:
- better integrated
- faster
- distribution becomes smaller (only one set of libtool files)
Index: php4/build.mk
diff -u php4/build.mk:1.15 php4/build.mk:1.16
--- php4/build.mk:1.15 Sun Nov 28 18:01:57 1999
+++ php4/build.mk Fri Dec 17 09:28:35 1999
@@ -9,7 +9,7 @@
#
# Written by Sascha Schumann
#
-# $Id: build.mk,v 1.15 1999/11/28 23:01:57 ssb Exp $
+# $Id: build.mk,v 1.16 1999/12/17 14:28:35 sas Exp $
LT_TARGETS = ltconfig ltmain.sh config.guess config.sub
@@ -17,16 +17,16 @@
STAMP = buildmk.stamp
-makefile_am_files = Makefile.am $(shell find ext sapi regex pear -name Makefile.am)
+makefile_am_files = Makefile.am libzend/Makefile.am TSRM/Makefile.am $(shell find ext sapi regex
pear -name Makefile.am)
makefile_in_files = $(makefile_am_files:.am=.in)
makefile_files = $(makefile_am_files:e.am=e)
config_h_in = php_config.h.in
config_h_files = \
- $(shell echo ext/*/config.h.stub sapi/*/config.h.stub)
+ $(shell echo ext/*/config.h.stub sapi/*/config.h.stub libzend/acconfig.h TSRM/acconfig.h)
-config_m4_files = \
+config_m4_files = libzend/libzend.m4 TSRM/tsrm.m4 libzend/acinclude.m4 \
$(shell echo ext/*/config.m4 sapi/*/config.m4)
acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
@@ -36,13 +36,18 @@
all: $(targets)
@for i in $(SUBDIRS); do \
test -d $$i || (test -d ../$$i && ln -s ../$$i $$i); \
- (cd $$i>/dev/null && $(MAKE) -f build.mk AMFLAGS=$(AMFLAGS)); \
done
all: $(STAMP)
$(STAMP): buildcheck.sh
@./buildcheck.sh && touch $(STAMP)
+
+libzend/Makefile.am:
+ test -d libzend || (test -d ../libzend && ln -s ../libzend libzend)
+
+TSRM/Makefile.am:
+ test -d TSRM || (test -d ../TSRM && ln -s ../TSRM TSRM)
dist:
@rm -f $(SUBDIRS) 2>/dev/null || true
Index: php4/configure.in
diff -u php4/configure.in:1.66 php4/configure.in:1.67
--- php4/configure.in:1.66 Sat Dec 11 12:48:40 1999
+++ php4/configure.in Fri Dec 17 09:28:35 1999
@@ -1,4 +1,4 @@
-dnl ## $Id: configure.in,v 1.66 1999/12/11 17:48:40 sas Exp $ -*- sh -*-
+dnl ## $Id: configure.in,v 1.67 1999/12/17 14:28:35 sas Exp $ -*- sh -*-
dnl ## Process this file with autoconf to produce a configure script.
divert(0)
@@ -112,17 +112,9 @@
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_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_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],[
@@ -702,23 +681,22 @@
test -n "$auto_cflags" && test -n "$GCC" &&
CFLAGS="$CFLAGS -O2"
CPPFLAGS="$CPPFLAGS -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT"
+
+LIBZEND_BASIC_CHECKS
+LIBZEND_OTHER_CHECKS
-export CPPFLAGS
-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_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 @@
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