summaryrefslogtreecommitdiffstats
path: root/contrib/libpcap/configure
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/libpcap/configure')
-rwxr-xr-xcontrib/libpcap/configure402
1 files changed, 273 insertions, 129 deletions
diff --git a/contrib/libpcap/configure b/contrib/libpcap/configure
index e9eac59..6bd9d5f 100755
--- a/contrib/libpcap/configure
+++ b/contrib/libpcap/configure
@@ -11,6 +11,14 @@
ac_help=
ac_default_prefix=/usr/local
# Any additions from configure.in:
+ac_help="$ac_help
+ --without-gcc don't use gcc"
+ac_help="$ac_help
+ --with-pcap=TYPE use packet capture TYPE"
+ac_help="$ac_help
+ --without-flex don't use flex"
+ac_help="$ac_help
+ --without-bison don't use bison"
# Initialize some variables set by options.
# The variables have the same names as the options, with
@@ -566,7 +574,7 @@ else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
fi
echo $ac_n "checking host system type""... $ac_c" 1>&6
-echo "configure:570: checking host system type" >&5
+echo "configure:578: checking host system type" >&5
host_alias=$host
case "$host_alias" in
@@ -587,7 +595,7 @@ host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$host" 1>&6
echo $ac_n "checking target system type""... $ac_c" 1>&6
-echo "configure:591: checking target system type" >&5
+echo "configure:599: checking target system type" >&5
target_alias=$target
case "$target_alias" in
@@ -605,7 +613,7 @@ target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
echo "$ac_t""$target" 1>&6
echo $ac_n "checking build system type""... $ac_c" 1>&6
-echo "configure:609: checking build system type" >&5
+echo "configure:617: checking build system type" >&5
build_alias=$build
case "$build_alias" in
@@ -635,8 +643,20 @@ if test -z "$PWD" ; then
fi
- V_CCOPT=-O
+
+
+
+ # Check whether --with-gcc or --without-gcc was given.
+if test "${with_gcc+set}" = set; then
+ withval="$with_gcc"
+ :
+fi
+
+ V_CCOPT="-O"
V_INCLS=""
+ if test "${srcdir}" != "." ; then
+ V_INCLS="-I\$\(srcdir\)"
+ fi
if test "${CFLAGS+set}" = set; then
LBL_CFLAGS="$CFLAGS"
fi
@@ -647,7 +667,7 @@ fi
# Extract the first word of "shlicc2", so it can be a program name with args.
set dummy shlicc2; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:651: checking for $ac_word" >&5
+echo "configure:671: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_SHLICC2'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -680,10 +700,14 @@ fi
;;
esac
fi
+ if test -z "$CC" -a "$with_gcc" = no ; then
+ CC=cc
+ export CC
+ fi
# Extract the first word of "gcc", so it can be a program name with args.
set dummy gcc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:687: checking for $ac_word" >&5
+echo "configure:711: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -712,7 +736,7 @@ if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:716: checking for $ac_word" >&5
+echo "configure:740: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -760,7 +784,7 @@ fi
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:764: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+echo "configure:788: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
ac_ext=c
# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
@@ -770,11 +794,11 @@ ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS
cross_compiling=$ac_cv_prog_cc_cross
cat > conftest.$ac_ext <<EOF
-#line 774 "configure"
+#line 798 "configure"
#include "confdefs.h"
main(){return(0);}
EOF
-if { (eval echo configure:778: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:802: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
ac_cv_prog_cc_works=yes
# If we can't run a trivial program, we are probably using a cross compiler.
if (./conftest; exit) 2>/dev/null; then
@@ -794,12 +818,12 @@ if test $ac_cv_prog_cc_works = no; then
{ echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
fi
echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:798: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
+echo "configure:822: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
cross_compiling=$ac_cv_prog_cc_cross
echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:803: checking whether we are using GNU C" >&5
+echo "configure:827: checking whether we are using GNU C" >&5
if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -808,7 +832,7 @@ else
yes;
#endif
EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:812: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:836: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
ac_cv_prog_gcc=yes
else
ac_cv_prog_gcc=no
@@ -823,7 +847,7 @@ if test $ac_cv_prog_gcc = yes; then
ac_save_CFLAGS="$CFLAGS"
CFLAGS=
echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:827: checking whether ${CC-cc} accepts -g" >&5
+echo "configure:851: checking whether ${CC-cc} accepts -g" >&5
if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -850,86 +874,89 @@ else
test "${CFLAGS+set}" = set || CFLAGS="-g"
fi
- if test $ac_cv_prog_gcc = yes ; then
+ if test "$GCC" = yes ; then
if test "$SHLICC2" = yes ; then
- ac_cv_gcc_vers=2
- V_CCOPT=-O2
+ ac_cv_lbl_gcc_vers=2
+ V_CCOPT="-O2"
else
echo $ac_n "checking gcc version""... $ac_c" 1>&6
-echo "configure:860: checking gcc version" >&5
- if eval "test \"`echo '$''{'ac_cv_gcc_vers'+set}'`\" = set"; then
+echo "configure:884: checking gcc version" >&5
+ if eval "test \"`echo '$''{'ac_cv_lbl_gcc_vers'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
- ac_cv_gcc_vers=`$CC -v 2>&1 | \
- sed -n -e '$s/.* //' -e '$s/\..*//p'`
+ ac_cv_lbl_gcc_vers=`$CC -v 2>&1 | \
+ sed -e '/^gcc version /!d' \
+ -e 's/^gcc version //' \
+ -e 's/ .*//' -e 's/^[^0-9]*//' \
+ -e 's/\..*//'`
fi
- echo "$ac_t""$ac_cv_gcc_vers" 1>&6
- if test $ac_cv_gcc_vers -gt 1 ; then
- V_CCOPT=-O2
+ echo "$ac_t""$ac_cv_lbl_gcc_vers" 1>&6
+ if test $ac_cv_lbl_gcc_vers -gt 1 ; then
+ V_CCOPT="-O2"
fi
fi
else
echo $ac_n "checking that $CC handles ansi prototypes""... $ac_c" 1>&6
-echo "configure:875: checking that $CC handles ansi prototypes" >&5
- if eval "test \"`echo '$''{'ac_cv_cc_ansi_prototypes'+set}'`\" = set"; then
+echo "configure:902: checking that $CC handles ansi prototypes" >&5
+ if eval "test \"`echo '$''{'ac_cv_lbl_cc_ansi_prototypes'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 880 "configure"
+#line 907 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
int frob(int, char *)
; return 0; }
EOF
-if { (eval echo configure:887: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:914: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- ac_cv_cc_ansi_prototypes=yes
+ ac_cv_lbl_cc_ansi_prototypes=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- ac_cv_cc_ansi_prototypes=no
+ ac_cv_lbl_cc_ansi_prototypes=no
fi
rm -f conftest*
fi
- echo "$ac_t""$ac_cv_cc_ansi_prototypes" 1>&6
- if test $ac_cv_cc_ansi_prototypes = no ; then
+ echo "$ac_t""$ac_cv_lbl_cc_ansi_prototypes" 1>&6
+ if test $ac_cv_lbl_cc_ansi_prototypes = no ; then
case "$target_os" in
hpux*)
echo $ac_n "checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)""... $ac_c" 1>&6
-echo "configure:905: checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)" >&5
+echo "configure:932: checking for HP-UX ansi compiler ($CC -Aa -D_HPUX_SOURCE)" >&5
savedcflags="$CFLAGS"
CFLAGS="-Aa -D_HPUX_SOURCE $CFLAGS"
- if eval "test \"`echo '$''{'ac_cv_cc_hpux_cc_aa'+set}'`\" = set"; then
+ if eval "test \"`echo '$''{'ac_cv_lbl_cc_hpux_cc_aa'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 912 "configure"
+#line 939 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
int frob(int, char *)
; return 0; }
EOF
-if { (eval echo configure:919: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:946: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- ac_cv_cc_hpux_cc_aa=yes
+ ac_cv_lbl_cc_hpux_cc_aa=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- ac_cv_cc_hpux_cc_aa=no
+ ac_cv_lbl_cc_hpux_cc_aa=no
fi
rm -f conftest*
fi
- echo "$ac_t""$ac_cv_cc_hpux_cc_aa" 1>&6
- if test $ac_cv_cc_hpux_cc_aa = no ; then
- { echo "configure: error: see the INSTALL for more info" 1>&2; exit 1; }
+ echo "$ac_t""$ac_cv_lbl_cc_hpux_cc_aa" 1>&6
+ if test $ac_cv_lbl_cc_hpux_cc_aa = no ; then
+ { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
fi
CFLAGS="$savedcflags"
V_CCOPT="-Aa $V_CCOPT"
@@ -940,11 +967,12 @@ EOF
;;
*)
- { echo "configure: error: see the INSTALL for more info" 1>&2; exit 1; }
+ { echo "configure: error: see the INSTALL doc for more info" 1>&2; exit 1; }
;;
esac
fi
- V_INCLS=-I/usr/local/include
+ V_INCLS="$V_INCLS -I/usr/local/include"
+ LDFLAGS="$LDFLAGS -L/usr/local/lib"
case "$target_os" in
@@ -953,17 +981,17 @@ EOF
;;
osf*)
- V_CCOPT="$V_CCOPT -g3"
+ V_CCOPT="$V_CCOPT -std1 -g3"
;;
ultrix*)
echo $ac_n "checking that Ultrix $CC hacks const in prototypes""... $ac_c" 1>&6
-echo "configure:962: checking that Ultrix $CC hacks const in prototypes" >&5
- if eval "test \"`echo '$''{'ac_cv_cc_const_proto'+set}'`\" = set"; then
+echo "configure:990: checking that Ultrix $CC hacks const in prototypes" >&5
+ if eval "test \"`echo '$''{'ac_cv_lbl_cc_const_proto'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 967 "configure"
+#line 995 "configure"
#include "confdefs.h"
#include <sys/types.h>
int main() {
@@ -971,20 +999,20 @@ struct a { int b; };
void c(const struct a *)
; return 0; }
EOF
-if { (eval echo configure:975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1003: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- ac_cv_cc_const_proto=yes
+ ac_cv_lbl_cc_const_proto=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- ac_cv_cc_const_proto=no
+ ac_cv_lbl_cc_const_proto=no
fi
rm -f conftest*
fi
- echo "$ac_t""$ac_cv_cc_const_proto" 1>&6
- if test $ac_cv_cc_const_proto = no ; then
+ echo "$ac_t""$ac_cv_lbl_cc_const_proto" 1>&6
+ if test $ac_cv_lbl_cc_const_proto = no ; then
cat >> confdefs.h <<\EOF
#define const
EOF
@@ -996,7 +1024,7 @@ EOF
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:1000: checking how to run the C preprocessor" >&5
+echo "configure:1028: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@@ -1011,13 +1039,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
-#line 1015 "configure"
+#line 1043 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1021: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1049: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1028,13 +1056,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
-#line 1032 "configure"
+#line 1060 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1038: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1066: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
:
@@ -1060,17 +1088,17 @@ for ac_hdr in malloc.h sys/ioccom.h sys/sockio.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1064: checking for $ac_hdr" >&5
+echo "configure:1092: 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 1069 "configure"
+#line 1097 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1074: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1102: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1097,14 +1125,14 @@ fi
done
-if test $ac_cv_prog_gcc = yes ; then
- echo $ac_n "checking if fixincludes is needed""... $ac_c" 1>&6
-echo "configure:1103: checking if fixincludes is needed" >&5
- if eval "test \"`echo '$''{'ac_cv_gcc_fixincludes'+set}'`\" = set"; then
+if test "$GCC" = yes ; then
+ echo $ac_n "checking for ANSI ioctl definitions""... $ac_c" 1>&6
+echo "configure:1131: checking for ANSI ioctl definitions" >&5
+ if eval "test \"`echo '$''{'ac_cv_lbl_gcc_fixincludes'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1108 "configure"
+#line 1136 "configure"
#include "confdefs.h"
/*
* This generates a "duplicate case value" when fixincludes
@@ -1123,22 +1151,22 @@ switch (0) {
}
; return 0; }
EOF
-if { (eval echo configure:1127: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1155: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- ac_cv_gcc_fixincludes=yes
+ ac_cv_lbl_gcc_fixincludes=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- ac_cv_gcc_fixincludes=no
+ ac_cv_lbl_gcc_fixincludes=no
fi
rm -f conftest*
fi
- echo "$ac_t""$ac_cv_gcc_fixincludes" 1>&6
- if test $ac_cv_gcc_fixincludes = no ; then
+ echo "$ac_t""$ac_cv_lbl_gcc_fixincludes" 1>&6
+ if test $ac_cv_lbl_gcc_fixincludes = no ; then
# Don't cache failure
- unset ac_cv_gcc_fixincludes
+ unset ac_cv_lbl_gcc_fixincludes
{ echo "configure: error: see the INSTALL for more info" 1>&2; exit 1; }
fi
fi
@@ -1146,12 +1174,12 @@ fi
for ac_func in ether_hostton strerror
do
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1150: checking for $ac_func" >&5
+echo "configure:1178: checking for $ac_func" >&5
if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1155 "configure"
+#line 1183 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char $ac_func(); below. */
@@ -1174,7 +1202,7 @@ $ac_func();
; return 0; }
EOF
-if { (eval echo configure:1178: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
+if { (eval echo configure:1206: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
eval "ac_cv_func_$ac_func=yes"
else
@@ -1199,9 +1227,17 @@ fi
done
+# Check whether --with-pcap or --without-pcap was given.
+if test "${with_pcap+set}" = set; then
+ withval="$with_pcap"
+ :
+fi
+
echo $ac_n "checking packet capture type""... $ac_c" 1>&6
-echo "configure:1204: checking packet capture type" >&5
-if test -r /dev/bpf0 ; then
+echo "configure:1238: checking packet capture type" >&5
+if test ! -z "$with_pcap" ; then
+ V_PCAP="$withval"
+elif test -r /dev/bpf0 ; then
V_PCAP=bpf
elif test -r /usr/include/net/pfilt.h ; then
V_PCAP=pf
@@ -1230,27 +1266,22 @@ echo "$ac_t""$V_PCAP" 1>&6
case "$V_PCAP" in
-null)
- echo "configure: warning: cannot determine packet capture interface" 1>&2
- echo "configure: warning: (see INSTALL for more info)" 1>&2
- ;;
-
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:1244: checking for $ac_hdr" >&5
+echo "configure:1275: 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 1249 "configure"
+#line 1280 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1254: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+{ (eval echo configure:1285: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out`
if test -z "$ac_err"; then
rm -rf conftest*
@@ -1277,7 +1308,7 @@ fi
done
echo $ac_n "checking for /dev/dlpi device""... $ac_c" 1>&6
-echo "configure:1281: checking for /dev/dlpi device" >&5
+echo "configure:1312: checking for /dev/dlpi device" >&5
if test -c /dev/dlpi ; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<\EOF
@@ -1288,7 +1319,7 @@ EOF
echo "$ac_t""no" 1>&6
dir="/dev/dlpi"
echo $ac_n "checking for $dir directory""... $ac_c" 1>&6
-echo "configure:1292: checking for $dir directory" >&5
+echo "configure:1323: checking for $dir directory" >&5
if test -d $dir ; then
echo "$ac_t""yes" 1>&6
cat >> confdefs.h <<EOF
@@ -1300,14 +1331,91 @@ EOF
fi
fi
;;
+
+linux)
+ for ac_hdr in net/if_arp.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:1341: 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 1346 "configure"
+#include "confdefs.h"
+#include <$ac_hdr>
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:1351: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out`
+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 Linux kernel version""... $ac_c" 1>&6
+echo "configure:1378: checking Linux kernel version" >&5
+ 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
+
+ echo "$ac_t""$ac_cv_linux_vers" 1>&6
+ 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
+ ;;
+
+null)
+ echo "configure: warning: cannot determine packet capture interface" 1>&2
+ echo "configure: warning: (see the INSTALL doc for more info)" 1>&2
+ ;;
+
esac
-for ac_prog in flex
+# 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:1311: checking for $ac_word" >&5
+echo "configure:1419: 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
@@ -1336,33 +1444,37 @@ 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:1343: checking for flex 2.4 or higher" >&5
- if eval "test \"`echo '$''{'ac_cv_flex_v24'+set}'`\" = set"; then
+echo "configure:1452: 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_flex_v24=yes
+ ac_cv_lbl_flex_v24=yes
else
- ac_cv_flex_v24=no
+ ac_cv_lbl_flex_v24=no
fi
fi
- echo "$ac_t""$ac_cv_flex_v24" 1>&6
- if test $ac_cv_flex_v24 = no ; then
+ 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
- for ac_prog in bison
+ 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:1366: checking for $ac_word" >&5
+echo "configure:1478: 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
@@ -1391,6 +1503,7 @@ 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
@@ -1420,21 +1533,34 @@ 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:1426: checking if SINIX compiler defines sinix" >&5
+echo "configure:1552: 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 1431 "configure"
+#line 1557 "configure"
#include "confdefs.h"
int main() {
int i = sinix;
; return 0; }
EOF
-if { (eval echo configure:1438: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1564: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
ac_cv_cc_sinix_defined=yes
else
@@ -1472,7 +1598,7 @@ 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:1476: checking for $ac_word" >&5
+echo "configure:1602: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_prog_V_RANLIB'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@@ -1506,15 +1632,27 @@ rm -f os-proto.h
if test "${LBL_CFLAGS+set}" = set; then
V_CCOPT="$V_CCOPT ${LBL_CFLAGS}"
fi
- if test $ac_cv_prog_gcc = yes -a -f .devel ; 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_gcc_vers -gt 1 ; then
- V_CCOPT="$V_CCOPT -Wmissing-prototypes -Wstrict-prototypes"
+ 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"
@@ -1530,12 +1668,12 @@ EOF
fi
echo $ac_n "checking if sockaddr struct has sa_len member""... $ac_c" 1>&6
-echo "configure:1534: checking if sockaddr struct has sa_len member" >&5
- if eval "test \"`echo '$''{'ac_cv_sockaddr_has_sa_len'+set}'`\" = set"; then
+echo "configure:1672: checking if sockaddr struct has sa_len member" >&5
+ if eval "test \"`echo '$''{'ac_cv_lbl_sockaddr_has_sa_len'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
-#line 1539 "configure"
+#line 1677 "configure"
#include "confdefs.h"
# include <sys/types.h>
@@ -1544,20 +1682,20 @@ int main() {
u_int i = sizeof(((struct sockaddr *)0)->sa_len)
; return 0; }
EOF
-if { (eval echo configure:1548: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+if { (eval echo configure:1686: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
rm -rf conftest*
- ac_cv_sockaddr_has_sa_len=yes
+ ac_cv_lbl_sockaddr_has_sa_len=yes
else
echo "configure: failed program was:" >&5
cat conftest.$ac_ext >&5
rm -rf conftest*
- ac_cv_sockaddr_has_sa_len=no
+ ac_cv_lbl_sockaddr_has_sa_len=no
fi
rm -f conftest*
fi
- echo "$ac_t""$ac_cv_sockaddr_has_sa_len" 1>&6
- if test $ac_cv_sockaddr_has_sa_len = yes ; then
+ echo "$ac_t""$ac_cv_lbl_sockaddr_has_sa_len" 1>&6
+ if test $ac_cv_lbl_sockaddr_has_sa_len = yes ; then
cat >> confdefs.h <<\EOF
#define HAVE_SOCKADDR_SA_LEN 1
EOF
@@ -1565,14 +1703,14 @@ EOF
fi
echo $ac_n "checking if unaligned accesses fail""... $ac_c" 1>&6
-echo "configure:1569: checking if unaligned accesses fail" >&5
- if eval "test \"`echo '$''{'ac_cv_unaligned_fail'+set}'`\" = set"; then
+echo "configure:1707: checking if unaligned accesses fail" >&5
+ if eval "test \"`echo '$''{'ac_cv_lbl_unaligned_fail'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
case "$target_cpu" in
alpha|hp*|mips|sparc)
- ac_cv_unaligned_fail=yes
+ ac_cv_lbl_unaligned_fail=yes
;;
*)
@@ -1605,13 +1743,13 @@ EOF
${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS \
conftest.c $LIBS >/dev/null 2>&1
if test ! -x conftest ; then
- ac_cv_unaligned_fail=yes
+ ac_cv_lbl_unaligned_fail=yes
else
./conftest >conftest.out
if test ! -s conftest.out ; then
- ac_cv_unaligned_fail=yes
+ ac_cv_lbl_unaligned_fail=yes
else
- ac_cv_unaligned_fail=no
+ ac_cv_lbl_unaligned_fail=no
fi
fi
rm -f conftest* core core.conftest
@@ -1619,23 +1757,29 @@ EOF
esac
fi
- echo "$ac_t""$ac_cv_unaligned_fail" 1>&6
- if test $ac_cv_unaligned_fail = yes ; then
+ echo "$ac_t""$ac_cv_lbl_unaligned_fail" 1>&6
+ if test $ac_cv_lbl_unaligned_fail = yes ; then
cat >> confdefs.h <<\EOF
#define LBL_ALIGN 1
EOF
fi
-if test -r lbl/gnuc.h ; then
+if test "${srcdir}" = "." ; then
+ srcdirprefix=""
+else
+ srcdirprefix="./"
+fi
+
+if test -r ${srcdirprefix}lbl/gnuc.h ; then
rm -f gnuc.h
- ln -s lbl/gnuc.h gnuc.h
+ ln -s ${srcdirprefix}lbl/gnuc.h gnuc.h
fi
rm -f bpf_filter.c
-ln -s bpf/net/bpf_filter.c bpf_filter.c
+ln -s ${srcdirprefix}bpf/net/bpf_filter.c bpf_filter.c
rm -f net
-ln -s bpf/net net
+ln -s ${srcdirprefix}bpf/net net
@@ -1655,7 +1799,7 @@ ln -s bpf/net net
# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
# ./install, which can be erroneously created by make from ./install.sh.
echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1659: checking for a BSD compatible install" >&5
+echo "configure:1803: checking for a BSD compatible install" >&5
if test -z "$INSTALL"; then
if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
OpenPOWER on IntegriCloud