Update of /cvsroot/monetdb/geom
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv22923/geom

Modified Files:
      Tag: Geom_0-4
        configure.ag 
Log Message:

improved/extended check for Geos library:
The differences between Geos 2.2.3 (default on, e.g., Fedora 8 & 9)
and Geos 3.0.0 (e.g., on Gentoo) are significant and "incompatible".
Our code base does not support version 3.0.0, yet, hence, we now
check whether we find a Geos version >= 2.0.0 and < 3.0.0
(assuming that all 2.x.y vesions are "compatible" and similar to
the tested 2.2.3).
If no suitable version if found, we abandon compilation.


U configure.ag
Index: configure.ag
===================================================================
RCS file: /cvsroot/monetdb/geom/configure.ag,v
retrieving revision 1.12.2.2
retrieving revision 1.12.2.3
diff -u -d -r1.12.2.2 -r1.12.2.3
--- configure.ag        26 May 2008 18:45:11 -0000      1.12.2.2
+++ configure.ag        5 Jun 2008 16:23:53 -0000       1.12.2.3
@@ -92,7 +92,10 @@
 fi
 
 dnl geos
+GEOS_VERSION_REQUIRED_MIN=2.0.0
+GEOS_VERSION_REQUIRED_MAX=3.0.0
 have_geos=auto
+GEOS_CONFIG=''
 GEOS_INCS=''
 GEOS_LIBS=''
 AC_ARG_WITH(geos,
@@ -102,12 +105,39 @@
 if test "x$have_geos" != xno; then
        case "$have_geos" in
        yes|auto)
+               XPATH="$PATH"
                ;;
        *)
-               GEOS_INCS="-I$have_geos/include"
-               GEOS_LIBS="-L$have_geos/lib"
+               XPATH="$have_geos/bin"
                ;;
        esac
+       AC_PATH_PROG(GEOS_CONFIG,geos-config,,$XPATH)
+       if test "x$GEOS_CONFIG" = x; then
+               AC_MSG_ERROR([geos-config not found in $XPATH])
+               have_geos=no
+       fi
+fi
+if test "x$have_geos" != xno; then
+       AC_MSG_CHECKING([for Geos >= $GEOS_VERSION_REQUIRED_MIN, but < 
$GEOS_VERSION_REQUIRED_MAX])
+       GEOS_VERSION="`$GEOS_CONFIG --version`"
+       AC_MSG_RESULT(found $GEOS_VERSION)
+       wrong=''
+       if test MONETDB_VERSION_TO_NUMBER(echo $GEOS_VERSION) -lt 
MONETDB_VERSION_TO_NUMBER(echo $GEOS_VERSION_REQUIRED_MIN); then
+               wrong="too old"
+       fi
+       if test MONETDB_VERSION_TO_NUMBER(echo $GEOS_VERSION) -ge 
MONETDB_VERSION_TO_NUMBER(echo $GEOS_VERSION_REQUIRED_MAX); then
+               wrong="not yet supported"
+       fi
+       if test "x$wrong" != x; then
+               AC_MSG_ERROR([Geos version $GEOS_VERSION is $wrong])
+               have_geos=no
+       fi
+fi
+if test "x$have_geos" != xno; then
+       dnl GEOS_INCS="-I`$GEOS_CONFIG --includes`"
+       dnl GEOS_LIBS="`$GEOS_CONFIG --libs`"
+       GEOS_INCS="`$GEOS_CONFIG --cflags`"
+       GEOS_LIBS="`$GEOS_CONFIG --ldflags`"
        save_CPPFLAGS="$CPPFLAGS"
        CPPFLAGS="$CPPFLAGS $GEOS_INCS"
        AC_CHECK_HEADER(geos_c.h, AC_DEFINE(HAVE_GEOS_C_H, 1, [Define to 1 if 
you have the <geos_c.h> header file.]), [AC_MSG_ERROR([geos_c.h not found]); 
have_geos=no])


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to