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

📄 configure.in

📁 Windows XP下的抓包程序实现
💻 IN
📖 第 1 页 / 共 2 页
字号:
	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)# Check for Endace DAG card support.AC_ARG_WITH([dag], [  --with-dag[[=DIR]]        include Endace DAG support ("yes", "no" or DIR; default="yes" on BSD and Linux if present)],[	if test "$withval" = no	then		# User doesn't want DAG support.		want_dag=no	elif test "$withval" = yes	then		# User wants DAG support but hasn't specified a directory.		want_dag=yes	else		# User wants DAG support and has specified a directory, so use the provided value.		want_dag=yes		dag_root=$withval	fi],[	#	# Use DAG API if present, otherwise don't	#	want_dag=ifpresent])AC_ARG_WITH([dag-includes], [  --with-dag-includes=DIR   Endace DAG include directory],[	# User wants DAG support and has specified a header directory, so use the provided value.	want_dag=yes	dag_include_dir=$withval],[])AC_ARG_WITH([dag-libraries], [  --with-dag-libraries=DIR  Endace DAG library directory],[	# User wants DAG support and has specified a library directory, so use the provided value.	want_dag=yes	dag_lib_dir=$withval],[])case "$V_PCAP" inlinux|bpf|dag)	#	# We support the DAG API if we're on Linux or BSD, or if we're	# building a DAG-only libpcap.	#	;;*)	#	# If the user explicitly requested DAG, tell them it's not	# supported.	#	# If they expressed no preference, don't include it.	#	if test $want_dag = yes; then		AC_MSG_ERROR([DAG support is only available with 'linux' 'bpf' and 'dag' packet capture types])	elif test $want_dag = yes; then		want_dag=no	fi	;;esacac_cv_lbl_dag_api=noif test "$want_dag" != no; then	AC_MSG_CHECKING([whether we have DAG API headers])	# If necessary, set default paths for DAG API headers and libraries.	if test -z "$dag_root"; then	    dag_root=/usr/local	fi	if test -z "$dag_include_dir"; then		dag_include_dir="$dag_root/include"	fi	if test -z "$dag_lib_dir"; then	    dag_lib_dir="$dag_root/lib"	fi		if test -z "$dag_tools_dir"; then	    dag_tools_dir="$dag_root/tools"		fi	if test -r $dag_include_dir/dagapi.h; then		ac_cv_lbl_dag_api=yes	fi	AC_MSG_RESULT([$ac_cv_lbl_dag_api ($dag_include_dir)])fiif test $ac_cv_lbl_dag_api = yes; then	AC_MSG_CHECKING([dagapi.o])		dagapi_obj=no	if test -r $dag_tools_dir/dagapi.o; then		# 2.4.x.		dagapi_obj=$dag_tools_dir/dagapi.o	elif test -r $dag_lib_dir/dagapi.o; then		# 2.5.x.		dagapi_obj=$dag_lib_dir/dagapi.o	elif test -r $dag_lib_dir/libdag.a; then		# 2.5.x.		ar x $dag_lib_dir/libdag.a dagapi.o		if test -r ./dagapi.o; then		    dagapi_obj=./dagapi.o		fi	fi	if test $dagapi_obj = no; then		AC_MSG_RESULT([no (checked $dag_lib_dir  $dag_tools_dir  $dag_lib_dir/libdag.a)])			ac_cv_lbl_dag_api=no	else		AC_MSG_RESULT([yes ($dagapi_obj)])	fifiif test $ac_cv_lbl_dag_api = yes; then	AC_MSG_CHECKING([dagopts.o])		dagopts_obj=no	if test -r $dag_tools_dir/dagopts.o; then		# 2.4.x.		dagopts_obj=$dag_tools_dir/dagopts.o	elif test -r $dag_lib_dir/dagopts.o; then		# 2.5.x.		dagopts_obj=$dag_lib_dir/dagopts.o	elif test -r $dag_lib_dir/libdag.a; then		# 2.5.x.		ar x $dag_lib_dir/libdag.a dagopts.o		if test -r ./dagopts.o; then		    dagopts_obj=./dagopts.o		fi	fi	if test $dagopts_obj = no; then		AC_MSG_RESULT([no (checked $dag_lib_dir  $dag_tools_dir  $dag_lib_dir/libdag.a)])		ac_cv_lbl_dag_api=no	else		AC_MSG_RESULT([yes ($dagopts_obj)])	fifiif test $ac_cv_lbl_dag_api = yes; then	# Under 2.5.x only we need to add dagreg.o.	if test -r $dag_include_dir/dagreg.h; then		AC_MSG_CHECKING([dagreg.o])			dagreg_obj=no		if test -r $dag_lib_dir/dagreg.o; then			# Object file is ready and waiting.			dagreg_obj=$dag_lib_dir/dagreg.o		elif test -r $dag_lib_dir/libdag.a; then			# Extract from libdag.a.			ar x $dag_lib_dir/libdag.a dagreg.o			if test -r ./dagreg.o; then				dagreg_obj=./dagreg.o			fi		fi		if test $dagreg_obj = no; then			AC_MSG_RESULT([no (checked $dag_lib_dir  $dag_lib_dir/libdag.a)])			ac_cv_lbl_dag_api=no		else			AC_MSG_RESULT([yes ($dagreg_obj)])		fi	fifiif test $ac_cv_lbl_dag_api = yes; then	V_INCLS="$V_INCLS -I$dag_include_dir"	V_LIBS="$V_LIBS $dagapi_obj $dagopts_obj $dagreg_obj"	if test $V_PCAP != dag ; then		 SSRC="pcap-dag.c"	fi	# See if we can find a general version string.	# Don't need to save and restore LIBS to prevent -ldag being	# included if there's a found-action (arg 3).	saved_ldflags=$LDFLAGS	LDFLAGS="-L$dag_lib_dir"	AC_CHECK_LIB([dag], [dag_attach_stream], [dag_version="2.5.x"], [dag_version="2.4.x"])	AC_CHECK_LIB([dag],[dag_get_erf_types], [		AC_DEFINE(HAVE_DAG_GET_ERF_TYPES, 1, [define if you have dag_get_erf_types()])]	)	LDFLAGS=$saved_ldflags	if test "$dag_version" = 2.5.x; then		AC_DEFINE(HAVE_DAG_STREAMS_API, 1, [define if you have streams capable DAG API])	fi	# See if we can find a specific version string.	AC_MSG_CHECKING([the DAG API version])	if test -r "$dag_root/VERSION"; then		dag_version="`cat $dag_root/VERSION`"	fi	AC_MSG_RESULT([$dag_version])	AC_DEFINE(HAVE_DAG_API, 1, [define if you have the DAG API])fiif test $ac_cv_lbl_dag_api = no; then	if test "$want_dag" = yes; then        	# User wanted DAG support but we couldn't find it.		AC_MSG_ERROR([DAG API requested, but not found at $dag_root: use --without-dag])	fi	if test "$V_PCAP" = dag; then		# User requested "dag" capture type but the DAG API wasn't		# found.		AC_MSG_ERROR([Specifying the capture type as "dag" requires the DAG API to be present; use the --with-dag options to specify the location. (Try "./configure --help" for more information.)])	fifiAC_ARG_WITH(septel, [  --with-septel[[=DIR]]     include Septel support (located in directory DIR, if supplied).  [default=yes, on Linux, if present]],[	if test "$withval" = no	then		want_septel=no	elif test "$withval" = yes	then		want_septel=yes		septel_root=	else		want_septel=yes		septel_root=$withval	fi],[	#	# Use Septel API if present, otherwise don't	#	want_septel=ifpresent	septel_root=./../septel])ac_cv_lbl_septel_api=nocase "$V_PCAP" inlinux|septel)	#	# We support the Septel API if we're on Linux, or if we're building	# a Septel-only libpcap.	#	;;*)	#	# If the user explicitly requested Septel, tell them it's not	# supported.	#	# If they expressed no preference, don't include it.	#	if test $want_septel = yes; then		AC_MSG_ERROR(Septel support only available with 'linux' and 'septel' packet capture types)	elif test $want_septel = yes; then		want_septel=no	fi	;;esacif test "$with_septel" != no; then	AC_MSG_CHECKING(whether we have Septel API)	if test -z "$septel_root"; then		septel_root=$srcdir/../septel	fi	septel_tools_dir="$septel_root"	septel_include_dir="$septel_root/INC"	DEF="-DHAVE_SEPTEL_API"	ac_cv_lbl_septel_api=no	if test -r "$septel_include_dir/msg.h"; then		V_INCLS="$V_INCLS -I$septel_include_dir"		V_DEFS="$V_DEFS $DEF"		V_LIBS="$V_LIBS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o "		if test "$V_PCAP" != septel ; then			 SSRC="pcap-septel.c"		fi		ac_cv_lbl_septel_api=yes	fi	AC_MSG_RESULT($ac_cv_lbl_septel_api)	if test $ac_cv_lbl_septel_api = no; then		if test "$want_septel" = yes; then			AC_MSG_ERROR(Septel API not found under directory $septel_root; use --without-septel)		fi	else		AC_DEFINE(HAVE_SEPTEL_API, 1, [define if you have a Septel API])	fifiif test "$V_PCAP" = septel -a "$ac_cv_lbl_septel_api" = no; then	AC_MSG_ERROR(Specifying the capture type as 'septel' requires the Septel API to be present; use --with-septel=DIR)fiAC_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 .])	fifiDYEXT="so"case "$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, but	dnl not the same....	dnl	dnl XXX - DYEXT should be set to "sl" if this is building	dnl for 32-bit PA-RISC, but should be left as "so" for	dnl 64-bit PA-RISC or, I suspect, IA-64.	AC_DEFINE(HAVE_HPUX10_20_OR_LATER,1,[on HP-UX 10.20 or later])	;;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])	;;darwin*)	DYEXT="dylib"	V_CCOPT="$V_CCOPT -fno-common"	;;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_ACCESS## Makefile.in includes rules to generate version.h, so we assume# that it will be generated if autoconf is used.#AC_DEFINE(HAVE_VERSION_H, 1, [define if version.h is generated in the build procedure])rm -f netln -s ${srcdir}/bpf/net netAC_SUBST(V_CCOPT)AC_SUBST(V_DEFS)AC_SUBST(V_INCLS)AC_SUBST(V_LIBS)AC_SUBST(V_LEX)AC_SUBST(V_PCAP)AC_SUBST(V_FINDALLDEVS)# HAVE_REMOTEAC_SUBST(V_HAVE_REMOTE)AC_SUBST(V_REMOTE_FILES)# END HAVE_REMOTEAC_SUBST(V_RANLIB)AC_SUBST(V_YACC)AC_SUBST(SSRC)AC_SUBST(DYEXT)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 + -