#!/bin/sh

prefix="/usr"
exec_prefix="/usr"
VERSION="1.6.12"
CFLAGS="-Wwrite-strings -W -Wall -O2 -g -O2 -g -frecord-gcc-switches -Wstrict-aliasing=2 -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fstack-protector --param=ssp-buffer-size=4 -fPIC -D_GNU_SOURCE"
CPPFLAGS="  -I/usr/include/python2.7"
LDFLAGS=" -Wl,--as-needed -Wl,--no-undefined -Wl,-z,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags  -L/usr/lib64 -lpython2.7"
LIBS="  -lcrypto -ldl"
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
