usage()
{
   cat << EOF
Usage: dolfin-config [options]

       --version  (get version number)
       --cflags   (get compiler flags)
       --libs     (get libraries for linking)
       --compiler (get compiler)

       --cflags_dolfin (for demo programs in the source tree)
       --lflags_dolfin (for demo programs in the source tree)

EOF
   exit $1
}

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

case $1 in
	--version)
		echo $PACKAGE $VERSION
		;;
	--cflags)
      echo $CFLAGS
      ;;
	--libs)
		echo $LFLAGS
      ;;
	--compiler)
		echo $COMPILER
      ;;
	--cflags_dolfin)
      echo $CFLAGS_DOLFIN
      ;;
	--libs_dolfin)
		echo $LIBS_DOLFIN
      ;;
	*)
      usage 1 1>&2
      ;;
esac
