Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15671 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 68603 invoked by uid 1010); 30 Mar 2005 03:44:01 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 68339 invoked from network); 30 Mar 2005 03:43:58 -0000 Received: from unknown (HELO pb1.pair.com) (127.0.0.1) by localhost with SMTP; 30 Mar 2005 03:43:58 -0000 X-Host-Fingerprint: 129.21.60.6 blacksheep.csh.rit.edu Tru64 v5.1a JP4 (or OpenVMS 7.x on Compaq 5.x Received: from ([129.21.60.6:2540] helo=blacksheep.csh.rit.edu) by pb1.pair.com (ecelerity HEAD r(5268)) with SMTP id 29/81-22409-B602A424 for ; Tue, 29 Mar 2005 22:43:41 -0500 Received: from fury.csh.rit.edu (fury.csh.rit.edu [IPv6:2001:470:1f00:135:a00:20ff:fe8d:5399]) by blacksheep.csh.rit.edu (Postfix) with ESMTP id C2654914E; Tue, 29 Mar 2005 22:43:31 -0500 (EST) Received: by fury.csh.rit.edu (Postfix, from userid 37404) id 7C1B114E7; Tue, 29 Mar 2005 22:43:31 -0500 (EST) Date: Tue, 29 Mar 2005 22:43:30 -0500 To: Jani Taskinen Cc: internals@lists.php.net Message-ID: <20050330034330.GA6092@csh.rit.edu> Mail-Followup-To: Jani Taskinen , internals@lists.php.net References: <20050327221532.GA17108@csh.rit.edu> <20050329114511.GB42955@isis.sigpipe.cz> <20050329124758.GD42955@isis.sigpipe.cz> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="AqsLC8rIMeq19msA" Content-Disposition: inline In-Reply-To: Subject: Re: [PHP-DEV] Build system support for stock FreeBSD autoconf ports From: jon@php.net (Jon Parise) --AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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/) --AqsLC8rIMeq19msA Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="autotools-override.patch" 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" --AqsLC8rIMeq19msA--