[GRASS5] configure checks, fortran, static libraries

Glynn Clements glynn.clements at virgin.net
Sat Aug 4 01:45:44 EDT 2001

Markus Neteler wrote:

> congrats! The configure is working now on both Linux (SuSe and RH)
> and Solaris/SUN, even with different locations of the libs.

I'd forgotten about one test which wasn't working, namely LAPACK. When
linking against a C test program, I had a number of undefined
references. I have found that linking with libg2c solves this, but I'm
guessing that libg2c is a GNU-ism. Is there an equivalent libf2c on
other platforms?

BTW, a side effect of the experimentation surrounding this test has
pointed out another possible flaw in the existing configure.in. When
additional libraries are used by adding them to LDFLAGS, they are
listed at the beginning of the link command, before the test program
and the library being checked.

This is fine for dynamic libraries, but static libaries usually have
to appear *after* the object files which require them (basically, the
linker only inserts the code which is necessary to satisfy any
outstanding references).

This suggests that many of the AC_CHECK_LIB tests will fail if one of
the required libraries is a static library. So, I'll be re-writing
those tests. I would be interested in test results using static
libraries, e.g. by using:

	CC="gcc -static" ./configure ...

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-dev mailing list