[GRASS5] compile 5.1/ogr_api.h

Frank Warmerdam warmerdam at pobox.com
Wed Apr 2 02:55:15 EST 2003

John Gillette wrote:
> I am having a problem with grass51_exp_2003_03_29.  I configure pointing to 
> the gdal-config.  The problem is that there are a bunch of files that don't 
> get made because they can't find ogr_api.h.  It appears that ./config sets 
> HAVE_OGR (in include/config.h) which in turn triggers vect/dig_structures.h 
> to include ogr_api.h.  The problem apprears to be that nothing adds the path 
> to ogr_api.h.
> If I manually add $(GDAL_CFLAGS) which is defined in Platform.make to the 
> local make file, this corrects the error.  The problem is that I have added 
> this 13 times so far and still going.  I assume this isn't correct.
> Can someone help, please?
> Red Hat 7.2
> CFLAGS="-g -Wall" ./configure 
> --with-grass50=/home/john/grass50_exp_2003_03_29 
> --with-postgres-includes=/usr/include/pgsql
> --without-fftw
> --with-dbm
> --with-dbm-includes=/usr/include/gdbm
> --with-gdal=/home/john/gdal-1.1.8/apps/gdal-config

John, etc,

In theory what configure scripts are supposed to do when pointed at gdal-config
is to run "gdal-config --cflags" to get appropriate values to add to the
CFLAGS or similar macro.

warmerda at gdal2200[127]% ~/gdal/apps/gdal-config --cflags
-I/debian/home/warmerda/gdal/port -I/debian/home/warmerda/gdal/core -I/debian/home/warmerda/gdal/ogr 

warmerda at gdal2200[128]% /usr/local/bin/gdal-config --cflags

If you want GRASS to be able to utilize a built, but not installed GDAL you
would need to update the configure accordingly.

In the meantime John, can't you just do a "make install" for GDAL?   I
think things would work fine then.

Best regards,

I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | Geospatial Programmer for Rent

More information about the grass-dev mailing list