[postgis-tickets] r17767 - Move geobuf version testing into configure
Paul Ramsey
pramsey at cleverelephant.ca
Thu Aug 22 11:26:43 PDT 2019
Author: pramsey
Date: 2019-08-22 11:26:43 -0700 (Thu, 22 Aug 2019)
New Revision: 17767
Modified:
branches/2.5/configure.ac
branches/2.5/postgis/Makefile.in
branches/2.5/regress/Makefile.in
Log:
Move geobuf version testing into configure
Modified: branches/2.5/configure.ac
===================================================================
--- branches/2.5/configure.ac 2019-08-22 18:07:17 UTC (rev 17766)
+++ branches/2.5/configure.ac 2019-08-22 18:26:43 UTC (rev 17767)
@@ -940,6 +940,7 @@
CHECK_PROTOBUF=yes
HAVE_PROTOBUF=yes
+HAVE_GEOBUF=no
AC_ARG_WITH([protobuf],
[AS_HELP_STRING([--without-protobuf], [build without protobuf-c support])],
@@ -1013,15 +1014,17 @@
fi
dnl all tests passed! turn on compile-time defines
- if test "$HAVE_PROTOBUF" = "yes"; then
+ if test "$HAVE_PROTOBUF" = "yes"; then
AC_DEFINE([HAVE_LIBPROTOBUF], [1], [Define to 1 if libprotobuf-c is present])
AC_DEFINE_UNQUOTED([LIBPROTOBUF_VERSION], [$PROTOC_VERSION], [Numeric version number for libprotobuf-c])
if test $PROTOC_VERSION -ge 1001000; then
AC_DEFINE([HAVE_GEOBUF], [1], [Define to 1 if libprotobuf is >= 1.1])
+ HAVE_GEOBUF=yes
fi
fi
AC_SUBST([HAVE_PROTOBUF])
+ AC_SUBST([HAVE_GEOBUF])
AC_SUBST([PROTOC_VERSION])
AC_SUBST([PROTOBUF_CPPFLAGS])
AC_SUBST([PROTOBUF_LDFLAGS])
Modified: branches/2.5/postgis/Makefile.in
===================================================================
--- branches/2.5/postgis/Makefile.in 2019-08-22 18:07:17 UTC (rev 17766)
+++ branches/2.5/postgis/Makefile.in 2019-08-22 18:26:43 UTC (rev 17767)
@@ -56,7 +56,7 @@
ifeq (@HAVE_PROTOBUF@,yes)
PROTOBUF_OBJ = vector_tile.pb-c.o
-ifeq ($(shell expr @PROTOC_VERSION@ ">=" 1001000),1)
+ifeq (@HAVE_GEOBUF@,yes)
PROTOBUF_OBJ += geobuf.pb-c.o
endif
endif
@@ -206,7 +206,7 @@
ifeq (@HAVE_PROTOBUF@,yes)
lwgeom_out_mvt.o: vector_tile.pb-c.h
mvt.o: vector_tile.pb-c.h
-ifeq ($(shell expr $(PROTOC_VERSION) ">=" 1001000),1)
+ifeq (@HAVE_GEOBUF@,yes)
lwgeom_out_geobuf.o: geobuf.pb-c.h
geobuf.o: geobuf.pb-c.h
endif
Modified: branches/2.5/regress/Makefile.in
===================================================================
--- branches/2.5/regress/Makefile.in 2019-08-22 18:07:17 UTC (rev 17766)
+++ branches/2.5/regress/Makefile.in 2019-08-22 18:26:43 UTC (rev 17767)
@@ -22,7 +22,6 @@
POSTGIS_MAJOR_VERSION=@POSTGIS_MAJOR_VERSION@
POSTGIS_MINOR_VERSION=@POSTGIS_MINOR_VERSION@
HAVE_JSON=@HAVE_JSON@
-HAVE_PROTOBUF=@HAVE_PROTOBUF@
PROTOC_VERSION=@PROTOC_VERSION@
HAVE_SFCGAL=@HAVE_SFCGAL@
HAVE_BRIN=@HAVE_BRIN@
@@ -247,12 +246,13 @@
regress_spgist_index_3d
endif
-ifeq ($(HAVE_PROTOBUF),yes)
+
+ifeq (@HAVE_PROTOBUF@,yes)
# protobuf-c adds:
# ST_AsMVT, ST_AsGeobuf
TESTS += \
mvt
-ifeq ($(shell expr $(PROTOC_VERSION) ">=" 1001000),1)
+ifeq (@HAVE_GEOTOBUF@,yes)
TESTS += \
geobuf
endif
More information about the postgis-tickets
mailing list