summaryrefslogtreecommitdiffstats
path: root/contrib/tcpdump/configure.in
diff options
context:
space:
mode:
authorfenner <fenner@FreeBSD.org>2001-04-03 07:45:48 +0000
committerfenner <fenner@FreeBSD.org>2001-04-03 07:45:48 +0000
commitace14a2b50f2cc05c079d0b9137b49066dbb1206 (patch)
tree4953fdd47c44b8ec88d34a4db7b698841365e22f /contrib/tcpdump/configure.in
parent54c4a9c9f2aca2e032cbf41f5eb012e2e9628dd4 (diff)
downloadFreeBSD-src-ace14a2b50f2cc05c079d0b9137b49066dbb1206.zip
FreeBSD-src-ace14a2b50f2cc05c079d0b9137b49066dbb1206.tar.gz
Virgin import of tcpdump.org tcpdump v3.6.2
Diffstat (limited to 'contrib/tcpdump/configure.in')
-rwxr-xr-xcontrib/tcpdump/configure.in233
1 files changed, 95 insertions, 138 deletions
diff --git a/contrib/tcpdump/configure.in b/contrib/tcpdump/configure.in
index 6161766..43f6777 100755
--- a/contrib/tcpdump/configure.in
+++ b/contrib/tcpdump/configure.in
@@ -1,4 +1,4 @@
-dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.87.2.4 2000/01/25 18:39:02 itojun Exp $ (LBL)
+dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.132.4.1 2001/01/17 18:29:58 guy Exp $ (LBL)
dnl
dnl Copyright (c) 1994, 1995, 1996, 1997
dnl The Regents of the University of California. All rights reserved.
@@ -6,59 +6,72 @@ dnl
dnl Process this file with autoconf to produce a configure script.
dnl
+AC_REVISION($Revision: 1.132.4.1 $)
+AC_PREREQ(2.13)
AC_INIT(tcpdump.c)
AC_CANONICAL_SYSTEM
-umask 002
-
-if test -z "$PWD" ; then
- PWD=`pwd`
-fi
-
AC_LBL_C_INIT(V_CCOPT, V_INCLS)
AC_C_INLINE
+AC_C___ATTRIBUTE__
-AC_CHECK_HEADERS(fcntl.h malloc.h memory.h rpc/rpcent.h)
+AC_CHECK_HEADERS(fcntl.h rpc/rpcent.h netinet/if_ether.h)
AC_HEADER_TIME
case "$target_os" in
linux*)
AC_MSG_CHECKING(Linux kernel version)
- AC_CACHE_VAL(ac_cv_linux_vers,
- ac_cv_linux_vers=`uname -r 2>&1 | \
- sed -n -e '$s/.* //' -e '$s/\..*//p'`)
+ if test "$cross_compiling" = yes; then
+ AC_CACHE_VAL(ac_cv_linux_vers,
+ ac_cv_linux_vers=unknown)
+ else
+ AC_CACHE_VAL(ac_cv_linux_vers,
+ ac_cv_linux_vers=`uname -r 2>&1 | \
+ sed -n -e '$s/.* //' -e '$s/\..*//p'`)
+ fi
AC_MSG_RESULT($ac_cv_linux_vers)
+ if test $ac_cv_linux_vers = unknown ; then
+ AC_MSG_ERROR(cannot determine linux version when cross-compiling)
+ fi
if test $ac_cv_linux_vers -lt 2 ; then
AC_MSG_ERROR(version 2 or higher required; see the INSTALL doc for more info)
fi
- AC_DEFINE(HAVE_NET_SLIP_H)
;;
*)
- AC_CHECK_HEADERS(net/slip.h)
;;
esac
AC_CHECK_HEADERS(smi.h)
-AC_CHECK_LIB(smi, main)
+AC_CHECK_LIB(smi, smiInit)
AC_MSG_CHECKING([whether to enable libsmi])
AC_TRY_RUN([ /* libsmi available check */
#include <smi.h>
main()
{
+ int current, revision, age, n;
+ const int required = 2;
if (smiInit(""))
exit(1);
- else
- exit(0);
+ if (strcmp(SMI_LIBRARY_VERSION, smi_library_version))
+ exit(2);
+ n = sscanf(smi_library_version, "%d:%d:%d", &current, &revision, &age);
+ if (n != 3)
+ exit(3);
+ if (required < current - age || required > current)
+ exit(4);
+ exit(0);
}
],
[ AC_MSG_RESULT(yes)
AC_DEFINE(LIBSMI)
libsmi=yes],
[ AC_MSG_RESULT(no)
+ libsmi=no],
+[ AC_MSG_RESULT(not when cross-compiling)
libsmi=no]
)
@@ -70,7 +83,6 @@ AC_ARG_ENABLE(ipv6,
--disable-ipv6 disable ipv6 support],
[ case "$enableval" in
yes) AC_MSG_RESULT(yes)
- AC_DEFINE(ENABLE_IPV6)
LOCALSRC="print-ip6.c print-ip6opts.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC"
AC_DEFINE(INET6)
ipv6=yes
@@ -93,7 +105,6 @@ main()
}
],
[ AC_MSG_RESULT(yes)
- AC_DEFINE(ENABLE_IPV6)
LOCALSRC="print-ip6.c print-ip6opts.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c $LOCALSRC"
AC_DEFINE(INET6)
ipv6=yes],
@@ -213,7 +224,7 @@ fi
if test "$ipv6" = "yes"; then
- AC_CHECK_FUNCS(getaddrinfo, [dnl
+ AC_SEARCH_LIBS(getaddrinfo, socket, [dnl
AC_MSG_CHECKING(getaddrinfo bug)
AC_TRY_RUN([
#include <sys/types.h>
@@ -329,7 +340,31 @@ main()
fi
AC_REPLACE_FUNCS(getaddrinfo getnameinfo)
fi
-AC_REPLACE_FUNCS(inet_ntop inet_pton inet_aton)
+dnl AC_TRY_COMPILE(inet_ntop inet_pton inet_aton)
+AC_MSG_CHECKING(for inet_ntop)
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>], [char src[4], dst[128];
+inet_ntop(AF_INET, src, dst, sizeof(dst));],
+ [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
+ AC_REPLACE_FUNCS(inet_ntop)])
+AC_MSG_CHECKING(for inet_pton)
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>], [char src[128], dst[4];
+inet_pton(AF_INET, src, dst);],
+ [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
+ AC_REPLACE_FUNCS(inet_pton)])
+AC_MSG_CHECKING(for inet_aton)
+AC_TRY_COMPILE([#include <sys/types.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>], [char src[128];
+struct in_addr dst;
+inet_aton(src, &dst);],
+ [AC_MSG_RESULT(yes)], [AC_MSG_RESULT(no)
+ AC_REPLACE_FUNCS(inet_aton)])
dnl portability macros for getaddrinfo/getnameinfo
dnl
@@ -340,13 +375,6 @@ if test "$ac_cv_sockaddr_has_sa_len" = no; then
fi
dnl
-dnl check __P macro
-AC_CHECK_PORTABLE_PROTO(ac_cv_portable_proto)
-if test "$ac_cv_portable_proto" = no; then
- missing_includes=yes
-fi
-
-dnl
dnl check sizeof basic types.
dnl They're very likely to be wrong for cross-compiling.
AC_CHECK_SIZEOF(char, 1)
@@ -404,13 +432,6 @@ if test "$ac_cv_res_inet6" = no; then
fi
dnl
-dnl Checks for AAAA
-AC_CHECK_AAAA(ac_cv_aaaa)
-if test "$ac_cv_aaaa" = no; then
- AC_DEFINE(T_AAAA, 28)
-fi
-
-dnl
dnl Checks for res_state_ext structure
AC_STRUCT_RES_STATE_EXT(ac_cv_res_state_ext)
if test "$ac_cv_res_state_ext" = no; then
@@ -429,21 +450,40 @@ if test "$missing_includes" = "yes"; then
fi
-AC_REPLACE_FUNCS(vfprintf strcasecmp)
-AC_CHECK_FUNCS(ether_ntohost setlinebuf gethostbyname2)
+AC_REPLACE_FUNCS(vfprintf strcasecmp strlcat strlcpy)
+AC_CHECK_FUNCS(ether_ntohost setlinebuf)
+
+usegetipnodeby=yes
+AC_CHECK_FUNCS(getipnodebyname getipnodebyaddr freeaddrinfo,
+ [], [usegetipnodeby=no])
+if test $usegetipnodeby = yes; then
+ AC_DEFINE(USE_GETIPNODEBY)
+fi
+
+needsnprintf=no
+AC_CHECK_FUNCS(vsnprintf snprintf,,
+ [needsnprintf=yes])
+if test $needsnprintf = yes; then
+ LIBOBJS="$LIBOBJS snprintf.o"
+fi
dnl The following generates a warning from autoconf...
+errprint(__file__:__line__: please ignore the next warning:
+)dnl
AC_C_BIGENDIAN
AC_CHECK_LIB(dnet, main)
AC_CHECK_LIB(rpc, main)
-AC_CHECK_LIB(z, uncompress)
-AC_CHECK_HEADERS(zlib.h)
+AC_CHECK_LIB(nsl, getrpcbynumber)
+dnl AC_CHECK_LIB(z, uncompress)
+dnl AC_CHECK_HEADERS(zlib.h)
AC_LBL_TYPE_SIGNAL
AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS)
+AC_REPLACE_FUNCS(bpf_dump) dnl moved to libpcap in 0.6
+
V_GROUP=0
if test -f /etc/group -a ! -z "`grep '^wheel:' /etc/group`" ; then
V_GROUP=wheel
@@ -459,14 +499,8 @@ irix*)
V_GROUP=sys
;;
-linux*)
- V_INCLS="$V_INCLS -I\$(srcdir)/linux-include"
- ;;
-
osf*)
V_GROUP=system
- dnl Workaround around ip_hl vs. ip_vhl problem in netinet/ip.h
- AC_DEFINE(__STDC__,2)
;;
solaris*)
@@ -488,99 +522,25 @@ AC_LBL_DEVEL(V_CCOPT)
AC_LBL_SOCKADDR_SA_LEN
-AC_MSG_CHECKING(if ether_header uses ether_addr structs)
-AC_CACHE_VAL(ac_cv_ether_header_has_ea,
- LBL_SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $V_INCLS"
- AC_TRY_COMPILE([
-# include <sys/types.h>
-# if __STDC__
- /* osf3 has REALLY good prototyes */
- struct mbuf;
- struct rtentry;
-# endif
-# include <sys/socket.h>
-# include <net/if.h>
-# include <netinet/in.h>
-# include <netinet/if_ether.h>],
- [u_int i =
- sizeof(((struct ether_header *)0)->ether_dhost.ether_addr_octet)],
- ac_cv_ether_header_has_ea=yes,
- ac_cv_ether_header_has_ea=no)
- CFLAGS="$LBL_SAVE_CFLAGS")
-AC_MSG_RESULT($ac_cv_ether_header_has_ea)
-if test $ac_cv_ether_header_has_ea = yes ; then
- AC_DEFINE(ETHER_HEADER_HAS_EA)
-fi
-
-AC_MSG_CHECKING(if ether_arp uses ether_addr structs)
-AC_CACHE_VAL(ac_cv_ether_arp_has_ea,
- LBL_SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $V_INCLS"
- AC_TRY_COMPILE([
-# include <sys/types.h>
-# if __STDC__
- /* osf3 has REALLY good prototyes */
- struct mbuf;
- struct rtentry;
-# endif
-# include <sys/socket.h>
-# include <net/if.h>
-# include <netinet/in.h>
-# include <netinet/if_ether.h>],
- [u_int i =
- sizeof(((struct ether_arp *)0)->arp_sha.ether_addr_octet)],
- ac_cv_ether_arp_has_ea=yes,
- ac_cv_ether_arp_has_ea=no)
- CFLAGS="$LBL_SAVE_CFLAGS")
-AC_MSG_RESULT($ac_cv_ether_arp_has_ea)
-if test $ac_cv_ether_arp_has_ea = yes ; then
- AC_DEFINE(ETHER_ARP_HAS_EA)
-fi
-
-AC_MSG_CHECKING(if ether_arp uses erp_xsha member)
-AC_CACHE_VAL(ac_cv_struct_ether_arp_x,
- LBL_SAVE_CFLAGS="$CFLAGS"
- CFLAGS="$CFLAGS $V_INCLS"
- AC_TRY_COMPILE([
-# include <sys/types.h>
-# include <sys/socket.h>
-# if __STDC__
- /* osf3 has REALLY good prototyes */
- struct mbuf;
- struct rtentry;
-# endif
-# include <net/if.h>
-# include <netinet/in.h>
-# include <netinet/if_ether.h>],
- [u_int i = sizeof( ((struct ether_arp *)0)->arp_xsha)],
- ac_cv_struct_ether_arp_x=yes,
- ac_cv_struct_ether_arp_x=no)
- CFLAGS="$LBL_SAVE_CFLAGS")
-AC_MSG_RESULT($ac_cv_struct_ether_arp_x)
-if test $ac_cv_struct_ether_arp_x = yes ; then
- AC_DEFINE(ETHER_ARP_HAS_X)
-fi
-
AC_LBL_UNALIGNED_ACCESS
AC_VAR_H_ERRNO
+AC_ARG_WITH(crypto, [ --without-crypto disable crypto support],
+ [], [
AC_MSG_CHECKING(for SSLeay)
ac_cv_ssleay_path=no
incdir=no
-for dir in /usr/local /usr/local/ssl /usr/pkg; do
+for dir in /usr /usr/local /usr/local/ssl /usr/pkg; do
if test -d $dir/lib -a -f $dir/lib/libcrypto.a; then
ac_cv_ssleay_path=$dir
fi
- if test -d $dir/include -a -f $dir/include/des.h; then
+ if test -d $dir/include/ssleay -a -f $dir/include/ssleay/des.h; then
+ incdir="-I$dir/include/ssleay"
+ elif test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then
+ incdir="-I$dir/include -I$dir/include/openssl"
+ elif test -d $dir/include -a -f $dir/include/des.h; then
incdir="-I$dir/include"
- else
- if test -d $dir/include/ssleay -a -f $dir/include/ssleay/des.h; then
- incdir="-I$dir/include/ssleay"
- elif test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then
- incdir="-I$dir/include -I$dir/include/openssl"
- fi
fi
if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
break;
@@ -592,7 +552,7 @@ done
AC_MSG_RESULT($ac_cv_ssleay_path)
if test "$ac_cv_ssleay_path" != no; then
V_INCLS="$V_INCLS $incdir"
- LIBS="$LIBS -L$dir/lib"
+ LDFLAGS="-L$dir/lib $LDFLAGS"
if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
LIBS="$LIBS -lRSAglue"
fi
@@ -600,11 +560,10 @@ if test "$ac_cv_ssleay_path" != no; then
LIBS="$LIBS -lrsaref"
fi
AC_CHECK_LIB(crypto, des_cbc_encrypt)
- AC_DEFINE(CRYPTO)
bak_CPPFLAGS=$CPPFLAGS
CPPFLAGS="$CPPFLAGS $V_INCLS"
- AC_CHECK_HEADERS(cast.h rc5.h)
+ AC_CHECK_HEADERS(cast.h)
if test "$ac_cv_header_cast_h" = "yes"; then
AC_MSG_CHECKING(for buggy CAST128)
@@ -638,11 +597,8 @@ main()
CPPFLAGS=$bak_CPPFLAGS
fi
-
-if test -r ${srcdir}/lbl/gnuc.h ; then
- rm -f gnuc.h
- ln -s ${srcdir}/lbl/gnuc.h gnuc.h
-fi
+])
+AC_CHECK_HEADERS(rc5.h)
AC_SUBST(V_CCOPT)
AC_SUBST(V_GROUP)
@@ -654,9 +610,10 @@ AC_PROG_INSTALL
AC_CONFIG_HEADER(config.h)
-AC_OUTPUT(Makefile)
-
-if test -f .devel ; then
+AC_OUTPUT_COMMANDS([if test -f .devel; then
+ echo timestamp > stamp-h
+ cat Makefile-devel-adds >> Makefile
make depend
-fi
+fi])
+AC_OUTPUT(Makefile)
exit 0
OpenPOWER on IntegriCloud