dnl @(#) $Header: /afs/sipb/project/tcpdump/repository/pcapture/configure.in,v 1.1.1.2 1997/08/17 23:19:47 jhawk Exp $ (LBL)
dnl
dnl Copyright (c) 1994, 1996, 1997
dnl	The Regents of the University of California.  All rights reserved.
dnl
dnl Process this file with autoconf to produce a configure script.
dnl

AC_INIT(pcapture.c)

AC_CANONICAL_SYSTEM

umask 002

if test -z "$PWD" ; then
	PWD=`pwd`
fi

AC_LBL_C_INIT(V_CCOPT, V_INCLS)

AC_CHECK_HEADERS(fcntl.h malloc.h memory.h)
AC_HEADER_TIME

AC_REPLACE_FUNCS(vfprintf)

AC_LBL_TYPE_SIGNAL

AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS)

V_GROUP=0
case "$target_os" in

irix*)
	V_GROUP=sys
	;;

linux*)
	V_INCLS="$V_INCLS -Ilinux-include"
	;;

osf*)
	V_GROUP=system
	;;

solaris*)
	V_GROUP=sys
	;;
esac

if test -f /dev/bpf0 ; then
	V_GROUP=bpf
fi

AC_LBL_CHECK_TYPE(int32_t, int)
AC_LBL_CHECK_TYPE(u_int32_t, u_int)

AC_LBL_DEVEL(V_CCOPT)

if test -r lbl/gnuc.h ; then
	rm -f gnuc.h
	ln -s lbl/gnuc.h gnuc.h
fi

AC_SUBST(V_CCOPT)
AC_SUBST(V_GROUP)
AC_SUBST(V_INCLS)
AC_SUBST(V_PCAPDEP)

AC_PROG_INSTALL

AC_OUTPUT(Makefile)

if test -f .devel ; then
	make depend
fi
exit 0
