#!/bin/sh
CONFIG_LIBS="-lgdal"
CONFIG_DEP_LIBS=" -L/usr/lib -lgeos_c -L/usr/lib -lsqlite3 -lodbc -lodbcinst -L/usr/lib -lexpat -L/usr/lib -lxerces-c -lpthread -ljasper -lhdf5 -L/usr/lib/hdf -L/usr/lib/hdf -lmfhdf -ldf -logdi -lgif -ljpeg -lgeotiff -ltiff -lpng -lnetcdf -lcfitsio -lpq -L/usr/lib -lpq -lz -lpthread -lm -lrt -ldl  -L/usr/lib/lib -ldap -ldapclient -ldapserver -lpthread -lrx  -lcurl    -lxml2 -lz -lm   -lcurl      -rdynamic -L/usr/lib/mysql -lmysqlclient -lz -lcrypt -lnsl -lm -lssl -lcrypto"
CONFIG_PREFIX="/usr"
CONFIG_CFLAGS="-I/usr/include/gdal"
CONFIG_DATA="/usr/share/gdal"
CONFIG_VERSION="1.7.3"
CONFIG_OGR_ENABLED=yes
CONFIG_FORMATS="gxf gtiff hfa aigrid aaigrid ceos ceos2 iso8211 xpm sdts raw dted mem jdem envisat elas fit vrt usgsdem l1b nitf bmp pcidsk airsar rs2 ilwis rmf leveller sgi srtmhgt idrisi gsg ingr ers jaxapalsar dimap gff cosar pds adrg coasp tsx terragen blx msgn til r northwood saga wcs wms dods grib jpeg2000 hdf5 hdf4 ogdi gif jpeg png netcdf pcraster fits  rik rasterlite wktraster"
usage()
{
	cat <<EOF
Usage: gdal-config [OPTIONS]
Options:
	[--prefix[=DIR]]
	[--libs]
	[--dep-libs]
	[--cflags]
	[--datadir]
	[--version]
	[--ogr-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 $CONFIG_OGR_ENABLED
    ;;

  --formats)
    echo $CONFIG_FORMATS
    ;;

  *)
    usage 1 1>&2
    ;;

esac
