configure.in

来自「Ubuntu packages of security software。 相」· IN 代码 · 共 303 行

IN
303
字号
dnldnl configure.indnldnl Copyright (c) 2000 Dug Song <dugsong@monkey.org>dnldnl $Id: configure.in,v 1.64 2005/02/25 23:05:09 dugsong Exp $AC_INIT(include/dnet.h)AM_INIT_AUTOMAKE(libdnet, 1.10)AM_CONFIG_HEADER(include/config.h)dnl XXX - stop the insanity!@#$AM_MAINTAINER_MODEdnl Check for system type.dnl XXX - we do this to qualify our later feature checks, since somednl systems claim to support multiple features, but are quite b0rked.AC_CANONICAL_HOSTdnl Initialize prefix.if test "$prefix" = "NONE"; then   prefix="/usr/local"fidnl Checks for programs.AC_PROG_CCAC_PROG_INSTALLAC_LIBTOOL_DLOPENAM_PROG_LIBTOOLdnl Checks for Python.dnl XXX - use AM_PATH_PYTHON after automake upgradeAC_MSG_CHECKING(for Python)AC_ARG_WITH(python,[  --with-python=DIR       build Python module (using python in DIR)],[ case "$withval" in  yes)     AC_MSG_RESULT(yes)     PYTHON="python"     ;;  no)     AC_MSG_RESULT(no)     ;;  *)     AC_MSG_RESULT($withval)     for subdir in . bin; do        if test -x $withval/$subdir/python; then	   owd=`pwd`	   if cd $withval/$subdir; then withval=`pwd`; cd $owd; fi	   PYTHON="$withval/python"	   break	fi     done     if test "x$PYTHON" = "x"; then        AC_ERROR(python not found in $withval)     fi     ;;  esac ])AC_SUBST(PYTHON)AC_SUBST(TCLINC)AC_SUBST(TCLLIB)AM_CONDITIONAL(PYTHON, [test "x$PYTHON" != "x"])AM_CONDITIONAL(TCL, [test "x$TCLINC" != "x"])dnl XXX - stupid IRIX cppif test -r /usr/include/sgidefs.h ; then	CPPFLAGS="$CPPFLAGS -D__sgi"fidnl XXX - we need MingW32 under Cygwin for win32AC_CYGWINif test "$CYGWIN" = yes ; then	if test -d /usr/include/mingw ; then		CPPFLAGS="$CPPFLAGS -mno-cygwin"		CFLAGS="$CFLAGS -mno-cygwin"		AC_DEFINE(WIN32_LEAN_AND_MEAN, 1, 		    [Define for faster code generation.])		AC_CHECK_LIB(ws2_32, main)		AC_CHECK_LIB(iphlpapi, main)		AC_DEFINE(snprintf, _snprintf, 		    [Use MingW32's internal snprintf])	else		AC_MSG_ERROR([need MingW32 package to build under Cygwin])	fi	AC_MSG_CHECKING(for WinPcap developer's pack)	AC_ARG_WITH(wpdpack,	[  --with-wpdpack=DIR      use WinPcap developer's pack in DIR],	[ AC_MSG_RESULT($withval)	  if test -f $withval/include/packet32.h -a -f $withval/lib/packet.lib; then	     owd=`pwd`	     if cd $withval; then withval=`pwd`; cd $owd; fi	     CFLAGS="$CFLAGS -I$withval/include"	     LIBS="$LIBS -L$withval/lib -lpacket"	  else	     AC_MSG_ERROR(packet32.h or packet.lib not found in $withval)	  fi ],	[ for dir in ${prefix} ${HOME}/WPdpack ; do	     if test -f ${dir}/include/packet32.h -a -f ${dir}/lib/packet.lib; then	        CFLAGS="$CFLAGS -I${dir}/include"		LIBS="$LIBS -L${dir}/lib -lpacket"		have_pcap=yes		break;	     fi	  done	  if test "$have_pcap" != yes; then	     AC_MSG_ERROR(WinPcap developer's pack not found)	  fi	  AC_MSG_RESULT(yes) ])fidnl Checks for libraries.if test "$CYGWIN" != yes ; then	AC_LBL_LIBRARY_NET	AC_CHECK_LIB(nm, open_mib)fidnl Checks for Check.AC_MSG_CHECKING(for Check)AC_ARG_WITH(check,[  --with-check=DIR        use Check (http://check.sf.net) in DIR],[ case "$withval" in  yes|no)     AC_MSG_RESULT(no)     ;;  *)     AC_MSG_RESULT($withval)     if test -f $withval/include/check.h -a -f $withval/lib/libcheck.a; then        owd=`pwd`        if cd $withval; then withval=`pwd`; cd $owd; fi        CHECKINC="-I$withval/include"        CHECKLIB="-L$withval/lib -lcheck"     elif test -f $withval/src/check.h -a -f $withval/src/libcheck.a; then        owd=`pwd`        if cd $withval; then withval=`pwd`; cd $owd; fi        CHECKINC="-I$withval/src"        CHECKLIB="-L$withval/src -lcheck"     else        AC_ERROR(check.h or libcheck.a not found in $withval)     fi     ;;  esac ],[ if test -f ${prefix}/include/check.h -a -f ${prefix}/lib/libcheck.a; then     CHECKINC="-I${prefix}/include"     CHECKLIB="-L${prefix}/lib -lcheck"     AC_MSG_RESULT(yes)  else     AC_MSG_RESULT(no)  fi])AC_SUBST(CHECKINC)AC_SUBST(CHECKLIB)AM_CONDITIONAL(HAVE_CHECK, test "x$CHECKLIB" != "x")dnl Checks for header files.AC_HEADER_STDCif test "$CYGWIN" = yes ; then	AC_CHECK_HEADERS(Iphlpapi.h winsock2.h)else	AC_CHECK_HEADERS(fcntl.h unistd.h)	AC_CHECK_HEADERS(sys/bufmod.h sys/dlpi.h sys/dlpihdr.h sys/dlpi_ext.h \	    sys/ioctl.h sys/mib.h sys/ndd_var.h sys/socket.h sys/sockio.h \	    sys/sysctl.h sys/time.h)	AC_CHECK_HEADERS(net/bpf.h net/if.h net/if_var.h \	    net/if_arp.h net/if_dl.h net/pfilt.h \	    net/pfvar.h net/radix.h net/raw.h net/route.h netinet/in_var.h \	    net/if_tun.h linux/if_tun.h netinet/ip_fw.h linux/ip_fw.h \	    linux/ip_fwchains.h linux/netfilter_ipv4/ipchains_core.h)	AC_CHECK_HEADERS(ip_fil_compat.h netinet/ip_fil_compat.h ip_compat.h \	    netinet/ip_compat.h ip_fil.h netinet/ip_fil.h)	AC_CHECK_HEADERS(hpsecurity.h stropts.h)fidnl Checks for typedefs, structures, and compiler characteristics.AC_C_CONSTAC_C_INLINEAC_TYPE_PID_TAC_TYPE_SIZE_TAC_DNET_SOCKADDR_IN6if test "$ac_cv_header_sys_socket_h" = yes ; then	AC_DNET_SOCKADDR_SA_LENfiif test "$ac_cv_header_net_if_arp_h" = yes ; then	AC_DNET_ARPREQ_ARP_DEVfiif test "$ac_cv_header_net_route_h" = yes ; then	AC_DNET_ROUTE_RT_MSGHDRfiAC_PROG_GCC_TRADITIONALif test "$GCC" = yes ; then   	CFLAGS="$CFLAGS -Wall"fidnl Checks for library functions.AC_FUNC_MEMCMPAC_REPLACE_FUNCS(err strlcat strlcpy strsep)dnl Checks for other system-specific jonks.if test "$CYGWIN" != yes ; then	AC_DNET_BSD_BPF	AC_DNET_LINUX_PROCFS	AC_DNET_LINUX_PF_PACKET	AC_DNET_STREAMS_MIB2	AC_DNET_STREAMS_ROUTE	AC_DNET_IOCTL_ARP	AC_DNET_RAWIP_HOST_OFFLEN	AC_DNET_RAWIP_COOKEDfidnl Check for arp interface.if test "$ac_cv_header_Iphlpapi_h" = yes ; then	AC_LIBOBJ([arp-win32])elif test "$ac_cv_dnet_ioctl_arp" = yes ; then	AC_LIBOBJ([arp-ioctl])elif test "$ac_cv_dnet_route_h_has_rt_msghdr" = yes ; then	AC_LIBOBJ([arp-bsd])else	AC_LIBOBJ([arp-none])fidnl Check for Ethernet interface.if test "$ac_cv_header_Iphlpapi_h" = yes ; then	AC_LIBOBJ([eth-win32])elif test "$ac_cv_header_net_pfilt_h" = yes ; then	AC_LIBOBJ([eth-pfilt])elif test "$ac_cv_dnet_bsd_bpf" = yes ; then	AC_LIBOBJ([eth-bsd])elif test "$ac_cv_dnet_linux_pf_packet" = yes ; then	AC_LIBOBJ([eth-linux])elif test "$ac_cv_header_net_raw_h" = yes ; then	AC_LIBOBJ([eth-snoop])elif test "$ac_cv_header_sys_ndd_var_h" = yes ; then	AC_LIBOBJ([eth-ndd])elif test "$ac_cv_header_sys_dlpi_h" = yes || \     test "$ac_cv_header_sys_dlpihdr_h" = yes ; then	AC_LIBOBJ([eth-dlpi])else	AC_LIBOBJ([eth-none])fidnl Using fw-none since Nmap doesn't need any of the firewall-related rulesdnl --FyodorAC_LIBOBJ([fw-none])dnl Check for network interface interface.if test "$ac_cv_header_Iphlpapi_h" = yes ; then	AC_LIBOBJ([intf-win32])else	AC_LIBOBJ([intf])fidnl Check for raw IP interface.if test "$ac_cv_header_Iphlpapi_h" = yes ; then	AC_LIBOBJ([ip-win32])elif test "$ac_cv_dnet_rawip_cooked" = yes ; then	AC_LIBOBJ([ip-cooked])else	AC_LIBOBJ([ip])fidnl Check for routing interface.if test "$ac_cv_header_Iphlpapi_h" = yes ; then	AC_LIBOBJ([route-win32])elif test "$ac_cv_dnet_route_h_has_rt_msghdr" = yes ; then	AC_LIBOBJ([route-bsd])elif test "$ac_cv_dnet_linux_procfs" = yes ; then	AC_LIBOBJ([route-linux])elif test "$ac_cv_header_hpsecurity_h" = yes ; then	AC_LIBOBJ([route-hpux])else	AC_LIBOBJ([route-none])fidnl Check for tun interface.if test "$ac_cv_header_linux_if_tun_h" = yes ; then	AC_LIBOBJ([tun-linux])elif test "$ac_cv_header_net_if_tun_h" = yes ; then	if test "$ac_cv_header_stropts_h" = yes ; then           case "$host_os" in           *kfreebsd* | *dragonfly*)               AC_LIBOBJ([tun-bsd]);;           *)               AC_LIBOBJ([tun-solaris]);;           esac	else		AC_LIBOBJ([tun-bsd])	fielif test -f "/dev/tun0" ; then	AC_LIBOBJ([tun-bsd])else	AC_LIBOBJ([tun-none])fidnl Generate LTLIBOBJS for libtool.Xsed="sed -e s/^X//"LTLIBOBJS=`echo X"$LIBOBJS"|\	[$Xsed -e "s,\.[^.]* ,.lo ,g;s,\.[^.]*$,.lo,"]`AC_SUBST(LTLIBOBJS)AC_OUTPUT([Makefile dnet-config include/Makefile include/dnet/Makefile	src/Makefile],	[chmod 755 dnet-config])

⌨️ 快捷键说明

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