[GRASS5] configure on cygwin, freebsd, solaris, irix

Glynn Clements glynn.clements at virgin.net
Thu Sep 20 19:50:49 EDT 2001

Andreas Lange wrote:

> i tested the latest configure on cygwin, FreeBSD/alpha, Solaris/SPARC
> and IRIX. 
> I will upload the output (config.log, config.status and output of
> ./configure) to:
> http://mitglied.tripod.de/AndreasLange/igrass/index.html FYI.
> As i generated the output in the last days, only the IRIX part is
> identical with the latest CVS. 
> The gd lib is still not recognized correctly on cygwin, solaris and
> irix. I think the configure tests for the wrong function, if i override
> the #ifdefs in the code i can compile a fully functional PNGdriver on
> cygwin (without changing anything else). So i can at least narrow down
> that it is not the missing gdImagePng function in libgd. 

I think that I've found the problem; configure.in uses:

	AC_CHECK_FUNCS(gdImageGif gdImagePng)

This results in the check:

configure:5068: gcc -o conftest -g -O2   -I/usr/local/include   -L/usr/local/lib  -lgd conftest.c  1>&5

Note that "-lgd" comes before "conftest.c"; this won't work for static
libraries. I'll commit a fix shortly (basically, use multiple
AC_CHECK_LIB tests instead of AC_CHECK_FUNCS).

That may not be enough for Solaris:

ld: warning: file libucb.so.1: required by /usr/local/lib/libpng.so, not found

Let me know whether the updated version works for Solaris.

> On cygwin i have the problem with the postgresql modules that the
> Gmakefiles have $(XEXTRALIBS) as dependencies, which resolves to -lipc
> on cygwin, which causes an error. Is it safe to remove the $(XEXTRALIBS)
> from the dependency line?

All of XEXTRALIBS, PQLIBPATH and PQLIB should be removed from the
definition of LIBES and moved to the compilation command(s), as is the
case for MATHLIB and XDRLIB.

In general, external libraries should *never* appear in the dependency
list, either directly or indirectly (e.g. via LIBES), as they will be
of the form "-lfoo".

The only libraries which should appear as dependencies are those which
are part of GRASS itself (e.g. from src/libes), as they will be actual
pathnames (e.g. "$(LIBDIR)/$(LIBARCH)/libgis.a").

Glynn Clements <glynn.clements at virgin.net>

More information about the grass-dev mailing list