[GRASSLIST:4978] Re: libogdi31.so

Glynn Clements glynn at gclements.plus.com
Fri Nov 26 17:19:59 EST 2004


Markus Neteler wrote:

> > One possible solution would be for configure to apply a link test for
> > GDAL, using --dep-libs only if the check fails without it. E.g. 
> > (untested):
> > 
> > 	ac_save_ldflags="$LDFLAGS"
> > 	LDFLAGS="$LDFLAGS $GDAL_LIBS"
> > 	AC_CHECK_FUNC(GDALOpen,[],[
> > 	LDFLAGS="$LDFLAGS $GDAL_DEP_LIBS"
> > 	AC_CHECK_FUNC(GDALOpen,[GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS"],[
> >             AC_MSG_ERROR([*** Unable to locate GDAL library.])
> > 	])
> > 	])
> > 	LDFLAGS=${ac_save_ldflags}
> 
> We can make a try of course.
> How should this be done?

I've committed the above to CVS. It appears to work for a dynamic GDAL
library (GDAL's dependencies don't get added to r.in.gdal). I haven't
tested it with a static GDAL library.

BTW, r.in.gdal still has quite a lot of dependencies, some of them
(curses, FFTW) because r.in.gdal requires some functions from the
imagery library, and the imagery library has a lot of dependencies
(for functions which r.in.gdal doesn't use).

Some of the libraries should either be refactored or built as static
libraries. The imagery library is a prime candidate, but libgis and
libgmath also have issues. libgis requires the socket library solely
for unix_socks.c, which is only used by the raster library and the
display drivers. libgmath requires FFTW solely for the FFT code.

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-user mailing list