#!/bin/sh

prefix="/usr/local"
exec_prefix="${prefix}"
datarootdir="${prefix}/share"
bindir="${exec_prefix}/bin"
datadir="${datarootdir}"

CXX="c++"
CXXFLAGS=" -O2 -pipe  -D_FORTIFY_SOURCE=2 -Wall -W -Wno-unused-parameter -Woverloaded-virtual -Wshadow -I/usr/local/include -I/usr/include -fvisibility=hidden -fPIC -I/usr/local/include/znc"
MODLINK="-shared"
# LIBS="-L/usr/local/lib -lcares -L/usr/lib -lssl -lcrypto"
# No libs needed, ZNC links against $LIBS and thus modules don't need to.
LIBS=""
MODDIR="${exec_prefix}/lib/znc"
DATADIR="${datarootdir}/znc"
VERSION="0.206"

# Ugly cygwin stuff :(
LIBZNC=""
LIBZNCDIR=""
if test "x" = "x$LIBZNC"; then
	LIBZNCFLAGS=""
else
	LIBZNCFLAGS="-L\"$LIBZNCDIR\" -lznc"
fi

if test -z "$1"; then
	echo "USAGE: $0 <flag>"
	echo "	--cxx        [$CXX]"
	echo "	--cflags     [$CXXFLAGS]"
	echo "	--modlink    [$MODLINK]"
	echo "	--libs       [$LIBS]"
	echo "	--moddir     [$MODDIR]"
	echo "	--datadir    [$DATADIR]"
	echo "	--version    [$VERSION]"
	echo "	--prefix     [$prefix]"
	echo "	--libznc     [$LIBZNCFLAGS]"
	exit 1
fi

case $1 in
	--cxx)
		echo $CXX;;
	--cflags)
		echo $CXXFLAGS;;
	--modlink)
		echo $MODLINK;;
	--include)
		# Left here for backwards compatibility
		;;
	--libs)
		echo $LIBS;;
	--moddir)
		echo $MODDIR;;
	--datadir)
		echo $DATADIR;;
	--version)
		echo $VERSION;;
	--prefix)
		echo $prefix;;
	--libznc)
		echo $LIBZNCFLAGS;;
esac

exit 0

