cvs: php-src(PHP_5_0) /build build2.mk buildcheck.sh /scripts phpize.in
| From: | Jani Taskinen | Date: | Thu, 07 Apr 2005 20:43:27 +0000 |
| Subject: | cvs: php-src(PHP_5_0) /build build2.mk buildcheck.sh /scripts phpize.in | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-31289@lists.php.net to get a copy of this message | ||
sniper Thu Apr 7 16:43:27 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src/build build2.mk buildcheck.sh
/php-src/scripts phpize.in
Log:
MFH: Use PHP_AUTOCONF / PHP_AUTOHEADER environment variables
http://cvs.php.net/diff.php/php-src/build/build2.mk?r1=1.30.2.5&r2=1.30.2.6&ty=u
Index: php-src/build/build2.mk
diff -u php-src/build/build2.mk:1.30.2.5 php-src/build/build2.mk:1.30.2.6
--- php-src/build/build2.mk:1.30.2.5 Thu Feb 3 12:42:59 2005
+++ php-src/build/build2.mk Thu Apr 7 16:43:25 2005
@@ -14,7 +14,7 @@
# | Author: Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
-# $Id: build2.mk,v 1.30.2.5 2005/02/03 17:42:59 sniper Exp $
+# $Id: build2.mk,v 1.30.2.6 2005/04/07 20:43:25 sniper Exp $
#
include generated_lists
@@ -32,6 +32,9 @@
targets = $(TOUCH_FILES) configure $(config_h_in)
+PHP_AUTOCONF ?= 'autoconf'
+PHP_AUTOHEADER ?= 'autoheader'
+
SUPPRESS_WARNINGS ?= 2>&1 | (egrep -v '(AC_TRY_RUN called without default to allow
cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never
used|AC_PROG_LEX invoked multiple times|AC_DECL_YYTEXT is expanded from...|the top
level)'||true)
all: $(targets)
@@ -45,7 +48,7 @@
# correctly otherwise (timestamps are not updated)
@echo rebuilding $@
@rm -f $@
- autoheader $(SUPPRESS_WARNINGS)
+ $(PHP_AUTOHEADER) $(SUPPRESS_WARNINGS)
$(TOUCH_FILES):
touch $(TOUCH_FILES)
@@ -56,5 +59,5 @@
configure: aclocal.m4 configure.in $(config_m4_files)
@echo rebuilding $@
- autoconf $(SUPPRESS_WARNINGS)
+ $(PHP_AUTOCONF) $(SUPPRESS_WARNINGS)
http://cvs.php.net/diff.php/php-src/build/buildcheck.sh?r1=1.30.2.4&r2=1.30.2.5&ty=u
Index: php-src/build/buildcheck.sh
diff -u php-src/build/buildcheck.sh:1.30.2.4 php-src/build/buildcheck.sh:1.30.2.5
--- php-src/build/buildcheck.sh:1.30.2.4 Wed Jan 19 20:41:52 2005
+++ php-src/build/buildcheck.sh Thu Apr 7 16:43:26 2005
@@ -16,15 +16,20 @@
# | Sascha Schumann <sascha@schumann.cx> |
# +----------------------------------------------------------------------+
#
-# $Id: buildcheck.sh,v 1.30.2.4 2005/01/20 01:41:52 sniper Exp $
+# $Id: buildcheck.sh,v 1.30.2.5 2005/04/07 20:43:26 sniper Exp $
#
echo "buildconf: checking installation..."
stamp=$1
+# Allow the autoconf executable to be overriden by $PHP_AUTOCONF.
+if test -z "$PHP_AUTOCONF"; then
+ PHP_AUTOCONF='autoconf'
+fi
+
# autoconf 2.13 or newer
-ac_version=
autoconf --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//' -e
's/[a-z]* *$//'
+ac_version=$PHP_AUTOCONF --version 2>/dev/null|head -n 1|sed -e 's/^[^0-9]*//'
-e 's/[a-z]* *$//'
if test -z "$ac_version"; then
echo "buildconf: autoconf not found."
echo " You need autoconf version 2.13 or newer installed"
http://cvs.php.net/diff.php/php-src/scripts/phpize.in?r1=1.15.2.3&r2=1.15.2.4&ty=u
Index: php-src/scripts/phpize.in
diff -u php-src/scripts/phpize.in:1.15.2.3 php-src/scripts/phpize.in:1.15.2.4
--- php-src/scripts/phpize.in:1.15.2.3 Tue Jan 25 07:54:57 2005
+++ php-src/scripts/phpize.in Thu Apr 7 16:43:27 2005
@@ -80,9 +80,33 @@
if test ! -x "$builddir/build/shtool"; then
phpize_no_shtool
exit 1
+ else
+ php_shtool=$builddir/build/shtool
fi
}
+phpize_check_autotools()
+{
+ test -z "$PHP_AUTOCONF" && PHP_AUTOCONF=autoconf
+ test -z "$PHP_AUTOHEADER" && PHP_AUTOHEADER=autoheader
+
+ if ! test -x "$php_shtool path $PHP_AUTOCONF"; then
+ echo <<EOF
+Cannot find autoconf. Please check your autoconf installation and the \$PHP_AUTOCONF
+environment variable is set correctly and then rerun this script.
+
+EOF
+ exit 1
+ fi
+ if ! test -x "$php_shtool path $PHP_AUTOHEADER"; then
+ echo <<EOF
+Cannot find autoheader. Please check your autoconf installation and the \$PHP_AUTOHEADER
+environment variable is set correctly and then rerun this script.
+
+EOF
+ exit 1
+ fi
+}
phpize_copy_files()
{
@@ -102,9 +126,8 @@
phpize_autotools()
{
- aclocal || exit 1
- autoconf || exit 1
- autoheader || exit 1
+ $PHP_AUTOCONF || exit 1
+ $PHP_AUTOHEADER || exit 1
}
# Main script
@@ -141,10 +164,11 @@
touch install-sh mkinstalldirs missing
- phpize_autotools
-
phpize_check_shtool
+ phpize_check_autotools
+
+ phpize_autotools
;;
esac