]> granicus.if.org Git - postgis/commitdiff
Still build libjson code when having 0.9
authorSandro Santilli <strk@keybit.net>
Wed, 25 Jun 2014 12:31:42 +0000 (12:31 +0000)
committerSandro Santilli <strk@keybit.net>
Wed, 25 Jun 2014 12:31:42 +0000 (12:31 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@12660 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/lwin_geojson.c

index fd8c2898dacd5568718c9d258174f661da833e2e..8987cd591ad83e605d59dd6e1a12d831ba2411a9 100644 (file)
@@ -15,7 +15,7 @@
 #include "lwgeom_log.h"
 #include "../postgis_config.h"
 
-#ifdef HAVE_LIBJSON
+#if defined(HAVE_LIBJSON) || defined(HAVE_LIBJSON_C) /* --{ */
 
 #ifdef HAVE_LIBJSON_C
 #include <json-c/json.h>
@@ -30,8 +30,6 @@
 # define json_tokener_error_desc(x) json_tokener_errors[(x)]
 #endif
 
-#else
-
 #include <string.h>
 
 static void geojson_lwerror(char *msg, int error_code)
@@ -498,7 +496,7 @@ parse_geojson(json_object *geojson, int *hasz,  int root_srid)
        return NULL; /* Never reach */
 }
 
-#endif /* HAVE_LIBJSON  */
+#endif /* HAVE_LIBJSON or HAVE_LIBJSON_C --} */
 
 LWGEOM*
 lwgeom_from_geojson(const char *geojson, char **srs)
@@ -561,7 +559,7 @@ lwgeom_from_geojson(const char *geojson, char **srs)
        }
 
   return lwgeom;
-#endif /* HAVE_LIBJSON  */
+#endif /* HAVE_LIBJSON } */
 }