On Tue, Mar 29, 2005 at 04:15:38PM +0300, Jani Taskinen wrote:
> > Such schemes are quite common thanks to incompatibilities between
> > autotools versions, e. g. Subversion's buildconf equivalent accepts
> > the names from environment, mentioning IIRC Debian installing the
> > tools as e. g. autoconf-213.
>
> If someone can provide a patch that works in every single OS
> with any possible combination of autoconf* packages installed I'll
> be happy to commit such patch. As long as nobody can provide such patch
> and PROVE it won't break things for others -> no commit.
I've read the comments and generated a second patch. This one solves
my problem in a more acceptable way, by introducing two environmental
variables, PHP_AUTOCONF and PHP_AUTOHEADER, which default to 'autoconf'
and 'autoheader', respectively. The idea is borrowed from Subversion's
buildconf equivalent (which Roman mentions above).
I believe this is a workable, non-intrusive solution that should work
in all environments.
--
Jon Parise (jon of php.net) :: The PHP Project (http://www.php.net/)
Index: build/build2.mk
===================================================================
RCS file: /repository/php-src/build/build2.mk,v
retrieving revision 1.35
diff -u -r1.35 build2.mk
--- build/build2.mk 3 Feb 2005 17:42:42 -0000 1.35
+++ build/build2.mk 30 Mar 2005 03:36:08 -0000
@@ -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)
Index: build/buildcheck.sh
===================================================================
RCS file: /repository/php-src/build/buildcheck.sh,v
retrieving revision 1.34
diff -u -r1.34 buildcheck.sh
--- build/buildcheck.sh 20 Jan 2005 01:41:19 -0000 1.34
+++ build/buildcheck.sh 30 Mar 2005 03:36:08 -0000
@@ -23,8 +23,13 @@
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"
--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php