]> granicus.if.org Git - postgis/commitdiff
Move geobuf version test into one place and strip expr calls from makefiles
authorPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 22 Aug 2019 16:33:42 +0000 (16:33 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Thu, 22 Aug 2019 16:33:42 +0000 (16:33 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@17761 b70326c6-7e19-0410-871a-916f4a2858ee

configure.ac
postgis/Makefile.in
regress/core/Makefile.in

index 6baa03b351f5af193da7cad70f5a9cf6ce8929f9..e8d582e21ce71078e8a0e7dcdb5aaeeb6fd8fe5c 100644 (file)
@@ -974,6 +974,7 @@ dnl ===========================================================================
 
 CHECK_PROTOBUF=yes
 HAVE_PROTOBUF=yes
+HAVE_GEOBUF=no
 
 AC_ARG_WITH([protobuf],
        [AS_HELP_STRING([--without-protobuf], [build without protobuf-c support])],
@@ -1062,10 +1063,12 @@ if test "$CHECK_PROTOBUF" != "no"; then
                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])
index 1c58e686de0829d63da0d6b0aabb1d4a1f4ef7b7..99f23b982f1056469b6a8b6ddc4fd78cdc267366 100644 (file)
@@ -59,7 +59,7 @@ endif
 
 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
 UTHASH_INCLUDE = -I../deps/uthash/include
index fb347e5a5d6b9547cb3f54b286dca61c448a102e..d663ee8a58525d8eb41870c7dbd817e44c2d6a16 100644 (file)
@@ -22,7 +22,6 @@ POSTGIS_PROJ_VERSION=@POSTGIS_PROJ_VERSION@
 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_SPGIST=@HAVE_SPGIST@
 INTERRUPTTESTS=@INTERRUPTTESTS@
@@ -210,13 +209,13 @@ ifeq ($(HAVE_SPGIST),yes)
        regress_spgist_index_nd
 endif
 
-ifeq ($(HAVE_PROTOBUF),yes)
+ifeq (@HAVE_PROTOBUF@,yes)
        # protobuf-c adds:
        # ST_AsMVT, ST_AsGeobuf
        TESTS += \
                mvt \
                mvt_jsonb
-ifeq ($(shell expr "$(PROTOC_VERSION)" ">=" 1001000),1)
+ifeq (@HAVE_GEOBUF@,yes)
        TESTS += \
                geobuf
 endif