1#! /bin/sh 2# Guess values for system-dependent variables and create Makefiles. 3# Generated by GNU Autoconf 2.71 for pcap 1.10.6. 4# 5# 6# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, 7# Inc. 8# 9# 10# This configure script is free software; the Free Software Foundation 11# gives unlimited permission to copy, distribute and modify it. 12## -------------------- ## 13## M4sh Initialization. ## 14## -------------------- ## 15 16# Be more Bourne compatible 17DUALCASE=1; export DUALCASE # for MKS sh 18as_nop=: 19if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 20then : 21 emulate sh 22 NULLCMD=: 23 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 24 # is contrary to our usage. Disable this feature. 25 alias -g '${1+"$@"}'='"$@"' 26 setopt NO_GLOB_SUBST 27else $as_nop 28 case `(set -o) 2>/dev/null` in #( 29 *posix*) : 30 set -o posix ;; #( 31 *) : 32 ;; 33esac 34fi 35 36 37 38# Reset variables that may have inherited troublesome values from 39# the environment. 40 41# IFS needs to be set, to space, tab, and newline, in precisely that order. 42# (If _AS_PATH_WALK were called with IFS unset, it would have the 43# side effect of setting IFS to empty, thus disabling word splitting.) 44# Quoting is to prevent editors from complaining about space-tab. 45as_nl=' 46' 47export as_nl 48IFS=" "" $as_nl" 49 50PS1='$ ' 51PS2='> ' 52PS4='+ ' 53 54# Ensure predictable behavior from utilities with locale-dependent output. 55LC_ALL=C 56export LC_ALL 57LANGUAGE=C 58export LANGUAGE 59 60# We cannot yet rely on "unset" to work, but we need these variables 61# to be unset--not just set to an empty or harmless value--now, to 62# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct 63# also avoids known problems related to "unset" and subshell syntax 64# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). 65for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH 66do eval test \${$as_var+y} \ 67 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 68done 69 70# Ensure that fds 0, 1, and 2 are open. 71if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi 72if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi 73if (exec 3>&2) ; then :; else exec 2>/dev/null; fi 74 75# The user is always right. 76if ${PATH_SEPARATOR+false} :; then 77 PATH_SEPARATOR=: 78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 80 PATH_SEPARATOR=';' 81 } 82fi 83 84 85# Find who we are. Look in the path if we contain no directory separator. 86as_myself= 87case $0 in #(( 88 *[\\/]* ) as_myself=$0 ;; 89 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 90for as_dir in $PATH 91do 92 IFS=$as_save_IFS 93 case $as_dir in #((( 94 '') as_dir=./ ;; 95 */) ;; 96 *) as_dir=$as_dir/ ;; 97 esac 98 test -r "$as_dir$0" && as_myself=$as_dir$0 && break 99 done 100IFS=$as_save_IFS 101 102 ;; 103esac 104# We did not find ourselves, most probably we were run as `sh COMMAND' 105# in which case we are not to be found in the path. 106if test "x$as_myself" = x; then 107 as_myself=$0 108fi 109if test ! -f "$as_myself"; then 110 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 111 exit 1 112fi 113 114 115# Use a proper internal environment variable to ensure we don't fall 116 # into an infinite loop, continuously re-executing ourselves. 117 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then 118 _as_can_reexec=no; export _as_can_reexec; 119 # We cannot yet assume a decent shell, so we have to provide a 120# neutralization value for shells without unset; and this also 121# works around shells that cannot unset nonexistent variables. 122# Preserve -v and -x to the replacement shell. 123BASH_ENV=/dev/null 124ENV=/dev/null 125(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 126case $- in # (((( 127 *v*x* | *x*v* ) as_opts=-vx ;; 128 *v* ) as_opts=-v ;; 129 *x* ) as_opts=-x ;; 130 * ) as_opts= ;; 131esac 132exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 133# Admittedly, this is quite paranoid, since all the known shells bail 134# out after a failed `exec'. 135printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 136exit 255 137 fi 138 # We don't want this to propagate to other subprocesses. 139 { _as_can_reexec=; unset _as_can_reexec;} 140if test "x$CONFIG_SHELL" = x; then 141 as_bourne_compatible="as_nop=: 142if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 143then : 144 emulate sh 145 NULLCMD=: 146 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which 147 # is contrary to our usage. Disable this feature. 148 alias -g '\${1+\"\$@\"}'='\"\$@\"' 149 setopt NO_GLOB_SUBST 150else \$as_nop 151 case \`(set -o) 2>/dev/null\` in #( 152 *posix*) : 153 set -o posix ;; #( 154 *) : 155 ;; 156esac 157fi 158" 159 as_required="as_fn_return () { (exit \$1); } 160as_fn_success () { as_fn_return 0; } 161as_fn_failure () { as_fn_return 1; } 162as_fn_ret_success () { return 0; } 163as_fn_ret_failure () { return 1; } 164 165exitcode=0 166as_fn_success || { exitcode=1; echo as_fn_success failed.; } 167as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } 168as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } 169as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } 170if ( set x; as_fn_ret_success y && test x = \"\$1\" ) 171then : 172 173else \$as_nop 174 exitcode=1; echo positional parameters were not saved. 175fi 176test x\$exitcode = x0 || exit 1 177blah=\$(echo \$(echo blah)) 178test x\"\$blah\" = xblah || exit 1 179test -x / || exit 1" 180 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO 181 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO 182 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && 183 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 184test \$(( 1 + 1 )) = 2 || exit 1" 185 if (eval "$as_required") 2>/dev/null 186then : 187 as_have_required=yes 188else $as_nop 189 as_have_required=no 190fi 191 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null 192then : 193 194else $as_nop 195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 196as_found=false 197for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 198do 199 IFS=$as_save_IFS 200 case $as_dir in #((( 201 '') as_dir=./ ;; 202 */) ;; 203 *) as_dir=$as_dir/ ;; 204 esac 205 as_found=: 206 case $as_dir in #( 207 /*) 208 for as_base in sh bash ksh sh5; do 209 # Try only shells that exist, to save several forks. 210 as_shell=$as_dir$as_base 211 if { test -f "$as_shell" || test -f "$as_shell.exe"; } && 212 as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null 213then : 214 CONFIG_SHELL=$as_shell as_have_required=yes 215 if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null 216then : 217 break 2 218fi 219fi 220 done;; 221 esac 222 as_found=false 223done 224IFS=$as_save_IFS 225if $as_found 226then : 227 228else $as_nop 229 if { test -f "$SHELL" || test -f "$SHELL.exe"; } && 230 as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null 231then : 232 CONFIG_SHELL=$SHELL as_have_required=yes 233fi 234fi 235 236 237 if test "x$CONFIG_SHELL" != x 238then : 239 export CONFIG_SHELL 240 # We cannot yet assume a decent shell, so we have to provide a 241# neutralization value for shells without unset; and this also 242# works around shells that cannot unset nonexistent variables. 243# Preserve -v and -x to the replacement shell. 244BASH_ENV=/dev/null 245ENV=/dev/null 246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 247case $- in # (((( 248 *v*x* | *x*v* ) as_opts=-vx ;; 249 *v* ) as_opts=-v ;; 250 *x* ) as_opts=-x ;; 251 * ) as_opts= ;; 252esac 253exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 254# Admittedly, this is quite paranoid, since all the known shells bail 255# out after a failed `exec'. 256printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 257exit 255 258fi 259 260 if test x$as_have_required = xno 261then : 262 printf "%s\n" "$0: This script requires a shell more modern than all" 263 printf "%s\n" "$0: the shells that I found on your system." 264 if test ${ZSH_VERSION+y} ; then 265 printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" 266 printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." 267 else 268 printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system, 269$0: including any error possibly output before this 270$0: message. Then install a modern shell, or manually run 271$0: the script under such a shell if you do have one." 272 fi 273 exit 1 274fi 275fi 276fi 277SHELL=${CONFIG_SHELL-/bin/sh} 278export SHELL 279# Unset more variables known to interfere with behavior of common tools. 280CLICOLOR_FORCE= GREP_OPTIONS= 281unset CLICOLOR_FORCE GREP_OPTIONS 282 283## --------------------- ## 284## M4sh Shell Functions. ## 285## --------------------- ## 286# as_fn_unset VAR 287# --------------- 288# Portably unset VAR. 289as_fn_unset () 290{ 291 { eval $1=; unset $1;} 292} 293as_unset=as_fn_unset 294 295 296# as_fn_set_status STATUS 297# ----------------------- 298# Set $? to STATUS, without forking. 299as_fn_set_status () 300{ 301 return $1 302} # as_fn_set_status 303 304# as_fn_exit STATUS 305# ----------------- 306# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 307as_fn_exit () 308{ 309 set +e 310 as_fn_set_status $1 311 exit $1 312} # as_fn_exit 313# as_fn_nop 314# --------- 315# Do nothing but, unlike ":", preserve the value of $?. 316as_fn_nop () 317{ 318 return $? 319} 320as_nop=as_fn_nop 321 322# as_fn_mkdir_p 323# ------------- 324# Create "$as_dir" as a directory, including parents if necessary. 325as_fn_mkdir_p () 326{ 327 328 case $as_dir in #( 329 -*) as_dir=./$as_dir;; 330 esac 331 test -d "$as_dir" || eval $as_mkdir_p || { 332 as_dirs= 333 while :; do 334 case $as_dir in #( 335 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 336 *) as_qdir=$as_dir;; 337 esac 338 as_dirs="'$as_qdir' $as_dirs" 339 as_dir=`$as_dirname -- "$as_dir" || 340$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 341 X"$as_dir" : 'X\(//\)[^/]' \| \ 342 X"$as_dir" : 'X\(//\)$' \| \ 343 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 344printf "%s\n" X"$as_dir" | 345 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 346 s//\1/ 347 q 348 } 349 /^X\(\/\/\)[^/].*/{ 350 s//\1/ 351 q 352 } 353 /^X\(\/\/\)$/{ 354 s//\1/ 355 q 356 } 357 /^X\(\/\).*/{ 358 s//\1/ 359 q 360 } 361 s/.*/./; q'` 362 test -d "$as_dir" && break 363 done 364 test -z "$as_dirs" || eval "mkdir $as_dirs" 365 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 366 367 368} # as_fn_mkdir_p 369 370# as_fn_executable_p FILE 371# ----------------------- 372# Test if FILE is an executable regular file. 373as_fn_executable_p () 374{ 375 test -f "$1" && test -x "$1" 376} # as_fn_executable_p 377# as_fn_append VAR VALUE 378# ---------------------- 379# Append the text in VALUE to the end of the definition contained in VAR. Take 380# advantage of any shell optimizations that allow amortized linear growth over 381# repeated appends, instead of the typical quadratic growth present in naive 382# implementations. 383if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null 384then : 385 eval 'as_fn_append () 386 { 387 eval $1+=\$2 388 }' 389else $as_nop 390 as_fn_append () 391 { 392 eval $1=\$$1\$2 393 } 394fi # as_fn_append 395 396# as_fn_arith ARG... 397# ------------------ 398# Perform arithmetic evaluation on the ARGs, and store the result in the 399# global $as_val. Take advantage of shells that can avoid forks. The arguments 400# must be portable across $(()) and expr. 401if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null 402then : 403 eval 'as_fn_arith () 404 { 405 as_val=$(( $* )) 406 }' 407else $as_nop 408 as_fn_arith () 409 { 410 as_val=`expr "$@" || test $? -eq 1` 411 } 412fi # as_fn_arith 413 414# as_fn_nop 415# --------- 416# Do nothing but, unlike ":", preserve the value of $?. 417as_fn_nop () 418{ 419 return $? 420} 421as_nop=as_fn_nop 422 423# as_fn_error STATUS ERROR [LINENO LOG_FD] 424# ---------------------------------------- 425# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 426# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 427# script with STATUS, using 1 if that was 0. 428as_fn_error () 429{ 430 as_status=$1; test $as_status -eq 0 && as_status=1 431 if test "$4"; then 432 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 433 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 434 fi 435 printf "%s\n" "$as_me: error: $2" >&2 436 as_fn_exit $as_status 437} # as_fn_error 438 439if expr a : '\(a\)' >/dev/null 2>&1 && 440 test "X`expr 00001 : '.*\(...\)'`" = X001; then 441 as_expr=expr 442else 443 as_expr=false 444fi 445 446if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 447 as_basename=basename 448else 449 as_basename=false 450fi 451 452if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 453 as_dirname=dirname 454else 455 as_dirname=false 456fi 457 458as_me=`$as_basename -- "$0" || 459$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 460 X"$0" : 'X\(//\)$' \| \ 461 X"$0" : 'X\(/\)' \| . 2>/dev/null || 462printf "%s\n" X/"$0" | 463 sed '/^.*\/\([^/][^/]*\)\/*$/{ 464 s//\1/ 465 q 466 } 467 /^X\/\(\/\/\)$/{ 468 s//\1/ 469 q 470 } 471 /^X\/\(\/\).*/{ 472 s//\1/ 473 q 474 } 475 s/.*/./; q'` 476 477# Avoid depending upon Character Ranges. 478as_cr_letters='abcdefghijklmnopqrstuvwxyz' 479as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 480as_cr_Letters=$as_cr_letters$as_cr_LETTERS 481as_cr_digits='0123456789' 482as_cr_alnum=$as_cr_Letters$as_cr_digits 483 484 485 as_lineno_1=$LINENO as_lineno_1a=$LINENO 486 as_lineno_2=$LINENO as_lineno_2a=$LINENO 487 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && 488 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { 489 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) 490 sed -n ' 491 p 492 /[$]LINENO/= 493 ' <$as_myself | 494 sed ' 495 s/[$]LINENO.*/&-/ 496 t lineno 497 b 498 :lineno 499 N 500 :loop 501 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ 502 t loop 503 s/-\n.*// 504 ' >$as_me.lineno && 505 chmod +x "$as_me.lineno" || 506 { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } 507 508 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have 509 # already done that, so ensure we don't try to do so again and fall 510 # in an infinite loop. This has already happened in practice. 511 _as_can_reexec=no; export _as_can_reexec 512 # Don't try to exec as it changes $[0], causing all sort of problems 513 # (the dirname of $[0] is not the place where we might find the 514 # original and so on. Autoconf is especially sensitive to this). 515 . "./$as_me.lineno" 516 # Exit status is that of the last command. 517 exit 518} 519 520 521# Determine whether it's possible to make 'echo' print without a newline. 522# These variables are no longer used directly by Autoconf, but are AC_SUBSTed 523# for compatibility with existing Makefiles. 524ECHO_C= ECHO_N= ECHO_T= 525case `echo -n x` in #((((( 526-n*) 527 case `echo 'xy\c'` in 528 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 529 xy) ECHO_C='\c';; 530 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 531 ECHO_T=' ';; 532 esac;; 533*) 534 ECHO_N='-n';; 535esac 536 537# For backward compatibility with old third-party macros, we provide 538# the shell variables $as_echo and $as_echo_n. New code should use 539# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. 540as_echo='printf %s\n' 541as_echo_n='printf %s' 542 543 544rm -f conf$$ conf$$.exe conf$$.file 545if test -d conf$$.dir; then 546 rm -f conf$$.dir/conf$$.file 547else 548 rm -f conf$$.dir 549 mkdir conf$$.dir 2>/dev/null 550fi 551if (echo >conf$$.file) 2>/dev/null; then 552 if ln -s conf$$.file conf$$ 2>/dev/null; then 553 as_ln_s='ln -s' 554 # ... but there are two gotchas: 555 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 556 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 557 # In both cases, we have to default to `cp -pR'. 558 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 559 as_ln_s='cp -pR' 560 elif ln conf$$.file conf$$ 2>/dev/null; then 561 as_ln_s=ln 562 else 563 as_ln_s='cp -pR' 564 fi 565else 566 as_ln_s='cp -pR' 567fi 568rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 569rmdir conf$$.dir 2>/dev/null 570 571if mkdir -p . 2>/dev/null; then 572 as_mkdir_p='mkdir -p "$as_dir"' 573else 574 test -d ./-p && rmdir ./-p 575 as_mkdir_p=false 576fi 577 578as_test_x='test -x' 579as_executable_p=as_fn_executable_p 580 581# Sed expression to map a string onto a valid CPP name. 582as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 583 584# Sed expression to map a string onto a valid variable name. 585as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 586 587 588test -n "$DJDIR" || exec 7<&0 </dev/null 589exec 6>&1 590 591# Name of the host. 592# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, 593# so uname gets run too. 594ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 595 596# 597# Initializations. 598# 599ac_default_prefix=/usr/local 600ac_clean_files= 601ac_config_libobj_dir=. 602LIBOBJS= 603cross_compiling=no 604subdirs= 605MFLAGS= 606MAKEFLAGS= 607 608# Identity of this package. 609PACKAGE_NAME='pcap' 610PACKAGE_TARNAME='pcap' 611PACKAGE_VERSION='1.10.6' 612PACKAGE_STRING='pcap 1.10.6' 613PACKAGE_BUGREPORT='' 614PACKAGE_URL='' 615 616ac_unique_file="pcap.c" 617# Factoring default headers for most tests. 618ac_includes_default="\ 619#include <stddef.h> 620#ifdef HAVE_STDIO_H 621# include <stdio.h> 622#endif 623#ifdef HAVE_STDLIB_H 624# include <stdlib.h> 625#endif 626#ifdef HAVE_STRING_H 627# include <string.h> 628#endif 629#ifdef HAVE_INTTYPES_H 630# include <inttypes.h> 631#endif 632#ifdef HAVE_STDINT_H 633# include <stdint.h> 634#endif 635#ifdef HAVE_STRINGS_H 636# include <strings.h> 637#endif 638#ifdef HAVE_SYS_TYPES_H 639# include <sys/types.h> 640#endif 641#ifdef HAVE_SYS_STAT_H 642# include <sys/stat.h> 643#endif 644#ifdef HAVE_UNISTD_H 645# include <unistd.h> 646#endif" 647 648ac_header_c_list= 649ac_subst_vars='LTLIBOBJS 650RPCAPD_LIBS 651INSTALL_RPCAPD 652BUILD_RPCAPD 653PTHREAD_LIBS 654REMOTE_C_SRC 655MODULE_C_SRC 656PLATFORM_C_SRC 657ADDLARCHIVEOBJS 658ADDLOBJS 659RPATH 660V_SONAME_OPT 661V_SHLIB_OPT 662V_SHLIB_CMD 663V_SHLIB_CCOPT 664INSTALL_DATA 665INSTALL_SCRIPT 666INSTALL_PROGRAM 667PCAP_SUPPORT_RDMASNIFF 668LIBIBVERBS_LIBS_STATIC 669LIBIBVERBS_LIBS 670LIBIBVERBS_CFLAGS 671PCAP_SUPPORT_DBUS 672DBUS_LIBS_STATIC 673DBUS_LIBS 674DBUS_CFLAGS 675PCAP_SUPPORT_BT 676PCAP_SUPPORT_DPDK 677DPDK_LIBS_STATIC 678DPDK_LIBS 679DPDK_CFLAGS 680PCAP_SUPPORT_NETMAP 681PCAP_SUPPORT_NETFILTER 682PCAP_SUPPORT_LINUX_USBMON 683MKDEP 684DEPENDENCY_CFLAG 685LN_S 686AR 687RANLIB 688MAN_ADMIN_COMMANDS 689MAN_MISC_INFO 690MAN_FILE_FORMATS 691MAN_DEVICES 692DYEXT 693V_PROG_LDFLAGS_FAT 694V_PROG_CCOPT_FAT 695V_LIB_LDFLAGS_FAT 696V_LIB_CCOPT_FAT 697REENTRANT_PARSER 698BISON_BYACC 699LEXLIB 700LEX_OUTPUT_ROOT 701LEX 702OPENSSL_LIBS_STATIC 703OPENSSL_LIBS 704OPENSSL_CFLAGS 705LIBNL_LIBS_STATIC 706LIBNL_LIBS 707LIBNL_CFLAGS 708BREW 709PKG_CONFIG_LIBDIR 710PKG_CONFIG_PATH 711PKG_CONFIG 712VALGRINDTEST_SRC 713LIBOBJS 714OBJEXT 715EXEEXT 716ac_ct_CC 717CPPFLAGS 718LDFLAGS 719CFLAGS 720CC 721SHLICC2 722target_os 723target_vendor 724target_cpu 725target 726host_os 727host_vendor 728host_cpu 729host 730build_os 731build_vendor 732build_cpu 733build 734LIBS_PRIVATE 735REQUIRES_PRIVATE 736LIBS_STATIC 737V_INCLS 738V_DEFS 739V_CCOPT 740target_alias 741host_alias 742build_alias 743LIBS 744ECHO_T 745ECHO_N 746ECHO_C 747DEFS 748mandir 749localedir 750libdir 751psdir 752pdfdir 753dvidir 754htmldir 755infodir 756docdir 757oldincludedir 758includedir 759runstatedir 760localstatedir 761sharedstatedir 762sysconfdir 763datadir 764datarootdir 765libexecdir 766sbindir 767bindir 768program_transform_name 769prefix 770exec_prefix 771PACKAGE_URL 772PACKAGE_BUGREPORT 773PACKAGE_STRING 774PACKAGE_VERSION 775PACKAGE_TARNAME 776PACKAGE_NAME 777PATH_SEPARATOR 778SHELL' 779ac_subst_files='' 780ac_user_opts=' 781enable_option_checking 782with_gcc 783enable_largefile 784enable_instrument_functions 785enable_protochain 786with_pcap 787with_libnl 788enable_ipv6 789with_dag 790with_dag_includes 791with_dag_libraries 792with_septel 793with_snf 794with_snf_includes 795with_snf_libraries 796with_turbocap 797enable_remote 798enable_optimizer_dbg 799enable_yydebug 800enable_universal 801enable_shared 802enable_usb 803enable_netmap 804with_dpdk 805enable_bluetooth 806enable_dbus 807enable_rdma 808' 809 ac_precious_vars='build_alias 810host_alias 811target_alias 812CC 813CFLAGS 814LDFLAGS 815LIBS 816CPPFLAGS 817PKG_CONFIG 818PKG_CONFIG_PATH 819PKG_CONFIG_LIBDIR 820LIBNL_CFLAGS 821LIBNL_LIBS 822LIBNL_LIBS_STATIC 823OPENSSL_CFLAGS 824OPENSSL_LIBS 825OPENSSL_LIBS_STATIC 826DPDK_CFLAGS 827DPDK_LIBS 828DPDK_LIBS_STATIC 829DBUS_CFLAGS 830DBUS_LIBS 831DBUS_LIBS_STATIC 832LIBIBVERBS_CFLAGS 833LIBIBVERBS_LIBS 834LIBIBVERBS_LIBS_STATIC' 835 836 837# Initialize some variables set by options. 838ac_init_help= 839ac_init_version=false 840ac_unrecognized_opts= 841ac_unrecognized_sep= 842# The variables have the same names as the options, with 843# dashes changed to underlines. 844cache_file=/dev/null 845exec_prefix=NONE 846no_create= 847no_recursion= 848prefix=NONE 849program_prefix=NONE 850program_suffix=NONE 851program_transform_name=s,x,x, 852silent= 853site= 854srcdir= 855verbose= 856x_includes=NONE 857x_libraries=NONE 858 859# Installation directory options. 860# These are left unexpanded so users can "make install exec_prefix=/foo" 861# and all the variables that are supposed to be based on exec_prefix 862# by default will actually change. 863# Use braces instead of parens because sh, perl, etc. also accept them. 864# (The list follows the same order as the GNU Coding Standards.) 865bindir='${exec_prefix}/bin' 866sbindir='${exec_prefix}/sbin' 867libexecdir='${exec_prefix}/libexec' 868datarootdir='${prefix}/share' 869datadir='${datarootdir}' 870sysconfdir='${prefix}/etc' 871sharedstatedir='${prefix}/com' 872localstatedir='${prefix}/var' 873runstatedir='${localstatedir}/run' 874includedir='${prefix}/include' 875oldincludedir='/usr/include' 876docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 877infodir='${datarootdir}/info' 878htmldir='${docdir}' 879dvidir='${docdir}' 880pdfdir='${docdir}' 881psdir='${docdir}' 882libdir='${exec_prefix}/lib' 883localedir='${datarootdir}/locale' 884mandir='${datarootdir}/man' 885 886ac_prev= 887ac_dashdash= 888for ac_option 889do 890 # If the previous option needs an argument, assign it. 891 if test -n "$ac_prev"; then 892 eval $ac_prev=\$ac_option 893 ac_prev= 894 continue 895 fi 896 897 case $ac_option in 898 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 899 *=) ac_optarg= ;; 900 *) ac_optarg=yes ;; 901 esac 902 903 case $ac_dashdash$ac_option in 904 --) 905 ac_dashdash=yes ;; 906 907 -bindir | --bindir | --bindi | --bind | --bin | --bi) 908 ac_prev=bindir ;; 909 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 910 bindir=$ac_optarg ;; 911 912 -build | --build | --buil | --bui | --bu) 913 ac_prev=build_alias ;; 914 -build=* | --build=* | --buil=* | --bui=* | --bu=*) 915 build_alias=$ac_optarg ;; 916 917 -cache-file | --cache-file | --cache-fil | --cache-fi \ 918 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 919 ac_prev=cache_file ;; 920 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 921 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 922 cache_file=$ac_optarg ;; 923 924 --config-cache | -C) 925 cache_file=config.cache ;; 926 927 -datadir | --datadir | --datadi | --datad) 928 ac_prev=datadir ;; 929 -datadir=* | --datadir=* | --datadi=* | --datad=*) 930 datadir=$ac_optarg ;; 931 932 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ 933 | --dataroo | --dataro | --datar) 934 ac_prev=datarootdir ;; 935 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ 936 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) 937 datarootdir=$ac_optarg ;; 938 939 -disable-* | --disable-*) 940 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 941 # Reject names that are not valid shell variable names. 942 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 943 as_fn_error $? "invalid feature name: \`$ac_useropt'" 944 ac_useropt_orig=$ac_useropt 945 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` 946 case $ac_user_opts in 947 *" 948"enable_$ac_useropt" 949"*) ;; 950 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" 951 ac_unrecognized_sep=', ';; 952 esac 953 eval enable_$ac_useropt=no ;; 954 955 -docdir | --docdir | --docdi | --doc | --do) 956 ac_prev=docdir ;; 957 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) 958 docdir=$ac_optarg ;; 959 960 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) 961 ac_prev=dvidir ;; 962 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) 963 dvidir=$ac_optarg ;; 964 965 -enable-* | --enable-*) 966 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 967 # Reject names that are not valid shell variable names. 968 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 969 as_fn_error $? "invalid feature name: \`$ac_useropt'" 970 ac_useropt_orig=$ac_useropt 971 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` 972 case $ac_user_opts in 973 *" 974"enable_$ac_useropt" 975"*) ;; 976 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" 977 ac_unrecognized_sep=', ';; 978 esac 979 eval enable_$ac_useropt=\$ac_optarg ;; 980 981 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 982 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 983 | --exec | --exe | --ex) 984 ac_prev=exec_prefix ;; 985 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 986 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 987 | --exec=* | --exe=* | --ex=*) 988 exec_prefix=$ac_optarg ;; 989 990 -gas | --gas | --ga | --g) 991 # Obsolete; use --with-gas. 992 with_gas=yes ;; 993 994 -help | --help | --hel | --he | -h) 995 ac_init_help=long ;; 996 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) 997 ac_init_help=recursive ;; 998 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) 999 ac_init_help=short ;; 1000 1001 -host | --host | --hos | --ho) 1002 ac_prev=host_alias ;; 1003 -host=* | --host=* | --hos=* | --ho=*) 1004 host_alias=$ac_optarg ;; 1005 1006 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) 1007 ac_prev=htmldir ;; 1008 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ 1009 | --ht=*) 1010 htmldir=$ac_optarg ;; 1011 1012 -includedir | --includedir | --includedi | --included | --include \ 1013 | --includ | --inclu | --incl | --inc) 1014 ac_prev=includedir ;; 1015 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 1016 | --includ=* | --inclu=* | --incl=* | --inc=*) 1017 includedir=$ac_optarg ;; 1018 1019 -infodir | --infodir | --infodi | --infod | --info | --inf) 1020 ac_prev=infodir ;; 1021 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 1022 infodir=$ac_optarg ;; 1023 1024 -libdir | --libdir | --libdi | --libd) 1025 ac_prev=libdir ;; 1026 -libdir=* | --libdir=* | --libdi=* | --libd=*) 1027 libdir=$ac_optarg ;; 1028 1029 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 1030 | --libexe | --libex | --libe) 1031 ac_prev=libexecdir ;; 1032 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 1033 | --libexe=* | --libex=* | --libe=*) 1034 libexecdir=$ac_optarg ;; 1035 1036 -localedir | --localedir | --localedi | --localed | --locale) 1037 ac_prev=localedir ;; 1038 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) 1039 localedir=$ac_optarg ;; 1040 1041 -localstatedir | --localstatedir | --localstatedi | --localstated \ 1042 | --localstate | --localstat | --localsta | --localst | --locals) 1043 ac_prev=localstatedir ;; 1044 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 1045 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 1046 localstatedir=$ac_optarg ;; 1047 1048 -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 1049 ac_prev=mandir ;; 1050 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 1051 mandir=$ac_optarg ;; 1052 1053 -nfp | --nfp | --nf) 1054 # Obsolete; use --without-fp. 1055 with_fp=no ;; 1056 1057 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 1058 | --no-cr | --no-c | -n) 1059 no_create=yes ;; 1060 1061 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 1062 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 1063 no_recursion=yes ;; 1064 1065 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 1066 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 1067 | --oldin | --oldi | --old | --ol | --o) 1068 ac_prev=oldincludedir ;; 1069 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 1070 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 1071 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 1072 oldincludedir=$ac_optarg ;; 1073 1074 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 1075 ac_prev=prefix ;; 1076 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 1077 prefix=$ac_optarg ;; 1078 1079 -program-prefix | --program-prefix | --program-prefi | --program-pref \ 1080 | --program-pre | --program-pr | --program-p) 1081 ac_prev=program_prefix ;; 1082 -program-prefix=* | --program-prefix=* | --program-prefi=* \ 1083 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 1084 program_prefix=$ac_optarg ;; 1085 1086 -program-suffix | --program-suffix | --program-suffi | --program-suff \ 1087 | --program-suf | --program-su | --program-s) 1088 ac_prev=program_suffix ;; 1089 -program-suffix=* | --program-suffix=* | --program-suffi=* \ 1090 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 1091 program_suffix=$ac_optarg ;; 1092 1093 -program-transform-name | --program-transform-name \ 1094 | --program-transform-nam | --program-transform-na \ 1095 | --program-transform-n | --program-transform- \ 1096 | --program-transform | --program-transfor \ 1097 | --program-transfo | --program-transf \ 1098 | --program-trans | --program-tran \ 1099 | --progr-tra | --program-tr | --program-t) 1100 ac_prev=program_transform_name ;; 1101 -program-transform-name=* | --program-transform-name=* \ 1102 | --program-transform-nam=* | --program-transform-na=* \ 1103 | --program-transform-n=* | --program-transform-=* \ 1104 | --program-transform=* | --program-transfor=* \ 1105 | --program-transfo=* | --program-transf=* \ 1106 | --program-trans=* | --program-tran=* \ 1107 | --progr-tra=* | --program-tr=* | --program-t=*) 1108 program_transform_name=$ac_optarg ;; 1109 1110 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) 1111 ac_prev=pdfdir ;; 1112 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) 1113 pdfdir=$ac_optarg ;; 1114 1115 -psdir | --psdir | --psdi | --psd | --ps) 1116 ac_prev=psdir ;; 1117 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) 1118 psdir=$ac_optarg ;; 1119 1120 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 1121 | -silent | --silent | --silen | --sile | --sil) 1122 silent=yes ;; 1123 1124 -runstatedir | --runstatedir | --runstatedi | --runstated \ 1125 | --runstate | --runstat | --runsta | --runst | --runs \ 1126 | --run | --ru | --r) 1127 ac_prev=runstatedir ;; 1128 -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ 1129 | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ 1130 | --run=* | --ru=* | --r=*) 1131 runstatedir=$ac_optarg ;; 1132 1133 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 1134 ac_prev=sbindir ;; 1135 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 1136 | --sbi=* | --sb=*) 1137 sbindir=$ac_optarg ;; 1138 1139 -sharedstatedir | --sharedstatedir | --sharedstatedi \ 1140 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 1141 | --sharedst | --shareds | --shared | --share | --shar \ 1142 | --sha | --sh) 1143 ac_prev=sharedstatedir ;; 1144 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 1145 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 1146 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 1147 | --sha=* | --sh=*) 1148 sharedstatedir=$ac_optarg ;; 1149 1150 -site | --site | --sit) 1151 ac_prev=site ;; 1152 -site=* | --site=* | --sit=*) 1153 site=$ac_optarg ;; 1154 1155 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 1156 ac_prev=srcdir ;; 1157 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 1158 srcdir=$ac_optarg ;; 1159 1160 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 1161 | --syscon | --sysco | --sysc | --sys | --sy) 1162 ac_prev=sysconfdir ;; 1163 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 1164 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 1165 sysconfdir=$ac_optarg ;; 1166 1167 -target | --target | --targe | --targ | --tar | --ta | --t) 1168 ac_prev=target_alias ;; 1169 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 1170 target_alias=$ac_optarg ;; 1171 1172 -v | -verbose | --verbose | --verbos | --verbo | --verb) 1173 verbose=yes ;; 1174 1175 -version | --version | --versio | --versi | --vers | -V) 1176 ac_init_version=: ;; 1177 1178 -with-* | --with-*) 1179 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 1180 # Reject names that are not valid shell variable names. 1181 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1182 as_fn_error $? "invalid package name: \`$ac_useropt'" 1183 ac_useropt_orig=$ac_useropt 1184 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` 1185 case $ac_user_opts in 1186 *" 1187"with_$ac_useropt" 1188"*) ;; 1189 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" 1190 ac_unrecognized_sep=', ';; 1191 esac 1192 eval with_$ac_useropt=\$ac_optarg ;; 1193 1194 -without-* | --without-*) 1195 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` 1196 # Reject names that are not valid shell variable names. 1197 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1198 as_fn_error $? "invalid package name: \`$ac_useropt'" 1199 ac_useropt_orig=$ac_useropt 1200 ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` 1201 case $ac_user_opts in 1202 *" 1203"with_$ac_useropt" 1204"*) ;; 1205 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" 1206 ac_unrecognized_sep=', ';; 1207 esac 1208 eval with_$ac_useropt=no ;; 1209 1210 --x) 1211 # Obsolete; use --with-x. 1212 with_x=yes ;; 1213 1214 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 1215 | --x-incl | --x-inc | --x-in | --x-i) 1216 ac_prev=x_includes ;; 1217 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 1218 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 1219 x_includes=$ac_optarg ;; 1220 1221 -x-libraries | --x-libraries | --x-librarie | --x-librari \ 1222 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 1223 ac_prev=x_libraries ;; 1224 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 1225 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 1226 x_libraries=$ac_optarg ;; 1227 1228 -*) as_fn_error $? "unrecognized option: \`$ac_option' 1229Try \`$0 --help' for more information" 1230 ;; 1231 1232 *=*) 1233 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` 1234 # Reject names that are not valid shell variable names. 1235 case $ac_envvar in #( 1236 '' | [0-9]* | *[!_$as_cr_alnum]* ) 1237 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; 1238 esac 1239 eval $ac_envvar=\$ac_optarg 1240 export $ac_envvar ;; 1241 1242 *) 1243 # FIXME: should be removed in autoconf 3.0. 1244 printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 1245 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 1246 printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 1247 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" 1248 ;; 1249 1250 esac 1251done 1252 1253if test -n "$ac_prev"; then 1254 ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1255 as_fn_error $? "missing argument to $ac_option" 1256fi 1257 1258if test -n "$ac_unrecognized_opts"; then 1259 case $enable_option_checking in 1260 no) ;; 1261 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; 1262 *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; 1263 esac 1264fi 1265 1266# Check all directory arguments for consistency. 1267for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 1268 datadir sysconfdir sharedstatedir localstatedir includedir \ 1269 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1270 libdir localedir mandir runstatedir 1271do 1272 eval ac_val=\$$ac_var 1273 # Remove trailing slashes. 1274 case $ac_val in 1275 */ ) 1276 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` 1277 eval $ac_var=\$ac_val;; 1278 esac 1279 # Be sure to have absolute directory names. 1280 case $ac_val in 1281 [\\/$]* | ?:[\\/]* ) continue;; 1282 NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 1283 esac 1284 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 1285done 1286 1287# There might be people who depend on the old broken behavior: `$host' 1288# used to hold the argument of --host etc. 1289# FIXME: To remove some day. 1290build=$build_alias 1291host=$host_alias 1292target=$target_alias 1293 1294# FIXME: To remove some day. 1295if test "x$host_alias" != x; then 1296 if test "x$build_alias" = x; then 1297 cross_compiling=maybe 1298 elif test "x$build_alias" != "x$host_alias"; then 1299 cross_compiling=yes 1300 fi 1301fi 1302 1303ac_tool_prefix= 1304test -n "$host_alias" && ac_tool_prefix=$host_alias- 1305 1306test "$silent" = yes && exec 6>/dev/null 1307 1308 1309ac_pwd=`pwd` && test -n "$ac_pwd" && 1310ac_ls_di=`ls -di .` && 1311ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1312 as_fn_error $? "working directory cannot be determined" 1313test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1314 as_fn_error $? "pwd does not report name of working directory" 1315 1316 1317# Find the source files, if location was not specified. 1318if test -z "$srcdir"; then 1319 ac_srcdir_defaulted=yes 1320 # Try the directory containing this script, then the parent directory. 1321 ac_confdir=`$as_dirname -- "$as_myself" || 1322$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 1323 X"$as_myself" : 'X\(//\)[^/]' \| \ 1324 X"$as_myself" : 'X\(//\)$' \| \ 1325 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || 1326printf "%s\n" X"$as_myself" | 1327 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 1328 s//\1/ 1329 q 1330 } 1331 /^X\(\/\/\)[^/].*/{ 1332 s//\1/ 1333 q 1334 } 1335 /^X\(\/\/\)$/{ 1336 s//\1/ 1337 q 1338 } 1339 /^X\(\/\).*/{ 1340 s//\1/ 1341 q 1342 } 1343 s/.*/./; q'` 1344 srcdir=$ac_confdir 1345 if test ! -r "$srcdir/$ac_unique_file"; then 1346 srcdir=.. 1347 fi 1348else 1349 ac_srcdir_defaulted=no 1350fi 1351if test ! -r "$srcdir/$ac_unique_file"; then 1352 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1353 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" 1354fi 1355ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1356ac_abs_confdir=`( 1357 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 1358 pwd)` 1359# When building in place, set srcdir=. 1360if test "$ac_abs_confdir" = "$ac_pwd"; then 1361 srcdir=. 1362fi 1363# Remove unnecessary trailing slashes from srcdir. 1364# Double slashes in file names in object file debugging info 1365# mess up M-x gdb in Emacs. 1366case $srcdir in 1367*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; 1368esac 1369for ac_var in $ac_precious_vars; do 1370 eval ac_env_${ac_var}_set=\${${ac_var}+set} 1371 eval ac_env_${ac_var}_value=\$${ac_var} 1372 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} 1373 eval ac_cv_env_${ac_var}_value=\$${ac_var} 1374done 1375 1376# 1377# Report the --help message. 1378# 1379if test "$ac_init_help" = "long"; then 1380 # Omit some internal or obsolete options to make the list less imposing. 1381 # This message is too long to be a string in the A/UX 3.1 sh. 1382 cat <<_ACEOF 1383\`configure' configures pcap 1.10.6 to adapt to many kinds of systems. 1384 1385Usage: $0 [OPTION]... [VAR=VALUE]... 1386 1387To assign environment variables (e.g., CC, CFLAGS...), specify them as 1388VAR=VALUE. See below for descriptions of some of the useful variables. 1389 1390Defaults for the options are specified in brackets. 1391 1392Configuration: 1393 -h, --help display this help and exit 1394 --help=short display options specific to this package 1395 --help=recursive display the short help of all the included packages 1396 -V, --version display version information and exit 1397 -q, --quiet, --silent do not print \`checking ...' messages 1398 --cache-file=FILE cache test results in FILE [disabled] 1399 -C, --config-cache alias for \`--cache-file=config.cache' 1400 -n, --no-create do not create output files 1401 --srcdir=DIR find the sources in DIR [configure dir or \`..'] 1402 1403Installation directories: 1404 --prefix=PREFIX install architecture-independent files in PREFIX 1405 [$ac_default_prefix] 1406 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 1407 [PREFIX] 1408 1409By default, \`make install' will install all the files in 1410\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify 1411an installation prefix other than \`$ac_default_prefix' using \`--prefix', 1412for instance \`--prefix=\$HOME'. 1413 1414For better control, use the options below. 1415 1416Fine tuning of the installation directories: 1417 --bindir=DIR user executables [EPREFIX/bin] 1418 --sbindir=DIR system admin executables [EPREFIX/sbin] 1419 --libexecdir=DIR program executables [EPREFIX/libexec] 1420 --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 1421 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1422 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1423 --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] 1424 --libdir=DIR object code libraries [EPREFIX/lib] 1425 --includedir=DIR C header files [PREFIX/include] 1426 --oldincludedir=DIR C header files for non-gcc [/usr/include] 1427 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 1428 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 1429 --infodir=DIR info documentation [DATAROOTDIR/info] 1430 --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 1431 --mandir=DIR man documentation [DATAROOTDIR/man] 1432 --docdir=DIR documentation root [DATAROOTDIR/doc/pcap] 1433 --htmldir=DIR html documentation [DOCDIR] 1434 --dvidir=DIR dvi documentation [DOCDIR] 1435 --pdfdir=DIR pdf documentation [DOCDIR] 1436 --psdir=DIR ps documentation [DOCDIR] 1437_ACEOF 1438 1439 cat <<\_ACEOF 1440 1441System types: 1442 --build=BUILD configure for building on BUILD [guessed] 1443 --host=HOST cross-compile to build programs to run on HOST [BUILD] 1444 --target=TARGET configure for building compilers for TARGET [HOST] 1445_ACEOF 1446fi 1447 1448if test -n "$ac_init_help"; then 1449 case $ac_init_help in 1450 short | recursive ) echo "Configuration of pcap 1.10.6:";; 1451 esac 1452 cat <<\_ACEOF 1453 1454Optional Features: 1455 --disable-option-checking ignore unrecognized --enable/--with options 1456 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 1457 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 1458 --disable-largefile omit support for large files 1459 --enable-instrument-functions 1460 enable instrument functions code [default=no] 1461 --disable-protochain disable \"protochain\" insn 1462 --enable-ipv6 build IPv6-capable version [default=yes] 1463 --enable-remote enable remote packet capture [default=no] 1464 --enable-optimizer-dbg build optimizer debugging code 1465 --enable-yydebug build parser debugging code 1466 --disable-universal don't build universal on macOS 1467 --enable-shared build shared libraries [default=yes, if support 1468 available] 1469 --enable-usb enable Linux usbmon USB capture support 1470 [default=yes, if support available] 1471 --enable-netmap enable netmap support [default=yes, if support 1472 available] 1473 --enable-bluetooth enable Bluetooth support [default=yes, if support 1474 available] 1475 --enable-dbus enable D-Bus capture support [default=yes, if 1476 support available] 1477 --enable-rdma enable RDMA capture support [default=yes, if support 1478 available] 1479 1480Optional Packages: 1481 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 1482 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 1483 --without-gcc don't use gcc 1484 --with-pcap=TYPE use packet capture TYPE 1485 --without-libnl disable libnl support [default=yes, on Linux, if 1486 present] 1487 --with-dag[=DIR] include Endace DAG support (located in directory 1488 DIR, if supplied). [default=yes, if present] 1489 --with-dag-includes=IDIR 1490 Endace DAG include directory, if not DIR/include 1491 --with-dag-libraries=LDIR 1492 Endace DAG library directory, if not DIR/lib 1493 --with-septel[=DIR] include Septel support (located in directory DIR, if 1494 supplied). [default=yes, if present] 1495 --with-snf[=DIR] include Myricom SNF support (located in directory 1496 DIR, if supplied). [default=yes, if present] 1497 --with-snf-includes=IDIR 1498 Myricom SNF include directory, if not DIR/include 1499 --with-snf-libraries=LDIR 1500 Myricom SNF library directory, if not DIR/lib 1501 --with-turbocap[=DIR] include Riverbed TurboCap support (located in 1502 directory DIR, if supplied). [default=yes, if 1503 present] 1504 --with-dpdk[=DIR] include DPDK support (located in directory DIR, if 1505 supplied). [default=no] 1506 1507Some influential environment variables: 1508 CC C compiler command 1509 CFLAGS C compiler flags 1510 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a 1511 nonstandard directory <lib dir> 1512 LIBS libraries to pass to the linker, e.g. -l<library> 1513 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if 1514 you have headers in a nonstandard directory <include dir> 1515 PKG_CONFIG path to pkg-config utility 1516 PKG_CONFIG_PATH 1517 directories to add to pkg-config's search path 1518 PKG_CONFIG_LIBDIR 1519 path overriding pkg-config's built-in search path 1520 LIBNL_CFLAGS 1521 C compiler flags for libnl-genl-3.0, overriding pkg-config 1522 LIBNL_LIBS linker flags for libnl-genl-3.0, overriding pkg-config 1523 LIBNL_LIBS_STATIC 1524 static-link linker flags for libnl-genl-3.0, overriding 1525 pkg-config 1526 OPENSSL_CFLAGS 1527 C compiler flags for openssl, overriding pkg-config 1528 OPENSSL_LIBS 1529 linker flags for openssl, overriding pkg-config 1530 OPENSSL_LIBS_STATIC 1531 static-link linker flags for openssl, overriding pkg-config 1532 DPDK_CFLAGS C compiler flags for libdpdk, overriding pkg-config 1533 DPDK_LIBS linker flags for libdpdk, overriding pkg-config 1534 DPDK_LIBS_STATIC 1535 static-link linker flags for libdpdk, overriding pkg-config 1536 DBUS_CFLAGS C compiler flags for dbus-1, overriding pkg-config 1537 DBUS_LIBS linker flags for dbus-1, overriding pkg-config 1538 DBUS_LIBS_STATIC 1539 static-link linker flags for dbus-1, overriding pkg-config 1540 LIBIBVERBS_CFLAGS 1541 C compiler flags for libibverbs, overriding pkg-config 1542 LIBIBVERBS_LIBS 1543 linker flags for libibverbs, overriding pkg-config 1544 LIBIBVERBS_LIBS_STATIC 1545 static-link linker flags for libibverbs, overriding pkg-config 1546 1547Use these variables to override the choices made by `configure' or to help 1548it to find libraries and programs with nonstandard names/locations. 1549 1550Report bugs to the package provider. 1551_ACEOF 1552ac_status=$? 1553fi 1554 1555if test "$ac_init_help" = "recursive"; then 1556 # If there are subdirs, report their specific --help. 1557 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 1558 test -d "$ac_dir" || 1559 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || 1560 continue 1561 ac_builddir=. 1562 1563case "$ac_dir" in 1564.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 1565*) 1566 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` 1567 # A ".." for each directory in $ac_dir_suffix. 1568 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 1569 case $ac_top_builddir_sub in 1570 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 1571 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 1572 esac ;; 1573esac 1574ac_abs_top_builddir=$ac_pwd 1575ac_abs_builddir=$ac_pwd$ac_dir_suffix 1576# for backward compatibility: 1577ac_top_builddir=$ac_top_build_prefix 1578 1579case $srcdir in 1580 .) # We are building in place. 1581 ac_srcdir=. 1582 ac_top_srcdir=$ac_top_builddir_sub 1583 ac_abs_top_srcdir=$ac_pwd ;; 1584 [\\/]* | ?:[\\/]* ) # Absolute name. 1585 ac_srcdir=$srcdir$ac_dir_suffix; 1586 ac_top_srcdir=$srcdir 1587 ac_abs_top_srcdir=$srcdir ;; 1588 *) # Relative name. 1589 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 1590 ac_top_srcdir=$ac_top_build_prefix$srcdir 1591 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 1592esac 1593ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 1594 1595 cd "$ac_dir" || { ac_status=$?; continue; } 1596 # Check for configure.gnu first; this name is used for a wrapper for 1597 # Metaconfig's "Configure" on case-insensitive file systems. 1598 if test -f "$ac_srcdir/configure.gnu"; then 1599 echo && 1600 $SHELL "$ac_srcdir/configure.gnu" --help=recursive 1601 elif test -f "$ac_srcdir/configure"; then 1602 echo && 1603 $SHELL "$ac_srcdir/configure" --help=recursive 1604 else 1605 printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 1606 fi || ac_status=$? 1607 cd "$ac_pwd" || { ac_status=$?; break; } 1608 done 1609fi 1610 1611test -n "$ac_init_help" && exit $ac_status 1612if $ac_init_version; then 1613 cat <<\_ACEOF 1614pcap configure 1.10.6 1615generated by GNU Autoconf 2.71 1616 1617Copyright (C) 2021 Free Software Foundation, Inc. 1618This configure script is free software; the Free Software Foundation 1619gives unlimited permission to copy, distribute and modify it. 1620_ACEOF 1621 exit 1622fi 1623 1624## ------------------------ ## 1625## Autoconf initialization. ## 1626## ------------------------ ## 1627 1628# ac_fn_c_try_compile LINENO 1629# -------------------------- 1630# Try to compile conftest.$ac_ext, and return whether this succeeded. 1631ac_fn_c_try_compile () 1632{ 1633 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1634 rm -f conftest.$ac_objext conftest.beam 1635 if { { ac_try="$ac_compile" 1636case "(($ac_try" in 1637 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1638 *) ac_try_echo=$ac_try;; 1639esac 1640eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1641printf "%s\n" "$ac_try_echo"; } >&5 1642 (eval "$ac_compile") 2>conftest.err 1643 ac_status=$? 1644 if test -s conftest.err; then 1645 grep -v '^ *+' conftest.err >conftest.er1 1646 cat conftest.er1 >&5 1647 mv -f conftest.er1 conftest.err 1648 fi 1649 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1650 test $ac_status = 0; } && { 1651 test -z "$ac_c_werror_flag" || 1652 test ! -s conftest.err 1653 } && test -s conftest.$ac_objext 1654then : 1655 ac_retval=0 1656else $as_nop 1657 printf "%s\n" "$as_me: failed program was:" >&5 1658sed 's/^/| /' conftest.$ac_ext >&5 1659 1660 ac_retval=1 1661fi 1662 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1663 as_fn_set_status $ac_retval 1664 1665} # ac_fn_c_try_compile 1666 1667# ac_fn_c_try_link LINENO 1668# ----------------------- 1669# Try to link conftest.$ac_ext, and return whether this succeeded. 1670ac_fn_c_try_link () 1671{ 1672 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1673 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext 1674 if { { ac_try="$ac_link" 1675case "(($ac_try" in 1676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1677 *) ac_try_echo=$ac_try;; 1678esac 1679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1680printf "%s\n" "$ac_try_echo"; } >&5 1681 (eval "$ac_link") 2>conftest.err 1682 ac_status=$? 1683 if test -s conftest.err; then 1684 grep -v '^ *+' conftest.err >conftest.er1 1685 cat conftest.er1 >&5 1686 mv -f conftest.er1 conftest.err 1687 fi 1688 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1689 test $ac_status = 0; } && { 1690 test -z "$ac_c_werror_flag" || 1691 test ! -s conftest.err 1692 } && test -s conftest$ac_exeext && { 1693 test "$cross_compiling" = yes || 1694 test -x conftest$ac_exeext 1695 } 1696then : 1697 ac_retval=0 1698else $as_nop 1699 printf "%s\n" "$as_me: failed program was:" >&5 1700sed 's/^/| /' conftest.$ac_ext >&5 1701 1702 ac_retval=1 1703fi 1704 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information 1705 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would 1706 # interfere with the next link command; also delete a directory that is 1707 # left behind by Apple's compiler. We do this before executing the actions. 1708 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 1709 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1710 as_fn_set_status $ac_retval 1711 1712} # ac_fn_c_try_link 1713 1714# ac_fn_c_try_run LINENO 1715# ---------------------- 1716# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that 1717# executables *can* be run. 1718ac_fn_c_try_run () 1719{ 1720 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1721 if { { ac_try="$ac_link" 1722case "(($ac_try" in 1723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1724 *) ac_try_echo=$ac_try;; 1725esac 1726eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1727printf "%s\n" "$ac_try_echo"; } >&5 1728 (eval "$ac_link") 2>&5 1729 ac_status=$? 1730 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1731 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' 1732 { { case "(($ac_try" in 1733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1734 *) ac_try_echo=$ac_try;; 1735esac 1736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1737printf "%s\n" "$ac_try_echo"; } >&5 1738 (eval "$ac_try") 2>&5 1739 ac_status=$? 1740 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1741 test $ac_status = 0; }; } 1742then : 1743 ac_retval=0 1744else $as_nop 1745 printf "%s\n" "$as_me: program exited with status $ac_status" >&5 1746 printf "%s\n" "$as_me: failed program was:" >&5 1747sed 's/^/| /' conftest.$ac_ext >&5 1748 1749 ac_retval=$ac_status 1750fi 1751 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 1752 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1753 as_fn_set_status $ac_retval 1754 1755} # ac_fn_c_try_run 1756 1757# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES 1758# -------------------------------------------- 1759# Tries to find the compile-time value of EXPR in a program that includes 1760# INCLUDES, setting VAR accordingly. Returns whether the value could be 1761# computed 1762ac_fn_c_compute_int () 1763{ 1764 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1765 if test "$cross_compiling" = yes; then 1766 # Depending upon the size, compute the lo and hi bounds. 1767cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1768/* end confdefs.h. */ 1769$4 1770int 1771main (void) 1772{ 1773static int test_array [1 - 2 * !(($2) >= 0)]; 1774test_array [0] = 0; 1775return test_array [0]; 1776 1777 ; 1778 return 0; 1779} 1780_ACEOF 1781if ac_fn_c_try_compile "$LINENO" 1782then : 1783 ac_lo=0 ac_mid=0 1784 while :; do 1785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1786/* end confdefs.h. */ 1787$4 1788int 1789main (void) 1790{ 1791static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 1792test_array [0] = 0; 1793return test_array [0]; 1794 1795 ; 1796 return 0; 1797} 1798_ACEOF 1799if ac_fn_c_try_compile "$LINENO" 1800then : 1801 ac_hi=$ac_mid; break 1802else $as_nop 1803 as_fn_arith $ac_mid + 1 && ac_lo=$as_val 1804 if test $ac_lo -le $ac_mid; then 1805 ac_lo= ac_hi= 1806 break 1807 fi 1808 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val 1809fi 1810rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1811 done 1812else $as_nop 1813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1814/* end confdefs.h. */ 1815$4 1816int 1817main (void) 1818{ 1819static int test_array [1 - 2 * !(($2) < 0)]; 1820test_array [0] = 0; 1821return test_array [0]; 1822 1823 ; 1824 return 0; 1825} 1826_ACEOF 1827if ac_fn_c_try_compile "$LINENO" 1828then : 1829 ac_hi=-1 ac_mid=-1 1830 while :; do 1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1832/* end confdefs.h. */ 1833$4 1834int 1835main (void) 1836{ 1837static int test_array [1 - 2 * !(($2) >= $ac_mid)]; 1838test_array [0] = 0; 1839return test_array [0]; 1840 1841 ; 1842 return 0; 1843} 1844_ACEOF 1845if ac_fn_c_try_compile "$LINENO" 1846then : 1847 ac_lo=$ac_mid; break 1848else $as_nop 1849 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val 1850 if test $ac_mid -le $ac_hi; then 1851 ac_lo= ac_hi= 1852 break 1853 fi 1854 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val 1855fi 1856rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1857 done 1858else $as_nop 1859 ac_lo= ac_hi= 1860fi 1861rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1862fi 1863rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1864# Binary search between lo and hi bounds. 1865while test "x$ac_lo" != "x$ac_hi"; do 1866 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val 1867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1868/* end confdefs.h. */ 1869$4 1870int 1871main (void) 1872{ 1873static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 1874test_array [0] = 0; 1875return test_array [0]; 1876 1877 ; 1878 return 0; 1879} 1880_ACEOF 1881if ac_fn_c_try_compile "$LINENO" 1882then : 1883 ac_hi=$ac_mid 1884else $as_nop 1885 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val 1886fi 1887rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1888done 1889case $ac_lo in #(( 1890?*) eval "$3=\$ac_lo"; ac_retval=0 ;; 1891'') ac_retval=1 ;; 1892esac 1893 else 1894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1895/* end confdefs.h. */ 1896$4 1897static long int longval (void) { return $2; } 1898static unsigned long int ulongval (void) { return $2; } 1899#include <stdio.h> 1900#include <stdlib.h> 1901int 1902main (void) 1903{ 1904 1905 FILE *f = fopen ("conftest.val", "w"); 1906 if (! f) 1907 return 1; 1908 if (($2) < 0) 1909 { 1910 long int i = longval (); 1911 if (i != ($2)) 1912 return 1; 1913 fprintf (f, "%ld", i); 1914 } 1915 else 1916 { 1917 unsigned long int i = ulongval (); 1918 if (i != ($2)) 1919 return 1; 1920 fprintf (f, "%lu", i); 1921 } 1922 /* Do not output a trailing newline, as this causes \r\n confusion 1923 on some platforms. */ 1924 return ferror (f) || fclose (f) != 0; 1925 1926 ; 1927 return 0; 1928} 1929_ACEOF 1930if ac_fn_c_try_run "$LINENO" 1931then : 1932 echo >>conftest.val; read $3 <conftest.val; ac_retval=0 1933else $as_nop 1934 ac_retval=1 1935fi 1936rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 1937 conftest.$ac_objext conftest.beam conftest.$ac_ext 1938rm -f conftest.val 1939 1940 fi 1941 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1942 as_fn_set_status $ac_retval 1943 1944} # ac_fn_c_compute_int 1945 1946# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES 1947# ------------------------------------------------------- 1948# Tests whether HEADER exists and can be compiled using the include files in 1949# INCLUDES, setting the cache variable VAR accordingly. 1950ac_fn_c_check_header_compile () 1951{ 1952 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 1954printf %s "checking for $2... " >&6; } 1955if eval test \${$3+y} 1956then : 1957 printf %s "(cached) " >&6 1958else $as_nop 1959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1960/* end confdefs.h. */ 1961$4 1962#include <$2> 1963_ACEOF 1964if ac_fn_c_try_compile "$LINENO" 1965then : 1966 eval "$3=yes" 1967else $as_nop 1968 eval "$3=no" 1969fi 1970rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1971fi 1972eval ac_res=\$$3 1973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 1974printf "%s\n" "$ac_res" >&6; } 1975 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1976 1977} # ac_fn_c_check_header_compile 1978 1979# ac_fn_c_check_func LINENO FUNC VAR 1980# ---------------------------------- 1981# Tests whether FUNC exists, setting the cache variable VAR accordingly 1982ac_fn_c_check_func () 1983{ 1984 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 1986printf %s "checking for $2... " >&6; } 1987if eval test \${$3+y} 1988then : 1989 printf %s "(cached) " >&6 1990else $as_nop 1991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1992/* end confdefs.h. */ 1993/* Define $2 to an innocuous variant, in case <limits.h> declares $2. 1994 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 1995#define $2 innocuous_$2 1996 1997/* System header to define __stub macros and hopefully few prototypes, 1998 which can conflict with char $2 (); below. */ 1999 2000#include <limits.h> 2001#undef $2 2002 2003/* Override any GCC internal prototype to avoid an error. 2004 Use char because int might match the return type of a GCC 2005 builtin and then its argument prototype would still apply. */ 2006#ifdef __cplusplus 2007extern "C" 2008#endif 2009char $2 (); 2010/* The GNU C library defines this for functions which it implements 2011 to always fail with ENOSYS. Some functions are actually named 2012 something starting with __ and the normal name is an alias. */ 2013#if defined __stub_$2 || defined __stub___$2 2014choke me 2015#endif 2016 2017int 2018main (void) 2019{ 2020return $2 (); 2021 ; 2022 return 0; 2023} 2024_ACEOF 2025if ac_fn_c_try_link "$LINENO" 2026then : 2027 eval "$3=yes" 2028else $as_nop 2029 eval "$3=no" 2030fi 2031rm -f core conftest.err conftest.$ac_objext conftest.beam \ 2032 conftest$ac_exeext conftest.$ac_ext 2033fi 2034eval ac_res=\$$3 2035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2036printf "%s\n" "$ac_res" >&6; } 2037 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2038 2039} # ac_fn_c_check_func 2040 2041# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR 2042# ------------------------------------------------------------------ 2043# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR 2044# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. 2045ac_fn_check_decl () 2046{ 2047 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2048 as_decl_name=`echo $2|sed 's/ *(.*//'` 2049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 2050printf %s "checking whether $as_decl_name is declared... " >&6; } 2051if eval test \${$3+y} 2052then : 2053 printf %s "(cached) " >&6 2054else $as_nop 2055 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` 2056 eval ac_save_FLAGS=\$$6 2057 as_fn_append $6 " $5" 2058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2059/* end confdefs.h. */ 2060$4 2061int 2062main (void) 2063{ 2064#ifndef $as_decl_name 2065#ifdef __cplusplus 2066 (void) $as_decl_use; 2067#else 2068 (void) $as_decl_name; 2069#endif 2070#endif 2071 2072 ; 2073 return 0; 2074} 2075_ACEOF 2076if ac_fn_c_try_compile "$LINENO" 2077then : 2078 eval "$3=yes" 2079else $as_nop 2080 eval "$3=no" 2081fi 2082rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 2083 eval $6=\$ac_save_FLAGS 2084 2085fi 2086eval ac_res=\$$3 2087 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2088printf "%s\n" "$ac_res" >&6; } 2089 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2090 2091} # ac_fn_check_decl 2092 2093# ac_fn_c_check_type LINENO TYPE VAR INCLUDES 2094# ------------------------------------------- 2095# Tests whether TYPE exists after having included INCLUDES, setting cache 2096# variable VAR accordingly. 2097ac_fn_c_check_type () 2098{ 2099 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2100 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2101printf %s "checking for $2... " >&6; } 2102if eval test \${$3+y} 2103then : 2104 printf %s "(cached) " >&6 2105else $as_nop 2106 eval "$3=no" 2107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2108/* end confdefs.h. */ 2109$4 2110int 2111main (void) 2112{ 2113if (sizeof ($2)) 2114 return 0; 2115 ; 2116 return 0; 2117} 2118_ACEOF 2119if ac_fn_c_try_compile "$LINENO" 2120then : 2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2122/* end confdefs.h. */ 2123$4 2124int 2125main (void) 2126{ 2127if (sizeof (($2))) 2128 return 0; 2129 ; 2130 return 0; 2131} 2132_ACEOF 2133if ac_fn_c_try_compile "$LINENO" 2134then : 2135 2136else $as_nop 2137 eval "$3=yes" 2138fi 2139rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 2140fi 2141rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 2142fi 2143eval ac_res=\$$3 2144 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2145printf "%s\n" "$ac_res" >&6; } 2146 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2147 2148} # ac_fn_c_check_type 2149 2150# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES 2151# ---------------------------------------------------- 2152# Tries to find if the field MEMBER exists in type AGGR, after including 2153# INCLUDES, setting cache variable VAR accordingly. 2154ac_fn_c_check_member () 2155{ 2156 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 2158printf %s "checking for $2.$3... " >&6; } 2159if eval test \${$4+y} 2160then : 2161 printf %s "(cached) " >&6 2162else $as_nop 2163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2164/* end confdefs.h. */ 2165$5 2166int 2167main (void) 2168{ 2169static $2 ac_aggr; 2170if (ac_aggr.$3) 2171return 0; 2172 ; 2173 return 0; 2174} 2175_ACEOF 2176if ac_fn_c_try_compile "$LINENO" 2177then : 2178 eval "$4=yes" 2179else $as_nop 2180 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2181/* end confdefs.h. */ 2182$5 2183int 2184main (void) 2185{ 2186static $2 ac_aggr; 2187if (sizeof ac_aggr.$3) 2188return 0; 2189 ; 2190 return 0; 2191} 2192_ACEOF 2193if ac_fn_c_try_compile "$LINENO" 2194then : 2195 eval "$4=yes" 2196else $as_nop 2197 eval "$4=no" 2198fi 2199rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 2200fi 2201rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 2202fi 2203eval ac_res=\$$4 2204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2205printf "%s\n" "$ac_res" >&6; } 2206 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2207 2208} # ac_fn_c_check_member 2209ac_configure_args_raw= 2210for ac_arg 2211do 2212 case $ac_arg in 2213 *\'*) 2214 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 2215 esac 2216 as_fn_append ac_configure_args_raw " '$ac_arg'" 2217done 2218 2219case $ac_configure_args_raw in 2220 *$as_nl*) 2221 ac_safe_unquote= ;; 2222 *) 2223 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. 2224 ac_unsafe_a="$ac_unsafe_z#~" 2225 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" 2226 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; 2227esac 2228 2229cat >config.log <<_ACEOF 2230This file contains any messages produced by compilers while 2231running configure, to aid debugging if configure makes a mistake. 2232 2233It was created by pcap $as_me 1.10.6, which was 2234generated by GNU Autoconf 2.71. Invocation command line was 2235 2236 $ $0$ac_configure_args_raw 2237 2238_ACEOF 2239exec 5>>config.log 2240{ 2241cat <<_ASUNAME 2242## --------- ## 2243## Platform. ## 2244## --------- ## 2245 2246hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 2247uname -m = `(uname -m) 2>/dev/null || echo unknown` 2248uname -r = `(uname -r) 2>/dev/null || echo unknown` 2249uname -s = `(uname -s) 2>/dev/null || echo unknown` 2250uname -v = `(uname -v) 2>/dev/null || echo unknown` 2251 2252/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 2253/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 2254 2255/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 2256/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 2257/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 2258/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 2259/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 2260/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 2261/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 2262 2263_ASUNAME 2264 2265as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2266for as_dir in $PATH 2267do 2268 IFS=$as_save_IFS 2269 case $as_dir in #((( 2270 '') as_dir=./ ;; 2271 */) ;; 2272 *) as_dir=$as_dir/ ;; 2273 esac 2274 printf "%s\n" "PATH: $as_dir" 2275 done 2276IFS=$as_save_IFS 2277 2278} >&5 2279 2280cat >&5 <<_ACEOF 2281 2282 2283## ----------- ## 2284## Core tests. ## 2285## ----------- ## 2286 2287_ACEOF 2288 2289 2290# Keep a trace of the command line. 2291# Strip out --no-create and --no-recursion so they do not pile up. 2292# Strip out --silent because we don't want to record it for future runs. 2293# Also quote any args containing shell meta-characters. 2294# Make two passes to allow for proper duplicate-argument suppression. 2295ac_configure_args= 2296ac_configure_args0= 2297ac_configure_args1= 2298ac_must_keep_next=false 2299for ac_pass in 1 2 2300do 2301 for ac_arg 2302 do 2303 case $ac_arg in 2304 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; 2305 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 2306 | -silent | --silent | --silen | --sile | --sil) 2307 continue ;; 2308 *\'*) 2309 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 2310 esac 2311 case $ac_pass in 2312 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2313 2) 2314 as_fn_append ac_configure_args1 " '$ac_arg'" 2315 if test $ac_must_keep_next = true; then 2316 ac_must_keep_next=false # Got value, back to normal. 2317 else 2318 case $ac_arg in 2319 *=* | --config-cache | -C | -disable-* | --disable-* \ 2320 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ 2321 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ 2322 | -with-* | --with-* | -without-* | --without-* | --x) 2323 case "$ac_configure_args0 " in 2324 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; 2325 esac 2326 ;; 2327 -* ) ac_must_keep_next=true ;; 2328 esac 2329 fi 2330 as_fn_append ac_configure_args " '$ac_arg'" 2331 ;; 2332 esac 2333 done 2334done 2335{ ac_configure_args0=; unset ac_configure_args0;} 2336{ ac_configure_args1=; unset ac_configure_args1;} 2337 2338# When interrupted or exit'd, cleanup temporary files, and complete 2339# config.log. We remove comments because anyway the quotes in there 2340# would cause problems or look ugly. 2341# WARNING: Use '\'' to represent an apostrophe within the trap. 2342# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 2343trap 'exit_status=$? 2344 # Sanitize IFS. 2345 IFS=" "" $as_nl" 2346 # Save into config.log some information that might help in debugging. 2347 { 2348 echo 2349 2350 printf "%s\n" "## ---------------- ## 2351## Cache variables. ## 2352## ---------------- ##" 2353 echo 2354 # The following way of writing the cache mishandles newlines in values, 2355( 2356 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do 2357 eval ac_val=\$$ac_var 2358 case $ac_val in #( 2359 *${as_nl}*) 2360 case $ac_var in #( 2361 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 2362printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 2363 esac 2364 case $ac_var in #( 2365 _ | IFS | as_nl) ;; #( 2366 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 2367 *) { eval $ac_var=; unset $ac_var;} ;; 2368 esac ;; 2369 esac 2370 done 2371 (set) 2>&1 | 2372 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( 2373 *${as_nl}ac_space=\ *) 2374 sed -n \ 2375 "s/'\''/'\''\\\\'\'''\''/g; 2376 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" 2377 ;; #( 2378 *) 2379 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 2380 ;; 2381 esac | 2382 sort 2383) 2384 echo 2385 2386 printf "%s\n" "## ----------------- ## 2387## Output variables. ## 2388## ----------------- ##" 2389 echo 2390 for ac_var in $ac_subst_vars 2391 do 2392 eval ac_val=\$$ac_var 2393 case $ac_val in 2394 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2395 esac 2396 printf "%s\n" "$ac_var='\''$ac_val'\''" 2397 done | sort 2398 echo 2399 2400 if test -n "$ac_subst_files"; then 2401 printf "%s\n" "## ------------------- ## 2402## File substitutions. ## 2403## ------------------- ##" 2404 echo 2405 for ac_var in $ac_subst_files 2406 do 2407 eval ac_val=\$$ac_var 2408 case $ac_val in 2409 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2410 esac 2411 printf "%s\n" "$ac_var='\''$ac_val'\''" 2412 done | sort 2413 echo 2414 fi 2415 2416 if test -s confdefs.h; then 2417 printf "%s\n" "## ----------- ## 2418## confdefs.h. ## 2419## ----------- ##" 2420 echo 2421 cat confdefs.h 2422 echo 2423 fi 2424 test "$ac_signal" != 0 && 2425 printf "%s\n" "$as_me: caught signal $ac_signal" 2426 printf "%s\n" "$as_me: exit $exit_status" 2427 } >&5 2428 rm -f core *.core core.conftest.* && 2429 rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 2430 exit $exit_status 2431' 0 2432for ac_signal in 1 2 13 15; do 2433 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal 2434done 2435ac_signal=0 2436 2437# confdefs.h avoids OS command line length limits that DEFS can exceed. 2438rm -f -r conftest* confdefs.h 2439 2440printf "%s\n" "/* confdefs.h */" > confdefs.h 2441 2442# Predefined preprocessor variables. 2443 2444printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h 2445 2446printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h 2447 2448printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h 2449 2450printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h 2451 2452printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h 2453 2454printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h 2455 2456 2457# Let the site file select an alternate cache file if it wants to. 2458# Prefer an explicitly selected file to automatically selected ones. 2459if test -n "$CONFIG_SITE"; then 2460 ac_site_files="$CONFIG_SITE" 2461elif test "x$prefix" != xNONE; then 2462 ac_site_files="$prefix/share/config.site $prefix/etc/config.site" 2463else 2464 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" 2465fi 2466 2467for ac_site_file in $ac_site_files 2468do 2469 case $ac_site_file in #( 2470 */*) : 2471 ;; #( 2472 *) : 2473 ac_site_file=./$ac_site_file ;; 2474esac 2475 if test -f "$ac_site_file" && test -r "$ac_site_file"; then 2476 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 2477printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} 2478 sed 's/^/| /' "$ac_site_file" >&5 2479 . "$ac_site_file" \ 2480 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2481printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 2482as_fn_error $? "failed to load site script $ac_site_file 2483See \`config.log' for more details" "$LINENO" 5; } 2484 fi 2485done 2486 2487if test -r "$cache_file"; then 2488 # Some versions of bash will fail to source /dev/null (special files 2489 # actually), so we avoid doing that. DJGPP emulates it as a regular file. 2490 if test /dev/null != "$cache_file" && test -f "$cache_file"; then 2491 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 2492printf "%s\n" "$as_me: loading cache $cache_file" >&6;} 2493 case $cache_file in 2494 [\\/]* | ?:[\\/]* ) . "$cache_file";; 2495 *) . "./$cache_file";; 2496 esac 2497 fi 2498else 2499 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 2500printf "%s\n" "$as_me: creating cache $cache_file" >&6;} 2501 >$cache_file 2502fi 2503 2504# Test code for whether the C compiler supports C89 (global declarations) 2505ac_c_conftest_c89_globals=' 2506/* Does the compiler advertise C89 conformance? 2507 Do not test the value of __STDC__, because some compilers set it to 0 2508 while being otherwise adequately conformant. */ 2509#if !defined __STDC__ 2510# error "Compiler does not advertise C89 conformance" 2511#endif 2512 2513#include <stddef.h> 2514#include <stdarg.h> 2515struct stat; 2516/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ 2517struct buf { int x; }; 2518struct buf * (*rcsopen) (struct buf *, struct stat *, int); 2519static char *e (p, i) 2520 char **p; 2521 int i; 2522{ 2523 return p[i]; 2524} 2525static char *f (char * (*g) (char **, int), char **p, ...) 2526{ 2527 char *s; 2528 va_list v; 2529 va_start (v,p); 2530 s = g (p, va_arg (v,int)); 2531 va_end (v); 2532 return s; 2533} 2534 2535/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 2536 function prototypes and stuff, but not \xHH hex character constants. 2537 These do not provoke an error unfortunately, instead are silently treated 2538 as an "x". The following induces an error, until -std is added to get 2539 proper ANSI mode. Curiously \x00 != x always comes out true, for an 2540 array size at least. It is necessary to write \x00 == 0 to get something 2541 that is true only with -std. */ 2542int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; 2543 2544/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters 2545 inside strings and character constants. */ 2546#define FOO(x) '\''x'\'' 2547int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; 2548 2549int test (int i, double x); 2550struct s1 {int (*f) (int a);}; 2551struct s2 {int (*f) (double a);}; 2552int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), 2553 int, int);' 2554 2555# Test code for whether the C compiler supports C89 (body of main). 2556ac_c_conftest_c89_main=' 2557ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); 2558' 2559 2560# Test code for whether the C compiler supports C99 (global declarations) 2561ac_c_conftest_c99_globals=' 2562// Does the compiler advertise C99 conformance? 2563#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L 2564# error "Compiler does not advertise C99 conformance" 2565#endif 2566 2567#include <stdbool.h> 2568extern int puts (const char *); 2569extern int printf (const char *, ...); 2570extern int dprintf (int, const char *, ...); 2571extern void *malloc (size_t); 2572 2573// Check varargs macros. These examples are taken from C99 6.10.3.5. 2574// dprintf is used instead of fprintf to avoid needing to declare 2575// FILE and stderr. 2576#define debug(...) dprintf (2, __VA_ARGS__) 2577#define showlist(...) puts (#__VA_ARGS__) 2578#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) 2579static void 2580test_varargs_macros (void) 2581{ 2582 int x = 1234; 2583 int y = 5678; 2584 debug ("Flag"); 2585 debug ("X = %d\n", x); 2586 showlist (The first, second, and third items.); 2587 report (x>y, "x is %d but y is %d", x, y); 2588} 2589 2590// Check long long types. 2591#define BIG64 18446744073709551615ull 2592#define BIG32 4294967295ul 2593#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) 2594#if !BIG_OK 2595 #error "your preprocessor is broken" 2596#endif 2597#if BIG_OK 2598#else 2599 #error "your preprocessor is broken" 2600#endif 2601static long long int bignum = -9223372036854775807LL; 2602static unsigned long long int ubignum = BIG64; 2603 2604struct incomplete_array 2605{ 2606 int datasize; 2607 double data[]; 2608}; 2609 2610struct named_init { 2611 int number; 2612 const wchar_t *name; 2613 double average; 2614}; 2615 2616typedef const char *ccp; 2617 2618static inline int 2619test_restrict (ccp restrict text) 2620{ 2621 // See if C++-style comments work. 2622 // Iterate through items via the restricted pointer. 2623 // Also check for declarations in for loops. 2624 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) 2625 continue; 2626 return 0; 2627} 2628 2629// Check varargs and va_copy. 2630static bool 2631test_varargs (const char *format, ...) 2632{ 2633 va_list args; 2634 va_start (args, format); 2635 va_list args_copy; 2636 va_copy (args_copy, args); 2637 2638 const char *str = ""; 2639 int number = 0; 2640 float fnumber = 0; 2641 2642 while (*format) 2643 { 2644 switch (*format++) 2645 { 2646 case '\''s'\'': // string 2647 str = va_arg (args_copy, const char *); 2648 break; 2649 case '\''d'\'': // int 2650 number = va_arg (args_copy, int); 2651 break; 2652 case '\''f'\'': // float 2653 fnumber = va_arg (args_copy, double); 2654 break; 2655 default: 2656 break; 2657 } 2658 } 2659 va_end (args_copy); 2660 va_end (args); 2661 2662 return *str && number && fnumber; 2663} 2664' 2665 2666# Test code for whether the C compiler supports C99 (body of main). 2667ac_c_conftest_c99_main=' 2668 // Check bool. 2669 _Bool success = false; 2670 success |= (argc != 0); 2671 2672 // Check restrict. 2673 if (test_restrict ("String literal") == 0) 2674 success = true; 2675 char *restrict newvar = "Another string"; 2676 2677 // Check varargs. 2678 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); 2679 test_varargs_macros (); 2680 2681 // Check flexible array members. 2682 struct incomplete_array *ia = 2683 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); 2684 ia->datasize = 10; 2685 for (int i = 0; i < ia->datasize; ++i) 2686 ia->data[i] = i * 1.234; 2687 2688 // Check named initializers. 2689 struct named_init ni = { 2690 .number = 34, 2691 .name = L"Test wide string", 2692 .average = 543.34343, 2693 }; 2694 2695 ni.number = 58; 2696 2697 int dynamic_array[ni.number]; 2698 dynamic_array[0] = argv[0][0]; 2699 dynamic_array[ni.number - 1] = 543; 2700 2701 // work around unused variable warnings 2702 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' 2703 || dynamic_array[ni.number - 1] != 543); 2704' 2705 2706# Test code for whether the C compiler supports C11 (global declarations) 2707ac_c_conftest_c11_globals=' 2708// Does the compiler advertise C11 conformance? 2709#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L 2710# error "Compiler does not advertise C11 conformance" 2711#endif 2712 2713// Check _Alignas. 2714char _Alignas (double) aligned_as_double; 2715char _Alignas (0) no_special_alignment; 2716extern char aligned_as_int; 2717char _Alignas (0) _Alignas (int) aligned_as_int; 2718 2719// Check _Alignof. 2720enum 2721{ 2722 int_alignment = _Alignof (int), 2723 int_array_alignment = _Alignof (int[100]), 2724 char_alignment = _Alignof (char) 2725}; 2726_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); 2727 2728// Check _Noreturn. 2729int _Noreturn does_not_return (void) { for (;;) continue; } 2730 2731// Check _Static_assert. 2732struct test_static_assert 2733{ 2734 int x; 2735 _Static_assert (sizeof (int) <= sizeof (long int), 2736 "_Static_assert does not work in struct"); 2737 long int y; 2738}; 2739 2740// Check UTF-8 literals. 2741#define u8 syntax error! 2742char const utf8_literal[] = u8"happens to be ASCII" "another string"; 2743 2744// Check duplicate typedefs. 2745typedef long *long_ptr; 2746typedef long int *long_ptr; 2747typedef long_ptr long_ptr; 2748 2749// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. 2750struct anonymous 2751{ 2752 union { 2753 struct { int i; int j; }; 2754 struct { int k; long int l; } w; 2755 }; 2756 int m; 2757} v1; 2758' 2759 2760# Test code for whether the C compiler supports C11 (body of main). 2761ac_c_conftest_c11_main=' 2762 _Static_assert ((offsetof (struct anonymous, i) 2763 == offsetof (struct anonymous, w.k)), 2764 "Anonymous union alignment botch"); 2765 v1.i = 2; 2766 v1.w.k = 5; 2767 ok |= v1.i != 5; 2768' 2769 2770# Test code for whether the C compiler supports C11 (complete). 2771ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} 2772${ac_c_conftest_c99_globals} 2773${ac_c_conftest_c11_globals} 2774 2775int 2776main (int argc, char **argv) 2777{ 2778 int ok = 0; 2779 ${ac_c_conftest_c89_main} 2780 ${ac_c_conftest_c99_main} 2781 ${ac_c_conftest_c11_main} 2782 return ok; 2783} 2784" 2785 2786# Test code for whether the C compiler supports C99 (complete). 2787ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} 2788${ac_c_conftest_c99_globals} 2789 2790int 2791main (int argc, char **argv) 2792{ 2793 int ok = 0; 2794 ${ac_c_conftest_c89_main} 2795 ${ac_c_conftest_c99_main} 2796 return ok; 2797} 2798" 2799 2800# Test code for whether the C compiler supports C89 (complete). 2801ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} 2802 2803int 2804main (int argc, char **argv) 2805{ 2806 int ok = 0; 2807 ${ac_c_conftest_c89_main} 2808 return ok; 2809} 2810" 2811 2812as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" 2813as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" 2814as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" 2815as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" 2816as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" 2817as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" 2818as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" 2819as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" 2820as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" 2821 2822# Auxiliary files required by this configure script. 2823ac_aux_files="install-sh config.guess config.sub" 2824 2825# Locations in which to look for auxiliary files. 2826ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." 2827 2828# Search for a directory containing all of the required auxiliary files, 2829# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. 2830# If we don't find one directory that contains all the files we need, 2831# we report the set of missing files from the *first* directory in 2832# $ac_aux_dir_candidates and give up. 2833ac_missing_aux_files="" 2834ac_first_candidate=: 2835printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 2836as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2837as_found=false 2838for as_dir in $ac_aux_dir_candidates 2839do 2840 IFS=$as_save_IFS 2841 case $as_dir in #((( 2842 '') as_dir=./ ;; 2843 */) ;; 2844 *) as_dir=$as_dir/ ;; 2845 esac 2846 as_found=: 2847 2848 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 2849 ac_aux_dir_found=yes 2850 ac_install_sh= 2851 for ac_aux in $ac_aux_files 2852 do 2853 # As a special case, if "install-sh" is required, that requirement 2854 # can be satisfied by any of "install-sh", "install.sh", or "shtool", 2855 # and $ac_install_sh is set appropriately for whichever one is found. 2856 if test x"$ac_aux" = x"install-sh" 2857 then 2858 if test -f "${as_dir}install-sh"; then 2859 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 2860 ac_install_sh="${as_dir}install-sh -c" 2861 elif test -f "${as_dir}install.sh"; then 2862 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 2863 ac_install_sh="${as_dir}install.sh -c" 2864 elif test -f "${as_dir}shtool"; then 2865 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 2866 ac_install_sh="${as_dir}shtool install -c" 2867 else 2868 ac_aux_dir_found=no 2869 if $ac_first_candidate; then 2870 ac_missing_aux_files="${ac_missing_aux_files} install-sh" 2871 else 2872 break 2873 fi 2874 fi 2875 else 2876 if test -f "${as_dir}${ac_aux}"; then 2877 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 2878 else 2879 ac_aux_dir_found=no 2880 if $ac_first_candidate; then 2881 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" 2882 else 2883 break 2884 fi 2885 fi 2886 fi 2887 done 2888 if test "$ac_aux_dir_found" = yes; then 2889 ac_aux_dir="$as_dir" 2890 break 2891 fi 2892 ac_first_candidate=false 2893 2894 as_found=false 2895done 2896IFS=$as_save_IFS 2897if $as_found 2898then : 2899 2900else $as_nop 2901 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 2902fi 2903 2904 2905# These three variables are undocumented and unsupported, 2906# and are intended to be withdrawn in a future Autoconf release. 2907# They can cause serious problems if a builder's source tree is in a directory 2908# whose full name contains unusual characters. 2909if test -f "${ac_aux_dir}config.guess"; then 2910 ac_config_guess="$SHELL ${ac_aux_dir}config.guess" 2911fi 2912if test -f "${ac_aux_dir}config.sub"; then 2913 ac_config_sub="$SHELL ${ac_aux_dir}config.sub" 2914fi 2915if test -f "$ac_aux_dir/configure"; then 2916 ac_configure="$SHELL ${ac_aux_dir}configure" 2917fi 2918 2919# Check that the precious variables saved in the cache have kept the same 2920# value. 2921ac_cache_corrupted=false 2922for ac_var in $ac_precious_vars; do 2923 eval ac_old_set=\$ac_cv_env_${ac_var}_set 2924 eval ac_new_set=\$ac_env_${ac_var}_set 2925 eval ac_old_val=\$ac_cv_env_${ac_var}_value 2926 eval ac_new_val=\$ac_env_${ac_var}_value 2927 case $ac_old_set,$ac_new_set in 2928 set,) 2929 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 2930printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 2931 ac_cache_corrupted=: ;; 2932 ,set) 2933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 2934printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 2935 ac_cache_corrupted=: ;; 2936 ,);; 2937 *) 2938 if test "x$ac_old_val" != "x$ac_new_val"; then 2939 # differences in whitespace do not lead to failure. 2940 ac_old_val_w=`echo x $ac_old_val` 2941 ac_new_val_w=`echo x $ac_new_val` 2942 if test "$ac_old_val_w" != "$ac_new_val_w"; then 2943 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 2944printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 2945 ac_cache_corrupted=: 2946 else 2947 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 2948printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} 2949 eval $ac_var=\$ac_old_val 2950 fi 2951 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 2952printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} 2953 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 2954printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} 2955 fi;; 2956 esac 2957 # Pass precious variables to config.status. 2958 if test "$ac_new_set" = set; then 2959 case $ac_new_val in 2960 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 2961 *) ac_arg=$ac_var=$ac_new_val ;; 2962 esac 2963 case " $ac_configure_args " in 2964 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. 2965 *) as_fn_append ac_configure_args " '$ac_arg'" ;; 2966 esac 2967 fi 2968done 2969if $ac_cache_corrupted; then 2970 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2971printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 2972 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 2973printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} 2974 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' 2975 and start over" "$LINENO" 5 2976fi 2977## -------------------- ## 2978## Main body of script. ## 2979## -------------------- ## 2980 2981ac_ext=c 2982ac_cpp='$CPP $CPPFLAGS' 2983ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2984ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2985ac_compiler_gnu=$ac_cv_c_compiler_gnu 2986 2987 2988 2989 2990 2991# 2992# These are the variables that are used in Makefile, pcap-config, and 2993# libpcap.pc. 2994# 2995# CFLAGS: inherited from the environment, not modified by us except 2996# for flags required for the platform for which we're building (and 2997# except temporarily during tests that involve compilation). Used only 2998# when compiling C source. 2999# 3000# LDFLAGS: inherited from the environment, not modified by us. 3001# 3002# LIBS: inherited from the environment; we add libraries required by 3003# libpcap. Libraries that the core libpcap code requires are added 3004# first; libraries required by additional pcap modules are first 3005# added to ADDITIONAL_LIBS, and only added to LIBS at the end, after 3006# we're finished doing configuration tests for the modules. 3007# 3008# LIBS_STATIC: libraries with which a program using the libpcap *static* 3009# library needs to be linked. This is a superset of LIBS, used in 3010# pcap-config, so that "pcap-config --libs --static" will report them. 3011# Initialized to LIBS. 3012# 3013# REQUIRES_PRIVATE: pkg-config package names for additional libraries 3014# with which a program using the libpcap *static* library needs to be 3015# linked and for which a .pc file exists. This is used in libpcap.pc, 3016# so that "pkg-config --libs --static" will report them, and so that 3017# those libraries will be determined using the library's .pc file, not 3018# from our .pc file. Initialized to an empty string. 3019# 3020# V_CCOPT: additional compiler flags other than -I and -D flags 3021# needed when compiling libpcap. Used in Makefile for both C and 3022# C++ source. 3023# 3024# V_DEFS: additional -D compiler flags needed when compiling 3025# libpcap. Used in Makefile for both C and C++ source. 3026# 3027# V_INCLS: additional -I compiler flags needed when compiling 3028# libpcap. Used in Makefile for both C and C++ source. 3029# 3030# ADDITIONAL_LIBS: additional libraries with which the libpcap dynamic 3031# library needs to be linked. Used in Makefile; not used in pcap-config 3032# or libpcap.pc, as, in all platforms on which we run, if a dynamic 3033# library is linked with other dynamic libraries, a program using 3034# that dynamic library doesn't have to link with those libraries - 3035# they will be automatically loaded at run time. Initialized to an 3036# empty string. 3037# 3038# ADDITIONAL_LIBS_STATIC: additional libraries with which a program 3039# using the libpcap *static* library needs to be linked. This is used 3040# in pcap-config, so that "pcap-config --libs --static" will report 3041# them. Initialized to an empty string. 3042# 3043# REQUIRES_PRIVATE: pkg-config package names for additional libraries 3044# with which a program using the libpcap *static* library needs to be 3045# linked and for which a .pc file exists. This is used in libpcap.pc, 3046# so that "pkg-config --libs --static" will report them, and so that 3047# those libraries will be determined using the library's .pc file, not 3048# from our .pc file. Initialized to an empty string. 3049# 3050# LIBS_PRIVATE: pkg-config package names for additional libraries with 3051# which a program using the libpcap *static* library needs to be linked 3052# and for which a .pc file does not exist. This is used in libpcap.pc, 3053# so that "pkg-config --libs --static" will report them (those libraries 3054# cannot be determined using the library's .pc file, as there is no such 3055# file, so it has to come from our .pc file. Initialized to an empty 3056# string. 3057# 3058LIBS_STATIC="" 3059REQUIRES_PRIVATE="" 3060LIBS_PRIVATE="" 3061 3062 3063 3064 3065 3066 3067 3068 3069 3070 3071 3072 # Make sure we can run config.sub. 3073$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || 3074 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 3075 3076{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 3077printf %s "checking build system type... " >&6; } 3078if test ${ac_cv_build+y} 3079then : 3080 printf %s "(cached) " >&6 3081else $as_nop 3082 ac_build_alias=$build_alias 3083test "x$ac_build_alias" = x && 3084 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` 3085test "x$ac_build_alias" = x && 3086 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 3087ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || 3088 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 3089 3090fi 3091{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 3092printf "%s\n" "$ac_cv_build" >&6; } 3093case $ac_cv_build in 3094*-*-*) ;; 3095*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; 3096esac 3097build=$ac_cv_build 3098ac_save_IFS=$IFS; IFS='-' 3099set x $ac_cv_build 3100shift 3101build_cpu=$1 3102build_vendor=$2 3103shift; shift 3104# Remember, the first character of IFS is used to create $*, 3105# except with old shells: 3106build_os=$* 3107IFS=$ac_save_IFS 3108case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac 3109 3110 3111{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 3112printf %s "checking host system type... " >&6; } 3113if test ${ac_cv_host+y} 3114then : 3115 printf %s "(cached) " >&6 3116else $as_nop 3117 if test "x$host_alias" = x; then 3118 ac_cv_host=$ac_cv_build 3119else 3120 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || 3121 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 3122fi 3123 3124fi 3125{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 3126printf "%s\n" "$ac_cv_host" >&6; } 3127case $ac_cv_host in 3128*-*-*) ;; 3129*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; 3130esac 3131host=$ac_cv_host 3132ac_save_IFS=$IFS; IFS='-' 3133set x $ac_cv_host 3134shift 3135host_cpu=$1 3136host_vendor=$2 3137shift; shift 3138# Remember, the first character of IFS is used to create $*, 3139# except with old shells: 3140host_os=$* 3141IFS=$ac_save_IFS 3142case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac 3143 3144 3145{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 3146printf %s "checking target system type... " >&6; } 3147if test ${ac_cv_target+y} 3148then : 3149 printf %s "(cached) " >&6 3150else $as_nop 3151 if test "x$target_alias" = x; then 3152 ac_cv_target=$ac_cv_host 3153else 3154 ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` || 3155 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5 3156fi 3157 3158fi 3159{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 3160printf "%s\n" "$ac_cv_target" >&6; } 3161case $ac_cv_target in 3162*-*-*) ;; 3163*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; 3164esac 3165target=$ac_cv_target 3166ac_save_IFS=$IFS; IFS='-' 3167set x $ac_cv_target 3168shift 3169target_cpu=$1 3170target_vendor=$2 3171shift; shift 3172# Remember, the first character of IFS is used to create $*, 3173# except with old shells: 3174target_os=$* 3175IFS=$ac_save_IFS 3176case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac 3177 3178 3179# The aliases save the names the user supplied, while $host etc. 3180# will get canonicalized. 3181test -n "$target_alias" && 3182 test "$program_prefix$program_suffix$program_transform_name" = \ 3183 NONENONEs,x,x, && 3184 program_prefix=${target_alias}- 3185 3186 3187 3188 3189 3190 3191 3192 3193# Check whether --with-gcc was given. 3194if test ${with_gcc+y} 3195then : 3196 withval=$with_gcc; 3197fi 3198 3199 V_CCOPT="" 3200 if test "${srcdir}" != "." ; then 3201 V_CCOPT="-I\$(srcdir)" 3202 fi 3203 if test "${CFLAGS+set}" = set; then 3204 LBL_CFLAGS="$CFLAGS" 3205 fi 3206 if test -z "$CC" ; then 3207 case "$host_os" in 3208 3209 bsdi*) 3210 # Extract the first word of "shlicc2", so it can be a program name with args. 3211set dummy shlicc2; ac_word=$2 3212{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3213printf %s "checking for $ac_word... " >&6; } 3214if test ${ac_cv_prog_SHLICC2+y} 3215then : 3216 printf %s "(cached) " >&6 3217else $as_nop 3218 if test -n "$SHLICC2"; then 3219 ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test. 3220else 3221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3222for as_dir in $PATH 3223do 3224 IFS=$as_save_IFS 3225 case $as_dir in #((( 3226 '') as_dir=./ ;; 3227 */) ;; 3228 *) as_dir=$as_dir/ ;; 3229 esac 3230 for ac_exec_ext in '' $ac_executable_extensions; do 3231 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3232 ac_cv_prog_SHLICC2="yes" 3233 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3234 break 2 3235 fi 3236done 3237 done 3238IFS=$as_save_IFS 3239 3240 test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no" 3241fi 3242fi 3243SHLICC2=$ac_cv_prog_SHLICC2 3244if test -n "$SHLICC2"; then 3245 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5 3246printf "%s\n" "$SHLICC2" >&6; } 3247else 3248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3249printf "%s\n" "no" >&6; } 3250fi 3251 3252 3253 if test $SHLICC2 = yes ; then 3254 CC=shlicc2 3255 export CC 3256 fi 3257 ;; 3258 esac 3259 fi 3260 if test -z "$CC" -a "$with_gcc" = no ; then 3261 CC=cc 3262 export CC 3263 fi 3264 3265# 3266# We require C99 or later. 3267# Try to get it, which may involve adding compiler flags; 3268# if that fails, give up. 3269# 3270 3271 3272 3273 3274 3275 3276 3277 3278 3279ac_ext=c 3280ac_cpp='$CPP $CPPFLAGS' 3281ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3282ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3283ac_compiler_gnu=$ac_cv_c_compiler_gnu 3284if test -n "$ac_tool_prefix"; then 3285 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 3286set dummy ${ac_tool_prefix}gcc; ac_word=$2 3287{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3288printf %s "checking for $ac_word... " >&6; } 3289if test ${ac_cv_prog_CC+y} 3290then : 3291 printf %s "(cached) " >&6 3292else $as_nop 3293 if test -n "$CC"; then 3294 ac_cv_prog_CC="$CC" # Let the user override the test. 3295else 3296as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3297for as_dir in $PATH 3298do 3299 IFS=$as_save_IFS 3300 case $as_dir in #((( 3301 '') as_dir=./ ;; 3302 */) ;; 3303 *) as_dir=$as_dir/ ;; 3304 esac 3305 for ac_exec_ext in '' $ac_executable_extensions; do 3306 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3307 ac_cv_prog_CC="${ac_tool_prefix}gcc" 3308 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3309 break 2 3310 fi 3311done 3312 done 3313IFS=$as_save_IFS 3314 3315fi 3316fi 3317CC=$ac_cv_prog_CC 3318if test -n "$CC"; then 3319 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3320printf "%s\n" "$CC" >&6; } 3321else 3322 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3323printf "%s\n" "no" >&6; } 3324fi 3325 3326 3327fi 3328if test -z "$ac_cv_prog_CC"; then 3329 ac_ct_CC=$CC 3330 # Extract the first word of "gcc", so it can be a program name with args. 3331set dummy gcc; ac_word=$2 3332{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3333printf %s "checking for $ac_word... " >&6; } 3334if test ${ac_cv_prog_ac_ct_CC+y} 3335then : 3336 printf %s "(cached) " >&6 3337else $as_nop 3338 if test -n "$ac_ct_CC"; then 3339 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 3340else 3341as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3342for as_dir in $PATH 3343do 3344 IFS=$as_save_IFS 3345 case $as_dir in #((( 3346 '') as_dir=./ ;; 3347 */) ;; 3348 *) as_dir=$as_dir/ ;; 3349 esac 3350 for ac_exec_ext in '' $ac_executable_extensions; do 3351 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3352 ac_cv_prog_ac_ct_CC="gcc" 3353 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3354 break 2 3355 fi 3356done 3357 done 3358IFS=$as_save_IFS 3359 3360fi 3361fi 3362ac_ct_CC=$ac_cv_prog_ac_ct_CC 3363if test -n "$ac_ct_CC"; then 3364 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 3365printf "%s\n" "$ac_ct_CC" >&6; } 3366else 3367 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3368printf "%s\n" "no" >&6; } 3369fi 3370 3371 if test "x$ac_ct_CC" = x; then 3372 CC="" 3373 else 3374 case $cross_compiling:$ac_tool_warned in 3375yes:) 3376{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 3377printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 3378ac_tool_warned=yes ;; 3379esac 3380 CC=$ac_ct_CC 3381 fi 3382else 3383 CC="$ac_cv_prog_CC" 3384fi 3385 3386if test -z "$CC"; then 3387 if test -n "$ac_tool_prefix"; then 3388 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 3389set dummy ${ac_tool_prefix}cc; ac_word=$2 3390{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3391printf %s "checking for $ac_word... " >&6; } 3392if test ${ac_cv_prog_CC+y} 3393then : 3394 printf %s "(cached) " >&6 3395else $as_nop 3396 if test -n "$CC"; then 3397 ac_cv_prog_CC="$CC" # Let the user override the test. 3398else 3399as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3400for as_dir in $PATH 3401do 3402 IFS=$as_save_IFS 3403 case $as_dir in #((( 3404 '') as_dir=./ ;; 3405 */) ;; 3406 *) as_dir=$as_dir/ ;; 3407 esac 3408 for ac_exec_ext in '' $ac_executable_extensions; do 3409 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3410 ac_cv_prog_CC="${ac_tool_prefix}cc" 3411 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3412 break 2 3413 fi 3414done 3415 done 3416IFS=$as_save_IFS 3417 3418fi 3419fi 3420CC=$ac_cv_prog_CC 3421if test -n "$CC"; then 3422 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3423printf "%s\n" "$CC" >&6; } 3424else 3425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3426printf "%s\n" "no" >&6; } 3427fi 3428 3429 3430 fi 3431fi 3432if test -z "$CC"; then 3433 # Extract the first word of "cc", so it can be a program name with args. 3434set dummy cc; ac_word=$2 3435{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3436printf %s "checking for $ac_word... " >&6; } 3437if test ${ac_cv_prog_CC+y} 3438then : 3439 printf %s "(cached) " >&6 3440else $as_nop 3441 if test -n "$CC"; then 3442 ac_cv_prog_CC="$CC" # Let the user override the test. 3443else 3444 ac_prog_rejected=no 3445as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3446for as_dir in $PATH 3447do 3448 IFS=$as_save_IFS 3449 case $as_dir in #((( 3450 '') as_dir=./ ;; 3451 */) ;; 3452 *) as_dir=$as_dir/ ;; 3453 esac 3454 for ac_exec_ext in '' $ac_executable_extensions; do 3455 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3456 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then 3457 ac_prog_rejected=yes 3458 continue 3459 fi 3460 ac_cv_prog_CC="cc" 3461 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3462 break 2 3463 fi 3464done 3465 done 3466IFS=$as_save_IFS 3467 3468if test $ac_prog_rejected = yes; then 3469 # We found a bogon in the path, so make sure we never use it. 3470 set dummy $ac_cv_prog_CC 3471 shift 3472 if test $# != 0; then 3473 # We chose a different compiler from the bogus one. 3474 # However, it has the same basename, so the bogon will be chosen 3475 # first if we set CC to just the basename; use the full file name. 3476 shift 3477 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" 3478 fi 3479fi 3480fi 3481fi 3482CC=$ac_cv_prog_CC 3483if test -n "$CC"; then 3484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3485printf "%s\n" "$CC" >&6; } 3486else 3487 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3488printf "%s\n" "no" >&6; } 3489fi 3490 3491 3492fi 3493if test -z "$CC"; then 3494 if test -n "$ac_tool_prefix"; then 3495 for ac_prog in cl.exe 3496 do 3497 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 3498set dummy $ac_tool_prefix$ac_prog; ac_word=$2 3499{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3500printf %s "checking for $ac_word... " >&6; } 3501if test ${ac_cv_prog_CC+y} 3502then : 3503 printf %s "(cached) " >&6 3504else $as_nop 3505 if test -n "$CC"; then 3506 ac_cv_prog_CC="$CC" # Let the user override the test. 3507else 3508as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3509for as_dir in $PATH 3510do 3511 IFS=$as_save_IFS 3512 case $as_dir in #((( 3513 '') as_dir=./ ;; 3514 */) ;; 3515 *) as_dir=$as_dir/ ;; 3516 esac 3517 for ac_exec_ext in '' $ac_executable_extensions; do 3518 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3519 ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 3520 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3521 break 2 3522 fi 3523done 3524 done 3525IFS=$as_save_IFS 3526 3527fi 3528fi 3529CC=$ac_cv_prog_CC 3530if test -n "$CC"; then 3531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3532printf "%s\n" "$CC" >&6; } 3533else 3534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3535printf "%s\n" "no" >&6; } 3536fi 3537 3538 3539 test -n "$CC" && break 3540 done 3541fi 3542if test -z "$CC"; then 3543 ac_ct_CC=$CC 3544 for ac_prog in cl.exe 3545do 3546 # Extract the first word of "$ac_prog", so it can be a program name with args. 3547set dummy $ac_prog; ac_word=$2 3548{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3549printf %s "checking for $ac_word... " >&6; } 3550if test ${ac_cv_prog_ac_ct_CC+y} 3551then : 3552 printf %s "(cached) " >&6 3553else $as_nop 3554 if test -n "$ac_ct_CC"; then 3555 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 3556else 3557as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3558for as_dir in $PATH 3559do 3560 IFS=$as_save_IFS 3561 case $as_dir in #((( 3562 '') as_dir=./ ;; 3563 */) ;; 3564 *) as_dir=$as_dir/ ;; 3565 esac 3566 for ac_exec_ext in '' $ac_executable_extensions; do 3567 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3568 ac_cv_prog_ac_ct_CC="$ac_prog" 3569 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3570 break 2 3571 fi 3572done 3573 done 3574IFS=$as_save_IFS 3575 3576fi 3577fi 3578ac_ct_CC=$ac_cv_prog_ac_ct_CC 3579if test -n "$ac_ct_CC"; then 3580 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 3581printf "%s\n" "$ac_ct_CC" >&6; } 3582else 3583 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3584printf "%s\n" "no" >&6; } 3585fi 3586 3587 3588 test -n "$ac_ct_CC" && break 3589done 3590 3591 if test "x$ac_ct_CC" = x; then 3592 CC="" 3593 else 3594 case $cross_compiling:$ac_tool_warned in 3595yes:) 3596{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 3597printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 3598ac_tool_warned=yes ;; 3599esac 3600 CC=$ac_ct_CC 3601 fi 3602fi 3603 3604fi 3605if test -z "$CC"; then 3606 if test -n "$ac_tool_prefix"; then 3607 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. 3608set dummy ${ac_tool_prefix}clang; ac_word=$2 3609{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3610printf %s "checking for $ac_word... " >&6; } 3611if test ${ac_cv_prog_CC+y} 3612then : 3613 printf %s "(cached) " >&6 3614else $as_nop 3615 if test -n "$CC"; then 3616 ac_cv_prog_CC="$CC" # Let the user override the test. 3617else 3618as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3619for as_dir in $PATH 3620do 3621 IFS=$as_save_IFS 3622 case $as_dir in #((( 3623 '') as_dir=./ ;; 3624 */) ;; 3625 *) as_dir=$as_dir/ ;; 3626 esac 3627 for ac_exec_ext in '' $ac_executable_extensions; do 3628 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3629 ac_cv_prog_CC="${ac_tool_prefix}clang" 3630 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3631 break 2 3632 fi 3633done 3634 done 3635IFS=$as_save_IFS 3636 3637fi 3638fi 3639CC=$ac_cv_prog_CC 3640if test -n "$CC"; then 3641 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3642printf "%s\n" "$CC" >&6; } 3643else 3644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3645printf "%s\n" "no" >&6; } 3646fi 3647 3648 3649fi 3650if test -z "$ac_cv_prog_CC"; then 3651 ac_ct_CC=$CC 3652 # Extract the first word of "clang", so it can be a program name with args. 3653set dummy clang; ac_word=$2 3654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3655printf %s "checking for $ac_word... " >&6; } 3656if test ${ac_cv_prog_ac_ct_CC+y} 3657then : 3658 printf %s "(cached) " >&6 3659else $as_nop 3660 if test -n "$ac_ct_CC"; then 3661 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 3662else 3663as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3664for as_dir in $PATH 3665do 3666 IFS=$as_save_IFS 3667 case $as_dir in #((( 3668 '') as_dir=./ ;; 3669 */) ;; 3670 *) as_dir=$as_dir/ ;; 3671 esac 3672 for ac_exec_ext in '' $ac_executable_extensions; do 3673 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3674 ac_cv_prog_ac_ct_CC="clang" 3675 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3676 break 2 3677 fi 3678done 3679 done 3680IFS=$as_save_IFS 3681 3682fi 3683fi 3684ac_ct_CC=$ac_cv_prog_ac_ct_CC 3685if test -n "$ac_ct_CC"; then 3686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 3687printf "%s\n" "$ac_ct_CC" >&6; } 3688else 3689 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3690printf "%s\n" "no" >&6; } 3691fi 3692 3693 if test "x$ac_ct_CC" = x; then 3694 CC="" 3695 else 3696 case $cross_compiling:$ac_tool_warned in 3697yes:) 3698{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 3699printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 3700ac_tool_warned=yes ;; 3701esac 3702 CC=$ac_ct_CC 3703 fi 3704else 3705 CC="$ac_cv_prog_CC" 3706fi 3707 3708fi 3709 3710 3711test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3712printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 3713as_fn_error $? "no acceptable C compiler found in \$PATH 3714See \`config.log' for more details" "$LINENO" 5; } 3715 3716# Provide some information about the compiler. 3717printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 3718set X $ac_compile 3719ac_compiler=$2 3720for ac_option in --version -v -V -qversion -version; do 3721 { { ac_try="$ac_compiler $ac_option >&5" 3722case "(($ac_try" in 3723 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3724 *) ac_try_echo=$ac_try;; 3725esac 3726eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3727printf "%s\n" "$ac_try_echo"; } >&5 3728 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 3729 ac_status=$? 3730 if test -s conftest.err; then 3731 sed '10a\ 3732... rest of stderr output deleted ... 3733 10q' conftest.err >conftest.er1 3734 cat conftest.er1 >&5 3735 fi 3736 rm -f conftest.er1 conftest.err 3737 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3738 test $ac_status = 0; } 3739done 3740 3741cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3742/* end confdefs.h. */ 3743 3744int 3745main (void) 3746{ 3747 3748 ; 3749 return 0; 3750} 3751_ACEOF 3752ac_clean_files_save=$ac_clean_files 3753ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" 3754# Try to create an executable without -o first, disregard a.out. 3755# It will help us diagnose broken compilers, and finding out an intuition 3756# of exeext. 3757{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 3758printf %s "checking whether the C compiler works... " >&6; } 3759ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 3760 3761# The possible output files: 3762ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" 3763 3764ac_rmfiles= 3765for ac_file in $ac_files 3766do 3767 case $ac_file in 3768 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 3769 * ) ac_rmfiles="$ac_rmfiles $ac_file";; 3770 esac 3771done 3772rm -f $ac_rmfiles 3773 3774if { { ac_try="$ac_link_default" 3775case "(($ac_try" in 3776 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3777 *) ac_try_echo=$ac_try;; 3778esac 3779eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3780printf "%s\n" "$ac_try_echo"; } >&5 3781 (eval "$ac_link_default") 2>&5 3782 ac_status=$? 3783 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3784 test $ac_status = 0; } 3785then : 3786 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. 3787# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' 3788# in a Makefile. We should not override ac_cv_exeext if it was cached, 3789# so that the user can short-circuit this test for compilers unknown to 3790# Autoconf. 3791for ac_file in $ac_files '' 3792do 3793 test -f "$ac_file" || continue 3794 case $ac_file in 3795 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) 3796 ;; 3797 [ab].out ) 3798 # We found the default executable, but exeext='' is most 3799 # certainly right. 3800 break;; 3801 *.* ) 3802 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; 3803 then :; else 3804 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 3805 fi 3806 # We set ac_cv_exeext here because the later test for it is not 3807 # safe: cross compilers may not add the suffix if given an `-o' 3808 # argument, so we may need to know it at that point already. 3809 # Even if this section looks crufty: it has the advantage of 3810 # actually working. 3811 break;; 3812 * ) 3813 break;; 3814 esac 3815done 3816test "$ac_cv_exeext" = no && ac_cv_exeext= 3817 3818else $as_nop 3819 ac_file='' 3820fi 3821if test -z "$ac_file" 3822then : 3823 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3824printf "%s\n" "no" >&6; } 3825printf "%s\n" "$as_me: failed program was:" >&5 3826sed 's/^/| /' conftest.$ac_ext >&5 3827 3828{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3829printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 3830as_fn_error 77 "C compiler cannot create executables 3831See \`config.log' for more details" "$LINENO" 5; } 3832else $as_nop 3833 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 3834printf "%s\n" "yes" >&6; } 3835fi 3836{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 3837printf %s "checking for C compiler default output file name... " >&6; } 3838{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 3839printf "%s\n" "$ac_file" >&6; } 3840ac_exeext=$ac_cv_exeext 3841 3842rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out 3843ac_clean_files=$ac_clean_files_save 3844{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 3845printf %s "checking for suffix of executables... " >&6; } 3846if { { ac_try="$ac_link" 3847case "(($ac_try" in 3848 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3849 *) ac_try_echo=$ac_try;; 3850esac 3851eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3852printf "%s\n" "$ac_try_echo"; } >&5 3853 (eval "$ac_link") 2>&5 3854 ac_status=$? 3855 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3856 test $ac_status = 0; } 3857then : 3858 # If both `conftest.exe' and `conftest' are `present' (well, observable) 3859# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will 3860# work properly (i.e., refer to `conftest.exe'), while it won't with 3861# `rm'. 3862for ac_file in conftest.exe conftest conftest.*; do 3863 test -f "$ac_file" || continue 3864 case $ac_file in 3865 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 3866 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 3867 break;; 3868 * ) break;; 3869 esac 3870done 3871else $as_nop 3872 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3873printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 3874as_fn_error $? "cannot compute suffix of executables: cannot compile and link 3875See \`config.log' for more details" "$LINENO" 5; } 3876fi 3877rm -f conftest conftest$ac_cv_exeext 3878{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 3879printf "%s\n" "$ac_cv_exeext" >&6; } 3880 3881rm -f conftest.$ac_ext 3882EXEEXT=$ac_cv_exeext 3883ac_exeext=$EXEEXT 3884cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3885/* end confdefs.h. */ 3886#include <stdio.h> 3887int 3888main (void) 3889{ 3890FILE *f = fopen ("conftest.out", "w"); 3891 return ferror (f) || fclose (f) != 0; 3892 3893 ; 3894 return 0; 3895} 3896_ACEOF 3897ac_clean_files="$ac_clean_files conftest.out" 3898# Check that the compiler produces executables we can run. If not, either 3899# the compiler is broken, or we cross compile. 3900{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 3901printf %s "checking whether we are cross compiling... " >&6; } 3902if test "$cross_compiling" != yes; then 3903 { { ac_try="$ac_link" 3904case "(($ac_try" in 3905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3906 *) ac_try_echo=$ac_try;; 3907esac 3908eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3909printf "%s\n" "$ac_try_echo"; } >&5 3910 (eval "$ac_link") 2>&5 3911 ac_status=$? 3912 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3913 test $ac_status = 0; } 3914 if { ac_try='./conftest$ac_cv_exeext' 3915 { { case "(($ac_try" in 3916 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3917 *) ac_try_echo=$ac_try;; 3918esac 3919eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3920printf "%s\n" "$ac_try_echo"; } >&5 3921 (eval "$ac_try") 2>&5 3922 ac_status=$? 3923 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3924 test $ac_status = 0; }; }; then 3925 cross_compiling=no 3926 else 3927 if test "$cross_compiling" = maybe; then 3928 cross_compiling=yes 3929 else 3930 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3931printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 3932as_fn_error 77 "cannot run C compiled programs. 3933If you meant to cross compile, use \`--host'. 3934See \`config.log' for more details" "$LINENO" 5; } 3935 fi 3936 fi 3937fi 3938{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 3939printf "%s\n" "$cross_compiling" >&6; } 3940 3941rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out 3942ac_clean_files=$ac_clean_files_save 3943{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 3944printf %s "checking for suffix of object files... " >&6; } 3945if test ${ac_cv_objext+y} 3946then : 3947 printf %s "(cached) " >&6 3948else $as_nop 3949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3950/* end confdefs.h. */ 3951 3952int 3953main (void) 3954{ 3955 3956 ; 3957 return 0; 3958} 3959_ACEOF 3960rm -f conftest.o conftest.obj 3961if { { ac_try="$ac_compile" 3962case "(($ac_try" in 3963 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3964 *) ac_try_echo=$ac_try;; 3965esac 3966eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3967printf "%s\n" "$ac_try_echo"; } >&5 3968 (eval "$ac_compile") 2>&5 3969 ac_status=$? 3970 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3971 test $ac_status = 0; } 3972then : 3973 for ac_file in conftest.o conftest.obj conftest.*; do 3974 test -f "$ac_file" || continue; 3975 case $ac_file in 3976 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; 3977 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 3978 break;; 3979 esac 3980done 3981else $as_nop 3982 printf "%s\n" "$as_me: failed program was:" >&5 3983sed 's/^/| /' conftest.$ac_ext >&5 3984 3985{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3986printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 3987as_fn_error $? "cannot compute suffix of object files: cannot compile 3988See \`config.log' for more details" "$LINENO" 5; } 3989fi 3990rm -f conftest.$ac_cv_objext conftest.$ac_ext 3991fi 3992{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 3993printf "%s\n" "$ac_cv_objext" >&6; } 3994OBJEXT=$ac_cv_objext 3995ac_objext=$OBJEXT 3996{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 3997printf %s "checking whether the compiler supports GNU C... " >&6; } 3998if test ${ac_cv_c_compiler_gnu+y} 3999then : 4000 printf %s "(cached) " >&6 4001else $as_nop 4002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4003/* end confdefs.h. */ 4004 4005int 4006main (void) 4007{ 4008#ifndef __GNUC__ 4009 choke me 4010#endif 4011 4012 ; 4013 return 0; 4014} 4015_ACEOF 4016if ac_fn_c_try_compile "$LINENO" 4017then : 4018 ac_compiler_gnu=yes 4019else $as_nop 4020 ac_compiler_gnu=no 4021fi 4022rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4023ac_cv_c_compiler_gnu=$ac_compiler_gnu 4024 4025fi 4026{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 4027printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } 4028ac_compiler_gnu=$ac_cv_c_compiler_gnu 4029 4030if test $ac_compiler_gnu = yes; then 4031 GCC=yes 4032else 4033 GCC= 4034fi 4035ac_test_CFLAGS=${CFLAGS+y} 4036ac_save_CFLAGS=$CFLAGS 4037{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 4038printf %s "checking whether $CC accepts -g... " >&6; } 4039if test ${ac_cv_prog_cc_g+y} 4040then : 4041 printf %s "(cached) " >&6 4042else $as_nop 4043 ac_save_c_werror_flag=$ac_c_werror_flag 4044 ac_c_werror_flag=yes 4045 ac_cv_prog_cc_g=no 4046 CFLAGS="-g" 4047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4048/* end confdefs.h. */ 4049 4050int 4051main (void) 4052{ 4053 4054 ; 4055 return 0; 4056} 4057_ACEOF 4058if ac_fn_c_try_compile "$LINENO" 4059then : 4060 ac_cv_prog_cc_g=yes 4061else $as_nop 4062 CFLAGS="" 4063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4064/* end confdefs.h. */ 4065 4066int 4067main (void) 4068{ 4069 4070 ; 4071 return 0; 4072} 4073_ACEOF 4074if ac_fn_c_try_compile "$LINENO" 4075then : 4076 4077else $as_nop 4078 ac_c_werror_flag=$ac_save_c_werror_flag 4079 CFLAGS="-g" 4080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4081/* end confdefs.h. */ 4082 4083int 4084main (void) 4085{ 4086 4087 ; 4088 return 0; 4089} 4090_ACEOF 4091if ac_fn_c_try_compile "$LINENO" 4092then : 4093 ac_cv_prog_cc_g=yes 4094fi 4095rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4096fi 4097rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4098fi 4099rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4100 ac_c_werror_flag=$ac_save_c_werror_flag 4101fi 4102{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 4103printf "%s\n" "$ac_cv_prog_cc_g" >&6; } 4104if test $ac_test_CFLAGS; then 4105 CFLAGS=$ac_save_CFLAGS 4106elif test $ac_cv_prog_cc_g = yes; then 4107 if test "$GCC" = yes; then 4108 CFLAGS="-g -O2" 4109 else 4110 CFLAGS="-g" 4111 fi 4112else 4113 if test "$GCC" = yes; then 4114 CFLAGS="-O2" 4115 else 4116 CFLAGS= 4117 fi 4118fi 4119ac_prog_cc_stdc=no 4120if test x$ac_prog_cc_stdc = xno 4121then : 4122 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 4123printf %s "checking for $CC option to enable C11 features... " >&6; } 4124if test ${ac_cv_prog_cc_c11+y} 4125then : 4126 printf %s "(cached) " >&6 4127else $as_nop 4128 ac_cv_prog_cc_c11=no 4129ac_save_CC=$CC 4130cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4131/* end confdefs.h. */ 4132$ac_c_conftest_c11_program 4133_ACEOF 4134for ac_arg in '' -std=gnu11 4135do 4136 CC="$ac_save_CC $ac_arg" 4137 if ac_fn_c_try_compile "$LINENO" 4138then : 4139 ac_cv_prog_cc_c11=$ac_arg 4140fi 4141rm -f core conftest.err conftest.$ac_objext conftest.beam 4142 test "x$ac_cv_prog_cc_c11" != "xno" && break 4143done 4144rm -f conftest.$ac_ext 4145CC=$ac_save_CC 4146fi 4147 4148if test "x$ac_cv_prog_cc_c11" = xno 4149then : 4150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 4151printf "%s\n" "unsupported" >&6; } 4152else $as_nop 4153 if test "x$ac_cv_prog_cc_c11" = x 4154then : 4155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 4156printf "%s\n" "none needed" >&6; } 4157else $as_nop 4158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 4159printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } 4160 CC="$CC $ac_cv_prog_cc_c11" 4161fi 4162 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 4163 ac_prog_cc_stdc=c11 4164fi 4165fi 4166if test x$ac_prog_cc_stdc = xno 4167then : 4168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 4169printf %s "checking for $CC option to enable C99 features... " >&6; } 4170if test ${ac_cv_prog_cc_c99+y} 4171then : 4172 printf %s "(cached) " >&6 4173else $as_nop 4174 ac_cv_prog_cc_c99=no 4175ac_save_CC=$CC 4176cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4177/* end confdefs.h. */ 4178$ac_c_conftest_c99_program 4179_ACEOF 4180for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= 4181do 4182 CC="$ac_save_CC $ac_arg" 4183 if ac_fn_c_try_compile "$LINENO" 4184then : 4185 ac_cv_prog_cc_c99=$ac_arg 4186fi 4187rm -f core conftest.err conftest.$ac_objext conftest.beam 4188 test "x$ac_cv_prog_cc_c99" != "xno" && break 4189done 4190rm -f conftest.$ac_ext 4191CC=$ac_save_CC 4192fi 4193 4194if test "x$ac_cv_prog_cc_c99" = xno 4195then : 4196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 4197printf "%s\n" "unsupported" >&6; } 4198else $as_nop 4199 if test "x$ac_cv_prog_cc_c99" = x 4200then : 4201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 4202printf "%s\n" "none needed" >&6; } 4203else $as_nop 4204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 4205printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } 4206 CC="$CC $ac_cv_prog_cc_c99" 4207fi 4208 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 4209 ac_prog_cc_stdc=c99 4210fi 4211fi 4212if test x$ac_prog_cc_stdc = xno 4213then : 4214 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 4215printf %s "checking for $CC option to enable C89 features... " >&6; } 4216if test ${ac_cv_prog_cc_c89+y} 4217then : 4218 printf %s "(cached) " >&6 4219else $as_nop 4220 ac_cv_prog_cc_c89=no 4221ac_save_CC=$CC 4222cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4223/* end confdefs.h. */ 4224$ac_c_conftest_c89_program 4225_ACEOF 4226for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 4227do 4228 CC="$ac_save_CC $ac_arg" 4229 if ac_fn_c_try_compile "$LINENO" 4230then : 4231 ac_cv_prog_cc_c89=$ac_arg 4232fi 4233rm -f core conftest.err conftest.$ac_objext conftest.beam 4234 test "x$ac_cv_prog_cc_c89" != "xno" && break 4235done 4236rm -f conftest.$ac_ext 4237CC=$ac_save_CC 4238fi 4239 4240if test "x$ac_cv_prog_cc_c89" = xno 4241then : 4242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 4243printf "%s\n" "unsupported" >&6; } 4244else $as_nop 4245 if test "x$ac_cv_prog_cc_c89" = x 4246then : 4247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 4248printf "%s\n" "none needed" >&6; } 4249else $as_nop 4250 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 4251printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } 4252 CC="$CC $ac_cv_prog_cc_c89" 4253fi 4254 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 4255 ac_prog_cc_stdc=c89 4256fi 4257fi 4258 4259ac_ext=c 4260ac_cpp='$CPP $CPPFLAGS' 4261ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 4262ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 4263ac_compiler_gnu=$ac_cv_c_compiler_gnu 4264 4265 4266if test "$ac_cv_prog_cc_c99" = "no"; then 4267 as_fn_error $? "The C compiler does not support C99" "$LINENO" 5 4268fi 4269 4270# 4271# Try to arrange for large file support. 4272# 4273 4274# Check whether --enable-largefile was given. 4275if test ${enable_largefile+y} 4276then : 4277 enableval=$enable_largefile; 4278fi 4279 4280if test "$enable_largefile" != no; then 4281 4282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 4283printf %s "checking for special C compiler options needed for large files... " >&6; } 4284if test ${ac_cv_sys_largefile_CC+y} 4285then : 4286 printf %s "(cached) " >&6 4287else $as_nop 4288 ac_cv_sys_largefile_CC=no 4289 if test "$GCC" != yes; then 4290 ac_save_CC=$CC 4291 while :; do 4292 # IRIX 6.2 and later do not support large files by default, 4293 # so use the C compiler's -n32 option if that helps. 4294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4295/* end confdefs.h. */ 4296#include <sys/types.h> 4297 /* Check that off_t can represent 2**63 - 1 correctly. 4298 We can't simply define LARGE_OFF_T to be 9223372036854775807, 4299 since some C++ compilers masquerading as C compilers 4300 incorrectly reject 9223372036854775807. */ 4301#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) 4302 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 4303 && LARGE_OFF_T % 2147483647 == 1) 4304 ? 1 : -1]; 4305int 4306main (void) 4307{ 4308 4309 ; 4310 return 0; 4311} 4312_ACEOF 4313 if ac_fn_c_try_compile "$LINENO" 4314then : 4315 break 4316fi 4317rm -f core conftest.err conftest.$ac_objext conftest.beam 4318 CC="$CC -n32" 4319 if ac_fn_c_try_compile "$LINENO" 4320then : 4321 ac_cv_sys_largefile_CC=' -n32'; break 4322fi 4323rm -f core conftest.err conftest.$ac_objext conftest.beam 4324 break 4325 done 4326 CC=$ac_save_CC 4327 rm -f conftest.$ac_ext 4328 fi 4329fi 4330{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 4331printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; } 4332 if test "$ac_cv_sys_largefile_CC" != no; then 4333 CC=$CC$ac_cv_sys_largefile_CC 4334 fi 4335 4336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 4337printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } 4338if test ${ac_cv_sys_file_offset_bits+y} 4339then : 4340 printf %s "(cached) " >&6 4341else $as_nop 4342 while :; do 4343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4344/* end confdefs.h. */ 4345#include <sys/types.h> 4346 /* Check that off_t can represent 2**63 - 1 correctly. 4347 We can't simply define LARGE_OFF_T to be 9223372036854775807, 4348 since some C++ compilers masquerading as C compilers 4349 incorrectly reject 9223372036854775807. */ 4350#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) 4351 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 4352 && LARGE_OFF_T % 2147483647 == 1) 4353 ? 1 : -1]; 4354int 4355main (void) 4356{ 4357 4358 ; 4359 return 0; 4360} 4361_ACEOF 4362if ac_fn_c_try_compile "$LINENO" 4363then : 4364 ac_cv_sys_file_offset_bits=no; break 4365fi 4366rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4368/* end confdefs.h. */ 4369#define _FILE_OFFSET_BITS 64 4370#include <sys/types.h> 4371 /* Check that off_t can represent 2**63 - 1 correctly. 4372 We can't simply define LARGE_OFF_T to be 9223372036854775807, 4373 since some C++ compilers masquerading as C compilers 4374 incorrectly reject 9223372036854775807. */ 4375#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) 4376 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 4377 && LARGE_OFF_T % 2147483647 == 1) 4378 ? 1 : -1]; 4379int 4380main (void) 4381{ 4382 4383 ; 4384 return 0; 4385} 4386_ACEOF 4387if ac_fn_c_try_compile "$LINENO" 4388then : 4389 ac_cv_sys_file_offset_bits=64; break 4390fi 4391rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4392 ac_cv_sys_file_offset_bits=unknown 4393 break 4394done 4395fi 4396{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 4397printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; } 4398case $ac_cv_sys_file_offset_bits in #( 4399 no | unknown) ;; 4400 *) 4401printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h 4402;; 4403esac 4404rm -rf conftest* 4405 if test $ac_cv_sys_file_offset_bits = unknown; then 4406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 4407printf %s "checking for _LARGE_FILES value needed for large files... " >&6; } 4408if test ${ac_cv_sys_large_files+y} 4409then : 4410 printf %s "(cached) " >&6 4411else $as_nop 4412 while :; do 4413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4414/* end confdefs.h. */ 4415#include <sys/types.h> 4416 /* Check that off_t can represent 2**63 - 1 correctly. 4417 We can't simply define LARGE_OFF_T to be 9223372036854775807, 4418 since some C++ compilers masquerading as C compilers 4419 incorrectly reject 9223372036854775807. */ 4420#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) 4421 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 4422 && LARGE_OFF_T % 2147483647 == 1) 4423 ? 1 : -1]; 4424int 4425main (void) 4426{ 4427 4428 ; 4429 return 0; 4430} 4431_ACEOF 4432if ac_fn_c_try_compile "$LINENO" 4433then : 4434 ac_cv_sys_large_files=no; break 4435fi 4436rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4438/* end confdefs.h. */ 4439#define _LARGE_FILES 1 4440#include <sys/types.h> 4441 /* Check that off_t can represent 2**63 - 1 correctly. 4442 We can't simply define LARGE_OFF_T to be 9223372036854775807, 4443 since some C++ compilers masquerading as C compilers 4444 incorrectly reject 9223372036854775807. */ 4445#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) 4446 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 4447 && LARGE_OFF_T % 2147483647 == 1) 4448 ? 1 : -1]; 4449int 4450main (void) 4451{ 4452 4453 ; 4454 return 0; 4455} 4456_ACEOF 4457if ac_fn_c_try_compile "$LINENO" 4458then : 4459 ac_cv_sys_large_files=1; break 4460fi 4461rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4462 ac_cv_sys_large_files=unknown 4463 break 4464done 4465fi 4466{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 4467printf "%s\n" "$ac_cv_sys_large_files" >&6; } 4468case $ac_cv_sys_large_files in #( 4469 no | unknown) ;; 4470 *) 4471printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h 4472;; 4473esac 4474rm -rf conftest* 4475 fi 4476fi 4477 4478{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 4479printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } 4480if test ${ac_cv_sys_largefile_source+y} 4481then : 4482 printf %s "(cached) " >&6 4483else $as_nop 4484 while :; do 4485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4486/* end confdefs.h. */ 4487#include <sys/types.h> /* for off_t */ 4488 #include <stdio.h> 4489int 4490main (void) 4491{ 4492int (*fp) (FILE *, off_t, int) = fseeko; 4493 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); 4494 ; 4495 return 0; 4496} 4497_ACEOF 4498if ac_fn_c_try_link "$LINENO" 4499then : 4500 ac_cv_sys_largefile_source=no; break 4501fi 4502rm -f core conftest.err conftest.$ac_objext conftest.beam \ 4503 conftest$ac_exeext conftest.$ac_ext 4504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4505/* end confdefs.h. */ 4506#define _LARGEFILE_SOURCE 1 4507#include <sys/types.h> /* for off_t */ 4508 #include <stdio.h> 4509int 4510main (void) 4511{ 4512int (*fp) (FILE *, off_t, int) = fseeko; 4513 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); 4514 ; 4515 return 0; 4516} 4517_ACEOF 4518if ac_fn_c_try_link "$LINENO" 4519then : 4520 ac_cv_sys_largefile_source=1; break 4521fi 4522rm -f core conftest.err conftest.$ac_objext conftest.beam \ 4523 conftest$ac_exeext conftest.$ac_ext 4524 ac_cv_sys_largefile_source=unknown 4525 break 4526done 4527fi 4528{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 4529printf "%s\n" "$ac_cv_sys_largefile_source" >&6; } 4530case $ac_cv_sys_largefile_source in #( 4531 no | unknown) ;; 4532 *) 4533printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h 4534;; 4535esac 4536rm -rf conftest* 4537 4538# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug 4539# in glibc 2.1.3, but that breaks too many other things. 4540# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. 4541if test $ac_cv_sys_largefile_source != unknown; then 4542 4543printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h 4544 4545fi 4546 4547 4548# 4549# Get the size of a void *, to determine whether this is a 32-bit 4550# or 64-bit build. 4551# 4552ac_header= ac_cache= 4553for ac_item in $ac_header_c_list 4554do 4555 if test $ac_cache; then 4556 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" 4557 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then 4558 printf "%s\n" "#define $ac_item 1" >> confdefs.h 4559 fi 4560 ac_header= ac_cache= 4561 elif test $ac_header; then 4562 ac_cache=$ac_item 4563 else 4564 ac_header=$ac_item 4565 fi 4566done 4567 4568 4569 4570 4571 4572 4573 4574 4575if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes 4576then : 4577 4578printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h 4579 4580fi 4581# The cast to long int works around a bug in the HP C Compiler 4582# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 4583# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 4584# This bug is HP SR number 8606223364. 4585{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 4586printf %s "checking size of void *... " >&6; } 4587if test ${ac_cv_sizeof_void_p+y} 4588then : 4589 printf %s "(cached) " >&6 4590else $as_nop 4591 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" 4592then : 4593 4594else $as_nop 4595 if test "$ac_cv_type_void_p" = yes; then 4596 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4597printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 4598as_fn_error 77 "cannot compute sizeof (void *) 4599See \`config.log' for more details" "$LINENO" 5; } 4600 else 4601 ac_cv_sizeof_void_p=0 4602 fi 4603fi 4604 4605fi 4606{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 4607printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } 4608 4609 4610 4611printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h 4612 4613 4614ac_lbl_c_sizeof_void_p="$ac_cv_sizeof_void_p" 4615 4616# 4617# Get the size of a time_t, to know whether it's 32-bit or 64-bit. 4618# 4619# The cast to long int works around a bug in the HP C Compiler 4620# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 4621# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 4622# This bug is HP SR number 8606223364. 4623{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 4624printf %s "checking size of time_t... " >&6; } 4625if test ${ac_cv_sizeof_time_t+y} 4626then : 4627 printf %s "(cached) " >&6 4628else $as_nop 4629 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "#include <time.h> 4630" 4631then : 4632 4633else $as_nop 4634 if test "$ac_cv_type_time_t" = yes; then 4635 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4636printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 4637as_fn_error 77 "cannot compute sizeof (time_t) 4638See \`config.log' for more details" "$LINENO" 5; } 4639 else 4640 ac_cv_sizeof_time_t=0 4641 fi 4642fi 4643 4644fi 4645{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 4646printf "%s\n" "$ac_cv_sizeof_time_t" >&6; } 4647 4648 4649 4650printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h 4651 4652 4653 4654 4655 4656 4657 4658 if test "$GCC" = yes ; then 4659 # 4660 # -Werror forces warnings to be errors. 4661 # 4662 ac_lbl_cc_force_warning_errors=-Werror 4663 4664 # 4665 # Try to have the compiler default to hiding symbols, 4666 # so that only symbols explicitly exported with 4667 # PCAP_API will be visible outside (shared) libraries. 4668 # 4669 4670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5 4671printf %s "checking whether the compiler supports the -fvisibility=hidden option... " >&6; } 4672 save_CFLAGS="$CFLAGS" 4673 CFLAGS="$CFLAGS -fvisibility=hidden" 4674 # 4675 # XXX - yes, this depends on the way AC_LANG_WERROR works, 4676 # but no mechanism is provided to turn AC_LANG_WERROR on 4677 # *and then turn it back off*, so that we *only* do it when 4678 # testing compiler options - 15 years after somebody asked 4679 # for it: 4680 # 4681 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 4682 # 4683 save_ac_c_werror_flag="$ac_c_werror_flag" 4684 ac_c_werror_flag=yes 4685 # 4686 # We use AC_LANG_SOURCE() so that we can control the complete 4687 # content of the program being compiled. We do not, for example, 4688 # want the default "int main()" that AC_LANG_PROGRAM() generates, 4689 # as it will generate a warning with -Wold-style-definition, meaning 4690 # that we would treat it as not working, as the test will fail if 4691 # *any* error output, including a warning due to the flag we're 4692 # testing, is generated; see 4693 # 4694 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 4695 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 4696 # 4697 # This may, as per those two messages, be fixed in autoconf 2.70, 4698 # but we only require 2.69 or newer for now. 4699 # 4700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4701/* end confdefs.h. */ 4702int main(void) { return 0; } 4703_ACEOF 4704if ac_fn_c_try_compile "$LINENO" 4705then : 4706 4707 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4708printf "%s\n" "yes" >&6; } 4709 can_add_to_cflags=yes 4710 # 4711 # The compile supports this; do we have some C code for 4712 # which the warning should *not* appear? 4713 # We test the fourth argument because the third argument 4714 # could contain quotes, breaking the test. 4715 # 4716 if test "x" != "x" 4717 then 4718 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 4719 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5 4720printf %s "checking whether -fvisibility=hidden ... " >&6; } 4721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4722/* end confdefs.h. */ 4723 4724_ACEOF 4725if ac_fn_c_try_compile "$LINENO" 4726then : 4727 4728 # 4729 # Not a problem. 4730 # 4731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4732printf "%s\n" "no" >&6; } 4733 4734else $as_nop 4735 4736 # 4737 # A problem. 4738 # 4739 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4740printf "%s\n" "yes" >&6; } 4741 can_add_to_cflags=no 4742 4743fi 4744rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4745 fi 4746 CFLAGS="$save_CFLAGS" 4747 if test x"$can_add_to_cflags" = "xyes" 4748 then 4749 V_CCOPT="$V_CCOPT -fvisibility=hidden" 4750 fi 4751 4752else $as_nop 4753 4754 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4755printf "%s\n" "no" >&6; } 4756 CFLAGS="$save_CFLAGS" 4757 4758fi 4759rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4760 ac_c_werror_flag="$save_ac_c_werror_flag" 4761 4762 else 4763 V_INCLS="$V_INCLS -I/usr/local/include" 4764 LDFLAGS="$LDFLAGS -L/usr/local/lib" 4765 4766 case "$host_os" in 4767 4768 darwin*) 4769 # 4770 # This is assumed either to be GCC or clang, both 4771 # of which use -Werror to force warnings to be errors. 4772 # 4773 ac_lbl_cc_force_warning_errors=-Werror 4774 4775 # 4776 # Try to have the compiler default to hiding symbols, 4777 # so that only symbols explicitly exported with 4778 # PCAP_API will be visible outside (shared) libraries. 4779 # 4780 4781 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5 4782printf %s "checking whether the compiler supports the -fvisibility=hidden option... " >&6; } 4783 save_CFLAGS="$CFLAGS" 4784 CFLAGS="$CFLAGS -fvisibility=hidden" 4785 # 4786 # XXX - yes, this depends on the way AC_LANG_WERROR works, 4787 # but no mechanism is provided to turn AC_LANG_WERROR on 4788 # *and then turn it back off*, so that we *only* do it when 4789 # testing compiler options - 15 years after somebody asked 4790 # for it: 4791 # 4792 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 4793 # 4794 save_ac_c_werror_flag="$ac_c_werror_flag" 4795 ac_c_werror_flag=yes 4796 # 4797 # We use AC_LANG_SOURCE() so that we can control the complete 4798 # content of the program being compiled. We do not, for example, 4799 # want the default "int main()" that AC_LANG_PROGRAM() generates, 4800 # as it will generate a warning with -Wold-style-definition, meaning 4801 # that we would treat it as not working, as the test will fail if 4802 # *any* error output, including a warning due to the flag we're 4803 # testing, is generated; see 4804 # 4805 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 4806 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 4807 # 4808 # This may, as per those two messages, be fixed in autoconf 2.70, 4809 # but we only require 2.69 or newer for now. 4810 # 4811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4812/* end confdefs.h. */ 4813int main(void) { return 0; } 4814_ACEOF 4815if ac_fn_c_try_compile "$LINENO" 4816then : 4817 4818 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4819printf "%s\n" "yes" >&6; } 4820 can_add_to_cflags=yes 4821 # 4822 # The compile supports this; do we have some C code for 4823 # which the warning should *not* appear? 4824 # We test the fourth argument because the third argument 4825 # could contain quotes, breaking the test. 4826 # 4827 if test "x" != "x" 4828 then 4829 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 4830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5 4831printf %s "checking whether -fvisibility=hidden ... " >&6; } 4832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4833/* end confdefs.h. */ 4834 4835_ACEOF 4836if ac_fn_c_try_compile "$LINENO" 4837then : 4838 4839 # 4840 # Not a problem. 4841 # 4842 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4843printf "%s\n" "no" >&6; } 4844 4845else $as_nop 4846 4847 # 4848 # A problem. 4849 # 4850 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4851printf "%s\n" "yes" >&6; } 4852 can_add_to_cflags=no 4853 4854fi 4855rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4856 fi 4857 CFLAGS="$save_CFLAGS" 4858 if test x"$can_add_to_cflags" = "xyes" 4859 then 4860 V_CCOPT="$V_CCOPT -fvisibility=hidden" 4861 fi 4862 4863else $as_nop 4864 4865 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4866printf "%s\n" "no" >&6; } 4867 CFLAGS="$save_CFLAGS" 4868 4869fi 4870rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4871 ac_c_werror_flag="$save_ac_c_werror_flag" 4872 4873 ;; 4874 4875 hpux*) 4876 # 4877 # HP C, which is what we presume we're using, doesn't 4878 # exit with a non-zero exit status if we hand it an 4879 # invalid -W flag, can't be forced to do so even with 4880 # +We, and doesn't handle GCC-style -W flags, so we 4881 # don't want to try using GCC-style -W flags. 4882 # 4883 ac_lbl_cc_dont_try_gcc_dashW=yes 4884 ;; 4885 4886 irix*) 4887 # 4888 # MIPS C, which is what we presume we're using, doesn't 4889 # necessarily exit with a non-zero exit status if we 4890 # hand it an invalid -W flag, can't be forced to do 4891 # so, and doesn't handle GCC-style -W flags, so we 4892 # don't want to try using GCC-style -W flags. 4893 # 4894 ac_lbl_cc_dont_try_gcc_dashW=yes 4895 # 4896 # It also, apparently, defaults to "char" being 4897 # unsigned, unlike most other C implementations; 4898 # I suppose we could say "signed char" whenever 4899 # we want to guarantee a signed "char", but let's 4900 # just force signed chars. 4901 # 4902 # -xansi is normally the default, but the 4903 # configure script was setting it; perhaps -cckr 4904 # was the default in the Old Days. (Then again, 4905 # that would probably be for backwards compatibility 4906 # in the days when ANSI C was Shiny and New, i.e. 4907 # 1989 and the early '90's, so maybe we can just 4908 # drop support for those compilers.) 4909 # 4910 # -g is equivalent to -g2, which turns off 4911 # optimization; we choose -g3, which generates 4912 # debugging information but doesn't turn off 4913 # optimization (even if the optimization would 4914 # cause inaccuracies in debugging). 4915 # 4916 V_CCOPT="$V_CCOPT -xansi -signed -g3" 4917 ;; 4918 4919 osf*) 4920 # 4921 # Presumed to be DEC OSF/1, Digital UNIX, or 4922 # Tru64 UNIX. 4923 # 4924 # The DEC C compiler, which is what we presume we're 4925 # using, doesn't exit with a non-zero exit status if we 4926 # hand it an invalid -W flag, can't be forced to do 4927 # so, and doesn't handle GCC-style -W flags, so we 4928 # don't want to try using GCC-style -W flags. 4929 # 4930 ac_lbl_cc_dont_try_gcc_dashW=yes 4931 # 4932 # -g is equivalent to -g2, which turns off 4933 # optimization; we choose -g3, which generates 4934 # debugging information but doesn't turn off 4935 # optimization (even if the optimization would 4936 # cause inaccuracies in debugging). 4937 # 4938 V_CCOPT="$V_CCOPT -g3" 4939 ;; 4940 4941 solaris*) 4942 # 4943 # Assumed to be Sun C, which requires -errwarn to force 4944 # warnings to be treated as errors. 4945 # 4946 ac_lbl_cc_force_warning_errors=-errwarn 4947 4948 # 4949 # Try to have the compiler default to hiding symbols, 4950 # so that only symbols explicitly exported with 4951 # PCAP_API will be visible outside (shared) libraries. 4952 # 4953 4954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -xldscope=hidden option" >&5 4955printf %s "checking whether the compiler supports the -xldscope=hidden option... " >&6; } 4956 save_CFLAGS="$CFLAGS" 4957 CFLAGS="$CFLAGS -xldscope=hidden" 4958 # 4959 # XXX - yes, this depends on the way AC_LANG_WERROR works, 4960 # but no mechanism is provided to turn AC_LANG_WERROR on 4961 # *and then turn it back off*, so that we *only* do it when 4962 # testing compiler options - 15 years after somebody asked 4963 # for it: 4964 # 4965 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 4966 # 4967 save_ac_c_werror_flag="$ac_c_werror_flag" 4968 ac_c_werror_flag=yes 4969 # 4970 # We use AC_LANG_SOURCE() so that we can control the complete 4971 # content of the program being compiled. We do not, for example, 4972 # want the default "int main()" that AC_LANG_PROGRAM() generates, 4973 # as it will generate a warning with -Wold-style-definition, meaning 4974 # that we would treat it as not working, as the test will fail if 4975 # *any* error output, including a warning due to the flag we're 4976 # testing, is generated; see 4977 # 4978 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 4979 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 4980 # 4981 # This may, as per those two messages, be fixed in autoconf 2.70, 4982 # but we only require 2.69 or newer for now. 4983 # 4984 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4985/* end confdefs.h. */ 4986int main(void) { return 0; } 4987_ACEOF 4988if ac_fn_c_try_compile "$LINENO" 4989then : 4990 4991 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4992printf "%s\n" "yes" >&6; } 4993 can_add_to_cflags=yes 4994 # 4995 # The compile supports this; do we have some C code for 4996 # which the warning should *not* appear? 4997 # We test the fourth argument because the third argument 4998 # could contain quotes, breaking the test. 4999 # 5000 if test "x" != "x" 5001 then 5002 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 5003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -xldscope=hidden " >&5 5004printf %s "checking whether -xldscope=hidden ... " >&6; } 5005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5006/* end confdefs.h. */ 5007 5008_ACEOF 5009if ac_fn_c_try_compile "$LINENO" 5010then : 5011 5012 # 5013 # Not a problem. 5014 # 5015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 5016printf "%s\n" "no" >&6; } 5017 5018else $as_nop 5019 5020 # 5021 # A problem. 5022 # 5023 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5024printf "%s\n" "yes" >&6; } 5025 can_add_to_cflags=no 5026 5027fi 5028rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 5029 fi 5030 CFLAGS="$save_CFLAGS" 5031 if test x"$can_add_to_cflags" = "xyes" 5032 then 5033 V_CCOPT="$V_CCOPT -xldscope=hidden" 5034 fi 5035 5036else $as_nop 5037 5038 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 5039printf "%s\n" "no" >&6; } 5040 CFLAGS="$save_CFLAGS" 5041 5042fi 5043rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 5044 ac_c_werror_flag="$save_ac_c_werror_flag" 5045 5046 ;; 5047 5048 ultrix*) 5049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5 5050printf %s "checking that Ultrix $CC hacks const in prototypes... " >&6; } 5051 if test ${ac_cv_lbl_cc_const_proto+y} 5052then : 5053 printf %s "(cached) " >&6 5054else $as_nop 5055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5056/* end confdefs.h. */ 5057#include <sys/types.h> 5058int 5059main (void) 5060{ 5061struct a { int b; }; 5062 void c(const struct a *) 5063 ; 5064 return 0; 5065} 5066_ACEOF 5067if ac_fn_c_try_compile "$LINENO" 5068then : 5069 ac_cv_lbl_cc_const_proto=yes 5070else $as_nop 5071 ac_cv_lbl_cc_const_proto=no 5072fi 5073rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 5074fi 5075 5076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5 5077printf "%s\n" "$ac_cv_lbl_cc_const_proto" >&6; } 5078 if test $ac_cv_lbl_cc_const_proto = no ; then 5079 5080printf "%s\n" "#define const /**/" >>confdefs.h 5081 5082 fi 5083 ;; 5084 esac 5085 V_CCOPT="$V_CCOPT -O" 5086 fi 5087 5088 5089 if test "$GCC" = yes ; then 5090 # 5091 # On platforms where we build a shared library: 5092 # 5093 # add options to generate position-independent code, 5094 # if necessary (it's the default in AIX and Darwin/macOS); 5095 # 5096 # define option to set the soname of the shared library, 5097 # if the OS supports that; 5098 # 5099 # add options to specify, at link time, a directory to 5100 # add to the run-time search path, if that's necessary. 5101 # 5102 V_SHLIB_CMD="\$(CC)" 5103 V_SHLIB_OPT="-shared" 5104 case "$host_os" in 5105 5106 aix*) 5107 ;; 5108 5109 freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*|haiku*|midipix*) 5110 # 5111 # Platforms where the C compiler is GCC or accepts 5112 # compatible command-line arguments, and the linker 5113 # is the GNU linker or accepts compatible command-line 5114 # arguments. 5115 # 5116 # Some instruction sets require -fPIC on some 5117 # operating systems. Check for them. If you 5118 # have a combination that requires it, add it 5119 # here. 5120 # 5121 PIC_OPT=-fpic 5122 case "$host_cpu" in 5123 5124 sparc64*) 5125 case "$host_os" in 5126 5127 freebsd*|openbsd*|linux*) 5128 PIC_OPT=-fPIC 5129 ;; 5130 esac 5131 ;; 5132 esac 5133 V_SHLIB_CCOPT="$V_SHLIB_CCOPT $PIC_OPT" 5134 V_SONAME_OPT="-Wl,-soname," 5135 ;; 5136 5137 hpux*) 5138 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic" 5139 # 5140 # XXX - this assumes GCC is using the HP linker, 5141 # rather than the GNU linker, and that the "+h" 5142 # option is used on all HP-UX platforms, both .sl 5143 # and .so. 5144 # 5145 V_SONAME_OPT="-Wl,+h," 5146 # 5147 # By default, directories specified with -L 5148 # are added to the run-time search path, so 5149 # we don't add them in pcap-config. 5150 # 5151 ;; 5152 5153 solaris*) 5154 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic" 5155 # 5156 # Sun/Oracle's C compiler, GCC, and GCC-compatible 5157 # compilers support -Wl,{comma-separated list of options}, 5158 # and we use the C compiler, not ld, for all linking, 5159 # including linking to produce a shared library. 5160 # 5161 V_SONAME_OPT="-Wl,-h," 5162 ;; 5163 esac 5164 else 5165 # 5166 # Set the appropriate compiler flags and, on platforms 5167 # where we build a shared library: 5168 # 5169 # add options to generate position-independent code, 5170 # if necessary (it's the default in Darwin/macOS); 5171 # 5172 # if we generate ".so" shared libraries, define the 5173 # appropriate options for building the shared library; 5174 # 5175 # add options to specify, at link time, a directory to 5176 # add to the run-time search path, if that's necessary. 5177 # 5178 # Note: spaces after V_SONAME_OPT are significant; on 5179 # some platforms the soname is passed with a GCC-like 5180 # "-Wl,-soname,{soname}" option, with the soname part 5181 # of the option, while on other platforms the C compiler 5182 # driver takes it as a regular option with the soname 5183 # following the option. 5184 # 5185 case "$host_os" in 5186 5187 aix*) 5188 V_SHLIB_CMD="\$(CC)" 5189 V_SHLIB_OPT="-G -bnoentry -bexpall" 5190 ;; 5191 5192 freebsd*|netbsd*|openbsd*|dragonfly*|linux*) 5193 # 5194 # Platforms where the C compiler is GCC or accepts 5195 # compatible command-line arguments, and the linker 5196 # is the GNU linker or accepts compatible command-line 5197 # arguments. 5198 # 5199 # XXX - does 64-bit SPARC require -fPIC? 5200 # 5201 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic" 5202 V_SHLIB_CMD="\$(CC)" 5203 V_SHLIB_OPT="-shared" 5204 V_SONAME_OPT="-Wl,-soname," 5205 ;; 5206 5207 hpux*) 5208 V_SHLIB_CCOPT="$V_SHLIB_CCOPT +z" 5209 V_SHLIB_CMD="\$(LD)" 5210 V_SHLIB_OPT="-b" 5211 V_SONAME_OPT="+h " 5212 # 5213 # By default, directories specified with -L 5214 # are added to the run-time search path, so 5215 # we don't add them in pcap-config. 5216 # 5217 ;; 5218 5219 osf*) 5220 # 5221 # Presumed to be DEC OSF/1, Digital UNIX, or 5222 # Tru64 UNIX. 5223 # 5224 V_SHLIB_CMD="\$(CC)" 5225 V_SHLIB_OPT="-shared" 5226 V_SONAME_OPT="-soname " 5227 ;; 5228 5229 solaris*) 5230 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -Kpic" 5231 V_SHLIB_CMD="\$(CC)" 5232 V_SHLIB_OPT="-G" 5233 # 5234 # Sun/Oracle's C compiler, GCC, and GCC-compatible 5235 # compilers support -Wl,{comma-separated list of options}, 5236 # and we use the C compiler, not ld, for all linking, 5237 # including linking to produce a shared library. 5238 # 5239 V_SONAME_OPT="-Wl,-h," 5240 ;; 5241 esac 5242 fi 5243 5244{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 5245printf %s "checking for inline... " >&6; } 5246 save_CFLAGS="$CFLAGS" 5247 CFLAGS="$V_CCOPT" 5248 if test ${ac_cv_lbl_inline+y} 5249then : 5250 printf %s "(cached) " >&6 5251else $as_nop 5252 5253 ac_cv_lbl_inline="" 5254 ac_lbl_cc_inline=no 5255 for ac_lbl_inline in inline __inline__ __inline 5256 do 5257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5258/* end confdefs.h. */ 5259#define inline $ac_lbl_inline 5260 static inline struct iltest *foo(void); 5261 struct iltest { 5262 int iltest1; 5263 int iltest2; 5264 }; 5265 5266 static inline struct iltest * 5267 foo() 5268 { 5269 static struct iltest xxx; 5270 5271 return &xxx; 5272 } 5273int 5274main (void) 5275{ 5276 5277 ; 5278 return 0; 5279} 5280_ACEOF 5281if ac_fn_c_try_compile "$LINENO" 5282then : 5283 ac_lbl_cc_inline=yes 5284fi 5285rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 5286 if test "$ac_lbl_cc_inline" = yes ; then 5287 break; 5288 fi 5289 done 5290 if test "$ac_lbl_cc_inline" = yes ; then 5291 ac_cv_lbl_inline=$ac_lbl_inline 5292 fi 5293fi 5294 5295 CFLAGS="$save_CFLAGS" 5296 if test ! -z "$ac_cv_lbl_inline" ; then 5297 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5 5298printf "%s\n" "$ac_cv_lbl_inline" >&6; } 5299 else 5300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 5301printf "%s\n" "no" >&6; } 5302 fi 5303 5304printf "%s\n" "#define inline $ac_cv_lbl_inline" >>confdefs.h 5305 5306 5307 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __atomic_load_n" >&5 5308printf %s "checking for __atomic_load_n... " >&6; } 5309 if test ${ac_cv_have___atomic_load_n+y} 5310then : 5311 printf %s "(cached) " >&6 5312else $as_nop 5313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5314/* end confdefs.h. */ 5315 5316int 5317main (void) 5318{ 5319 5320 int i = 17; 5321 int j; 5322 j = __atomic_load_n(&i, __ATOMIC_RELAXED); 5323 5324 ; 5325 return 0; 5326} 5327_ACEOF 5328if ac_fn_c_try_link "$LINENO" 5329then : 5330 ac_have___atomic_load_n=yes 5331else $as_nop 5332 ac_have___atomic_load_n=no 5333fi 5334rm -f core conftest.err conftest.$ac_objext conftest.beam \ 5335 conftest$ac_exeext conftest.$ac_ext 5336fi 5337 5338 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_have___atomic_load_n" >&5 5339printf "%s\n" "$ac_have___atomic_load_n" >&6; } 5340 if test $ac_have___atomic_load_n = yes ; then 5341 5342printf "%s\n" "#define HAVE___ATOMIC_LOAD_N 1" >>confdefs.h 5343 5344 fi 5345 5346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __atomic_store_n" >&5 5347printf %s "checking for __atomic_store_n... " >&6; } 5348 if test ${ac_cv_have___atomic_store_n+y} 5349then : 5350 printf %s "(cached) " >&6 5351else $as_nop 5352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5353/* end confdefs.h. */ 5354 5355int 5356main (void) 5357{ 5358 5359 int i; 5360 __atomic_store_n(&i, 17, __ATOMIC_RELAXED); 5361 5362 ; 5363 return 0; 5364} 5365_ACEOF 5366if ac_fn_c_try_link "$LINENO" 5367then : 5368 ac_have___atomic_store_n=yes 5369else $as_nop 5370 ac_have___atomic_store_n=no 5371fi 5372rm -f core conftest.err conftest.$ac_objext conftest.beam \ 5373 conftest$ac_exeext conftest.$ac_ext 5374fi 5375 5376 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_have___atomic_store_n" >&5 5377printf "%s\n" "$ac_have___atomic_store_n" >&6; } 5378 if test $ac_have___atomic_store_n = yes ; then 5379 5380printf "%s\n" "#define HAVE___ATOMIC_STORE_N 1" >>confdefs.h 5381 5382 fi 5383 5384ac_fn_c_check_header_compile "$LINENO" "sys/ioccom.h" "ac_cv_header_sys_ioccom_h" "$ac_includes_default" 5385if test "x$ac_cv_header_sys_ioccom_h" = xyes 5386then : 5387 printf "%s\n" "#define HAVE_SYS_IOCCOM_H 1" >>confdefs.h 5388 5389fi 5390ac_fn_c_check_header_compile "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default" 5391if test "x$ac_cv_header_sys_sockio_h" = xyes 5392then : 5393 printf "%s\n" "#define HAVE_SYS_SOCKIO_H 1" >>confdefs.h 5394 5395fi 5396 5397ac_fn_c_check_header_compile "$LINENO" "netpacket/packet.h" "ac_cv_header_netpacket_packet_h" "$ac_includes_default" 5398if test "x$ac_cv_header_netpacket_packet_h" = xyes 5399then : 5400 printf "%s\n" "#define HAVE_NETPACKET_PACKET_H 1" >>confdefs.h 5401 5402fi 5403 5404 5405# 5406# Check whether the platform for which we're compiling requires extra 5407# defines and libraries. If so, add them to CFLAGS and LIBS, as we want 5408# all subsequent tests to be done with those defines and libraries. 5409# 5410case "$host_os" in 5411haiku*) 5412 # 5413 # Haiku needs _BSD_SOURCE for the _IO* macros because it doesn't 5414 # use them. 5415 # 5416 CFLAGS="$CFLAGS -D_BSD_SOURCE" 5417 # 5418 # Haiku has getpass in libbsd. 5419 # 5420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpass in -lbsd" >&5 5421printf %s "checking for getpass in -lbsd... " >&6; } 5422if test ${ac_cv_lib_bsd_getpass+y} 5423then : 5424 printf %s "(cached) " >&6 5425else $as_nop 5426 ac_check_lib_save_LIBS=$LIBS 5427LIBS="-lbsd $LIBS" 5428cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5429/* end confdefs.h. */ 5430 5431/* Override any GCC internal prototype to avoid an error. 5432 Use char because int might match the return type of a GCC 5433 builtin and then its argument prototype would still apply. */ 5434char getpass (); 5435int 5436main (void) 5437{ 5438return getpass (); 5439 ; 5440 return 0; 5441} 5442_ACEOF 5443if ac_fn_c_try_link "$LINENO" 5444then : 5445 ac_cv_lib_bsd_getpass=yes 5446else $as_nop 5447 ac_cv_lib_bsd_getpass=no 5448fi 5449rm -f core conftest.err conftest.$ac_objext conftest.beam \ 5450 conftest$ac_exeext conftest.$ac_ext 5451LIBS=$ac_check_lib_save_LIBS 5452fi 5453{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_getpass" >&5 5454printf "%s\n" "$ac_cv_lib_bsd_getpass" >&6; } 5455if test "x$ac_cv_lib_bsd_getpass" = xyes 5456then : 5457 printf "%s\n" "#define HAVE_LIBBSD 1" >>confdefs.h 5458 5459 LIBS="-lbsd $LIBS" 5460 5461fi 5462 5463 ;; 5464esac 5465 5466 5467 save_CFLAGS="$CFLAGS" 5468 save_LIBS="$LIBS" 5469 save_LDFLAGS="$LDFLAGS" 5470 5471if test "$GCC" = yes ; then 5472 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ANSI ioctl definitions" >&5 5473printf %s "checking for ANSI ioctl definitions... " >&6; } 5474 if test ${ac_cv_lbl_gcc_fixincludes+y} 5475then : 5476 printf %s "(cached) " >&6 5477else $as_nop 5478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5479/* end confdefs.h. */ 5480/* 5481 * This generates a "duplicate case value" when fixincludes 5482 * has not be run. 5483 */ 5484# include <sys/types.h> 5485# include <sys/time.h> 5486# include <sys/ioctl.h> 5487# ifdef HAVE_SYS_IOCCOM_H 5488# include <sys/ioccom.h> 5489# endif 5490int 5491main (void) 5492{ 5493switch (0) { 5494 case _IO('A', 1):; 5495 case _IO('B', 1):; 5496 } 5497 ; 5498 return 0; 5499} 5500_ACEOF 5501if ac_fn_c_try_compile "$LINENO" 5502then : 5503 ac_cv_lbl_gcc_fixincludes=yes 5504else $as_nop 5505 ac_cv_lbl_gcc_fixincludes=no 5506fi 5507rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 5508fi 5509 5510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_gcc_fixincludes" >&5 5511printf "%s\n" "$ac_cv_lbl_gcc_fixincludes" >&6; } 5512 if test $ac_cv_lbl_gcc_fixincludes = no ; then 5513 # Don't cache failure 5514 unset ac_cv_lbl_gcc_fixincludes 5515 as_fn_error $? "see the INSTALL for more info" "$LINENO" 5 5516 fi 5517 fi 5518 5519 CFLAGS="$save_CFLAGS" 5520 LIBS="$save_LIBS" 5521 LDFLAGS="$save_LDFLAGS" 5522 5523 5524ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" 5525if test "x$ac_cv_func_strerror_r" = xyes 5526then : 5527 5528 # 5529 # We have strerror_r; if we define _GNU_SOURCE, is it a 5530 # POSIX-compliant strerror_r() or a GNU strerror_r()? 5531 # 5532 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strerror_r is GNU-style" >&5 5533printf %s "checking whether strerror_r is GNU-style... " >&6; } 5534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5535/* end confdefs.h. */ 5536 5537 #define _GNU_SOURCE 5538#include <string.h> 5539 5540/* Define it GNU-style; that will cause an error if it's not GNU-style */ 5541extern char *strerror_r(int, char *, size_t); 5542 5543int 5544main(void) 5545{ 5546 return 0; 5547} 5548 5549 5550_ACEOF 5551if ac_fn_c_try_compile "$LINENO" 5552then : 5553 5554 # GNU-style 5555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5556printf "%s\n" "yes" >&6; } 5557 5558printf "%s\n" "#define HAVE_GNU_STRERROR_R /**/" >>confdefs.h 5559 5560 5561else $as_nop 5562 5563 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 5564printf "%s\n" "no" >&6; } 5565 5566printf "%s\n" "#define HAVE_POSIX_STRERROR_R /**/" >>confdefs.h 5567 5568 5569fi 5570rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 5571 5572else $as_nop 5573 5574 # 5575 # We don't have strerror_r; do we have _wcserror_s? 5576 # 5577 ac_fn_c_check_func "$LINENO" "_wcserror_s" "ac_cv_func__wcserror_s" 5578if test "x$ac_cv_func__wcserror_s" = xyes 5579then : 5580 printf "%s\n" "#define HAVE__WCSERROR_S 1" >>confdefs.h 5581 5582fi 5583 5584 5585fi 5586 5587 5588# 5589# Thanks, IBM, for not providing vsyslog() in AIX! 5590# 5591ac_fn_c_check_func "$LINENO" "vsyslog" "ac_cv_func_vsyslog" 5592if test "x$ac_cv_func_vsyslog" = xyes 5593then : 5594 printf "%s\n" "#define HAVE_VSYSLOG 1" >>confdefs.h 5595 5596fi 5597 5598 5599# 5600# Make sure we have vsnprintf() and snprintf(); we require them. 5601# 5602ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" 5603if test "x$ac_cv_func_vsnprintf" = xyes 5604then : 5605 5606else $as_nop 5607 as_fn_error $? "vsnprintf() is required but wasn't found" "$LINENO" 5 5608fi 5609 5610ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" 5611if test "x$ac_cv_func_snprintf" = xyes 5612then : 5613 5614else $as_nop 5615 as_fn_error $? "snprintf() is required but wasn't found" "$LINENO" 5 5616fi 5617 5618 5619needasprintf=no 5620 5621 for ac_func in vasprintf asprintf 5622do : 5623 as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` 5624ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 5625if eval test \"x\$"$as_ac_var"\" = x"yes" 5626then : 5627 cat >>confdefs.h <<_ACEOF 5628#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 5629_ACEOF 5630 5631else $as_nop 5632 needasprintf=yes 5633fi 5634 5635done 5636if test $needasprintf = yes; then 5637 case " $LIBOBJS " in 5638 *" asprintf.$ac_objext "* ) ;; 5639 *) LIBOBJS="$LIBOBJS asprintf.$ac_objext" 5640 ;; 5641esac 5642 5643fi 5644 5645needstrlcat=no 5646 5647 for ac_func in strlcat 5648do : 5649 ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" 5650if test "x$ac_cv_func_strlcat" = xyes 5651then : 5652 printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h 5653 5654else $as_nop 5655 needstrlcat=yes 5656fi 5657 5658done 5659if test $needstrlcat = yes; then 5660 case " $LIBOBJS " in 5661 *" strlcat.$ac_objext "* ) ;; 5662 *) LIBOBJS="$LIBOBJS strlcat.$ac_objext" 5663 ;; 5664esac 5665 5666fi 5667 5668needstrlcpy=no 5669 5670 for ac_func in strlcpy 5671do : 5672 ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" 5673if test "x$ac_cv_func_strlcpy" = xyes 5674then : 5675 printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h 5676 5677else $as_nop 5678 needstrlcpy=yes 5679fi 5680 5681done 5682if test $needstrlcpy = yes; then 5683 case " $LIBOBJS " in 5684 *" strlcpy.$ac_objext "* ) ;; 5685 *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext" 5686 ;; 5687esac 5688 5689fi 5690 5691needstrtok_r=no 5692 5693 for ac_func in strtok_r 5694do : 5695 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r" 5696if test "x$ac_cv_func_strtok_r" = xyes 5697then : 5698 printf "%s\n" "#define HAVE_STRTOK_R 1" >>confdefs.h 5699 5700else $as_nop 5701 needstrtok_r=yes 5702fi 5703 5704done 5705if test $needstrtok_r = yes; then 5706 case " $LIBOBJS " in 5707 *" strtok_r.$ac_objext "* ) ;; 5708 *) LIBOBJS="$LIBOBJS strtok_r.$ac_objext" 5709 ;; 5710esac 5711 5712fi 5713 5714# 5715# Do we have ffs(), and is it declared in <strings.h>? 5716# 5717ac_fn_c_check_func "$LINENO" "ffs" "ac_cv_func_ffs" 5718if test "x$ac_cv_func_ffs" = xyes 5719then : 5720 printf "%s\n" "#define HAVE_FFS 1" >>confdefs.h 5721 5722fi 5723 5724if test "$ac_cv_func_ffs" = yes; then 5725 # 5726 # We have ffs(); is it declared in <strings.h>? 5727 # 5728 # This test fails if we don't have <strings.h> or if we do 5729 # but it doesn't declare ffs(). 5730 # 5731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 5732printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } 5733if test ${ac_cv_c_undeclared_builtin_options+y} 5734then : 5735 printf %s "(cached) " >&6 5736else $as_nop 5737 ac_save_CFLAGS=$CFLAGS 5738 ac_cv_c_undeclared_builtin_options='cannot detect' 5739 for ac_arg in '' -fno-builtin; do 5740 CFLAGS="$ac_save_CFLAGS $ac_arg" 5741 # This test program should *not* compile successfully. 5742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5743/* end confdefs.h. */ 5744 5745int 5746main (void) 5747{ 5748(void) strchr; 5749 ; 5750 return 0; 5751} 5752_ACEOF 5753if ac_fn_c_try_compile "$LINENO" 5754then : 5755 5756else $as_nop 5757 # This test program should compile successfully. 5758 # No library function is consistently available on 5759 # freestanding implementations, so test against a dummy 5760 # declaration. Include always-available headers on the 5761 # off chance that they somehow elicit warnings. 5762 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5763/* end confdefs.h. */ 5764#include <float.h> 5765#include <limits.h> 5766#include <stdarg.h> 5767#include <stddef.h> 5768extern void ac_decl (int, char *); 5769 5770int 5771main (void) 5772{ 5773(void) ac_decl (0, (char *) 0); 5774 (void) ac_decl; 5775 5776 ; 5777 return 0; 5778} 5779_ACEOF 5780if ac_fn_c_try_compile "$LINENO" 5781then : 5782 if test x"$ac_arg" = x 5783then : 5784 ac_cv_c_undeclared_builtin_options='none needed' 5785else $as_nop 5786 ac_cv_c_undeclared_builtin_options=$ac_arg 5787fi 5788 break 5789fi 5790rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 5791fi 5792rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 5793 done 5794 CFLAGS=$ac_save_CFLAGS 5795 5796fi 5797{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 5798printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } 5799 case $ac_cv_c_undeclared_builtin_options in #( 5800 'cannot detect') : 5801 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 5802printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 5803as_fn_error $? "cannot make $CC report undeclared builtins 5804See \`config.log' for more details" "$LINENO" 5; } ;; #( 5805 'none needed') : 5806 ac_c_undeclared_builtin_options='' ;; #( 5807 *) : 5808 ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; 5809esac 5810 5811ac_fn_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" " 5812#include <strings.h> 5813 5814" "$ac_c_undeclared_builtin_options" "CFLAGS" 5815if test "x$ac_cv_have_decl_ffs" = xyes 5816then : 5817 5818 5819printf "%s\n" "#define STRINGS_H_DECLARES_FFS /**/" >>confdefs.h 5820 5821 5822fi 5823fi 5824 5825# 5826# Do this before checking for ether_hostton(), as it's a 5827# "getaddrinfo()-ish function". 5828# 5829 5830 # 5831 # Most operating systems have getaddrinfo(), and the other routines 5832 # we may need, in the default searched libraries (e.g., libc). 5833 # Check there first. 5834 # 5835 ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" 5836if test "x$ac_cv_func_getaddrinfo" = xyes 5837then : 5838 5839else $as_nop 5840 5841 # 5842 # Not found in the standard system libraries. 5843 # 5844 # In some versions of Solaris, we need to link with libsocket 5845 # and libnsl, so check in libsocket and also link with liblnsl 5846 # when doing this test. 5847 # 5848 # Linking with libsocket and libnsl will find all the routines 5849 # we need. 5850 # 5851 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5 5852printf %s "checking for getaddrinfo in -lsocket... " >&6; } 5853if test ${ac_cv_lib_socket_getaddrinfo+y} 5854then : 5855 printf %s "(cached) " >&6 5856else $as_nop 5857 ac_check_lib_save_LIBS=$LIBS 5858LIBS="-lsocket -lnsl $LIBS" 5859cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5860/* end confdefs.h. */ 5861 5862/* Override any GCC internal prototype to avoid an error. 5863 Use char because int might match the return type of a GCC 5864 builtin and then its argument prototype would still apply. */ 5865char getaddrinfo (); 5866int 5867main (void) 5868{ 5869return getaddrinfo (); 5870 ; 5871 return 0; 5872} 5873_ACEOF 5874if ac_fn_c_try_link "$LINENO" 5875then : 5876 ac_cv_lib_socket_getaddrinfo=yes 5877else $as_nop 5878 ac_cv_lib_socket_getaddrinfo=no 5879fi 5880rm -f core conftest.err conftest.$ac_objext conftest.beam \ 5881 conftest$ac_exeext conftest.$ac_ext 5882LIBS=$ac_check_lib_save_LIBS 5883fi 5884{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getaddrinfo" >&5 5885printf "%s\n" "$ac_cv_lib_socket_getaddrinfo" >&6; } 5886if test "x$ac_cv_lib_socket_getaddrinfo" = xyes 5887then : 5888 5889 # 5890 # OK, we found it in libsocket. 5891 # 5892 LIBS="-lsocket -lnsl $LIBS" 5893 5894else $as_nop 5895 5896 # 5897 # Not found in libsocket; test for it in libnetwork, which 5898 # is where it is in Haiku. 5899 # 5900 # Linking with libnetwork will find all the routines we 5901 # need. 5902 # 5903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lnetwork" >&5 5904printf %s "checking for getaddrinfo in -lnetwork... " >&6; } 5905if test ${ac_cv_lib_network_getaddrinfo+y} 5906then : 5907 printf %s "(cached) " >&6 5908else $as_nop 5909 ac_check_lib_save_LIBS=$LIBS 5910LIBS="-lnetwork $LIBS" 5911cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5912/* end confdefs.h. */ 5913 5914/* Override any GCC internal prototype to avoid an error. 5915 Use char because int might match the return type of a GCC 5916 builtin and then its argument prototype would still apply. */ 5917char getaddrinfo (); 5918int 5919main (void) 5920{ 5921return getaddrinfo (); 5922 ; 5923 return 0; 5924} 5925_ACEOF 5926if ac_fn_c_try_link "$LINENO" 5927then : 5928 ac_cv_lib_network_getaddrinfo=yes 5929else $as_nop 5930 ac_cv_lib_network_getaddrinfo=no 5931fi 5932rm -f core conftest.err conftest.$ac_objext conftest.beam \ 5933 conftest$ac_exeext conftest.$ac_ext 5934LIBS=$ac_check_lib_save_LIBS 5935fi 5936{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_getaddrinfo" >&5 5937printf "%s\n" "$ac_cv_lib_network_getaddrinfo" >&6; } 5938if test "x$ac_cv_lib_network_getaddrinfo" = xyes 5939then : 5940 5941 # 5942 # OK, we found it in libnetwork. 5943 # 5944 LIBS="-lnetwork $LIBS" 5945 5946else $as_nop 5947 5948 # 5949 # We didn't find it. 5950 # 5951 as_fn_error $? "getaddrinfo is required, but wasn't found" "$LINENO" 5 5952 5953fi 5954 5955 5956fi 5957 5958 5959 # 5960 # We require a version of recvmsg() that conforms to the Single 5961 # UNIX Specification, so that we can check whether a datagram 5962 # received with recvmsg() was truncated when received due to the 5963 # buffer being too small. 5964 # 5965 # On most systems, the version of recvmsg() in the libraries 5966 # found above conforms to the SUS. 5967 # 5968 # On at least some versions of Solaris, it does not conform to 5969 # the SUS, and we need the version in libxnet, which does 5970 # conform. 5971 # 5972 # Check whether libxnet exists and has a version of recvmsg(); 5973 # if it does, link with libxnet before we link with libsocket, 5974 # to get that version. 5975 # 5976 # This test also links with libsocket and libnsl. 5977 # 5978 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for recvmsg in -lxnet" >&5 5979printf %s "checking for recvmsg in -lxnet... " >&6; } 5980if test ${ac_cv_lib_xnet_recvmsg+y} 5981then : 5982 printf %s "(cached) " >&6 5983else $as_nop 5984 ac_check_lib_save_LIBS=$LIBS 5985LIBS="-lxnet -lsocket -lnsl $LIBS" 5986cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5987/* end confdefs.h. */ 5988 5989/* Override any GCC internal prototype to avoid an error. 5990 Use char because int might match the return type of a GCC 5991 builtin and then its argument prototype would still apply. */ 5992char recvmsg (); 5993int 5994main (void) 5995{ 5996return recvmsg (); 5997 ; 5998 return 0; 5999} 6000_ACEOF 6001if ac_fn_c_try_link "$LINENO" 6002then : 6003 ac_cv_lib_xnet_recvmsg=yes 6004else $as_nop 6005 ac_cv_lib_xnet_recvmsg=no 6006fi 6007rm -f core conftest.err conftest.$ac_objext conftest.beam \ 6008 conftest$ac_exeext conftest.$ac_ext 6009LIBS=$ac_check_lib_save_LIBS 6010fi 6011{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_recvmsg" >&5 6012printf "%s\n" "$ac_cv_lib_xnet_recvmsg" >&6; } 6013if test "x$ac_cv_lib_xnet_recvmsg" = xyes 6014then : 6015 6016 # 6017 # libxnet has recvmsg(); link with it as well. 6018 # 6019 LIBS="-lxnet $LIBS" 6020 6021fi 6022 6023 6024fi 6025 6026 6027 # 6028 # DLPI needs putmsg under HP-UX, so test for -lstr while we're at it. 6029 # 6030 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5 6031printf %s "checking for library containing putmsg... " >&6; } 6032if test ${ac_cv_search_putmsg+y} 6033then : 6034 printf %s "(cached) " >&6 6035else $as_nop 6036 ac_func_search_save_LIBS=$LIBS 6037cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6038/* end confdefs.h. */ 6039 6040/* Override any GCC internal prototype to avoid an error. 6041 Use char because int might match the return type of a GCC 6042 builtin and then its argument prototype would still apply. */ 6043char putmsg (); 6044int 6045main (void) 6046{ 6047return putmsg (); 6048 ; 6049 return 0; 6050} 6051_ACEOF 6052for ac_lib in '' str 6053do 6054 if test -z "$ac_lib"; then 6055 ac_res="none required" 6056 else 6057 ac_res=-l$ac_lib 6058 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 6059 fi 6060 if ac_fn_c_try_link "$LINENO" 6061then : 6062 ac_cv_search_putmsg=$ac_res 6063fi 6064rm -f core conftest.err conftest.$ac_objext conftest.beam \ 6065 conftest$ac_exeext 6066 if test ${ac_cv_search_putmsg+y} 6067then : 6068 break 6069fi 6070done 6071if test ${ac_cv_search_putmsg+y} 6072then : 6073 6074else $as_nop 6075 ac_cv_search_putmsg=no 6076fi 6077rm conftest.$ac_ext 6078LIBS=$ac_func_search_save_LIBS 6079fi 6080{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5 6081printf "%s\n" "$ac_cv_search_putmsg" >&6; } 6082ac_res=$ac_cv_search_putmsg 6083if test "$ac_res" != no 6084then : 6085 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 6086 6087fi 6088 6089 6090 6091# 6092# Check for reentrant versions of getnetbyname_r(), as provided by 6093# Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!). 6094# If we don't find one, we just use getnetbyname(), which uses 6095# thread-specific data on many platforms, but doesn't use it on 6096# NetBSD or OpenBSD, and may not use it on older versions of other 6097# platforms. 6098# 6099# Only do the check if we have a declaration of getnetbyname_r(); 6100# without it, we can't check which API it has. (We assume that 6101# if there's a declaration, it has a prototype, so that the API 6102# can be checked.) 6103# 6104ac_fn_check_decl "$LINENO" "getnetbyname_r" "ac_cv_have_decl_getnetbyname_r" "#include <netdb.h> 6105" "$ac_c_undeclared_builtin_options" "CFLAGS" 6106if test "x$ac_cv_have_decl_getnetbyname_r" = xyes 6107then : 6108 6109 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Linux getnetbyname_r()" >&5 6110printf %s "checking for the Linux getnetbyname_r()... " >&6; } 6111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6112/* end confdefs.h. */ 6113#include <netdb.h> 6114int 6115main (void) 6116{ 6117 6118 struct netent netent_buf; 6119 char buf[1024]; 6120 struct netent *resultp; 6121 int h_errnoval; 6122 6123 return getnetbyname_r((const char *)0, &netent_buf, buf, sizeof buf, &resultp, &h_errnoval); 6124 6125 ; 6126 return 0; 6127} 6128_ACEOF 6129if ac_fn_c_try_link "$LINENO" 6130then : 6131 6132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 6133printf "%s\n" "yes" >&6; } 6134 6135printf "%s\n" "#define HAVE_LINUX_GETNETBYNAME_R 1" >>confdefs.h 6136 6137 6138else $as_nop 6139 6140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 6141printf "%s\n" "no" >&6; } 6142 6143 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getnetbyname_r()" >&5 6144printf %s "checking for Solaris/IRIX getnetbyname_r()... " >&6; } 6145 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6146/* end confdefs.h. */ 6147#include <netdb.h> 6148int 6149main (void) 6150{ 6151 6152 struct netent netent_buf; 6153 char buf[1024]; 6154 6155 return getnetbyname_r((const char *)0, &netent_buf, buf, (int)sizeof buf) != NULL; 6156 6157 ; 6158 return 0; 6159} 6160_ACEOF 6161if ac_fn_c_try_link "$LINENO" 6162then : 6163 6164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 6165printf "%s\n" "yes" >&6; } 6166 6167printf "%s\n" "#define HAVE_SOLARIS_IRIX_GETNETBYNAME_R 1" >>confdefs.h 6168 6169 6170else $as_nop 6171 6172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 6173printf "%s\n" "no" >&6; } 6174 6175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AIX getnetbyname_r()" >&5 6176printf %s "checking for AIX getnetbyname_r()... " >&6; } 6177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6178/* end confdefs.h. */ 6179#include <netdb.h> 6180int 6181main (void) 6182{ 6183 6184 struct netent netent_buf; 6185 struct netent_data net_data; 6186 6187 return getnetbyname_r((const char *)0, &netent_buf, &net_data); 6188 6189 ; 6190 return 0; 6191} 6192_ACEOF 6193if ac_fn_c_try_link "$LINENO" 6194then : 6195 6196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 6197printf "%s\n" "yes" >&6; } 6198 6199printf "%s\n" "#define HAVE_AIX_GETNETBYNAME_R 1" >>confdefs.h 6200 6201 6202else $as_nop 6203 6204 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 6205printf "%s\n" "no" >&6; } 6206 6207fi 6208rm -f core conftest.err conftest.$ac_objext conftest.beam \ 6209 conftest$ac_exeext conftest.$ac_ext 6210 6211fi 6212rm -f core conftest.err conftest.$ac_objext conftest.beam \ 6213 conftest$ac_exeext conftest.$ac_ext 6214 6215fi 6216rm -f core conftest.err conftest.$ac_objext conftest.beam \ 6217 conftest$ac_exeext conftest.$ac_ext 6218 6219fi 6220 6221# 6222# Check for reentrant versions of getprotobyname_r(), as provided by 6223# Linux (glibc), Solaris/IRIX, and AIX (with three different APIs!). 6224# If we don't find one, we just use getprotobyname(), which uses 6225# thread-specific data on many platforms, but doesn't use it on 6226# NetBSD or OpenBSD, and may not use it on older versions of other 6227# platforms. 6228# 6229# Only do the check if we have a declaration of getprotobyname_r(); 6230# without it, we can't check which API it has. (We assume that 6231# if there's a declaration, it has a prototype, so that the API 6232# can be checked.) 6233# 6234ac_fn_check_decl "$LINENO" "getprotobyname_r" "ac_cv_have_decl_getprotobyname_r" "#include <netdb.h> 6235" "$ac_c_undeclared_builtin_options" "CFLAGS" 6236if test "x$ac_cv_have_decl_getprotobyname_r" = xyes 6237then : 6238 6239 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the Linux getprotobyname_r()" >&5 6240printf %s "checking for the Linux getprotobyname_r()... " >&6; } 6241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6242/* end confdefs.h. */ 6243#include <netdb.h> 6244int 6245main (void) 6246{ 6247 6248 struct protoent protoent_buf; 6249 char buf[1024]; 6250 struct protoent *resultp; 6251 6252 return getprotobyname_r((const char *)0, &protoent_buf, buf, sizeof buf, &resultp); 6253 6254 ; 6255 return 0; 6256} 6257_ACEOF 6258if ac_fn_c_try_link "$LINENO" 6259then : 6260 6261 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 6262printf "%s\n" "yes" >&6; } 6263 6264printf "%s\n" "#define HAVE_LINUX_GETPROTOBYNAME_R 1" >>confdefs.h 6265 6266 6267else $as_nop 6268 6269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 6270printf "%s\n" "no" >&6; } 6271 6272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris/IRIX getprotobyname_r()" >&5 6273printf %s "checking for Solaris/IRIX getprotobyname_r()... " >&6; } 6274 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6275/* end confdefs.h. */ 6276#include <netdb.h> 6277int 6278main (void) 6279{ 6280 6281 struct protoent protoent_buf; 6282 char buf[1024]; 6283 6284 return getprotobyname_r((const char *)0, &protoent_buf, buf, (int)sizeof buf) != NULL; 6285 6286 ; 6287 return 0; 6288} 6289_ACEOF 6290if ac_fn_c_try_link "$LINENO" 6291then : 6292 6293 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 6294printf "%s\n" "yes" >&6; } 6295 6296printf "%s\n" "#define HAVE_SOLARIS_IRIX_GETPROTOBYNAME_R 1" >>confdefs.h 6297 6298 6299else $as_nop 6300 6301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 6302printf "%s\n" "no" >&6; } 6303 6304 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for AIX getprotobyname_r()" >&5 6305printf %s "checking for AIX getprotobyname_r()... " >&6; } 6306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6307/* end confdefs.h. */ 6308#include <netdb.h> 6309int 6310main (void) 6311{ 6312 6313 struct protoent protoent_buf; 6314 struct protoent_data proto_data; 6315 6316 return getprotobyname_r((const char *)0, &protoent_buf, &proto_data); 6317 6318 ; 6319 return 0; 6320} 6321_ACEOF 6322if ac_fn_c_try_link "$LINENO" 6323then : 6324 6325 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 6326printf "%s\n" "yes" >&6; } 6327 6328printf "%s\n" "#define HAVE_AIX_GETPROTOBYNAME_R 1" >>confdefs.h 6329 6330 6331else $as_nop 6332 6333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 6334printf "%s\n" "no" >&6; } 6335 6336fi 6337rm -f core conftest.err conftest.$ac_objext conftest.beam \ 6338 conftest$ac_exeext conftest.$ac_ext 6339 6340fi 6341rm -f core conftest.err conftest.$ac_objext conftest.beam \ 6342 conftest$ac_exeext conftest.$ac_ext 6343 6344fi 6345rm -f core conftest.err conftest.$ac_objext conftest.beam \ 6346 conftest$ac_exeext conftest.$ac_ext 6347 6348fi 6349 6350# 6351# You are in a twisty little maze of UN*Xes, all different. 6352# Some might not have ether_hostton(). 6353# Some might have it and declare it in <net/ethernet.h>. 6354# Some might have it and declare it in <netinet/ether.h> 6355# Some might have it and declare it in <sys/ethernet.h>. 6356# Some might have it and declare it in <arpa/inet.h>. 6357# Some might have it and declare it in <netinet/if_ether.h>. 6358# Some might have it and not declare it in any header file. 6359# 6360# Before you is a C compiler. 6361# 6362ac_fn_c_check_func "$LINENO" "ether_hostton" "ac_cv_func_ether_hostton" 6363if test "x$ac_cv_func_ether_hostton" = xyes 6364then : 6365 printf "%s\n" "#define HAVE_ETHER_HOSTTON 1" >>confdefs.h 6366 6367fi 6368 6369if test "$ac_cv_func_ether_hostton" = yes; then 6370 # 6371 # OK, we have ether_hostton(). Is it declared in <net/ethernet.h>? 6372 # 6373 # This test fails if we don't have <net/ethernet.h> or if we do 6374 # but it doesn't declare ether_hostton(). 6375 # 6376 ac_fn_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" " 6377#include <net/ethernet.h> 6378 6379" "$ac_c_undeclared_builtin_options" "CFLAGS" 6380if test "x$ac_cv_have_decl_ether_hostton" = xyes 6381then : 6382 6383 6384printf "%s\n" "#define NET_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h 6385 6386 6387fi 6388 # 6389 # Did that succeed? 6390 # 6391 if test "$ac_cv_have_decl_ether_hostton" != yes; then 6392 # 6393 # No, how about <netinet/ether.h>, as on Linux? 6394 # 6395 # This test fails if we don't have <netinet/ether.h> 6396 # or if we do but it doesn't declare ether_hostton(). 6397 # 6398 # Unset ac_cv_have_decl_ether_hostton so we don't 6399 # treat the previous failure as a cached value and 6400 # suppress the next test. 6401 # 6402 unset ac_cv_have_decl_ether_hostton 6403 ac_fn_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" " 6404#include <netinet/ether.h> 6405 6406" "$ac_c_undeclared_builtin_options" "CFLAGS" 6407if test "x$ac_cv_have_decl_ether_hostton" = xyes 6408then : 6409 6410 6411printf "%s\n" "#define NETINET_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h 6412 6413 6414fi 6415 fi 6416 # 6417 # Did that succeed? 6418 # 6419 if test "$ac_cv_have_decl_ether_hostton" != yes; then 6420 # 6421 # No, how about <sys/ethernet.h>, as on Solaris 10 6422 # and later? 6423 # 6424 # This test fails if we don't have <sys/ethernet.h> 6425 # or if we do but it doesn't declare ether_hostton(). 6426 # 6427 # Unset ac_cv_have_decl_ether_hostton so we don't 6428 # treat the previous failure as a cached value and 6429 # suppress the next test. 6430 # 6431 unset ac_cv_have_decl_ether_hostton 6432 ac_fn_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" " 6433#include <sys/ethernet.h> 6434 6435" "$ac_c_undeclared_builtin_options" "CFLAGS" 6436if test "x$ac_cv_have_decl_ether_hostton" = xyes 6437then : 6438 6439 6440printf "%s\n" "#define SYS_ETHERNET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h 6441 6442 6443fi 6444 fi 6445 # 6446 # Did that succeed? 6447 # 6448 if test "$ac_cv_have_decl_ether_hostton" != yes; then 6449 # 6450 # No, how about <arpa/inet.h>, as in AIX? 6451 # 6452 # This test fails if we don't have <arpa/inet.h> 6453 # (if we have ether_hostton(), we should have 6454 # networking, and if we have networking, we should 6455 # have <arpa/inet.h>) or if we do but it doesn't 6456 # declare ether_hostton(). 6457 # 6458 # Unset ac_cv_have_decl_ether_hostton so we don't 6459 # treat the previous failure as a cached value and 6460 # suppress the next test. 6461 # 6462 unset ac_cv_have_decl_ether_hostton 6463 ac_fn_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" " 6464#include <arpa/inet.h> 6465 6466" "$ac_c_undeclared_builtin_options" "CFLAGS" 6467if test "x$ac_cv_have_decl_ether_hostton" = xyes 6468then : 6469 6470 6471printf "%s\n" "#define ARPA_INET_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h 6472 6473 6474fi 6475 fi 6476 # 6477 # Did that succeed? 6478 # 6479 if test "$ac_cv_have_decl_ether_hostton" != yes; then 6480 # 6481 # No, how about <netinet/if_ether.h>? 6482 # On some platforms, it requires <net/if.h> and 6483 # <netinet/in.h>, and we always include it with 6484 # both of them, so test it with both of them. 6485 # 6486 # This test fails if we don't have <netinet/if_ether.h> 6487 # and the headers we include before it, or if we do but 6488 # <netinet/if_ether.h> doesn't declare ether_hostton(). 6489 # 6490 # Unset ac_cv_have_decl_ether_hostton so we don't 6491 # treat the previous failure as a cached value and 6492 # suppress the next test. 6493 # 6494 unset ac_cv_have_decl_ether_hostton 6495 ac_fn_check_decl "$LINENO" "ether_hostton" "ac_cv_have_decl_ether_hostton" " 6496#include <sys/types.h> 6497#include <sys/socket.h> 6498#include <net/if.h> 6499#include <netinet/in.h> 6500#include <netinet/if_ether.h> 6501 6502" "$ac_c_undeclared_builtin_options" "CFLAGS" 6503if test "x$ac_cv_have_decl_ether_hostton" = xyes 6504then : 6505 6506 6507printf "%s\n" "#define NETINET_IF_ETHER_H_DECLARES_ETHER_HOSTTON /**/" >>confdefs.h 6508 6509 6510fi 6511 fi 6512 # 6513 # After all that, is ether_hostton() declared? 6514 # 6515 if test "$ac_cv_have_decl_ether_hostton" = yes; then 6516 # 6517 # Yes. 6518 # 6519 6520printf "%s\n" "#define HAVE_DECL_ETHER_HOSTTON 1" >>confdefs.h 6521 6522 else 6523 # 6524 # No, we'll have to declare it ourselves. 6525 # Do we have "struct ether_addr" if we include 6526 # <netinet/if_ether.h>? 6527 # 6528 ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" " 6529 #include <sys/types.h> 6530 #include <sys/socket.h> 6531 #include <net/if.h> 6532 #include <netinet/in.h> 6533 #include <netinet/if_ether.h> 6534 6535" 6536if test "x$ac_cv_type_struct_ether_addr" = xyes 6537then : 6538 6539printf "%s\n" "#define HAVE_STRUCT_ETHER_ADDR 1" >>confdefs.h 6540 6541 6542fi 6543 6544 fi 6545fi 6546 6547# 6548# For various things that might use pthreads. 6549# 6550ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" 6551if test "x$ac_cv_header_pthread_h" = xyes 6552then : 6553 6554 # 6555 # OK, we have pthread.h. Do we have pthread_create in the 6556 # system libraries? 6557 # 6558 ac_fn_c_check_func "$LINENO" "pthread_create" "ac_cv_func_pthread_create" 6559if test "x$ac_cv_func_pthread_create" = xyes 6560then : 6561 6562 # 6563 # Yes. 6564 # 6565 ac_lbl_have_pthreads="found" 6566 6567else $as_nop 6568 6569 # 6570 # No - do we have it in -lpthreads? 6571 # 6572 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthreads" >&5 6573printf %s "checking for pthread_create in -lpthreads... " >&6; } 6574if test ${ac_cv_lib_pthreads_pthread_create+y} 6575then : 6576 printf %s "(cached) " >&6 6577else $as_nop 6578 ac_check_lib_save_LIBS=$LIBS 6579LIBS="-lpthreads $LIBS" 6580cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6581/* end confdefs.h. */ 6582 6583/* Override any GCC internal prototype to avoid an error. 6584 Use char because int might match the return type of a GCC 6585 builtin and then its argument prototype would still apply. */ 6586char pthread_create (); 6587int 6588main (void) 6589{ 6590return pthread_create (); 6591 ; 6592 return 0; 6593} 6594_ACEOF 6595if ac_fn_c_try_link "$LINENO" 6596then : 6597 ac_cv_lib_pthreads_pthread_create=yes 6598else $as_nop 6599 ac_cv_lib_pthreads_pthread_create=no 6600fi 6601rm -f core conftest.err conftest.$ac_objext conftest.beam \ 6602 conftest$ac_exeext conftest.$ac_ext 6603LIBS=$ac_check_lib_save_LIBS 6604fi 6605{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthreads_pthread_create" >&5 6606printf "%s\n" "$ac_cv_lib_pthreads_pthread_create" >&6; } 6607if test "x$ac_cv_lib_pthreads_pthread_create" = xyes 6608then : 6609 6610 # 6611 # Yes - add -lpthreads. 6612 # 6613 ac_lbl_have_pthreads="found" 6614 PTHREAD_LIBS="$PTHREAD_LIBS -lpthreads" 6615 6616else $as_nop 6617 6618 # 6619 # No - do we have it in -lpthread? 6620 # 6621 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_create in -lpthread" >&5 6622printf %s "checking for pthread_create in -lpthread... " >&6; } 6623if test ${ac_cv_lib_pthread_pthread_create+y} 6624then : 6625 printf %s "(cached) " >&6 6626else $as_nop 6627 ac_check_lib_save_LIBS=$LIBS 6628LIBS="-lpthread $LIBS" 6629cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6630/* end confdefs.h. */ 6631 6632/* Override any GCC internal prototype to avoid an error. 6633 Use char because int might match the return type of a GCC 6634 builtin and then its argument prototype would still apply. */ 6635char pthread_create (); 6636int 6637main (void) 6638{ 6639return pthread_create (); 6640 ; 6641 return 0; 6642} 6643_ACEOF 6644if ac_fn_c_try_link "$LINENO" 6645then : 6646 ac_cv_lib_pthread_pthread_create=yes 6647else $as_nop 6648 ac_cv_lib_pthread_pthread_create=no 6649fi 6650rm -f core conftest.err conftest.$ac_objext conftest.beam \ 6651 conftest$ac_exeext conftest.$ac_ext 6652LIBS=$ac_check_lib_save_LIBS 6653fi 6654{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_create" >&5 6655printf "%s\n" "$ac_cv_lib_pthread_pthread_create" >&6; } 6656if test "x$ac_cv_lib_pthread_pthread_create" = xyes 6657then : 6658 6659 # 6660 # Yes - add -lpthread. 6661 # 6662 ac_lbl_have_pthreads="found" 6663 PTHREAD_LIBS="$PTHREAD_LIBS -lpthread" 6664 6665else $as_nop 6666 6667 # 6668 # No. 6669 # 6670 ac_lbl_have_pthreads="not found" 6671 6672fi 6673 6674 6675fi 6676 6677 6678fi 6679 6680 6681else $as_nop 6682 6683 # 6684 # We didn't find pthread.h. 6685 # 6686 ac_lbl_have_pthreads="not found" 6687 6688 6689fi 6690 6691 6692{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable the instrument functions code" >&5 6693printf %s "checking whether to enable the instrument functions code... " >&6; } 6694# Check whether --enable-instrument-functions was given. 6695if test ${enable_instrument_functions+y} 6696then : 6697 enableval=$enable_instrument_functions; 6698else $as_nop 6699 enableval=no 6700fi 6701 6702case "$enableval" in 6703yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 6704printf "%s\n" "yes" >&6; } 6705 6706printf "%s\n" "#define ENABLE_INSTRUMENT_FUNCTIONS 1" >>confdefs.h 6707 6708 # Add '-finstrument-functions' instrumentation option to generate 6709 # instrumentation calls for entry and exit to functions. 6710 # Use '--enable-instrument-functions' also with tcpdump (or tcpslice) 6711 # to see the output. See also https://www.tcpdump.org/faq.html#q17. 6712 CFLAGS="$CFLAGS -O0 -ggdb -finstrument-functions" 6713 ;; 6714*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 6715printf "%s\n" "no" >&6; } 6716 ;; 6717esac 6718 6719{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if --disable-protochain option is specified" >&5 6720printf %s "checking if --disable-protochain option is specified... " >&6; } 6721# Check whether --enable-protochain was given. 6722if test ${enable_protochain+y} 6723then : 6724 enableval=$enable_protochain; 6725fi 6726 6727case "x$enable_protochain" in 6728xyes) enable_protochain=enabled ;; 6729xno) enable_protochain=disabled ;; 6730x) enable_protochain=enabled ;; 6731esac 6732 6733if test "$enable_protochain" = "disabled"; then 6734 6735printf "%s\n" "#define NO_PROTOCHAIN 1" >>confdefs.h 6736 6737fi 6738{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${enable_protochain}" >&5 6739printf "%s\n" "${enable_protochain}" >&6; } 6740 6741# 6742# valgrindtest directly uses the native capture mechanism, but 6743# only tests with BPF and PF_PACKET sockets; only enable it if 6744# we have BPF or PF_PACKET sockets. 6745# 6746VALGRINDTEST_SRC= 6747 6748 6749# Check whether --with-pcap was given. 6750if test ${with_pcap+y} 6751then : 6752 withval=$with_pcap; 6753fi 6754 6755if test ! -z "$with_pcap" ; then 6756 V_PCAP="$withval" 6757else 6758 # 6759 # Check for a bunch of headers for various packet 6760 # capture mechanisms. 6761 # 6762 ac_fn_c_check_header_compile "$LINENO" "net/bpf.h" "ac_cv_header_net_bpf_h" "$ac_includes_default" 6763if test "x$ac_cv_header_net_bpf_h" = xyes 6764then : 6765 printf "%s\n" "#define HAVE_NET_BPF_H 1" >>confdefs.h 6766 6767fi 6768 6769 if test "$ac_cv_header_net_bpf_h" = yes; then 6770 # 6771 # Does it define BIOCSETIF? 6772 # I.e., is it a header for an LBL/BSD-style capture 6773 # mechanism, or is it just a header for a BPF filter 6774 # engine? Some versions of Arch Linux, for example, 6775 # have a net/bpf.h that doesn't define BIOCSETIF; 6776 # as it's a Linux, it should use packet sockets, 6777 # instead. 6778 # 6779 # We need: 6780 # 6781 # sys/types.h, because FreeBSD 10's net/bpf.h 6782 # requires that various BSD-style integer types 6783 # be defined; 6784 # 6785 # sys/time.h, because AIX 5.2 and 5.3's net/bpf.h 6786 # doesn't include it but does use struct timeval 6787 # in ioctl definitions; 6788 # 6789 # sys/ioctl.h and, if we have it, sys/ioccom.h, 6790 # because net/bpf.h defines ioctls; 6791 # 6792 # net/if.h, because it defines some structures 6793 # used in ioctls defined by net/bpf.h; 6794 # 6795 # sys/socket.h, because OpenBSD 5.9's net/bpf.h 6796 # defines some structure fields as being 6797 # struct sockaddrs; 6798 # 6799 # and net/bpf.h doesn't necessarily include all 6800 # of those headers itself. 6801 # 6802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if net/bpf.h defines BIOCSETIF" >&5 6803printf %s "checking if net/bpf.h defines BIOCSETIF... " >&6; } 6804 if test ${ac_cv_lbl_bpf_h_defines_biocsetif+y} 6805then : 6806 printf %s "(cached) " >&6 6807else $as_nop 6808 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6809/* end confdefs.h. */ 6810 6811#include <sys/types.h> 6812#include <sys/time.h> 6813#include <sys/ioctl.h> 6814#include <sys/socket.h> 6815#ifdef HAVE_SYS_IOCCOM_H 6816#include <sys/ioccom.h> 6817#endif 6818#include <net/bpf.h> 6819#include <net/if.h> 6820 6821int 6822main (void) 6823{ 6824u_int i = BIOCSETIF; 6825 ; 6826 return 0; 6827} 6828_ACEOF 6829if ac_fn_c_try_compile "$LINENO" 6830then : 6831 ac_cv_lbl_bpf_h_defines_biocsetif=yes 6832else $as_nop 6833 ac_cv_lbl_bpf_h_defines_biocsetif=no 6834fi 6835rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 6836fi 6837 6838 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_bpf_h_defines_biocsetif" >&5 6839printf "%s\n" "$ac_cv_lbl_bpf_h_defines_biocsetif" >&6; } 6840 fi 6841 ac_fn_c_check_header_compile "$LINENO" "net/pfilt.h" "ac_cv_header_net_pfilt_h" "$ac_includes_default" 6842if test "x$ac_cv_header_net_pfilt_h" = xyes 6843then : 6844 printf "%s\n" "#define HAVE_NET_PFILT_H 1" >>confdefs.h 6845 6846fi 6847ac_fn_c_check_header_compile "$LINENO" "net/enet.h" "ac_cv_header_net_enet_h" "$ac_includes_default" 6848if test "x$ac_cv_header_net_enet_h" = xyes 6849then : 6850 printf "%s\n" "#define HAVE_NET_ENET_H 1" >>confdefs.h 6851 6852fi 6853 6854 ac_fn_c_check_header_compile "$LINENO" "net/nit.h" "ac_cv_header_net_nit_h" "$ac_includes_default" 6855if test "x$ac_cv_header_net_nit_h" = xyes 6856then : 6857 printf "%s\n" "#define HAVE_NET_NIT_H 1" >>confdefs.h 6858 6859fi 6860ac_fn_c_check_header_compile "$LINENO" "sys/net/nit.h" "ac_cv_header_sys_net_nit_h" "$ac_includes_default" 6861if test "x$ac_cv_header_sys_net_nit_h" = xyes 6862then : 6863 printf "%s\n" "#define HAVE_SYS_NET_NIT_H 1" >>confdefs.h 6864 6865fi 6866 6867 ac_fn_c_check_header_compile "$LINENO" "linux/socket.h" "ac_cv_header_linux_socket_h" "$ac_includes_default" 6868if test "x$ac_cv_header_linux_socket_h" = xyes 6869then : 6870 printf "%s\n" "#define HAVE_LINUX_SOCKET_H 1" >>confdefs.h 6871 6872fi 6873ac_fn_c_check_header_compile "$LINENO" "net/raw.h" "ac_cv_header_net_raw_h" "$ac_includes_default" 6874if test "x$ac_cv_header_net_raw_h" = xyes 6875then : 6876 printf "%s\n" "#define HAVE_NET_RAW_H 1" >>confdefs.h 6877 6878fi 6879ac_fn_c_check_header_compile "$LINENO" "sys/dlpi.h" "ac_cv_header_sys_dlpi_h" "$ac_includes_default" 6880if test "x$ac_cv_header_sys_dlpi_h" = xyes 6881then : 6882 printf "%s\n" "#define HAVE_SYS_DLPI_H 1" >>confdefs.h 6883 6884fi 6885 6886 ac_fn_c_check_header_compile "$LINENO" "config/HaikuConfig.h" "ac_cv_header_config_HaikuConfig_h" "$ac_includes_default" 6887if test "x$ac_cv_header_config_HaikuConfig_h" = xyes 6888then : 6889 printf "%s\n" "#define HAVE_CONFIG_HAIKUCONFIG_H 1" >>confdefs.h 6890 6891fi 6892 6893 6894 if test "$ac_cv_lbl_bpf_h_defines_biocsetif" = yes; then 6895 # 6896 # BPF. 6897 # Check this before DLPI, so that we pick BPF on 6898 # Solaris 11 and later. 6899 # 6900 V_PCAP=bpf 6901 6902 # 6903 # We have BPF, so build valgrindtest with "make test" 6904 # on macOS and FreeBSD (add your OS once there's a 6905 # valgrind for it). 6906 # 6907 case "$host_os" in 6908 6909 freebsd*|darwin*|linux*) 6910 VALGRINDTEST_SRC=valgrindtest.c 6911 ;; 6912 esac 6913 elif test "$ac_cv_header_linux_socket_h" = yes; then 6914 # 6915 # No prizes for guessing this one. 6916 # 6917 V_PCAP=linux 6918 VALGRINDTEST_SRC=valgrindtest.c 6919 elif test "$ac_cv_header_net_pfilt_h" = yes; then 6920 # 6921 # DEC OSF/1, Digital UNIX, Tru64 UNIX 6922 # 6923 V_PCAP=pf 6924 elif test "$ac_cv_header_net_enet_h" = yes; then 6925 # 6926 # Stanford Enetfilter. 6927 # 6928 V_PCAP=enet 6929 elif test "$ac_cv_header_net_nit_h" = yes; then 6930 # 6931 # SunOS 4.x STREAMS NIT. 6932 # 6933 V_PCAP=snit 6934 elif test "$ac_cv_header_sys_net_nit_h" = yes; then 6935 # 6936 # Pre-SunOS 4.x non-STREAMS NIT. 6937 # 6938 V_PCAP=nit 6939 elif test "$ac_cv_header_net_raw_h" = yes; then 6940 # 6941 # IRIX snoop. 6942 # 6943 V_PCAP=snoop 6944 elif test "$ac_cv_header_sys_dlpi_h" = yes; then 6945 # 6946 # DLPI on pre-Solaris 11 SunOS 5, HP-UX, possibly others. 6947 # 6948 V_PCAP=dlpi 6949 elif test "$ac_cv_header_config_HaikuConfig_h" = yes; then 6950 # 6951 # Haiku. 6952 # 6953 V_PCAP=haiku 6954 else 6955 # 6956 # We don't have any capture type we know about. 6957 # Report an error, and tell the user to configure with 6958 # --with-pcap=null if they want a libpcap that can't 6959 # capture but that can read capture files. That way, 6960 # nobody gets surprised by getting a no-capture 6961 # libpcap without asking for that. 6962 # 6963 as_fn_error $? "No supported packet capture interface was found. 6964 See the INSTALL.md file for information on packet capture support in 6965 various operating systems. 6966 If you want a libpcap that cannot capture packets but that can read 6967 pcap and pcapng files, run configure with --with-pcap=null." "$LINENO" 5 6968 fi 6969fi 6970{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking packet capture type" >&5 6971printf %s "checking packet capture type... " >&6; } 6972{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $V_PCAP" >&5 6973printf "%s\n" "$V_PCAP" >&6; } 6974 6975 6976# 6977# Do we have pkg-config? 6978# 6979 6980 6981 6982 6983 6984 6985 6986if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 6987 if test -n "$ac_tool_prefix"; then 6988 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. 6989set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 6990{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6991printf %s "checking for $ac_word... " >&6; } 6992if test ${ac_cv_path_PKG_CONFIG+y} 6993then : 6994 printf %s "(cached) " >&6 6995else $as_nop 6996 case $PKG_CONFIG in 6997 [\\/]* | ?:[\\/]*) 6998 ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. 6999 ;; 7000 *) 7001 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7002for as_dir in $PATH 7003do 7004 IFS=$as_save_IFS 7005 case $as_dir in #((( 7006 '') as_dir=./ ;; 7007 */) ;; 7008 *) as_dir=$as_dir/ ;; 7009 esac 7010 for ac_exec_ext in '' $ac_executable_extensions; do 7011 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 7012 ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" 7013 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 7014 break 2 7015 fi 7016done 7017 done 7018IFS=$as_save_IFS 7019 7020 ;; 7021esac 7022fi 7023PKG_CONFIG=$ac_cv_path_PKG_CONFIG 7024if test -n "$PKG_CONFIG"; then 7025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 7026printf "%s\n" "$PKG_CONFIG" >&6; } 7027else 7028 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 7029printf "%s\n" "no" >&6; } 7030fi 7031 7032 7033fi 7034if test -z "$ac_cv_path_PKG_CONFIG"; then 7035 ac_pt_PKG_CONFIG=$PKG_CONFIG 7036 # Extract the first word of "pkg-config", so it can be a program name with args. 7037set dummy pkg-config; ac_word=$2 7038{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 7039printf %s "checking for $ac_word... " >&6; } 7040if test ${ac_cv_path_ac_pt_PKG_CONFIG+y} 7041then : 7042 printf %s "(cached) " >&6 7043else $as_nop 7044 case $ac_pt_PKG_CONFIG in 7045 [\\/]* | ?:[\\/]*) 7046 ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. 7047 ;; 7048 *) 7049 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7050for as_dir in $PATH 7051do 7052 IFS=$as_save_IFS 7053 case $as_dir in #((( 7054 '') as_dir=./ ;; 7055 */) ;; 7056 *) as_dir=$as_dir/ ;; 7057 esac 7058 for ac_exec_ext in '' $ac_executable_extensions; do 7059 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 7060 ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" 7061 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 7062 break 2 7063 fi 7064done 7065 done 7066IFS=$as_save_IFS 7067 7068 ;; 7069esac 7070fi 7071ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG 7072if test -n "$ac_pt_PKG_CONFIG"; then 7073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 7074printf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } 7075else 7076 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 7077printf "%s\n" "no" >&6; } 7078fi 7079 7080 if test "x$ac_pt_PKG_CONFIG" = x; then 7081 PKG_CONFIG="" 7082 else 7083 case $cross_compiling:$ac_tool_warned in 7084yes:) 7085{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 7086printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 7087ac_tool_warned=yes ;; 7088esac 7089 PKG_CONFIG=$ac_pt_PKG_CONFIG 7090 fi 7091else 7092 PKG_CONFIG="$ac_cv_path_PKG_CONFIG" 7093fi 7094 7095fi 7096if test -n "$PKG_CONFIG"; then 7097 _pkg_min_version=0.17.0 7098 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 7099printf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } 7100 if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 7101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 7102printf "%s\n" "yes" >&6; } 7103 else 7104 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 7105printf "%s\n" "no" >&6; } 7106 PKG_CONFIG="" 7107 fi 7108fi 7109 7110# 7111# Do we have the brew command from Homebrew? 7112# 7113# Extract the first word of "brew", so it can be a program name with args. 7114set dummy brew; ac_word=$2 7115{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 7116printf %s "checking for $ac_word... " >&6; } 7117if test ${ac_cv_path_BREW+y} 7118then : 7119 printf %s "(cached) " >&6 7120else $as_nop 7121 case $BREW in 7122 [\\/]* | ?:[\\/]*) 7123 ac_cv_path_BREW="$BREW" # Let the user override the test with a path. 7124 ;; 7125 *) 7126 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7127for as_dir in $PATH 7128do 7129 IFS=$as_save_IFS 7130 case $as_dir in #((( 7131 '') as_dir=./ ;; 7132 */) ;; 7133 *) as_dir=$as_dir/ ;; 7134 esac 7135 for ac_exec_ext in '' $ac_executable_extensions; do 7136 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 7137 ac_cv_path_BREW="$as_dir$ac_word$ac_exec_ext" 7138 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 7139 break 2 7140 fi 7141done 7142 done 7143IFS=$as_save_IFS 7144 7145 ;; 7146esac 7147fi 7148BREW=$ac_cv_path_BREW 7149if test -n "$BREW"; then 7150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BREW" >&5 7151printf "%s\n" "$BREW" >&6; } 7152else 7153 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 7154printf "%s\n" "no" >&6; } 7155fi 7156 7157 7158 7159# 7160# Solaris pkg-config is annoying. For at least one package (D-Bus, I'm 7161# looking at *you*!), there are separate include files for 32-bit and 7162# 64-bit builds (I guess using "unsigned long long" as a 64-bit integer 7163# type on a 64-bit build is like crossing the beams or something), and 7164# there are two separate .pc files, so if we're doing a 32-bit build we 7165# should make sure we look in /usr/lib/pkgconfig for .pc files and if 7166# we're doing a 64-bit build we should make sure we look in 7167# /usr/lib/amd64/pkgconfig for .pc files. 7168# 7169case "$host_os" in 7170 7171solaris*) 7172 if test "$ac_cv_sizeof_void_p" -eq 8; then 7173 # 7174 # 64-bit build. If the path is empty, set it to 7175 # /usr/lib/amd64/pkgconfig; otherwise, if 7176 # /usr/lib/pkgconfig appears in the path, prepend 7177 # /usr/lib/amd64/pkgconfig to it; otherwise, put 7178 # /usr/lib/amd64/pkgconfig at the end. 7179 # 7180 if test -z "$PKG_CONFIG_PATH"; then 7181 # 7182 # Not set, or empty. Set it to 7183 # /usr/lib/amd64/pkgconfig. 7184 # 7185 PKG_CONFIG_PATH=/usr/lib/amd64/pkgconfig 7186 elif test ! -z `echo "$PKG_CONFIG_PATH" | grep "/usr/lib/pkgconfig"`; then 7187 # 7188 # It contains /usr/lib/pkgconfig. Prepend 7189 # /usr/lib/amd64/pkgconfig to /usr/lib/pkgconfig. 7190 # 7191 PKG_CONFIG_PATH=`echo "$PKG_CONFIG_PATH" | sed "s;/usr/lib/pkgconfig;/usr/lib/amd64/pkgconfig:/usr/lib/pkgconfig;"` 7192 else 7193 # 7194 # Not empty, but doesn't contain /usr/lib/pkgconfig. 7195 # Append /usr/lib/amd64/pkgconfig to it. 7196 # 7197 PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/usr/lib/amd64/pkgconfig" 7198 fi 7199 export PKG_CONFIG_PATH 7200 elif test "$ac_cv_sizeof_void_p" -eq 4; then 7201 # 7202 # 32-bit build. If /usr/amd64/lib/pkgconfig appears 7203 # in the path, prepend /usr/lib/pkgconfig to it. 7204 # 7205 if test ! -z `echo "$PKG_CONFIG_PATH" | grep "/usr/lib/amd64/pkgconfig"`; then 7206 # 7207 # It contains /usr/lib/amd64/pkgconfig. Prepend 7208 # /usr/lib/pkgconfig to /usr/lib/amd64/pkgconfig. 7209 # 7210 PKG_CONFIG_PATH=`echo "$PKG_CONFIG_PATH" | sed "s;/usr/lib/amd64/pkgconfig;/usr/lib/pkgconfig:/usr/lib/amd64/pkgconfig;"` 7211 export PKG_CONFIG_PATH 7212 fi 7213 fi 7214esac 7215 7216# 7217# Handle each capture type. 7218# 7219case "$V_PCAP" in 7220dlpi) 7221 # 7222 # Checks for some header files. 7223 # 7224 ac_fn_c_check_header_compile "$LINENO" "sys/bufmod.h" "ac_cv_header_sys_bufmod_h" "$ac_includes_default" 7225if test "x$ac_cv_header_sys_bufmod_h" = xyes 7226then : 7227 printf "%s\n" "#define HAVE_SYS_BUFMOD_H 1" >>confdefs.h 7228 7229fi 7230ac_fn_c_check_header_compile "$LINENO" "sys/dlpi_ext.h" "ac_cv_header_sys_dlpi_ext_h" "$ac_includes_default" 7231if test "x$ac_cv_header_sys_dlpi_ext_h" = xyes 7232then : 7233 printf "%s\n" "#define HAVE_SYS_DLPI_EXT_H 1" >>confdefs.h 7234 7235fi 7236ac_fn_c_check_header_compile "$LINENO" "zone.h" "ac_cv_header_zone_h" "$ac_includes_default" 7237if test "x$ac_cv_header_zone_h" = xyes 7238then : 7239 printf "%s\n" "#define HAVE_ZONE_H 1" >>confdefs.h 7240 7241fi 7242 7243 7244 # 7245 # Checks to see if Solaris has the public libdlpi(3LIB) library. 7246 # Note: The existence of /usr/include/libdlpi.h does not mean it is the 7247 # public libdlpi(3LIB) version. Before libdlpi was made public, a 7248 # private version also existed, which did not have the same APIs. 7249 # Due to a gcc bug, the default search path for 32-bit libraries does 7250 # not include /lib, we add it explicitly here. 7251 # [http://bugs.opensolaris.org/view_bug.do?bug_id=6619485]. 7252 # Also, due to the bug above applications that link to libpcap with 7253 # libdlpi will have to add "-L/lib" option to "configure". 7254 # 7255 save_LDFLAGS="$LDFLAGS" 7256 LDFLAGS="$LIBS -L/lib" 7257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5 7258printf %s "checking for dlpi_walk in -ldlpi... " >&6; } 7259if test ${ac_cv_lib_dlpi_dlpi_walk+y} 7260then : 7261 printf %s "(cached) " >&6 7262else $as_nop 7263 ac_check_lib_save_LIBS=$LIBS 7264LIBS="-ldlpi $LIBS" 7265cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7266/* end confdefs.h. */ 7267 7268/* Override any GCC internal prototype to avoid an error. 7269 Use char because int might match the return type of a GCC 7270 builtin and then its argument prototype would still apply. */ 7271char dlpi_walk (); 7272int 7273main (void) 7274{ 7275return dlpi_walk (); 7276 ; 7277 return 0; 7278} 7279_ACEOF 7280if ac_fn_c_try_link "$LINENO" 7281then : 7282 ac_cv_lib_dlpi_dlpi_walk=yes 7283else $as_nop 7284 ac_cv_lib_dlpi_dlpi_walk=no 7285fi 7286rm -f core conftest.err conftest.$ac_objext conftest.beam \ 7287 conftest$ac_exeext conftest.$ac_ext 7288LIBS=$ac_check_lib_save_LIBS 7289fi 7290{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5 7291printf "%s\n" "$ac_cv_lib_dlpi_dlpi_walk" >&6; } 7292if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes 7293then : 7294 7295 LIBS="-ldlpi $LIBS" 7296 LIBS_STATIC="-ldlpi $LIBS_STATIC" 7297 LIBS_PRIVATE="-ldlpi $LIBS_PRIVATE" 7298 V_PCAP=libdlpi 7299 7300 # 7301 # Capture module plus common code needed for 7302 # common functions used by pcap-[dlpi,libdlpi].c 7303 # 7304 PLATFORM_C_SRC="pcap-libdlpi.c dlpisubs.c" 7305 7306printf "%s\n" "#define HAVE_LIBDLPI 1" >>confdefs.h 7307 7308 7309else $as_nop 7310 7311 V_PCAP=dlpi 7312 7313 # 7314 # Capture module plus common code needed for 7315 # common functions used by pcap-[dlpi,libdlpi].c 7316 # 7317 PLATFORM_C_SRC="pcap-dlpi.c dlpisubs.c" 7318 7319fi 7320 7321 LDFLAGS="$save_LDFLAGS" 7322 7323 # 7324 # Checks whether <sys/dlpi.h> is usable, to catch weird SCO 7325 # versions of DLPI. 7326 # 7327 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/dlpi.h> is usable" >&5 7328printf %s "checking whether <sys/dlpi.h> is usable... " >&6; } 7329 if test ${ac_cv_sys_dlpi_usable+y} 7330then : 7331 printf %s "(cached) " >&6 7332else $as_nop 7333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7334/* end confdefs.h. */ 7335 7336 #include <sys/types.h> 7337 #include <sys/time.h> 7338 #include <sys/dlpi.h> 7339 7340int 7341main (void) 7342{ 7343int i = DL_PROMISC_PHYS; 7344 ; 7345 return 0; 7346} 7347_ACEOF 7348if ac_fn_c_try_compile "$LINENO" 7349then : 7350 ac_cv_sys_dlpi_usable=yes 7351else $as_nop 7352 ac_cv_sys_dlpi_usable=no 7353fi 7354rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 7355fi 7356 7357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_dlpi_usable" >&5 7358printf "%s\n" "$ac_cv_sys_dlpi_usable" >&6; } 7359 if test $ac_cv_sys_dlpi_usable = no ; then 7360 as_fn_error $? "<sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI" "$LINENO" 5 7361 fi 7362 7363 # 7364 # Check to see if Solaris has the dl_passive_req_t struct defined 7365 # in <sys/dlpi.h>. 7366 # This check is for DLPI support for passive modes. 7367 # See dlpi(7P) for more details. 7368 # 7369 ac_fn_c_check_type "$LINENO" "dl_passive_req_t" "ac_cv_type_dl_passive_req_t" " 7370 #include <sys/types.h> 7371 #include <sys/dlpi.h> 7372 7373" 7374if test "x$ac_cv_type_dl_passive_req_t" = xyes 7375then : 7376 7377printf "%s\n" "#define HAVE_DL_PASSIVE_REQ_T 1" >>confdefs.h 7378 7379 7380fi 7381 7382 ;; 7383 7384enet) 7385 # 7386 # Capture module 7387 # 7388 PLATFORM_C_SRC="pcap-enet.c" 7389 ;; 7390 7391haiku) 7392 # 7393 # Capture module 7394 # 7395 PLATFORM_C_SRC="pcap-haiku.c" 7396 7397 # 7398 # Just for the sake of it. 7399 # 7400 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default" 7401if test "x$ac_cv_header_net_if_h" = xyes 7402then : 7403 printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h 7404 7405fi 7406ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default" 7407if test "x$ac_cv_header_net_if_dl_h" = xyes 7408then : 7409 printf "%s\n" "#define HAVE_NET_IF_DL_H 1" >>confdefs.h 7410 7411fi 7412ac_fn_c_check_header_compile "$LINENO" "net/if_types.h" "ac_cv_header_net_if_types_h" "$ac_includes_default" 7413if test "x$ac_cv_header_net_if_types_h" = xyes 7414then : 7415 printf "%s\n" "#define HAVE_NET_IF_TYPES_H 1" >>confdefs.h 7416 7417fi 7418 7419 ;; 7420 7421linux) 7422 # 7423 # Capture module 7424 # 7425 PLATFORM_C_SRC="pcap-linux.c" 7426 7427 # 7428 # Do we have libnl? 7429 # We only want version 3. Version 2 was, apparently, 7430 # short-lived, and version 1 is source and binary 7431 # incompatible with version 3, and it appears that, 7432 # these days, everybody's using version 3. We're 7433 # not supporting older versions of the Linux kernel; 7434 # let's drop support for older versions of libnl, too. 7435 # 7436 7437# Check whether --with-libnl was given. 7438if test ${with_libnl+y} 7439then : 7440 withval=$with_libnl; with_libnl=$withval 7441else $as_nop 7442 with_libnl=if_available 7443fi 7444 7445 7446 if test x$with_libnl != xno ; then 7447 # 7448 # Check for libnl-genl-3.0 with pkg-config. 7449 # 7450 7451{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnl-genl-3.0 with pkg-config" >&5 7452printf %s "checking for libnl-genl-3.0 with pkg-config... " >&6; } 7453if test -n "$PKG_CONFIG"; then 7454 7455 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5 7456 ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5 7457 ac_status=$? 7458 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 7459 test $ac_status = 0; }; then 7460 # 7461 # The package was found, so try to get its C flags and 7462 # libraries. 7463 # 7464 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5 7465printf "%s\n" "found" >&6; } 7466 if test ! -n "$LIBNL_CFLAGS"; then 7467 LIBNL_CFLAGS=`$PKG_CONFIG --cflags "libnl-genl-3.0" 2>/dev/null` 7468 if test "x$?" != "x0"; then 7469 # 7470 # That failed - report an error. 7471 # Re-run the command, telling pkg-config to print an error 7472 # message, capture the error message, and report it. 7473 # This causes the configuration script to fail, as it means 7474 # the script is almost certainly doing something wrong. 7475 # 7476 7477if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 7478 _pkg_short_errors_supported=yes 7479else 7480 _pkg_short_errors_supported=no 7481fi 7482 if test $_pkg_short_errors_supported = yes; then 7483 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --cflags "libnl-genl-3.0" 2>&1` 7484 else 7485 _pkg_error_string=`$PKG_CONFIG --print-errors --cflags "libnl-genl-3.0" 2>&1` 7486 fi 7487 as_fn_error $? "$PKG_CONFIG --cflags \"libnl-genl-3.0\" failed: $_pkg_error_string" "$LINENO" 5 7488 fi 7489 fi 7490 if test ! -n "$LIBNL_LIBS"; then 7491 LIBNL_LIBS=`$PKG_CONFIG --libs "libnl-genl-3.0" 2>/dev/null` 7492 if test "x$?" != "x0"; then 7493 # 7494 # That failed - report an error. 7495 # Re-run the command, telling pkg-config to print an error 7496 # message, capture the error message, and report it. 7497 # This causes the configuration script to fail, as it means 7498 # the script is almost certainly doing something wrong. 7499 # 7500 7501if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 7502 _pkg_short_errors_supported=yes 7503else 7504 _pkg_short_errors_supported=no 7505fi 7506 if test $_pkg_short_errors_supported = yes; then 7507 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs "libnl-genl-3.0" 2>&1` 7508 else 7509 _pkg_error_string=`$PKG_CONFIG --print-errors --libs "libnl-genl-3.0" 2>&1` 7510 fi 7511 as_fn_error $? "$PKG_CONFIG --libs \"libnl-genl-3.0\" failed: $_pkg_error_string" "$LINENO" 5 7512 fi 7513 fi 7514 if test ! -n "$LIBNL_LIBS_STATIC"; then 7515 LIBNL_LIBS_STATIC=`$PKG_CONFIG --libs --static "libnl-genl-3.0" 2>/dev/null` 7516 if test "x$?" != "x0"; then 7517 # 7518 # That failed - report an error. 7519 # Re-run the command, telling pkg-config to print an error 7520 # message, capture the error message, and report it. 7521 # This causes the configuration script to fail, as it means 7522 # the script is almost certainly doing something wrong. 7523 # 7524 7525if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 7526 _pkg_short_errors_supported=yes 7527else 7528 _pkg_short_errors_supported=no 7529fi 7530 if test $_pkg_short_errors_supported = yes; then 7531 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs --static "libnl-genl-3.0" 2>&1` 7532 else 7533 _pkg_error_string=`$PKG_CONFIG --print-errors --libs --static "libnl-genl-3.0" 2>&1` 7534 fi 7535 as_fn_error $? "$PKG_CONFIG --libs --static \"libnl-genl-3.0\" failed: $_pkg_error_string" "$LINENO" 5 7536 fi 7537 fi 7538 7539 pkg_config_found_libnl=yes 7540 V_INCLS="$V_INCLS $LIBNL_CFLAGS" 7541 ADDITIONAL_LIBS="$LIBNL_LIBS $ADDITIONAL_LIBS" 7542 ADDITIONAL_LIBS_STATIC="$LIBNL_LIBS_STATIC $ADDITIONAL_LIBS_STATIC" 7543 REQUIRES_PRIVATE="libnl-genl-3.0 $REQUIRES_PRIVATE" 7544 7545printf "%s\n" "#define HAVE_LIBNL 1" >>confdefs.h 7546 7547 7548 else 7549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 7550printf "%s\n" "not found" >&6; } 7551 : 7552 fi 7553else 7554 # No pkg-config, so obviously not found with pkg-config. 7555 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config not found" >&5 7556printf "%s\n" "pkg-config not found" >&6; } 7557 : 7558fi 7559 7560 7561 if test x$pkg_config_found_libnl != xyes; then 7562 # 7563 # OK, either we don't have pkg-config or there 7564 # wasn't a .pc file for it; Check for it directly. 7565 # 7566 case "$with_libnl" in 7567 7568 yes|if_available) 7569 incdir=-I/usr/include/libnl3 7570 libnldir= 7571 ;; 7572 7573 *) 7574 if test -d $withval; then 7575 libnldir=-L${withval}/lib 7576 incdir=-I${withval}/include 7577 fi 7578 ;; 7579 esac 7580 7581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl-3" >&5 7582printf %s "checking for nl_socket_alloc in -lnl-3... " >&6; } 7583if test ${ac_cv_lib_nl_3_nl_socket_alloc+y} 7584then : 7585 printf %s "(cached) " >&6 7586else $as_nop 7587 ac_check_lib_save_LIBS=$LIBS 7588LIBS="-lnl-3 ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 $LIBS" 7589cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7590/* end confdefs.h. */ 7591 7592/* Override any GCC internal prototype to avoid an error. 7593 Use char because int might match the return type of a GCC 7594 builtin and then its argument prototype would still apply. */ 7595char nl_socket_alloc (); 7596int 7597main (void) 7598{ 7599return nl_socket_alloc (); 7600 ; 7601 return 0; 7602} 7603_ACEOF 7604if ac_fn_c_try_link "$LINENO" 7605then : 7606 ac_cv_lib_nl_3_nl_socket_alloc=yes 7607else $as_nop 7608 ac_cv_lib_nl_3_nl_socket_alloc=no 7609fi 7610rm -f core conftest.err conftest.$ac_objext conftest.beam \ 7611 conftest$ac_exeext conftest.$ac_ext 7612LIBS=$ac_check_lib_save_LIBS 7613fi 7614{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_3_nl_socket_alloc" >&5 7615printf "%s\n" "$ac_cv_lib_nl_3_nl_socket_alloc" >&6; } 7616if test "x$ac_cv_lib_nl_3_nl_socket_alloc" = xyes 7617then : 7618 7619 # 7620 # Yes, we have libnl 3.x. 7621 # 7622 ADDITIONAL_LIBS="${libnldir} -lnl-genl-3 -lnl-3 $ADDITIONAL_LIBS" 7623 ADDITIONAL_LIBS_STATIC="${libnldir} -lnl-genl-3 -lnl-3 $ADDITIONAL_LIBS_STATIC" 7624 LIBS_PRIVATE="${libnldir} -lnl-genl-3 -lnl-3 $LIBS_PRIVATE" 7625 7626printf "%s\n" "#define HAVE_LIBNL 1" >>confdefs.h 7627 7628 V_INCLS="$V_INCLS ${incdir}" 7629 7630else $as_nop 7631 7632 # 7633 # No, we don't have libnl at all. 7634 # Fail if the user explicitly requested 7635 # it. 7636 # 7637 if test x$with_libnl = xyes ; then 7638 as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5 7639 fi 7640 7641fi 7642 7643 fi 7644 fi 7645 7646 # 7647 # Check to see if the tpacket_auxdata struct has a tp_vlan_tci member. 7648 # 7649 # NOTE: any failure means we conclude that it doesn't have that 7650 # member, so if we don't have tpacket_auxdata, we conclude it 7651 # doesn't have that member (which is OK, as either we won't be 7652 # using code that would use that member, or we wouldn't compile 7653 # in any case). 7654 ac_fn_c_check_member "$LINENO" "struct tpacket_auxdata" "tp_vlan_tci" "ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" " 7655 #include <sys/types.h> 7656 #include <linux/if_packet.h> 7657 7658" 7659if test "x$ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" = xyes 7660then : 7661 7662printf "%s\n" "#define HAVE_STRUCT_TPACKET_AUXDATA_TP_VLAN_TCI 1" >>confdefs.h 7663 7664 7665fi 7666 7667 ;; 7668 7669bpf) 7670 # 7671 # Capture module 7672 # 7673 PLATFORM_C_SRC="pcap-bpf.c" 7674 7675 # 7676 # Check whether we have the *BSD-style ioctls. 7677 # 7678 ac_fn_c_check_header_compile "$LINENO" "net/if_media.h" "ac_cv_header_net_if_media_h" "$ac_includes_default" 7679if test "x$ac_cv_header_net_if_media_h" = xyes 7680then : 7681 printf "%s\n" "#define HAVE_NET_IF_MEDIA_H 1" >>confdefs.h 7682 7683fi 7684 7685 7686 # 7687 # Check whether we have struct BPF_TIMEVAL. 7688 # 7689 ac_fn_c_check_type "$LINENO" "struct BPF_TIMEVAL" "ac_cv_type_struct_BPF_TIMEVAL" " 7690 #include <sys/types.h> 7691 #include <sys/ioctl.h> 7692 #ifdef HAVE_SYS_IOCCOM_H 7693 #include <sys/ioccom.h> 7694 #endif 7695 #include <net/bpf.h> 7696 7697" 7698if test "x$ac_cv_type_struct_BPF_TIMEVAL" = xyes 7699then : 7700 7701printf "%s\n" "#define HAVE_STRUCT_BPF_TIMEVAL 1" >>confdefs.h 7702 7703 7704fi 7705 7706 7707 # 7708 # Check whether there's a net/ipnet.h header and, 7709 # if so, whether it defines IPNET_ANY_LINK - if so, 7710 # we assume we have the "any" device (that's a 7711 # Solaris header, and later versions of Solaris 7712 # have an "any" device). 7713 # 7714 # Attempting to include it at compile time could 7715 # be a pain, as it's a kernel header. 7716 # 7717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Solaris \"any\" device is supported" >&5 7718printf %s "checking whether the Solaris \"any\" device is supported... " >&6; } 7719 if test -e /usr/include/inet/ipnet.h && 7720 grep -q IPNET_ANY_LINK /usr/include/inet/ipnet.h; then 7721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 7722printf "%s\n" "yes" >&6; } 7723 7724printf "%s\n" "#define HAVE_SOLARIS_ANY_DEVICE 1" >>confdefs.h 7725 7726 else 7727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 7728printf "%s\n" "no" >&6; } 7729 fi 7730 ;; 7731 7732pf) 7733 # 7734 # Capture module 7735 # 7736 PLATFORM_C_SRC="pcap-pf.c" 7737 ;; 7738 7739snit) 7740 # 7741 # Capture module 7742 # 7743 PLATFORM_C_SRC="pcap-snit.c" 7744 ;; 7745 7746snoop) 7747 # 7748 # Capture module 7749 # 7750 PLATFORM_C_SRC="pcap-snoop.c" 7751 ;; 7752 7753dag) 7754 # 7755 # --with-pcap=dag is the only way to get here, and it means 7756 # "DAG support but nothing else" 7757 # 7758 V_DEFS="$V_DEFS -DDAG_ONLY" 7759 PLATFORM_C_SRC="pcap-dag.c" 7760 xxx_only=yes 7761 ;; 7762 7763dpdk) 7764 # 7765 # --with-pcap=dpdk is the only way to get here, and it means 7766 # "DPDK support but nothing else" 7767 # 7768 V_DEFS="$V_DEFS -DDPDK_ONLY" 7769 PLATFORM_C_SRC="pcap-dpdk.c" 7770 xxx_only=yes 7771 ;; 7772 7773septel) 7774 # 7775 # --with-pcap=septel is the only way to get here, and it means 7776 # "Septel support but nothing else" 7777 # 7778 V_DEFS="$V_DEFS -DSEPTEL_ONLY" 7779 PLATFORM_C_SRC="pcap-septel.c" 7780 xxx_only=yes 7781 ;; 7782 7783snf) 7784 # 7785 # --with-pcap=snf is the only way to get here, and it means 7786 # "SNF support but nothing else" 7787 # 7788 V_DEFS="$V_DEFS -DSNF_ONLY" 7789 PLATFORM_C_SRC="pcap-snf.c" 7790 xxx_only=yes 7791 ;; 7792 7793null) 7794 # 7795 # Capture module 7796 # 7797 PLATFORM_C_SRC="pcap-null.c" 7798 ;; 7799 7800*) 7801 as_fn_error $? "$V_PCAP is not a valid pcap type" "$LINENO" 5 7802 ;; 7803esac 7804 7805if test "$V_PCAP" != null 7806then 7807 ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs" 7808if test "x$ac_cv_func_getifaddrs" = xyes 7809then : 7810 7811 # 7812 # We have "getifaddrs()"; make sure we have <ifaddrs.h> 7813 # as well, just in case some platform is really weird. 7814 # 7815 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default" 7816if test "x$ac_cv_header_ifaddrs_h" = xyes 7817then : 7818 7819 # 7820 # We have the header, so we use "getifaddrs()" to 7821 # get the list of interfaces. 7822 # 7823 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-getad.c" 7824 7825else $as_nop 7826 7827 # 7828 # We don't have the header - give up. 7829 # XXX - we could also fall back on some other 7830 # mechanism, but, for now, this'll catch this 7831 # problem so that we can at least try to figure 7832 # out something to do on systems with "getifaddrs()" 7833 # but without "ifaddrs.h", if there is something 7834 # we can do on those systems. 7835 # 7836 as_fn_error $? "Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>." "$LINENO" 5 7837 7838fi 7839 7840 7841else $as_nop 7842 7843 # 7844 # Well, we don't have "getifaddrs()", at least not with the 7845 # libraries with which we've decided we need to link 7846 # libpcap with, so we have to use some other mechanism. 7847 # 7848 # Note that this may happen on Solaris, which has 7849 # getifaddrs(), but in -lsocket, not in -lxnet, so we 7850 # won't find it if we link with -lxnet, which we want 7851 # to do for other reasons. 7852 # 7853 # For now, we use either the SIOCGIFCONF ioctl or the 7854 # SIOCGLIFCONF ioctl, preferring the latter if we have 7855 # it; the latter is a Solarisism that first appeared 7856 # in Solaris 8. (Solaris's getifaddrs() appears to 7857 # be built atop SIOCGLIFCONF; using it directly 7858 # avoids a not-all-that-useful middleman.) 7859 # 7860 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have SIOCGLIFCONF" >&5 7861printf %s "checking whether we have SIOCGLIFCONF... " >&6; } 7862 if test ${ac_cv_lbl_have_siocglifconf+y} 7863then : 7864 printf %s "(cached) " >&6 7865else $as_nop 7866 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7867/* end confdefs.h. */ 7868#include <sys/param.h> 7869 #include <sys/file.h> 7870 #include <sys/ioctl.h> 7871 #include <sys/socket.h> 7872 #include <sys/sockio.h> 7873int 7874main (void) 7875{ 7876ioctl(0, SIOCGLIFCONF, (char *)0); 7877 ; 7878 return 0; 7879} 7880_ACEOF 7881if ac_fn_c_try_compile "$LINENO" 7882then : 7883 ac_cv_lbl_have_siocglifconf=yes 7884else $as_nop 7885 ac_cv_lbl_have_siocglifconf=no 7886fi 7887rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 7888fi 7889 7890 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_have_siocglifconf" >&5 7891printf "%s\n" "$ac_cv_lbl_have_siocglifconf" >&6; } 7892 if test $ac_cv_lbl_have_siocglifconf = yes ; then 7893 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-glifc.c" 7894 else 7895 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-gifc.c" 7896 fi 7897 7898fi 7899 7900fi 7901 7902case "$host_os" in 7903linux*) 7904 ac_fn_c_check_header_compile "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default" 7905if test "x$ac_cv_header_linux_net_tstamp_h" = xyes 7906then : 7907 printf "%s\n" "#define HAVE_LINUX_NET_TSTAMP_H 1" >>confdefs.h 7908 7909fi 7910 7911 ;; 7912*) 7913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: no hardware timestamp support implemented for $host_os" >&5 7914printf "%s\n" "$as_me: no hardware timestamp support implemented for $host_os" >&6;} 7915 ;; 7916esac 7917 7918# 7919# Check for socklen_t. 7920# 7921ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " 7922 #include <sys/types.h> 7923 #include <sys/socket.h> 7924 7925" 7926if test "x$ac_cv_type_socklen_t" = xyes 7927then : 7928 7929printf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h 7930 7931 7932fi 7933 7934 7935# Check whether --enable-ipv6 was given. 7936if test ${enable_ipv6+y} 7937then : 7938 enableval=$enable_ipv6; 7939else $as_nop 7940 enable_ipv6=yes 7941fi 7942 7943if test "$enable_ipv6" != "no"; then 7944 # 7945 # We've already made sure we have getaddrinfo above in 7946 # AC_LBL_LIBRARY_NET. 7947 # 7948 7949printf "%s\n" "#define INET6 1" >>confdefs.h 7950 7951fi 7952 7953# Check for Endace DAG card support. 7954 7955# Check whether --with-dag was given. 7956if test ${with_dag+y} 7957then : 7958 withval=$with_dag; 7959 if test "$withval" = no 7960 then 7961 # User doesn't want DAG support. 7962 want_dag=no 7963 elif test "$withval" = yes 7964 then 7965 # User wants DAG support but hasn't specified a directory. 7966 want_dag=yes 7967 else 7968 # User wants DAG support and has specified a directory, so use the provided value. 7969 want_dag=yes 7970 dag_root=$withval 7971 fi 7972 7973else $as_nop 7974 7975 if test "$V_PCAP" = dag; then 7976 # User requested DAG-only libpcap, so we'd better have 7977 # the DAG API. 7978 want_dag=yes 7979 elif test "xxx_only" = yes; then 7980 # User requested something-else-only pcap, so they don't 7981 # want DAG support. 7982 want_dag=no 7983 else 7984 # 7985 # Use DAG API if present, otherwise don't 7986 # 7987 want_dag=ifpresent 7988 fi 7989 7990fi 7991 7992 7993 7994# Check whether --with-dag-includes was given. 7995if test ${with_dag_includes+y} 7996then : 7997 withval=$with_dag_includes; 7998 # User wants DAG support and has specified a header directory, so use the provided value. 7999 want_dag=yes 8000 dag_include_dir=$withval 8001 8002fi 8003 8004 8005 8006# Check whether --with-dag-libraries was given. 8007if test ${with_dag_libraries+y} 8008then : 8009 withval=$with_dag_libraries; 8010 # User wants DAG support and has specified a library directory, so use the provided value. 8011 want_dag=yes 8012 dag_lib_dir=$withval 8013 8014fi 8015 8016 8017if test "$want_dag" != no; then 8018 8019 # If necessary, set default paths for DAG API headers and libraries. 8020 if test -z "$dag_root"; then 8021 dag_root=/usr/local 8022 fi 8023 8024 if test -z "$dag_include_dir"; then 8025 dag_include_dir="$dag_root/include" 8026 fi 8027 8028 if test -z "$dag_lib_dir"; then 8029 dag_lib_dir="$dag_root/lib" 8030 # 8031 # Handle multiarch systems. 8032 # 8033 if test -d "$dag_lib_dir/$host" 8034 then 8035 dag_lib_dir="$dag_lib_dir/$host" 8036 fi 8037 fi 8038 8039 8040 save_CFLAGS="$CFLAGS" 8041 save_LIBS="$LIBS" 8042 save_LDFLAGS="$LDFLAGS" 8043 8044 CFLAGS="$CFLAGS -I$dag_include_dir" 8045 ac_fn_c_check_header_compile "$LINENO" "dagapi.h" "ac_cv_header_dagapi_h" "$ac_includes_default" 8046if test "x$ac_cv_header_dagapi_h" = xyes 8047then : 8048 printf "%s\n" "#define HAVE_DAGAPI_H 1" >>confdefs.h 8049 8050fi 8051 8052 8053 CFLAGS="$save_CFLAGS" 8054 LIBS="$save_LIBS" 8055 LDFLAGS="$save_LDFLAGS" 8056 8057 8058 if test "$ac_cv_header_dagapi_h" = yes; then 8059 8060 V_INCLS="$V_INCLS -I$dag_include_dir" 8061 8062 if test $V_PCAP != dag ; then 8063 MODULE_C_SRC="$MODULE_C_SRC pcap-dag.c" 8064 fi 8065 8066 # Check for various DAG API functions. 8067 # Don't need to save and restore LIBS to prevent -ldag being 8068 # included if there's a found-action (arg 3). 8069 8070 save_CFLAGS="$CFLAGS" 8071 save_LIBS="$LIBS" 8072 save_LDFLAGS="$LDFLAGS" 8073 8074 LDFLAGS="-L$dag_lib_dir" 8075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream in -ldag" >&5 8076printf %s "checking for dag_attach_stream in -ldag... " >&6; } 8077if test ${ac_cv_lib_dag_dag_attach_stream+y} 8078then : 8079 printf %s "(cached) " >&6 8080else $as_nop 8081 ac_check_lib_save_LIBS=$LIBS 8082LIBS="-ldag $LIBS" 8083cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8084/* end confdefs.h. */ 8085 8086/* Override any GCC internal prototype to avoid an error. 8087 Use char because int might match the return type of a GCC 8088 builtin and then its argument prototype would still apply. */ 8089char dag_attach_stream (); 8090int 8091main (void) 8092{ 8093return dag_attach_stream (); 8094 ; 8095 return 0; 8096} 8097_ACEOF 8098if ac_fn_c_try_link "$LINENO" 8099then : 8100 ac_cv_lib_dag_dag_attach_stream=yes 8101else $as_nop 8102 ac_cv_lib_dag_dag_attach_stream=no 8103fi 8104rm -f core conftest.err conftest.$ac_objext conftest.beam \ 8105 conftest$ac_exeext conftest.$ac_ext 8106LIBS=$ac_check_lib_save_LIBS 8107fi 8108{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream" >&5 8109printf "%s\n" "$ac_cv_lib_dag_dag_attach_stream" >&6; } 8110if test "x$ac_cv_lib_dag_dag_attach_stream" = xyes 8111then : 8112 8113 # 8114 # We assume that if we have libdag we have 8115 # libdagconf, as they're installed at the 8116 # same time from the same package. 8117 # 8118 ADDITIONAL_LIBS="-L$dag_lib_dir $ADDITIONAL_LIBS -ldag -ldagconf" 8119 ADDITIONAL_LIBS_STATIC="-L$dag_lib_dir $ADDITIONAL_LIBS_STATIC -ldag -ldagconf" 8120 LIBS_PRIVATE="-L$dag_lib_dir $LIBS_PRIVATE -ldag -ldagconf" 8121 8122else $as_nop 8123 as_fn_error $? "DAG library lacks streams support" "$LINENO" 5 8124fi 8125 8126 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream64 in -ldag" >&5 8127printf %s "checking for dag_attach_stream64 in -ldag... " >&6; } 8128if test ${ac_cv_lib_dag_dag_attach_stream64+y} 8129then : 8130 printf %s "(cached) " >&6 8131else $as_nop 8132 ac_check_lib_save_LIBS=$LIBS 8133LIBS="-ldag $LIBS" 8134cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8135/* end confdefs.h. */ 8136 8137/* Override any GCC internal prototype to avoid an error. 8138 Use char because int might match the return type of a GCC 8139 builtin and then its argument prototype would still apply. */ 8140char dag_attach_stream64 (); 8141int 8142main (void) 8143{ 8144return dag_attach_stream64 (); 8145 ; 8146 return 0; 8147} 8148_ACEOF 8149if ac_fn_c_try_link "$LINENO" 8150then : 8151 ac_cv_lib_dag_dag_attach_stream64=yes 8152else $as_nop 8153 ac_cv_lib_dag_dag_attach_stream64=no 8154fi 8155rm -f core conftest.err conftest.$ac_objext conftest.beam \ 8156 conftest$ac_exeext conftest.$ac_ext 8157LIBS=$ac_check_lib_save_LIBS 8158fi 8159{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream64" >&5 8160printf "%s\n" "$ac_cv_lib_dag_dag_attach_stream64" >&6; } 8161if test "x$ac_cv_lib_dag_dag_attach_stream64" = xyes 8162then : 8163 dag_large_streams="1" 8164else $as_nop 8165 dag_large_streams="0" 8166fi 8167 8168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dag_get_erf_types in -ldag" >&5 8169printf %s "checking for dag_get_erf_types in -ldag... " >&6; } 8170if test ${ac_cv_lib_dag_dag_get_erf_types+y} 8171then : 8172 printf %s "(cached) " >&6 8173else $as_nop 8174 ac_check_lib_save_LIBS=$LIBS 8175LIBS="-ldag $LIBS" 8176cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8177/* end confdefs.h. */ 8178 8179/* Override any GCC internal prototype to avoid an error. 8180 Use char because int might match the return type of a GCC 8181 builtin and then its argument prototype would still apply. */ 8182char dag_get_erf_types (); 8183int 8184main (void) 8185{ 8186return dag_get_erf_types (); 8187 ; 8188 return 0; 8189} 8190_ACEOF 8191if ac_fn_c_try_link "$LINENO" 8192then : 8193 ac_cv_lib_dag_dag_get_erf_types=yes 8194else $as_nop 8195 ac_cv_lib_dag_dag_get_erf_types=no 8196fi 8197rm -f core conftest.err conftest.$ac_objext conftest.beam \ 8198 conftest$ac_exeext conftest.$ac_ext 8199LIBS=$ac_check_lib_save_LIBS 8200fi 8201{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_erf_types" >&5 8202printf "%s\n" "$ac_cv_lib_dag_dag_get_erf_types" >&6; } 8203if test "x$ac_cv_lib_dag_dag_get_erf_types" = xyes 8204then : 8205 8206 8207printf "%s\n" "#define HAVE_DAG_GET_ERF_TYPES 1" >>confdefs.h 8208 8209fi 8210 8211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dag_get_stream_erf_types in -ldag" >&5 8212printf %s "checking for dag_get_stream_erf_types in -ldag... " >&6; } 8213if test ${ac_cv_lib_dag_dag_get_stream_erf_types+y} 8214then : 8215 printf %s "(cached) " >&6 8216else $as_nop 8217 ac_check_lib_save_LIBS=$LIBS 8218LIBS="-ldag $LIBS" 8219cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8220/* end confdefs.h. */ 8221 8222/* Override any GCC internal prototype to avoid an error. 8223 Use char because int might match the return type of a GCC 8224 builtin and then its argument prototype would still apply. */ 8225char dag_get_stream_erf_types (); 8226int 8227main (void) 8228{ 8229return dag_get_stream_erf_types (); 8230 ; 8231 return 0; 8232} 8233_ACEOF 8234if ac_fn_c_try_link "$LINENO" 8235then : 8236 ac_cv_lib_dag_dag_get_stream_erf_types=yes 8237else $as_nop 8238 ac_cv_lib_dag_dag_get_stream_erf_types=no 8239fi 8240rm -f core conftest.err conftest.$ac_objext conftest.beam \ 8241 conftest$ac_exeext conftest.$ac_ext 8242LIBS=$ac_check_lib_save_LIBS 8243fi 8244{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_stream_erf_types" >&5 8245printf "%s\n" "$ac_cv_lib_dag_dag_get_stream_erf_types" >&6; } 8246if test "x$ac_cv_lib_dag_dag_get_stream_erf_types" = xyes 8247then : 8248 8249 8250printf "%s\n" "#define HAVE_DAG_GET_STREAM_ERF_TYPES 1" >>confdefs.h 8251 8252fi 8253 8254 8255 CFLAGS="$save_CFLAGS" 8256 LIBS="$save_LIBS" 8257 LDFLAGS="$save_LDFLAGS" 8258 8259 8260 # 8261 # We assume that if we have libdag we have libdagconf, 8262 # as they're installed at the same time from the same 8263 # package. 8264 # 8265 if test "$dag_large_streams" = 1; then 8266 8267printf "%s\n" "#define HAVE_DAG_LARGE_STREAMS_API 1" >>confdefs.h 8268 8269 8270 save_CFLAGS="$CFLAGS" 8271 save_LIBS="$LIBS" 8272 save_LDFLAGS="$LDFLAGS" 8273 8274 LIBS="$LIBS -ldag -ldagconf" 8275 LDFLAGS="$LDFLAGS -L$dag_lib_dir" 8276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for vdag_set_device_info in -lvdag" >&5 8277printf %s "checking for vdag_set_device_info in -lvdag... " >&6; } 8278if test ${ac_cv_lib_vdag_vdag_set_device_info+y} 8279then : 8280 printf %s "(cached) " >&6 8281else $as_nop 8282 ac_check_lib_save_LIBS=$LIBS 8283LIBS="-lvdag $LIBS" 8284cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8285/* end confdefs.h. */ 8286 8287/* Override any GCC internal prototype to avoid an error. 8288 Use char because int might match the return type of a GCC 8289 builtin and then its argument prototype would still apply. */ 8290char vdag_set_device_info (); 8291int 8292main (void) 8293{ 8294return vdag_set_device_info (); 8295 ; 8296 return 0; 8297} 8298_ACEOF 8299if ac_fn_c_try_link "$LINENO" 8300then : 8301 ac_cv_lib_vdag_vdag_set_device_info=yes 8302else $as_nop 8303 ac_cv_lib_vdag_vdag_set_device_info=no 8304fi 8305rm -f core conftest.err conftest.$ac_objext conftest.beam \ 8306 conftest$ac_exeext conftest.$ac_ext 8307LIBS=$ac_check_lib_save_LIBS 8308fi 8309{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vdag_vdag_set_device_info" >&5 8310printf "%s\n" "$ac_cv_lib_vdag_vdag_set_device_info" >&6; } 8311if test "x$ac_cv_lib_vdag_vdag_set_device_info" = xyes 8312then : 8313 ac_dag_have_vdag="1" 8314else $as_nop 8315 ac_dag_have_vdag="0" 8316fi 8317 8318 8319 CFLAGS="$save_CFLAGS" 8320 LIBS="$save_LIBS" 8321 LDFLAGS="$save_LDFLAGS" 8322 8323 if test "$ac_dag_have_vdag" = 1; then 8324 8325printf "%s\n" "#define HAVE_DAG_VDAG 1" >>confdefs.h 8326 8327 if test "$ac_lbl_have_pthreads" != "found"; then 8328 as_fn_error $? "DAG requires pthreads, but we didn't find them" "$LINENO" 5 8329 fi 8330 ADDITIONAL_LIBS="$ADDITIONAL_LIBS $PTHREAD_LIBS" 8331 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $PTHREAD_LIBS" 8332 LIBS_PRIVATE="$LIBS_PRIVATE $PTHREAD_LIBS" 8333 fi 8334 fi 8335 8336 8337printf "%s\n" "#define HAVE_DAG_API 1" >>confdefs.h 8338 8339 else 8340 if test "$V_PCAP" = dag; then 8341 # User requested "dag" capture type but we couldn't 8342 # find the DAG API support. 8343 as_fn_error $? "DAG support requested with --with-pcap=dag, but the DAG headers weren't found at $dag_include_dir: make sure the DAG support is installed, specify a different path or paths if necessary, or don't request DAG support" "$LINENO" 5 8344 fi 8345 8346 if test "$want_dag" = yes; then 8347 # User wanted DAG support but we couldn't find it. 8348 as_fn_error $? "DAG support requested with --with-dag, but the DAG headers weren't found at $dag_include_dir: make sure the DAG support is installed, specify a different path or paths if necessary, or don't request DAG support" "$LINENO" 5 8349 fi 8350 fi 8351 CFLAGS="$save_CFLAGS" 8352fi 8353 8354 8355# Check whether --with-septel was given. 8356if test ${with_septel+y} 8357then : 8358 withval=$with_septel; 8359 if test "$withval" = no 8360 then 8361 want_septel=no 8362 elif test "$withval" = yes 8363 then 8364 want_septel=yes 8365 septel_root= 8366 else 8367 want_septel=yes 8368 septel_root=$withval 8369 fi 8370 8371else $as_nop 8372 8373 if test "$V_PCAP" = septel; then 8374 # User requested Septel-only libpcap, so we'd better have 8375 # the Septel API. 8376 want_septel=yes 8377 elif test "xxx_only" = yes; then 8378 # User requested something-else-only pcap, so they don't 8379 # want Septel support. 8380 want_septel=no 8381 else 8382 # 8383 # Use Septel API if present, otherwise don't 8384 # 8385 want_septel=ifpresent 8386 fi 8387 8388fi 8389 8390 8391ac_cv_lbl_septel_api=no 8392if test "$with_septel" != no; then 8393 8394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have Septel API headers" >&5 8395printf %s "checking whether we have Septel API headers... " >&6; } 8396 8397 # If necessary, set default paths for Septel API headers and libraries. 8398 if test -z "$septel_root"; then 8399 septel_root=$srcdir/../septel 8400 fi 8401 8402 septel_tools_dir="$septel_root" 8403 septel_include_dir="$septel_root/INC" 8404 8405 if test -r "$septel_include_dir/msg.h"; then 8406 ac_cv_lbl_septel_api=yes 8407 fi 8408 8409 if test "$ac_cv_lbl_septel_api" = yes; then 8410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes ($septel_include_dir)" >&5 8411printf "%s\n" "yes ($septel_include_dir)" >&6; } 8412 8413 V_INCLS="$V_INCLS -I$septel_include_dir" 8414 ADDLOBJS="$ADDLOBJS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o" 8415 ADDLARCHIVEOBJS="$ADDLARCHIVEOBJS $septel_tools_dir/asciibin.o $septel_tools_dir/bit2byte.o $septel_tools_dir/confirm.o $septel_tools_dir/fmtmsg.o $septel_tools_dir/gct_unix.o $septel_tools_dir/hqueue.o $septel_tools_dir/ident.o $septel_tools_dir/mem.o $septel_tools_dir/pack.o $septel_tools_dir/parse.o $septel_tools_dir/pool.o $septel_tools_dir/sdlsig.o $septel_tools_dir/strtonum.o $septel_tools_dir/timer.o $septel_tools_dir/trace.o" 8416 8417 if test "$V_PCAP" != septel ; then 8418 MODULE_C_SRC="$MODULE_C_SRC pcap-septel.c" 8419 fi 8420 8421 8422printf "%s\n" "#define HAVE_SEPTEL_API 1" >>confdefs.h 8423 8424 else 8425 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8426printf "%s\n" "no" >&6; } 8427 8428 if test "$V_PCAP" = septel; then 8429 # User requested "septel" capture type but 8430 # we couldn't find the Septel API support. 8431 as_fn_error $? "Septel support requested with --with-pcap=septel, but the Septel headers weren't found at $septel_include_dir: make sure the Septel support is installed, specify a different path or paths if necessary, or don't request Septel support" "$LINENO" 5 8432 fi 8433 8434 if test "$want_septel" = yes; then 8435 # User wanted Septel support but we couldn't find it. 8436 as_fn_error $? "Septel support requested with --with-septel, but the Septel headers weren't found at $septel_include_dir: make sure the Septel support is installed, specify a different path or paths if necessary, or don't request Septel support" "$LINENO" 5 8437 fi 8438 fi 8439fi 8440 8441# Check for Myricom SNF support. 8442 8443# Check whether --with-snf was given. 8444if test ${with_snf+y} 8445then : 8446 withval=$with_snf; 8447 if test "$withval" = no 8448 then 8449 # User explicitly doesn't want SNF 8450 want_snf=no 8451 elif test "$withval" = yes 8452 then 8453 # User wants SNF support but hasn't specified a directory. 8454 want_snf=yes 8455 else 8456 # User wants SNF support with a specified directory. 8457 want_snf=yes 8458 snf_root=$withval 8459 fi 8460 8461else $as_nop 8462 8463 if test "$V_PCAP" = snf; then 8464 # User requested Sniffer-only libpcap, so we'd better have 8465 # the Sniffer API. 8466 want_snf=yes 8467 elif test "xxx_only" = yes; then 8468 # User requested something-else-only pcap, so they don't 8469 # want SNF support. 8470 want_snf=no 8471 else 8472 # 8473 # Use Sniffer API if present, otherwise don't 8474 # 8475 want_snf=ifpresent 8476 fi 8477 8478fi 8479 8480 8481 8482# Check whether --with-snf-includes was given. 8483if test ${with_snf_includes+y} 8484then : 8485 withval=$with_snf_includes; 8486 # User wants SNF with specific header directory 8487 want_snf=yes 8488 snf_include_dir=$withval 8489 8490fi 8491 8492 8493 8494# Check whether --with-snf-libraries was given. 8495if test ${with_snf_libraries+y} 8496then : 8497 withval=$with_snf_libraries; 8498 # User wants SNF with specific lib directory 8499 want_snf=yes 8500 snf_lib_dir=$withval 8501 8502fi 8503 8504 8505ac_cv_lbl_snf_api=no 8506if test "$with_snf" != no; then 8507 8508 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have Myricom Sniffer API" >&5 8509printf %s "checking whether we have Myricom Sniffer API... " >&6; } 8510 8511 # If necessary, set default paths for Sniffer headers and libraries. 8512 if test -z "$snf_root"; then 8513 snf_root=/opt/snf 8514 fi 8515 8516 if test -z "$snf_include_dir"; then 8517 snf_include_dir="$snf_root/include" 8518 fi 8519 8520 if test -z "$snf_lib_dir"; then 8521 snf_lib_dir="$snf_root/lib" 8522 # 8523 # Handle multiarch systems. 8524 # 8525 if test -d "$snf_lib_dir/$host" 8526 then 8527 snf_lib_dir="$snf_lib_dir/$host" 8528 fi 8529 fi 8530 8531 if test -f "$snf_include_dir/snf.h"; then 8532 # We found a header; make sure we can link with the library 8533 8534 save_CFLAGS="$CFLAGS" 8535 save_LIBS="$LIBS" 8536 save_LDFLAGS="$LDFLAGS" 8537 8538 LDFLAGS="$LDFLAGS -L$snf_lib_dir" 8539 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for snf_init in -lsnf" >&5 8540printf %s "checking for snf_init in -lsnf... " >&6; } 8541if test ${ac_cv_lib_snf_snf_init+y} 8542then : 8543 printf %s "(cached) " >&6 8544else $as_nop 8545 ac_check_lib_save_LIBS=$LIBS 8546LIBS="-lsnf $LIBS" 8547cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8548/* end confdefs.h. */ 8549 8550/* Override any GCC internal prototype to avoid an error. 8551 Use char because int might match the return type of a GCC 8552 builtin and then its argument prototype would still apply. */ 8553char snf_init (); 8554int 8555main (void) 8556{ 8557return snf_init (); 8558 ; 8559 return 0; 8560} 8561_ACEOF 8562if ac_fn_c_try_link "$LINENO" 8563then : 8564 ac_cv_lib_snf_snf_init=yes 8565else $as_nop 8566 ac_cv_lib_snf_snf_init=no 8567fi 8568rm -f core conftest.err conftest.$ac_objext conftest.beam \ 8569 conftest$ac_exeext conftest.$ac_ext 8570LIBS=$ac_check_lib_save_LIBS 8571fi 8572{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_snf_snf_init" >&5 8573printf "%s\n" "$ac_cv_lib_snf_snf_init" >&6; } 8574if test "x$ac_cv_lib_snf_snf_init" = xyes 8575then : 8576 ac_cv_lbl_snf_api="yes" 8577fi 8578 8579 8580 CFLAGS="$save_CFLAGS" 8581 LIBS="$save_LIBS" 8582 LDFLAGS="$save_LDFLAGS" 8583 8584 if test "$ac_cv_lbl_snf_api" = no; then 8585 as_fn_error $? "SNF API cannot correctly be linked; check config.log" "$LINENO" 5 8586 fi 8587 fi 8588 8589 if test "$ac_cv_lbl_snf_api" = yes; then 8590 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes ($snf_root)" >&5 8591printf "%s\n" "yes ($snf_root)" >&6; } 8592 8593 V_INCLS="$V_INCLS -I$snf_include_dir" 8594 ADDITIONAL_LIBS="$ADDITIONAL_LIBS -L$snf_lib_dir -lsnf" 8595 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC -L$snf_lib_dir -lsnf" 8596 LIBS_PRIVATE="$LIBS_PRIVATE -L$snf_lib_dir -lsnf" 8597 8598 if test "$V_PCAP" != snf ; then 8599 MODULE_C_SRC="$MODULE_C_SRC pcap-snf.c" 8600 fi 8601 8602 8603printf "%s\n" "#define HAVE_SNF_API 1" >>confdefs.h 8604 8605 else 8606 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8607printf "%s\n" "no" >&6; } 8608 8609 if test "$want_snf" = yes; then 8610 # User requested "snf" capture type but 8611 # we couldn't find the Sniffer API support. 8612 as_fn_error $? "Myricom Sniffer support requested with --with-pcap=snf, but the Sniffer headers weren't found at $snf_include_dir: make sure the Sniffer support is installed, specify a different path or paths if necessary, or don't request Sniffer support" "$LINENO" 5 8613 fi 8614 8615 if test "$want_snf" = yes; then 8616 as_fn_error $? "Myricom Sniffer support requested with --with-snf, but the Sniffer headers weren't found at $snf_include_dir: make sure the Sniffer support is installed, specify a different path or paths if necessary, or don't request Sniffer support" "$LINENO" 5 8617 fi 8618 fi 8619fi 8620 8621# Check for Riverbed TurboCap support. 8622 8623# Check whether --with-turbocap was given. 8624if test ${with_turbocap+y} 8625then : 8626 withval=$with_turbocap; 8627 if test "$withval" = no 8628 then 8629 # User explicitly doesn't want TurboCap 8630 want_turbocap=no 8631 elif test "$withval" = yes 8632 then 8633 # User wants TurboCap support but hasn't specified a directory. 8634 want_turbocap=yes 8635 else 8636 # User wants TurboCap support with a specified directory. 8637 want_turbocap=yes 8638 turbocap_root=$withval 8639 fi 8640 8641else $as_nop 8642 8643 if test "xxx_only" = yes; then 8644 # User requested something-else-only pcap, so they don't 8645 # want TurboCap support. 8646 want_turbocap=no 8647 else 8648 # 8649 # Use TurboCap API if present, otherwise don't 8650 # 8651 want_turbocap=ifpresent 8652 fi 8653 8654fi 8655 8656 8657ac_cv_lbl_turbocap_api=no 8658if test "$want_turbocap" != no; then 8659 8660 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether TurboCap is supported" >&5 8661printf %s "checking whether TurboCap is supported... " >&6; } 8662 8663 8664 save_CFLAGS="$CFLAGS" 8665 save_LIBS="$LIBS" 8666 save_LDFLAGS="$LDFLAGS" 8667 8668 if test ! -z "$turbocap_root"; then 8669 TURBOCAP_CFLAGS="-I$turbocap_root/include" 8670 TURBOCAP_LDFLAGS="-L$turbocap_root/lib" 8671 CFLAGS="$CFLAGS $TURBOCAP_CFLAGS" 8672 LDFLAGS="$LDFLAGS $TURBOCAP_LDFLAGS" 8673 fi 8674 8675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8676/* end confdefs.h. */ 8677 8678 #include <TcApi.h> 8679 8680int 8681main (void) 8682{ 8683 8684 TC_INSTANCE a; TC_PORT b; TC_BOARD c; 8685 TC_INSTANCE i; 8686 (void)TcInstanceCreateByName("foo", &i); 8687 8688 ; 8689 return 0; 8690} 8691_ACEOF 8692if ac_fn_c_try_compile "$LINENO" 8693then : 8694 ac_cv_lbl_turbocap_api=yes 8695fi 8696rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8697 8698 8699 CFLAGS="$save_CFLAGS" 8700 LIBS="$save_LIBS" 8701 LDFLAGS="$save_LDFLAGS" 8702 8703 if test $ac_cv_lbl_turbocap_api = yes; then 8704 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8705printf "%s\n" "yes" >&6; } 8706 8707 MODULE_C_SRC="$MODULE_C_SRC pcap-tc.c" 8708 V_INCLS="$V_INCLS $TURBOCAP_CFLAGS" 8709 ADDITIONAL_LIBS="$ADDITIONAL_LIBS $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++" 8710 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++" 8711 LIBS_PRIVATE="$LIBS_PRIVATE $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++" 8712 8713 8714printf "%s\n" "#define HAVE_TC_API 1" >>confdefs.h 8715 8716 else 8717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8718printf "%s\n" "no" >&6; } 8719 8720 if test "$want_turbocap" = yes; then 8721 # User wanted Turbo support but we couldn't find it. 8722 as_fn_error $? "TurboCap support requested with --with-turbocap, but the TurboCap headers weren't found: make sure the TurboCap support is installed or don't request TurboCap support" "$LINENO" 5 8723 fi 8724 fi 8725fi 8726 8727{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable remote packet capture" >&5 8728printf %s "checking whether to enable remote packet capture... " >&6; } 8729# Check whether --enable-remote was given. 8730if test ${enable_remote+y} 8731then : 8732 enableval=$enable_remote; 8733else $as_nop 8734 enableval=no 8735fi 8736 8737case "$enableval" in 8738yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8739printf "%s\n" "yes" >&6; } 8740 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Remote packet capture may expose libpcap-based applications" >&5 8741printf "%s\n" "$as_me: WARNING: Remote packet capture may expose libpcap-based applications" >&2;} 8742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: to attacks by malicious remote capture servers!" >&5 8743printf "%s\n" "$as_me: WARNING: to attacks by malicious remote capture servers!" >&2;} 8744 # 8745 # rpcapd requires pthreads on UN*X. 8746 # 8747 if test "$ac_lbl_have_pthreads" != "found"; then 8748 as_fn_error $? "rpcapd requires pthreads, but we didn't find them" "$LINENO" 5 8749 fi 8750 # 8751 # It also requires crypt(). 8752 # Do we have it in the system libraries? 8753 # 8754 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt" 8755if test "x$ac_cv_func_crypt" = xyes 8756then : 8757 8758else $as_nop 8759 8760 # 8761 # No. Do we have it in -lcrypt? 8762 # 8763 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 8764printf %s "checking for crypt in -lcrypt... " >&6; } 8765if test ${ac_cv_lib_crypt_crypt+y} 8766then : 8767 printf %s "(cached) " >&6 8768else $as_nop 8769 ac_check_lib_save_LIBS=$LIBS 8770LIBS="-lcrypt $LIBS" 8771cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8772/* end confdefs.h. */ 8773 8774/* Override any GCC internal prototype to avoid an error. 8775 Use char because int might match the return type of a GCC 8776 builtin and then its argument prototype would still apply. */ 8777char crypt (); 8778int 8779main (void) 8780{ 8781return crypt (); 8782 ; 8783 return 0; 8784} 8785_ACEOF 8786if ac_fn_c_try_link "$LINENO" 8787then : 8788 ac_cv_lib_crypt_crypt=yes 8789else $as_nop 8790 ac_cv_lib_crypt_crypt=no 8791fi 8792rm -f core conftest.err conftest.$ac_objext conftest.beam \ 8793 conftest$ac_exeext conftest.$ac_ext 8794LIBS=$ac_check_lib_save_LIBS 8795fi 8796{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5 8797printf "%s\n" "$ac_cv_lib_crypt_crypt" >&6; } 8798if test "x$ac_cv_lib_crypt_crypt" = xyes 8799then : 8800 8801 # 8802 # Yes; add -lcrypt to the libraries for rpcapd. 8803 # 8804 RPCAPD_LIBS="$RPCAPD_LIBS -lcrypt" 8805 8806else $as_nop 8807 8808 as_fn_error $? "rpcapd requires crypt(), but we didn't find it" "$LINENO" 5 8809 8810fi 8811 8812 8813fi 8814 8815 8816 # 8817 # OK, we have crypt(). Do we have getspnam()? 8818 # 8819 ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam" 8820if test "x$ac_cv_func_getspnam" = xyes 8821then : 8822 printf "%s\n" "#define HAVE_GETSPNAM 1" >>confdefs.h 8823 8824fi 8825 8826 8827 # 8828 # Check for various members of struct msghdr. 8829 # 8830 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" " 8831 #include \"ftmacros.h\" 8832 #include <sys/socket.h> 8833 8834" 8835if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes 8836then : 8837 8838printf "%s\n" "#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1" >>confdefs.h 8839 8840 8841fi 8842 8843 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_flags" "ac_cv_member_struct_msghdr_msg_flags" " 8844 #include \"ftmacros.h\" 8845 #include <sys/socket.h> 8846 8847" 8848if test "x$ac_cv_member_struct_msghdr_msg_flags" = xyes 8849then : 8850 8851printf "%s\n" "#define HAVE_STRUCT_MSGHDR_MSG_FLAGS 1" >>confdefs.h 8852 8853 8854fi 8855 8856 8857 # 8858 # Optionally, we may want to support SSL. 8859 # Check for OpenSSL/libressl. 8860 # 8861 # First, try looking for it with pkg-config, if we have it. 8862 # 8863 # Homebrew's pkg-config does not, by default, look for 8864 # pkg-config files for packages it has installed. 8865 # Furthermore, at least for OpenSSL, they appear to be 8866 # dumped in package-specific directories whose paths are 8867 # not only package-specific but package-version-specific. 8868 # 8869 # So the only way to find openssl is to get the value of 8870 # PKG_CONFIG_PATH from "brew --env openssl" and add that 8871 # to PKG_CONFIG_PATH. (No, we can't just assume it's under 8872 # /usr/local; Homebrew have conveniently chosen to put it 8873 # under /opt/homebrew on ARM.) 8874 # 8875 # That's the nice thing about Homebrew - it makes things easier! 8876 # Thanks! 8877 # 8878 save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH" 8879 if test -n "$BREW"; then 8880 openssl_pkgconfig_dir=`$BREW --env --plain openssl | sed -n 's/PKG_CONFIG_PATH: //p'` 8881 PKG_CONFIG_PATH="$openssl_pkgconfig_dir:$PKG_CONFIG_PATH" 8882 fi 8883 8884{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl with pkg-config" >&5 8885printf %s "checking for openssl with pkg-config... " >&6; } 8886if test -n "$PKG_CONFIG"; then 8887 8888 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 8889 ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 8890 ac_status=$? 8891 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 8892 test $ac_status = 0; }; then 8893 # 8894 # The package was found, so try to get its C flags and 8895 # libraries. 8896 # 8897 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5 8898printf "%s\n" "found" >&6; } 8899 if test ! -n "$OPENSSL_CFLAGS"; then 8900 OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null` 8901 if test "x$?" != "x0"; then 8902 # 8903 # That failed - report an error. 8904 # Re-run the command, telling pkg-config to print an error 8905 # message, capture the error message, and report it. 8906 # This causes the configuration script to fail, as it means 8907 # the script is almost certainly doing something wrong. 8908 # 8909 8910if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8911 _pkg_short_errors_supported=yes 8912else 8913 _pkg_short_errors_supported=no 8914fi 8915 if test $_pkg_short_errors_supported = yes; then 8916 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --cflags "openssl" 2>&1` 8917 else 8918 _pkg_error_string=`$PKG_CONFIG --print-errors --cflags "openssl" 2>&1` 8919 fi 8920 as_fn_error $? "$PKG_CONFIG --cflags \"openssl\" failed: $_pkg_error_string" "$LINENO" 5 8921 fi 8922 fi 8923 if test ! -n "$OPENSSL_LIBS"; then 8924 OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null` 8925 if test "x$?" != "x0"; then 8926 # 8927 # That failed - report an error. 8928 # Re-run the command, telling pkg-config to print an error 8929 # message, capture the error message, and report it. 8930 # This causes the configuration script to fail, as it means 8931 # the script is almost certainly doing something wrong. 8932 # 8933 8934if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8935 _pkg_short_errors_supported=yes 8936else 8937 _pkg_short_errors_supported=no 8938fi 8939 if test $_pkg_short_errors_supported = yes; then 8940 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs "openssl" 2>&1` 8941 else 8942 _pkg_error_string=`$PKG_CONFIG --print-errors --libs "openssl" 2>&1` 8943 fi 8944 as_fn_error $? "$PKG_CONFIG --libs \"openssl\" failed: $_pkg_error_string" "$LINENO" 5 8945 fi 8946 fi 8947 if test ! -n "$OPENSSL_LIBS_STATIC"; then 8948 OPENSSL_LIBS_STATIC=`$PKG_CONFIG --libs --static "openssl" 2>/dev/null` 8949 if test "x$?" != "x0"; then 8950 # 8951 # That failed - report an error. 8952 # Re-run the command, telling pkg-config to print an error 8953 # message, capture the error message, and report it. 8954 # This causes the configuration script to fail, as it means 8955 # the script is almost certainly doing something wrong. 8956 # 8957 8958if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8959 _pkg_short_errors_supported=yes 8960else 8961 _pkg_short_errors_supported=no 8962fi 8963 if test $_pkg_short_errors_supported = yes; then 8964 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs --static "openssl" 2>&1` 8965 else 8966 _pkg_error_string=`$PKG_CONFIG --print-errors --libs --static "openssl" 2>&1` 8967 fi 8968 as_fn_error $? "$PKG_CONFIG --libs --static \"openssl\" failed: $_pkg_error_string" "$LINENO" 5 8969 fi 8970 fi 8971 8972 # 8973 # We found OpenSSL/libressl. 8974 # 8975 HAVE_OPENSSL=yes 8976 REQUIRES_PRIVATE="$REQUIRES_PRIVATE openssl" 8977 8978 else 8979 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 8980printf "%s\n" "not found" >&6; } 8981 : 8982 fi 8983else 8984 # No pkg-config, so obviously not found with pkg-config. 8985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config not found" >&5 8986printf "%s\n" "pkg-config not found" >&6; } 8987 : 8988fi 8989 8990 PKG_CONFIG_PATH="$save_PKG_CONFIG_PATH" 8991 8992 # 8993 # If it wasn't found, and we have Homebrew installed, see 8994 # if it's in Homebrew. 8995 # 8996 if test "x$HAVE_OPENSSL" != "xyes" -a -n "$BREW"; then 8997 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl in Homebrew" >&5 8998printf %s "checking for openssl in Homebrew... " >&6; } 8999 # 9000 # The brew man page lies when it speaks of 9001 # $BREW --prefix --installed <formula> 9002 # outputting nothing. In Homebrew 3.3.16, 9003 # it produces output regardless of whether 9004 # the formula is installed or not, so we 9005 # send the standard output and error to 9006 # the bit bucket. 9007 # 9008 if $BREW --prefix --installed openssl >/dev/null 2>&1; then 9009 # 9010 # Yes. Get the include directory and library 9011 # directory. (No, we can't just assume it's 9012 # under /usr/local; Homebrew have conveniently 9013 # chosen to put it under /opt/homebrew on ARM.) 9014 # 9015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9016printf "%s\n" "yes" >&6; } 9017 HAVE_OPENSSL=yes 9018 openssl_path=`$BREW --prefix openssl` 9019 OPENSSL_CFLAGS="-I$openssl_path/include" 9020 OPENSSL_LIBS="-L$openssl_path/lib -lssl -lcrypto" 9021 OPENSSL_LIBS_STATIC="-L$openssl_path/lib -lssl -lcrypto" 9022 OPENSSL_LIBS_PRIVATE="-L$openssl_path/lib -lssl -lcrypto" 9023 else 9024 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9025printf "%s\n" "no" >&6; } 9026 fi 9027 fi 9028 9029 # 9030 # If it wasn't found, and /usr/local/include and /usr/local/lib 9031 # exist, check if it's in /usr/local. (We check whether they 9032 # exist because, if they don't exist, the compiler will warn 9033 # about that and then ignore the argument, so they test 9034 # using just the system header files and libraries.) 9035 # 9036 # We include the standard include file to 1) make sure that 9037 # it's installed (if it's just a shared library for the 9038 # benefit of existing programs, that's not useful) and 2) 9039 # because SSL_library_init() is a library routine in some 9040 # versions and a #defined wrapper around OPENSSL_init_ssl() 9041 # in others. 9042 # 9043 if test "x$HAVE_OPENSSL" != "xyes" -a -d "/usr/local/include" -a -d "/usr/local/lib"; then 9044 9045 save_CFLAGS="$CFLAGS" 9046 save_LIBS="$LIBS" 9047 save_LDFLAGS="$LDFLAGS" 9048 9049 CFLAGS="$CFLAGS -I/usr/local/include" 9050 LIBS="$LIBS -L/usr/local/lib -lssl -lcrypto" 9051 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have OpenSSL/libressl in /usr/local that we can use" >&5 9052printf %s "checking whether we have OpenSSL/libressl in /usr/local that we can use... " >&6; } 9053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9054/* end confdefs.h. */ 9055 9056#include <openssl/ssl.h> 9057 9058int 9059main (void) 9060{ 9061 9062SSL_library_init(); 9063return 0; 9064 9065 ; 9066 return 0; 9067} 9068_ACEOF 9069if ac_fn_c_try_link "$LINENO" 9070then : 9071 9072 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9073printf "%s\n" "yes" >&6; } 9074 HAVE_OPENSSL=yes 9075 OPENSSL_CFLAGS="-I/usr/local/include" 9076 OPENSSL_LIBS="-L/usr/local/lib -lssl -lcrypto" 9077 OPENSSL_LIBS_STATIC="-L/usr/local/lib -lssl -lcrypto" 9078 OPENSSL_LIBS_PRIVATE="-L/usr/local/lib -lssl -lcrypto" 9079 9080else $as_nop 9081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9082printf "%s\n" "no" >&6; } 9083fi 9084rm -f core conftest.err conftest.$ac_objext conftest.beam \ 9085 conftest$ac_exeext conftest.$ac_ext 9086 9087 CFLAGS="$save_CFLAGS" 9088 LIBS="$save_LIBS" 9089 LDFLAGS="$save_LDFLAGS" 9090 9091 fi 9092 9093 # 9094 # If it wasn't found, check if it's a system library. 9095 # 9096 # We include the standard include file to 1) make sure that 9097 # it's installed (if it's just a shared library for the 9098 # benefit of existing programs, that's not useful) and 2) 9099 # because SSL_library_init() is a library routine in some 9100 # versions and a #defined wrapper around OPENSSL_init_ssl() 9101 # in others. 9102 # 9103 if test "x$HAVE_OPENSSL" != "xyes"; then 9104 9105 save_CFLAGS="$CFLAGS" 9106 save_LIBS="$LIBS" 9107 save_LDFLAGS="$LDFLAGS" 9108 9109 LIBS="$LIBS -lssl -lcrypto" 9110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have a system OpenSSL/libressl that we can use" >&5 9111printf %s "checking whether we have a system OpenSSL/libressl that we can use... " >&6; } 9112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9113/* end confdefs.h. */ 9114 9115#include <openssl/ssl.h> 9116 9117int 9118main (void) 9119{ 9120 9121SSL_library_init(); 9122return 0; 9123 9124 ; 9125 return 0; 9126} 9127_ACEOF 9128if ac_fn_c_try_link "$LINENO" 9129then : 9130 9131 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9132printf "%s\n" "yes" >&6; } 9133 HAVE_OPENSSL=yes 9134 OPENSSL_LIBS="-lssl -lcrypto" 9135 OPENSSL_LIBS_STATIC="-lssl -lcrypto" 9136 OPENSSL_LIBS_PRIVATE="-lssl -lcrypto" 9137 9138else $as_nop 9139 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9140printf "%s\n" "no" >&6; } 9141fi 9142rm -f core conftest.err conftest.$ac_objext conftest.beam \ 9143 conftest$ac_exeext conftest.$ac_ext 9144 9145 CFLAGS="$save_CFLAGS" 9146 LIBS="$save_LIBS" 9147 LDFLAGS="$save_LDFLAGS" 9148 9149 fi 9150 9151 # 9152 # OK, did we find it? 9153 # 9154 if test "x$HAVE_OPENSSL" = "xyes"; then 9155 9156printf "%s\n" "#define HAVE_OPENSSL 1" >>confdefs.h 9157 9158 V_INCLS="$V_INCLS $OPENSSL_CFLAGS" 9159 ADDITIONAL_LIBS="$ADDITIONAL_LIBS $OPENSSL_LIBS" 9160 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $OPENSSL_LIBS_STATIC" 9161 LIBS_PRIVATE="$LIBS_PRIVATE $OPENSSL_LIBS_PRIVATE" 9162 REQUIRES_PRIVATE="$REQUIRES_PRIVATE $OPENSSL_REQUIRES_PRIVATE" 9163 REMOTE_C_SRC="$REMOTE_C_SRC sslutils.c" 9164 else 9165 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL not found" >&5 9166printf "%s\n" "$as_me: OpenSSL not found" >&6;} 9167 fi 9168 9169 9170printf "%s\n" "#define ENABLE_REMOTE /**/" >>confdefs.h 9171 9172 REMOTE_C_SRC="$REMOTE_C_SRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c" 9173 BUILD_RPCAPD=build-rpcapd 9174 INSTALL_RPCAPD=install-rpcapd 9175 ;; 9176*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9177printf "%s\n" "no" >&6; } 9178 ;; 9179esac 9180 9181{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build optimizer debugging code" >&5 9182printf %s "checking whether to build optimizer debugging code... " >&6; } 9183# Check whether --enable-optimizer-dbg was given. 9184if test ${enable_optimizer_dbg+y} 9185then : 9186 enableval=$enable_optimizer_dbg; 9187fi 9188 9189if test "$enable_optimizer_dbg" = "yes"; then 9190 9191printf "%s\n" "#define BDEBUG 1" >>confdefs.h 9192 9193fi 9194{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${enable_optimizer_dbg-no}" >&5 9195printf "%s\n" "${enable_optimizer_dbg-no}" >&6; } 9196 9197{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build parser debugging code" >&5 9198printf %s "checking whether to build parser debugging code... " >&6; } 9199# Check whether --enable-yydebug was given. 9200if test ${enable_yydebug+y} 9201then : 9202 enableval=$enable_yydebug; 9203fi 9204 9205if test "$enable_yydebug" = "yes"; then 9206 9207printf "%s\n" "#define YYDEBUG 1" >>confdefs.h 9208 9209fi 9210{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${enable_yydebug-no}" >&5 9211printf "%s\n" "${enable_yydebug-no}" >&6; } 9212 9213# 9214# Look for {f}lex. 9215# 9216for ac_prog in flex lex 9217do 9218 # Extract the first word of "$ac_prog", so it can be a program name with args. 9219set dummy $ac_prog; ac_word=$2 9220{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9221printf %s "checking for $ac_word... " >&6; } 9222if test ${ac_cv_prog_LEX+y} 9223then : 9224 printf %s "(cached) " >&6 9225else $as_nop 9226 if test -n "$LEX"; then 9227 ac_cv_prog_LEX="$LEX" # Let the user override the test. 9228else 9229as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9230for as_dir in $PATH 9231do 9232 IFS=$as_save_IFS 9233 case $as_dir in #((( 9234 '') as_dir=./ ;; 9235 */) ;; 9236 *) as_dir=$as_dir/ ;; 9237 esac 9238 for ac_exec_ext in '' $ac_executable_extensions; do 9239 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 9240 ac_cv_prog_LEX="$ac_prog" 9241 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 9242 break 2 9243 fi 9244done 9245 done 9246IFS=$as_save_IFS 9247 9248fi 9249fi 9250LEX=$ac_cv_prog_LEX 9251if test -n "$LEX"; then 9252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 9253printf "%s\n" "$LEX" >&6; } 9254else 9255 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9256printf "%s\n" "no" >&6; } 9257fi 9258 9259 9260 test -n "$LEX" && break 9261done 9262test -n "$LEX" || LEX=":" 9263 9264 if test "x$LEX" != "x:"; then 9265 cat >conftest.l <<_ACEOF 9266%{ 9267#ifdef __cplusplus 9268extern "C" 9269#endif 9270int yywrap(void); 9271%} 9272%% 9273a { ECHO; } 9274b { REJECT; } 9275c { yymore (); } 9276d { yyless (1); } 9277e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ 9278#ifdef __cplusplus 9279 yyless ((yyinput () != 0)); 9280#else 9281 yyless ((input () != 0)); 9282#endif 9283 } 9284f { unput (yytext[0]); } 9285. { BEGIN INITIAL; } 9286%% 9287#ifdef YYTEXT_POINTER 9288extern char *yytext; 9289#endif 9290int 9291yywrap (void) 9292{ 9293 return 1; 9294} 9295int 9296main (void) 9297{ 9298 return ! yylex (); 9299} 9300_ACEOF 9301{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5 9302printf %s "checking for lex output file root... " >&6; } 9303if test ${ac_cv_prog_lex_root+y} 9304then : 9305 printf %s "(cached) " >&6 9306else $as_nop 9307 9308ac_cv_prog_lex_root=unknown 9309{ { ac_try="$LEX conftest.l" 9310case "(($ac_try" in 9311 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9312 *) ac_try_echo=$ac_try;; 9313esac 9314eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 9315printf "%s\n" "$ac_try_echo"; } >&5 9316 (eval "$LEX conftest.l") 2>&5 9317 ac_status=$? 9318 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 9319 test $ac_status = 0; } && 9320if test -f lex.yy.c; then 9321 ac_cv_prog_lex_root=lex.yy 9322elif test -f lexyy.c; then 9323 ac_cv_prog_lex_root=lexyy 9324fi 9325fi 9326{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 9327printf "%s\n" "$ac_cv_prog_lex_root" >&6; } 9328if test "$ac_cv_prog_lex_root" = unknown 9329then : 9330 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5 9331printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;} 9332 LEX=: LEXLIB= 9333fi 9334LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root 9335 9336if test ${LEXLIB+y} 9337then : 9338 9339else $as_nop 9340 9341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5 9342printf %s "checking for lex library... " >&6; } 9343if test ${ac_cv_lib_lex+y} 9344then : 9345 printf %s "(cached) " >&6 9346else $as_nop 9347 9348 ac_save_LIBS="$LIBS" 9349 ac_found=false 9350 for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do 9351 case $ac_cv_lib_lex in #( 9352 'none needed') : 9353 ;; #( 9354 'not found') : 9355 break ;; #( 9356 *) : 9357 LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #( 9358 *) : 9359 ;; 9360esac 9361 9362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9363/* end confdefs.h. */ 9364`cat $LEX_OUTPUT_ROOT.c` 9365_ACEOF 9366if ac_fn_c_try_link "$LINENO" 9367then : 9368 ac_found=: 9369fi 9370rm -f core conftest.err conftest.$ac_objext conftest.beam \ 9371 conftest$ac_exeext conftest.$ac_ext 9372 if $ac_found; then 9373 break 9374 fi 9375 done 9376 LIBS="$ac_save_LIBS" 9377 9378fi 9379{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 9380printf "%s\n" "$ac_cv_lib_lex" >&6; } 9381 if test "$ac_cv_lib_lex" = 'not found' 9382then : 9383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5 9384printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;} 9385 LEX=: LEXLIB= 9386elif test "$ac_cv_lib_lex" = 'none needed' 9387then : 9388 LEXLIB='' 9389else $as_nop 9390 LEXLIB=$ac_cv_lib_lex 9391fi 9392 ac_save_LIBS="$LIBS" 9393 LIBS= 9394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing yywrap" >&5 9395printf %s "checking for library containing yywrap... " >&6; } 9396if test ${ac_cv_search_yywrap+y} 9397then : 9398 printf %s "(cached) " >&6 9399else $as_nop 9400 ac_func_search_save_LIBS=$LIBS 9401cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9402/* end confdefs.h. */ 9403 9404/* Override any GCC internal prototype to avoid an error. 9405 Use char because int might match the return type of a GCC 9406 builtin and then its argument prototype would still apply. */ 9407char yywrap (); 9408int 9409main (void) 9410{ 9411return yywrap (); 9412 ; 9413 return 0; 9414} 9415_ACEOF 9416for ac_lib in '' fl l 9417do 9418 if test -z "$ac_lib"; then 9419 ac_res="none required" 9420 else 9421 ac_res=-l$ac_lib 9422 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 9423 fi 9424 if ac_fn_c_try_link "$LINENO" 9425then : 9426 ac_cv_search_yywrap=$ac_res 9427fi 9428rm -f core conftest.err conftest.$ac_objext conftest.beam \ 9429 conftest$ac_exeext 9430 if test ${ac_cv_search_yywrap+y} 9431then : 9432 break 9433fi 9434done 9435if test ${ac_cv_search_yywrap+y} 9436then : 9437 9438else $as_nop 9439 ac_cv_search_yywrap=no 9440fi 9441rm conftest.$ac_ext 9442LIBS=$ac_func_search_save_LIBS 9443fi 9444{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_yywrap" >&5 9445printf "%s\n" "$ac_cv_search_yywrap" >&6; } 9446ac_res=$ac_cv_search_yywrap 9447if test "$ac_res" != no 9448then : 9449 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 9450 LEXLIB="$LIBS" 9451fi 9452 9453 LIBS="$ac_save_LIBS" 9454fi 9455 9456 9457if test "$LEX" != : 9458then : 9459 9460{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 9461printf %s "checking whether yytext is a pointer... " >&6; } 9462if test ${ac_cv_prog_lex_yytext_pointer+y} 9463then : 9464 printf %s "(cached) " >&6 9465else $as_nop 9466 # POSIX says lex can declare yytext either as a pointer or an array; the 9467# default is implementation-dependent. Figure out which it is, since 9468# not all implementations provide the %pointer and %array declarations. 9469ac_cv_prog_lex_yytext_pointer=no 9470cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9471/* end confdefs.h. */ 9472 9473 #define YYTEXT_POINTER 1 9474`cat $LEX_OUTPUT_ROOT.c` 9475_ACEOF 9476if ac_fn_c_try_compile "$LINENO" 9477then : 9478 ac_cv_prog_lex_yytext_pointer=yes 9479fi 9480rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 9481 9482fi 9483{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 9484printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; } 9485if test $ac_cv_prog_lex_yytext_pointer = yes; then 9486 9487printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h 9488 9489fi 9490 9491fi 9492rm -f conftest.l $LEX_OUTPUT_ROOT.c 9493 9494fi 9495if test "$LEX" = ":"; then 9496 as_fn_error $? "Neither flex nor lex was found." "$LINENO" 5 9497fi 9498 9499# 9500# Make sure {f}lex supports the -P, --header-file, and --nounput flags 9501# and supports processing our scanner.l. 9502# 9503{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for capable lex" >&5 9504printf %s "checking for capable lex... " >&6; } 9505if test ${tcpdump_cv_capable_lex+y} 9506then : 9507 printf %s "(cached) " >&6 9508else $as_nop 9509 if $LEX -P pcap_ --header-file=/dev/null --nounput -t $srcdir/scanner.l > /dev/null 2>&1; then 9510 tcpdump_cv_capable_lex=yes 9511 else 9512 tcpdump_cv_capable_lex=insufficient 9513 fi 9514fi 9515{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_lex" >&5 9516printf "%s\n" "$tcpdump_cv_capable_lex" >&6; } 9517if test $tcpdump_cv_capable_lex = insufficient ; then 9518 as_fn_error $? "$LEX is insufficient to compile libpcap. 9519 libpcap requires Flex 2.5.31 or later, or a compatible version of lex. 9520 If a suitable version of Lex/Flex is available as a non-standard command 9521 and/or not in the PATH, you can specify it using the LEX environment 9522 variable. That said, on some systems the error can mean that Flex/Lex is 9523 actually acceptable, but m4 is not. Likewise, if a suitable version of 9524 m4 (such as GNU M4) is available but has not been detected, you can 9525 specify it using the M4 environment variable." "$LINENO" 5 9526fi 9527 9528# 9529# Look for yacc/bison/byacc. 9530# If it's Bison, we do not want -y, as 1) we will be using -o to cause 9531# the output for XXX.y to be written to XXX.c and 2) we don't want 9532# it to issue warnings about stuff not supported by POSIX YACC - we 9533# want to use that stuff, and don't care whether plain YACC supports 9534# it or not, we require either Bison or Berkeley YACC. 9535# 9536BISON_BYACC="" 9537# 9538# Look for Bison. 9539# 9540for ac_prog in bison 9541do 9542 # Extract the first word of "$ac_prog", so it can be a program name with args. 9543set dummy $ac_prog; ac_word=$2 9544{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9545printf %s "checking for $ac_word... " >&6; } 9546if test ${ac_cv_prog_BISON_BYACC+y} 9547then : 9548 printf %s "(cached) " >&6 9549else $as_nop 9550 if test -n "$BISON_BYACC"; then 9551 ac_cv_prog_BISON_BYACC="$BISON_BYACC" # Let the user override the test. 9552else 9553as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9554for as_dir in $PATH 9555do 9556 IFS=$as_save_IFS 9557 case $as_dir in #((( 9558 '') as_dir=./ ;; 9559 */) ;; 9560 *) as_dir=$as_dir/ ;; 9561 esac 9562 for ac_exec_ext in '' $ac_executable_extensions; do 9563 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 9564 ac_cv_prog_BISON_BYACC="$ac_prog" 9565 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 9566 break 2 9567 fi 9568done 9569 done 9570IFS=$as_save_IFS 9571 9572fi 9573fi 9574BISON_BYACC=$ac_cv_prog_BISON_BYACC 9575if test -n "$BISON_BYACC"; then 9576 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BISON_BYACC" >&5 9577printf "%s\n" "$BISON_BYACC" >&6; } 9578else 9579 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9580printf "%s\n" "no" >&6; } 9581fi 9582 9583 9584 test -n "$BISON_BYACC" && break 9585done 9586 9587if test x"$BISON_BYACC" != x; then 9588 # 9589 # We found Bison. 9590 # 9591 # Bison prior to 2.4(.1) doesn't support "%define api.pure", so use 9592 # "%pure-parser". 9593 # 9594 bison_major_version=`$BISON_BYACC -V | sed -n 's/.* \([1-9][0-9]*\)\.[0-9][0-9.]*/\1/p'` 9595 bison_minor_version=`$BISON_BYACC -V | sed -n 's/.* [1-9][0-9]*\.\([0-9]+\).*/\1/p'` 9596 if test "$bison_major_version" -lt 2 -o \ 9597 \( "$bison_major_version" -eq 2 -a "$bison_major_version" -lt 4 \) 9598 then 9599 REENTRANT_PARSER="%pure-parser" 9600 else 9601 REENTRANT_PARSER="%define api.pure" 9602 fi 9603else 9604 # 9605 # We didn't find Bison; check for Berkeley YACC, under the 9606 # names byacc and yacc. 9607 # 9608 for ac_prog in byacc yacc 9609do 9610 # Extract the first word of "$ac_prog", so it can be a program name with args. 9611set dummy $ac_prog; ac_word=$2 9612{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9613printf %s "checking for $ac_word... " >&6; } 9614if test ${ac_cv_prog_BISON_BYACC+y} 9615then : 9616 printf %s "(cached) " >&6 9617else $as_nop 9618 if test -n "$BISON_BYACC"; then 9619 ac_cv_prog_BISON_BYACC="$BISON_BYACC" # Let the user override the test. 9620else 9621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9622for as_dir in $PATH 9623do 9624 IFS=$as_save_IFS 9625 case $as_dir in #((( 9626 '') as_dir=./ ;; 9627 */) ;; 9628 *) as_dir=$as_dir/ ;; 9629 esac 9630 for ac_exec_ext in '' $ac_executable_extensions; do 9631 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 9632 ac_cv_prog_BISON_BYACC="$ac_prog" 9633 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 9634 break 2 9635 fi 9636done 9637 done 9638IFS=$as_save_IFS 9639 9640fi 9641fi 9642BISON_BYACC=$ac_cv_prog_BISON_BYACC 9643if test -n "$BISON_BYACC"; then 9644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BISON_BYACC" >&5 9645printf "%s\n" "$BISON_BYACC" >&6; } 9646else 9647 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9648printf "%s\n" "no" >&6; } 9649fi 9650 9651 9652 test -n "$BISON_BYACC" && break 9653done 9654 9655 if test x"$BISON_BYACC" != x; then 9656 # 9657 # Make sure this is Berkeley YACC, not AT&T YACC; 9658 # the latter doesn't support reentrant parsers. 9659 # Run it with "-V"; that succeeds and reports the 9660 # version number with Berkeley YACC, but will 9661 # (probably) fail with various vendor flavors 9662 # of AT&T YACC. 9663 # 9664 # Hopefully this also eliminates any versions 9665 # of Berkeley YACC that don't support reentrant 9666 # parsers, if there are any. 9667 # 9668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for capable yacc" >&5 9669printf %s "checking for capable yacc... " >&6; } 9670if test ${tcpdump_cv_capable_yacc+y} 9671then : 9672 printf %s "(cached) " >&6 9673else $as_nop 9674 if $BISON_BYACC -V >/dev/null 2>&1; then 9675 tcpdump_cv_capable_yacc=yes 9676 else 9677 tcpdump_cv_capable_yacc=insufficient 9678 fi 9679fi 9680{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_yacc" >&5 9681printf "%s\n" "$tcpdump_cv_capable_yacc" >&6; } 9682 if test $tcpdump_cv_capable_yacc = insufficient ; then 9683 as_fn_error $? "$BISON_BYACC is insufficient to compile libpcap. 9684 libpcap requires Bison, a newer version of Berkeley YACC with support 9685 for reentrant parsers, or another YACC compatible with them." "$LINENO" 5 9686 fi 9687 else 9688 # 9689 # OK, we found neither byacc nor yacc. 9690 # 9691 as_fn_error $? "Neither bison, byacc, nor yacc was found. 9692 libpcap requires Bison, a newer version of Berkeley YACC with support 9693 for reentrant parsers, or another YACC compatible with them." "$LINENO" 5 9694 fi 9695 9696 # 9697 # Berkeley YACC doesn't support "%define api.pure", so use 9698 # "%pure-parser". 9699 # 9700 REENTRANT_PARSER="%pure-parser" 9701fi 9702 9703 9704 9705# 9706# Do various checks for various OSes and versions of those OSes. 9707# 9708# Assume, by default, no support for shared libraries and V7/BSD 9709# convention for man pages (devices in section 4, file formats in 9710# section 5, miscellaneous info in section 7, administrative commands 9711# and daemons in section 8). Individual cases can override this. 9712# 9713DYEXT="none" 9714MAN_DEVICES=4 9715MAN_FILE_FORMATS=5 9716MAN_MISC_INFO=7 9717MAN_ADMIN_COMMANDS=8 9718case "$host_os" in 9719 9720aix*) 9721 9722printf "%s\n" "#define _SUN 1" >>confdefs.h 9723 9724 9725 # 9726 # AIX makes it fun to build shared and static libraries, 9727 # because they're *both* ".a" archive libraries. We 9728 # build the static library for the benefit of the traditional 9729 # scheme of building libpcap and tcpdump in subdirectories of 9730 # the same directory, with tcpdump statically linked with the 9731 # libpcap in question, but we also build a shared library as 9732 # "libpcap.shareda" and install *it*, rather than the static 9733 # library, as "libpcap.a". 9734 # 9735 DYEXT="shareda" 9736 9737 case "$V_PCAP" in 9738 9739 dlpi) 9740 # 9741 # If we're using DLPI, applications will need to 9742 # use /lib/pse.exp if present, as we use the 9743 # STREAMS routines. 9744 # 9745 pseexe="/lib/pse.exp" 9746 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5 9747printf %s "checking for $pseexe... " >&6; } 9748 if test -f $pseexe ; then 9749 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9750printf "%s\n" "yes" >&6; } 9751 LIBS="-I:$pseexe" 9752 fi 9753 ;; 9754 9755 bpf) 9756 # 9757 # If we're using BPF, we need "-lodm" and "-lcfg", as 9758 # we use them to load the BPF module. 9759 # 9760 LIBS="-lodm -lcfg" 9761 ;; 9762 esac 9763 ;; 9764 9765darwin*) 9766 DYEXT="dylib" 9767 V_CCOPT="$V_CCOPT -fno-common" 9768 # Check whether --enable-universal was given. 9769if test ${enable_universal+y} 9770then : 9771 enableval=$enable_universal; 9772fi 9773 9774 if test "$enable_universal" != "no"; then 9775 case "$host_os" in 9776 9777 darwin[0-7].*) 9778 # 9779 # Pre-Tiger. Build only for 32-bit PowerPC; no 9780 # need for any special compiler or linker flags. 9781 # 9782 ;; 9783 9784 darwin8.[0123]|darwin8.[0123].*) 9785 # 9786 # Tiger, prior to Intel support. Build 9787 # libraries and executables for 32-bit PowerPC 9788 # and 64-bit PowerPC, with 32-bit PowerPC first. 9789 # (I'm guessing that's what Apple does.) 9790 # 9791 # (The double brackets are needed because 9792 # autotools/m4 use brackets as a quoting 9793 # character; the double brackets turn into 9794 # single brackets in the generated configure 9795 # file.) 9796 # 9797 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64" 9798 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64" 9799 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64" 9800 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64" 9801 ;; 9802 9803 darwin8.[456]|darwin8.[456].*) 9804 # 9805 # Tiger, subsequent to Intel support but prior 9806 # to x86-64 support. Build libraries and 9807 # executables for 32-bit PowerPC, 64-bit 9808 # PowerPC, and 32-bit x86, with 32-bit PowerPC 9809 # first. (I'm guessing that's what Apple does.) 9810 # 9811 # (The double brackets are needed because 9812 # autotools/m4 use brackets as a quoting 9813 # character; the double brackets turn into 9814 # single brackets in the generated configure 9815 # file.) 9816 # 9817 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386" 9818 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386" 9819 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386" 9820 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386" 9821 ;; 9822 9823 darwin8.*) 9824 # 9825 # All other Tiger, so subsequent to x86-64 9826 # support. Build libraries and executables for 9827 # 32-bit PowerPC, 64-bit PowerPC, 32-bit x86, 9828 # and x86-64, with 32-bit PowerPC first. (I'm 9829 # guessing that's what Apple does.) 9830 # 9831 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64" 9832 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64" 9833 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64" 9834 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64" 9835 ;; 9836 9837 darwin9.*) 9838 # 9839 # Leopard. Build libraries for 32-bit PowerPC, 9840 # 64-bit PowerPC, 32-bit x86, and x86-64, with 9841 # 32-bit PowerPC first, and build executables 9842 # for 32-bit x86 and 32-bit PowerPC, with 32-bit 9843 # x86 first. (That's what Apple does.) 9844 # 9845 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64" 9846 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64" 9847 V_PROG_CCOPT_FAT="-arch i386 -arch ppc" 9848 V_PROG_LDFLAGS_FAT="-arch i386 -arch ppc" 9849 ;; 9850 9851 darwin10.*) 9852 # 9853 # Snow Leopard. Build libraries for x86-64, 9854 # 32-bit x86, and 32-bit PowerPC, with x86-64 9855 # first, and build executables for x86-64 and 9856 # 32-bit x86, with x86-64 first. (That's what 9857 # Apple does, even though Snow Leopard doesn't 9858 # run on PPC, so PPC libpcap runs under Rosetta, 9859 # and Rosetta doesn't support BPF ioctls, so PPC 9860 # programs can't do live captures.) 9861 # 9862 V_LIB_CCOPT_FAT="-arch x86_64 -arch i386 -arch ppc" 9863 V_LIB_LDFLAGS_FAT="-arch x86_64 -arch i386 -arch ppc" 9864 V_PROG_CCOPT_FAT="-arch x86_64 -arch i386" 9865 V_PROG_LDFLAGS_FAT="-arch x86_64 -arch i386" 9866 ;; 9867 9868 darwin1[1-8]*) 9869 # 9870 # Post-Snow Leopard, pre-Catalina. Build 9871 # libraries for x86-64 and 32-bit x86, with 9872 # x86-64 first, and build executables only for 9873 # x86-64. (That's what Apple does.) This 9874 # requires no special flags for programs. 9875 # 9876 # We check whether we *can* build for i386 and, 9877 # if not, suggest that the user install the 9878 # /usr/include headers if they want to build 9879 # fat. 9880 # 9881 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether building for 32-bit x86 is supported" >&5 9882printf %s "checking whether building for 32-bit x86 is supported... " >&6; } 9883 9884 save_CFLAGS="$CFLAGS" 9885 save_LIBS="$LIBS" 9886 save_LDFLAGS="$LDFLAGS" 9887 9888 CFLAGS="$CFLAGS -arch i386" 9889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9890/* end confdefs.h. */ 9891 9892int 9893main (void) 9894{ 9895return 0; 9896 ; 9897 return 0; 9898} 9899_ACEOF 9900if ac_fn_c_try_link "$LINENO" 9901then : 9902 9903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9904printf "%s\n" "yes" >&6; } 9905 V_LIB_CCOPT_FAT="-arch x86_64" 9906 V_LIB_LDFLAGS_FAT="-arch x86_64" 9907 9908 # 9909 # OpenSSL installation on macOS seems 9910 # to install only the libs for 64-bit 9911 # x86 - at least that's what Brew does: 9912 # only configure 32-bit builds if we 9913 # don't have OpenSSL. 9914 # 9915 if test "$HAVE_OPENSSL" != yes; then 9916 V_LIB_CCOPT_FAT="$V_LIB_CCOPT_FAT -arch i386" 9917 V_LIB_LDFLAGS_FAT="$V_LIB_LDFLAGS_FAT -arch i386" 9918 fi 9919 9920else $as_nop 9921 9922 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9923printf "%s\n" "no" >&6; } 9924 V_LIB_CCOPT_FAT="-arch x86_64" 9925 V_LIB_LDFLAGS_FAT="-arch x86_64" 9926 case "$host_os" in 9927 9928 darwin18.*) 9929 # 9930 # Mojave; you need to install the 9931 # /usr/include headers to get 9932 # 32-bit x86 builds to work. 9933 # 9934 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools and, after that, installing the /usr/include headers from the /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg package" >&5 9935printf "%s\n" "$as_me: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools and, after that, installing the /usr/include headers from the /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg package" >&2;} 9936 ;; 9937 9938 *) 9939 # 9940 # Pre-Mojave; the command-line 9941 # tools should be sufficient to 9942 # enable 32-bit x86 builds. 9943 # 9944 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&5 9945printf "%s\n" "$as_me: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&2;} 9946 ;; 9947 esac 9948 9949fi 9950rm -f core conftest.err conftest.$ac_objext conftest.beam \ 9951 conftest$ac_exeext conftest.$ac_ext 9952 9953 CFLAGS="$save_CFLAGS" 9954 LIBS="$save_LIBS" 9955 LDFLAGS="$save_LDFLAGS" 9956 9957 ;; 9958 9959 darwin19*) 9960 # 9961 # Catalina. Build libraries and executables 9962 # only for x86-64. (That's what Apple does; 9963 # 32-bit x86 binaries are not supported on 9964 # Catalina.) 9965 # 9966 V_LIB_CCOPT_FAT="-arch x86_64" 9967 V_LIB_LDFLAGS_FAT="-arch x86_64" 9968 V_PROG_CCOPT_FAT="-arch x86_64" 9969 V_PROG_LDFLAGS_FAT="-arch x86_64" 9970 ;; 9971 9972 darwin*) 9973 # 9974 # Post-Catalina. Build libraries and 9975 # executables for x86-64 and ARM64. 9976 # (That's what Apple does, except they 9977 # build for arm64e, which may include 9978 # some of the pointer-checking extensions.) 9979 # 9980 # If we're building with libssl, make sure 9981 # we can build fat with it (i.e., that it 9982 # was built fat); if we can't, don't set 9983 # the target architectures, and just 9984 # build for the host we're on. 9985 # 9986 # Otherwise, just add both of them. 9987 # 9988 if test "$HAVE_OPENSSL" = yes; then 9989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether building fat with libssl is supported" >&5 9990printf %s "checking whether building fat with libssl is supported... " >&6; } 9991 9992 save_CFLAGS="$CFLAGS" 9993 save_LIBS="$LIBS" 9994 save_LDFLAGS="$LDFLAGS" 9995 9996 CFLAGS="$CFLAGS -arch x86_64 -arch arm64" 9997 LDFLAGS="$LDFLAGS $OPENSSL_LIBS" 9998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9999/* end confdefs.h. */ 10000 10001 #include <openssl/ssl.h> 10002 10003int 10004main (void) 10005{ 10006 10007 SSL_library_init(); 10008 return 0; 10009 10010 ; 10011 return 0; 10012} 10013_ACEOF 10014if ac_fn_c_try_link "$LINENO" 10015then : 10016 10017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10018printf "%s\n" "yes" >&6; } 10019 V_LIB_CCOPT_FAT="-arch x86_64 -arch arm64" 10020 V_LIB_LDFLAGS_FAT="-arch x86_64 -arch arm64" 10021 V_PROG_CCOPT_FAT="-arch x86_64 -arch arm64" 10022 V_PROG_LDFLAGS_FAT="-arch x86_64 -arch arm64" 10023 10024else $as_nop 10025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10026printf "%s\n" "no" >&6; } 10027 10028fi 10029rm -f core conftest.err conftest.$ac_objext conftest.beam \ 10030 conftest$ac_exeext conftest.$ac_ext 10031 10032 CFLAGS="$save_CFLAGS" 10033 LIBS="$save_LIBS" 10034 LDFLAGS="$save_LDFLAGS" 10035 10036 else 10037 V_LIB_CCOPT_FAT="-arch x86_64 -arch arm64" 10038 V_LIB_LDFLAGS_FAT="-arch x86_64 -arch arm64" 10039 V_PROG_CCOPT_FAT="-arch x86_64 -arch arm64" 10040 V_PROG_LDFLAGS_FAT="-arch x86_64 -arch arm64" 10041 fi 10042 ;; 10043 esac 10044 fi 10045 ;; 10046 10047hpux9*) 10048 10049printf "%s\n" "#define HAVE_HPUX9 1" >>confdefs.h 10050 10051 10052 # 10053 # Use System V conventions for man pages. 10054 # 10055 MAN_ADMIN_COMMANDS=1m 10056 MAN_FILE_FORMATS=4 10057 MAN_MISC_INFO=5 10058 ;; 10059 10060hpux10.0*) 10061 10062 # 10063 # Use System V conventions for man pages. 10064 # 10065 MAN_ADMIN_COMMANDS=1m 10066 MAN_FILE_FORMATS=4 10067 MAN_MISC_INFO=5 10068 ;; 10069 10070hpux10.1*) 10071 10072 # 10073 # Use System V conventions for man pages. 10074 # 10075 MAN_ADMIN_COMMANDS=1m 10076 MAN_FILE_FORMATS=4 10077 MAN_MISC_INFO=5 10078 ;; 10079 10080hpux*) 10081 10082printf "%s\n" "#define HAVE_HPUX10_20_OR_LATER 1" >>confdefs.h 10083 10084 if test "`uname -m`" = "ia64"; then 10085 DYEXT="so" 10086 else 10087 DYEXT="sl" 10088 fi 10089 10090 # 10091 # "-b" builds a shared library; "+h" sets the soname. 10092 # 10093 SHLIB_OPT="-b" 10094 SONAME_OPT="+h" 10095 10096 # 10097 # Use System V conventions for man pages. 10098 # 10099 MAN_FILE_FORMATS=4 10100 MAN_MISC_INFO=5 10101 ;; 10102 10103irix*) 10104 # 10105 # Use IRIX conventions for man pages; they're the same as the 10106 # System V conventions, except that they use section 8 for 10107 # administrative commands and daemons. 10108 # 10109 MAN_FILE_FORMATS=4 10110 MAN_MISC_INFO=5 10111 ;; 10112 10113linux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*|haiku*|midipix*) 10114 DYEXT="so" 10115 ;; 10116 10117osf*) 10118 DYEXT="so" 10119 10120 # 10121 # DEC OSF/1, a/k/a Digital UNIX, a/k/a Tru64 UNIX. 10122 # Use Tru64 UNIX conventions for man pages; they're the same as 10123 # the System V conventions except that they use section 8 for 10124 # administrative commands and daemons. 10125 # 10126 MAN_FILE_FORMATS=4 10127 MAN_MISC_INFO=5 10128 MAN_DEVICES=7 10129 ;; 10130 10131sinix*) 10132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if SINIX compiler defines sinix" >&5 10133printf %s "checking if SINIX compiler defines sinix... " >&6; } 10134 if test ${ac_cv_cc_sinix_defined+y} 10135then : 10136 printf %s "(cached) " >&6 10137else $as_nop 10138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10139/* end confdefs.h. */ 10140 10141int 10142main (void) 10143{ 10144int i = sinix; 10145 ; 10146 return 0; 10147} 10148_ACEOF 10149if ac_fn_c_try_compile "$LINENO" 10150then : 10151 ac_cv_cc_sinix_defined=yes 10152else $as_nop 10153 ac_cv_cc_sinix_defined=no 10154fi 10155rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10156fi 10157 10158 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_sinix_defined" >&5 10159printf "%s\n" "$ac_cv_cc_sinix_defined" >&6; } 10160 if test $ac_cv_cc_sinix_defined = no ; then 10161 10162printf "%s\n" "#define sinix 1" >>confdefs.h 10163 10164 fi 10165 ;; 10166 10167solaris*) 10168 10169printf "%s\n" "#define HAVE_SOLARIS 1" >>confdefs.h 10170 10171 10172 DYEXT="so" 10173 10174 # 10175 # Make sure errno is thread-safe, in case we're called in 10176 # a multithreaded program. We don't guarantee that two 10177 # threads can use the *same* pcap_t safely, but the 10178 # current version does guarantee that you can use different 10179 # pcap_t's in different threads, and even that pcap_compile() 10180 # is thread-safe (it wasn't thread-safe in some older versions). 10181 # 10182 V_CCOPT="$V_CCOPT -D_TS_ERRNO" 10183 10184 case "`uname -r`" in 10185 10186 5.12) 10187 ;; 10188 10189 *) 10190 # 10191 # Use System V conventions for man pages. 10192 # 10193 MAN_ADMIN_COMMANDS=1m 10194 MAN_FILE_FORMATS=4 10195 MAN_MISC_INFO=5 10196 MAN_DEVICES=7D 10197 esac 10198 ;; 10199esac 10200 10201 10202 10203 10204 10205 10206 10207 10208 10209 10210# Check whether --enable-shared was given. 10211if test ${enable_shared+y} 10212then : 10213 enableval=$enable_shared; 10214fi 10215 10216test "x$enable_shared" = "xno" && DYEXT="none" 10217 10218if test -n "$ac_tool_prefix"; then 10219 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 10220set dummy ${ac_tool_prefix}ranlib; ac_word=$2 10221{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10222printf %s "checking for $ac_word... " >&6; } 10223if test ${ac_cv_prog_RANLIB+y} 10224then : 10225 printf %s "(cached) " >&6 10226else $as_nop 10227 if test -n "$RANLIB"; then 10228 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 10229else 10230as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10231for as_dir in $PATH 10232do 10233 IFS=$as_save_IFS 10234 case $as_dir in #((( 10235 '') as_dir=./ ;; 10236 */) ;; 10237 *) as_dir=$as_dir/ ;; 10238 esac 10239 for ac_exec_ext in '' $ac_executable_extensions; do 10240 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 10241 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 10242 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 10243 break 2 10244 fi 10245done 10246 done 10247IFS=$as_save_IFS 10248 10249fi 10250fi 10251RANLIB=$ac_cv_prog_RANLIB 10252if test -n "$RANLIB"; then 10253 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 10254printf "%s\n" "$RANLIB" >&6; } 10255else 10256 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10257printf "%s\n" "no" >&6; } 10258fi 10259 10260 10261fi 10262if test -z "$ac_cv_prog_RANLIB"; then 10263 ac_ct_RANLIB=$RANLIB 10264 # Extract the first word of "ranlib", so it can be a program name with args. 10265set dummy ranlib; ac_word=$2 10266{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10267printf %s "checking for $ac_word... " >&6; } 10268if test ${ac_cv_prog_ac_ct_RANLIB+y} 10269then : 10270 printf %s "(cached) " >&6 10271else $as_nop 10272 if test -n "$ac_ct_RANLIB"; then 10273 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. 10274else 10275as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10276for as_dir in $PATH 10277do 10278 IFS=$as_save_IFS 10279 case $as_dir in #((( 10280 '') as_dir=./ ;; 10281 */) ;; 10282 *) as_dir=$as_dir/ ;; 10283 esac 10284 for ac_exec_ext in '' $ac_executable_extensions; do 10285 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 10286 ac_cv_prog_ac_ct_RANLIB="ranlib" 10287 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 10288 break 2 10289 fi 10290done 10291 done 10292IFS=$as_save_IFS 10293 10294fi 10295fi 10296ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB 10297if test -n "$ac_ct_RANLIB"; then 10298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 10299printf "%s\n" "$ac_ct_RANLIB" >&6; } 10300else 10301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10302printf "%s\n" "no" >&6; } 10303fi 10304 10305 if test "x$ac_ct_RANLIB" = x; then 10306 RANLIB=":" 10307 else 10308 case $cross_compiling:$ac_tool_warned in 10309yes:) 10310{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 10311printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 10312ac_tool_warned=yes ;; 10313esac 10314 RANLIB=$ac_ct_RANLIB 10315 fi 10316else 10317 RANLIB="$ac_cv_prog_RANLIB" 10318fi 10319 10320if test -n "$ac_tool_prefix"; then 10321 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. 10322set dummy ${ac_tool_prefix}ar; ac_word=$2 10323{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10324printf %s "checking for $ac_word... " >&6; } 10325if test ${ac_cv_prog_AR+y} 10326then : 10327 printf %s "(cached) " >&6 10328else $as_nop 10329 if test -n "$AR"; then 10330 ac_cv_prog_AR="$AR" # Let the user override the test. 10331else 10332as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10333for as_dir in $PATH 10334do 10335 IFS=$as_save_IFS 10336 case $as_dir in #((( 10337 '') as_dir=./ ;; 10338 */) ;; 10339 *) as_dir=$as_dir/ ;; 10340 esac 10341 for ac_exec_ext in '' $ac_executable_extensions; do 10342 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 10343 ac_cv_prog_AR="${ac_tool_prefix}ar" 10344 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 10345 break 2 10346 fi 10347done 10348 done 10349IFS=$as_save_IFS 10350 10351fi 10352fi 10353AR=$ac_cv_prog_AR 10354if test -n "$AR"; then 10355 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 10356printf "%s\n" "$AR" >&6; } 10357else 10358 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10359printf "%s\n" "no" >&6; } 10360fi 10361 10362 10363fi 10364if test -z "$ac_cv_prog_AR"; then 10365 ac_ct_AR=$AR 10366 # Extract the first word of "ar", so it can be a program name with args. 10367set dummy ar; ac_word=$2 10368{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10369printf %s "checking for $ac_word... " >&6; } 10370if test ${ac_cv_prog_ac_ct_AR+y} 10371then : 10372 printf %s "(cached) " >&6 10373else $as_nop 10374 if test -n "$ac_ct_AR"; then 10375 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. 10376else 10377as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10378for as_dir in $PATH 10379do 10380 IFS=$as_save_IFS 10381 case $as_dir in #((( 10382 '') as_dir=./ ;; 10383 */) ;; 10384 *) as_dir=$as_dir/ ;; 10385 esac 10386 for ac_exec_ext in '' $ac_executable_extensions; do 10387 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 10388 ac_cv_prog_ac_ct_AR="ar" 10389 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 10390 break 2 10391 fi 10392done 10393 done 10394IFS=$as_save_IFS 10395 10396fi 10397fi 10398ac_ct_AR=$ac_cv_prog_ac_ct_AR 10399if test -n "$ac_ct_AR"; then 10400 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 10401printf "%s\n" "$ac_ct_AR" >&6; } 10402else 10403 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10404printf "%s\n" "no" >&6; } 10405fi 10406 10407 if test "x$ac_ct_AR" = x; then 10408 AR="" 10409 else 10410 case $cross_compiling:$ac_tool_warned in 10411yes:) 10412{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 10413printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 10414ac_tool_warned=yes ;; 10415esac 10416 AR=$ac_ct_AR 10417 fi 10418else 10419 AR="$ac_cv_prog_AR" 10420fi 10421 10422 10423{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 10424printf %s "checking whether ln -s works... " >&6; } 10425LN_S=$as_ln_s 10426if test "$LN_S" = "ln -s"; then 10427 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10428printf "%s\n" "yes" >&6; } 10429else 10430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 10431printf "%s\n" "no, using $LN_S" >&6; } 10432fi 10433 10434 10435 10436rm -f os-proto.h 10437 # 10438 # MKDEP defaults to no-op (":") if we don't test whether the compiler 10439 # supports generating dependencies 10440 # 10441 MKDEP=: 10442 if test "${LBL_CFLAGS+set}" = set; then 10443 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}" 10444 fi 10445 if test -f .devel ; then 10446 # 10447 # Skip all the warning option stuff on some compilers. 10448 # 10449 if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then 10450 10451 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5 10452printf %s "checking whether the compiler supports the -W option... " >&6; } 10453 save_CFLAGS="$CFLAGS" 10454 CFLAGS="$CFLAGS -W" 10455 # 10456 # XXX - yes, this depends on the way AC_LANG_WERROR works, 10457 # but no mechanism is provided to turn AC_LANG_WERROR on 10458 # *and then turn it back off*, so that we *only* do it when 10459 # testing compiler options - 15 years after somebody asked 10460 # for it: 10461 # 10462 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 10463 # 10464 save_ac_c_werror_flag="$ac_c_werror_flag" 10465 ac_c_werror_flag=yes 10466 # 10467 # We use AC_LANG_SOURCE() so that we can control the complete 10468 # content of the program being compiled. We do not, for example, 10469 # want the default "int main()" that AC_LANG_PROGRAM() generates, 10470 # as it will generate a warning with -Wold-style-definition, meaning 10471 # that we would treat it as not working, as the test will fail if 10472 # *any* error output, including a warning due to the flag we're 10473 # testing, is generated; see 10474 # 10475 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10476 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10477 # 10478 # This may, as per those two messages, be fixed in autoconf 2.70, 10479 # but we only require 2.69 or newer for now. 10480 # 10481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10482/* end confdefs.h. */ 10483int main(void) { return 0; } 10484_ACEOF 10485if ac_fn_c_try_compile "$LINENO" 10486then : 10487 10488 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10489printf "%s\n" "yes" >&6; } 10490 can_add_to_cflags=yes 10491 # 10492 # The compile supports this; do we have some C code for 10493 # which the warning should *not* appear? 10494 # We test the fourth argument because the third argument 10495 # could contain quotes, breaking the test. 10496 # 10497 if test "x" != "x" 10498 then 10499 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 10500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -W " >&5 10501printf %s "checking whether -W ... " >&6; } 10502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10503/* end confdefs.h. */ 10504 10505_ACEOF 10506if ac_fn_c_try_compile "$LINENO" 10507then : 10508 10509 # 10510 # Not a problem. 10511 # 10512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10513printf "%s\n" "no" >&6; } 10514 10515else $as_nop 10516 10517 # 10518 # A problem. 10519 # 10520 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10521printf "%s\n" "yes" >&6; } 10522 can_add_to_cflags=no 10523 10524fi 10525rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10526 fi 10527 CFLAGS="$save_CFLAGS" 10528 if test x"$can_add_to_cflags" = "xyes" 10529 then 10530 V_CCOPT="$V_CCOPT -W" 10531 fi 10532 10533else $as_nop 10534 10535 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10536printf "%s\n" "no" >&6; } 10537 CFLAGS="$save_CFLAGS" 10538 10539fi 10540rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10541 ac_c_werror_flag="$save_ac_c_werror_flag" 10542 10543 10544 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5 10545printf %s "checking whether the compiler supports the -Wall option... " >&6; } 10546 save_CFLAGS="$CFLAGS" 10547 CFLAGS="$CFLAGS -Wall" 10548 # 10549 # XXX - yes, this depends on the way AC_LANG_WERROR works, 10550 # but no mechanism is provided to turn AC_LANG_WERROR on 10551 # *and then turn it back off*, so that we *only* do it when 10552 # testing compiler options - 15 years after somebody asked 10553 # for it: 10554 # 10555 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 10556 # 10557 save_ac_c_werror_flag="$ac_c_werror_flag" 10558 ac_c_werror_flag=yes 10559 # 10560 # We use AC_LANG_SOURCE() so that we can control the complete 10561 # content of the program being compiled. We do not, for example, 10562 # want the default "int main()" that AC_LANG_PROGRAM() generates, 10563 # as it will generate a warning with -Wold-style-definition, meaning 10564 # that we would treat it as not working, as the test will fail if 10565 # *any* error output, including a warning due to the flag we're 10566 # testing, is generated; see 10567 # 10568 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10569 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10570 # 10571 # This may, as per those two messages, be fixed in autoconf 2.70, 10572 # but we only require 2.69 or newer for now. 10573 # 10574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10575/* end confdefs.h. */ 10576int main(void) { return 0; } 10577_ACEOF 10578if ac_fn_c_try_compile "$LINENO" 10579then : 10580 10581 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10582printf "%s\n" "yes" >&6; } 10583 can_add_to_cflags=yes 10584 # 10585 # The compile supports this; do we have some C code for 10586 # which the warning should *not* appear? 10587 # We test the fourth argument because the third argument 10588 # could contain quotes, breaking the test. 10589 # 10590 if test "x" != "x" 10591 then 10592 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 10593 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wall " >&5 10594printf %s "checking whether -Wall ... " >&6; } 10595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10596/* end confdefs.h. */ 10597 10598_ACEOF 10599if ac_fn_c_try_compile "$LINENO" 10600then : 10601 10602 # 10603 # Not a problem. 10604 # 10605 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10606printf "%s\n" "no" >&6; } 10607 10608else $as_nop 10609 10610 # 10611 # A problem. 10612 # 10613 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10614printf "%s\n" "yes" >&6; } 10615 can_add_to_cflags=no 10616 10617fi 10618rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10619 fi 10620 CFLAGS="$save_CFLAGS" 10621 if test x"$can_add_to_cflags" = "xyes" 10622 then 10623 V_CCOPT="$V_CCOPT -Wall" 10624 fi 10625 10626else $as_nop 10627 10628 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10629printf "%s\n" "no" >&6; } 10630 CFLAGS="$save_CFLAGS" 10631 10632fi 10633rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10634 ac_c_werror_flag="$save_ac_c_werror_flag" 10635 10636 10637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcomma option" >&5 10638printf %s "checking whether the compiler supports the -Wcomma option... " >&6; } 10639 save_CFLAGS="$CFLAGS" 10640 CFLAGS="$CFLAGS -Wcomma" 10641 # 10642 # XXX - yes, this depends on the way AC_LANG_WERROR works, 10643 # but no mechanism is provided to turn AC_LANG_WERROR on 10644 # *and then turn it back off*, so that we *only* do it when 10645 # testing compiler options - 15 years after somebody asked 10646 # for it: 10647 # 10648 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 10649 # 10650 save_ac_c_werror_flag="$ac_c_werror_flag" 10651 ac_c_werror_flag=yes 10652 # 10653 # We use AC_LANG_SOURCE() so that we can control the complete 10654 # content of the program being compiled. We do not, for example, 10655 # want the default "int main()" that AC_LANG_PROGRAM() generates, 10656 # as it will generate a warning with -Wold-style-definition, meaning 10657 # that we would treat it as not working, as the test will fail if 10658 # *any* error output, including a warning due to the flag we're 10659 # testing, is generated; see 10660 # 10661 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10662 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10663 # 10664 # This may, as per those two messages, be fixed in autoconf 2.70, 10665 # but we only require 2.69 or newer for now. 10666 # 10667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10668/* end confdefs.h. */ 10669int main(void) { return 0; } 10670_ACEOF 10671if ac_fn_c_try_compile "$LINENO" 10672then : 10673 10674 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10675printf "%s\n" "yes" >&6; } 10676 can_add_to_cflags=yes 10677 # 10678 # The compile supports this; do we have some C code for 10679 # which the warning should *not* appear? 10680 # We test the fourth argument because the third argument 10681 # could contain quotes, breaking the test. 10682 # 10683 if test "x" != "x" 10684 then 10685 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 10686 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wcomma " >&5 10687printf %s "checking whether -Wcomma ... " >&6; } 10688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10689/* end confdefs.h. */ 10690 10691_ACEOF 10692if ac_fn_c_try_compile "$LINENO" 10693then : 10694 10695 # 10696 # Not a problem. 10697 # 10698 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10699printf "%s\n" "no" >&6; } 10700 10701else $as_nop 10702 10703 # 10704 # A problem. 10705 # 10706 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10707printf "%s\n" "yes" >&6; } 10708 can_add_to_cflags=no 10709 10710fi 10711rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10712 fi 10713 CFLAGS="$save_CFLAGS" 10714 if test x"$can_add_to_cflags" = "xyes" 10715 then 10716 V_CCOPT="$V_CCOPT -Wcomma" 10717 fi 10718 10719else $as_nop 10720 10721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10722printf "%s\n" "no" >&6; } 10723 CFLAGS="$save_CFLAGS" 10724 10725fi 10726rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10727 ac_c_werror_flag="$save_ac_c_werror_flag" 10728 10729 # Warns about safeguards added in case the enums are 10730 # extended 10731 # AC_LBL_CHECK_COMPILER_OPT(V_CCOPT, -Wcovered-switch-default) 10732 10733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdocumentation option" >&5 10734printf %s "checking whether the compiler supports the -Wdocumentation option... " >&6; } 10735 save_CFLAGS="$CFLAGS" 10736 CFLAGS="$CFLAGS -Wdocumentation" 10737 # 10738 # XXX - yes, this depends on the way AC_LANG_WERROR works, 10739 # but no mechanism is provided to turn AC_LANG_WERROR on 10740 # *and then turn it back off*, so that we *only* do it when 10741 # testing compiler options - 15 years after somebody asked 10742 # for it: 10743 # 10744 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 10745 # 10746 save_ac_c_werror_flag="$ac_c_werror_flag" 10747 ac_c_werror_flag=yes 10748 # 10749 # We use AC_LANG_SOURCE() so that we can control the complete 10750 # content of the program being compiled. We do not, for example, 10751 # want the default "int main()" that AC_LANG_PROGRAM() generates, 10752 # as it will generate a warning with -Wold-style-definition, meaning 10753 # that we would treat it as not working, as the test will fail if 10754 # *any* error output, including a warning due to the flag we're 10755 # testing, is generated; see 10756 # 10757 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10758 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10759 # 10760 # This may, as per those two messages, be fixed in autoconf 2.70, 10761 # but we only require 2.69 or newer for now. 10762 # 10763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10764/* end confdefs.h. */ 10765int main(void) { return 0; } 10766_ACEOF 10767if ac_fn_c_try_compile "$LINENO" 10768then : 10769 10770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10771printf "%s\n" "yes" >&6; } 10772 can_add_to_cflags=yes 10773 # 10774 # The compile supports this; do we have some C code for 10775 # which the warning should *not* appear? 10776 # We test the fourth argument because the third argument 10777 # could contain quotes, breaking the test. 10778 # 10779 if test "x" != "x" 10780 then 10781 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 10782 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wdocumentation " >&5 10783printf %s "checking whether -Wdocumentation ... " >&6; } 10784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10785/* end confdefs.h. */ 10786 10787_ACEOF 10788if ac_fn_c_try_compile "$LINENO" 10789then : 10790 10791 # 10792 # Not a problem. 10793 # 10794 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10795printf "%s\n" "no" >&6; } 10796 10797else $as_nop 10798 10799 # 10800 # A problem. 10801 # 10802 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10803printf "%s\n" "yes" >&6; } 10804 can_add_to_cflags=no 10805 10806fi 10807rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10808 fi 10809 CFLAGS="$save_CFLAGS" 10810 if test x"$can_add_to_cflags" = "xyes" 10811 then 10812 V_CCOPT="$V_CCOPT -Wdocumentation" 10813 fi 10814 10815else $as_nop 10816 10817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10818printf "%s\n" "no" >&6; } 10819 CFLAGS="$save_CFLAGS" 10820 10821fi 10822rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10823 ac_c_werror_flag="$save_ac_c_werror_flag" 10824 10825 10826 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wformat-nonliteral option" >&5 10827printf %s "checking whether the compiler supports the -Wformat-nonliteral option... " >&6; } 10828 save_CFLAGS="$CFLAGS" 10829 CFLAGS="$CFLAGS -Wformat-nonliteral" 10830 # 10831 # XXX - yes, this depends on the way AC_LANG_WERROR works, 10832 # but no mechanism is provided to turn AC_LANG_WERROR on 10833 # *and then turn it back off*, so that we *only* do it when 10834 # testing compiler options - 15 years after somebody asked 10835 # for it: 10836 # 10837 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 10838 # 10839 save_ac_c_werror_flag="$ac_c_werror_flag" 10840 ac_c_werror_flag=yes 10841 # 10842 # We use AC_LANG_SOURCE() so that we can control the complete 10843 # content of the program being compiled. We do not, for example, 10844 # want the default "int main()" that AC_LANG_PROGRAM() generates, 10845 # as it will generate a warning with -Wold-style-definition, meaning 10846 # that we would treat it as not working, as the test will fail if 10847 # *any* error output, including a warning due to the flag we're 10848 # testing, is generated; see 10849 # 10850 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10851 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10852 # 10853 # This may, as per those two messages, be fixed in autoconf 2.70, 10854 # but we only require 2.69 or newer for now. 10855 # 10856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10857/* end confdefs.h. */ 10858int main(void) { return 0; } 10859_ACEOF 10860if ac_fn_c_try_compile "$LINENO" 10861then : 10862 10863 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10864printf "%s\n" "yes" >&6; } 10865 can_add_to_cflags=yes 10866 # 10867 # The compile supports this; do we have some C code for 10868 # which the warning should *not* appear? 10869 # We test the fourth argument because the third argument 10870 # could contain quotes, breaking the test. 10871 # 10872 if test "x" != "x" 10873 then 10874 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 10875 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wformat-nonliteral " >&5 10876printf %s "checking whether -Wformat-nonliteral ... " >&6; } 10877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10878/* end confdefs.h. */ 10879 10880_ACEOF 10881if ac_fn_c_try_compile "$LINENO" 10882then : 10883 10884 # 10885 # Not a problem. 10886 # 10887 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10888printf "%s\n" "no" >&6; } 10889 10890else $as_nop 10891 10892 # 10893 # A problem. 10894 # 10895 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10896printf "%s\n" "yes" >&6; } 10897 can_add_to_cflags=no 10898 10899fi 10900rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10901 fi 10902 CFLAGS="$save_CFLAGS" 10903 if test x"$can_add_to_cflags" = "xyes" 10904 then 10905 V_CCOPT="$V_CCOPT -Wformat-nonliteral" 10906 fi 10907 10908else $as_nop 10909 10910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10911printf "%s\n" "no" >&6; } 10912 CFLAGS="$save_CFLAGS" 10913 10914fi 10915rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10916 ac_c_werror_flag="$save_ac_c_werror_flag" 10917 10918 10919 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-noreturn option" >&5 10920printf %s "checking whether the compiler supports the -Wmissing-noreturn option... " >&6; } 10921 save_CFLAGS="$CFLAGS" 10922 CFLAGS="$CFLAGS -Wmissing-noreturn" 10923 # 10924 # XXX - yes, this depends on the way AC_LANG_WERROR works, 10925 # but no mechanism is provided to turn AC_LANG_WERROR on 10926 # *and then turn it back off*, so that we *only* do it when 10927 # testing compiler options - 15 years after somebody asked 10928 # for it: 10929 # 10930 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 10931 # 10932 save_ac_c_werror_flag="$ac_c_werror_flag" 10933 ac_c_werror_flag=yes 10934 # 10935 # We use AC_LANG_SOURCE() so that we can control the complete 10936 # content of the program being compiled. We do not, for example, 10937 # want the default "int main()" that AC_LANG_PROGRAM() generates, 10938 # as it will generate a warning with -Wold-style-definition, meaning 10939 # that we would treat it as not working, as the test will fail if 10940 # *any* error output, including a warning due to the flag we're 10941 # testing, is generated; see 10942 # 10943 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10944 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10945 # 10946 # This may, as per those two messages, be fixed in autoconf 2.70, 10947 # but we only require 2.69 or newer for now. 10948 # 10949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10950/* end confdefs.h. */ 10951int main(void) { return 0; } 10952_ACEOF 10953if ac_fn_c_try_compile "$LINENO" 10954then : 10955 10956 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10957printf "%s\n" "yes" >&6; } 10958 can_add_to_cflags=yes 10959 # 10960 # The compile supports this; do we have some C code for 10961 # which the warning should *not* appear? 10962 # We test the fourth argument because the third argument 10963 # could contain quotes, breaking the test. 10964 # 10965 if test "x" != "x" 10966 then 10967 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 10968 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-noreturn " >&5 10969printf %s "checking whether -Wmissing-noreturn ... " >&6; } 10970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10971/* end confdefs.h. */ 10972 10973_ACEOF 10974if ac_fn_c_try_compile "$LINENO" 10975then : 10976 10977 # 10978 # Not a problem. 10979 # 10980 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10981printf "%s\n" "no" >&6; } 10982 10983else $as_nop 10984 10985 # 10986 # A problem. 10987 # 10988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10989printf "%s\n" "yes" >&6; } 10990 can_add_to_cflags=no 10991 10992fi 10993rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10994 fi 10995 CFLAGS="$save_CFLAGS" 10996 if test x"$can_add_to_cflags" = "xyes" 10997 then 10998 V_CCOPT="$V_CCOPT -Wmissing-noreturn" 10999 fi 11000 11001else $as_nop 11002 11003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11004printf "%s\n" "no" >&6; } 11005 CFLAGS="$save_CFLAGS" 11006 11007fi 11008rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11009 ac_c_werror_flag="$save_ac_c_werror_flag" 11010 11011 11012 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5 11013printf %s "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; } 11014 save_CFLAGS="$CFLAGS" 11015 CFLAGS="$CFLAGS -Wmissing-prototypes" 11016 # 11017 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11018 # but no mechanism is provided to turn AC_LANG_WERROR on 11019 # *and then turn it back off*, so that we *only* do it when 11020 # testing compiler options - 15 years after somebody asked 11021 # for it: 11022 # 11023 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11024 # 11025 save_ac_c_werror_flag="$ac_c_werror_flag" 11026 ac_c_werror_flag=yes 11027 # 11028 # We use AC_LANG_SOURCE() so that we can control the complete 11029 # content of the program being compiled. We do not, for example, 11030 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11031 # as it will generate a warning with -Wold-style-definition, meaning 11032 # that we would treat it as not working, as the test will fail if 11033 # *any* error output, including a warning due to the flag we're 11034 # testing, is generated; see 11035 # 11036 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11037 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11038 # 11039 # This may, as per those two messages, be fixed in autoconf 2.70, 11040 # but we only require 2.69 or newer for now. 11041 # 11042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11043/* end confdefs.h. */ 11044int main(void) { return 0; } 11045_ACEOF 11046if ac_fn_c_try_compile "$LINENO" 11047then : 11048 11049 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11050printf "%s\n" "yes" >&6; } 11051 can_add_to_cflags=yes 11052 # 11053 # The compile supports this; do we have some C code for 11054 # which the warning should *not* appear? 11055 # We test the fourth argument because the third argument 11056 # could contain quotes, breaking the test. 11057 # 11058 if test "x" != "x" 11059 then 11060 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-prototypes " >&5 11062printf %s "checking whether -Wmissing-prototypes ... " >&6; } 11063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11064/* end confdefs.h. */ 11065 11066_ACEOF 11067if ac_fn_c_try_compile "$LINENO" 11068then : 11069 11070 # 11071 # Not a problem. 11072 # 11073 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11074printf "%s\n" "no" >&6; } 11075 11076else $as_nop 11077 11078 # 11079 # A problem. 11080 # 11081 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11082printf "%s\n" "yes" >&6; } 11083 can_add_to_cflags=no 11084 11085fi 11086rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11087 fi 11088 CFLAGS="$save_CFLAGS" 11089 if test x"$can_add_to_cflags" = "xyes" 11090 then 11091 V_CCOPT="$V_CCOPT -Wmissing-prototypes" 11092 fi 11093 11094else $as_nop 11095 11096 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11097printf "%s\n" "no" >&6; } 11098 CFLAGS="$save_CFLAGS" 11099 11100fi 11101rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11102 ac_c_werror_flag="$save_ac_c_werror_flag" 11103 11104 11105 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5 11106printf %s "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; } 11107 save_CFLAGS="$CFLAGS" 11108 CFLAGS="$CFLAGS -Wmissing-variable-declarations" 11109 # 11110 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11111 # but no mechanism is provided to turn AC_LANG_WERROR on 11112 # *and then turn it back off*, so that we *only* do it when 11113 # testing compiler options - 15 years after somebody asked 11114 # for it: 11115 # 11116 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11117 # 11118 save_ac_c_werror_flag="$ac_c_werror_flag" 11119 ac_c_werror_flag=yes 11120 # 11121 # We use AC_LANG_SOURCE() so that we can control the complete 11122 # content of the program being compiled. We do not, for example, 11123 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11124 # as it will generate a warning with -Wold-style-definition, meaning 11125 # that we would treat it as not working, as the test will fail if 11126 # *any* error output, including a warning due to the flag we're 11127 # testing, is generated; see 11128 # 11129 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11130 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11131 # 11132 # This may, as per those two messages, be fixed in autoconf 2.70, 11133 # but we only require 2.69 or newer for now. 11134 # 11135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11136/* end confdefs.h. */ 11137int main(void) { return 0; } 11138_ACEOF 11139if ac_fn_c_try_compile "$LINENO" 11140then : 11141 11142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11143printf "%s\n" "yes" >&6; } 11144 can_add_to_cflags=yes 11145 # 11146 # The compile supports this; do we have some C code for 11147 # which the warning should *not* appear? 11148 # We test the fourth argument because the third argument 11149 # could contain quotes, breaking the test. 11150 # 11151 if test "x" != "x" 11152 then 11153 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-variable-declarations " >&5 11155printf %s "checking whether -Wmissing-variable-declarations ... " >&6; } 11156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11157/* end confdefs.h. */ 11158 11159_ACEOF 11160if ac_fn_c_try_compile "$LINENO" 11161then : 11162 11163 # 11164 # Not a problem. 11165 # 11166 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11167printf "%s\n" "no" >&6; } 11168 11169else $as_nop 11170 11171 # 11172 # A problem. 11173 # 11174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11175printf "%s\n" "yes" >&6; } 11176 can_add_to_cflags=no 11177 11178fi 11179rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11180 fi 11181 CFLAGS="$save_CFLAGS" 11182 if test x"$can_add_to_cflags" = "xyes" 11183 then 11184 V_CCOPT="$V_CCOPT -Wmissing-variable-declarations" 11185 fi 11186 11187else $as_nop 11188 11189 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11190printf "%s\n" "no" >&6; } 11191 CFLAGS="$save_CFLAGS" 11192 11193fi 11194rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11195 ac_c_werror_flag="$save_ac_c_werror_flag" 11196 11197 11198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wnull-pointer-subtraction option" >&5 11199printf %s "checking whether the compiler supports the -Wnull-pointer-subtraction option... " >&6; } 11200 save_CFLAGS="$CFLAGS" 11201 CFLAGS="$CFLAGS -Wnull-pointer-subtraction" 11202 # 11203 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11204 # but no mechanism is provided to turn AC_LANG_WERROR on 11205 # *and then turn it back off*, so that we *only* do it when 11206 # testing compiler options - 15 years after somebody asked 11207 # for it: 11208 # 11209 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11210 # 11211 save_ac_c_werror_flag="$ac_c_werror_flag" 11212 ac_c_werror_flag=yes 11213 # 11214 # We use AC_LANG_SOURCE() so that we can control the complete 11215 # content of the program being compiled. We do not, for example, 11216 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11217 # as it will generate a warning with -Wold-style-definition, meaning 11218 # that we would treat it as not working, as the test will fail if 11219 # *any* error output, including a warning due to the flag we're 11220 # testing, is generated; see 11221 # 11222 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11223 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11224 # 11225 # This may, as per those two messages, be fixed in autoconf 2.70, 11226 # but we only require 2.69 or newer for now. 11227 # 11228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11229/* end confdefs.h. */ 11230int main(void) { return 0; } 11231_ACEOF 11232if ac_fn_c_try_compile "$LINENO" 11233then : 11234 11235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11236printf "%s\n" "yes" >&6; } 11237 can_add_to_cflags=yes 11238 # 11239 # The compile supports this; do we have some C code for 11240 # which the warning should *not* appear? 11241 # We test the fourth argument because the third argument 11242 # could contain quotes, breaking the test. 11243 # 11244 if test "x" != "x" 11245 then 11246 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11247 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wnull-pointer-subtraction " >&5 11248printf %s "checking whether -Wnull-pointer-subtraction ... " >&6; } 11249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11250/* end confdefs.h. */ 11251 11252_ACEOF 11253if ac_fn_c_try_compile "$LINENO" 11254then : 11255 11256 # 11257 # Not a problem. 11258 # 11259 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11260printf "%s\n" "no" >&6; } 11261 11262else $as_nop 11263 11264 # 11265 # A problem. 11266 # 11267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11268printf "%s\n" "yes" >&6; } 11269 can_add_to_cflags=no 11270 11271fi 11272rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11273 fi 11274 CFLAGS="$save_CFLAGS" 11275 if test x"$can_add_to_cflags" = "xyes" 11276 then 11277 V_CCOPT="$V_CCOPT -Wnull-pointer-subtraction" 11278 fi 11279 11280else $as_nop 11281 11282 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11283printf "%s\n" "no" >&6; } 11284 CFLAGS="$save_CFLAGS" 11285 11286fi 11287rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11288 ac_c_werror_flag="$save_ac_c_werror_flag" 11289 11290 11291 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5 11292printf %s "checking whether the compiler supports the -Wpointer-arith option... " >&6; } 11293 save_CFLAGS="$CFLAGS" 11294 CFLAGS="$CFLAGS -Wpointer-arith" 11295 # 11296 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11297 # but no mechanism is provided to turn AC_LANG_WERROR on 11298 # *and then turn it back off*, so that we *only* do it when 11299 # testing compiler options - 15 years after somebody asked 11300 # for it: 11301 # 11302 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11303 # 11304 save_ac_c_werror_flag="$ac_c_werror_flag" 11305 ac_c_werror_flag=yes 11306 # 11307 # We use AC_LANG_SOURCE() so that we can control the complete 11308 # content of the program being compiled. We do not, for example, 11309 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11310 # as it will generate a warning with -Wold-style-definition, meaning 11311 # that we would treat it as not working, as the test will fail if 11312 # *any* error output, including a warning due to the flag we're 11313 # testing, is generated; see 11314 # 11315 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11316 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11317 # 11318 # This may, as per those two messages, be fixed in autoconf 2.70, 11319 # but we only require 2.69 or newer for now. 11320 # 11321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11322/* end confdefs.h. */ 11323int main(void) { return 0; } 11324_ACEOF 11325if ac_fn_c_try_compile "$LINENO" 11326then : 11327 11328 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11329printf "%s\n" "yes" >&6; } 11330 can_add_to_cflags=yes 11331 # 11332 # The compile supports this; do we have some C code for 11333 # which the warning should *not* appear? 11334 # We test the fourth argument because the third argument 11335 # could contain quotes, breaking the test. 11336 # 11337 if test "x" != "x" 11338 then 11339 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-arith " >&5 11341printf %s "checking whether -Wpointer-arith ... " >&6; } 11342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11343/* end confdefs.h. */ 11344 11345_ACEOF 11346if ac_fn_c_try_compile "$LINENO" 11347then : 11348 11349 # 11350 # Not a problem. 11351 # 11352 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11353printf "%s\n" "no" >&6; } 11354 11355else $as_nop 11356 11357 # 11358 # A problem. 11359 # 11360 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11361printf "%s\n" "yes" >&6; } 11362 can_add_to_cflags=no 11363 11364fi 11365rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11366 fi 11367 CFLAGS="$save_CFLAGS" 11368 if test x"$can_add_to_cflags" = "xyes" 11369 then 11370 V_CCOPT="$V_CCOPT -Wpointer-arith" 11371 fi 11372 11373else $as_nop 11374 11375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11376printf "%s\n" "no" >&6; } 11377 CFLAGS="$save_CFLAGS" 11378 11379fi 11380rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11381 ac_c_werror_flag="$save_ac_c_werror_flag" 11382 11383 11384 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-sign option" >&5 11385printf %s "checking whether the compiler supports the -Wpointer-sign option... " >&6; } 11386 save_CFLAGS="$CFLAGS" 11387 CFLAGS="$CFLAGS -Wpointer-sign" 11388 # 11389 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11390 # but no mechanism is provided to turn AC_LANG_WERROR on 11391 # *and then turn it back off*, so that we *only* do it when 11392 # testing compiler options - 15 years after somebody asked 11393 # for it: 11394 # 11395 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11396 # 11397 save_ac_c_werror_flag="$ac_c_werror_flag" 11398 ac_c_werror_flag=yes 11399 # 11400 # We use AC_LANG_SOURCE() so that we can control the complete 11401 # content of the program being compiled. We do not, for example, 11402 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11403 # as it will generate a warning with -Wold-style-definition, meaning 11404 # that we would treat it as not working, as the test will fail if 11405 # *any* error output, including a warning due to the flag we're 11406 # testing, is generated; see 11407 # 11408 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11409 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11410 # 11411 # This may, as per those two messages, be fixed in autoconf 2.70, 11412 # but we only require 2.69 or newer for now. 11413 # 11414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11415/* end confdefs.h. */ 11416int main(void) { return 0; } 11417_ACEOF 11418if ac_fn_c_try_compile "$LINENO" 11419then : 11420 11421 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11422printf "%s\n" "yes" >&6; } 11423 can_add_to_cflags=yes 11424 # 11425 # The compile supports this; do we have some C code for 11426 # which the warning should *not* appear? 11427 # We test the fourth argument because the third argument 11428 # could contain quotes, breaking the test. 11429 # 11430 if test "x" != "x" 11431 then 11432 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11433 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-sign " >&5 11434printf %s "checking whether -Wpointer-sign ... " >&6; } 11435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11436/* end confdefs.h. */ 11437 11438_ACEOF 11439if ac_fn_c_try_compile "$LINENO" 11440then : 11441 11442 # 11443 # Not a problem. 11444 # 11445 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11446printf "%s\n" "no" >&6; } 11447 11448else $as_nop 11449 11450 # 11451 # A problem. 11452 # 11453 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11454printf "%s\n" "yes" >&6; } 11455 can_add_to_cflags=no 11456 11457fi 11458rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11459 fi 11460 CFLAGS="$save_CFLAGS" 11461 if test x"$can_add_to_cflags" = "xyes" 11462 then 11463 V_CCOPT="$V_CCOPT -Wpointer-sign" 11464 fi 11465 11466else $as_nop 11467 11468 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11469printf "%s\n" "no" >&6; } 11470 CFLAGS="$save_CFLAGS" 11471 11472fi 11473rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11474 ac_c_werror_flag="$save_ac_c_werror_flag" 11475 11476 11477 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5 11478printf %s "checking whether the compiler supports the -Wshadow option... " >&6; } 11479 save_CFLAGS="$CFLAGS" 11480 CFLAGS="$CFLAGS -Wshadow" 11481 # 11482 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11483 # but no mechanism is provided to turn AC_LANG_WERROR on 11484 # *and then turn it back off*, so that we *only* do it when 11485 # testing compiler options - 15 years after somebody asked 11486 # for it: 11487 # 11488 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11489 # 11490 save_ac_c_werror_flag="$ac_c_werror_flag" 11491 ac_c_werror_flag=yes 11492 # 11493 # We use AC_LANG_SOURCE() so that we can control the complete 11494 # content of the program being compiled. We do not, for example, 11495 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11496 # as it will generate a warning with -Wold-style-definition, meaning 11497 # that we would treat it as not working, as the test will fail if 11498 # *any* error output, including a warning due to the flag we're 11499 # testing, is generated; see 11500 # 11501 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11502 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11503 # 11504 # This may, as per those two messages, be fixed in autoconf 2.70, 11505 # but we only require 2.69 or newer for now. 11506 # 11507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11508/* end confdefs.h. */ 11509int main(void) { return 0; } 11510_ACEOF 11511if ac_fn_c_try_compile "$LINENO" 11512then : 11513 11514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11515printf "%s\n" "yes" >&6; } 11516 can_add_to_cflags=yes 11517 # 11518 # The compile supports this; do we have some C code for 11519 # which the warning should *not* appear? 11520 # We test the fourth argument because the third argument 11521 # could contain quotes, breaking the test. 11522 # 11523 if test "x" != "x" 11524 then 11525 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wshadow " >&5 11527printf %s "checking whether -Wshadow ... " >&6; } 11528 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11529/* end confdefs.h. */ 11530 11531_ACEOF 11532if ac_fn_c_try_compile "$LINENO" 11533then : 11534 11535 # 11536 # Not a problem. 11537 # 11538 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11539printf "%s\n" "no" >&6; } 11540 11541else $as_nop 11542 11543 # 11544 # A problem. 11545 # 11546 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11547printf "%s\n" "yes" >&6; } 11548 can_add_to_cflags=no 11549 11550fi 11551rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11552 fi 11553 CFLAGS="$save_CFLAGS" 11554 if test x"$can_add_to_cflags" = "xyes" 11555 then 11556 V_CCOPT="$V_CCOPT -Wshadow" 11557 fi 11558 11559else $as_nop 11560 11561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11562printf "%s\n" "no" >&6; } 11563 CFLAGS="$save_CFLAGS" 11564 11565fi 11566rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11567 ac_c_werror_flag="$save_ac_c_werror_flag" 11568 11569 11570 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshorten-64-to-32 option" >&5 11571printf %s "checking whether the compiler supports the -Wshorten-64-to-32 option... " >&6; } 11572 save_CFLAGS="$CFLAGS" 11573 CFLAGS="$CFLAGS -Wshorten-64-to-32" 11574 # 11575 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11576 # but no mechanism is provided to turn AC_LANG_WERROR on 11577 # *and then turn it back off*, so that we *only* do it when 11578 # testing compiler options - 15 years after somebody asked 11579 # for it: 11580 # 11581 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11582 # 11583 save_ac_c_werror_flag="$ac_c_werror_flag" 11584 ac_c_werror_flag=yes 11585 # 11586 # We use AC_LANG_SOURCE() so that we can control the complete 11587 # content of the program being compiled. We do not, for example, 11588 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11589 # as it will generate a warning with -Wold-style-definition, meaning 11590 # that we would treat it as not working, as the test will fail if 11591 # *any* error output, including a warning due to the flag we're 11592 # testing, is generated; see 11593 # 11594 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11595 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11596 # 11597 # This may, as per those two messages, be fixed in autoconf 2.70, 11598 # but we only require 2.69 or newer for now. 11599 # 11600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11601/* end confdefs.h. */ 11602int main(void) { return 0; } 11603_ACEOF 11604if ac_fn_c_try_compile "$LINENO" 11605then : 11606 11607 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11608printf "%s\n" "yes" >&6; } 11609 can_add_to_cflags=yes 11610 # 11611 # The compile supports this; do we have some C code for 11612 # which the warning should *not* appear? 11613 # We test the fourth argument because the third argument 11614 # could contain quotes, breaking the test. 11615 # 11616 if test "x" != "x" 11617 then 11618 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11619 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wshorten-64-to-32 " >&5 11620printf %s "checking whether -Wshorten-64-to-32 ... " >&6; } 11621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11622/* end confdefs.h. */ 11623 11624_ACEOF 11625if ac_fn_c_try_compile "$LINENO" 11626then : 11627 11628 # 11629 # Not a problem. 11630 # 11631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11632printf "%s\n" "no" >&6; } 11633 11634else $as_nop 11635 11636 # 11637 # A problem. 11638 # 11639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11640printf "%s\n" "yes" >&6; } 11641 can_add_to_cflags=no 11642 11643fi 11644rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11645 fi 11646 CFLAGS="$save_CFLAGS" 11647 if test x"$can_add_to_cflags" = "xyes" 11648 then 11649 V_CCOPT="$V_CCOPT -Wshorten-64-to-32" 11650 fi 11651 11652else $as_nop 11653 11654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11655printf "%s\n" "no" >&6; } 11656 CFLAGS="$save_CFLAGS" 11657 11658fi 11659rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11660 ac_c_werror_flag="$save_ac_c_werror_flag" 11661 11662 11663 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5 11664printf %s "checking whether the compiler supports the -Wsign-compare option... " >&6; } 11665 save_CFLAGS="$CFLAGS" 11666 CFLAGS="$CFLAGS -Wsign-compare" 11667 # 11668 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11669 # but no mechanism is provided to turn AC_LANG_WERROR on 11670 # *and then turn it back off*, so that we *only* do it when 11671 # testing compiler options - 15 years after somebody asked 11672 # for it: 11673 # 11674 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11675 # 11676 save_ac_c_werror_flag="$ac_c_werror_flag" 11677 ac_c_werror_flag=yes 11678 # 11679 # We use AC_LANG_SOURCE() so that we can control the complete 11680 # content of the program being compiled. We do not, for example, 11681 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11682 # as it will generate a warning with -Wold-style-definition, meaning 11683 # that we would treat it as not working, as the test will fail if 11684 # *any* error output, including a warning due to the flag we're 11685 # testing, is generated; see 11686 # 11687 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11688 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11689 # 11690 # This may, as per those two messages, be fixed in autoconf 2.70, 11691 # but we only require 2.69 or newer for now. 11692 # 11693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11694/* end confdefs.h. */ 11695int main(void) { return 0; } 11696_ACEOF 11697if ac_fn_c_try_compile "$LINENO" 11698then : 11699 11700 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11701printf "%s\n" "yes" >&6; } 11702 can_add_to_cflags=yes 11703 # 11704 # The compile supports this; do we have some C code for 11705 # which the warning should *not* appear? 11706 # We test the fourth argument because the third argument 11707 # could contain quotes, breaking the test. 11708 # 11709 if test "x" != "x" 11710 then 11711 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11712 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wsign-compare " >&5 11713printf %s "checking whether -Wsign-compare ... " >&6; } 11714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11715/* end confdefs.h. */ 11716 11717_ACEOF 11718if ac_fn_c_try_compile "$LINENO" 11719then : 11720 11721 # 11722 # Not a problem. 11723 # 11724 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11725printf "%s\n" "no" >&6; } 11726 11727else $as_nop 11728 11729 # 11730 # A problem. 11731 # 11732 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11733printf "%s\n" "yes" >&6; } 11734 can_add_to_cflags=no 11735 11736fi 11737rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11738 fi 11739 CFLAGS="$save_CFLAGS" 11740 if test x"$can_add_to_cflags" = "xyes" 11741 then 11742 V_CCOPT="$V_CCOPT -Wsign-compare" 11743 fi 11744 11745else $as_nop 11746 11747 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11748printf "%s\n" "no" >&6; } 11749 CFLAGS="$save_CFLAGS" 11750 11751fi 11752rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11753 ac_c_werror_flag="$save_ac_c_werror_flag" 11754 11755 11756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5 11757printf %s "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; } 11758 save_CFLAGS="$CFLAGS" 11759 CFLAGS="$CFLAGS -Wstrict-prototypes" 11760 # 11761 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11762 # but no mechanism is provided to turn AC_LANG_WERROR on 11763 # *and then turn it back off*, so that we *only* do it when 11764 # testing compiler options - 15 years after somebody asked 11765 # for it: 11766 # 11767 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11768 # 11769 save_ac_c_werror_flag="$ac_c_werror_flag" 11770 ac_c_werror_flag=yes 11771 # 11772 # We use AC_LANG_SOURCE() so that we can control the complete 11773 # content of the program being compiled. We do not, for example, 11774 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11775 # as it will generate a warning with -Wold-style-definition, meaning 11776 # that we would treat it as not working, as the test will fail if 11777 # *any* error output, including a warning due to the flag we're 11778 # testing, is generated; see 11779 # 11780 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11781 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11782 # 11783 # This may, as per those two messages, be fixed in autoconf 2.70, 11784 # but we only require 2.69 or newer for now. 11785 # 11786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11787/* end confdefs.h. */ 11788int main(void) { return 0; } 11789_ACEOF 11790if ac_fn_c_try_compile "$LINENO" 11791then : 11792 11793 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11794printf "%s\n" "yes" >&6; } 11795 can_add_to_cflags=yes 11796 # 11797 # The compile supports this; do we have some C code for 11798 # which the warning should *not* appear? 11799 # We test the fourth argument because the third argument 11800 # could contain quotes, breaking the test. 11801 # 11802 if test "x" != "x" 11803 then 11804 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11805 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wstrict-prototypes " >&5 11806printf %s "checking whether -Wstrict-prototypes ... " >&6; } 11807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11808/* end confdefs.h. */ 11809 11810_ACEOF 11811if ac_fn_c_try_compile "$LINENO" 11812then : 11813 11814 # 11815 # Not a problem. 11816 # 11817 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11818printf "%s\n" "no" >&6; } 11819 11820else $as_nop 11821 11822 # 11823 # A problem. 11824 # 11825 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11826printf "%s\n" "yes" >&6; } 11827 can_add_to_cflags=no 11828 11829fi 11830rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11831 fi 11832 CFLAGS="$save_CFLAGS" 11833 if test x"$can_add_to_cflags" = "xyes" 11834 then 11835 V_CCOPT="$V_CCOPT -Wstrict-prototypes" 11836 fi 11837 11838else $as_nop 11839 11840 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11841printf "%s\n" "no" >&6; } 11842 CFLAGS="$save_CFLAGS" 11843 11844fi 11845rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11846 ac_c_werror_flag="$save_ac_c_werror_flag" 11847 11848 11849 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wundef option" >&5 11850printf %s "checking whether the compiler supports the -Wundef option... " >&6; } 11851 save_CFLAGS="$CFLAGS" 11852 CFLAGS="$CFLAGS -Wundef" 11853 # 11854 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11855 # but no mechanism is provided to turn AC_LANG_WERROR on 11856 # *and then turn it back off*, so that we *only* do it when 11857 # testing compiler options - 15 years after somebody asked 11858 # for it: 11859 # 11860 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11861 # 11862 save_ac_c_werror_flag="$ac_c_werror_flag" 11863 ac_c_werror_flag=yes 11864 # 11865 # We use AC_LANG_SOURCE() so that we can control the complete 11866 # content of the program being compiled. We do not, for example, 11867 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11868 # as it will generate a warning with -Wold-style-definition, meaning 11869 # that we would treat it as not working, as the test will fail if 11870 # *any* error output, including a warning due to the flag we're 11871 # testing, is generated; see 11872 # 11873 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11874 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11875 # 11876 # This may, as per those two messages, be fixed in autoconf 2.70, 11877 # but we only require 2.69 or newer for now. 11878 # 11879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11880/* end confdefs.h. */ 11881int main(void) { return 0; } 11882_ACEOF 11883if ac_fn_c_try_compile "$LINENO" 11884then : 11885 11886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11887printf "%s\n" "yes" >&6; } 11888 can_add_to_cflags=yes 11889 # 11890 # The compile supports this; do we have some C code for 11891 # which the warning should *not* appear? 11892 # We test the fourth argument because the third argument 11893 # could contain quotes, breaking the test. 11894 # 11895 if test "x" != "x" 11896 then 11897 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11898 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wundef " >&5 11899printf %s "checking whether -Wundef ... " >&6; } 11900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11901/* end confdefs.h. */ 11902 11903_ACEOF 11904if ac_fn_c_try_compile "$LINENO" 11905then : 11906 11907 # 11908 # Not a problem. 11909 # 11910 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11911printf "%s\n" "no" >&6; } 11912 11913else $as_nop 11914 11915 # 11916 # A problem. 11917 # 11918 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11919printf "%s\n" "yes" >&6; } 11920 can_add_to_cflags=no 11921 11922fi 11923rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11924 fi 11925 CFLAGS="$save_CFLAGS" 11926 if test x"$can_add_to_cflags" = "xyes" 11927 then 11928 V_CCOPT="$V_CCOPT -Wundef" 11929 fi 11930 11931else $as_nop 11932 11933 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11934printf "%s\n" "no" >&6; } 11935 CFLAGS="$save_CFLAGS" 11936 11937fi 11938rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11939 ac_c_werror_flag="$save_ac_c_werror_flag" 11940 11941 # 11942 # This can cause problems with ntohs(), ntohl(), 11943 # htons(), and htonl() on some platforms, such 11944 # as OpenBSD 6.3 with Clang 5.0.1. I guess the 11945 # problem is that the macro that ultimately does 11946 # the byte-swapping involves a conditional 11947 # expression that tests whether the value being 11948 # swapped is a compile-time constant or not, 11949 # using __builtin_constant_p(), and, depending 11950 # on whether it is, does a compile-time swap or 11951 # a run-time swap; perhaps the compiler always 11952 # considers one of the two results of the 11953 # conditional expression is never evaluated, 11954 # because the conditional check is done at 11955 # compile time, and thus always says "that 11956 # expression is never executed". 11957 # 11958 # (Perhaps there should be a way of flagging 11959 # an expression that you *want* evaluated at 11960 # compile time, so that the compiler 1) warns 11961 # if it *can't* be evaluated at compile time 11962 # and 2) *doesn't* warn that the true or false 11963 # branch will never be reached.) 11964 # 11965 11966 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code option" >&5 11967printf %s "checking whether the compiler supports the -Wunreachable-code option... " >&6; } 11968 save_CFLAGS="$CFLAGS" 11969 CFLAGS="$CFLAGS -Wunreachable-code" 11970 # 11971 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11972 # but no mechanism is provided to turn AC_LANG_WERROR on 11973 # *and then turn it back off*, so that we *only* do it when 11974 # testing compiler options - 15 years after somebody asked 11975 # for it: 11976 # 11977 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11978 # 11979 save_ac_c_werror_flag="$ac_c_werror_flag" 11980 ac_c_werror_flag=yes 11981 # 11982 # We use AC_LANG_SOURCE() so that we can control the complete 11983 # content of the program being compiled. We do not, for example, 11984 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11985 # as it will generate a warning with -Wold-style-definition, meaning 11986 # that we would treat it as not working, as the test will fail if 11987 # *any* error output, including a warning due to the flag we're 11988 # testing, is generated; see 11989 # 11990 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11991 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11992 # 11993 # This may, as per those two messages, be fixed in autoconf 2.70, 11994 # but we only require 2.69 or newer for now. 11995 # 11996 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11997/* end confdefs.h. */ 11998int main(void) { return 0; } 11999_ACEOF 12000if ac_fn_c_try_compile "$LINENO" 12001then : 12002 12003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12004printf "%s\n" "yes" >&6; } 12005 can_add_to_cflags=yes 12006 # 12007 # The compile supports this; do we have some C code for 12008 # which the warning should *not* appear? 12009 # We test the fourth argument because the third argument 12010 # could contain quotes, breaking the test. 12011 # 12012 if test "xgenerates warnings from ntohs()" != "x" 12013 then 12014 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 12015 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wunreachable-code generates warnings from ntohs()" >&5 12016printf %s "checking whether -Wunreachable-code generates warnings from ntohs()... " >&6; } 12017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12018/* end confdefs.h. */ 12019#include <arpa/inet.h> 12020 12021unsigned short 12022testme(unsigned short a) 12023{ 12024 return ntohs(a); 12025} 12026 12027_ACEOF 12028if ac_fn_c_try_compile "$LINENO" 12029then : 12030 12031 # 12032 # Not a problem. 12033 # 12034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12035printf "%s\n" "no" >&6; } 12036 12037else $as_nop 12038 12039 # 12040 # A problem. 12041 # 12042 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12043printf "%s\n" "yes" >&6; } 12044 can_add_to_cflags=no 12045 12046fi 12047rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12048 fi 12049 CFLAGS="$save_CFLAGS" 12050 if test x"$can_add_to_cflags" = "xyes" 12051 then 12052 V_CCOPT="$V_CCOPT -Wunreachable-code" 12053 fi 12054 12055else $as_nop 12056 12057 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12058printf "%s\n" "no" >&6; } 12059 CFLAGS="$save_CFLAGS" 12060 12061fi 12062rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12063 ac_c_werror_flag="$save_ac_c_werror_flag" 12064 12065 12066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-but-set-parameter option" >&5 12067printf %s "checking whether the compiler supports the -Wunused-but-set-parameter option... " >&6; } 12068 save_CFLAGS="$CFLAGS" 12069 CFLAGS="$CFLAGS -Wunused-but-set-parameter" 12070 # 12071 # XXX - yes, this depends on the way AC_LANG_WERROR works, 12072 # but no mechanism is provided to turn AC_LANG_WERROR on 12073 # *and then turn it back off*, so that we *only* do it when 12074 # testing compiler options - 15 years after somebody asked 12075 # for it: 12076 # 12077 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 12078 # 12079 save_ac_c_werror_flag="$ac_c_werror_flag" 12080 ac_c_werror_flag=yes 12081 # 12082 # We use AC_LANG_SOURCE() so that we can control the complete 12083 # content of the program being compiled. We do not, for example, 12084 # want the default "int main()" that AC_LANG_PROGRAM() generates, 12085 # as it will generate a warning with -Wold-style-definition, meaning 12086 # that we would treat it as not working, as the test will fail if 12087 # *any* error output, including a warning due to the flag we're 12088 # testing, is generated; see 12089 # 12090 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 12091 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 12092 # 12093 # This may, as per those two messages, be fixed in autoconf 2.70, 12094 # but we only require 2.69 or newer for now. 12095 # 12096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12097/* end confdefs.h. */ 12098int main(void) { return 0; } 12099_ACEOF 12100if ac_fn_c_try_compile "$LINENO" 12101then : 12102 12103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12104printf "%s\n" "yes" >&6; } 12105 can_add_to_cflags=yes 12106 # 12107 # The compile supports this; do we have some C code for 12108 # which the warning should *not* appear? 12109 # We test the fourth argument because the third argument 12110 # could contain quotes, breaking the test. 12111 # 12112 if test "x" != "x" 12113 then 12114 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 12115 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-but-set-parameter " >&5 12116printf %s "checking whether -Wunused-but-set-parameter ... " >&6; } 12117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12118/* end confdefs.h. */ 12119 12120_ACEOF 12121if ac_fn_c_try_compile "$LINENO" 12122then : 12123 12124 # 12125 # Not a problem. 12126 # 12127 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12128printf "%s\n" "no" >&6; } 12129 12130else $as_nop 12131 12132 # 12133 # A problem. 12134 # 12135 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12136printf "%s\n" "yes" >&6; } 12137 can_add_to_cflags=no 12138 12139fi 12140rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12141 fi 12142 CFLAGS="$save_CFLAGS" 12143 if test x"$can_add_to_cflags" = "xyes" 12144 then 12145 V_CCOPT="$V_CCOPT -Wunused-but-set-parameter" 12146 fi 12147 12148else $as_nop 12149 12150 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12151printf "%s\n" "no" >&6; } 12152 CFLAGS="$save_CFLAGS" 12153 12154fi 12155rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12156 ac_c_werror_flag="$save_ac_c_werror_flag" 12157 12158 12159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-but-set-variable option" >&5 12160printf %s "checking whether the compiler supports the -Wunused-but-set-variable option... " >&6; } 12161 save_CFLAGS="$CFLAGS" 12162 CFLAGS="$CFLAGS -Wunused-but-set-variable" 12163 # 12164 # XXX - yes, this depends on the way AC_LANG_WERROR works, 12165 # but no mechanism is provided to turn AC_LANG_WERROR on 12166 # *and then turn it back off*, so that we *only* do it when 12167 # testing compiler options - 15 years after somebody asked 12168 # for it: 12169 # 12170 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 12171 # 12172 save_ac_c_werror_flag="$ac_c_werror_flag" 12173 ac_c_werror_flag=yes 12174 # 12175 # We use AC_LANG_SOURCE() so that we can control the complete 12176 # content of the program being compiled. We do not, for example, 12177 # want the default "int main()" that AC_LANG_PROGRAM() generates, 12178 # as it will generate a warning with -Wold-style-definition, meaning 12179 # that we would treat it as not working, as the test will fail if 12180 # *any* error output, including a warning due to the flag we're 12181 # testing, is generated; see 12182 # 12183 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 12184 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 12185 # 12186 # This may, as per those two messages, be fixed in autoconf 2.70, 12187 # but we only require 2.69 or newer for now. 12188 # 12189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12190/* end confdefs.h. */ 12191int main(void) { return 0; } 12192_ACEOF 12193if ac_fn_c_try_compile "$LINENO" 12194then : 12195 12196 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12197printf "%s\n" "yes" >&6; } 12198 can_add_to_cflags=yes 12199 # 12200 # The compile supports this; do we have some C code for 12201 # which the warning should *not* appear? 12202 # We test the fourth argument because the third argument 12203 # could contain quotes, breaking the test. 12204 # 12205 if test "x" != "x" 12206 then 12207 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 12208 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-but-set-variable " >&5 12209printf %s "checking whether -Wunused-but-set-variable ... " >&6; } 12210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12211/* end confdefs.h. */ 12212 12213_ACEOF 12214if ac_fn_c_try_compile "$LINENO" 12215then : 12216 12217 # 12218 # Not a problem. 12219 # 12220 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12221printf "%s\n" "no" >&6; } 12222 12223else $as_nop 12224 12225 # 12226 # A problem. 12227 # 12228 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12229printf "%s\n" "yes" >&6; } 12230 can_add_to_cflags=no 12231 12232fi 12233rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12234 fi 12235 CFLAGS="$save_CFLAGS" 12236 if test x"$can_add_to_cflags" = "xyes" 12237 then 12238 V_CCOPT="$V_CCOPT -Wunused-but-set-variable" 12239 fi 12240 12241else $as_nop 12242 12243 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12244printf "%s\n" "no" >&6; } 12245 CFLAGS="$save_CFLAGS" 12246 12247fi 12248rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12249 ac_c_werror_flag="$save_ac_c_werror_flag" 12250 12251 12252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-parameter option" >&5 12253printf %s "checking whether the compiler supports the -Wunused-parameter option... " >&6; } 12254 save_CFLAGS="$CFLAGS" 12255 CFLAGS="$CFLAGS -Wunused-parameter" 12256 # 12257 # XXX - yes, this depends on the way AC_LANG_WERROR works, 12258 # but no mechanism is provided to turn AC_LANG_WERROR on 12259 # *and then turn it back off*, so that we *only* do it when 12260 # testing compiler options - 15 years after somebody asked 12261 # for it: 12262 # 12263 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 12264 # 12265 save_ac_c_werror_flag="$ac_c_werror_flag" 12266 ac_c_werror_flag=yes 12267 # 12268 # We use AC_LANG_SOURCE() so that we can control the complete 12269 # content of the program being compiled. We do not, for example, 12270 # want the default "int main()" that AC_LANG_PROGRAM() generates, 12271 # as it will generate a warning with -Wold-style-definition, meaning 12272 # that we would treat it as not working, as the test will fail if 12273 # *any* error output, including a warning due to the flag we're 12274 # testing, is generated; see 12275 # 12276 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 12277 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 12278 # 12279 # This may, as per those two messages, be fixed in autoconf 2.70, 12280 # but we only require 2.69 or newer for now. 12281 # 12282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12283/* end confdefs.h. */ 12284int main(void) { return 0; } 12285_ACEOF 12286if ac_fn_c_try_compile "$LINENO" 12287then : 12288 12289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12290printf "%s\n" "yes" >&6; } 12291 can_add_to_cflags=yes 12292 # 12293 # The compile supports this; do we have some C code for 12294 # which the warning should *not* appear? 12295 # We test the fourth argument because the third argument 12296 # could contain quotes, breaking the test. 12297 # 12298 if test "x" != "x" 12299 then 12300 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 12301 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-parameter " >&5 12302printf %s "checking whether -Wunused-parameter ... " >&6; } 12303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12304/* end confdefs.h. */ 12305 12306_ACEOF 12307if ac_fn_c_try_compile "$LINENO" 12308then : 12309 12310 # 12311 # Not a problem. 12312 # 12313 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12314printf "%s\n" "no" >&6; } 12315 12316else $as_nop 12317 12318 # 12319 # A problem. 12320 # 12321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12322printf "%s\n" "yes" >&6; } 12323 can_add_to_cflags=no 12324 12325fi 12326rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12327 fi 12328 CFLAGS="$save_CFLAGS" 12329 if test x"$can_add_to_cflags" = "xyes" 12330 then 12331 V_CCOPT="$V_CCOPT -Wunused-parameter" 12332 fi 12333 12334else $as_nop 12335 12336 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12337printf "%s\n" "no" >&6; } 12338 CFLAGS="$save_CFLAGS" 12339 12340fi 12341rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12342 ac_c_werror_flag="$save_ac_c_werror_flag" 12343 12344 12345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5 12346printf %s "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; } 12347 save_CFLAGS="$CFLAGS" 12348 CFLAGS="$CFLAGS -Wused-but-marked-unused" 12349 # 12350 # XXX - yes, this depends on the way AC_LANG_WERROR works, 12351 # but no mechanism is provided to turn AC_LANG_WERROR on 12352 # *and then turn it back off*, so that we *only* do it when 12353 # testing compiler options - 15 years after somebody asked 12354 # for it: 12355 # 12356 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 12357 # 12358 save_ac_c_werror_flag="$ac_c_werror_flag" 12359 ac_c_werror_flag=yes 12360 # 12361 # We use AC_LANG_SOURCE() so that we can control the complete 12362 # content of the program being compiled. We do not, for example, 12363 # want the default "int main()" that AC_LANG_PROGRAM() generates, 12364 # as it will generate a warning with -Wold-style-definition, meaning 12365 # that we would treat it as not working, as the test will fail if 12366 # *any* error output, including a warning due to the flag we're 12367 # testing, is generated; see 12368 # 12369 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 12370 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 12371 # 12372 # This may, as per those two messages, be fixed in autoconf 2.70, 12373 # but we only require 2.69 or newer for now. 12374 # 12375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12376/* end confdefs.h. */ 12377int main(void) { return 0; } 12378_ACEOF 12379if ac_fn_c_try_compile "$LINENO" 12380then : 12381 12382 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12383printf "%s\n" "yes" >&6; } 12384 can_add_to_cflags=yes 12385 # 12386 # The compile supports this; do we have some C code for 12387 # which the warning should *not* appear? 12388 # We test the fourth argument because the third argument 12389 # could contain quotes, breaking the test. 12390 # 12391 if test "x" != "x" 12392 then 12393 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 12394 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wused-but-marked-unused " >&5 12395printf %s "checking whether -Wused-but-marked-unused ... " >&6; } 12396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12397/* end confdefs.h. */ 12398 12399_ACEOF 12400if ac_fn_c_try_compile "$LINENO" 12401then : 12402 12403 # 12404 # Not a problem. 12405 # 12406 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12407printf "%s\n" "no" >&6; } 12408 12409else $as_nop 12410 12411 # 12412 # A problem. 12413 # 12414 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12415printf "%s\n" "yes" >&6; } 12416 can_add_to_cflags=no 12417 12418fi 12419rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12420 fi 12421 CFLAGS="$save_CFLAGS" 12422 if test x"$can_add_to_cflags" = "xyes" 12423 then 12424 V_CCOPT="$V_CCOPT -Wused-but-marked-unused" 12425 fi 12426 12427else $as_nop 12428 12429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12430printf "%s\n" "no" >&6; } 12431 CFLAGS="$save_CFLAGS" 12432 12433fi 12434rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12435 ac_c_werror_flag="$save_ac_c_werror_flag" 12436 12437 fi 12438 12439 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5 12440printf %s "checking whether the compiler supports generating dependencies... " >&6; } 12441 if test "$GCC" = yes ; then 12442 # 12443 # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even 12444 # though it's not); we assume that, in this case, the flag 12445 # would be -M. 12446 # 12447 ac_lbl_dependency_flag="-M" 12448 else 12449 # 12450 # Not GCC or a compiler deemed to be GCC; what platform is 12451 # this? (We're assuming that if the compiler isn't GCC 12452 # it's the compiler from the vendor of the OS; that won't 12453 # necessarily be true for x86 platforms, where it might be 12454 # the Intel C compiler.) 12455 # 12456 case "$host_os" in 12457 12458 irix*|osf*|darwin*) 12459 # 12460 # MIPS C for IRIX, DEC C, and clang all use -M. 12461 # 12462 ac_lbl_dependency_flag="-M" 12463 ;; 12464 12465 solaris*) 12466 # 12467 # Sun C uses -xM. 12468 # 12469 ac_lbl_dependency_flag="-xM" 12470 ;; 12471 12472 hpux*) 12473 # 12474 # HP's older C compilers don't support this. 12475 # HP's newer C compilers support this with 12476 # either +M or +Make; the older compilers 12477 # interpret +M as something completely 12478 # different, so we use +Make so we don't 12479 # think it works with the older compilers. 12480 # 12481 ac_lbl_dependency_flag="+Make" 12482 ;; 12483 12484 *) 12485 # 12486 # Not one of the above; assume no support for 12487 # generating dependencies. 12488 # 12489 ac_lbl_dependency_flag="" 12490 ;; 12491 esac 12492 fi 12493 12494 # 12495 # Is ac_lbl_dependency_flag defined and, if so, does the compiler 12496 # complain about it? 12497 # 12498 # Note: clang doesn't seem to exit with an error status when handed 12499 # an unknown non-warning error, even if you pass it 12500 # -Werror=unknown-warning-option. However, it always supports 12501 # -M, so the fact that this test always succeeds with clang 12502 # isn't an issue. 12503 # 12504 if test ! -z "$ac_lbl_dependency_flag"; then 12505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12506/* end confdefs.h. */ 12507int main(void) { return 0; } 12508_ACEOF 12509 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5 12510 (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5 12511 ac_status=$? 12512 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 12513 test $ac_status = 0; }; then 12514 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5 12515printf "%s\n" "yes, with $ac_lbl_dependency_flag" >&6; } 12516 DEPENDENCY_CFLAG="$ac_lbl_dependency_flag" 12517 MKDEP='${top_srcdir}/mkdep' 12518 else 12519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12520printf "%s\n" "no" >&6; } 12521 # 12522 # We can't run mkdep, so have "make depend" do 12523 # nothing. 12524 # 12525 MKDEP='${top_srcdir}/nomkdep' 12526 fi 12527 rm -rf conftest* 12528 else 12529 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12530printf "%s\n" "no" >&6; } 12531 # 12532 # We can't run mkdep, so have "make depend" do 12533 # nothing. 12534 # 12535 MKDEP='${top_srcdir}/nomkdep' 12536 fi 12537 12538 12539 12540 # 12541 # We used to set -n32 for IRIX 6 when not using GCC (presumed 12542 # to mean that we're using MIPS C or MIPSpro C); it specified 12543 # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm 12544 # not sure why that would be something to do *only* with a 12545 # .devel file; why should the ABI for which we produce code 12546 # depend on .devel? 12547 # 12548 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use an os-proto.h header" >&5 12549printf %s "checking whether to use an os-proto.h header... " >&6; } 12550 os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'` 12551 name="lbl/os-$os.h" 12552 if test -f $name ; then 12553 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, at \"$name\"" >&5 12554printf "%s\n" "yes, at \"$name\"" >&6; } 12555 ln -s $name os-proto.h 12556 12557printf "%s\n" "#define HAVE_OS_PROTO_H 1" >>confdefs.h 12558 12559 else 12560 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12561printf "%s\n" "no" >&6; } 12562 fi 12563 fi 12564 12565# 12566# Check to see if the sockaddr struct has the 4.4 BSD sa_len member. 12567# 12568ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" " 12569 #include <sys/types.h> 12570 #include <sys/socket.h> 12571 12572" 12573if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes 12574then : 12575 12576printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_SA_LEN 1" >>confdefs.h 12577 12578 12579fi 12580 12581 12582# 12583# Check to see if there's a sockaddr_storage structure. 12584# 12585ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " 12586 #include <sys/types.h> 12587 #include <sys/socket.h> 12588 12589" 12590if test "x$ac_cv_type_struct_sockaddr_storage" = xyes 12591then : 12592 12593printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h 12594 12595 12596fi 12597 12598 12599# 12600# Check to see if the dl_hp_ppa_info_t struct has the HP-UX 11.00 12601# dl_module_id_1 member. 12602# 12603# NOTE: any failure means we conclude that it doesn't have that member, 12604# so if we don't have DLPI, don't have a <sys/dlpi_ext.h> header, or 12605# have one that doesn't declare a dl_hp_ppa_info_t type, we conclude 12606# it doesn't have that member (which is OK, as either we won't be 12607# using code that would use that member, or we wouldn't compile in 12608# any case). 12609# 12610ac_fn_c_check_member "$LINENO" "dl_hp_ppa_info_t" "dl_module_id_1" "ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" " 12611 #include <sys/types.h> 12612 #include <sys/dlpi.h> 12613 #include <sys/dlpi_ext.h> 12614 12615" 12616if test "x$ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" = xyes 12617then : 12618 12619printf "%s\n" "#define HAVE_DL_HP_PPA_INFO_T_DL_MODULE_ID_1 1" >>confdefs.h 12620 12621 12622fi 12623 12624 12625# 12626# Various Linux-specific mechanisms. 12627# 12628# Check whether --enable-usb was given. 12629if test ${enable_usb+y} 12630then : 12631 enableval=$enable_usb; 12632else $as_nop 12633 enable_usb=yes 12634fi 12635 12636 12637# 12638# If somebody requested an XXX-only pcap, that doesn't include 12639# additional mechanisms. 12640# 12641if test "xxx_only" != yes; then 12642 case "$host_os" in 12643 linux*) 12644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Linux usbmon USB sniffing support" >&5 12645printf %s "checking for Linux usbmon USB sniffing support... " >&6; } 12646 if test "x$enable_usb" != "xno" ; then 12647 12648printf "%s\n" "#define PCAP_SUPPORT_LINUX_USBMON 1" >>confdefs.h 12649 12650 MODULE_C_SRC="$MODULE_C_SRC pcap-usb-linux.c" 12651 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12652printf "%s\n" "yes" >&6; } 12653 # 12654 # Note: if the directory for special files is *EVER* somewhere 12655 # other than the UN*X standard of /dev (which will break any 12656 # software that looks for /dev/null or /dev/tty, for example, 12657 # so doing that is *REALLY* not a good idea), please provide 12658 # some mechanism to determine that directory at *run time*, 12659 # rather than *configure time*, so that it works when doing 12660 # a cross-build, and that works with *multiple* distributions, 12661 # with our without udev, and with multiple versions of udev, 12662 # with udevinfo or udevadm or any other mechanism to get the 12663 # special files directory. 12664 # 12665 # Do we have a version of <linux/compiler.h> available? 12666 # If so, we might need it for <linux/usbdevice_fs.h>. 12667 # 12668 ac_fn_c_check_header_compile "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default" 12669if test "x$ac_cv_header_linux_compiler_h" = xyes 12670then : 12671 printf "%s\n" "#define HAVE_LINUX_COMPILER_H 1" >>confdefs.h 12672 12673fi 12674 12675 if test "$ac_cv_header_linux_compiler_h" = yes; then 12676 # 12677 # Yes - include it when testing for <linux/usbdevice_fs.h>. 12678 # 12679 ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "#include <linux/compiler.h> 12680" 12681if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes 12682then : 12683 printf "%s\n" "#define HAVE_LINUX_USBDEVICE_FS_H 1" >>confdefs.h 12684 12685fi 12686 12687 else 12688 ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "$ac_includes_default" 12689if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes 12690then : 12691 printf "%s\n" "#define HAVE_LINUX_USBDEVICE_FS_H 1" >>confdefs.h 12692 12693fi 12694 12695 fi 12696 if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then 12697 # 12698 # OK, does it define bRequestType? Older versions of the kernel 12699 # define fields with names like "requesttype, "request", and 12700 # "value", rather than "bRequestType", "bRequest", and 12701 # "wValue". 12702 # 12703 ac_fn_c_check_member "$LINENO" "struct usbdevfs_ctrltransfer" "bRequestType" "ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" " 12704 $ac_includes_default 12705 #ifdef HAVE_LINUX_COMPILER_H 12706 #include <linux/compiler.h> 12707 #endif 12708 #include <linux/usbdevice_fs.h> 12709 12710" 12711if test "x$ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" = xyes 12712then : 12713 12714printf "%s\n" "#define HAVE_STRUCT_USBDEVFS_CTRLTRANSFER_BREQUESTTYPE 1" >>confdefs.h 12715 12716 12717fi 12718 12719 fi 12720 else 12721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12722printf "%s\n" "no" >&6; } 12723 fi 12724 12725 # 12726 # Life's too short to deal with trying to get this to compile 12727 # if you don't get the right types defined with 12728 # __KERNEL_STRICT_NAMES getting defined by some other include. 12729 # 12730 # Check whether the includes Just Work. If not, don't turn on 12731 # netfilter support. 12732 # 12733 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netfilter support" >&5 12734printf %s "checking whether we can compile the netfilter support... " >&6; } 12735 if test ${ac_cv_netfilter_can_compile+y} 12736then : 12737 printf %s "(cached) " >&6 12738else $as_nop 12739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12740/* end confdefs.h. */ 12741 12742$ac_includes_default 12743#include <sys/socket.h> 12744#include <netinet/in.h> 12745#include <linux/types.h> 12746 12747#include <linux/netlink.h> 12748#include <linux/netfilter.h> 12749#include <linux/netfilter/nfnetlink.h> 12750#include <linux/netfilter/nfnetlink_log.h> 12751#include <linux/netfilter/nfnetlink_queue.h> 12752int 12753main (void) 12754{ 12755 12756 ; 12757 return 0; 12758} 12759_ACEOF 12760if ac_fn_c_try_compile "$LINENO" 12761then : 12762 ac_cv_netfilter_can_compile=yes 12763else $as_nop 12764 ac_cv_netfilter_can_compile=no 12765fi 12766rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12767fi 12768 12769 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_netfilter_can_compile" >&5 12770printf "%s\n" "$ac_cv_netfilter_can_compile" >&6; } 12771 if test $ac_cv_netfilter_can_compile = yes ; then 12772 12773printf "%s\n" "#define PCAP_SUPPORT_NETFILTER 1" >>confdefs.h 12774 12775 MODULE_C_SRC="$MODULE_C_SRC pcap-netfilter-linux.c" 12776 fi 12777 ;; 12778 esac 12779fi 12780 12781 12782 12783# Check whether --enable-netmap was given. 12784if test ${enable_netmap+y} 12785then : 12786 enableval=$enable_netmap; 12787else $as_nop 12788 enable_netmap=yes 12789fi 12790 12791 12792if test "x$enable_netmap" != "xno" ; then 12793 # 12794 # Check whether net/netmap_user.h is usable if NETMAP_WITH_LIBS is 12795 # defined; it's not usable on DragonFly BSD 4.6 if NETMAP_WITH_LIBS 12796 # is defined, for example, as it includes a nonexistent malloc.h 12797 # header. 12798 # 12799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netmap support" >&5 12800printf %s "checking whether we can compile the netmap support... " >&6; } 12801 if test ${ac_cv_net_netmap_user_can_compile+y} 12802then : 12803 printf %s "(cached) " >&6 12804else $as_nop 12805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12806/* end confdefs.h. */ 12807 12808$ac_includes_default 12809#define NETMAP_WITH_LIBS 12810#include <net/netmap_user.h> 12811int 12812main (void) 12813{ 12814 12815 ; 12816 return 0; 12817} 12818_ACEOF 12819if ac_fn_c_try_compile "$LINENO" 12820then : 12821 ac_cv_net_netmap_user_can_compile=yes 12822else $as_nop 12823 ac_cv_net_netmap_user_can_compile=no 12824fi 12825rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12826fi 12827 12828 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_net_netmap_user_can_compile" >&5 12829printf "%s\n" "$ac_cv_net_netmap_user_can_compile" >&6; } 12830 if test $ac_cv_net_netmap_user_can_compile = yes ; then 12831 12832printf "%s\n" "#define PCAP_SUPPORT_NETMAP 1" >>confdefs.h 12833 12834 MODULE_C_SRC="$MODULE_C_SRC pcap-netmap.c" 12835 fi 12836 12837fi 12838 12839# Check for DPDK support. 12840 12841# Check whether --with-dpdk was given. 12842if test ${with_dpdk+y} 12843then : 12844 withval=$with_dpdk; 12845 if test "$withval" = no 12846 then 12847 # User doesn't want DPDK support. 12848 want_dpdk=no 12849 elif test "$withval" = yes 12850 then 12851 # User wants DPDK support but hasn't specified a directory. 12852 want_dpdk=yes 12853 else 12854 # User wants DPDK support and has specified a directory, 12855 # so use the provided value. 12856 want_dpdk=yes 12857 dpdk_dir=$withval 12858 fi 12859 12860else $as_nop 12861 12862 if test "$V_PCAP" = dpdk; then 12863 # User requested DPDK-only libpcap, so we'd better have 12864 # the DPDK API. 12865 want_dpdk=yes 12866 elif test "xxx_only" = yes; then 12867 # User requested something-else-only pcap, so they don't 12868 # want DPDK support. 12869 want_dpdk=no 12870 else 12871 # 12872 # User didn't explicitly request DPDK; don't give it 12873 # to them without their consent, as the code is 12874 # immensely hard to keep compiling for every random 12875 # API change the DPDK folks make. 12876 # 12877 want_dpdk=no 12878 fi 12879 12880fi 12881 12882 12883if test "$want_dpdk" != no; then 12884 # 12885 # The user didn't explicitly say they don't want DPDK, 12886 # so see if we have it. 12887 # 12888 # We only try to find it using pkg-config; DPDK is *SO* 12889 # complicated - DPDK 19.02, for example, has about 117(!) 12890 # libraries, and the precise set of libraries required has 12891 # changed over time - so attempting to guess which libraries 12892 # you need, and hardcoding that in an attempt to find the 12893 # libraries without DPDK, rather than relying on DPDK to 12894 # tell you, with a .pc file, what libraries are needed, 12895 # is *EXTREMELY* fragile and has caused some bug reports, 12896 # so we're just not going to do it. 12897 # 12898 # If that causes a problem, the only thing we will do is 12899 # accept an alternative way of finding the appropriate 12900 # library set for the installed version of DPDK that is 12901 # as robust as pkg-config (i.e., it had better work as well 12902 # as pkg-config with *ALL* versions of DPDK that provide a 12903 # libdpdk.pc file). 12904 # 12905 # If --with-dpdk={path} was specified, add {path}/pkgconfig 12906 # to PKG_CONFIG_PATH, so we look for the .pc file there, 12907 # first. 12908 # 12909 save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH" 12910 if test -n "$dpdk_dir"; then 12911 PKG_CONFIG_PATH="$dpdk_dir:$PKG_CONFIG_PATH" 12912 fi 12913 12914{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libdpdk with pkg-config" >&5 12915printf %s "checking for libdpdk with pkg-config... " >&6; } 12916if test -n "$PKG_CONFIG"; then 12917 12918 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdpdk\""; } >&5 12919 ($PKG_CONFIG --exists --print-errors "libdpdk") 2>&5 12920 ac_status=$? 12921 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 12922 test $ac_status = 0; }; then 12923 # 12924 # The package was found, so try to get its C flags and 12925 # libraries. 12926 # 12927 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5 12928printf "%s\n" "found" >&6; } 12929 if test ! -n "$DPDK_CFLAGS"; then 12930 DPDK_CFLAGS=`$PKG_CONFIG --cflags "libdpdk" 2>/dev/null` 12931 if test "x$?" != "x0"; then 12932 # 12933 # That failed - report an error. 12934 # Re-run the command, telling pkg-config to print an error 12935 # message, capture the error message, and report it. 12936 # This causes the configuration script to fail, as it means 12937 # the script is almost certainly doing something wrong. 12938 # 12939 12940if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 12941 _pkg_short_errors_supported=yes 12942else 12943 _pkg_short_errors_supported=no 12944fi 12945 if test $_pkg_short_errors_supported = yes; then 12946 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --cflags "libdpdk" 2>&1` 12947 else 12948 _pkg_error_string=`$PKG_CONFIG --print-errors --cflags "libdpdk" 2>&1` 12949 fi 12950 as_fn_error $? "$PKG_CONFIG --cflags \"libdpdk\" failed: $_pkg_error_string" "$LINENO" 5 12951 fi 12952 fi 12953 if test ! -n "$DPDK_LIBS"; then 12954 DPDK_LIBS=`$PKG_CONFIG --libs "libdpdk" 2>/dev/null` 12955 if test "x$?" != "x0"; then 12956 # 12957 # That failed - report an error. 12958 # Re-run the command, telling pkg-config to print an error 12959 # message, capture the error message, and report it. 12960 # This causes the configuration script to fail, as it means 12961 # the script is almost certainly doing something wrong. 12962 # 12963 12964if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 12965 _pkg_short_errors_supported=yes 12966else 12967 _pkg_short_errors_supported=no 12968fi 12969 if test $_pkg_short_errors_supported = yes; then 12970 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs "libdpdk" 2>&1` 12971 else 12972 _pkg_error_string=`$PKG_CONFIG --print-errors --libs "libdpdk" 2>&1` 12973 fi 12974 as_fn_error $? "$PKG_CONFIG --libs \"libdpdk\" failed: $_pkg_error_string" "$LINENO" 5 12975 fi 12976 fi 12977 if test ! -n "$DPDK_LIBS_STATIC"; then 12978 DPDK_LIBS_STATIC=`$PKG_CONFIG --libs --static "libdpdk" 2>/dev/null` 12979 if test "x$?" != "x0"; then 12980 # 12981 # That failed - report an error. 12982 # Re-run the command, telling pkg-config to print an error 12983 # message, capture the error message, and report it. 12984 # This causes the configuration script to fail, as it means 12985 # the script is almost certainly doing something wrong. 12986 # 12987 12988if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 12989 _pkg_short_errors_supported=yes 12990else 12991 _pkg_short_errors_supported=no 12992fi 12993 if test $_pkg_short_errors_supported = yes; then 12994 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs --static "libdpdk" 2>&1` 12995 else 12996 _pkg_error_string=`$PKG_CONFIG --print-errors --libs --static "libdpdk" 2>&1` 12997 fi 12998 as_fn_error $? "$PKG_CONFIG --libs --static \"libdpdk\" failed: $_pkg_error_string" "$LINENO" 5 12999 fi 13000 fi 13001 13002 found_dpdk=yes 13003 13004 else 13005 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 13006printf "%s\n" "not found" >&6; } 13007 : 13008 fi 13009else 13010 # No pkg-config, so obviously not found with pkg-config. 13011 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config not found" >&5 13012printf "%s\n" "pkg-config not found" >&6; } 13013 : 13014fi 13015 13016 PKG_CONFIG_PATH="$save_PKG_CONFIG_PATH" 13017 13018 # 13019 # Did we find DPDK? 13020 # 13021 if test "$found_dpdk" = yes; then 13022 # 13023 # Found it. 13024 # 13025 # We call rte_eth_dev_count_avail(), and older versions 13026 # of DPDK didn't have it, so check for it. 13027 # 13028 13029 save_CFLAGS="$CFLAGS" 13030 save_LIBS="$LIBS" 13031 save_LDFLAGS="$LDFLAGS" 13032 13033 CFLAGS="$CFLAGS $DPDK_CFLAGS" 13034 LIBS="$LIBS $DPDK_LIBS" 13035 ac_fn_c_check_func "$LINENO" "rte_eth_dev_count_avail" "ac_cv_func_rte_eth_dev_count_avail" 13036if test "x$ac_cv_func_rte_eth_dev_count_avail" = xyes 13037then : 13038 13039fi 13040 13041 13042 CFLAGS="$save_CFLAGS" 13043 LIBS="$save_LIBS" 13044 LDFLAGS="$save_LDFLAGS" 13045 13046 fi 13047 13048 if test "$ac_cv_func_rte_eth_dev_count_avail" = yes; then 13049 # 13050 # We found a usable DPDK. 13051 # 13052 # Check whether the rte_ether.h file defines 13053 # struct ether_addr or struct rte_ether_addr. 13054 # 13055 # ("API compatibility? That's for losers!") 13056 # 13057 13058 save_CFLAGS="$CFLAGS" 13059 save_LIBS="$LIBS" 13060 save_LDFLAGS="$LDFLAGS" 13061 13062 CFLAGS="$CFLAGS $DPDK_CFLAGS" 13063 LIBS="$LIBS $DPDK_LIBS" 13064 ac_fn_c_check_type "$LINENO" "struct rte_ether_addr" "ac_cv_type_struct_rte_ether_addr" " 13065 #include <rte_ether.h> 13066 13067" 13068if test "x$ac_cv_type_struct_rte_ether_addr" = xyes 13069then : 13070 13071printf "%s\n" "#define HAVE_STRUCT_RTE_ETHER_ADDR 1" >>confdefs.h 13072 13073 13074fi 13075 13076 13077 CFLAGS="$save_CFLAGS" 13078 LIBS="$save_LIBS" 13079 LDFLAGS="$save_LDFLAGS" 13080 13081 13082 # 13083 # We can build with DPDK. 13084 # 13085 V_INCLS="$V_INCLS $DPDK_CFLAGS" 13086 ADDITIONAL_LIBS="$ADDITIONAL_LIBS $DPDK_LIBS" 13087 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $DPDK_LIBS_STATIC" 13088 REQUIRES_PRIVATE="$REQUIRES_PRIVATE libdpdk" 13089 13090printf "%s\n" "#define PCAP_SUPPORT_DPDK 1" >>confdefs.h 13091 13092 if test $V_PCAP != dpdk ; then 13093 MODULE_C_SRC="$MODULE_C_SRC pcap-dpdk.c" 13094 fi 13095 else 13096 # 13097 # We didn't find a usable DPDK. 13098 # If we required it (with --with-dpdk or --with-pcap=dpdk), 13099 # fail with an appropriate message telling the user what 13100 # the problem was, otherwise note the problem with a 13101 # warning. 13102 # 13103 if test "$found_dpdk" != yes; then 13104 # 13105 # Not found with pkg-config. Note that we 13106 # require that DPDK must be findable with 13107 # pkg-config. 13108 # 13109 if test "$V_PCAP" = dpdk; then 13110 # 13111 # User requested DPDK-only capture support. 13112 # 13113 as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but 13114we couldn't find DPDK with pkg-config. Make sure that pkg-config is 13115installed, that DPDK 18.02.2 or later is installed, and that DPDK 13116provides a .pc file." "$LINENO" 5 13117 fi 13118 13119 if test "$want_dpdk" = yes; then 13120 # 13121 # User requested that libpcap include 13122 # DPDK capture support. 13123 # 13124 as_fn_error $? "DPDK support requested with --with-dpdk, but we 13125couldn't find DPDK with pkg-config. Make sure that pkg-config 13126is installed, that DPDK 18.02.2 or later is installed, and that 13127DPDK provides .pc file." "$LINENO" 5 13128 fi 13129 13130 # 13131 # User didn't indicate whether they wanted DPDK 13132 # or not; just warn why we didn't find it. 13133 # 13134 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: We couldn't find DPDK with pkg-config. If 13135you want DPDK support, make sure that pkg-config is installed, 13136that DPDK 18.02.2 or later is installed, and that DPDK provides a 13137.pc file." >&5 13138printf "%s\n" "$as_me: WARNING: We couldn't find DPDK with pkg-config. If 13139you want DPDK support, make sure that pkg-config is installed, 13140that DPDK 18.02.2 or later is installed, and that DPDK provides a 13141.pc file." >&2;} 13142 elif test "$ac_cv_func_rte_eth_dev_count_avail" != yes; then 13143 # 13144 # Found with pkg-config, but we couldn't compile 13145 # a program that calls rte_eth_dev_count(); we 13146 # probably have the developer package installed, 13147 # but don't have a sufficiently recent version 13148 # of DPDK. Note that we need a sufficiently 13149 # recent version of DPDK. 13150 # 13151 if test "$V_PCAP" = dpdk; then 13152 # 13153 # User requested DPDK-only capture support. 13154 # 13155 as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but we 13156can't compile libpcap with DPDK. Make sure that DPDK 18.02.2 or later 13157is installed." "$LINENO" 5 13158 fi 13159 13160 if test "$want_dpdk" = yes; then 13161 # 13162 # User requested that libpcap include 13163 # DPDK capture support. 13164 # 13165 as_fn_error $? "DPDK support requested with --with-dpdk, but 13166we can't compile libpcap with DPDK. Make sure that DPDK 18.02.2 13167or later is DPDK is installed." "$LINENO" 5 13168 fi 13169 13170 # 13171 # User didn't indicate whether they wanted DPDK 13172 # or not; just warn why we didn't find it. 13173 # 13174 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: DPDK was found, but we can't compile libpcap with it. 13175Make sure that DPDK 18.02.2 or later is installed." >&5 13176printf "%s\n" "$as_me: WARNING: DPDK was found, but we can't compile libpcap with it. 13177Make sure that DPDK 18.02.2 or later is installed." >&2;} 13178 fi 13179 fi 13180fi 13181 13182 13183# Check whether --enable-bluetooth was given. 13184if test ${enable_bluetooth+y} 13185then : 13186 enableval=$enable_bluetooth; 13187else $as_nop 13188 enable_bluetooth=ifsupportavailable 13189fi 13190 13191 13192if test "xxx_only" = yes; then 13193 # User requested something-else-only pcap, so they don't 13194 # want Bluetooth support. 13195 enable_bluetooth=no 13196fi 13197 13198if test "x$enable_bluetooth" != "xno" ; then 13199 case "$host_os" in 13200 linux*) 13201 ac_fn_c_check_header_compile "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default" 13202if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes 13203then : 13204 13205 # 13206 # We have bluetooth.h, so we support Bluetooth 13207 # sniffing. 13208 # 13209 13210printf "%s\n" "#define PCAP_SUPPORT_BT 1" >>confdefs.h 13211 13212 MODULE_C_SRC="$MODULE_C_SRC pcap-bt-linux.c" 13213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is supported" >&5 13214printf "%s\n" "$as_me: Bluetooth sniffing is supported" >&6;} 13215 ac_lbl_bluetooth_available=yes 13216 13217 # 13218 # OK, does struct sockaddr_hci have an hci_channel 13219 # member? 13220 # 13221 ac_fn_c_check_member "$LINENO" "struct sockaddr_hci" "hci_channel" "ac_cv_member_struct_sockaddr_hci_hci_channel" " 13222 #include <bluetooth/bluetooth.h> 13223 #include <bluetooth/hci.h> 13224 13225" 13226if test "x$ac_cv_member_struct_sockaddr_hci_hci_channel" = xyes 13227then : 13228 13229printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_HCI_HCI_CHANNEL 1" >>confdefs.h 13230 13231 13232 # 13233 # Yes; is HCI_CHANNEL_MONITOR defined? 13234 # 13235 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if HCI_CHANNEL_MONITOR is defined" >&5 13236printf %s "checking if HCI_CHANNEL_MONITOR is defined... " >&6; } 13237 if test ${ac_cv_lbl_hci_channel_monitor_is_defined+y} 13238then : 13239 printf %s "(cached) " >&6 13240else $as_nop 13241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13242/* end confdefs.h. */ 13243 13244 #include <bluetooth/bluetooth.h> 13245 #include <bluetooth/hci.h> 13246 13247int 13248main (void) 13249{ 13250 13251 int i = HCI_CHANNEL_MONITOR; 13252 13253 ; 13254 return 0; 13255} 13256_ACEOF 13257if ac_fn_c_try_compile "$LINENO" 13258then : 13259 13260 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 13261printf "%s\n" "yes" >&6; } 13262 13263printf "%s\n" "#define PCAP_SUPPORT_BT_MONITOR 1" >>confdefs.h 13264 13265 MODULE_C_SRC="$MODULE_C_SRC pcap-bt-monitor-linux.c" 13266 13267else $as_nop 13268 13269 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 13270printf "%s\n" "no" >&6; } 13271 13272fi 13273rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 13274fi 13275 13276 13277fi 13278 13279 13280else $as_nop 13281 13282 # 13283 # We don't have bluetooth.h, so we don't support 13284 # Bluetooth sniffing. 13285 # 13286 if test "x$enable_bluetooth" = "xyes" ; then 13287 as_fn_error $? "Bluetooth sniffing is not supported; install a Bluetooth devel library (libbluetooth-dev|bluez-libs-devel|bluez-dev|libbluetooth-devel|...) to enable it" "$LINENO" 5 13288 else 13289 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is not supported; install a Bluetooth devel library (libbluetooth-dev|bluez-libs-devel|bluez-dev|libbluetooth-devel|...) to enable it" >&5 13290printf "%s\n" "$as_me: Bluetooth sniffing is not supported; install a Bluetooth devel library (libbluetooth-dev|bluez-libs-devel|bluez-dev|libbluetooth-devel|...) to enable it" >&6;} 13291 fi 13292 13293fi 13294 13295 ;; 13296 *) 13297 if test "x$enable_bluetooth" = "xyes" ; then 13298 as_fn_error $? "no Bluetooth sniffing support implemented for $host_os" "$LINENO" 5 13299 else 13300 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: no Bluetooth sniffing support implemented for $host_os" >&5 13301printf "%s\n" "$as_me: no Bluetooth sniffing support implemented for $host_os" >&6;} 13302 fi 13303 ;; 13304 esac 13305 13306fi 13307 13308# Check whether --enable-dbus was given. 13309if test ${enable_dbus+y} 13310then : 13311 enableval=$enable_dbus; 13312else $as_nop 13313 enable_dbus=ifavailable 13314fi 13315 13316 13317if test "xxx_only" = yes; then 13318 # User requested something-else-only pcap, so they don't 13319 # want D-Bus support. 13320 enable_dbus=no 13321fi 13322 13323if test "x$enable_dbus" != "xno"; then 13324 if test "x$enable_dbus" = "xyes"; then 13325 case "$host_os" in 13326 13327 darwin*) 13328 # 13329 # We don't support D-Bus sniffing on macOS; see 13330 # 13331 # https://bugs.freedesktop.org/show_bug.cgi?id=74029 13332 # 13333 # The user requested it, so fail. 13334 # 13335 as_fn_error $? "Due to freedesktop.org bug 74029, D-Bus capture support is not available on macOS" "$LINENO" 5 13336 esac 13337 else 13338 case "$host_os" in 13339 13340 darwin*) 13341 # 13342 # We don't support D-Bus sniffing on macOS; see 13343 # 13344 # https://bugs.freedesktop.org/show_bug.cgi?id=74029 13345 # 13346 # The user didn't explicitly request it, so just 13347 # silently refuse to enable it. 13348 # 13349 enable_dbus="no" 13350 ;; 13351 esac 13352 fi 13353fi 13354 13355if test "x$enable_dbus" != "xno"; then 13356 13357{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dbus-1 with pkg-config" >&5 13358printf %s "checking for dbus-1 with pkg-config... " >&6; } 13359if test -n "$PKG_CONFIG"; then 13360 13361 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5 13362 ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5 13363 ac_status=$? 13364 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 13365 test $ac_status = 0; }; then 13366 # 13367 # The package was found, so try to get its C flags and 13368 # libraries. 13369 # 13370 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5 13371printf "%s\n" "found" >&6; } 13372 if test ! -n "$DBUS_CFLAGS"; then 13373 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null` 13374 if test "x$?" != "x0"; then 13375 # 13376 # That failed - report an error. 13377 # Re-run the command, telling pkg-config to print an error 13378 # message, capture the error message, and report it. 13379 # This causes the configuration script to fail, as it means 13380 # the script is almost certainly doing something wrong. 13381 # 13382 13383if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 13384 _pkg_short_errors_supported=yes 13385else 13386 _pkg_short_errors_supported=no 13387fi 13388 if test $_pkg_short_errors_supported = yes; then 13389 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --cflags "dbus-1" 2>&1` 13390 else 13391 _pkg_error_string=`$PKG_CONFIG --print-errors --cflags "dbus-1" 2>&1` 13392 fi 13393 as_fn_error $? "$PKG_CONFIG --cflags \"dbus-1\" failed: $_pkg_error_string" "$LINENO" 5 13394 fi 13395 fi 13396 if test ! -n "$DBUS_LIBS"; then 13397 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null` 13398 if test "x$?" != "x0"; then 13399 # 13400 # That failed - report an error. 13401 # Re-run the command, telling pkg-config to print an error 13402 # message, capture the error message, and report it. 13403 # This causes the configuration script to fail, as it means 13404 # the script is almost certainly doing something wrong. 13405 # 13406 13407if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 13408 _pkg_short_errors_supported=yes 13409else 13410 _pkg_short_errors_supported=no 13411fi 13412 if test $_pkg_short_errors_supported = yes; then 13413 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs "dbus-1" 2>&1` 13414 else 13415 _pkg_error_string=`$PKG_CONFIG --print-errors --libs "dbus-1" 2>&1` 13416 fi 13417 as_fn_error $? "$PKG_CONFIG --libs \"dbus-1\" failed: $_pkg_error_string" "$LINENO" 5 13418 fi 13419 fi 13420 if test ! -n "$DBUS_LIBS_STATIC"; then 13421 DBUS_LIBS_STATIC=`$PKG_CONFIG --libs --static "dbus-1" 2>/dev/null` 13422 if test "x$?" != "x0"; then 13423 # 13424 # That failed - report an error. 13425 # Re-run the command, telling pkg-config to print an error 13426 # message, capture the error message, and report it. 13427 # This causes the configuration script to fail, as it means 13428 # the script is almost certainly doing something wrong. 13429 # 13430 13431if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 13432 _pkg_short_errors_supported=yes 13433else 13434 _pkg_short_errors_supported=no 13435fi 13436 if test $_pkg_short_errors_supported = yes; then 13437 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs --static "dbus-1" 2>&1` 13438 else 13439 _pkg_error_string=`$PKG_CONFIG --print-errors --libs --static "dbus-1" 2>&1` 13440 fi 13441 as_fn_error $? "$PKG_CONFIG --libs --static \"dbus-1\" failed: $_pkg_error_string" "$LINENO" 5 13442 fi 13443 fi 13444 13445 13446 save_CFLAGS="$CFLAGS" 13447 save_LIBS="$LIBS" 13448 save_LDFLAGS="$LDFLAGS" 13449 13450 CFLAGS="$CFLAGS $DBUS_CFLAGS" 13451 LIBS="$LIBS $DBUS_LIBS" 13452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the D-Bus library defines dbus_connection_read_write" >&5 13453printf %s "checking whether the D-Bus library defines dbus_connection_read_write... " >&6; } 13454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13455/* end confdefs.h. */ 13456#include <string.h> 13457 13458 #include <time.h> 13459 #include <sys/time.h> 13460 13461 #include <dbus/dbus.h> 13462int 13463main (void) 13464{ 13465return dbus_connection_read_write(NULL, 0); 13466 ; 13467 return 0; 13468} 13469_ACEOF 13470if ac_fn_c_try_link "$LINENO" 13471then : 13472 13473 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 13474printf "%s\n" "yes" >&6; } 13475 13476printf "%s\n" "#define PCAP_SUPPORT_DBUS 1" >>confdefs.h 13477 13478 MODULE_C_SRC="$MODULE_C_SRC pcap-dbus.c" 13479 V_INCLS="$V_INCLS $DBUS_CFLAGS" 13480 ADDITIONAL_LIBS="$ADDITIONAL_LIBS $DBUS_LIBS" 13481 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $DBUS_LIBS_STATIC" 13482 REQUIRES_PRIVATE="$REQUIRES_PRIVATE dbus-1" 13483 13484else $as_nop 13485 13486 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 13487printf "%s\n" "no" >&6; } 13488 if test "x$enable_dbus" = "xyes"; then 13489 as_fn_error $? "--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()" "$LINENO" 5 13490 fi 13491 13492fi 13493rm -f core conftest.err conftest.$ac_objext conftest.beam \ 13494 conftest$ac_exeext conftest.$ac_ext 13495 13496 CFLAGS="$save_CFLAGS" 13497 LIBS="$save_LIBS" 13498 LDFLAGS="$save_LDFLAGS" 13499 13500 13501 else 13502 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 13503printf "%s\n" "not found" >&6; } 13504 13505 if test "x$enable_dbus" = "xyes"; then 13506 as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5 13507 fi 13508 13509 fi 13510else 13511 # No pkg-config, so obviously not found with pkg-config. 13512 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config not found" >&5 13513printf "%s\n" "pkg-config not found" >&6; } 13514 13515 if test "x$enable_dbus" = "xyes"; then 13516 as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5 13517 fi 13518 13519fi 13520 13521 13522fi 13523 13524# Check whether --enable-rdma was given. 13525if test ${enable_rdma+y} 13526then : 13527 enableval=$enable_rdma; 13528else $as_nop 13529 enable_rdma=ifavailable 13530fi 13531 13532 13533if test "xxx_only" = yes; then 13534 # User requested something-else-only pcap, so they don't 13535 # want RDMA support. 13536 enable_rdma=no 13537fi 13538 13539if test "x$enable_rdma" != "xno"; then 13540 13541{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libibverbs with pkg-config" >&5 13542printf %s "checking for libibverbs with pkg-config... " >&6; } 13543if test -n "$PKG_CONFIG"; then 13544 13545 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libibverbs\""; } >&5 13546 ($PKG_CONFIG --exists --print-errors "libibverbs") 2>&5 13547 ac_status=$? 13548 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 13549 test $ac_status = 0; }; then 13550 # 13551 # The package was found, so try to get its C flags and 13552 # libraries. 13553 # 13554 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5 13555printf "%s\n" "found" >&6; } 13556 if test ! -n "$LIBIBVERBS_CFLAGS"; then 13557 LIBIBVERBS_CFLAGS=`$PKG_CONFIG --cflags "libibverbs" 2>/dev/null` 13558 if test "x$?" != "x0"; then 13559 # 13560 # That failed - report an error. 13561 # Re-run the command, telling pkg-config to print an error 13562 # message, capture the error message, and report it. 13563 # This causes the configuration script to fail, as it means 13564 # the script is almost certainly doing something wrong. 13565 # 13566 13567if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 13568 _pkg_short_errors_supported=yes 13569else 13570 _pkg_short_errors_supported=no 13571fi 13572 if test $_pkg_short_errors_supported = yes; then 13573 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --cflags "libibverbs" 2>&1` 13574 else 13575 _pkg_error_string=`$PKG_CONFIG --print-errors --cflags "libibverbs" 2>&1` 13576 fi 13577 as_fn_error $? "$PKG_CONFIG --cflags \"libibverbs\" failed: $_pkg_error_string" "$LINENO" 5 13578 fi 13579 fi 13580 if test ! -n "$LIBIBVERBS_LIBS"; then 13581 LIBIBVERBS_LIBS=`$PKG_CONFIG --libs "libibverbs" 2>/dev/null` 13582 if test "x$?" != "x0"; then 13583 # 13584 # That failed - report an error. 13585 # Re-run the command, telling pkg-config to print an error 13586 # message, capture the error message, and report it. 13587 # This causes the configuration script to fail, as it means 13588 # the script is almost certainly doing something wrong. 13589 # 13590 13591if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 13592 _pkg_short_errors_supported=yes 13593else 13594 _pkg_short_errors_supported=no 13595fi 13596 if test $_pkg_short_errors_supported = yes; then 13597 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs "libibverbs" 2>&1` 13598 else 13599 _pkg_error_string=`$PKG_CONFIG --print-errors --libs "libibverbs" 2>&1` 13600 fi 13601 as_fn_error $? "$PKG_CONFIG --libs \"libibverbs\" failed: $_pkg_error_string" "$LINENO" 5 13602 fi 13603 fi 13604 if test ! -n "$LIBIBVERBS_LIBS_STATIC"; then 13605 LIBIBVERBS_LIBS_STATIC=`$PKG_CONFIG --libs --static "libibverbs" 2>/dev/null` 13606 if test "x$?" != "x0"; then 13607 # 13608 # That failed - report an error. 13609 # Re-run the command, telling pkg-config to print an error 13610 # message, capture the error message, and report it. 13611 # This causes the configuration script to fail, as it means 13612 # the script is almost certainly doing something wrong. 13613 # 13614 13615if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 13616 _pkg_short_errors_supported=yes 13617else 13618 _pkg_short_errors_supported=no 13619fi 13620 if test $_pkg_short_errors_supported = yes; then 13621 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs --static "libibverbs" 2>&1` 13622 else 13623 _pkg_error_string=`$PKG_CONFIG --print-errors --libs --static "libibverbs" 2>&1` 13624 fi 13625 as_fn_error $? "$PKG_CONFIG --libs --static \"libibverbs\" failed: $_pkg_error_string" "$LINENO" 5 13626 fi 13627 fi 13628 13629 found_libibverbs=yes 13630 LIBIBVERBS_REQUIRES_PRIVATE="libibverbs" 13631 13632 else 13633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 13634printf "%s\n" "not found" >&6; } 13635 : 13636 fi 13637else 13638 # No pkg-config, so obviously not found with pkg-config. 13639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config not found" >&5 13640printf "%s\n" "pkg-config not found" >&6; } 13641 : 13642fi 13643 13644 13645 if test "x$found_libibverbs" != "xyes"; then 13646 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ibv_get_device_list in -libverbs" >&5 13647printf %s "checking for ibv_get_device_list in -libverbs... " >&6; } 13648if test ${ac_cv_lib_ibverbs_ibv_get_device_list+y} 13649then : 13650 printf %s "(cached) " >&6 13651else $as_nop 13652 ac_check_lib_save_LIBS=$LIBS 13653LIBS="-libverbs $LIBS" 13654cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13655/* end confdefs.h. */ 13656 13657/* Override any GCC internal prototype to avoid an error. 13658 Use char because int might match the return type of a GCC 13659 builtin and then its argument prototype would still apply. */ 13660char ibv_get_device_list (); 13661int 13662main (void) 13663{ 13664return ibv_get_device_list (); 13665 ; 13666 return 0; 13667} 13668_ACEOF 13669if ac_fn_c_try_link "$LINENO" 13670then : 13671 ac_cv_lib_ibverbs_ibv_get_device_list=yes 13672else $as_nop 13673 ac_cv_lib_ibverbs_ibv_get_device_list=no 13674fi 13675rm -f core conftest.err conftest.$ac_objext conftest.beam \ 13676 conftest$ac_exeext conftest.$ac_ext 13677LIBS=$ac_check_lib_save_LIBS 13678fi 13679{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_get_device_list" >&5 13680printf "%s\n" "$ac_cv_lib_ibverbs_ibv_get_device_list" >&6; } 13681if test "x$ac_cv_lib_ibverbs_ibv_get_device_list" = xyes 13682then : 13683 13684 found_libibverbs=yes 13685 LIBIBVERBS_CFLAGS="" 13686 LIBIBVERBS_LIBS="-libverbs" 13687 # XXX - at least on Ubuntu 20.04, there are many more 13688 # libraries needed; is there any platform where 13689 # libibverbs is available but where pkg-config isn't 13690 # available or libibverbs doesn't use it? If not, 13691 # we should only use pkg-config for it. 13692 LIBIBVERBS_LIBS_STATIC="-libverbs" 13693 LIBIBVERBS_LIBS_PRIVATE="-libverbs" 13694 13695 13696fi 13697 13698 fi 13699 13700 if test "x$found_libibverbs" = "xyes"; then 13701 13702 save_CFLAGS="$CFLAGS" 13703 save_LIBS="$LIBS" 13704 save_LDFLAGS="$LDFLAGS" 13705 13706 CFLAGS="$CFLAGS $LIBIBVERBS_CFLAGS" 13707 LIBS="$LIBS $LIBIBVERBS_LIBS" 13708 ac_fn_c_check_header_compile "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default" 13709if test "x$ac_cv_header_infiniband_verbs_h" = xyes 13710then : 13711 13712 # 13713 # ibv_create_flow may be defined as a static inline 13714 # function in infiniband/verbs.h, so we can't 13715 # use AC_CHECK_LIB. 13716 # 13717 # Too bad autoconf has no AC_SYMBOL_EXISTS() 13718 # macro that works like CMake's check_symbol_exists() 13719 # function, to check do a compile check like 13720 # this (they do a clever trick to avoid having 13721 # to know the function's signature). 13722 # 13723 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libibverbs defines ibv_create_flow" >&5 13724printf %s "checking whether libibverbs defines ibv_create_flow... " >&6; } 13725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13726/* end confdefs.h. */ 13727 13728 #include <infiniband/verbs.h> 13729 13730int 13731main (void) 13732{ 13733 13734 (void) ibv_create_flow((struct ibv_qp *) NULL, 13735 (struct ibv_flow_attr *) NULL); 13736 13737 ; 13738 return 0; 13739} 13740_ACEOF 13741if ac_fn_c_try_link "$LINENO" 13742then : 13743 13744 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 13745printf "%s\n" "yes" >&6; } 13746 found_usable_libibverbs=yes 13747 13748else $as_nop 13749 13750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 13751printf "%s\n" "no" >&6; } 13752 13753 13754fi 13755rm -f core conftest.err conftest.$ac_objext conftest.beam \ 13756 conftest$ac_exeext conftest.$ac_ext 13757 13758fi 13759 13760 13761 CFLAGS="$save_CFLAGS" 13762 LIBS="$save_LIBS" 13763 LDFLAGS="$save_LDFLAGS" 13764 13765 fi 13766 13767 if test "x$found_usable_libibverbs" = "xyes" 13768 then 13769 13770printf "%s\n" "#define PCAP_SUPPORT_RDMASNIFF 1" >>confdefs.h 13771 13772 MODULE_C_SRC="$MODULE_C_SRC pcap-rdmasniff.c" 13773 CFLAGS="$LIBIBVERBS_CFLAGS $CFLAGS" 13774 ADDITIONAL_LIBS="$LIBIBVERBS_LIBS $ADDITIONAL_LIBS" 13775 ADDITIONAL_LIBS_STATIC="$LIBIBVERBS_LIBS_STATIC $ADDITIONAL_LIBS_STATIC" 13776 LIBS_PRIVATE="$LIBIBVERBS_LIBS_PRIVATE $LIBS_PRIVATE" 13777 REQUIRES_PRIVATE="$REQUIRES_PRIVATE $LIBIBVERBS_REQUIRES_PRIVATE" 13778 fi 13779 13780fi 13781 13782# 13783# If this is a platform where we need to have the .pc file and 13784# pcap-config script supply an rpath option to specify the directory 13785# in which the libpcap shared library is installed, and the install 13786# prefix /usr (meaning we're not installing a system library), provide 13787# the rpath option. 13788# 13789# (We must check $prefix, as $libdir isn't necessarily /usr/lib in this 13790# case - for example, Linux distributions for 64-bit platforms that 13791# also provide support for binaries for a 32-bit version of the 13792# platform may put the 64-bit libraries, the 32-bit libraries, or both 13793# in directories other than /usr/lib.) 13794# 13795# In AIX, do we have to do this? 13796# 13797# In Darwin-based OSes, the full paths of the shared libraries with 13798# which the program was linked are stored in the executable, so we don't 13799# need to provide an rpath option. 13800# 13801# With the HP-UX linker, directories specified with -L are, by default, 13802# added to the run-time search path, so we don't need to supply them. 13803# 13804# For Tru64 UNIX, "-rpath" works with DEC's^WCompaq's^WHP's C compiler 13805# for Alpha, but isn't documented as working with GCC, and no GCC- 13806# compatible option is documented as working with the DEC compiler. 13807# If anybody needs this on Tru64/Alpha, they're welcome to figure out a 13808# way to make it work. 13809# 13810# This must *not* depend on the compiler, as, on platforms where there's 13811# a GCC-compatible compiler and a vendor compiler, we need to work with 13812# both. 13813# 13814if test "$prefix" != "/usr"; then 13815 case "$host_os" in 13816 13817 freebsd*|netbsd*|openbsd*|dragonfly*|linux*|haiku*|midipix*|gnu*) 13818 # 13819 # Platforms where the "native" C compiler is GCC or 13820 # accepts compatible command-line arguments, and the 13821 # "native" linker is the GNU linker or accepts 13822 # compatible command-line arguments. 13823 # 13824 RPATH="-Wl,-rpath,\${libdir}" 13825 ;; 13826 13827 solaris*) 13828 # 13829 # Sun/Oracle's linker, the GNU linker, and 13830 # GNU-compatible linkers all support -R. 13831 # 13832 RPATH="-Wl,-R,\${libdir}" 13833 ;; 13834 esac 13835fi 13836 13837 13838 # Find a good install program. We prefer a C program (faster), 13839# so one script is as good as another. But avoid the broken or 13840# incompatible versions: 13841# SysV /etc/install, /usr/sbin/install 13842# SunOS /usr/etc/install 13843# IRIX /sbin/install 13844# AIX /bin/install 13845# AmigaOS /C/install, which installs bootblocks on floppy discs 13846# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag 13847# AFS /usr/afsws/bin/install, which mishandles nonexistent args 13848# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" 13849# OS/2's system install, which has a completely different semantic 13850# ./install, which can be erroneously created by make from ./install.sh. 13851# Reject install programs that cannot install multiple files. 13852{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 13853printf %s "checking for a BSD-compatible install... " >&6; } 13854if test -z "$INSTALL"; then 13855if test ${ac_cv_path_install+y} 13856then : 13857 printf %s "(cached) " >&6 13858else $as_nop 13859 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 13860for as_dir in $PATH 13861do 13862 IFS=$as_save_IFS 13863 case $as_dir in #((( 13864 '') as_dir=./ ;; 13865 */) ;; 13866 *) as_dir=$as_dir/ ;; 13867 esac 13868 # Account for fact that we put trailing slashes in our PATH walk. 13869case $as_dir in #(( 13870 ./ | /[cC]/* | \ 13871 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ 13872 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ 13873 /usr/ucb/* ) ;; 13874 *) 13875 # OSF1 and SCO ODT 3.0 have their own names for install. 13876 # Don't use installbsd from OSF since it installs stuff as root 13877 # by default. 13878 for ac_prog in ginstall scoinst install; do 13879 for ac_exec_ext in '' $ac_executable_extensions; do 13880 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then 13881 if test $ac_prog = install && 13882 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 13883 # AIX install. It has an incompatible calling convention. 13884 : 13885 elif test $ac_prog = install && 13886 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 13887 # program-specific install script used by HP pwplus--don't use. 13888 : 13889 else 13890 rm -rf conftest.one conftest.two conftest.dir 13891 echo one > conftest.one 13892 echo two > conftest.two 13893 mkdir conftest.dir 13894 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && 13895 test -s conftest.one && test -s conftest.two && 13896 test -s conftest.dir/conftest.one && 13897 test -s conftest.dir/conftest.two 13898 then 13899 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" 13900 break 3 13901 fi 13902 fi 13903 fi 13904 done 13905 done 13906 ;; 13907esac 13908 13909 done 13910IFS=$as_save_IFS 13911 13912rm -rf conftest.one conftest.two conftest.dir 13913 13914fi 13915 if test ${ac_cv_path_install+y}; then 13916 INSTALL=$ac_cv_path_install 13917 else 13918 # As a last resort, use the slow shell script. Don't cache a 13919 # value for INSTALL within a source directory, because that will 13920 # break other packages using the cache if that directory is 13921 # removed, or if the value is a relative name. 13922 INSTALL=$ac_install_sh 13923 fi 13924fi 13925{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 13926printf "%s\n" "$INSTALL" >&6; } 13927 13928# Use test -z because SunOS4 sh mishandles braces in ${var-val}. 13929# It thinks the first close brace ends the variable substitution. 13930test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' 13931 13932test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' 13933 13934test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 13935 13936 13937ac_config_headers="$ac_config_headers config.h" 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953 13954 13955# 13956# We're done with configuration operations; add ADDITIONAL_LIBS and 13957# ADDITIONAL_LIBS_STATIC to LIBS and LIBS_STATIC, respectively. 13958# 13959LIBS="$ADDITIONAL_LIBS $LIBS" 13960LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $LIBS_STATIC" 13961 13962ac_config_commands="$ac_config_commands default-1" 13963 13964ac_config_files="$ac_config_files Makefile grammar.y pcap-filter.manmisc pcap-linktype.manmisc pcap-tstamp.manmisc pcap-savefile.manfile pcap.3pcap pcap_compile.3pcap pcap_datalink.3pcap pcap_dump_open.3pcap pcap_get_tstamp_precision.3pcap pcap_list_datalinks.3pcap pcap_list_tstamp_types.3pcap pcap_open_dead.3pcap pcap_open_offline.3pcap pcap_set_immediate_mode.3pcap pcap_set_tstamp_precision.3pcap pcap_set_tstamp_type.3pcap rpcapd/Makefile rpcapd/rpcapd.manadmin rpcapd/rpcapd-config.manfile testprogs/Makefile" 13965 13966cat >confcache <<\_ACEOF 13967# This file is a shell script that caches the results of configure 13968# tests run on this system so they can be shared between configure 13969# scripts and configure runs, see configure's option --config-cache. 13970# It is not useful on other systems. If it contains results you don't 13971# want to keep, you may remove or edit it. 13972# 13973# config.status only pays attention to the cache file if you give it 13974# the --recheck option to rerun configure. 13975# 13976# `ac_cv_env_foo' variables (set or unset) will be overridden when 13977# loading this file, other *unset* `ac_cv_foo' will be assigned the 13978# following values. 13979 13980_ACEOF 13981 13982# The following way of writing the cache mishandles newlines in values, 13983# but we know of no workaround that is simple, portable, and efficient. 13984# So, we kill variables containing newlines. 13985# Ultrix sh set writes to stderr and can't be redirected directly, 13986# and sets the high bit in the cache file unless we assign to the vars. 13987( 13988 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do 13989 eval ac_val=\$$ac_var 13990 case $ac_val in #( 13991 *${as_nl}*) 13992 case $ac_var in #( 13993 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 13994printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 13995 esac 13996 case $ac_var in #( 13997 _ | IFS | as_nl) ;; #( 13998 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 13999 *) { eval $ac_var=; unset $ac_var;} ;; 14000 esac ;; 14001 esac 14002 done 14003 14004 (set) 2>&1 | 14005 case $as_nl`(ac_space=' '; set) 2>&1` in #( 14006 *${as_nl}ac_space=\ *) 14007 # `set' does not quote correctly, so add quotes: double-quote 14008 # substitution turns \\\\ into \\, and sed turns \\ into \. 14009 sed -n \ 14010 "s/'/'\\\\''/g; 14011 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 14012 ;; #( 14013 *) 14014 # `set' quotes correctly as required by POSIX, so do not add quotes. 14015 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 14016 ;; 14017 esac | 14018 sort 14019) | 14020 sed ' 14021 /^ac_cv_env_/b end 14022 t clear 14023 :clear 14024 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ 14025 t end 14026 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 14027 :end' >>confcache 14028if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 14029 if test -w "$cache_file"; then 14030 if test "x$cache_file" != "x/dev/null"; then 14031 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 14032printf "%s\n" "$as_me: updating cache $cache_file" >&6;} 14033 if test ! -f "$cache_file" || test -h "$cache_file"; then 14034 cat confcache >"$cache_file" 14035 else 14036 case $cache_file in #( 14037 */* | ?:*) 14038 mv -f confcache "$cache_file"$$ && 14039 mv -f "$cache_file"$$ "$cache_file" ;; #( 14040 *) 14041 mv -f confcache "$cache_file" ;; 14042 esac 14043 fi 14044 fi 14045 else 14046 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 14047printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} 14048 fi 14049fi 14050rm -f confcache 14051 14052test "x$prefix" = xNONE && prefix=$ac_default_prefix 14053# Let make expand exec_prefix. 14054test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 14055 14056DEFS=-DHAVE_CONFIG_H 14057 14058ac_libobjs= 14059ac_ltlibobjs= 14060U= 14061for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 14062 # 1. Remove the extension, and $U if already installed. 14063 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 14064 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` 14065 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 14066 # will be set to the directory where LIBOBJS objects are built. 14067 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" 14068 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' 14069done 14070LIBOBJS=$ac_libobjs 14071 14072LTLIBOBJS=$ac_ltlibobjs 14073 14074 14075 14076: "${CONFIG_STATUS=./config.status}" 14077ac_write_fail=0 14078ac_clean_files_save=$ac_clean_files 14079ac_clean_files="$ac_clean_files $CONFIG_STATUS" 14080{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 14081printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} 14082as_write_fail=0 14083cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 14084#! $SHELL 14085# Generated by $as_me. 14086# Run this file to recreate the current configuration. 14087# Compiler output produced by configure, useful for debugging 14088# configure, is in config.log if it exists. 14089 14090debug=false 14091ac_cs_recheck=false 14092ac_cs_silent=false 14093 14094SHELL=\${CONFIG_SHELL-$SHELL} 14095export SHELL 14096_ASEOF 14097cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 14098## -------------------- ## 14099## M4sh Initialization. ## 14100## -------------------- ## 14101 14102# Be more Bourne compatible 14103DUALCASE=1; export DUALCASE # for MKS sh 14104as_nop=: 14105if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 14106then : 14107 emulate sh 14108 NULLCMD=: 14109 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 14110 # is contrary to our usage. Disable this feature. 14111 alias -g '${1+"$@"}'='"$@"' 14112 setopt NO_GLOB_SUBST 14113else $as_nop 14114 case `(set -o) 2>/dev/null` in #( 14115 *posix*) : 14116 set -o posix ;; #( 14117 *) : 14118 ;; 14119esac 14120fi 14121 14122 14123 14124# Reset variables that may have inherited troublesome values from 14125# the environment. 14126 14127# IFS needs to be set, to space, tab, and newline, in precisely that order. 14128# (If _AS_PATH_WALK were called with IFS unset, it would have the 14129# side effect of setting IFS to empty, thus disabling word splitting.) 14130# Quoting is to prevent editors from complaining about space-tab. 14131as_nl=' 14132' 14133export as_nl 14134IFS=" "" $as_nl" 14135 14136PS1='$ ' 14137PS2='> ' 14138PS4='+ ' 14139 14140# Ensure predictable behavior from utilities with locale-dependent output. 14141LC_ALL=C 14142export LC_ALL 14143LANGUAGE=C 14144export LANGUAGE 14145 14146# We cannot yet rely on "unset" to work, but we need these variables 14147# to be unset--not just set to an empty or harmless value--now, to 14148# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct 14149# also avoids known problems related to "unset" and subshell syntax 14150# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). 14151for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH 14152do eval test \${$as_var+y} \ 14153 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 14154done 14155 14156# Ensure that fds 0, 1, and 2 are open. 14157if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi 14158if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi 14159if (exec 3>&2) ; then :; else exec 2>/dev/null; fi 14160 14161# The user is always right. 14162if ${PATH_SEPARATOR+false} :; then 14163 PATH_SEPARATOR=: 14164 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 14165 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 14166 PATH_SEPARATOR=';' 14167 } 14168fi 14169 14170 14171# Find who we are. Look in the path if we contain no directory separator. 14172as_myself= 14173case $0 in #(( 14174 *[\\/]* ) as_myself=$0 ;; 14175 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 14176for as_dir in $PATH 14177do 14178 IFS=$as_save_IFS 14179 case $as_dir in #((( 14180 '') as_dir=./ ;; 14181 */) ;; 14182 *) as_dir=$as_dir/ ;; 14183 esac 14184 test -r "$as_dir$0" && as_myself=$as_dir$0 && break 14185 done 14186IFS=$as_save_IFS 14187 14188 ;; 14189esac 14190# We did not find ourselves, most probably we were run as `sh COMMAND' 14191# in which case we are not to be found in the path. 14192if test "x$as_myself" = x; then 14193 as_myself=$0 14194fi 14195if test ! -f "$as_myself"; then 14196 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 14197 exit 1 14198fi 14199 14200 14201 14202# as_fn_error STATUS ERROR [LINENO LOG_FD] 14203# ---------------------------------------- 14204# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 14205# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 14206# script with STATUS, using 1 if that was 0. 14207as_fn_error () 14208{ 14209 as_status=$1; test $as_status -eq 0 && as_status=1 14210 if test "$4"; then 14211 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 14212 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 14213 fi 14214 printf "%s\n" "$as_me: error: $2" >&2 14215 as_fn_exit $as_status 14216} # as_fn_error 14217 14218 14219 14220# as_fn_set_status STATUS 14221# ----------------------- 14222# Set $? to STATUS, without forking. 14223as_fn_set_status () 14224{ 14225 return $1 14226} # as_fn_set_status 14227 14228# as_fn_exit STATUS 14229# ----------------- 14230# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 14231as_fn_exit () 14232{ 14233 set +e 14234 as_fn_set_status $1 14235 exit $1 14236} # as_fn_exit 14237 14238# as_fn_unset VAR 14239# --------------- 14240# Portably unset VAR. 14241as_fn_unset () 14242{ 14243 { eval $1=; unset $1;} 14244} 14245as_unset=as_fn_unset 14246 14247# as_fn_append VAR VALUE 14248# ---------------------- 14249# Append the text in VALUE to the end of the definition contained in VAR. Take 14250# advantage of any shell optimizations that allow amortized linear growth over 14251# repeated appends, instead of the typical quadratic growth present in naive 14252# implementations. 14253if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null 14254then : 14255 eval 'as_fn_append () 14256 { 14257 eval $1+=\$2 14258 }' 14259else $as_nop 14260 as_fn_append () 14261 { 14262 eval $1=\$$1\$2 14263 } 14264fi # as_fn_append 14265 14266# as_fn_arith ARG... 14267# ------------------ 14268# Perform arithmetic evaluation on the ARGs, and store the result in the 14269# global $as_val. Take advantage of shells that can avoid forks. The arguments 14270# must be portable across $(()) and expr. 14271if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null 14272then : 14273 eval 'as_fn_arith () 14274 { 14275 as_val=$(( $* )) 14276 }' 14277else $as_nop 14278 as_fn_arith () 14279 { 14280 as_val=`expr "$@" || test $? -eq 1` 14281 } 14282fi # as_fn_arith 14283 14284 14285if expr a : '\(a\)' >/dev/null 2>&1 && 14286 test "X`expr 00001 : '.*\(...\)'`" = X001; then 14287 as_expr=expr 14288else 14289 as_expr=false 14290fi 14291 14292if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 14293 as_basename=basename 14294else 14295 as_basename=false 14296fi 14297 14298if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 14299 as_dirname=dirname 14300else 14301 as_dirname=false 14302fi 14303 14304as_me=`$as_basename -- "$0" || 14305$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 14306 X"$0" : 'X\(//\)$' \| \ 14307 X"$0" : 'X\(/\)' \| . 2>/dev/null || 14308printf "%s\n" X/"$0" | 14309 sed '/^.*\/\([^/][^/]*\)\/*$/{ 14310 s//\1/ 14311 q 14312 } 14313 /^X\/\(\/\/\)$/{ 14314 s//\1/ 14315 q 14316 } 14317 /^X\/\(\/\).*/{ 14318 s//\1/ 14319 q 14320 } 14321 s/.*/./; q'` 14322 14323# Avoid depending upon Character Ranges. 14324as_cr_letters='abcdefghijklmnopqrstuvwxyz' 14325as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 14326as_cr_Letters=$as_cr_letters$as_cr_LETTERS 14327as_cr_digits='0123456789' 14328as_cr_alnum=$as_cr_Letters$as_cr_digits 14329 14330 14331# Determine whether it's possible to make 'echo' print without a newline. 14332# These variables are no longer used directly by Autoconf, but are AC_SUBSTed 14333# for compatibility with existing Makefiles. 14334ECHO_C= ECHO_N= ECHO_T= 14335case `echo -n x` in #((((( 14336-n*) 14337 case `echo 'xy\c'` in 14338 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 14339 xy) ECHO_C='\c';; 14340 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 14341 ECHO_T=' ';; 14342 esac;; 14343*) 14344 ECHO_N='-n';; 14345esac 14346 14347# For backward compatibility with old third-party macros, we provide 14348# the shell variables $as_echo and $as_echo_n. New code should use 14349# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. 14350as_echo='printf %s\n' 14351as_echo_n='printf %s' 14352 14353rm -f conf$$ conf$$.exe conf$$.file 14354if test -d conf$$.dir; then 14355 rm -f conf$$.dir/conf$$.file 14356else 14357 rm -f conf$$.dir 14358 mkdir conf$$.dir 2>/dev/null 14359fi 14360if (echo >conf$$.file) 2>/dev/null; then 14361 if ln -s conf$$.file conf$$ 2>/dev/null; then 14362 as_ln_s='ln -s' 14363 # ... but there are two gotchas: 14364 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 14365 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 14366 # In both cases, we have to default to `cp -pR'. 14367 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 14368 as_ln_s='cp -pR' 14369 elif ln conf$$.file conf$$ 2>/dev/null; then 14370 as_ln_s=ln 14371 else 14372 as_ln_s='cp -pR' 14373 fi 14374else 14375 as_ln_s='cp -pR' 14376fi 14377rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 14378rmdir conf$$.dir 2>/dev/null 14379 14380 14381# as_fn_mkdir_p 14382# ------------- 14383# Create "$as_dir" as a directory, including parents if necessary. 14384as_fn_mkdir_p () 14385{ 14386 14387 case $as_dir in #( 14388 -*) as_dir=./$as_dir;; 14389 esac 14390 test -d "$as_dir" || eval $as_mkdir_p || { 14391 as_dirs= 14392 while :; do 14393 case $as_dir in #( 14394 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 14395 *) as_qdir=$as_dir;; 14396 esac 14397 as_dirs="'$as_qdir' $as_dirs" 14398 as_dir=`$as_dirname -- "$as_dir" || 14399$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 14400 X"$as_dir" : 'X\(//\)[^/]' \| \ 14401 X"$as_dir" : 'X\(//\)$' \| \ 14402 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 14403printf "%s\n" X"$as_dir" | 14404 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 14405 s//\1/ 14406 q 14407 } 14408 /^X\(\/\/\)[^/].*/{ 14409 s//\1/ 14410 q 14411 } 14412 /^X\(\/\/\)$/{ 14413 s//\1/ 14414 q 14415 } 14416 /^X\(\/\).*/{ 14417 s//\1/ 14418 q 14419 } 14420 s/.*/./; q'` 14421 test -d "$as_dir" && break 14422 done 14423 test -z "$as_dirs" || eval "mkdir $as_dirs" 14424 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 14425 14426 14427} # as_fn_mkdir_p 14428if mkdir -p . 2>/dev/null; then 14429 as_mkdir_p='mkdir -p "$as_dir"' 14430else 14431 test -d ./-p && rmdir ./-p 14432 as_mkdir_p=false 14433fi 14434 14435 14436# as_fn_executable_p FILE 14437# ----------------------- 14438# Test if FILE is an executable regular file. 14439as_fn_executable_p () 14440{ 14441 test -f "$1" && test -x "$1" 14442} # as_fn_executable_p 14443as_test_x='test -x' 14444as_executable_p=as_fn_executable_p 14445 14446# Sed expression to map a string onto a valid CPP name. 14447as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 14448 14449# Sed expression to map a string onto a valid variable name. 14450as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 14451 14452 14453exec 6>&1 14454## ----------------------------------- ## 14455## Main body of $CONFIG_STATUS script. ## 14456## ----------------------------------- ## 14457_ASEOF 14458test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 14459 14460cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 14461# Save the log message, to keep $0 and so on meaningful, and to 14462# report actual input values of CONFIG_FILES etc. instead of their 14463# values after options handling. 14464ac_log=" 14465This file was extended by pcap $as_me 1.10.6, which was 14466generated by GNU Autoconf 2.71. Invocation command line was 14467 14468 CONFIG_FILES = $CONFIG_FILES 14469 CONFIG_HEADERS = $CONFIG_HEADERS 14470 CONFIG_LINKS = $CONFIG_LINKS 14471 CONFIG_COMMANDS = $CONFIG_COMMANDS 14472 $ $0 $@ 14473 14474on `(hostname || uname -n) 2>/dev/null | sed 1q` 14475" 14476 14477_ACEOF 14478 14479case $ac_config_files in *" 14480"*) set x $ac_config_files; shift; ac_config_files=$*;; 14481esac 14482 14483case $ac_config_headers in *" 14484"*) set x $ac_config_headers; shift; ac_config_headers=$*;; 14485esac 14486 14487 14488cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 14489# Files that config.status was made for. 14490config_files="$ac_config_files" 14491config_headers="$ac_config_headers" 14492config_commands="$ac_config_commands" 14493 14494_ACEOF 14495 14496cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 14497ac_cs_usage="\ 14498\`$as_me' instantiates files and other configuration actions 14499from templates according to the current configuration. Unless the files 14500and actions are specified as TAGs, all are instantiated by default. 14501 14502Usage: $0 [OPTION]... [TAG]... 14503 14504 -h, --help print this help, then exit 14505 -V, --version print version number and configuration settings, then exit 14506 --config print configuration, then exit 14507 -q, --quiet, --silent 14508 do not print progress messages 14509 -d, --debug don't remove temporary files 14510 --recheck update $as_me by reconfiguring in the same conditions 14511 --file=FILE[:TEMPLATE] 14512 instantiate the configuration file FILE 14513 --header=FILE[:TEMPLATE] 14514 instantiate the configuration header FILE 14515 14516Configuration files: 14517$config_files 14518 14519Configuration headers: 14520$config_headers 14521 14522Configuration commands: 14523$config_commands 14524 14525Report bugs to the package provider." 14526 14527_ACEOF 14528ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` 14529ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` 14530cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 14531ac_cs_config='$ac_cs_config_escaped' 14532ac_cs_version="\\ 14533pcap config.status 1.10.6 14534configured by $0, generated by GNU Autoconf 2.71, 14535 with options \\"\$ac_cs_config\\" 14536 14537Copyright (C) 2021 Free Software Foundation, Inc. 14538This config.status script is free software; the Free Software Foundation 14539gives unlimited permission to copy, distribute and modify it." 14540 14541ac_pwd='$ac_pwd' 14542srcdir='$srcdir' 14543INSTALL='$INSTALL' 14544test -n "\$AWK" || AWK=awk 14545_ACEOF 14546 14547cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 14548# The default lists apply if the user does not specify any file. 14549ac_need_defaults=: 14550while test $# != 0 14551do 14552 case $1 in 14553 --*=?*) 14554 ac_option=`expr "X$1" : 'X\([^=]*\)='` 14555 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 14556 ac_shift=: 14557 ;; 14558 --*=) 14559 ac_option=`expr "X$1" : 'X\([^=]*\)='` 14560 ac_optarg= 14561 ac_shift=: 14562 ;; 14563 *) 14564 ac_option=$1 14565 ac_optarg=$2 14566 ac_shift=shift 14567 ;; 14568 esac 14569 14570 case $ac_option in 14571 # Handling of the options. 14572 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 14573 ac_cs_recheck=: ;; 14574 --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 14575 printf "%s\n" "$ac_cs_version"; exit ;; 14576 --config | --confi | --conf | --con | --co | --c ) 14577 printf "%s\n" "$ac_cs_config"; exit ;; 14578 --debug | --debu | --deb | --de | --d | -d ) 14579 debug=: ;; 14580 --file | --fil | --fi | --f ) 14581 $ac_shift 14582 case $ac_optarg in 14583 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 14584 '') as_fn_error $? "missing file argument" ;; 14585 esac 14586 as_fn_append CONFIG_FILES " '$ac_optarg'" 14587 ac_need_defaults=false;; 14588 --header | --heade | --head | --hea ) 14589 $ac_shift 14590 case $ac_optarg in 14591 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 14592 esac 14593 as_fn_append CONFIG_HEADERS " '$ac_optarg'" 14594 ac_need_defaults=false;; 14595 --he | --h) 14596 # Conflict between --help and --header 14597 as_fn_error $? "ambiguous option: \`$1' 14598Try \`$0 --help' for more information.";; 14599 --help | --hel | -h ) 14600 printf "%s\n" "$ac_cs_usage"; exit ;; 14601 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 14602 | -silent | --silent | --silen | --sile | --sil | --si | --s) 14603 ac_cs_silent=: ;; 14604 14605 # This is an error. 14606 -*) as_fn_error $? "unrecognized option: \`$1' 14607Try \`$0 --help' for more information." ;; 14608 14609 *) as_fn_append ac_config_targets " $1" 14610 ac_need_defaults=false ;; 14611 14612 esac 14613 shift 14614done 14615 14616ac_configure_extra_args= 14617 14618if $ac_cs_silent; then 14619 exec 6>/dev/null 14620 ac_configure_extra_args="$ac_configure_extra_args --silent" 14621fi 14622 14623_ACEOF 14624cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 14625if \$ac_cs_recheck; then 14626 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 14627 shift 14628 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 14629 CONFIG_SHELL='$SHELL' 14630 export CONFIG_SHELL 14631 exec "\$@" 14632fi 14633 14634_ACEOF 14635cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 14636exec 5>>config.log 14637{ 14638 echo 14639 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 14640## Running $as_me. ## 14641_ASBOX 14642 printf "%s\n" "$ac_log" 14643} >&5 14644 14645_ACEOF 14646cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 14647# 14648# INIT-COMMANDS 14649# 14650 14651 14652_ACEOF 14653 14654cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 14655 14656# Handling of arguments. 14657for ac_config_target in $ac_config_targets 14658do 14659 case $ac_config_target in 14660 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; 14661 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; 14662 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; 14663 "grammar.y") CONFIG_FILES="$CONFIG_FILES grammar.y" ;; 14664 "pcap-filter.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-filter.manmisc" ;; 14665 "pcap-linktype.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-linktype.manmisc" ;; 14666 "pcap-tstamp.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-tstamp.manmisc" ;; 14667 "pcap-savefile.manfile") CONFIG_FILES="$CONFIG_FILES pcap-savefile.manfile" ;; 14668 "pcap.3pcap") CONFIG_FILES="$CONFIG_FILES pcap.3pcap" ;; 14669 "pcap_compile.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_compile.3pcap" ;; 14670 "pcap_datalink.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_datalink.3pcap" ;; 14671 "pcap_dump_open.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_dump_open.3pcap" ;; 14672 "pcap_get_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_get_tstamp_precision.3pcap" ;; 14673 "pcap_list_datalinks.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_datalinks.3pcap" ;; 14674 "pcap_list_tstamp_types.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_tstamp_types.3pcap" ;; 14675 "pcap_open_dead.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_dead.3pcap" ;; 14676 "pcap_open_offline.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_offline.3pcap" ;; 14677 "pcap_set_immediate_mode.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_immediate_mode.3pcap" ;; 14678 "pcap_set_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_precision.3pcap" ;; 14679 "pcap_set_tstamp_type.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_type.3pcap" ;; 14680 "rpcapd/Makefile") CONFIG_FILES="$CONFIG_FILES rpcapd/Makefile" ;; 14681 "rpcapd/rpcapd.manadmin") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd.manadmin" ;; 14682 "rpcapd/rpcapd-config.manfile") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd-config.manfile" ;; 14683 "testprogs/Makefile") CONFIG_FILES="$CONFIG_FILES testprogs/Makefile" ;; 14684 14685 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 14686 esac 14687done 14688 14689 14690# If the user did not use the arguments to specify the items to instantiate, 14691# then the envvar interface is used. Set only those that are not. 14692# We use the long form for the default assignment because of an extremely 14693# bizarre bug on SunOS 4.1.3. 14694if $ac_need_defaults; then 14695 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files 14696 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers 14697 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands 14698fi 14699 14700# Have a temporary directory for convenience. Make it in the build tree 14701# simply because there is no reason against having it here, and in addition, 14702# creating and moving files from /tmp can sometimes cause problems. 14703# Hook for its removal unless debugging. 14704# Note that there is a small window in which the directory will not be cleaned: 14705# after its creation but before its name has been assigned to `$tmp'. 14706$debug || 14707{ 14708 tmp= ac_tmp= 14709 trap 'exit_status=$? 14710 : "${ac_tmp:=$tmp}" 14711 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status 14712' 0 14713 trap 'as_fn_exit 1' 1 2 13 15 14714} 14715# Create a (secure) tmp directory for tmp files. 14716 14717{ 14718 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && 14719 test -d "$tmp" 14720} || 14721{ 14722 tmp=./conf$$-$RANDOM 14723 (umask 077 && mkdir "$tmp") 14724} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 14725ac_tmp=$tmp 14726 14727# Set up the scripts for CONFIG_FILES section. 14728# No need to generate them if there are no CONFIG_FILES. 14729# This happens for instance with `./config.status config.h'. 14730if test -n "$CONFIG_FILES"; then 14731 14732 14733ac_cr=`echo X | tr X '\015'` 14734# On cygwin, bash can eat \r inside `` if the user requested igncr. 14735# But we know of no other shell where ac_cr would be empty at this 14736# point, so we can use a bashism as a fallback. 14737if test "x$ac_cr" = x; then 14738 eval ac_cr=\$\'\\r\' 14739fi 14740ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 14741if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 14742 ac_cs_awk_cr='\\r' 14743else 14744 ac_cs_awk_cr=$ac_cr 14745fi 14746 14747echo 'BEGIN {' >"$ac_tmp/subs1.awk" && 14748_ACEOF 14749 14750 14751{ 14752 echo "cat >conf$$subs.awk <<_ACEOF" && 14753 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 14754 echo "_ACEOF" 14755} >conf$$subs.sh || 14756 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 14757ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` 14758ac_delim='%!_!# ' 14759for ac_last_try in false false false false false :; do 14760 . ./conf$$subs.sh || 14761 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 14762 14763 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` 14764 if test $ac_delim_n = $ac_delim_num; then 14765 break 14766 elif $ac_last_try; then 14767 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 14768 else 14769 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 14770 fi 14771done 14772rm -f conf$$subs.sh 14773 14774cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 14775cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && 14776_ACEOF 14777sed -n ' 14778h 14779s/^/S["/; s/!.*/"]=/ 14780p 14781g 14782s/^[^!]*!// 14783:repl 14784t repl 14785s/'"$ac_delim"'$// 14786t delim 14787:nl 14788h 14789s/\(.\{148\}\)..*/\1/ 14790t more1 14791s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ 14792p 14793n 14794b repl 14795:more1 14796s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 14797p 14798g 14799s/.\{148\}// 14800t nl 14801:delim 14802h 14803s/\(.\{148\}\)..*/\1/ 14804t more2 14805s/["\\]/\\&/g; s/^/"/; s/$/"/ 14806p 14807b 14808:more2 14809s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 14810p 14811g 14812s/.\{148\}// 14813t delim 14814' <conf$$subs.awk | sed ' 14815/^[^""]/{ 14816 N 14817 s/\n// 14818} 14819' >>$CONFIG_STATUS || ac_write_fail=1 14820rm -f conf$$subs.awk 14821cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 14822_ACAWK 14823cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && 14824 for (key in S) S_is_set[key] = 1 14825 FS = "" 14826 14827} 14828{ 14829 line = $ 0 14830 nfields = split(line, field, "@") 14831 substed = 0 14832 len = length(field[1]) 14833 for (i = 2; i < nfields; i++) { 14834 key = field[i] 14835 keylen = length(key) 14836 if (S_is_set[key]) { 14837 value = S[key] 14838 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) 14839 len += length(value) + length(field[++i]) 14840 substed = 1 14841 } else 14842 len += 1 + keylen 14843 } 14844 14845 print line 14846} 14847 14848_ACAWK 14849_ACEOF 14850cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 14851if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then 14852 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" 14853else 14854 cat 14855fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ 14856 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 14857_ACEOF 14858 14859# VPATH may cause trouble with some makes, so we remove sole $(srcdir), 14860# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and 14861# trailing colons and then remove the whole line if VPATH becomes empty 14862# (actually we leave an empty line to preserve line numbers). 14863if test "x$srcdir" = x.; then 14864 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 14865h 14866s/// 14867s/^/:/ 14868s/[ ]*$/:/ 14869s/:\$(srcdir):/:/g 14870s/:\${srcdir}:/:/g 14871s/:@srcdir@:/:/g 14872s/^:*// 14873s/:*$// 14874x 14875s/\(=[ ]*\).*/\1/ 14876G 14877s/\n// 14878s/^[^=]*=[ ]*$// 14879}' 14880fi 14881 14882cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 14883fi # test -n "$CONFIG_FILES" 14884 14885# Set up the scripts for CONFIG_HEADERS section. 14886# No need to generate them if there are no CONFIG_HEADERS. 14887# This happens for instance with `./config.status Makefile'. 14888if test -n "$CONFIG_HEADERS"; then 14889cat >"$ac_tmp/defines.awk" <<\_ACAWK || 14890BEGIN { 14891_ACEOF 14892 14893# Transform confdefs.h into an awk script `defines.awk', embedded as 14894# here-document in config.status, that substitutes the proper values into 14895# config.h.in to produce config.h. 14896 14897# Create a delimiter string that does not exist in confdefs.h, to ease 14898# handling of long lines. 14899ac_delim='%!_!# ' 14900for ac_last_try in false false :; do 14901 ac_tt=`sed -n "/$ac_delim/p" confdefs.h` 14902 if test -z "$ac_tt"; then 14903 break 14904 elif $ac_last_try; then 14905 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 14906 else 14907 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 14908 fi 14909done 14910 14911# For the awk script, D is an array of macro values keyed by name, 14912# likewise P contains macro parameters if any. Preserve backslash 14913# newline sequences. 14914 14915ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* 14916sed -n ' 14917s/.\{148\}/&'"$ac_delim"'/g 14918t rset 14919:rset 14920s/^[ ]*#[ ]*define[ ][ ]*/ / 14921t def 14922d 14923:def 14924s/\\$// 14925t bsnl 14926s/["\\]/\\&/g 14927s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 14928D["\1"]=" \3"/p 14929s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p 14930d 14931:bsnl 14932s/["\\]/\\&/g 14933s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 14934D["\1"]=" \3\\\\\\n"\\/p 14935t cont 14936s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p 14937t cont 14938d 14939:cont 14940n 14941s/.\{148\}/&'"$ac_delim"'/g 14942t clear 14943:clear 14944s/\\$// 14945t bsnlc 14946s/["\\]/\\&/g; s/^/"/; s/$/"/p 14947d 14948:bsnlc 14949s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p 14950b cont 14951' <confdefs.h | sed ' 14952s/'"$ac_delim"'/"\\\ 14953"/g' >>$CONFIG_STATUS || ac_write_fail=1 14954 14955cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 14956 for (key in D) D_is_set[key] = 1 14957 FS = "" 14958} 14959/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { 14960 line = \$ 0 14961 split(line, arg, " ") 14962 if (arg[1] == "#") { 14963 defundef = arg[2] 14964 mac1 = arg[3] 14965 } else { 14966 defundef = substr(arg[1], 2) 14967 mac1 = arg[2] 14968 } 14969 split(mac1, mac2, "(") #) 14970 macro = mac2[1] 14971 prefix = substr(line, 1, index(line, defundef) - 1) 14972 if (D_is_set[macro]) { 14973 # Preserve the white space surrounding the "#". 14974 print prefix "define", macro P[macro] D[macro] 14975 next 14976 } else { 14977 # Replace #undef with comments. This is necessary, for example, 14978 # in the case of _POSIX_SOURCE, which is predefined and required 14979 # on some systems where configure will not decide to define it. 14980 if (defundef == "undef") { 14981 print "/*", prefix defundef, macro, "*/" 14982 next 14983 } 14984 } 14985} 14986{ print } 14987_ACAWK 14988_ACEOF 14989cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 14990 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 14991fi # test -n "$CONFIG_HEADERS" 14992 14993 14994eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" 14995shift 14996for ac_tag 14997do 14998 case $ac_tag in 14999 :[FHLC]) ac_mode=$ac_tag; continue;; 15000 esac 15001 case $ac_mode$ac_tag in 15002 :[FHL]*:*);; 15003 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; 15004 :[FH]-) ac_tag=-:-;; 15005 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 15006 esac 15007 ac_save_IFS=$IFS 15008 IFS=: 15009 set x $ac_tag 15010 IFS=$ac_save_IFS 15011 shift 15012 ac_file=$1 15013 shift 15014 15015 case $ac_mode in 15016 :L) ac_source=$1;; 15017 :[FH]) 15018 ac_file_inputs= 15019 for ac_f 15020 do 15021 case $ac_f in 15022 -) ac_f="$ac_tmp/stdin";; 15023 *) # Look for the file first in the build tree, then in the source tree 15024 # (if the path is not absolute). The absolute path cannot be DOS-style, 15025 # because $ac_f cannot contain `:'. 15026 test -f "$ac_f" || 15027 case $ac_f in 15028 [\\/$]*) false;; 15029 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 15030 esac || 15031 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; 15032 esac 15033 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 15034 as_fn_append ac_file_inputs " '$ac_f'" 15035 done 15036 15037 # Let's still pretend it is `configure' which instantiates (i.e., don't 15038 # use $as_me), people would be surprised to read: 15039 # /* config.h. Generated by config.status. */ 15040 configure_input='Generated from '` 15041 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' 15042 `' by configure.' 15043 if test x"$ac_file" != x-; then 15044 configure_input="$ac_file. $configure_input" 15045 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 15046printf "%s\n" "$as_me: creating $ac_file" >&6;} 15047 fi 15048 # Neutralize special characters interpreted by sed in replacement strings. 15049 case $configure_input in #( 15050 *\&* | *\|* | *\\* ) 15051 ac_sed_conf_input=`printf "%s\n" "$configure_input" | 15052 sed 's/[\\\\&|]/\\\\&/g'`;; #( 15053 *) ac_sed_conf_input=$configure_input;; 15054 esac 15055 15056 case $ac_tag in 15057 *:-:* | *:-) cat >"$ac_tmp/stdin" \ 15058 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 15059 esac 15060 ;; 15061 esac 15062 15063 ac_dir=`$as_dirname -- "$ac_file" || 15064$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 15065 X"$ac_file" : 'X\(//\)[^/]' \| \ 15066 X"$ac_file" : 'X\(//\)$' \| \ 15067 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 15068printf "%s\n" X"$ac_file" | 15069 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 15070 s//\1/ 15071 q 15072 } 15073 /^X\(\/\/\)[^/].*/{ 15074 s//\1/ 15075 q 15076 } 15077 /^X\(\/\/\)$/{ 15078 s//\1/ 15079 q 15080 } 15081 /^X\(\/\).*/{ 15082 s//\1/ 15083 q 15084 } 15085 s/.*/./; q'` 15086 as_dir="$ac_dir"; as_fn_mkdir_p 15087 ac_builddir=. 15088 15089case "$ac_dir" in 15090.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 15091*) 15092 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` 15093 # A ".." for each directory in $ac_dir_suffix. 15094 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 15095 case $ac_top_builddir_sub in 15096 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 15097 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 15098 esac ;; 15099esac 15100ac_abs_top_builddir=$ac_pwd 15101ac_abs_builddir=$ac_pwd$ac_dir_suffix 15102# for backward compatibility: 15103ac_top_builddir=$ac_top_build_prefix 15104 15105case $srcdir in 15106 .) # We are building in place. 15107 ac_srcdir=. 15108 ac_top_srcdir=$ac_top_builddir_sub 15109 ac_abs_top_srcdir=$ac_pwd ;; 15110 [\\/]* | ?:[\\/]* ) # Absolute name. 15111 ac_srcdir=$srcdir$ac_dir_suffix; 15112 ac_top_srcdir=$srcdir 15113 ac_abs_top_srcdir=$srcdir ;; 15114 *) # Relative name. 15115 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 15116 ac_top_srcdir=$ac_top_build_prefix$srcdir 15117 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 15118esac 15119ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 15120 15121 15122 case $ac_mode in 15123 :F) 15124 # 15125 # CONFIG_FILE 15126 # 15127 15128 case $INSTALL in 15129 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; 15130 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; 15131 esac 15132_ACEOF 15133 15134cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 15135# If the template does not know about datarootdir, expand it. 15136# FIXME: This hack should be removed a few years after 2.60. 15137ac_datarootdir_hack=; ac_datarootdir_seen= 15138ac_sed_dataroot=' 15139/datarootdir/ { 15140 p 15141 q 15142} 15143/@datadir@/p 15144/@docdir@/p 15145/@infodir@/p 15146/@localedir@/p 15147/@mandir@/p' 15148case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in 15149*datarootdir*) ac_datarootdir_seen=yes;; 15150*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 15151 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 15152printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 15153_ACEOF 15154cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 15155 ac_datarootdir_hack=' 15156 s&@datadir@&$datadir&g 15157 s&@docdir@&$docdir&g 15158 s&@infodir@&$infodir&g 15159 s&@localedir@&$localedir&g 15160 s&@mandir@&$mandir&g 15161 s&\\\${datarootdir}&$datarootdir&g' ;; 15162esac 15163_ACEOF 15164 15165# Neutralize VPATH when `$srcdir' = `.'. 15166# Shell code in configure.ac might set extrasub. 15167# FIXME: do we really want to maintain this feature? 15168cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 15169ac_sed_extra="$ac_vpsub 15170$extrasub 15171_ACEOF 15172cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 15173:t 15174/@[a-zA-Z_][a-zA-Z_0-9]*@/!b 15175s|@configure_input@|$ac_sed_conf_input|;t t 15176s&@top_builddir@&$ac_top_builddir_sub&;t t 15177s&@top_build_prefix@&$ac_top_build_prefix&;t t 15178s&@srcdir@&$ac_srcdir&;t t 15179s&@abs_srcdir@&$ac_abs_srcdir&;t t 15180s&@top_srcdir@&$ac_top_srcdir&;t t 15181s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t 15182s&@builddir@&$ac_builddir&;t t 15183s&@abs_builddir@&$ac_abs_builddir&;t t 15184s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 15185s&@INSTALL@&$ac_INSTALL&;t t 15186$ac_datarootdir_hack 15187" 15188eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ 15189 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 15190 15191test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 15192 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && 15193 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ 15194 "$ac_tmp/out"`; test -z "$ac_out"; } && 15195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 15196which seems to be undefined. Please make sure it is defined" >&5 15197printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 15198which seems to be undefined. Please make sure it is defined" >&2;} 15199 15200 rm -f "$ac_tmp/stdin" 15201 case $ac_file in 15202 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; 15203 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; 15204 esac \ 15205 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 15206 ;; 15207 :H) 15208 # 15209 # CONFIG_HEADER 15210 # 15211 if test x"$ac_file" != x-; then 15212 { 15213 printf "%s\n" "/* $configure_input */" >&1 \ 15214 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" 15215 } >"$ac_tmp/config.h" \ 15216 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 15217 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then 15218 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 15219printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} 15220 else 15221 rm -f "$ac_file" 15222 mv "$ac_tmp/config.h" "$ac_file" \ 15223 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 15224 fi 15225 else 15226 printf "%s\n" "/* $configure_input */" >&1 \ 15227 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ 15228 || as_fn_error $? "could not create -" "$LINENO" 5 15229 fi 15230 ;; 15231 15232 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 15233printf "%s\n" "$as_me: executing $ac_file commands" >&6;} 15234 ;; 15235 esac 15236 15237 15238 case $ac_file$ac_mode in 15239 "default-1":C) if test -f .devel; then 15240 echo timestamp > stamp-h 15241 cat $srcdir/Makefile-devel-adds >> Makefile 15242 make depend || exit 1 15243fi ;; 15244 15245 esac 15246done # for ac_tag 15247 15248 15249as_fn_exit 0 15250_ACEOF 15251ac_clean_files=$ac_clean_files_save 15252 15253test $ac_write_fail = 0 || 15254 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 15255 15256 15257# configure is writing to config.log, and then calls config.status. 15258# config.status does its own redirection, appending to config.log. 15259# Unfortunately, on DOS this fails, as config.log is still kept open 15260# by configure, so config.status won't be able to write to it; its 15261# output is simply discarded. So we exec the FD to /dev/null, 15262# effectively closing config.log, so it can be properly (re)opened and 15263# appended to by config.status. When coming back to configure, we 15264# need to make the FD available again. 15265if test "$no_create" != yes; then 15266 ac_cs_success=: 15267 ac_config_status_args= 15268 test "$silent" = yes && 15269 ac_config_status_args="$ac_config_status_args --quiet" 15270 exec 5>/dev/null 15271 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 15272 exec 5>>config.log 15273 # Use ||, not &&, to avoid exiting from the if with $? = 1, which 15274 # would make configure fail if this is the last instruction. 15275 $ac_cs_success || as_fn_exit 1 15276fi 15277if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 15278 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 15279printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} 15280fi 15281 15282exit 0 15283