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
