configure.ac

来自「Click is a modular router toolkit. To us」· AC 代码 · 共 89 行

AC
89
字号
dnl -*- mode: shell-script -*-dnl 'configure.ac' file for a sample Click 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.ac' boilerplatednlAC_INIT(click-samplepackage, 1.7.0)AC_SUBST(ac_configure_args)CLICKPACKAGENAME=sampleAC_SUBST(CLICKPACKAGENAME)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}'test "x$clickprefix" != xNONE -a "x$prefix" = xNONE && prefix="$clickprefix"test "x$clickprefix" = xNONE && clickprefix="$prefix"clickdatadir="${clickprefix}/share/click"if test ! -r $clickdatadir/config.mk; then    AC_MSG_ERROR([=============================================='$clickdatadir/config.mk' not found.Are you sure '$clickprefix' is a Click install directory?==============================================])fi. $clickdatadir/config.mkAC_SUBST(clickprefix)AC_SUBST(clickbindir)AC_SUBST(clicksbindir)AC_SUBST(clickdatadir)dnldnl build userlevel? Linux module? FreeBSD module?dnlonezero () {    { [[ "$1" = yes ]] && echo 1; } || echo 0}AC_ARG_ENABLE(userlevel, [  --enable-userlevel      enable user-level driver],    [BUILD_USERLEVEL=`onezero $enableval`],    [BUILD_USERLEVEL=$CLICK_HAVE_USERLEVEL_DRIVER])AC_ARG_ENABLE(linuxmodule, [  --enable-linuxmodule    enable Linux kernel driver],    [BUILD_LINUXMODULE=`onezero $enableval`],    [BUILD_LINUXMODULE=$CLICK_HAVE_LINUXMODULE_DRIVER])AC_ARG_ENABLE(bsdmodule, [  --enable-bsdmodule      enable FreeBSD kernel driver                          [[Default drivers are those Click supports.]]],     [BUILD_BSDMODULE=`onezero $enableval`],    [BUILD_BSDMODULE=$CLICK_HAVE_BSDMODULE_DRIVER])AC_SUBST(BUILD_USERLEVEL)AC_SUBST(BUILD_LINUXMODULE)AC_SUBST(BUILD_BSDMODULE)dnldnl OutputdnlAC_OUTPUT(Makefile)

⌨️ 快捷键说明

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