configure.in (276788) | configure.in (285275) |
---|---|
1dnl Copyright (c) 1994, 1995, 1996, 1997 2dnl The Regents of the University of California. All rights reserved. 3dnl 4dnl Process this file with autoconf to produce a configure script. 5dnl 6 7# 8# See --- 183 unchanged lines hidden (view full) --- 192if test ! -z "$with_chroot" && test "$with_chroot" != "no" ; then 193 AC_DEFINE_UNQUOTED(WITH_CHROOT, "$withval", 194 [define if should chroot when dropping privileges]) 195 AC_MSG_RESULT(to \"$withval\") 196else 197 AC_MSG_RESULT(no) 198fi 199 | 1dnl Copyright (c) 1994, 1995, 1996, 1997 2dnl The Regents of the University of California. All rights reserved. 3dnl 4dnl Process this file with autoconf to produce a configure script. 5dnl 6 7# 8# See --- 183 unchanged lines hidden (view full) --- 192if test ! -z "$with_chroot" && test "$with_chroot" != "no" ; then 193 AC_DEFINE_UNQUOTED(WITH_CHROOT, "$withval", 194 [define if should chroot when dropping privileges]) 195 AC_MSG_RESULT(to \"$withval\") 196else 197 AC_MSG_RESULT(no) 198fi 199 |
200AC_ARG_WITH(sandbox-capsicum, [ --with-sandbox-capsicum ]) | 200AC_ARG_WITH(sandbox-capsicum, 201 AS_HELP_STRING([--with-sandbox-capsicum], 202 [use Capsicum security functions @<:@default=yes, if available@:>@])) |
201# 202# Check whether various functions are available. If any are, set 203# ac_lbl_capsicum_function_seen to yes; if any are not, set 204# ac_lbl_capsicum_function_not_seen to yes. 205# | 203# 204# Check whether various functions are available. If any are, set 205# ac_lbl_capsicum_function_seen to yes; if any are not, set 206# ac_lbl_capsicum_function_not_seen to yes. 207# |
206# All of them must be available in order to enable capsicum sandboxing. | 208# We don't check cap_rights_init(), as it's a macro, wrapping another 209# function, in at least some versions of FreeBSD, and AC_CHECK_FUNCS() 210# doesn't handle that. |
207# | 211# |
212# All of the ones we check for must be available in order to enable 213# capsicum sandboxing. 214# 215# XXX - do we need to check for all of them, or are there some that, if 216# present, imply others are present? 217# |
|
208if test ! -z "$with_sandbox-capsicum" && test "$with_sandbox-capsicum" != "no" ; then | 218if test ! -z "$with_sandbox-capsicum" && test "$with_sandbox-capsicum" != "no" ; then |
209 AC_CHECK_FUNCS(cap_enter cap_rights_init cap_rights_limit cap_ioctls_limit openat, | 219 AC_CHECK_FUNCS(cap_enter cap_rights_limit cap_ioctls_limit openat, |
210 ac_lbl_capsicum_function_seen=yes, 211 ac_lbl_capsicum_function_not_seen=yes) 212fi 213AC_MSG_CHECKING([whether to sandbox using capsicum]) 214if test "x$ac_lbl_capsicum_function_seen" = "xyes" -a "x$ac_lbl_capsicum_function_not_seen" != "xyes"; then 215 AC_DEFINE(HAVE_CAPSICUM, 1, [capsicum support available]) 216 AC_MSG_RESULT(yes) 217else --- 8 unchanged lines hidden (view full) --- 226AC_LBL_LIBRARY_NET 227 228AC_MSG_CHECKING([whether to enable ipv6]) 229AC_ARG_ENABLE(ipv6, 230[ --enable-ipv6 enable ipv6 (with ipv4) support 231 --disable-ipv6 disable ipv6 support], 232[ case "$enableval" in 233yes) AC_MSG_RESULT(yes) | 220 ac_lbl_capsicum_function_seen=yes, 221 ac_lbl_capsicum_function_not_seen=yes) 222fi 223AC_MSG_CHECKING([whether to sandbox using capsicum]) 224if test "x$ac_lbl_capsicum_function_seen" = "xyes" -a "x$ac_lbl_capsicum_function_not_seen" != "xyes"; then 225 AC_DEFINE(HAVE_CAPSICUM, 1, [capsicum support available]) 226 AC_MSG_RESULT(yes) 227else --- 8 unchanged lines hidden (view full) --- 236AC_LBL_LIBRARY_NET 237 238AC_MSG_CHECKING([whether to enable ipv6]) 239AC_ARG_ENABLE(ipv6, 240[ --enable-ipv6 enable ipv6 (with ipv4) support 241 --disable-ipv6 disable ipv6 support], 242[ case "$enableval" in 243yes) AC_MSG_RESULT(yes) |
234 LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c print-babel.c $LOCALSRC" | 244 LOCALSRC="print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c print-babel.c $LOCALSRC" |
235 AC_DEFINE(INET6, 1, [Define if you enable IPv6 support]) 236 ipv6=yes 237 ;; 238*) 239 AC_MSG_RESULT(no) 240 ipv6=no 241 ;; 242 esac ], --- 12 unchanged lines hidden (view full) --- 255 memset(addr, 0, sizeof (struct in6_addr)); 256} 257#else 258#error "AF_INET6 not defined" 259#endif 260 ]]) 261 ], 262[ AC_MSG_RESULT(yes) | 245 AC_DEFINE(INET6, 1, [Define if you enable IPv6 support]) 246 ipv6=yes 247 ;; 248*) 249 AC_MSG_RESULT(no) 250 ipv6=no 251 ;; 252 esac ], --- 12 unchanged lines hidden (view full) --- 265 memset(addr, 0, sizeof (struct in6_addr)); 266} 267#else 268#error "AF_INET6 not defined" 269#endif 270 ]]) 271 ], 272[ AC_MSG_RESULT(yes) |
263 LOCALSRC="print-ip6.c print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c print-babel.c $LOCALSRC" | 273 LOCALSRC="print-ip6opts.c print-mobility.c print-ripng.c print-icmp6.c print-frag6.c print-rt6.c print-ospf6.c print-dhcp6.c print-babel.c $LOCALSRC" |
264 AC_DEFINE(INET6, 1, [Define if you enable IPv6 support]) 265 ipv6=yes], 266[ AC_MSG_RESULT(no) 267 ipv6=no], 268[ AC_MSG_RESULT(no) 269 ipv6=no] 270)) 271 --- 218 unchanged lines hidden (view full) --- 490 bad: 491 if (aitop) 492 freeaddrinfo(aitop); 493 exit(1); 494} 495], 496 td_cv_buggygetaddrinfo=no, 497 td_cv_buggygetaddrinfo=yes, | 274 AC_DEFINE(INET6, 1, [Define if you enable IPv6 support]) 275 ipv6=yes], 276[ AC_MSG_RESULT(no) 277 ipv6=no], 278[ AC_MSG_RESULT(no) 279 ipv6=no] 280)) 281 --- 218 unchanged lines hidden (view full) --- 500 bad: 501 if (aitop) 502 freeaddrinfo(aitop); 503 exit(1); 504} 505], 506 td_cv_buggygetaddrinfo=no, 507 td_cv_buggygetaddrinfo=yes, |
498 td_cv_buggygetaddrinfo=yes)]) | 508 td_cv_buggygetaddrinfo=unknown)]) |
499 if test "$td_cv_buggygetaddrinfo" = no; then 500 AC_MSG_RESULT(good) | 509 if test "$td_cv_buggygetaddrinfo" = no; then 510 AC_MSG_RESULT(good) |
511 elif test "$td_cv_buggygetaddrinfo" = unknown; then 512 AC_MSG_RESULT([unknown (cross-compiling)]) |
|
501 else 502 AC_MSG_RESULT(buggy) 503 fi 504 505 if test "$td_cv_buggygetaddrinfo" = "yes"; then 506 # 507 # XXX - it doesn't appear that "ipv6type" can ever be 508 # set to "linux". Should this be testing for --- 235 unchanged lines hidden (view full) --- 744dnl portability macros for getaddrinfo/getnameinfo 745dnl 746dnl Check for sa_len 747AC_CHECK_SA_LEN(ac_cv_sockaddr_has_sa_len) 748if test "$ac_cv_sockaddr_has_sa_len" = no; then 749 missing_includes=yes 750fi 751 | 513 else 514 AC_MSG_RESULT(buggy) 515 fi 516 517 if test "$td_cv_buggygetaddrinfo" = "yes"; then 518 # 519 # XXX - it doesn't appear that "ipv6type" can ever be 520 # set to "linux". Should this be testing for --- 235 unchanged lines hidden (view full) --- 756dnl portability macros for getaddrinfo/getnameinfo 757dnl 758dnl Check for sa_len 759AC_CHECK_SA_LEN(ac_cv_sockaddr_has_sa_len) 760if test "$ac_cv_sockaddr_has_sa_len" = no; then 761 missing_includes=yes 762fi 763 |
764dnl 765dnl Check for "pcap_list_datalinks()", "pcap_set_datalink()", 766dnl and "pcap_datalink_name_to_val()", and use substitute versions 767dnl if they're not present. 768dnl 769AC_CHECK_FUNC(pcap_list_datalinks, 770 [ 771 AC_DEFINE(HAVE_PCAP_LIST_DATALINKS, 1, 772 [define if libpcap has pcap_list_datalinks()]) 773 AC_CHECK_FUNCS(pcap_free_datalinks) 774 ], 775 [ 776 AC_LIBOBJ(datalinks) 777 ]) 778AC_CHECK_FUNCS(pcap_set_datalink) 779AC_CHECK_FUNC(pcap_datalink_name_to_val, 780 [ 781 AC_DEFINE(HAVE_PCAP_DATALINK_NAME_TO_VAL, 1, 782 [define if libpcap has pcap_datalink_name_to_val()]) 783 AC_CHECK_FUNC(pcap_datalink_val_to_description, 784 AC_DEFINE(HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION, 1, 785 [define if libpcap has pcap_datalink_val_to_description()]), 786 [ 787 AC_LIBOBJ(dlnames) 788 ]) 789 ], 790 [ 791 AC_LIBOBJ(dlnames) 792 ]) 793 794dnl 795dnl Check for "pcap_breakloop()"; you can't substitute for it if 796dnl it's absent (it has hooks into the live capture routines), 797dnl so just define the HAVE_ value if it's there. 798dnl 799AC_CHECK_FUNCS(pcap_breakloop) 800 801dnl 802dnl Check for "pcap_dump_ftell()" and use a substitute version 803dnl if it's not present. 804dnl 805AC_CHECK_FUNC(pcap_dump_ftell, 806 AC_DEFINE(HAVE_PCAP_DUMP_FTELL, 1, 807 [define if libpcap has pcap_dump_ftell()]), 808 [ 809 AC_LIBOBJ(pcap_dump_ftell) 810 ]) 811 |
|
752# 753# Do we have the new open API? Check for pcap_create, and assume that, 754# if we do, we also have pcap_activate() and the other new routines 755# introduced in libpcap 1.0.0. 756# 757AC_CHECK_FUNCS(pcap_create) 758if test $ac_cv_func_pcap_create = "yes" ; then 759 # 760 # OK, do we have pcap_set_tstamp_type? If so, assume we have 761 # pcap_list_tstamp_types and pcap_free_tstamp_types as well. 762 # 763 AC_CHECK_FUNCS(pcap_set_tstamp_type) 764 # 765 # And do we have pcap_set_tstamp_precision? If so, we assume 766 # we also have pcap_open_offline_with_tstamp_precision. 767 # 768 AC_CHECK_FUNCS(pcap_set_tstamp_precision) 769fi 770 | 812# 813# Do we have the new open API? Check for pcap_create, and assume that, 814# if we do, we also have pcap_activate() and the other new routines 815# introduced in libpcap 1.0.0. 816# 817AC_CHECK_FUNCS(pcap_create) 818if test $ac_cv_func_pcap_create = "yes" ; then 819 # 820 # OK, do we have pcap_set_tstamp_type? If so, assume we have 821 # pcap_list_tstamp_types and pcap_free_tstamp_types as well. 822 # 823 AC_CHECK_FUNCS(pcap_set_tstamp_type) 824 # 825 # And do we have pcap_set_tstamp_precision? If so, we assume 826 # we also have pcap_open_offline_with_tstamp_precision. 827 # 828 AC_CHECK_FUNCS(pcap_set_tstamp_precision) 829fi 830 |
771AC_CHECK_FUNCS(pcap_findalldevs pcap_dump_flush pcap_lib_version pcap_setdirection) | 831# 832# Check for a miscellaneous collection of functions which we use 833# if we have them. 834# 835AC_CHECK_FUNCS(pcap_findalldevs pcap_dump_flush pcap_lib_version pcap_setdirection pcap_set_immediate_mode) |
772if test $ac_cv_func_pcap_findalldevs = "yes" ; then 773dnl Check for Mac OS X, which may ship pcap.h from 0.6 but libpcap may 774dnl be 0.8; this means that lib has pcap_findalldevs but header doesn't 775dnl have pcap_if_t. 776 savedcppflags="$CPPFLAGS" 777 CPPFLAGS="$CPPFLAGS $V_INCLS" 778 AC_CHECK_TYPES(pcap_if_t, , , [#include <pcap.h>]) 779 CPPFLAGS="$savedcppflags" --- 5 unchanged lines hidden (view full) --- 785 [ 786 extern char pcap_version[]; 787 788 return (int)pcap_version; 789 ], 790 ac_lbl_cv_pcap_version_defined=yes, 791 ac_lbl_cv_pcap_version_defined=no) 792 if test "$ac_lbl_cv_pcap_version_defined" = yes ; then | 836if test $ac_cv_func_pcap_findalldevs = "yes" ; then 837dnl Check for Mac OS X, which may ship pcap.h from 0.6 but libpcap may 838dnl be 0.8; this means that lib has pcap_findalldevs but header doesn't 839dnl have pcap_if_t. 840 savedcppflags="$CPPFLAGS" 841 CPPFLAGS="$CPPFLAGS $V_INCLS" 842 AC_CHECK_TYPES(pcap_if_t, , , [#include <pcap.h>]) 843 CPPFLAGS="$savedcppflags" --- 5 unchanged lines hidden (view full) --- 849 [ 850 extern char pcap_version[]; 851 852 return (int)pcap_version; 853 ], 854 ac_lbl_cv_pcap_version_defined=yes, 855 ac_lbl_cv_pcap_version_defined=no) 856 if test "$ac_lbl_cv_pcap_version_defined" = yes ; then |
793 AC_MSG_RESULT(yes) | 857 AC_MSG_RESULT(yes) |
794 AC_DEFINE(HAVE_PCAP_VERSION, 1, [define if libpcap has pcap_version]) 795 else 796 AC_MSG_RESULT(no) 797 fi 798fi 799AC_MSG_CHECKING(whether pcap_debug is defined by libpcap) 800AC_TRY_LINK([], 801 [ --- 98 unchanged lines hidden (view full) --- 900AC_TYPE_INT32_T 901AC_TYPE_INT64_T 902AC_TYPE_UINT8_T 903AC_TYPE_UINT16_T 904AC_TYPE_UINT32_T 905AC_TYPE_UINT64_T 906 907# | 858 AC_DEFINE(HAVE_PCAP_VERSION, 1, [define if libpcap has pcap_version]) 859 else 860 AC_MSG_RESULT(no) 861 fi 862fi 863AC_MSG_CHECKING(whether pcap_debug is defined by libpcap) 864AC_TRY_LINK([], 865 [ --- 98 unchanged lines hidden (view full) --- 964AC_TYPE_INT32_T 965AC_TYPE_INT64_T 966AC_TYPE_UINT8_T 967AC_TYPE_UINT16_T 968AC_TYPE_UINT32_T 969AC_TYPE_UINT64_T 970 971# |
972# Make sure we have a definition for C99's uintptr_t (regardless of 973# whether the environment is a C99 environment or not). 974# 975AC_TYPE_UINTPTR_T 976 977# |
|
908# Define the old BSD specified-width types in terms of the C99 types; 909# we may need them with libpcap include files. 910# 911AC_CHECK_TYPE([u_int8_t], , 912 [AC_DEFINE([u_int8_t], [uint8_t], 913 [Define to `uint8_t' if u_int8_t not defined.])], 914 [AC_INCLUDES_DEFAULT 915#include <sys/types.h> --- 125 unchanged lines hidden (view full) --- 1041 want_libcrypto=ifavailable 1042 AC_MSG_RESULT([yes, if available]) 1043]) 1044if test "$want_libcrypto" != "no"; then 1045 AC_CHECK_LIB(crypto, DES_cbc_encrypt) 1046 AC_CHECK_HEADERS(openssl/evp.h) 1047fi 1048 | 978# Define the old BSD specified-width types in terms of the C99 types; 979# we may need them with libpcap include files. 980# 981AC_CHECK_TYPE([u_int8_t], , 982 [AC_DEFINE([u_int8_t], [uint8_t], 983 [Define to `uint8_t' if u_int8_t not defined.])], 984 [AC_INCLUDES_DEFAULT 985#include <sys/types.h> --- 125 unchanged lines hidden (view full) --- 1111 want_libcrypto=ifavailable 1112 AC_MSG_RESULT([yes, if available]) 1113]) 1114if test "$want_libcrypto" != "no"; then 1115 AC_CHECK_LIB(crypto, DES_cbc_encrypt) 1116 AC_CHECK_HEADERS(openssl/evp.h) 1117fi 1118 |
1119# Check for libcap-ng 1120AC_MSG_CHECKING(whether to use libcap-ng) 1121# Specify location for both includes and libraries. 1122want_libcap_ng=ifavailable 1123AC_ARG_WITH(cap_ng, 1124 AS_HELP_STRING([--with-cap-ng], 1125 [use libcap-ng @<:@default=yes, if available@:>@]), 1126[ 1127 if test $withval = no 1128 then 1129 want_libcap_ng=no 1130 AC_MSG_RESULT(no) 1131 elif test $withval = yes 1132 then 1133 want_libcap_ng=yes 1134 AC_MSG_RESULT(yes) 1135 fi 1136],[ 1137 # 1138 # Use libcap-ng if it's present, otherwise don't. 1139 # 1140 want_libcap_ng=ifavailable 1141 AC_MSG_RESULT([yes, if available]) 1142]) 1143if test "$want_libcap_ng" != "no"; then 1144 AC_CHECK_LIB(cap-ng, capng_change_id) 1145 AC_CHECK_HEADERS(cap-ng.h) 1146fi 1147 |
|
1049dnl 1050dnl set additional include path if necessary 1051if test "$missing_includes" = "yes"; then 1052 CPPFLAGS="$CPPFLAGS -I$srcdir/missing" 1053 V_INCLS="$V_INCLS -I$srcdir/missing" 1054fi 1055 1056AC_SUBST(V_CCOPT) --- 19 unchanged lines hidden --- | 1148dnl 1149dnl set additional include path if necessary 1150if test "$missing_includes" = "yes"; then 1151 CPPFLAGS="$CPPFLAGS -I$srcdir/missing" 1152 V_INCLS="$V_INCLS -I$srcdir/missing" 1153fi 1154 1155AC_SUBST(V_CCOPT) --- 19 unchanged lines hidden --- |