automake
[Top][All Lists]
Advanced

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

RE: dynamic selection of linker


From: Daily, Jeff A
Subject: RE: dynamic selection of linker
Date: Tue, 9 Feb 2010 12:08:57 -0800

> I have a case where sometimes I want to compile fortran code with a C
> interface, and sometimes I do not. In this case, I ran into the linker
> problem, and I ended up substituting in the configure script as you
> mention. Here is a snippet of what I do in configure.ac. In this case
> I am using FCLINK because I am not using fortran 77.
> 
> dnl
> dnl Without this, the linker line is incorrect on platforms without a
> fortran
> dnl compiler even if we are not using fortran sources
> dnl
> if test "x$enable_fortran" != "xyes" -a "x$enable_seke" != "xyes"; then
>   FCLINK='$(LINK)'
> else
>   FCLINK='$(LIBTOOL) --mode=link $(FCLD) $(AM_FCFLAGS) $(FCFLAGS)
> $(AM_LDFLAGS) $(LDFLAGS) -o $@'
> fi
> AC_SUBST(FCLINK)

I think I finally found a similar solution.  I have this in my configure.ac and 
it appears to work okay.

AS_IF([test "x$enable_f77" = xno],
        [AC_SUBST([F77LINK], [[\$\(LINK\)]])])




reply via email to

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