automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: A target_os conditionally applied -lfoo switch


From: Bruce Korb
Subject: Re: A target_os conditionally applied -lfoo switch
Date: Tue, 19 Nov 2002 20:04:18 -0800

Earnie Boyd wrote:

> Thanks Bruce,
> 
> I used a modification of your suggestion:
> 
> <configure.ac>
> if test x$target_os == xmingw32; then
>    WINSOCK=-lws2_32
> fi
> AC_SUBST(WINSOCK)
> </configure.ac>
> 
> <Makefile.am>
> LDADD := @LTLIBINTL@ @WINSOCK@
> </Makefile.am>

Actually, your "Makefile.in" will contain the line:

   WINSOCK = @WINSOCK@

anyway, so by using:

   LDADD := $(LTLIBINTL) $(WINSOCK)

you get the same result, except you can override:

   make WINSOCK=<<somethingelse>>

This is probably in the docs, but I needed to be told, too.

> However, shouldn't we consider the fact that Automake doesn't have a
> method to pass explicit Makefile conditionals a lack of an important
> feature?

Don't get me started.  I think the source file (Makefile.am) that
describes what gets built from what and supplies explicit rules
only for weirdo tools (like my stuff).  From that should be generated
the build infrastructure, beit based on make, cook or even straight
out shell scripts.  The developer describing what needs to be built
should not worry about what the underlying engine is.  Automake
is hard-wired to make.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]