#!/bin/sh
# $OpenBSD: nasl-config,v 1.4 2002/05/25 10:38:58 reinhard Exp $
#
#   NASL configuration script
#
#   Original by dug song <dugsong@monkey.org>
#   Enhanced by Matt Behrens <matt@openbsd.org>
#

PREFIX=@@WRKSRC@@/libnasl
LIBDIR=$PREFIX/nasl/.libs
INCLUDEDIR=$PREFIX/include
VERSION=@@VERS@@

usage()
{
 echo "Usage : nasl-config [ --cflags | --libs | --version ]"
 exit $1
}


test $# -gt 0 || usage 1

# check whether we have echo -n, depending
# on the current shell, used
case `echo -n` in
\-n)	Xn=   ; Xc='\c' ;;
*)	Xn=-n ; Xc=
esac


while test $# -gt 0; do
 case "$1" in
	--version)
		echo $VERSION
		exit 0
		;;
	--libs)
		echo $Xn "-L$LIBDIR -lnasl $Xc"
		;;
	--cflags)
		echo $Xn "-I$INCLUDEDIR $Xc"
		;;
	--help | -h)
		usage 0
		;;
	*)
		usage 1
		;;
 esac
 shift
done

echo 	
	
