#!/bin/sh

usage () {
    cat <<EOF
This script is a part of dictd package.

Usage: dictd-config [OPTIONS]
Options:
  [--help]
  [--version]
  [--libs]
  [--cflags]
  [--plugindir]   Directory where plugin should be installed and searched
  [--dictdir]     Directory where dictionaries should be installed and searched
EOF
}

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

while test $# -ne 0; do
    case $1 in
	--help)
	    usage
	    exit;;
	--version)
	    echo 1.13.3
	    exit;;
	--libs)
	    echo -L${exec_prefix}/lib
	    exit;;
	--cflags)
	    echo -I${prefix}/include
	    exit;;
	--plugindir)
	    echo ${exec_prefix}/libexec
	    exit;;
	--dictdir)
	    echo ${prefix}/share
	    exit;;
	*)
	    echo "invalid argument $1"
	    exit 2
    esac
    shift
done

usage
