#!/usr/bin/bash
## -*- sh -*-

tmp=$(echo $* | grep -E -- '--\<help\>|-\<h\>')
if test $# -eq 0 || test -n "$tmp"; then
    echo "prof2-config: configuration tool for the Professor2 generator tuning system"
    echo "              http://projects.hepforge.org/professor/"
    echo
    echo "Usage: $( basename $0 ) [--help|-h] | "
    echo "           [--{prefix,libdir,includedir}] | "
    # echo "           [--version]"
    echo "Options:"
    echo "  --help | -h   : show this help message"
    echo
    echo "  --prefix      : show the installation prefix"
    echo "  --includedir  : show the path to the directory containing the Professor headers"
    echo "  --libdir      : show the path to the directory containing the Professor libraries"
    # echo
    # echo "  --version     : returns Rivet release version number"
    exit 0
fi

fpath=`readlink -f ${BASH_SOURCE[0]}`
profdir=`dirname ${fpath}`/../

tmp=$( echo "$*" | grep -E -- '--\<includedir\>')
test -n "$tmp" && OUT="$OUT ${profdir}include"

tmp=$( echo "$*" | grep -E -- '--\<libdir\>')
test -n "$tmp" && OUT="$OUT ${profdir}lib" #< what about lib64?

tmp=$( echo "$*" | grep -E -- '--\<prefix\>')
test -n "$tmp" && OUT="$OUT ${profdir}"
