| | 69 | dnl ########################################################### |
| | 70 | dnl GDAL |
| | 71 | dnl ########################################################### |
| | 72 | AC_ARG_WITH(gdal,[ --with-gdal=ARG Path to gdal-config],,) |
| | 73 | if test "$with_gdal" = "yes" -o "$with_gdal" = "" ; then |
| | 74 | AC_PATH_PROG(GDAL_CONFIG, gdal-config, no) |
| | 75 | else |
| | 76 | if test "`basename xx/$with_gdal`" = "gdal-config" ; then |
| | 77 | AC_MSG_RESULT([GDAL enabled with provided gdal-config]) |
| | 78 | GDAL_CONFIG="$with_gdal" |
| | 79 | else |
| | 80 | AC_MSG_ERROR([--with-gdal should have yes or a path to gdal-config]) |
| | 81 | fi |
| | 82 | fi |
| | 83 | if test "$GDAL_CONFIG" != "no" ; then |
| | 84 | VERSION=`$GDAL_CONFIG --version` |
| | 85 | AC_MSG_RESULT([$GDAL_CONFIG reports version $VERSION]) |
| | 86 | LIBS="`$GDAL_CONFIG --libs` $LIBS" |
| | 87 | GDAL_INC=`$GDAL_CONFIG --cflags` |
| | 88 | GDAL_PREFIX=`$GDAL_CONFIG --prefix` |
| | 89 | OGR=`$GDAL_CONFIG --ogr-enabled` |
| | 90 | if test "$OGR" != "yes" ; then |
| | 91 | AC_MSG_ERROR([$GDAL_CONFIG says OGR is not enabled]) |
| | 92 | fi |
| | 93 | fi |
| | 94 | AC_SUBST(GDAL_INC GDAL_PREFIX) |
| | 95 | |