From: Bruno Haible Date: Thu, 3 Jan 2002 11:43:38 +0000 (+0000) Subject: Don't set ENABLE_NLS when GNU gettext is not available. X-Git-Tag: v0.11~129 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=74f7302b972b7edec23f16551887307e26bcf266;p=thirdparty%2Fgettext.git Don't set ENABLE_NLS when GNU gettext is not available. --- diff --git a/m4/ChangeLog b/m4/ChangeLog index dba7d91c5..b58b6a2ee 100644 --- a/m4/ChangeLog +++ b/m4/ChangeLog @@ -1,3 +1,9 @@ +2002-01-03 Bruno Haible + + * gettext.m4 (AM_GNU_GETTEXT): If no intl directory exists and GNU + gettext was not found in libc or preinstalled libintl, don't define + ENABLE_NLS. + 2001-12-12 Bruno Haible * gettext.m4 (AM_PO_SUBDIRS): Reject xgettext versions that don't diff --git a/m4/gettext.m4 b/m4/gettext.m4 index cfc89705a..327f0ba0c 100644 --- a/m4/gettext.m4 +++ b/m4/gettext.m4 @@ -1,6 +1,6 @@ # Macro to add for using GNU gettext. # Ulrich Drepper , 1995-2000. -# Bruno Haible , 2000-2001. +# Bruno Haible , 2000-2002. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU General Public @@ -84,9 +84,6 @@ AC_DEFUN([AM_GNU_GETTEXT], dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then - AC_DEFINE(ENABLE_NLS, 1, - [Define to 1 if translation of program messages to the user's native language - is requested.]) gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) @@ -175,6 +172,13 @@ return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", fi ]) + if test "$gt_use_preinstalled_gnugettext" = "yes" \ + || test "$nls_cv_use_gnu_gettext" = "yes"; then + AC_DEFINE(ENABLE_NLS, 1, + [Define to 1 if translation of program messages to the user's native language + is requested.]) + fi + if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext_libintl" = "yes"; then AC_MSG_CHECKING([how to link with libintl])