#!/bin/sh
CONFIG_LIBS="-L/usr/lib -lgdal"
CONFIG_DEP_LIBS=" -L/usr/lib -lgeos_c -I/usr/include -lsqlite3 -L/usr/lib -lexpat -ljasper -ljpeg -ltiff -lpng -lcfitsio -L/usr/grass/lib -lgrass_vect -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -lgrass_I -lgrass_gproj -lgrass_vask -lgrass_gmath -lgrass_gis -lgrass_datetime -lpq -L/opt/postgresql-8.4.0/lib -lpq -lz  -lm -lrt -ldl    -lcurl -lidn -lssh2 -lssl -lcrypto -lldap -lrt -L/usr/heimdal/lib -lgssapi -lheimntlm -lkrb5 -lhx509 -lcom_err -L/usr/lib -lcrypto -lasn1 -lwind -lroken -lcrypt -ldl -lresolv -pthread -L/usr/heimdal/lib -lgssapi -lheimntlm -lkrb5 -lhx509 -lcom_err -L/usr/lib -lcrypto -lasn1 -lwind -lroken -lcrypt -ldl -lresolv -pthread -lssl -lcrypto -ldl -lz   "
CONFIG_PREFIX="/usr"
CONFIG_CFLAGS="-I/usr/include"
CONFIG_DATA="/usr/share/gdal"
CONFIG_VERSION="1.6.2"
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 wcs wms grib bsb jpeg2000 gif jpeg png pcraster fits grass  rik"
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
