#! /bin/sh
prefix="/usr"
# $Id: chipcard3-client-config.in.in 217 2006-09-08 02:37:16Z martin $
# Author of this file: Martin Preuss<martin@libchipcard.de>

prefix=/usr
exec_prefix=/usr
libdir=/usr/lib64
datarootdir=${prefix}/share
datadir=/usr/share

result=""

for d in $*; do
    case $d in
	--includes)
	    result="$result -I${prefix}/include -I/usr/include"
	    ;;
	--client-libs)
	    result="$result -L${libdir} -lchipcard3c"
	    ;;
	--vmajor)
	    result="$result 3"
	    ;;
	--vminor)
	    result="$result 0"
	    ;;
	--vpatchlevel)
	    result="$result 3"
	    ;;
	--vbuild)
	    result="$result 0"
	    ;;
	--vtag)
	    result="$result stable"
	    ;;
        --vstring)
	    result="$result 3.0.3"
            ;;
	--client-datadir)
	    result="$result ${datadir}/chipcard3/client"
	    ;;
	--server-datadir)
	    result="$result ${datadir}/chipcard3/server"
	    ;;
	--driverdir)
	    result="$result ${libdir}/chipcard3/server/drivers"
	    ;;
	--servicedir)
	    result="$result ${libdir}/chipcard3/server/services"
	    ;;
	*)
	    echo "Usage:"
	    echo "$0 --includes gives you the include flags"
	    echo "$0 --client-libs gives the client library flags"
	    echo "$0 --vmajor gives the major version of LibChipcard3"
	    echo "$0 --vminor gives the minor version of LibChipcard3"
	    echo "$0 --vpatchlevel gives the patchlevel of LibChipcard3"
	    echo "$0 --vbuild gives the build number of LibChipcard3"
	    echo "$0 --vtag gives the tag of LibChipcard3 (cvs, beta or stable)"
	    echo "$0 --vstring returns a version string"
	    echo "$0 --client-datadir returns the data folder of the client"
	    echo "$0 --server-datadir returns the data folder of the server"
	    echo "$0 --driverdir returns the folder which contains drivers"
	    exit 1
	    ;;
    esac
done
echo $result
