dnl
dnl autoconf script for nstreams
dnl


AC_INIT(.root-dir)
AC_REVISION($Revision: 1.2 $)dnl
AC_CANONICAL_SYSTEM

dnl Set up the main lines of the config script
AC_CONFIG_HEADER(includes/config.h)
AC_PREFIX_DEFAULT("/usr/local")
AC_LANG_C


PWDD=`pwd`

dnl Check for several programs
AC_PROG_CC
AC_PROG_MAKE_SET
AC_PROG_INSTALL
AC_CHECK_HEADERS(errno.h sys/types.h netinet/in.h sys/socket.h netdb.h \
arpa/inet.h string.h signal.h netinet/in_systm.h sys/types.h sys/time.h \
unistd.h ctype.h getopt.h)


CFLAGS="$CFLAGS -I/usr/include/pcap"

AC_CHECK_LIB(pcap, pcap_open_live,,AC_ERROR("*** You need the pcap library"))

test "$prefix" = NONE && prefix=/usr/local
sysconfdir=${prefix}/etc
AC_DEFINE_UNQUOTED(ETC_NSTREAMS_NETWORKS, "${prefix}/etc/nstreams-networks")
AC_DEFINE_UNQUOTED(ETC_NSTREAMS_SERVICES, "${prefix}/etc/nstreams-services")
AC_CHECK_FUNCS(bzero inet_ntoa)
AC_SUBST(PWDD)
AC_OUTPUT(nstreams.tmpl)
