diff options
author | woglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-07-05 20:06:29 +0000 |
---|---|---|
committer | woglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-07-05 20:06:29 +0000 |
commit | 0121e6fecb7dd3d2257ded6f990089e93ba1dd3e (patch) | |
tree | 52316b5b7e1c531007ce2fda0bb1c6a225f66795 | |
parent | 1ad9ff01b942c15ea1575dd9e059c3d58681643e (diff) | |
download | navit-0121e6fecb7dd3d2257ded6f990089e93ba1dd3e.tar.gz |
Fix:map_shapefile:Split out shapelib, make prober library check, cp15 said to take care about cmake disable it for now
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4586 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r-- | CMakeLists.txt | 3 | ||||
-rw-r--r-- | configure.in | 14 | ||||
-rw-r--r-- | navit/map/shapefile/Makefile.am | 9 | ||||
-rw-r--r-- | navit/support/Makefile.am | 5 | ||||
-rw-r--r-- | navit/support/shapefile/Makefile.am | 4 | ||||
-rw-r--r-- | navit/support/shapefile/dbfopen.c (renamed from navit/map/shapefile/dbfopen.c) | 0 | ||||
-rw-r--r-- | navit/support/shapefile/shapefil.h (renamed from navit/map/shapefile/shapefil.h) | 0 | ||||
-rw-r--r-- | navit/support/shapefile/shpopen.c (renamed from navit/map/shapefile/shpopen.c) | 0 | ||||
-rw-r--r-- | navit/support/shapefile/shptree.c (renamed from navit/map/shapefile/shptree.c) | 0 |
9 files changed, 25 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 033cd90e4..db59b63c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -287,7 +287,8 @@ add_module(map/filter "Default" TRUE) if(NOT MSVC) add_module(map/mg "Default" TRUE) endif(NOT MSVC) -add_module(map/shapefile "Default" TRUE) +# cp15 promised to fix the build against the internal libshapefile +add_module(map/shapefile "Default" FALSE) add_module(map/textfile "Default" TRUE) add_module(map/csv "Default" TRUE) diff --git a/configure.in b/configure.in index 665ac58f3..12ac158bc 100644 --- a/configure.in +++ b/configure.in @@ -566,18 +566,23 @@ AC_CHECK_HEADERS( [1], Define to 1 if you have the <libshp/shapefil.h> header file. ) - SHAPEFILE_LIBS="-lshp" - system_shapefile=yes + system_shapefile_header=yes ) +if test x"${system_shapefile_header}" = xyes +then + AC_CHECK_LIB([shp], [DBFDeleteField], [SHAPEFILE_LIBS="-lshp";HAVE_SYS_SHAPEFILELIB=0;system_shapefile=yes]) +else + AC_MSG_WARN([*** No libshp/shapefil.h -- using included copy]) +fi + 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]) + AC_MSG_WARN([*** The shape library(libshp) from the system is to old! -- using included copy]) fi - if test x"${USE_GARMIN}" = xyes then # check for libgarmin @@ -1144,6 +1149,7 @@ navit/support/ezxml/Makefile navit/support/glib/Makefile navit/support/libc/Makefile navit/support/libpng/Makefile +navit/support/shapefile/Makefile navit/support/win32/Makefile navit/support/wordexp/Makefile navit/support/zlib/Makefile diff --git a/navit/map/shapefile/Makefile.am b/navit/map/shapefile/Makefile.am index 35e420e84..ba6e22886 100644 --- a/navit/map/shapefile/Makefile.am +++ b/navit/map/shapefile/Makefile.am @@ -5,10 +5,11 @@ if PLUGINS 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@ +if HAVE_SYSTEM_SHAPEFILELIB +libmap_shapefile_la_LDFLAGS += @SHAPEFILE_LIBS@ +else +AM_CPPFLAGS += -I$(top_srcdir)/navit/support/shapefile +libmap_shapefile_la_LDFLAGS += $(top_srcdir)/navit/support/shapefile/libsupport_shapefile.la endif diff --git a/navit/support/Makefile.am b/navit/support/Makefile.am index 412f5203c..9f63840a1 100644 --- a/navit/support/Makefile.am +++ b/navit/support/Makefile.am @@ -26,4 +26,7 @@ endif if SPEECH_ESPEAK SUBDIRS+=espeak endif -DIST_SUBDIRS=espeak ezxml glib wordexp win32 zlib libc libpng +if !HAVE_SYSTEM_SHAPEFILELIB + SUBDIRS+=shapefile +endif +DIST_SUBDIRS=espeak ezxml glib wordexp win32 zlib libc libpng shapefile diff --git a/navit/support/shapefile/Makefile.am b/navit/support/shapefile/Makefile.am new file mode 100644 index 000000000..3f5115ca1 --- /dev/null +++ b/navit/support/shapefile/Makefile.am @@ -0,0 +1,4 @@ +include $(top_srcdir)/Makefile.inc +AM_CPPFLAGS = @NAVIT_CFLAGS@ -I$(top_srcdir)/navit -DMODULE=support_shapefile +noinst_LTLIBRARIES = libsupport_shapefile.la +libsupport_shapefile_la_SOURCES = dbfopen.c shpopen.c shptree.c shapefil.h diff --git a/navit/map/shapefile/dbfopen.c b/navit/support/shapefile/dbfopen.c index 51944fc53..51944fc53 100644 --- a/navit/map/shapefile/dbfopen.c +++ b/navit/support/shapefile/dbfopen.c diff --git a/navit/map/shapefile/shapefil.h b/navit/support/shapefile/shapefil.h index 059244b03..059244b03 100644 --- a/navit/map/shapefile/shapefil.h +++ b/navit/support/shapefile/shapefil.h diff --git a/navit/map/shapefile/shpopen.c b/navit/support/shapefile/shpopen.c index da5365281..da5365281 100644 --- a/navit/map/shapefile/shpopen.c +++ b/navit/support/shapefile/shpopen.c diff --git a/navit/map/shapefile/shptree.c b/navit/support/shapefile/shptree.c index 56d33b227..56d33b227 100644 --- a/navit/map/shapefile/shptree.c +++ b/navit/support/shapefile/shptree.c |