summaryrefslogtreecommitdiffstats
path: root/package/gettext
diff options
context:
space:
mode:
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-04 16:47:47 +0200
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>2017-07-04 19:09:51 +0200
commitb2fcabde4f09deb1f984e9dc2942fd5aab72d5a6 (patch)
tree7ca38ec36f650060327e0c007568706ba315e153 /package/gettext
parent85cb34a880a0eca6c7c33e548057adfbb0c0a8a1 (diff)
downloadbuildroot-b2fcabde4f09deb1f984e9dc2942fd5aab72d5a6.tar.gz
buildroot-b2fcabde4f09deb1f984e9dc2942fd5aab72d5a6.zip
gettext: force build libintl if needed
This commit introduces a hidden option BR2_PACKAGE_GETTEXT_PROVIDES_INTL that is used by gettext.mk to force the build of libintl if the toolchain doesn't provide a full gettext implementation. For now, this hidden option is not selected by anything, but a follow-up commit will introduce BR2_ENABLE_NLS, which will make use of it. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Diffstat (limited to 'package/gettext')
-rw-r--r--package/gettext/Config.in8
-rw-r--r--package/gettext/gettext.mk8
2 files changed, 16 insertions, 0 deletions
diff --git a/package/gettext/Config.in b/package/gettext/Config.in
index 7871a480a8..18bfda6461 100644
--- a/package/gettext/Config.in
+++ b/package/gettext/Config.in
@@ -12,6 +12,14 @@ config BR2_PACKAGE_GETTEXT
http://www.gnu.org/software/gettext/
+if BR2_PACKAGE_GETTEXT
+
+config BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL
+ bool
+ depends on !BR2_TOOLCHAIN_HAS_FULL_GETTEXT
+
+endif
+
comment "gettext needs a toolchain w/ wchar"
depends on BR2_NEEDS_GETTEXT
depends on !BR2_USE_WCHAR
diff --git a/package/gettext/gettext.mk b/package/gettext/gettext.mk
index 498dfab8c7..454ad298a9 100644
--- a/package/gettext/gettext.mk
+++ b/package/gettext/gettext.mk
@@ -39,6 +39,14 @@ HOST_GETTEXT_CONF_OPTS = \
--disable-relocatable \
--without-emacs
+# Force the build of libintl, even if the C library provides a stub
+# gettext implementation
+ifeq ($(BR2_PACKAGE_GETTEXT_PROVIDES_LIBINTL),y)
+GETTEXT_CONF_OPTS += --with-included-gettext
+else
+GETTEXT_CONF_OPTS += --without-included-gettext
+endif
+
# For the target version, we only need the runtime, and for the host
# version, we only need the tools.
GETTEXT_SUBDIR = gettext-runtime
OpenPOWER on IntegriCloud