#!/bin/sh

prefix="/usr"
exec_prefix="/usr"
VERSION="1.6.16"
LIBS="  -lcrypto"
INCLUDEDIR="/usr/include"
ARCH="`uname -m`"

case $ARCH in
	x86_64 | amd64 | sparc64 | s390x | ppc64)

		LIBDIR="/usr/lib64"
		LIBDIR_SEC="/usr/lib"
		;;
	* )
		LIBDIR="/usr/lib"
		LIBDIR_SEC="usr/lib64"
		;;
esac

LDFLAGS="  -L$LIBDIR -lpython2.6"
LDFLAGS_SEC="  -L$LIBDIR_SEC -lpython2.6"

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 = "--libs_sec" ]
    then
        echo "${LDFLAGS_SEC} -L${LIBDIR_SEC} ${LIBS} -lldns"
    fi
    if [ $arg = "-h" ] || [ $arg = "--help" ]
    then
        echo "Usage: $0 [--cflags] [--libs] [--libs_sec] [--version]"
    fi
    if [ $arg = "--version" ]
    then
        echo "${VERSION}"
    fi
done
