[postgis-tickets] r17854 - Use a clean environment when detecting C++ libraries

Raul raul at rmr.ninja
Thu Oct 3 02:40:08 PDT 2019


Author: algunenano
Date: 2019-10-03 02:40:08 -0700 (Thu, 03 Oct 2019)
New Revision: 17854

Modified:
   trunk/NEWS
   trunk/configure.ac
Log:
Use a clean environment when detecting C++ libraries

Closes #4520
Closes https://github.com/postgis/postgis/pull/488



Modified: trunk/NEWS
===================================================================
--- trunk/NEWS	2019-10-02 18:22:22 UTC (rev 17853)
+++ trunk/NEWS	2019-10-03 09:40:08 UTC (rev 17854)
@@ -8,9 +8,9 @@
 
 * Major highlights *
   - #4519, Fix getSRIDbySRS crash (Raúl Marín)
+  - #4520, Use a clean environment when detecting C++ libraries (Raúl Marín)
 
 
-
 PostGIS 3.0.0beta1
 2019/09/28
 For full changes and enhancements, refer to PostGIS 3.0.0.

Modified: trunk/configure.ac
===================================================================
--- trunk/configure.ac	2019-10-02 18:22:22 UTC (rev 17853)
+++ trunk/configure.ac	2019-10-03 09:40:08 UTC (rev 17854)
@@ -987,6 +987,7 @@
 
 	CPPFLAGS_SAVE="$CPPFLAGS"
 	LDFLAGS_SAVE="$LDFLAGS"
+        LIBS_SAVE="$LIBS"
 
 	dnl Try pkgconfig first
 	if test -n "$PKG_CONFIG"; then
@@ -1049,6 +1050,7 @@
 
 	CPPFLAGS="$CPPFLAGS_SAVE"
 	LDFLAGS="$LDFLAGS_SAVE"
+        LIBS="$LIBS_SAVE"
 
 	dnl confirm that protobuf compiler is available
 	AC_PATH_PROG(PROTOCC, protoc-c)
@@ -1058,7 +1060,7 @@
 	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
@@ -1506,10 +1508,14 @@
             CFLAGS_SAVE="$CFLAGS"
             CXXFLAGS_SAVE="$CXXFLAGS"
             CPPFLAGS_SAVE="$CPPFLAGS"
+            LDFLAGS_SAVE="$LDFLAGS"
+            LIBS_SAVE="$LIBS"
 
             WAGYU_CXX=`"$PG_CONFIG" --cc`
             CPPFLAGS="-x c++"
             CFLAGS=""
+            LDFLAGS=""
+            LIBS=""
             CXX="$WAGYU_CXX"
             AC_PROG_CXX
             AX_CXX_COMPILE_STDCXX(11, noext, mandatory)
@@ -1537,6 +1543,8 @@
             CFLAGS="$CFLAGS_SAVE"
             CXXFLAGS="$CXXFLAGS_SAVE"
             CPPFLAGS="$CPPFLAGS_SAVE"
+            LDFLAGS="$LDFLAGS_SAVE"
+            LIBS="$LIBS_SAVE"
 
             HAVE_WAGYU=yes
             AC_DEFINE([HAVE_WAGYU], [1], [Define to 1 if wagyu is being built])



More information about the postgis-tickets mailing list