diff --git a/
configure.ac b/
configure.acindex e1798407..0113eb86 100644
--- a/
configure.ac+++ b/
configure.ac@@ -115,7 +115,7 @@ AC_FUNC_STRFTIME
AC_CHECK_FUNCS([memset sqrt strcasecmp strerror strncasecmp strstr fdatasync ftruncate getcwd gettimeofday localtime_r memmove strerror])
# Checks for installed libraries
-AC_CHECK_LIB(sqlite3,sqlite3_prepare_v2,,AC_MSG_ERROR(['libsqlite3' is required but it doesn't seem to be installed on this system.]),-lm)
+AC_CHECK_LIB(sqlite3,sqlite3_prepare_v2,,AC_MSG_ERROR(['libsqlite3' is required but it doesn't seem to be installed on this system.]),-lm -lpthread -ldl)
AC_CHECK_LIB(z,inflateInit_,,AC_MSG_ERROR(['libz' is required but it doesn't seem to be installed on this system.]),-lm)
AC_CONFIG_FILES([Makefile \
@@ -251,8 +251,10 @@ AC_ARG_ENABLE(proj, [AS_HELP_STRING(
if test x"$enable_proj" != "xno"; then
AC_CHECK_HEADERS(proj.h, [proj_new_incl=1],
[AC_CHECK_HEADERS(proj_api.h, [proj_new_incl=0], [AC_MSG_ERROR([cannot find proj_api.h, bailing out])])])
+ AC_LANG_PUSH([C++])
AC_SEARCH_LIBS(proj_normalize_for_visualization, proj, [proj_new_lib=1],
- [AC_SEARCH_LIBS(pj_init_plus, proj, [proj_new_lib=0], [AC_MSG_ERROR(['libproj' is required but it doesn't seem to be installed on this system.])], [-lm -lpthread -lsqlite3])])
+ [AC_SEARCH_LIBS(pj_init_plus, proj, [proj_new_lib=0], [AC_MSG_ERROR(['libproj' is required but it doesn't seem to be installed on this system.])], -lm -lpthread -lsqlite3)], -lm -lpthread -lsqlite3)
+ AC_LANG_POP
if test $proj_new_incl -eq 1 && test $proj_new_lib -eq 1; then
AC_DEFINE(PROJ_NEW)
fi
@@ -348,11 +350,10 @@ if test x"$enable_geos" != "xno"; then
AC_CHECK_HEADERS([geos_c.h],, [AC_MSG_ERROR([could not find geos_c.h - you may need to specify the directory of a geos-config file using --with-geosconfig])])
CPPFLAGS="$CPPFLAGS_SAVE"
# Ensure we can link against libgeos_c
- LIBS_SAVE="$LIBS"
- LIBS="$GEOS_LDFLAGS"
- AC_SEARCH_LIBS(GEOSCoveredBy,geos_c,,AC_MSG_ERROR([could not find libgeos_c (or obsolete 'libgeos_c' < v.3.3.0 found) - you may need to specify the directory of a geos-config file using --with-geosconfig]))
- LIBS="$LIBS_SAVE"
- LIBS="$LIBS $GEOS_LDFLAGS -lgeos_c"
+ LDFLAGS="$LDFLAGS $GEOS_LDFLAGS"
+ AC_LANG_PUSH([C++])
+ AC_SEARCH_LIBS(GEOSCoveredBy,geos_c,,AC_MSG_ERROR([could not find libgeos_c (or obsolete 'libgeos_c' < v.3.3.0 found) - you may need to specify the directory of a geos-config file using --with-geosconfig]), -lgeos)
+ AC_LANG_POP
#-----------------------------------------------------------------------
# --enable-controlpoints
@@ -371,8 +372,10 @@ if test x"$enable_geos" != "xno"; then
[--enable-geosadvanced], [enables GEOS advanced features [default=yes]])],
[], [enable_geosadvanced=yes])
if test x"$enable_geosadvanced" != "xno"; then
- AC_SEARCH_LIBS(GEOSDelaunayTriangulation,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.4.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosadvanced parameter.]))
+ AC_LANG_PUSH([C++])
+ AC_SEARCH_LIBS(GEOSDelaunayTriangulation,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.4.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosadvanced parameter.]), -lgeos)
AC_DEFINE(GEOS_ADVANCED)
+ AC_LANG_POP
fi
#-----------------------------------------------------------------------
@@ -382,8 +385,10 @@ if test x"$enable_geos" != "xno"; then
[--enable-geosreentrant], [enables GEOS reentrant (fully thread safe) [default=yes]])],
[], [enable_geosreentrant=yes])
if test x"$enable_geosreentrant" != "xno"; then
- AC_SEARCH_LIBS(GEOSContext_setErrorMessageHandler_r,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.5.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosreentrant parameter.]))
+ AC_LANG_PUSH([C++])
+ AC_SEARCH_LIBS(GEOSContext_setErrorMessageHandler_r,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.5.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geosreentrant parameter.]), -lgeos)
AC_DEFINE(GEOS_REENTRANT)
+ AC_LANG_POP
fi
#-----------------------------------------------------------------------
@@ -403,8 +408,10 @@ if test x"$enable_geos" != "xno"; then
[--enable-geos370], [enables GEOS 3.7.0 features [default=yes]])],
[], [enable_geos370=yes])
if test x"$enable_geos370" != "xno"; then
- AC_SEARCH_LIBS(GEOSFrechetDistance_r,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.7.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geos370 parameter.]))
+ AC_LANG_PUSH([C++])
+ AC_SEARCH_LIBS(GEOSFrechetDistance_r,geos_c,,AC_MSG_ERROR(['libgeos_c' (>= v.3.7.0) is required but it doesn't seem to be installed on this system. You may need to try re-running configure with a --disable-geos370 parameter.]), -lgeos)
AC_DEFINE(GEOS_370)
+ AC_LANG_POP
fi
#-----------------------------------------------------------------------