Blob Blame Raw
#!/bin/sh

VERSION=@VERSION@
PACKAGE=@PACKAGE@

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

Generic options
  --version	print installed version of ETL.
  --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)
	pkg-config --variable=exec_prefix ETL
	exit 0
	;;
--prefix)
	pkg-config --variable=prefix ETL
	exit 0
	;;
--help)
	usage 0
	;;
--cxxflags)
	pkg-config --cflags ETL
	exit 0
	;;
--cflags)
	pkg-config --cflags ETL
	exit 0
	;;
--libs)
	pkg-config --libs ETL
	exit 0
	;;
esac

echo Unknown option "$1"
exit 4