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

📄 configure.in

📁 COPE the first practical network coding scheme which is developped on click
💻 IN
字号:
dnl -*- mode: shell-script -*-dnl 'configure.in' file for a sample packagednl 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.dnldnl the usual 'configure.in' boilerplatednlAC_INIT(sampleelt.cc)AC_CONFIG_HEADER(config.h)AC_SUBST(ac_configure_args)CLICK_INIT('$(top_srcdir)')dnldnl locate Click install directorydnlAC_ARG_WITH(click, [  --with-click[[=DIR]]      Click install path is DIR [[PREFIX]]],  [clickprefix=$withval; if test -z "$withval" -o "$withval" = yes; then clickprefix=$prefix; fi],  clickprefix=NONE)dnl Preset $prefix and $exec_prefix.test "x$prefix" = xNONE && prefix=$ac_default_prefixtest "x$exec_prefix" = xNONE && exec_prefix='${prefix}'if test "$clickprefix" = NONE; then  clickprefix=$prefixficlickbindir='${clickprefix}/bin'clicksbindir='${clickprefix}/sbin'AC_SUBST(clickprefix)AC_SUBST(clickbindir)AC_SUBST(clicksbindir)if test ! -r $clickprefix/include/click/pathvars.h ; then    AC_MSG_ERROR([=============================================='$clickprefix/include/click/pathvars.h' not found.Are you sure '$clickprefix' is a Click install directory?==============================================])fidnldnl The rest of this file is based on Click 'configure.in'. You shouldn'tdnl generally need to change it, although you may want to add to it.dnlAC_PATH_PROG(RANLIB, ranlib, :)AC_PATH_PROG(STRIP, strip, :)CLICK_PROG_INSTALLCLICK_PROG_AUTOCONFCLICK_PROG_GMAKEif test -z "$GMAKE"; then    AC_MSG_ERROR([==============================================I can't find GNU make. Either put 'gmake' on your PATH andrerun './configure', or set the GMAKE environment variable toGNU make's pathname.==============================================])fidnldnl extract properties of the Click installationdnlclick_have_userlevel=`$clickprefix/bin/click-buildtool provides -l userlevel`click_have_linuxmodule=`$clickprefix/bin/click-buildtool provides -l linuxmodule`click_have_bsdmodule=`$clickprefix/bin/click-buildtool provides -l bsdmodule`linuxdir=`grep LINUX_SRCDIR $clickprefix/include/click/pathvars.h | sed 's/.*"\(.*\)".*/\1/'`freebsd_includedir=`grep FREEBSD_INCLUDEDIR $clickprefix/include/click/pathvars.h | sed 's/.*"\(.*\)".*/\1/'`dnldnl build userlevel? Linux module? FreeBSD module?dnlyesno () {    ([[ "$1" = 1 ]] && echo yes) || echo no}AC_ARG_ENABLE(userlevel, [  --enable-userlevel      enable user-level driver], :, enable_userlevel=`yesno $click_have_userlevel`)AC_ARG_ENABLE(linuxmodule, [  --enable-linuxmodule    enable Linux kernel driver], :, enable_linuxmodule=`yesno $click_have_linuxmodule`)AC_ARG_ENABLE(bsdmodule, [  --enable-bsdmodule      enable FreeBSD kernel driver                          [[Default drivers are those Click supports.]]], :, enable_bsdmodule=`yesno $click_have_bsdmodule`)dnldnl Check for Linux sourcednlif test "x$linuxdir" = xNONE -o "x$linuxdir" = xno -o "x$enable_linuxmodule" != xyes; then    ac_have_linux_kernel=n    linuxdir=NONEelif test -r $linuxdir/include/linux/skbuff.h; then    ac_have_linux_kernel=y    if test $click_have_linuxmodule = 0; then	AC_MSG_WARN([=========================================Compiling package for Linux kernel module,although Click reports it has not compiled a Linux kernel module.=========================================])    fielse  AC_MSG_ERROR([=========================================I can't find $linuxdir/include/linux/skbuff.h, although Clickthinks $linuxdir contains Linux kernel source!=========================================])fiAC_SUBST(linuxdir)dnldnl Check for FreeBSD sourcednlif test "x$freebsd_includedir" = xNONE -o "x$freebsd_includedir" = xno -o "x$enable_bsdmodule" != xyes; then    freebsd_includedir=NONEelif test -r $freebsd_includedir/net/if_var.h; then    if test $click_have_bsdmodule = 0; then	AC_MSG_WARN([=========================================Compiling package for FreeBSD kernel module,although Click reports it has not compiled a FreeBSD kernel module.=========================================])    fielse  AC_MSG_ERROR([=========================================I can't find $freebsd_includedir/net/if_var.h, although Clickthinks $freebsd_includedir contains FreeBSD kernel includes!=========================================])fiAC_SUBST(freebsd_includedir)dnldnl Set BUILD symbolsdnlBUILD_USERLEVEL=`if test "x$enable_userlevel" = xyes; then echo 1; else echo 0; fi`BUILD_LINUXMODULE=`if test "x$linuxdir" = xNONE; then echo 0; else echo 1; fi`BUILD_BSDMODULE=`if test "x$freebsd_includedir" = xNONE; then echo 0; else echo 1; fi`AC_SUBST(BUILD_USERLEVEL)AC_SUBST(BUILD_LINUXMODULE)AC_SUBST(BUILD_BSDMODULE)dnldnl OutputdnlAC_OUTPUT(Makefile)

⌨️ 快捷键说明

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