[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] bootstrap: work around BSD toolchain snafu
From: |
Eric Blake |
Subject: |
[PATCH] bootstrap: work around BSD toolchain snafu |
Date: |
Tue, 3 Dec 2013 19:03:56 -0700 |
With my help on IRC, Roman Bogorodskiy identified a bug where the
BSD autoconf wrapper script eats stdin[1], which in turn causes
autopoint from gettext 0.18.3 to fail to find AM_GNU_GETTEXT_VERSION
out of configure.ac[2], with this error:
./bootstrap: autopoint --force
autopoint: *** Missing version: please specify in configure.ac through a line
'AM_GNU_GETTEXT_VERSION(x.yy.zz)' the gettext version the package is using
[1] http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/184479
[2]
http://git.sv.gnu.org/cgit/gettext.git/commit/gettext-tools/misc/autopoint.in?id=eea2dddde
We found a workaround - fake the use of an intl subdirectory long
enough for autopoint to get what it wants from that fallback.
* build-aux/bootstrap (with_gettext): Force autopoint to work even
when autom4te eats stdin.
Signed-off-by: Eric Blake <address@hidden>
---
I'm not pushing this without a decent review, particularly since
I haven't personally tested it with the FreeBSD setup that Roman
reported where gettext 0.18.3 doesn't play nicely with the
autom4te wrapper.
ChangeLog | 6 ++++++
build-aux/bootstrap | 27 +++++++++++++++++++++++++--
2 files changed, 31 insertions(+), 2 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3389905..b7325e8 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-12-03 Eric Blake <address@hidden>
+
+ bootstrap: work around BSD toolchain snafu
+ * build-aux/bootstrap (with_gettext): Force autopoint to work even
+ when autom4te eats stdin.
+
2013-12-03 Ivailo <address@hidden>
test-xvasprintf: (trivial) fix to disable some -Wformat-security diags
diff --git a/build-aux/bootstrap b/build-aux/bootstrap
index e31d17d..863f2dd 100755
--- a/build-aux/bootstrap
+++ b/build-aux/bootstrap
@@ -1,6 +1,6 @@
#! /bin/sh
# Print a version string.
-scriptversion=2013-08-15.22; # UTC
+scriptversion=2013-12-04.00; # UTC
# Bootstrap this package from checked-out sources.
@@ -813,17 +813,40 @@ grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac
>/dev/null || \
if test $with_gettext = yes || test $use_libtool = 1; then
+ autopoint_cleanup=
tempbase=.bootstrap$$
- trap "rm -f $tempbase.0 $tempbase.1" 1 2 13 15
+ trap "rm -f $tempbase.0 $tempbase.1
+ if \$autopoint_cleanup; then
+ rm -f intl/VERSION
+ rmdir -p intl
+ fi
+ " 1 2 13 15
> $tempbase.0 > $tempbase.1 &&
find . ! -type d -print | sort > $tempbase.0 || exit
if test $with_gettext = yes; then
+ # Autopoint from gettext 0.18.3 uses autom4te with stdin fed from a
+ # pipeline; but some versions of FreeBSD's autoconf wrapper scripts
+ # eat stdin. We can work around this by supplying intl/VERSION with
+ # contents that match what configure.ac specified.
+ if test ! -d intl; then
+ autopoint_cleanup=:
+ mkdir -p intl || exit
+ sed -n 's/.*AM_GNU_GETTEXT_VERSION(\[\?\([^])]*\).*/gettext-\1/p' \
+ configure.ac > intl/VERSION || exit
+ fi
+
# Released autopoint has the tendency to install macros that have been
# obsoleted in current gnulib, so run this before gnulib-tool.
echo "$0: $AUTOPOINT --force"
$AUTOPOINT --force || exit
+
+ if $autopoint_cleanup; then
+ rm -f intl/VERSION
+ rmdir -p intl
+ autopoint_cleanup=
+ fi
fi
# Autoreconf runs aclocal before libtoolize, which causes spurious
--
1.8.3.1