1#! /bin/sh 2# Guess values for system-dependent variables and create Makefiles. 3# Generated by GNU Autoconf 2.71 for pcap 1.10.5. 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.5' 612PACKAGE_STRING='pcap 1.10.5' 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.5 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.5:";; 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=yes, if present] 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.5 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_run LINENO 1668# ---------------------- 1669# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that 1670# executables *can* be run. 1671ac_fn_c_try_run () 1672{ 1673 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 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>&5 1682 ac_status=$? 1683 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1684 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' 1685 { { case "(($ac_try" in 1686 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1687 *) ac_try_echo=$ac_try;; 1688esac 1689eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1690printf "%s\n" "$ac_try_echo"; } >&5 1691 (eval "$ac_try") 2>&5 1692 ac_status=$? 1693 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1694 test $ac_status = 0; }; } 1695then : 1696 ac_retval=0 1697else $as_nop 1698 printf "%s\n" "$as_me: program exited with status $ac_status" >&5 1699 printf "%s\n" "$as_me: failed program was:" >&5 1700sed 's/^/| /' conftest.$ac_ext >&5 1701 1702 ac_retval=$ac_status 1703fi 1704 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 1705 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1706 as_fn_set_status $ac_retval 1707 1708} # ac_fn_c_try_run 1709 1710# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES 1711# -------------------------------------------- 1712# Tries to find the compile-time value of EXPR in a program that includes 1713# INCLUDES, setting VAR accordingly. Returns whether the value could be 1714# computed 1715ac_fn_c_compute_int () 1716{ 1717 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1718 if test "$cross_compiling" = yes; then 1719 # Depending upon the size, compute the lo and hi bounds. 1720cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1721/* end confdefs.h. */ 1722$4 1723int 1724main (void) 1725{ 1726static int test_array [1 - 2 * !(($2) >= 0)]; 1727test_array [0] = 0; 1728return test_array [0]; 1729 1730 ; 1731 return 0; 1732} 1733_ACEOF 1734if ac_fn_c_try_compile "$LINENO" 1735then : 1736 ac_lo=0 ac_mid=0 1737 while :; do 1738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1739/* end confdefs.h. */ 1740$4 1741int 1742main (void) 1743{ 1744static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 1745test_array [0] = 0; 1746return test_array [0]; 1747 1748 ; 1749 return 0; 1750} 1751_ACEOF 1752if ac_fn_c_try_compile "$LINENO" 1753then : 1754 ac_hi=$ac_mid; break 1755else $as_nop 1756 as_fn_arith $ac_mid + 1 && ac_lo=$as_val 1757 if test $ac_lo -le $ac_mid; then 1758 ac_lo= ac_hi= 1759 break 1760 fi 1761 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val 1762fi 1763rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1764 done 1765else $as_nop 1766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1767/* end confdefs.h. */ 1768$4 1769int 1770main (void) 1771{ 1772static int test_array [1 - 2 * !(($2) < 0)]; 1773test_array [0] = 0; 1774return test_array [0]; 1775 1776 ; 1777 return 0; 1778} 1779_ACEOF 1780if ac_fn_c_try_compile "$LINENO" 1781then : 1782 ac_hi=-1 ac_mid=-1 1783 while :; do 1784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1785/* end confdefs.h. */ 1786$4 1787int 1788main (void) 1789{ 1790static int test_array [1 - 2 * !(($2) >= $ac_mid)]; 1791test_array [0] = 0; 1792return test_array [0]; 1793 1794 ; 1795 return 0; 1796} 1797_ACEOF 1798if ac_fn_c_try_compile "$LINENO" 1799then : 1800 ac_lo=$ac_mid; break 1801else $as_nop 1802 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val 1803 if test $ac_mid -le $ac_hi; then 1804 ac_lo= ac_hi= 1805 break 1806 fi 1807 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val 1808fi 1809rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1810 done 1811else $as_nop 1812 ac_lo= ac_hi= 1813fi 1814rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1815fi 1816rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1817# Binary search between lo and hi bounds. 1818while test "x$ac_lo" != "x$ac_hi"; do 1819 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val 1820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1821/* end confdefs.h. */ 1822$4 1823int 1824main (void) 1825{ 1826static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 1827test_array [0] = 0; 1828return test_array [0]; 1829 1830 ; 1831 return 0; 1832} 1833_ACEOF 1834if ac_fn_c_try_compile "$LINENO" 1835then : 1836 ac_hi=$ac_mid 1837else $as_nop 1838 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val 1839fi 1840rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1841done 1842case $ac_lo in #(( 1843?*) eval "$3=\$ac_lo"; ac_retval=0 ;; 1844'') ac_retval=1 ;; 1845esac 1846 else 1847 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1848/* end confdefs.h. */ 1849$4 1850static long int longval (void) { return $2; } 1851static unsigned long int ulongval (void) { return $2; } 1852#include <stdio.h> 1853#include <stdlib.h> 1854int 1855main (void) 1856{ 1857 1858 FILE *f = fopen ("conftest.val", "w"); 1859 if (! f) 1860 return 1; 1861 if (($2) < 0) 1862 { 1863 long int i = longval (); 1864 if (i != ($2)) 1865 return 1; 1866 fprintf (f, "%ld", i); 1867 } 1868 else 1869 { 1870 unsigned long int i = ulongval (); 1871 if (i != ($2)) 1872 return 1; 1873 fprintf (f, "%lu", i); 1874 } 1875 /* Do not output a trailing newline, as this causes \r\n confusion 1876 on some platforms. */ 1877 return ferror (f) || fclose (f) != 0; 1878 1879 ; 1880 return 0; 1881} 1882_ACEOF 1883if ac_fn_c_try_run "$LINENO" 1884then : 1885 echo >>conftest.val; read $3 <conftest.val; ac_retval=0 1886else $as_nop 1887 ac_retval=1 1888fi 1889rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 1890 conftest.$ac_objext conftest.beam conftest.$ac_ext 1891rm -f conftest.val 1892 1893 fi 1894 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1895 as_fn_set_status $ac_retval 1896 1897} # ac_fn_c_compute_int 1898 1899# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES 1900# ------------------------------------------------------- 1901# Tests whether HEADER exists and can be compiled using the include files in 1902# INCLUDES, setting the cache variable VAR accordingly. 1903ac_fn_c_check_header_compile () 1904{ 1905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 1907printf %s "checking for $2... " >&6; } 1908if eval test \${$3+y} 1909then : 1910 printf %s "(cached) " >&6 1911else $as_nop 1912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1913/* end confdefs.h. */ 1914$4 1915#include <$2> 1916_ACEOF 1917if ac_fn_c_try_compile "$LINENO" 1918then : 1919 eval "$3=yes" 1920else $as_nop 1921 eval "$3=no" 1922fi 1923rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1924fi 1925eval ac_res=\$$3 1926 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 1927printf "%s\n" "$ac_res" >&6; } 1928 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1929 1930} # ac_fn_c_check_header_compile 1931 1932# ac_fn_c_check_func LINENO FUNC VAR 1933# ---------------------------------- 1934# Tests whether FUNC exists, setting the cache variable VAR accordingly 1935ac_fn_c_check_func () 1936{ 1937 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 1939printf %s "checking for $2... " >&6; } 1940if eval test \${$3+y} 1941then : 1942 printf %s "(cached) " >&6 1943else $as_nop 1944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1945/* end confdefs.h. */ 1946/* Define $2 to an innocuous variant, in case <limits.h> declares $2. 1947 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 1948#define $2 innocuous_$2 1949 1950/* System header to define __stub macros and hopefully few prototypes, 1951 which can conflict with char $2 (); below. */ 1952 1953#include <limits.h> 1954#undef $2 1955 1956/* Override any GCC internal prototype to avoid an error. 1957 Use char because int might match the return type of a GCC 1958 builtin and then its argument prototype would still apply. */ 1959#ifdef __cplusplus 1960extern "C" 1961#endif 1962char $2 (); 1963/* The GNU C library defines this for functions which it implements 1964 to always fail with ENOSYS. Some functions are actually named 1965 something starting with __ and the normal name is an alias. */ 1966#if defined __stub_$2 || defined __stub___$2 1967choke me 1968#endif 1969 1970int 1971main (void) 1972{ 1973return $2 (); 1974 ; 1975 return 0; 1976} 1977_ACEOF 1978if ac_fn_c_try_link "$LINENO" 1979then : 1980 eval "$3=yes" 1981else $as_nop 1982 eval "$3=no" 1983fi 1984rm -f core conftest.err conftest.$ac_objext conftest.beam \ 1985 conftest$ac_exeext conftest.$ac_ext 1986fi 1987eval ac_res=\$$3 1988 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 1989printf "%s\n" "$ac_res" >&6; } 1990 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1991 1992} # ac_fn_c_check_func 1993 1994# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR 1995# ------------------------------------------------------------------ 1996# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR 1997# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. 1998ac_fn_check_decl () 1999{ 2000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2001 as_decl_name=`echo $2|sed 's/ *(.*//'` 2002 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 2003printf %s "checking whether $as_decl_name is declared... " >&6; } 2004if eval test \${$3+y} 2005then : 2006 printf %s "(cached) " >&6 2007else $as_nop 2008 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` 2009 eval ac_save_FLAGS=\$$6 2010 as_fn_append $6 " $5" 2011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2012/* end confdefs.h. */ 2013$4 2014int 2015main (void) 2016{ 2017#ifndef $as_decl_name 2018#ifdef __cplusplus 2019 (void) $as_decl_use; 2020#else 2021 (void) $as_decl_name; 2022#endif 2023#endif 2024 2025 ; 2026 return 0; 2027} 2028_ACEOF 2029if ac_fn_c_try_compile "$LINENO" 2030then : 2031 eval "$3=yes" 2032else $as_nop 2033 eval "$3=no" 2034fi 2035rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 2036 eval $6=\$ac_save_FLAGS 2037 2038fi 2039eval ac_res=\$$3 2040 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2041printf "%s\n" "$ac_res" >&6; } 2042 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2043 2044} # ac_fn_check_decl 2045 2046# ac_fn_c_check_type LINENO TYPE VAR INCLUDES 2047# ------------------------------------------- 2048# Tests whether TYPE exists after having included INCLUDES, setting cache 2049# variable VAR accordingly. 2050ac_fn_c_check_type () 2051{ 2052 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2053 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2054printf %s "checking for $2... " >&6; } 2055if eval test \${$3+y} 2056then : 2057 printf %s "(cached) " >&6 2058else $as_nop 2059 eval "$3=no" 2060 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2061/* end confdefs.h. */ 2062$4 2063int 2064main (void) 2065{ 2066if (sizeof ($2)) 2067 return 0; 2068 ; 2069 return 0; 2070} 2071_ACEOF 2072if ac_fn_c_try_compile "$LINENO" 2073then : 2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2075/* end confdefs.h. */ 2076$4 2077int 2078main (void) 2079{ 2080if (sizeof (($2))) 2081 return 0; 2082 ; 2083 return 0; 2084} 2085_ACEOF 2086if ac_fn_c_try_compile "$LINENO" 2087then : 2088 2089else $as_nop 2090 eval "$3=yes" 2091fi 2092rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 2093fi 2094rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 2095fi 2096eval ac_res=\$$3 2097 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2098printf "%s\n" "$ac_res" >&6; } 2099 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2100 2101} # ac_fn_c_check_type 2102 2103# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES 2104# ---------------------------------------------------- 2105# Tries to find if the field MEMBER exists in type AGGR, after including 2106# INCLUDES, setting cache variable VAR accordingly. 2107ac_fn_c_check_member () 2108{ 2109 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 2111printf %s "checking for $2.$3... " >&6; } 2112if eval test \${$4+y} 2113then : 2114 printf %s "(cached) " >&6 2115else $as_nop 2116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2117/* end confdefs.h. */ 2118$5 2119int 2120main (void) 2121{ 2122static $2 ac_aggr; 2123if (ac_aggr.$3) 2124return 0; 2125 ; 2126 return 0; 2127} 2128_ACEOF 2129if ac_fn_c_try_compile "$LINENO" 2130then : 2131 eval "$4=yes" 2132else $as_nop 2133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2134/* end confdefs.h. */ 2135$5 2136int 2137main (void) 2138{ 2139static $2 ac_aggr; 2140if (sizeof ac_aggr.$3) 2141return 0; 2142 ; 2143 return 0; 2144} 2145_ACEOF 2146if ac_fn_c_try_compile "$LINENO" 2147then : 2148 eval "$4=yes" 2149else $as_nop 2150 eval "$4=no" 2151fi 2152rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 2153fi 2154rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 2155fi 2156eval ac_res=\$$4 2157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2158printf "%s\n" "$ac_res" >&6; } 2159 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2160 2161} # ac_fn_c_check_member 2162ac_configure_args_raw= 2163for ac_arg 2164do 2165 case $ac_arg in 2166 *\'*) 2167 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 2168 esac 2169 as_fn_append ac_configure_args_raw " '$ac_arg'" 2170done 2171 2172case $ac_configure_args_raw in 2173 *$as_nl*) 2174 ac_safe_unquote= ;; 2175 *) 2176 ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. 2177 ac_unsafe_a="$ac_unsafe_z#~" 2178 ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" 2179 ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; 2180esac 2181 2182cat >config.log <<_ACEOF 2183This file contains any messages produced by compilers while 2184running configure, to aid debugging if configure makes a mistake. 2185 2186It was created by pcap $as_me 1.10.5, which was 2187generated by GNU Autoconf 2.71. Invocation command line was 2188 2189 $ $0$ac_configure_args_raw 2190 2191_ACEOF 2192exec 5>>config.log 2193{ 2194cat <<_ASUNAME 2195## --------- ## 2196## Platform. ## 2197## --------- ## 2198 2199hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 2200uname -m = `(uname -m) 2>/dev/null || echo unknown` 2201uname -r = `(uname -r) 2>/dev/null || echo unknown` 2202uname -s = `(uname -s) 2>/dev/null || echo unknown` 2203uname -v = `(uname -v) 2>/dev/null || echo unknown` 2204 2205/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 2206/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 2207 2208/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 2209/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 2210/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 2211/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 2212/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 2213/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 2214/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 2215 2216_ASUNAME 2217 2218as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2219for as_dir in $PATH 2220do 2221 IFS=$as_save_IFS 2222 case $as_dir in #((( 2223 '') as_dir=./ ;; 2224 */) ;; 2225 *) as_dir=$as_dir/ ;; 2226 esac 2227 printf "%s\n" "PATH: $as_dir" 2228 done 2229IFS=$as_save_IFS 2230 2231} >&5 2232 2233cat >&5 <<_ACEOF 2234 2235 2236## ----------- ## 2237## Core tests. ## 2238## ----------- ## 2239 2240_ACEOF 2241 2242 2243# Keep a trace of the command line. 2244# Strip out --no-create and --no-recursion so they do not pile up. 2245# Strip out --silent because we don't want to record it for future runs. 2246# Also quote any args containing shell meta-characters. 2247# Make two passes to allow for proper duplicate-argument suppression. 2248ac_configure_args= 2249ac_configure_args0= 2250ac_configure_args1= 2251ac_must_keep_next=false 2252for ac_pass in 1 2 2253do 2254 for ac_arg 2255 do 2256 case $ac_arg in 2257 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; 2258 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 2259 | -silent | --silent | --silen | --sile | --sil) 2260 continue ;; 2261 *\'*) 2262 ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 2263 esac 2264 case $ac_pass in 2265 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2266 2) 2267 as_fn_append ac_configure_args1 " '$ac_arg'" 2268 if test $ac_must_keep_next = true; then 2269 ac_must_keep_next=false # Got value, back to normal. 2270 else 2271 case $ac_arg in 2272 *=* | --config-cache | -C | -disable-* | --disable-* \ 2273 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ 2274 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ 2275 | -with-* | --with-* | -without-* | --without-* | --x) 2276 case "$ac_configure_args0 " in 2277 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; 2278 esac 2279 ;; 2280 -* ) ac_must_keep_next=true ;; 2281 esac 2282 fi 2283 as_fn_append ac_configure_args " '$ac_arg'" 2284 ;; 2285 esac 2286 done 2287done 2288{ ac_configure_args0=; unset ac_configure_args0;} 2289{ ac_configure_args1=; unset ac_configure_args1;} 2290 2291# When interrupted or exit'd, cleanup temporary files, and complete 2292# config.log. We remove comments because anyway the quotes in there 2293# would cause problems or look ugly. 2294# WARNING: Use '\'' to represent an apostrophe within the trap. 2295# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 2296trap 'exit_status=$? 2297 # Sanitize IFS. 2298 IFS=" "" $as_nl" 2299 # Save into config.log some information that might help in debugging. 2300 { 2301 echo 2302 2303 printf "%s\n" "## ---------------- ## 2304## Cache variables. ## 2305## ---------------- ##" 2306 echo 2307 # The following way of writing the cache mishandles newlines in values, 2308( 2309 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do 2310 eval ac_val=\$$ac_var 2311 case $ac_val in #( 2312 *${as_nl}*) 2313 case $ac_var in #( 2314 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 2315printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 2316 esac 2317 case $ac_var in #( 2318 _ | IFS | as_nl) ;; #( 2319 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 2320 *) { eval $ac_var=; unset $ac_var;} ;; 2321 esac ;; 2322 esac 2323 done 2324 (set) 2>&1 | 2325 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( 2326 *${as_nl}ac_space=\ *) 2327 sed -n \ 2328 "s/'\''/'\''\\\\'\'''\''/g; 2329 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" 2330 ;; #( 2331 *) 2332 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 2333 ;; 2334 esac | 2335 sort 2336) 2337 echo 2338 2339 printf "%s\n" "## ----------------- ## 2340## Output variables. ## 2341## ----------------- ##" 2342 echo 2343 for ac_var in $ac_subst_vars 2344 do 2345 eval ac_val=\$$ac_var 2346 case $ac_val in 2347 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2348 esac 2349 printf "%s\n" "$ac_var='\''$ac_val'\''" 2350 done | sort 2351 echo 2352 2353 if test -n "$ac_subst_files"; then 2354 printf "%s\n" "## ------------------- ## 2355## File substitutions. ## 2356## ------------------- ##" 2357 echo 2358 for ac_var in $ac_subst_files 2359 do 2360 eval ac_val=\$$ac_var 2361 case $ac_val in 2362 *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2363 esac 2364 printf "%s\n" "$ac_var='\''$ac_val'\''" 2365 done | sort 2366 echo 2367 fi 2368 2369 if test -s confdefs.h; then 2370 printf "%s\n" "## ----------- ## 2371## confdefs.h. ## 2372## ----------- ##" 2373 echo 2374 cat confdefs.h 2375 echo 2376 fi 2377 test "$ac_signal" != 0 && 2378 printf "%s\n" "$as_me: caught signal $ac_signal" 2379 printf "%s\n" "$as_me: exit $exit_status" 2380 } >&5 2381 rm -f core *.core core.conftest.* && 2382 rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 2383 exit $exit_status 2384' 0 2385for ac_signal in 1 2 13 15; do 2386 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal 2387done 2388ac_signal=0 2389 2390# confdefs.h avoids OS command line length limits that DEFS can exceed. 2391rm -f -r conftest* confdefs.h 2392 2393printf "%s\n" "/* confdefs.h */" > confdefs.h 2394 2395# Predefined preprocessor variables. 2396 2397printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h 2398 2399printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h 2400 2401printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h 2402 2403printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h 2404 2405printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h 2406 2407printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h 2408 2409 2410# Let the site file select an alternate cache file if it wants to. 2411# Prefer an explicitly selected file to automatically selected ones. 2412if test -n "$CONFIG_SITE"; then 2413 ac_site_files="$CONFIG_SITE" 2414elif test "x$prefix" != xNONE; then 2415 ac_site_files="$prefix/share/config.site $prefix/etc/config.site" 2416else 2417 ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" 2418fi 2419 2420for ac_site_file in $ac_site_files 2421do 2422 case $ac_site_file in #( 2423 */*) : 2424 ;; #( 2425 *) : 2426 ac_site_file=./$ac_site_file ;; 2427esac 2428 if test -f "$ac_site_file" && test -r "$ac_site_file"; then 2429 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 2430printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} 2431 sed 's/^/| /' "$ac_site_file" >&5 2432 . "$ac_site_file" \ 2433 || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2434printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 2435as_fn_error $? "failed to load site script $ac_site_file 2436See \`config.log' for more details" "$LINENO" 5; } 2437 fi 2438done 2439 2440if test -r "$cache_file"; then 2441 # Some versions of bash will fail to source /dev/null (special files 2442 # actually), so we avoid doing that. DJGPP emulates it as a regular file. 2443 if test /dev/null != "$cache_file" && test -f "$cache_file"; then 2444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 2445printf "%s\n" "$as_me: loading cache $cache_file" >&6;} 2446 case $cache_file in 2447 [\\/]* | ?:[\\/]* ) . "$cache_file";; 2448 *) . "./$cache_file";; 2449 esac 2450 fi 2451else 2452 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 2453printf "%s\n" "$as_me: creating cache $cache_file" >&6;} 2454 >$cache_file 2455fi 2456 2457# Test code for whether the C compiler supports C89 (global declarations) 2458ac_c_conftest_c89_globals=' 2459/* Does the compiler advertise C89 conformance? 2460 Do not test the value of __STDC__, because some compilers set it to 0 2461 while being otherwise adequately conformant. */ 2462#if !defined __STDC__ 2463# error "Compiler does not advertise C89 conformance" 2464#endif 2465 2466#include <stddef.h> 2467#include <stdarg.h> 2468struct stat; 2469/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ 2470struct buf { int x; }; 2471struct buf * (*rcsopen) (struct buf *, struct stat *, int); 2472static char *e (p, i) 2473 char **p; 2474 int i; 2475{ 2476 return p[i]; 2477} 2478static char *f (char * (*g) (char **, int), char **p, ...) 2479{ 2480 char *s; 2481 va_list v; 2482 va_start (v,p); 2483 s = g (p, va_arg (v,int)); 2484 va_end (v); 2485 return s; 2486} 2487 2488/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 2489 function prototypes and stuff, but not \xHH hex character constants. 2490 These do not provoke an error unfortunately, instead are silently treated 2491 as an "x". The following induces an error, until -std is added to get 2492 proper ANSI mode. Curiously \x00 != x always comes out true, for an 2493 array size at least. It is necessary to write \x00 == 0 to get something 2494 that is true only with -std. */ 2495int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; 2496 2497/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters 2498 inside strings and character constants. */ 2499#define FOO(x) '\''x'\'' 2500int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; 2501 2502int test (int i, double x); 2503struct s1 {int (*f) (int a);}; 2504struct s2 {int (*f) (double a);}; 2505int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), 2506 int, int);' 2507 2508# Test code for whether the C compiler supports C89 (body of main). 2509ac_c_conftest_c89_main=' 2510ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); 2511' 2512 2513# Test code for whether the C compiler supports C99 (global declarations) 2514ac_c_conftest_c99_globals=' 2515// Does the compiler advertise C99 conformance? 2516#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L 2517# error "Compiler does not advertise C99 conformance" 2518#endif 2519 2520#include <stdbool.h> 2521extern int puts (const char *); 2522extern int printf (const char *, ...); 2523extern int dprintf (int, const char *, ...); 2524extern void *malloc (size_t); 2525 2526// Check varargs macros. These examples are taken from C99 6.10.3.5. 2527// dprintf is used instead of fprintf to avoid needing to declare 2528// FILE and stderr. 2529#define debug(...) dprintf (2, __VA_ARGS__) 2530#define showlist(...) puts (#__VA_ARGS__) 2531#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) 2532static void 2533test_varargs_macros (void) 2534{ 2535 int x = 1234; 2536 int y = 5678; 2537 debug ("Flag"); 2538 debug ("X = %d\n", x); 2539 showlist (The first, second, and third items.); 2540 report (x>y, "x is %d but y is %d", x, y); 2541} 2542 2543// Check long long types. 2544#define BIG64 18446744073709551615ull 2545#define BIG32 4294967295ul 2546#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) 2547#if !BIG_OK 2548 #error "your preprocessor is broken" 2549#endif 2550#if BIG_OK 2551#else 2552 #error "your preprocessor is broken" 2553#endif 2554static long long int bignum = -9223372036854775807LL; 2555static unsigned long long int ubignum = BIG64; 2556 2557struct incomplete_array 2558{ 2559 int datasize; 2560 double data[]; 2561}; 2562 2563struct named_init { 2564 int number; 2565 const wchar_t *name; 2566 double average; 2567}; 2568 2569typedef const char *ccp; 2570 2571static inline int 2572test_restrict (ccp restrict text) 2573{ 2574 // See if C++-style comments work. 2575 // Iterate through items via the restricted pointer. 2576 // Also check for declarations in for loops. 2577 for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) 2578 continue; 2579 return 0; 2580} 2581 2582// Check varargs and va_copy. 2583static bool 2584test_varargs (const char *format, ...) 2585{ 2586 va_list args; 2587 va_start (args, format); 2588 va_list args_copy; 2589 va_copy (args_copy, args); 2590 2591 const char *str = ""; 2592 int number = 0; 2593 float fnumber = 0; 2594 2595 while (*format) 2596 { 2597 switch (*format++) 2598 { 2599 case '\''s'\'': // string 2600 str = va_arg (args_copy, const char *); 2601 break; 2602 case '\''d'\'': // int 2603 number = va_arg (args_copy, int); 2604 break; 2605 case '\''f'\'': // float 2606 fnumber = va_arg (args_copy, double); 2607 break; 2608 default: 2609 break; 2610 } 2611 } 2612 va_end (args_copy); 2613 va_end (args); 2614 2615 return *str && number && fnumber; 2616} 2617' 2618 2619# Test code for whether the C compiler supports C99 (body of main). 2620ac_c_conftest_c99_main=' 2621 // Check bool. 2622 _Bool success = false; 2623 success |= (argc != 0); 2624 2625 // Check restrict. 2626 if (test_restrict ("String literal") == 0) 2627 success = true; 2628 char *restrict newvar = "Another string"; 2629 2630 // Check varargs. 2631 success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); 2632 test_varargs_macros (); 2633 2634 // Check flexible array members. 2635 struct incomplete_array *ia = 2636 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); 2637 ia->datasize = 10; 2638 for (int i = 0; i < ia->datasize; ++i) 2639 ia->data[i] = i * 1.234; 2640 2641 // Check named initializers. 2642 struct named_init ni = { 2643 .number = 34, 2644 .name = L"Test wide string", 2645 .average = 543.34343, 2646 }; 2647 2648 ni.number = 58; 2649 2650 int dynamic_array[ni.number]; 2651 dynamic_array[0] = argv[0][0]; 2652 dynamic_array[ni.number - 1] = 543; 2653 2654 // work around unused variable warnings 2655 ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' 2656 || dynamic_array[ni.number - 1] != 543); 2657' 2658 2659# Test code for whether the C compiler supports C11 (global declarations) 2660ac_c_conftest_c11_globals=' 2661// Does the compiler advertise C11 conformance? 2662#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L 2663# error "Compiler does not advertise C11 conformance" 2664#endif 2665 2666// Check _Alignas. 2667char _Alignas (double) aligned_as_double; 2668char _Alignas (0) no_special_alignment; 2669extern char aligned_as_int; 2670char _Alignas (0) _Alignas (int) aligned_as_int; 2671 2672// Check _Alignof. 2673enum 2674{ 2675 int_alignment = _Alignof (int), 2676 int_array_alignment = _Alignof (int[100]), 2677 char_alignment = _Alignof (char) 2678}; 2679_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); 2680 2681// Check _Noreturn. 2682int _Noreturn does_not_return (void) { for (;;) continue; } 2683 2684// Check _Static_assert. 2685struct test_static_assert 2686{ 2687 int x; 2688 _Static_assert (sizeof (int) <= sizeof (long int), 2689 "_Static_assert does not work in struct"); 2690 long int y; 2691}; 2692 2693// Check UTF-8 literals. 2694#define u8 syntax error! 2695char const utf8_literal[] = u8"happens to be ASCII" "another string"; 2696 2697// Check duplicate typedefs. 2698typedef long *long_ptr; 2699typedef long int *long_ptr; 2700typedef long_ptr long_ptr; 2701 2702// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. 2703struct anonymous 2704{ 2705 union { 2706 struct { int i; int j; }; 2707 struct { int k; long int l; } w; 2708 }; 2709 int m; 2710} v1; 2711' 2712 2713# Test code for whether the C compiler supports C11 (body of main). 2714ac_c_conftest_c11_main=' 2715 _Static_assert ((offsetof (struct anonymous, i) 2716 == offsetof (struct anonymous, w.k)), 2717 "Anonymous union alignment botch"); 2718 v1.i = 2; 2719 v1.w.k = 5; 2720 ok |= v1.i != 5; 2721' 2722 2723# Test code for whether the C compiler supports C11 (complete). 2724ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} 2725${ac_c_conftest_c99_globals} 2726${ac_c_conftest_c11_globals} 2727 2728int 2729main (int argc, char **argv) 2730{ 2731 int ok = 0; 2732 ${ac_c_conftest_c89_main} 2733 ${ac_c_conftest_c99_main} 2734 ${ac_c_conftest_c11_main} 2735 return ok; 2736} 2737" 2738 2739# Test code for whether the C compiler supports C99 (complete). 2740ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} 2741${ac_c_conftest_c99_globals} 2742 2743int 2744main (int argc, char **argv) 2745{ 2746 int ok = 0; 2747 ${ac_c_conftest_c89_main} 2748 ${ac_c_conftest_c99_main} 2749 return ok; 2750} 2751" 2752 2753# Test code for whether the C compiler supports C89 (complete). 2754ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} 2755 2756int 2757main (int argc, char **argv) 2758{ 2759 int ok = 0; 2760 ${ac_c_conftest_c89_main} 2761 return ok; 2762} 2763" 2764 2765as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" 2766as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" 2767as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" 2768as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" 2769as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" 2770as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" 2771as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" 2772as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" 2773as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" 2774 2775# Auxiliary files required by this configure script. 2776ac_aux_files="install-sh config.guess config.sub" 2777 2778# Locations in which to look for auxiliary files. 2779ac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." 2780 2781# Search for a directory containing all of the required auxiliary files, 2782# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. 2783# If we don't find one directory that contains all the files we need, 2784# we report the set of missing files from the *first* directory in 2785# $ac_aux_dir_candidates and give up. 2786ac_missing_aux_files="" 2787ac_first_candidate=: 2788printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 2789as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2790as_found=false 2791for as_dir in $ac_aux_dir_candidates 2792do 2793 IFS=$as_save_IFS 2794 case $as_dir in #((( 2795 '') as_dir=./ ;; 2796 */) ;; 2797 *) as_dir=$as_dir/ ;; 2798 esac 2799 as_found=: 2800 2801 printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 2802 ac_aux_dir_found=yes 2803 ac_install_sh= 2804 for ac_aux in $ac_aux_files 2805 do 2806 # As a special case, if "install-sh" is required, that requirement 2807 # can be satisfied by any of "install-sh", "install.sh", or "shtool", 2808 # and $ac_install_sh is set appropriately for whichever one is found. 2809 if test x"$ac_aux" = x"install-sh" 2810 then 2811 if test -f "${as_dir}install-sh"; then 2812 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 2813 ac_install_sh="${as_dir}install-sh -c" 2814 elif test -f "${as_dir}install.sh"; then 2815 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 2816 ac_install_sh="${as_dir}install.sh -c" 2817 elif test -f "${as_dir}shtool"; then 2818 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 2819 ac_install_sh="${as_dir}shtool install -c" 2820 else 2821 ac_aux_dir_found=no 2822 if $ac_first_candidate; then 2823 ac_missing_aux_files="${ac_missing_aux_files} install-sh" 2824 else 2825 break 2826 fi 2827 fi 2828 else 2829 if test -f "${as_dir}${ac_aux}"; then 2830 printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 2831 else 2832 ac_aux_dir_found=no 2833 if $ac_first_candidate; then 2834 ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" 2835 else 2836 break 2837 fi 2838 fi 2839 fi 2840 done 2841 if test "$ac_aux_dir_found" = yes; then 2842 ac_aux_dir="$as_dir" 2843 break 2844 fi 2845 ac_first_candidate=false 2846 2847 as_found=false 2848done 2849IFS=$as_save_IFS 2850if $as_found 2851then : 2852 2853else $as_nop 2854 as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 2855fi 2856 2857 2858# These three variables are undocumented and unsupported, 2859# and are intended to be withdrawn in a future Autoconf release. 2860# They can cause serious problems if a builder's source tree is in a directory 2861# whose full name contains unusual characters. 2862if test -f "${ac_aux_dir}config.guess"; then 2863 ac_config_guess="$SHELL ${ac_aux_dir}config.guess" 2864fi 2865if test -f "${ac_aux_dir}config.sub"; then 2866 ac_config_sub="$SHELL ${ac_aux_dir}config.sub" 2867fi 2868if test -f "$ac_aux_dir/configure"; then 2869 ac_configure="$SHELL ${ac_aux_dir}configure" 2870fi 2871 2872# Check that the precious variables saved in the cache have kept the same 2873# value. 2874ac_cache_corrupted=false 2875for ac_var in $ac_precious_vars; do 2876 eval ac_old_set=\$ac_cv_env_${ac_var}_set 2877 eval ac_new_set=\$ac_env_${ac_var}_set 2878 eval ac_old_val=\$ac_cv_env_${ac_var}_value 2879 eval ac_new_val=\$ac_env_${ac_var}_value 2880 case $ac_old_set,$ac_new_set in 2881 set,) 2882 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 2883printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 2884 ac_cache_corrupted=: ;; 2885 ,set) 2886 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 2887printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 2888 ac_cache_corrupted=: ;; 2889 ,);; 2890 *) 2891 if test "x$ac_old_val" != "x$ac_new_val"; then 2892 # differences in whitespace do not lead to failure. 2893 ac_old_val_w=`echo x $ac_old_val` 2894 ac_new_val_w=`echo x $ac_new_val` 2895 if test "$ac_old_val_w" != "$ac_new_val_w"; then 2896 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 2897printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 2898 ac_cache_corrupted=: 2899 else 2900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 2901printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} 2902 eval $ac_var=\$ac_old_val 2903 fi 2904 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 2905printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} 2906 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 2907printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} 2908 fi;; 2909 esac 2910 # Pass precious variables to config.status. 2911 if test "$ac_new_set" = set; then 2912 case $ac_new_val in 2913 *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 2914 *) ac_arg=$ac_var=$ac_new_val ;; 2915 esac 2916 case " $ac_configure_args " in 2917 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. 2918 *) as_fn_append ac_configure_args " '$ac_arg'" ;; 2919 esac 2920 fi 2921done 2922if $ac_cache_corrupted; then 2923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2924printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 2925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 2926printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} 2927 as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' 2928 and start over" "$LINENO" 5 2929fi 2930## -------------------- ## 2931## Main body of script. ## 2932## -------------------- ## 2933 2934ac_ext=c 2935ac_cpp='$CPP $CPPFLAGS' 2936ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2937ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2938ac_compiler_gnu=$ac_cv_c_compiler_gnu 2939 2940 2941 2942 2943 2944# 2945# These are the variables that are used in Makefile, pcap-config, and 2946# libpcap.pc. 2947# 2948# CFLAGS: inherited from the environment, not modified by us except 2949# for flags required for the platform for which we're building (and 2950# except temporarily during tests that involve compilation). Used only 2951# when compiling C source. 2952# 2953# LDFLAGS: inherited from the environment, not modified by us. 2954# 2955# LIBS: inherited from the environment; we add libraries required by 2956# libpcap. Libraries that the core libpcap code requires are added 2957# first; libraries required by additional pcap modules are first 2958# added to ADDITIONAL_LIBS, and only added to LIBS at the end, after 2959# we're finished doing configuration tests for the modules. 2960# 2961# LIBS_STATIC: libraries with which a program using the libpcap *static* 2962# library needs to be linked. This is a superset of LIBS, used in 2963# pcap-config, so that "pcap-config --libs --static" will report them. 2964# Initialized to LIBS. 2965# 2966# REQUIRES_PRIVATE: pkg-config package names for additional libraries 2967# with which a program using the libpcap *static* library needs to be 2968# linked and for which a .pc file exists. This is used in libpcap.pc, 2969# so that "pkg-config --libs --static" will report them, and so that 2970# those libraries will be determined using the library's .pc file, not 2971# from our .pc file. Initialized to an empty string. 2972# 2973# V_CCOPT: additional compiler flags other than -I and -D flags 2974# needed when compiling libpcap. Used in Makefile for both C and 2975# C++ source. 2976# 2977# V_DEFS: additional -D compiler flags needed when compiling 2978# libpcap. Used in Makefile for both C and C++ source. 2979# 2980# V_INCLS: additional -I compiler flags needed when compiling 2981# libpcap. Used in Makefile for both C and C++ source. 2982# 2983# ADDITIONAL_LIBS: additional libraries with which the libpcap dynamic 2984# library needs to be linked. Used in Makefile; not used in pcap-config 2985# or libpcap.pc, as, in all platforms on which we run, if a dynamic 2986# library is linked with other dynamic libraries, a program using 2987# that dynamic library doesn't have to link with those libraries - 2988# they will be automatically loaded at run time. Initialized to an 2989# empty string. 2990# 2991# ADDITIONAL_LIBS_STATIC: additional libraries with which a program 2992# using the libpcap *static* library needs to be linked. This is used 2993# in pcap-config, so that "pcap-config --libs --static" will report 2994# them. Initialized to an empty string. 2995# 2996# REQUIRES_PRIVATE: pkg-config package names for additional libraries 2997# with which a program using the libpcap *static* library needs to be 2998# linked and for which a .pc file exists. This is used in libpcap.pc, 2999# so that "pkg-config --libs --static" will report them, and so that 3000# those libraries will be determined using the library's .pc file, not 3001# from our .pc file. Initialized to an empty string. 3002# 3003# LIBS_PRIVATE: pkg-config package names for additional libraries with 3004# which a program using the libpcap *static* library needs to be linked 3005# and for which a .pc file does not exist. This is used in libpcap.pc, 3006# so that "pkg-config --libs --static" will report them (those libraries 3007# cannot be determined using the library's .pc file, as there is no such 3008# file, so it has to come from our .pc file. Initialized to an empty 3009# string. 3010# 3011LIBS_STATIC="" 3012REQUIRES_PRIVATE="" 3013LIBS_PRIVATE="" 3014 3015 3016 3017 3018 3019 3020 3021 3022 3023 3024 3025 # Make sure we can run config.sub. 3026$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || 3027 as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 3028 3029{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 3030printf %s "checking build system type... " >&6; } 3031if test ${ac_cv_build+y} 3032then : 3033 printf %s "(cached) " >&6 3034else $as_nop 3035 ac_build_alias=$build_alias 3036test "x$ac_build_alias" = x && 3037 ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` 3038test "x$ac_build_alias" = x && 3039 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 3040ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || 3041 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 3042 3043fi 3044{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 3045printf "%s\n" "$ac_cv_build" >&6; } 3046case $ac_cv_build in 3047*-*-*) ;; 3048*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; 3049esac 3050build=$ac_cv_build 3051ac_save_IFS=$IFS; IFS='-' 3052set x $ac_cv_build 3053shift 3054build_cpu=$1 3055build_vendor=$2 3056shift; shift 3057# Remember, the first character of IFS is used to create $*, 3058# except with old shells: 3059build_os=$* 3060IFS=$ac_save_IFS 3061case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac 3062 3063 3064{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 3065printf %s "checking host system type... " >&6; } 3066if test ${ac_cv_host+y} 3067then : 3068 printf %s "(cached) " >&6 3069else $as_nop 3070 if test "x$host_alias" = x; then 3071 ac_cv_host=$ac_cv_build 3072else 3073 ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || 3074 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 3075fi 3076 3077fi 3078{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 3079printf "%s\n" "$ac_cv_host" >&6; } 3080case $ac_cv_host in 3081*-*-*) ;; 3082*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; 3083esac 3084host=$ac_cv_host 3085ac_save_IFS=$IFS; IFS='-' 3086set x $ac_cv_host 3087shift 3088host_cpu=$1 3089host_vendor=$2 3090shift; shift 3091# Remember, the first character of IFS is used to create $*, 3092# except with old shells: 3093host_os=$* 3094IFS=$ac_save_IFS 3095case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac 3096 3097 3098{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 3099printf %s "checking target system type... " >&6; } 3100if test ${ac_cv_target+y} 3101then : 3102 printf %s "(cached) " >&6 3103else $as_nop 3104 if test "x$target_alias" = x; then 3105 ac_cv_target=$ac_cv_host 3106else 3107 ac_cv_target=`$SHELL "${ac_aux_dir}config.sub" $target_alias` || 3108 as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $target_alias failed" "$LINENO" 5 3109fi 3110 3111fi 3112{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 3113printf "%s\n" "$ac_cv_target" >&6; } 3114case $ac_cv_target in 3115*-*-*) ;; 3116*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; 3117esac 3118target=$ac_cv_target 3119ac_save_IFS=$IFS; IFS='-' 3120set x $ac_cv_target 3121shift 3122target_cpu=$1 3123target_vendor=$2 3124shift; shift 3125# Remember, the first character of IFS is used to create $*, 3126# except with old shells: 3127target_os=$* 3128IFS=$ac_save_IFS 3129case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac 3130 3131 3132# The aliases save the names the user supplied, while $host etc. 3133# will get canonicalized. 3134test -n "$target_alias" && 3135 test "$program_prefix$program_suffix$program_transform_name" = \ 3136 NONENONEs,x,x, && 3137 program_prefix=${target_alias}- 3138 3139 3140 3141 3142 3143 3144 3145 3146# Check whether --with-gcc was given. 3147if test ${with_gcc+y} 3148then : 3149 withval=$with_gcc; 3150fi 3151 3152 V_CCOPT="" 3153 if test "${srcdir}" != "." ; then 3154 V_CCOPT="-I\$(srcdir)" 3155 fi 3156 if test "${CFLAGS+set}" = set; then 3157 LBL_CFLAGS="$CFLAGS" 3158 fi 3159 if test -z "$CC" ; then 3160 case "$host_os" in 3161 3162 bsdi*) 3163 # Extract the first word of "shlicc2", so it can be a program name with args. 3164set dummy shlicc2; ac_word=$2 3165{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3166printf %s "checking for $ac_word... " >&6; } 3167if test ${ac_cv_prog_SHLICC2+y} 3168then : 3169 printf %s "(cached) " >&6 3170else $as_nop 3171 if test -n "$SHLICC2"; then 3172 ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test. 3173else 3174as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3175for as_dir in $PATH 3176do 3177 IFS=$as_save_IFS 3178 case $as_dir in #((( 3179 '') as_dir=./ ;; 3180 */) ;; 3181 *) as_dir=$as_dir/ ;; 3182 esac 3183 for ac_exec_ext in '' $ac_executable_extensions; do 3184 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3185 ac_cv_prog_SHLICC2="yes" 3186 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3187 break 2 3188 fi 3189done 3190 done 3191IFS=$as_save_IFS 3192 3193 test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no" 3194fi 3195fi 3196SHLICC2=$ac_cv_prog_SHLICC2 3197if test -n "$SHLICC2"; then 3198 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5 3199printf "%s\n" "$SHLICC2" >&6; } 3200else 3201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3202printf "%s\n" "no" >&6; } 3203fi 3204 3205 3206 if test $SHLICC2 = yes ; then 3207 CC=shlicc2 3208 export CC 3209 fi 3210 ;; 3211 esac 3212 fi 3213 if test -z "$CC" -a "$with_gcc" = no ; then 3214 CC=cc 3215 export CC 3216 fi 3217 3218# 3219# We require C99 or later. 3220# Try to get it, which may involve adding compiler flags; 3221# if that fails, give up. 3222# 3223 3224 3225 3226 3227 3228 3229 3230 3231 3232ac_ext=c 3233ac_cpp='$CPP $CPPFLAGS' 3234ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3235ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3236ac_compiler_gnu=$ac_cv_c_compiler_gnu 3237if test -n "$ac_tool_prefix"; then 3238 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 3239set dummy ${ac_tool_prefix}gcc; ac_word=$2 3240{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3241printf %s "checking for $ac_word... " >&6; } 3242if test ${ac_cv_prog_CC+y} 3243then : 3244 printf %s "(cached) " >&6 3245else $as_nop 3246 if test -n "$CC"; then 3247 ac_cv_prog_CC="$CC" # Let the user override the test. 3248else 3249as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3250for as_dir in $PATH 3251do 3252 IFS=$as_save_IFS 3253 case $as_dir in #((( 3254 '') as_dir=./ ;; 3255 */) ;; 3256 *) as_dir=$as_dir/ ;; 3257 esac 3258 for ac_exec_ext in '' $ac_executable_extensions; do 3259 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3260 ac_cv_prog_CC="${ac_tool_prefix}gcc" 3261 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3262 break 2 3263 fi 3264done 3265 done 3266IFS=$as_save_IFS 3267 3268fi 3269fi 3270CC=$ac_cv_prog_CC 3271if test -n "$CC"; then 3272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3273printf "%s\n" "$CC" >&6; } 3274else 3275 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3276printf "%s\n" "no" >&6; } 3277fi 3278 3279 3280fi 3281if test -z "$ac_cv_prog_CC"; then 3282 ac_ct_CC=$CC 3283 # Extract the first word of "gcc", so it can be a program name with args. 3284set dummy gcc; ac_word=$2 3285{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3286printf %s "checking for $ac_word... " >&6; } 3287if test ${ac_cv_prog_ac_ct_CC+y} 3288then : 3289 printf %s "(cached) " >&6 3290else $as_nop 3291 if test -n "$ac_ct_CC"; then 3292 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 3293else 3294as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3295for as_dir in $PATH 3296do 3297 IFS=$as_save_IFS 3298 case $as_dir in #((( 3299 '') as_dir=./ ;; 3300 */) ;; 3301 *) as_dir=$as_dir/ ;; 3302 esac 3303 for ac_exec_ext in '' $ac_executable_extensions; do 3304 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3305 ac_cv_prog_ac_ct_CC="gcc" 3306 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3307 break 2 3308 fi 3309done 3310 done 3311IFS=$as_save_IFS 3312 3313fi 3314fi 3315ac_ct_CC=$ac_cv_prog_ac_ct_CC 3316if test -n "$ac_ct_CC"; then 3317 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 3318printf "%s\n" "$ac_ct_CC" >&6; } 3319else 3320 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3321printf "%s\n" "no" >&6; } 3322fi 3323 3324 if test "x$ac_ct_CC" = x; then 3325 CC="" 3326 else 3327 case $cross_compiling:$ac_tool_warned in 3328yes:) 3329{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 3330printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 3331ac_tool_warned=yes ;; 3332esac 3333 CC=$ac_ct_CC 3334 fi 3335else 3336 CC="$ac_cv_prog_CC" 3337fi 3338 3339if test -z "$CC"; then 3340 if test -n "$ac_tool_prefix"; then 3341 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 3342set dummy ${ac_tool_prefix}cc; ac_word=$2 3343{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3344printf %s "checking for $ac_word... " >&6; } 3345if test ${ac_cv_prog_CC+y} 3346then : 3347 printf %s "(cached) " >&6 3348else $as_nop 3349 if test -n "$CC"; then 3350 ac_cv_prog_CC="$CC" # Let the user override the test. 3351else 3352as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3353for as_dir in $PATH 3354do 3355 IFS=$as_save_IFS 3356 case $as_dir in #((( 3357 '') as_dir=./ ;; 3358 */) ;; 3359 *) as_dir=$as_dir/ ;; 3360 esac 3361 for ac_exec_ext in '' $ac_executable_extensions; do 3362 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3363 ac_cv_prog_CC="${ac_tool_prefix}cc" 3364 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3365 break 2 3366 fi 3367done 3368 done 3369IFS=$as_save_IFS 3370 3371fi 3372fi 3373CC=$ac_cv_prog_CC 3374if test -n "$CC"; then 3375 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3376printf "%s\n" "$CC" >&6; } 3377else 3378 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3379printf "%s\n" "no" >&6; } 3380fi 3381 3382 3383 fi 3384fi 3385if test -z "$CC"; then 3386 # Extract the first word of "cc", so it can be a program name with args. 3387set dummy cc; ac_word=$2 3388{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3389printf %s "checking for $ac_word... " >&6; } 3390if test ${ac_cv_prog_CC+y} 3391then : 3392 printf %s "(cached) " >&6 3393else $as_nop 3394 if test -n "$CC"; then 3395 ac_cv_prog_CC="$CC" # Let the user override the test. 3396else 3397 ac_prog_rejected=no 3398as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3399for as_dir in $PATH 3400do 3401 IFS=$as_save_IFS 3402 case $as_dir in #((( 3403 '') as_dir=./ ;; 3404 */) ;; 3405 *) as_dir=$as_dir/ ;; 3406 esac 3407 for ac_exec_ext in '' $ac_executable_extensions; do 3408 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3409 if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then 3410 ac_prog_rejected=yes 3411 continue 3412 fi 3413 ac_cv_prog_CC="cc" 3414 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3415 break 2 3416 fi 3417done 3418 done 3419IFS=$as_save_IFS 3420 3421if test $ac_prog_rejected = yes; then 3422 # We found a bogon in the path, so make sure we never use it. 3423 set dummy $ac_cv_prog_CC 3424 shift 3425 if test $# != 0; then 3426 # We chose a different compiler from the bogus one. 3427 # However, it has the same basename, so the bogon will be chosen 3428 # first if we set CC to just the basename; use the full file name. 3429 shift 3430 ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" 3431 fi 3432fi 3433fi 3434fi 3435CC=$ac_cv_prog_CC 3436if test -n "$CC"; then 3437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3438printf "%s\n" "$CC" >&6; } 3439else 3440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3441printf "%s\n" "no" >&6; } 3442fi 3443 3444 3445fi 3446if test -z "$CC"; then 3447 if test -n "$ac_tool_prefix"; then 3448 for ac_prog in cl.exe 3449 do 3450 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 3451set dummy $ac_tool_prefix$ac_prog; ac_word=$2 3452{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3453printf %s "checking for $ac_word... " >&6; } 3454if test ${ac_cv_prog_CC+y} 3455then : 3456 printf %s "(cached) " >&6 3457else $as_nop 3458 if test -n "$CC"; then 3459 ac_cv_prog_CC="$CC" # Let the user override the test. 3460else 3461as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3462for as_dir in $PATH 3463do 3464 IFS=$as_save_IFS 3465 case $as_dir in #((( 3466 '') as_dir=./ ;; 3467 */) ;; 3468 *) as_dir=$as_dir/ ;; 3469 esac 3470 for ac_exec_ext in '' $ac_executable_extensions; do 3471 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3472 ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 3473 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3474 break 2 3475 fi 3476done 3477 done 3478IFS=$as_save_IFS 3479 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 3492 test -n "$CC" && break 3493 done 3494fi 3495if test -z "$CC"; then 3496 ac_ct_CC=$CC 3497 for ac_prog in cl.exe 3498do 3499 # Extract the first word of "$ac_prog", so it can be a program name with args. 3500set dummy $ac_prog; ac_word=$2 3501{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3502printf %s "checking for $ac_word... " >&6; } 3503if test ${ac_cv_prog_ac_ct_CC+y} 3504then : 3505 printf %s "(cached) " >&6 3506else $as_nop 3507 if test -n "$ac_ct_CC"; then 3508 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 3509else 3510as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3511for as_dir in $PATH 3512do 3513 IFS=$as_save_IFS 3514 case $as_dir in #((( 3515 '') as_dir=./ ;; 3516 */) ;; 3517 *) as_dir=$as_dir/ ;; 3518 esac 3519 for ac_exec_ext in '' $ac_executable_extensions; do 3520 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3521 ac_cv_prog_ac_ct_CC="$ac_prog" 3522 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3523 break 2 3524 fi 3525done 3526 done 3527IFS=$as_save_IFS 3528 3529fi 3530fi 3531ac_ct_CC=$ac_cv_prog_ac_ct_CC 3532if test -n "$ac_ct_CC"; then 3533 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 3534printf "%s\n" "$ac_ct_CC" >&6; } 3535else 3536 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3537printf "%s\n" "no" >&6; } 3538fi 3539 3540 3541 test -n "$ac_ct_CC" && break 3542done 3543 3544 if test "x$ac_ct_CC" = x; then 3545 CC="" 3546 else 3547 case $cross_compiling:$ac_tool_warned in 3548yes:) 3549{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 3550printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 3551ac_tool_warned=yes ;; 3552esac 3553 CC=$ac_ct_CC 3554 fi 3555fi 3556 3557fi 3558if test -z "$CC"; then 3559 if test -n "$ac_tool_prefix"; then 3560 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. 3561set dummy ${ac_tool_prefix}clang; ac_word=$2 3562{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3563printf %s "checking for $ac_word... " >&6; } 3564if test ${ac_cv_prog_CC+y} 3565then : 3566 printf %s "(cached) " >&6 3567else $as_nop 3568 if test -n "$CC"; then 3569 ac_cv_prog_CC="$CC" # Let the user override the test. 3570else 3571as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3572for as_dir in $PATH 3573do 3574 IFS=$as_save_IFS 3575 case $as_dir in #((( 3576 '') as_dir=./ ;; 3577 */) ;; 3578 *) as_dir=$as_dir/ ;; 3579 esac 3580 for ac_exec_ext in '' $ac_executable_extensions; do 3581 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3582 ac_cv_prog_CC="${ac_tool_prefix}clang" 3583 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3584 break 2 3585 fi 3586done 3587 done 3588IFS=$as_save_IFS 3589 3590fi 3591fi 3592CC=$ac_cv_prog_CC 3593if test -n "$CC"; then 3594 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3595printf "%s\n" "$CC" >&6; } 3596else 3597 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3598printf "%s\n" "no" >&6; } 3599fi 3600 3601 3602fi 3603if test -z "$ac_cv_prog_CC"; then 3604 ac_ct_CC=$CC 3605 # Extract the first word of "clang", so it can be a program name with args. 3606set dummy clang; ac_word=$2 3607{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3608printf %s "checking for $ac_word... " >&6; } 3609if test ${ac_cv_prog_ac_ct_CC+y} 3610then : 3611 printf %s "(cached) " >&6 3612else $as_nop 3613 if test -n "$ac_ct_CC"; then 3614 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 3615else 3616as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3617for as_dir in $PATH 3618do 3619 IFS=$as_save_IFS 3620 case $as_dir in #((( 3621 '') as_dir=./ ;; 3622 */) ;; 3623 *) as_dir=$as_dir/ ;; 3624 esac 3625 for ac_exec_ext in '' $ac_executable_extensions; do 3626 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3627 ac_cv_prog_ac_ct_CC="clang" 3628 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3629 break 2 3630 fi 3631done 3632 done 3633IFS=$as_save_IFS 3634 3635fi 3636fi 3637ac_ct_CC=$ac_cv_prog_ac_ct_CC 3638if test -n "$ac_ct_CC"; then 3639 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 3640printf "%s\n" "$ac_ct_CC" >&6; } 3641else 3642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3643printf "%s\n" "no" >&6; } 3644fi 3645 3646 if test "x$ac_ct_CC" = x; then 3647 CC="" 3648 else 3649 case $cross_compiling:$ac_tool_warned in 3650yes:) 3651{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 3652printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 3653ac_tool_warned=yes ;; 3654esac 3655 CC=$ac_ct_CC 3656 fi 3657else 3658 CC="$ac_cv_prog_CC" 3659fi 3660 3661fi 3662 3663 3664test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3665printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 3666as_fn_error $? "no acceptable C compiler found in \$PATH 3667See \`config.log' for more details" "$LINENO" 5; } 3668 3669# Provide some information about the compiler. 3670printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 3671set X $ac_compile 3672ac_compiler=$2 3673for ac_option in --version -v -V -qversion -version; do 3674 { { ac_try="$ac_compiler $ac_option >&5" 3675case "(($ac_try" in 3676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3677 *) ac_try_echo=$ac_try;; 3678esac 3679eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3680printf "%s\n" "$ac_try_echo"; } >&5 3681 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 3682 ac_status=$? 3683 if test -s conftest.err; then 3684 sed '10a\ 3685... rest of stderr output deleted ... 3686 10q' conftest.err >conftest.er1 3687 cat conftest.er1 >&5 3688 fi 3689 rm -f conftest.er1 conftest.err 3690 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3691 test $ac_status = 0; } 3692done 3693 3694cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3695/* end confdefs.h. */ 3696 3697int 3698main (void) 3699{ 3700 3701 ; 3702 return 0; 3703} 3704_ACEOF 3705ac_clean_files_save=$ac_clean_files 3706ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" 3707# Try to create an executable without -o first, disregard a.out. 3708# It will help us diagnose broken compilers, and finding out an intuition 3709# of exeext. 3710{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 3711printf %s "checking whether the C compiler works... " >&6; } 3712ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 3713 3714# The possible output files: 3715ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" 3716 3717ac_rmfiles= 3718for ac_file in $ac_files 3719do 3720 case $ac_file in 3721 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 3722 * ) ac_rmfiles="$ac_rmfiles $ac_file";; 3723 esac 3724done 3725rm -f $ac_rmfiles 3726 3727if { { ac_try="$ac_link_default" 3728case "(($ac_try" in 3729 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3730 *) ac_try_echo=$ac_try;; 3731esac 3732eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3733printf "%s\n" "$ac_try_echo"; } >&5 3734 (eval "$ac_link_default") 2>&5 3735 ac_status=$? 3736 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3737 test $ac_status = 0; } 3738then : 3739 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. 3740# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' 3741# in a Makefile. We should not override ac_cv_exeext if it was cached, 3742# so that the user can short-circuit this test for compilers unknown to 3743# Autoconf. 3744for ac_file in $ac_files '' 3745do 3746 test -f "$ac_file" || continue 3747 case $ac_file in 3748 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) 3749 ;; 3750 [ab].out ) 3751 # We found the default executable, but exeext='' is most 3752 # certainly right. 3753 break;; 3754 *.* ) 3755 if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; 3756 then :; else 3757 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 3758 fi 3759 # We set ac_cv_exeext here because the later test for it is not 3760 # safe: cross compilers may not add the suffix if given an `-o' 3761 # argument, so we may need to know it at that point already. 3762 # Even if this section looks crufty: it has the advantage of 3763 # actually working. 3764 break;; 3765 * ) 3766 break;; 3767 esac 3768done 3769test "$ac_cv_exeext" = no && ac_cv_exeext= 3770 3771else $as_nop 3772 ac_file='' 3773fi 3774if test -z "$ac_file" 3775then : 3776 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3777printf "%s\n" "no" >&6; } 3778printf "%s\n" "$as_me: failed program was:" >&5 3779sed 's/^/| /' conftest.$ac_ext >&5 3780 3781{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3782printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 3783as_fn_error 77 "C compiler cannot create executables 3784See \`config.log' for more details" "$LINENO" 5; } 3785else $as_nop 3786 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 3787printf "%s\n" "yes" >&6; } 3788fi 3789{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 3790printf %s "checking for C compiler default output file name... " >&6; } 3791{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 3792printf "%s\n" "$ac_file" >&6; } 3793ac_exeext=$ac_cv_exeext 3794 3795rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out 3796ac_clean_files=$ac_clean_files_save 3797{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 3798printf %s "checking for suffix of executables... " >&6; } 3799if { { ac_try="$ac_link" 3800case "(($ac_try" in 3801 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3802 *) ac_try_echo=$ac_try;; 3803esac 3804eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3805printf "%s\n" "$ac_try_echo"; } >&5 3806 (eval "$ac_link") 2>&5 3807 ac_status=$? 3808 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3809 test $ac_status = 0; } 3810then : 3811 # If both `conftest.exe' and `conftest' are `present' (well, observable) 3812# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will 3813# work properly (i.e., refer to `conftest.exe'), while it won't with 3814# `rm'. 3815for ac_file in conftest.exe conftest conftest.*; do 3816 test -f "$ac_file" || continue 3817 case $ac_file in 3818 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 3819 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 3820 break;; 3821 * ) break;; 3822 esac 3823done 3824else $as_nop 3825 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3826printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 3827as_fn_error $? "cannot compute suffix of executables: cannot compile and link 3828See \`config.log' for more details" "$LINENO" 5; } 3829fi 3830rm -f conftest conftest$ac_cv_exeext 3831{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 3832printf "%s\n" "$ac_cv_exeext" >&6; } 3833 3834rm -f conftest.$ac_ext 3835EXEEXT=$ac_cv_exeext 3836ac_exeext=$EXEEXT 3837cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3838/* end confdefs.h. */ 3839#include <stdio.h> 3840int 3841main (void) 3842{ 3843FILE *f = fopen ("conftest.out", "w"); 3844 return ferror (f) || fclose (f) != 0; 3845 3846 ; 3847 return 0; 3848} 3849_ACEOF 3850ac_clean_files="$ac_clean_files conftest.out" 3851# Check that the compiler produces executables we can run. If not, either 3852# the compiler is broken, or we cross compile. 3853{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 3854printf %s "checking whether we are cross compiling... " >&6; } 3855if test "$cross_compiling" != yes; then 3856 { { ac_try="$ac_link" 3857case "(($ac_try" in 3858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3859 *) ac_try_echo=$ac_try;; 3860esac 3861eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3862printf "%s\n" "$ac_try_echo"; } >&5 3863 (eval "$ac_link") 2>&5 3864 ac_status=$? 3865 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3866 test $ac_status = 0; } 3867 if { ac_try='./conftest$ac_cv_exeext' 3868 { { case "(($ac_try" in 3869 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3870 *) ac_try_echo=$ac_try;; 3871esac 3872eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3873printf "%s\n" "$ac_try_echo"; } >&5 3874 (eval "$ac_try") 2>&5 3875 ac_status=$? 3876 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3877 test $ac_status = 0; }; }; then 3878 cross_compiling=no 3879 else 3880 if test "$cross_compiling" = maybe; then 3881 cross_compiling=yes 3882 else 3883 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3884printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 3885as_fn_error 77 "cannot run C compiled programs. 3886If you meant to cross compile, use \`--host'. 3887See \`config.log' for more details" "$LINENO" 5; } 3888 fi 3889 fi 3890fi 3891{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 3892printf "%s\n" "$cross_compiling" >&6; } 3893 3894rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out 3895ac_clean_files=$ac_clean_files_save 3896{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 3897printf %s "checking for suffix of object files... " >&6; } 3898if test ${ac_cv_objext+y} 3899then : 3900 printf %s "(cached) " >&6 3901else $as_nop 3902 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3903/* end confdefs.h. */ 3904 3905int 3906main (void) 3907{ 3908 3909 ; 3910 return 0; 3911} 3912_ACEOF 3913rm -f conftest.o conftest.obj 3914if { { ac_try="$ac_compile" 3915case "(($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_compile") 2>&5 3922 ac_status=$? 3923 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3924 test $ac_status = 0; } 3925then : 3926 for ac_file in conftest.o conftest.obj conftest.*; do 3927 test -f "$ac_file" || continue; 3928 case $ac_file in 3929 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; 3930 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 3931 break;; 3932 esac 3933done 3934else $as_nop 3935 printf "%s\n" "$as_me: failed program was:" >&5 3936sed 's/^/| /' conftest.$ac_ext >&5 3937 3938{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3939printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 3940as_fn_error $? "cannot compute suffix of object files: cannot compile 3941See \`config.log' for more details" "$LINENO" 5; } 3942fi 3943rm -f conftest.$ac_cv_objext conftest.$ac_ext 3944fi 3945{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 3946printf "%s\n" "$ac_cv_objext" >&6; } 3947OBJEXT=$ac_cv_objext 3948ac_objext=$OBJEXT 3949{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 3950printf %s "checking whether the compiler supports GNU C... " >&6; } 3951if test ${ac_cv_c_compiler_gnu+y} 3952then : 3953 printf %s "(cached) " >&6 3954else $as_nop 3955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3956/* end confdefs.h. */ 3957 3958int 3959main (void) 3960{ 3961#ifndef __GNUC__ 3962 choke me 3963#endif 3964 3965 ; 3966 return 0; 3967} 3968_ACEOF 3969if ac_fn_c_try_compile "$LINENO" 3970then : 3971 ac_compiler_gnu=yes 3972else $as_nop 3973 ac_compiler_gnu=no 3974fi 3975rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 3976ac_cv_c_compiler_gnu=$ac_compiler_gnu 3977 3978fi 3979{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 3980printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } 3981ac_compiler_gnu=$ac_cv_c_compiler_gnu 3982 3983if test $ac_compiler_gnu = yes; then 3984 GCC=yes 3985else 3986 GCC= 3987fi 3988ac_test_CFLAGS=${CFLAGS+y} 3989ac_save_CFLAGS=$CFLAGS 3990{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 3991printf %s "checking whether $CC accepts -g... " >&6; } 3992if test ${ac_cv_prog_cc_g+y} 3993then : 3994 printf %s "(cached) " >&6 3995else $as_nop 3996 ac_save_c_werror_flag=$ac_c_werror_flag 3997 ac_c_werror_flag=yes 3998 ac_cv_prog_cc_g=no 3999 CFLAGS="-g" 4000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4001/* end confdefs.h. */ 4002 4003int 4004main (void) 4005{ 4006 4007 ; 4008 return 0; 4009} 4010_ACEOF 4011if ac_fn_c_try_compile "$LINENO" 4012then : 4013 ac_cv_prog_cc_g=yes 4014else $as_nop 4015 CFLAGS="" 4016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4017/* end confdefs.h. */ 4018 4019int 4020main (void) 4021{ 4022 4023 ; 4024 return 0; 4025} 4026_ACEOF 4027if ac_fn_c_try_compile "$LINENO" 4028then : 4029 4030else $as_nop 4031 ac_c_werror_flag=$ac_save_c_werror_flag 4032 CFLAGS="-g" 4033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4034/* end confdefs.h. */ 4035 4036int 4037main (void) 4038{ 4039 4040 ; 4041 return 0; 4042} 4043_ACEOF 4044if ac_fn_c_try_compile "$LINENO" 4045then : 4046 ac_cv_prog_cc_g=yes 4047fi 4048rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4049fi 4050rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4051fi 4052rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4053 ac_c_werror_flag=$ac_save_c_werror_flag 4054fi 4055{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 4056printf "%s\n" "$ac_cv_prog_cc_g" >&6; } 4057if test $ac_test_CFLAGS; then 4058 CFLAGS=$ac_save_CFLAGS 4059elif test $ac_cv_prog_cc_g = yes; then 4060 if test "$GCC" = yes; then 4061 CFLAGS="-g -O2" 4062 else 4063 CFLAGS="-g" 4064 fi 4065else 4066 if test "$GCC" = yes; then 4067 CFLAGS="-O2" 4068 else 4069 CFLAGS= 4070 fi 4071fi 4072ac_prog_cc_stdc=no 4073if test x$ac_prog_cc_stdc = xno 4074then : 4075 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 4076printf %s "checking for $CC option to enable C11 features... " >&6; } 4077if test ${ac_cv_prog_cc_c11+y} 4078then : 4079 printf %s "(cached) " >&6 4080else $as_nop 4081 ac_cv_prog_cc_c11=no 4082ac_save_CC=$CC 4083cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4084/* end confdefs.h. */ 4085$ac_c_conftest_c11_program 4086_ACEOF 4087for ac_arg in '' -std=gnu11 4088do 4089 CC="$ac_save_CC $ac_arg" 4090 if ac_fn_c_try_compile "$LINENO" 4091then : 4092 ac_cv_prog_cc_c11=$ac_arg 4093fi 4094rm -f core conftest.err conftest.$ac_objext conftest.beam 4095 test "x$ac_cv_prog_cc_c11" != "xno" && break 4096done 4097rm -f conftest.$ac_ext 4098CC=$ac_save_CC 4099fi 4100 4101if test "x$ac_cv_prog_cc_c11" = xno 4102then : 4103 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 4104printf "%s\n" "unsupported" >&6; } 4105else $as_nop 4106 if test "x$ac_cv_prog_cc_c11" = x 4107then : 4108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 4109printf "%s\n" "none needed" >&6; } 4110else $as_nop 4111 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 4112printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } 4113 CC="$CC $ac_cv_prog_cc_c11" 4114fi 4115 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 4116 ac_prog_cc_stdc=c11 4117fi 4118fi 4119if test x$ac_prog_cc_stdc = xno 4120then : 4121 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 4122printf %s "checking for $CC option to enable C99 features... " >&6; } 4123if test ${ac_cv_prog_cc_c99+y} 4124then : 4125 printf %s "(cached) " >&6 4126else $as_nop 4127 ac_cv_prog_cc_c99=no 4128ac_save_CC=$CC 4129cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4130/* end confdefs.h. */ 4131$ac_c_conftest_c99_program 4132_ACEOF 4133for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= 4134do 4135 CC="$ac_save_CC $ac_arg" 4136 if ac_fn_c_try_compile "$LINENO" 4137then : 4138 ac_cv_prog_cc_c99=$ac_arg 4139fi 4140rm -f core conftest.err conftest.$ac_objext conftest.beam 4141 test "x$ac_cv_prog_cc_c99" != "xno" && break 4142done 4143rm -f conftest.$ac_ext 4144CC=$ac_save_CC 4145fi 4146 4147if test "x$ac_cv_prog_cc_c99" = xno 4148then : 4149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 4150printf "%s\n" "unsupported" >&6; } 4151else $as_nop 4152 if test "x$ac_cv_prog_cc_c99" = x 4153then : 4154 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 4155printf "%s\n" "none needed" >&6; } 4156else $as_nop 4157 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 4158printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } 4159 CC="$CC $ac_cv_prog_cc_c99" 4160fi 4161 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 4162 ac_prog_cc_stdc=c99 4163fi 4164fi 4165if test x$ac_prog_cc_stdc = xno 4166then : 4167 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 4168printf %s "checking for $CC option to enable C89 features... " >&6; } 4169if test ${ac_cv_prog_cc_c89+y} 4170then : 4171 printf %s "(cached) " >&6 4172else $as_nop 4173 ac_cv_prog_cc_c89=no 4174ac_save_CC=$CC 4175cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4176/* end confdefs.h. */ 4177$ac_c_conftest_c89_program 4178_ACEOF 4179for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 4180do 4181 CC="$ac_save_CC $ac_arg" 4182 if ac_fn_c_try_compile "$LINENO" 4183then : 4184 ac_cv_prog_cc_c89=$ac_arg 4185fi 4186rm -f core conftest.err conftest.$ac_objext conftest.beam 4187 test "x$ac_cv_prog_cc_c89" != "xno" && break 4188done 4189rm -f conftest.$ac_ext 4190CC=$ac_save_CC 4191fi 4192 4193if test "x$ac_cv_prog_cc_c89" = xno 4194then : 4195 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 4196printf "%s\n" "unsupported" >&6; } 4197else $as_nop 4198 if test "x$ac_cv_prog_cc_c89" = x 4199then : 4200 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 4201printf "%s\n" "none needed" >&6; } 4202else $as_nop 4203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 4204printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } 4205 CC="$CC $ac_cv_prog_cc_c89" 4206fi 4207 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 4208 ac_prog_cc_stdc=c89 4209fi 4210fi 4211 4212ac_ext=c 4213ac_cpp='$CPP $CPPFLAGS' 4214ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 4215ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 4216ac_compiler_gnu=$ac_cv_c_compiler_gnu 4217 4218 4219if test "$ac_cv_prog_cc_c99" = "no"; then 4220 as_fn_error $? "The C compiler does not support C99" "$LINENO" 5 4221fi 4222 4223# 4224# Get the size of a void *, to determine whether this is a 32-bit 4225# or 64-bit build. 4226# 4227 4228ac_header= ac_cache= 4229for ac_item in $ac_header_c_list 4230do 4231 if test $ac_cache; then 4232 ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" 4233 if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then 4234 printf "%s\n" "#define $ac_item 1" >> confdefs.h 4235 fi 4236 ac_header= ac_cache= 4237 elif test $ac_header; then 4238 ac_cache=$ac_item 4239 else 4240 ac_header=$ac_item 4241 fi 4242done 4243 4244 4245 4246 4247 4248 4249 4250 4251if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes 4252then : 4253 4254printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h 4255 4256fi 4257# The cast to long int works around a bug in the HP C Compiler 4258# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 4259# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 4260# This bug is HP SR number 8606223364. 4261{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 4262printf %s "checking size of void *... " >&6; } 4263if test ${ac_cv_sizeof_void_p+y} 4264then : 4265 printf %s "(cached) " >&6 4266else $as_nop 4267 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" 4268then : 4269 4270else $as_nop 4271 if test "$ac_cv_type_void_p" = yes; then 4272 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4273printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 4274as_fn_error 77 "cannot compute sizeof (void *) 4275See \`config.log' for more details" "$LINENO" 5; } 4276 else 4277 ac_cv_sizeof_void_p=0 4278 fi 4279fi 4280 4281fi 4282{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 4283printf "%s\n" "$ac_cv_sizeof_void_p" >&6; } 4284 4285 4286 4287printf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h 4288 4289 4290ac_lbl_c_sizeof_void_p="$ac_cv_sizeof_void_p" 4291 4292# 4293# Get the size of a time_t, to know whether it's 32-bit or 64-bit. 4294# 4295# The cast to long int works around a bug in the HP C Compiler 4296# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 4297# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 4298# This bug is HP SR number 8606223364. 4299{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 4300printf %s "checking size of time_t... " >&6; } 4301if test ${ac_cv_sizeof_time_t+y} 4302then : 4303 printf %s "(cached) " >&6 4304else $as_nop 4305 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "#include <time.h> 4306" 4307then : 4308 4309else $as_nop 4310 if test "$ac_cv_type_time_t" = yes; then 4311 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4312printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 4313as_fn_error 77 "cannot compute sizeof (time_t) 4314See \`config.log' for more details" "$LINENO" 5; } 4315 else 4316 ac_cv_sizeof_time_t=0 4317 fi 4318fi 4319 4320fi 4321{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 4322printf "%s\n" "$ac_cv_sizeof_time_t" >&6; } 4323 4324 4325 4326printf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h 4327 4328 4329 4330 4331 4332 4333 4334 if test "$GCC" = yes ; then 4335 # 4336 # -Werror forces warnings to be errors. 4337 # 4338 ac_lbl_cc_force_warning_errors=-Werror 4339 4340 # 4341 # Try to have the compiler default to hiding symbols, 4342 # so that only symbols explicitly exported with 4343 # PCAP_API will be visible outside (shared) libraries. 4344 # 4345 4346 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5 4347printf %s "checking whether the compiler supports the -fvisibility=hidden option... " >&6; } 4348 save_CFLAGS="$CFLAGS" 4349 CFLAGS="$CFLAGS -fvisibility=hidden" 4350 # 4351 # XXX - yes, this depends on the way AC_LANG_WERROR works, 4352 # but no mechanism is provided to turn AC_LANG_WERROR on 4353 # *and then turn it back off*, so that we *only* do it when 4354 # testing compiler options - 15 years after somebody asked 4355 # for it: 4356 # 4357 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 4358 # 4359 save_ac_c_werror_flag="$ac_c_werror_flag" 4360 ac_c_werror_flag=yes 4361 # 4362 # We use AC_LANG_SOURCE() so that we can control the complete 4363 # content of the program being compiled. We do not, for example, 4364 # want the default "int main()" that AC_LANG_PROGRAM() generates, 4365 # as it will generate a warning with -Wold-style-definition, meaning 4366 # that we would treat it as not working, as the test will fail if 4367 # *any* error output, including a warning due to the flag we're 4368 # testing, is generated; see 4369 # 4370 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 4371 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 4372 # 4373 # This may, as per those two messages, be fixed in autoconf 2.70, 4374 # but we only require 2.69 or newer for now. 4375 # 4376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4377/* end confdefs.h. */ 4378int main(void) { return 0; } 4379_ACEOF 4380if ac_fn_c_try_compile "$LINENO" 4381then : 4382 4383 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4384printf "%s\n" "yes" >&6; } 4385 can_add_to_cflags=yes 4386 # 4387 # The compile supports this; do we have some C code for 4388 # which the warning should *not* appear? 4389 # We test the fourth argument because the third argument 4390 # could contain quotes, breaking the test. 4391 # 4392 if test "x" != "x" 4393 then 4394 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 4395 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5 4396printf %s "checking whether -fvisibility=hidden ... " >&6; } 4397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4398/* end confdefs.h. */ 4399 4400_ACEOF 4401if ac_fn_c_try_compile "$LINENO" 4402then : 4403 4404 # 4405 # Not a problem. 4406 # 4407 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4408printf "%s\n" "no" >&6; } 4409 4410else $as_nop 4411 4412 # 4413 # A problem. 4414 # 4415 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4416printf "%s\n" "yes" >&6; } 4417 can_add_to_cflags=no 4418 4419fi 4420rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4421 fi 4422 CFLAGS="$save_CFLAGS" 4423 if test x"$can_add_to_cflags" = "xyes" 4424 then 4425 V_CCOPT="$V_CCOPT -fvisibility=hidden" 4426 fi 4427 4428else $as_nop 4429 4430 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4431printf "%s\n" "no" >&6; } 4432 CFLAGS="$save_CFLAGS" 4433 4434fi 4435rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4436 ac_c_werror_flag="$save_ac_c_werror_flag" 4437 4438 else 4439 V_INCLS="$V_INCLS -I/usr/local/include" 4440 LDFLAGS="$LDFLAGS -L/usr/local/lib" 4441 4442 case "$host_os" in 4443 4444 darwin*) 4445 # 4446 # This is assumed either to be GCC or clang, both 4447 # of which use -Werror to force warnings to be errors. 4448 # 4449 ac_lbl_cc_force_warning_errors=-Werror 4450 4451 # 4452 # Try to have the compiler default to hiding symbols, 4453 # so that only symbols explicitly exported with 4454 # PCAP_API will be visible outside (shared) libraries. 4455 # 4456 4457 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -fvisibility=hidden option" >&5 4458printf %s "checking whether the compiler supports the -fvisibility=hidden option... " >&6; } 4459 save_CFLAGS="$CFLAGS" 4460 CFLAGS="$CFLAGS -fvisibility=hidden" 4461 # 4462 # XXX - yes, this depends on the way AC_LANG_WERROR works, 4463 # but no mechanism is provided to turn AC_LANG_WERROR on 4464 # *and then turn it back off*, so that we *only* do it when 4465 # testing compiler options - 15 years after somebody asked 4466 # for it: 4467 # 4468 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 4469 # 4470 save_ac_c_werror_flag="$ac_c_werror_flag" 4471 ac_c_werror_flag=yes 4472 # 4473 # We use AC_LANG_SOURCE() so that we can control the complete 4474 # content of the program being compiled. We do not, for example, 4475 # want the default "int main()" that AC_LANG_PROGRAM() generates, 4476 # as it will generate a warning with -Wold-style-definition, meaning 4477 # that we would treat it as not working, as the test will fail if 4478 # *any* error output, including a warning due to the flag we're 4479 # testing, is generated; see 4480 # 4481 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 4482 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 4483 # 4484 # This may, as per those two messages, be fixed in autoconf 2.70, 4485 # but we only require 2.69 or newer for now. 4486 # 4487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4488/* end confdefs.h. */ 4489int main(void) { return 0; } 4490_ACEOF 4491if ac_fn_c_try_compile "$LINENO" 4492then : 4493 4494 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4495printf "%s\n" "yes" >&6; } 4496 can_add_to_cflags=yes 4497 # 4498 # The compile supports this; do we have some C code for 4499 # which the warning should *not* appear? 4500 # We test the fourth argument because the third argument 4501 # could contain quotes, breaking the test. 4502 # 4503 if test "x" != "x" 4504 then 4505 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 4506 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -fvisibility=hidden " >&5 4507printf %s "checking whether -fvisibility=hidden ... " >&6; } 4508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4509/* end confdefs.h. */ 4510 4511_ACEOF 4512if ac_fn_c_try_compile "$LINENO" 4513then : 4514 4515 # 4516 # Not a problem. 4517 # 4518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4519printf "%s\n" "no" >&6; } 4520 4521else $as_nop 4522 4523 # 4524 # A problem. 4525 # 4526 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4527printf "%s\n" "yes" >&6; } 4528 can_add_to_cflags=no 4529 4530fi 4531rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4532 fi 4533 CFLAGS="$save_CFLAGS" 4534 if test x"$can_add_to_cflags" = "xyes" 4535 then 4536 V_CCOPT="$V_CCOPT -fvisibility=hidden" 4537 fi 4538 4539else $as_nop 4540 4541 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4542printf "%s\n" "no" >&6; } 4543 CFLAGS="$save_CFLAGS" 4544 4545fi 4546rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4547 ac_c_werror_flag="$save_ac_c_werror_flag" 4548 4549 ;; 4550 4551 hpux*) 4552 # 4553 # HP C, which is what we presume we're using, doesn't 4554 # exit with a non-zero exit status if we hand it an 4555 # invalid -W flag, can't be forced to do so even with 4556 # +We, and doesn't handle GCC-style -W flags, so we 4557 # don't want to try using GCC-style -W flags. 4558 # 4559 ac_lbl_cc_dont_try_gcc_dashW=yes 4560 ;; 4561 4562 irix*) 4563 # 4564 # MIPS C, which is what we presume we're using, doesn't 4565 # necessarily exit with a non-zero exit status if we 4566 # hand it an invalid -W flag, can't be forced to do 4567 # so, and doesn't handle GCC-style -W flags, so we 4568 # don't want to try using GCC-style -W flags. 4569 # 4570 ac_lbl_cc_dont_try_gcc_dashW=yes 4571 # 4572 # It also, apparently, defaults to "char" being 4573 # unsigned, unlike most other C implementations; 4574 # I suppose we could say "signed char" whenever 4575 # we want to guarantee a signed "char", but let's 4576 # just force signed chars. 4577 # 4578 # -xansi is normally the default, but the 4579 # configure script was setting it; perhaps -cckr 4580 # was the default in the Old Days. (Then again, 4581 # that would probably be for backwards compatibility 4582 # in the days when ANSI C was Shiny and New, i.e. 4583 # 1989 and the early '90's, so maybe we can just 4584 # drop support for those compilers.) 4585 # 4586 # -g is equivalent to -g2, which turns off 4587 # optimization; we choose -g3, which generates 4588 # debugging information but doesn't turn off 4589 # optimization (even if the optimization would 4590 # cause inaccuracies in debugging). 4591 # 4592 V_CCOPT="$V_CCOPT -xansi -signed -g3" 4593 ;; 4594 4595 osf*) 4596 # 4597 # Presumed to be DEC OSF/1, Digital UNIX, or 4598 # Tru64 UNIX. 4599 # 4600 # The DEC C compiler, which is what we presume we're 4601 # using, doesn't exit with a non-zero exit status if we 4602 # hand it an invalid -W flag, can't be forced to do 4603 # so, and doesn't handle GCC-style -W flags, so we 4604 # don't want to try using GCC-style -W flags. 4605 # 4606 ac_lbl_cc_dont_try_gcc_dashW=yes 4607 # 4608 # -g is equivalent to -g2, which turns off 4609 # optimization; we choose -g3, which generates 4610 # debugging information but doesn't turn off 4611 # optimization (even if the optimization would 4612 # cause inaccuracies in debugging). 4613 # 4614 V_CCOPT="$V_CCOPT -g3" 4615 ;; 4616 4617 solaris*) 4618 # 4619 # Assumed to be Sun C, which requires -errwarn to force 4620 # warnings to be treated as errors. 4621 # 4622 ac_lbl_cc_force_warning_errors=-errwarn 4623 4624 # 4625 # Try to have the compiler default to hiding symbols, 4626 # so that only symbols explicitly exported with 4627 # PCAP_API will be visible outside (shared) libraries. 4628 # 4629 4630 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -xldscope=hidden option" >&5 4631printf %s "checking whether the compiler supports the -xldscope=hidden option... " >&6; } 4632 save_CFLAGS="$CFLAGS" 4633 CFLAGS="$CFLAGS -xldscope=hidden" 4634 # 4635 # XXX - yes, this depends on the way AC_LANG_WERROR works, 4636 # but no mechanism is provided to turn AC_LANG_WERROR on 4637 # *and then turn it back off*, so that we *only* do it when 4638 # testing compiler options - 15 years after somebody asked 4639 # for it: 4640 # 4641 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 4642 # 4643 save_ac_c_werror_flag="$ac_c_werror_flag" 4644 ac_c_werror_flag=yes 4645 # 4646 # We use AC_LANG_SOURCE() so that we can control the complete 4647 # content of the program being compiled. We do not, for example, 4648 # want the default "int main()" that AC_LANG_PROGRAM() generates, 4649 # as it will generate a warning with -Wold-style-definition, meaning 4650 # that we would treat it as not working, as the test will fail if 4651 # *any* error output, including a warning due to the flag we're 4652 # testing, is generated; see 4653 # 4654 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 4655 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 4656 # 4657 # This may, as per those two messages, be fixed in autoconf 2.70, 4658 # but we only require 2.69 or newer for now. 4659 # 4660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4661/* end confdefs.h. */ 4662int main(void) { return 0; } 4663_ACEOF 4664if ac_fn_c_try_compile "$LINENO" 4665then : 4666 4667 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4668printf "%s\n" "yes" >&6; } 4669 can_add_to_cflags=yes 4670 # 4671 # The compile supports this; do we have some C code for 4672 # which the warning should *not* appear? 4673 # We test the fourth argument because the third argument 4674 # could contain quotes, breaking the test. 4675 # 4676 if test "x" != "x" 4677 then 4678 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 4679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -xldscope=hidden " >&5 4680printf %s "checking whether -xldscope=hidden ... " >&6; } 4681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4682/* end confdefs.h. */ 4683 4684_ACEOF 4685if ac_fn_c_try_compile "$LINENO" 4686then : 4687 4688 # 4689 # Not a problem. 4690 # 4691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4692printf "%s\n" "no" >&6; } 4693 4694else $as_nop 4695 4696 # 4697 # A problem. 4698 # 4699 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4700printf "%s\n" "yes" >&6; } 4701 can_add_to_cflags=no 4702 4703fi 4704rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4705 fi 4706 CFLAGS="$save_CFLAGS" 4707 if test x"$can_add_to_cflags" = "xyes" 4708 then 4709 V_CCOPT="$V_CCOPT -xldscope=hidden" 4710 fi 4711 4712else $as_nop 4713 4714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4715printf "%s\n" "no" >&6; } 4716 CFLAGS="$save_CFLAGS" 4717 4718fi 4719rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4720 ac_c_werror_flag="$save_ac_c_werror_flag" 4721 4722 ;; 4723 4724 ultrix*) 4725 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5 4726printf %s "checking that Ultrix $CC hacks const in prototypes... " >&6; } 4727 if test ${ac_cv_lbl_cc_const_proto+y} 4728then : 4729 printf %s "(cached) " >&6 4730else $as_nop 4731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4732/* end confdefs.h. */ 4733#include <sys/types.h> 4734int 4735main (void) 4736{ 4737struct a { int b; }; 4738 void c(const struct a *) 4739 ; 4740 return 0; 4741} 4742_ACEOF 4743if ac_fn_c_try_compile "$LINENO" 4744then : 4745 ac_cv_lbl_cc_const_proto=yes 4746else $as_nop 4747 ac_cv_lbl_cc_const_proto=no 4748fi 4749rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4750fi 4751 4752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5 4753printf "%s\n" "$ac_cv_lbl_cc_const_proto" >&6; } 4754 if test $ac_cv_lbl_cc_const_proto = no ; then 4755 4756printf "%s\n" "#define const /**/" >>confdefs.h 4757 4758 fi 4759 ;; 4760 esac 4761 V_CCOPT="$V_CCOPT -O" 4762 fi 4763 4764 4765 if test "$GCC" = yes ; then 4766 # 4767 # On platforms where we build a shared library: 4768 # 4769 # add options to generate position-independent code, 4770 # if necessary (it's the default in AIX and Darwin/macOS); 4771 # 4772 # define option to set the soname of the shared library, 4773 # if the OS supports that; 4774 # 4775 # add options to specify, at link time, a directory to 4776 # add to the run-time search path, if that's necessary. 4777 # 4778 V_SHLIB_CMD="\$(CC)" 4779 V_SHLIB_OPT="-shared" 4780 case "$host_os" in 4781 4782 aix*) 4783 ;; 4784 4785 freebsd*|netbsd*|openbsd*|dragonfly*|linux*|osf*|haiku*|midipix*) 4786 # 4787 # Platforms where the C compiler is GCC or accepts 4788 # compatible command-line arguments, and the linker 4789 # is the GNU linker or accepts compatible command-line 4790 # arguments. 4791 # 4792 # Some instruction sets require -fPIC on some 4793 # operating systems. Check for them. If you 4794 # have a combination that requires it, add it 4795 # here. 4796 # 4797 PIC_OPT=-fpic 4798 case "$host_cpu" in 4799 4800 sparc64*) 4801 case "$host_os" in 4802 4803 freebsd*|openbsd*|linux*) 4804 PIC_OPT=-fPIC 4805 ;; 4806 esac 4807 ;; 4808 esac 4809 V_SHLIB_CCOPT="$V_SHLIB_CCOPT $PIC_OPT" 4810 V_SONAME_OPT="-Wl,-soname," 4811 ;; 4812 4813 hpux*) 4814 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic" 4815 # 4816 # XXX - this assumes GCC is using the HP linker, 4817 # rather than the GNU linker, and that the "+h" 4818 # option is used on all HP-UX platforms, both .sl 4819 # and .so. 4820 # 4821 V_SONAME_OPT="-Wl,+h," 4822 # 4823 # By default, directories specified with -L 4824 # are added to the run-time search path, so 4825 # we don't add them in pcap-config. 4826 # 4827 ;; 4828 4829 solaris*) 4830 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic" 4831 # 4832 # Sun/Oracle's C compiler, GCC, and GCC-compatible 4833 # compilers support -Wl,{comma-separated list of options}, 4834 # and we use the C compiler, not ld, for all linking, 4835 # including linking to produce a shared library. 4836 # 4837 V_SONAME_OPT="-Wl,-h," 4838 ;; 4839 esac 4840 else 4841 # 4842 # Set the appropriate compiler flags and, on platforms 4843 # where we build a shared library: 4844 # 4845 # add options to generate position-independent code, 4846 # if necessary (it's the default in Darwin/macOS); 4847 # 4848 # if we generate ".so" shared libraries, define the 4849 # appropriate options for building the shared library; 4850 # 4851 # add options to specify, at link time, a directory to 4852 # add to the run-time search path, if that's necessary. 4853 # 4854 # Note: spaces after V_SONAME_OPT are significant; on 4855 # some platforms the soname is passed with a GCC-like 4856 # "-Wl,-soname,{soname}" option, with the soname part 4857 # of the option, while on other platforms the C compiler 4858 # driver takes it as a regular option with the soname 4859 # following the option. 4860 # 4861 case "$host_os" in 4862 4863 aix*) 4864 V_SHLIB_CMD="\$(CC)" 4865 V_SHLIB_OPT="-G -bnoentry -bexpall" 4866 ;; 4867 4868 freebsd*|netbsd*|openbsd*|dragonfly*|linux*) 4869 # 4870 # Platforms where the C compiler is GCC or accepts 4871 # compatible command-line arguments, and the linker 4872 # is the GNU linker or accepts compatible command-line 4873 # arguments. 4874 # 4875 # XXX - does 64-bit SPARC require -fPIC? 4876 # 4877 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -fpic" 4878 V_SHLIB_CMD="\$(CC)" 4879 V_SHLIB_OPT="-shared" 4880 V_SONAME_OPT="-Wl,-soname," 4881 ;; 4882 4883 hpux*) 4884 V_SHLIB_CCOPT="$V_SHLIB_CCOPT +z" 4885 V_SHLIB_CMD="\$(LD)" 4886 V_SHLIB_OPT="-b" 4887 V_SONAME_OPT="+h " 4888 # 4889 # By default, directories specified with -L 4890 # are added to the run-time search path, so 4891 # we don't add them in pcap-config. 4892 # 4893 ;; 4894 4895 osf*) 4896 # 4897 # Presumed to be DEC OSF/1, Digital UNIX, or 4898 # Tru64 UNIX. 4899 # 4900 V_SHLIB_CMD="\$(CC)" 4901 V_SHLIB_OPT="-shared" 4902 V_SONAME_OPT="-soname " 4903 ;; 4904 4905 solaris*) 4906 V_SHLIB_CCOPT="$V_SHLIB_CCOPT -Kpic" 4907 V_SHLIB_CMD="\$(CC)" 4908 V_SHLIB_OPT="-G" 4909 # 4910 # Sun/Oracle's C compiler, GCC, and GCC-compatible 4911 # compilers support -Wl,{comma-separated list of options}, 4912 # and we use the C compiler, not ld, for all linking, 4913 # including linking to produce a shared library. 4914 # 4915 V_SONAME_OPT="-Wl,-h," 4916 ;; 4917 esac 4918 fi 4919 4920{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 4921printf %s "checking for inline... " >&6; } 4922 save_CFLAGS="$CFLAGS" 4923 CFLAGS="$V_CCOPT" 4924 if test ${ac_cv_lbl_inline+y} 4925then : 4926 printf %s "(cached) " >&6 4927else $as_nop 4928 4929 ac_cv_lbl_inline="" 4930 ac_lbl_cc_inline=no 4931 for ac_lbl_inline in inline __inline__ __inline 4932 do 4933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4934/* end confdefs.h. */ 4935#define inline $ac_lbl_inline 4936 static inline struct iltest *foo(void); 4937 struct iltest { 4938 int iltest1; 4939 int iltest2; 4940 }; 4941 4942 static inline struct iltest * 4943 foo() 4944 { 4945 static struct iltest xxx; 4946 4947 return &xxx; 4948 } 4949int 4950main (void) 4951{ 4952 4953 ; 4954 return 0; 4955} 4956_ACEOF 4957if ac_fn_c_try_compile "$LINENO" 4958then : 4959 ac_lbl_cc_inline=yes 4960fi 4961rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 4962 if test "$ac_lbl_cc_inline" = yes ; then 4963 break; 4964 fi 4965 done 4966 if test "$ac_lbl_cc_inline" = yes ; then 4967 ac_cv_lbl_inline=$ac_lbl_inline 4968 fi 4969fi 4970 4971 CFLAGS="$save_CFLAGS" 4972 if test ! -z "$ac_cv_lbl_inline" ; then 4973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5 4974printf "%s\n" "$ac_cv_lbl_inline" >&6; } 4975 else 4976 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4977printf "%s\n" "no" >&6; } 4978 fi 4979 4980printf "%s\n" "#define inline $ac_cv_lbl_inline" >>confdefs.h 4981 4982 4983 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __atomic_load_n" >&5 4984printf %s "checking for __atomic_load_n... " >&6; } 4985 if test ${ac_cv_have___atomic_load_n+y} 4986then : 4987 printf %s "(cached) " >&6 4988else $as_nop 4989 4990# ac_fn_c_try_link LINENO 4991# ----------------------- 4992# Try to link conftest.$ac_ext, and return whether this succeeded. 4993ac_fn_c_try_link () 4994{ 4995 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 4996 rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext 4997 if { { ac_try="$ac_link" 4998case "(($ac_try" in 4999 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5000 *) ac_try_echo=$ac_try;; 5001esac 5002eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 5003printf "%s\n" "$ac_try_echo"; } >&5 5004 (eval "$ac_link") 2>conftest.err 5005 ac_status=$? 5006 if test -s conftest.err; then 5007 grep -v '^ *+' conftest.err >conftest.er1 5008 cat conftest.er1 >&5 5009 mv -f conftest.er1 conftest.err 5010 fi 5011 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 5012 test $ac_status = 0; } && { 5013 test -z "$ac_c_werror_flag" || 5014 test ! -s conftest.err 5015 } && test -s conftest$ac_exeext && { 5016 test "$cross_compiling" = yes || 5017 test -x conftest$ac_exeext 5018 } 5019then : 5020 ac_retval=0 5021else $as_nop 5022 printf "%s\n" "$as_me: failed program was:" >&5 5023sed 's/^/| /' conftest.$ac_ext >&5 5024 5025 ac_retval=1 5026fi 5027 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information 5028 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would 5029 # interfere with the next link command; also delete a directory that is 5030 # left behind by Apple's compiler. We do this before executing the actions. 5031 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 5032 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 5033 as_fn_set_status $ac_retval 5034 5035} # ac_fn_c_try_link 5036cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5037/* end confdefs.h. */ 5038 5039int 5040main (void) 5041{ 5042 5043 int i = 17; 5044 int j; 5045 j = __atomic_load_n(&i, __ATOMIC_RELAXED); 5046 5047 ; 5048 return 0; 5049} 5050_ACEOF 5051if ac_fn_c_try_link "$LINENO" 5052then : 5053 ac_have___atomic_load_n=yes 5054else $as_nop 5055 ac_have___atomic_load_n=no 5056fi 5057rm -f core conftest.err conftest.$ac_objext conftest.beam \ 5058 conftest$ac_exeext conftest.$ac_ext 5059fi 5060 5061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_have___atomic_load_n" >&5 5062printf "%s\n" "$ac_have___atomic_load_n" >&6; } 5063 if test $ac_have___atomic_load_n = yes ; then 5064 5065printf "%s\n" "#define HAVE___ATOMIC_LOAD_N 1" >>confdefs.h 5066 5067 fi 5068 5069 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for __atomic_store_n" >&5 5070printf %s "checking for __atomic_store_n... " >&6; } 5071 if test ${ac_cv_have___atomic_store_n+y} 5072then : 5073 printf %s "(cached) " >&6 5074else $as_nop 5075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5076/* end confdefs.h. */ 5077 5078int 5079main (void) 5080{ 5081 5082 int i; 5083 __atomic_store_n(&i, 17, __ATOMIC_RELAXED); 5084 5085 ; 5086 return 0; 5087} 5088_ACEOF 5089if ac_fn_c_try_link "$LINENO" 5090then : 5091 ac_have___atomic_store_n=yes 5092else $as_nop 5093 ac_have___atomic_store_n=no 5094fi 5095rm -f core conftest.err conftest.$ac_objext conftest.beam \ 5096 conftest$ac_exeext conftest.$ac_ext 5097fi 5098 5099 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_have___atomic_store_n" >&5 5100printf "%s\n" "$ac_have___atomic_store_n" >&6; } 5101 if test $ac_have___atomic_store_n = yes ; then 5102 5103printf "%s\n" "#define HAVE___ATOMIC_STORE_N 1" >>confdefs.h 5104 5105 fi 5106 5107# 5108# Try to arrange for large file support. 5109# 5110# Check whether --enable-largefile was given. 5111if test ${enable_largefile+y} 5112then : 5113 enableval=$enable_largefile; 5114fi 5115 5116if test "$enable_largefile" != no; then 5117 5118 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 5119printf %s "checking for special C compiler options needed for large files... " >&6; } 5120if test ${ac_cv_sys_largefile_CC+y} 5121then : 5122 printf %s "(cached) " >&6 5123else $as_nop 5124 ac_cv_sys_largefile_CC=no 5125 if test "$GCC" != yes; then 5126 ac_save_CC=$CC 5127 while :; do 5128 # IRIX 6.2 and later do not support large files by default, 5129 # so use the C compiler's -n32 option if that helps. 5130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5131/* end confdefs.h. */ 5132#include <sys/types.h> 5133 /* Check that off_t can represent 2**63 - 1 correctly. 5134 We can't simply define LARGE_OFF_T to be 9223372036854775807, 5135 since some C++ compilers masquerading as C compilers 5136 incorrectly reject 9223372036854775807. */ 5137#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) 5138 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 5139 && LARGE_OFF_T % 2147483647 == 1) 5140 ? 1 : -1]; 5141int 5142main (void) 5143{ 5144 5145 ; 5146 return 0; 5147} 5148_ACEOF 5149 if ac_fn_c_try_compile "$LINENO" 5150then : 5151 break 5152fi 5153rm -f core conftest.err conftest.$ac_objext conftest.beam 5154 CC="$CC -n32" 5155 if ac_fn_c_try_compile "$LINENO" 5156then : 5157 ac_cv_sys_largefile_CC=' -n32'; break 5158fi 5159rm -f core conftest.err conftest.$ac_objext conftest.beam 5160 break 5161 done 5162 CC=$ac_save_CC 5163 rm -f conftest.$ac_ext 5164 fi 5165fi 5166{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 5167printf "%s\n" "$ac_cv_sys_largefile_CC" >&6; } 5168 if test "$ac_cv_sys_largefile_CC" != no; then 5169 CC=$CC$ac_cv_sys_largefile_CC 5170 fi 5171 5172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 5173printf %s "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } 5174if test ${ac_cv_sys_file_offset_bits+y} 5175then : 5176 printf %s "(cached) " >&6 5177else $as_nop 5178 while :; do 5179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5180/* end confdefs.h. */ 5181#include <sys/types.h> 5182 /* Check that off_t can represent 2**63 - 1 correctly. 5183 We can't simply define LARGE_OFF_T to be 9223372036854775807, 5184 since some C++ compilers masquerading as C compilers 5185 incorrectly reject 9223372036854775807. */ 5186#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) 5187 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 5188 && LARGE_OFF_T % 2147483647 == 1) 5189 ? 1 : -1]; 5190int 5191main (void) 5192{ 5193 5194 ; 5195 return 0; 5196} 5197_ACEOF 5198if ac_fn_c_try_compile "$LINENO" 5199then : 5200 ac_cv_sys_file_offset_bits=no; break 5201fi 5202rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 5203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5204/* end confdefs.h. */ 5205#define _FILE_OFFSET_BITS 64 5206#include <sys/types.h> 5207 /* Check that off_t can represent 2**63 - 1 correctly. 5208 We can't simply define LARGE_OFF_T to be 9223372036854775807, 5209 since some C++ compilers masquerading as C compilers 5210 incorrectly reject 9223372036854775807. */ 5211#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) 5212 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 5213 && LARGE_OFF_T % 2147483647 == 1) 5214 ? 1 : -1]; 5215int 5216main (void) 5217{ 5218 5219 ; 5220 return 0; 5221} 5222_ACEOF 5223if ac_fn_c_try_compile "$LINENO" 5224then : 5225 ac_cv_sys_file_offset_bits=64; break 5226fi 5227rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 5228 ac_cv_sys_file_offset_bits=unknown 5229 break 5230done 5231fi 5232{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 5233printf "%s\n" "$ac_cv_sys_file_offset_bits" >&6; } 5234case $ac_cv_sys_file_offset_bits in #( 5235 no | unknown) ;; 5236 *) 5237printf "%s\n" "#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits" >>confdefs.h 5238;; 5239esac 5240rm -rf conftest* 5241 if test $ac_cv_sys_file_offset_bits = unknown; then 5242 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 5243printf %s "checking for _LARGE_FILES value needed for large files... " >&6; } 5244if test ${ac_cv_sys_large_files+y} 5245then : 5246 printf %s "(cached) " >&6 5247else $as_nop 5248 while :; do 5249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5250/* end confdefs.h. */ 5251#include <sys/types.h> 5252 /* Check that off_t can represent 2**63 - 1 correctly. 5253 We can't simply define LARGE_OFF_T to be 9223372036854775807, 5254 since some C++ compilers masquerading as C compilers 5255 incorrectly reject 9223372036854775807. */ 5256#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) 5257 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 5258 && LARGE_OFF_T % 2147483647 == 1) 5259 ? 1 : -1]; 5260int 5261main (void) 5262{ 5263 5264 ; 5265 return 0; 5266} 5267_ACEOF 5268if ac_fn_c_try_compile "$LINENO" 5269then : 5270 ac_cv_sys_large_files=no; break 5271fi 5272rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 5273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5274/* end confdefs.h. */ 5275#define _LARGE_FILES 1 5276#include <sys/types.h> 5277 /* Check that off_t can represent 2**63 - 1 correctly. 5278 We can't simply define LARGE_OFF_T to be 9223372036854775807, 5279 since some C++ compilers masquerading as C compilers 5280 incorrectly reject 9223372036854775807. */ 5281#define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31)) 5282 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 5283 && LARGE_OFF_T % 2147483647 == 1) 5284 ? 1 : -1]; 5285int 5286main (void) 5287{ 5288 5289 ; 5290 return 0; 5291} 5292_ACEOF 5293if ac_fn_c_try_compile "$LINENO" 5294then : 5295 ac_cv_sys_large_files=1; break 5296fi 5297rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 5298 ac_cv_sys_large_files=unknown 5299 break 5300done 5301fi 5302{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 5303printf "%s\n" "$ac_cv_sys_large_files" >&6; } 5304case $ac_cv_sys_large_files in #( 5305 no | unknown) ;; 5306 *) 5307printf "%s\n" "#define _LARGE_FILES $ac_cv_sys_large_files" >>confdefs.h 5308;; 5309esac 5310rm -rf conftest* 5311 fi 5312fi 5313 5314{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5 5315printf %s "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; } 5316if test ${ac_cv_sys_largefile_source+y} 5317then : 5318 printf %s "(cached) " >&6 5319else $as_nop 5320 while :; do 5321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5322/* end confdefs.h. */ 5323#include <sys/types.h> /* for off_t */ 5324 #include <stdio.h> 5325int 5326main (void) 5327{ 5328int (*fp) (FILE *, off_t, int) = fseeko; 5329 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); 5330 ; 5331 return 0; 5332} 5333_ACEOF 5334if ac_fn_c_try_link "$LINENO" 5335then : 5336 ac_cv_sys_largefile_source=no; break 5337fi 5338rm -f core conftest.err conftest.$ac_objext conftest.beam \ 5339 conftest$ac_exeext conftest.$ac_ext 5340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5341/* end confdefs.h. */ 5342#define _LARGEFILE_SOURCE 1 5343#include <sys/types.h> /* for off_t */ 5344 #include <stdio.h> 5345int 5346main (void) 5347{ 5348int (*fp) (FILE *, off_t, int) = fseeko; 5349 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); 5350 ; 5351 return 0; 5352} 5353_ACEOF 5354if ac_fn_c_try_link "$LINENO" 5355then : 5356 ac_cv_sys_largefile_source=1; break 5357fi 5358rm -f core conftest.err conftest.$ac_objext conftest.beam \ 5359 conftest$ac_exeext conftest.$ac_ext 5360 ac_cv_sys_largefile_source=unknown 5361 break 5362done 5363fi 5364{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5 5365printf "%s\n" "$ac_cv_sys_largefile_source" >&6; } 5366case $ac_cv_sys_largefile_source in #( 5367 no | unknown) ;; 5368 *) 5369printf "%s\n" "#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source" >>confdefs.h 5370;; 5371esac 5372rm -rf conftest* 5373 5374# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug 5375# in glibc 2.1.3, but that breaks too many other things. 5376# If you want fseeko and ftello with glibc, upgrade to a fixed glibc. 5377if test $ac_cv_sys_largefile_source != unknown; then 5378 5379printf "%s\n" "#define HAVE_FSEEKO 1" >>confdefs.h 5380 5381fi 5382 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 7236 7237 7238 # 7239 # Checks to see if Solaris has the public libdlpi(3LIB) library. 7240 # Note: The existence of /usr/include/libdlpi.h does not mean it is the 7241 # public libdlpi(3LIB) version. Before libdlpi was made public, a 7242 # private version also existed, which did not have the same APIs. 7243 # Due to a gcc bug, the default search path for 32-bit libraries does 7244 # not include /lib, we add it explicitly here. 7245 # [http://bugs.opensolaris.org/view_bug.do?bug_id=6619485]. 7246 # Also, due to the bug above applications that link to libpcap with 7247 # libdlpi will have to add "-L/lib" option to "configure". 7248 # 7249 save_LDFLAGS="$LDFLAGS" 7250 LDFLAGS="$LIBS -L/lib" 7251 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5 7252printf %s "checking for dlpi_walk in -ldlpi... " >&6; } 7253if test ${ac_cv_lib_dlpi_dlpi_walk+y} 7254then : 7255 printf %s "(cached) " >&6 7256else $as_nop 7257 ac_check_lib_save_LIBS=$LIBS 7258LIBS="-ldlpi $LIBS" 7259cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7260/* end confdefs.h. */ 7261 7262/* Override any GCC internal prototype to avoid an error. 7263 Use char because int might match the return type of a GCC 7264 builtin and then its argument prototype would still apply. */ 7265char dlpi_walk (); 7266int 7267main (void) 7268{ 7269return dlpi_walk (); 7270 ; 7271 return 0; 7272} 7273_ACEOF 7274if ac_fn_c_try_link "$LINENO" 7275then : 7276 ac_cv_lib_dlpi_dlpi_walk=yes 7277else $as_nop 7278 ac_cv_lib_dlpi_dlpi_walk=no 7279fi 7280rm -f core conftest.err conftest.$ac_objext conftest.beam \ 7281 conftest$ac_exeext conftest.$ac_ext 7282LIBS=$ac_check_lib_save_LIBS 7283fi 7284{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5 7285printf "%s\n" "$ac_cv_lib_dlpi_dlpi_walk" >&6; } 7286if test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes 7287then : 7288 7289 LIBS="-ldlpi $LIBS" 7290 LIBS_STATIC="-ldlpi $LIBS_STATIC" 7291 LIBS_PRIVATE="-ldlpi $LIBS_PRIVATE" 7292 V_PCAP=libdlpi 7293 7294 # 7295 # Capture module plus common code needed for 7296 # common functions used by pcap-[dlpi,libdlpi].c 7297 # 7298 PLATFORM_C_SRC="pcap-libdlpi.c dlpisubs.c" 7299 7300printf "%s\n" "#define HAVE_LIBDLPI 1" >>confdefs.h 7301 7302 7303else $as_nop 7304 7305 V_PCAP=dlpi 7306 7307 # 7308 # Capture module plus common code needed for 7309 # common functions used by pcap-[dlpi,libdlpi].c 7310 # 7311 PLATFORM_C_SRC="pcap-dlpi.c dlpisubs.c" 7312 7313fi 7314 7315 LDFLAGS="$save_LDFLAGS" 7316 7317 # 7318 # Checks whether <sys/dlpi.h> is usable, to catch weird SCO 7319 # versions of DLPI. 7320 # 7321 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether <sys/dlpi.h> is usable" >&5 7322printf %s "checking whether <sys/dlpi.h> is usable... " >&6; } 7323 if test ${ac_cv_sys_dlpi_usable+y} 7324then : 7325 printf %s "(cached) " >&6 7326else $as_nop 7327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7328/* end confdefs.h. */ 7329 7330 #include <sys/types.h> 7331 #include <sys/time.h> 7332 #include <sys/dlpi.h> 7333 7334int 7335main (void) 7336{ 7337int i = DL_PROMISC_PHYS; 7338 ; 7339 return 0; 7340} 7341_ACEOF 7342if ac_fn_c_try_compile "$LINENO" 7343then : 7344 ac_cv_sys_dlpi_usable=yes 7345else $as_nop 7346 ac_cv_sys_dlpi_usable=no 7347fi 7348rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 7349fi 7350 7351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_dlpi_usable" >&5 7352printf "%s\n" "$ac_cv_sys_dlpi_usable" >&6; } 7353 if test $ac_cv_sys_dlpi_usable = no ; then 7354 as_fn_error $? "<sys/dlpi.h> is not usable on this system; it probably has a non-standard DLPI" "$LINENO" 5 7355 fi 7356 7357 # 7358 # Check to see if Solaris has the dl_passive_req_t struct defined 7359 # in <sys/dlpi.h>. 7360 # This check is for DLPI support for passive modes. 7361 # See dlpi(7P) for more details. 7362 # 7363 ac_fn_c_check_type "$LINENO" "dl_passive_req_t" "ac_cv_type_dl_passive_req_t" " 7364 #include <sys/types.h> 7365 #include <sys/dlpi.h> 7366 7367" 7368if test "x$ac_cv_type_dl_passive_req_t" = xyes 7369then : 7370 7371printf "%s\n" "#define HAVE_DL_PASSIVE_REQ_T 1" >>confdefs.h 7372 7373 7374fi 7375 7376 ;; 7377 7378enet) 7379 # 7380 # Capture module 7381 # 7382 PLATFORM_C_SRC="pcap-enet.c" 7383 ;; 7384 7385haiku) 7386 # 7387 # Capture module 7388 # 7389 PLATFORM_C_SRC="pcap-haiku.c" 7390 7391 # 7392 # Just for the sake of it. 7393 # 7394 ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default" 7395if test "x$ac_cv_header_net_if_h" = xyes 7396then : 7397 printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h 7398 7399fi 7400ac_fn_c_check_header_compile "$LINENO" "net/if_dl.h" "ac_cv_header_net_if_dl_h" "$ac_includes_default" 7401if test "x$ac_cv_header_net_if_dl_h" = xyes 7402then : 7403 printf "%s\n" "#define HAVE_NET_IF_DL_H 1" >>confdefs.h 7404 7405fi 7406ac_fn_c_check_header_compile "$LINENO" "net/if_types.h" "ac_cv_header_net_if_types_h" "$ac_includes_default" 7407if test "x$ac_cv_header_net_if_types_h" = xyes 7408then : 7409 printf "%s\n" "#define HAVE_NET_IF_TYPES_H 1" >>confdefs.h 7410 7411fi 7412 7413 ;; 7414 7415linux) 7416 # 7417 # Capture module 7418 # 7419 PLATFORM_C_SRC="pcap-linux.c" 7420 7421 # 7422 # Do we have the wireless extensions? 7423 # 7424 ac_fn_c_check_header_compile "$LINENO" "linux/wireless.h" "ac_cv_header_linux_wireless_h" " 7425#include <sys/socket.h> 7426#include <linux/if.h> 7427#include <linux/types.h> 7428 7429" 7430if test "x$ac_cv_header_linux_wireless_h" = xyes 7431then : 7432 printf "%s\n" "#define HAVE_LINUX_WIRELESS_H 1" >>confdefs.h 7433 7434fi 7435 7436 7437 # 7438 # Do we have libnl? 7439 # We only want version 3. Version 2 was, apparently, 7440 # short-lived, and version 1 is source and binary 7441 # incompatible with version 3, and it appears that, 7442 # these days, everybody's using version 3. We're 7443 # not supporting older versions of the Linux kernel; 7444 # let's drop support for older versions of libnl, too. 7445 # 7446 7447# Check whether --with-libnl was given. 7448if test ${with_libnl+y} 7449then : 7450 withval=$with_libnl; with_libnl=$withval 7451else $as_nop 7452 with_libnl=if_available 7453fi 7454 7455 7456 if test x$with_libnl != xno ; then 7457 # 7458 # Check for libnl-genl-3.0 with pkg-config. 7459 # 7460 7461{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnl-genl-3.0 with pkg-config" >&5 7462printf %s "checking for libnl-genl-3.0 with pkg-config... " >&6; } 7463if test -n "$PKG_CONFIG"; then 7464 7465 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libnl-genl-3.0\""; } >&5 7466 ($PKG_CONFIG --exists --print-errors "libnl-genl-3.0") 2>&5 7467 ac_status=$? 7468 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 7469 test $ac_status = 0; }; then 7470 # 7471 # The package was found, so try to get its C flags and 7472 # libraries. 7473 # 7474 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5 7475printf "%s\n" "found" >&6; } 7476 if test ! -n "$LIBNL_CFLAGS"; then 7477 LIBNL_CFLAGS=`$PKG_CONFIG --cflags "libnl-genl-3.0" 2>/dev/null` 7478 if test "x$?" != "x0"; then 7479 # 7480 # That failed - report an error. 7481 # Re-run the command, telling pkg-config to print an error 7482 # message, capture the error message, and report it. 7483 # This causes the configuration script to fail, as it means 7484 # the script is almost certainly doing something wrong. 7485 # 7486 7487if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 7488 _pkg_short_errors_supported=yes 7489else 7490 _pkg_short_errors_supported=no 7491fi 7492 if test $_pkg_short_errors_supported = yes; then 7493 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --cflags "libnl-genl-3.0" 2>&1` 7494 else 7495 _pkg_error_string=`$PKG_CONFIG --print-errors --cflags "libnl-genl-3.0" 2>&1` 7496 fi 7497 as_fn_error $? "$PKG_CONFIG --cflags \"libnl-genl-3.0\" failed: $_pkg_error_string" "$LINENO" 5 7498 fi 7499 fi 7500 if test ! -n "$LIBNL_LIBS"; then 7501 LIBNL_LIBS=`$PKG_CONFIG --libs "libnl-genl-3.0" 2>/dev/null` 7502 if test "x$?" != "x0"; then 7503 # 7504 # That failed - report an error. 7505 # Re-run the command, telling pkg-config to print an error 7506 # message, capture the error message, and report it. 7507 # This causes the configuration script to fail, as it means 7508 # the script is almost certainly doing something wrong. 7509 # 7510 7511if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 7512 _pkg_short_errors_supported=yes 7513else 7514 _pkg_short_errors_supported=no 7515fi 7516 if test $_pkg_short_errors_supported = yes; then 7517 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs "libnl-genl-3.0" 2>&1` 7518 else 7519 _pkg_error_string=`$PKG_CONFIG --print-errors --libs "libnl-genl-3.0" 2>&1` 7520 fi 7521 as_fn_error $? "$PKG_CONFIG --libs \"libnl-genl-3.0\" failed: $_pkg_error_string" "$LINENO" 5 7522 fi 7523 fi 7524 if test ! -n "$LIBNL_LIBS_STATIC"; then 7525 LIBNL_LIBS_STATIC=`$PKG_CONFIG --libs --static "libnl-genl-3.0" 2>/dev/null` 7526 if test "x$?" != "x0"; then 7527 # 7528 # That failed - report an error. 7529 # Re-run the command, telling pkg-config to print an error 7530 # message, capture the error message, and report it. 7531 # This causes the configuration script to fail, as it means 7532 # the script is almost certainly doing something wrong. 7533 # 7534 7535if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 7536 _pkg_short_errors_supported=yes 7537else 7538 _pkg_short_errors_supported=no 7539fi 7540 if test $_pkg_short_errors_supported = yes; then 7541 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs --static "libnl-genl-3.0" 2>&1` 7542 else 7543 _pkg_error_string=`$PKG_CONFIG --print-errors --libs --static "libnl-genl-3.0" 2>&1` 7544 fi 7545 as_fn_error $? "$PKG_CONFIG --libs --static \"libnl-genl-3.0\" failed: $_pkg_error_string" "$LINENO" 5 7546 fi 7547 fi 7548 7549 pkg_config_found_libnl=yes 7550 V_INCLS="$V_INCLS $LIBNL_CFLAGS" 7551 ADDITIONAL_LIBS="$LIBNL_LIBS $ADDITIONAL_LIBS" 7552 ADDITIONAL_LIBS_STATIC="$LIBNL_LIBS_STATIC $ADDITIONAL_LIBS_STATIC" 7553 REQUIRES_PRIVATE="libnl-genl-3.0 $REQUIRES_PRIVATE" 7554 7555printf "%s\n" "#define HAVE_LIBNL 1" >>confdefs.h 7556 7557 7558 else 7559 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 7560printf "%s\n" "not found" >&6; } 7561 : 7562 fi 7563else 7564 # No pkg-config, so obviously not found with pkg-config. 7565 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config not found" >&5 7566printf "%s\n" "pkg-config not found" >&6; } 7567 : 7568fi 7569 7570 7571 if test x$pkg_config_found_libnl != xyes; then 7572 # 7573 # OK, either we don't have pkg-config or there 7574 # wasn't a .pc file for it; Check for it directly. 7575 # 7576 case "$with_libnl" in 7577 7578 yes|if_available) 7579 incdir=-I/usr/include/libnl3 7580 libnldir= 7581 ;; 7582 7583 *) 7584 if test -d $withval; then 7585 libnldir=-L${withval}/lib 7586 incdir=-I${withval}/include 7587 fi 7588 ;; 7589 esac 7590 7591 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_socket_alloc in -lnl-3" >&5 7592printf %s "checking for nl_socket_alloc in -lnl-3... " >&6; } 7593if test ${ac_cv_lib_nl_3_nl_socket_alloc+y} 7594then : 7595 printf %s "(cached) " >&6 7596else $as_nop 7597 ac_check_lib_save_LIBS=$LIBS 7598LIBS="-lnl-3 ${incdir} ${libnldir} -lnl-genl-3 -lnl-3 $LIBS" 7599cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7600/* end confdefs.h. */ 7601 7602/* Override any GCC internal prototype to avoid an error. 7603 Use char because int might match the return type of a GCC 7604 builtin and then its argument prototype would still apply. */ 7605char nl_socket_alloc (); 7606int 7607main (void) 7608{ 7609return nl_socket_alloc (); 7610 ; 7611 return 0; 7612} 7613_ACEOF 7614if ac_fn_c_try_link "$LINENO" 7615then : 7616 ac_cv_lib_nl_3_nl_socket_alloc=yes 7617else $as_nop 7618 ac_cv_lib_nl_3_nl_socket_alloc=no 7619fi 7620rm -f core conftest.err conftest.$ac_objext conftest.beam \ 7621 conftest$ac_exeext conftest.$ac_ext 7622LIBS=$ac_check_lib_save_LIBS 7623fi 7624{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nl_3_nl_socket_alloc" >&5 7625printf "%s\n" "$ac_cv_lib_nl_3_nl_socket_alloc" >&6; } 7626if test "x$ac_cv_lib_nl_3_nl_socket_alloc" = xyes 7627then : 7628 7629 # 7630 # Yes, we have libnl 3.x. 7631 # 7632 ADDITIONAL_LIBS="${libnldir} -lnl-genl-3 -lnl-3 $ADDITIONAL_LIBS" 7633 ADDITIONAL_LIBS_STATIC="${libnldir} -lnl-genl-3 -lnl-3 $ADDITIONAL_LIBS_STATIC" 7634 LIBS_PRIVATE="${libnldir} -lnl-genl-3 -lnl-3 $LIBS_PRIVATE" 7635 7636printf "%s\n" "#define HAVE_LIBNL 1" >>confdefs.h 7637 7638 V_INCLS="$V_INCLS ${incdir}" 7639 7640else $as_nop 7641 7642 # 7643 # No, we don't have libnl at all. 7644 # Fail if the user explicitly requested 7645 # it. 7646 # 7647 if test x$with_libnl = xyes ; then 7648 as_fn_error $? "libnl support requested but libnl not found" "$LINENO" 5 7649 fi 7650 7651fi 7652 7653 fi 7654 fi 7655 7656 # 7657 # Check to see if the tpacket_auxdata struct has a tp_vlan_tci member. 7658 # 7659 # NOTE: any failure means we conclude that it doesn't have that 7660 # member, so if we don't have tpacket_auxdata, we conclude it 7661 # doesn't have that member (which is OK, as either we won't be 7662 # using code that would use that member, or we wouldn't compile 7663 # in any case). 7664 ac_fn_c_check_member "$LINENO" "struct tpacket_auxdata" "tp_vlan_tci" "ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" " 7665 #include <sys/types.h> 7666 #include <linux/if_packet.h> 7667 7668" 7669if test "x$ac_cv_member_struct_tpacket_auxdata_tp_vlan_tci" = xyes 7670then : 7671 7672printf "%s\n" "#define HAVE_STRUCT_TPACKET_AUXDATA_TP_VLAN_TCI 1" >>confdefs.h 7673 7674 7675fi 7676 7677 ;; 7678 7679bpf) 7680 # 7681 # Capture module 7682 # 7683 PLATFORM_C_SRC="pcap-bpf.c" 7684 7685 # 7686 # Check whether we have the *BSD-style ioctls. 7687 # 7688 ac_fn_c_check_header_compile "$LINENO" "net/if_media.h" "ac_cv_header_net_if_media_h" "$ac_includes_default" 7689if test "x$ac_cv_header_net_if_media_h" = xyes 7690then : 7691 printf "%s\n" "#define HAVE_NET_IF_MEDIA_H 1" >>confdefs.h 7692 7693fi 7694 7695 7696 # 7697 # Check whether we have struct BPF_TIMEVAL. 7698 # 7699 ac_fn_c_check_type "$LINENO" "struct BPF_TIMEVAL" "ac_cv_type_struct_BPF_TIMEVAL" " 7700 #include <sys/types.h> 7701 #include <sys/ioctl.h> 7702 #ifdef HAVE_SYS_IOCCOM_H 7703 #include <sys/ioccom.h> 7704 #endif 7705 #include <net/bpf.h> 7706 7707" 7708if test "x$ac_cv_type_struct_BPF_TIMEVAL" = xyes 7709then : 7710 7711printf "%s\n" "#define HAVE_STRUCT_BPF_TIMEVAL 1" >>confdefs.h 7712 7713 7714fi 7715 7716 7717 # 7718 # Check whether there's a net/ipnet.h header and, 7719 # if so, whether it defines IPNET_ANY_LINK - if so, 7720 # we assume we have the "any" device (that's a 7721 # Solaris header, and later versions of Solaris 7722 # have an "any" device). 7723 # 7724 # Attempting to include it at compile time could 7725 # be a pain, as it's a kernel header. 7726 # 7727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the Solaris \"any\" device is supported" >&5 7728printf %s "checking whether the Solaris \"any\" device is supported... " >&6; } 7729 if test -e /usr/include/inet/ipnet.h && 7730 grep -q IPNET_ANY_LINK /usr/include/inet/ipnet.h; then 7731 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 7732printf "%s\n" "yes" >&6; } 7733 7734printf "%s\n" "#define HAVE_SOLARIS_ANY_DEVICE 1" >>confdefs.h 7735 7736 else 7737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 7738printf "%s\n" "no" >&6; } 7739 fi 7740 ;; 7741 7742pf) 7743 # 7744 # Capture module 7745 # 7746 PLATFORM_C_SRC="pcap-pf.c" 7747 ;; 7748 7749snit) 7750 # 7751 # Capture module 7752 # 7753 PLATFORM_C_SRC="pcap-snit.c" 7754 ;; 7755 7756snoop) 7757 # 7758 # Capture module 7759 # 7760 PLATFORM_C_SRC="pcap-snoop.c" 7761 ;; 7762 7763dag) 7764 # 7765 # --with-pcap=dag is the only way to get here, and it means 7766 # "DAG support but nothing else" 7767 # 7768 V_DEFS="$V_DEFS -DDAG_ONLY" 7769 PLATFORM_C_SRC="pcap-dag.c" 7770 xxx_only=yes 7771 ;; 7772 7773dpdk) 7774 # 7775 # --with-pcap=dpdk is the only way to get here, and it means 7776 # "DPDK support but nothing else" 7777 # 7778 V_DEFS="$V_DEFS -DDPDK_ONLY" 7779 PLATFORM_C_SRC="pcap-dpdk.c" 7780 xxx_only=yes 7781 ;; 7782 7783septel) 7784 # 7785 # --with-pcap=septel is the only way to get here, and it means 7786 # "Septel support but nothing else" 7787 # 7788 V_DEFS="$V_DEFS -DSEPTEL_ONLY" 7789 PLATFORM_C_SRC="pcap-septel.c" 7790 xxx_only=yes 7791 ;; 7792 7793snf) 7794 # 7795 # --with-pcap=snf is the only way to get here, and it means 7796 # "SNF support but nothing else" 7797 # 7798 V_DEFS="$V_DEFS -DSNF_ONLY" 7799 PLATFORM_C_SRC="pcap-snf.c" 7800 xxx_only=yes 7801 ;; 7802 7803null) 7804 # 7805 # Capture module 7806 # 7807 PLATFORM_C_SRC="pcap-null.c" 7808 ;; 7809 7810*) 7811 as_fn_error $? "$V_PCAP is not a valid pcap type" "$LINENO" 5 7812 ;; 7813esac 7814 7815if test "$V_PCAP" != null 7816then 7817 ac_fn_c_check_func "$LINENO" "getifaddrs" "ac_cv_func_getifaddrs" 7818if test "x$ac_cv_func_getifaddrs" = xyes 7819then : 7820 7821 # 7822 # We have "getifaddrs()"; make sure we have <ifaddrs.h> 7823 # as well, just in case some platform is really weird. 7824 # 7825 ac_fn_c_check_header_compile "$LINENO" "ifaddrs.h" "ac_cv_header_ifaddrs_h" "$ac_includes_default" 7826if test "x$ac_cv_header_ifaddrs_h" = xyes 7827then : 7828 7829 # 7830 # We have the header, so we use "getifaddrs()" to 7831 # get the list of interfaces. 7832 # 7833 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-getad.c" 7834 7835else $as_nop 7836 7837 # 7838 # We don't have the header - give up. 7839 # XXX - we could also fall back on some other 7840 # mechanism, but, for now, this'll catch this 7841 # problem so that we can at least try to figure 7842 # out something to do on systems with "getifaddrs()" 7843 # but without "ifaddrs.h", if there is something 7844 # we can do on those systems. 7845 # 7846 as_fn_error $? "Your system has getifaddrs() but doesn't have a usable <ifaddrs.h>." "$LINENO" 5 7847 7848fi 7849 7850 7851else $as_nop 7852 7853 # 7854 # Well, we don't have "getifaddrs()", at least not with the 7855 # libraries with which we've decided we need to link 7856 # libpcap with, so we have to use some other mechanism. 7857 # 7858 # Note that this may happen on Solaris, which has 7859 # getifaddrs(), but in -lsocket, not in -lxnet, so we 7860 # won't find it if we link with -lxnet, which we want 7861 # to do for other reasons. 7862 # 7863 # For now, we use either the SIOCGIFCONF ioctl or the 7864 # SIOCGLIFCONF ioctl, preferring the latter if we have 7865 # it; the latter is a Solarisism that first appeared 7866 # in Solaris 8. (Solaris's getifaddrs() appears to 7867 # be built atop SIOCGLIFCONF; using it directly 7868 # avoids a not-all-that-useful middleman.) 7869 # 7870 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have SIOCGLIFCONF" >&5 7871printf %s "checking whether we have SIOCGLIFCONF... " >&6; } 7872 if test ${ac_cv_lbl_have_siocglifconf+y} 7873then : 7874 printf %s "(cached) " >&6 7875else $as_nop 7876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7877/* end confdefs.h. */ 7878#include <sys/param.h> 7879 #include <sys/file.h> 7880 #include <sys/ioctl.h> 7881 #include <sys/socket.h> 7882 #include <sys/sockio.h> 7883int 7884main (void) 7885{ 7886ioctl(0, SIOCGLIFCONF, (char *)0); 7887 ; 7888 return 0; 7889} 7890_ACEOF 7891if ac_fn_c_try_compile "$LINENO" 7892then : 7893 ac_cv_lbl_have_siocglifconf=yes 7894else $as_nop 7895 ac_cv_lbl_have_siocglifconf=no 7896fi 7897rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 7898fi 7899 7900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_have_siocglifconf" >&5 7901printf "%s\n" "$ac_cv_lbl_have_siocglifconf" >&6; } 7902 if test $ac_cv_lbl_have_siocglifconf = yes ; then 7903 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-glifc.c" 7904 else 7905 PLATFORM_C_SRC="$PLATFORM_C_SRC fad-gifc.c" 7906 fi 7907 7908fi 7909 7910fi 7911 7912case "$host_os" in 7913linux*) 7914 ac_fn_c_check_header_compile "$LINENO" "linux/net_tstamp.h" "ac_cv_header_linux_net_tstamp_h" "$ac_includes_default" 7915if test "x$ac_cv_header_linux_net_tstamp_h" = xyes 7916then : 7917 printf "%s\n" "#define HAVE_LINUX_NET_TSTAMP_H 1" >>confdefs.h 7918 7919fi 7920 7921 ;; 7922*) 7923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: no hardware timestamp support implemented for $host_os" >&5 7924printf "%s\n" "$as_me: no hardware timestamp support implemented for $host_os" >&6;} 7925 ;; 7926esac 7927 7928# 7929# Check for socklen_t. 7930# 7931ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " 7932 #include <sys/types.h> 7933 #include <sys/socket.h> 7934 7935" 7936if test "x$ac_cv_type_socklen_t" = xyes 7937then : 7938 7939printf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h 7940 7941 7942fi 7943 7944 7945# Check whether --enable-ipv6 was given. 7946if test ${enable_ipv6+y} 7947then : 7948 enableval=$enable_ipv6; 7949else $as_nop 7950 enable_ipv6=yes 7951fi 7952 7953if test "$enable_ipv6" != "no"; then 7954 # 7955 # We've already made sure we have getaddrinfo above in 7956 # AC_LBL_LIBRARY_NET. 7957 # 7958 7959printf "%s\n" "#define INET6 1" >>confdefs.h 7960 7961fi 7962 7963# Check for Endace DAG card support. 7964 7965# Check whether --with-dag was given. 7966if test ${with_dag+y} 7967then : 7968 withval=$with_dag; 7969 if test "$withval" = no 7970 then 7971 # User doesn't want DAG support. 7972 want_dag=no 7973 elif test "$withval" = yes 7974 then 7975 # User wants DAG support but hasn't specified a directory. 7976 want_dag=yes 7977 else 7978 # User wants DAG support and has specified a directory, so use the provided value. 7979 want_dag=yes 7980 dag_root=$withval 7981 fi 7982 7983else $as_nop 7984 7985 if test "$V_PCAP" = dag; then 7986 # User requested DAG-only libpcap, so we'd better have 7987 # the DAG API. 7988 want_dag=yes 7989 elif test "xxx_only" = yes; then 7990 # User requested something-else-only pcap, so they don't 7991 # want DAG support. 7992 want_dag=no 7993 else 7994 # 7995 # Use DAG API if present, otherwise don't 7996 # 7997 want_dag=ifpresent 7998 fi 7999 8000fi 8001 8002 8003 8004# Check whether --with-dag-includes was given. 8005if test ${with_dag_includes+y} 8006then : 8007 withval=$with_dag_includes; 8008 # User wants DAG support and has specified a header directory, so use the provided value. 8009 want_dag=yes 8010 dag_include_dir=$withval 8011 8012fi 8013 8014 8015 8016# Check whether --with-dag-libraries was given. 8017if test ${with_dag_libraries+y} 8018then : 8019 withval=$with_dag_libraries; 8020 # User wants DAG support and has specified a library directory, so use the provided value. 8021 want_dag=yes 8022 dag_lib_dir=$withval 8023 8024fi 8025 8026 8027if test "$want_dag" != no; then 8028 8029 # If necessary, set default paths for DAG API headers and libraries. 8030 if test -z "$dag_root"; then 8031 dag_root=/usr/local 8032 fi 8033 8034 if test -z "$dag_include_dir"; then 8035 dag_include_dir="$dag_root/include" 8036 fi 8037 8038 if test -z "$dag_lib_dir"; then 8039 dag_lib_dir="$dag_root/lib" 8040 # 8041 # Handle multiarch systems. 8042 # 8043 if test -d "$dag_lib_dir/$host" 8044 then 8045 dag_lib_dir="$dag_lib_dir/$host" 8046 fi 8047 fi 8048 8049 8050 save_CFLAGS="$CFLAGS" 8051 save_LIBS="$LIBS" 8052 save_LDFLAGS="$LDFLAGS" 8053 8054 CFLAGS="$CFLAGS -I$dag_include_dir" 8055 ac_fn_c_check_header_compile "$LINENO" "dagapi.h" "ac_cv_header_dagapi_h" "$ac_includes_default" 8056if test "x$ac_cv_header_dagapi_h" = xyes 8057then : 8058 printf "%s\n" "#define HAVE_DAGAPI_H 1" >>confdefs.h 8059 8060fi 8061 8062 8063 CFLAGS="$save_CFLAGS" 8064 LIBS="$save_LIBS" 8065 LDFLAGS="$save_LDFLAGS" 8066 8067 8068 if test "$ac_cv_header_dagapi_h" = yes; then 8069 8070 V_INCLS="$V_INCLS -I$dag_include_dir" 8071 8072 if test $V_PCAP != dag ; then 8073 MODULE_C_SRC="$MODULE_C_SRC pcap-dag.c" 8074 fi 8075 8076 # Check for various DAG API functions. 8077 # Don't need to save and restore LIBS to prevent -ldag being 8078 # included if there's a found-action (arg 3). 8079 8080 save_CFLAGS="$CFLAGS" 8081 save_LIBS="$LIBS" 8082 save_LDFLAGS="$LDFLAGS" 8083 8084 LDFLAGS="-L$dag_lib_dir" 8085 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream in -ldag" >&5 8086printf %s "checking for dag_attach_stream in -ldag... " >&6; } 8087if test ${ac_cv_lib_dag_dag_attach_stream+y} 8088then : 8089 printf %s "(cached) " >&6 8090else $as_nop 8091 ac_check_lib_save_LIBS=$LIBS 8092LIBS="-ldag $LIBS" 8093cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8094/* end confdefs.h. */ 8095 8096/* Override any GCC internal prototype to avoid an error. 8097 Use char because int might match the return type of a GCC 8098 builtin and then its argument prototype would still apply. */ 8099char dag_attach_stream (); 8100int 8101main (void) 8102{ 8103return dag_attach_stream (); 8104 ; 8105 return 0; 8106} 8107_ACEOF 8108if ac_fn_c_try_link "$LINENO" 8109then : 8110 ac_cv_lib_dag_dag_attach_stream=yes 8111else $as_nop 8112 ac_cv_lib_dag_dag_attach_stream=no 8113fi 8114rm -f core conftest.err conftest.$ac_objext conftest.beam \ 8115 conftest$ac_exeext conftest.$ac_ext 8116LIBS=$ac_check_lib_save_LIBS 8117fi 8118{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream" >&5 8119printf "%s\n" "$ac_cv_lib_dag_dag_attach_stream" >&6; } 8120if test "x$ac_cv_lib_dag_dag_attach_stream" = xyes 8121then : 8122 8123 # 8124 # We assume that if we have libdag we have 8125 # libdagconf, as they're installed at the 8126 # same time from the same package. 8127 # 8128 ADDITIONAL_LIBS="-L$dag_lib_dir $ADDITIONAL_LIBS -ldag -ldagconf" 8129 ADDITIONAL_LIBS_STATIC="-L$dag_lib_dir $ADDITIONAL_LIBS_STATIC -ldag -ldagconf" 8130 LIBS_PRIVATE="-L$dag_lib_dir $LIBS_PRIVATE -ldag -ldagconf" 8131 8132else $as_nop 8133 as_fn_error $? "DAG library lacks streams support" "$LINENO" 5 8134fi 8135 8136 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dag_attach_stream64 in -ldag" >&5 8137printf %s "checking for dag_attach_stream64 in -ldag... " >&6; } 8138if test ${ac_cv_lib_dag_dag_attach_stream64+y} 8139then : 8140 printf %s "(cached) " >&6 8141else $as_nop 8142 ac_check_lib_save_LIBS=$LIBS 8143LIBS="-ldag $LIBS" 8144cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8145/* end confdefs.h. */ 8146 8147/* Override any GCC internal prototype to avoid an error. 8148 Use char because int might match the return type of a GCC 8149 builtin and then its argument prototype would still apply. */ 8150char dag_attach_stream64 (); 8151int 8152main (void) 8153{ 8154return dag_attach_stream64 (); 8155 ; 8156 return 0; 8157} 8158_ACEOF 8159if ac_fn_c_try_link "$LINENO" 8160then : 8161 ac_cv_lib_dag_dag_attach_stream64=yes 8162else $as_nop 8163 ac_cv_lib_dag_dag_attach_stream64=no 8164fi 8165rm -f core conftest.err conftest.$ac_objext conftest.beam \ 8166 conftest$ac_exeext conftest.$ac_ext 8167LIBS=$ac_check_lib_save_LIBS 8168fi 8169{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_attach_stream64" >&5 8170printf "%s\n" "$ac_cv_lib_dag_dag_attach_stream64" >&6; } 8171if test "x$ac_cv_lib_dag_dag_attach_stream64" = xyes 8172then : 8173 dag_large_streams="1" 8174else $as_nop 8175 dag_large_streams="0" 8176fi 8177 8178 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dag_get_erf_types in -ldag" >&5 8179printf %s "checking for dag_get_erf_types in -ldag... " >&6; } 8180if test ${ac_cv_lib_dag_dag_get_erf_types+y} 8181then : 8182 printf %s "(cached) " >&6 8183else $as_nop 8184 ac_check_lib_save_LIBS=$LIBS 8185LIBS="-ldag $LIBS" 8186cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8187/* end confdefs.h. */ 8188 8189/* Override any GCC internal prototype to avoid an error. 8190 Use char because int might match the return type of a GCC 8191 builtin and then its argument prototype would still apply. */ 8192char dag_get_erf_types (); 8193int 8194main (void) 8195{ 8196return dag_get_erf_types (); 8197 ; 8198 return 0; 8199} 8200_ACEOF 8201if ac_fn_c_try_link "$LINENO" 8202then : 8203 ac_cv_lib_dag_dag_get_erf_types=yes 8204else $as_nop 8205 ac_cv_lib_dag_dag_get_erf_types=no 8206fi 8207rm -f core conftest.err conftest.$ac_objext conftest.beam \ 8208 conftest$ac_exeext conftest.$ac_ext 8209LIBS=$ac_check_lib_save_LIBS 8210fi 8211{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_erf_types" >&5 8212printf "%s\n" "$ac_cv_lib_dag_dag_get_erf_types" >&6; } 8213if test "x$ac_cv_lib_dag_dag_get_erf_types" = xyes 8214then : 8215 8216 8217printf "%s\n" "#define HAVE_DAG_GET_ERF_TYPES 1" >>confdefs.h 8218 8219fi 8220 8221 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dag_get_stream_erf_types in -ldag" >&5 8222printf %s "checking for dag_get_stream_erf_types in -ldag... " >&6; } 8223if test ${ac_cv_lib_dag_dag_get_stream_erf_types+y} 8224then : 8225 printf %s "(cached) " >&6 8226else $as_nop 8227 ac_check_lib_save_LIBS=$LIBS 8228LIBS="-ldag $LIBS" 8229cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8230/* end confdefs.h. */ 8231 8232/* Override any GCC internal prototype to avoid an error. 8233 Use char because int might match the return type of a GCC 8234 builtin and then its argument prototype would still apply. */ 8235char dag_get_stream_erf_types (); 8236int 8237main (void) 8238{ 8239return dag_get_stream_erf_types (); 8240 ; 8241 return 0; 8242} 8243_ACEOF 8244if ac_fn_c_try_link "$LINENO" 8245then : 8246 ac_cv_lib_dag_dag_get_stream_erf_types=yes 8247else $as_nop 8248 ac_cv_lib_dag_dag_get_stream_erf_types=no 8249fi 8250rm -f core conftest.err conftest.$ac_objext conftest.beam \ 8251 conftest$ac_exeext conftest.$ac_ext 8252LIBS=$ac_check_lib_save_LIBS 8253fi 8254{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dag_dag_get_stream_erf_types" >&5 8255printf "%s\n" "$ac_cv_lib_dag_dag_get_stream_erf_types" >&6; } 8256if test "x$ac_cv_lib_dag_dag_get_stream_erf_types" = xyes 8257then : 8258 8259 8260printf "%s\n" "#define HAVE_DAG_GET_STREAM_ERF_TYPES 1" >>confdefs.h 8261 8262fi 8263 8264 8265 CFLAGS="$save_CFLAGS" 8266 LIBS="$save_LIBS" 8267 LDFLAGS="$save_LDFLAGS" 8268 8269 8270 # 8271 # We assume that if we have libdag we have libdagconf, 8272 # as they're installed at the same time from the same 8273 # package. 8274 # 8275 if test "$dag_large_streams" = 1; then 8276 8277printf "%s\n" "#define HAVE_DAG_LARGE_STREAMS_API 1" >>confdefs.h 8278 8279 8280 save_CFLAGS="$CFLAGS" 8281 save_LIBS="$LIBS" 8282 save_LDFLAGS="$LDFLAGS" 8283 8284 LIBS="$LIBS -ldag -ldagconf" 8285 LDFLAGS="$LDFLAGS -L$dag_lib_dir" 8286 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for vdag_set_device_info in -lvdag" >&5 8287printf %s "checking for vdag_set_device_info in -lvdag... " >&6; } 8288if test ${ac_cv_lib_vdag_vdag_set_device_info+y} 8289then : 8290 printf %s "(cached) " >&6 8291else $as_nop 8292 ac_check_lib_save_LIBS=$LIBS 8293LIBS="-lvdag $LIBS" 8294cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8295/* end confdefs.h. */ 8296 8297/* Override any GCC internal prototype to avoid an error. 8298 Use char because int might match the return type of a GCC 8299 builtin and then its argument prototype would still apply. */ 8300char vdag_set_device_info (); 8301int 8302main (void) 8303{ 8304return vdag_set_device_info (); 8305 ; 8306 return 0; 8307} 8308_ACEOF 8309if ac_fn_c_try_link "$LINENO" 8310then : 8311 ac_cv_lib_vdag_vdag_set_device_info=yes 8312else $as_nop 8313 ac_cv_lib_vdag_vdag_set_device_info=no 8314fi 8315rm -f core conftest.err conftest.$ac_objext conftest.beam \ 8316 conftest$ac_exeext conftest.$ac_ext 8317LIBS=$ac_check_lib_save_LIBS 8318fi 8319{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_vdag_vdag_set_device_info" >&5 8320printf "%s\n" "$ac_cv_lib_vdag_vdag_set_device_info" >&6; } 8321if test "x$ac_cv_lib_vdag_vdag_set_device_info" = xyes 8322then : 8323 ac_dag_have_vdag="1" 8324else $as_nop 8325 ac_dag_have_vdag="0" 8326fi 8327 8328 8329 CFLAGS="$save_CFLAGS" 8330 LIBS="$save_LIBS" 8331 LDFLAGS="$save_LDFLAGS" 8332 8333 if test "$ac_dag_have_vdag" = 1; then 8334 8335printf "%s\n" "#define HAVE_DAG_VDAG 1" >>confdefs.h 8336 8337 if test "$ac_lbl_have_pthreads" != "found"; then 8338 as_fn_error $? "DAG requires pthreads, but we didn't find them" "$LINENO" 5 8339 fi 8340 ADDITIONAL_LIBS="$ADDITIONAL_LIBS $PTHREAD_LIBS" 8341 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $PTHREAD_LIBS" 8342 LIBS_PRIVATE="$LIBS_PRIVATE $PTHREAD_LIBS" 8343 fi 8344 fi 8345 8346 8347printf "%s\n" "#define HAVE_DAG_API 1" >>confdefs.h 8348 8349 else 8350 if test "$V_PCAP" = dag; then 8351 # User requested "dag" capture type but we couldn't 8352 # find the DAG API support. 8353 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 8354 fi 8355 8356 if test "$want_dag" = yes; then 8357 # User wanted DAG support but we couldn't find it. 8358 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 8359 fi 8360 fi 8361 CFLAGS="$save_CFLAGS" 8362fi 8363 8364 8365# Check whether --with-septel was given. 8366if test ${with_septel+y} 8367then : 8368 withval=$with_septel; 8369 if test "$withval" = no 8370 then 8371 want_septel=no 8372 elif test "$withval" = yes 8373 then 8374 want_septel=yes 8375 septel_root= 8376 else 8377 want_septel=yes 8378 septel_root=$withval 8379 fi 8380 8381else $as_nop 8382 8383 if test "$V_PCAP" = septel; then 8384 # User requested Septel-only libpcap, so we'd better have 8385 # the Septel API. 8386 want_septel=yes 8387 elif test "xxx_only" = yes; then 8388 # User requested something-else-only pcap, so they don't 8389 # want Septel support. 8390 want_septel=no 8391 else 8392 # 8393 # Use Septel API if present, otherwise don't 8394 # 8395 want_septel=ifpresent 8396 fi 8397 8398fi 8399 8400 8401ac_cv_lbl_septel_api=no 8402if test "$with_septel" != no; then 8403 8404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have Septel API headers" >&5 8405printf %s "checking whether we have Septel API headers... " >&6; } 8406 8407 # If necessary, set default paths for Septel API headers and libraries. 8408 if test -z "$septel_root"; then 8409 septel_root=$srcdir/../septel 8410 fi 8411 8412 septel_tools_dir="$septel_root" 8413 septel_include_dir="$septel_root/INC" 8414 8415 if test -r "$septel_include_dir/msg.h"; then 8416 ac_cv_lbl_septel_api=yes 8417 fi 8418 8419 if test "$ac_cv_lbl_septel_api" = yes; then 8420 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes ($septel_include_dir)" >&5 8421printf "%s\n" "yes ($septel_include_dir)" >&6; } 8422 8423 V_INCLS="$V_INCLS -I$septel_include_dir" 8424 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" 8425 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" 8426 8427 if test "$V_PCAP" != septel ; then 8428 MODULE_C_SRC="$MODULE_C_SRC pcap-septel.c" 8429 fi 8430 8431 8432printf "%s\n" "#define HAVE_SEPTEL_API 1" >>confdefs.h 8433 8434 else 8435 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8436printf "%s\n" "no" >&6; } 8437 8438 if test "$V_PCAP" = septel; then 8439 # User requested "septel" capture type but 8440 # we couldn't find the Septel API support. 8441 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 8442 fi 8443 8444 if test "$want_septel" = yes; then 8445 # User wanted Septel support but we couldn't find it. 8446 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 8447 fi 8448 fi 8449fi 8450 8451# Check for Myricom SNF support. 8452 8453# Check whether --with-snf was given. 8454if test ${with_snf+y} 8455then : 8456 withval=$with_snf; 8457 if test "$withval" = no 8458 then 8459 # User explicitly doesn't want SNF 8460 want_snf=no 8461 elif test "$withval" = yes 8462 then 8463 # User wants SNF support but hasn't specified a directory. 8464 want_snf=yes 8465 else 8466 # User wants SNF support with a specified directory. 8467 want_snf=yes 8468 snf_root=$withval 8469 fi 8470 8471else $as_nop 8472 8473 if test "$V_PCAP" = snf; then 8474 # User requested Sniffer-only libpcap, so we'd better have 8475 # the Sniffer API. 8476 want_snf=yes 8477 elif test "xxx_only" = yes; then 8478 # User requested something-else-only pcap, so they don't 8479 # want SNF support. 8480 want_snf=no 8481 else 8482 # 8483 # Use Sniffer API if present, otherwise don't 8484 # 8485 want_snf=ifpresent 8486 fi 8487 8488fi 8489 8490 8491 8492# Check whether --with-snf-includes was given. 8493if test ${with_snf_includes+y} 8494then : 8495 withval=$with_snf_includes; 8496 # User wants SNF with specific header directory 8497 want_snf=yes 8498 snf_include_dir=$withval 8499 8500fi 8501 8502 8503 8504# Check whether --with-snf-libraries was given. 8505if test ${with_snf_libraries+y} 8506then : 8507 withval=$with_snf_libraries; 8508 # User wants SNF with specific lib directory 8509 want_snf=yes 8510 snf_lib_dir=$withval 8511 8512fi 8513 8514 8515ac_cv_lbl_snf_api=no 8516if test "$with_snf" != no; then 8517 8518 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have Myricom Sniffer API" >&5 8519printf %s "checking whether we have Myricom Sniffer API... " >&6; } 8520 8521 # If necessary, set default paths for Sniffer headers and libraries. 8522 if test -z "$snf_root"; then 8523 snf_root=/opt/snf 8524 fi 8525 8526 if test -z "$snf_include_dir"; then 8527 snf_include_dir="$snf_root/include" 8528 fi 8529 8530 if test -z "$snf_lib_dir"; then 8531 snf_lib_dir="$snf_root/lib" 8532 # 8533 # Handle multiarch systems. 8534 # 8535 if test -d "$snf_lib_dir/$host" 8536 then 8537 snf_lib_dir="$snf_lib_dir/$host" 8538 fi 8539 fi 8540 8541 if test -f "$snf_include_dir/snf.h"; then 8542 # We found a header; make sure we can link with the library 8543 8544 save_CFLAGS="$CFLAGS" 8545 save_LIBS="$LIBS" 8546 save_LDFLAGS="$LDFLAGS" 8547 8548 LDFLAGS="$LDFLAGS -L$snf_lib_dir" 8549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for snf_init in -lsnf" >&5 8550printf %s "checking for snf_init in -lsnf... " >&6; } 8551if test ${ac_cv_lib_snf_snf_init+y} 8552then : 8553 printf %s "(cached) " >&6 8554else $as_nop 8555 ac_check_lib_save_LIBS=$LIBS 8556LIBS="-lsnf $LIBS" 8557cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8558/* end confdefs.h. */ 8559 8560/* Override any GCC internal prototype to avoid an error. 8561 Use char because int might match the return type of a GCC 8562 builtin and then its argument prototype would still apply. */ 8563char snf_init (); 8564int 8565main (void) 8566{ 8567return snf_init (); 8568 ; 8569 return 0; 8570} 8571_ACEOF 8572if ac_fn_c_try_link "$LINENO" 8573then : 8574 ac_cv_lib_snf_snf_init=yes 8575else $as_nop 8576 ac_cv_lib_snf_snf_init=no 8577fi 8578rm -f core conftest.err conftest.$ac_objext conftest.beam \ 8579 conftest$ac_exeext conftest.$ac_ext 8580LIBS=$ac_check_lib_save_LIBS 8581fi 8582{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_snf_snf_init" >&5 8583printf "%s\n" "$ac_cv_lib_snf_snf_init" >&6; } 8584if test "x$ac_cv_lib_snf_snf_init" = xyes 8585then : 8586 ac_cv_lbl_snf_api="yes" 8587fi 8588 8589 8590 CFLAGS="$save_CFLAGS" 8591 LIBS="$save_LIBS" 8592 LDFLAGS="$save_LDFLAGS" 8593 8594 if test "$ac_cv_lbl_snf_api" = no; then 8595 as_fn_error $? "SNF API cannot correctly be linked; check config.log" "$LINENO" 5 8596 fi 8597 fi 8598 8599 if test "$ac_cv_lbl_snf_api" = yes; then 8600 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes ($snf_root)" >&5 8601printf "%s\n" "yes ($snf_root)" >&6; } 8602 8603 V_INCLS="$V_INCLS -I$snf_include_dir" 8604 ADDITIONAL_LIBS="$ADDITIONAL_LIBS -L$snf_lib_dir -lsnf" 8605 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC -L$snf_lib_dir -lsnf" 8606 LIBS_PRIVATE="$LIBS_PRIVATE -L$snf_lib_dir -lsnf" 8607 8608 if test "$V_PCAP" != snf ; then 8609 MODULE_C_SRC="$MODULE_C_SRC pcap-snf.c" 8610 fi 8611 8612 8613printf "%s\n" "#define HAVE_SNF_API 1" >>confdefs.h 8614 8615 else 8616 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8617printf "%s\n" "no" >&6; } 8618 8619 if test "$want_snf" = yes; then 8620 # User requested "snf" capture type but 8621 # we couldn't find the Sniffer API support. 8622 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 8623 fi 8624 8625 if test "$want_snf" = yes; then 8626 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 8627 fi 8628 fi 8629fi 8630 8631# Check for Riverbed TurboCap support. 8632 8633# Check whether --with-turbocap was given. 8634if test ${with_turbocap+y} 8635then : 8636 withval=$with_turbocap; 8637 if test "$withval" = no 8638 then 8639 # User explicitly doesn't want TurboCap 8640 want_turbocap=no 8641 elif test "$withval" = yes 8642 then 8643 # User wants TurboCap support but hasn't specified a directory. 8644 want_turbocap=yes 8645 else 8646 # User wants TurboCap support with a specified directory. 8647 want_turbocap=yes 8648 turbocap_root=$withval 8649 fi 8650 8651else $as_nop 8652 8653 if test "xxx_only" = yes; then 8654 # User requested something-else-only pcap, so they don't 8655 # want TurboCap support. 8656 want_turbocap=no 8657 else 8658 # 8659 # Use TurboCap API if present, otherwise don't 8660 # 8661 want_turbocap=ifpresent 8662 fi 8663 8664fi 8665 8666 8667ac_cv_lbl_turbocap_api=no 8668if test "$want_turbocap" != no; then 8669 8670 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether TurboCap is supported" >&5 8671printf %s "checking whether TurboCap is supported... " >&6; } 8672 8673 8674 save_CFLAGS="$CFLAGS" 8675 save_LIBS="$LIBS" 8676 save_LDFLAGS="$LDFLAGS" 8677 8678 if test ! -z "$turbocap_root"; then 8679 TURBOCAP_CFLAGS="-I$turbocap_root/include" 8680 TURBOCAP_LDFLAGS="-L$turbocap_root/lib" 8681 CFLAGS="$CFLAGS $TURBOCAP_CFLAGS" 8682 LDFLAGS="$LDFLAGS $TURBOCAP_LDFLAGS" 8683 fi 8684 8685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8686/* end confdefs.h. */ 8687 8688 #include <TcApi.h> 8689 8690int 8691main (void) 8692{ 8693 8694 TC_INSTANCE a; TC_PORT b; TC_BOARD c; 8695 TC_INSTANCE i; 8696 (void)TcInstanceCreateByName("foo", &i); 8697 8698 ; 8699 return 0; 8700} 8701_ACEOF 8702if ac_fn_c_try_compile "$LINENO" 8703then : 8704 ac_cv_lbl_turbocap_api=yes 8705fi 8706rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8707 8708 8709 CFLAGS="$save_CFLAGS" 8710 LIBS="$save_LIBS" 8711 LDFLAGS="$save_LDFLAGS" 8712 8713 if test $ac_cv_lbl_turbocap_api = yes; then 8714 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8715printf "%s\n" "yes" >&6; } 8716 8717 MODULE_C_SRC="$MODULE_C_SRC pcap-tc.c" 8718 V_INCLS="$V_INCLS $TURBOCAP_CFLAGS" 8719 ADDITIONAL_LIBS="$ADDITIONAL_LIBS $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++" 8720 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++" 8721 LIBS_PRIVATE="$LIBS_PRIVATE $TURBOCAP_LDFLAGS -lTcApi -lpthread -lstdc++" 8722 8723 8724printf "%s\n" "#define HAVE_TC_API 1" >>confdefs.h 8725 8726 else 8727 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8728printf "%s\n" "no" >&6; } 8729 8730 if test "$want_turbocap" = yes; then 8731 # User wanted Turbo support but we couldn't find it. 8732 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 8733 fi 8734 fi 8735fi 8736 8737{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable remote packet capture" >&5 8738printf %s "checking whether to enable remote packet capture... " >&6; } 8739# Check whether --enable-remote was given. 8740if test ${enable_remote+y} 8741then : 8742 enableval=$enable_remote; 8743else $as_nop 8744 enableval=no 8745fi 8746 8747case "$enableval" in 8748yes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8749printf "%s\n" "yes" >&6; } 8750 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Remote packet capture may expose libpcap-based applications" >&5 8751printf "%s\n" "$as_me: WARNING: Remote packet capture may expose libpcap-based applications" >&2;} 8752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: to attacks by malicious remote capture servers!" >&5 8753printf "%s\n" "$as_me: WARNING: to attacks by malicious remote capture servers!" >&2;} 8754 # 8755 # rpcapd requires pthreads on UN*X. 8756 # 8757 if test "$ac_lbl_have_pthreads" != "found"; then 8758 as_fn_error $? "rpcapd requires pthreads, but we didn't find them" "$LINENO" 5 8759 fi 8760 # 8761 # It also requires crypt(). 8762 # Do we have it in the system libraries? 8763 # 8764 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt" 8765if test "x$ac_cv_func_crypt" = xyes 8766then : 8767 8768else $as_nop 8769 8770 # 8771 # No. Do we have it in -lcrypt? 8772 # 8773 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 8774printf %s "checking for crypt in -lcrypt... " >&6; } 8775if test ${ac_cv_lib_crypt_crypt+y} 8776then : 8777 printf %s "(cached) " >&6 8778else $as_nop 8779 ac_check_lib_save_LIBS=$LIBS 8780LIBS="-lcrypt $LIBS" 8781cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8782/* end confdefs.h. */ 8783 8784/* Override any GCC internal prototype to avoid an error. 8785 Use char because int might match the return type of a GCC 8786 builtin and then its argument prototype would still apply. */ 8787char crypt (); 8788int 8789main (void) 8790{ 8791return crypt (); 8792 ; 8793 return 0; 8794} 8795_ACEOF 8796if ac_fn_c_try_link "$LINENO" 8797then : 8798 ac_cv_lib_crypt_crypt=yes 8799else $as_nop 8800 ac_cv_lib_crypt_crypt=no 8801fi 8802rm -f core conftest.err conftest.$ac_objext conftest.beam \ 8803 conftest$ac_exeext conftest.$ac_ext 8804LIBS=$ac_check_lib_save_LIBS 8805fi 8806{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5 8807printf "%s\n" "$ac_cv_lib_crypt_crypt" >&6; } 8808if test "x$ac_cv_lib_crypt_crypt" = xyes 8809then : 8810 8811 # 8812 # Yes; add -lcrypt to the libraries for rpcapd. 8813 # 8814 RPCAPD_LIBS="$RPCAPD_LIBS -lcrypt" 8815 8816else $as_nop 8817 8818 as_fn_error $? "rpcapd requires crypt(), but we didn't find it" "$LINENO" 5 8819 8820fi 8821 8822 8823fi 8824 8825 8826 # 8827 # OK, we have crypt(). Do we have getspnam()? 8828 # 8829 ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam" 8830if test "x$ac_cv_func_getspnam" = xyes 8831then : 8832 printf "%s\n" "#define HAVE_GETSPNAM 1" >>confdefs.h 8833 8834fi 8835 8836 8837 # 8838 # Check for various members of struct msghdr. 8839 # 8840 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_control" "ac_cv_member_struct_msghdr_msg_control" " 8841 #include \"ftmacros.h\" 8842 #include <sys/socket.h> 8843 8844" 8845if test "x$ac_cv_member_struct_msghdr_msg_control" = xyes 8846then : 8847 8848printf "%s\n" "#define HAVE_STRUCT_MSGHDR_MSG_CONTROL 1" >>confdefs.h 8849 8850 8851fi 8852 8853 ac_fn_c_check_member "$LINENO" "struct msghdr" "msg_flags" "ac_cv_member_struct_msghdr_msg_flags" " 8854 #include \"ftmacros.h\" 8855 #include <sys/socket.h> 8856 8857" 8858if test "x$ac_cv_member_struct_msghdr_msg_flags" = xyes 8859then : 8860 8861printf "%s\n" "#define HAVE_STRUCT_MSGHDR_MSG_FLAGS 1" >>confdefs.h 8862 8863 8864fi 8865 8866 8867 # 8868 # Optionally, we may want to support SSL. 8869 # Check for OpenSSL/libressl. 8870 # 8871 # First, try looking for it with pkg-config, if we have it. 8872 # 8873 # Homebrew's pkg-config does not, by default, look for 8874 # pkg-config files for packages it has installed. 8875 # Furthermore, at least for OpenSSL, they appear to be 8876 # dumped in package-specific directories whose paths are 8877 # not only package-specific but package-version-specific. 8878 # 8879 # So the only way to find openssl is to get the value of 8880 # PKG_CONFIG_PATH from "brew --env openssl" and add that 8881 # to PKG_CONFIG_PATH. (No, we can't just assume it's under 8882 # /usr/local; Homebrew have conveniently chosen to put it 8883 # under /opt/homebrew on ARM.) 8884 # 8885 # That's the nice thing about Homebrew - it makes things easier! 8886 # Thanks! 8887 # 8888 save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH" 8889 if test -n "$BREW"; then 8890 openssl_pkgconfig_dir=`$BREW --env --plain openssl | sed -n 's/PKG_CONFIG_PATH: //p'` 8891 PKG_CONFIG_PATH="$openssl_pkgconfig_dir:$PKG_CONFIG_PATH" 8892 fi 8893 8894{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl with pkg-config" >&5 8895printf %s "checking for openssl with pkg-config... " >&6; } 8896if test -n "$PKG_CONFIG"; then 8897 8898 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"openssl\""; } >&5 8899 ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 8900 ac_status=$? 8901 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 8902 test $ac_status = 0; }; then 8903 # 8904 # The package was found, so try to get its C flags and 8905 # libraries. 8906 # 8907 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5 8908printf "%s\n" "found" >&6; } 8909 if test ! -n "$OPENSSL_CFLAGS"; then 8910 OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null` 8911 if test "x$?" != "x0"; then 8912 # 8913 # That failed - report an error. 8914 # Re-run the command, telling pkg-config to print an error 8915 # message, capture the error message, and report it. 8916 # This causes the configuration script to fail, as it means 8917 # the script is almost certainly doing something wrong. 8918 # 8919 8920if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8921 _pkg_short_errors_supported=yes 8922else 8923 _pkg_short_errors_supported=no 8924fi 8925 if test $_pkg_short_errors_supported = yes; then 8926 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --cflags "openssl" 2>&1` 8927 else 8928 _pkg_error_string=`$PKG_CONFIG --print-errors --cflags "openssl" 2>&1` 8929 fi 8930 as_fn_error $? "$PKG_CONFIG --cflags \"openssl\" failed: $_pkg_error_string" "$LINENO" 5 8931 fi 8932 fi 8933 if test ! -n "$OPENSSL_LIBS"; then 8934 OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null` 8935 if test "x$?" != "x0"; then 8936 # 8937 # That failed - report an error. 8938 # Re-run the command, telling pkg-config to print an error 8939 # message, capture the error message, and report it. 8940 # This causes the configuration script to fail, as it means 8941 # the script is almost certainly doing something wrong. 8942 # 8943 8944if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8945 _pkg_short_errors_supported=yes 8946else 8947 _pkg_short_errors_supported=no 8948fi 8949 if test $_pkg_short_errors_supported = yes; then 8950 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs "openssl" 2>&1` 8951 else 8952 _pkg_error_string=`$PKG_CONFIG --print-errors --libs "openssl" 2>&1` 8953 fi 8954 as_fn_error $? "$PKG_CONFIG --libs \"openssl\" failed: $_pkg_error_string" "$LINENO" 5 8955 fi 8956 fi 8957 if test ! -n "$OPENSSL_LIBS_STATIC"; then 8958 OPENSSL_LIBS_STATIC=`$PKG_CONFIG --libs --static "openssl" 2>/dev/null` 8959 if test "x$?" != "x0"; then 8960 # 8961 # That failed - report an error. 8962 # Re-run the command, telling pkg-config to print an error 8963 # message, capture the error message, and report it. 8964 # This causes the configuration script to fail, as it means 8965 # the script is almost certainly doing something wrong. 8966 # 8967 8968if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 8969 _pkg_short_errors_supported=yes 8970else 8971 _pkg_short_errors_supported=no 8972fi 8973 if test $_pkg_short_errors_supported = yes; then 8974 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs --static "openssl" 2>&1` 8975 else 8976 _pkg_error_string=`$PKG_CONFIG --print-errors --libs --static "openssl" 2>&1` 8977 fi 8978 as_fn_error $? "$PKG_CONFIG --libs --static \"openssl\" failed: $_pkg_error_string" "$LINENO" 5 8979 fi 8980 fi 8981 8982 # 8983 # We found OpenSSL/libressl. 8984 # 8985 HAVE_OPENSSL=yes 8986 REQUIRES_PRIVATE="$REQUIRES_PRIVATE openssl" 8987 8988 else 8989 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 8990printf "%s\n" "not found" >&6; } 8991 : 8992 fi 8993else 8994 # No pkg-config, so obviously not found with pkg-config. 8995 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config not found" >&5 8996printf "%s\n" "pkg-config not found" >&6; } 8997 : 8998fi 8999 9000 PKG_CONFIG_PATH="$save_PKG_CONFIG_PATH" 9001 9002 # 9003 # If it wasn't found, and we have Homebrew installed, see 9004 # if it's in Homebrew. 9005 # 9006 if test "x$HAVE_OPENSSL" != "xyes" -a -n "$BREW"; then 9007 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl in Homebrew" >&5 9008printf %s "checking for openssl in Homebrew... " >&6; } 9009 # 9010 # The brew man page lies when it speaks of 9011 # $BREW --prefix --installed <formula> 9012 # outputting nothing. In Homebrew 3.3.16, 9013 # it produces output regardless of whether 9014 # the formula is installed or not, so we 9015 # send the standard output and error to 9016 # the bit bucket. 9017 # 9018 if $BREW --prefix --installed openssl >/dev/null 2>&1; then 9019 # 9020 # Yes. Get the include directory and library 9021 # directory. (No, we can't just assume it's 9022 # under /usr/local; Homebrew have conveniently 9023 # chosen to put it under /opt/homebrew on ARM.) 9024 # 9025 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9026printf "%s\n" "yes" >&6; } 9027 HAVE_OPENSSL=yes 9028 openssl_path=`$BREW --prefix openssl` 9029 OPENSSL_CFLAGS="-I$openssl_path/include" 9030 OPENSSL_LIBS="-L$openssl_path/lib -lssl -lcrypto" 9031 OPENSSL_LIBS_STATIC="-L$openssl_path/lib -lssl -lcrypto" 9032 OPENSSL_LIBS_PRIVATE="-L$openssl_path/lib -lssl -lcrypto" 9033 else 9034 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9035printf "%s\n" "no" >&6; } 9036 fi 9037 fi 9038 9039 # 9040 # If it wasn't found, and /usr/local/include and /usr/local/lib 9041 # exist, check if it's in /usr/local. (We check whether they 9042 # exist because, if they don't exist, the compiler will warn 9043 # about that and then ignore the argument, so they test 9044 # using just the system header files and libraries.) 9045 # 9046 # We include the standard include file to 1) make sure that 9047 # it's installed (if it's just a shared library for the 9048 # benefit of existing programs, that's not useful) and 2) 9049 # because SSL_library_init() is a library routine in some 9050 # versions and a #defined wrapper around OPENSSL_init_ssl() 9051 # in others. 9052 # 9053 if test "x$HAVE_OPENSSL" != "xyes" -a -d "/usr/local/include" -a -d "/usr/local/lib"; then 9054 9055 save_CFLAGS="$CFLAGS" 9056 save_LIBS="$LIBS" 9057 save_LDFLAGS="$LDFLAGS" 9058 9059 CFLAGS="$CFLAGS -I/usr/local/include" 9060 LIBS="$LIBS -L/usr/local/lib -lssl -lcrypto" 9061 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have OpenSSL/libressl in /usr/local that we can use" >&5 9062printf %s "checking whether we have OpenSSL/libressl in /usr/local that we can use... " >&6; } 9063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9064/* end confdefs.h. */ 9065 9066#include <openssl/ssl.h> 9067 9068int 9069main (void) 9070{ 9071 9072SSL_library_init(); 9073return 0; 9074 9075 ; 9076 return 0; 9077} 9078_ACEOF 9079if ac_fn_c_try_link "$LINENO" 9080then : 9081 9082 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9083printf "%s\n" "yes" >&6; } 9084 HAVE_OPENSSL=yes 9085 OPENSSL_CFLAGS="-I/usr/local/include" 9086 OPENSSL_LIBS="-L/usr/local/lib -lssl -lcrypto" 9087 OPENSSL_LIBS_STATIC="-L/usr/local/lib -lssl -lcrypto" 9088 OPENSSL_LIBS_PRIVATE="-L/usr/local/lib -lssl -lcrypto" 9089 9090else $as_nop 9091 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9092printf "%s\n" "no" >&6; } 9093fi 9094rm -f core conftest.err conftest.$ac_objext conftest.beam \ 9095 conftest$ac_exeext conftest.$ac_ext 9096 9097 CFLAGS="$save_CFLAGS" 9098 LIBS="$save_LIBS" 9099 LDFLAGS="$save_LDFLAGS" 9100 9101 fi 9102 9103 # 9104 # If it wasn't found, check if it's a system library. 9105 # 9106 # We include the standard include file to 1) make sure that 9107 # it's installed (if it's just a shared library for the 9108 # benefit of existing programs, that's not useful) and 2) 9109 # because SSL_library_init() is a library routine in some 9110 # versions and a #defined wrapper around OPENSSL_init_ssl() 9111 # in others. 9112 # 9113 if test "x$HAVE_OPENSSL" != "xyes"; then 9114 9115 save_CFLAGS="$CFLAGS" 9116 save_LIBS="$LIBS" 9117 save_LDFLAGS="$LDFLAGS" 9118 9119 LIBS="$LIBS -lssl -lcrypto" 9120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have a system OpenSSL/libressl that we can use" >&5 9121printf %s "checking whether we have a system OpenSSL/libressl that we can use... " >&6; } 9122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9123/* end confdefs.h. */ 9124 9125#include <openssl/ssl.h> 9126 9127int 9128main (void) 9129{ 9130 9131SSL_library_init(); 9132return 0; 9133 9134 ; 9135 return 0; 9136} 9137_ACEOF 9138if ac_fn_c_try_link "$LINENO" 9139then : 9140 9141 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9142printf "%s\n" "yes" >&6; } 9143 HAVE_OPENSSL=yes 9144 OPENSSL_LIBS="-lssl -lcrypto" 9145 OPENSSL_LIBS_STATIC="-lssl -lcrypto" 9146 OPENSSL_LIBS_PRIVATE="-lssl -lcrypto" 9147 9148else $as_nop 9149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9150printf "%s\n" "no" >&6; } 9151fi 9152rm -f core conftest.err conftest.$ac_objext conftest.beam \ 9153 conftest$ac_exeext conftest.$ac_ext 9154 9155 CFLAGS="$save_CFLAGS" 9156 LIBS="$save_LIBS" 9157 LDFLAGS="$save_LDFLAGS" 9158 9159 fi 9160 9161 # 9162 # OK, did we find it? 9163 # 9164 if test "x$HAVE_OPENSSL" = "xyes"; then 9165 9166printf "%s\n" "#define HAVE_OPENSSL 1" >>confdefs.h 9167 9168 V_INCLS="$V_INCLS $OPENSSL_CFLAGS" 9169 ADDITIONAL_LIBS="$ADDITIONAL_LIBS $OPENSSL_LIBS" 9170 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $OPENSSL_LIBS_STATIC" 9171 LIBS_PRIVATE="$LIBS_PRIVATE $OPENSSL_LIBS_PRIVATE" 9172 REQUIRES_PRIVATE="$REQUIRES_PRIVATE $OPENSSL_REQUIRES_PRIVATE" 9173 REMOTE_C_SRC="$REMOTE_C_SRC sslutils.c" 9174 else 9175 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL not found" >&5 9176printf "%s\n" "$as_me: OpenSSL not found" >&6;} 9177 fi 9178 9179 9180printf "%s\n" "#define ENABLE_REMOTE /**/" >>confdefs.h 9181 9182 REMOTE_C_SRC="$REMOTE_C_SRC pcap-new.c pcap-rpcap.c rpcap-protocol.c sockutils.c" 9183 BUILD_RPCAPD=build-rpcapd 9184 INSTALL_RPCAPD=install-rpcapd 9185 ;; 9186*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9187printf "%s\n" "no" >&6; } 9188 ;; 9189esac 9190 9191{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build optimizer debugging code" >&5 9192printf %s "checking whether to build optimizer debugging code... " >&6; } 9193# Check whether --enable-optimizer-dbg was given. 9194if test ${enable_optimizer_dbg+y} 9195then : 9196 enableval=$enable_optimizer_dbg; 9197fi 9198 9199if test "$enable_optimizer_dbg" = "yes"; then 9200 9201printf "%s\n" "#define BDEBUG 1" >>confdefs.h 9202 9203fi 9204{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${enable_optimizer_dbg-no}" >&5 9205printf "%s\n" "${enable_optimizer_dbg-no}" >&6; } 9206 9207{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to build parser debugging code" >&5 9208printf %s "checking whether to build parser debugging code... " >&6; } 9209# Check whether --enable-yydebug was given. 9210if test ${enable_yydebug+y} 9211then : 9212 enableval=$enable_yydebug; 9213fi 9214 9215if test "$enable_yydebug" = "yes"; then 9216 9217printf "%s\n" "#define YYDEBUG 1" >>confdefs.h 9218 9219fi 9220{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: ${enable_yydebug-no}" >&5 9221printf "%s\n" "${enable_yydebug-no}" >&6; } 9222 9223# 9224# Look for {f}lex. 9225# 9226for ac_prog in flex lex 9227do 9228 # Extract the first word of "$ac_prog", so it can be a program name with args. 9229set dummy $ac_prog; ac_word=$2 9230{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9231printf %s "checking for $ac_word... " >&6; } 9232if test ${ac_cv_prog_LEX+y} 9233then : 9234 printf %s "(cached) " >&6 9235else $as_nop 9236 if test -n "$LEX"; then 9237 ac_cv_prog_LEX="$LEX" # Let the user override the test. 9238else 9239as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9240for as_dir in $PATH 9241do 9242 IFS=$as_save_IFS 9243 case $as_dir in #((( 9244 '') as_dir=./ ;; 9245 */) ;; 9246 *) as_dir=$as_dir/ ;; 9247 esac 9248 for ac_exec_ext in '' $ac_executable_extensions; do 9249 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 9250 ac_cv_prog_LEX="$ac_prog" 9251 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 9252 break 2 9253 fi 9254done 9255 done 9256IFS=$as_save_IFS 9257 9258fi 9259fi 9260LEX=$ac_cv_prog_LEX 9261if test -n "$LEX"; then 9262 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 9263printf "%s\n" "$LEX" >&6; } 9264else 9265 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9266printf "%s\n" "no" >&6; } 9267fi 9268 9269 9270 test -n "$LEX" && break 9271done 9272test -n "$LEX" || LEX=":" 9273 9274 if test "x$LEX" != "x:"; then 9275 cat >conftest.l <<_ACEOF 9276%{ 9277#ifdef __cplusplus 9278extern "C" 9279#endif 9280int yywrap(void); 9281%} 9282%% 9283a { ECHO; } 9284b { REJECT; } 9285c { yymore (); } 9286d { yyless (1); } 9287e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ 9288#ifdef __cplusplus 9289 yyless ((yyinput () != 0)); 9290#else 9291 yyless ((input () != 0)); 9292#endif 9293 } 9294f { unput (yytext[0]); } 9295. { BEGIN INITIAL; } 9296%% 9297#ifdef YYTEXT_POINTER 9298extern char *yytext; 9299#endif 9300int 9301yywrap (void) 9302{ 9303 return 1; 9304} 9305int 9306main (void) 9307{ 9308 return ! yylex (); 9309} 9310_ACEOF 9311{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex output file root" >&5 9312printf %s "checking for lex output file root... " >&6; } 9313if test ${ac_cv_prog_lex_root+y} 9314then : 9315 printf %s "(cached) " >&6 9316else $as_nop 9317 9318ac_cv_prog_lex_root=unknown 9319{ { ac_try="$LEX conftest.l" 9320case "(($ac_try" in 9321 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 9322 *) ac_try_echo=$ac_try;; 9323esac 9324eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 9325printf "%s\n" "$ac_try_echo"; } >&5 9326 (eval "$LEX conftest.l") 2>&5 9327 ac_status=$? 9328 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 9329 test $ac_status = 0; } && 9330if test -f lex.yy.c; then 9331 ac_cv_prog_lex_root=lex.yy 9332elif test -f lexyy.c; then 9333 ac_cv_prog_lex_root=lexyy 9334fi 9335fi 9336{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 9337printf "%s\n" "$ac_cv_prog_lex_root" >&6; } 9338if test "$ac_cv_prog_lex_root" = unknown 9339then : 9340 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot find output from $LEX; giving up on $LEX" >&5 9341printf "%s\n" "$as_me: WARNING: cannot find output from $LEX; giving up on $LEX" >&2;} 9342 LEX=: LEXLIB= 9343fi 9344LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root 9345 9346if test ${LEXLIB+y} 9347then : 9348 9349else $as_nop 9350 9351 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lex library" >&5 9352printf %s "checking for lex library... " >&6; } 9353if test ${ac_cv_lib_lex+y} 9354then : 9355 printf %s "(cached) " >&6 9356else $as_nop 9357 9358 ac_save_LIBS="$LIBS" 9359 ac_found=false 9360 for ac_cv_lib_lex in 'none needed' -lfl -ll 'not found'; do 9361 case $ac_cv_lib_lex in #( 9362 'none needed') : 9363 ;; #( 9364 'not found') : 9365 break ;; #( 9366 *) : 9367 LIBS="$ac_cv_lib_lex $ac_save_LIBS" ;; #( 9368 *) : 9369 ;; 9370esac 9371 9372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9373/* end confdefs.h. */ 9374`cat $LEX_OUTPUT_ROOT.c` 9375_ACEOF 9376if ac_fn_c_try_link "$LINENO" 9377then : 9378 ac_found=: 9379fi 9380rm -f core conftest.err conftest.$ac_objext conftest.beam \ 9381 conftest$ac_exeext conftest.$ac_ext 9382 if $ac_found; then 9383 break 9384 fi 9385 done 9386 LIBS="$ac_save_LIBS" 9387 9388fi 9389{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 9390printf "%s\n" "$ac_cv_lib_lex" >&6; } 9391 if test "$ac_cv_lib_lex" = 'not found' 9392then : 9393 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: required lex library not found; giving up on $LEX" >&5 9394printf "%s\n" "$as_me: WARNING: required lex library not found; giving up on $LEX" >&2;} 9395 LEX=: LEXLIB= 9396elif test "$ac_cv_lib_lex" = 'none needed' 9397then : 9398 LEXLIB='' 9399else $as_nop 9400 LEXLIB=$ac_cv_lib_lex 9401fi 9402 ac_save_LIBS="$LIBS" 9403 LIBS= 9404 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing yywrap" >&5 9405printf %s "checking for library containing yywrap... " >&6; } 9406if test ${ac_cv_search_yywrap+y} 9407then : 9408 printf %s "(cached) " >&6 9409else $as_nop 9410 ac_func_search_save_LIBS=$LIBS 9411cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9412/* end confdefs.h. */ 9413 9414/* Override any GCC internal prototype to avoid an error. 9415 Use char because int might match the return type of a GCC 9416 builtin and then its argument prototype would still apply. */ 9417char yywrap (); 9418int 9419main (void) 9420{ 9421return yywrap (); 9422 ; 9423 return 0; 9424} 9425_ACEOF 9426for ac_lib in '' fl l 9427do 9428 if test -z "$ac_lib"; then 9429 ac_res="none required" 9430 else 9431 ac_res=-l$ac_lib 9432 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 9433 fi 9434 if ac_fn_c_try_link "$LINENO" 9435then : 9436 ac_cv_search_yywrap=$ac_res 9437fi 9438rm -f core conftest.err conftest.$ac_objext conftest.beam \ 9439 conftest$ac_exeext 9440 if test ${ac_cv_search_yywrap+y} 9441then : 9442 break 9443fi 9444done 9445if test ${ac_cv_search_yywrap+y} 9446then : 9447 9448else $as_nop 9449 ac_cv_search_yywrap=no 9450fi 9451rm conftest.$ac_ext 9452LIBS=$ac_func_search_save_LIBS 9453fi 9454{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_yywrap" >&5 9455printf "%s\n" "$ac_cv_search_yywrap" >&6; } 9456ac_res=$ac_cv_search_yywrap 9457if test "$ac_res" != no 9458then : 9459 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 9460 LEXLIB="$LIBS" 9461fi 9462 9463 LIBS="$ac_save_LIBS" 9464fi 9465 9466 9467if test "$LEX" != : 9468then : 9469 9470{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 9471printf %s "checking whether yytext is a pointer... " >&6; } 9472if test ${ac_cv_prog_lex_yytext_pointer+y} 9473then : 9474 printf %s "(cached) " >&6 9475else $as_nop 9476 # POSIX says lex can declare yytext either as a pointer or an array; the 9477# default is implementation-dependent. Figure out which it is, since 9478# not all implementations provide the %pointer and %array declarations. 9479ac_cv_prog_lex_yytext_pointer=no 9480cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9481/* end confdefs.h. */ 9482 9483 #define YYTEXT_POINTER 1 9484`cat $LEX_OUTPUT_ROOT.c` 9485_ACEOF 9486if ac_fn_c_try_compile "$LINENO" 9487then : 9488 ac_cv_prog_lex_yytext_pointer=yes 9489fi 9490rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 9491 9492fi 9493{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 9494printf "%s\n" "$ac_cv_prog_lex_yytext_pointer" >&6; } 9495if test $ac_cv_prog_lex_yytext_pointer = yes; then 9496 9497printf "%s\n" "#define YYTEXT_POINTER 1" >>confdefs.h 9498 9499fi 9500 9501fi 9502rm -f conftest.l $LEX_OUTPUT_ROOT.c 9503 9504fi 9505if test "$LEX" = ":"; then 9506 as_fn_error $? "Neither flex nor lex was found." "$LINENO" 5 9507fi 9508 9509# 9510# Make sure {f}lex supports the -P, --header-file, and --nounput flags 9511# and supports processing our scanner.l. 9512# 9513{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for capable lex" >&5 9514printf %s "checking for capable lex... " >&6; } 9515if test ${tcpdump_cv_capable_lex+y} 9516then : 9517 printf %s "(cached) " >&6 9518else $as_nop 9519 if $LEX -P pcap_ --header-file=/dev/null --nounput -t $srcdir/scanner.l > /dev/null 2>&1; then 9520 tcpdump_cv_capable_lex=yes 9521 else 9522 tcpdump_cv_capable_lex=insufficient 9523 fi 9524fi 9525{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_lex" >&5 9526printf "%s\n" "$tcpdump_cv_capable_lex" >&6; } 9527if test $tcpdump_cv_capable_lex = insufficient ; then 9528 as_fn_error $? "$LEX is insufficient to compile libpcap. 9529 libpcap requires Flex 2.5.31 or later, or a compatible version of lex. 9530 If a suitable version of Lex/Flex is available as a non-standard command 9531 and/or not in the PATH, you can specify it using the LEX environment 9532 variable. That said, on some systems the error can mean that Flex/Lex is 9533 actually acceptable, but m4 is not. Likewise, if a suitable version of 9534 m4 (such as GNU M4) is available but has not been detected, you can 9535 specify it using the M4 environment variable." "$LINENO" 5 9536fi 9537 9538# 9539# Look for yacc/bison/byacc. 9540# If it's Bison, we do not want -y, as 1) we will be using -o to cause 9541# the output for XXX.y to be written to XXX.c and 2) we don't want 9542# it to issue warnings about stuff not supported by POSIX YACC - we 9543# want to use that stuff, and don't care whether plain YACC supports 9544# it or not, we require either Bison or Berkeley YACC. 9545# 9546BISON_BYACC="" 9547# 9548# Look for Bison. 9549# 9550for ac_prog in bison 9551do 9552 # Extract the first word of "$ac_prog", so it can be a program name with args. 9553set dummy $ac_prog; ac_word=$2 9554{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9555printf %s "checking for $ac_word... " >&6; } 9556if test ${ac_cv_prog_BISON_BYACC+y} 9557then : 9558 printf %s "(cached) " >&6 9559else $as_nop 9560 if test -n "$BISON_BYACC"; then 9561 ac_cv_prog_BISON_BYACC="$BISON_BYACC" # Let the user override the test. 9562else 9563as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9564for as_dir in $PATH 9565do 9566 IFS=$as_save_IFS 9567 case $as_dir in #((( 9568 '') as_dir=./ ;; 9569 */) ;; 9570 *) as_dir=$as_dir/ ;; 9571 esac 9572 for ac_exec_ext in '' $ac_executable_extensions; do 9573 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 9574 ac_cv_prog_BISON_BYACC="$ac_prog" 9575 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 9576 break 2 9577 fi 9578done 9579 done 9580IFS=$as_save_IFS 9581 9582fi 9583fi 9584BISON_BYACC=$ac_cv_prog_BISON_BYACC 9585if test -n "$BISON_BYACC"; then 9586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BISON_BYACC" >&5 9587printf "%s\n" "$BISON_BYACC" >&6; } 9588else 9589 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9590printf "%s\n" "no" >&6; } 9591fi 9592 9593 9594 test -n "$BISON_BYACC" && break 9595done 9596 9597if test x"$BISON_BYACC" != x; then 9598 # 9599 # We found Bison. 9600 # 9601 # Bison prior to 2.4(.1) doesn't support "%define api.pure", so use 9602 # "%pure-parser". 9603 # 9604 bison_major_version=`$BISON_BYACC -V | sed -n 's/.* \([1-9][0-9]*\)\.[0-9][0-9.]*/\1/p'` 9605 bison_minor_version=`$BISON_BYACC -V | sed -n 's/.* [1-9][0-9]*\.\([0-9]+\).*/\1/p'` 9606 if test "$bison_major_version" -lt 2 -o \ 9607 \( "$bison_major_version" -eq 2 -a "$bison_major_version" -lt 4 \) 9608 then 9609 REENTRANT_PARSER="%pure-parser" 9610 else 9611 REENTRANT_PARSER="%define api.pure" 9612 fi 9613else 9614 # 9615 # We didn't find Bison; check for Berkeley YACC, under the 9616 # names byacc and yacc. 9617 # 9618 for ac_prog in byacc yacc 9619do 9620 # Extract the first word of "$ac_prog", so it can be a program name with args. 9621set dummy $ac_prog; ac_word=$2 9622{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 9623printf %s "checking for $ac_word... " >&6; } 9624if test ${ac_cv_prog_BISON_BYACC+y} 9625then : 9626 printf %s "(cached) " >&6 9627else $as_nop 9628 if test -n "$BISON_BYACC"; then 9629 ac_cv_prog_BISON_BYACC="$BISON_BYACC" # Let the user override the test. 9630else 9631as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 9632for as_dir in $PATH 9633do 9634 IFS=$as_save_IFS 9635 case $as_dir in #((( 9636 '') as_dir=./ ;; 9637 */) ;; 9638 *) as_dir=$as_dir/ ;; 9639 esac 9640 for ac_exec_ext in '' $ac_executable_extensions; do 9641 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 9642 ac_cv_prog_BISON_BYACC="$ac_prog" 9643 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 9644 break 2 9645 fi 9646done 9647 done 9648IFS=$as_save_IFS 9649 9650fi 9651fi 9652BISON_BYACC=$ac_cv_prog_BISON_BYACC 9653if test -n "$BISON_BYACC"; then 9654 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BISON_BYACC" >&5 9655printf "%s\n" "$BISON_BYACC" >&6; } 9656else 9657 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9658printf "%s\n" "no" >&6; } 9659fi 9660 9661 9662 test -n "$BISON_BYACC" && break 9663done 9664 9665 if test x"$BISON_BYACC" != x; then 9666 # 9667 # Make sure this is Berkeley YACC, not AT&T YACC; 9668 # the latter doesn't support reentrant parsers. 9669 # Run it with "-V"; that succeeds and reports the 9670 # version number with Berkeley YACC, but will 9671 # (probably) fail with various vendor flavors 9672 # of AT&T YACC. 9673 # 9674 # Hopefully this also eliminates any versions 9675 # of Berkeley YACC that don't support reentrant 9676 # parsers, if there are any. 9677 # 9678 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for capable yacc" >&5 9679printf %s "checking for capable yacc... " >&6; } 9680if test ${tcpdump_cv_capable_yacc+y} 9681then : 9682 printf %s "(cached) " >&6 9683else $as_nop 9684 if $BISON_BYACC -V >/dev/null 2>&1; then 9685 tcpdump_cv_capable_yacc=yes 9686 else 9687 tcpdump_cv_capable_yacc=insufficient 9688 fi 9689fi 9690{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcpdump_cv_capable_yacc" >&5 9691printf "%s\n" "$tcpdump_cv_capable_yacc" >&6; } 9692 if test $tcpdump_cv_capable_yacc = insufficient ; then 9693 as_fn_error $? "$BISON_BYACC is insufficient to compile libpcap. 9694 libpcap requires Bison, a newer version of Berkeley YACC with support 9695 for reentrant parsers, or another YACC compatible with them." "$LINENO" 5 9696 fi 9697 else 9698 # 9699 # OK, we found neither byacc nor yacc. 9700 # 9701 as_fn_error $? "Neither bison, byacc, nor yacc was found. 9702 libpcap requires Bison, a newer version of Berkeley YACC with support 9703 for reentrant parsers, or another YACC compatible with them." "$LINENO" 5 9704 fi 9705 9706 # 9707 # Berkeley YACC doesn't support "%define api.pure", so use 9708 # "%pure-parser". 9709 # 9710 REENTRANT_PARSER="%pure-parser" 9711fi 9712 9713 9714 9715# 9716# Do various checks for various OSes and versions of those OSes. 9717# 9718# Assume, by default, no support for shared libraries and V7/BSD 9719# convention for man pages (devices in section 4, file formats in 9720# section 5, miscellaneous info in section 7, administrative commands 9721# and daemons in section 8). Individual cases can override this. 9722# 9723DYEXT="none" 9724MAN_DEVICES=4 9725MAN_FILE_FORMATS=5 9726MAN_MISC_INFO=7 9727MAN_ADMIN_COMMANDS=8 9728case "$host_os" in 9729 9730aix*) 9731 9732printf "%s\n" "#define _SUN 1" >>confdefs.h 9733 9734 9735 # 9736 # AIX makes it fun to build shared and static libraries, 9737 # because they're *both* ".a" archive libraries. We 9738 # build the static library for the benefit of the traditional 9739 # scheme of building libpcap and tcpdump in subdirectories of 9740 # the same directory, with tcpdump statically linked with the 9741 # libpcap in question, but we also build a shared library as 9742 # "libpcap.shareda" and install *it*, rather than the static 9743 # library, as "libpcap.a". 9744 # 9745 DYEXT="shareda" 9746 9747 case "$V_PCAP" in 9748 9749 dlpi) 9750 # 9751 # If we're using DLPI, applications will need to 9752 # use /lib/pse.exp if present, as we use the 9753 # STREAMS routines. 9754 # 9755 pseexe="/lib/pse.exp" 9756 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5 9757printf %s "checking for $pseexe... " >&6; } 9758 if test -f $pseexe ; then 9759 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9760printf "%s\n" "yes" >&6; } 9761 LIBS="-I:$pseexe" 9762 fi 9763 ;; 9764 9765 bpf) 9766 # 9767 # If we're using BPF, we need "-lodm" and "-lcfg", as 9768 # we use them to load the BPF module. 9769 # 9770 LIBS="-lodm -lcfg" 9771 ;; 9772 esac 9773 ;; 9774 9775darwin*) 9776 DYEXT="dylib" 9777 V_CCOPT="$V_CCOPT -fno-common" 9778 # Check whether --enable-universal was given. 9779if test ${enable_universal+y} 9780then : 9781 enableval=$enable_universal; 9782fi 9783 9784 if test "$enable_universal" != "no"; then 9785 case "$host_os" in 9786 9787 darwin[0-7].*) 9788 # 9789 # Pre-Tiger. Build only for 32-bit PowerPC; no 9790 # need for any special compiler or linker flags. 9791 # 9792 ;; 9793 9794 darwin8.[0123]|darwin8.[0123].*) 9795 # 9796 # Tiger, prior to Intel support. Build 9797 # libraries and executables for 32-bit PowerPC 9798 # and 64-bit PowerPC, with 32-bit PowerPC first. 9799 # (I'm guessing that's what Apple does.) 9800 # 9801 # (The double brackets are needed because 9802 # autotools/m4 use brackets as a quoting 9803 # character; the double brackets turn into 9804 # single brackets in the generated configure 9805 # file.) 9806 # 9807 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64" 9808 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64" 9809 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64" 9810 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64" 9811 ;; 9812 9813 darwin8.[456]|darwin8.[456].*) 9814 # 9815 # Tiger, subsequent to Intel support but prior 9816 # to x86-64 support. Build libraries and 9817 # executables for 32-bit PowerPC, 64-bit 9818 # PowerPC, and 32-bit x86, with 32-bit PowerPC 9819 # first. (I'm guessing that's what Apple does.) 9820 # 9821 # (The double brackets are needed because 9822 # autotools/m4 use brackets as a quoting 9823 # character; the double brackets turn into 9824 # single brackets in the generated configure 9825 # file.) 9826 # 9827 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386" 9828 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386" 9829 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386" 9830 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386" 9831 ;; 9832 9833 darwin8.*) 9834 # 9835 # All other Tiger, so subsequent to x86-64 9836 # support. Build libraries and executables for 9837 # 32-bit PowerPC, 64-bit PowerPC, 32-bit x86, 9838 # and x86-64, with 32-bit PowerPC first. (I'm 9839 # guessing that's what Apple does.) 9840 # 9841 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64" 9842 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64" 9843 V_PROG_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64" 9844 V_PROG_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64" 9845 ;; 9846 9847 darwin9.*) 9848 # 9849 # Leopard. Build libraries for 32-bit PowerPC, 9850 # 64-bit PowerPC, 32-bit x86, and x86-64, with 9851 # 32-bit PowerPC first, and build executables 9852 # for 32-bit x86 and 32-bit PowerPC, with 32-bit 9853 # x86 first. (That's what Apple does.) 9854 # 9855 V_LIB_CCOPT_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64" 9856 V_LIB_LDFLAGS_FAT="-arch ppc -arch ppc64 -arch i386 -arch x86_64" 9857 V_PROG_CCOPT_FAT="-arch i386 -arch ppc" 9858 V_PROG_LDFLAGS_FAT="-arch i386 -arch ppc" 9859 ;; 9860 9861 darwin10.*) 9862 # 9863 # Snow Leopard. Build libraries for x86-64, 9864 # 32-bit x86, and 32-bit PowerPC, with x86-64 9865 # first, and build executables for x86-64 and 9866 # 32-bit x86, with x86-64 first. (That's what 9867 # Apple does, even though Snow Leopard doesn't 9868 # run on PPC, so PPC libpcap runs under Rosetta, 9869 # and Rosetta doesn't support BPF ioctls, so PPC 9870 # programs can't do live captures.) 9871 # 9872 V_LIB_CCOPT_FAT="-arch x86_64 -arch i386 -arch ppc" 9873 V_LIB_LDFLAGS_FAT="-arch x86_64 -arch i386 -arch ppc" 9874 V_PROG_CCOPT_FAT="-arch x86_64 -arch i386" 9875 V_PROG_LDFLAGS_FAT="-arch x86_64 -arch i386" 9876 ;; 9877 9878 darwin1[1-8]*) 9879 # 9880 # Post-Snow Leopard, pre-Catalina. Build 9881 # libraries for x86-64 and 32-bit x86, with 9882 # x86-64 first, and build executables only for 9883 # x86-64. (That's what Apple does.) This 9884 # requires no special flags for programs. 9885 # 9886 # We check whether we *can* build for i386 and, 9887 # if not, suggest that the user install the 9888 # /usr/include headers if they want to build 9889 # fat. 9890 # 9891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether building for 32-bit x86 is supported" >&5 9892printf %s "checking whether building for 32-bit x86 is supported... " >&6; } 9893 9894 save_CFLAGS="$CFLAGS" 9895 save_LIBS="$LIBS" 9896 save_LDFLAGS="$LDFLAGS" 9897 9898 CFLAGS="$CFLAGS -arch i386" 9899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9900/* end confdefs.h. */ 9901 9902int 9903main (void) 9904{ 9905return 0; 9906 ; 9907 return 0; 9908} 9909_ACEOF 9910if ac_fn_c_try_link "$LINENO" 9911then : 9912 9913 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9914printf "%s\n" "yes" >&6; } 9915 V_LIB_CCOPT_FAT="-arch x86_64" 9916 V_LIB_LDFLAGS_FAT="-arch x86_64" 9917 9918 # 9919 # OpenSSL installation on macOS seems 9920 # to install only the libs for 64-bit 9921 # x86 - at least that's what Brew does: 9922 # only configure 32-bit builds if we 9923 # don't have OpenSSL. 9924 # 9925 if test "$HAVE_OPENSSL" != yes; then 9926 V_LIB_CCOPT_FAT="$V_LIB_CCOPT_FAT -arch i386" 9927 V_LIB_LDFLAGS_FAT="$V_LIB_LDFLAGS_FAT -arch i386" 9928 fi 9929 9930else $as_nop 9931 9932 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9933printf "%s\n" "no" >&6; } 9934 V_LIB_CCOPT_FAT="-arch x86_64" 9935 V_LIB_LDFLAGS_FAT="-arch x86_64" 9936 case "$host_os" in 9937 9938 darwin18.*) 9939 # 9940 # Mojave; you need to install the 9941 # /usr/include headers to get 9942 # 32-bit x86 builds to work. 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 and, after that, installing the /usr/include headers from the /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg package" >&5 9945printf "%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;} 9946 ;; 9947 9948 *) 9949 # 9950 # Pre-Mojave; the command-line 9951 # tools should be sufficient to 9952 # enable 32-bit x86 builds. 9953 # 9954 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&5 9955printf "%s\n" "$as_me: WARNING: Compiling for 32-bit x86 gives an error; try installing the command-line tools" >&2;} 9956 ;; 9957 esac 9958 9959fi 9960rm -f core conftest.err conftest.$ac_objext conftest.beam \ 9961 conftest$ac_exeext conftest.$ac_ext 9962 9963 CFLAGS="$save_CFLAGS" 9964 LIBS="$save_LIBS" 9965 LDFLAGS="$save_LDFLAGS" 9966 9967 ;; 9968 9969 darwin19*) 9970 # 9971 # Catalina. Build libraries and executables 9972 # only for x86-64. (That's what Apple does; 9973 # 32-bit x86 binaries are not supported on 9974 # Catalina.) 9975 # 9976 V_LIB_CCOPT_FAT="-arch x86_64" 9977 V_LIB_LDFLAGS_FAT="-arch x86_64" 9978 V_PROG_CCOPT_FAT="-arch x86_64" 9979 V_PROG_LDFLAGS_FAT="-arch x86_64" 9980 ;; 9981 9982 darwin*) 9983 # 9984 # Post-Catalina. Build libraries and 9985 # executables for x86-64 and ARM64. 9986 # (That's what Apple does, except they 9987 # build for arm64e, which may include 9988 # some of the pointer-checking extensions.) 9989 # 9990 # If we're building with libssl, make sure 9991 # we can build fat with it (i.e., that it 9992 # was built fat); if we can't, don't set 9993 # the target architectures, and just 9994 # build for the host we're on. 9995 # 9996 # Otherwise, just add both of them. 9997 # 9998 if test "$HAVE_OPENSSL" = yes; then 9999 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether building fat with libssl is supported" >&5 10000printf %s "checking whether building fat with libssl is supported... " >&6; } 10001 10002 save_CFLAGS="$CFLAGS" 10003 save_LIBS="$LIBS" 10004 save_LDFLAGS="$LDFLAGS" 10005 10006 CFLAGS="$CFLAGS -arch x86_64 -arch arm64" 10007 LDFLAGS="$LDFLAGS $OPENSSL_LIBS" 10008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10009/* end confdefs.h. */ 10010 10011 #include <openssl/ssl.h> 10012 10013int 10014main (void) 10015{ 10016 10017 SSL_library_init(); 10018 return 0; 10019 10020 ; 10021 return 0; 10022} 10023_ACEOF 10024if ac_fn_c_try_link "$LINENO" 10025then : 10026 10027 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10028printf "%s\n" "yes" >&6; } 10029 V_LIB_CCOPT_FAT="-arch x86_64 -arch arm64" 10030 V_LIB_LDFLAGS_FAT="-arch x86_64 -arch arm64" 10031 V_PROG_CCOPT_FAT="-arch x86_64 -arch arm64" 10032 V_PROG_LDFLAGS_FAT="-arch x86_64 -arch arm64" 10033 10034else $as_nop 10035 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10036printf "%s\n" "no" >&6; } 10037 10038fi 10039rm -f core conftest.err conftest.$ac_objext conftest.beam \ 10040 conftest$ac_exeext conftest.$ac_ext 10041 10042 CFLAGS="$save_CFLAGS" 10043 LIBS="$save_LIBS" 10044 LDFLAGS="$save_LDFLAGS" 10045 10046 else 10047 V_LIB_CCOPT_FAT="-arch x86_64 -arch arm64" 10048 V_LIB_LDFLAGS_FAT="-arch x86_64 -arch arm64" 10049 V_PROG_CCOPT_FAT="-arch x86_64 -arch arm64" 10050 V_PROG_LDFLAGS_FAT="-arch x86_64 -arch arm64" 10051 fi 10052 ;; 10053 esac 10054 fi 10055 ;; 10056 10057hpux9*) 10058 10059printf "%s\n" "#define HAVE_HPUX9 1" >>confdefs.h 10060 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.0*) 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 10080hpux10.1*) 10081 10082 # 10083 # Use System V conventions for man pages. 10084 # 10085 MAN_ADMIN_COMMANDS=1m 10086 MAN_FILE_FORMATS=4 10087 MAN_MISC_INFO=5 10088 ;; 10089 10090hpux*) 10091 10092printf "%s\n" "#define HAVE_HPUX10_20_OR_LATER 1" >>confdefs.h 10093 10094 if test "`uname -m`" = "ia64"; then 10095 DYEXT="so" 10096 else 10097 DYEXT="sl" 10098 fi 10099 10100 # 10101 # "-b" builds a shared library; "+h" sets the soname. 10102 # 10103 SHLIB_OPT="-b" 10104 SONAME_OPT="+h" 10105 10106 # 10107 # Use System V conventions for man pages. 10108 # 10109 MAN_FILE_FORMATS=4 10110 MAN_MISC_INFO=5 10111 ;; 10112 10113irix*) 10114 # 10115 # Use IRIX conventions for man pages; they're the same as the 10116 # System V conventions, except that they use section 8 for 10117 # administrative commands and daemons. 10118 # 10119 MAN_FILE_FORMATS=4 10120 MAN_MISC_INFO=5 10121 ;; 10122 10123linux*|freebsd*|netbsd*|openbsd*|dragonfly*|kfreebsd*|gnu*|haiku*|midipix*) 10124 DYEXT="so" 10125 ;; 10126 10127osf*) 10128 DYEXT="so" 10129 10130 # 10131 # DEC OSF/1, a/k/a Digital UNIX, a/k/a Tru64 UNIX. 10132 # Use Tru64 UNIX conventions for man pages; they're the same as 10133 # the System V conventions except that they use section 8 for 10134 # administrative commands and daemons. 10135 # 10136 MAN_FILE_FORMATS=4 10137 MAN_MISC_INFO=5 10138 MAN_DEVICES=7 10139 ;; 10140 10141sinix*) 10142 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if SINIX compiler defines sinix" >&5 10143printf %s "checking if SINIX compiler defines sinix... " >&6; } 10144 if test ${ac_cv_cc_sinix_defined+y} 10145then : 10146 printf %s "(cached) " >&6 10147else $as_nop 10148 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10149/* end confdefs.h. */ 10150 10151int 10152main (void) 10153{ 10154int i = sinix; 10155 ; 10156 return 0; 10157} 10158_ACEOF 10159if ac_fn_c_try_compile "$LINENO" 10160then : 10161 ac_cv_cc_sinix_defined=yes 10162else $as_nop 10163 ac_cv_cc_sinix_defined=no 10164fi 10165rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10166fi 10167 10168 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_sinix_defined" >&5 10169printf "%s\n" "$ac_cv_cc_sinix_defined" >&6; } 10170 if test $ac_cv_cc_sinix_defined = no ; then 10171 10172printf "%s\n" "#define sinix 1" >>confdefs.h 10173 10174 fi 10175 ;; 10176 10177solaris*) 10178 10179printf "%s\n" "#define HAVE_SOLARIS 1" >>confdefs.h 10180 10181 10182 DYEXT="so" 10183 10184 # 10185 # Make sure errno is thread-safe, in case we're called in 10186 # a multithreaded program. We don't guarantee that two 10187 # threads can use the *same* pcap_t safely, but the 10188 # current version does guarantee that you can use different 10189 # pcap_t's in different threads, and even that pcap_compile() 10190 # is thread-safe (it wasn't thread-safe in some older versions). 10191 # 10192 V_CCOPT="$V_CCOPT -D_TS_ERRNO" 10193 10194 case "`uname -r`" in 10195 10196 5.12) 10197 ;; 10198 10199 *) 10200 # 10201 # Use System V conventions for man pages. 10202 # 10203 MAN_ADMIN_COMMANDS=1m 10204 MAN_FILE_FORMATS=4 10205 MAN_MISC_INFO=5 10206 MAN_DEVICES=7D 10207 esac 10208 ;; 10209esac 10210 10211 10212 10213 10214 10215 10216 10217 10218 10219 10220# Check whether --enable-shared was given. 10221if test ${enable_shared+y} 10222then : 10223 enableval=$enable_shared; 10224fi 10225 10226test "x$enable_shared" = "xno" && DYEXT="none" 10227 10228if test -n "$ac_tool_prefix"; then 10229 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 10230set dummy ${ac_tool_prefix}ranlib; ac_word=$2 10231{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10232printf %s "checking for $ac_word... " >&6; } 10233if test ${ac_cv_prog_RANLIB+y} 10234then : 10235 printf %s "(cached) " >&6 10236else $as_nop 10237 if test -n "$RANLIB"; then 10238 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 10239else 10240as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10241for as_dir in $PATH 10242do 10243 IFS=$as_save_IFS 10244 case $as_dir in #((( 10245 '') as_dir=./ ;; 10246 */) ;; 10247 *) as_dir=$as_dir/ ;; 10248 esac 10249 for ac_exec_ext in '' $ac_executable_extensions; do 10250 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 10251 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 10252 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 10253 break 2 10254 fi 10255done 10256 done 10257IFS=$as_save_IFS 10258 10259fi 10260fi 10261RANLIB=$ac_cv_prog_RANLIB 10262if test -n "$RANLIB"; then 10263 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 10264printf "%s\n" "$RANLIB" >&6; } 10265else 10266 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10267printf "%s\n" "no" >&6; } 10268fi 10269 10270 10271fi 10272if test -z "$ac_cv_prog_RANLIB"; then 10273 ac_ct_RANLIB=$RANLIB 10274 # Extract the first word of "ranlib", so it can be a program name with args. 10275set dummy ranlib; ac_word=$2 10276{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10277printf %s "checking for $ac_word... " >&6; } 10278if test ${ac_cv_prog_ac_ct_RANLIB+y} 10279then : 10280 printf %s "(cached) " >&6 10281else $as_nop 10282 if test -n "$ac_ct_RANLIB"; then 10283 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. 10284else 10285as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10286for as_dir in $PATH 10287do 10288 IFS=$as_save_IFS 10289 case $as_dir in #((( 10290 '') as_dir=./ ;; 10291 */) ;; 10292 *) as_dir=$as_dir/ ;; 10293 esac 10294 for ac_exec_ext in '' $ac_executable_extensions; do 10295 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 10296 ac_cv_prog_ac_ct_RANLIB="ranlib" 10297 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 10298 break 2 10299 fi 10300done 10301 done 10302IFS=$as_save_IFS 10303 10304fi 10305fi 10306ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB 10307if test -n "$ac_ct_RANLIB"; then 10308 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 10309printf "%s\n" "$ac_ct_RANLIB" >&6; } 10310else 10311 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10312printf "%s\n" "no" >&6; } 10313fi 10314 10315 if test "x$ac_ct_RANLIB" = x; then 10316 RANLIB=":" 10317 else 10318 case $cross_compiling:$ac_tool_warned in 10319yes:) 10320{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 10321printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 10322ac_tool_warned=yes ;; 10323esac 10324 RANLIB=$ac_ct_RANLIB 10325 fi 10326else 10327 RANLIB="$ac_cv_prog_RANLIB" 10328fi 10329 10330if test -n "$ac_tool_prefix"; then 10331 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. 10332set dummy ${ac_tool_prefix}ar; ac_word=$2 10333{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10334printf %s "checking for $ac_word... " >&6; } 10335if test ${ac_cv_prog_AR+y} 10336then : 10337 printf %s "(cached) " >&6 10338else $as_nop 10339 if test -n "$AR"; then 10340 ac_cv_prog_AR="$AR" # Let the user override the test. 10341else 10342as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10343for as_dir in $PATH 10344do 10345 IFS=$as_save_IFS 10346 case $as_dir in #((( 10347 '') as_dir=./ ;; 10348 */) ;; 10349 *) as_dir=$as_dir/ ;; 10350 esac 10351 for ac_exec_ext in '' $ac_executable_extensions; do 10352 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 10353 ac_cv_prog_AR="${ac_tool_prefix}ar" 10354 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 10355 break 2 10356 fi 10357done 10358 done 10359IFS=$as_save_IFS 10360 10361fi 10362fi 10363AR=$ac_cv_prog_AR 10364if test -n "$AR"; then 10365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 10366printf "%s\n" "$AR" >&6; } 10367else 10368 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10369printf "%s\n" "no" >&6; } 10370fi 10371 10372 10373fi 10374if test -z "$ac_cv_prog_AR"; then 10375 ac_ct_AR=$AR 10376 # Extract the first word of "ar", so it can be a program name with args. 10377set dummy ar; ac_word=$2 10378{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 10379printf %s "checking for $ac_word... " >&6; } 10380if test ${ac_cv_prog_ac_ct_AR+y} 10381then : 10382 printf %s "(cached) " >&6 10383else $as_nop 10384 if test -n "$ac_ct_AR"; then 10385 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. 10386else 10387as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 10388for as_dir in $PATH 10389do 10390 IFS=$as_save_IFS 10391 case $as_dir in #((( 10392 '') as_dir=./ ;; 10393 */) ;; 10394 *) as_dir=$as_dir/ ;; 10395 esac 10396 for ac_exec_ext in '' $ac_executable_extensions; do 10397 if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 10398 ac_cv_prog_ac_ct_AR="ar" 10399 printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 10400 break 2 10401 fi 10402done 10403 done 10404IFS=$as_save_IFS 10405 10406fi 10407fi 10408ac_ct_AR=$ac_cv_prog_ac_ct_AR 10409if test -n "$ac_ct_AR"; then 10410 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 10411printf "%s\n" "$ac_ct_AR" >&6; } 10412else 10413 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10414printf "%s\n" "no" >&6; } 10415fi 10416 10417 if test "x$ac_ct_AR" = x; then 10418 AR="" 10419 else 10420 case $cross_compiling:$ac_tool_warned in 10421yes:) 10422{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 10423printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 10424ac_tool_warned=yes ;; 10425esac 10426 AR=$ac_ct_AR 10427 fi 10428else 10429 AR="$ac_cv_prog_AR" 10430fi 10431 10432 10433{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 10434printf %s "checking whether ln -s works... " >&6; } 10435LN_S=$as_ln_s 10436if test "$LN_S" = "ln -s"; then 10437 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10438printf "%s\n" "yes" >&6; } 10439else 10440 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 10441printf "%s\n" "no, using $LN_S" >&6; } 10442fi 10443 10444 10445 10446rm -f os-proto.h 10447 if test "${LBL_CFLAGS+set}" = set; then 10448 V_CCOPT="$V_CCOPT ${LBL_CFLAGS}" 10449 fi 10450 if test -f .devel ; then 10451 # 10452 # Skip all the warning option stuff on some compilers. 10453 # 10454 if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then 10455 10456 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5 10457printf %s "checking whether the compiler supports the -W option... " >&6; } 10458 save_CFLAGS="$CFLAGS" 10459 CFLAGS="$CFLAGS -W" 10460 # 10461 # XXX - yes, this depends on the way AC_LANG_WERROR works, 10462 # but no mechanism is provided to turn AC_LANG_WERROR on 10463 # *and then turn it back off*, so that we *only* do it when 10464 # testing compiler options - 15 years after somebody asked 10465 # for it: 10466 # 10467 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 10468 # 10469 save_ac_c_werror_flag="$ac_c_werror_flag" 10470 ac_c_werror_flag=yes 10471 # 10472 # We use AC_LANG_SOURCE() so that we can control the complete 10473 # content of the program being compiled. We do not, for example, 10474 # want the default "int main()" that AC_LANG_PROGRAM() generates, 10475 # as it will generate a warning with -Wold-style-definition, meaning 10476 # that we would treat it as not working, as the test will fail if 10477 # *any* error output, including a warning due to the flag we're 10478 # testing, is generated; see 10479 # 10480 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10481 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10482 # 10483 # This may, as per those two messages, be fixed in autoconf 2.70, 10484 # but we only require 2.69 or newer for now. 10485 # 10486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10487/* end confdefs.h. */ 10488int main(void) { return 0; } 10489_ACEOF 10490if ac_fn_c_try_compile "$LINENO" 10491then : 10492 10493 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10494printf "%s\n" "yes" >&6; } 10495 can_add_to_cflags=yes 10496 # 10497 # The compile supports this; do we have some C code for 10498 # which the warning should *not* appear? 10499 # We test the fourth argument because the third argument 10500 # could contain quotes, breaking the test. 10501 # 10502 if test "x" != "x" 10503 then 10504 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 10505 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -W " >&5 10506printf %s "checking whether -W ... " >&6; } 10507 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10508/* end confdefs.h. */ 10509 10510_ACEOF 10511if ac_fn_c_try_compile "$LINENO" 10512then : 10513 10514 # 10515 # Not a problem. 10516 # 10517 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10518printf "%s\n" "no" >&6; } 10519 10520else $as_nop 10521 10522 # 10523 # A problem. 10524 # 10525 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10526printf "%s\n" "yes" >&6; } 10527 can_add_to_cflags=no 10528 10529fi 10530rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10531 fi 10532 CFLAGS="$save_CFLAGS" 10533 if test x"$can_add_to_cflags" = "xyes" 10534 then 10535 V_CCOPT="$V_CCOPT -W" 10536 fi 10537 10538else $as_nop 10539 10540 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10541printf "%s\n" "no" >&6; } 10542 CFLAGS="$save_CFLAGS" 10543 10544fi 10545rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10546 ac_c_werror_flag="$save_ac_c_werror_flag" 10547 10548 10549 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5 10550printf %s "checking whether the compiler supports the -Wall option... " >&6; } 10551 save_CFLAGS="$CFLAGS" 10552 CFLAGS="$CFLAGS -Wall" 10553 # 10554 # XXX - yes, this depends on the way AC_LANG_WERROR works, 10555 # but no mechanism is provided to turn AC_LANG_WERROR on 10556 # *and then turn it back off*, so that we *only* do it when 10557 # testing compiler options - 15 years after somebody asked 10558 # for it: 10559 # 10560 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 10561 # 10562 save_ac_c_werror_flag="$ac_c_werror_flag" 10563 ac_c_werror_flag=yes 10564 # 10565 # We use AC_LANG_SOURCE() so that we can control the complete 10566 # content of the program being compiled. We do not, for example, 10567 # want the default "int main()" that AC_LANG_PROGRAM() generates, 10568 # as it will generate a warning with -Wold-style-definition, meaning 10569 # that we would treat it as not working, as the test will fail if 10570 # *any* error output, including a warning due to the flag we're 10571 # testing, is generated; see 10572 # 10573 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10574 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10575 # 10576 # This may, as per those two messages, be fixed in autoconf 2.70, 10577 # but we only require 2.69 or newer for now. 10578 # 10579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10580/* end confdefs.h. */ 10581int main(void) { return 0; } 10582_ACEOF 10583if ac_fn_c_try_compile "$LINENO" 10584then : 10585 10586 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10587printf "%s\n" "yes" >&6; } 10588 can_add_to_cflags=yes 10589 # 10590 # The compile supports this; do we have some C code for 10591 # which the warning should *not* appear? 10592 # We test the fourth argument because the third argument 10593 # could contain quotes, breaking the test. 10594 # 10595 if test "x" != "x" 10596 then 10597 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 10598 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wall " >&5 10599printf %s "checking whether -Wall ... " >&6; } 10600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10601/* end confdefs.h. */ 10602 10603_ACEOF 10604if ac_fn_c_try_compile "$LINENO" 10605then : 10606 10607 # 10608 # Not a problem. 10609 # 10610 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10611printf "%s\n" "no" >&6; } 10612 10613else $as_nop 10614 10615 # 10616 # A problem. 10617 # 10618 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10619printf "%s\n" "yes" >&6; } 10620 can_add_to_cflags=no 10621 10622fi 10623rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10624 fi 10625 CFLAGS="$save_CFLAGS" 10626 if test x"$can_add_to_cflags" = "xyes" 10627 then 10628 V_CCOPT="$V_CCOPT -Wall" 10629 fi 10630 10631else $as_nop 10632 10633 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10634printf "%s\n" "no" >&6; } 10635 CFLAGS="$save_CFLAGS" 10636 10637fi 10638rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10639 ac_c_werror_flag="$save_ac_c_werror_flag" 10640 10641 10642 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcomma option" >&5 10643printf %s "checking whether the compiler supports the -Wcomma option... " >&6; } 10644 save_CFLAGS="$CFLAGS" 10645 CFLAGS="$CFLAGS -Wcomma" 10646 # 10647 # XXX - yes, this depends on the way AC_LANG_WERROR works, 10648 # but no mechanism is provided to turn AC_LANG_WERROR on 10649 # *and then turn it back off*, so that we *only* do it when 10650 # testing compiler options - 15 years after somebody asked 10651 # for it: 10652 # 10653 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 10654 # 10655 save_ac_c_werror_flag="$ac_c_werror_flag" 10656 ac_c_werror_flag=yes 10657 # 10658 # We use AC_LANG_SOURCE() so that we can control the complete 10659 # content of the program being compiled. We do not, for example, 10660 # want the default "int main()" that AC_LANG_PROGRAM() generates, 10661 # as it will generate a warning with -Wold-style-definition, meaning 10662 # that we would treat it as not working, as the test will fail if 10663 # *any* error output, including a warning due to the flag we're 10664 # testing, is generated; see 10665 # 10666 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10667 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10668 # 10669 # This may, as per those two messages, be fixed in autoconf 2.70, 10670 # but we only require 2.69 or newer for now. 10671 # 10672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10673/* end confdefs.h. */ 10674int main(void) { return 0; } 10675_ACEOF 10676if ac_fn_c_try_compile "$LINENO" 10677then : 10678 10679 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10680printf "%s\n" "yes" >&6; } 10681 can_add_to_cflags=yes 10682 # 10683 # The compile supports this; do we have some C code for 10684 # which the warning should *not* appear? 10685 # We test the fourth argument because the third argument 10686 # could contain quotes, breaking the test. 10687 # 10688 if test "x" != "x" 10689 then 10690 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 10691 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wcomma " >&5 10692printf %s "checking whether -Wcomma ... " >&6; } 10693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10694/* end confdefs.h. */ 10695 10696_ACEOF 10697if ac_fn_c_try_compile "$LINENO" 10698then : 10699 10700 # 10701 # Not a problem. 10702 # 10703 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10704printf "%s\n" "no" >&6; } 10705 10706else $as_nop 10707 10708 # 10709 # A problem. 10710 # 10711 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10712printf "%s\n" "yes" >&6; } 10713 can_add_to_cflags=no 10714 10715fi 10716rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10717 fi 10718 CFLAGS="$save_CFLAGS" 10719 if test x"$can_add_to_cflags" = "xyes" 10720 then 10721 V_CCOPT="$V_CCOPT -Wcomma" 10722 fi 10723 10724else $as_nop 10725 10726 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10727printf "%s\n" "no" >&6; } 10728 CFLAGS="$save_CFLAGS" 10729 10730fi 10731rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10732 ac_c_werror_flag="$save_ac_c_werror_flag" 10733 10734 # Warns about safeguards added in case the enums are 10735 # extended 10736 # AC_LBL_CHECK_COMPILER_OPT(V_CCOPT, -Wcovered-switch-default) 10737 10738 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wdocumentation option" >&5 10739printf %s "checking whether the compiler supports the -Wdocumentation option... " >&6; } 10740 save_CFLAGS="$CFLAGS" 10741 CFLAGS="$CFLAGS -Wdocumentation" 10742 # 10743 # XXX - yes, this depends on the way AC_LANG_WERROR works, 10744 # but no mechanism is provided to turn AC_LANG_WERROR on 10745 # *and then turn it back off*, so that we *only* do it when 10746 # testing compiler options - 15 years after somebody asked 10747 # for it: 10748 # 10749 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 10750 # 10751 save_ac_c_werror_flag="$ac_c_werror_flag" 10752 ac_c_werror_flag=yes 10753 # 10754 # We use AC_LANG_SOURCE() so that we can control the complete 10755 # content of the program being compiled. We do not, for example, 10756 # want the default "int main()" that AC_LANG_PROGRAM() generates, 10757 # as it will generate a warning with -Wold-style-definition, meaning 10758 # that we would treat it as not working, as the test will fail if 10759 # *any* error output, including a warning due to the flag we're 10760 # testing, is generated; see 10761 # 10762 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10763 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10764 # 10765 # This may, as per those two messages, be fixed in autoconf 2.70, 10766 # but we only require 2.69 or newer for now. 10767 # 10768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10769/* end confdefs.h. */ 10770int main(void) { return 0; } 10771_ACEOF 10772if ac_fn_c_try_compile "$LINENO" 10773then : 10774 10775 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10776printf "%s\n" "yes" >&6; } 10777 can_add_to_cflags=yes 10778 # 10779 # The compile supports this; do we have some C code for 10780 # which the warning should *not* appear? 10781 # We test the fourth argument because the third argument 10782 # could contain quotes, breaking the test. 10783 # 10784 if test "x" != "x" 10785 then 10786 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 10787 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wdocumentation " >&5 10788printf %s "checking whether -Wdocumentation ... " >&6; } 10789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10790/* end confdefs.h. */ 10791 10792_ACEOF 10793if ac_fn_c_try_compile "$LINENO" 10794then : 10795 10796 # 10797 # Not a problem. 10798 # 10799 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10800printf "%s\n" "no" >&6; } 10801 10802else $as_nop 10803 10804 # 10805 # A problem. 10806 # 10807 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10808printf "%s\n" "yes" >&6; } 10809 can_add_to_cflags=no 10810 10811fi 10812rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10813 fi 10814 CFLAGS="$save_CFLAGS" 10815 if test x"$can_add_to_cflags" = "xyes" 10816 then 10817 V_CCOPT="$V_CCOPT -Wdocumentation" 10818 fi 10819 10820else $as_nop 10821 10822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10823printf "%s\n" "no" >&6; } 10824 CFLAGS="$save_CFLAGS" 10825 10826fi 10827rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10828 ac_c_werror_flag="$save_ac_c_werror_flag" 10829 10830 10831 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wformat-nonliteral option" >&5 10832printf %s "checking whether the compiler supports the -Wformat-nonliteral option... " >&6; } 10833 save_CFLAGS="$CFLAGS" 10834 CFLAGS="$CFLAGS -Wformat-nonliteral" 10835 # 10836 # XXX - yes, this depends on the way AC_LANG_WERROR works, 10837 # but no mechanism is provided to turn AC_LANG_WERROR on 10838 # *and then turn it back off*, so that we *only* do it when 10839 # testing compiler options - 15 years after somebody asked 10840 # for it: 10841 # 10842 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 10843 # 10844 save_ac_c_werror_flag="$ac_c_werror_flag" 10845 ac_c_werror_flag=yes 10846 # 10847 # We use AC_LANG_SOURCE() so that we can control the complete 10848 # content of the program being compiled. We do not, for example, 10849 # want the default "int main()" that AC_LANG_PROGRAM() generates, 10850 # as it will generate a warning with -Wold-style-definition, meaning 10851 # that we would treat it as not working, as the test will fail if 10852 # *any* error output, including a warning due to the flag we're 10853 # testing, is generated; see 10854 # 10855 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10856 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10857 # 10858 # This may, as per those two messages, be fixed in autoconf 2.70, 10859 # but we only require 2.69 or newer for now. 10860 # 10861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10862/* end confdefs.h. */ 10863int main(void) { return 0; } 10864_ACEOF 10865if ac_fn_c_try_compile "$LINENO" 10866then : 10867 10868 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10869printf "%s\n" "yes" >&6; } 10870 can_add_to_cflags=yes 10871 # 10872 # The compile supports this; do we have some C code for 10873 # which the warning should *not* appear? 10874 # We test the fourth argument because the third argument 10875 # could contain quotes, breaking the test. 10876 # 10877 if test "x" != "x" 10878 then 10879 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 10880 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wformat-nonliteral " >&5 10881printf %s "checking whether -Wformat-nonliteral ... " >&6; } 10882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10883/* end confdefs.h. */ 10884 10885_ACEOF 10886if ac_fn_c_try_compile "$LINENO" 10887then : 10888 10889 # 10890 # Not a problem. 10891 # 10892 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10893printf "%s\n" "no" >&6; } 10894 10895else $as_nop 10896 10897 # 10898 # A problem. 10899 # 10900 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10901printf "%s\n" "yes" >&6; } 10902 can_add_to_cflags=no 10903 10904fi 10905rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10906 fi 10907 CFLAGS="$save_CFLAGS" 10908 if test x"$can_add_to_cflags" = "xyes" 10909 then 10910 V_CCOPT="$V_CCOPT -Wformat-nonliteral" 10911 fi 10912 10913else $as_nop 10914 10915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10916printf "%s\n" "no" >&6; } 10917 CFLAGS="$save_CFLAGS" 10918 10919fi 10920rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10921 ac_c_werror_flag="$save_ac_c_werror_flag" 10922 10923 10924 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-noreturn option" >&5 10925printf %s "checking whether the compiler supports the -Wmissing-noreturn option... " >&6; } 10926 save_CFLAGS="$CFLAGS" 10927 CFLAGS="$CFLAGS -Wmissing-noreturn" 10928 # 10929 # XXX - yes, this depends on the way AC_LANG_WERROR works, 10930 # but no mechanism is provided to turn AC_LANG_WERROR on 10931 # *and then turn it back off*, so that we *only* do it when 10932 # testing compiler options - 15 years after somebody asked 10933 # for it: 10934 # 10935 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 10936 # 10937 save_ac_c_werror_flag="$ac_c_werror_flag" 10938 ac_c_werror_flag=yes 10939 # 10940 # We use AC_LANG_SOURCE() so that we can control the complete 10941 # content of the program being compiled. We do not, for example, 10942 # want the default "int main()" that AC_LANG_PROGRAM() generates, 10943 # as it will generate a warning with -Wold-style-definition, meaning 10944 # that we would treat it as not working, as the test will fail if 10945 # *any* error output, including a warning due to the flag we're 10946 # testing, is generated; see 10947 # 10948 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10949 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 10950 # 10951 # This may, as per those two messages, be fixed in autoconf 2.70, 10952 # but we only require 2.69 or newer for now. 10953 # 10954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10955/* end confdefs.h. */ 10956int main(void) { return 0; } 10957_ACEOF 10958if ac_fn_c_try_compile "$LINENO" 10959then : 10960 10961 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10962printf "%s\n" "yes" >&6; } 10963 can_add_to_cflags=yes 10964 # 10965 # The compile supports this; do we have some C code for 10966 # which the warning should *not* appear? 10967 # We test the fourth argument because the third argument 10968 # could contain quotes, breaking the test. 10969 # 10970 if test "x" != "x" 10971 then 10972 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 10973 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-noreturn " >&5 10974printf %s "checking whether -Wmissing-noreturn ... " >&6; } 10975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10976/* end confdefs.h. */ 10977 10978_ACEOF 10979if ac_fn_c_try_compile "$LINENO" 10980then : 10981 10982 # 10983 # Not a problem. 10984 # 10985 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 10986printf "%s\n" "no" >&6; } 10987 10988else $as_nop 10989 10990 # 10991 # A problem. 10992 # 10993 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 10994printf "%s\n" "yes" >&6; } 10995 can_add_to_cflags=no 10996 10997fi 10998rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 10999 fi 11000 CFLAGS="$save_CFLAGS" 11001 if test x"$can_add_to_cflags" = "xyes" 11002 then 11003 V_CCOPT="$V_CCOPT -Wmissing-noreturn" 11004 fi 11005 11006else $as_nop 11007 11008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11009printf "%s\n" "no" >&6; } 11010 CFLAGS="$save_CFLAGS" 11011 11012fi 11013rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11014 ac_c_werror_flag="$save_ac_c_werror_flag" 11015 11016 11017 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5 11018printf %s "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; } 11019 save_CFLAGS="$CFLAGS" 11020 CFLAGS="$CFLAGS -Wmissing-prototypes" 11021 # 11022 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11023 # but no mechanism is provided to turn AC_LANG_WERROR on 11024 # *and then turn it back off*, so that we *only* do it when 11025 # testing compiler options - 15 years after somebody asked 11026 # for it: 11027 # 11028 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11029 # 11030 save_ac_c_werror_flag="$ac_c_werror_flag" 11031 ac_c_werror_flag=yes 11032 # 11033 # We use AC_LANG_SOURCE() so that we can control the complete 11034 # content of the program being compiled. We do not, for example, 11035 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11036 # as it will generate a warning with -Wold-style-definition, meaning 11037 # that we would treat it as not working, as the test will fail if 11038 # *any* error output, including a warning due to the flag we're 11039 # testing, is generated; see 11040 # 11041 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11042 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11043 # 11044 # This may, as per those two messages, be fixed in autoconf 2.70, 11045 # but we only require 2.69 or newer for now. 11046 # 11047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11048/* end confdefs.h. */ 11049int main(void) { return 0; } 11050_ACEOF 11051if ac_fn_c_try_compile "$LINENO" 11052then : 11053 11054 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11055printf "%s\n" "yes" >&6; } 11056 can_add_to_cflags=yes 11057 # 11058 # The compile supports this; do we have some C code for 11059 # which the warning should *not* appear? 11060 # We test the fourth argument because the third argument 11061 # could contain quotes, breaking the test. 11062 # 11063 if test "x" != "x" 11064 then 11065 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11066 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-prototypes " >&5 11067printf %s "checking whether -Wmissing-prototypes ... " >&6; } 11068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11069/* end confdefs.h. */ 11070 11071_ACEOF 11072if ac_fn_c_try_compile "$LINENO" 11073then : 11074 11075 # 11076 # Not a problem. 11077 # 11078 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11079printf "%s\n" "no" >&6; } 11080 11081else $as_nop 11082 11083 # 11084 # A problem. 11085 # 11086 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11087printf "%s\n" "yes" >&6; } 11088 can_add_to_cflags=no 11089 11090fi 11091rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11092 fi 11093 CFLAGS="$save_CFLAGS" 11094 if test x"$can_add_to_cflags" = "xyes" 11095 then 11096 V_CCOPT="$V_CCOPT -Wmissing-prototypes" 11097 fi 11098 11099else $as_nop 11100 11101 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11102printf "%s\n" "no" >&6; } 11103 CFLAGS="$save_CFLAGS" 11104 11105fi 11106rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11107 ac_c_werror_flag="$save_ac_c_werror_flag" 11108 11109 11110 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5 11111printf %s "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; } 11112 save_CFLAGS="$CFLAGS" 11113 CFLAGS="$CFLAGS -Wmissing-variable-declarations" 11114 # 11115 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11116 # but no mechanism is provided to turn AC_LANG_WERROR on 11117 # *and then turn it back off*, so that we *only* do it when 11118 # testing compiler options - 15 years after somebody asked 11119 # for it: 11120 # 11121 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11122 # 11123 save_ac_c_werror_flag="$ac_c_werror_flag" 11124 ac_c_werror_flag=yes 11125 # 11126 # We use AC_LANG_SOURCE() so that we can control the complete 11127 # content of the program being compiled. We do not, for example, 11128 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11129 # as it will generate a warning with -Wold-style-definition, meaning 11130 # that we would treat it as not working, as the test will fail if 11131 # *any* error output, including a warning due to the flag we're 11132 # testing, is generated; see 11133 # 11134 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11135 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11136 # 11137 # This may, as per those two messages, be fixed in autoconf 2.70, 11138 # but we only require 2.69 or newer for now. 11139 # 11140 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11141/* end confdefs.h. */ 11142int main(void) { return 0; } 11143_ACEOF 11144if ac_fn_c_try_compile "$LINENO" 11145then : 11146 11147 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11148printf "%s\n" "yes" >&6; } 11149 can_add_to_cflags=yes 11150 # 11151 # The compile supports this; do we have some C code for 11152 # which the warning should *not* appear? 11153 # We test the fourth argument because the third argument 11154 # could contain quotes, breaking the test. 11155 # 11156 if test "x" != "x" 11157 then 11158 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11159 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wmissing-variable-declarations " >&5 11160printf %s "checking whether -Wmissing-variable-declarations ... " >&6; } 11161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11162/* end confdefs.h. */ 11163 11164_ACEOF 11165if ac_fn_c_try_compile "$LINENO" 11166then : 11167 11168 # 11169 # Not a problem. 11170 # 11171 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11172printf "%s\n" "no" >&6; } 11173 11174else $as_nop 11175 11176 # 11177 # A problem. 11178 # 11179 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11180printf "%s\n" "yes" >&6; } 11181 can_add_to_cflags=no 11182 11183fi 11184rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11185 fi 11186 CFLAGS="$save_CFLAGS" 11187 if test x"$can_add_to_cflags" = "xyes" 11188 then 11189 V_CCOPT="$V_CCOPT -Wmissing-variable-declarations" 11190 fi 11191 11192else $as_nop 11193 11194 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11195printf "%s\n" "no" >&6; } 11196 CFLAGS="$save_CFLAGS" 11197 11198fi 11199rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11200 ac_c_werror_flag="$save_ac_c_werror_flag" 11201 11202 11203 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wnull-pointer-subtraction option" >&5 11204printf %s "checking whether the compiler supports the -Wnull-pointer-subtraction option... " >&6; } 11205 save_CFLAGS="$CFLAGS" 11206 CFLAGS="$CFLAGS -Wnull-pointer-subtraction" 11207 # 11208 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11209 # but no mechanism is provided to turn AC_LANG_WERROR on 11210 # *and then turn it back off*, so that we *only* do it when 11211 # testing compiler options - 15 years after somebody asked 11212 # for it: 11213 # 11214 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11215 # 11216 save_ac_c_werror_flag="$ac_c_werror_flag" 11217 ac_c_werror_flag=yes 11218 # 11219 # We use AC_LANG_SOURCE() so that we can control the complete 11220 # content of the program being compiled. We do not, for example, 11221 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11222 # as it will generate a warning with -Wold-style-definition, meaning 11223 # that we would treat it as not working, as the test will fail if 11224 # *any* error output, including a warning due to the flag we're 11225 # testing, is generated; see 11226 # 11227 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11228 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11229 # 11230 # This may, as per those two messages, be fixed in autoconf 2.70, 11231 # but we only require 2.69 or newer for now. 11232 # 11233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11234/* end confdefs.h. */ 11235int main(void) { return 0; } 11236_ACEOF 11237if ac_fn_c_try_compile "$LINENO" 11238then : 11239 11240 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11241printf "%s\n" "yes" >&6; } 11242 can_add_to_cflags=yes 11243 # 11244 # The compile supports this; do we have some C code for 11245 # which the warning should *not* appear? 11246 # We test the fourth argument because the third argument 11247 # could contain quotes, breaking the test. 11248 # 11249 if test "x" != "x" 11250 then 11251 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11252 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wnull-pointer-subtraction " >&5 11253printf %s "checking whether -Wnull-pointer-subtraction ... " >&6; } 11254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11255/* end confdefs.h. */ 11256 11257_ACEOF 11258if ac_fn_c_try_compile "$LINENO" 11259then : 11260 11261 # 11262 # Not a problem. 11263 # 11264 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11265printf "%s\n" "no" >&6; } 11266 11267else $as_nop 11268 11269 # 11270 # A problem. 11271 # 11272 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11273printf "%s\n" "yes" >&6; } 11274 can_add_to_cflags=no 11275 11276fi 11277rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11278 fi 11279 CFLAGS="$save_CFLAGS" 11280 if test x"$can_add_to_cflags" = "xyes" 11281 then 11282 V_CCOPT="$V_CCOPT -Wnull-pointer-subtraction" 11283 fi 11284 11285else $as_nop 11286 11287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11288printf "%s\n" "no" >&6; } 11289 CFLAGS="$save_CFLAGS" 11290 11291fi 11292rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11293 ac_c_werror_flag="$save_ac_c_werror_flag" 11294 11295 11296 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5 11297printf %s "checking whether the compiler supports the -Wpointer-arith option... " >&6; } 11298 save_CFLAGS="$CFLAGS" 11299 CFLAGS="$CFLAGS -Wpointer-arith" 11300 # 11301 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11302 # but no mechanism is provided to turn AC_LANG_WERROR on 11303 # *and then turn it back off*, so that we *only* do it when 11304 # testing compiler options - 15 years after somebody asked 11305 # for it: 11306 # 11307 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11308 # 11309 save_ac_c_werror_flag="$ac_c_werror_flag" 11310 ac_c_werror_flag=yes 11311 # 11312 # We use AC_LANG_SOURCE() so that we can control the complete 11313 # content of the program being compiled. We do not, for example, 11314 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11315 # as it will generate a warning with -Wold-style-definition, meaning 11316 # that we would treat it as not working, as the test will fail if 11317 # *any* error output, including a warning due to the flag we're 11318 # testing, is generated; see 11319 # 11320 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11321 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11322 # 11323 # This may, as per those two messages, be fixed in autoconf 2.70, 11324 # but we only require 2.69 or newer for now. 11325 # 11326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11327/* end confdefs.h. */ 11328int main(void) { return 0; } 11329_ACEOF 11330if ac_fn_c_try_compile "$LINENO" 11331then : 11332 11333 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11334printf "%s\n" "yes" >&6; } 11335 can_add_to_cflags=yes 11336 # 11337 # The compile supports this; do we have some C code for 11338 # which the warning should *not* appear? 11339 # We test the fourth argument because the third argument 11340 # could contain quotes, breaking the test. 11341 # 11342 if test "x" != "x" 11343 then 11344 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11345 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-arith " >&5 11346printf %s "checking whether -Wpointer-arith ... " >&6; } 11347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11348/* end confdefs.h. */ 11349 11350_ACEOF 11351if ac_fn_c_try_compile "$LINENO" 11352then : 11353 11354 # 11355 # Not a problem. 11356 # 11357 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11358printf "%s\n" "no" >&6; } 11359 11360else $as_nop 11361 11362 # 11363 # A problem. 11364 # 11365 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11366printf "%s\n" "yes" >&6; } 11367 can_add_to_cflags=no 11368 11369fi 11370rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11371 fi 11372 CFLAGS="$save_CFLAGS" 11373 if test x"$can_add_to_cflags" = "xyes" 11374 then 11375 V_CCOPT="$V_CCOPT -Wpointer-arith" 11376 fi 11377 11378else $as_nop 11379 11380 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11381printf "%s\n" "no" >&6; } 11382 CFLAGS="$save_CFLAGS" 11383 11384fi 11385rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11386 ac_c_werror_flag="$save_ac_c_werror_flag" 11387 11388 11389 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-sign option" >&5 11390printf %s "checking whether the compiler supports the -Wpointer-sign option... " >&6; } 11391 save_CFLAGS="$CFLAGS" 11392 CFLAGS="$CFLAGS -Wpointer-sign" 11393 # 11394 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11395 # but no mechanism is provided to turn AC_LANG_WERROR on 11396 # *and then turn it back off*, so that we *only* do it when 11397 # testing compiler options - 15 years after somebody asked 11398 # for it: 11399 # 11400 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11401 # 11402 save_ac_c_werror_flag="$ac_c_werror_flag" 11403 ac_c_werror_flag=yes 11404 # 11405 # We use AC_LANG_SOURCE() so that we can control the complete 11406 # content of the program being compiled. We do not, for example, 11407 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11408 # as it will generate a warning with -Wold-style-definition, meaning 11409 # that we would treat it as not working, as the test will fail if 11410 # *any* error output, including a warning due to the flag we're 11411 # testing, is generated; see 11412 # 11413 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11414 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11415 # 11416 # This may, as per those two messages, be fixed in autoconf 2.70, 11417 # but we only require 2.69 or newer for now. 11418 # 11419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11420/* end confdefs.h. */ 11421int main(void) { return 0; } 11422_ACEOF 11423if ac_fn_c_try_compile "$LINENO" 11424then : 11425 11426 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11427printf "%s\n" "yes" >&6; } 11428 can_add_to_cflags=yes 11429 # 11430 # The compile supports this; do we have some C code for 11431 # which the warning should *not* appear? 11432 # We test the fourth argument because the third argument 11433 # could contain quotes, breaking the test. 11434 # 11435 if test "x" != "x" 11436 then 11437 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11438 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wpointer-sign " >&5 11439printf %s "checking whether -Wpointer-sign ... " >&6; } 11440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11441/* end confdefs.h. */ 11442 11443_ACEOF 11444if ac_fn_c_try_compile "$LINENO" 11445then : 11446 11447 # 11448 # Not a problem. 11449 # 11450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11451printf "%s\n" "no" >&6; } 11452 11453else $as_nop 11454 11455 # 11456 # A problem. 11457 # 11458 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11459printf "%s\n" "yes" >&6; } 11460 can_add_to_cflags=no 11461 11462fi 11463rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11464 fi 11465 CFLAGS="$save_CFLAGS" 11466 if test x"$can_add_to_cflags" = "xyes" 11467 then 11468 V_CCOPT="$V_CCOPT -Wpointer-sign" 11469 fi 11470 11471else $as_nop 11472 11473 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11474printf "%s\n" "no" >&6; } 11475 CFLAGS="$save_CFLAGS" 11476 11477fi 11478rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11479 ac_c_werror_flag="$save_ac_c_werror_flag" 11480 11481 11482 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5 11483printf %s "checking whether the compiler supports the -Wshadow option... " >&6; } 11484 save_CFLAGS="$CFLAGS" 11485 CFLAGS="$CFLAGS -Wshadow" 11486 # 11487 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11488 # but no mechanism is provided to turn AC_LANG_WERROR on 11489 # *and then turn it back off*, so that we *only* do it when 11490 # testing compiler options - 15 years after somebody asked 11491 # for it: 11492 # 11493 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11494 # 11495 save_ac_c_werror_flag="$ac_c_werror_flag" 11496 ac_c_werror_flag=yes 11497 # 11498 # We use AC_LANG_SOURCE() so that we can control the complete 11499 # content of the program being compiled. We do not, for example, 11500 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11501 # as it will generate a warning with -Wold-style-definition, meaning 11502 # that we would treat it as not working, as the test will fail if 11503 # *any* error output, including a warning due to the flag we're 11504 # testing, is generated; see 11505 # 11506 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11507 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11508 # 11509 # This may, as per those two messages, be fixed in autoconf 2.70, 11510 # but we only require 2.69 or newer for now. 11511 # 11512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11513/* end confdefs.h. */ 11514int main(void) { return 0; } 11515_ACEOF 11516if ac_fn_c_try_compile "$LINENO" 11517then : 11518 11519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11520printf "%s\n" "yes" >&6; } 11521 can_add_to_cflags=yes 11522 # 11523 # The compile supports this; do we have some C code for 11524 # which the warning should *not* appear? 11525 # We test the fourth argument because the third argument 11526 # could contain quotes, breaking the test. 11527 # 11528 if test "x" != "x" 11529 then 11530 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11531 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wshadow " >&5 11532printf %s "checking whether -Wshadow ... " >&6; } 11533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11534/* end confdefs.h. */ 11535 11536_ACEOF 11537if ac_fn_c_try_compile "$LINENO" 11538then : 11539 11540 # 11541 # Not a problem. 11542 # 11543 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11544printf "%s\n" "no" >&6; } 11545 11546else $as_nop 11547 11548 # 11549 # A problem. 11550 # 11551 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11552printf "%s\n" "yes" >&6; } 11553 can_add_to_cflags=no 11554 11555fi 11556rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11557 fi 11558 CFLAGS="$save_CFLAGS" 11559 if test x"$can_add_to_cflags" = "xyes" 11560 then 11561 V_CCOPT="$V_CCOPT -Wshadow" 11562 fi 11563 11564else $as_nop 11565 11566 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11567printf "%s\n" "no" >&6; } 11568 CFLAGS="$save_CFLAGS" 11569 11570fi 11571rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11572 ac_c_werror_flag="$save_ac_c_werror_flag" 11573 11574 11575 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshorten-64-to-32 option" >&5 11576printf %s "checking whether the compiler supports the -Wshorten-64-to-32 option... " >&6; } 11577 save_CFLAGS="$CFLAGS" 11578 CFLAGS="$CFLAGS -Wshorten-64-to-32" 11579 # 11580 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11581 # but no mechanism is provided to turn AC_LANG_WERROR on 11582 # *and then turn it back off*, so that we *only* do it when 11583 # testing compiler options - 15 years after somebody asked 11584 # for it: 11585 # 11586 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11587 # 11588 save_ac_c_werror_flag="$ac_c_werror_flag" 11589 ac_c_werror_flag=yes 11590 # 11591 # We use AC_LANG_SOURCE() so that we can control the complete 11592 # content of the program being compiled. We do not, for example, 11593 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11594 # as it will generate a warning with -Wold-style-definition, meaning 11595 # that we would treat it as not working, as the test will fail if 11596 # *any* error output, including a warning due to the flag we're 11597 # testing, is generated; see 11598 # 11599 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11600 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11601 # 11602 # This may, as per those two messages, be fixed in autoconf 2.70, 11603 # but we only require 2.69 or newer for now. 11604 # 11605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11606/* end confdefs.h. */ 11607int main(void) { return 0; } 11608_ACEOF 11609if ac_fn_c_try_compile "$LINENO" 11610then : 11611 11612 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11613printf "%s\n" "yes" >&6; } 11614 can_add_to_cflags=yes 11615 # 11616 # The compile supports this; do we have some C code for 11617 # which the warning should *not* appear? 11618 # We test the fourth argument because the third argument 11619 # could contain quotes, breaking the test. 11620 # 11621 if test "x" != "x" 11622 then 11623 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11624 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wshorten-64-to-32 " >&5 11625printf %s "checking whether -Wshorten-64-to-32 ... " >&6; } 11626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11627/* end confdefs.h. */ 11628 11629_ACEOF 11630if ac_fn_c_try_compile "$LINENO" 11631then : 11632 11633 # 11634 # Not a problem. 11635 # 11636 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11637printf "%s\n" "no" >&6; } 11638 11639else $as_nop 11640 11641 # 11642 # A problem. 11643 # 11644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11645printf "%s\n" "yes" >&6; } 11646 can_add_to_cflags=no 11647 11648fi 11649rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11650 fi 11651 CFLAGS="$save_CFLAGS" 11652 if test x"$can_add_to_cflags" = "xyes" 11653 then 11654 V_CCOPT="$V_CCOPT -Wshorten-64-to-32" 11655 fi 11656 11657else $as_nop 11658 11659 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11660printf "%s\n" "no" >&6; } 11661 CFLAGS="$save_CFLAGS" 11662 11663fi 11664rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11665 ac_c_werror_flag="$save_ac_c_werror_flag" 11666 11667 11668 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5 11669printf %s "checking whether the compiler supports the -Wsign-compare option... " >&6; } 11670 save_CFLAGS="$CFLAGS" 11671 CFLAGS="$CFLAGS -Wsign-compare" 11672 # 11673 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11674 # but no mechanism is provided to turn AC_LANG_WERROR on 11675 # *and then turn it back off*, so that we *only* do it when 11676 # testing compiler options - 15 years after somebody asked 11677 # for it: 11678 # 11679 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11680 # 11681 save_ac_c_werror_flag="$ac_c_werror_flag" 11682 ac_c_werror_flag=yes 11683 # 11684 # We use AC_LANG_SOURCE() so that we can control the complete 11685 # content of the program being compiled. We do not, for example, 11686 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11687 # as it will generate a warning with -Wold-style-definition, meaning 11688 # that we would treat it as not working, as the test will fail if 11689 # *any* error output, including a warning due to the flag we're 11690 # testing, is generated; see 11691 # 11692 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11693 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11694 # 11695 # This may, as per those two messages, be fixed in autoconf 2.70, 11696 # but we only require 2.69 or newer for now. 11697 # 11698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11699/* end confdefs.h. */ 11700int main(void) { return 0; } 11701_ACEOF 11702if ac_fn_c_try_compile "$LINENO" 11703then : 11704 11705 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11706printf "%s\n" "yes" >&6; } 11707 can_add_to_cflags=yes 11708 # 11709 # The compile supports this; do we have some C code for 11710 # which the warning should *not* appear? 11711 # We test the fourth argument because the third argument 11712 # could contain quotes, breaking the test. 11713 # 11714 if test "x" != "x" 11715 then 11716 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11717 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wsign-compare " >&5 11718printf %s "checking whether -Wsign-compare ... " >&6; } 11719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11720/* end confdefs.h. */ 11721 11722_ACEOF 11723if ac_fn_c_try_compile "$LINENO" 11724then : 11725 11726 # 11727 # Not a problem. 11728 # 11729 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11730printf "%s\n" "no" >&6; } 11731 11732else $as_nop 11733 11734 # 11735 # A problem. 11736 # 11737 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11738printf "%s\n" "yes" >&6; } 11739 can_add_to_cflags=no 11740 11741fi 11742rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11743 fi 11744 CFLAGS="$save_CFLAGS" 11745 if test x"$can_add_to_cflags" = "xyes" 11746 then 11747 V_CCOPT="$V_CCOPT -Wsign-compare" 11748 fi 11749 11750else $as_nop 11751 11752 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11753printf "%s\n" "no" >&6; } 11754 CFLAGS="$save_CFLAGS" 11755 11756fi 11757rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11758 ac_c_werror_flag="$save_ac_c_werror_flag" 11759 11760 11761 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5 11762printf %s "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; } 11763 save_CFLAGS="$CFLAGS" 11764 CFLAGS="$CFLAGS -Wstrict-prototypes" 11765 # 11766 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11767 # but no mechanism is provided to turn AC_LANG_WERROR on 11768 # *and then turn it back off*, so that we *only* do it when 11769 # testing compiler options - 15 years after somebody asked 11770 # for it: 11771 # 11772 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11773 # 11774 save_ac_c_werror_flag="$ac_c_werror_flag" 11775 ac_c_werror_flag=yes 11776 # 11777 # We use AC_LANG_SOURCE() so that we can control the complete 11778 # content of the program being compiled. We do not, for example, 11779 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11780 # as it will generate a warning with -Wold-style-definition, meaning 11781 # that we would treat it as not working, as the test will fail if 11782 # *any* error output, including a warning due to the flag we're 11783 # testing, is generated; see 11784 # 11785 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11786 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11787 # 11788 # This may, as per those two messages, be fixed in autoconf 2.70, 11789 # but we only require 2.69 or newer for now. 11790 # 11791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11792/* end confdefs.h. */ 11793int main(void) { return 0; } 11794_ACEOF 11795if ac_fn_c_try_compile "$LINENO" 11796then : 11797 11798 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11799printf "%s\n" "yes" >&6; } 11800 can_add_to_cflags=yes 11801 # 11802 # The compile supports this; do we have some C code for 11803 # which the warning should *not* appear? 11804 # We test the fourth argument because the third argument 11805 # could contain quotes, breaking the test. 11806 # 11807 if test "x" != "x" 11808 then 11809 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11810 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wstrict-prototypes " >&5 11811printf %s "checking whether -Wstrict-prototypes ... " >&6; } 11812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11813/* end confdefs.h. */ 11814 11815_ACEOF 11816if ac_fn_c_try_compile "$LINENO" 11817then : 11818 11819 # 11820 # Not a problem. 11821 # 11822 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11823printf "%s\n" "no" >&6; } 11824 11825else $as_nop 11826 11827 # 11828 # A problem. 11829 # 11830 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11831printf "%s\n" "yes" >&6; } 11832 can_add_to_cflags=no 11833 11834fi 11835rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11836 fi 11837 CFLAGS="$save_CFLAGS" 11838 if test x"$can_add_to_cflags" = "xyes" 11839 then 11840 V_CCOPT="$V_CCOPT -Wstrict-prototypes" 11841 fi 11842 11843else $as_nop 11844 11845 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11846printf "%s\n" "no" >&6; } 11847 CFLAGS="$save_CFLAGS" 11848 11849fi 11850rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11851 ac_c_werror_flag="$save_ac_c_werror_flag" 11852 11853 11854 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wundef option" >&5 11855printf %s "checking whether the compiler supports the -Wundef option... " >&6; } 11856 save_CFLAGS="$CFLAGS" 11857 CFLAGS="$CFLAGS -Wundef" 11858 # 11859 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11860 # but no mechanism is provided to turn AC_LANG_WERROR on 11861 # *and then turn it back off*, so that we *only* do it when 11862 # testing compiler options - 15 years after somebody asked 11863 # for it: 11864 # 11865 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11866 # 11867 save_ac_c_werror_flag="$ac_c_werror_flag" 11868 ac_c_werror_flag=yes 11869 # 11870 # We use AC_LANG_SOURCE() so that we can control the complete 11871 # content of the program being compiled. We do not, for example, 11872 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11873 # as it will generate a warning with -Wold-style-definition, meaning 11874 # that we would treat it as not working, as the test will fail if 11875 # *any* error output, including a warning due to the flag we're 11876 # testing, is generated; see 11877 # 11878 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11879 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11880 # 11881 # This may, as per those two messages, be fixed in autoconf 2.70, 11882 # but we only require 2.69 or newer for now. 11883 # 11884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11885/* end confdefs.h. */ 11886int main(void) { return 0; } 11887_ACEOF 11888if ac_fn_c_try_compile "$LINENO" 11889then : 11890 11891 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11892printf "%s\n" "yes" >&6; } 11893 can_add_to_cflags=yes 11894 # 11895 # The compile supports this; do we have some C code for 11896 # which the warning should *not* appear? 11897 # We test the fourth argument because the third argument 11898 # could contain quotes, breaking the test. 11899 # 11900 if test "x" != "x" 11901 then 11902 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 11903 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wundef " >&5 11904printf %s "checking whether -Wundef ... " >&6; } 11905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11906/* end confdefs.h. */ 11907 11908_ACEOF 11909if ac_fn_c_try_compile "$LINENO" 11910then : 11911 11912 # 11913 # Not a problem. 11914 # 11915 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11916printf "%s\n" "no" >&6; } 11917 11918else $as_nop 11919 11920 # 11921 # A problem. 11922 # 11923 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 11924printf "%s\n" "yes" >&6; } 11925 can_add_to_cflags=no 11926 11927fi 11928rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11929 fi 11930 CFLAGS="$save_CFLAGS" 11931 if test x"$can_add_to_cflags" = "xyes" 11932 then 11933 V_CCOPT="$V_CCOPT -Wundef" 11934 fi 11935 11936else $as_nop 11937 11938 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 11939printf "%s\n" "no" >&6; } 11940 CFLAGS="$save_CFLAGS" 11941 11942fi 11943rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 11944 ac_c_werror_flag="$save_ac_c_werror_flag" 11945 11946 # 11947 # This can cause problems with ntohs(), ntohl(), 11948 # htons(), and htonl() on some platforms, such 11949 # as OpenBSD 6.3 with Clang 5.0.1. I guess the 11950 # problem is that the macro that ultimately does 11951 # the byte-swapping involves a conditional 11952 # expression that tests whether the value being 11953 # swapped is a compile-time constant or not, 11954 # using __builtin_constant_p(), and, depending 11955 # on whether it is, does a compile-time swap or 11956 # a run-time swap; perhaps the compiler always 11957 # considers one of the two results of the 11958 # conditional expression is never evaluated, 11959 # because the conditional check is done at 11960 # compile time, and thus always says "that 11961 # expression is never executed". 11962 # 11963 # (Perhaps there should be a way of flagging 11964 # an expression that you *want* evaluated at 11965 # compile time, so that the compiler 1) warns 11966 # if it *can't* be evaluated at compile time 11967 # and 2) *doesn't* warn that the true or false 11968 # branch will never be reached.) 11969 # 11970 11971 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code option" >&5 11972printf %s "checking whether the compiler supports the -Wunreachable-code option... " >&6; } 11973 save_CFLAGS="$CFLAGS" 11974 CFLAGS="$CFLAGS -Wunreachable-code" 11975 # 11976 # XXX - yes, this depends on the way AC_LANG_WERROR works, 11977 # but no mechanism is provided to turn AC_LANG_WERROR on 11978 # *and then turn it back off*, so that we *only* do it when 11979 # testing compiler options - 15 years after somebody asked 11980 # for it: 11981 # 11982 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 11983 # 11984 save_ac_c_werror_flag="$ac_c_werror_flag" 11985 ac_c_werror_flag=yes 11986 # 11987 # We use AC_LANG_SOURCE() so that we can control the complete 11988 # content of the program being compiled. We do not, for example, 11989 # want the default "int main()" that AC_LANG_PROGRAM() generates, 11990 # as it will generate a warning with -Wold-style-definition, meaning 11991 # that we would treat it as not working, as the test will fail if 11992 # *any* error output, including a warning due to the flag we're 11993 # testing, is generated; see 11994 # 11995 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11996 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 11997 # 11998 # This may, as per those two messages, be fixed in autoconf 2.70, 11999 # but we only require 2.69 or newer for now. 12000 # 12001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12002/* end confdefs.h. */ 12003int main(void) { return 0; } 12004_ACEOF 12005if ac_fn_c_try_compile "$LINENO" 12006then : 12007 12008 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12009printf "%s\n" "yes" >&6; } 12010 can_add_to_cflags=yes 12011 # 12012 # The compile supports this; do we have some C code for 12013 # which the warning should *not* appear? 12014 # We test the fourth argument because the third argument 12015 # could contain quotes, breaking the test. 12016 # 12017 if test "xgenerates warnings from ntohs()" != "x" 12018 then 12019 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 12020 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wunreachable-code generates warnings from ntohs()" >&5 12021printf %s "checking whether -Wunreachable-code generates warnings from ntohs()... " >&6; } 12022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12023/* end confdefs.h. */ 12024#include <arpa/inet.h> 12025 12026unsigned short 12027testme(unsigned short a) 12028{ 12029 return ntohs(a); 12030} 12031 12032_ACEOF 12033if ac_fn_c_try_compile "$LINENO" 12034then : 12035 12036 # 12037 # Not a problem. 12038 # 12039 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12040printf "%s\n" "no" >&6; } 12041 12042else $as_nop 12043 12044 # 12045 # A problem. 12046 # 12047 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12048printf "%s\n" "yes" >&6; } 12049 can_add_to_cflags=no 12050 12051fi 12052rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12053 fi 12054 CFLAGS="$save_CFLAGS" 12055 if test x"$can_add_to_cflags" = "xyes" 12056 then 12057 V_CCOPT="$V_CCOPT -Wunreachable-code" 12058 fi 12059 12060else $as_nop 12061 12062 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12063printf "%s\n" "no" >&6; } 12064 CFLAGS="$save_CFLAGS" 12065 12066fi 12067rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12068 ac_c_werror_flag="$save_ac_c_werror_flag" 12069 12070 12071 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-but-set-parameter option" >&5 12072printf %s "checking whether the compiler supports the -Wunused-but-set-parameter option... " >&6; } 12073 save_CFLAGS="$CFLAGS" 12074 CFLAGS="$CFLAGS -Wunused-but-set-parameter" 12075 # 12076 # XXX - yes, this depends on the way AC_LANG_WERROR works, 12077 # but no mechanism is provided to turn AC_LANG_WERROR on 12078 # *and then turn it back off*, so that we *only* do it when 12079 # testing compiler options - 15 years after somebody asked 12080 # for it: 12081 # 12082 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 12083 # 12084 save_ac_c_werror_flag="$ac_c_werror_flag" 12085 ac_c_werror_flag=yes 12086 # 12087 # We use AC_LANG_SOURCE() so that we can control the complete 12088 # content of the program being compiled. We do not, for example, 12089 # want the default "int main()" that AC_LANG_PROGRAM() generates, 12090 # as it will generate a warning with -Wold-style-definition, meaning 12091 # that we would treat it as not working, as the test will fail if 12092 # *any* error output, including a warning due to the flag we're 12093 # testing, is generated; see 12094 # 12095 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 12096 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 12097 # 12098 # This may, as per those two messages, be fixed in autoconf 2.70, 12099 # but we only require 2.69 or newer for now. 12100 # 12101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12102/* end confdefs.h. */ 12103int main(void) { return 0; } 12104_ACEOF 12105if ac_fn_c_try_compile "$LINENO" 12106then : 12107 12108 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12109printf "%s\n" "yes" >&6; } 12110 can_add_to_cflags=yes 12111 # 12112 # The compile supports this; do we have some C code for 12113 # which the warning should *not* appear? 12114 # We test the fourth argument because the third argument 12115 # could contain quotes, breaking the test. 12116 # 12117 if test "x" != "x" 12118 then 12119 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 12120 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-but-set-parameter " >&5 12121printf %s "checking whether -Wunused-but-set-parameter ... " >&6; } 12122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12123/* end confdefs.h. */ 12124 12125_ACEOF 12126if ac_fn_c_try_compile "$LINENO" 12127then : 12128 12129 # 12130 # Not a problem. 12131 # 12132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12133printf "%s\n" "no" >&6; } 12134 12135else $as_nop 12136 12137 # 12138 # A problem. 12139 # 12140 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12141printf "%s\n" "yes" >&6; } 12142 can_add_to_cflags=no 12143 12144fi 12145rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12146 fi 12147 CFLAGS="$save_CFLAGS" 12148 if test x"$can_add_to_cflags" = "xyes" 12149 then 12150 V_CCOPT="$V_CCOPT -Wunused-but-set-parameter" 12151 fi 12152 12153else $as_nop 12154 12155 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12156printf "%s\n" "no" >&6; } 12157 CFLAGS="$save_CFLAGS" 12158 12159fi 12160rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12161 ac_c_werror_flag="$save_ac_c_werror_flag" 12162 12163 12164 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-but-set-variable option" >&5 12165printf %s "checking whether the compiler supports the -Wunused-but-set-variable option... " >&6; } 12166 save_CFLAGS="$CFLAGS" 12167 CFLAGS="$CFLAGS -Wunused-but-set-variable" 12168 # 12169 # XXX - yes, this depends on the way AC_LANG_WERROR works, 12170 # but no mechanism is provided to turn AC_LANG_WERROR on 12171 # *and then turn it back off*, so that we *only* do it when 12172 # testing compiler options - 15 years after somebody asked 12173 # for it: 12174 # 12175 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 12176 # 12177 save_ac_c_werror_flag="$ac_c_werror_flag" 12178 ac_c_werror_flag=yes 12179 # 12180 # We use AC_LANG_SOURCE() so that we can control the complete 12181 # content of the program being compiled. We do not, for example, 12182 # want the default "int main()" that AC_LANG_PROGRAM() generates, 12183 # as it will generate a warning with -Wold-style-definition, meaning 12184 # that we would treat it as not working, as the test will fail if 12185 # *any* error output, including a warning due to the flag we're 12186 # testing, is generated; see 12187 # 12188 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 12189 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 12190 # 12191 # This may, as per those two messages, be fixed in autoconf 2.70, 12192 # but we only require 2.69 or newer for now. 12193 # 12194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12195/* end confdefs.h. */ 12196int main(void) { return 0; } 12197_ACEOF 12198if ac_fn_c_try_compile "$LINENO" 12199then : 12200 12201 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12202printf "%s\n" "yes" >&6; } 12203 can_add_to_cflags=yes 12204 # 12205 # The compile supports this; do we have some C code for 12206 # which the warning should *not* appear? 12207 # We test the fourth argument because the third argument 12208 # could contain quotes, breaking the test. 12209 # 12210 if test "x" != "x" 12211 then 12212 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 12213 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-but-set-variable " >&5 12214printf %s "checking whether -Wunused-but-set-variable ... " >&6; } 12215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12216/* end confdefs.h. */ 12217 12218_ACEOF 12219if ac_fn_c_try_compile "$LINENO" 12220then : 12221 12222 # 12223 # Not a problem. 12224 # 12225 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12226printf "%s\n" "no" >&6; } 12227 12228else $as_nop 12229 12230 # 12231 # A problem. 12232 # 12233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12234printf "%s\n" "yes" >&6; } 12235 can_add_to_cflags=no 12236 12237fi 12238rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12239 fi 12240 CFLAGS="$save_CFLAGS" 12241 if test x"$can_add_to_cflags" = "xyes" 12242 then 12243 V_CCOPT="$V_CCOPT -Wunused-but-set-variable" 12244 fi 12245 12246else $as_nop 12247 12248 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12249printf "%s\n" "no" >&6; } 12250 CFLAGS="$save_CFLAGS" 12251 12252fi 12253rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12254 ac_c_werror_flag="$save_ac_c_werror_flag" 12255 12256 12257 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-parameter option" >&5 12258printf %s "checking whether the compiler supports the -Wunused-parameter option... " >&6; } 12259 save_CFLAGS="$CFLAGS" 12260 CFLAGS="$CFLAGS -Wunused-parameter" 12261 # 12262 # XXX - yes, this depends on the way AC_LANG_WERROR works, 12263 # but no mechanism is provided to turn AC_LANG_WERROR on 12264 # *and then turn it back off*, so that we *only* do it when 12265 # testing compiler options - 15 years after somebody asked 12266 # for it: 12267 # 12268 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 12269 # 12270 save_ac_c_werror_flag="$ac_c_werror_flag" 12271 ac_c_werror_flag=yes 12272 # 12273 # We use AC_LANG_SOURCE() so that we can control the complete 12274 # content of the program being compiled. We do not, for example, 12275 # want the default "int main()" that AC_LANG_PROGRAM() generates, 12276 # as it will generate a warning with -Wold-style-definition, meaning 12277 # that we would treat it as not working, as the test will fail if 12278 # *any* error output, including a warning due to the flag we're 12279 # testing, is generated; see 12280 # 12281 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 12282 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 12283 # 12284 # This may, as per those two messages, be fixed in autoconf 2.70, 12285 # but we only require 2.69 or newer for now. 12286 # 12287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12288/* end confdefs.h. */ 12289int main(void) { return 0; } 12290_ACEOF 12291if ac_fn_c_try_compile "$LINENO" 12292then : 12293 12294 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12295printf "%s\n" "yes" >&6; } 12296 can_add_to_cflags=yes 12297 # 12298 # The compile supports this; do we have some C code for 12299 # which the warning should *not* appear? 12300 # We test the fourth argument because the third argument 12301 # could contain quotes, breaking the test. 12302 # 12303 if test "x" != "x" 12304 then 12305 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 12306 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wunused-parameter " >&5 12307printf %s "checking whether -Wunused-parameter ... " >&6; } 12308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12309/* end confdefs.h. */ 12310 12311_ACEOF 12312if ac_fn_c_try_compile "$LINENO" 12313then : 12314 12315 # 12316 # Not a problem. 12317 # 12318 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12319printf "%s\n" "no" >&6; } 12320 12321else $as_nop 12322 12323 # 12324 # A problem. 12325 # 12326 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12327printf "%s\n" "yes" >&6; } 12328 can_add_to_cflags=no 12329 12330fi 12331rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12332 fi 12333 CFLAGS="$save_CFLAGS" 12334 if test x"$can_add_to_cflags" = "xyes" 12335 then 12336 V_CCOPT="$V_CCOPT -Wunused-parameter" 12337 fi 12338 12339else $as_nop 12340 12341 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12342printf "%s\n" "no" >&6; } 12343 CFLAGS="$save_CFLAGS" 12344 12345fi 12346rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12347 ac_c_werror_flag="$save_ac_c_werror_flag" 12348 12349 12350 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5 12351printf %s "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; } 12352 save_CFLAGS="$CFLAGS" 12353 CFLAGS="$CFLAGS -Wused-but-marked-unused" 12354 # 12355 # XXX - yes, this depends on the way AC_LANG_WERROR works, 12356 # but no mechanism is provided to turn AC_LANG_WERROR on 12357 # *and then turn it back off*, so that we *only* do it when 12358 # testing compiler options - 15 years after somebody asked 12359 # for it: 12360 # 12361 # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 12362 # 12363 save_ac_c_werror_flag="$ac_c_werror_flag" 12364 ac_c_werror_flag=yes 12365 # 12366 # We use AC_LANG_SOURCE() so that we can control the complete 12367 # content of the program being compiled. We do not, for example, 12368 # want the default "int main()" that AC_LANG_PROGRAM() generates, 12369 # as it will generate a warning with -Wold-style-definition, meaning 12370 # that we would treat it as not working, as the test will fail if 12371 # *any* error output, including a warning due to the flag we're 12372 # testing, is generated; see 12373 # 12374 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 12375 # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 12376 # 12377 # This may, as per those two messages, be fixed in autoconf 2.70, 12378 # but we only require 2.69 or newer for now. 12379 # 12380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12381/* end confdefs.h. */ 12382int main(void) { return 0; } 12383_ACEOF 12384if ac_fn_c_try_compile "$LINENO" 12385then : 12386 12387 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12388printf "%s\n" "yes" >&6; } 12389 can_add_to_cflags=yes 12390 # 12391 # The compile supports this; do we have some C code for 12392 # which the warning should *not* appear? 12393 # We test the fourth argument because the third argument 12394 # could contain quotes, breaking the test. 12395 # 12396 if test "x" != "x" 12397 then 12398 CFLAGS="$CFLAGS $ac_lbl_cc_force_warning_errors" 12399 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether -Wused-but-marked-unused " >&5 12400printf %s "checking whether -Wused-but-marked-unused ... " >&6; } 12401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12402/* end confdefs.h. */ 12403 12404_ACEOF 12405if ac_fn_c_try_compile "$LINENO" 12406then : 12407 12408 # 12409 # Not a problem. 12410 # 12411 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12412printf "%s\n" "no" >&6; } 12413 12414else $as_nop 12415 12416 # 12417 # A problem. 12418 # 12419 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12420printf "%s\n" "yes" >&6; } 12421 can_add_to_cflags=no 12422 12423fi 12424rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12425 fi 12426 CFLAGS="$save_CFLAGS" 12427 if test x"$can_add_to_cflags" = "xyes" 12428 then 12429 V_CCOPT="$V_CCOPT -Wused-but-marked-unused" 12430 fi 12431 12432else $as_nop 12433 12434 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12435printf "%s\n" "no" >&6; } 12436 CFLAGS="$save_CFLAGS" 12437 12438fi 12439rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12440 ac_c_werror_flag="$save_ac_c_werror_flag" 12441 12442 fi 12443 12444 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5 12445printf %s "checking whether the compiler supports generating dependencies... " >&6; } 12446 if test "$GCC" = yes ; then 12447 # 12448 # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even 12449 # though it's not); we assume that, in this case, the flag 12450 # would be -M. 12451 # 12452 ac_lbl_dependency_flag="-M" 12453 else 12454 # 12455 # Not GCC or a compiler deemed to be GCC; what platform is 12456 # this? (We're assuming that if the compiler isn't GCC 12457 # it's the compiler from the vendor of the OS; that won't 12458 # necessarily be true for x86 platforms, where it might be 12459 # the Intel C compiler.) 12460 # 12461 case "$host_os" in 12462 12463 irix*|osf*|darwin*) 12464 # 12465 # MIPS C for IRIX, DEC C, and clang all use -M. 12466 # 12467 ac_lbl_dependency_flag="-M" 12468 ;; 12469 12470 solaris*) 12471 # 12472 # Sun C uses -xM. 12473 # 12474 ac_lbl_dependency_flag="-xM" 12475 ;; 12476 12477 hpux*) 12478 # 12479 # HP's older C compilers don't support this. 12480 # HP's newer C compilers support this with 12481 # either +M or +Make; the older compilers 12482 # interpret +M as something completely 12483 # different, so we use +Make so we don't 12484 # think it works with the older compilers. 12485 # 12486 ac_lbl_dependency_flag="+Make" 12487 ;; 12488 12489 *) 12490 # 12491 # Not one of the above; assume no support for 12492 # generating dependencies. 12493 # 12494 ac_lbl_dependency_flag="" 12495 ;; 12496 esac 12497 fi 12498 12499 # 12500 # Is ac_lbl_dependency_flag defined and, if so, does the compiler 12501 # complain about it? 12502 # 12503 # Note: clang doesn't seem to exit with an error status when handed 12504 # an unknown non-warning error, even if you pass it 12505 # -Werror=unknown-warning-option. However, it always supports 12506 # -M, so the fact that this test always succeeds with clang 12507 # isn't an issue. 12508 # 12509 if test ! -z "$ac_lbl_dependency_flag"; then 12510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12511/* end confdefs.h. */ 12512int main(void) { return 0; } 12513_ACEOF 12514 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5 12515 (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5 12516 ac_status=$? 12517 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 12518 test $ac_status = 0; }; then 12519 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5 12520printf "%s\n" "yes, with $ac_lbl_dependency_flag" >&6; } 12521 DEPENDENCY_CFLAG="$ac_lbl_dependency_flag" 12522 MKDEP='${top_srcdir}/mkdep' 12523 else 12524 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12525printf "%s\n" "no" >&6; } 12526 # 12527 # We can't run mkdep, so have "make depend" do 12528 # nothing. 12529 # 12530 MKDEP='${top_srcdir}/nomkdep' 12531 fi 12532 rm -rf conftest* 12533 else 12534 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12535printf "%s\n" "no" >&6; } 12536 # 12537 # We can't run mkdep, so have "make depend" do 12538 # nothing. 12539 # 12540 MKDEP='${top_srcdir}/nomkdep' 12541 fi 12542 12543 12544 12545 # 12546 # We used to set -n32 for IRIX 6 when not using GCC (presumed 12547 # to mean that we're using MIPS C or MIPSpro C); it specified 12548 # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm 12549 # not sure why that would be something to do *only* with a 12550 # .devel file; why should the ABI for which we produce code 12551 # depend on .devel? 12552 # 12553 os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'` 12554 name="lbl/os-$os.h" 12555 if test -f $name ; then 12556 ln -s $name os-proto.h 12557 12558printf "%s\n" "#define HAVE_OS_PROTO_H 1" >>confdefs.h 12559 12560 else 12561 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: can't find $name" >&5 12562printf "%s\n" "$as_me: WARNING: can't find $name" >&2;} 12563 fi 12564 fi 12565 12566# 12567# Check to see if the sockaddr struct has the 4.4 BSD sa_len member. 12568# 12569ac_fn_c_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" " 12570 #include <sys/types.h> 12571 #include <sys/socket.h> 12572 12573" 12574if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes 12575then : 12576 12577printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_SA_LEN 1" >>confdefs.h 12578 12579 12580fi 12581 12582 12583# 12584# Check to see if there's a sockaddr_storage structure. 12585# 12586ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " 12587 #include <sys/types.h> 12588 #include <sys/socket.h> 12589 12590" 12591if test "x$ac_cv_type_struct_sockaddr_storage" = xyes 12592then : 12593 12594printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h 12595 12596 12597fi 12598 12599 12600# 12601# Check to see if the dl_hp_ppa_info_t struct has the HP-UX 11.00 12602# dl_module_id_1 member. 12603# 12604# NOTE: any failure means we conclude that it doesn't have that member, 12605# so if we don't have DLPI, don't have a <sys/dlpi_ext.h> header, or 12606# have one that doesn't declare a dl_hp_ppa_info_t type, we conclude 12607# it doesn't have that member (which is OK, as either we won't be 12608# using code that would use that member, or we wouldn't compile in 12609# any case). 12610# 12611ac_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" " 12612 #include <sys/types.h> 12613 #include <sys/dlpi.h> 12614 #include <sys/dlpi_ext.h> 12615 12616" 12617if test "x$ac_cv_member_dl_hp_ppa_info_t_dl_module_id_1" = xyes 12618then : 12619 12620printf "%s\n" "#define HAVE_DL_HP_PPA_INFO_T_DL_MODULE_ID_1 1" >>confdefs.h 12621 12622 12623fi 12624 12625 12626# 12627# Various Linux-specific mechanisms. 12628# 12629# Check whether --enable-usb was given. 12630if test ${enable_usb+y} 12631then : 12632 enableval=$enable_usb; 12633else $as_nop 12634 enable_usb=yes 12635fi 12636 12637 12638# 12639# If somebody requested an XXX-only pcap, that doesn't include 12640# additional mechanisms. 12641# 12642if test "xxx_only" != yes; then 12643 case "$host_os" in 12644 linux*) 12645 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Linux usbmon USB sniffing support" >&5 12646printf %s "checking for Linux usbmon USB sniffing support... " >&6; } 12647 if test "x$enable_usb" != "xno" ; then 12648 12649printf "%s\n" "#define PCAP_SUPPORT_LINUX_USBMON 1" >>confdefs.h 12650 12651 MODULE_C_SRC="$MODULE_C_SRC pcap-usb-linux.c" 12652 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 12653printf "%s\n" "yes" >&6; } 12654 # 12655 # Note: if the directory for special files is *EVER* somewhere 12656 # other than the UN*X standard of /dev (which will break any 12657 # software that looks for /dev/null or /dev/tty, for example, 12658 # so doing that is *REALLY* not a good idea), please provide 12659 # some mechanism to determine that directory at *run time*, 12660 # rather than *configure time*, so that it works when doing 12661 # a cross-build, and that works with *multiple* distributions, 12662 # with our without udev, and with multiple versions of udev, 12663 # with udevinfo or udevadm or any other mechanism to get the 12664 # special files directory. 12665 # 12666 # Do we have a version of <linux/compiler.h> available? 12667 # If so, we might need it for <linux/usbdevice_fs.h>. 12668 # 12669 ac_fn_c_check_header_compile "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default" 12670if test "x$ac_cv_header_linux_compiler_h" = xyes 12671then : 12672 printf "%s\n" "#define HAVE_LINUX_COMPILER_H 1" >>confdefs.h 12673 12674fi 12675 12676 if test "$ac_cv_header_linux_compiler_h" = yes; then 12677 # 12678 # Yes - include it when testing for <linux/usbdevice_fs.h>. 12679 # 12680 ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "#include <linux/compiler.h> 12681" 12682if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes 12683then : 12684 printf "%s\n" "#define HAVE_LINUX_USBDEVICE_FS_H 1" >>confdefs.h 12685 12686fi 12687 12688 else 12689 ac_fn_c_check_header_compile "$LINENO" "linux/usbdevice_fs.h" "ac_cv_header_linux_usbdevice_fs_h" "$ac_includes_default" 12690if test "x$ac_cv_header_linux_usbdevice_fs_h" = xyes 12691then : 12692 printf "%s\n" "#define HAVE_LINUX_USBDEVICE_FS_H 1" >>confdefs.h 12693 12694fi 12695 12696 fi 12697 if test "$ac_cv_header_linux_usbdevice_fs_h" = yes; then 12698 # 12699 # OK, does it define bRequestType? Older versions of the kernel 12700 # define fields with names like "requesttype, "request", and 12701 # "value", rather than "bRequestType", "bRequest", and 12702 # "wValue". 12703 # 12704 ac_fn_c_check_member "$LINENO" "struct usbdevfs_ctrltransfer" "bRequestType" "ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" " 12705 $ac_includes_default 12706 #ifdef HAVE_LINUX_COMPILER_H 12707 #include <linux/compiler.h> 12708 #endif 12709 #include <linux/usbdevice_fs.h> 12710 12711" 12712if test "x$ac_cv_member_struct_usbdevfs_ctrltransfer_bRequestType" = xyes 12713then : 12714 12715printf "%s\n" "#define HAVE_STRUCT_USBDEVFS_CTRLTRANSFER_BREQUESTTYPE 1" >>confdefs.h 12716 12717 12718fi 12719 12720 fi 12721 else 12722 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 12723printf "%s\n" "no" >&6; } 12724 fi 12725 12726 # 12727 # Life's too short to deal with trying to get this to compile 12728 # if you don't get the right types defined with 12729 # __KERNEL_STRICT_NAMES getting defined by some other include. 12730 # 12731 # Check whether the includes Just Work. If not, don't turn on 12732 # netfilter support. 12733 # 12734 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netfilter support" >&5 12735printf %s "checking whether we can compile the netfilter support... " >&6; } 12736 if test ${ac_cv_netfilter_can_compile+y} 12737then : 12738 printf %s "(cached) " >&6 12739else $as_nop 12740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12741/* end confdefs.h. */ 12742 12743$ac_includes_default 12744#include <sys/socket.h> 12745#include <netinet/in.h> 12746#include <linux/types.h> 12747 12748#include <linux/netlink.h> 12749#include <linux/netfilter.h> 12750#include <linux/netfilter/nfnetlink.h> 12751#include <linux/netfilter/nfnetlink_log.h> 12752#include <linux/netfilter/nfnetlink_queue.h> 12753int 12754main (void) 12755{ 12756 12757 ; 12758 return 0; 12759} 12760_ACEOF 12761if ac_fn_c_try_compile "$LINENO" 12762then : 12763 ac_cv_netfilter_can_compile=yes 12764else $as_nop 12765 ac_cv_netfilter_can_compile=no 12766fi 12767rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12768fi 12769 12770 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_netfilter_can_compile" >&5 12771printf "%s\n" "$ac_cv_netfilter_can_compile" >&6; } 12772 if test $ac_cv_netfilter_can_compile = yes ; then 12773 12774printf "%s\n" "#define PCAP_SUPPORT_NETFILTER 1" >>confdefs.h 12775 12776 MODULE_C_SRC="$MODULE_C_SRC pcap-netfilter-linux.c" 12777 fi 12778 ;; 12779 esac 12780fi 12781 12782 12783 12784# Check whether --enable-netmap was given. 12785if test ${enable_netmap+y} 12786then : 12787 enableval=$enable_netmap; 12788else $as_nop 12789 enable_netmap=yes 12790fi 12791 12792 12793if test "x$enable_netmap" != "xno" ; then 12794 # 12795 # Check whether net/netmap_user.h is usable if NETMAP_WITH_LIBS is 12796 # defined; it's not usable on DragonFly BSD 4.6 if NETMAP_WITH_LIBS 12797 # is defined, for example, as it includes a nonexistent malloc.h 12798 # header. 12799 # 12800 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we can compile the netmap support" >&5 12801printf %s "checking whether we can compile the netmap support... " >&6; } 12802 if test ${ac_cv_net_netmap_user_can_compile+y} 12803then : 12804 printf %s "(cached) " >&6 12805else $as_nop 12806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12807/* end confdefs.h. */ 12808 12809$ac_includes_default 12810#define NETMAP_WITH_LIBS 12811#include <net/netmap_user.h> 12812int 12813main (void) 12814{ 12815 12816 ; 12817 return 0; 12818} 12819_ACEOF 12820if ac_fn_c_try_compile "$LINENO" 12821then : 12822 ac_cv_net_netmap_user_can_compile=yes 12823else $as_nop 12824 ac_cv_net_netmap_user_can_compile=no 12825fi 12826rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 12827fi 12828 12829 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_net_netmap_user_can_compile" >&5 12830printf "%s\n" "$ac_cv_net_netmap_user_can_compile" >&6; } 12831 if test $ac_cv_net_netmap_user_can_compile = yes ; then 12832 12833printf "%s\n" "#define PCAP_SUPPORT_NETMAP 1" >>confdefs.h 12834 12835 MODULE_C_SRC="$MODULE_C_SRC pcap-netmap.c" 12836 fi 12837 12838fi 12839 12840# Check for DPDK support. 12841 12842# Check whether --with-dpdk was given. 12843if test ${with_dpdk+y} 12844then : 12845 withval=$with_dpdk; 12846 if test "$withval" = no 12847 then 12848 # User doesn't want DPDK support. 12849 want_dpdk=no 12850 elif test "$withval" = yes 12851 then 12852 # User wants DPDK support but hasn't specified a directory. 12853 want_dpdk=yes 12854 else 12855 # User wants DPDK support and has specified a directory, 12856 # so use the provided value. 12857 want_dpdk=yes 12858 dpdk_dir=$withval 12859 fi 12860 12861else $as_nop 12862 12863 if test "$V_PCAP" = dpdk; then 12864 # User requested DPDK-only libpcap, so we'd better have 12865 # the DPDK API. 12866 want_dpdk=yes 12867 elif test "xxx_only" = yes; then 12868 # User requested something-else-only pcap, so they don't 12869 # want DPDK support. 12870 want_dpdk=no 12871 else 12872 # 12873 # Use DPDK API if present, otherwise don't 12874 # 12875 want_dpdk=ifpresent 12876 fi 12877 12878fi 12879 12880 12881if test "$want_dpdk" != no; then 12882 # 12883 # The user didn't explicitly say they don't want DPDK, 12884 # so see if we have it. 12885 # 12886 # We only try to find it using pkg-config; DPDK is *SO* 12887 # complicated - DPDK 19.02, for example, has about 117(!) 12888 # libraries, and the precise set of libraries required has 12889 # changed over time - so attempting to guess which libraries 12890 # you need, and hardcoding that in an attempt to find the 12891 # libraries without DPDK, rather than relying on DPDK to 12892 # tell you, with a .pc file, what libraries are needed, 12893 # is *EXTREMELY* fragile and has caused some bug reports, 12894 # so we're just not going to do it. 12895 # 12896 # If that causes a problem, the only thing we will do is 12897 # accept an alternative way of finding the appropriate 12898 # library set for the installed version of DPDK that is 12899 # as robust as pkg-config (i.e., it had better work as well 12900 # as pkg-config with *ALL* versions of DPDK that provide a 12901 # libdpdk.pc file). 12902 # 12903 # If --with-dpdk={path} was specified, add {path}/pkgconfig 12904 # to PKG_CONFIG_PATH, so we look for the .pc file there, 12905 # first. 12906 # 12907 save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH" 12908 if test -n "$dpdk_dir"; then 12909 PKG_CONFIG_PATH="$dpdk_dir:$PKG_CONFIG_PATH" 12910 fi 12911 12912{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libdpdk with pkg-config" >&5 12913printf %s "checking for libdpdk with pkg-config... " >&6; } 12914if test -n "$PKG_CONFIG"; then 12915 12916 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libdpdk\""; } >&5 12917 ($PKG_CONFIG --exists --print-errors "libdpdk") 2>&5 12918 ac_status=$? 12919 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 12920 test $ac_status = 0; }; then 12921 # 12922 # The package was found, so try to get its C flags and 12923 # libraries. 12924 # 12925 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5 12926printf "%s\n" "found" >&6; } 12927 if test ! -n "$DPDK_CFLAGS"; then 12928 DPDK_CFLAGS=`$PKG_CONFIG --cflags "libdpdk" 2>/dev/null` 12929 if test "x$?" != "x0"; then 12930 # 12931 # That failed - report an error. 12932 # Re-run the command, telling pkg-config to print an error 12933 # message, capture the error message, and report it. 12934 # This causes the configuration script to fail, as it means 12935 # the script is almost certainly doing something wrong. 12936 # 12937 12938if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 12939 _pkg_short_errors_supported=yes 12940else 12941 _pkg_short_errors_supported=no 12942fi 12943 if test $_pkg_short_errors_supported = yes; then 12944 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --cflags "libdpdk" 2>&1` 12945 else 12946 _pkg_error_string=`$PKG_CONFIG --print-errors --cflags "libdpdk" 2>&1` 12947 fi 12948 as_fn_error $? "$PKG_CONFIG --cflags \"libdpdk\" failed: $_pkg_error_string" "$LINENO" 5 12949 fi 12950 fi 12951 if test ! -n "$DPDK_LIBS"; then 12952 DPDK_LIBS=`$PKG_CONFIG --libs "libdpdk" 2>/dev/null` 12953 if test "x$?" != "x0"; then 12954 # 12955 # That failed - report an error. 12956 # Re-run the command, telling pkg-config to print an error 12957 # message, capture the error message, and report it. 12958 # This causes the configuration script to fail, as it means 12959 # the script is almost certainly doing something wrong. 12960 # 12961 12962if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 12963 _pkg_short_errors_supported=yes 12964else 12965 _pkg_short_errors_supported=no 12966fi 12967 if test $_pkg_short_errors_supported = yes; then 12968 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs "libdpdk" 2>&1` 12969 else 12970 _pkg_error_string=`$PKG_CONFIG --print-errors --libs "libdpdk" 2>&1` 12971 fi 12972 as_fn_error $? "$PKG_CONFIG --libs \"libdpdk\" failed: $_pkg_error_string" "$LINENO" 5 12973 fi 12974 fi 12975 if test ! -n "$DPDK_LIBS_STATIC"; then 12976 DPDK_LIBS_STATIC=`$PKG_CONFIG --libs --static "libdpdk" 2>/dev/null` 12977 if test "x$?" != "x0"; then 12978 # 12979 # That failed - report an error. 12980 # Re-run the command, telling pkg-config to print an error 12981 # message, capture the error message, and report it. 12982 # This causes the configuration script to fail, as it means 12983 # the script is almost certainly doing something wrong. 12984 # 12985 12986if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 12987 _pkg_short_errors_supported=yes 12988else 12989 _pkg_short_errors_supported=no 12990fi 12991 if test $_pkg_short_errors_supported = yes; then 12992 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs --static "libdpdk" 2>&1` 12993 else 12994 _pkg_error_string=`$PKG_CONFIG --print-errors --libs --static "libdpdk" 2>&1` 12995 fi 12996 as_fn_error $? "$PKG_CONFIG --libs --static \"libdpdk\" failed: $_pkg_error_string" "$LINENO" 5 12997 fi 12998 fi 12999 13000 found_dpdk=yes 13001 13002 else 13003 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 13004printf "%s\n" "not found" >&6; } 13005 : 13006 fi 13007else 13008 # No pkg-config, so obviously not found with pkg-config. 13009 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config not found" >&5 13010printf "%s\n" "pkg-config not found" >&6; } 13011 : 13012fi 13013 13014 PKG_CONFIG_PATH="$save_PKG_CONFIG_PATH" 13015 13016 # 13017 # Did we find DPDK? 13018 # 13019 if test "$found_dpdk" = yes; then 13020 # 13021 # Found it. 13022 # 13023 # We call rte_eth_dev_count_avail(), and older versions 13024 # of DPDK didn't have it, so check for it. 13025 # 13026 13027 save_CFLAGS="$CFLAGS" 13028 save_LIBS="$LIBS" 13029 save_LDFLAGS="$LDFLAGS" 13030 13031 CFLAGS="$CFLAGS $DPDK_CFLAGS" 13032 LIBS="$LIBS $DPDK_LIBS" 13033 ac_fn_c_check_func "$LINENO" "rte_eth_dev_count_avail" "ac_cv_func_rte_eth_dev_count_avail" 13034if test "x$ac_cv_func_rte_eth_dev_count_avail" = xyes 13035then : 13036 13037fi 13038 13039 13040 CFLAGS="$save_CFLAGS" 13041 LIBS="$save_LIBS" 13042 LDFLAGS="$save_LDFLAGS" 13043 13044 fi 13045 13046 if test "$ac_cv_func_rte_eth_dev_count_avail" = yes; then 13047 # 13048 # We found a usable DPDK. 13049 # 13050 # Check whether the rte_ether.h file defines 13051 # struct ether_addr or struct rte_ether_addr. 13052 # 13053 # ("API compatibility? That's for losers!") 13054 # 13055 13056 save_CFLAGS="$CFLAGS" 13057 save_LIBS="$LIBS" 13058 save_LDFLAGS="$LDFLAGS" 13059 13060 CFLAGS="$CFLAGS $DPDK_CFLAGS" 13061 LIBS="$LIBS $DPDK_LIBS" 13062 ac_fn_c_check_type "$LINENO" "struct rte_ether_addr" "ac_cv_type_struct_rte_ether_addr" " 13063 #include <rte_ether.h> 13064 13065" 13066if test "x$ac_cv_type_struct_rte_ether_addr" = xyes 13067then : 13068 13069printf "%s\n" "#define HAVE_STRUCT_RTE_ETHER_ADDR 1" >>confdefs.h 13070 13071 13072fi 13073 13074 13075 CFLAGS="$save_CFLAGS" 13076 LIBS="$save_LIBS" 13077 LDFLAGS="$save_LDFLAGS" 13078 13079 13080 # 13081 # We can build with DPDK. 13082 # 13083 V_INCLS="$V_INCLS $DPDK_CFLAGS" 13084 ADDITIONAL_LIBS="$ADDITIONAL_LIBS $DPDK_LIBS" 13085 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $DPDK_LIBS_STATIC" 13086 REQUIRES_PRIVATE="$REQUIRES_PRIVATE libdpdk" 13087 13088printf "%s\n" "#define PCAP_SUPPORT_DPDK 1" >>confdefs.h 13089 13090 if test $V_PCAP != dpdk ; then 13091 MODULE_C_SRC="$MODULE_C_SRC pcap-dpdk.c" 13092 fi 13093 else 13094 # 13095 # We didn't find a usable DPDK. 13096 # If we required it (with --with-dpdk or --with-pcap=dpdk), 13097 # fail with an appropriate message telling the user what 13098 # the problem was, otherwise note the problem with a 13099 # warning. 13100 # 13101 if test "$found_dpdk" != yes; then 13102 # 13103 # Not found with pkg-config. Note that we 13104 # require that DPDK must be findable with 13105 # pkg-config. 13106 # 13107 if test "$V_PCAP" = dpdk; then 13108 # 13109 # User requested DPDK-only capture support. 13110 # 13111 as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but 13112we couldn't find DPDK with pkg-config. Make sure that pkg-config is 13113installed, that DPDK 18.02.2 or later is installed, and that DPDK 13114provides a .pc file." "$LINENO" 5 13115 fi 13116 13117 if test "$want_dpdk" = yes; then 13118 # 13119 # User requested that libpcap include 13120 # DPDK capture support. 13121 # 13122 as_fn_error $? "DPDK support requested with --with-dpdk, but we 13123couldn't find DPDK with pkg-config. Make sure that pkg-config 13124is installed, that DPDK 18.02.2 or later is installed, and that 13125DPDK provides .pc file." "$LINENO" 5 13126 fi 13127 13128 # 13129 # User didn't indicate whether they wanted DPDK 13130 # or not; just warn why we didn't find it. 13131 # 13132 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: We couldn't find DPDK with pkg-config. If 13133you want DPDK support, make sure that pkg-config is installed, 13134that DPDK 18.02.2 or later is installed, and that DPDK provides a 13135.pc file." >&5 13136printf "%s\n" "$as_me: WARNING: We couldn't find DPDK with pkg-config. If 13137you want DPDK support, make sure that pkg-config is installed, 13138that DPDK 18.02.2 or later is installed, and that DPDK provides a 13139.pc file." >&2;} 13140 elif test "$ac_cv_func_rte_eth_dev_count_avail" != yes; then 13141 # 13142 # Found with pkg-config, but we couldn't compile 13143 # a program that calls rte_eth_dev_count(); we 13144 # probably have the developer package installed, 13145 # but don't have a sufficiently recent version 13146 # of DPDK. Note that we need a sufficiently 13147 # recent version of DPDK. 13148 # 13149 if test "$V_PCAP" = dpdk; then 13150 # 13151 # User requested DPDK-only capture support. 13152 # 13153 as_fn_error $? "DPDK support requested with --with-pcap=dpdk, but we 13154can't compile libpcap with DPDK. Make sure that DPDK 18.02.2 or later 13155is installed." "$LINENO" 5 13156 fi 13157 13158 if test "$want_dpdk" = yes; then 13159 # 13160 # User requested that libpcap include 13161 # DPDK capture support. 13162 # 13163 as_fn_error $? "DPDK support requested with --with-dpdk, but 13164we can't compile libpcap with DPDK. Make sure that DPDK 18.02.2 13165or later is DPDK is installed." "$LINENO" 5 13166 fi 13167 13168 # 13169 # User didn't indicate whether they wanted DPDK 13170 # or not; just warn why we didn't find it. 13171 # 13172 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: DPDK was found, but we can't compile libpcap with it. 13173Make sure that DPDK 18.02.2 or later is installed." >&5 13174printf "%s\n" "$as_me: WARNING: DPDK was found, but we can't compile libpcap with it. 13175Make sure that DPDK 18.02.2 or later is installed." >&2;} 13176 fi 13177 fi 13178fi 13179 13180 13181# Check whether --enable-bluetooth was given. 13182if test ${enable_bluetooth+y} 13183then : 13184 enableval=$enable_bluetooth; 13185else $as_nop 13186 enable_bluetooth=ifsupportavailable 13187fi 13188 13189 13190if test "xxx_only" = yes; then 13191 # User requested something-else-only pcap, so they don't 13192 # want Bluetooth support. 13193 enable_bluetooth=no 13194fi 13195 13196if test "x$enable_bluetooth" != "xno" ; then 13197 case "$host_os" in 13198 linux*) 13199 ac_fn_c_check_header_compile "$LINENO" "bluetooth/bluetooth.h" "ac_cv_header_bluetooth_bluetooth_h" "$ac_includes_default" 13200if test "x$ac_cv_header_bluetooth_bluetooth_h" = xyes 13201then : 13202 13203 # 13204 # We have bluetooth.h, so we support Bluetooth 13205 # sniffing. 13206 # 13207 13208printf "%s\n" "#define PCAP_SUPPORT_BT 1" >>confdefs.h 13209 13210 MODULE_C_SRC="$MODULE_C_SRC pcap-bt-linux.c" 13211 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is supported" >&5 13212printf "%s\n" "$as_me: Bluetooth sniffing is supported" >&6;} 13213 ac_lbl_bluetooth_available=yes 13214 13215 # 13216 # OK, does struct sockaddr_hci have an hci_channel 13217 # member? 13218 # 13219 ac_fn_c_check_member "$LINENO" "struct sockaddr_hci" "hci_channel" "ac_cv_member_struct_sockaddr_hci_hci_channel" " 13220 #include <bluetooth/bluetooth.h> 13221 #include <bluetooth/hci.h> 13222 13223" 13224if test "x$ac_cv_member_struct_sockaddr_hci_hci_channel" = xyes 13225then : 13226 13227printf "%s\n" "#define HAVE_STRUCT_SOCKADDR_HCI_HCI_CHANNEL 1" >>confdefs.h 13228 13229 13230 # 13231 # Yes; is HCI_CHANNEL_MONITOR defined? 13232 # 13233 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if HCI_CHANNEL_MONITOR is defined" >&5 13234printf %s "checking if HCI_CHANNEL_MONITOR is defined... " >&6; } 13235 if test ${ac_cv_lbl_hci_channel_monitor_is_defined+y} 13236then : 13237 printf %s "(cached) " >&6 13238else $as_nop 13239 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13240/* end confdefs.h. */ 13241 13242 #include <bluetooth/bluetooth.h> 13243 #include <bluetooth/hci.h> 13244 13245int 13246main (void) 13247{ 13248 13249 int i = HCI_CHANNEL_MONITOR; 13250 13251 ; 13252 return 0; 13253} 13254_ACEOF 13255if ac_fn_c_try_compile "$LINENO" 13256then : 13257 13258 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 13259printf "%s\n" "yes" >&6; } 13260 13261printf "%s\n" "#define PCAP_SUPPORT_BT_MONITOR 1" >>confdefs.h 13262 13263 MODULE_C_SRC="$MODULE_C_SRC pcap-bt-monitor-linux.c" 13264 13265else $as_nop 13266 13267 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 13268printf "%s\n" "no" >&6; } 13269 13270fi 13271rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 13272fi 13273 13274 13275fi 13276 13277 13278else $as_nop 13279 13280 # 13281 # We don't have bluetooth.h, so we don't support 13282 # Bluetooth sniffing. 13283 # 13284 if test "x$enable_bluetooth" = "xyes" ; then 13285 as_fn_error $? "Bluetooth sniffing is not supported; install bluez-lib devel to enable it" "$LINENO" 5 13286 else 13287 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&5 13288printf "%s\n" "$as_me: Bluetooth sniffing is not supported; install bluez-lib devel to enable it" >&6;} 13289 fi 13290 13291fi 13292 13293 ;; 13294 *) 13295 if test "x$enable_bluetooth" = "xyes" ; then 13296 as_fn_error $? "no Bluetooth sniffing support implemented for $host_os" "$LINENO" 5 13297 else 13298 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: no Bluetooth sniffing support implemented for $host_os" >&5 13299printf "%s\n" "$as_me: no Bluetooth sniffing support implemented for $host_os" >&6;} 13300 fi 13301 ;; 13302 esac 13303 13304fi 13305 13306# Check whether --enable-dbus was given. 13307if test ${enable_dbus+y} 13308then : 13309 enableval=$enable_dbus; 13310else $as_nop 13311 enable_dbus=ifavailable 13312fi 13313 13314 13315if test "xxx_only" = yes; then 13316 # User requested something-else-only pcap, so they don't 13317 # want D-Bus support. 13318 enable_dbus=no 13319fi 13320 13321if test "x$enable_dbus" != "xno"; then 13322 if test "x$enable_dbus" = "xyes"; then 13323 case "$host_os" in 13324 13325 darwin*) 13326 # 13327 # We don't support D-Bus sniffing on macOS; see 13328 # 13329 # https://bugs.freedesktop.org/show_bug.cgi?id=74029 13330 # 13331 # The user requested it, so fail. 13332 # 13333 as_fn_error $? "Due to freedesktop.org bug 74029, D-Bus capture support is not available on macOS" "$LINENO" 5 13334 esac 13335 else 13336 case "$host_os" in 13337 13338 darwin*) 13339 # 13340 # We don't support D-Bus sniffing on macOS; see 13341 # 13342 # https://bugs.freedesktop.org/show_bug.cgi?id=74029 13343 # 13344 # The user didn't explicitly request it, so just 13345 # silently refuse to enable it. 13346 # 13347 enable_dbus="no" 13348 ;; 13349 esac 13350 fi 13351fi 13352 13353if test "x$enable_dbus" != "xno"; then 13354 13355{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dbus-1 with pkg-config" >&5 13356printf %s "checking for dbus-1 with pkg-config... " >&6; } 13357if test -n "$PKG_CONFIG"; then 13358 13359 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"dbus-1\""; } >&5 13360 ($PKG_CONFIG --exists --print-errors "dbus-1") 2>&5 13361 ac_status=$? 13362 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 13363 test $ac_status = 0; }; then 13364 # 13365 # The package was found, so try to get its C flags and 13366 # libraries. 13367 # 13368 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5 13369printf "%s\n" "found" >&6; } 13370 if test ! -n "$DBUS_CFLAGS"; then 13371 DBUS_CFLAGS=`$PKG_CONFIG --cflags "dbus-1" 2>/dev/null` 13372 if test "x$?" != "x0"; then 13373 # 13374 # That failed - report an error. 13375 # Re-run the command, telling pkg-config to print an error 13376 # message, capture the error message, and report it. 13377 # This causes the configuration script to fail, as it means 13378 # the script is almost certainly doing something wrong. 13379 # 13380 13381if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 13382 _pkg_short_errors_supported=yes 13383else 13384 _pkg_short_errors_supported=no 13385fi 13386 if test $_pkg_short_errors_supported = yes; then 13387 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --cflags "dbus-1" 2>&1` 13388 else 13389 _pkg_error_string=`$PKG_CONFIG --print-errors --cflags "dbus-1" 2>&1` 13390 fi 13391 as_fn_error $? "$PKG_CONFIG --cflags \"dbus-1\" failed: $_pkg_error_string" "$LINENO" 5 13392 fi 13393 fi 13394 if test ! -n "$DBUS_LIBS"; then 13395 DBUS_LIBS=`$PKG_CONFIG --libs "dbus-1" 2>/dev/null` 13396 if test "x$?" != "x0"; then 13397 # 13398 # That failed - report an error. 13399 # Re-run the command, telling pkg-config to print an error 13400 # message, capture the error message, and report it. 13401 # This causes the configuration script to fail, as it means 13402 # the script is almost certainly doing something wrong. 13403 # 13404 13405if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 13406 _pkg_short_errors_supported=yes 13407else 13408 _pkg_short_errors_supported=no 13409fi 13410 if test $_pkg_short_errors_supported = yes; then 13411 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs "dbus-1" 2>&1` 13412 else 13413 _pkg_error_string=`$PKG_CONFIG --print-errors --libs "dbus-1" 2>&1` 13414 fi 13415 as_fn_error $? "$PKG_CONFIG --libs \"dbus-1\" failed: $_pkg_error_string" "$LINENO" 5 13416 fi 13417 fi 13418 if test ! -n "$DBUS_LIBS_STATIC"; then 13419 DBUS_LIBS_STATIC=`$PKG_CONFIG --libs --static "dbus-1" 2>/dev/null` 13420 if test "x$?" != "x0"; then 13421 # 13422 # That failed - report an error. 13423 # Re-run the command, telling pkg-config to print an error 13424 # message, capture the error message, and report it. 13425 # This causes the configuration script to fail, as it means 13426 # the script is almost certainly doing something wrong. 13427 # 13428 13429if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 13430 _pkg_short_errors_supported=yes 13431else 13432 _pkg_short_errors_supported=no 13433fi 13434 if test $_pkg_short_errors_supported = yes; then 13435 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs --static "dbus-1" 2>&1` 13436 else 13437 _pkg_error_string=`$PKG_CONFIG --print-errors --libs --static "dbus-1" 2>&1` 13438 fi 13439 as_fn_error $? "$PKG_CONFIG --libs --static \"dbus-1\" failed: $_pkg_error_string" "$LINENO" 5 13440 fi 13441 fi 13442 13443 13444 save_CFLAGS="$CFLAGS" 13445 save_LIBS="$LIBS" 13446 save_LDFLAGS="$LDFLAGS" 13447 13448 CFLAGS="$CFLAGS $DBUS_CFLAGS" 13449 LIBS="$LIBS $DBUS_LIBS" 13450 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the D-Bus library defines dbus_connection_read_write" >&5 13451printf %s "checking whether the D-Bus library defines dbus_connection_read_write... " >&6; } 13452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13453/* end confdefs.h. */ 13454#include <string.h> 13455 13456 #include <time.h> 13457 #include <sys/time.h> 13458 13459 #include <dbus/dbus.h> 13460int 13461main (void) 13462{ 13463return dbus_connection_read_write(NULL, 0); 13464 ; 13465 return 0; 13466} 13467_ACEOF 13468if ac_fn_c_try_link "$LINENO" 13469then : 13470 13471 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 13472printf "%s\n" "yes" >&6; } 13473 13474printf "%s\n" "#define PCAP_SUPPORT_DBUS 1" >>confdefs.h 13475 13476 MODULE_C_SRC="$MODULE_C_SRC pcap-dbus.c" 13477 V_INCLS="$V_INCLS $DBUS_CFLAGS" 13478 ADDITIONAL_LIBS="$ADDITIONAL_LIBS $DBUS_LIBS" 13479 ADDITIONAL_LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $DBUS_LIBS_STATIC" 13480 REQUIRES_PRIVATE="$REQUIRES_PRIVATE dbus-1" 13481 13482else $as_nop 13483 13484 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 13485printf "%s\n" "no" >&6; } 13486 if test "x$enable_dbus" = "xyes"; then 13487 as_fn_error $? "--enable-dbus was given, but the D-Bus library doesn't define dbus_connection_read_write()" "$LINENO" 5 13488 fi 13489 13490fi 13491rm -f core conftest.err conftest.$ac_objext conftest.beam \ 13492 conftest$ac_exeext conftest.$ac_ext 13493 13494 CFLAGS="$save_CFLAGS" 13495 LIBS="$save_LIBS" 13496 LDFLAGS="$save_LDFLAGS" 13497 13498 13499 else 13500 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 13501printf "%s\n" "not found" >&6; } 13502 13503 if test "x$enable_dbus" = "xyes"; then 13504 as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5 13505 fi 13506 13507 fi 13508else 13509 # No pkg-config, so obviously not found with pkg-config. 13510 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config not found" >&5 13511printf "%s\n" "pkg-config not found" >&6; } 13512 13513 if test "x$enable_dbus" = "xyes"; then 13514 as_fn_error $? "--enable-dbus was given, but the dbus-1 package is not installed" "$LINENO" 5 13515 fi 13516 13517fi 13518 13519 13520fi 13521 13522# Check whether --enable-rdma was given. 13523if test ${enable_rdma+y} 13524then : 13525 enableval=$enable_rdma; 13526else $as_nop 13527 enable_rdma=ifavailable 13528fi 13529 13530 13531if test "xxx_only" = yes; then 13532 # User requested something-else-only pcap, so they don't 13533 # want RDMA support. 13534 enable_rdma=no 13535fi 13536 13537if test "x$enable_rdma" != "xno"; then 13538 13539{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libibverbs with pkg-config" >&5 13540printf %s "checking for libibverbs with pkg-config... " >&6; } 13541if test -n "$PKG_CONFIG"; then 13542 13543 if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libibverbs\""; } >&5 13544 ($PKG_CONFIG --exists --print-errors "libibverbs") 2>&5 13545 ac_status=$? 13546 printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 13547 test $ac_status = 0; }; then 13548 # 13549 # The package was found, so try to get its C flags and 13550 # libraries. 13551 # 13552 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5 13553printf "%s\n" "found" >&6; } 13554 if test ! -n "$LIBIBVERBS_CFLAGS"; then 13555 LIBIBVERBS_CFLAGS=`$PKG_CONFIG --cflags "libibverbs" 2>/dev/null` 13556 if test "x$?" != "x0"; then 13557 # 13558 # That failed - report an error. 13559 # Re-run the command, telling pkg-config to print an error 13560 # message, capture the error message, and report it. 13561 # This causes the configuration script to fail, as it means 13562 # the script is almost certainly doing something wrong. 13563 # 13564 13565if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 13566 _pkg_short_errors_supported=yes 13567else 13568 _pkg_short_errors_supported=no 13569fi 13570 if test $_pkg_short_errors_supported = yes; then 13571 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --cflags "libibverbs" 2>&1` 13572 else 13573 _pkg_error_string=`$PKG_CONFIG --print-errors --cflags "libibverbs" 2>&1` 13574 fi 13575 as_fn_error $? "$PKG_CONFIG --cflags \"libibverbs\" failed: $_pkg_error_string" "$LINENO" 5 13576 fi 13577 fi 13578 if test ! -n "$LIBIBVERBS_LIBS"; then 13579 LIBIBVERBS_LIBS=`$PKG_CONFIG --libs "libibverbs" 2>/dev/null` 13580 if test "x$?" != "x0"; then 13581 # 13582 # That failed - report an error. 13583 # Re-run the command, telling pkg-config to print an error 13584 # message, capture the error message, and report it. 13585 # This causes the configuration script to fail, as it means 13586 # the script is almost certainly doing something wrong. 13587 # 13588 13589if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 13590 _pkg_short_errors_supported=yes 13591else 13592 _pkg_short_errors_supported=no 13593fi 13594 if test $_pkg_short_errors_supported = yes; then 13595 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs "libibverbs" 2>&1` 13596 else 13597 _pkg_error_string=`$PKG_CONFIG --print-errors --libs "libibverbs" 2>&1` 13598 fi 13599 as_fn_error $? "$PKG_CONFIG --libs \"libibverbs\" failed: $_pkg_error_string" "$LINENO" 5 13600 fi 13601 fi 13602 if test ! -n "$LIBIBVERBS_LIBS_STATIC"; then 13603 LIBIBVERBS_LIBS_STATIC=`$PKG_CONFIG --libs --static "libibverbs" 2>/dev/null` 13604 if test "x$?" != "x0"; then 13605 # 13606 # That failed - report an error. 13607 # Re-run the command, telling pkg-config to print an error 13608 # message, capture the error message, and report it. 13609 # This causes the configuration script to fail, as it means 13610 # the script is almost certainly doing something wrong. 13611 # 13612 13613if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 13614 _pkg_short_errors_supported=yes 13615else 13616 _pkg_short_errors_supported=no 13617fi 13618 if test $_pkg_short_errors_supported = yes; then 13619 _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs --static "libibverbs" 2>&1` 13620 else 13621 _pkg_error_string=`$PKG_CONFIG --print-errors --libs --static "libibverbs" 2>&1` 13622 fi 13623 as_fn_error $? "$PKG_CONFIG --libs --static \"libibverbs\" failed: $_pkg_error_string" "$LINENO" 5 13624 fi 13625 fi 13626 13627 found_libibverbs=yes 13628 LIBIBVERBS_REQUIRES_PRIVATE="libibverbs" 13629 13630 else 13631 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 13632printf "%s\n" "not found" >&6; } 13633 : 13634 fi 13635else 13636 # No pkg-config, so obviously not found with pkg-config. 13637 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config not found" >&5 13638printf "%s\n" "pkg-config not found" >&6; } 13639 : 13640fi 13641 13642 13643 if test "x$found_libibverbs" != "xyes"; then 13644 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ibv_get_device_list in -libverbs" >&5 13645printf %s "checking for ibv_get_device_list in -libverbs... " >&6; } 13646if test ${ac_cv_lib_ibverbs_ibv_get_device_list+y} 13647then : 13648 printf %s "(cached) " >&6 13649else $as_nop 13650 ac_check_lib_save_LIBS=$LIBS 13651LIBS="-libverbs $LIBS" 13652cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13653/* end confdefs.h. */ 13654 13655/* Override any GCC internal prototype to avoid an error. 13656 Use char because int might match the return type of a GCC 13657 builtin and then its argument prototype would still apply. */ 13658char ibv_get_device_list (); 13659int 13660main (void) 13661{ 13662return ibv_get_device_list (); 13663 ; 13664 return 0; 13665} 13666_ACEOF 13667if ac_fn_c_try_link "$LINENO" 13668then : 13669 ac_cv_lib_ibverbs_ibv_get_device_list=yes 13670else $as_nop 13671 ac_cv_lib_ibverbs_ibv_get_device_list=no 13672fi 13673rm -f core conftest.err conftest.$ac_objext conftest.beam \ 13674 conftest$ac_exeext conftest.$ac_ext 13675LIBS=$ac_check_lib_save_LIBS 13676fi 13677{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ibverbs_ibv_get_device_list" >&5 13678printf "%s\n" "$ac_cv_lib_ibverbs_ibv_get_device_list" >&6; } 13679if test "x$ac_cv_lib_ibverbs_ibv_get_device_list" = xyes 13680then : 13681 13682 found_libibverbs=yes 13683 LIBIBVERBS_CFLAGS="" 13684 LIBIBVERBS_LIBS="-libverbs" 13685 # XXX - at least on Ubuntu 20.04, there are many more 13686 # libraries needed; is there any platform where 13687 # libibverbs is available but where pkg-config isn't 13688 # available or libibverbs doesn't use it? If not, 13689 # we should only use pkg-config for it. 13690 LIBIBVERBS_LIBS_STATIC="-libverbs" 13691 LIBIBVERBS_LIBS_PRIVATE="-libverbs" 13692 13693 13694fi 13695 13696 fi 13697 13698 if test "x$found_libibverbs" = "xyes"; then 13699 13700 save_CFLAGS="$CFLAGS" 13701 save_LIBS="$LIBS" 13702 save_LDFLAGS="$LDFLAGS" 13703 13704 CFLAGS="$CFLAGS $LIBIBVERBS_CFLAGS" 13705 LIBS="$LIBS $LIBIBVERBS_LIBS" 13706 ac_fn_c_check_header_compile "$LINENO" "infiniband/verbs.h" "ac_cv_header_infiniband_verbs_h" "$ac_includes_default" 13707if test "x$ac_cv_header_infiniband_verbs_h" = xyes 13708then : 13709 13710 # 13711 # ibv_create_flow may be defined as a static inline 13712 # function in infiniband/verbs.h, so we can't 13713 # use AC_CHECK_LIB. 13714 # 13715 # Too bad autoconf has no AC_SYMBOL_EXISTS() 13716 # macro that works like CMake's check_symbol_exists() 13717 # function, to check do a compile check like 13718 # this (they do a clever trick to avoid having 13719 # to know the function's signature). 13720 # 13721 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether libibverbs defines ibv_create_flow" >&5 13722printf %s "checking whether libibverbs defines ibv_create_flow... " >&6; } 13723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13724/* end confdefs.h. */ 13725 13726 #include <infiniband/verbs.h> 13727 13728int 13729main (void) 13730{ 13731 13732 (void) ibv_create_flow((struct ibv_qp *) NULL, 13733 (struct ibv_flow_attr *) NULL); 13734 13735 ; 13736 return 0; 13737} 13738_ACEOF 13739if ac_fn_c_try_link "$LINENO" 13740then : 13741 13742 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 13743printf "%s\n" "yes" >&6; } 13744 found_usable_libibverbs=yes 13745 13746else $as_nop 13747 13748 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 13749printf "%s\n" "no" >&6; } 13750 13751 13752fi 13753rm -f core conftest.err conftest.$ac_objext conftest.beam \ 13754 conftest$ac_exeext conftest.$ac_ext 13755 13756fi 13757 13758 13759 CFLAGS="$save_CFLAGS" 13760 LIBS="$save_LIBS" 13761 LDFLAGS="$save_LDFLAGS" 13762 13763 fi 13764 13765 if test "x$found_usable_libibverbs" = "xyes" 13766 then 13767 13768printf "%s\n" "#define PCAP_SUPPORT_RDMASNIFF 1" >>confdefs.h 13769 13770 MODULE_C_SRC="$MODULE_C_SRC pcap-rdmasniff.c" 13771 CFLAGS="$LIBIBVERBS_CFLAGS $CFLAGS" 13772 ADDITIONAL_LIBS="$LIBIBVERBS_LIBS $ADDITIONAL_LIBS" 13773 ADDITIONAL_LIBS_STATIC="$LIBIBVERBS_LIBS_STATIC $ADDITIONAL_LIBS_STATIC" 13774 LIBS_PRIVATE="$LIBIBVERBS_LIBS_PRIVATE $LIBS_PRIVATE" 13775 REQUIRES_PRIVATE="$REQUIRES_PRIVATE $LIBIBVERBS_REQUIRES_PRIVATE" 13776 fi 13777 13778fi 13779 13780# 13781# If this is a platform where we need to have the .pc file and 13782# pcap-config script supply an rpath option to specify the directory 13783# in which the libpcap shared library is installed, and the install 13784# prefix /usr (meaning we're not installing a system library), provide 13785# the rpath option. 13786# 13787# (We must check $prefix, as $libdir isn't necessarily /usr/lib in this 13788# case - for example, Linux distributions for 64-bit platforms that 13789# also provide support for binaries for a 32-bit version of the 13790# platform may put the 64-bit libraries, the 32-bit libraries, or both 13791# in directories other than /usr/lib.) 13792# 13793# In AIX, do we have to do this? 13794# 13795# In Darwin-based OSes, the full paths of the shared libraries with 13796# which the program was linked are stored in the executable, so we don't 13797# need to provide an rpath option. 13798# 13799# With the HP-UX linker, directories specified with -L are, by default, 13800# added to the run-time search path, so we don't need to supply them. 13801# 13802# For Tru64 UNIX, "-rpath" works with DEC's^WCompaq's^WHP's C compiler 13803# for Alpha, but isn't documented as working with GCC, and no GCC- 13804# compatible option is documented as working with the DEC compiler. 13805# If anybody needs this on Tru64/Alpha, they're welcome to figure out a 13806# way to make it work. 13807# 13808# This must *not* depend on the compiler, as, on platforms where there's 13809# a GCC-compatible compiler and a vendor compiler, we need to work with 13810# both. 13811# 13812if test "$prefix" != "/usr"; then 13813 case "$host_os" in 13814 13815 freebsd*|netbsd*|openbsd*|dragonfly*|linux*|haiku*|midipix*|gnu*) 13816 # 13817 # Platforms where the "native" C compiler is GCC or 13818 # accepts compatible command-line arguments, and the 13819 # "native" linker is the GNU linker or accepts 13820 # compatible command-line arguments. 13821 # 13822 RPATH="-Wl,-rpath,\${libdir}" 13823 ;; 13824 13825 solaris*) 13826 # 13827 # Sun/Oracle's linker, the GNU linker, and 13828 # GNU-compatible linkers all support -R. 13829 # 13830 RPATH="-Wl,-R,\${libdir}" 13831 ;; 13832 esac 13833fi 13834 13835 13836 # Find a good install program. We prefer a C program (faster), 13837# so one script is as good as another. But avoid the broken or 13838# incompatible versions: 13839# SysV /etc/install, /usr/sbin/install 13840# SunOS /usr/etc/install 13841# IRIX /sbin/install 13842# AIX /bin/install 13843# AmigaOS /C/install, which installs bootblocks on floppy discs 13844# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag 13845# AFS /usr/afsws/bin/install, which mishandles nonexistent args 13846# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" 13847# OS/2's system install, which has a completely different semantic 13848# ./install, which can be erroneously created by make from ./install.sh. 13849# Reject install programs that cannot install multiple files. 13850{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 13851printf %s "checking for a BSD-compatible install... " >&6; } 13852if test -z "$INSTALL"; then 13853if test ${ac_cv_path_install+y} 13854then : 13855 printf %s "(cached) " >&6 13856else $as_nop 13857 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 13858for as_dir in $PATH 13859do 13860 IFS=$as_save_IFS 13861 case $as_dir in #((( 13862 '') as_dir=./ ;; 13863 */) ;; 13864 *) as_dir=$as_dir/ ;; 13865 esac 13866 # Account for fact that we put trailing slashes in our PATH walk. 13867case $as_dir in #(( 13868 ./ | /[cC]/* | \ 13869 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ 13870 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ 13871 /usr/ucb/* ) ;; 13872 *) 13873 # OSF1 and SCO ODT 3.0 have their own names for install. 13874 # Don't use installbsd from OSF since it installs stuff as root 13875 # by default. 13876 for ac_prog in ginstall scoinst install; do 13877 for ac_exec_ext in '' $ac_executable_extensions; do 13878 if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then 13879 if test $ac_prog = install && 13880 grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 13881 # AIX install. It has an incompatible calling convention. 13882 : 13883 elif test $ac_prog = install && 13884 grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 13885 # program-specific install script used by HP pwplus--don't use. 13886 : 13887 else 13888 rm -rf conftest.one conftest.two conftest.dir 13889 echo one > conftest.one 13890 echo two > conftest.two 13891 mkdir conftest.dir 13892 if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && 13893 test -s conftest.one && test -s conftest.two && 13894 test -s conftest.dir/conftest.one && 13895 test -s conftest.dir/conftest.two 13896 then 13897 ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" 13898 break 3 13899 fi 13900 fi 13901 fi 13902 done 13903 done 13904 ;; 13905esac 13906 13907 done 13908IFS=$as_save_IFS 13909 13910rm -rf conftest.one conftest.two conftest.dir 13911 13912fi 13913 if test ${ac_cv_path_install+y}; then 13914 INSTALL=$ac_cv_path_install 13915 else 13916 # As a last resort, use the slow shell script. Don't cache a 13917 # value for INSTALL within a source directory, because that will 13918 # break other packages using the cache if that directory is 13919 # removed, or if the value is a relative name. 13920 INSTALL=$ac_install_sh 13921 fi 13922fi 13923{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 13924printf "%s\n" "$INSTALL" >&6; } 13925 13926# Use test -z because SunOS4 sh mishandles braces in ${var-val}. 13927# It thinks the first close brace ends the variable substitution. 13928test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' 13929 13930test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' 13931 13932test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 13933 13934 13935ac_config_headers="$ac_config_headers config.h" 13936 13937 13938 13939 13940 13941 13942 13943 13944 13945 13946 13947 13948 13949 13950 13951 13952 13953# 13954# We're done with configuration operations; add ADDITIONAL_LIBS and 13955# ADDITIONAL_LIBS_STATIC to LIBS and LIBS_STATIC, respectively. 13956# 13957LIBS="$ADDITIONAL_LIBS $LIBS" 13958LIBS_STATIC="$ADDITIONAL_LIBS_STATIC $LIBS_STATIC" 13959 13960ac_config_commands="$ac_config_commands default-1" 13961 13962ac_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" 13963 13964cat >confcache <<\_ACEOF 13965# This file is a shell script that caches the results of configure 13966# tests run on this system so they can be shared between configure 13967# scripts and configure runs, see configure's option --config-cache. 13968# It is not useful on other systems. If it contains results you don't 13969# want to keep, you may remove or edit it. 13970# 13971# config.status only pays attention to the cache file if you give it 13972# the --recheck option to rerun configure. 13973# 13974# `ac_cv_env_foo' variables (set or unset) will be overridden when 13975# loading this file, other *unset* `ac_cv_foo' will be assigned the 13976# following values. 13977 13978_ACEOF 13979 13980# The following way of writing the cache mishandles newlines in values, 13981# but we know of no workaround that is simple, portable, and efficient. 13982# So, we kill variables containing newlines. 13983# Ultrix sh set writes to stderr and can't be redirected directly, 13984# and sets the high bit in the cache file unless we assign to the vars. 13985( 13986 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do 13987 eval ac_val=\$$ac_var 13988 case $ac_val in #( 13989 *${as_nl}*) 13990 case $ac_var in #( 13991 *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 13992printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 13993 esac 13994 case $ac_var in #( 13995 _ | IFS | as_nl) ;; #( 13996 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 13997 *) { eval $ac_var=; unset $ac_var;} ;; 13998 esac ;; 13999 esac 14000 done 14001 14002 (set) 2>&1 | 14003 case $as_nl`(ac_space=' '; set) 2>&1` in #( 14004 *${as_nl}ac_space=\ *) 14005 # `set' does not quote correctly, so add quotes: double-quote 14006 # substitution turns \\\\ into \\, and sed turns \\ into \. 14007 sed -n \ 14008 "s/'/'\\\\''/g; 14009 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 14010 ;; #( 14011 *) 14012 # `set' quotes correctly as required by POSIX, so do not add quotes. 14013 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 14014 ;; 14015 esac | 14016 sort 14017) | 14018 sed ' 14019 /^ac_cv_env_/b end 14020 t clear 14021 :clear 14022 s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ 14023 t end 14024 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 14025 :end' >>confcache 14026if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 14027 if test -w "$cache_file"; then 14028 if test "x$cache_file" != "x/dev/null"; then 14029 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 14030printf "%s\n" "$as_me: updating cache $cache_file" >&6;} 14031 if test ! -f "$cache_file" || test -h "$cache_file"; then 14032 cat confcache >"$cache_file" 14033 else 14034 case $cache_file in #( 14035 */* | ?:*) 14036 mv -f confcache "$cache_file"$$ && 14037 mv -f "$cache_file"$$ "$cache_file" ;; #( 14038 *) 14039 mv -f confcache "$cache_file" ;; 14040 esac 14041 fi 14042 fi 14043 else 14044 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 14045printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} 14046 fi 14047fi 14048rm -f confcache 14049 14050test "x$prefix" = xNONE && prefix=$ac_default_prefix 14051# Let make expand exec_prefix. 14052test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 14053 14054DEFS=-DHAVE_CONFIG_H 14055 14056ac_libobjs= 14057ac_ltlibobjs= 14058U= 14059for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 14060 # 1. Remove the extension, and $U if already installed. 14061 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 14062 ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` 14063 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 14064 # will be set to the directory where LIBOBJS objects are built. 14065 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" 14066 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' 14067done 14068LIBOBJS=$ac_libobjs 14069 14070LTLIBOBJS=$ac_ltlibobjs 14071 14072 14073 14074: "${CONFIG_STATUS=./config.status}" 14075ac_write_fail=0 14076ac_clean_files_save=$ac_clean_files 14077ac_clean_files="$ac_clean_files $CONFIG_STATUS" 14078{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 14079printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} 14080as_write_fail=0 14081cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 14082#! $SHELL 14083# Generated by $as_me. 14084# Run this file to recreate the current configuration. 14085# Compiler output produced by configure, useful for debugging 14086# configure, is in config.log if it exists. 14087 14088debug=false 14089ac_cs_recheck=false 14090ac_cs_silent=false 14091 14092SHELL=\${CONFIG_SHELL-$SHELL} 14093export SHELL 14094_ASEOF 14095cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 14096## -------------------- ## 14097## M4sh Initialization. ## 14098## -------------------- ## 14099 14100# Be more Bourne compatible 14101DUALCASE=1; export DUALCASE # for MKS sh 14102as_nop=: 14103if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 14104then : 14105 emulate sh 14106 NULLCMD=: 14107 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 14108 # is contrary to our usage. Disable this feature. 14109 alias -g '${1+"$@"}'='"$@"' 14110 setopt NO_GLOB_SUBST 14111else $as_nop 14112 case `(set -o) 2>/dev/null` in #( 14113 *posix*) : 14114 set -o posix ;; #( 14115 *) : 14116 ;; 14117esac 14118fi 14119 14120 14121 14122# Reset variables that may have inherited troublesome values from 14123# the environment. 14124 14125# IFS needs to be set, to space, tab, and newline, in precisely that order. 14126# (If _AS_PATH_WALK were called with IFS unset, it would have the 14127# side effect of setting IFS to empty, thus disabling word splitting.) 14128# Quoting is to prevent editors from complaining about space-tab. 14129as_nl=' 14130' 14131export as_nl 14132IFS=" "" $as_nl" 14133 14134PS1='$ ' 14135PS2='> ' 14136PS4='+ ' 14137 14138# Ensure predictable behavior from utilities with locale-dependent output. 14139LC_ALL=C 14140export LC_ALL 14141LANGUAGE=C 14142export LANGUAGE 14143 14144# We cannot yet rely on "unset" to work, but we need these variables 14145# to be unset--not just set to an empty or harmless value--now, to 14146# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct 14147# also avoids known problems related to "unset" and subshell syntax 14148# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). 14149for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH 14150do eval test \${$as_var+y} \ 14151 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 14152done 14153 14154# Ensure that fds 0, 1, and 2 are open. 14155if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi 14156if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi 14157if (exec 3>&2) ; then :; else exec 2>/dev/null; fi 14158 14159# The user is always right. 14160if ${PATH_SEPARATOR+false} :; then 14161 PATH_SEPARATOR=: 14162 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 14163 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 14164 PATH_SEPARATOR=';' 14165 } 14166fi 14167 14168 14169# Find who we are. Look in the path if we contain no directory separator. 14170as_myself= 14171case $0 in #(( 14172 *[\\/]* ) as_myself=$0 ;; 14173 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 14174for as_dir in $PATH 14175do 14176 IFS=$as_save_IFS 14177 case $as_dir in #((( 14178 '') as_dir=./ ;; 14179 */) ;; 14180 *) as_dir=$as_dir/ ;; 14181 esac 14182 test -r "$as_dir$0" && as_myself=$as_dir$0 && break 14183 done 14184IFS=$as_save_IFS 14185 14186 ;; 14187esac 14188# We did not find ourselves, most probably we were run as `sh COMMAND' 14189# in which case we are not to be found in the path. 14190if test "x$as_myself" = x; then 14191 as_myself=$0 14192fi 14193if test ! -f "$as_myself"; then 14194 printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 14195 exit 1 14196fi 14197 14198 14199 14200# as_fn_error STATUS ERROR [LINENO LOG_FD] 14201# ---------------------------------------- 14202# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 14203# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 14204# script with STATUS, using 1 if that was 0. 14205as_fn_error () 14206{ 14207 as_status=$1; test $as_status -eq 0 && as_status=1 14208 if test "$4"; then 14209 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 14210 printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 14211 fi 14212 printf "%s\n" "$as_me: error: $2" >&2 14213 as_fn_exit $as_status 14214} # as_fn_error 14215 14216 14217 14218# as_fn_set_status STATUS 14219# ----------------------- 14220# Set $? to STATUS, without forking. 14221as_fn_set_status () 14222{ 14223 return $1 14224} # as_fn_set_status 14225 14226# as_fn_exit STATUS 14227# ----------------- 14228# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 14229as_fn_exit () 14230{ 14231 set +e 14232 as_fn_set_status $1 14233 exit $1 14234} # as_fn_exit 14235 14236# as_fn_unset VAR 14237# --------------- 14238# Portably unset VAR. 14239as_fn_unset () 14240{ 14241 { eval $1=; unset $1;} 14242} 14243as_unset=as_fn_unset 14244 14245# as_fn_append VAR VALUE 14246# ---------------------- 14247# Append the text in VALUE to the end of the definition contained in VAR. Take 14248# advantage of any shell optimizations that allow amortized linear growth over 14249# repeated appends, instead of the typical quadratic growth present in naive 14250# implementations. 14251if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null 14252then : 14253 eval 'as_fn_append () 14254 { 14255 eval $1+=\$2 14256 }' 14257else $as_nop 14258 as_fn_append () 14259 { 14260 eval $1=\$$1\$2 14261 } 14262fi # as_fn_append 14263 14264# as_fn_arith ARG... 14265# ------------------ 14266# Perform arithmetic evaluation on the ARGs, and store the result in the 14267# global $as_val. Take advantage of shells that can avoid forks. The arguments 14268# must be portable across $(()) and expr. 14269if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null 14270then : 14271 eval 'as_fn_arith () 14272 { 14273 as_val=$(( $* )) 14274 }' 14275else $as_nop 14276 as_fn_arith () 14277 { 14278 as_val=`expr "$@" || test $? -eq 1` 14279 } 14280fi # as_fn_arith 14281 14282 14283if expr a : '\(a\)' >/dev/null 2>&1 && 14284 test "X`expr 00001 : '.*\(...\)'`" = X001; then 14285 as_expr=expr 14286else 14287 as_expr=false 14288fi 14289 14290if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 14291 as_basename=basename 14292else 14293 as_basename=false 14294fi 14295 14296if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 14297 as_dirname=dirname 14298else 14299 as_dirname=false 14300fi 14301 14302as_me=`$as_basename -- "$0" || 14303$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 14304 X"$0" : 'X\(//\)$' \| \ 14305 X"$0" : 'X\(/\)' \| . 2>/dev/null || 14306printf "%s\n" X/"$0" | 14307 sed '/^.*\/\([^/][^/]*\)\/*$/{ 14308 s//\1/ 14309 q 14310 } 14311 /^X\/\(\/\/\)$/{ 14312 s//\1/ 14313 q 14314 } 14315 /^X\/\(\/\).*/{ 14316 s//\1/ 14317 q 14318 } 14319 s/.*/./; q'` 14320 14321# Avoid depending upon Character Ranges. 14322as_cr_letters='abcdefghijklmnopqrstuvwxyz' 14323as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 14324as_cr_Letters=$as_cr_letters$as_cr_LETTERS 14325as_cr_digits='0123456789' 14326as_cr_alnum=$as_cr_Letters$as_cr_digits 14327 14328 14329# Determine whether it's possible to make 'echo' print without a newline. 14330# These variables are no longer used directly by Autoconf, but are AC_SUBSTed 14331# for compatibility with existing Makefiles. 14332ECHO_C= ECHO_N= ECHO_T= 14333case `echo -n x` in #((((( 14334-n*) 14335 case `echo 'xy\c'` in 14336 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 14337 xy) ECHO_C='\c';; 14338 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 14339 ECHO_T=' ';; 14340 esac;; 14341*) 14342 ECHO_N='-n';; 14343esac 14344 14345# For backward compatibility with old third-party macros, we provide 14346# the shell variables $as_echo and $as_echo_n. New code should use 14347# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. 14348as_echo='printf %s\n' 14349as_echo_n='printf %s' 14350 14351rm -f conf$$ conf$$.exe conf$$.file 14352if test -d conf$$.dir; then 14353 rm -f conf$$.dir/conf$$.file 14354else 14355 rm -f conf$$.dir 14356 mkdir conf$$.dir 2>/dev/null 14357fi 14358if (echo >conf$$.file) 2>/dev/null; then 14359 if ln -s conf$$.file conf$$ 2>/dev/null; then 14360 as_ln_s='ln -s' 14361 # ... but there are two gotchas: 14362 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 14363 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 14364 # In both cases, we have to default to `cp -pR'. 14365 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 14366 as_ln_s='cp -pR' 14367 elif ln conf$$.file conf$$ 2>/dev/null; then 14368 as_ln_s=ln 14369 else 14370 as_ln_s='cp -pR' 14371 fi 14372else 14373 as_ln_s='cp -pR' 14374fi 14375rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 14376rmdir conf$$.dir 2>/dev/null 14377 14378 14379# as_fn_mkdir_p 14380# ------------- 14381# Create "$as_dir" as a directory, including parents if necessary. 14382as_fn_mkdir_p () 14383{ 14384 14385 case $as_dir in #( 14386 -*) as_dir=./$as_dir;; 14387 esac 14388 test -d "$as_dir" || eval $as_mkdir_p || { 14389 as_dirs= 14390 while :; do 14391 case $as_dir in #( 14392 *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 14393 *) as_qdir=$as_dir;; 14394 esac 14395 as_dirs="'$as_qdir' $as_dirs" 14396 as_dir=`$as_dirname -- "$as_dir" || 14397$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 14398 X"$as_dir" : 'X\(//\)[^/]' \| \ 14399 X"$as_dir" : 'X\(//\)$' \| \ 14400 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 14401printf "%s\n" X"$as_dir" | 14402 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 14403 s//\1/ 14404 q 14405 } 14406 /^X\(\/\/\)[^/].*/{ 14407 s//\1/ 14408 q 14409 } 14410 /^X\(\/\/\)$/{ 14411 s//\1/ 14412 q 14413 } 14414 /^X\(\/\).*/{ 14415 s//\1/ 14416 q 14417 } 14418 s/.*/./; q'` 14419 test -d "$as_dir" && break 14420 done 14421 test -z "$as_dirs" || eval "mkdir $as_dirs" 14422 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 14423 14424 14425} # as_fn_mkdir_p 14426if mkdir -p . 2>/dev/null; then 14427 as_mkdir_p='mkdir -p "$as_dir"' 14428else 14429 test -d ./-p && rmdir ./-p 14430 as_mkdir_p=false 14431fi 14432 14433 14434# as_fn_executable_p FILE 14435# ----------------------- 14436# Test if FILE is an executable regular file. 14437as_fn_executable_p () 14438{ 14439 test -f "$1" && test -x "$1" 14440} # as_fn_executable_p 14441as_test_x='test -x' 14442as_executable_p=as_fn_executable_p 14443 14444# Sed expression to map a string onto a valid CPP name. 14445as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 14446 14447# Sed expression to map a string onto a valid variable name. 14448as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 14449 14450 14451exec 6>&1 14452## ----------------------------------- ## 14453## Main body of $CONFIG_STATUS script. ## 14454## ----------------------------------- ## 14455_ASEOF 14456test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 14457 14458cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 14459# Save the log message, to keep $0 and so on meaningful, and to 14460# report actual input values of CONFIG_FILES etc. instead of their 14461# values after options handling. 14462ac_log=" 14463This file was extended by pcap $as_me 1.10.5, which was 14464generated by GNU Autoconf 2.71. Invocation command line was 14465 14466 CONFIG_FILES = $CONFIG_FILES 14467 CONFIG_HEADERS = $CONFIG_HEADERS 14468 CONFIG_LINKS = $CONFIG_LINKS 14469 CONFIG_COMMANDS = $CONFIG_COMMANDS 14470 $ $0 $@ 14471 14472on `(hostname || uname -n) 2>/dev/null | sed 1q` 14473" 14474 14475_ACEOF 14476 14477case $ac_config_files in *" 14478"*) set x $ac_config_files; shift; ac_config_files=$*;; 14479esac 14480 14481case $ac_config_headers in *" 14482"*) set x $ac_config_headers; shift; ac_config_headers=$*;; 14483esac 14484 14485 14486cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 14487# Files that config.status was made for. 14488config_files="$ac_config_files" 14489config_headers="$ac_config_headers" 14490config_commands="$ac_config_commands" 14491 14492_ACEOF 14493 14494cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 14495ac_cs_usage="\ 14496\`$as_me' instantiates files and other configuration actions 14497from templates according to the current configuration. Unless the files 14498and actions are specified as TAGs, all are instantiated by default. 14499 14500Usage: $0 [OPTION]... [TAG]... 14501 14502 -h, --help print this help, then exit 14503 -V, --version print version number and configuration settings, then exit 14504 --config print configuration, then exit 14505 -q, --quiet, --silent 14506 do not print progress messages 14507 -d, --debug don't remove temporary files 14508 --recheck update $as_me by reconfiguring in the same conditions 14509 --file=FILE[:TEMPLATE] 14510 instantiate the configuration file FILE 14511 --header=FILE[:TEMPLATE] 14512 instantiate the configuration header FILE 14513 14514Configuration files: 14515$config_files 14516 14517Configuration headers: 14518$config_headers 14519 14520Configuration commands: 14521$config_commands 14522 14523Report bugs to the package provider." 14524 14525_ACEOF 14526ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` 14527ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` 14528cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 14529ac_cs_config='$ac_cs_config_escaped' 14530ac_cs_version="\\ 14531pcap config.status 1.10.5 14532configured by $0, generated by GNU Autoconf 2.71, 14533 with options \\"\$ac_cs_config\\" 14534 14535Copyright (C) 2021 Free Software Foundation, Inc. 14536This config.status script is free software; the Free Software Foundation 14537gives unlimited permission to copy, distribute and modify it." 14538 14539ac_pwd='$ac_pwd' 14540srcdir='$srcdir' 14541INSTALL='$INSTALL' 14542test -n "\$AWK" || AWK=awk 14543_ACEOF 14544 14545cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 14546# The default lists apply if the user does not specify any file. 14547ac_need_defaults=: 14548while test $# != 0 14549do 14550 case $1 in 14551 --*=?*) 14552 ac_option=`expr "X$1" : 'X\([^=]*\)='` 14553 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 14554 ac_shift=: 14555 ;; 14556 --*=) 14557 ac_option=`expr "X$1" : 'X\([^=]*\)='` 14558 ac_optarg= 14559 ac_shift=: 14560 ;; 14561 *) 14562 ac_option=$1 14563 ac_optarg=$2 14564 ac_shift=shift 14565 ;; 14566 esac 14567 14568 case $ac_option in 14569 # Handling of the options. 14570 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 14571 ac_cs_recheck=: ;; 14572 --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 14573 printf "%s\n" "$ac_cs_version"; exit ;; 14574 --config | --confi | --conf | --con | --co | --c ) 14575 printf "%s\n" "$ac_cs_config"; exit ;; 14576 --debug | --debu | --deb | --de | --d | -d ) 14577 debug=: ;; 14578 --file | --fil | --fi | --f ) 14579 $ac_shift 14580 case $ac_optarg in 14581 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 14582 '') as_fn_error $? "missing file argument" ;; 14583 esac 14584 as_fn_append CONFIG_FILES " '$ac_optarg'" 14585 ac_need_defaults=false;; 14586 --header | --heade | --head | --hea ) 14587 $ac_shift 14588 case $ac_optarg in 14589 *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 14590 esac 14591 as_fn_append CONFIG_HEADERS " '$ac_optarg'" 14592 ac_need_defaults=false;; 14593 --he | --h) 14594 # Conflict between --help and --header 14595 as_fn_error $? "ambiguous option: \`$1' 14596Try \`$0 --help' for more information.";; 14597 --help | --hel | -h ) 14598 printf "%s\n" "$ac_cs_usage"; exit ;; 14599 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 14600 | -silent | --silent | --silen | --sile | --sil | --si | --s) 14601 ac_cs_silent=: ;; 14602 14603 # This is an error. 14604 -*) as_fn_error $? "unrecognized option: \`$1' 14605Try \`$0 --help' for more information." ;; 14606 14607 *) as_fn_append ac_config_targets " $1" 14608 ac_need_defaults=false ;; 14609 14610 esac 14611 shift 14612done 14613 14614ac_configure_extra_args= 14615 14616if $ac_cs_silent; then 14617 exec 6>/dev/null 14618 ac_configure_extra_args="$ac_configure_extra_args --silent" 14619fi 14620 14621_ACEOF 14622cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 14623if \$ac_cs_recheck; then 14624 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 14625 shift 14626 \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 14627 CONFIG_SHELL='$SHELL' 14628 export CONFIG_SHELL 14629 exec "\$@" 14630fi 14631 14632_ACEOF 14633cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 14634exec 5>>config.log 14635{ 14636 echo 14637 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 14638## Running $as_me. ## 14639_ASBOX 14640 printf "%s\n" "$ac_log" 14641} >&5 14642 14643_ACEOF 14644cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 14645# 14646# INIT-COMMANDS 14647# 14648 14649 14650_ACEOF 14651 14652cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 14653 14654# Handling of arguments. 14655for ac_config_target in $ac_config_targets 14656do 14657 case $ac_config_target in 14658 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; 14659 "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; 14660 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; 14661 "grammar.y") CONFIG_FILES="$CONFIG_FILES grammar.y" ;; 14662 "pcap-filter.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-filter.manmisc" ;; 14663 "pcap-linktype.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-linktype.manmisc" ;; 14664 "pcap-tstamp.manmisc") CONFIG_FILES="$CONFIG_FILES pcap-tstamp.manmisc" ;; 14665 "pcap-savefile.manfile") CONFIG_FILES="$CONFIG_FILES pcap-savefile.manfile" ;; 14666 "pcap.3pcap") CONFIG_FILES="$CONFIG_FILES pcap.3pcap" ;; 14667 "pcap_compile.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_compile.3pcap" ;; 14668 "pcap_datalink.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_datalink.3pcap" ;; 14669 "pcap_dump_open.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_dump_open.3pcap" ;; 14670 "pcap_get_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_get_tstamp_precision.3pcap" ;; 14671 "pcap_list_datalinks.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_datalinks.3pcap" ;; 14672 "pcap_list_tstamp_types.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_list_tstamp_types.3pcap" ;; 14673 "pcap_open_dead.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_dead.3pcap" ;; 14674 "pcap_open_offline.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_open_offline.3pcap" ;; 14675 "pcap_set_immediate_mode.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_immediate_mode.3pcap" ;; 14676 "pcap_set_tstamp_precision.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_precision.3pcap" ;; 14677 "pcap_set_tstamp_type.3pcap") CONFIG_FILES="$CONFIG_FILES pcap_set_tstamp_type.3pcap" ;; 14678 "rpcapd/Makefile") CONFIG_FILES="$CONFIG_FILES rpcapd/Makefile" ;; 14679 "rpcapd/rpcapd.manadmin") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd.manadmin" ;; 14680 "rpcapd/rpcapd-config.manfile") CONFIG_FILES="$CONFIG_FILES rpcapd/rpcapd-config.manfile" ;; 14681 "testprogs/Makefile") CONFIG_FILES="$CONFIG_FILES testprogs/Makefile" ;; 14682 14683 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 14684 esac 14685done 14686 14687 14688# If the user did not use the arguments to specify the items to instantiate, 14689# then the envvar interface is used. Set only those that are not. 14690# We use the long form for the default assignment because of an extremely 14691# bizarre bug on SunOS 4.1.3. 14692if $ac_need_defaults; then 14693 test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files 14694 test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers 14695 test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands 14696fi 14697 14698# Have a temporary directory for convenience. Make it in the build tree 14699# simply because there is no reason against having it here, and in addition, 14700# creating and moving files from /tmp can sometimes cause problems. 14701# Hook for its removal unless debugging. 14702# Note that there is a small window in which the directory will not be cleaned: 14703# after its creation but before its name has been assigned to `$tmp'. 14704$debug || 14705{ 14706 tmp= ac_tmp= 14707 trap 'exit_status=$? 14708 : "${ac_tmp:=$tmp}" 14709 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status 14710' 0 14711 trap 'as_fn_exit 1' 1 2 13 15 14712} 14713# Create a (secure) tmp directory for tmp files. 14714 14715{ 14716 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && 14717 test -d "$tmp" 14718} || 14719{ 14720 tmp=./conf$$-$RANDOM 14721 (umask 077 && mkdir "$tmp") 14722} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 14723ac_tmp=$tmp 14724 14725# Set up the scripts for CONFIG_FILES section. 14726# No need to generate them if there are no CONFIG_FILES. 14727# This happens for instance with `./config.status config.h'. 14728if test -n "$CONFIG_FILES"; then 14729 14730 14731ac_cr=`echo X | tr X '\015'` 14732# On cygwin, bash can eat \r inside `` if the user requested igncr. 14733# But we know of no other shell where ac_cr would be empty at this 14734# point, so we can use a bashism as a fallback. 14735if test "x$ac_cr" = x; then 14736 eval ac_cr=\$\'\\r\' 14737fi 14738ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 14739if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 14740 ac_cs_awk_cr='\\r' 14741else 14742 ac_cs_awk_cr=$ac_cr 14743fi 14744 14745echo 'BEGIN {' >"$ac_tmp/subs1.awk" && 14746_ACEOF 14747 14748 14749{ 14750 echo "cat >conf$$subs.awk <<_ACEOF" && 14751 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 14752 echo "_ACEOF" 14753} >conf$$subs.sh || 14754 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 14755ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` 14756ac_delim='%!_!# ' 14757for ac_last_try in false false false false false :; do 14758 . ./conf$$subs.sh || 14759 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 14760 14761 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` 14762 if test $ac_delim_n = $ac_delim_num; then 14763 break 14764 elif $ac_last_try; then 14765 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 14766 else 14767 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 14768 fi 14769done 14770rm -f conf$$subs.sh 14771 14772cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 14773cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && 14774_ACEOF 14775sed -n ' 14776h 14777s/^/S["/; s/!.*/"]=/ 14778p 14779g 14780s/^[^!]*!// 14781:repl 14782t repl 14783s/'"$ac_delim"'$// 14784t delim 14785:nl 14786h 14787s/\(.\{148\}\)..*/\1/ 14788t more1 14789s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ 14790p 14791n 14792b repl 14793:more1 14794s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 14795p 14796g 14797s/.\{148\}// 14798t nl 14799:delim 14800h 14801s/\(.\{148\}\)..*/\1/ 14802t more2 14803s/["\\]/\\&/g; s/^/"/; s/$/"/ 14804p 14805b 14806:more2 14807s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 14808p 14809g 14810s/.\{148\}// 14811t delim 14812' <conf$$subs.awk | sed ' 14813/^[^""]/{ 14814 N 14815 s/\n// 14816} 14817' >>$CONFIG_STATUS || ac_write_fail=1 14818rm -f conf$$subs.awk 14819cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 14820_ACAWK 14821cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && 14822 for (key in S) S_is_set[key] = 1 14823 FS = "" 14824 14825} 14826{ 14827 line = $ 0 14828 nfields = split(line, field, "@") 14829 substed = 0 14830 len = length(field[1]) 14831 for (i = 2; i < nfields; i++) { 14832 key = field[i] 14833 keylen = length(key) 14834 if (S_is_set[key]) { 14835 value = S[key] 14836 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) 14837 len += length(value) + length(field[++i]) 14838 substed = 1 14839 } else 14840 len += 1 + keylen 14841 } 14842 14843 print line 14844} 14845 14846_ACAWK 14847_ACEOF 14848cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 14849if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then 14850 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" 14851else 14852 cat 14853fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ 14854 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 14855_ACEOF 14856 14857# VPATH may cause trouble with some makes, so we remove sole $(srcdir), 14858# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and 14859# trailing colons and then remove the whole line if VPATH becomes empty 14860# (actually we leave an empty line to preserve line numbers). 14861if test "x$srcdir" = x.; then 14862 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 14863h 14864s/// 14865s/^/:/ 14866s/[ ]*$/:/ 14867s/:\$(srcdir):/:/g 14868s/:\${srcdir}:/:/g 14869s/:@srcdir@:/:/g 14870s/^:*// 14871s/:*$// 14872x 14873s/\(=[ ]*\).*/\1/ 14874G 14875s/\n// 14876s/^[^=]*=[ ]*$// 14877}' 14878fi 14879 14880cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 14881fi # test -n "$CONFIG_FILES" 14882 14883# Set up the scripts for CONFIG_HEADERS section. 14884# No need to generate them if there are no CONFIG_HEADERS. 14885# This happens for instance with `./config.status Makefile'. 14886if test -n "$CONFIG_HEADERS"; then 14887cat >"$ac_tmp/defines.awk" <<\_ACAWK || 14888BEGIN { 14889_ACEOF 14890 14891# Transform confdefs.h into an awk script `defines.awk', embedded as 14892# here-document in config.status, that substitutes the proper values into 14893# config.h.in to produce config.h. 14894 14895# Create a delimiter string that does not exist in confdefs.h, to ease 14896# handling of long lines. 14897ac_delim='%!_!# ' 14898for ac_last_try in false false :; do 14899 ac_tt=`sed -n "/$ac_delim/p" confdefs.h` 14900 if test -z "$ac_tt"; then 14901 break 14902 elif $ac_last_try; then 14903 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 14904 else 14905 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 14906 fi 14907done 14908 14909# For the awk script, D is an array of macro values keyed by name, 14910# likewise P contains macro parameters if any. Preserve backslash 14911# newline sequences. 14912 14913ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* 14914sed -n ' 14915s/.\{148\}/&'"$ac_delim"'/g 14916t rset 14917:rset 14918s/^[ ]*#[ ]*define[ ][ ]*/ / 14919t def 14920d 14921:def 14922s/\\$// 14923t bsnl 14924s/["\\]/\\&/g 14925s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 14926D["\1"]=" \3"/p 14927s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p 14928d 14929:bsnl 14930s/["\\]/\\&/g 14931s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 14932D["\1"]=" \3\\\\\\n"\\/p 14933t cont 14934s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p 14935t cont 14936d 14937:cont 14938n 14939s/.\{148\}/&'"$ac_delim"'/g 14940t clear 14941:clear 14942s/\\$// 14943t bsnlc 14944s/["\\]/\\&/g; s/^/"/; s/$/"/p 14945d 14946:bsnlc 14947s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p 14948b cont 14949' <confdefs.h | sed ' 14950s/'"$ac_delim"'/"\\\ 14951"/g' >>$CONFIG_STATUS || ac_write_fail=1 14952 14953cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 14954 for (key in D) D_is_set[key] = 1 14955 FS = "" 14956} 14957/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { 14958 line = \$ 0 14959 split(line, arg, " ") 14960 if (arg[1] == "#") { 14961 defundef = arg[2] 14962 mac1 = arg[3] 14963 } else { 14964 defundef = substr(arg[1], 2) 14965 mac1 = arg[2] 14966 } 14967 split(mac1, mac2, "(") #) 14968 macro = mac2[1] 14969 prefix = substr(line, 1, index(line, defundef) - 1) 14970 if (D_is_set[macro]) { 14971 # Preserve the white space surrounding the "#". 14972 print prefix "define", macro P[macro] D[macro] 14973 next 14974 } else { 14975 # Replace #undef with comments. This is necessary, for example, 14976 # in the case of _POSIX_SOURCE, which is predefined and required 14977 # on some systems where configure will not decide to define it. 14978 if (defundef == "undef") { 14979 print "/*", prefix defundef, macro, "*/" 14980 next 14981 } 14982 } 14983} 14984{ print } 14985_ACAWK 14986_ACEOF 14987cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 14988 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 14989fi # test -n "$CONFIG_HEADERS" 14990 14991 14992eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" 14993shift 14994for ac_tag 14995do 14996 case $ac_tag in 14997 :[FHLC]) ac_mode=$ac_tag; continue;; 14998 esac 14999 case $ac_mode$ac_tag in 15000 :[FHL]*:*);; 15001 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; 15002 :[FH]-) ac_tag=-:-;; 15003 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 15004 esac 15005 ac_save_IFS=$IFS 15006 IFS=: 15007 set x $ac_tag 15008 IFS=$ac_save_IFS 15009 shift 15010 ac_file=$1 15011 shift 15012 15013 case $ac_mode in 15014 :L) ac_source=$1;; 15015 :[FH]) 15016 ac_file_inputs= 15017 for ac_f 15018 do 15019 case $ac_f in 15020 -) ac_f="$ac_tmp/stdin";; 15021 *) # Look for the file first in the build tree, then in the source tree 15022 # (if the path is not absolute). The absolute path cannot be DOS-style, 15023 # because $ac_f cannot contain `:'. 15024 test -f "$ac_f" || 15025 case $ac_f in 15026 [\\/$]*) false;; 15027 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 15028 esac || 15029 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; 15030 esac 15031 case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 15032 as_fn_append ac_file_inputs " '$ac_f'" 15033 done 15034 15035 # Let's still pretend it is `configure' which instantiates (i.e., don't 15036 # use $as_me), people would be surprised to read: 15037 # /* config.h. Generated by config.status. */ 15038 configure_input='Generated from '` 15039 printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' 15040 `' by configure.' 15041 if test x"$ac_file" != x-; then 15042 configure_input="$ac_file. $configure_input" 15043 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 15044printf "%s\n" "$as_me: creating $ac_file" >&6;} 15045 fi 15046 # Neutralize special characters interpreted by sed in replacement strings. 15047 case $configure_input in #( 15048 *\&* | *\|* | *\\* ) 15049 ac_sed_conf_input=`printf "%s\n" "$configure_input" | 15050 sed 's/[\\\\&|]/\\\\&/g'`;; #( 15051 *) ac_sed_conf_input=$configure_input;; 15052 esac 15053 15054 case $ac_tag in 15055 *:-:* | *:-) cat >"$ac_tmp/stdin" \ 15056 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 15057 esac 15058 ;; 15059 esac 15060 15061 ac_dir=`$as_dirname -- "$ac_file" || 15062$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 15063 X"$ac_file" : 'X\(//\)[^/]' \| \ 15064 X"$ac_file" : 'X\(//\)$' \| \ 15065 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 15066printf "%s\n" X"$ac_file" | 15067 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 15068 s//\1/ 15069 q 15070 } 15071 /^X\(\/\/\)[^/].*/{ 15072 s//\1/ 15073 q 15074 } 15075 /^X\(\/\/\)$/{ 15076 s//\1/ 15077 q 15078 } 15079 /^X\(\/\).*/{ 15080 s//\1/ 15081 q 15082 } 15083 s/.*/./; q'` 15084 as_dir="$ac_dir"; as_fn_mkdir_p 15085 ac_builddir=. 15086 15087case "$ac_dir" in 15088.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 15089*) 15090 ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` 15091 # A ".." for each directory in $ac_dir_suffix. 15092 ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 15093 case $ac_top_builddir_sub in 15094 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 15095 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 15096 esac ;; 15097esac 15098ac_abs_top_builddir=$ac_pwd 15099ac_abs_builddir=$ac_pwd$ac_dir_suffix 15100# for backward compatibility: 15101ac_top_builddir=$ac_top_build_prefix 15102 15103case $srcdir in 15104 .) # We are building in place. 15105 ac_srcdir=. 15106 ac_top_srcdir=$ac_top_builddir_sub 15107 ac_abs_top_srcdir=$ac_pwd ;; 15108 [\\/]* | ?:[\\/]* ) # Absolute name. 15109 ac_srcdir=$srcdir$ac_dir_suffix; 15110 ac_top_srcdir=$srcdir 15111 ac_abs_top_srcdir=$srcdir ;; 15112 *) # Relative name. 15113 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 15114 ac_top_srcdir=$ac_top_build_prefix$srcdir 15115 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 15116esac 15117ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 15118 15119 15120 case $ac_mode in 15121 :F) 15122 # 15123 # CONFIG_FILE 15124 # 15125 15126 case $INSTALL in 15127 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; 15128 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; 15129 esac 15130_ACEOF 15131 15132cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 15133# If the template does not know about datarootdir, expand it. 15134# FIXME: This hack should be removed a few years after 2.60. 15135ac_datarootdir_hack=; ac_datarootdir_seen= 15136ac_sed_dataroot=' 15137/datarootdir/ { 15138 p 15139 q 15140} 15141/@datadir@/p 15142/@docdir@/p 15143/@infodir@/p 15144/@localedir@/p 15145/@mandir@/p' 15146case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in 15147*datarootdir*) ac_datarootdir_seen=yes;; 15148*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 15149 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 15150printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 15151_ACEOF 15152cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 15153 ac_datarootdir_hack=' 15154 s&@datadir@&$datadir&g 15155 s&@docdir@&$docdir&g 15156 s&@infodir@&$infodir&g 15157 s&@localedir@&$localedir&g 15158 s&@mandir@&$mandir&g 15159 s&\\\${datarootdir}&$datarootdir&g' ;; 15160esac 15161_ACEOF 15162 15163# Neutralize VPATH when `$srcdir' = `.'. 15164# Shell code in configure.ac might set extrasub. 15165# FIXME: do we really want to maintain this feature? 15166cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 15167ac_sed_extra="$ac_vpsub 15168$extrasub 15169_ACEOF 15170cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 15171:t 15172/@[a-zA-Z_][a-zA-Z_0-9]*@/!b 15173s|@configure_input@|$ac_sed_conf_input|;t t 15174s&@top_builddir@&$ac_top_builddir_sub&;t t 15175s&@top_build_prefix@&$ac_top_build_prefix&;t t 15176s&@srcdir@&$ac_srcdir&;t t 15177s&@abs_srcdir@&$ac_abs_srcdir&;t t 15178s&@top_srcdir@&$ac_top_srcdir&;t t 15179s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t 15180s&@builddir@&$ac_builddir&;t t 15181s&@abs_builddir@&$ac_abs_builddir&;t t 15182s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 15183s&@INSTALL@&$ac_INSTALL&;t t 15184$ac_datarootdir_hack 15185" 15186eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ 15187 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 15188 15189test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 15190 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && 15191 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ 15192 "$ac_tmp/out"`; test -z "$ac_out"; } && 15193 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 15194which seems to be undefined. Please make sure it is defined" >&5 15195printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 15196which seems to be undefined. Please make sure it is defined" >&2;} 15197 15198 rm -f "$ac_tmp/stdin" 15199 case $ac_file in 15200 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; 15201 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; 15202 esac \ 15203 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 15204 ;; 15205 :H) 15206 # 15207 # CONFIG_HEADER 15208 # 15209 if test x"$ac_file" != x-; then 15210 { 15211 printf "%s\n" "/* $configure_input */" >&1 \ 15212 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" 15213 } >"$ac_tmp/config.h" \ 15214 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 15215 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then 15216 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 15217printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} 15218 else 15219 rm -f "$ac_file" 15220 mv "$ac_tmp/config.h" "$ac_file" \ 15221 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 15222 fi 15223 else 15224 printf "%s\n" "/* $configure_input */" >&1 \ 15225 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ 15226 || as_fn_error $? "could not create -" "$LINENO" 5 15227 fi 15228 ;; 15229 15230 :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 15231printf "%s\n" "$as_me: executing $ac_file commands" >&6;} 15232 ;; 15233 esac 15234 15235 15236 case $ac_file$ac_mode in 15237 "default-1":C) if test -f .devel; then 15238 echo timestamp > stamp-h 15239 cat $srcdir/Makefile-devel-adds >> Makefile 15240 make depend || exit 1 15241fi ;; 15242 15243 esac 15244done # for ac_tag 15245 15246 15247as_fn_exit 0 15248_ACEOF 15249ac_clean_files=$ac_clean_files_save 15250 15251test $ac_write_fail = 0 || 15252 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 15253 15254 15255# configure is writing to config.log, and then calls config.status. 15256# config.status does its own redirection, appending to config.log. 15257# Unfortunately, on DOS this fails, as config.log is still kept open 15258# by configure, so config.status won't be able to write to it; its 15259# output is simply discarded. So we exec the FD to /dev/null, 15260# effectively closing config.log, so it can be properly (re)opened and 15261# appended to by config.status. When coming back to configure, we 15262# need to make the FD available again. 15263if test "$no_create" != yes; then 15264 ac_cs_success=: 15265 ac_config_status_args= 15266 test "$silent" = yes && 15267 ac_config_status_args="$ac_config_status_args --quiet" 15268 exec 5>/dev/null 15269 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 15270 exec 5>>config.log 15271 # Use ||, not &&, to avoid exiting from the if with $? = 1, which 15272 # would make configure fail if this is the last instruction. 15273 $ac_cs_success || as_fn_exit 1 15274fi 15275if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 15276 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 15277printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} 15278fi 15279 15280exit 0 15281 15282