aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2022-01-30 03:04:09 -0500
committerMike Frysinger <vapier@gentoo.org>2022-01-30 03:04:09 -0500
commit185e2e318d5050eb21e6b9d3c84722f56e4505c0 (patch)
tree9d270becd7e2d30379d3ea68a121c7e8ba42aa25 /ac-wrapper.sh
parentautoconf-wrapper: export WANT_AUTOCONF to the full version (diff)
downloadautotools-wrappers-185e2e318d5050eb21e6b9d3c84722f56e4505c0.tar.gz
autotools-wrappers-185e2e318d5050eb21e6b9d3c84722f56e4505c0.tar.bz2
autotools-wrappers-185e2e318d5050eb21e6b9d3c84722f56e4505c0.zip
autoconf-wrapper: slightly rework handling of 2.1 version alias
The 2.1 alias only ever expanded into the 2.13 version. Every other version uses the 2.5 alias, and at this point, seems extremely unlikely that this will ever change (or that we'd add a new alias set). Rework the WANT_AUTOCONF checking logic to rewrite 2.1 to 2.13, and then accept any non-2.13 version when 2.5 is used. This will allow us to burn down the alias logic entirely which will simplify the code nicely. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'ac-wrapper.sh')
-rwxr-xr-xac-wrapper.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index 6cb436b..4682082 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -108,17 +108,24 @@ if [ -n "${WANT_AUTOCONF}" ] ; then
fi
auto_ver=${v%:*}
- want_ver=${v#*:}
for wx in ${WANT_AUTOCONF} ; do
if [ "${wx}" = "latest" ] ; then
wx="2.5"
+ elif [ "${wx}" = "2.1" ] ; then
+ wx="2.13"
fi
if [ -x "${full_argv0}-${wx}" ] ; then
binary="${full_argv0}-${wx}"
v="x"
- elif [ "${wx}" = "${want_ver}" ] && [ -x "${full_argv0}-${auto_ver}" ] ; then
- binary="${full_argv0}-${auto_ver}"
- v="x"
+ elif [ "${wx}" = "2.5" ] ; then
+ if [ "${auto_ver}" = "2.13" ] ; then
+ # The "2.5" alias accepts every version except 2.13.
+ continue
+ fi
+ if [ -x "${full_argv0}-${auto_ver}" ] ; then
+ binary="${full_argv0}-${auto_ver}"
+ v="x"
+ fi
fi
done
[ "${v}" = "x" ] && break