#!/bin/sh

prefix=/usr
exec_prefix=${prefix}

usage()
{
    cat <<EOF
Usage: confuse-config [OPTIONS]
Options:
    [--version]
    [--cflags]
    [--libs]
EOF
    exit $1
}

if test $# -eq 0; then
    usage 1 1>&2
fi

while test $# -gt 0; do
    case $1 in
        --version)
        echo "2.4"
        ;;
        --cflags)
        echo_cflags="yes"
        ;;
        --libs)
        echo_libs="yes"
        ;;
        *)
        usage 1 1>&2
        ;;
    esac
    shift
done

if test "$echo_cflags" = "yes"; then
    if test "${prefix}/include" != "/usr/include" ; then
        includes="-I${prefix}/include"
    fi
    echo "$includes"
fi

if test "$echo_libs" = "yes"; then
    echo "-L${exec_prefix}/lib -lconfuse  "
fi
