madplay: fix musl gettext support detection
authorPeter Korsgaard <peter@korsgaard.com>
Wed, 27 Jan 2016 16:57:21 +0000 (17:57 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 27 Jan 2016 17:17:30 +0000 (18:17 +0100)
commita0a244d26d8e7e7e5465c3e6e9fcd1c31e2c178d
tree5283cacd603234c678e0a84d44137ed351f17b4d
parentf7366974ecf0761b18f07ac5f8f1f6c146543c88
madplay: fix musl gettext support detection

Fixes:
http://autobuild.buildroot.net/results/256/2561190b274d71666c4bdf3c569b02063cefdb30/
http://autobuild.buildroot.net/results/14e/14e6addcd3ec35f882da7ec489caa9b60ecd4b63/
http://autobuild.buildroot.net/results/cf0/cf011286be839674d358a8bccaf1c5c52de75e46/

madplay needs gettext when built with nls, and it support 3 variants:

- C library support gettext (E.G. glibc)
- Libintl (E.G. uClibc)
- An included libintl copy

The included libintl copy has unfortunately bitrotted and doesn't even build
any more.  With that said, musl DOES have gettext support, so that should be
used instead.

The configure script unfortunately uses an old AM_GNU_GETTEXT test, which
explicitly checks for nonstandard glibc extensions, which musl doesn't
support:

http://www.openwall.com/lists/musl/2015/04/16/3

Which causes the detection to fail:

configure:24770: checking for GNU gettext in libc
configure:24794: /home/peko/source/buildroot/output/host/usr/bin/i486-linux-musl-gcc \
   -o conftest -Wall -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 \
   -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  conftest.c  >&5
/tmp/ccboDFhK.o: In function `main':
conftest.c:(.text+0x39): undefined reference to `_nl_msg_cat_cntr'
conftest.c:(.text+0x40): undefined reference to `_nl_domain_bindings'
collect2: error: ld returned 1 exit status

Now, madplay itself doesn't actually use these glibc extensions, so just force the
detection of GNU gettext when musl is used.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/madplay/madplay.mk