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