From 0ce6a955e91d18e13c854009c479b61bd37f2467 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Fri, 10 Nov 2006 15:17:10 +0000 Subject: [PATCH] * configure.in (geos detection): use $geos_prefix/lib when --ldflags is not supported by geos-config available. git-svn-id: http://svn.osgeo.org/postgis/trunk@2528 b70326c6-7e19-0410-871a-916f4a2858ee --- ChangeLog | 5 +++++ configure.in | 11 ++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d04d4b02d..cfb3db0df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-11-10 Sandro Santilli + + * configure.in (geos detection): use $geos_prefix/lib when + --ldflags is not supported by geos-config available. + 2006-11-10 Havard Tveite * doc/postgix.xml (Hard Upgrade): add info about createdb params diff --git a/configure.in b/configure.in index 4e065ef32..85c06fc37 100644 --- a/configure.in +++ b/configure.in @@ -147,7 +147,16 @@ AC_ARG_WITH(geos, if test $USE_GEOS -gt 0; then GEOS_DIR=`$GEOSCONFIG --prefix` - GEOS_LDFLAGS=`$GEOSCONFIG --ldflags` + + GEOS_LDFLAGS=`$GEOSCONFIG --ldflags 2> /dev/null` + if test x"$GEOS_LDFLAGS" = "x"; then + # older geos-config versions did not + # support the --ldflags switch, we'll + # default to GEOS_DIR/lib in this case. + # + GEOS_LDFLAGS="$GEOS_DIR/lib" + fi + GEOS_MAJOR=`$GEOSCONFIG --version | cut -d. -f1` if test "$GEOS_MAJOR" = "@GEOS_VERSION@"; then GEOS_MAJOR=1