#!/bin/sh
CONFIG_LIBS="-lgd -L/usr/local/lib -lgd -ljpeg -L/usr/X11R6/lib -lfreetype -lz -L/usr/local/lib -lpng -lz       -L/usr/local/lib64 -ltiff -ljpeg -L/usr/X11R6/lib -lfreetype -lz -L/usr/local/lib -lpng -lz   -L/usr/local/lib -lproj -ljpeg -L/usr/local/lib -lpng  -L/usr/local/lib -lgdal -L/usr/local/lib -lgeos_c -L/usr/lib -lexpat -L/usr/local -L/usr/local/lib -ljasper -L/usr/local -L/usr/local/lib -lgif -L/usr/local -L/usr/local/lib -ljpeg -L/usr/local/lib -lgeotiff -ltiff -L/usr/local -L/usr/local/lib -lpng -lpq -L/usr/local/lib -lpq -lz -lm -L/usr/local/lib -lcurl -L/usr/local/lib -lidn -lssl -lcrypto -lssl -lcrypto -lz  -L/usr/local/lib -lpq -lpgport -lxml2 -lssl -lcrypto -lcom_err -lssl -lcrypto -lz -lreadline -ltermcap -lm   -L/usr/local/lib -lcurl -L/usr/local/lib -lidn -lssl -lcrypto -lssl -lcrypto -lz  -L/usr/local/lib -lgeos_c  -liconv  -lz -L/usr/local/lib -lxml2 -lz -L/usr/local/lib -liconv -lm  -lm -pthread  "
CONFIG_DEP_LIBS=""
CONFIG_CFLAGS="-O2 -pipe -fPIC -Wall     -DHAVE_VSNPRINTF -DNEED_STRRSTR        -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_SOS_SVR -DUSE_LIBXML2 -DUSE_CURL -DUSE_WCS_SVR -DUSE_WFS_SVR -DUSE_WMS_SVR    -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_TIFF -DUSE_GDAL -DUSE_OGR -DUSE_GEOS -DGEOS_HAS_SIMPLIFY   -DUSE_PROJ -DUSE_EPPL  -DUSE_AGG     -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DUSE_ICONV -DUSE_ZLIB    -I/usr/local/include/libpng -I/usr/local/include -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include    -I/usr/local/include -I/usr/local/include    -I/usr/local/include -I/usr/local/include/postgresql  -I/usr/local/include   -I/usr/local/include    -I/usr/local/include/libxml2 -I/usr/local/include  "
CONFIG_DEFINES="  -DHAVE_VSNPRINTF -DNEED_STRRSTR        -DUSE_WMS_LYR -DUSE_WFS_LYR -DUSE_SOS_SVR -DUSE_LIBXML2 -DUSE_CURL -DUSE_WCS_SVR -DUSE_WFS_SVR -DUSE_WMS_SVR    -DUSE_POSTGIS -DPOSTGIS_HAS_SERVER_VERSION -DUSE_TIFF -DUSE_GDAL -DUSE_OGR -DUSE_GEOS -DGEOS_HAS_SIMPLIFY   -DUSE_PROJ -DUSE_EPPL  -DUSE_AGG     -DUSE_GD_GIF -DUSE_GD_PNG -DUSE_GD_JPEG -DUSE_GD_WBMP -DUSE_GD_FT -DGD_HAS_FTEX_XSHOW -DGD_HAS_GDIMAGEGIFPTR -DGD_HAS_GETBITMAPFONTS -DUSE_ICONV -DUSE_ZLIB  "
CONFIG_INCLUDES=" -I/usr/local/include/libpng -I/usr/local/include -I/usr/X11R6/include/freetype2 -I/usr/X11R6/include    -I/usr/local/include -I/usr/local/include    -I/usr/local/include -I/usr/local/include/postgresql  -I/usr/local/include   -I/usr/local/include    -I/usr/local/include/libxml2 -I/usr/local/include  "
CONFIG_VERSION="5.6.5"
usage()
{
	cat <<EOF
Usage: mapserver-config [OPTIONS]
Options:
	[--libs]
	[--dep-libs]
	[--cflags]
	[--defines]
	[--includes]
	[--version]
EOF
	exit $1
}

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

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

  --defines)
    echo $CONFIG_DEFINES
    ;;

  --includes)
    echo $CONFIG_INCLUDES
    ;;

  --dep-libs)
    echo $CONFIG_DEP_LIBS
    ;;

  --cflags)
    echo $CONFIG_CFLAGS
    ;;

  --version)
    echo $CONFIG_VERSION
    ;;

  *)
    usage 1 1>&2
    ;;

esac
