[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Conditionals in Makefile.am
From: |
Stephan Kulow |
Subject: |
Re: Conditionals in Makefile.am |
Date: |
Wed, 12 Jun 2002 11:09:47 +0200 |
User-agent: |
KMail/1.4.1 |
On Tuesday 11 June 2002 18:14, Filip Kaliński wrote:
> I have AM_CONDITIONAL(ENABLE_BAR, ... ) in configure.in and I want to have
>
> if ENABLE_BAR
> lib_LTLIBARAIES=libfoo.la
> libfoo_la_LDADD=-lbaz
> ...
> else
> noninst_LTILIBRARIES=libfoo.la
> ...
> endif
>
> in Makefile.am, but it doesn't work, automake wants to define both
> of ..._LTLIBRARIES and screams that it is alredy defined (while parsing
> second) :-(
>
> Does anyone know how to solve it?
automake can't do magic I'm afraid.
I'd suggest:
noinst_LTLIBRARIES = libfooc.la
if ENABLE_BAR
lib_LTLIBRARIES = libfoo.la
libfoo_la_LIBADD = libfooc.la -lbaz
endif
and define a $(LIBFOO) that you link to if you need to in your project.
Greetings, Stephan