]> granicus.if.org Git - postgis/commitdiff
Configure: Accept missing proj pg-config script
authorRaúl Marín Rodríguez <rmrodriguez@carto.com>
Mon, 11 Feb 2019 17:54:28 +0000 (17:54 +0000)
committerRaúl Marín Rodríguez <rmrodriguez@carto.com>
Mon, 11 Feb 2019 17:54:28 +0000 (17:54 +0000)
It was introduced in PROJ 4.8 and wasn't included under some
distributions until 4.9

git-svn-id: http://svn.osgeo.org/postgis/trunk@17244 b70326c6-7e19-0410-871a-916f4a2858ee

configure.ac

index 775d97bd4f1cff0e238247c99012f7fdc776ca94..0455f95bd4d4f8e3c5f8dd78637f2ec4bda8764f 100644 (file)
@@ -853,10 +853,15 @@ if test ! "x$PROJDIR" = "x"; then
                fi
        fi
 elif test ! -z "$PKG_CONFIG"; then
-       PKG_CHECK_MODULES([PROJ], [proj], [
+        dnl To keep compatibility with PROJ pre 4.8, default to lproj if not found
+       PKG_CHECK_MODULES([PROJ], [proj],
+            [
                 PROJ_CPPFLAGS="$PROJ_CFLAGS"
                 PROJ_LDFLAGS="$PROJ_LIBS"
-            ], [])
+            ],
+            [
+                PROJ_LDFLAGS="-lproj"
+            ])
 fi