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

📄 lc-configure.in

📁 COPE the first practical network coding scheme which is developped on click
💻 IN
字号:
dnl -*- mode: shell-script -*-dnl Process this file with autoconf to produce a configure script.dnldnl Permission is hereby granted, free of charge, to any person obtaining adnl copy of this software and associated documentation files (the "Software"),dnl to deal in the Software without restriction, subject to the conditionsdnl listed in the Click LICENSE file. These conditions include: you mustdnl preserve this copyright notice, and you cannot mention the copyrightdnl holders in advertising related to the Software without their permission.dnl The Software is provided WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED. Thisdnl notice is a summary of the Click LICENSE file; the license in that file isdnl legally binding.AC_INIT(pathvars.h.in)AC_PREREQ(2.50)AC_CONFIG_HEADER(include/click/config.h:config.h.in include/click/pathvars.h:pathvars.h.in include/click/config-userlevel.h:config-userlevel.h.in)CLICK_VERSION=1.5preAC_SUBST(ac_configure_args)AC_DEFINE_UNQUOTED(CLICK_VERSION, "$CLICK_VERSION")AC_SUBST(CLICK_VERSION)CLICK_INIT('$(top_srcdir)')dnl support for cross compilingAC_CANONICAL_SYSTEMdnl This is wrong!!AC_CHECK_TOOL(CC, gcc)AC_CHECK_TOOL(CXX, g++)CLICK_PROG_CCAC_PROG_CPPAC_C_INLINECLICK_PROG_CXXAC_PROG_CXXCPPac_preset_ar="$AR"AC_CHECK_TOOL(AR, ar)AC_CHECK_TOOL(LD, ld)AC_CHECK_TOOL(RANLIB, ranlib, :)AC_CHECK_TOOL(STRIP, strip, :)conf_auxdir='$(top_srcdir)'AC_SUBST(conf_auxdir)if test -z "$ac_preset_ar" -a -z "$AR_CREATEFLAGS"; then    AR_CREATEFLAGS=crufiAC_SUBST(AR_CREATEFLAGS)dnldnl check whether target is LinuxdnlAC_CACHE_CHECK([whether we are compiling for Linux], [ac_cv_under_linux],    [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef __linux__#error "fuckers! fuckers!"#endifreturn 0;]])], ac_cv_under_linux=yes, ac_cv_under_linux=no)])dnldnl multithread support?dnlAC_ARG_ENABLE(multithread,  [[  --enable-multithread[=NUM] support kernel multithreading, NUM threads max]],  :, enable_multithread=no)test "$enable_multithread" = yes && enable_multithread=4test "$enable_multithread" = no && enable_multithread=1if test "$enable_multithread" -gt 1; then    AC_DEFINE_UNQUOTED(NUM_CLICK_CPUS, $enable_multithread)    AC_DEFINE_UNQUOTED(__MTCLICK__, 1)    saveflags="$CPPFLAGS"    CPPFLAGS="$saveflags -D__MTCLICK__"else    AC_DEFINE_UNQUOTED(NUM_CLICK_CPUS, 1)fidnldnl functionsdnlAC_LANG_CAC_REPLACE_FUNCS(strerror)AC_CHECK_FUNCS(snprintf strtoul tcgetpgrp vsnprintf)AC_LANG_CPLUSPLUSdnldnl integer types, endianness, int64, addressable va_listdnlAC_ARG_ENABLE(int64, [  --disable-int64         disable 64-bit integer support], :, enable_int64=yes)CLICK_CHECK_ALIGNMENTAC_CHECK_SIZEOF(int)AC_CHECK_SIZEOF(long)CLICK_CHECK_INTEGER_TYPESif test "x$enable_int64" = xyes; then    AC_CHECK_SIZEOF(long long)    CLICK_CHECK_INT64_TYPESfiAC_CHECK_SIZEOF([struct timeval])AC_CHECK_TYPES([struct timespec], have_timespec=yes, have_timespec=no)if test "x$have_timespec" = xyes; then    AC_CHECK_SIZEOF([struct timespec])fiCLICK_CHECK_ENDIANCLICK_CHECK_ADDRESSABLE_VA_LISTCLICK_CHECK_INTEGER_BUILTINSdnldnl nanosecond-precision timestampsdnlAC_ARG_ENABLE(nanotimestamp, [  --enable-nanotimestamp  enable nanosecond timestamps])if test "x$enable_nanotimestamp" = xyes; then    AC_DEFINE(HAVE_NANOTIMESTAMP_ENABLED)fidnldnl headers, event detection, dynamic linkingdnlAC_CHECK_HEADERS(unistd.h termio.h netdb.h sys/event.h pwd.h grp.h)CLICK_CHECK_POLL_HAC_CHECK_FUNCS(kqueue)CLICK_CHECK_DYNAMIC_LINKINGdnldnl socketsdnlAC_LANG_CSOCKET_LIBS=dnl if test "$enable_userlevel" = yes; then    savelibs="$LIBS"; LIBS=    AC_SEARCH_LIBS(gethostbyname, nsl, , , $savelibs)    AC_SEARCH_LIBS(connect, socket, , , $savelibs)    SOCKET_LIBS="$LIBS"; LIBS="$savelibs"dnl fiAC_SUBST(SOCKET_LIBS)AC_LANG_CPLUSPLUSdnldnl large file supportdnlCLICK_CHECK_LARGE_FILE_SUPPORTdnldnl mmapdnlAC_LANG_CAC_CHECK_HEADERS(sys/mman.h)AC_FUNC_MMAPAC_LANG_CPLUSPLUSAC_CHECK_FUNCS(madvise)AC_CHECK_DECLS(madvise, [], [], [#if HAVE_SYS_MMAN_H#include <sys/types.h>#include <sys/mman.h>#endif])dnldnl element collectionsdnldnl ELEMENTS_ARG_ENABLE(COLLECTION, HELP-STRING, DEFAULT-VALUE)element_groups=""AC_SUBST(element_groups)AC_DEFUN(ELEMENTS_ARG_ENABLE,[AC_ARG_ENABLE($1, [  --]builtin(substr, builtin(ifelse, [$3], yes, dis, en)[able-$1              ], 0, 21)[ ]builtin(ifelse, [$3], yes, [do not ], [])[$2], ,[enable_]patsubst([$1], -, _)=$3)dnlif test ["x$enable_]patsubst([$1], -, _)["] = xyes; then  element_groups="$element_groups $1"  $4fi])ELEMENTS_ARG_ENABLE(ipsec, [include IP security elements], no, AC_DEFINE(HAVE_IPSEC))ELEMENTS_ARG_ENABLE(ip6, [include IPv6 elements (EXPERIMENTAL)], no, AC_DEFINE(HAVE_IP6))dnldnl objects required by element collectionsdnlEXTRA_DRIVER_OBJS=EXTRA_TOOL_OBJS=if test "x$enable_ip6" = xyes; then    EXTRA_DRIVER_OBJS="ip6address.o ip6flowid.o ip6table.o $EXTRA_DRIVER_OBJS"    EXTRA_TOOL_OBJS="ip6address.o $EXTRA_TOOL_OBJS"fiAC_SUBST(EXTRA_DRIVER_OBJS)AC_SUBST(EXTRA_TOOL_OBJS)dnldnl use Intel-specific machine instructionsdnlAC_ARG_ENABLE(intel-cpu, [  --enable-intel-cpu      enable Intel-specific machine instructions], :, enable_intel_cpu=no)if test $enable_intel_cpu = yes; then    AC_DEFINE(HAVE_INTEL_CPU)fidnldnl type of schedulingdnlAC_ARG_ENABLE(stride, [  --disable-stride        disable stride scheduler], :, enable_stride=yes)if test $enable_stride = yes; then    AC_DEFINE(HAVE_STRIDE_SCHED)fiAC_ARG_ENABLE(adaptive, [  --enable-adaptive       use adaptive scheduler to flexibly arbitrate between                              Click and the kernel (EXPERIMENTAL)], :, enable_adaptive=no)if test "x$enable_adaptive" = xyes; then    AC_DEFINE(HAVE_ADAPTIVE_SCHEDULER)fiAC_ARG_ENABLE(greedy, [  --enable-greedy         kernel module keeps CPU forever (requires SMP;                          provides more predictable performance)], :, enable_greedy=no)if test "x$enable_greedy" = xyes; then    AC_DEFINE(CLICK_GREEDY)fidnldnl debugging mallocdnlAC_ARG_ENABLE(dmalloc, [  --enable-dmalloc        enable debugging malloc], :, enable_dmalloc=no)if test $enable_dmalloc = yes; then    AC_DEFINE(CLICK_DMALLOC)fidnl pcap librarydnl note: no longer need pcap under LinuxCLICK_CHECK_LIBPCAPAC_DEFINE(HAVE_USERLEVEL_DRIVER)dnldnl programs needed for build processdnlCLICK_PROG_INSTALLCLICK_PROG_GMAKECLICK_PROG_AUTOCONFCLICK_PROG_PERL5if test -z "$GMAKE"; then    AC_MSG_ERROR([==============================================Can't find GNU make.  Either put 'gmake' on your PATH andrerun './configure', or set the GMAKE environment variable toGNU make's pathname.==============================================])fidnldnl Makeinfo, texi2dvi, install-infodnlAC_MSG_CHECKING(for working makeinfo)MAKEINFO=${MAKEINFO-makeinfo}if ($MAKEINFO --version) < /dev/null > conftest.out 2>&1; then    if test `head -1 conftest.out | sed 's/^.* \([[0-9]][[0-9]]*\).*$/\1/'` -ge 4; then	AC_MSG_RESULT(found)    else	MAKEINFO='$(conf_auxdir)/missing makeinfo'	AC_MSG_RESULT(old)    fielse    MAKEINFO='$(conf_auxdir)/missing makeinfo'    AC_MSG_RESULT(missing)fiAC_MSG_CHECKING(for working texi2dvi)TEXI2DVI=${TEXI2DVI-texi2dvi}if ($TEXI2DVI --version) < /dev/null > conftest.out 2>&1; then    dnl Search for a good version of texi2dvi    if test `head -1 conftest.out | sed 's/.*Texinfo \([[0-9]][[0-9]]*\).*/\1/'` -ge 4; then	AC_MSG_RESULT(found)    else	TEXI2DVI='$(conf_auxdir)/missing texi2dvi'	AC_MSG_RESULT(old)    fielse    TEXI2DVI='$(conf_auxdir)/missing texi2dvi'    AC_MSG_RESULT(missing)fidnl Assume any version of install-info is OKif test ${INSTALL_INFO-xxx} = xxx; then    AC_PATH_PROG(INSTALL_INFO, install-info, '$(conf_auxdir)/missing install-info',	$PATH:/sbin:/usr/sbin:/usr/local/sbin)fiAC_MSG_CHECKING(for working install-info)if ($INSTALL_INFO --version) < /dev/null > conftest.out 2>&1; then    AC_MSG_RESULT(found)else    INSTALL_INFO='$(conf_auxdir)/missing install-info'    AC_MSG_RESULT(missing)fiAC_SUBST(MAKEINFO)AC_SUBST(TEXI2DVI)AC_SUBST(INSTALL_INFO)dnldnl set path variablesdnlshell_expand () {    val=`eval echo '$'"$1"`    while echo "x$val" | fgrep '$' >/dev/null 2>&1; do val=`eval echo "$val"`; done    eval "$1='$val'"}dnl Preset $prefix and $exec_prefix.test "x$prefix" = xNONE && prefix=$ac_default_prefixtest "x$exec_prefix" = xNONE && exec_prefix='${prefix}'dnl Expand 'infodir' to check for Red Hatif test x$infodir = 'x${prefix}/info'; then    test ! -d ${prefix}/info && test -d ${prefix}/share/info && infodir='${prefix}/share/info'fishell_expand bindirshell_expand libdirshell_expand datadirAC_DEFINE_UNQUOTED(CLICK_BINDIR, "$bindir")AC_DEFINE_UNQUOTED(CLICK_LIBDIR, "$libdir")AC_DEFINE_UNQUOTED(CLICK_SHAREDIR, "$datadir/click")dnldnl Provisionsdnldnl start out with CPUprovisions="$target_cpu"case "$target_cpu" in    i386) :;;    i486|i586) provisions="$provisions i386";;    i686|i786) provisions="$provisions i386 i586";;esacdnl add 'analysis' if analysis elements are availableif test "x$enable_analysis" = xyes; then    provisions="$provisions analysis"fidnl add 'int64' if 64-bit integers are availableif test "x$have_int64_types" = xyes; then    provisions="$provisions int64"fidnl add 'ip6' if ip6 elements are availableif test "x$enable_ip6" = xyes; then    provisions="$provisions ip6"fidnl add 'linux' if compiling under linuxif test "x$ac_cv_under_linux" = xyes; then    provisions="$provisions linux"fidnl add 'pcap' if libpcap is availableif test "x$HAVE_PCAP" = xyes; then    provisions="$provisions pcap"fidnl add 'smpclick' if compiled with --enable-multithread > 1if test "$enable_multithread" -gt 1; then    provisions="$provisions smpclick"fidnl add 'wifi' if wifi elements are availableif test "x$enable_wifi" = xyes; then    provisions="$provisions wifi"fiAC_SUBST(provisions)dnldnl Outputdnlconfig_files="Makefile click-buildtool click-compile libsrc/Makefile"for ac_dir in include; do    test ! -d "$ac_dir" && mkdir "$ac_dir"doneAC_OUTPUT_COMMANDS([for ac_file in $CONFIG_HEADERS; do    test $ac_file = include/click/config.h:config.h.in && echo > stamp-hdonefor ac_file in $CONFIG_FILES; do    test $ac_file = click-buildtool && chmod +x click-buildtool    test $ac_file = click-compile && chmod +x click-compile    test -z "$GMAKE" && echo $ac_file | grep Makefile >/dev/null && $ac_given_srcdir/missing gmake $ac_filedone], GMAKE="$GMAKE")AC_OUTPUT($config_files)

⌨️ 快捷键说明

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