📄 configure
字号:
#include <net/if.h>int main() {struct ifdatareq ifd; ioctl(0, SIOCGIFDATA, (char *) &ifd); ifd.ifd_ifd.ifi_ibytes = ifd.ifd_ifd.ifi_obytes;; return 0; }EOFif { (eval echo configure:1757: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* with_ifdata=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* with_ifdata=nofirm -f conftest* echo "$ac_t""$with_ifdata" 1>&6 test "x$with_ifdata" = "xno" && with_ifdata=checkifrfiif test "x$with_ifdata" = "xcheckifr"; then echo $ac_n "checking for SIOCGIFDATA and ifreq.ifr_data""... $ac_c" 1>&6echo "configure:1772: checking for SIOCGIFDATA and ifreq.ifr_data" >&5 cat > conftest.$ac_ext <<EOF#line 1774 "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 #include <net/if.h>int main() {struct ifreq ifr; struct if_data ifd; ifr.ifr_data = &ifd; ioctl(0, SIOCGIFDATA, (char *) &ifr); ifd.ifi_ibytes = ifd.ifi_obytes;; return 0; }EOFif { (eval echo configure:1793: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* with_ifdata=yes cat >> confdefs.h <<\EOF#define HAVE_IFREQ_IFR_DATA 1EOFelse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* with_ifdata=nofirm -f conftest* echo "$ac_t""$with_ifdata" 1>&6fiif test "x$with_ifdata" = "xyes"; then cat >> confdefs.h <<\EOF#define USE_IFDATA 1EOF local=yes with_ioctl=yesfi# checking for route sysctl (*BSDs)test "x$with_route" = "xauto" -a "x$local" = "xyes" && with_route=noif test "x$with_route" != "xno"; then for ac_hdr in sys/sysctl.h net/if_dl.hdoac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6echo "configure:1825: 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 1830 "configure"#include "confdefs.h"#include <$ac_hdr>EOFac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"{ (eval echo configure:1835: \"$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 sysctl""... $ac_c" 1>&6echo "configure:1862: 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 1867 "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:1890: \"$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_route=yeselse echo "$ac_t""no" 1>&6with_route=nofi if test "x$with_route" = "xyes"; then echo $ac_n "checking for route info sysctl""... $ac_c" 1>&6echo "configure:1912: checking for route info sysctl" >&5 cat > conftest.$ac_ext <<EOF#line 1914 "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_DL_H #include <net/if_dl.h> #endifint main() {struct sockaddr_dl dl; struct if_msghdr ifm; int iflist[] = {CTL_NET, PF_ROUTE, 0, AF_LINK, NET_RT_IFLIST}; ifm.ifm_type = dl.sdl_nlen; dl.sdl_data + ifm.ifm_msglen; ifm.ifm_data.ifi_ibytes;; return 0; }EOFif { (eval echo configure:1939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* with_route=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* with_route=nofirm -f conftest* echo "$ac_t""$with_route" 1>&6 if test "x$with_route" != "xno"; then cat >> confdefs.h <<\EOF#define USE_ROUTE 1EOF local=yes fi fifi# checking for kvm (*BSDs)test "x$with_kvm" = "xauto" -a "x$local" = "xyes" && with_kvm=noif test "x$with_kvm" != "xno"; then echo $ac_n "checking for kvm_openfiles""... $ac_c" 1>&6echo "configure:1964: checking for kvm_openfiles" >&5if eval "test \"`echo '$''{'ac_cv_func_kvm_openfiles'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1969 "configure"#include "confdefs.h"/* System header to define __stub macros and hopefully few prototypes, which can conflict with char kvm_openfiles(); 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 kvm_openfiles();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_kvm_openfiles) || defined (__stub___kvm_openfiles)choke me#elsekvm_openfiles();#endif; return 0; }EOFif { (eval echo configure:1992: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_kvm_openfiles=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_kvm_openfiles=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_func_'kvm_openfiles`\" = yes"; then echo "$ac_t""yes" 1>&6 with_kvm=yeselse echo "$ac_t""no" 1>&6with_kvm=nofi if test "x$with_kvm" != "xyes" ; then case "x$LIBS" in *-lkvm*) ;; *) echo $ac_n "checking for kvm_openfiles in -lkvm""... $ac_c" 1>&6echo "configure:2016: checking for kvm_openfiles in -lkvm" >&5ac_lib_var=`echo kvm'_'kvm_openfiles | 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="-lkvm $LIBS"cat > conftest.$ac_ext <<EOF#line 2024 "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 kvm_openfiles();int main() {kvm_openfiles(); return 0; }EOFif { (eval echo configure:2035: \"$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 -lkvm"; with_kvm=yeselse echo "$ac_t""no" 1>&6fi ;; esac fi if test "x$with_kvm" != "xyes"; then # see if emulation is possible for ac_hdr in nlist.hdoac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6echo "configure:2063: 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 2068 "configure"#include "confdefs.h"#include <$ac_hdr>EOFac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"{ (eval echo configure:2073: \"$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 for ac_func in knlistdoecho $ac_n "checking for $ac_func""... $ac_c" 1>&6echo "configure:2097: checking for $ac_func" >&5if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 2102 "configure"#include "confdefs.h"/* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func(); 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 $ac_func();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_$ac_func) || defined (__stub___$ac_func)choke me#else$ac_func();#endif; return 0; }EOFif { (eval echo configure:2125: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then rm -rf conftest* eval "ac_cv_func_$ac_func=yes"else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* eval "ac_cv_func_$ac_func=no"firm -f conftest*fiif eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then echo "$ac_t""yes" 1>&6 ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'` cat >> confdefs.h <<EOF#define $ac_tr_func 1EOF with_kvm=yes echo $ac_n "checking whether knlist takes 3 arguments""... $ac_c" 1>&6echo "configure:2146: checking whether knlist takes 3 arguments" >&5 cat > conftest.$ac_ext <<EOF#line 2148 "configure"#include "confdefs.h"#include <nlist.h>int main() {knlist((struct nlist *) 0, 0, 10);; return 0; }EOFif { (eval echo configure:2155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* knlist3=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* knlist3=nofirm -f conftest* echo "$ac_t""$knlist3" 1>&6 if test "x$knlist3" = "xyes"; then cat >> confdefs.h <<\EOF#define HAVE_KNLIST_ARGS3 1EOF fi else echo "$ac_t""no" 1>&6echo $ac_n "checking for nlist""... $ac_c" 1>&6echo "configure:2176: checking for nlist" >&5if eval "test \"`echo '$''{'ac_cv_func_nlist'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 2181 "configure"#include "confdefs.h"/* System header to define __stub macros and hopefully few prototypes, which can c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -