summaryrefslogtreecommitdiff
path: root/configure.in
diff options
context:
space:
mode:
Diffstat (limited to 'configure.in')
-rw-r--r--configure.in81
1 files changed, 74 insertions, 7 deletions
diff --git a/configure.in b/configure.in
index c3cf45c6d..7b7f2c517 100644
--- a/configure.in
+++ b/configure.in
@@ -1,4 +1,4 @@
- ## $Id: configure.in,v 1.579.2.23 2005/11/27 14:19:38 iliaa Exp $ -*- autoconf -*-
+ ## $Id: configure.in,v 1.579.2.35 2006/01/11 14:19:13 iliaa Exp $ -*- autoconf -*-
dnl ## Process this file with autoconf to produce a configure script.
divert(1)
@@ -41,7 +41,7 @@ AC_CONFIG_HEADER(main/php_config.h)
MAJOR_VERSION=5
MINOR_VERSION=1
-RELEASE_VERSION=1
+RELEASE_VERSION=2
EXTRA_VERSION=""
VERSION="$MAJOR_VERSION.$MINOR_VERSION.$RELEASE_VERSION$EXTRA_VERSION"
@@ -378,7 +378,8 @@ unix.h \
utime.h \
sys/utsname.h \
sys/ipc.h \
-dlfcn.h
+dlfcn.h \
+assert.h
],[],[],[
#ifdef HAVE_SYS_PARAM_H
#include <sys/param.h>
@@ -597,6 +598,71 @@ PHP_CONFIGURE_PART(General settings)
PHP_HELP_SEPARATOR([General settings:])
+PHP_ARG_ENABLE(gcov, whether to include gcov symbols,
+[ --enable-gcov Enable GCOV code coverage (requires LTP) - FOR DEVELOPERS ONLY!!], no, no)
+
+if test "$PHP_GCOV" = "yes"; then
+
+ if test "$GCC" != "yes"; then
+ AC_MSG_ERROR([GCC is required for --enable-gcov])
+ fi
+
+ dnl Check if ccache is being used
+ case `$php_shtool path $CC` in
+ *ccache*[)] gcc_ccache=yes;;
+ *[)] gcc_ccache=no;;
+ esac
+
+ if test "$gcc_ccache" = "yes" && (test -z "$CCACHE_DISABLE" || test "$CCACHE_DISABLE" != "1"); then
+ AC_MSG_ERROR([ccache must be disabled when --enable-gcov option is used. You can disable ccache by setting environment variable CCACHE_DISABLE=1.])
+ fi
+
+ ltp_version_list="1.5"
+
+ AC_CHECK_PROG(LTP, lcov, lcov)
+ AC_CHECK_PROG(LTP_GENHTML, genhtml, genhtml)
+ PHP_SUBST(LTP)
+ PHP_SUBST(LTP_GENHTML)
+
+ if test "$LTP"; then
+ AC_CACHE_CHECK([for ltp version], php_cv_ltp_version, [
+ php_cv_ltp_version=invalid
+ ltp_version=`$LTP -v 2>/dev/null | $SED -e 's/^.* //'`
+ for ltp_check_version in $ltp_version_list; do
+ if test "$ltp_version" = "$ltp_check_version"; then
+ php_cv_ltp_version="$ltp_check_version (ok)"
+ fi
+ done
+ ])
+ else
+ ltp_msg="To enable code coverage reporting you must have one of the following LTP versions installed: $ltp_version_list"
+ AC_MSG_ERROR([$ltp_msg])
+ fi
+
+ case $php_cv_ltp_version in
+ ""|invalid[)]
+ ltp_msg="You must have one of the following versions of LTP: $ltp_version_list (found: $ltp_version)."
+ AC_MSG_ERROR([$ltp_msg])
+ LTP="exit 0;"
+ ;;
+ esac
+
+ if test -z "$LTP_GENHTML"; then
+ AC_MSG_ERROR([Could not find genhtml from the LTP package])
+ fi
+
+ AC_DEFINE(HAVE_GCOV, 1, [Whether you have gcov])
+ PHP_ADD_MAKEFILE_FRAGMENT($abs_srcdir/Makefile.gcov, $abs_srcdir)
+
+ dnl Remove all optimization flags from CFLAGS
+ changequote({,})
+ CFLAGS=`echo "$CFLAGS" | $SED -e 's/-O[0-9]*//g'`
+ changequote([,])
+
+ dnl Add the special gcc flags
+ CFLAGS="$CFLAGS -O0 -fprofile-arcs -ftest-coverage"
+fi
+
PHP_ARG_ENABLE(debug, whether to include debugging symbols,
[ --enable-debug Compile with debugging symbols], no, no)
@@ -637,8 +703,9 @@ if test "$PHP_CONFIG_FILE_PATH" = "DEFAULT"; then
esac
fi
-PHP_ARG_WITH(config-file-scan-dir,[directory to be scanned for configuration files],
-[ --with-config-file-scan-dir=PATH ], DEFAULT, no)
+PHP_ARG_WITH(config-file-scan-dir,[where to scan for configuration files],
+[ --with-config-file-scan-dir=PATH
+ Set the path where to scan for configuration files], DEFAULT, no)
if test "$PHP_CONFIG_FILE_SCAN_DIR" = "DEFAULT"; then
PHP_CONFIG_FILE_SCAN_DIR=
fi
@@ -1180,7 +1247,7 @@ CFLAGS="\$(CFLAGS_CLEAN) $standard_libtool_flag"
INLINE_CFLAGS="$INLINE_CFLAGS $standard_libtool_flag"
CXXFLAGS="$CXXFLAGS $standard_libtool_flag"
-all_targets='$(OVERALL_TARGET) $(PHP_MODULES) $(PHP_CLI_TARGET)'
+all_targets="$lcov_target \$(OVERALL_TARGET) \$(PHP_MODULES) \$(PHP_CLI_TARGET)"
install_targets="$install_modules install-build install-headers install-programs $install_pear"
case $PHP_SAPI in
@@ -1238,7 +1305,7 @@ PHP_ADD_SOURCES(Zend, \
if test -r "$abs_srcdir/Zend/zend_objects.c"; then
PHP_ADD_SOURCES(Zend, zend_objects.c zend_object_handlers.c zend_objects_API.c zend_mm.c \
- zend_default_classes.c zend_reflection_api.c)
+ zend_default_classes.c)
fi
dnl Selectively disable optimization due to high RAM usage during