build-sys: allow gettext 0.17 to be used

The requirement for gettext 0.18 was introduced by commit e3e16717
to pass --no-wrap option to msgmerge tool, which I guess improves
the process of updating po files for translators. At the same time,
unfortunately, it makes building from git fail on a RHEL/CentOS 6
system, as it comes with gettext 0.17.

Use the existing hack in autogen.sh to allow building with gettext 0.17,
with an appropriate warning so that the user is aware:

 warning: forcing autopoint to use old gettext 0.17

The only negative side effect of this patch I am aware of is
if gettext-0.17 is used, then --no-wrap is not being passed
to msgmerge (although msgmerge 1.17 already supports it), because
Makefile.in.in that comes with gettext 0.17 doesn't have MSGMERGE_OPTIONS.
From my POV, this is way better than to not being able to build.

NOTE if gettext 0.18.3 is installed, it is used and this patch
doesn't change anything; it only allows gettext 1.17 to be used
if this is all we have.

Cc: Benno Schulenberg <bensberg@justemail.net>
Cc: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
This commit is contained in:
Kir Kolyshkin 2015-09-02 18:20:22 -07:00
parent a8afc8c666
commit e46a7f8efe
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ autopoint_fun ()
# check against this hardcoded set of alternative gettext versions
gt_ver=`gettext --version |\
sed -n -e 's/.* \(0\.18\|0\.18\.[1-2]\)$/\1/p'`
sed -n -e 's/.* \(0\.17\|0\.18\|0\.18\.[1-2]\)$/\1/p'`
if [ -n "$gt_ver" ]; then
echo "warning: forcing autopoint to use old gettext $gt_ver"