X-Git-Url: https://git.tcpdump.org/tcpdump/blobdiff_plain/6ec714988caac3bf9fedc766ae51a2248896ec80..refs/pull/1034/head:/configure.ac diff --git a/configure.ac b/configure.ac index af501dba..0278e7c5 100644 --- a/configure.ac +++ b/configure.ac @@ -7,66 +7,37 @@ dnl # # See # -# http://ftp.gnu.org/gnu/config/README +# https://ftp.gnu.org/gnu/config/README # # for the URLs to use to fetch new versions of config.guess and # config.sub. # -AC_PREREQ(2.64) -AC_INIT(tcpdump, m4_esyscmd_s([cat VERSION])) +AC_PREREQ([2.69]) +AC_INIT([tcpdump],[m4_esyscmd_s(cat VERSION)]) AC_CONFIG_SRCDIR(tcpdump.c) AC_CANONICAL_HOST AC_LBL_C_INIT_BEFORE_CC(V_INCLS) -AC_PROG_CC +# +# Try to enable as many C99 features as we can. +# At minimum, we want C++/C99-style // comments. +# +AC_PROG_CC_C99 +if test "$ac_cv_prog_cc_c99" = "no"; then + AC_MSG_WARN([The C compiler does not support C99; there may be compiler errors]) +fi AC_LBL_C_INIT(V_CCOPT, V_INCLS) AC_LBL_C_INLINE -AC_C___ATTRIBUTE__ -if test "$ac_cv___attribute__" = "yes"; then - AC_C___ATTRIBUTE___UNUSED - AC_C___ATTRIBUTE___FALLTHROUGH -fi -AC_CHECK_HEADERS(fcntl.h rpc/rpc.h rpc/rpcent.h netdnet/dnetdb.h) -AC_CHECK_HEADERS(net/pfvar.h, , , [#include -#include -#include ]) -if test "$ac_cv_header_net_pfvar_h" = yes; then - AC_CHECK_HEADERS(net/if_pflog.h, , , [#include - #include - #include - #include ]) - if test "$ac_cv_header_net_if_pflog_h" = yes; then - LOCALSRC="print-pflog.c $LOCALSRC" - fi -fi -AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include -#include ]) -if test "$ac_cv_header_netinet_if_ether_h" != yes; then - # - # The simple test didn't work. - # Do we need to include first? - # Unset ac_cv_header_netinet_if_ether_h so we don't - # treat the previous failure as a cached value and - # suppress the next test. - # - AC_MSG_NOTICE([Rechecking with some additional includes]) - unset ac_cv_header_netinet_if_ether_h - AC_CHECK_HEADERS(netinet/if_ether.h, , , [#include -#include -#include -struct mbuf; -struct rtentry; -#include ]) -fi +AC_CHECK_HEADERS(fcntl.h rpc/rpc.h rpc/rpcent.h net/if.h) case "$host_os" in darwin*) AC_ARG_ENABLE(universal, - AC_HELP_STRING([--disable-universal],[don't build universal on OS X])) + AS_HELP_STRING([--disable-universal],[don't build universal on macOS])) if test "$enable_universal" != "no"; then case "$host_os" in @@ -93,10 +64,11 @@ darwin*) esac -AC_ARG_WITH(smi, -[ --with-smi link with libsmi (allows to load MIBs on the fly to decode SNMP packets. [default=yes] - --without-smi don't link with libsmi],, - with_smi=yes) +AC_ARG_WITH([smi], + [AS_HELP_STRING([--with-smi], + [link with libsmi (allows to load MIBs on the fly to decode SNMP packets) [default=yes, if available]])], + [], + [with_smi=yes]) if test "x$with_smi" != "xno" ; then AC_CHECK_HEADER(smi.h, @@ -112,11 +84,13 @@ if test "x$with_smi" != "xno" ; then AC_MSG_CHECKING([whether to enable libsmi]) savedlibs="$LIBS" LIBS="-lsmi $LIBS" - AC_TRY_RUN( - [ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ /* libsmi available check */ +#include +#include +#include #include -main() +int main() { int current, revision, age, n; const int required = 2; @@ -131,6 +105,7 @@ main() exit(4); exit(0); } + ]]) ], [ AC_MSG_RESULT(yes) @@ -162,14 +137,41 @@ main() ]) fi +AC_MSG_CHECKING([whether to enable the instrument functions code]) +AC_ARG_ENABLE([instrument-functions], + [AS_HELP_STRING([--enable-instrument-functions], + [enable instrument functions code [default=no]])], + [], + [enableval=no]) +case "$enableval" in +yes) AC_MSG_RESULT(yes) + AC_CHECK_LIB([bfd], [bfd_init], + [true], + [AC_MSG_ERROR( + [--enable-instrument-functions was given, but test for library libbfd failed. Please install the 'binutils-dev' package.])], + []) + AC_DEFINE(ENABLE_INSTRUMENT_FUNCTIONS, 1, + [define if you want to build the instrument functions code]) + LOCALSRC="$LOCALSRC instrument-functions.c" + # Add '-finstrument-functions' instrumentation option to generate + # instrumentation calls for entry and exit to functions. + # Try to avoid Address Space Layout Randomization (ALSR). + CFLAGS="$CFLAGS -O0 -ggdb -finstrument-functions -fno-stack-protector -fno-pic" + LDFLAGS="$LDFLAGS -O0 -ggdb -fno-stack-protector -no-pie" + LIBS="$LIBS -lbfd" + ;; +*) AC_MSG_RESULT(no) + ;; +esac + AC_MSG_CHECKING([whether to enable the possibly-buggy SMB printer]) -AC_ARG_ENABLE(smb, -[ --enable-smb enable possibly-buggy SMB printer [default=yes] - --disable-smb disable possibly-buggy SMB printer],, - enableval=yes) +AC_ARG_ENABLE([smb], + [AS_HELP_STRING([--enable-smb], + [enable possibly-buggy SMB printer [default=no]])], + [], + [enableval=no]) case "$enableval" in yes) AC_MSG_RESULT(yes) - AC_WARN([The SMB printer may have exploitable buffer overflows!!!]) AC_DEFINE(ENABLE_SMB, 1, [define if you want to build the possibly-buggy SMB printer]) LOCALSRC="print-smb.c smbutil.c $LOCALSRC" @@ -216,10 +218,19 @@ AC_ARG_WITH(sandbox-capsicum, # XXX - do we need to check for all of them, or are there some that, if # present, imply others are present? # -if test ! -z "$with_sandbox-capsicum" && test "$with_sandbox-capsicum" != "no" ; then - AC_CHECK_FUNCS(cap_enter cap_rights_limit cap_ioctls_limit openat, - ac_lbl_capsicum_function_seen=yes, - ac_lbl_capsicum_function_not_seen=yes) +if test -z "$with_sandbox_capsicum" || test "$with_sandbox_capsicum" != "no" ; then + # + # First, make sure we have the required header. + # + AC_CHECK_HEADER(sys/capsicum.h, + [ + # + # We do; now make sure we have the required functions. + # + AC_CHECK_FUNCS(cap_enter cap_rights_limit cap_ioctls_limit openat, + ac_lbl_capsicum_function_seen=yes, + ac_lbl_capsicum_function_not_seen=yes) + ]) AC_CHECK_LIB(casper, cap_init, LIBS="$LIBS -lcasper") AC_CHECK_LIB(cap_dns, cap_gethostbyaddr, LIBS="$LIBS -lcap_dns") fi @@ -256,6 +267,7 @@ AC_COMPILE_IFELSE( [ AC_LANG_SOURCE( [[ +#include /* AF_INET6 available check */ #include #ifdef _WIN32 @@ -394,29 +406,49 @@ if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then fi fi -AC_CACHE_CHECK([for dnet_htoa declaration in netdnet/dnetdb.h], -[td_cv_decl_netdnet_dnetdb_h_dnet_htoa], -[AC_EGREP_HEADER(dnet_htoa, netdnet/dnetdb.h, - td_cv_decl_netdnet_dnetdb_h_dnet_htoa=yes, - td_cv_decl_netdnet_dnetdb_h_dnet_htoa=no)]) -if test "$td_cv_decl_netdnet_dnetdb_h_dnet_htoa" = yes; then - AC_DEFINE(HAVE_NETDNET_DNETDB_H_DNET_HTOA, 1, - [define if you have a dnet_htoa declaration in ]) -fi - -AC_REPLACE_FUNCS(vfprintf strlcat strlcpy strdup strsep getservent getopt_long) -AC_CHECK_FUNCS(fork vfork strftime) +AC_REPLACE_FUNCS(strlcat strlcpy strdup strsep getservent getopt_long) +AC_CHECK_FUNCS(fork vfork) AC_CHECK_FUNCS(setlinebuf) -needsnprintf=no -AC_CHECK_FUNCS(vsnprintf snprintf,, - [needsnprintf=yes]) -if test $needsnprintf = yes; then - AC_LIBOBJ(snprintf) -fi +# +# Make sure we have vsnprintf() and snprintf(); we require them. +# +AC_CHECK_FUNC(vsnprintf,, + AC_MSG_ERROR([vsnprintf() is required but wasn't found])) +AC_CHECK_FUNC(snprintf,, + AC_MSG_ERROR([snprintf() is required but wasn't found])) -AC_SEARCH_LIBS(dnet_htoa, dnet, - AC_DEFINE(HAVE_DNET_HTOA, 1, [define if you have the dnet_htoa function])) +# +# Define HAVE_NO_PRINTF_Z to make it possible to disable test cases that +# depend on %zu. +# +AC_MSG_CHECKING([whether printf(3) supports the z length modifier]) +AC_RUN_IFELSE( + [ + AC_LANG_SOURCE([[ +#include +#include + +int main() +{ + char buf[100]; + snprintf(buf, sizeof(buf), "%zu", sizeof(buf)); + return strncmp(buf, "100", sizeof(buf)) ? 1 : 0; +} + ]]) + ], + [ + AC_MSG_RESULT(yes) + ], + [ + AC_MSG_RESULT(no) + AC_DEFINE(HAVE_NO_PRINTF_Z, 1, + [Define to 1 if printf(3) does not support the z length modifier.]) + ], + [ + AC_MSG_RESULT(not while cross-compiling) + ] +) AC_CHECK_LIB(rpc, main) dnl It's unclear why we might need -lrpc @@ -432,18 +464,21 @@ AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS) # # You are in a twisty little maze of UN*Xes, all different. # Some might not have ether_ntohost(). -# Some might have it, but not declare it in any header file. -# Some might have it, but declare it in . -# Some might have it, but declare it in -# (And some might have it but document it as something declared in -# , although appears to work.) +# Some might have it and declare it in . +# Some might have it and declare it in +# Some might have it and declare it in . +# Some might have it and declare it in . +# Some might have it and declare it in . +# Some might have it and not declare it in any header file. # # Before you is a C compiler. # AC_CHECK_FUNCS(ether_ntohost, [ AC_CACHE_CHECK(for buggy ether_ntohost, ac_cv_buggy_ether_ntohost, [ - AC_TRY_RUN([ + AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include + #include + #include #include #include #include @@ -457,6 +492,7 @@ AC_CHECK_FUNCS(ether_ntohost, [ ether_ntohost(name, (struct ether_addr *)ea); exit(0); } + ]]) ], [ac_cv_buggy_ether_ntohost=no], [ac_cv_buggy_ether_ntohost=yes], [ac_cv_buggy_ether_ntohost="not while cross-compiling"])]) @@ -468,26 +504,41 @@ AC_CHECK_FUNCS(ether_ntohost, [ if test "$ac_cv_func_ether_ntohost" = yes -a \ "$ac_cv_buggy_ether_ntohost" = "no"; then # - # OK, we have ether_ntohost(). Do we have ? + # OK, we have ether_ntohost(). Is it declared in ? + # + # This test fails if we don't have or if we do + # but it doesn't declare ether_ntohost(). + # + AC_CHECK_DECL(ether_ntohost, + [ + AC_DEFINE(NET_ETHERNET_H_DECLARES_ETHER_NTOHOST,, + [Define to 1 if net/ethernet.h declares `ether_ntohost']) + ],, + [ +#include + ]) + # + # Did that succeed? # - if test "$ac_cv_header_netinet_if_ether_h" = yes; then + if test "$ac_cv_have_decl_ether_ntohost" != yes; then + # + # No, how about , as on Linux? # - # Yes. Does it declare ether_ntohost()? + # This test fails if we don't have + # or if we do but it doesn't declare ether_ntohost(). # + # Unset ac_cv_have_decl_ether_ntohost so we don't + # treat the previous failure as a cached value and + # suppress the next test. + # + unset ac_cv_have_decl_ether_ntohost AC_CHECK_DECL(ether_ntohost, [ - AC_DEFINE(NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST,, - [Define to 1 if netinet/if_ether.h declares `ether_ntohost']) + AC_DEFINE(NETINET_ETHER_H_DECLARES_ETHER_NTOHOST,, + [Define to 1 if netinet/ether.h declares `ether_ntohost']) ],, [ -#include -#include -#include -#include -struct mbuf; -struct rtentry; -#include -#include +#include ]) fi # @@ -495,60 +546,119 @@ struct rtentry; # if test "$ac_cv_have_decl_ether_ntohost" != yes; then # - # No, how about , as on Linux? + # No, how about , as on Solaris 10 + # and later? # - AC_CHECK_HEADERS(netinet/ether.h) - if test "$ac_cv_header_netinet_ether_h" = yes; then - # - # We have it - does it declare ether_ntohost()? - # Unset ac_cv_have_decl_ether_ntohost so we don't - # treat the previous failure as a cached value and - # suppress the next test. - # - unset ac_cv_have_decl_ether_ntohost - AC_CHECK_DECL(ether_ntohost, - [ - AC_DEFINE(NETINET_ETHER_H_DECLARES_ETHER_NTOHOST,, - [Define to 1 if netinet/ether.h declares `ether_ntohost']) - ],, - [ -#include - ]) - fi + # This test fails if we don't have + # or if we do but it doesn't declare ether_ntohost(). + # + # Unset ac_cv_have_decl_ether_ntohost so we don't + # treat the previous failure as a cached value and + # suppress the next test. + # + unset ac_cv_have_decl_ether_ntohost + AC_CHECK_DECL(ether_ntohost, + [ + AC_DEFINE(SYS_ETHERNET_H_DECLARES_ETHER_NTOHOST,, + [Define to 1 if sys/ethernet.h declares `ether_ntohost']) + ],, + [ +#include + ]) fi # - # Is ether_ntohost() declared? + # Did that succeed? # if test "$ac_cv_have_decl_ether_ntohost" != yes; then # - # No, we'll have to declare it ourselves. - # Do we have "struct ether_addr"? + # No, how about , as in AIX? # - AC_CHECK_TYPES(struct ether_addr,,, + # This test fails if we don't have + # (if we have ether_ntohost(), we should have + # networking, and if we have networking, we should + # have ) or if we do but it doesn't + # declare ether_ntohost(). + # + # Unset ac_cv_have_decl_ether_ntohost so we don't + # treat the previous failure as a cached value and + # suppress the next test. + # + unset ac_cv_have_decl_ether_ntohost + AC_CHECK_DECL(ether_ntohost, + [ + AC_DEFINE(ARPA_INET_H_DECLARES_ETHER_NTOHOST,, + [Define to 1 if arpa/inet.h declares `ether_ntohost']) + ],, + [ +#include + ]) + fi + # + # Did that succeed? + # + if test "$ac_cv_have_decl_ether_ntohost" != yes; then + # + # No, how about ? + # On some platforms, it requires and + # , and we always include it with + # both of them, so test it with both of them. + # + # This test fails if we don't have + # and the headers we include before it, or if we do but + # doesn't declare ether_hostton(). + # + # Unset ac_cv_have_decl_ether_ntohost so we don't + # treat the previous failure as a cached value and + # suppress the next test. + # + unset ac_cv_have_decl_ether_ntohost + AC_CHECK_DECL(ether_ntohost, + [ + AC_DEFINE(NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST,, + [Define to 1 if netinet/if_ether.h declares `ether_ntohost']) + ],, [ #include #include -#include -#include -struct mbuf; -struct rtentry; #include +#include #include ]) - AC_DEFINE(HAVE_DECL_ETHER_NTOHOST, 0, - [Define to 1 if you have the declaration of `ether_ntohost', and to 0 if you -don't.]) - else + fi + # + # After all that, is ether_ntohost() declared? + # + if test "$ac_cv_have_decl_ether_ntohost" = yes; then + # + # Yes. + # AC_DEFINE(HAVE_DECL_ETHER_NTOHOST, 1, - [Define to 1 if you have the declaration of `ether_ntohost', and to 0 if you -don't.]) + [Define to 1 if you have the declaration of `ether_ntohost']) + else + # + # No, we'll have to declare it ourselves. + # Do we have "struct ether_addr" if we include + # ? + # + AC_CHECK_TYPES(struct ether_addr,,, + [ + #include + #include + #include + #include + #include + ]) fi fi dnl -dnl Check for "pcap_list_datalinks()", "pcap_set_datalink()", -dnl and "pcap_datalink_name_to_val()", and use substitute versions -dnl if they're not present. +dnl Check for "pcap_list_datalinks()" and use a substitute version if +dnl it's not present. If it is present, check for "pcap_free_datalinks()"; +dnl if it's not present, we don't replace it for now. (We could do so +dnl on UN*X, but not on Windows, where hilarity ensues if a program +dnl built with one version of the MSVC support library tries to free +dnl something allocated by a library built with another version of +dnl the MSVC support library.) dnl AC_CHECK_FUNC(pcap_list_datalinks, [ @@ -559,7 +669,13 @@ AC_CHECK_FUNC(pcap_list_datalinks, [ AC_LIBOBJ(datalinks) ]) -AC_CHECK_FUNCS(pcap_set_datalink) + +dnl +dnl Check for "pcap_datalink_name_to_val()", and use a substitute +dnl version if it's not present. If it is present, check for +dnl "pcap_datalink_val_to_description()", and if we don't have it, +dnl use a substitute version. +dnl AC_CHECK_FUNC(pcap_datalink_name_to_val, [ AC_DEFINE(HAVE_PCAP_DATALINK_NAME_TO_VAL, 1, @@ -575,6 +691,13 @@ AC_CHECK_FUNC(pcap_datalink_name_to_val, AC_LIBOBJ(dlnames) ]) +dnl +dnl Check for "pcap_set_datalink()"; you can't substitute for it if +dnl it's absent (it has hooks into libpcap), so just define the +dnl HAVE_ value if it's there. +dnl +AC_CHECK_FUNCS(pcap_set_datalink) + dnl dnl Check for "pcap_breakloop()"; you can't substitute for it if dnl it's absent (it has hooks into the live capture routines), @@ -582,17 +705,6 @@ dnl so just define the HAVE_ value if it's there. dnl AC_CHECK_FUNCS(pcap_breakloop) -dnl -dnl Check for "pcap_dump_ftell()" and use a substitute version -dnl if it's not present. -dnl -AC_CHECK_FUNC(pcap_dump_ftell, - AC_DEFINE(HAVE_PCAP_DUMP_FTELL, 1, - [define if libpcap has pcap_dump_ftell()]), - [ - AC_LIBOBJ(pcap_dump_ftell) - ]) - # # Do we have the new open API? Check for pcap_create, and assume that, # if we do, we also have pcap_activate() and the other new routines @@ -618,9 +730,10 @@ fi # AC_CHECK_FUNCS(pcap_findalldevs) if test $ac_cv_func_pcap_findalldevs = "yes" ; then -dnl Check for Mac OS X, which may ship pcap.h from 0.6 but libpcap may -dnl be 0.8; this means that lib has pcap_findalldevs but header doesn't -dnl have pcap_if_t. +dnl Check for libpcap having pcap_findalldevs() but the pcap.h header +dnl not having pcap_if_t; some versions of Mac OS X shipped with pcap.h +dnl from 0.6 and libpcap 0.8, so that libpcap had pcap_findalldevs but +dnl pcap.h didn't have pcap_if_t. savedcppflags="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $V_INCLS" AC_CHECK_TYPES(pcap_if_t, , , [#include ]) @@ -629,14 +742,14 @@ fi AC_CHECK_FUNCS(pcap_dump_flush pcap_lib_version) if test $ac_cv_func_pcap_lib_version = "no" ; then AC_MSG_CHECKING(whether pcap_version is defined by libpcap) - AC_TRY_LINK([], - [ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ extern char pcap_version[]; return (int)pcap_version; + ]]) ], - ac_lbl_cv_pcap_version_defined=yes, - ac_lbl_cv_pcap_version_defined=no) + [ac_lbl_cv_pcap_version_defined=yes], + [ac_lbl_cv_pcap_version_defined=no]) if test "$ac_lbl_cv_pcap_version_defined" = yes ; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_PCAP_VERSION, 1, [define if libpcap has pcap_version]) @@ -646,6 +759,7 @@ if test $ac_cv_func_pcap_lib_version = "no" ; then fi AC_CHECK_FUNCS(pcap_setdirection pcap_set_immediate_mode pcap_dump_ftell64) AC_CHECK_FUNCS(pcap_open pcap_findalldevs_ex) +AC_REPLACE_FUNCS(pcap_dump_ftell) # # Check for special debugging functions @@ -657,14 +771,14 @@ if test "$ac_cv_func_pcap_set_parser_debug" = "no" ; then # filter expression parser debug flag; can we directly set the # flag? AC_MSG_CHECKING(whether pcap_debug is defined by libpcap) - AC_TRY_LINK([], - [ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ extern int pcap_debug; return pcap_debug; + ]]) ], - ac_lbl_cv_pcap_debug_defined=yes, - ac_lbl_cv_pcap_debug_defined=no) + [ac_lbl_cv_pcap_debug_defined=yes], + [ac_lbl_cv_pcap_debug_defined=no]) if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_PCAP_DEBUG, 1, [define if libpcap has pcap_debug]) @@ -674,14 +788,14 @@ if test "$ac_cv_func_pcap_set_parser_debug" = "no" ; then # OK, what about "yydebug"? # AC_MSG_CHECKING(whether yydebug is defined by libpcap) - AC_TRY_LINK([], - [ + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ extern int yydebug; return yydebug; + ]]) ], - ac_lbl_cv_yydebug_defined=yes, - ac_lbl_cv_yydebug_defined=no) + [ac_lbl_cv_yydebug_defined=yes], + [ac_lbl_cv_yydebug_defined=no]) if test "$ac_lbl_cv_yydebug_defined" = yes ; then AC_MSG_RESULT(yes) AC_DEFINE(HAVE_YYDEBUG, 1, [define if libpcap has yydebug]) @@ -797,20 +911,6 @@ AC_CHECK_TYPE([u_int64_t], , #include ]) -# -# Check for some headers introduced in later versions of libpcap -# and used by some printers. -# -# Those headers might use the {u_}intN_t types, so we must do this -# after we check for what's needed to get them defined. -# -savedcppflags="$CPPFLAGS" -CPPFLAGS="$CPPFLAGS $V_INCLS" -AC_CHECK_HEADERS(pcap/bluetooth.h,,,[#include "netdissect-stdinc.h"]) -AC_CHECK_HEADERS(pcap/nflog.h,,,[#include "netdissect-stdinc.h"]) -AC_CHECK_HEADERS(pcap/usb.h,,,[#include "netdissect-stdinc.h"]) -CPPFLAGS="$savedcppflags" - AC_PROG_RANLIB AC_CHECK_TOOL([AR], [ar]) @@ -865,7 +965,7 @@ if test "$want_libcrypto" != "no"; then # El Capitan, probably because they don't want you writing # nasty portable code that could run on other UN*Xes, they # want you writing code that uses their Shiny New Crypto - # Library and that only runs on OS X. + # Library and that only runs on macOS. # AC_CHECK_HEADER(openssl/crypto.h, [ @@ -880,19 +980,19 @@ if test "$want_libcrypto" != "no"; then # EVP_CIPHER_CTX, as EVP_CIPHER_CTX may be # opaque; otherwise, we allocate it ourselves. # - # 2) do we have EVP_CipherInit_ex()? + # 2) do we have EVP_DecryptInit_ex()? # If so, we use it, because we need to be # able to make two "initialize the cipher" # calls, one with the cipher and key, and # one with the IV, and, as of OpenSSL 1.1, - # You Can't Do That with EVP_CipherInit(), - # because a call to EVP_CipherInit() will + # You Can't Do That with EVP_DecryptInit(), + # because a call to EVP_DecryptInit() will # unconditionally clear the context, and # if you don't supply a cipher, it'll # clear the cipher, rendering the context # unusable and causing a crash. # - AC_CHECK_FUNCS(EVP_CIPHER_CTX_new EVP_CipherInit_ex) + AC_CHECK_FUNCS(EVP_CIPHER_CTX_new EVP_DecryptInit_ex) fi ]) fi @@ -944,12 +1044,13 @@ AC_SUBST(MAN_MISC_INFO) AC_PROG_INSTALL -AC_CONFIG_HEADER(config.h) +AC_CONFIG_HEADERS([config.h]) -AC_OUTPUT_COMMANDS([if test -f .devel; then +AC_CONFIG_COMMANDS([.devel],[[if test -f .devel; then echo timestamp > stamp-h - cat Makefile-devel-adds >> Makefile - make depend -fi]) -AC_OUTPUT(Makefile tcpdump.1) + cat $srcdir/Makefile-devel-adds >> Makefile + make depend || exit 1 +fi]]) +AC_CONFIG_FILES([Makefile tcpdump.1]) +AC_OUTPUT exit 0