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: Earnie Boyd
Subject: Re: A target_os conditionally applied -lfoo switch
Date: Tue, 19 Nov 2002 22:23:58 -0500
User-agent: Mozilla/5.0 (Windows; U; WinNT4.0; en-US; rv:1.1) Gecko/20020826

Bruce Korb wrote:
Ralf Corsepius wrote:

Am Mit, 2002-11-13 um 19.08 schrieb Earnie Boyd:

I need to add a library specific to a target_os.  I've tried several
possible techniques and can't get cooperation from the tools.

What I want is something similar to:

target_os := @target_os@

ifeq ($(target_os),mingw32)
  LDADD += -lws2_32
endif


Add an AC_SUBST value to your configure script.
Fill it with "-lws2_32" for mingw32, otherwise empty.
Add that value (``$(WHATEVER)'') to your mumble_LDADD
unconditionally.



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>


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?

Earnie.





reply via email to

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