AM_CONDITIONAL(GUI_SDL, [test "x$sdl" = "xyes" -a "x$opengl" = "xyes" -a "x$glc" = "xyes" -a "x$xmu" = "xyes" ])
AM_CONDITIONAL(GRAPHICS_OPENGL, [test "x$glut" = "xyes" -a "x$opengl" = "xyes" -a "x$glc" = "xyes" ])
+system_shapefile=no
+AC_CHECK_HEADERS(
+ [shapefil.h libshp/shapefil.h],
+ AC_DEFINE(
+ [HAVE_SYS_SHAPEFILELIB],
+ [1],
+ Define to 1 if you have the <libshp/shapefil.h> header file.
+ )
+ SHAPEFILE_LIBS="-lshp"
+ system_shapefile=yes
+ )
+AC_SUBST(SHAPEFILE_CFLAGS)
+AC_SUBST(SHAPEFILE_LIBS)
+AM_CONDITIONAL(HAVE_SYSTEM_SHAPEFILELIB, [test "x$system_shapefile" = "xyes" ])
+if test x"${system_shapefile}" = xno
+then
+ AC_MSG_WARN([*** no libshp/shapefil.h -- using included copy])
+fi
+
if test x"${USE_GARMIN}" = xyes
then
else
noinst_LTLIBRARIES = libmap_shapefile.la
endif
+if HAVE_SYSTEM_SHAPEFILELIB
+libmap_shapefile_la_SOURCES = shapefile.c
+libmap_shapefile_la_LDFLAGS = -module -avoid-version @NAVIT_MODULE_LDFLAGS@ @SHAPEFILE_LIBS@
+else
libmap_shapefile_la_SOURCES = shapefile.c dbfopen.c shpopen.c shptree.c shapefil.h
libmap_shapefile_la_LDFLAGS = -module -avoid-version @NAVIT_MODULE_LDFLAGS@
+endif