[GRASS-SVN] r36464 - grass/trunk/lib/vector/Vlib
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Mar 23 23:03:32 EDT 2009
Author: 1gray
Date: 2009-03-23 23:03:32 -0400 (Mon, 23 Mar 2009)
New Revision: 36464
Modified:
grass/trunk/lib/vector/Vlib/field.c
Log:
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'.
Modified: grass/trunk/lib/vector/Vlib/field.c
===================================================================
--- grass/trunk/lib/vector/Vlib/field.c 2009-03-23 19:23:53 UTC (rev 36463)
+++ grass/trunk/lib/vector/Vlib/field.c 2009-03-24 03:03:32 UTC (rev 36464)
@@ -29,7 +29,9 @@
#include <grass/dbmi.h>
#include <grass/Vect.h>
+#ifdef HAVE_GDAL
#include <gdal_version.h> /* needed for FID detection */
+#endif /* HAVE_GDAL */
/*!
\brief Create and init new dblinks ctructure
@@ -444,6 +446,10 @@
G_debug(3, "Searching for FID column in OGR DB");
if (Map->format == GV_FORMAT_OGR) {
+#ifndef HAVE_GDAL
+ G_fatal_error(_("The support for OGR vector maps wasn't"
+ " compiled in."));
+#else
#if GDAL_VERSION_NUM > 1320 /* seems to be fixed after 1320 release */
int layer, nLayers;
OGRDataSourceH Ogr_ds;
@@ -596,6 +602,7 @@
}
#endif /* GDAL_VERSION_NUM > 1320 */
return (1);
+#endif /* HAVE_GDAL */
}
else if (Map->format != GV_FORMAT_NATIVE) {
G_fatal_error(_("Don't know how to read links for format %d"),
More information about the grass-commit
mailing list