Ignore:
Timestamp:
Oct 31, 2014, 5:37:04 PM (9 years ago)
Author:
david
Message:

-add libgeos, libcgal checking

Location:
trunk/zoo-project/zoo-kernel
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/zoo-project/zoo-kernel/ZOOMakefile.opts.in

    r520 r521  
    2121XSLT_CFLAGS=@XSLT_CPPFLAGS@
    2222XSLT_LDFLAGS=@XSLT_LDFLAGS@
     23
     24GEOS_CFLAGS=@GEOS_CPPFLAGS@
     25GEOS_LDFLAGS=@GEOS_LDFLAGS@
     26
     27CGAL_CFLAGS=@CGAL_CPPFLAGS@
     28CGAL_LDFLAGS=@CGAL_LDFLAGS@
    2329
    2430PYTHONCFLAGS=@PYTHON_CPPFLAGS@
  • trunk/zoo-project/zoo-kernel/configure.ac

    r520 r521  
    249249# Check headers file
    250250CPPFLAGS_SAVE="$CPPFLAGS"
    251 CPPFLAGS="$XML2_CPPFLAGS"
     251CPPFLAGS="$XSLT_CPPFLAGS"
    252252AC_CHECK_HEADERS([libxslt/xslt.h libxslt/xsltInternals.h libxslt/transform.h libxslt/xsltutils.h],
    253253                 [], [AC_MSG_ERROR([could not find headers include related to libxlst])])
    254254
    255 # Ensure we can link against libxslt
    256 LIBS_SAVE="$LIBS"
    257 LIBS="$XSLT_LDFLAGS"
    258 
    259255AC_SUBST([XSLT_CPPFLAGS])
    260256AC_SUBST([XSLT_LDFLAGS])
     
    262258
    263259
    264 
    265 
     260# ===========================================================================
     261# Detect if libgeos is installed
     262# ===========================================================================
     263
     264AC_ARG_WITH([geosconfig],
     265        [AS_HELP_STRING([--with-geosconfig=FILE], [specify an alternative geos-config file])],
     266        [GEOSCONFIG="$withval"], [GEOSCONFIG=""])
     267
     268if test "x$GEOSCONFIG" = "x"; then
     269        # GEOSCONFIG was not specified, so search within the current path
     270        AC_PATH_PROG([GEOSCONFIG], [geos-config])
     271
     272        # If we couldn't find geos-config, display a warning
     273        if test "x$GEOSCONFIG" = "x"; then
     274                AC_MSG_WARN([could not find geos-config from libgeos within the current path. You may need to try re-running configure with a --with-geosconfig parameter.])
     275        fi
     276else
     277        # GEOSCONFIG was specified; display a message to the user
     278        if test "x$GEOSCONFIG" = "xyes"; then
     279                AC_MSG_WARN([you must specify a parameter to --with-geosconfig, e.g. --with-geosconfig=/path/to/geos-config])
     280        else
     281                if test -f $GEOSCONFIG; then
     282                        AC_MSG_RESULT([Using user-specified geos-config file: $GEOSCONFIG])
     283                else
     284                        AC_MSG_ERROR([the user-specified geos-config file $GEOSCONFIG does not exist])
     285                fi     
     286        fi
     287fi
     288
     289GEOS_LDFLAGS=`$GEOSCONFIG --libs`
     290GEOS_CPPFLAGS=`$GEOSCONFIG --cflags`
     291
     292# Check headers file
     293CPPFLAGS_SAVE="$CPPFLAGS"
     294CPPFLAGS="$GEOS_CPPFLAGS"
     295AC_CHECK_HEADERS([geos_c.h],
     296                 [], [AC_MSG_WARN([could not find headers include related to libgeos])])
     297
     298AC_SUBST([GEOS_CPPFLAGS])
     299AC_SUBST([GEOS_LDFLAGS])
     300
     301
     302# ===========================================================================
     303# Detect if cgal is installed
     304# ===========================================================================
     305
     306AC_ARG_WITH([cgal],
     307        [AS_HELP_STRING([--with-cgal=PATH], [specify an alternative location for CGAL setup])],
     308        [CGALPATH="$withval"], [CGALPATH="/usr"])
     309
     310
     311# Check headers file
     312CPPFLAGS_SAVE="$CPPFLAGS"
     313CPPFLAGS="$CGAL_CPPFLAGS"
     314AC_CHECK_HEADERS([CGAL/Delaunay_triangulation_2.h],
     315         [], [AC_MSG_WARN([could not find headers include related to libgeos])])
     316
     317# Extract the linker and include flags
     318CGAL_LDFLAGS="-L$CGALPATH/lib"
     319CGAL_CPPFLAGS="-I$CGALPATH/include"
     320
     321
     322AC_SUBST([CGAL_CPPFLAGS])
     323AC_SUBST([CGAL_LDFLAGS])
    266324#============================================================================
    267325# Detect if mapserver is installed
Note: See TracChangeset for help on using the changeset viewer.

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png