From: "Mike Frysinger" <vapier@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/autotools-wrappers:main commit in: /
Date: Sun, 30 Jan 2022 09:24:21 +0000 (UTC) [thread overview]
Message-ID: <1643531154.26310da15dd46776faf1c8e892896f443aa9c419.vapier@gentoo> (raw)
commit: 26310da15dd46776faf1c8e892896f443aa9c419
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Jan 30 08:25:54 2022 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sun Jan 30 08:25:54 2022 +0000
URL: https://gitweb.gentoo.org/proj/autotools-wrappers.git/commit/?id=26310da1
autoconf-wrapper: handle autodetection better
If WANT_AUTOCONF isn't set, don't just default to the latest version.
If the current directory has configure or aclocal.m4 files previously
generated with a specific autoconf version, then use that if available.
This matches how the automake wrapper behaves.
Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>
ac-wrapper.sh | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/ac-wrapper.sh b/ac-wrapper.sh
index e37f5f3..d85b71b 100755
--- a/ac-wrapper.sh
+++ b/ac-wrapper.sh
@@ -146,10 +146,32 @@ generated_version() {
sed -n -E "/${re}/{s:${re}:\3:;p;q}" "$@"
}
+recorded_aclocal_version() {
+ local re='.*m4_warning.*this file was generated for autoconf ([0-9].+)\..*'
+ sed -n -E "/${re}/{s:${re}:\1:;p;q}" "$@"
+}
+
#
# autodetect routine
#
-if [ "${WANT_AUTOCONF}" = "2.1" ] && [ -f "configure.ac" ] ; then
+if [ -z "${WANT_AUTOCONF}" ] ; then
+ auto_vers=
+ if [ -r "configure" ] ; then
+ auto_vers="${auto_vers} $(generated_version configure)"
+ fi
+ if [ -r "aclocal.m4" ] ; then
+ auto_vers="${auto_vers} $(recorded_aclocal_version aclocal.m4)"
+ fi
+ # We don't need to set $binary here as it has already been setup for us
+ # earlier to the latest available version.
+ if [ -n "${auto_vers}" ] ; then
+ if ! find_binary ${auto_vers} ; then
+ warn "auto-detected versions not found (${auto_vers}); falling back to latest available"
+ fi
+ fi
+fi
+
+if [ "${WANT_AUTOCONF}" = "2.1" -o "${WANT_AUTOCONF}" = "2.13" ] && [ -f "configure.ac" ] ; then
err \
"Since configure.ac is present, aclocal will always use autoconf 2.59+\n" \
"\twhich conflicts with your choice and causes errors. You have two options:\n" \
next reply other threads:[~2022-01-30 9:24 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-30 9:24 Mike Frysinger [this message]
-- strict thread matches above, loose matches on Subject: below --
2025-02-27 6:51 [gentoo-commits] proj/autotools-wrappers:main commit in: / Sam James
2024-06-07 13:27 Sam James
2023-12-24 0:55 Sam James
2022-12-07 20:46 Sam James
2022-11-22 21:20 Sam James
2022-11-22 21:20 Sam James
2022-02-08 2:58 Mike Frysinger
2022-01-30 9:24 Mike Frysinger
2022-01-30 9:24 Mike Frysinger
2022-01-30 9:24 Mike Frysinger
2022-01-30 9:24 Mike Frysinger
2022-01-30 9:24 Mike Frysinger
2022-01-30 9:24 Mike Frysinger
2022-01-30 9:24 Mike Frysinger
2022-01-30 9:24 Mike Frysinger
2022-01-30 9:24 Mike Frysinger
2022-01-30 9:24 Mike Frysinger
2022-01-30 9:24 Mike Frysinger
2022-01-30 9:24 Mike Frysinger
2022-01-30 9:24 Mike Frysinger
2022-01-30 9:24 Mike Frysinger
2022-01-30 9:24 Mike Frysinger
2022-01-29 20:35 Mike Frysinger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1643531154.26310da15dd46776faf1c8e892896f443aa9c419.vapier@gentoo \
--to=vapier@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox