#! /bin/sh
prefix="/usr"
# $Id: chipcard2-client-config.in.in 69 2005-02-24 04:06:00Z aquamaniac $
# Author of this file: Martin Preuss<martin@libchipcard.de>

prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib

result=""

for d in $*; do
    case $d in
	--includes)
	    result="$result    -I/usr/include -I${prefix}/include"
	    ;;
	--libraries)
	    result="$result -L${libdir} -lchipcard2c"
	    ;;
	--vmajor)
	    result="$result 2"
	    ;;
	--vminor)
	    result="$result 1"
	    ;;
	--vpatchlevel)
	    result="$result 9"
	    ;;
	--vbuild)
	    result="$result 0"
	    ;;
	--vtag)
	    result="$result stable"
	    ;;
        --vstring)
	    result="$result 2.1.9"
            ;;
	--datadir)
	    result="$result "
	    ;;
	--servicedir)
	    result="$result ${libdir}/chipcard2-server/services"
	    ;;
	--servicelib)
	    result="$result -L${libdir} -lchipcard2sv"
	    ;;
	--infolib)
	    result="$result -L${libdir} -lchipcard2i"
	    ;;
	*)
	    echo "Usage:"
	    echo "$0 --includes gives you the include flags"
	    echo "$0 --libraries gives you the library flags"
	    echo "$0 --infolib returns the library flags for the info library"
	    echo "$0 --servicelib returns the library flags for the service library"
	    echo "$0 --vmajor gives the major version of LibChipcard2"
	    echo "$0 --vminor gives the minor version of LibChipcard2"
	    echo "$0 --vpatchlevel gives the patchlevel of LibChipcard2"
	    echo "$0 --vbuild gives the build number of LibChipcard2"
	    echo "$0 --vtag gives the tag of LibChipcard2 (cvs, beta or stable)"
	    echo "$0 --vstring returns a version string"
	    echo "$0 --datadir returns the data folder"
	    echo "$0 --servicedir returns the folder which contains services"
	    exit 1
	    ;;
    esac
done
echo $result
