[postgis-tickets] r17891 - Remove HAVE_LIBJSON_C
Raul
raul at rmr.ninja
Tue Oct 8 04:48:33 PDT 2019
Author: algunenano
Date: 2019-10-08 04:48:33 -0700 (Tue, 08 Oct 2019)
New Revision: 17891
Modified:
trunk/configure.ac
trunk/liblwgeom/lwin_geojson.c
trunk/postgis/lwgeom_in_geojson.c
trunk/postgis_config.h.in
Log:
Remove HAVE_LIBJSON_C
Patch by jabakobob
References #4528
Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac 2019-10-08 11:40:36 UTC (rev 17890)
+++ trunk/configure.ac 2019-10-08 11:48:33 UTC (rev 17891)
@@ -910,7 +910,6 @@
CHECK_JSON=yes
HAVE_JSON=no
-HAVE_JSON_C=no
AC_ARG_WITH([json],
[AS_HELP_STRING([--without-json], [build without json-c support])],
@@ -935,7 +934,7 @@
AC_CHECK_FILE("$JSONDIR/include/json-c/json.h",
[
JSON_CPPFLAGS="-I$JSONDIR/include/json-c"
- AC_CHECK_LIB([json-c], [json_object_get], [HAVE_JSON_C=yes; JSON_LDFLAGS="${JSON_LDFLAGS} -ljson-c"])
+ AC_CHECK_LIB([json-c], [json_object_get], [HAVE_JSON=yes; JSON_LDFLAGS="${JSON_LDFLAGS} -ljson-c"])
],
[
AC_CHECK_FILE("$JSONDIR/include/json/json.h",
@@ -949,7 +948,7 @@
fi
elif test ! -z "$PKG_CONFIG"; then
PKG_CHECK_MODULES([JSONC], [json-c], [
- HAVE_JSON_C=yes
+ HAVE_JSON=yes
JSON_CPPFLAGS="$JSONC_CFLAGS"
JSON_LDFLAGS="$JSONC_LIBS"
], [])
@@ -958,16 +957,10 @@
if test "$HAVE_JSON" = "yes"; then
AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present])
fi
- if test "$HAVE_JSON_C" = "yes"; then
- AC_DEFINE([HAVE_LIBJSON], 1, [Define to 1 if libjson is present])
- AC_DEFINE([HAVE_LIBJSON_C], 1, [Define to 1 if libjson resides in a json-c subdir])
- HAVE_JSON=yes
- fi
AC_SUBST([JSON_CPPFLAGS])
AC_SUBST([JSON_LDFLAGS])
AC_SUBST([HAVE_JSON])
- AC_SUBST([HAVE_LIBJSON_C])
fi
Modified: trunk/liblwgeom/lwin_geojson.c
===================================================================
--- trunk/liblwgeom/lwin_geojson.c 2019-10-08 11:40:36 UTC (rev 17890)
+++ trunk/liblwgeom/lwin_geojson.c 2019-10-08 11:48:33 UTC (rev 17891)
@@ -28,7 +28,7 @@
#include "lwgeom_log.h"
#include "../postgis_config.h"
-#if defined(HAVE_LIBJSON) || defined(HAVE_LIBJSON_C) /* --{ */
+#if defined(HAVE_LIBJSON)
#define JSON_C_VERSION_013 (13 << 8)
@@ -403,7 +403,7 @@
return NULL; /* Never reach */
}
-#endif /* HAVE_LIBJSON or HAVE_LIBJSON_C --} */
+#endif /* HAVE_LIBJSON */
LWGEOM *
lwgeom_from_geojson(const char *geojson, char **srs)
@@ -466,5 +466,5 @@
}
lwgeom_add_bbox(lwgeom);
return lwgeom;
-#endif /* HAVE_LIBJSON } */
+#endif /* HAVE_LIBJSON */
}
Modified: trunk/postgis/lwgeom_in_geojson.c
===================================================================
--- trunk/postgis/lwgeom_in_geojson.c 2019-10-08 11:40:36 UTC (rev 17890)
+++ trunk/postgis/lwgeom_in_geojson.c 2019-10-08 11:48:33 UTC (rev 17891)
@@ -32,7 +32,7 @@
#include "liblwgeom.h"
#include "lwgeom_export.h"
-#if defined(HAVE_LIBJSON) || defined(HAVE_LIBJSON_C)
+#if defined(HAVE_LIBJSON)
#include <json.h>
Modified: trunk/postgis_config.h.in
===================================================================
--- trunk/postgis_config.h.in 2019-10-08 11:40:36 UTC (rev 17890)
+++ trunk/postgis_config.h.in 2019-10-08 11:48:33 UTC (rev 17891)
@@ -53,9 +53,6 @@
/* Define to 1 if libjson is present */
#undef HAVE_LIBJSON
-/* Define to 1 if libjson resides in json-c subdir */
-#undef HAVE_LIBJSON_C
-
/* Define to 1 if you have the `pq' library (-lpq). */
#undef HAVE_LIBPQ
More information about the postgis-tickets
mailing list