Am Samstag, 20. Dezember 2014, 12:26:04 schrieb Tim Rühsen:
> Am Samstag, 20. Dezember 2014, 10:37:30 schrieb Eli Zaretskii:
> > > From: Tim Ruehsen <[email protected]>
> > > Date: Fri, 19 Dec 2014 12:53:13 +0100
> > > 
> > > > 4. "make check" fails to link test programs, such as unit-tests.exe,
> > > > 
> > > >    because it doesn't link against libintl.  Again, not sure how best
> > > >    to fix that (wget itself does get linked against libintl and
> > > >    libiconv).
> > 
> > Btw, I encountered a similar problem building wget on GNU/Linux,
> > except that in that case what was missing was -lrt, without which
> > clock_gettime and friends cannot be resolved.  So there seems to be
> > some general problem here.
> 
> Ah, ok. clock_gettime/-lrt problem has been solved by 4.11.2014.
> What we (basically, through m4/wget.m4) do is
>   AC_CHECK_FUNCS(clock_gettime, [], [
>     AC_CHECK_LIB(rt, clock_gettime)
>   ])
> 
> Than we use LIB_CLOCK_GETTIME in tests/Makefile.am
> LDADD = ../src/libunittest.a ../lib/libgnu.a $(LIBS) $(LIB_CLOCK_GETTIME)
> 
> Maybe you could add a similar piece of code for libintl.
> (Since I can't reproduce and can't test, I need your help here.)
> A (for you) working patch would be great !

Maybe even easier as we thought ;-)

From the ./bootstrap output:

You may need to use the following Makefile variables when linking.
Use them in <program>_LDADD when linking a program, or
in <library>_a_LDFLAGS or <library>_la_LDFLAGS when linking a library.
  $(GETADDRINFO_LIB)
  $(HOSTENT_LIB)
  $(INET_NTOP_LIB)
  $(LIBSOCKET)
  $(LIB_CLOCK_GETTIME)
  $(LIB_CRYPTO)
  $(LIB_SELECT)
  $(LTLIBICONV) when linking with libtool, $(LIBICONV) otherwise
  $(LTLIBINTL) when linking with libtool, $(LIBINTL) otherwise
  $(LTLIBTHREAD) when linking with libtool, $(LIBTHREAD) otherwise
  $(SERVENT_LIB)

It looks like we don't use libtool when compiling/linking 'tests'.
So add/append $(LIBINTL) in tests/Makefile.am to
LDADD = ../src/libunittest.a ../lib/libgnu.a $(LIBS) $(LIB_CLOCK_GETTIME)

and give it a try. If that works for you, I'll push the change.

Tim

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to