alsa-utils needs to link with intl if the toolchain needs gettext and
locale is set. Otherwise we will see an error like this one:
alsamixer-cli.o: In function `main':
cli.c:(.text.startup+0x4d): undefined reference to `libintl_textdomain'
cli.c:(.text.startup+0xc1): undefined reference to `libintl_gettext'
cli.c:(.text.startup+0xd5): undefined reference to `libintl_gettext'
cli.c:(.text.startup+0xe9): undefined reference to `libintl_gettext'
cli.c:(.text.startup+0x1fd): undefined reference to `libintl_gettext'
cli.c:(.text.startup+0x223): undefined reference to `libintl_gettext'
Fixes:
http://autobuild.buildroot.net/results/707/
707016a2490fc97b98d17e2b6a9c6423a56bb4a9/
[Peter: correct autobuilder reference]
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
depends on BR2_LARGEFILE
depends on BR2_TOOLCHAIN_HAS_THREADS # alsa-lib
select BR2_PACKAGE_ALSA_LIB
+ select BR2_PACKAGE_GETTEXT if BR2_NEEDS_GETTEXT_IF_LOCALE
help
This package contains the command line utilities for the ALSA
project.
ALSA_UTILS_DEPENDENCIES = host-gettext host-pkgconf alsa-lib \
$(if $(BR2_PACKAGE_NCURSES),ncurses)
-# gettext support is optional
-ifeq ($(BR2_PACKAGE_GETTEXT),y)
-ALSA_UTILS_DEPENDENCIES += gettext
-endif
-
ALSA_UTILS_CONF_ENV = \
ac_cv_prog_ncurses5_config=$(STAGING_DIR)/usr/bin/$(NCURSES_CONFIG_SCRIPTS)
--disable-xmlto \
--with-curses=$(if $(BR2_PACKAGE_NCURSES_WCHAR),ncursesw,ncurses)
+ifeq ($(BR2_NEEDS_GETTEXT_IF_LOCALE),y)
+ALSA_UTILS_DEPENDENCIES += gettext
+ALSA_UTILS_CONF_ENV += LIBS=-lintl
+endif
+
ifneq ($(BR2_PACKAGE_ALSA_UTILS_ALSAMIXER),y)
ALSA_UTILS_CONF_OPTS += --disable-alsamixer --disable-alsatest
endif