From: Ruediger Meier <sweet_f_a@gmx.de>
To: util-linux@vger.kernel.org
Subject: [PATCH] build-sys: use gettext 0.18.3 if possible
Date: Tue, 10 Jun 2014 12:08:51 +0200 [thread overview]
Message-ID: <1402394931-20416-2-git-send-email-sweet_f_a@gmx.de> (raw)
In-Reply-To: <1402394931-20416-1-git-send-email-sweet_f_a@gmx.de>
From: Ruediger Meier <ruediger.meier@ga-group.nl>
We add a little hack for backward compatibility on systems with
older gettext installed
See 0576dbd3 and 81ed13ed.
Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
---
autogen.sh | 31 ++++++++++++++++++++++++++++++-
configure.ac | 3 ++-
2 files changed, 32 insertions(+), 2 deletions(-)
diff --git a/autogen.sh b/autogen.sh
index 48e26ad..7bbcc75 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -13,6 +13,34 @@ THEDIR=`pwd`
cd $srcdir
DIE=0
+autopoint_fun ()
+{
+ # we have to deal with set -e ...
+ rm -f configure.ac.autogenbak
+ ret="0"
+ GT_VER_MIN="0.18"
+ GT_VER_DEF=$(sed -n 's/AM_GNU_GETTEXT_VERSION(\[\(.*\)\])/\1/p' configure.ac)
+ GT_VER_HAVE="$(gettext --version | head -n 1 | sed 's/.* //g')"
+
+ tmp=$(echo -e "$GT_VER_MIN\n$GT_VER_HAVE" | sort -V | tail -n1)
+ tmp=$(echo -e "$GT_VER_DEF\n$tmp" | sort -V | head -n1)
+
+ if [ "$tmp" != "$GT_VER_DEF" ]; then
+ echo "warning, force autopoint to use old gettext $tmp"
+ sed -i.autogenbak configure.ac \
+ -e "s/\(AM_GNU_GETTEXT_VERSION\).*/\1([$tmp])/"
+ fi
+
+ autopoint "$@" || ret=$?
+ ret=$?
+
+ if [ "$tmp" != "$GT_VER_DEF" ]; then
+ mv configure.ac.autogenbak configure.ac
+ fi
+
+ return $ret
+}
+
test -f sys-utils/mount.c || {
echo
echo "You must run this script in the top-level util-linux directory"
@@ -66,6 +94,7 @@ fi
echo
echo "Generate build-system by:"
+
echo " autopoint: $(autopoint --version | head -1)"
echo " aclocal: $(aclocal --version | head -1)"
echo " autoconf: $(autoconf --version | head -1)"
@@ -77,7 +106,7 @@ rm -rf autom4te.cache
set -e
po/update-potfiles
-autopoint --force $AP_OPTS
+autopoint_fun --force $AP_OPTS
if ! grep -q datarootdir po/Makefile.in.in; then
echo autopoint does not honor dataroot variable, patching.
sed -i -e 's/^datadir *=\(.*\)/datarootdir = @datarootdir@\
diff --git a/configure.ac b/configure.ac
index 107184b..ba31abc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -152,7 +152,8 @@ UL_SET_ARCH([HPPA], [hppa*])
AC_SYS_LARGEFILE
-AM_GNU_GETTEXT_VERSION([0.18])
+dnl we want this gettext version but still allow older ones via autogen.sh
+AM_GNU_GETTEXT_VERSION([0.18.3])
AM_GNU_GETTEXT([external])
AS_IF([test -d "$srcdir/po"], [
--
1.8.4.5
next prev parent reply other threads:[~2014-06-10 10:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-10 10:08 [PATCH] next try to update gettext version Ruediger Meier
2014-06-10 10:08 ` Ruediger Meier [this message]
2014-06-10 11:52 ` [PATCH] build-sys: use gettext 0.18.3 if possible Karel Zak
2014-06-10 12:04 ` Ruediger Meier
2014-06-10 12:16 ` Karel Zak
2014-06-10 12:23 ` Karel Zak
2014-06-10 13:41 ` Ruediger Meier
2014-06-10 13:57 ` Pádraig Brady
2014-06-10 15:25 ` Ruediger Meier
2014-06-10 17:51 ` Ruediger Meier
[not found] ` <53974319.7040608@gmail.com>
2014-06-11 22:18 ` [PATCH] next try to update gettext version Ruediger Meier
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=1402394931-20416-2-git-send-email-sweet_f_a@gmx.de \
--to=sweet_f_a@gmx.de \
--cc=util-linux@vger.kernel.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