#!/bin/sh

prefix="/usr"
exec_prefix="/usr"
VERSION="1.6.4"
CFLAGS="-Wwrite-strings -W -Wall -O2 -g -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -D_GNU_SOURCE"
CPPFLAGS=""
LDFLAGS=" -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1"
LIBS="-lnsl -lcrypto  -lcrypto"
LIBDIR="/usr/lib64"
INCLUDEDIR="/usr/include"

for arg in $@
do
    if [ $arg = "--cflags" ]
    then
        echo "-I${INCLUDEDIR}"
    fi
    if [ $arg = "--libs" ]
    then
        echo "${LDFLAGS} -L${LIBDIR} ${LIBS} -lldns"
    fi
    if [ $arg = "-h" ] || [ $arg = "--help" ]
    then
        echo "Usage: $0 [--cflags] [--libs] [--version]"
    fi
    if [ $arg = "--version" ]
    then
        echo "${VERSION}"
    fi
done
