Andrew Geissler | 615f2f1 | 2022-07-15 14:00:58 -0500 | [diff] [blame^] | 1 | diff -rupN --no-dereference libspatialite-5.0.1/configure.ac libspatialite-5.0.1-new/configure.ac |
| 2 | --- libspatialite-5.0.1/configure.ac 2021-03-08 08:57:19.015858195 +0100 |
| 3 | +++ libspatialite-5.0.1-new/configure.ac 2021-03-08 08:57:19.017858195 +0100 |
| 4 | @@ -312,35 +312,10 @@ AC_ARG_ENABLE(geos, [AS_HELP_STRING( |
| 5 | [], [enable_geos=yes]) |
| 6 | if test x"$enable_geos" != "xno"; then |
| 7 | #----------------------------------------------------------------------- |
| 8 | - # --with-geosconfig |
| 9 | - # |
| 10 | - AC_ARG_WITH([geosconfig], |
| 11 | - [AS_HELP_STRING([--with-geosconfig=FILE], [specify an alternative geos-config file])], |
| 12 | - [GEOSCONFIG="$withval"], [GEOSCONFIG=""]) |
| 13 | - if test "x$GEOSCONFIG" = "x"; then |
| 14 | - # GEOSCONFIG was not specified, so search within the current path |
| 15 | - AC_PATH_PROG([GEOSCONFIG], [geos-config]) |
| 16 | - # If we couldn't find geos-config, display an error |
| 17 | - if test "x$GEOSCONFIG" = "x"; then |
| 18 | - AC_MSG_ERROR([could not find geos-config within the current path. You may need to try re-running configure with a --with-geosconfig parameter.]) |
| 19 | - fi |
| 20 | - else |
| 21 | - # GEOSCONFIG was specified; display a message to the user |
| 22 | - if test "x$GEOSCONFIG" = "xyes"; then |
| 23 | - AC_MSG_ERROR([you must specify a parameter to --with-geosconfig, e.g. --with-geosconfig=/path/to/geos-config]) |
| 24 | - else |
| 25 | - if test -f $GEOSCONFIG; then |
| 26 | - AC_MSG_RESULT([Using user-specified geos-config file: $GEOSCONFIG]) |
| 27 | - else |
| 28 | - AC_MSG_ERROR([the user-specified geos-config file $GEOSCONFIG does not exist]) |
| 29 | - fi |
| 30 | - fi |
| 31 | - fi |
| 32 | - # Extract the linker and include flags |
| 33 | - GEOS_LDFLAGS=`$GEOSCONFIG --ldflags` |
| 34 | - GEOS_CFLAGS=-I`$GEOSCONFIG --includes` |
| 35 | - AC_SUBST([GEOS_LDFLAGS]) |
| 36 | - AC_SUBST([GEOS_CFLAGS]) |
| 37 | + PKG_CHECK_MODULES([GEOS], [geos], , AC_MSG_ERROR(['geos' is required but it doesn't seem to be installed on this system.])) |
| 38 | + GEOS_LDFLAGS="$GEOS_LIBS" |
| 39 | + AC_SUBST(GEOS_CFLAGS) |
| 40 | + AC_SUBST(GEOS_LDFLAGS) |
| 41 | # Ensure that we can parse geos_c.h |
| 42 | CPPFLAGS_SAVE="$CPPFLAGS" |
| 43 | CPPFLAGS="$GEOS_CFLAGS" |