Thread (25 messages) flat view 25 messages, 2 authors, 2016-06-15
DORMANTno replies

[PATCH 04/20] Makefile: add GNU_GETTEXT, set when we expect GNU gettext

From: Ævar Arnfjörð Bjarmason <hidden>
Date: 2016-06-15 22:49:30
Subsystem: kernel build + files below scripts/ (unless maintained elsewhere), the rest · Maintainers: Nathan Chancellor, Nicolas Schier, Linus Torvalds

Add a GNU_GETTEXT flag that's set to YesPlease by default everywhere
but on Solaris if the NO_GETTEXT flag isn't set.

Everyone uses GNU gettext these days except Solaris developers, so
having a dumb check for this that just depends on SunOS should be
OK.

I also don't plan to use this (for the time being) for anything that
would break if it isn't correctly set (e.g. if you're using GNU
libintl on Solaris), so I haven't added paranoid autoconf guards.

Signed-off-by: Ævar Arnfjörð Bjarmason <redacted>
---
 Makefile |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile
index f26fca3..3fe2e47 100644
--- a/Makefile
+++ b/Makefile
@@ -43,6 +43,11 @@ all::
 # on platforms where we don't expect glibc (Linux, Hurd,
 # GNU/kFreeBSD), which includes libintl.
 #
+# Define GNU_GETTEXT if you're using the GNU implementation of
+# libintl. We define this everywhere except on Solaris, which has its
+# own gettext implementation. If GNU_GETTEXT is set we'll use GNU
+# extensions like `msgfmt --check'.
+#
 # Define GETTEXT_POISON to turn all strings that use gettext into
 # gibberish. This option should only be used by the Git developers to
 # check that the Git gettext implementation itself is sane.
@@ -783,6 +788,10 @@ EXTLIBS =
 ifndef NO_GETTEXT
 	# Systems that use GNU gettext and glibc are the exception
 	NEEDS_LIBINTL = YesPlease
+
+	# Systems that don't use GNU gettext are the exception. Only
+	# Solaris has a mature non-GNU gettext implementation.
+	GNU_GETTEXT = YesPlease
 endif
 
 # We choose to avoid "if .. else if .. else .. endif endif"
@@ -872,6 +881,9 @@ ifeq ($(uname_S),SunOS)
 	NO_MKDTEMP = YesPlease
 	NO_MKSTEMPS = YesPlease
 	NO_REGEX = YesPlease
+ifndef NO_GETTEXT
+	GNU_GETTEXT =
+endif
 	ifeq ($(uname_R),5.6)
 		SOCKLEN_T = int
 		NO_HSTRERROR = YesPlease
-- 
1.7.2.3.313.gcd15
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help