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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 <avarab@xxxxxxxxx>
---
 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]