aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-01-30 03:45:59 -0500
committerMike Frysinger <vapier@gentoo.org>2022-01-30 03:45:59 -0500
commit04fb5b54e8dea2aa16a53032f55f672dc7d547be (patch)
tree3625877dc7af19cb941fa51b74048d475cce5762
parentautoconf-wrapper: drop unnecessary argv0 check (diff)
downloadautotools-wrappers-04fb5b54e8dea2aa16a53032f55f672dc7d547be.tar.gz
autotools-wrappers-04fb5b54e8dea2aa16a53032f55f672dc7d547be.tar.bz2
autotools-wrappers-04fb5b54e8dea2aa16a53032f55f672dc7d547be.zip
autoconf-wrapper: expand full version range only on demand
Sync the automake behavior to autoconf where we expand all possible versions only if the current ones not found. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
-rwxr-xr-xac-wrapper.sh11
1 files changed, 7 insertions, 4 deletions
diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index 37eb7b7..4471f30 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -75,10 +75,10 @@ fi
#
# Set up bindings between actual version and WANT_AUTOCONF;
-# Start at last known unstable/stable versions to speed up lookup process.
+# Start with last known versions to speed up lookup process.
#
-KNOWN_AUTOCONF="2.71 2.70 2.69"
-vers="${KNOWN_AUTOCONF} 9999 $(printf '2.%s ' `seq 99 -1 59`) 2.13"
+LAST_KNOWN_VER="71"
+vers=$(printf '2.%s ' `seq ${LAST_KNOWN_VER} -1 50`)
#
# Helper to scan for a usable program based on version.
@@ -106,7 +106,10 @@ find_binary() {
# list of autoconf versions.
#
find_latest() {
- find_binary ${vers}
+ if ! find_binary ${vers} ; then
+ # Brute force it.
+ find_binary $(printf '2.%s ' `seq 99 -1 ${LAST_KNOWN_VER}`) 9999
+ fi
}
for wx in ${WANT_AUTOCONF:-latest} ; do
if [ "${wx}" = "latest" ] || [ "${wx}" = "2.5" ] ; then