diff options
author | David Adam (zanchey) <zanchey@ucc.gu.uwa.edu.au> | 2013-02-24 20:21:46 +0800 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-03-01 14:54:46 -0800 |
commit | bf282e9bd78f8e1c8b070b8a46ed6c9b1acf80a5 (patch) | |
tree | 87727d64093b8f3bad1d428244c8a627f16390ba /configure.ac | |
parent | 4c3d3af73e32fa17a21189f8d20cae5b3c4b274c (diff) |
configure: disable gettext support if msgfmt isn't found (fixes https://github.com/fish-shell/fish-shell/issues/548)
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/configure.ac b/configure.ac index 177193f2..c94fa5a6 100644 --- a/configure.ac +++ b/configure.ac @@ -194,18 +194,25 @@ fi AC_ARG_WITH( gettext, - AC_HELP_STRING( + AS_HELP_STRING( [--without-gettext], [do not translate messages, even if gettext is available] ), [local_gettext=$withval], - [local_gettext=yes] + [local_gettext=check] ) -if test x$local_gettext != xno; then - AC_DEFINE([USE_GETTEXT],[1],[Perform string translations with gettext]) -fi - +AS_IF([test x$local_gettext != xno], + [ AC_CHECK_PROGS( [found_msgfmt], [msgfmt], [no] ) + if test x$found_msgfmt!= xno; then + AC_DEFINE([USE_GETTEXT],[1],[Perform string translations with gettext]) + elif test "x$local_gettext" != "xcheck" ; then + AC_MSG_FAILURE([--with-gettext was given, but the msgfmt program could not be found]) + else + local_gettext=no + fi + ], +) # # Try to enable large file support. This will make sure that on systems |