]> granicus.if.org Git - postgis/commitdiff
Make libjson-c optional adding --without-json configure switch (#2202)
authorSandro Santilli <strk@keybit.net>
Tue, 5 Mar 2013 09:10:26 +0000 (09:10 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 5 Mar 2013 09:10:26 +0000 (09:10 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11144 b70326c6-7e19-0410-871a-916f4a2858ee

NEWS
README.postgis
configure.ac
liblwgeom/cunit/cu_tester.c

diff --git a/NEWS b/NEWS
index 297c6244644e65f6e5ba981516ef4973830ed07a..122be673c3b2b77a5023c8eb8447259a405e3508 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -115,6 +115,7 @@ PostGIS 2.1.0
   - Proper support for raster band's isnodata flag in core API and loader.
   - Additional default values for parameters of ST_Aspect and ST_HillShade
   - #2178, ST_Summary now advertises presence of known srid with an [S] flag
+  - #2202, Make libjson-c optional (--without-json configure switch)
 
 * Fixes *
 
index e4e1b15c81e20abe45177c118afbf5e78707c9e9..12454e9189000865002e6b99c94f60681eba287c 100644 (file)
@@ -66,7 +66,7 @@ this to work.
    The loader, and hence PostGIS, requires GNU gettext 0.14 or higher
    (typically in libc on GNU/Linux, in which case 0.17 is required).
 
-* JSON-C (Required, Version 0.9 or higher)
+* JSON-C (Optional, Version 0.9 or higher)
 
   JSON-C is used to import GeoJSON via the function ST_GeomFromGeoJson().
 
index 929d2e8fd0ebc46f5787bed86d65fda3264b14ec..308bd9e6f4fb806703dc2f9e59264ba60e73d806 100644 (file)
@@ -699,9 +699,16 @@ dnl ===========================================================================
 dnl Detect if json-c installed
 dnl ===========================================================================
 
+CHECK_JSON=yes
 HAVE_JSON=no
 AC_SUBST([HAVE_JSON])
 
+AC_ARG_WITH([json],
+       [AS_HELP_STRING([--without-json], [build without json-c support])],
+       [CHECK_JSON="$withval"], [])
+
+if test "$CHECK_JSON" != "no"; then dnl {
+
 AC_ARG_WITH([jsondir],
        [AS_HELP_STRING([--with-jsondir=PATH], [specify the json-c installation directory])],
        [JSONDIR="$withval"], [JSONDIR=])
@@ -751,6 +758,8 @@ fi
 AC_SUBST([JSON_CPPFLAGS])
 AC_SUBST([JSON_LDFLAGS])
 
+fi dnl }
+
 dnl ===========================================================================
 dnl Detect GTK+2.0 for GUI
 dnl ===========================================================================
index 4fc8ffe85a65d2d637da51003fe7bebd0c1f683f..4c0c01a9493640d398c5b3e818da1d0b282cdd9b 100644 (file)
@@ -15,6 +15,7 @@
 #include "CUnit/Basic.h"
 #include "liblwgeom_internal.h"
 #include "cu_tester.h"
+#include "../postgis_config.h"
 
 /* Internal funcs */
 static void
@@ -80,7 +81,9 @@ int main(int argc, char *argv[])
                stringbuffer_suite,
                surface_suite,
                homogenize_suite,
+#if HAVE_JSON
                in_geojson_suite,
+#endif
                out_gml_suite,
                out_kml_suite,
                out_geojson_suite,