Hi, On Solaris 10, with GNU gettext installed, I get this link error:
gcc -Wl,-R,/opt/csw/gcc4/lib -std=gnu99 -g -O2 -L/home/haible/prefix-x86/lib -o test-regex-quote test-regex-quote.o ../gllib/libgnu.a -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm -lm Undefined first referenced symbol in file libintl_gettext ../gllib/libgnu.a(regex.o) ld: fatal: Symbol referencing errors. No output written to test-regex-quote *** Error code 1 make: Fatal error: Command failed for target `test-regex-quote' Indeed, regex.o uses libintl_gettext and therefore requires linking with -lintl when it is present. This patch fixes the module descriptions: 2010-11-27 Bruno Haible <[email protected]> regex: Mention link dependencies. * modules/regex (Link): New section. * modules/rpmatch (Link): Likewise. * modules/regex-quote-tests (Makefile.am): Link with $(LIBINTL). --- modules/regex.orig Sat Nov 27 18:20:52 2010 +++ modules/regex Sat Nov 27 18:19:39 2010 @@ -38,6 +38,9 @@ Include: <regex.h> +Link: +$(LTLIBINTL) when linking with libtool, $(LIBINTL) otherwise + License: LGPLv2+ --- modules/rpmatch.orig Sat Nov 27 18:20:52 2010 +++ modules/rpmatch Sat Nov 27 18:20:07 2010 @@ -22,6 +22,9 @@ Include: <stdlib.h> +Link: +$(LTLIBINTL) when linking with libtool, $(LIBINTL) otherwise + License: GPL --- modules/regex-quote-tests.orig Sat Nov 27 18:20:52 2010 +++ modules/regex-quote-tests Sat Nov 27 18:20:38 2010 @@ -11,3 +11,4 @@ Makefile.am: TESTS += test-regex-quote check_PROGRAMS += test-regex-quote +test_regex_quote_LDADD = $(LDADD) $(LIBINTL)
