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

📄 configure.in

📁 OLSR Implementation for XORP
💻 IN
📖 第 1 页 / 共 3 页
字号:
 else   return (0);}],  [AC_MSG_RESULT(yes)   ipv6=yes],  [AC_MSG_RESULT(no)],  [AC_MSG_RESULT(no)])  AC_LANG_RESTOREfidnldnl Misc. IPv6-specific checksdnlif test "${ipv6}" = "yes"; then  builtin(include, config/acipv6.m4)fidnl ------------------------------------dnl Check for routing sockets (AF_ROUTE)dnl ------------------------------------AC_MSG_CHECKING(whether the system has routing sockets (AF_ROUTE))AC_LANG_SAVEAC_LANG_CAC_TRY_RUN([#include <stdlib.h>#include <errno.h>#include <sys/types.h>#include <sys/socket.h>#include <net/route.h>main(){  int sock;  int rtm_version = RTM_VERSION;  sock = socket(AF_ROUTE, SOCK_RAW, 0);  if ((sock < 0) && (errno == EINVAL))    return (1);  return (0);}],  [AC_DEFINE(HAVE_ROUTING_SOCKETS, 1,	[Define to 1 if you have BSD-style routing sockets (AF_ROUTE)])   AC_MSG_RESULT(yes)],  [AC_MSG_RESULT(no)],  [AC_MSG_RESULT(no)])AC_LANG_RESTOREdnl ------------------------------------dnl Check for Linux /proc filesystemdnl ------------------------------------AC_MSG_CHECKING(for /proc filesystem on Linux)case "${host_os}" in    linux* )    if test -d /proc; then       AC_DEFINE(HAVE_PROC_LINUX, 1, 	    [Define to 1 if Linux /proc filesystem exists])       AC_MSG_RESULT(yes)    else       AC_MSG_RESULT(no)    fi;;    * )       AC_MSG_RESULT(no);;esacdnl ------------------------------------dnl Check for netlink sockets (AF_NETLINK)dnl ------------------------------------dnldnl Note that if we have netlink sockets, then we unconditionally setdnl HAVE_NETLINK_SOCKETS_SET_MTU_IS_BROKEN anddnl HAVE_NETLINK_SOCKETS_SET_FLAGS_IS_BROKEN to 1.dnl The reason is because if we attempt to set the MTU or the interfacednl flags on a Linux system (e.g., Linux RedHat-7.x with kernel 2.4-x),dnl this is a no-op: nothing happens, but the kernel doesn't returndnl an error. The test whether we can really set the MTU and the interfacednl flags in the kernel is rather complicated, and would require rootdnl privileges. Enjoy... :-(dnlAC_MSG_CHECKING(whether the system has netlink sockets (AF_NETLINK))AC_LANG_SAVEAC_LANG_CAC_TRY_RUN([#include <stdlib.h>#include <errno.h>#include <sys/types.h>#include <sys/socket.h>main(){  int sock;  sock = socket(AF_NETLINK, SOCK_RAW, AF_INET);  if ((sock < 0) && (errno == EINVAL))    return (1);  return (0);}],  [AC_DEFINE(HAVE_NETLINK_SOCKETS, 1,	[Define to 1 if you have Linux-style netlink sockets (AF_NETLINK)])   AC_DEFINE(HAVE_NETLINK_SOCKETS_SET_MTU_IS_BROKEN, 1,	[Define to 1 if you have Linux-style netlink sockets (AF_NETLINK), but they cannot be used to set the MTU on an interface])   AC_DEFINE(HAVE_NETLINK_SOCKETS_SET_FLAGS_IS_BROKEN, 1,	[Define to 1 if you have Linux-style netlink sockets (AF_NETLINK), but they cannot be used to set the flags on an interface])   AC_MSG_RESULT(yes)],  [AC_MSG_RESULT(no)],  [AC_MSG_RESULT(no)])AC_LANG_RESTOREdnl ------------------------------------dnl Check for ioctl(SIOCGIFCONF) interface readdnl ------------------------------------AC_MSG_CHECKING(whether the system has ioctl(SIOCGIFCONF) interface read)AC_LANG_SAVEAC_LANG_CAC_TRY_RUN([#include <stdlib.h>#include <errno.h>#include <sys/types.h>#include <sys/socket.h>#include <sys/ioctl.h>#include <net/if.h>main(){    int sock, lastlen;    struct ifconf ifconf;    int ifnum = 1024;    ifconf.ifc_buf = NULL;    lastlen = 0;    if ( (sock = socket(AF_INET, SOCK_DGRAM, 0)) < 0)	return (1);    /* Loop until SIOCGIFCONF success. */    for ( ; ; ) {        ifconf.ifc_len = ifnum*sizeof(struct ifreq);        ifconf.ifc_buf = (caddr_t)realloc(ifconf.ifc_buf, ifconf.ifc_len);        if (ioctl(sock, SIOCGIFCONF, &ifconf) < 0) {            /* Check UNPv1, 2e, pp 435 for an explanation why we need this */            if ((errno != EINVAL) || (lastlen != 0))		return (1);        } else {            if (ifconf.ifc_len == lastlen)                break;          /* success, len has not changed */            lastlen = ifconf.ifc_len;        }        ifnum += 10;    }    return (0);}],  [AC_DEFINE(HAVE_IOCTL_SIOCGIFCONF, 1,	[Define to 1 if you have ioctl(SIOCGIFCONF) interface read method])   AC_MSG_RESULT(yes)],  [AC_MSG_RESULT(no)],  [AC_MSG_RESULT(no)])AC_LANG_RESTOREdnl ------------------------------------dnl Check for sysctl(NET_RT_IFLIST) interface readdnl ------------------------------------AC_MSG_CHECKING(whether the system has sysctl(NET_RT_IFLIST) interface read)AC_LANG_SAVEAC_LANG_CAC_TRY_RUN([#include <stdlib.h>#include <sys/param.h>#include <sys/types.h>#include <sys/sysctl.h>#include <sys/socket.h>main(){    size_t buflen;    /* Interface list and routing table dump MIBs */    int mib1[] = { CTL_NET, AF_ROUTE, 0, AF_INET, NET_RT_IFLIST, 0 };    if (sysctl(mib1, sizeof(mib1)/sizeof(mib1[0]), NULL, &buflen, NULL, 0) < 0)	return (1);    return (0);}],  [AC_DEFINE(HAVE_SYSCTL_NET_RT_IFLIST, 1,	[Define to 1 if you have sysctl(NET_RT_IFLIST) interface read method])   AC_MSG_RESULT(yes)],  [AC_MSG_RESULT(no)],  [AC_MSG_RESULT(no)])AC_LANG_RESTOREdnl ------------------------------------dnl Check for sysctl(NET_RT_DUMP) routing table readdnl ------------------------------------AC_MSG_CHECKING(whether the system has sysctl(NET_RT_DUMP) routing table read)AC_LANG_SAVEAC_LANG_CAC_TRY_RUN([#include <stdlib.h>#include <sys/param.h>#include <sys/types.h>#include <sys/sysctl.h>#include <sys/socket.h>main(){    size_t buflen;    /* Interface list and routing table dump MIBs */    int mib1[] = {CTL_NET, AF_ROUTE, 0, AF_INET, NET_RT_DUMP, 0};    if (sysctl(mib1, sizeof(mib1)/sizeof(mib1[0]), NULL, &buflen, NULL, 0) < 0)	return (1);    return (0);}],  [AC_DEFINE(HAVE_SYSCTL_NET_RT_DUMP, 1,	[Define to 1 if you have sysctl(NET_RT_DUMP) routing table read method])   AC_MSG_RESULT(yes)],  [AC_MSG_RESULT(no)],  [AC_MSG_RESULT(no)])AC_LANG_RESTOREdnl ---------------------------------------------------------------------------dnl FEA relateddnl ---------------------------------------------------------------------------dnl ---------------------------------------------------------------------------dnl OSPFD relateddnl ---------------------------------------------------------------------------dnl ---------------------------------------------------------------------------dnl OSPFD check - only builds on linux and freebsd and uses coarse grained osdnl checkdnl ---------------------------------------------------------------------------AC_CACHE_CHECK([ospfd platform], xorp_cv_ospfd_os,[    case "${host_os}" in	freebsd* )	    xorp_cv_ospfd_os="freebsd"	;;	linux* )	    xorp_cv_ospfd_os="unsupported"	    dnl TODO: Uncomment the next line and remove the previous line	    dnl TODO: if OSPFD is supported on Linux.	    dnl xorp_cv_ospfd_os="linux"	;;	* )	    xorp_cv_ospfd_os="unsupported"	;;    esac])OSPFD_OS=${xorp_cv_ospfd_os}if test "${OSPFD_OS}" != "unsupported" ; then    OSPFD="ospfd"else    echo "OSPFD will not be built."    OSPFD=""fiAC_SUBST(OSPFD)AC_SUBST(OSPFD_OS)dnl ---------------------------------------------------------------------------dnl utils/flower_malloc relateddnl ---------------------------------------------------------------------------dnl flower_malloc in utils is an interposer and is only known todnl work on systems supporting -shared.  AFAICT this needs some work fordnl a real test.  As a stop gap, we assume that if we are on *BSD or Linuxdnl things work okay.  Only known failure case is OS X.case "${host_os}" in    *bsd*)  FLOWER_MALLOC=flower_malloc ;;    linux*) FLOWER_MALLOC=flower_malloc ;;    *) ;;esacAC_SUBST(FLOWER_MALLOC)dnl ---------------------------------------------------------------------------dnl Raw socketdnl ---------------------------------------------------------------------------dnldnl XXX: What is 'Raw IPv4 header'? Read below.dnldnl Different OS-es have a different view of what a raw IPv4 header passeddnl between the kernel and the user space looks like. In some OS-esdnl such as GNU/Linux nothing in the IP header is modified: e.g., thednl 'ip_len' field is always in network-order and includes the IP headerdnl length. In other OS-es such as various *BSD flavors the 'ip_len'dnl is already in host-order and, for the incoming packets, excludesdnl the IP header length (typically in 'ip_input()' in the kernel).dnldnl A notable exception is OpenBSD (at least version 2.7) which hasdnl the 'ip_len' of incoming packets in host-order and excludes the IP headerdnl length, but the 'ip_len' of the outgoing raw packets prepared bydnl the application must be in network order, and must include the IP headerdnl length. Go figure...dnlcase "${host_os}" in    openbsd* )    AC_DEFINE(IPV4_RAW_OUTPUT_IS_RAW, 1,	[Define to 1 if your IPv4 values are not modified on sending raw IPv4 packets])    AC_DEFINE(IPV4_RAW_INPUT_IS_RAW, 1,	[Define to 1 if your IPv4 values are not modified on receiving raw IPv4 packets]);;    linux* )    AC_DEFINE(IPV4_RAW_OUTPUT_IS_RAW, 1,	[Define to 1 if your IPv4 values are not modified on sending raw IPv4 packets])    AC_DEFINE(IPV4_RAW_INPUT_IS_RAW, 1,	[Define to 1 if your IPv4 values are not modified on receiving raw IPv4 packets]);;esacdnl ---------------------------------------------------------------------------dnl Debug flagsdnl ---------------------------------------------------------------------------if test "${enable_debug_msgs}" = "yes" ; then	AC_DEFINE(DEBUG_LOGGING_GLOBAL, 1,		[Define to 1 to enable globally debug messages output])fidnl ---------------------------------------------------------------------------dnl Check for compiler characteristicsdnl ---------------------------------------------------------------------------dnl ----------------------------dnl GCC-specific warning flagsdnl ----------------------------if test "${GCC}" = "yes" ; then	dnl	dnl TODO: add -ansi -pedantic	dnl XXX: Flag -Wtraditional is not recommended for C, because:	dnl	- On FreeBSD-4.5 macros like IN_CLASSA(i) from netinet/in.h	dnl	  create a warning for gcc 2.95.3	dnl	- On Linux RedHat 7.2, #elif creates a warning for gcc 2.96	dnl	CPARANOIDFLAGS="-W -Wall -Wwrite-strings -Wbad-function-cast -Wmissing-prototypes -Wcast-qual -Wmissing-declarations -Werror -Wpointer-arith -Wcast-align -Wstrict-prototypes -Wnested-externs -Wnon-const-format"	CXXPARANOIDFLAGS="-W -Wall -Wwrite-strings -Wcast-qual -Werror -Wpointer-arith -Wcast-align -Wstrict-prototypes -Woverloaded-virtual -Wnon-const-format -Wtraditional"	XR_TRY_ADD_CFLAGS($CPARANOIDFLAGS)	XR_TRY_ADD_CXXFLAGS($CXXPARANOIDFLAGS)	XR_TRY_ADD_CXXFLAGS("-ftemplate-depth-20")	dnl	dnl If debugging is disabled, filter-out the "-g" flag	dnl	if test "${enable_debug}" = "no" ; then		CFLAGS=`echo $CFLAGS |  sed 's/-g//g'`		CXXFLAGS=`echo $CXXFLAGS |  sed 's/-g//g'`	fi	dnl default compiler flags have optimization turned on which	dnl can cause helpful debugging info to be optimized out.	if test "${enable_optimize}" != "yes" ; then		dnl Could just append -O0, but two -O args are icky		dnl We make assumption change is O2 because extended regexps		dnl are not portable...		changequote(<<, >>)dnl preserve braces in sed expressions		CFLAGS=`echo $CFLAGS | sed 's/-O2//g'`		CXXFLAGS=`echo $CXXFLAGS | sed 's/-O2//g'`		changequote([, ])dnl	fi	if test "${enable_profile}" = "yes" ; then		CFLAGS="${CFLAGS} -pg"		CXXFLAGS="${CXXFLAGS} -pg"	fi	if test "${enable_debug_fnames}" = "yes" ; then		AC_DEFINE(DEBUG_PRINT_FUNCTION_NAME, 1,			[Define to 1 to enable printing function name in debug messages])	fifidnl ---------------------------------------------------------------------------dnl Add files to under-go substitution here.dnl ---------------------------------------------------------------------------AC_OUTPUT(	Makefile	MakefileRootCheck	olsr/Makefile	bgp/Makefile	bgp/harness/Makefile	bgp/tools/Makefile	cli/Makefile	cli/tools/Makefile	contrib/Makefile	contrib/ospfd/Makefile	contrib/ospfd/src/Makefile	contrib/ospfd/xorp/Makefile	docs/Makefile	docs/bgp/Makefile	docs/design_arch/Makefile	docs/fea/Makefile	docs/libxipc/Makefile	docs/libxorp/Makefile	docs/mfea/Makefile	docs/mld6igmp/Makefile	docs/multicast/Makefile	docs/pim/Makefile	docs/pim_testsuite/Makefile	docs/rib/Makefile	docs/rtrmgr/Makefile	docs/slides/Makefile	docs/slides/status_2004_02/Makefile	docs/snmp/Makefile	docs/test_harness/Makefile	etc/Makefile	etc/templates/Makefile	fea/Makefile	fea/MakefileRootCheck	fea/tools/Makefile	fib2mrib/Makefile	libcomm/Makefile	libfeaclient/Makefile	libproto/Makefile	libxipc/Makefile	libxorp/Makefile	mibs/Makefile	mibs/snmpdscripts/Makefile        mibs/tests/Makefile	mld6igmp/Makefile	mrt/Makefile	pim/Makefile	policy/Makefile	rib/Makefile	rib/tools/Makefile	rip/Makefile	rip/tools/Makefile	rtrmgr/Makefile	static_routes/Makefile	utils/Makefile	utils/flower_malloc/Makefile	xrl/Makefile	xrl/interfaces/Makefile	xrl/targets/Makefile	xrl/tests/Makefile	mibs/tests/test_bgpmib.sh	mibs/snmpdscripts/startsnmp,	echo timestamp > stamp-h	chmod a+x mibs/tests/test_bgpmib.sh	chmod a+x mibs/snmpdscripts/startsnmp)dnl ------------------------dnl Print the compiler flagsdnl ------------------------echo "Compiler C flags = $CFLAGS"echo "Compiler C++ flags = $CXXFLAGS"dnl ---------------------------------------------------------------------------dnl Warn if default make is not gmakednl ---------------------------------------------------------------------------if test -z "${xorp_cv_gmake_name}" ; then   echo "=============================================================================="   echo "GNU make was not found during configure process and is essential for building"   echo "XORP.  If you believe this is an error, please let feedback@xorp.org know."   echo "=============================================================================="   echoelif test "${xorp_cv_gmake_name}" != "make" ; then   echo   echo "=============================================================================="   echo "GNU make is required when building XORP.  This appears to be installed as"   echo "\"${xorp_cv_gmake_name}\".  If this does not work, please let feedback@xorp.org know."   echo "=============================================================================="   echofidnl ---------------------------------------------------------------------------dnl ENDdnl ---------------------------------------------------------------------------

⌨️ 快捷键说明

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