--- gdal-1.9.0/configure.in.orig 2012-01-04 08:03:42.000000000 +0100 +++ gdal-1.9.0/configure.in 2012-01-19 20:50:08.902476176 +0100 @@ -1493,7 +1493,7 @@ AC_MSG_CHECKING([libnetcdf version with $ncdump]) netcdf_version=`$ncdump 2>&1 | grep "netcdf library version" | awk '{gsub(/"/,"");print $4}'` AC_MSG_RESULT([got $netcdf_version]) - if test "$netcdf_version" != "" -a "${netcdf_version:0:1}" == "4" ; then + if test "$netcdf_version" != "" -a "$(echo ${netcdf_version} | sed 's/^\(.\).*/\1/')" == "4" ; then nc_config=$NETCDF_ROOT"/bin/nc-config" fi fi