mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-30 12:59:06 +08:00
38 lines
1.6 KiB
Diff
38 lines
1.6 KiB
Diff
diff --git a/configure.ac b/configure.ac
|
|
index a9561069c..7adef1bf5 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -87,6 +87,7 @@ AC_CONFIG_FILES([Makefile \
|
|
#-----------------------------------------------------------------------
|
|
# --with-geosconfig
|
|
#
|
|
+if 0; then
|
|
AC_ARG_WITH([geosconfig],
|
|
[AS_HELP_STRING([--with-geosconfig=FILE], [specify an alternative geos-config file])],
|
|
[GEOSCONFIG="$withval"], [GEOSCONFIG=""])
|
|
@@ -112,6 +113,7 @@ fi
|
|
# Extract the linker and include flags
|
|
GEOS_LDFLAGS=`$GEOSCONFIG --ldflags`
|
|
GEOS_CFLAGS=-I`$GEOSCONFIG --includes`
|
|
+fi
|
|
AC_SUBST([GEOS_LDFLAGS])
|
|
AC_SUBST([GEOS_CFLAGS])
|
|
# Ensure that we can parse geos_c.h
|
|
@@ -120,6 +122,7 @@ CPPFLAGS="$GEOS_CFLAGS"
|
|
AC_CHECK_HEADERS([geos_c.h],, [AC_MSG_ERROR([could not find geos_c.h - you may need to specify the directory of a geos-config file using --with-geosconfig])])
|
|
CPPFLAGS="$CPPFLAGS_SAVE"
|
|
# Ensure we can link against libgeos_c
|
|
+if 0; then
|
|
LIBS_SAVE="$LIBS"
|
|
LIBS="$GEOS_LDFLAGS"
|
|
AC_SEARCH_LIBS(GEOSContext_setErrorMessageHandler_r,geos_c,,AC_MSG_ERROR([could not find libgeos_c (or obsolete 'libgeos_c' < v.3.5.0 found) - you may need to specify the directory of a geos-config file using --with-geosconfig]))
|
|
@@ -127,6 +130,8 @@ LIBS="$LIBS_SAVE"
|
|
LIBS="$LIBS $GEOS_LDFLAGS -lgeos_c"
|
|
GEOS_MAJOR_VERSION=`$GEOSCONFIG --version | cut -d. -f1 | sed 's/[[^0-9]]//g'`
|
|
GEOS_MINOR_VERSION=`$GEOSCONFIG --version | cut -d. -f2 | sed 's/[[^0-9]]//g'`
|
|
+fi
|
|
+LIBS="$LIBS $GEOS_LDFLAGS"
|
|
RTGEOM_GEOS_VERSION="$GEOS_MAJOR_VERSION$GEOS_MINOR_VERSION"
|
|
AC_DEFINE_UNQUOTED([RTGEOM_GEOS_VERSION], [$RTGEOM_GEOS_VERSION], [GEOS library version])
|
|
AC_SUBST([RTGEOM_GEOS_VERSION])
|