[GRASS5] gdal-config --dep-libs

Radim Blazek blazek at itc.it
Sat Nov 13 04:21:11 EST 2004


Glynn Clements wrote:
> Radim Blazek wrote:
> 
> 
>>Should be `gdal-config --dep-libs` also added to GDAL_LIBS?
> 
> 
> Yes; although we need to check when that switch was added (it hasn't
> always been there), and possibly update REQUIREMENTS.html accordingly.
> 
> 
>>How is it possible that GRASS compiles without GDAL dep-libs?
> 
> 
> If GDAL is a shared library, it normally includes dependency
> information, so linking against libgdal automatically pulls in the
> dependencies.
> 
> If it's a static library, it won't work (this has been reported
> previously on one of the GRASS lists; this may be the reason why that
> switch was added).

http://xserve.flids.com/pipermail/gdal-dev/2004-February/004965.html
So it should be in 1.2.1?

My suggestion:

if test -n `gdal-config | grep 'dep-libs'` ; then
     GDAL_DEP_LIBS=`"$GDAL_CONFIG" --dep-libs`
     GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS"
fi

Radim







More information about the grass-dev mailing list