diff options
author | woglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-07-20 21:44:43 +0000 |
---|---|---|
committer | woglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2011-07-20 21:44:43 +0000 |
commit | 6d1601a75cd05045c717d03b1e4e285978440c52 (patch) | |
tree | 2224d2410e5ad19a94e29bb20dabb945f2b880c0 | |
parent | 430f11705fc0bc4646a619a296d90ec9ed9be4c8 (diff) | |
download | navit-6d1601a75cd05045c717d03b1e4e285978440c52.tar.gz |
Fix:map_shapefile:Rework the autotools support a bit, don't include shapefile in builtin.c fixes buildprocess with no plugin support
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4654 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r-- | configure.in | 34 | ||||
-rw-r--r-- | navit/Makefile.am | 6 | ||||
-rw-r--r-- | navit/map/shapefile/Makefile.am | 3 |
3 files changed, 26 insertions, 17 deletions
diff --git a/configure.in b/configure.in index 12ac158bc..95ec21f31 100644 --- a/configure.in +++ b/configure.in @@ -366,7 +366,7 @@ AM_CONDITIONAL(SUPPORT_ZLIB, [test "x$zlib" = "xno"]) AC_SUBST(ZLIB_CFLAGS) AC_SUBST(ZLIB_LIBS) -AC_CHECK_HEADER(sys/socket.h, AC_DEFINE([HAVE_SOCKET],[],Define to 1 if you have sockets)) +AC_CHECK_HEADER(sys/socket.h, AC_DEFINE([HAVE_SOCKET],[],Define to 2 if you have sockets)) AC_CHECK_HEADER(winsock2.h, AC_DEFINE([HAVE_WINSOCK],[],Define to 1 if you have Windows sockets)) # gtk @@ -558,30 +558,38 @@ fi AM_CONDITIONAL(GRAPHICS_OPENGL, [test "x$glut" = "xyes" -a "x$freeglut" = "xyes" -a "x$opengl" = "xyes" -a "x$freeimage" = "xyes" -a "x$glc" = "xyes" ]) + system_shapefile=no +if test x"${map_shapefile}" = xyes +then AC_CHECK_HEADERS( [shapefil.h libshp/shapefil.h], - AC_DEFINE( + [AC_DEFINE( [HAVE_SYS_SHAPEFILELIB], [1], - Define to 1 if you have the <libshp/shapefil.h> header file. - ) - system_shapefile_header=yes + Define to 1 if you have the <shapefil.h> header file. + )], + [SHAPEFILE_CFLAGS="-I\$(top_srcdir)/navit/support/shapefile"] ) -if test x"${system_shapefile_header}" = xyes + +AC_CHECK_LIB( + [shp], + [DBFDeleteField], + [SHAPEFILE_LIBS="-lshp" + system_shapefile=yes], + [SHAPEFILE_LIBS="-L\$(top_builddir)/navit/support/shapefile -lsupport_shapefile" + system_shapefile=no] + ) + +if test x"${system_shapefile}" = xno 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]) + AC_MSG_WARN([*** The shapefile library(libshp) from the system is to old or not found! -- using included copy]) fi +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([*** The shape library(libshp) from the system is to old! -- using included copy]) -fi if test x"${USE_GARMIN}" = xyes then diff --git a/navit/Makefile.am b/navit/Makefile.am index 7d3af8087..f8ebb20b2 100644 --- a/navit/Makefile.am +++ b/navit/Makefile.am @@ -177,14 +177,16 @@ if EVENT_GLIB lib@LIBNAVIT@_la_SOURCES += event_glib.c endif +navit_LDFLAGS = -export-dynamic + if !PLUGINS lib@LIBNAVIT@_la_SOURCES += builtin.c lib@LIBNAVIT@_la_LIBADD += $(MODULES) endif -navit_LDFLAGS = -export-dynamic navit_LDADD += @NAVIT_LIBS@ @WORDEXP_LIBS@ @ZLIB_LIBS@ @CRYPTO_LIBS@ @INTLLIBS@ + if SUPPORT_WIN32 navit_LDADD += resource.rsc @@ -232,7 +234,7 @@ builtin.c: $(top_builddir)/config.h ls $(top_builddir)/navit/*/*/*.la | sed -e "s/\.la/_init(void);/" -e "s/.*lib/extern void module_/" >builtin.c echo "extern void builtin_init(void);" >>builtin.c echo "void builtin_init(void) {" >>builtin.c - ls $(top_builddir)/navit/*/*/*.la | sed -e "s/\.la/_init();/" -e "s/.*\\/lib/ module_/" >>builtin.c + ls $(top_builddir)/navit/*/*/*.la | grep -v shapefile | sed -e "s/\.la/_init();/" -e "s/.*\\/lib/ module_/" >>builtin.c echo "}" >>builtin.c support-builtin.c: $(top_builddir)/config.h ls $(top_builddir)/navit/support/*/*.la | sed -e "s/\.la/_init(void);/" -e "s/.*lib/extern void module_/" >support-builtin.c diff --git a/navit/map/shapefile/Makefile.am b/navit/map/shapefile/Makefile.am index 6b6c1fa9b..f23fb8278 100644 --- a/navit/map/shapefile/Makefile.am +++ b/navit/map/shapefile/Makefile.am @@ -1,5 +1,5 @@ include $(top_srcdir)/Makefile.inc -AM_CPPFLAGS = @NAVIT_CFLAGS@ -I$(top_srcdir)/navit -DMODULE=map_shapefile +AM_CPPFLAGS = @NAVIT_CFLAGS@ @SHAPEFILE_CFLAGS@ -I$(top_srcdir)/navit -DMODULE=map_shapefile if PLUGINS modulemap_LTLIBRARIES = libmap_shapefile.la else @@ -10,6 +10,5 @@ libmap_shapefile_la_LDFLAGS = -module -avoid-version @NAVIT_MODULE_LDFLAGS@ if HAVE_SYSTEM_SHAPEFILELIB libmap_shapefile_la_LIBADD = @SHAPEFILE_LIBS@ else -AM_CPPFLAGS += -I$(top_srcdir)/navit/support/shapefile libmap_shapefile_la_LIBADD = $(top_builddir)/navit/support/shapefile/libsupport_shapefile.la endif |