📄 configure
字号:
with_proc=autofi# Check whether --with-kstat or --without-kstat was given.if test "${with_kstat+set}" = set; then withval="$with_kstat" :else with_kstat=autofi# Check whether --with-ifmib or --without-ifmib was given.if test "${with_ifmib+set}" = set; then withval="$with_ifmib" :else with_ifmib=autofi# Check whether --with-ifdata or --without-ifdata was given.if test "${with_ifdata+set}" = set; then withval="$with_ifdata" :else with_ifdata=autofi# Check whether --with-route or --without-route was given.if test "${with_route+set}" = set; then withval="$with_route" :else with_route=autofi# Check whether --with-kvm or --without-kvm was given.if test "${with_kvm+set}" = set; then withval="$with_kvm" :else with_kvm=autofi# Check whether --with-dlpi or --without-dlpi was given.if test "${with_dlpi+set}" = set; then withval="$with_dlpi" :else with_dlpi=autofi# Check whether --with-win32 or --without-win32 was given.if test "${with_win32+set}" = set; then withval="$with_win32" :else with_win32=autofi# Check whether --with-snmp or --without-snmp was given.if test "${with_snmp+set}" = set; then withval="$with_snmp" :else with_snmp=yesfiwith_ioctl=no # only enabled if needed by other driverslocal=no # yes if one driver is local# checking for proc (Linux)if test "x$with_proc" != "xno"; then case "$with_proc" in /*) file=$with_proc ;; *) file=/proc/net/dev ;; esac echo $ac_n "checking for proc interface in $file""... $ac_c" 1>&6echo "configure:1390: checking for proc interface in $file" >&5 if grep -q Inter- $file 2>/dev/null; then cat >> confdefs.h <<\EOF#define USE_PROC 1EOF cat >> confdefs.h <<EOF#define PROC_FILE "$file"EOF with_proc=yes with_ioctl=yes local=yes else with_proc=no fi echo "$ac_t""$with_proc" 1>&6fi# checking for kstat (Solaris)test "x$with_kstat" = "xauto" -a "x$local" = "xyes" && with_kstat=noif test "x$with_kstat" != "xno"; then echo $ac_n "checking for kstat_open""... $ac_c" 1>&6echo "configure:1413: checking for kstat_open" >&5if eval "test \"`echo '$''{'ac_cv_func_kstat_open'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1418 "configure"#include "confdefs.h"/* System header to define __stub macros and hopefully few prototypes, which can conflict with char kstat_open(); below. */#include <assert.h>/* Override any gcc2 internal prototype to avoid an error. *//* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */char kstat_open();int main() {/* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */#if defined (__stub_kstat_open) || defined (__stub___kstat_open)choke me#elsekstat_open();#endif; return 0; }EOFif { (eval echo configure:1441: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_kstat_open=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_kstat_open=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_func_'kstat_open`\" = yes"; then echo "$ac_t""yes" 1>&6 with_kstat=yeselse echo "$ac_t""no" 1>&6with_kstat=nofi if test "x$with_kstat" != "xyes" ; then case "x$LIBS" in *-lkstat*) ;; *) echo $ac_n "checking for kstat_open in -lkstat""... $ac_c" 1>&6echo "configure:1465: checking for kstat_open in -lkstat" >&5ac_lib_var=`echo kstat'_'kstat_open | sed 'y%./+-%__p_%'`if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else ac_save_LIBS="$LIBS"LIBS="-lkstat $LIBS"cat > conftest.$ac_ext <<EOF#line 1473 "configure"#include "confdefs.h"/* Override any gcc2 internal prototype to avoid an error. *//* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */char kstat_open();int main() {kstat_open(); return 0; }EOFif { (eval echo configure:1484: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_lib_$ac_lib_var=no"firm -f conftest*LIBS="$ac_save_LIBS"fiif eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LIBS="$LIBS -lkstat"; with_kstat=yeselse echo "$ac_t""no" 1>&6fi ;; esac fi if test "x$with_kstat" = "xyes" ; then for ac_hdr in kstat.hdoac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6echo "configure:1511: checking for $ac_hdr" >&5if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1516 "configure"#include "confdefs.h"#include <$ac_hdr>EOFac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"{ (eval echo configure:1521: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes"else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <<EOF#define $ac_tr_hdr 1EOF else echo "$ac_t""no" 1>&6fidone cat >> confdefs.h <<\EOF#define USE_KSTAT 1EOF with_ioctl=yes local=yes fifi# checking for ifmib (FreeBSD)test "x$with_ifmib" = "xauto" -a "x$local" = "xyes" && with_ifmib=noif test "x$with_ifmib" != "xno"; then ac_safe=`echo "net/if_mib.h" | sed 'y%./+-%__p_%'`echo $ac_n "checking for net/if_mib.h""... $ac_c" 1>&6echo "configure:1561: checking for net/if_mib.h" >&5if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1566 "configure"#include "confdefs.h"#include <net/if_mib.h>EOFac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"{ (eval echo configure:1571: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes"else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 echo $ac_n "checking for sysctl""... $ac_c" 1>&6echo "configure:1588: checking for sysctl" >&5if eval "test \"`echo '$''{'ac_cv_func_sysctl'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1593 "configure"#include "confdefs.h"/* System header to define __stub macros and hopefully few prototypes, which can conflict with char sysctl(); below. */#include <assert.h>/* Override any gcc2 internal prototype to avoid an error. *//* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */char sysctl();int main() {/* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */#if defined (__stub_sysctl) || defined (__stub___sysctl)choke me#elsesysctl();#endif; return 0; }EOFif { (eval echo configure:1616: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_sysctl=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_sysctl=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_func_'sysctl`\" = yes"; then echo "$ac_t""yes" 1>&6 with_ifmib=yeselse echo "$ac_t""no" 1>&6with_ifmib=nofielse echo "$ac_t""no" 1>&6with_ifmib=nofi if test "x$with_ifmib" = "xyes"; then for ac_hdr in sys/sysctl.h net/if_mib.hdoac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6echo "configure:1646: checking for $ac_hdr" >&5if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1651 "configure"#include "confdefs.h"#include <$ac_hdr>EOFac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"{ (eval echo configure:1656: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`if test -z "$ac_err"; then rm -rf conftest* eval "ac_cv_header_$ac_safe=yes"else echo "$ac_err" >&5 echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_header_$ac_safe=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'` cat >> confdefs.h <<EOF#define $ac_tr_hdr 1EOF else echo "$ac_t""no" 1>&6fidone echo $ac_n "checking for working ifmib sysctl""... $ac_c" 1>&6echo "configure:1683: checking for working ifmib sysctl" >&5 # try run since interface is available on darwin but doesn't work if test "$cross_compiling" = yes; then with_ifmib=maybeelse cat > conftest.$ac_ext <<EOF#line 1689 "configure"#include "confdefs.h"#include <sys/types.h> #include <sys/socket.h> #ifdef HAVE_SYS_PARAM_H #include <sys/param.h> #endif #ifdef HAVE_SYS_SYSCTL_H #include <sys/sysctl.h> #endif #ifdef HAVE_NET_IF_H #include <net/if.h> #endif #ifdef HAVE_NET_IF_MIB_H #include <net/if_mib.h> #endif int ifcount[] = {CTL_NET, PF_LINK, NETLINK_GENERIC, IFMIB_SYSTEM, IFMIB_IFCOUNT}; int size; int main() { return sysctl(ifcount, 5, NULL, &size, NULL, NULL); }EOFif { (eval echo configure:1710: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/nullthen with_ifmib=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* with_ifmib=nofirm -fr conftest*fi echo "$ac_t""$with_ifmib" 1>&6 if test "x$with_ifmib" != "xno" ; then cat >> confdefs.h <<\EOF#define USE_IFMIB 1EOF local=yes fi fifi# checking for ioctl ifdata (Irix, ...)test "x$with_ifdata" = "xauto" -a "x$local" = "xyes" && with_ifdata=noif test "x$with_ifdata" != "xno"; then echo $ac_n "checking for SIOCGIFDATA and ifdatareq""... $ac_c" 1>&6echo "configure:1737: checking for SIOCGIFDATA and ifdatareq" >&5 cat > conftest.$ac_ext <<EOF#line 1739 "configure"#include "confdefs.h"#include <sys/types.h> #include <sys/socket.h> #include <sys/ioctl.h> #ifdef HAVE_SYS_SOCKIO_H #include <sys/sockio.h> #endif #ifdef HAVE_NET_SOIOCTL_H #include <net/soioctl.h> #endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -