📄 configure
字号:
# Check whether --enable-yydebug or --disable-yydebug was given.
if test "${enable_yydebug+set}" = set; then
enableval="$enable_yydebug"
:
fi
if test "$enable_yydebug" = "yes"; then
cat >> confdefs.h <<\EOF
#define YYDEBUG 1
EOF
fi
echo "$ac_t""${enable_yydebug-no}" 1>&6
case "$V_PCAP" in
dlpi)
for ac_hdr in sys/bufmod.h sys/dlpi_ext.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1815: checking for $ac_hdr" >&5
if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1820 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1825: \"$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"
fi
rm -f conftest*
fi
if 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 1
EOF
else
echo "$ac_t""no" 1>&6
fi
done
echo $ac_n "checking for /dev/dlpi device""... $ac_c" 1>&6
echo "configure:1852: checking for /dev/dlpi device" >&5
if test -c /dev/dlpi ; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
#define HAVE_DEV_DLPI 1
EOF
else
echo "$ac_t""no" 1>&6
dir="/dev/dlpi"
echo $ac_n "checking for $dir directory""... $ac_c" 1>&6
echo "configure:1863: checking for $dir directory" >&5
if test -d $dir ; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<EOF
#define PCAP_DEV_PREFIX "$dir"
EOF
else
echo "$ac_t""no" 1>&6
fi
fi
;;
linux)
echo $ac_n "checking Linux kernel version""... $ac_c" 1>&6
echo "configure:1878: checking Linux kernel version" >&5
if test "$cross_compiling" = yes; then
if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_linux_vers=unknown
fi
else
if eval "test \"`echo '$''{'ac_cv_linux_vers'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
ac_cv_linux_vers=`uname -r 2>&1 | \
sed -n -e '$s/.* //' -e '$s/\..*//p'`
fi
fi
echo "$ac_t""$ac_cv_linux_vers" 1>&6
if test $ac_cv_linux_vers = unknown ; then
{ echo "configure: error: cannot determine linux version when cross-compiling" 1>&2; exit 1; }
fi
if test $ac_cv_linux_vers -lt 2 ; then
{ echo "configure: error: version 2 or higher required; see the INSTALL doc for more info" 1>&2; exit 1; }
fi
echo $ac_n "checking if if_packet.h has tpacket_stats defined""... $ac_c" 1>&6
echo "configure:1903: checking if if_packet.h has tpacket_stats defined" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_tpacket_stats'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1908 "configure"
#include "confdefs.h"
# include <linux/if_packet.h>
int main() {
struct tpacket_stats stats
; return 0; }
EOF
if { (eval echo configure:1916: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_lbl_tpacket_stats=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_lbl_tpacket_stats=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_lbl_tpacket_stats" 1>&6
if test $ac_cv_lbl_tpacket_stats = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_TPACKET_STATS 1
EOF
fi
;;
null)
echo "configure: warning: cannot determine packet capture interface" 1>&2
echo "configure: warning: (see the INSTALL doc for more info)" 1>&2
;;
esac
echo $ac_n "checking whether we have /proc/net/dev""... $ac_c" 1>&6
echo "configure:1945: checking whether we have /proc/net/dev" >&5
if test -r /proc/net/dev ; then
ac_cv_lbl_proc_net_dev=yes
else
ac_cv_lbl_proc_net_dev=no
fi
if test $ac_cv_lbl_proc_net_dev = yes; then
cat >> confdefs.h <<\EOF
#define HAVE_PROC_NET_DEV 1
EOF
fi
echo "$ac_t""$ac_cv_lbl_proc_net_dev" 1>&6
# Check whether --with-flex or --without-flex was given.
if test "${with_flex+set}" = set; then
withval="$with_flex"
:
fi
# Check whether --with-bison or --without-bison was given.
if test "${with_bison+set}" = set; then
withval="$with_bison"
:
fi
if test "$with_flex" = no ; then
V_LEX=lex
else
for ac_prog in flex
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:1979: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_V_LEX'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$V_LEX"; then
ac_cv_prog_V_LEX="$V_LEX" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_V_LEX="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
V_LEX="$ac_cv_prog_V_LEX"
if test -n "$V_LEX"; then
echo "$ac_t""$V_LEX" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$V_LEX" && break
done
test -n "$V_LEX" || V_LEX="lex"
fi
if test "$V_LEX" = flex ; then
# The -V flag was added in 2.4
echo $ac_n "checking for flex 2.4 or higher""... $ac_c" 1>&6
echo "configure:2013: checking for flex 2.4 or higher" >&5
if eval "test \"`echo '$''{'ac_cv_lbl_flex_v24'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if flex -V >/dev/null 2>&1; then
ac_cv_lbl_flex_v24=yes
else
ac_cv_lbl_flex_v24=no
fi
fi
echo "$ac_t""$ac_cv_lbl_flex_v24" 1>&6
if test $ac_cv_lbl_flex_v24 = no ; then
s="2.4 or higher required"
echo "configure: warning: ignoring obsolete flex executable ($s)" 1>&2
V_LEX=lex
fi
fi
if test "$with_bison" = no ; then
V_YACC=yacc
else
for ac_prog in bison
do
# Extract the first word of "$ac_prog", so it can be a program name with args.
set dummy $ac_prog; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2039: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_V_YACC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$V_YACC"; then
ac_cv_prog_V_YACC="$V_YACC" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_V_YACC="$ac_prog"
break
fi
done
IFS="$ac_save_ifs"
fi
fi
V_YACC="$ac_cv_prog_V_YACC"
if test -n "$V_YACC"; then
echo "$ac_t""$V_YACC" 1>&6
else
echo "$ac_t""no" 1>&6
fi
test -n "$V_YACC" && break
done
test -n "$V_YACC" || V_YACC="yacc"
fi
if test "$V_YACC" = bison ; then
V_YACC="$V_YACC -y"
fi
if test "$V_LEX" != lex -a "$V_YACC" = yacc -o "$V_LEX" = lex -a "$V_YACC" != yacc ; then
echo "configure: warning: don't have both flex and bison; reverting to lex/yacc" 1>&2
V_LEX=lex
V_YACC=yacc
fi
if test "$V_LEX" = flex -a -n "pcap_" ; then
V_LEX="$V_LEX -Ppcap_"
V_YACC="$V_YACC -p pcap_"
fi
if test "$V_LEX" = lex ; then
# Some versions of lex can't handle the definitions section of scanner.l .
# Try lexing it and complain if it can't deal.
echo $ac_n "checking for capable lex""... $ac_c" 1>&6
echo "configure:2086: checking for capable lex" >&5
if eval "test \"`echo '$''{'tcpdump_cv_capable_lex'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if lex -t scanner.l > /dev/null 2>&1; then
tcpdump_cv_capable_lex=yes
else
tcpdump_cv_capable_lex=insufficient
fi
fi
echo "$ac_t""$tcpdump_cv_capable_lex" 1>&6
if test $tcpdump_cv_capable_lex = insufficient ; then
{ echo "configure: error: Your operating system's lex is insufficient to compile
libpcap. flex is a lex replacement that has many advantages, including
being able to compile libpcap. For more information, see
http://www.gnu.org/software/flex/flex.html ." 1>&2; exit 1; }
fi
fi
case "$host_os" in
aix*)
cat >> confdefs.h <<\EOF
#define _SUN 1
EOF
;;
hpux9*)
cat >> confdefs.h <<\EOF
#define HAVE_HPUX9 1
EOF
;;
hpux10.0*)
;;
hpux10.1*)
;;
hpux*)
cat >> confdefs.h <<\EOF
#define HAVE_HPUX10_20 1
EOF
;;
sinix*)
echo $ac_n "checking if SINIX compiler defines sinix""... $ac_c" 1>&6
echo "configure:2137: checking if SINIX compiler defines sinix" >&5
if eval "test \"`echo '$''{'ac_cv_cc_sinix_defined'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 2142 "configure"
#include "confdefs.h"
int main() {
int i = sinix;
; return 0; }
EOF
if { (eval echo configure:2149: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cc_sinix_defined=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
ac_cv_cc_sinix_defined=no
fi
rm -f conftest*
fi
echo "$ac_t""$ac_cv_cc_sinix_defined" 1>&6
if test $ac_cv_cc_sinix_defined = no ; then
cat >> confdefs.h <<\EOF
#define sinix 1
EOF
fi
;;
solaris*)
cat >> confdefs.h <<\EOF
#define HAVE_SOLARIS 1
EOF
;;
esac
# Extract the first word of "ranlib", so it can be a program name with args.
set dummy ranlib; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2181: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
if test -n "$RANLIB"; then
ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
else
IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_dummy="$PATH"
for ac_dir in $ac_dummy; do
test -z "$ac_dir" && ac_dir=.
if test -f $ac_dir/$ac_word; then
ac_cv_prog_RANLIB="ranlib"
break
fi
done
IFS="$ac_save_ifs"
test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
fi
fi
RANLIB="$ac_cv_prog_RANLIB"
if test -n "$RANLIB"; then
echo "$ac_t""$RANLIB" 1>&6
else
echo "$ac_t""no" 1>&6
fi
rm -f os-proto.h
if test "${LBL_CFLAGS+set}" = set; then
V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
fi
if test -f .devel ; then
if test "$GCC" = yes ; then
if test "${LBL_CFLAGS+set}" != set; then
if test "$ac_cv_prog_cc_g" = yes ; then
V_CCOPT="-g $V_CCOPT"
fi
V_CCOPT="$V_CCOPT -Wall"
if test $ac_cv_lbl_gcc_vers -gt 1 ; then
V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes"
fi
fi
else
case "$target_os" in
irix6*)
V_CCOPT="$V_CCOPT -n32"
;;
*)
;;
esac
fi
os=`echo $target_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'`
name="lbl/os-$os.h"
if test -f $name ; then
ln -s $name os-proto.h
cat >> c
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -