#!/bin/sh

prefix=/usr/local
exec_prefix=${prefix}

bindir=${exec_prefix}/bin
libexecdir=${exec_prefix}/libexec
datadir=${prefix}/share
sysconfdir=/etc
sharedstatedir=${prefix}/com
localstatedir=/var
libdir=${exec_prefix}/lib
infodir=/usr/local/info
mandir=/usr/local/man
includedir=${prefix}/include

LIBS="-L/usr/local/lib -lxml++-2.6 -lxml2 -lglibmm-2.4 -lgobject-2.0 -lglib-2.0 -lintl -lsigc-2.0 -L/usr/local/lib -L/usr/X11R6/lib -pthread -lMagick++ -lMagickCore -L/usr/local/lib -Wl,-rpath-link,/usr/X11R6/lib -lcairo -L/usr/local/lib -Wl,-rpath-link,/usr/X11R6/lib -L/usr/X11R6/lib -lpangocairo-1.0 -lcairo -lpangoft2-1.0 -lpango-1.0 -lm -lgobject-2.0 -lglib-2.0 -lintl -lfontconfig -lfreetype -lz -lpthread -L/usr/local/lib -lsigc-2.0 -L/usr/local/lib -lintl -L/usr/local/lib -liconv -lc -R/usr/local/lib"

VERSION=0.64.1
PACKAGE=synfig

CFLAGS=""

usage()
{
	cat <<EOF
Usage: synfig-config [OPTION]...

Generic options
  --version	print installed version of synfig.
  --help        display this help and exit.

Compilation support options
  --cflags      print pre-processor and compiler flags
  --libs        print library linking information
  
Install directories
  --prefix --exec-prefix --bindir --libexecdir --datadir
  --sysconfdir --sharedstatedir --localstatedir --libdir --infodir
  --mandir --includedir

EOF
	
	exit 1
}

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

case $1 in
--version)
	echo $PACKAGE $VERSION
	exit 0
	;;
--exec-prefix)
	echo $exec_prefix
	exit 0
	;;
--prefix)
	echo $prefix
	exit 0
	;;
--help)
	usage 0
	;;
--cflags)
	echo $CFLAGS
	exit 0
	;;
--cxxflags)
	echo $CFLAGS
	exit 0
	;;
--libs)
	echo $LIBS
	exit 0
	;;
esac

echo Unknown option "$1"
exit 4
