From: Akim Demaille Date: Fri, 26 May 2000 18:09:43 +0000 (+0000) Subject: * autoreconf.sh (autoconf, autoheader): Be more conscientious when X-Git-Tag: autoconf-2.50~846 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=66262a6fb1edc19f1dbc2344c0f1c2aab79c3999;p=thirdparty%2Fautoconf.git * autoreconf.sh (autoconf, autoheader): Be more conscientious when looking for the executable. * autoupdate.sh: Likewise. * autoheader.sh: Likewise. Suggested by Alexandre Oliva. --- diff --git a/ChangeLog b/ChangeLog index df9946828..7168b4cfb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2000-05-26 Akim Demaille + + * autoreconf.sh (autoconf, autoheader): Be more conscientious when + looking for the executable. + * autoupdate.sh: Likewise. + * autoheader.sh: Likewise. + Suggested by Alexandre Oliva. + 2000-05-26 Akim Demaille Thanks to --program-transform-name, `autoconf' might be install as diff --git a/autoheader.in b/autoheader.in index 057527f33..e6a6e2f8a 100644 --- a/autoheader.in +++ b/autoheader.in @@ -69,11 +69,15 @@ if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # Variables. : ${AC_MACRODIR=@datadir@} -if test -n "$AUTOCONF"; then - autoconf=$AUTOCONF -else - autoconf=`echo "$0" | sed -e 's/[^/]*$//`"@autoconf-name@" -fi +dir=`echo "$0" | sed -e 's/[^/]*$//'` +# We test "$dir/autoconf" in case we are in the build tree, in which case +# the names are not transformed yet. +for autoconf in "$AUTOCONF" \ + "$dir/@autoconf-name@" \ + "$dir/autoconf" \ + "@bindir@/@autoconf-name@"; do + test -f "$autoconf" && break +done debug=false localdir=. tmp= diff --git a/autoheader.sh b/autoheader.sh index 057527f33..e6a6e2f8a 100644 --- a/autoheader.sh +++ b/autoheader.sh @@ -69,11 +69,15 @@ if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # Variables. : ${AC_MACRODIR=@datadir@} -if test -n "$AUTOCONF"; then - autoconf=$AUTOCONF -else - autoconf=`echo "$0" | sed -e 's/[^/]*$//`"@autoconf-name@" -fi +dir=`echo "$0" | sed -e 's/[^/]*$//'` +# We test "$dir/autoconf" in case we are in the build tree, in which case +# the names are not transformed yet. +for autoconf in "$AUTOCONF" \ + "$dir/@autoconf-name@" \ + "$dir/autoconf" \ + "@bindir@/@autoconf-name@"; do + test -f "$autoconf" && break +done debug=false localdir=. tmp= diff --git a/autoreconf.in b/autoreconf.in index 681e6aab3..a5513d306 100644 --- a/autoreconf.in +++ b/autoreconf.in @@ -69,16 +69,21 @@ if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # Variables. : ${AC_MACRODIR=@datadir@} -if test -n "$AUTOCONF"; then - autoconf=$AUTOCONF -else - autoconf=`echo "$0" | sed -e 's/[^/]*$//`"@autoconf-name@" -fi -if test -n "$AUTOHEADER"; then - autoheader=$AUTOHEADER -else - autoheader=`echo "$0" | sed -e 's/[^/]*$//`"@autoheader-name@" -fi +dir=`echo "$0" | sed -e 's/[^/]*$//'` +# We test "$dir/autoconf" in case we are in the build tree, in which case +# the names are not transformed yet. +for autoconf in "$AUTOCONF" \ + "$dir/@autoconf-name@" \ + "$dir/autoconf" \ + "@bindir@/@autoconf-name@"; do + test -f "$autoconf" && break +done +for autoheader in "$AUTOHEADER" \ + "$dir/@autoheader-name@" \ + "$dir/autoheader" \ + "@bindir@/@autoheader-name@"; do + test -f "$autoheader" && break +done automake_mode=--gnu automake_deps= force=no diff --git a/autoreconf.sh b/autoreconf.sh index 681e6aab3..a5513d306 100644 --- a/autoreconf.sh +++ b/autoreconf.sh @@ -69,16 +69,21 @@ if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # Variables. : ${AC_MACRODIR=@datadir@} -if test -n "$AUTOCONF"; then - autoconf=$AUTOCONF -else - autoconf=`echo "$0" | sed -e 's/[^/]*$//`"@autoconf-name@" -fi -if test -n "$AUTOHEADER"; then - autoheader=$AUTOHEADER -else - autoheader=`echo "$0" | sed -e 's/[^/]*$//`"@autoheader-name@" -fi +dir=`echo "$0" | sed -e 's/[^/]*$//'` +# We test "$dir/autoconf" in case we are in the build tree, in which case +# the names are not transformed yet. +for autoconf in "$AUTOCONF" \ + "$dir/@autoconf-name@" \ + "$dir/autoconf" \ + "@bindir@/@autoconf-name@"; do + test -f "$autoconf" && break +done +for autoheader in "$AUTOHEADER" \ + "$dir/@autoheader-name@" \ + "$dir/autoheader" \ + "@bindir@/@autoheader-name@"; do + test -f "$autoheader" && break +done automake_mode=--gnu automake_deps= force=no diff --git a/bin/autoheader.in b/bin/autoheader.in index 057527f33..e6a6e2f8a 100644 --- a/bin/autoheader.in +++ b/bin/autoheader.in @@ -69,11 +69,15 @@ if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # Variables. : ${AC_MACRODIR=@datadir@} -if test -n "$AUTOCONF"; then - autoconf=$AUTOCONF -else - autoconf=`echo "$0" | sed -e 's/[^/]*$//`"@autoconf-name@" -fi +dir=`echo "$0" | sed -e 's/[^/]*$//'` +# We test "$dir/autoconf" in case we are in the build tree, in which case +# the names are not transformed yet. +for autoconf in "$AUTOCONF" \ + "$dir/@autoconf-name@" \ + "$dir/autoconf" \ + "@bindir@/@autoconf-name@"; do + test -f "$autoconf" && break +done debug=false localdir=. tmp= diff --git a/bin/autoreconf.in b/bin/autoreconf.in index 681e6aab3..a5513d306 100644 --- a/bin/autoreconf.in +++ b/bin/autoreconf.in @@ -69,16 +69,21 @@ if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi # Variables. : ${AC_MACRODIR=@datadir@} -if test -n "$AUTOCONF"; then - autoconf=$AUTOCONF -else - autoconf=`echo "$0" | sed -e 's/[^/]*$//`"@autoconf-name@" -fi -if test -n "$AUTOHEADER"; then - autoheader=$AUTOHEADER -else - autoheader=`echo "$0" | sed -e 's/[^/]*$//`"@autoheader-name@" -fi +dir=`echo "$0" | sed -e 's/[^/]*$//'` +# We test "$dir/autoconf" in case we are in the build tree, in which case +# the names are not transformed yet. +for autoconf in "$AUTOCONF" \ + "$dir/@autoconf-name@" \ + "$dir/autoconf" \ + "@bindir@/@autoconf-name@"; do + test -f "$autoconf" && break +done +for autoheader in "$AUTOHEADER" \ + "$dir/@autoheader-name@" \ + "$dir/autoheader" \ + "@bindir@/@autoheader-name@"; do + test -f "$autoheader" && break +done automake_mode=--gnu automake_deps= force=no