Deleted Added
full compact
configure.in (172684) configure.in (190207)
1dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.188.2.8 2007/09/12 19:48:50 guy Exp $ (LBL)
1dnl @(#) $Header: /tcpdump/master/tcpdump/configure.in,v 1.196.2.6 2008-09-25 21:50:04 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
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 $)
9AC_REVISION($Revision: 1.196.2.6 $)
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>])
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
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
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
699# libdlpi is needed for Solaris 11 and later.
700AC_CHECK_LIB(dlpi, dlpi_walk, LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS", ,-L/lib)
701
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
702dnl portability macros for getaddrinfo/getnameinfo
703dnl
704dnl Check for sa_len
705AC_CHECK_SA_LEN(ac_cv_sockaddr_has_sa_len)
706if test "$ac_cv_sockaddr_has_sa_len" = no; then
707 missing_includes=yes
708fi
709
710#
711# Do we have the new open API? Check for pcap_create, and assume that,
712# if we do, we also have pcap_activate() and the other new routines.
713AC_CHECK_FUNCS(pcap_create)
714
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.
715AC_CHECK_FUNCS(pcap_findalldevs pcap_dump_flush pcap_lib_version)
716if test $ac_cv_func_pcap_findalldevs = "yes" ; then
717dnl Check for Mac OS X, which may ship pcap.h from 0.6 but libpcap may
718dnl be 0.8; this means that lib has pcap_findalldevs but header doesn't
719dnl have pcap_if_t.
712 savedcflags="$CFLAGS"
713 CFLAGS="$CFLAGS $V_INCLS"
720 savedppflags="$CPPLAGS"
721 CPPFLAGS="$CPPFLAGS $V_INCLS"
714 AC_CHECK_TYPES(pcap_if_t, , , [#include <pcap.h>])
722 AC_CHECK_TYPES(pcap_if_t, , , [#include <pcap.h>])
715 CFLAGS="$savedcflags"
723 CPPFLAGS="$savedcppflags"
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
724fi
725
726if test $ac_cv_func_pcap_lib_version = "no" ; then
727 AC_MSG_CHECKING(whether pcap_version is defined by libpcap)
728 AC_TRY_LINK([],
729 [
730 extern char pcap_version[];
731

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

798 V_GROUP=sys
799 ;;
800esac
801
802if test -f /dev/bpf0 ; then
803 V_GROUP=bpf
804fi
805
806#
807# Check for some headers introduced in later versions of libpcap
808# and used by some printers.
809#
810savedcppflags="$CPPFLAGS"
811CPPFLAGS="$CPPFLAGS $V_INCLS"
812AC_CHECK_HEADERS(pcap/bluetooth.h)
813CPPFLAGS="$savedcppflags"
814
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
815AC_CHECK_HEADERS(sys/bitypes.h)
816
817AC_CHECK_TYPE([int8_t], ,
818 [AC_DEFINE([int8_t], [signed char],
819 [Define to `signed char' if int8_t not defined.])])
820AC_CHECK_TYPE([u_int8_t], ,
821 [AC_DEFINE([u_int8_t], [unsigned char],
822 [Define to `unsigned char' if u_int8_t not defined.])],

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

912 [
913 AC_MSG_ERROR([neither %llx nor %Lx nor %qx worked on a 64-bit integer])
914 ])
915 ])
916 ])
917 ])
918fi
919
920AC_PROG_RANLIB
921
903AC_LBL_DEVEL(V_CCOPT)
904
905AC_LBL_SOCKADDR_SA_LEN
906
907AC_LBL_UNALIGNED_ACCESS
908
909AC_VAR_H_ERRNO
910
922AC_LBL_DEVEL(V_CCOPT)
923
924AC_LBL_SOCKADDR_SA_LEN
925
926AC_LBL_UNALIGNED_ACCESS
927
928AC_VAR_H_ERRNO
929
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
930# Check for SSLeay
931AC_MSG_CHECKING(whether to use SSLeay libcrypto)
932# Specify location for both includes and libraries.
933want_libcrypto=youmama
934AC_ARG_WITH(crypto,
935 AS_HELP_STRING([--with-crypto@<:@=PATH@:>@],
936 [use SSLeay libcrypto (located in directory PATH, if supplied). @<:@default=yes, if available@:>@]),
937[
938 if test $withval = no
939 then
940 want_libcrypto=no
941 AC_MSG_RESULT(no)
942 elif test $withval = yes
943 then
944 want_libcrypto=yes
945 AC_MSG_RESULT(yes)
946 else
947 want_libcrypto=yes
948 AC_MSG_RESULT(yes)
949 crypto_dir=$withval
950 fi
951],[
928 #
952 #
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?
953 # Use libcrypto if it's present, otherwise don't.
932 #
954 #
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;
955 want_libcrypto=ifavailable
956 AC_MSG_RESULT([yes, if available])
957])
958if test "$want_libcrypto" != "no"; then
959 ac_cv_ssleay_path=no
960 incdir=no
961 if test "x$crypto_dir" = x; then
962 #
963 # Location not specified; check the default locations.
964 #
965 AC_MSG_CHECKING(where SSLeay is located)
966 dirs="/usr /usr/local /usr/local/ssl /usr/pkg"
967 if test "x${host_alias}" != x; then
968 dirs="/usr/${host_alias} $dirs"
969 fi
970 for dir in $dirs; do
971 AC_LBL_SSLEAY($dir)
972
973 if test "$ac_cv_ssleay_path" != "no" -a "$incdir" != "no"; then
974 break;
975 else
976 ac_cv_ssleay_path=no
977 incdir=no
978 fi
979 done
980 if test "$ac_cv_ssleay_path" != no; then
981 AC_MSG_RESULT($ac_cv_ssleay_path)
982 fi
949 else
983 else
950 ac_cv_ssleay_path=no
951 incdir=no
984 AC_MSG_CHECKING(for SSLeay in $crypto_dir)
985 AC_LBL_SSLEAY($crypto_dir)
986 if test "$ac_cv_ssleay_path" != no; then
987 AC_MSG_RESULT(found)
988 fi
952 fi
989 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)
990 if test "$ac_cv_ssleay_path" != no; then
991 V_INCLS="$V_INCLS $incdir"
992 LDFLAGS="-L$dir/lib $LDFLAGS"
993 if test -f $ac_cv_ssleay_path/lib/libRSAglue.a; then
994 LIBS="$LIBS -lRSAglue"
995 fi
996 if test -f $ac_cv_ssleay_path/lib/librsaref.a; then
997 LIBS="$LIBS -lrsaref"
998 fi
999 AC_CHECK_LIB(crypto, DES_cbc_encrypt)
965
1000
966 CPPFLAGS="$CPPFLAGS $V_INCLS"
967 AC_CHECK_HEADERS(openssl/evp.h)
1001 CPPFLAGS="$CPPFLAGS $V_INCLS"
1002 AC_CHECK_HEADERS(openssl/evp.h)
1003 else
1004 #
1005 # Not found. Did the user explicitly ask for it?
1006 #
1007 AC_MSG_RESULT(not found)
1008 if test "$want_libcrypto" = yes; then
1009 AC_MSG_ERROR(SSLeay not found)
1010 fi
1011 fi
968fi
1012fi
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 ---
1013
1014dnl
1015dnl set additional include path if necessary
1016if test "$missing_includes" = "yes"; then
1017 CPPFLAGS="$CPPFLAGS -I\$(srcdir)/missing"
1018 V_INCLS="$V_INCLS -I\$(srcdir)/missing"
1019fi
1020

--- 18 unchanged lines hidden ---