summaryrefslogtreecommitdiff
path: root/acinclude.m4
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2000-06-07 05:43:37 +0000
committerPaul Smith <psmith@gnu.org>2000-06-07 05:43:37 +0000
commit4a5550c8225d762f684d4047e20cc45274b6a785 (patch)
tree943515aca19373ad0fe0dce0cb852c2eca7b0cab /acinclude.m4
parente5c40f6e5ad9d485f7caada51e2361758baa67dd (diff)
downloadgunmake-4a5550c8225d762f684d4047e20cc45274b6a785.tar.gz
* Lots of bug fixes and cleanup; new i18n files, etc.
Diffstat (limited to 'acinclude.m4')
-rw-r--r--acinclude.m437
1 files changed, 21 insertions, 16 deletions
diff --git a/acinclude.m4 b/acinclude.m4
index 2ce31b7..63e84c6 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -500,24 +500,29 @@ AC_DEFUN(fp_WITH_GETTEXT, [
if test $enable_nls = yes; then
AC_DEFINE(ENABLE_NLS)
- AC_ARG_WITH(catgets,
- [ --with-catgets say that catgets is not supported],
- [AC_MSG_WARN([catgets not supported, --with-catgets ignored])])
-
- AC_CHECK_FUNCS(gettext)
- AC_CHECK_LIB(intl, gettext, :)
- if test $ac_cv_lib_intl_gettext$ac_cv_func_gettext != nono; then
- AC_MSG_CHECKING(whether the included gettext is preferred)
- AC_ARG_WITH(included-gettext,
- [ --without-included-gettext avoid our provided version of gettext],
- with_included_gettext=$withval, with_included_gettext=yes)
- AC_MSG_RESULT($with_included_gettext)
- if test $with_included_gettext$ac_cv_func_gettext = nono; then
- LIBS="$LIBS -lintl"
- fi
- else
+ # We don't support catgets at all
+ if test "x$with_catgets" != x; then
+ AC_MSG_WARN([catgets not supported, --with-catgets ignored])
+ fi
+
+ fp_keep_LIBS="$LIBS"
+
+ # Look around for gettext() on the system
+ AC_SEARCH_LIBS(gettext, intl)
+ if test $ac_cv_search_gettext = no; then
with_included_gettext=yes
+ else
+ # We only want to deal with GNU's gettext; if we don't have that
+ # we'll just use our own, thanks very much.
+ AC_MSG_CHECKING(for GNU gettext)
+ AC_TRY_LINK(,[extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr;],
+ with_included_gettext=no, with_included_gettext=yes)
+ case "$with_included_gettext" in
+ no) AC_MSG_RESULT(yes) ;;
+ yes) AC_MSG_RESULT([no; using local copy]); LIBS="$fp_keep_LIBS" ;;
+ esac
fi
+
if test $with_included_gettext = yes; then
LIBOBJS="$LIBOBJS gettext.o"
AC_DEFINE(HAVE_GETTEXT)