configure: disable gettext support if msgfmt isn't found (fixes https://github.com/fish-shell/fish-shell/issues/548)

This commit is contained in:
David Adam (zanchey) 2013-02-24 20:21:46 +08:00 committed by ridiculousfish
parent 4c3d3af73e
commit bf282e9bd7

View File

@ -194,18 +194,25 @@ fi
AC_ARG_WITH( AC_ARG_WITH(
gettext, gettext,
AC_HELP_STRING( AS_HELP_STRING(
[--without-gettext], [--without-gettext],
[do not translate messages, even if gettext is available] [do not translate messages, even if gettext is available]
), ),
[local_gettext=$withval], [local_gettext=$withval],
[local_gettext=yes] [local_gettext=check]
) )
if test x$local_gettext != xno; then AS_IF([test x$local_gettext != xno],
AC_DEFINE([USE_GETTEXT],[1],[Perform string translations with gettext]) [ AC_CHECK_PROGS( [found_msgfmt], [msgfmt], [no] )
fi 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 # Try to enable large file support. This will make sure that on systems