summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorgrant <grant@pkgsrc.org>2004-10-04 10:42:39 +0000
committergrant <grant@pkgsrc.org>2004-10-04 10:42:39 +0000
commit39a6bf3ea23de21965d420704bef41eec004c83a (patch)
treee66fd6ab3c5f12abf713521ae7eba976985aba7f /devel
parente548c8fd0af2bfb12fc5c4cf66f8f72d343af7d6 (diff)
downloadpkgsrc-39a6bf3ea23de21965d420704bef41eec004c83a.tar.gz
older versions of GNU gettext do not provide ngettext() and a bunch
of other functions. only consider the base system's gettext suitable if it provides at least ngettext().
Diffstat (limited to 'devel')
-rw-r--r--devel/gettext-lib/builtin.mk20
1 files changed, 15 insertions, 5 deletions
diff --git a/devel/gettext-lib/builtin.mk b/devel/gettext-lib/builtin.mk
index 7512a4ea00c..6781a550d7e 100644
--- a/devel/gettext-lib/builtin.mk
+++ b/devel/gettext-lib/builtin.mk
@@ -1,4 +1,4 @@
-# $NetBSD: builtin.mk,v 1.9 2004/10/03 22:37:16 heinz Exp $
+# $NetBSD: builtin.mk,v 1.10 2004/10/04 10:42:39 grant Exp $
.if !defined(_BLNK_LIBINTL_FOUND)
_BLNK_LIBINTL_FOUND!= \
@@ -66,12 +66,22 @@ USE_BUILTIN.gettext!= \
. endif
. if ${PREFER.gettext} == "native"
-# XXX
-# XXX By default, assume that the native gettext implementation is good
-# XXX enough.
-# XXX
+#
+# By default, assume that the native gettext implementation is good
+# enough if it has a prototype for ngettext().
+#
. if exists(${_LIBINTL_H})
+_GETTEXT_NGETTEXT!= \
+ if ${GREP} -q ngettext ${_LIBINTL_H}; then \
+ echo yes; \
+ else \
+ echo no; \
+ fi
+. if !empty(_GETTEXT_NGETTEXT:Myes)
USE_BUILTIN.gettext= yes
+. else
+USE_BUILTIN.gettext= no
+. endif
#
# The listed platforms have an implementation of gettext that isn't
# GNUish enough.