#! /bin/sh
prefix="/usr"
# $Id: chipcard-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=${prefix}
libdir=${exec_prefix}/lib
datarootdir=${prefix}/share
datadir=${datarootdir}

result=""

for d in $*; do
    case $d in
	--includes)
	    result="$result -I${prefix}/include -I/usr/include/gwenhywfar3"
	    ;;
	--client-libs)
	    result="$result -L${libdir} -lchipcardc"
	    ;;
	--vmajor)
	    result="$result 4"
	    ;;
	--vminor)
	    result="$result 2"
	    ;;
	--vpatchlevel)
	    result="$result 3"
	    ;;
	--vbuild)
	    result="$result 0"
	    ;;
	--vtag)
	    result="$result stable"
	    ;;
        --vstring)
	    result="$result 4.2.3"
            ;;
	--client-datadir)
	    result="$result ${datadir}/chipcard/client"
	    ;;
	--server-datadir)
	    result="$result ${datadir}/chipcard/server"
	    ;;
	--driverdir)
	    result="$result ${libdir}/chipcard/server/drivers"
	    ;;
	--servicedir)
	    result="$result ${libdir}/chipcard/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 LibChipcard"
	    echo "$0 --vminor gives the minor version of LibChipcard"
	    echo "$0 --vpatchlevel gives the patchlevel of LibChipcard"
	    echo "$0 --vbuild gives the build number of LibChipcard"
	    echo "$0 --vtag gives the tag of LibChipcard (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
