#!/bin/sh

prefix=/usr

PKGLIBDIR=/usr/lib64/c_icap/
LIBDIR=/usr/lib64/
CONFIGDIR=/etc/icapd/
DATADIR=/usr/share/c_icap/
#LOGDIR=
SOCKDIR=/run/icapd

INCDIR=/usr/include
INCDIR2=/usr/include/c_icap

VERSION=0.6.3

CFLAGS="-D_REENTRANT -O2 -fomit-frame-pointer -gdwarf-4 -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2 -fPIC -fstack-protector-all --param=ssp-buffer-size=4 -flto -Wall -D_FILE_OFFSET_BITS=64"
LIBS="-L$LIBDIR -licapapi "
LDFLAGS=""


usage()
{
   cat <<EOTXT
Usage: c-icap-libicapapi-config [OPTIONS]

Where OPTION one of the following:
   --cflags		print preprocessor and compiler flags
   --libs		print linker flags
   --version		print the c-icap library  version
EOTXT
}


case $1 in
    '--cflags')
        echo $CFLAGS" -I"$INCDIR" -I"$INCDIR2;
        ;;
    '--libs')
       echo $LIBS;
       ;;
    '--version')
       echo $VERSION;
       ;;
    *)
        usage
esac;
