Deleted Added
sdiff udiff text old ( 172684 ) new ( 190207 )
full compact
1dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.188.2.8 2007/09/12 19:48:50 guy Exp $ (LBL)
2dnl
3dnl Copyright (c) 1994, 1995, 1996, 1997
4dnl The Regents of the University of California. All rights reserved.
5dnl
6dnl Process this file with autoconf to produce a configure script.
7dnl
8
9AC_REVISION($Revision: 1.188.2.8 $)
10AC_PREREQ(2.50)
11AC_INIT(tcpdump.c)
12
13AC_CANONICAL_HOST
14
15AC_LBL_C_INIT(V_CCOPT, V_INCLS)
16AC_LBL_C_INLINE
17AC_C___ATTRIBUTE__
18AC_CHECK_HEADERS(fcntl.h rpc/rpcent.h netdnet/dnetdb.h)
19AC_CHECK_HEADERS(net/pfvar.h, , , [#include <sys/types.h>
20#include <sys/socket.h>
21#include <net/if.h>])
22if test "$ac_cv_header_net_pfvar_h" == yes; then
23 LOCALSRC="print-pflog.c $LOCALSRC"
24fi
25AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include <sys/types.h>
26#include <sys/socket.h>])
27if test "$ac_cv_header_netinet_if_ether_h" != yes; then
28 #
29 # The simple test didn't work.
30 # Do we need to include <net/if.h> first?

--- 660 unchanged lines hidden (view full) ---

691don't.])
692 else
693 AC_DEFINE(HAVE_DECL_ETHER_NTOHOST, 1,
694 [Define to 1 if you have the declaration of `ether_ntohost', and to 0 if you
695don't.])
696 fi
697fi
698
699dnl portability macros for getaddrinfo/getnameinfo
700dnl
701dnl Check for sa_len
702AC_CHECK_SA_LEN(ac_cv_sockaddr_has_sa_len)
703if test "$ac_cv_sockaddr_has_sa_len" = no; then
704 missing_includes=yes
705fi
706
707AC_CHECK_FUNCS(pcap_findalldevs pcap_dump_flush pcap_lib_version)
708if test $ac_cv_func_pcap_findalldevs = "yes" ; then
709dnl Check for Mac OS X, which may ship pcap.h from 0.6 but libpcap may
710dnl be 0.8; this means that lib has pcap_findalldevs but header doesn't
711dnl have pcap_if_t.
712 savedcflags="$CFLAGS"
713 CFLAGS="$CFLAGS $V_INCLS"
714 AC_CHECK_TYPES(pcap_if_t, , , [#include <pcap.h>])
715 CFLAGS="$savedcflags"
716fi
717
718if test $ac_cv_func_pcap_lib_version = "no" ; then
719 AC_MSG_CHECKING(whether pcap_version is defined by libpcap)
720 AC_TRY_LINK([],
721 [
722 extern char pcap_version[];
723

--- 66 unchanged lines hidden (view full) ---

790 V_GROUP=sys
791 ;;
792esac
793
794if test -f /dev/bpf0 ; then
795 V_GROUP=bpf
796fi
797
798AC_CHECK_HEADERS(sys/bitypes.h)
799
800AC_CHECK_TYPE([int8_t], ,
801 [AC_DEFINE([int8_t], [signed char],
802 [Define to `signed char' if int8_t not defined.])])
803AC_CHECK_TYPE([u_int8_t], ,
804 [AC_DEFINE([u_int8_t], [unsigned char],
805 [Define to `unsigned char' if u_int8_t not defined.])],

--- 89 unchanged lines hidden (view full) ---

895 [
896 AC_MSG_ERROR([neither %llx nor %Lx nor %qx worked on a 64-bit integer])
897 ])
898 ])
899 ])
900 ])
901fi
902
903AC_LBL_DEVEL(V_CCOPT)
904
905AC_LBL_SOCKADDR_SA_LEN
906
907AC_LBL_UNALIGNED_ACCESS
908
909AC_VAR_H_ERRNO
910
911AC_ARG_WITH(crypto, [ --without-crypto disable crypto support],
912 [], [
913AC_MSG_CHECKING(for SSLeay)
914ac_cv_ssleay_path=no
915incdir=no
916
917#
918# If Xprefix is set in the environment, use that value.
919# XXX - this should arguably be done by having --with-crypto take an
920# optional argument, and have that argument be used to set Xprefix
921# if present.
922#
923if test -z "$Xprefix"; then
924 Xprefix=`eval echo $prefix`
925fi
926
927for dir in $Xprefix /usr/${host_alias} /usr /usr/local /usr/local/ssl /usr/pkg; do
928 #
929 # XXX - is there a better way to check if a given library is
930 # in a given directory than checking each of the possible
931 # shared library suffixes?
932 #
933 # Are there any other suffixes we need to look for? Do we have to
934 # worry about ".so.{version}"?
935 #
936 # Or should we just look for "libcrypto.*"?
937 #
938 if test -d $dir/lib -a \( -f $dir/lib/libcrypto.a -o \
939 -f $dir/lib/libcrypto.so -o \
940 -f $dir/lib/libcrypto.sl -o \
941 -f $dir/lib/libcrypto.dylib \); then
942 ac_cv_ssleay_path=$dir
943 fi
944 if test -d $dir/include/openssl -a -f $dir/include/openssl/des.h; then
945 incdir="-I$dir/include"
946 fi
947 if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
948 break;
949 else
950 ac_cv_ssleay_path=no
951 incdir=no
952 fi
953done
954AC_MSG_RESULT($ac_cv_ssleay_path)
955if test "$ac_cv_ssleay_path" != no; then
956 V_INCLS="$V_INCLS $incdir"
957 LDFLAGS="-L$dir/lib $LDFLAGS"
958 if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
959 LIBS="$LIBS -lRSAglue"
960 fi
961 if test -f $ac_cv_ssleay_path/lib/librsaref.a; then
962 LIBS="$LIBS -lrsaref"
963 fi
964 AC_CHECK_LIB(crypto, DES_cbc_encrypt)
965
966 CPPFLAGS="$CPPFLAGS $V_INCLS"
967 AC_CHECK_HEADERS(openssl/evp.h)
968fi
969])
970
971dnl
972dnl set additional include path if necessary
973if test "$missing_includes" = "yes"; then
974 CPPFLAGS="$CPPFLAGS -I\$(srcdir)/missing"
975 V_INCLS="$V_INCLS -I\$(srcdir)/missing"
976fi
977

--- 18 unchanged lines hidden ---