#!/bin/sh
CONFIG_LIBS="-L/usr/local/lib -lgdal"
CONFIG_DEP_LIBS=" -lcrypto -ljson-c -L/usr/local/lib -L/usr/local/lib -lfreexl -lqhull -L/usr/local/lib -lgeos_c -lwebp  -lsqlite3 -lexpat -L/usr/local/lib -lopenjp2 -L/usr/local -L/usr/local/lib -ljasper -L/usr/local/lib -lnetcdf -L/usr/local/lib -lhdf5  -L/usr/local -L/usr/local/lib -lgif -L/usr/local -L/usr/local/lib -ljpeg -L/usr/local/lib -lgeotiff -L/usr/local/lib -ltiff -L/usr/local -L/usr/local/lib -lpng -L/usr/local/lib -lpq -L/usr/local/lib -lzstd -lproj -lz -lpthread -lm  -L/usr/local/lib -lspatialite -lpcre   -L/usr/local/lib -lcurl -lnghttp2 -lssl -lcrypto -lssl -lcrypto -lz          -liconv  -L/usr/local/lib -lxml2 -lz -L/usr/local/lib -llzma -lpthread -L/usr/local/lib -liconv -lm      "
CONFIG_PREFIX="/usr/local"
CONFIG_CFLAGS="-I/usr/local/include"
CONFIG_DATA="/usr/local/share/gdal"
CONFIG_VERSION="3.0.4"
CONFIG_OGR_ENABLED=yes
CONFIG_GNM_ENABLED=yes
CONFIG_FORMATS="derived gtiff hfa mem vrt  aaigrid adrg aigrid airsar arg blx bmp bsb cals ceos ceos2 coasp cosar ctg dimap dted e00grid elas envisat ers fit gff gsg gxf hf2 idrisi ignfheightasciigrid ilwis ingr iris iso8211 jaxapalsar jdem kmlsuperoverlay l1b leveller map mrf msgn ngsgeoid nitf northwood pds prf r raw rmf rs2 safe saga sdts sentinel2 sgi sigdem srtmhgt terragen til tsx usgsdem xpm xyz zmap rik ozi grib eeda plmosaic rda wcs wms wmts daas rasterlite mbtiles pdf webp openjpeg jpeg2000 netcdf hdf5 gif jpeg png pcraster  pcidsk postgisraster"
usage()
{
	cat <<EOF
Usage: gdal-config [OPTIONS]
Options:
	[--prefix[=DIR]]
	[--libs]
	[--dep-libs]
	[--cflags]
	[--datadir]
	[--version]
	[--ogr-enabled]
	[--gnm-enabled]
	[--formats]
EOF
	exit $1
}

if test $# -eq 0; then
	usage 1 1>&2
fi

case $1 in
  --libs)
    echo $CONFIG_LIBS
    ;;

  --dep-libs)
    echo $CONFIG_DEP_LIBS
    ;;

  --cflags)
    echo $CONFIG_CFLAGS
    ;;

  --datadir)
    echo $CONFIG_DATA
    ;;

  --prefix)
    echo $CONFIG_PREFIX
    ;;

  --version)
    echo $CONFIG_VERSION
    ;;

  --ogr-enabled)
    echo yes
    ;;

  --gnm-enabled)
    echo $CONFIG_GNM_ENABLED
    ;;

  --formats)
    echo $CONFIG_FORMATS
    ;;

  *)
    usage 1 1>&2
    ;;

esac
