On 3/26/07, Ralf Wildenhues <[EMAIL PROTECTED]> wrote:
Hello Christopher,

* Christopher Hulbert wrote on Fri, Mar 23, 2007 at 02:27:25AM CET:
> I have a library that has an optional fortran interface. I'd rather
> not separate this into two different libraries, but on systems without
> a fortran compiler, FCLD is empty and creating a libtool archive
> fails. Is there another way around this. My Makefile.am is something
> like
[...]

Does the following workaround work?

liba_la_SOURCES = a.c
if FORTRAN
liba_la_SOURCES += b.f90
else
FCLD = $(CCLD)
endif

Sorry it took so long to reply. No, automake gives an error. It also
gives an error trying to redefine FCLINK and FC.

[EMAIL PROTECTED] automake_error]$ cat Makefile.am && automake
AUTOMAKE_OPTIONS = foreign no-dependencies

lib_LTLIBRARIES = liba.la
liba_la_SOURCES = a_c.c

if ENABLE_FORTRAN
liba_la_SOURCES +=  a_f.f90
else
FCLD=$(CCLD)
endif
automake: FCLD was already defined in condition !ENABLE_FORTRAN, which
is included in condition TRUE ...
Makefile.am:9: ... `FCLD' previously defined here



Cheers,
Ralf



Reply via email to