⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 configure.in

📁 tcp数据流重放工具
💻 IN
字号:
dnl @(#) $Header: /tcpdump/master/libpcap/configure.in,v 1.97 2002/09/04 20:31:33 guy Exp $ (LBL)dnldnl Copyright (c) 1994, 1995, 1996, 1997dnl	The Regents of the University of California.  All rights reserved.dnldnl Process this file with autoconf to produce a configure script.dnlAC_REVISION($Revision: 1.97 $)AC_INIT(pcap.c)AC_CANONICAL_SYSTEMAC_LBL_C_INIT(V_CCOPT, V_INCLS)AC_LBL_C_INLINEAC_C___ATTRIBUTE__AC_LBL_CHECK_TYPE(u_int8_t, u_char)AC_LBL_CHECK_TYPE(u_int16_t, u_short)AC_LBL_CHECK_TYPE(u_int32_t, u_int)dnldnl libpcap doesn't itself use <sys/ioccom.h>; however, the test programdnl in "AC_LBL_FIXINCLUDES" in "aclocal.m4" uses it, so we have todnl test for it and set "HAVE_SYS_IOCCOM_H" if we have it, otherwisednl "AC_LBL_FIXINCLUDES" won't work on some platforms such as Solaris.dnlAC_CHECK_HEADERS(sys/ioccom.h sys/sockio.h ifaddrs.h limits.h netinet/if_ether.h)AC_LBL_FIXINCLUDESAC_CHECK_FUNCS(ether_hostton strerror strlcpy)dnl to pacify those who hate protochain insnAC_MSG_CHECKING(if --disable-protochain option is specified)AC_ARG_ENABLE(protochain, [  --disable-protochain    disable \"protochain\" insn])case "x$enable_protochain" inxyes)	enable_protochain=enabled	;;xno)	enable_protochain=disabled	;;x)	enable_protochain=enabled	;;esacif test "$enable_protochain" = "disabled"; then	AC_DEFINE(NO_PROTOCHAIN,1,[do not use protochain])fiAC_MSG_RESULT(${enable_protochain})dnldnl Not all versions of test support -c (character special) but it's adnl better way of testing since the device might be protected. So wednl check in our normal order using -r and then check the for the /devdnl guys again using -c.dnldnl XXX This could be done for cross-compiling, but for now it's not.dnlif test -z "$with_pcap" && test "$cross_compiling" = yes; then	AC_MSG_ERROR(pcap type not determined when cross-compiling; use --with-pcap=...)fiAC_ARG_WITH(pcap, [  --with-pcap=TYPE        use packet capture TYPE])AC_MSG_CHECKING(packet capture type)if test ! -z "$with_pcap" ; then	V_PCAP="$withval"elif test -r /dev/bpf0 ; then	V_PCAP=bpfelif test -r /usr/include/net/pfilt.h ; then	V_PCAP=pfelif test -r /dev/enet ; then	V_PCAP=enetelif test -r /dev/nit ; then	V_PCAP=snitelif test -r /usr/include/sys/net/nit.h ; then	V_PCAP=nitelif test -r /usr/include/linux/socket.h ; then	V_PCAP=linuxelif test -r /usr/include/net/raw.h ; then	V_PCAP=snoopelif test -r /usr/include/sys/dlpi.h ; then	V_PCAP=dlpielif test -c /dev/bpf0 ; then		# check again in case not readable	V_PCAP=bpfelif test -c /dev/enet ; then		# check again in case not readable	V_PCAP=enetelif test -c /dev/nit ; then		# check again in case not readable	V_PCAP=snitelse	V_PCAP=nullfiAC_MSG_RESULT($V_PCAP)dnldnl Now figure out how we get a list of interfaces and addresses.dnlAC_CHECK_FUNC(getifaddrs,[	#	# We have "getifaddrs()", so we use that to get the list	#	V_FINDALLDEVS=getad],[	#	# Well, we don't have "getifaddrs()", so we have to use some	# other mechanism; determine what that mechanism is.	#	# The first thing we use is the type of capture mechanism,	# which is somewhat of a proxy for the OS we're using.	#	case "$V_PCAP" in	dlpi)		#		# This might be Solaris 8 or later, with SIOCGLIFCONF,		# or it might be some other OS, with just SIOCGIFCONF.		#		AC_MSG_CHECKING(whether we have SIOCGLIFCONF)		AC_CACHE_VAL(ac_cv_lbl_have_siocglifconf,		    AC_TRY_COMPILE(			[#include <sys/param.h>			#include <sys/file.h>			#include <sys/ioctl.h>			#include <sys/socket.h>			#include <sys/sockio.h>],			[ioctl(0, SIOCGLIFCONF, (char *)0);],			ac_cv_lbl_have_siocglifconf=yes,			ac_cv_lbl_have_siocglifconf=no))		AC_MSG_RESULT($ac_cv_lbl_have_siocglifconf)		if test $ac_cv_lbl_have_siocglifconf = yes ; then			V_FINDALLDEVS=glifc		else			V_FINDALLDEVS=gifc		fi		;;	null)		#		# We can't capture, so we can't open any capture		# devices, so we won't return any interfaces.		#		V_FINDALLDEVS=null		;;	*)		#		# Assume we just have SIOCGIFCONF.		# (XXX - on at least later Linux kernels, there's		# another mechanism, and we should be using that		# instead.)		#		V_FINDALLDEVS=gifc		;;	esac])dnl Checking if the user decided not to enable remote captureAC_MSG_CHECKING(if --disable-remote option is specified)AC_ARG_ENABLE(remote, [  --disable-remote      disable remote capture])case "x$enable_remote" inxyes)	enable_remote=enabled	;;xno)	enable_remote=disabled	;;x)	enable_remote=enabled	;;esacAC_MSG_RESULT(${enable_remote})if test "$enable_remote" = "enabled"; then	dnl	dnl HAVE_REMOTE	dnl Checking if the remote features of libpcap are supported by	dnl the OS and must be compiled	dnl		AC_MSG_CHECKING(if remote capture is supported)		if test -e ./remote-ext.h ; then	# Check that the remote extensions are there			case "$V_PCAP" in				linux)			V_REMOTE_FILES="pcap-new.c pcap-remote.c sockutils.c"			V_HAVE_REMOTE="-DHAVE_REMOTE"			AC_DEFINE(HAVE_REMOTE,1,[Enable remote capture support])			have_remote=yes			;;				bpf)			V_REMOTE_FILES="pcap-new.c pcap-remote.c sockutils.c"			V_HAVE_REMOTE="-DHAVE_REMOTE"			AC_DEFINE(HAVE_REMOTE,1,[Enable remote capture support])			have_remote=yes			;;				*)			have_remote=no			;;				esac		AC_MSG_RESULT(${have_remote})	fifiAC_MSG_CHECKING(if --enable-ipv6 option is specified)AC_ARG_ENABLE(ipv6, [  --enable-ipv6           build IPv6-capable version])if test "$enable_ipv6" = "yes"; then	AC_DEFINE(INET6,1,[IPv6])fiAC_MSG_RESULT(${enable_ipv6-no})AC_MSG_CHECKING(whether to build optimizer debugging code)AC_ARG_ENABLE(optimizer-dbg, [  --enable-optimizer-dbg  build optimizer debugging code])if test "$enable_optimizer_dbg" = "yes"; then	AC_DEFINE(BDEBUG,1,[Enable optimizer debugging])fiAC_MSG_RESULT(${enable_optimizer_dbg-no})AC_MSG_CHECKING(whether to build parser debugging code)AC_ARG_ENABLE(yydebug, [  --enable-yydebug        build parser debugging code])if test "$enable_yydebug" = "yes"; then	AC_DEFINE(YYDEBUG,1,[Enable parser debugging])fiAC_MSG_RESULT(${enable_yydebug-no})case "$V_PCAP" indlpi)	AC_CHECK_HEADERS(sys/bufmod.h sys/dlpi_ext.h)	AC_MSG_CHECKING(for /dev/dlpi device)	if test -c /dev/dlpi ; then		AC_MSG_RESULT(yes)		AC_DEFINE(HAVE_DEV_DLPI, 1, [define if you have a /dev/dlpi])	else		AC_MSG_RESULT(no)		dir="/dev/dlpi"		AC_MSG_CHECKING(for $dir directory)		if test -d $dir ; then			AC_MSG_RESULT(yes)			AC_DEFINE_UNQUOTED(PCAP_DEV_PREFIX, "$dir", [/dev/dlpi directory])		else			AC_MSG_RESULT(no)		fi	fi	;;linux)	AC_MSG_CHECKING(Linux kernel version) 	if test "$cross_compiling" = yes; then 		AC_CACHE_VAL(ac_cv_linux_vers, 		    ac_cv_linux_vers=unknown) 	else 		AC_CACHE_VAL(ac_cv_linux_vers, 		    ac_cv_linux_vers=`uname -r 2>&1 | \ 			sed -n -e '$s/.* //' -e '$s/\..*//p'`) 	fi	AC_MSG_RESULT($ac_cv_linux_vers) 	if test $ac_cv_linux_vers = unknown ; then 		AC_MSG_ERROR(cannot determine linux version when cross-compiling) 	fi	if test $ac_cv_linux_vers -lt 2 ; then		AC_MSG_ERROR(version 2 or higher required; see the INSTALL doc for more info)	fi	AC_LBL_TPACKET_STATS	;;null)	AC_MSG_WARN(cannot determine packet capture interface)	AC_MSG_WARN((see the INSTALL doc for more info))	;;esacAC_MSG_CHECKING(whether we have /proc/net/dev)if test -r /proc/net/dev ; then	ac_cv_lbl_proc_net_dev=yeselse	ac_cv_lbl_proc_net_dev=nofiif test $ac_cv_lbl_proc_net_dev = yes; then	AC_DEFINE(HAVE_PROC_NET_DEV, 1, [define if you have a /proc/net/dev])fiAC_MSG_RESULT($ac_cv_lbl_proc_net_dev)AC_LBL_LEX_AND_YACC(V_LEX, V_YACC, pcap_)if test "$V_LEX" = lex ; then# Some versions of lex can't handle the definitions section of scanner.l .# Try lexing it and complain if it can't deal.	AC_CACHE_CHECK([for capable lex], tcpdump_cv_capable_lex,		if lex -t scanner.l > /dev/null 2>&1; then			tcpdump_cv_capable_lex=yes		else			tcpdump_cv_capable_lex=insufficient		fi)	if test $tcpdump_cv_capable_lex = insufficient ; then		AC_MSG_ERROR([Your operating system's lex is insufficient to compile libpcap.  flex is a lex replacement that has many advantages, including being able to compile libpcap.  For more information, see http://www.gnu.org/software/flex/flex.html .])	fificase "$host_os" inaix*)	dnl Workaround to enable certain features	AC_DEFINE(_SUN,1,[define on AIX to get certain functions])	;;hpux9*)	AC_DEFINE(HAVE_HPUX9,1,[on HP-UX 9.x])	;;hpux10.0*)	;;hpux10.1*)	;;hpux*)	dnl HPUX 10.20 and above is similar to HPUX 9...	AC_DEFINE(HAVE_HPUX10_20,1,[on HP-UX 10.20])	;;sinix*)	AC_MSG_CHECKING(if SINIX compiler defines sinix)	AC_CACHE_VAL(ac_cv_cc_sinix_defined,		AC_TRY_COMPILE(		    [],		    [int i = sinix;],		    ac_cv_cc_sinix_defined=yes,		    ac_cv_cc_sinix_defined=no))	    AC_MSG_RESULT($ac_cv_cc_sinix_defined)	    if test $ac_cv_cc_sinix_defined = no ; then		    AC_DEFINE(sinix,1,[on sinix])	    fi	;;solaris*)	AC_DEFINE(HAVE_SOLARIS,1,[On solaris])	;;esacAC_PROG_RANLIBAC_LBL_DEVEL(V_CCOPT)AC_LBL_SOCKADDR_SA_LENAC_LBL_SOCKADDR_STORAGEAC_LBL_HP_PPA_INFO_T_DL_MODULE_ID_1AC_LBL_UNALIGNED_ACCESSrm -f netln -s ${srcdir}/bpf/net netAC_SUBST(V_CCOPT)AC_SUBST(V_INCLS)AC_SUBST(V_LEX)AC_SUBST(V_PCAP)AC_SUBST(V_FINDALLDEVS)# HAVE_REMOTEAC_SUBST(V_HAVE_REMOTE)AC_SUBST(V_REMOTE_FILES)AC_SUBST(V_RANLIB)AC_SUBST(V_YACC)AC_PROG_INSTALLAC_CONFIG_HEADER(config.h)AC_OUTPUT(Makefile)if test -f .devel ; then	make dependfiexit 0

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -