Changeset 36464


Ignore:
Timestamp:
Mar 23, 2009, 8:03:32 PM (15 years ago)
Author:
1gray
Message:

Fix `--without-gdal'.
lib/vector/Vlib/field.c
(gdal_version.h): Include only if `HAVE_GDAL' is defined.
(Vect_read_dblinks): Guard a part of code with `#ifdef HAVE_GDAL'.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • grass/trunk/lib/vector/Vlib/field.c

    r32585 r36464  
    3030#include <grass/Vect.h>
    3131
     32#ifdef HAVE_GDAL
    3233#include <gdal_version.h>       /* needed for FID detection */
     34#endif  /* HAVE_GDAL */
    3335
    3436/*!
     
    445447    if (Map->format == GV_FORMAT_OGR) {
    446448
     449#ifndef HAVE_GDAL
     450        G_fatal_error(_("The support for OGR vector maps wasn't"
     451                        " compiled in."));
     452#else
    447453#if GDAL_VERSION_NUM > 1320     /* seems to be fixed after 1320 release */
    448454        int layer, nLayers;
     
    597603#endif /* GDAL_VERSION_NUM > 1320 */
    598604        return (1);
     605#endif  /* HAVE_GDAL */
    599606    }
    600607    else if (Map->format != GV_FORMAT_NATIVE) {
Note: See TracChangeset for help on using the changeset viewer.