]> granicus.if.org Git - postgis/commitdiff
Forced use of CAPI when building against GEOS 3.x.x or superior
authorSandro Santilli <strk@keybit.net>
Mon, 14 Nov 2005 10:05:22 +0000 (10:05 +0000)
committerSandro Santilli <strk@keybit.net>
Mon, 14 Nov 2005 10:05:22 +0000 (10:05 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@2038 b70326c6-7e19-0410-871a-916f4a2858ee

configure.in

index 0d5ab2c3185b178fa6c69c7db749b1d2298f4264..10670bc35ecf6826efb5d6d9822c7f76d915fa7a 100644 (file)
@@ -176,17 +176,24 @@ AC_ARG_WITH(geos,
        fi
 )
 
-AC_ARG_WITH(geos-capi, 
-[  --with-geos-capi        enable use of GEOS C API ],
-       if test "$with_geos_capi" != "no"; then
-               USE_GEOS_CAPI=1
-       fi
-)
-
 if test $USE_GEOS -gt 0; then
        GEOS_DIR=`$GEOSCONFIG --prefix`
+       GEOS_MAJOR=`$GEOSCONFIG --version | cut -d. -f1`
+       if test "$GEOS_MAJOR" = "@GEOS_VERSION@"; then
+               GEOS_MAJOR = 1
+       fi
+       if test $GEOS_MAJOR -gt 2; then
+               USE_GEOS_CAPI=1
+       fi
 fi
 
+dnl AC_ARG_WITH(geos-capi, 
+dnl [  --with-geos-capi        enable use of GEOS C API ],
+dnl    if test "$with_geos_capi" != "no"; then
+dnl            USE_GEOS_CAPI=1
+dnl    fi
+dnl )
+
 AC_SUBST(USE_PROJ)
 AC_SUBST(PROJ_DIR)
 USE_PROJ=0