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 9# 10# https://ftp.gnu.org/gnu/config/README 11# 12# for the URLs to use to fetch new versions of config.guess and 13# config.sub. 14# 15 16AC_PREREQ([2.69]) 17AC_INIT([tcpdump],[m4_esyscmd_s(cat VERSION)]) 18AC_CONFIG_SRCDIR(tcpdump.c) 19 20AC_CANONICAL_HOST 21 22AC_LBL_C_INIT_BEFORE_CC(V_INCLS) 23# 24# Try to enable as many C99 features as we can. 25# At minimum, we want C++/C99-style // comments. 26# 27AC_PROG_CC_C99 28if test "$ac_cv_prog_cc_c99" = "no"; then 29 AC_MSG_WARN([The C compiler does not support C99; there may be compiler errors]) 30fi 31AC_LBL_C_INIT(V_CCOPT, V_INCLS) 32AC_LBL_C_INLINE 33 34AC_CHECK_HEADERS(rpc/rpc.h rpc/rpcent.h net/if.h) 35 36# On Linux, if Autoconf version >= 2.72 and GNU C Library version >= 2.34, 37# uncomment AC_SYS_YEAR2038_RECOMMENDED to ensure time_t is Y2038-safe. 38# (Can be done by autogen.sh) 39# AC_SYS_YEAR2038_RECOMMENDED 40# 41# Get the size of a void *, to know whether this is a 32-bit or 64-bit build. 42# 43AC_CHECK_SIZEOF([void *]) 44 45# 46# Get the size of a time_t, to know whether it's 32-bit or 64-bit. 47# 48AC_CHECK_SIZEOF([time_t],,[#include <time.h>]) 49 50case "$host_os" in 51 52darwin*) 53 AC_ARG_ENABLE(universal, 54 AS_HELP_STRING([--disable-universal],[don't build universal on macOS])) 55 if test "$enable_universal" != "no"; then 56 case "$host_os" in 57 58 darwin9.*) 59 # 60 # Leopard. Build for x86 and 32-bit PowerPC, with 61 # x86 first. (That's what Apple does.) 62 # 63 V_CCOPT="$V_CCOPT -arch i386 -arch ppc" 64 LDFLAGS="$LDFLAGS -arch i386 -arch ppc" 65 ;; 66 67 darwin10.*) 68 # 69 # Snow Leopard. Build for x86-64 and x86, with 70 # x86-64 first. (That's what Apple does.) 71 # 72 V_CCOPT="$V_CCOPT -arch x86_64 -arch i386" 73 LDFLAGS="$LDFLAGS -arch x86_64 -arch i386" 74 ;; 75 esac 76 fi 77 ;; 78esac 79 80# 81# Do we have pkg-config? 82# 83PKG_PROG_PKG_CONFIG 84 85# 86# Do we have the brew command from Homebrew? 87# 88AC_PATH_PROG([BREW], [brew]) 89 90AC_ARG_WITH([smi], 91 [AS_HELP_STRING([--with-smi], 92 [link with libsmi (allows to load MIBs on the fly to decode SNMP packets) [default=yes, if available]])], 93 [], 94 [with_smi=yes]) 95 96if test "x$with_smi" != "xno" ; then 97 AC_CHECK_HEADER(smi.h, 98 [ 99 # 100 # OK, we found smi.h. Do we have libsmi with smiInit? 101 # 102 AC_CHECK_LIB(smi, smiInit, 103 [ 104 # 105 # OK, we have libsmi with smiInit. Can we use it? 106 # 107 AC_MSG_CHECKING([whether to enable libsmi]) 108 savedlibs="$LIBS" 109 LIBS="-lsmi $LIBS" 110 AC_RUN_IFELSE([AC_LANG_SOURCE([[ 111/* libsmi available check */ 112#include <stdio.h> 113#include <stdlib.h> 114#include <string.h> 115#include <smi.h> 116int main() 117{ 118 int current, revision, age, n; 119 const int required = 2; 120 if (smiInit("")) 121 exit(1); 122 if (strcmp(SMI_LIBRARY_VERSION, smi_library_version)) 123 exit(2); 124 n = sscanf(smi_library_version, "%d:%d:%d", ¤t, &revision, &age); 125 if (n != 3) 126 exit(3); 127 if (required < current - age || required > current) 128 exit(4); 129 exit(0); 130} 131 ]]) 132 ], 133 [ 134 AC_MSG_RESULT(yes) 135 AC_DEFINE(USE_LIBSMI, 1, 136 [Define if you enable support for libsmi]) 137 ], 138 [ 139 dnl autoconf documentation says that 140 dnl $? contains the exit value. 141 dnl reality is that it does not. 142 dnl We leave this in just in case 143 dnl autoconf ever comes back to 144 dnl match the documentation. 145 case $? in 146 1) AC_MSG_RESULT(no - smiInit failed) ;; 147 2) AC_MSG_RESULT(no - header/library version mismatch) ;; 148 3) AC_MSG_RESULT(no - can't determine library version) ;; 149 4) AC_MSG_RESULT(no - too old) ;; 150 *) AC_MSG_RESULT(no) ;; 151 esac 152 LIBS="$savedlibs" 153 ], 154 [ 155 AC_MSG_RESULT(not when cross-compiling) 156 LIBS="$savedlibs" 157 ] 158 ) 159 ]) 160 ]) 161fi 162 163AC_MSG_CHECKING([whether to enable the instrument functions code]) 164AC_ARG_ENABLE([instrument-functions], 165 [AS_HELP_STRING([--enable-instrument-functions], 166 [enable instrument functions code [default=no]])], 167 [], 168 [enableval=no]) 169case "$enableval" in 170yes) AC_MSG_RESULT(yes) 171 AC_CHECK_LIB([bfd], [bfd_init], 172 [true], 173 [AC_MSG_ERROR( 174 [--enable-instrument-functions was given, but test for library libbfd failed. Please install the 'binutils-dev' package.])], 175 []) 176 AC_DEFINE(ENABLE_INSTRUMENT_FUNCTIONS, 1, 177 [define if you want to build the instrument functions code]) 178 LOCALSRC="$LOCALSRC instrument-functions.c" 179 # Add '-finstrument-functions' instrumentation option to generate 180 # instrumentation calls for entry and exit to functions. 181 # Try to avoid Address Space Layout Randomization (ALSR). 182 CFLAGS="$CFLAGS -O0 -ggdb -finstrument-functions -fno-stack-protector -fno-pic" 183 LDFLAGS="$LDFLAGS -O0 -ggdb -fno-stack-protector -no-pie" 184 LIBS="$LIBS -lbfd" 185 ;; 186*) AC_MSG_RESULT(no) 187 ;; 188esac 189 190AC_MSG_CHECKING([whether to enable the possibly-buggy SMB printer]) 191AC_ARG_ENABLE([smb], 192 [AS_HELP_STRING([--enable-smb], 193 [enable possibly-buggy SMB printer [default=no]])], 194 [], 195 [enableval=no]) 196case "$enableval" in 197yes) AC_MSG_RESULT(yes) 198 AC_DEFINE(ENABLE_SMB, 1, 199 [define if you want to build the possibly-buggy SMB printer]) 200 LOCALSRC="print-smb.c smbutil.c $LOCALSRC" 201 ;; 202*) AC_MSG_RESULT(no) 203 ;; 204esac 205 206AC_MSG_CHECKING([whether to drop root privileges by default]) 207AC_ARG_WITH( 208 [user], 209 [AS_HELP_STRING([--with-user=USERNAME], 210 [drop privileges by default to USERNAME] 211 )], 212 [], 213 [withval=no]) 214AS_CASE(["$withval"], 215 [no], [AC_MSG_RESULT(no)], 216 [''|yes], [AC_MSG_ERROR([--with-user requires a username])], 217 [ 218 AC_DEFINE_UNQUOTED(WITH_USER, "$withval", 219 [define if should drop privileges by default]) 220 AC_MSG_RESULT([yes, to user "$withval"]) 221 ] 222) 223 224AC_MSG_CHECKING([whether to chroot]) 225AC_ARG_WITH( 226 [chroot], 227 [AS_HELP_STRING([--with-chroot=DIRECTORY], 228 [when dropping privileges, chroot to DIRECTORY] 229 )], 230 [], 231 [withval=no] 232) 233AS_CASE(["$withval"], 234 [no], [AC_MSG_RESULT(no)], 235 [''|yes], [AC_MSG_ERROR([--with-chroot requires a directory])], 236 [ 237 AC_DEFINE_UNQUOTED(WITH_CHROOT, "$withval", 238 [define if should chroot when dropping privileges]) 239 AC_MSG_RESULT([yes, to directory "$withval"]) 240 ] 241) 242 243AC_ARG_WITH(sandbox-capsicum, 244 AS_HELP_STRING([--with-sandbox-capsicum], 245 [use Capsicum security functions @<:@default=yes, if available@:>@])) 246# 247# Check whether various functions are available. If any are, set 248# ac_lbl_capsicum_function_seen to yes; if any are not, set 249# ac_lbl_capsicum_function_not_seen to yes. 250# 251# We don't check cap_rights_init(), as it's a macro, wrapping another 252# function, in at least some versions of FreeBSD, and AC_CHECK_FUNCS() 253# doesn't handle that. 254# 255# All of the ones we check for must be available in order to enable 256# capsicum sandboxing. 257# 258# XXX - do we need to check for all of them, or are there some that, if 259# present, imply others are present? 260# 261if test -z "$with_sandbox_capsicum" || test "$with_sandbox_capsicum" != "no" ; then 262 # 263 # First, make sure we have the required header. 264 # 265 AC_CHECK_HEADER(sys/capsicum.h, 266 [ 267 # 268 # We do; now make sure we have the required functions. 269 # 270 AC_CHECK_FUNCS(cap_enter cap_rights_limit cap_ioctls_limit openat, 271 ac_lbl_capsicum_function_seen=yes, 272 ac_lbl_capsicum_function_not_seen=yes) 273 ]) 274 AC_CHECK_LIB(casper, cap_init, LIBS="$LIBS -lcasper") 275 AC_CHECK_LIB(cap_dns, cap_gethostbyaddr, LIBS="$LIBS -lcap_dns") 276fi 277AC_MSG_CHECKING([whether to sandbox using capsicum]) 278if test "x$ac_lbl_capsicum_function_seen" = "xyes" -a "x$ac_lbl_capsicum_function_not_seen" != "xyes"; then 279 AC_DEFINE(HAVE_CAPSICUM, 1, [capsicum support available]) 280 AC_MSG_RESULT(yes) 281else 282 AC_MSG_RESULT(no) 283fi 284AC_MSG_CHECKING([whether to sandbox using Casper library]) 285if test "x$ac_cv_lib_casper_cap_init" = "xyes" -a "x$ac_cv_lib_cap_dns_cap_gethostbyaddr" = "xyes"; then 286 AC_DEFINE(HAVE_CASPER, 1, [Casper support available]) 287 AC_MSG_RESULT(yes) 288else 289 AC_MSG_RESULT(no) 290fi 291 292# 293# We must check this before checking whether to check the OS's IPv6, 294# support because, on some platforms (such as SunOS 5.x), the test 295# program requires the extra networking libraries. 296# 297AC_LBL_LIBRARY_NET 298 299# 300# Check whether AF_INET6 and struct in6_addr are defined. 301# If they aren't both defined, we don't have sufficient OS 302# support for IPv6, so we don't look for IPv6 support libraries, 303# and we define AF_INET6 and struct in6_addr ourselves. 304# 305AC_MSG_CHECKING([whether the operating system supports IPv6]) 306AC_COMPILE_IFELSE( 307 [ 308 AC_LANG_SOURCE( 309 [[ 310#include <string.h> 311/* AF_INET6 available check */ 312#include <sys/types.h> 313#ifdef _WIN32 314#include <ws2tcpip.h> 315#else 316#include <sys/socket.h> 317#include <netinet/in.h> 318#endif 319#ifdef AF_INET6 320void 321foo(struct in6_addr *addr) 322{ 323 memset(addr, 0, sizeof (struct in6_addr)); 324} 325#else 326#error "AF_INET6 not defined" 327#endif 328 ]]) 329 ], 330 [ 331 AC_MSG_RESULT(yes) 332 AC_DEFINE(HAVE_OS_IPV6_SUPPORT, 1, 333 [define if the OS provides AF_INET6 and struct in6_addr]) 334 ipv6=yes 335 ], 336 [ 337 AC_MSG_RESULT(no) 338 ipv6=no 339 ] 340) 341 342ipv6type=unknown 343ipv6lib=none 344ipv6trylibc=no 345 346if test "$ipv6" = "yes"; then 347 AC_MSG_CHECKING([ipv6 stack type]) 348 for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do 349 case $i in 350 inria) 351 dnl http://www.kame.net/ 352 AC_EGREP_CPP(yes, 353[#include <netinet/in.h> 354#ifdef IPV6_INRIA_VERSION 355yes 356#endif], 357 [ipv6type=$i]) 358 ;; 359 kame) 360 dnl http://www.kame.net/ 361 AC_EGREP_CPP(yes, 362[#include <netinet/in.h> 363#ifdef __KAME__ 364yes 365#endif], 366 [ipv6type=$i; 367 ipv6lib=inet6; 368 ipv6libdir=/usr/local/v6/lib; 369 ipv6trylibc=yes]) 370 ;; 371 linux-glibc) 372 dnl http://www.v6.linux.or.jp/ 373 AC_EGREP_CPP(yes, 374[#include <features.h> 375#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 376yes 377#endif], 378 [ipv6type=$i]) 379 ;; 380 linux-libinet6) 381 dnl http://www.v6.linux.or.jp/ 382 dnl 383 dnl This also matches Solaris 8 and Tru64 UNIX 5.1, 384 dnl and possibly other versions of those OSes 385 dnl 386 if test -d /usr/inet6 -o -f /usr/include/netinet/ip6.h; then 387 ipv6type=$i 388 ipv6lib=inet6 389 ipv6libdir=/usr/inet6/lib 390 ipv6trylibc=yes; 391 CFLAGS="-I/usr/inet6/include $CFLAGS" 392 fi 393 ;; 394 toshiba) 395 AC_EGREP_CPP(yes, 396[#include <sys/param.h> 397#ifdef _TOSHIBA_INET6 398yes 399#endif], 400 [ipv6type=$i; 401 ipv6lib=inet6; 402 ipv6libdir=/usr/local/v6/lib]) 403 ;; 404 v6d) 405 AC_EGREP_CPP(yes, 406[#include </usr/local/v6/include/sys/v6config.h> 407#ifdef __V6D__ 408yes 409#endif], 410 [ipv6type=$i; 411 ipv6lib=v6; 412 ipv6libdir=/usr/local/v6/lib; 413 CFLAGS="-I/usr/local/v6/include $CFLAGS"]) 414 ;; 415 zeta) 416 AC_EGREP_CPP(yes, 417[#include <sys/param.h> 418#ifdef _ZETA_MINAMI_INET6 419yes 420#endif], 421 [ipv6type=$i; 422 ipv6lib=inet6; 423 ipv6libdir=/usr/local/v6/lib]) 424 ;; 425 esac 426 if test "$ipv6type" != "unknown"; then 427 break 428 fi 429 done 430 AC_MSG_RESULT($ipv6type) 431fi 432 433if test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then 434 if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then 435 LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" 436 echo "You have $ipv6lib library, using it" 437 else 438 if test "$ipv6trylibc" = "yes"; then 439 echo "You do not have $ipv6lib library, using libc" 440 else 441 echo 'Fatal: no $ipv6lib library found. cannot continue.' 442 echo "You need to fetch lib$ipv6lib.a from appropriate" 443 echo 'ipv6 kit and compile beforehand.' 444 exit 1 445 fi 446 fi 447fi 448 449AC_REPLACE_FUNCS(strlcat strlcpy strdup strsep getservent getopt_long) 450AC_CHECK_FUNCS(fork vfork) 451AC_CHECK_FUNCS(setlinebuf) 452 453# 454# It became apparent at some point that using a suitable C99 compiler does not 455# automatically mean snprintf(3) implementation in the libc supports all the 456# modifiers and specifiers used in the project, so let's test that before the 457# build, not after. 458# 459# Testing the sizeof_t length modifier takes making an snprintf() call and 460# comparing the actual result with the expected result. If this fails, it will 461# most likely happen at run time, not compile time. 462# 463# Testing the 64-bit conversion specifiers in addition to that requires the 464# <inttypes.h> header to be present and the macros to be defined, so if this 465# fails, it will more likely happen at compile time. 466# 467AC_MSG_CHECKING([whether snprintf is suitable]) 468AC_RUN_IFELSE( 469 [ 470 AC_LANG_SOURCE([[ 471#include <stdio.h> 472#include <string.h> 473#include <inttypes.h> 474#include <sys/types.h> 475 476#if defined(_WIN32) && !defined(_SSIZE_T_DEFINED) 477/* 478 * On UN*Xes, this is a signed integer type of the same size as size_t. 479 * 480 * It's not defined by Visual Studio; we assume that ptrdiff_t will 481 * be a type that is a signed integer type of the same size as size_t. 482 */ 483typedef ptrdiff_t ssize_t; 484#endif 485 486/* 487 * Avoid trying to cast negative values to unsigned types, or doing 488 * shifts of signed types, in order not to have the test program fail 489 * if we're building with undefined-behavior sanitizers enabled. 490 */ 491int main() 492{ 493 char buf[100]; 494 unsigned int ui = sizeof(buf); 495 int i = sizeof(buf); 496 int64_t i64 = INT64_C(0x100000000); 497 uint64_t ui64 = UINT64_C(0x100000000); 498 499 snprintf(buf, sizeof(buf), "%zu", (size_t)ui); 500 if (strncmp(buf, "100", sizeof(buf))) 501 return 1; 502 503 snprintf(buf, sizeof(buf), "%zd", (ssize_t)(-i)); 504 if (strncmp(buf, "-100", sizeof(buf))) 505 return 2; 506 507 snprintf(buf, sizeof(buf), "%" PRId64, -i64); 508 if (strncmp(buf, "-4294967296", sizeof(buf))) 509 return 3; 510 511 snprintf(buf, sizeof(buf), "0o%" PRIo64, ui64); 512 if (strncmp(buf, "0o40000000000", sizeof(buf))) 513 return 4; 514 515 snprintf(buf, sizeof(buf), "0x%" PRIx64, ui64); 516 if (strncmp(buf, "0x100000000", sizeof(buf))) 517 return 5; 518 519 snprintf(buf, sizeof(buf), "%" PRIu64, ui64); 520 if (strncmp(buf, "4294967296", sizeof(buf))) 521 return 6; 522 523 return 0; 524} 525 ]]) 526 ], 527 [ 528 AC_MSG_RESULT(yes) 529 ], 530 [ 531 AC_MSG_RESULT(no) 532 AC_MSG_ERROR( 533[The snprintf(3) implementation in this libc is not suitable, 534tcpdump would not work correctly even if it managed to compile.]) 535 ], 536 [ 537 AC_MSG_RESULT(not while cross-compiling) 538 ] 539) 540 541AC_CHECK_LIB(rpc, main) dnl It's unclear why we might need -lrpc 542 543dnl Some platforms may need -lnsl for getrpcbynumber. 544AC_SEARCH_LIBS(getrpcbynumber, nsl, 545 AC_DEFINE(HAVE_GETRPCBYNUMBER, 1, [define if you have getrpcbynumber()])) 546 547AC_LBL_LIBPCAP(V_PCAPDEP, V_INCLS) 548 549# 550# Check for these after AC_LBL_LIBPCAP, so we link with the appropriate 551# libraries (e.g., "-lsocket -lnsl" on Solaris). 552# 553# You are in a twisty little maze of UN*Xes, all different. 554# Some might not have ether_ntohost(). 555# Some might have it and declare it in <net/ethernet.h>. 556# Some might have it and declare it in <netinet/ether.h> 557# Some might have it and declare it in <sys/ethernet.h>. 558# Some might have it and declare it in <arpa/inet.h>. 559# Some might have it and declare it in <netinet/if_ether.h>. 560# Some might have it and not declare it in any header file. 561# 562# Before you is a C compiler. 563# 564AC_CHECK_FUNCS(ether_ntohost, [ 565 AC_CACHE_CHECK(for buggy ether_ntohost, ac_cv_buggy_ether_ntohost, [ 566 AC_RUN_IFELSE([AC_LANG_SOURCE([[ 567 #include <netdb.h> 568 #include <netinet/ether.h> 569 #include <stdlib.h> 570 #include <sys/types.h> 571 #include <sys/param.h> 572 #include <sys/socket.h> 573 574 int 575 main(int argc, char **argv) 576 { 577 u_char ea[6] = { 0xff, 0xff, 0xff, 0xff, 0xff }; 578 char name[MAXHOSTNAMELEN]; 579 580 ether_ntohost(name, (struct ether_addr *)ea); 581 exit(0); 582 } 583 ]]) 584 ], [ac_cv_buggy_ether_ntohost=no], 585 [ac_cv_buggy_ether_ntohost=yes], 586 [ac_cv_buggy_ether_ntohost="not while cross-compiling"])]) 587 if test "$ac_cv_buggy_ether_ntohost" = "no"; then 588 AC_DEFINE(USE_ETHER_NTOHOST, 1, 589 [define if you have ether_ntohost() and it works]) 590 fi 591]) 592if test "$ac_cv_func_ether_ntohost" = yes -a \ 593 "$ac_cv_buggy_ether_ntohost" = "no"; then 594 # 595 # OK, we have ether_ntohost(). Is it declared in <net/ethernet.h>? 596 # 597 # This test fails if we don't have <net/ethernet.h> or if we do 598 # but it doesn't declare ether_ntohost(). 599 # 600 AC_CHECK_DECL(ether_ntohost, 601 [ 602 AC_DEFINE(NET_ETHERNET_H_DECLARES_ETHER_NTOHOST,, 603 [Define to 1 if net/ethernet.h declares `ether_ntohost']) 604 ],, 605 [ 606#include <net/ethernet.h> 607 ]) 608 # 609 # Did that succeed? 610 # 611 if test "$ac_cv_have_decl_ether_ntohost" != yes; then 612 # 613 # No, how about <netinet/ether.h>, as on Linux? 614 # 615 # This test fails if we don't have <netinet/ether.h> 616 # or if we do but it doesn't declare ether_ntohost(). 617 # 618 # Unset ac_cv_have_decl_ether_ntohost so we don't 619 # treat the previous failure as a cached value and 620 # suppress the next test. 621 # 622 unset ac_cv_have_decl_ether_ntohost 623 AC_CHECK_DECL(ether_ntohost, 624 [ 625 AC_DEFINE(NETINET_ETHER_H_DECLARES_ETHER_NTOHOST,1, 626 [Define to 1 if netinet/ether.h declares `ether_ntohost']) 627 ],, 628 [ 629#include <netinet/ether.h> 630 ]) 631 fi 632 # 633 # Did that succeed? 634 # 635 if test "$ac_cv_have_decl_ether_ntohost" != yes; then 636 # 637 # No, how about <sys/ethernet.h>, as on Solaris 10 638 # and later? 639 # 640 # This test fails if we don't have <sys/ethernet.h> 641 # or if we do but it doesn't declare ether_ntohost(). 642 # 643 # Unset ac_cv_have_decl_ether_ntohost so we don't 644 # treat the previous failure as a cached value and 645 # suppress the next test. 646 # 647 unset ac_cv_have_decl_ether_ntohost 648 AC_CHECK_DECL(ether_ntohost, 649 [ 650 AC_DEFINE(SYS_ETHERNET_H_DECLARES_ETHER_NTOHOST,, 651 [Define to 1 if sys/ethernet.h declares `ether_ntohost']) 652 ],, 653 [ 654#include <sys/ethernet.h> 655 ]) 656 fi 657 # 658 # Did that succeed? 659 # 660 if test "$ac_cv_have_decl_ether_ntohost" != yes; then 661 # 662 # No, how about <arpa/inet.h>, as in AIX? 663 # 664 # This test fails if we don't have <arpa/inet.h> 665 # (if we have ether_ntohost(), we should have 666 # networking, and if we have networking, we should 667 # have <arpa/inet.h>) or if we do but it doesn't 668 # declare ether_ntohost(). 669 # 670 # Unset ac_cv_have_decl_ether_ntohost so we don't 671 # treat the previous failure as a cached value and 672 # suppress the next test. 673 # 674 unset ac_cv_have_decl_ether_ntohost 675 AC_CHECK_DECL(ether_ntohost, 676 [ 677 AC_DEFINE(ARPA_INET_H_DECLARES_ETHER_NTOHOST,, 678 [Define to 1 if arpa/inet.h declares `ether_ntohost']) 679 ],, 680 [ 681#include <arpa/inet.h> 682 ]) 683 fi 684 # 685 # Did that succeed? 686 # 687 if test "$ac_cv_have_decl_ether_ntohost" != yes; then 688 # 689 # No, how about <netinet/if_ether.h>? 690 # On some platforms, it requires <net/if.h> and 691 # <netinet/in.h>, and we always include it with 692 # both of them, so test it with both of them. 693 # 694 # This test fails if we don't have <netinet/if_ether.h> 695 # and the headers we include before it, or if we do but 696 # <netinet/if_ether.h> doesn't declare ether_hostton(). 697 # 698 # Unset ac_cv_have_decl_ether_ntohost so we don't 699 # treat the previous failure as a cached value and 700 # suppress the next test. 701 # 702 unset ac_cv_have_decl_ether_ntohost 703 AC_CHECK_DECL(ether_ntohost, 704 [ 705 AC_DEFINE(NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST,, 706 [Define to 1 if netinet/if_ether.h declares `ether_ntohost']) 707 ],, 708 [ 709#include <sys/types.h> 710#include <sys/socket.h> 711#include <net/if.h> 712#include <netinet/in.h> 713#include <netinet/if_ether.h> 714 ]) 715 fi 716 # 717 # After all that, is ether_ntohost() declared? 718 # 719 if test "$ac_cv_have_decl_ether_ntohost" = yes; then 720 # 721 # Yes. 722 # 723 AC_DEFINE(HAVE_DECL_ETHER_NTOHOST, 1, 724 [Define to 1 if you have the declaration of `ether_ntohost']) 725 else 726 # 727 # No, we'll have to declare it ourselves. 728 # Do we have "struct ether_addr" if we include 729 # <netinet/if_ether.h>? 730 # 731 AC_CHECK_TYPES(struct ether_addr,,, 732 [ 733 #include <sys/types.h> 734 #include <sys/socket.h> 735 #include <net/if.h> 736 #include <netinet/in.h> 737 #include <netinet/if_ether.h> 738 ]) 739 fi 740fi 741 742dnl 743dnl Check for "pcap_list_datalinks()" and use a substitute version if 744dnl it's not present. If it is present, check for "pcap_free_datalinks()"; 745dnl if it's not present, we don't replace it for now. (We could do so 746dnl on UN*X, but not on Windows, where hilarity ensues if a program 747dnl built with one version of the MSVC support library tries to free 748dnl something allocated by a library built with another version of 749dnl the MSVC support library.) 750dnl 751AC_CHECK_FUNC(pcap_list_datalinks, 752 [ 753 AC_DEFINE(HAVE_PCAP_LIST_DATALINKS, 1, 754 [define if libpcap has pcap_list_datalinks()]) 755 AC_CHECK_FUNCS(pcap_free_datalinks) 756 ], 757 [ 758 AC_LIBOBJ(datalinks) 759 ]) 760 761dnl 762dnl Check for "pcap_datalink_name_to_val()", and use a substitute 763dnl version if it's not present. If it is present, check for 764dnl "pcap_datalink_val_to_description()", and if we don't have it, 765dnl use a substitute version. 766dnl 767AC_CHECK_FUNC(pcap_datalink_name_to_val, 768 [ 769 AC_DEFINE(HAVE_PCAP_DATALINK_NAME_TO_VAL, 1, 770 [define if libpcap has pcap_datalink_name_to_val()]) 771 AC_CHECK_FUNC(pcap_datalink_val_to_description, 772 AC_DEFINE(HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION, 1, 773 [define if libpcap has pcap_datalink_val_to_description()]), 774 [ 775 AC_LIBOBJ(dlnames) 776 ]) 777 ], 778 [ 779 AC_LIBOBJ(dlnames) 780 ]) 781 782dnl 783dnl Check for "pcap_set_datalink()"; you can't substitute for it if 784dnl it's absent (it has hooks into libpcap), so just define the 785dnl HAVE_ value if it's there. 786dnl 787AC_CHECK_FUNCS(pcap_set_datalink) 788 789dnl 790dnl Check for "pcap_breakloop()"; you can't substitute for it if 791dnl it's absent (it has hooks into the live capture routines), 792dnl so just define the HAVE_ value if it's there. 793dnl 794AC_CHECK_FUNCS(pcap_breakloop) 795 796# 797# Do we have the new open API? Check for pcap_create, and assume that, 798# if we do, we also have pcap_activate() and the other new routines 799# introduced in libpcap 1.0.0. 800# 801AC_CHECK_FUNCS(pcap_create) 802if test $ac_cv_func_pcap_create = "yes" ; then 803 # 804 # OK, do we have pcap_set_tstamp_type? If so, assume we have 805 # pcap_list_tstamp_types and pcap_free_tstamp_types as well. 806 # 807 AC_CHECK_FUNCS(pcap_set_tstamp_type) 808 # 809 # And do we have pcap_set_tstamp_precision? If so, we assume 810 # we also have pcap_open_offline_with_tstamp_precision. 811 # 812 AC_CHECK_FUNCS(pcap_set_tstamp_precision) 813fi 814 815# 816# Check for a miscellaneous collection of functions which we use 817# if we have them. 818# 819AC_CHECK_FUNCS(pcap_findalldevs) 820AC_CHECK_FUNCS(pcap_dump_flush pcap_lib_version) 821if test $ac_cv_func_pcap_lib_version = "no" ; then 822 AC_MSG_CHECKING(whether pcap_version is defined by libpcap) 823 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ 824 extern char pcap_version[]; 825 826 return (int)pcap_version; 827 ]]) 828 ], 829 [ac_lbl_cv_pcap_version_defined=yes], 830 [ac_lbl_cv_pcap_version_defined=no]) 831 if test "$ac_lbl_cv_pcap_version_defined" = yes ; then 832 AC_MSG_RESULT(yes) 833 AC_DEFINE(HAVE_PCAP_VERSION, 1, [define if libpcap has pcap_version]) 834 else 835 AC_MSG_RESULT(no) 836 fi 837fi 838AC_CHECK_FUNCS(pcap_setdirection pcap_set_immediate_mode pcap_dump_ftell64) 839# 840# See the comment in AC_LBL_LIBPCAP in aclocal.m4 for the reason 841# why we don't check for remote-capture APIs if we're building 842# with the system libpcap on macOS. 843# 844if test "$_dont_check_for_remote_apis" != "yes"; then 845 AC_CHECK_FUNCS(pcap_open pcap_findalldevs_ex) 846fi 847AC_REPLACE_FUNCS(pcap_dump_ftell) 848 849# 850# Check for special debugging functions 851# 852AC_CHECK_FUNCS(pcap_set_parser_debug) 853if test "$ac_cv_func_pcap_set_parser_debug" = "no" ; then 854 # 855 # OK, we don't have pcap_set_parser_debug() to set the libpcap 856 # filter expression parser debug flag; can we directly set the 857 # flag? 858 AC_MSG_CHECKING(whether pcap_debug is defined by libpcap) 859 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ 860 extern int pcap_debug; 861 862 return pcap_debug; 863 ]]) 864 ], 865 [ac_lbl_cv_pcap_debug_defined=yes], 866 [ac_lbl_cv_pcap_debug_defined=no]) 867 if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then 868 AC_MSG_RESULT(yes) 869 AC_DEFINE(HAVE_PCAP_DEBUG, 1, [define if libpcap has pcap_debug]) 870 else 871 AC_MSG_RESULT(no) 872 # 873 # OK, what about "yydebug"? 874 # 875 AC_MSG_CHECKING(whether yydebug is defined by libpcap) 876 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ 877 extern int yydebug; 878 879 return yydebug; 880 ]]) 881 ], 882 [ac_lbl_cv_yydebug_defined=yes], 883 [ac_lbl_cv_yydebug_defined=no]) 884 if test "$ac_lbl_cv_yydebug_defined" = yes ; then 885 AC_MSG_RESULT(yes) 886 AC_DEFINE(HAVE_YYDEBUG, 1, [define if libpcap has yydebug]) 887 else 888 AC_MSG_RESULT(no) 889 fi 890 fi 891fi 892AC_CHECK_FUNCS(pcap_set_optimizer_debug) 893AC_REPLACE_FUNCS(bpf_dump) dnl moved to libpcap in 0.6 894 895# 896# Assume V7/BSD convention for man pages (file formats in section 5, 897# miscellaneous info in section 7). 898# 899MAN_FILE_FORMATS=5 900MAN_MISC_INFO=7 901case "$host_os" in 902 903aix*) 904 dnl Workaround to enable certain features 905 AC_DEFINE(_SUN,1,[define on AIX to get certain functions]) 906 ;; 907 908hpux*) 909 # 910 # Use System V conventions for man pages. 911 # 912 MAN_FILE_FORMATS=4 913 MAN_MISC_INFO=5 914 ;; 915 916irix*) 917 V_GROUP=sys 918 919 # 920 # Use System V conventions for man pages. 921 # 922 MAN_FILE_FORMATS=4 923 MAN_MISC_INFO=5 924 ;; 925 926osf*) 927 V_GROUP=system 928 929 # 930 # Use System V conventions for man pages. 931 # 932 MAN_FILE_FORMATS=4 933 MAN_MISC_INFO=5 934 ;; 935 936solaris*) 937 # 938 # Use System V conventions for man pages. 939 # 940 MAN_FILE_FORMATS=4 941 MAN_MISC_INFO=5 942 ;; 943esac 944 945# 946# Make sure we have a definition for C99's uintptr_t (regardless of 947# whether the environment is a C99 environment or not). 948# 949AC_TYPE_UINTPTR_T 950 951savedcppflags="$CPPFLAGS" 952CPPFLAGS="$CPPFLAGS $V_INCLS" 953 954# 955# Check whether we have pcap/pcap-inttypes.h. 956# If we do, we use that to get the C99 types defined. 957# 958AC_CHECK_HEADERS(pcap/pcap-inttypes.h) 959 960# 961# At compile time HAVE_PCAP_FINDALLDEVS depends on HAVE_PCAP_IF_T. 962# 963AC_CHECK_TYPES(pcap_if_t, , , [#include <pcap.h>]) 964 965CPPFLAGS="$savedcppflags" 966 967# 968# Define the old BSD specified-width types in terms of the C99 types; 969# we may need them with libpcap include files. 970# 971AC_CHECK_TYPE([u_int8_t], , 972 [AC_DEFINE([u_int8_t], [uint8_t], 973 [Define to `uint8_t' if u_int8_t not defined.])], 974 [AC_INCLUDES_DEFAULT 975#include <sys/types.h> 976]) 977AC_CHECK_TYPE([u_int16_t], , 978 [AC_DEFINE([u_int16_t], [uint16_t], 979 [Define to `uint16_t' if u_int16_t not defined.])], 980 [AC_INCLUDES_DEFAULT 981#include <sys/types.h> 982]) 983AC_CHECK_TYPE([u_int32_t], , 984 [AC_DEFINE([u_int32_t], [uint32_t], 985 [Define to `uint32_t' if u_int32_t not defined.])], 986 [AC_INCLUDES_DEFAULT 987#include <sys/types.h> 988]) 989AC_CHECK_TYPE([u_int64_t], , 990 [AC_DEFINE([u_int64_t], [uint64_t], 991 [Define to `uint64_t' if u_int64_t not defined.])], 992 [AC_INCLUDES_DEFAULT 993#include <sys/types.h> 994]) 995 996AC_PROG_RANLIB 997AC_CHECK_TOOL([AR], [ar]) 998 999AC_LBL_DEVEL(V_CCOPT) 1000 1001# Check for OpenSSL/libressl libcrypto 1002AC_MSG_CHECKING(whether to use OpenSSL/libressl libcrypto) 1003# Specify location for both includes and libraries. 1004want_libcrypto=ifavailable 1005AC_ARG_WITH(crypto, 1006 AS_HELP_STRING([--with-crypto]@<:@=DIR@:>@, 1007 [use OpenSSL/libressl libcrypto (located in directory DIR, if specified) @<:@default=yes, if available@:>@]), 1008[ 1009 if test $withval = no 1010 then 1011 # User doesn't want to link with libcrypto. 1012 want_libcrypto=no 1013 AC_MSG_RESULT(no) 1014 elif test $withval = yes 1015 then 1016 # User wants to link with libcrypto but hasn't specified 1017 # a directory. 1018 want_libcrypto=yes 1019 AC_MSG_RESULT(yes) 1020 else 1021 # User wants to link with libcrypto and has specified 1022 # a directory, so use the provided value. 1023 want_libcrypto=yes 1024 libcrypto_root=$withval 1025 AC_MSG_RESULT([yes, using the version installed in $withval]) 1026 fi 1027],[ 1028 # 1029 # Use libcrypto if it's present, otherwise don't; no directory 1030 # was specified. 1031 # 1032 want_libcrypto=ifavailable 1033 AC_MSG_RESULT([yes, if available]) 1034]) 1035if test "$want_libcrypto" != "no"; then 1036 # 1037 # Were we told where to look for libcrypto? 1038 # 1039 if test -z "$libcrypto_root"; then 1040 # 1041 # No. 1042 # 1043 # First, try looking for it with pkg-config, if we have it. 1044 # 1045 # Homebrew's pkg-config does not, by default, look for 1046 # pkg-config files for packages it has installed. 1047 # Furthermore, at least for OpenSSL, they appear to be 1048 # dumped in package-specific directories whose paths are 1049 # not only package-specific but package-version-specific. 1050 # 1051 # So the only way to find openssl is to get the value of 1052 # PKG_CONFIG_PATH from "brew --env openssl" and add that 1053 # to PKG_CONFIG_PATH. (No, we can't just assume it's under 1054 # /usr/local; Homebrew have conveniently chosen to put it 1055 # under /opt/homebrew on ARM.) 1056 # 1057 # That's the nice thing about Homebrew - it makes things easier! 1058 # Thanks! 1059 # 1060 save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH" 1061 if test -n "$BREW"; then 1062 openssl_pkgconfig_dir=`$BREW --env --plain openssl | sed -n 's/PKG_CONFIG_PATH: //p'` 1063 PKG_CONFIG_PATH="$openssl_pkgconfig_dir:$PKG_CONFIG_PATH" 1064 fi 1065 PKG_CHECK_MODULE(LIBCRYPTO, libcrypto, 1066 [ 1067 # 1068 # We found OpenSSL/libressl libcrypto. 1069 # 1070 HAVE_LIBCRYPTO=yes 1071 ]) 1072 PKG_CONFIG_PATH="$save_PKG_CONFIG_PATH" 1073 1074 # 1075 # If it wasn't found, and we have Homebrew installed, see 1076 # if it's in Homebrew. 1077 # 1078 if test "x$HAVE_LIBCRYPTO" != "xyes" -a -n "$BREW"; then 1079 AC_MSG_CHECKING(for openssl in Homebrew) 1080 # 1081 # The brew man page lies when it speaks of 1082 # $BREW --prefix --installed <formula> 1083 # outputting nothing. In Homebrew 3.3.16, 1084 # it produces output regardless of whether 1085 # the formula is installed or not, so we 1086 # send the standard output and error to 1087 # the bit bucket. 1088 # 1089 # libcrypto isn't a formula, openssl is a formula. 1090 # 1091 if $BREW --prefix --installed openssl >/dev/null 2>&1; then 1092 # 1093 # Yes. Get the include directory and library 1094 # directory. (No, we can't just assume it's 1095 # under /usr/local; Homebrew have conveniently 1096 # chosen to put it under /opt/homebrew on ARM.) 1097 # 1098 AC_MSG_RESULT(yes) 1099 HAVE_LIBCRYPTO=yes 1100 openssl_path=`$BREW --prefix openssl` 1101 LIBCRYPTO_CFLAGS="-I$openssl_path/include" 1102 LIBCRYPTO_LIBS="-L$openssl_path/lib -lcrypto" 1103 else 1104 AC_MSG_RESULT(no) 1105 fi 1106 fi 1107 1108 # 1109 # If it wasn't found, and /usr/local/include and /usr/local/lib 1110 # exist, check if it's in /usr/local. (We check whether they 1111 # exist because, if they don't exist, the compiler will warn 1112 # about that and then ignore the argument, so they test 1113 # using just the system header files and libraries.) 1114 # 1115 # We include the standard include file to 1) make sure that 1116 # it's installed (if it's just a shared library for the 1117 # benefit of existing programs, that's not useful) and 2) 1118 # because SSL_library_init() is a library routine in some 1119 # versions and a #defined wrapper around OPENSSL_init_ssl() 1120 # in others. 1121 # 1122 if test "x$HAVE_LIBCRYPTO" != "xyes" -a -d "/usr/local/include" -a -d "/usr/local/lib"; then 1123 AC_LBL_SAVE_CHECK_STATE 1124 CFLAGS="$CFLAGS -I/usr/local/include" 1125 LIBS="$LIBS -L/usr/local/lib -lcrypto" 1126 AC_MSG_CHECKING(whether we have an OpenSSL/libressl libcrypto in /usr/local that we can use) 1127 AC_LINK_IFELSE([AC_LANG_PROGRAM( 1128 [[ 1129#include <openssl/evp.h> 1130 ]], 1131 [[ 1132EVP_CIPHER_CTX_block_size((EVP_CIPHER_CTX *)0); 1133return 0; 1134 ]])], 1135 [ 1136 AC_MSG_RESULT(yes) 1137 HAVE_LIBCRYPTO=yes 1138 LIBCRYPTO_CFLAGS="-I/usr/local/include" 1139 LIBCRYPTO_LIBS="-L/usr/local/lib -lcrypto" 1140 ], 1141 AC_MSG_RESULT(no)) 1142 AC_LBL_RESTORE_CHECK_STATE 1143 fi 1144 1145 # 1146 # If it wasn't found, check if it's a system library. 1147 # 1148 # We include the standard include file to 1) make sure that 1149 # it's installed (if it's just a shared library for the 1150 # benefit of existing programs, that's not useful) and 2) 1151 # make sure this isn't a newer macOS that provides libcrypto 1152 # as a shared library but doesn't provide headers - Apple, 1153 # bless their pointy little heads, apparently ship libcrypto 1154 # as a library, but not the header files, in El Capitan and 1155 # later, probably because they don't want you writing nasty 1156 # portable code that could run on other UN*Xes, they want you 1157 # writing code that uses their Shiny New Crypto Library and 1158 # that thus only runs on macOS. 1159 # 1160 if test "x$HAVE_LIBCRYPTO" != "xyes"; then 1161 AC_LBL_SAVE_CHECK_STATE 1162 LIBS="$LIBS -lcrypto" 1163 AC_MSG_CHECKING(whether we have a system OpenSSL/libressl that we can use) 1164 AC_LINK_IFELSE([AC_LANG_PROGRAM( 1165 [[ 1166#include <openssl/evp.h> 1167 ]], 1168 [[ 1169EVP_CIPHER_CTX_block_size((EVP_CIPHER_CTX *)0); 1170return 0; 1171 ]])], 1172 [ 1173 AC_MSG_RESULT(yes) 1174 HAVE_LIBCRYPTO=yes 1175 LIBCRYPTO_LIBS="-lcrypto" 1176 ], 1177 AC_MSG_RESULT(no)) 1178 AC_LBL_RESTORE_CHECK_STATE 1179 fi 1180 else 1181 # 1182 # Yes. 1183 # 1184 # Look for it there. 1185 # 1186 AC_LBL_SAVE_CHECK_STATE 1187 CFLAGS="$CFLAGS -I$libcrypto_root/include" 1188 LIBS="$LIBS -L$libcrypto_root/lib -lcrypto" 1189 AC_MSG_CHECKING(whether we have a system OpenSSL/libressl that we can use) 1190 AC_LINK_IFELSE([AC_LANG_PROGRAM( 1191 [[ 1192#include <openssl/evp.h> 1193 ]], 1194 [[ 1195EVP_CIPHER_CTX_block_size((EVP_CIPHER_CTX *)0); 1196return 0; 1197 ]])], 1198 [ 1199 AC_MSG_RESULT(yes) 1200 HAVE_LIBCRYPTO=yes 1201 LIBCRYPTO_CFLAGS="-I$libcrypto_root/include" 1202 LIBCRYPTO_LIBS="-L$libcrypto_root/lib -lcrypto" 1203 ], 1204 AC_MSG_RESULT(no)) 1205 AC_LBL_RESTORE_CHECK_STATE 1206 fi 1207 1208 # 1209 # OK, did we find it? 1210 # 1211 if test "x$HAVE_LIBCRYPTO" = "xyes"; then 1212 AC_DEFINE([HAVE_LIBCRYPTO], [1], [Define to 1 if you have a usable `crypto' library (-lcrypto).]) 1213 1214 # 1215 # Put the subdirectories of the libcrypto root directory 1216 # at the end of the header and library search path, to 1217 # make sure they come after any -I or -L flags for 1218 # a local libpcap - those must take precedence of any 1219 # directory that might contain an installed version of 1220 # libpcap. 1221 # 1222 V_INCLS="$V_INCLS $LIBCRYPTO_CFLAGS" 1223 LIBS="$LIBS $LIBCRYPTO_LIBS" 1224 1225 # 1226 # OK, then: 1227 # 1228 # 1) do we have EVP_CIPHER_CTX_new? 1229 # If so, we use it to allocate an EVP_CIPHER_CTX, as 1230 # EVP_CIPHER_CTX may be opaque; otherwise, we allocate it 1231 # ourselves. 1232 # 1233 # 2) do we have EVP_DecryptInit_ex()? 1234 # If so, we use it, because we need to be able to make 1235 # two "initialize the cipher" calls, one with the cipher 1236 # and key, and one with the IV, and, as of OpenSSL 1.1, 1237 # You Can't Do That with EVP_DecryptInit(), because a 1238 # call to EVP_DecryptInit() will unconditionally clear 1239 # the context, and if you don't supply a cipher, it'll 1240 # clear the cipher, rendering the context unusable and 1241 # causing a crash. 1242 # 1243 AC_CHECK_FUNCS(EVP_CIPHER_CTX_new EVP_DecryptInit_ex) 1244 else 1245 AC_MSG_NOTICE(OpenSSL/libressl libcrypto not found) 1246 fi 1247fi 1248 1249# Check for libcap-ng 1250AC_MSG_CHECKING(whether to use libcap-ng) 1251# Specify location for both includes and libraries. 1252want_libcap_ng=ifavailable 1253AC_ARG_WITH(cap_ng, 1254 AS_HELP_STRING([--with-cap-ng], 1255 [use libcap-ng @<:@default=yes, if available@:>@]), 1256[ 1257 if test $withval = no 1258 then 1259 want_libcap_ng=no 1260 AC_MSG_RESULT(no) 1261 elif test $withval = yes 1262 then 1263 want_libcap_ng=yes 1264 AC_MSG_RESULT(yes) 1265 fi 1266],[ 1267 # 1268 # Use libcap-ng if it's present, otherwise don't. 1269 # 1270 want_libcap_ng=ifavailable 1271 AC_MSG_RESULT([yes, if available]) 1272]) 1273if test "$want_libcap_ng" != "no"; then 1274 AC_CHECK_LIB(cap-ng, capng_change_id) 1275 AC_CHECK_HEADERS(cap-ng.h) 1276fi 1277 1278dnl 1279dnl set additional include path if necessary 1280if test "$missing_includes" = "yes"; then 1281 CPPFLAGS="$CPPFLAGS -I$srcdir/missing" 1282 V_INCLS="$V_INCLS -I$srcdir/missing" 1283fi 1284 1285AC_SUBST(V_CCOPT) 1286AC_SUBST(V_DEFS) 1287AC_SUBST(V_INCLS) 1288AC_SUBST(V_PCAPDEP) 1289AC_SUBST(LOCALSRC) 1290AC_SUBST(MAN_FILE_FORMATS) 1291AC_SUBST(MAN_MISC_INFO) 1292 1293AC_PROG_INSTALL 1294 1295AC_CONFIG_HEADER(config.h) 1296AH_TOP([ 1297#ifndef TCPDUMP_CONFIG_H_ 1298#define TCPDUMP_CONFIG_H_ 1299]) 1300AH_BOTTOM([ 1301#endif // TCPDUMP_CONFIG_H_ 1302]) 1303 1304AC_CONFIG_COMMANDS([.devel],[[if test -f .devel; then 1305 echo timestamp > stamp-h 1306 cat $srcdir/Makefile-devel-adds >> Makefile 1307 make depend || exit 1 1308fi]],[[]]) 1309AC_CONFIG_FILES([Makefile tcpdump.1]) 1310AC_OUTPUT 1311exit 0 1312