📄 configure
字号:
ac_cv_header_stdc=nofirm -f conftest*fiif test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.cat > conftest.$ac_ext <<EOF#line 1001 "configure"#include "confdefs.h"#include <stdlib.h>EOFif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | egrep "free" >/dev/null 2>&1; then :else rm -rf conftest* ac_cv_header_stdc=nofirm -f conftest*fiif test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.if test "$cross_compiling" = yes; then :else cat > conftest.$ac_ext <<EOF#line 1022 "configure"#include "confdefs.h"#include <ctype.h>#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))int main () { int i; for (i = 0; i < 256; i++)if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);exit (0); }EOFif { (eval echo configure:1033: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/nullthen :else echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -fr conftest* ac_cv_header_stdc=nofirm -fr conftest*fififiecho "$ac_t""$ac_cv_header_stdc" 1>&6if test $ac_cv_header_stdc = yes; then cat >> confdefs.h <<\EOF#define STDC_HEADERS 1EOFfifor ac_hdr in sys/time.h syslog.h unistd.hdoac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6echo "configure:1060: 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 1065 "configure"#include "confdefs.h"#include <$ac_hdr>EOFac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"{ (eval echo configure:1070: \"$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>&6fidoneecho $ac_n "checking for working const""... $ac_c" 1>&6echo "configure:1098: checking for working const" >&5if eval "test \"`echo '$''{'ac_cv_c_const'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1103 "configure"#include "confdefs.h"int main() {/* Ultrix mips cc rejects this. */typedef int charset[2]; const charset x;/* SunOS 4.1.1 cc rejects this. */char const *const *ccp;char **p;/* NEC SVR4.0.2 mips cc rejects this. */struct point {int x, y;};static struct point const zero = {0,0};/* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */const char *g = "string";ccp = &g + (g ? g-g : 0);/* HPUX 7.0 cc rejects these. */++ccp;p = (char**) ccp;ccp = (char const *const *) p;{ /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0;}{ /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo;}{ /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p;}{ /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5;}{ /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10;}; return 0; }EOFif { (eval echo configure:1152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_const=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_c_const=nofirm -f conftest*fiecho "$ac_t""$ac_cv_c_const" 1>&6if test $ac_cv_c_const = no; then cat >> confdefs.h <<\EOF#define const EOFfiecho $ac_n "checking for inline""... $ac_c" 1>&6echo "configure:1173: checking for inline" >&5if eval "test \"`echo '$''{'ac_cv_c_inline'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else ac_cv_c_inline=nofor ac_kw in inline __inline__ __inline; do cat > conftest.$ac_ext <<EOF#line 1180 "configure"#include "confdefs.h"int main() {} $ac_kw foo() {; return 0; }EOFif { (eval echo configure:1187: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_c_inline=$ac_kw; breakelse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5firm -f conftest*donefiecho "$ac_t""$ac_cv_c_inline" 1>&6case "$ac_cv_c_inline" in inline | yes) ;; no) cat >> confdefs.h <<\EOF#define inline EOF ;; *) cat >> confdefs.h <<EOF#define inline $ac_cv_c_inlineEOF ;;esacecho $ac_n "checking whether time.h and sys/time.h may both be included""... $ac_c" 1>&6echo "configure:1213: checking whether time.h and sys/time.h may both be included" >&5if eval "test \"`echo '$''{'ac_cv_header_time'+set}'`\" = set"; then echo $ac_n "(cached) $ac_c" 1>&6else cat > conftest.$ac_ext <<EOF#line 1218 "configure"#include "confdefs.h"#include <sys/types.h>#include <sys/time.h>#include <time.h>int main() {struct tm *tp;; return 0; }EOFif { (eval echo configure:1227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then rm -rf conftest* ac_cv_header_time=yeselse echo "configure: failed program was:" >&5 cat conftest.$ac_ext >&5 rm -rf conftest* ac_cv_header_time=nofirm -f conftest*fiecho "$ac_t""$ac_cv_header_time" 1>&6if test $ac_cv_header_time = yes; then cat >> confdefs.h <<\EOF#define TIME_WITH_SYS_TIME 1EOFfiCFLAGS="$CFLAGS -D_BSD_SOURCE"for ac_func in gettimeofdaydoecho $ac_n "checking for $ac_func""... $ac_c" 1>&6echo "configure:1252: 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 1257 "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:1280: \"$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 else echo "$ac_t""no" 1>&6fidoneecho $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6echo "configure:1305: checking for socket in -lsocket" >&5ac_lib_var=`echo socket'_'socket | 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="-lsocket $LIBS"cat > conftest.$ac_ext <<EOF#line 1313 "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 socket();int main() {socket(); return 0; }EOFif { (eval echo configure:1324: \"$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 ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <<EOF#define $ac_tr_lib 1EOF LIBS="-lsocket $LIBS"else echo "$ac_t""no" 1>&6fiecho $ac_n "checking for gethostbyname in -lnsl""... $ac_c" 1>&6echo "configure:1352: checking for gethostbyname in -lnsl" >&5ac_lib_var=`echo nsl'_'gethostbyname | 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="-lnsl $LIBS"cat > conftest.$ac_ext <<EOF#line 1360 "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 gethostbyname();int main() {gethostbyname(); return 0; }EOFif { (eval echo configure:1371: \"$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 ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \ -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'` cat >> confdefs.h <<EOF#define $ac_tr_lib 1EOF LIBS="-lnsl $LIBS"else echo "$ac_t""no" 1>&6fiecho $ac_n "checking for libpcap""... $ac_c" 1>&6echo "configure:1400: checking for libpcap" >&5# Check whether --with-libpcap or --without-libpcap was given.if test "${with_libpcap+set}" = set; then withval="$with_libpcap" case "$withval" in yes|no) echo "$ac_t""no" 1>&6 ;; *) echo "$ac_t""$withval" 1>&6 if test -f $withval/pcap.h -a -f $withval/libpcap.a; then owd=`pwd` if cd $withval; then withval=`pwd`; cd $owd; fi PCAPINC="-I$withval -I$withval/bpf" PCAPLIB="-L$withval -lpcap" LDFLAGS="$LDFLAGS -L$withval" else { echo "configure: error: pcap.h or libpcap.a not found in $withval" 1>&2; exit 1; } fi ;; esac else if test -f ${prefix}/include/pcap.h; then PCAPINC="-I${prefix}/include" PCAPLIB="-L${prefix}/lib -lpcap" LDFLAGS="$LDFLAGS -L${prefix}/lib" elif test -f /usr/include/pcap/pcap.h; then PCAPINC="-I/usr/include/pcap" PCAPLIB="-lpcap" elif test -f /usr/include/pcap.h; then PCAPLIB="-lpcap" else { echo "configure: error: libpcap not found" 1>&2; exit 1; } fi echo "$ac_t""yes" 1>&6 fiecho $ac_n "checking for new libpcap""... $ac_c" 1>&6echo "configure:1443: checking for new libpcap" >&5echo $ac_n "checking for pcap_open_live_new in -lpcap""... $ac_c" 1>&6echo "configure:1445: checking for pcap_open_live_new in -lpcap" >&5ac_lib_var=`echo pcap'_'pcap_open_live_new | 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="-lpcap $LIBS"cat > conftest.$ac_ext <<EOF#line 1453 "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 pcap_open_live_new();int main() {pcap_open_live_new(); return 0; }EOFif { (eval echo configure:1464: \"$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 NEW_PCAP=1else echo "$ac_t""no" 1>&6NEW_PCAP=0fi
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -