Separated in two patches for easier cherry-picking. For maint. Regards, Stefano
-*-*- Subject: [PATCH 1/2] Bootstrap: let the user choose which autoconf to use. * bootstrap ($AUTOCONF): New variable, from the environment. Use it instead of calling "autoconf" directly. --- ChangeLog | 6 ++++++ bootstrap | 5 ++++- 2 files changed, 10 insertions(+), 1 deletions(-) -*-*- * bootstrap ($PERL): Let the user override it from the environment. Do not explicitly look for perl in $PATH anymore. ($PATH_SEPARATOR): Removed, it's no more needed. --- ChangeLog | 6 ++++++ bootstrap | 32 ++------------------------------ 2 files changed, 8 insertions(+), 30 deletions(-)
From e634c0a0639a9760e3806a6b36cb103867ccaff2 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Tue, 27 Jul 2010 22:44:54 +0200 Subject: [PATCH 1/2] Bootstrap: let the user choose which autoconf to use. * bootstrap ($AUTOCONF): New variable, from the environment. Use it instead of calling "autoconf" directly. --- ChangeLog | 6 ++++++ bootstrap | 5 ++++- 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7edcae8..4107f75 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-07-27 Stefano Lattarini <stefano.lattar...@gmail.com> + + Bootstrap: let the user choose which autoconf to use. + * bootstrap ($AUTOCONF): New variable, from the environment. + Use it instead of calling "autoconf" directly. + 2010-07-21 Stefano Lattarini <stefano.lattar...@gmail.com> Modernize and improve test scripts `subdir*.test'. diff --git a/bootstrap b/bootstrap index 7766bd3..5a7a3ce 100755 --- a/bootstrap +++ b/bootstrap @@ -35,6 +35,9 @@ set -e # Set program basename. me=`echo "$0" | sed 's,^.*/,,'` +# Let user choose which version of autoconf to use. +AUTOCONF=${AUTOCONF-autoconf} + # Find perl. Code based on Autoconf, but without non-POSIX support. if test -z "$PERL"; then save_IFS=$IFS @@ -133,7 +136,7 @@ cd .. # Run the autotools. $PERL ./aclocal.tmp -I m4 -autoconf +$AUTOCONF $PERL ./automake.tmp # Remove temporary files and directories. -- 1.7.1
From e32586b1f85ee2a6ccb323874cd0b8922e5c5cb8 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini <stefano.lattar...@gmail.com> Date: Tue, 27 Jul 2010 22:50:38 +0200 Subject: [PATCH 2/2] Bootstrap: let the user choose which perl to use. * bootstrap ($PERL): Let the user override it from the environment. Do not explicitly look for perl in $PATH anymore. ($PATH_SEPARATOR): Removed, it's no more needed. --- ChangeLog | 6 ++++++ bootstrap | 32 ++------------------------------ 2 files changed, 8 insertions(+), 30 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4107f75..705b487 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2010-07-27 Stefano Lattarini <stefano.lattar...@gmail.com> + Bootstrap: let the user choose which perl to use. + * bootstrap ($PERL): Let the user override it from the + environment. + Do not explicitly look for perl in $PATH anymore. + ($PATH_SEPARATOR): Removed, it's no more needed. + Bootstrap: let the user choose which autoconf to use. * bootstrap ($AUTOCONF): New variable, from the environment. Use it instead of calling "autoconf" directly. diff --git a/bootstrap b/bootstrap index 5a7a3ce..ba21315 100755 --- a/bootstrap +++ b/bootstrap @@ -19,43 +19,15 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -# Find the path separator. -# (Snippet copied from configure's initialization in Autoconf 2.65) -if test "${PATH_SEPARATOR+set}" != set; then - PATH_SEPARATOR=: - (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { - (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || - PATH_SEPARATOR=';' - } -fi - # Don't ignore failures. set -e # Set program basename. me=`echo "$0" | sed 's,^.*/,,'` -# Let user choose which version of autoconf to use. +# Let user choose which version of autoconf and perl to use. AUTOCONF=${AUTOCONF-autoconf} - -# Find perl. Code based on Autoconf, but without non-POSIX support. -if test -z "$PERL"; then - save_IFS=$IFS - IFS=$PATH_SEPARATOR - for dir in $PATH; do - IFS=$save_IFS - test -z "$dir" && dir=. - if test -x "$dir/perl" && test ! -d "$dir/perl"; then - PERL="$dir/perl" - break - fi - done -fi - -if test -z "$PERL"; then - echo "$me: cannot find perl" >&2 - exit 1 -fi +PERL=${PERL-perl} # Variables to substitute. VERSION=`sed -ne '/AC_INIT/s/^[^[]*\[[^[]*\[\([^]]*\)\].*$/\1/p' configure.ac` -- 1.7.1