14edb46e9SPaul Traina#! /bin/sh 24edb46e9SPaul Traina# Guess values for system-dependent variables and create Makefiles. 3*0a7e5f1fSJoseph Mingrone# Generated by GNU Autoconf 2.71 for tcpdump 4.99.5. 4d03c0883SXin LI# 54edb46e9SPaul Traina# 6*0a7e5f1fSJoseph Mingrone# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, 7*0a7e5f1fSJoseph Mingrone# Inc. 8d03c0883SXin LI# 9d03c0883SXin LI# 104edb46e9SPaul Traina# This configure script is free software; the Free Software Foundation 114edb46e9SPaul Traina# gives unlimited permission to copy, distribute and modify it. 12d03c0883SXin LI## -------------------- ## 135b0fe478SBruce M Simpson## M4sh Initialization. ## 14d03c0883SXin LI## -------------------- ## 154edb46e9SPaul Traina 16b5bfcb5dSMax Laier# Be more Bourne compatible 17b5bfcb5dSMax LaierDUALCASE=1; export DUALCASE # for MKS sh 18*0a7e5f1fSJoseph Mingroneas_nop=: 19*0a7e5f1fSJoseph Mingroneif test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 20*0a7e5f1fSJoseph Mingronethen : 215b0fe478SBruce M Simpson emulate sh 225b0fe478SBruce M Simpson NULLCMD=: 23d03c0883SXin LI # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 245b0fe478SBruce M Simpson # is contrary to our usage. Disable this feature. 255b0fe478SBruce M Simpson alias -g '${1+"$@"}'='"$@"' 26b5bfcb5dSMax Laier setopt NO_GLOB_SUBST 27*0a7e5f1fSJoseph Mingroneelse $as_nop 28d03c0883SXin LI case `(set -o) 2>/dev/null` in #( 29d03c0883SXin LI *posix*) : 30d03c0883SXin LI set -o posix ;; #( 31d03c0883SXin LI *) : 32d03c0883SXin LI ;; 33b5bfcb5dSMax Laieresac 345b0fe478SBruce M Simpsonfi 355b0fe478SBruce M Simpson 365b0fe478SBruce M Simpson 37*0a7e5f1fSJoseph Mingrone 38*0a7e5f1fSJoseph Mingrone# Reset variables that may have inherited troublesome values from 39*0a7e5f1fSJoseph Mingrone# the environment. 40*0a7e5f1fSJoseph Mingrone 41*0a7e5f1fSJoseph Mingrone# IFS needs to be set, to space, tab, and newline, in precisely that order. 42*0a7e5f1fSJoseph Mingrone# (If _AS_PATH_WALK were called with IFS unset, it would have the 43*0a7e5f1fSJoseph Mingrone# side effect of setting IFS to empty, thus disabling word splitting.) 44*0a7e5f1fSJoseph Mingrone# Quoting is to prevent editors from complaining about space-tab. 45d03c0883SXin LIas_nl=' 46d03c0883SXin LI' 47d03c0883SXin LIexport as_nl 48*0a7e5f1fSJoseph MingroneIFS=" "" $as_nl" 49*0a7e5f1fSJoseph Mingrone 50*0a7e5f1fSJoseph MingronePS1='$ ' 51*0a7e5f1fSJoseph MingronePS2='> ' 52*0a7e5f1fSJoseph MingronePS4='+ ' 53*0a7e5f1fSJoseph Mingrone 54*0a7e5f1fSJoseph Mingrone# Ensure predictable behavior from utilities with locale-dependent output. 55*0a7e5f1fSJoseph MingroneLC_ALL=C 56*0a7e5f1fSJoseph Mingroneexport LC_ALL 57*0a7e5f1fSJoseph MingroneLANGUAGE=C 58*0a7e5f1fSJoseph Mingroneexport LANGUAGE 59*0a7e5f1fSJoseph Mingrone 60*0a7e5f1fSJoseph Mingrone# We cannot yet rely on "unset" to work, but we need these variables 61*0a7e5f1fSJoseph Mingrone# to be unset--not just set to an empty or harmless value--now, to 62*0a7e5f1fSJoseph Mingrone# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct 63*0a7e5f1fSJoseph Mingrone# also avoids known problems related to "unset" and subshell syntax 64*0a7e5f1fSJoseph Mingrone# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). 65*0a7e5f1fSJoseph Mingronefor as_var in BASH_ENV ENV MAIL MAILPATH CDPATH 66*0a7e5f1fSJoseph Mingronedo eval test \${$as_var+y} \ 67*0a7e5f1fSJoseph Mingrone && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 68*0a7e5f1fSJoseph Mingronedone 69*0a7e5f1fSJoseph Mingrone 70*0a7e5f1fSJoseph Mingrone# Ensure that fds 0, 1, and 2 are open. 71*0a7e5f1fSJoseph Mingroneif (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi 72*0a7e5f1fSJoseph Mingroneif (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi 73*0a7e5f1fSJoseph Mingroneif (exec 3>&2) ; then :; else exec 2>/dev/null; fi 745b0fe478SBruce M Simpson 755b0fe478SBruce M Simpson# The user is always right. 76*0a7e5f1fSJoseph Mingroneif ${PATH_SEPARATOR+false} :; then 775b0fe478SBruce M Simpson PATH_SEPARATOR=: 78d03c0883SXin LI (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 79d03c0883SXin LI (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 80d03c0883SXin LI PATH_SEPARATOR=';' 81d03c0883SXin LI } 82b5bfcb5dSMax Laierfi 835b0fe478SBruce M Simpson 84b5bfcb5dSMax Laier 85b5bfcb5dSMax Laier# Find who we are. Look in the path if we contain no directory separator. 86d03c0883SXin LIas_myself= 87d03c0883SXin LIcase $0 in #(( 885b0fe478SBruce M Simpson *[\\/]* ) as_myself=$0 ;; 895b0fe478SBruce M Simpson *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 905b0fe478SBruce M Simpsonfor as_dir in $PATH 915b0fe478SBruce M Simpsondo 925b0fe478SBruce M Simpson IFS=$as_save_IFS 93*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 94*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 95*0a7e5f1fSJoseph Mingrone */) ;; 96*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 97*0a7e5f1fSJoseph Mingrone esac 98*0a7e5f1fSJoseph Mingrone test -r "$as_dir$0" && as_myself=$as_dir$0 && break 995b0fe478SBruce M Simpson done 100b5bfcb5dSMax LaierIFS=$as_save_IFS 1015b0fe478SBruce M Simpson 1025b0fe478SBruce M Simpson ;; 1035b0fe478SBruce M Simpsonesac 1045b0fe478SBruce M Simpson# We did not find ourselves, most probably we were run as `sh COMMAND' 1055b0fe478SBruce M Simpson# in which case we are not to be found in the path. 1065b0fe478SBruce M Simpsonif test "x$as_myself" = x; then 1075b0fe478SBruce M Simpson as_myself=$0 1085b0fe478SBruce M Simpsonfi 1095b0fe478SBruce M Simpsonif test ! -f "$as_myself"; then 110*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 111d03c0883SXin LI exit 1 1125b0fe478SBruce M Simpsonfi 113b5bfcb5dSMax Laier 114d03c0883SXin LI 1153c602fabSXin LI# Use a proper internal environment variable to ensure we don't fall 1163c602fabSXin LI # into an infinite loop, continuously re-executing ourselves. 1173c602fabSXin LI if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then 1183c602fabSXin LI _as_can_reexec=no; export _as_can_reexec; 1193c602fabSXin LI # We cannot yet assume a decent shell, so we have to provide a 1203c602fabSXin LI# neutralization value for shells without unset; and this also 1213c602fabSXin LI# works around shells that cannot unset nonexistent variables. 1223c602fabSXin LI# Preserve -v and -x to the replacement shell. 1233c602fabSXin LIBASH_ENV=/dev/null 1243c602fabSXin LIENV=/dev/null 1253c602fabSXin LI(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 1263c602fabSXin LIcase $- in # (((( 1273c602fabSXin LI *v*x* | *x*v* ) as_opts=-vx ;; 1283c602fabSXin LI *v* ) as_opts=-v ;; 1293c602fabSXin LI *x* ) as_opts=-x ;; 1303c602fabSXin LI * ) as_opts= ;; 1313c602fabSXin LIesac 1323c602fabSXin LIexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 1333c602fabSXin LI# Admittedly, this is quite paranoid, since all the known shells bail 1343c602fabSXin LI# out after a failed `exec'. 135*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 136*0a7e5f1fSJoseph Mingroneexit 255 1373c602fabSXin LI fi 1383c602fabSXin LI # We don't want this to propagate to other subprocesses. 1393c602fabSXin LI { _as_can_reexec=; unset _as_can_reexec;} 140d03c0883SXin LIif test "x$CONFIG_SHELL" = x; then 141*0a7e5f1fSJoseph Mingrone as_bourne_compatible="as_nop=: 142*0a7e5f1fSJoseph Mingroneif test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 143*0a7e5f1fSJoseph Mingronethen : 144d03c0883SXin LI emulate sh 145d03c0883SXin LI NULLCMD=: 146d03c0883SXin LI # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which 147d03c0883SXin LI # is contrary to our usage. Disable this feature. 148d03c0883SXin LI alias -g '\${1+\"\$@\"}'='\"\$@\"' 149d03c0883SXin LI setopt NO_GLOB_SUBST 150*0a7e5f1fSJoseph Mingroneelse \$as_nop 151d03c0883SXin LI case \`(set -o) 2>/dev/null\` in #( 152d03c0883SXin LI *posix*) : 153d03c0883SXin LI set -o posix ;; #( 154d03c0883SXin LI *) : 155d03c0883SXin LI ;; 156d03c0883SXin LIesac 157d03c0883SXin LIfi 158d03c0883SXin LI" 159d03c0883SXin LI as_required="as_fn_return () { (exit \$1); } 160d03c0883SXin LIas_fn_success () { as_fn_return 0; } 161d03c0883SXin LIas_fn_failure () { as_fn_return 1; } 162d03c0883SXin LIas_fn_ret_success () { return 0; } 163d03c0883SXin LIas_fn_ret_failure () { return 1; } 164d03c0883SXin LI 165d03c0883SXin LIexitcode=0 166d03c0883SXin LIas_fn_success || { exitcode=1; echo as_fn_success failed.; } 167d03c0883SXin LIas_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } 168d03c0883SXin LIas_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } 169d03c0883SXin LIas_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } 170*0a7e5f1fSJoseph Mingroneif ( set x; as_fn_ret_success y && test x = \"\$1\" ) 171*0a7e5f1fSJoseph Mingronethen : 172d03c0883SXin LI 173*0a7e5f1fSJoseph Mingroneelse \$as_nop 174d03c0883SXin LI exitcode=1; echo positional parameters were not saved. 175d03c0883SXin LIfi 1763c602fabSXin LItest x\$exitcode = x0 || exit 1 177*0a7e5f1fSJoseph Mingroneblah=\$(echo \$(echo blah)) 178*0a7e5f1fSJoseph Mingronetest x\"\$blah\" = xblah || exit 1 1793c602fabSXin LItest -x / || exit 1" 180d03c0883SXin LI as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO 181d03c0883SXin LI as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO 182d03c0883SXin LI eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && 183d03c0883SXin LI test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 184d03c0883SXin LItest \$(( 1 + 1 )) = 2 || exit 1" 185*0a7e5f1fSJoseph Mingrone if (eval "$as_required") 2>/dev/null 186*0a7e5f1fSJoseph Mingronethen : 187d03c0883SXin LI as_have_required=yes 188*0a7e5f1fSJoseph Mingroneelse $as_nop 189d03c0883SXin LI as_have_required=no 190d03c0883SXin LIfi 191*0a7e5f1fSJoseph Mingrone if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null 192*0a7e5f1fSJoseph Mingronethen : 193d03c0883SXin LI 194*0a7e5f1fSJoseph Mingroneelse $as_nop 195d03c0883SXin LI as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 196d03c0883SXin LIas_found=false 197d03c0883SXin LIfor as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 198d03c0883SXin LIdo 199d03c0883SXin LI IFS=$as_save_IFS 200*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 201*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 202*0a7e5f1fSJoseph Mingrone */) ;; 203*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 204*0a7e5f1fSJoseph Mingrone esac 205d03c0883SXin LI as_found=: 206d03c0883SXin LI case $as_dir in #( 207d03c0883SXin LI /*) 208d03c0883SXin LI for as_base in sh bash ksh sh5; do 209d03c0883SXin LI # Try only shells that exist, to save several forks. 210*0a7e5f1fSJoseph Mingrone as_shell=$as_dir$as_base 211d03c0883SXin LI if { test -f "$as_shell" || test -f "$as_shell.exe"; } && 212*0a7e5f1fSJoseph Mingrone as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null 213*0a7e5f1fSJoseph Mingronethen : 214d03c0883SXin LI CONFIG_SHELL=$as_shell as_have_required=yes 215*0a7e5f1fSJoseph Mingrone if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null 216*0a7e5f1fSJoseph Mingronethen : 217d03c0883SXin LI break 2 218d03c0883SXin LIfi 219d03c0883SXin LIfi 220d03c0883SXin LI done;; 221d03c0883SXin LI esac 222d03c0883SXin LI as_found=false 223d03c0883SXin LIdone 224d03c0883SXin LIIFS=$as_save_IFS 225*0a7e5f1fSJoseph Mingroneif $as_found 226*0a7e5f1fSJoseph Mingronethen : 227*0a7e5f1fSJoseph Mingrone 228*0a7e5f1fSJoseph Mingroneelse $as_nop 229*0a7e5f1fSJoseph Mingrone if { test -f "$SHELL" || test -f "$SHELL.exe"; } && 230*0a7e5f1fSJoseph Mingrone as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null 231*0a7e5f1fSJoseph Mingronethen : 232*0a7e5f1fSJoseph Mingrone CONFIG_SHELL=$SHELL as_have_required=yes 233*0a7e5f1fSJoseph Mingronefi 234*0a7e5f1fSJoseph Mingronefi 235d03c0883SXin LI 236d03c0883SXin LI 237*0a7e5f1fSJoseph Mingrone if test "x$CONFIG_SHELL" != x 238*0a7e5f1fSJoseph Mingronethen : 2393c602fabSXin LI export CONFIG_SHELL 240d03c0883SXin LI # We cannot yet assume a decent shell, so we have to provide a 241d03c0883SXin LI# neutralization value for shells without unset; and this also 242d03c0883SXin LI# works around shells that cannot unset nonexistent variables. 243d03c0883SXin LI# Preserve -v and -x to the replacement shell. 244d03c0883SXin LIBASH_ENV=/dev/null 245d03c0883SXin LIENV=/dev/null 246d03c0883SXin LI(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 247d03c0883SXin LIcase $- in # (((( 248d03c0883SXin LI *v*x* | *x*v* ) as_opts=-vx ;; 249d03c0883SXin LI *v* ) as_opts=-v ;; 250d03c0883SXin LI *x* ) as_opts=-x ;; 251d03c0883SXin LI * ) as_opts= ;; 252d03c0883SXin LIesac 2533c602fabSXin LIexec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 2543c602fabSXin LI# Admittedly, this is quite paranoid, since all the known shells bail 2553c602fabSXin LI# out after a failed `exec'. 256*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 2573c602fabSXin LIexit 255 258d03c0883SXin LIfi 259d03c0883SXin LI 260*0a7e5f1fSJoseph Mingrone if test x$as_have_required = xno 261*0a7e5f1fSJoseph Mingronethen : 262*0a7e5f1fSJoseph Mingrone printf "%s\n" "$0: This script requires a shell more modern than all" 263*0a7e5f1fSJoseph Mingrone printf "%s\n" "$0: the shells that I found on your system." 264*0a7e5f1fSJoseph Mingrone if test ${ZSH_VERSION+y} ; then 265*0a7e5f1fSJoseph Mingrone printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" 266*0a7e5f1fSJoseph Mingrone printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." 267d03c0883SXin LI else 268*0a7e5f1fSJoseph Mingrone printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system, 269d03c0883SXin LI$0: including any error possibly output before this 270d03c0883SXin LI$0: message. Then install a modern shell, or manually run 271d03c0883SXin LI$0: the script under such a shell if you do have one." 272d03c0883SXin LI fi 273d03c0883SXin LI exit 1 274d03c0883SXin LIfi 275d03c0883SXin LIfi 276d03c0883SXin LIfi 277d03c0883SXin LISHELL=${CONFIG_SHELL-/bin/sh} 278d03c0883SXin LIexport SHELL 279d03c0883SXin LI# Unset more variables known to interfere with behavior of common tools. 280d03c0883SXin LICLICOLOR_FORCE= GREP_OPTIONS= 281d03c0883SXin LIunset CLICOLOR_FORCE GREP_OPTIONS 282d03c0883SXin LI 283d03c0883SXin LI## --------------------- ## 284d03c0883SXin LI## M4sh Shell Functions. ## 285d03c0883SXin LI## --------------------- ## 286d03c0883SXin LI# as_fn_unset VAR 287d03c0883SXin LI# --------------- 288d03c0883SXin LI# Portably unset VAR. 289d03c0883SXin LIas_fn_unset () 290d03c0883SXin LI{ 291d03c0883SXin LI { eval $1=; unset $1;} 292d03c0883SXin LI} 293d03c0883SXin LIas_unset=as_fn_unset 294d03c0883SXin LI 295*0a7e5f1fSJoseph Mingrone 296d03c0883SXin LI# as_fn_set_status STATUS 297d03c0883SXin LI# ----------------------- 298d03c0883SXin LI# Set $? to STATUS, without forking. 299d03c0883SXin LIas_fn_set_status () 300d03c0883SXin LI{ 301d03c0883SXin LI return $1 302d03c0883SXin LI} # as_fn_set_status 303d03c0883SXin LI 304d03c0883SXin LI# as_fn_exit STATUS 305d03c0883SXin LI# ----------------- 306d03c0883SXin LI# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 307d03c0883SXin LIas_fn_exit () 308d03c0883SXin LI{ 309d03c0883SXin LI set +e 310d03c0883SXin LI as_fn_set_status $1 311d03c0883SXin LI exit $1 312d03c0883SXin LI} # as_fn_exit 313*0a7e5f1fSJoseph Mingrone# as_fn_nop 314*0a7e5f1fSJoseph Mingrone# --------- 315*0a7e5f1fSJoseph Mingrone# Do nothing but, unlike ":", preserve the value of $?. 316*0a7e5f1fSJoseph Mingroneas_fn_nop () 317*0a7e5f1fSJoseph Mingrone{ 318*0a7e5f1fSJoseph Mingrone return $? 319*0a7e5f1fSJoseph Mingrone} 320*0a7e5f1fSJoseph Mingroneas_nop=as_fn_nop 321d03c0883SXin LI 322d03c0883SXin LI# as_fn_mkdir_p 323d03c0883SXin LI# ------------- 324d03c0883SXin LI# Create "$as_dir" as a directory, including parents if necessary. 325d03c0883SXin LIas_fn_mkdir_p () 326d03c0883SXin LI{ 327d03c0883SXin LI 328d03c0883SXin LI case $as_dir in #( 329d03c0883SXin LI -*) as_dir=./$as_dir;; 330d03c0883SXin LI esac 331d03c0883SXin LI test -d "$as_dir" || eval $as_mkdir_p || { 332d03c0883SXin LI as_dirs= 333d03c0883SXin LI while :; do 334d03c0883SXin LI case $as_dir in #( 335*0a7e5f1fSJoseph Mingrone *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 336d03c0883SXin LI *) as_qdir=$as_dir;; 337d03c0883SXin LI esac 338d03c0883SXin LI as_dirs="'$as_qdir' $as_dirs" 339d03c0883SXin LI as_dir=`$as_dirname -- "$as_dir" || 340d03c0883SXin LI$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 341d03c0883SXin LI X"$as_dir" : 'X\(//\)[^/]' \| \ 342d03c0883SXin LI X"$as_dir" : 'X\(//\)$' \| \ 343d03c0883SXin LI X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 344*0a7e5f1fSJoseph Mingroneprintf "%s\n" X"$as_dir" | 345d03c0883SXin LI sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 346d03c0883SXin LI s//\1/ 347d03c0883SXin LI q 348d03c0883SXin LI } 349d03c0883SXin LI /^X\(\/\/\)[^/].*/{ 350d03c0883SXin LI s//\1/ 351d03c0883SXin LI q 352d03c0883SXin LI } 353d03c0883SXin LI /^X\(\/\/\)$/{ 354d03c0883SXin LI s//\1/ 355d03c0883SXin LI q 356d03c0883SXin LI } 357d03c0883SXin LI /^X\(\/\).*/{ 358d03c0883SXin LI s//\1/ 359d03c0883SXin LI q 360d03c0883SXin LI } 361d03c0883SXin LI s/.*/./; q'` 362d03c0883SXin LI test -d "$as_dir" && break 363d03c0883SXin LI done 364d03c0883SXin LI test -z "$as_dirs" || eval "mkdir $as_dirs" 365d03c0883SXin LI } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 366d03c0883SXin LI 367d03c0883SXin LI 368d03c0883SXin LI} # as_fn_mkdir_p 3693c602fabSXin LI 3703c602fabSXin LI# as_fn_executable_p FILE 3713c602fabSXin LI# ----------------------- 3723c602fabSXin LI# Test if FILE is an executable regular file. 3733c602fabSXin LIas_fn_executable_p () 3743c602fabSXin LI{ 3753c602fabSXin LI test -f "$1" && test -x "$1" 3763c602fabSXin LI} # as_fn_executable_p 377d03c0883SXin LI# as_fn_append VAR VALUE 378d03c0883SXin LI# ---------------------- 379d03c0883SXin LI# Append the text in VALUE to the end of the definition contained in VAR. Take 380d03c0883SXin LI# advantage of any shell optimizations that allow amortized linear growth over 381d03c0883SXin LI# repeated appends, instead of the typical quadratic growth present in naive 382d03c0883SXin LI# implementations. 383*0a7e5f1fSJoseph Mingroneif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null 384*0a7e5f1fSJoseph Mingronethen : 385d03c0883SXin LI eval 'as_fn_append () 386d03c0883SXin LI { 387d03c0883SXin LI eval $1+=\$2 388d03c0883SXin LI }' 389*0a7e5f1fSJoseph Mingroneelse $as_nop 390d03c0883SXin LI as_fn_append () 391d03c0883SXin LI { 392d03c0883SXin LI eval $1=\$$1\$2 393d03c0883SXin LI } 394d03c0883SXin LIfi # as_fn_append 395d03c0883SXin LI 396d03c0883SXin LI# as_fn_arith ARG... 397d03c0883SXin LI# ------------------ 398d03c0883SXin LI# Perform arithmetic evaluation on the ARGs, and store the result in the 399d03c0883SXin LI# global $as_val. Take advantage of shells that can avoid forks. The arguments 400d03c0883SXin LI# must be portable across $(()) and expr. 401*0a7e5f1fSJoseph Mingroneif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null 402*0a7e5f1fSJoseph Mingronethen : 403d03c0883SXin LI eval 'as_fn_arith () 404d03c0883SXin LI { 405d03c0883SXin LI as_val=$(( $* )) 406d03c0883SXin LI }' 407*0a7e5f1fSJoseph Mingroneelse $as_nop 408d03c0883SXin LI as_fn_arith () 409d03c0883SXin LI { 410d03c0883SXin LI as_val=`expr "$@" || test $? -eq 1` 411d03c0883SXin LI } 412d03c0883SXin LIfi # as_fn_arith 413d03c0883SXin LI 414*0a7e5f1fSJoseph Mingrone# as_fn_nop 415*0a7e5f1fSJoseph Mingrone# --------- 416*0a7e5f1fSJoseph Mingrone# Do nothing but, unlike ":", preserve the value of $?. 417*0a7e5f1fSJoseph Mingroneas_fn_nop () 418*0a7e5f1fSJoseph Mingrone{ 419*0a7e5f1fSJoseph Mingrone return $? 420*0a7e5f1fSJoseph Mingrone} 421*0a7e5f1fSJoseph Mingroneas_nop=as_fn_nop 422d03c0883SXin LI 423d03c0883SXin LI# as_fn_error STATUS ERROR [LINENO LOG_FD] 424d03c0883SXin LI# ---------------------------------------- 425d03c0883SXin LI# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 426d03c0883SXin LI# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 427d03c0883SXin LI# script with STATUS, using 1 if that was 0. 428d03c0883SXin LIas_fn_error () 429d03c0883SXin LI{ 430d03c0883SXin LI as_status=$1; test $as_status -eq 0 && as_status=1 431d03c0883SXin LI if test "$4"; then 432d03c0883SXin LI as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 433*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 434d03c0883SXin LI fi 435*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me: error: $2" >&2 436d03c0883SXin LI as_fn_exit $as_status 437d03c0883SXin LI} # as_fn_error 438d03c0883SXin LI 439b5bfcb5dSMax Laierif expr a : '\(a\)' >/dev/null 2>&1 && 440b5bfcb5dSMax Laier test "X`expr 00001 : '.*\(...\)'`" = X001; then 441b5bfcb5dSMax Laier as_expr=expr 442b5bfcb5dSMax Laierelse 443b5bfcb5dSMax Laier as_expr=false 444b5bfcb5dSMax Laierfi 445b5bfcb5dSMax Laier 446b5bfcb5dSMax Laierif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 447b5bfcb5dSMax Laier as_basename=basename 448b5bfcb5dSMax Laierelse 449b5bfcb5dSMax Laier as_basename=false 450b5bfcb5dSMax Laierfi 451b5bfcb5dSMax Laier 452d03c0883SXin LIif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 453d03c0883SXin LI as_dirname=dirname 454d03c0883SXin LIelse 455d03c0883SXin LI as_dirname=false 456d03c0883SXin LIfi 457b5bfcb5dSMax Laier 458b5bfcb5dSMax Laieras_me=`$as_basename -- "$0" || 459b5bfcb5dSMax Laier$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 460b5bfcb5dSMax Laier X"$0" : 'X\(//\)$' \| \ 461b5bfcb5dSMax Laier X"$0" : 'X\(/\)' \| . 2>/dev/null || 462*0a7e5f1fSJoseph Mingroneprintf "%s\n" X/"$0" | 463b5bfcb5dSMax Laier sed '/^.*\/\([^/][^/]*\)\/*$/{ 464b5bfcb5dSMax Laier s//\1/ 465b5bfcb5dSMax Laier q 466b5bfcb5dSMax Laier } 467b5bfcb5dSMax Laier /^X\/\(\/\/\)$/{ 468b5bfcb5dSMax Laier s//\1/ 469b5bfcb5dSMax Laier q 470b5bfcb5dSMax Laier } 471b5bfcb5dSMax Laier /^X\/\(\/\).*/{ 472b5bfcb5dSMax Laier s//\1/ 473b5bfcb5dSMax Laier q 474b5bfcb5dSMax Laier } 475b5bfcb5dSMax Laier s/.*/./; q'` 476b5bfcb5dSMax Laier 477d03c0883SXin LI# Avoid depending upon Character Ranges. 478d03c0883SXin LIas_cr_letters='abcdefghijklmnopqrstuvwxyz' 479d03c0883SXin LIas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 480d03c0883SXin LIas_cr_Letters=$as_cr_letters$as_cr_LETTERS 481d03c0883SXin LIas_cr_digits='0123456789' 482d03c0883SXin LIas_cr_alnum=$as_cr_Letters$as_cr_digits 483b5bfcb5dSMax Laier 484b5bfcb5dSMax Laier 485d03c0883SXin LI as_lineno_1=$LINENO as_lineno_1a=$LINENO 486d03c0883SXin LI as_lineno_2=$LINENO as_lineno_2a=$LINENO 487d03c0883SXin LI eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && 488d03c0883SXin LI test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { 489d03c0883SXin LI # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) 490b5bfcb5dSMax Laier sed -n ' 491b5bfcb5dSMax Laier p 492b5bfcb5dSMax Laier /[$]LINENO/= 493b5bfcb5dSMax Laier ' <$as_myself | 4945b0fe478SBruce M Simpson sed ' 495b5bfcb5dSMax Laier s/[$]LINENO.*/&-/ 496b5bfcb5dSMax Laier t lineno 497b5bfcb5dSMax Laier b 498b5bfcb5dSMax Laier :lineno 4995b0fe478SBruce M Simpson N 5005b0fe478SBruce M Simpson :loop 501b5bfcb5dSMax Laier s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ 5025b0fe478SBruce M Simpson t loop 503b5bfcb5dSMax Laier s/-\n.*// 5045b0fe478SBruce M Simpson ' >$as_me.lineno && 505b5bfcb5dSMax Laier chmod +x "$as_me.lineno" || 506*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } 5075b0fe478SBruce M Simpson 5083c602fabSXin LI # If we had to re-execute with $CONFIG_SHELL, we're ensured to have 5093c602fabSXin LI # already done that, so ensure we don't try to do so again and fall 5103c602fabSXin LI # in an infinite loop. This has already happened in practice. 5113c602fabSXin LI _as_can_reexec=no; export _as_can_reexec 5125b0fe478SBruce M Simpson # Don't try to exec as it changes $[0], causing all sort of problems 5135b0fe478SBruce M Simpson # (the dirname of $[0] is not the place where we might find the 514b5bfcb5dSMax Laier # original and so on. Autoconf is especially sensitive to this). 515b5bfcb5dSMax Laier . "./$as_me.lineno" 5165b0fe478SBruce M Simpson # Exit status is that of the last command. 5175b0fe478SBruce M Simpson exit 5185b0fe478SBruce M Simpson} 5195b0fe478SBruce M Simpson 520*0a7e5f1fSJoseph Mingrone 521*0a7e5f1fSJoseph Mingrone# Determine whether it's possible to make 'echo' print without a newline. 522*0a7e5f1fSJoseph Mingrone# These variables are no longer used directly by Autoconf, but are AC_SUBSTed 523*0a7e5f1fSJoseph Mingrone# for compatibility with existing Makefiles. 524b5bfcb5dSMax LaierECHO_C= ECHO_N= ECHO_T= 525d03c0883SXin LIcase `echo -n x` in #((((( 526b5bfcb5dSMax Laier-n*) 527d03c0883SXin LI case `echo 'xy\c'` in 528b5bfcb5dSMax Laier *c*) ECHO_T=' ';; # ECHO_T is single tab character. 529d03c0883SXin LI xy) ECHO_C='\c';; 530d03c0883SXin LI *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 531d03c0883SXin LI ECHO_T=' ';; 532b5bfcb5dSMax Laier esac;; 533b5bfcb5dSMax Laier*) 534b5bfcb5dSMax Laier ECHO_N='-n';; 5355b0fe478SBruce M Simpsonesac 5365b0fe478SBruce M Simpson 537*0a7e5f1fSJoseph Mingrone# For backward compatibility with old third-party macros, we provide 538*0a7e5f1fSJoseph Mingrone# the shell variables $as_echo and $as_echo_n. New code should use 539*0a7e5f1fSJoseph Mingrone# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. 540*0a7e5f1fSJoseph Mingroneas_echo='printf %s\n' 541*0a7e5f1fSJoseph Mingroneas_echo_n='printf %s' 542*0a7e5f1fSJoseph Mingrone 543*0a7e5f1fSJoseph Mingrone 5445b0fe478SBruce M Simpsonrm -f conf$$ conf$$.exe conf$$.file 545b5bfcb5dSMax Laierif test -d conf$$.dir; then 546b5bfcb5dSMax Laier rm -f conf$$.dir/conf$$.file 547b5bfcb5dSMax Laierelse 548b5bfcb5dSMax Laier rm -f conf$$.dir 549d03c0883SXin LI mkdir conf$$.dir 2>/dev/null 550b5bfcb5dSMax Laierfi 551d03c0883SXin LIif (echo >conf$$.file) 2>/dev/null; then 5525b0fe478SBruce M Simpson if ln -s conf$$.file conf$$ 2>/dev/null; then 5535b0fe478SBruce M Simpson as_ln_s='ln -s' 554b5bfcb5dSMax Laier # ... but there are two gotchas: 555b5bfcb5dSMax Laier # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 556b5bfcb5dSMax Laier # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 5573c602fabSXin LI # In both cases, we have to default to `cp -pR'. 558b5bfcb5dSMax Laier ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 5593c602fabSXin LI as_ln_s='cp -pR' 5605b0fe478SBruce M Simpson elif ln conf$$.file conf$$ 2>/dev/null; then 5615b0fe478SBruce M Simpson as_ln_s=ln 5625b0fe478SBruce M Simpson else 5633c602fabSXin LI as_ln_s='cp -pR' 5645b0fe478SBruce M Simpson fi 565d03c0883SXin LIelse 5663c602fabSXin LI as_ln_s='cp -pR' 567d03c0883SXin LIfi 568b5bfcb5dSMax Laierrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 569b5bfcb5dSMax Laierrmdir conf$$.dir 2>/dev/null 5705b0fe478SBruce M Simpson 5715b0fe478SBruce M Simpsonif mkdir -p . 2>/dev/null; then 572d03c0883SXin LI as_mkdir_p='mkdir -p "$as_dir"' 5735b0fe478SBruce M Simpsonelse 574b5bfcb5dSMax Laier test -d ./-p && rmdir ./-p 5755b0fe478SBruce M Simpson as_mkdir_p=false 5765b0fe478SBruce M Simpsonfi 5775b0fe478SBruce M Simpson 578b5bfcb5dSMax Laieras_test_x='test -x' 5793c602fabSXin LIas_executable_p=as_fn_executable_p 5805b0fe478SBruce M Simpson 5815b0fe478SBruce M Simpson# Sed expression to map a string onto a valid CPP name. 582b5bfcb5dSMax Laieras_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 5835b0fe478SBruce M Simpson 5845b0fe478SBruce M Simpson# Sed expression to map a string onto a valid variable name. 585b5bfcb5dSMax Laieras_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 5865b0fe478SBruce M Simpson 5875b0fe478SBruce M Simpson 588d03c0883SXin LItest -n "$DJDIR" || exec 7<&0 </dev/null 589d03c0883SXin LIexec 6>&1 5905b0fe478SBruce M Simpson 5915b0fe478SBruce M Simpson# Name of the host. 592d03c0883SXin LI# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, 5935b0fe478SBruce M Simpson# so uname gets run too. 5945b0fe478SBruce M Simpsonac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 5955b0fe478SBruce M Simpson 5965b0fe478SBruce M Simpson# 5975b0fe478SBruce M Simpson# Initializations. 5985b0fe478SBruce M Simpson# 5994edb46e9SPaul Trainaac_default_prefix=/usr/local 600b5bfcb5dSMax Laierac_clean_files= 6015b0fe478SBruce M Simpsonac_config_libobj_dir=. 602b5bfcb5dSMax LaierLIBOBJS= 6035b0fe478SBruce M Simpsoncross_compiling=no 6045b0fe478SBruce M Simpsonsubdirs= 6055b0fe478SBruce M SimpsonMFLAGS= 6065b0fe478SBruce M SimpsonMAKEFLAGS= 6075b0fe478SBruce M Simpson 6085b0fe478SBruce M Simpson# Identity of this package. 609ee67461eSJoseph MingronePACKAGE_NAME='tcpdump' 610ee67461eSJoseph MingronePACKAGE_TARNAME='tcpdump' 611*0a7e5f1fSJoseph MingronePACKAGE_VERSION='4.99.5' 612*0a7e5f1fSJoseph MingronePACKAGE_STRING='tcpdump 4.99.5' 613ee67461eSJoseph MingronePACKAGE_BUGREPORT='' 614ee67461eSJoseph MingronePACKAGE_URL='' 6155b0fe478SBruce M Simpson 6165b0fe478SBruce M Simpsonac_unique_file="tcpdump.c" 6175b0fe478SBruce M Simpson# Factoring default headers for most tests. 6185b0fe478SBruce M Simpsonac_includes_default="\ 6195b0fe478SBruce M Simpson#include <stddef.h> 620*0a7e5f1fSJoseph Mingrone#ifdef HAVE_STDIO_H 621*0a7e5f1fSJoseph Mingrone# include <stdio.h> 622*0a7e5f1fSJoseph Mingrone#endif 623b5bfcb5dSMax Laier#ifdef HAVE_STDLIB_H 6245b0fe478SBruce M Simpson# include <stdlib.h> 6255b0fe478SBruce M Simpson#endif 626b5bfcb5dSMax Laier#ifdef HAVE_STRING_H 6275b0fe478SBruce M Simpson# include <string.h> 6285b0fe478SBruce M Simpson#endif 629b5bfcb5dSMax Laier#ifdef HAVE_INTTYPES_H 6305b0fe478SBruce M Simpson# include <inttypes.h> 631b5bfcb5dSMax Laier#endif 632b5bfcb5dSMax Laier#ifdef HAVE_STDINT_H 6335b0fe478SBruce M Simpson# include <stdint.h> 6345b0fe478SBruce M Simpson#endif 635*0a7e5f1fSJoseph Mingrone#ifdef HAVE_STRINGS_H 636*0a7e5f1fSJoseph Mingrone# include <strings.h> 637*0a7e5f1fSJoseph Mingrone#endif 638*0a7e5f1fSJoseph Mingrone#ifdef HAVE_SYS_TYPES_H 639*0a7e5f1fSJoseph Mingrone# include <sys/types.h> 640*0a7e5f1fSJoseph Mingrone#endif 641*0a7e5f1fSJoseph Mingrone#ifdef HAVE_SYS_STAT_H 642*0a7e5f1fSJoseph Mingrone# include <sys/stat.h> 643*0a7e5f1fSJoseph Mingrone#endif 644b5bfcb5dSMax Laier#ifdef HAVE_UNISTD_H 6455b0fe478SBruce M Simpson# include <unistd.h> 6465b0fe478SBruce M Simpson#endif" 6475b0fe478SBruce M Simpson 648*0a7e5f1fSJoseph Mingroneac_header_c_list= 649d03c0883SXin LIac_subst_vars='LTLIBOBJS 650b5bfcb5dSMax LaierINSTALL_DATA 651d03c0883SXin LIINSTALL_SCRIPT 652d03c0883SXin LIINSTALL_PROGRAM 653d03c0883SXin LIMAN_MISC_INFO 654d03c0883SXin LIMAN_FILE_FORMATS 655d03c0883SXin LILOCALSRC 656d03c0883SXin LIV_PCAPDEP 657d03c0883SXin LIV_INCLS 658d03c0883SXin LIV_DEFS 659d03c0883SXin LIV_CCOPT 660*0a7e5f1fSJoseph MingroneLIBCRYPTO_LIBS_STATIC 661*0a7e5f1fSJoseph MingroneLIBCRYPTO_LIBS 662*0a7e5f1fSJoseph MingroneLIBCRYPTO_CFLAGS 6633c602fabSXin LIMKDEP 6643c602fabSXin LIDEPENDENCY_CFLAG 6653c602fabSXin LIAR 666d03c0883SXin LIRANLIB 667d03c0883SXin LIPCAP_CONFIG 668d03c0883SXin LILIBOBJS 669d03c0883SXin LIEGREP 670d03c0883SXin LIGREP 671d03c0883SXin LICPP 672*0a7e5f1fSJoseph MingroneBREW 673*0a7e5f1fSJoseph MingronePKG_CONFIG_LIBDIR 674*0a7e5f1fSJoseph MingronePKG_CONFIG_PATH 675*0a7e5f1fSJoseph MingronePKG_CONFIG 676d03c0883SXin LIOBJEXT 677d03c0883SXin LIEXEEXT 678d03c0883SXin LIac_ct_CC 679d03c0883SXin LICPPFLAGS 680d03c0883SXin LILDFLAGS 681d03c0883SXin LICFLAGS 682d03c0883SXin LICC 683d03c0883SXin LISHLICC2 684d03c0883SXin LIhost_os 685d03c0883SXin LIhost_vendor 686d03c0883SXin LIhost_cpu 687d03c0883SXin LIhost 688d03c0883SXin LIbuild_os 689d03c0883SXin LIbuild_vendor 690d03c0883SXin LIbuild_cpu 691d03c0883SXin LIbuild 692d03c0883SXin LItarget_alias 693d03c0883SXin LIhost_alias 694d03c0883SXin LIbuild_alias 695d03c0883SXin LILIBS 696d03c0883SXin LIECHO_T 697d03c0883SXin LIECHO_N 698d03c0883SXin LIECHO_C 699d03c0883SXin LIDEFS 700d03c0883SXin LImandir 701d03c0883SXin LIlocaledir 702d03c0883SXin LIlibdir 703d03c0883SXin LIpsdir 704d03c0883SXin LIpdfdir 705d03c0883SXin LIdvidir 706d03c0883SXin LIhtmldir 707d03c0883SXin LIinfodir 708d03c0883SXin LIdocdir 709d03c0883SXin LIoldincludedir 710d03c0883SXin LIincludedir 711*0a7e5f1fSJoseph Mingronerunstatedir 712d03c0883SXin LIlocalstatedir 713d03c0883SXin LIsharedstatedir 714d03c0883SXin LIsysconfdir 715d03c0883SXin LIdatadir 716d03c0883SXin LIdatarootdir 717d03c0883SXin LIlibexecdir 718d03c0883SXin LIsbindir 719d03c0883SXin LIbindir 720d03c0883SXin LIprogram_transform_name 721d03c0883SXin LIprefix 722d03c0883SXin LIexec_prefix 723d03c0883SXin LIPACKAGE_URL 724d03c0883SXin LIPACKAGE_BUGREPORT 725d03c0883SXin LIPACKAGE_STRING 726d03c0883SXin LIPACKAGE_VERSION 727d03c0883SXin LIPACKAGE_TARNAME 728d03c0883SXin LIPACKAGE_NAME 729d03c0883SXin LIPATH_SEPARATOR 730d03c0883SXin LISHELL' 7315b0fe478SBruce M Simpsonac_subst_files='' 732d03c0883SXin LIac_user_opts=' 733d03c0883SXin LIenable_option_checking 734d03c0883SXin LIwith_gcc 735d03c0883SXin LIenable_universal 736d03c0883SXin LIwith_smi 737*0a7e5f1fSJoseph Mingroneenable_instrument_functions 738d03c0883SXin LIenable_smb 739d03c0883SXin LIwith_user 740d03c0883SXin LIwith_chroot 7413c602fabSXin LIwith_sandbox_capsicum 742ee67461eSJoseph Mingroneenable_local_libpcap 743d03c0883SXin LIwith_crypto 7448bdc5a62SPatrick Kelseywith_cap_ng 745d03c0883SXin LI' 746b5bfcb5dSMax Laier ac_precious_vars='build_alias 747b5bfcb5dSMax Laierhost_alias 748b5bfcb5dSMax Laiertarget_alias 749b5bfcb5dSMax LaierCC 750b5bfcb5dSMax LaierCFLAGS 751b5bfcb5dSMax LaierLDFLAGS 752b5bfcb5dSMax LaierLIBS 753b5bfcb5dSMax LaierCPPFLAGS 754*0a7e5f1fSJoseph MingronePKG_CONFIG 755*0a7e5f1fSJoseph MingronePKG_CONFIG_PATH 756*0a7e5f1fSJoseph MingronePKG_CONFIG_LIBDIR 757*0a7e5f1fSJoseph MingroneCPP 758*0a7e5f1fSJoseph MingroneLIBCRYPTO_CFLAGS 759*0a7e5f1fSJoseph MingroneLIBCRYPTO_LIBS 760*0a7e5f1fSJoseph MingroneLIBCRYPTO_LIBS_STATIC' 761b5bfcb5dSMax Laier 7624edb46e9SPaul Traina 7634edb46e9SPaul Traina# Initialize some variables set by options. 7645b0fe478SBruce M Simpsonac_init_help= 7655b0fe478SBruce M Simpsonac_init_version=false 766d03c0883SXin LIac_unrecognized_opts= 767d03c0883SXin LIac_unrecognized_sep= 7684edb46e9SPaul Traina# The variables have the same names as the options, with 7694edb46e9SPaul Traina# dashes changed to underlines. 7705b0fe478SBruce M Simpsoncache_file=/dev/null 7714edb46e9SPaul Trainaexec_prefix=NONE 7724edb46e9SPaul Trainano_create= 7734edb46e9SPaul Trainano_recursion= 7744edb46e9SPaul Trainaprefix=NONE 7754edb46e9SPaul Trainaprogram_prefix=NONE 7764edb46e9SPaul Trainaprogram_suffix=NONE 7774edb46e9SPaul Trainaprogram_transform_name=s,x,x, 7784edb46e9SPaul Trainasilent= 7794edb46e9SPaul Trainasite= 7804edb46e9SPaul Trainasrcdir= 7814edb46e9SPaul Trainaverbose= 7824edb46e9SPaul Trainax_includes=NONE 7834edb46e9SPaul Trainax_libraries=NONE 7845b0fe478SBruce M Simpson 7855b0fe478SBruce M Simpson# Installation directory options. 7865b0fe478SBruce M Simpson# These are left unexpanded so users can "make install exec_prefix=/foo" 7875b0fe478SBruce M Simpson# and all the variables that are supposed to be based on exec_prefix 7885b0fe478SBruce M Simpson# by default will actually change. 7895b0fe478SBruce M Simpson# Use braces instead of parens because sh, perl, etc. also accept them. 790b5bfcb5dSMax Laier# (The list follows the same order as the GNU Coding Standards.) 7914edb46e9SPaul Trainabindir='${exec_prefix}/bin' 7924edb46e9SPaul Trainasbindir='${exec_prefix}/sbin' 7934edb46e9SPaul Trainalibexecdir='${exec_prefix}/libexec' 794b5bfcb5dSMax Laierdatarootdir='${prefix}/share' 795b5bfcb5dSMax Laierdatadir='${datarootdir}' 7964edb46e9SPaul Trainasysconfdir='${prefix}/etc' 7974edb46e9SPaul Trainasharedstatedir='${prefix}/com' 7984edb46e9SPaul Trainalocalstatedir='${prefix}/var' 799*0a7e5f1fSJoseph Mingronerunstatedir='${localstatedir}/run' 8004edb46e9SPaul Trainaincludedir='${prefix}/include' 8014edb46e9SPaul Trainaoldincludedir='/usr/include' 802ee67461eSJoseph Mingronedocdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 803b5bfcb5dSMax Laierinfodir='${datarootdir}/info' 804b5bfcb5dSMax Laierhtmldir='${docdir}' 805b5bfcb5dSMax Laierdvidir='${docdir}' 806b5bfcb5dSMax Laierpdfdir='${docdir}' 807b5bfcb5dSMax Laierpsdir='${docdir}' 808b5bfcb5dSMax Laierlibdir='${exec_prefix}/lib' 809b5bfcb5dSMax Laierlocaledir='${datarootdir}/locale' 810b5bfcb5dSMax Laiermandir='${datarootdir}/man' 8114edb46e9SPaul Traina 8124edb46e9SPaul Trainaac_prev= 813b5bfcb5dSMax Laierac_dashdash= 8144edb46e9SPaul Trainafor ac_option 8154edb46e9SPaul Trainado 8164edb46e9SPaul Traina # If the previous option needs an argument, assign it. 8174edb46e9SPaul Traina if test -n "$ac_prev"; then 818b5bfcb5dSMax Laier eval $ac_prev=\$ac_option 8194edb46e9SPaul Traina ac_prev= 8204edb46e9SPaul Traina continue 8214edb46e9SPaul Traina fi 8224edb46e9SPaul Traina 823b5bfcb5dSMax Laier case $ac_option in 824d03c0883SXin LI *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 825d03c0883SXin LI *=) ac_optarg= ;; 826b5bfcb5dSMax Laier *) ac_optarg=yes ;; 827b5bfcb5dSMax Laier esac 8284edb46e9SPaul Traina 829b5bfcb5dSMax Laier case $ac_dashdash$ac_option in 830b5bfcb5dSMax Laier --) 831b5bfcb5dSMax Laier ac_dashdash=yes ;; 8324edb46e9SPaul Traina 8334edb46e9SPaul Traina -bindir | --bindir | --bindi | --bind | --bin | --bi) 8344edb46e9SPaul Traina ac_prev=bindir ;; 8354edb46e9SPaul Traina -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 8365b0fe478SBruce M Simpson bindir=$ac_optarg ;; 8374edb46e9SPaul Traina 8384edb46e9SPaul Traina -build | --build | --buil | --bui | --bu) 8395b0fe478SBruce M Simpson ac_prev=build_alias ;; 8404edb46e9SPaul Traina -build=* | --build=* | --buil=* | --bui=* | --bu=*) 8415b0fe478SBruce M Simpson build_alias=$ac_optarg ;; 8424edb46e9SPaul Traina 8434edb46e9SPaul Traina -cache-file | --cache-file | --cache-fil | --cache-fi \ 8444edb46e9SPaul Traina | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 8454edb46e9SPaul Traina ac_prev=cache_file ;; 8464edb46e9SPaul Traina -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 8474edb46e9SPaul Traina | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 8485b0fe478SBruce M Simpson cache_file=$ac_optarg ;; 8495b0fe478SBruce M Simpson 8505b0fe478SBruce M Simpson --config-cache | -C) 8515b0fe478SBruce M Simpson cache_file=config.cache ;; 8524edb46e9SPaul Traina 853b5bfcb5dSMax Laier -datadir | --datadir | --datadi | --datad) 8544edb46e9SPaul Traina ac_prev=datadir ;; 855b5bfcb5dSMax Laier -datadir=* | --datadir=* | --datadi=* | --datad=*) 8565b0fe478SBruce M Simpson datadir=$ac_optarg ;; 8574edb46e9SPaul Traina 858b5bfcb5dSMax Laier -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ 859b5bfcb5dSMax Laier | --dataroo | --dataro | --datar) 860b5bfcb5dSMax Laier ac_prev=datarootdir ;; 861b5bfcb5dSMax Laier -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ 862b5bfcb5dSMax Laier | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) 863b5bfcb5dSMax Laier datarootdir=$ac_optarg ;; 864b5bfcb5dSMax Laier 8654edb46e9SPaul Traina -disable-* | --disable-*) 866d03c0883SXin LI ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 8674edb46e9SPaul Traina # Reject names that are not valid shell variable names. 868d03c0883SXin LI expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 869*0a7e5f1fSJoseph Mingrone as_fn_error $? "invalid feature name: \`$ac_useropt'" 870d03c0883SXin LI ac_useropt_orig=$ac_useropt 871*0a7e5f1fSJoseph Mingrone ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` 872d03c0883SXin LI case $ac_user_opts in 873d03c0883SXin LI *" 874d03c0883SXin LI"enable_$ac_useropt" 875d03c0883SXin LI"*) ;; 876d03c0883SXin LI *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" 877d03c0883SXin LI ac_unrecognized_sep=', ';; 878d03c0883SXin LI esac 879d03c0883SXin LI eval enable_$ac_useropt=no ;; 880b5bfcb5dSMax Laier 881b5bfcb5dSMax Laier -docdir | --docdir | --docdi | --doc | --do) 882b5bfcb5dSMax Laier ac_prev=docdir ;; 883b5bfcb5dSMax Laier -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) 884b5bfcb5dSMax Laier docdir=$ac_optarg ;; 885b5bfcb5dSMax Laier 886b5bfcb5dSMax Laier -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) 887b5bfcb5dSMax Laier ac_prev=dvidir ;; 888b5bfcb5dSMax Laier -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) 889b5bfcb5dSMax Laier dvidir=$ac_optarg ;; 8904edb46e9SPaul Traina 8914edb46e9SPaul Traina -enable-* | --enable-*) 892d03c0883SXin LI ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 8934edb46e9SPaul Traina # Reject names that are not valid shell variable names. 894d03c0883SXin LI expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 895*0a7e5f1fSJoseph Mingrone as_fn_error $? "invalid feature name: \`$ac_useropt'" 896d03c0883SXin LI ac_useropt_orig=$ac_useropt 897*0a7e5f1fSJoseph Mingrone ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` 898d03c0883SXin LI case $ac_user_opts in 899d03c0883SXin LI *" 900d03c0883SXin LI"enable_$ac_useropt" 901d03c0883SXin LI"*) ;; 902d03c0883SXin LI *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" 903d03c0883SXin LI ac_unrecognized_sep=', ';; 904d03c0883SXin LI esac 905d03c0883SXin LI eval enable_$ac_useropt=\$ac_optarg ;; 9064edb46e9SPaul Traina 9074edb46e9SPaul Traina -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 9084edb46e9SPaul Traina | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 9094edb46e9SPaul Traina | --exec | --exe | --ex) 9104edb46e9SPaul Traina ac_prev=exec_prefix ;; 9114edb46e9SPaul Traina -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 9124edb46e9SPaul Traina | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 9134edb46e9SPaul Traina | --exec=* | --exe=* | --ex=*) 9145b0fe478SBruce M Simpson exec_prefix=$ac_optarg ;; 9154edb46e9SPaul Traina 9164edb46e9SPaul Traina -gas | --gas | --ga | --g) 9174edb46e9SPaul Traina # Obsolete; use --with-gas. 9184edb46e9SPaul Traina with_gas=yes ;; 9194edb46e9SPaul Traina 9205b0fe478SBruce M Simpson -help | --help | --hel | --he | -h) 9215b0fe478SBruce M Simpson ac_init_help=long ;; 9225b0fe478SBruce M Simpson -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) 9235b0fe478SBruce M Simpson ac_init_help=recursive ;; 9245b0fe478SBruce M Simpson -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) 9255b0fe478SBruce M Simpson ac_init_help=short ;; 9264edb46e9SPaul Traina 9274edb46e9SPaul Traina -host | --host | --hos | --ho) 9285b0fe478SBruce M Simpson ac_prev=host_alias ;; 9294edb46e9SPaul Traina -host=* | --host=* | --hos=* | --ho=*) 9305b0fe478SBruce M Simpson host_alias=$ac_optarg ;; 9314edb46e9SPaul Traina 932b5bfcb5dSMax Laier -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) 933b5bfcb5dSMax Laier ac_prev=htmldir ;; 934b5bfcb5dSMax Laier -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ 935b5bfcb5dSMax Laier | --ht=*) 936b5bfcb5dSMax Laier htmldir=$ac_optarg ;; 937b5bfcb5dSMax Laier 9384edb46e9SPaul Traina -includedir | --includedir | --includedi | --included | --include \ 9394edb46e9SPaul Traina | --includ | --inclu | --incl | --inc) 9404edb46e9SPaul Traina ac_prev=includedir ;; 9414edb46e9SPaul Traina -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 9424edb46e9SPaul Traina | --includ=* | --inclu=* | --incl=* | --inc=*) 9435b0fe478SBruce M Simpson includedir=$ac_optarg ;; 9444edb46e9SPaul Traina 9454edb46e9SPaul Traina -infodir | --infodir | --infodi | --infod | --info | --inf) 9464edb46e9SPaul Traina ac_prev=infodir ;; 9474edb46e9SPaul Traina -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 9485b0fe478SBruce M Simpson infodir=$ac_optarg ;; 9494edb46e9SPaul Traina 9504edb46e9SPaul Traina -libdir | --libdir | --libdi | --libd) 9514edb46e9SPaul Traina ac_prev=libdir ;; 9524edb46e9SPaul Traina -libdir=* | --libdir=* | --libdi=* | --libd=*) 9535b0fe478SBruce M Simpson libdir=$ac_optarg ;; 9544edb46e9SPaul Traina 9554edb46e9SPaul Traina -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 9564edb46e9SPaul Traina | --libexe | --libex | --libe) 9574edb46e9SPaul Traina ac_prev=libexecdir ;; 9584edb46e9SPaul Traina -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 9594edb46e9SPaul Traina | --libexe=* | --libex=* | --libe=*) 9605b0fe478SBruce M Simpson libexecdir=$ac_optarg ;; 9614edb46e9SPaul Traina 962b5bfcb5dSMax Laier -localedir | --localedir | --localedi | --localed | --locale) 963b5bfcb5dSMax Laier ac_prev=localedir ;; 964b5bfcb5dSMax Laier -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) 965b5bfcb5dSMax Laier localedir=$ac_optarg ;; 966b5bfcb5dSMax Laier 9674edb46e9SPaul Traina -localstatedir | --localstatedir | --localstatedi | --localstated \ 968b5bfcb5dSMax Laier | --localstate | --localstat | --localsta | --localst | --locals) 9694edb46e9SPaul Traina ac_prev=localstatedir ;; 9704edb46e9SPaul Traina -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 971b5bfcb5dSMax Laier | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 9725b0fe478SBruce M Simpson localstatedir=$ac_optarg ;; 9734edb46e9SPaul Traina 9744edb46e9SPaul Traina -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 9754edb46e9SPaul Traina ac_prev=mandir ;; 9764edb46e9SPaul Traina -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 9775b0fe478SBruce M Simpson mandir=$ac_optarg ;; 9784edb46e9SPaul Traina 9794edb46e9SPaul Traina -nfp | --nfp | --nf) 9804edb46e9SPaul Traina # Obsolete; use --without-fp. 9814edb46e9SPaul Traina with_fp=no ;; 9824edb46e9SPaul Traina 9834edb46e9SPaul Traina -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 9845b0fe478SBruce M Simpson | --no-cr | --no-c | -n) 9854edb46e9SPaul Traina no_create=yes ;; 9864edb46e9SPaul Traina 9874edb46e9SPaul Traina -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 9884edb46e9SPaul Traina | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 9894edb46e9SPaul Traina no_recursion=yes ;; 9904edb46e9SPaul Traina 9914edb46e9SPaul Traina -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 9924edb46e9SPaul Traina | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 9934edb46e9SPaul Traina | --oldin | --oldi | --old | --ol | --o) 9944edb46e9SPaul Traina ac_prev=oldincludedir ;; 9954edb46e9SPaul Traina -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 9964edb46e9SPaul Traina | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 9974edb46e9SPaul Traina | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 9985b0fe478SBruce M Simpson oldincludedir=$ac_optarg ;; 9994edb46e9SPaul Traina 10004edb46e9SPaul Traina -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 10014edb46e9SPaul Traina ac_prev=prefix ;; 10024edb46e9SPaul Traina -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 10035b0fe478SBruce M Simpson prefix=$ac_optarg ;; 10044edb46e9SPaul Traina 10054edb46e9SPaul Traina -program-prefix | --program-prefix | --program-prefi | --program-pref \ 10064edb46e9SPaul Traina | --program-pre | --program-pr | --program-p) 10074edb46e9SPaul Traina ac_prev=program_prefix ;; 10084edb46e9SPaul Traina -program-prefix=* | --program-prefix=* | --program-prefi=* \ 10094edb46e9SPaul Traina | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 10105b0fe478SBruce M Simpson program_prefix=$ac_optarg ;; 10114edb46e9SPaul Traina 10124edb46e9SPaul Traina -program-suffix | --program-suffix | --program-suffi | --program-suff \ 10134edb46e9SPaul Traina | --program-suf | --program-su | --program-s) 10144edb46e9SPaul Traina ac_prev=program_suffix ;; 10154edb46e9SPaul Traina -program-suffix=* | --program-suffix=* | --program-suffi=* \ 10164edb46e9SPaul Traina | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 10175b0fe478SBruce M Simpson program_suffix=$ac_optarg ;; 10184edb46e9SPaul Traina 10194edb46e9SPaul Traina -program-transform-name | --program-transform-name \ 10204edb46e9SPaul Traina | --program-transform-nam | --program-transform-na \ 10214edb46e9SPaul Traina | --program-transform-n | --program-transform- \ 10224edb46e9SPaul Traina | --program-transform | --program-transfor \ 10234edb46e9SPaul Traina | --program-transfo | --program-transf \ 10244edb46e9SPaul Traina | --program-trans | --program-tran \ 10254edb46e9SPaul Traina | --progr-tra | --program-tr | --program-t) 10264edb46e9SPaul Traina ac_prev=program_transform_name ;; 10274edb46e9SPaul Traina -program-transform-name=* | --program-transform-name=* \ 10284edb46e9SPaul Traina | --program-transform-nam=* | --program-transform-na=* \ 10294edb46e9SPaul Traina | --program-transform-n=* | --program-transform-=* \ 10304edb46e9SPaul Traina | --program-transform=* | --program-transfor=* \ 10314edb46e9SPaul Traina | --program-transfo=* | --program-transf=* \ 10324edb46e9SPaul Traina | --program-trans=* | --program-tran=* \ 10334edb46e9SPaul Traina | --progr-tra=* | --program-tr=* | --program-t=*) 10345b0fe478SBruce M Simpson program_transform_name=$ac_optarg ;; 10354edb46e9SPaul Traina 1036b5bfcb5dSMax Laier -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) 1037b5bfcb5dSMax Laier ac_prev=pdfdir ;; 1038b5bfcb5dSMax Laier -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) 1039b5bfcb5dSMax Laier pdfdir=$ac_optarg ;; 1040b5bfcb5dSMax Laier 1041b5bfcb5dSMax Laier -psdir | --psdir | --psdi | --psd | --ps) 1042b5bfcb5dSMax Laier ac_prev=psdir ;; 1043b5bfcb5dSMax Laier -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) 1044b5bfcb5dSMax Laier psdir=$ac_optarg ;; 1045b5bfcb5dSMax Laier 10464edb46e9SPaul Traina -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 10474edb46e9SPaul Traina | -silent | --silent | --silen | --sile | --sil) 10484edb46e9SPaul Traina silent=yes ;; 10494edb46e9SPaul Traina 1050*0a7e5f1fSJoseph Mingrone -runstatedir | --runstatedir | --runstatedi | --runstated \ 1051*0a7e5f1fSJoseph Mingrone | --runstate | --runstat | --runsta | --runst | --runs \ 1052*0a7e5f1fSJoseph Mingrone | --run | --ru | --r) 1053*0a7e5f1fSJoseph Mingrone ac_prev=runstatedir ;; 1054*0a7e5f1fSJoseph Mingrone -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ 1055*0a7e5f1fSJoseph Mingrone | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ 1056*0a7e5f1fSJoseph Mingrone | --run=* | --ru=* | --r=*) 1057*0a7e5f1fSJoseph Mingrone runstatedir=$ac_optarg ;; 1058*0a7e5f1fSJoseph Mingrone 10594edb46e9SPaul Traina -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 10604edb46e9SPaul Traina ac_prev=sbindir ;; 10614edb46e9SPaul Traina -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 10624edb46e9SPaul Traina | --sbi=* | --sb=*) 10635b0fe478SBruce M Simpson sbindir=$ac_optarg ;; 10644edb46e9SPaul Traina 10654edb46e9SPaul Traina -sharedstatedir | --sharedstatedir | --sharedstatedi \ 10664edb46e9SPaul Traina | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 10674edb46e9SPaul Traina | --sharedst | --shareds | --shared | --share | --shar \ 10684edb46e9SPaul Traina | --sha | --sh) 10694edb46e9SPaul Traina ac_prev=sharedstatedir ;; 10704edb46e9SPaul Traina -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 10714edb46e9SPaul Traina | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 10724edb46e9SPaul Traina | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 10734edb46e9SPaul Traina | --sha=* | --sh=*) 10745b0fe478SBruce M Simpson sharedstatedir=$ac_optarg ;; 10754edb46e9SPaul Traina 10764edb46e9SPaul Traina -site | --site | --sit) 10774edb46e9SPaul Traina ac_prev=site ;; 10784edb46e9SPaul Traina -site=* | --site=* | --sit=*) 10795b0fe478SBruce M Simpson site=$ac_optarg ;; 10804edb46e9SPaul Traina 10814edb46e9SPaul Traina -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 10824edb46e9SPaul Traina ac_prev=srcdir ;; 10834edb46e9SPaul Traina -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 10845b0fe478SBruce M Simpson srcdir=$ac_optarg ;; 10854edb46e9SPaul Traina 10864edb46e9SPaul Traina -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 10874edb46e9SPaul Traina | --syscon | --sysco | --sysc | --sys | --sy) 10884edb46e9SPaul Traina ac_prev=sysconfdir ;; 10894edb46e9SPaul Traina -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 10904edb46e9SPaul Traina | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 10915b0fe478SBruce M Simpson sysconfdir=$ac_optarg ;; 10924edb46e9SPaul Traina 10934edb46e9SPaul Traina -target | --target | --targe | --targ | --tar | --ta | --t) 10945b0fe478SBruce M Simpson ac_prev=target_alias ;; 10954edb46e9SPaul Traina -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 10965b0fe478SBruce M Simpson target_alias=$ac_optarg ;; 10974edb46e9SPaul Traina 10984edb46e9SPaul Traina -v | -verbose | --verbose | --verbos | --verbo | --verb) 10994edb46e9SPaul Traina verbose=yes ;; 11004edb46e9SPaul Traina 11015b0fe478SBruce M Simpson -version | --version | --versio | --versi | --vers | -V) 11025b0fe478SBruce M Simpson ac_init_version=: ;; 11034edb46e9SPaul Traina 11044edb46e9SPaul Traina -with-* | --with-*) 1105d03c0883SXin LI ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 11064edb46e9SPaul Traina # Reject names that are not valid shell variable names. 1107d03c0883SXin LI expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1108*0a7e5f1fSJoseph Mingrone as_fn_error $? "invalid package name: \`$ac_useropt'" 1109d03c0883SXin LI ac_useropt_orig=$ac_useropt 1110*0a7e5f1fSJoseph Mingrone ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` 1111d03c0883SXin LI case $ac_user_opts in 1112d03c0883SXin LI *" 1113d03c0883SXin LI"with_$ac_useropt" 1114d03c0883SXin LI"*) ;; 1115d03c0883SXin LI *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" 1116d03c0883SXin LI ac_unrecognized_sep=', ';; 1117d03c0883SXin LI esac 1118d03c0883SXin LI eval with_$ac_useropt=\$ac_optarg ;; 11194edb46e9SPaul Traina 11204edb46e9SPaul Traina -without-* | --without-*) 1121d03c0883SXin LI ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` 11224edb46e9SPaul Traina # Reject names that are not valid shell variable names. 1123d03c0883SXin LI expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1124*0a7e5f1fSJoseph Mingrone as_fn_error $? "invalid package name: \`$ac_useropt'" 1125d03c0883SXin LI ac_useropt_orig=$ac_useropt 1126*0a7e5f1fSJoseph Mingrone ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` 1127d03c0883SXin LI case $ac_user_opts in 1128d03c0883SXin LI *" 1129d03c0883SXin LI"with_$ac_useropt" 1130d03c0883SXin LI"*) ;; 1131d03c0883SXin LI *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" 1132d03c0883SXin LI ac_unrecognized_sep=', ';; 1133d03c0883SXin LI esac 1134d03c0883SXin LI eval with_$ac_useropt=no ;; 11354edb46e9SPaul Traina 11364edb46e9SPaul Traina --x) 11374edb46e9SPaul Traina # Obsolete; use --with-x. 11384edb46e9SPaul Traina with_x=yes ;; 11394edb46e9SPaul Traina 11404edb46e9SPaul Traina -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 11414edb46e9SPaul Traina | --x-incl | --x-inc | --x-in | --x-i) 11424edb46e9SPaul Traina ac_prev=x_includes ;; 11434edb46e9SPaul Traina -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 11444edb46e9SPaul Traina | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 11455b0fe478SBruce M Simpson x_includes=$ac_optarg ;; 11464edb46e9SPaul Traina 11474edb46e9SPaul Traina -x-libraries | --x-libraries | --x-librarie | --x-librari \ 11484edb46e9SPaul Traina | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 11494edb46e9SPaul Traina ac_prev=x_libraries ;; 11504edb46e9SPaul Traina -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 11514edb46e9SPaul Traina | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 11525b0fe478SBruce M Simpson x_libraries=$ac_optarg ;; 11534edb46e9SPaul Traina 1154d03c0883SXin LI -*) as_fn_error $? "unrecognized option: \`$ac_option' 1155d03c0883SXin LITry \`$0 --help' for more information" 11564edb46e9SPaul Traina ;; 11574edb46e9SPaul Traina 11585b0fe478SBruce M Simpson *=*) 11595b0fe478SBruce M Simpson ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` 11605b0fe478SBruce M Simpson # Reject names that are not valid shell variable names. 1161d03c0883SXin LI case $ac_envvar in #( 1162d03c0883SXin LI '' | [0-9]* | *[!_$as_cr_alnum]* ) 1163d03c0883SXin LI as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; 1164d03c0883SXin LI esac 1165b5bfcb5dSMax Laier eval $ac_envvar=\$ac_optarg 11665b0fe478SBruce M Simpson export $ac_envvar ;; 11675b0fe478SBruce M Simpson 11684edb46e9SPaul Traina *) 11695b0fe478SBruce M Simpson # FIXME: should be removed in autoconf 3.0. 1170*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 11715b0fe478SBruce M Simpson expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 1172*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 1173d03c0883SXin LI : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" 11744edb46e9SPaul Traina ;; 11754edb46e9SPaul Traina 11764edb46e9SPaul Traina esac 11774edb46e9SPaul Trainadone 11784edb46e9SPaul Traina 11794edb46e9SPaul Trainaif test -n "$ac_prev"; then 11805b0fe478SBruce M Simpson ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1181d03c0883SXin LI as_fn_error $? "missing argument to $ac_option" 11824edb46e9SPaul Trainafi 11834edb46e9SPaul Traina 1184d03c0883SXin LIif test -n "$ac_unrecognized_opts"; then 1185d03c0883SXin LI case $enable_option_checking in 1186d03c0883SXin LI no) ;; 1187d03c0883SXin LI fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; 1188*0a7e5f1fSJoseph Mingrone *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; 1189d03c0883SXin LI esac 1190d03c0883SXin LIfi 1191d03c0883SXin LI 1192d03c0883SXin LI# Check all directory arguments for consistency. 1193b5bfcb5dSMax Laierfor ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 1194b5bfcb5dSMax Laier datadir sysconfdir sharedstatedir localstatedir includedir \ 1195b5bfcb5dSMax Laier oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1196*0a7e5f1fSJoseph Mingrone libdir localedir mandir runstatedir 11974edb46e9SPaul Trainado 1198b5bfcb5dSMax Laier eval ac_val=\$$ac_var 1199d03c0883SXin LI # Remove trailing slashes. 1200d03c0883SXin LI case $ac_val in 1201d03c0883SXin LI */ ) 1202d03c0883SXin LI ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` 1203d03c0883SXin LI eval $ac_var=\$ac_val;; 1204d03c0883SXin LI esac 1205d03c0883SXin LI # Be sure to have absolute directory names. 12065b0fe478SBruce M Simpson case $ac_val in 1207b5bfcb5dSMax Laier [\\/$]* | ?:[\\/]* ) continue;; 1208b5bfcb5dSMax Laier NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 12094edb46e9SPaul Traina esac 1210d03c0883SXin LI as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 12115b0fe478SBruce M Simpsondone 12124edb46e9SPaul Traina 12135b0fe478SBruce M Simpson# There might be people who depend on the old broken behavior: `$host' 12145b0fe478SBruce M Simpson# used to hold the argument of --host etc. 12155b0fe478SBruce M Simpson# FIXME: To remove some day. 12165b0fe478SBruce M Simpsonbuild=$build_alias 12175b0fe478SBruce M Simpsonhost=$host_alias 12185b0fe478SBruce M Simpsontarget=$target_alias 12194edb46e9SPaul Traina 12205b0fe478SBruce M Simpson# FIXME: To remove some day. 12215b0fe478SBruce M Simpsonif test "x$host_alias" != x; then 12225b0fe478SBruce M Simpson if test "x$build_alias" = x; then 12235b0fe478SBruce M Simpson cross_compiling=maybe 12245b0fe478SBruce M Simpson elif test "x$build_alias" != "x$host_alias"; then 12255b0fe478SBruce M Simpson cross_compiling=yes 12265b0fe478SBruce M Simpson fi 12275b0fe478SBruce M Simpsonfi 12285b0fe478SBruce M Simpson 12295b0fe478SBruce M Simpsonac_tool_prefix= 12305b0fe478SBruce M Simpsontest -n "$host_alias" && ac_tool_prefix=$host_alias- 12315b0fe478SBruce M Simpson 12325b0fe478SBruce M Simpsontest "$silent" = yes && exec 6>/dev/null 12335b0fe478SBruce M Simpson 12344edb46e9SPaul Traina 1235b5bfcb5dSMax Laierac_pwd=`pwd` && test -n "$ac_pwd" && 1236b5bfcb5dSMax Laierac_ls_di=`ls -di .` && 1237b5bfcb5dSMax Laierac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1238d03c0883SXin LI as_fn_error $? "working directory cannot be determined" 1239b5bfcb5dSMax Laiertest "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1240d03c0883SXin LI as_fn_error $? "pwd does not report name of working directory" 1241b5bfcb5dSMax Laier 1242b5bfcb5dSMax Laier 12434edb46e9SPaul Traina# Find the source files, if location was not specified. 12444edb46e9SPaul Trainaif test -z "$srcdir"; then 12454edb46e9SPaul Traina ac_srcdir_defaulted=yes 1246b5bfcb5dSMax Laier # Try the directory containing this script, then the parent directory. 1247d03c0883SXin LI ac_confdir=`$as_dirname -- "$as_myself" || 1248d03c0883SXin LI$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 1249d03c0883SXin LI X"$as_myself" : 'X\(//\)[^/]' \| \ 1250d03c0883SXin LI X"$as_myself" : 'X\(//\)$' \| \ 1251d03c0883SXin LI X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || 1252*0a7e5f1fSJoseph Mingroneprintf "%s\n" X"$as_myself" | 1253b5bfcb5dSMax Laier sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 1254b5bfcb5dSMax Laier s//\1/ 1255b5bfcb5dSMax Laier q 1256b5bfcb5dSMax Laier } 1257b5bfcb5dSMax Laier /^X\(\/\/\)[^/].*/{ 1258b5bfcb5dSMax Laier s//\1/ 1259b5bfcb5dSMax Laier q 1260b5bfcb5dSMax Laier } 1261b5bfcb5dSMax Laier /^X\(\/\/\)$/{ 1262b5bfcb5dSMax Laier s//\1/ 1263b5bfcb5dSMax Laier q 1264b5bfcb5dSMax Laier } 1265b5bfcb5dSMax Laier /^X\(\/\).*/{ 1266b5bfcb5dSMax Laier s//\1/ 1267b5bfcb5dSMax Laier q 1268b5bfcb5dSMax Laier } 12695b0fe478SBruce M Simpson s/.*/./; q'` 12704edb46e9SPaul Traina srcdir=$ac_confdir 1271b5bfcb5dSMax Laier if test ! -r "$srcdir/$ac_unique_file"; then 12724edb46e9SPaul Traina srcdir=.. 12734edb46e9SPaul Traina fi 12744edb46e9SPaul Trainaelse 12754edb46e9SPaul Traina ac_srcdir_defaulted=no 12764edb46e9SPaul Trainafi 1277b5bfcb5dSMax Laierif test ! -r "$srcdir/$ac_unique_file"; then 1278b5bfcb5dSMax Laier test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1279d03c0883SXin LI as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" 12804edb46e9SPaul Trainafi 1281b5bfcb5dSMax Laierac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1282b5bfcb5dSMax Laierac_abs_confdir=`( 1283d03c0883SXin LI cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 1284b5bfcb5dSMax Laier pwd)` 1285b5bfcb5dSMax Laier# When building in place, set srcdir=. 1286b5bfcb5dSMax Laierif test "$ac_abs_confdir" = "$ac_pwd"; then 1287b5bfcb5dSMax Laier srcdir=. 1288b5bfcb5dSMax Laierfi 1289b5bfcb5dSMax Laier# Remove unnecessary trailing slashes from srcdir. 1290b5bfcb5dSMax Laier# Double slashes in file names in object file debugging info 1291b5bfcb5dSMax Laier# mess up M-x gdb in Emacs. 1292b5bfcb5dSMax Laiercase $srcdir in 1293b5bfcb5dSMax Laier*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; 1294b5bfcb5dSMax Laieresac 1295b5bfcb5dSMax Laierfor ac_var in $ac_precious_vars; do 1296b5bfcb5dSMax Laier eval ac_env_${ac_var}_set=\${${ac_var}+set} 1297b5bfcb5dSMax Laier eval ac_env_${ac_var}_value=\$${ac_var} 1298b5bfcb5dSMax Laier eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} 1299b5bfcb5dSMax Laier eval ac_cv_env_${ac_var}_value=\$${ac_var} 1300b5bfcb5dSMax Laierdone 13014edb46e9SPaul Traina 13025b0fe478SBruce M Simpson# 13035b0fe478SBruce M Simpson# Report the --help message. 13045b0fe478SBruce M Simpson# 13055b0fe478SBruce M Simpsonif test "$ac_init_help" = "long"; then 13065b0fe478SBruce M Simpson # Omit some internal or obsolete options to make the list less imposing. 13075b0fe478SBruce M Simpson # This message is too long to be a string in the A/UX 3.1 sh. 13085b0fe478SBruce M Simpson cat <<_ACEOF 1309*0a7e5f1fSJoseph Mingrone\`configure' configures tcpdump 4.99.5 to adapt to many kinds of systems. 13105b0fe478SBruce M Simpson 13115b0fe478SBruce M SimpsonUsage: $0 [OPTION]... [VAR=VALUE]... 13125b0fe478SBruce M Simpson 13135b0fe478SBruce M SimpsonTo assign environment variables (e.g., CC, CFLAGS...), specify them as 13145b0fe478SBruce M SimpsonVAR=VALUE. See below for descriptions of some of the useful variables. 13155b0fe478SBruce M Simpson 13165b0fe478SBruce M SimpsonDefaults for the options are specified in brackets. 13175b0fe478SBruce M Simpson 13185b0fe478SBruce M SimpsonConfiguration: 13195b0fe478SBruce M Simpson -h, --help display this help and exit 13205b0fe478SBruce M Simpson --help=short display options specific to this package 13215b0fe478SBruce M Simpson --help=recursive display the short help of all the included packages 13225b0fe478SBruce M Simpson -V, --version display version information and exit 13235b0fe478SBruce M Simpson -q, --quiet, --silent do not print \`checking ...' messages 13245b0fe478SBruce M Simpson --cache-file=FILE cache test results in FILE [disabled] 13255b0fe478SBruce M Simpson -C, --config-cache alias for \`--cache-file=config.cache' 13265b0fe478SBruce M Simpson -n, --no-create do not create output files 13275b0fe478SBruce M Simpson --srcdir=DIR find the sources in DIR [configure dir or \`..'] 13285b0fe478SBruce M Simpson 13295b0fe478SBruce M SimpsonInstallation directories: 13305b0fe478SBruce M Simpson --prefix=PREFIX install architecture-independent files in PREFIX 13315b0fe478SBruce M Simpson [$ac_default_prefix] 13325b0fe478SBruce M Simpson --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 13335b0fe478SBruce M Simpson [PREFIX] 13345b0fe478SBruce M Simpson 13355b0fe478SBruce M SimpsonBy default, \`make install' will install all the files in 13365b0fe478SBruce M Simpson\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify 13375b0fe478SBruce M Simpsonan installation prefix other than \`$ac_default_prefix' using \`--prefix', 13385b0fe478SBruce M Simpsonfor instance \`--prefix=\$HOME'. 13395b0fe478SBruce M Simpson 13405b0fe478SBruce M SimpsonFor better control, use the options below. 13415b0fe478SBruce M Simpson 13425b0fe478SBruce M SimpsonFine tuning of the installation directories: 13435b0fe478SBruce M Simpson --bindir=DIR user executables [EPREFIX/bin] 13445b0fe478SBruce M Simpson --sbindir=DIR system admin executables [EPREFIX/sbin] 13455b0fe478SBruce M Simpson --libexecdir=DIR program executables [EPREFIX/libexec] 13465b0fe478SBruce M Simpson --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 13475b0fe478SBruce M Simpson --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 13485b0fe478SBruce M Simpson --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1349*0a7e5f1fSJoseph Mingrone --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] 13505b0fe478SBruce M Simpson --libdir=DIR object code libraries [EPREFIX/lib] 13515b0fe478SBruce M Simpson --includedir=DIR C header files [PREFIX/include] 13525b0fe478SBruce M Simpson --oldincludedir=DIR C header files for non-gcc [/usr/include] 1353b5bfcb5dSMax Laier --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 1354b5bfcb5dSMax Laier --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 1355b5bfcb5dSMax Laier --infodir=DIR info documentation [DATAROOTDIR/info] 1356b5bfcb5dSMax Laier --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 1357b5bfcb5dSMax Laier --mandir=DIR man documentation [DATAROOTDIR/man] 1358ee67461eSJoseph Mingrone --docdir=DIR documentation root [DATAROOTDIR/doc/tcpdump] 1359b5bfcb5dSMax Laier --htmldir=DIR html documentation [DOCDIR] 1360b5bfcb5dSMax Laier --dvidir=DIR dvi documentation [DOCDIR] 1361b5bfcb5dSMax Laier --pdfdir=DIR pdf documentation [DOCDIR] 1362b5bfcb5dSMax Laier --psdir=DIR ps documentation [DOCDIR] 13635b0fe478SBruce M Simpson_ACEOF 13645b0fe478SBruce M Simpson 13655b0fe478SBruce M Simpson cat <<\_ACEOF 13665b0fe478SBruce M Simpson 13675b0fe478SBruce M SimpsonSystem types: 13685b0fe478SBruce M Simpson --build=BUILD configure for building on BUILD [guessed] 13695b0fe478SBruce M Simpson --host=HOST cross-compile to build programs to run on HOST [BUILD] 13705b0fe478SBruce M Simpson_ACEOF 13715b0fe478SBruce M Simpsonfi 13725b0fe478SBruce M Simpson 13735b0fe478SBruce M Simpsonif test -n "$ac_init_help"; then 1374ee67461eSJoseph Mingrone case $ac_init_help in 1375*0a7e5f1fSJoseph Mingrone short | recursive ) echo "Configuration of tcpdump 4.99.5:";; 1376ee67461eSJoseph Mingrone esac 13775b0fe478SBruce M Simpson cat <<\_ACEOF 13785b0fe478SBruce M Simpson 13795b0fe478SBruce M SimpsonOptional Features: 1380d03c0883SXin LI --disable-option-checking ignore unrecognized --enable/--with options 13815b0fe478SBruce M Simpson --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 13825b0fe478SBruce M Simpson --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 1383ee67461eSJoseph Mingrone --disable-universal don't build universal on macOS 1384*0a7e5f1fSJoseph Mingrone --enable-instrument-functions 1385*0a7e5f1fSJoseph Mingrone enable instrument functions code [default=no] 1386ee67461eSJoseph Mingrone --enable-smb enable possibly-buggy SMB printer [default=no] 1387ee67461eSJoseph Mingrone --disable-local-libpcap don't look for a local libpcap [default=check for a 1388ee67461eSJoseph Mingrone local libpcap] 13895b0fe478SBruce M Simpson 13905b0fe478SBruce M SimpsonOptional Packages: 13915b0fe478SBruce M Simpson --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 13925b0fe478SBruce M Simpson --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 13935b0fe478SBruce M Simpson --without-gcc don't use gcc 1394ee67461eSJoseph Mingrone --with-smi link with libsmi (allows to load MIBs on the fly to 1395ee67461eSJoseph Mingrone decode SNMP packets) [default=yes, if available] 13961de50e9fSSam Leffler --with-user=USERNAME drop privileges by default to USERNAME 13971de50e9fSSam Leffler --with-chroot=DIRECTORY when dropping privileges, chroot to DIRECTORY 13988bdc5a62SPatrick Kelsey --with-sandbox-capsicum use Capsicum security functions [default=yes, if 13998bdc5a62SPatrick Kelsey available] 14003340d773SGleb Smirnoff --with-crypto[=DIR] use OpenSSL/libressl libcrypto (located in directory 14013340d773SGleb Smirnoff DIR, if specified) [default=yes, if available] 14028bdc5a62SPatrick Kelsey --with-cap-ng use libcap-ng [default=yes, if available] 14035b0fe478SBruce M Simpson 14045b0fe478SBruce M SimpsonSome influential environment variables: 14055b0fe478SBruce M Simpson CC C compiler command 14065b0fe478SBruce M Simpson CFLAGS C compiler flags 14075b0fe478SBruce M Simpson LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a 14085b0fe478SBruce M Simpson nonstandard directory <lib dir> 1409b5bfcb5dSMax Laier LIBS libraries to pass to the linker, e.g. -l<library> 1410d03c0883SXin LI CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if 1411b5bfcb5dSMax Laier you have headers in a nonstandard directory <include dir> 1412*0a7e5f1fSJoseph Mingrone PKG_CONFIG path to pkg-config utility 1413*0a7e5f1fSJoseph Mingrone PKG_CONFIG_PATH 1414*0a7e5f1fSJoseph Mingrone directories to add to pkg-config's search path 1415*0a7e5f1fSJoseph Mingrone PKG_CONFIG_LIBDIR 1416*0a7e5f1fSJoseph Mingrone path overriding pkg-config's built-in search path 14175b0fe478SBruce M Simpson CPP C preprocessor 1418*0a7e5f1fSJoseph Mingrone LIBCRYPTO_CFLAGS 1419*0a7e5f1fSJoseph Mingrone C compiler flags for libcrypto, overriding pkg-config 1420*0a7e5f1fSJoseph Mingrone LIBCRYPTO_LIBS 1421*0a7e5f1fSJoseph Mingrone linker flags for libcrypto, overriding pkg-config 1422*0a7e5f1fSJoseph Mingrone LIBCRYPTO_LIBS_STATIC 1423*0a7e5f1fSJoseph Mingrone static-link linker flags for libcrypto, overriding pkg-config 14245b0fe478SBruce M Simpson 14255b0fe478SBruce M SimpsonUse these variables to override the choices made by `configure' or to help 14265b0fe478SBruce M Simpsonit to find libraries and programs with nonstandard names/locations. 14275b0fe478SBruce M Simpson 1428d03c0883SXin LIReport bugs to the package provider. 14295b0fe478SBruce M Simpson_ACEOF 1430b5bfcb5dSMax Laierac_status=$? 14315b0fe478SBruce M Simpsonfi 14325b0fe478SBruce M Simpson 14335b0fe478SBruce M Simpsonif test "$ac_init_help" = "recursive"; then 14345b0fe478SBruce M Simpson # If there are subdirs, report their specific --help. 14355b0fe478SBruce M Simpson for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 1436d03c0883SXin LI test -d "$ac_dir" || 1437d03c0883SXin LI { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || 1438d03c0883SXin LI continue 14395b0fe478SBruce M Simpson ac_builddir=. 14405b0fe478SBruce M Simpson 1441b5bfcb5dSMax Laiercase "$ac_dir" in 1442b5bfcb5dSMax Laier.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 1443b5bfcb5dSMax Laier*) 1444*0a7e5f1fSJoseph Mingrone ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` 1445b5bfcb5dSMax Laier # A ".." for each directory in $ac_dir_suffix. 1446*0a7e5f1fSJoseph Mingrone ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 1447b5bfcb5dSMax Laier case $ac_top_builddir_sub in 1448b5bfcb5dSMax Laier "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 1449b5bfcb5dSMax Laier *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 1450b5bfcb5dSMax Laier esac ;; 1451b5bfcb5dSMax Laieresac 1452b5bfcb5dSMax Laierac_abs_top_builddir=$ac_pwd 1453b5bfcb5dSMax Laierac_abs_builddir=$ac_pwd$ac_dir_suffix 1454b5bfcb5dSMax Laier# for backward compatibility: 1455b5bfcb5dSMax Laierac_top_builddir=$ac_top_build_prefix 14565b0fe478SBruce M Simpson 14575b0fe478SBruce M Simpsoncase $srcdir in 1458b5bfcb5dSMax Laier .) # We are building in place. 14595b0fe478SBruce M Simpson ac_srcdir=. 1460b5bfcb5dSMax Laier ac_top_srcdir=$ac_top_builddir_sub 1461b5bfcb5dSMax Laier ac_abs_top_srcdir=$ac_pwd ;; 1462b5bfcb5dSMax Laier [\\/]* | ?:[\\/]* ) # Absolute name. 14635b0fe478SBruce M Simpson ac_srcdir=$srcdir$ac_dir_suffix; 1464b5bfcb5dSMax Laier ac_top_srcdir=$srcdir 1465b5bfcb5dSMax Laier ac_abs_top_srcdir=$srcdir ;; 1466b5bfcb5dSMax Laier *) # Relative name. 1467b5bfcb5dSMax Laier ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 1468b5bfcb5dSMax Laier ac_top_srcdir=$ac_top_build_prefix$srcdir 1469b5bfcb5dSMax Laier ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 14705b0fe478SBruce M Simpsonesac 1471b5bfcb5dSMax Laierac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 14725b0fe478SBruce M Simpson 1473b5bfcb5dSMax Laier cd "$ac_dir" || { ac_status=$?; continue; } 1474*0a7e5f1fSJoseph Mingrone # Check for configure.gnu first; this name is used for a wrapper for 1475*0a7e5f1fSJoseph Mingrone # Metaconfig's "Configure" on case-insensitive file systems. 1476b5bfcb5dSMax Laier if test -f "$ac_srcdir/configure.gnu"; then 1477b5bfcb5dSMax Laier echo && 1478b5bfcb5dSMax Laier $SHELL "$ac_srcdir/configure.gnu" --help=recursive 1479b5bfcb5dSMax Laier elif test -f "$ac_srcdir/configure"; then 1480b5bfcb5dSMax Laier echo && 1481b5bfcb5dSMax Laier $SHELL "$ac_srcdir/configure" --help=recursive 14825b0fe478SBruce M Simpson else 1483*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 1484b5bfcb5dSMax Laier fi || ac_status=$? 1485b5bfcb5dSMax Laier cd "$ac_pwd" || { ac_status=$?; break; } 14865b0fe478SBruce M Simpson done 14875b0fe478SBruce M Simpsonfi 14885b0fe478SBruce M Simpson 1489b5bfcb5dSMax Laiertest -n "$ac_init_help" && exit $ac_status 14905b0fe478SBruce M Simpsonif $ac_init_version; then 14915b0fe478SBruce M Simpson cat <<\_ACEOF 1492*0a7e5f1fSJoseph Mingronetcpdump configure 4.99.5 1493*0a7e5f1fSJoseph Mingronegenerated by GNU Autoconf 2.71 14945b0fe478SBruce M Simpson 1495*0a7e5f1fSJoseph MingroneCopyright (C) 2021 Free Software Foundation, Inc. 14965b0fe478SBruce M SimpsonThis configure script is free software; the Free Software Foundation 14975b0fe478SBruce M Simpsongives unlimited permission to copy, distribute and modify it. 14985b0fe478SBruce M Simpson_ACEOF 1499b5bfcb5dSMax Laier exit 15005b0fe478SBruce M Simpsonfi 1501d03c0883SXin LI 1502d03c0883SXin LI## ------------------------ ## 1503d03c0883SXin LI## Autoconf initialization. ## 1504d03c0883SXin LI## ------------------------ ## 1505d03c0883SXin LI 1506d03c0883SXin LI# ac_fn_c_try_compile LINENO 1507d03c0883SXin LI# -------------------------- 1508d03c0883SXin LI# Try to compile conftest.$ac_ext, and return whether this succeeded. 1509d03c0883SXin LIac_fn_c_try_compile () 1510d03c0883SXin LI{ 1511d03c0883SXin LI as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1512*0a7e5f1fSJoseph Mingrone rm -f conftest.$ac_objext conftest.beam 1513d03c0883SXin LI if { { ac_try="$ac_compile" 1514d03c0883SXin LIcase "(($ac_try" in 1515d03c0883SXin LI *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1516d03c0883SXin LI *) ac_try_echo=$ac_try;; 1517d03c0883SXin LIesac 1518d03c0883SXin LIeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1519*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_try_echo"; } >&5 1520d03c0883SXin LI (eval "$ac_compile") 2>conftest.err 1521d03c0883SXin LI ac_status=$? 1522d03c0883SXin LI if test -s conftest.err; then 1523d03c0883SXin LI grep -v '^ *+' conftest.err >conftest.er1 1524d03c0883SXin LI cat conftest.er1 >&5 1525d03c0883SXin LI mv -f conftest.er1 conftest.err 1526d03c0883SXin LI fi 1527*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1528d03c0883SXin LI test $ac_status = 0; } && { 1529d03c0883SXin LI test -z "$ac_c_werror_flag" || 1530d03c0883SXin LI test ! -s conftest.err 1531*0a7e5f1fSJoseph Mingrone } && test -s conftest.$ac_objext 1532*0a7e5f1fSJoseph Mingronethen : 1533d03c0883SXin LI ac_retval=0 1534*0a7e5f1fSJoseph Mingroneelse $as_nop 1535*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me: failed program was:" >&5 1536d03c0883SXin LIsed 's/^/| /' conftest.$ac_ext >&5 1537d03c0883SXin LI 1538d03c0883SXin LI ac_retval=1 1539d03c0883SXin LIfi 1540d03c0883SXin LI eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1541d03c0883SXin LI as_fn_set_status $ac_retval 1542d03c0883SXin LI 1543d03c0883SXin LI} # ac_fn_c_try_compile 1544d03c0883SXin LI 1545*0a7e5f1fSJoseph Mingrone# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES 1546d03c0883SXin LI# ------------------------------------------------------- 1547*0a7e5f1fSJoseph Mingrone# Tests whether HEADER exists and can be compiled using the include files in 1548*0a7e5f1fSJoseph Mingrone# INCLUDES, setting the cache variable VAR accordingly. 1549*0a7e5f1fSJoseph Mingroneac_fn_c_check_header_compile () 1550d03c0883SXin LI{ 1551d03c0883SXin LI as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1552*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 1553*0a7e5f1fSJoseph Mingroneprintf %s "checking for $2... " >&6; } 1554*0a7e5f1fSJoseph Mingroneif eval test \${$3+y} 1555*0a7e5f1fSJoseph Mingronethen : 1556*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 1557*0a7e5f1fSJoseph Mingroneelse $as_nop 1558d03c0883SXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1559d03c0883SXin LI/* end confdefs.h. */ 1560d03c0883SXin LI$4 1561d03c0883SXin LI#include <$2> 1562d03c0883SXin LI_ACEOF 1563*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 1564*0a7e5f1fSJoseph Mingronethen : 1565*0a7e5f1fSJoseph Mingrone eval "$3=yes" 1566*0a7e5f1fSJoseph Mingroneelse $as_nop 1567*0a7e5f1fSJoseph Mingrone eval "$3=no" 1568d03c0883SXin LIfi 1569*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1570d03c0883SXin LIfi 1571d03c0883SXin LIeval ac_res=\$$3 1572*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 1573*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_res" >&6; } 1574d03c0883SXin LI eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1575d03c0883SXin LI 1576*0a7e5f1fSJoseph Mingrone} # ac_fn_c_check_header_compile 1577d03c0883SXin LI 1578d03c0883SXin LI# ac_fn_c_try_run LINENO 1579d03c0883SXin LI# ---------------------- 1580*0a7e5f1fSJoseph Mingrone# Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that 1581*0a7e5f1fSJoseph Mingrone# executables *can* be run. 1582d03c0883SXin LIac_fn_c_try_run () 1583d03c0883SXin LI{ 1584d03c0883SXin LI as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1585d03c0883SXin LI if { { ac_try="$ac_link" 1586d03c0883SXin LIcase "(($ac_try" in 1587d03c0883SXin LI *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1588d03c0883SXin LI *) ac_try_echo=$ac_try;; 1589d03c0883SXin LIesac 1590d03c0883SXin LIeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1591*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_try_echo"; } >&5 1592d03c0883SXin LI (eval "$ac_link") 2>&5 1593d03c0883SXin LI ac_status=$? 1594*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1595d03c0883SXin LI test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' 1596d03c0883SXin LI { { case "(($ac_try" in 1597d03c0883SXin LI *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1598d03c0883SXin LI *) ac_try_echo=$ac_try;; 1599d03c0883SXin LIesac 1600d03c0883SXin LIeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1601*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_try_echo"; } >&5 1602d03c0883SXin LI (eval "$ac_try") 2>&5 1603d03c0883SXin LI ac_status=$? 1604*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1605*0a7e5f1fSJoseph Mingrone test $ac_status = 0; }; } 1606*0a7e5f1fSJoseph Mingronethen : 1607d03c0883SXin LI ac_retval=0 1608*0a7e5f1fSJoseph Mingroneelse $as_nop 1609*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me: program exited with status $ac_status" >&5 1610*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me: failed program was:" >&5 1611d03c0883SXin LIsed 's/^/| /' conftest.$ac_ext >&5 1612d03c0883SXin LI 1613d03c0883SXin LI ac_retval=$ac_status 1614d03c0883SXin LIfi 1615d03c0883SXin LI rm -rf conftest.dSYM conftest_ipa8_conftest.oo 1616d03c0883SXin LI eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1617d03c0883SXin LI as_fn_set_status $ac_retval 1618d03c0883SXin LI 1619d03c0883SXin LI} # ac_fn_c_try_run 1620d03c0883SXin LI 1621ee67461eSJoseph Mingrone# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES 1622ee67461eSJoseph Mingrone# -------------------------------------------- 1623ee67461eSJoseph Mingrone# Tries to find the compile-time value of EXPR in a program that includes 1624ee67461eSJoseph Mingrone# INCLUDES, setting VAR accordingly. Returns whether the value could be 1625ee67461eSJoseph Mingrone# computed 1626ee67461eSJoseph Mingroneac_fn_c_compute_int () 1627ee67461eSJoseph Mingrone{ 1628ee67461eSJoseph Mingrone as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1629ee67461eSJoseph Mingrone if test "$cross_compiling" = yes; then 1630ee67461eSJoseph Mingrone # Depending upon the size, compute the lo and hi bounds. 1631ee67461eSJoseph Mingronecat confdefs.h - <<_ACEOF >conftest.$ac_ext 1632ee67461eSJoseph Mingrone/* end confdefs.h. */ 1633ee67461eSJoseph Mingrone$4 1634ee67461eSJoseph Mingroneint 1635*0a7e5f1fSJoseph Mingronemain (void) 1636ee67461eSJoseph Mingrone{ 1637ee67461eSJoseph Mingronestatic int test_array [1 - 2 * !(($2) >= 0)]; 1638ee67461eSJoseph Mingronetest_array [0] = 0; 1639ee67461eSJoseph Mingronereturn test_array [0]; 1640ee67461eSJoseph Mingrone 1641ee67461eSJoseph Mingrone ; 1642ee67461eSJoseph Mingrone return 0; 1643ee67461eSJoseph Mingrone} 1644ee67461eSJoseph Mingrone_ACEOF 1645*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 1646*0a7e5f1fSJoseph Mingronethen : 1647ee67461eSJoseph Mingrone ac_lo=0 ac_mid=0 1648ee67461eSJoseph Mingrone while :; do 1649ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1650ee67461eSJoseph Mingrone/* end confdefs.h. */ 1651ee67461eSJoseph Mingrone$4 1652ee67461eSJoseph Mingroneint 1653*0a7e5f1fSJoseph Mingronemain (void) 1654ee67461eSJoseph Mingrone{ 1655ee67461eSJoseph Mingronestatic int test_array [1 - 2 * !(($2) <= $ac_mid)]; 1656ee67461eSJoseph Mingronetest_array [0] = 0; 1657ee67461eSJoseph Mingronereturn test_array [0]; 1658ee67461eSJoseph Mingrone 1659ee67461eSJoseph Mingrone ; 1660ee67461eSJoseph Mingrone return 0; 1661ee67461eSJoseph Mingrone} 1662ee67461eSJoseph Mingrone_ACEOF 1663*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 1664*0a7e5f1fSJoseph Mingronethen : 1665ee67461eSJoseph Mingrone ac_hi=$ac_mid; break 1666*0a7e5f1fSJoseph Mingroneelse $as_nop 1667ee67461eSJoseph Mingrone as_fn_arith $ac_mid + 1 && ac_lo=$as_val 1668ee67461eSJoseph Mingrone if test $ac_lo -le $ac_mid; then 1669ee67461eSJoseph Mingrone ac_lo= ac_hi= 1670ee67461eSJoseph Mingrone break 1671ee67461eSJoseph Mingrone fi 1672ee67461eSJoseph Mingrone as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val 1673ee67461eSJoseph Mingronefi 1674*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1675ee67461eSJoseph Mingrone done 1676*0a7e5f1fSJoseph Mingroneelse $as_nop 1677ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1678ee67461eSJoseph Mingrone/* end confdefs.h. */ 1679ee67461eSJoseph Mingrone$4 1680ee67461eSJoseph Mingroneint 1681*0a7e5f1fSJoseph Mingronemain (void) 1682ee67461eSJoseph Mingrone{ 1683ee67461eSJoseph Mingronestatic int test_array [1 - 2 * !(($2) < 0)]; 1684ee67461eSJoseph Mingronetest_array [0] = 0; 1685ee67461eSJoseph Mingronereturn test_array [0]; 1686ee67461eSJoseph Mingrone 1687ee67461eSJoseph Mingrone ; 1688ee67461eSJoseph Mingrone return 0; 1689ee67461eSJoseph Mingrone} 1690ee67461eSJoseph Mingrone_ACEOF 1691*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 1692*0a7e5f1fSJoseph Mingronethen : 1693ee67461eSJoseph Mingrone ac_hi=-1 ac_mid=-1 1694ee67461eSJoseph Mingrone while :; do 1695ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1696ee67461eSJoseph Mingrone/* end confdefs.h. */ 1697ee67461eSJoseph Mingrone$4 1698ee67461eSJoseph Mingroneint 1699*0a7e5f1fSJoseph Mingronemain (void) 1700ee67461eSJoseph Mingrone{ 1701ee67461eSJoseph Mingronestatic int test_array [1 - 2 * !(($2) >= $ac_mid)]; 1702ee67461eSJoseph Mingronetest_array [0] = 0; 1703ee67461eSJoseph Mingronereturn test_array [0]; 1704ee67461eSJoseph Mingrone 1705ee67461eSJoseph Mingrone ; 1706ee67461eSJoseph Mingrone return 0; 1707ee67461eSJoseph Mingrone} 1708ee67461eSJoseph Mingrone_ACEOF 1709*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 1710*0a7e5f1fSJoseph Mingronethen : 1711ee67461eSJoseph Mingrone ac_lo=$ac_mid; break 1712*0a7e5f1fSJoseph Mingroneelse $as_nop 1713ee67461eSJoseph Mingrone as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val 1714ee67461eSJoseph Mingrone if test $ac_mid -le $ac_hi; then 1715ee67461eSJoseph Mingrone ac_lo= ac_hi= 1716ee67461eSJoseph Mingrone break 1717ee67461eSJoseph Mingrone fi 1718ee67461eSJoseph Mingrone as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val 1719ee67461eSJoseph Mingronefi 1720*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1721ee67461eSJoseph Mingrone done 1722*0a7e5f1fSJoseph Mingroneelse $as_nop 1723ee67461eSJoseph Mingrone ac_lo= ac_hi= 1724ee67461eSJoseph Mingronefi 1725*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1726ee67461eSJoseph Mingronefi 1727*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1728ee67461eSJoseph Mingrone# Binary search between lo and hi bounds. 1729ee67461eSJoseph Mingronewhile test "x$ac_lo" != "x$ac_hi"; do 1730ee67461eSJoseph Mingrone as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val 1731ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1732ee67461eSJoseph Mingrone/* end confdefs.h. */ 1733ee67461eSJoseph Mingrone$4 1734ee67461eSJoseph Mingroneint 1735*0a7e5f1fSJoseph Mingronemain (void) 1736ee67461eSJoseph Mingrone{ 1737ee67461eSJoseph Mingronestatic int test_array [1 - 2 * !(($2) <= $ac_mid)]; 1738ee67461eSJoseph Mingronetest_array [0] = 0; 1739ee67461eSJoseph Mingronereturn test_array [0]; 1740ee67461eSJoseph Mingrone 1741ee67461eSJoseph Mingrone ; 1742ee67461eSJoseph Mingrone return 0; 1743ee67461eSJoseph Mingrone} 1744ee67461eSJoseph Mingrone_ACEOF 1745*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 1746*0a7e5f1fSJoseph Mingronethen : 1747ee67461eSJoseph Mingrone ac_hi=$ac_mid 1748*0a7e5f1fSJoseph Mingroneelse $as_nop 1749ee67461eSJoseph Mingrone as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val 1750ee67461eSJoseph Mingronefi 1751*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1752ee67461eSJoseph Mingronedone 1753ee67461eSJoseph Mingronecase $ac_lo in #(( 1754ee67461eSJoseph Mingrone?*) eval "$3=\$ac_lo"; ac_retval=0 ;; 1755ee67461eSJoseph Mingrone'') ac_retval=1 ;; 1756ee67461eSJoseph Mingroneesac 1757ee67461eSJoseph Mingrone else 1758ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1759ee67461eSJoseph Mingrone/* end confdefs.h. */ 1760ee67461eSJoseph Mingrone$4 1761*0a7e5f1fSJoseph Mingronestatic long int longval (void) { return $2; } 1762*0a7e5f1fSJoseph Mingronestatic unsigned long int ulongval (void) { return $2; } 1763ee67461eSJoseph Mingrone#include <stdio.h> 1764ee67461eSJoseph Mingrone#include <stdlib.h> 1765ee67461eSJoseph Mingroneint 1766*0a7e5f1fSJoseph Mingronemain (void) 1767ee67461eSJoseph Mingrone{ 1768ee67461eSJoseph Mingrone 1769ee67461eSJoseph Mingrone FILE *f = fopen ("conftest.val", "w"); 1770ee67461eSJoseph Mingrone if (! f) 1771ee67461eSJoseph Mingrone return 1; 1772ee67461eSJoseph Mingrone if (($2) < 0) 1773ee67461eSJoseph Mingrone { 1774ee67461eSJoseph Mingrone long int i = longval (); 1775ee67461eSJoseph Mingrone if (i != ($2)) 1776ee67461eSJoseph Mingrone return 1; 1777ee67461eSJoseph Mingrone fprintf (f, "%ld", i); 1778ee67461eSJoseph Mingrone } 1779ee67461eSJoseph Mingrone else 1780ee67461eSJoseph Mingrone { 1781ee67461eSJoseph Mingrone unsigned long int i = ulongval (); 1782ee67461eSJoseph Mingrone if (i != ($2)) 1783ee67461eSJoseph Mingrone return 1; 1784ee67461eSJoseph Mingrone fprintf (f, "%lu", i); 1785ee67461eSJoseph Mingrone } 1786ee67461eSJoseph Mingrone /* Do not output a trailing newline, as this causes \r\n confusion 1787ee67461eSJoseph Mingrone on some platforms. */ 1788ee67461eSJoseph Mingrone return ferror (f) || fclose (f) != 0; 1789ee67461eSJoseph Mingrone 1790ee67461eSJoseph Mingrone ; 1791ee67461eSJoseph Mingrone return 0; 1792ee67461eSJoseph Mingrone} 1793ee67461eSJoseph Mingrone_ACEOF 1794*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_run "$LINENO" 1795*0a7e5f1fSJoseph Mingronethen : 1796ee67461eSJoseph Mingrone echo >>conftest.val; read $3 <conftest.val; ac_retval=0 1797*0a7e5f1fSJoseph Mingroneelse $as_nop 1798ee67461eSJoseph Mingrone ac_retval=1 1799ee67461eSJoseph Mingronefi 1800ee67461eSJoseph Mingronerm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 1801ee67461eSJoseph Mingrone conftest.$ac_objext conftest.beam conftest.$ac_ext 1802ee67461eSJoseph Mingronerm -f conftest.val 1803ee67461eSJoseph Mingrone 1804ee67461eSJoseph Mingrone fi 1805ee67461eSJoseph Mingrone eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1806ee67461eSJoseph Mingrone as_fn_set_status $ac_retval 1807ee67461eSJoseph Mingrone 1808ee67461eSJoseph Mingrone} # ac_fn_c_compute_int 1809ee67461eSJoseph Mingrone 1810*0a7e5f1fSJoseph Mingrone# ac_fn_c_try_link LINENO 1811*0a7e5f1fSJoseph Mingrone# ----------------------- 1812*0a7e5f1fSJoseph Mingrone# Try to link conftest.$ac_ext, and return whether this succeeded. 1813*0a7e5f1fSJoseph Mingroneac_fn_c_try_link () 1814*0a7e5f1fSJoseph Mingrone{ 1815*0a7e5f1fSJoseph Mingrone as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1816*0a7e5f1fSJoseph Mingrone rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext 1817*0a7e5f1fSJoseph Mingrone if { { ac_try="$ac_link" 1818*0a7e5f1fSJoseph Mingronecase "(($ac_try" in 1819*0a7e5f1fSJoseph Mingrone *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1820*0a7e5f1fSJoseph Mingrone *) ac_try_echo=$ac_try;; 1821*0a7e5f1fSJoseph Mingroneesac 1822*0a7e5f1fSJoseph Mingroneeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1823*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_try_echo"; } >&5 1824*0a7e5f1fSJoseph Mingrone (eval "$ac_link") 2>conftest.err 1825*0a7e5f1fSJoseph Mingrone ac_status=$? 1826*0a7e5f1fSJoseph Mingrone if test -s conftest.err; then 1827*0a7e5f1fSJoseph Mingrone grep -v '^ *+' conftest.err >conftest.er1 1828*0a7e5f1fSJoseph Mingrone cat conftest.er1 >&5 1829*0a7e5f1fSJoseph Mingrone mv -f conftest.er1 conftest.err 1830*0a7e5f1fSJoseph Mingrone fi 1831*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1832*0a7e5f1fSJoseph Mingrone test $ac_status = 0; } && { 1833*0a7e5f1fSJoseph Mingrone test -z "$ac_c_werror_flag" || 1834*0a7e5f1fSJoseph Mingrone test ! -s conftest.err 1835*0a7e5f1fSJoseph Mingrone } && test -s conftest$ac_exeext && { 1836*0a7e5f1fSJoseph Mingrone test "$cross_compiling" = yes || 1837*0a7e5f1fSJoseph Mingrone test -x conftest$ac_exeext 1838*0a7e5f1fSJoseph Mingrone } 1839*0a7e5f1fSJoseph Mingronethen : 1840*0a7e5f1fSJoseph Mingrone ac_retval=0 1841*0a7e5f1fSJoseph Mingroneelse $as_nop 1842*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me: failed program was:" >&5 1843*0a7e5f1fSJoseph Mingronesed 's/^/| /' conftest.$ac_ext >&5 1844*0a7e5f1fSJoseph Mingrone 1845*0a7e5f1fSJoseph Mingrone ac_retval=1 1846*0a7e5f1fSJoseph Mingronefi 1847*0a7e5f1fSJoseph Mingrone # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information 1848*0a7e5f1fSJoseph Mingrone # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would 1849*0a7e5f1fSJoseph Mingrone # interfere with the next link command; also delete a directory that is 1850*0a7e5f1fSJoseph Mingrone # left behind by Apple's compiler. We do this before executing the actions. 1851*0a7e5f1fSJoseph Mingrone rm -rf conftest.dSYM conftest_ipa8_conftest.oo 1852*0a7e5f1fSJoseph Mingrone eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1853*0a7e5f1fSJoseph Mingrone as_fn_set_status $ac_retval 1854*0a7e5f1fSJoseph Mingrone 1855*0a7e5f1fSJoseph Mingrone} # ac_fn_c_try_link 1856*0a7e5f1fSJoseph Mingrone 1857*0a7e5f1fSJoseph Mingrone# ac_fn_c_check_func LINENO FUNC VAR 1858*0a7e5f1fSJoseph Mingrone# ---------------------------------- 1859*0a7e5f1fSJoseph Mingrone# Tests whether FUNC exists, setting the cache variable VAR accordingly 1860*0a7e5f1fSJoseph Mingroneac_fn_c_check_func () 1861*0a7e5f1fSJoseph Mingrone{ 1862*0a7e5f1fSJoseph Mingrone as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1863*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 1864*0a7e5f1fSJoseph Mingroneprintf %s "checking for $2... " >&6; } 1865*0a7e5f1fSJoseph Mingroneif eval test \${$3+y} 1866*0a7e5f1fSJoseph Mingronethen : 1867*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 1868*0a7e5f1fSJoseph Mingroneelse $as_nop 1869*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1870*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 1871*0a7e5f1fSJoseph Mingrone/* Define $2 to an innocuous variant, in case <limits.h> declares $2. 1872*0a7e5f1fSJoseph Mingrone For example, HP-UX 11i <limits.h> declares gettimeofday. */ 1873*0a7e5f1fSJoseph Mingrone#define $2 innocuous_$2 1874*0a7e5f1fSJoseph Mingrone 1875*0a7e5f1fSJoseph Mingrone/* System header to define __stub macros and hopefully few prototypes, 1876*0a7e5f1fSJoseph Mingrone which can conflict with char $2 (); below. */ 1877*0a7e5f1fSJoseph Mingrone 1878*0a7e5f1fSJoseph Mingrone#include <limits.h> 1879*0a7e5f1fSJoseph Mingrone#undef $2 1880*0a7e5f1fSJoseph Mingrone 1881*0a7e5f1fSJoseph Mingrone/* Override any GCC internal prototype to avoid an error. 1882*0a7e5f1fSJoseph Mingrone Use char because int might match the return type of a GCC 1883*0a7e5f1fSJoseph Mingrone builtin and then its argument prototype would still apply. */ 1884*0a7e5f1fSJoseph Mingrone#ifdef __cplusplus 1885*0a7e5f1fSJoseph Mingroneextern "C" 1886*0a7e5f1fSJoseph Mingrone#endif 1887*0a7e5f1fSJoseph Mingronechar $2 (); 1888*0a7e5f1fSJoseph Mingrone/* The GNU C library defines this for functions which it implements 1889*0a7e5f1fSJoseph Mingrone to always fail with ENOSYS. Some functions are actually named 1890*0a7e5f1fSJoseph Mingrone something starting with __ and the normal name is an alias. */ 1891*0a7e5f1fSJoseph Mingrone#if defined __stub_$2 || defined __stub___$2 1892*0a7e5f1fSJoseph Mingronechoke me 1893*0a7e5f1fSJoseph Mingrone#endif 1894*0a7e5f1fSJoseph Mingrone 1895*0a7e5f1fSJoseph Mingroneint 1896*0a7e5f1fSJoseph Mingronemain (void) 1897*0a7e5f1fSJoseph Mingrone{ 1898*0a7e5f1fSJoseph Mingronereturn $2 (); 1899*0a7e5f1fSJoseph Mingrone ; 1900*0a7e5f1fSJoseph Mingrone return 0; 1901*0a7e5f1fSJoseph Mingrone} 1902*0a7e5f1fSJoseph Mingrone_ACEOF 1903*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 1904*0a7e5f1fSJoseph Mingronethen : 1905*0a7e5f1fSJoseph Mingrone eval "$3=yes" 1906*0a7e5f1fSJoseph Mingroneelse $as_nop 1907*0a7e5f1fSJoseph Mingrone eval "$3=no" 1908*0a7e5f1fSJoseph Mingronefi 1909*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 1910*0a7e5f1fSJoseph Mingrone conftest$ac_exeext conftest.$ac_ext 1911*0a7e5f1fSJoseph Mingronefi 1912*0a7e5f1fSJoseph Mingroneeval ac_res=\$$3 1913*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 1914*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_res" >&6; } 1915*0a7e5f1fSJoseph Mingrone eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1916*0a7e5f1fSJoseph Mingrone 1917*0a7e5f1fSJoseph Mingrone} # ac_fn_c_check_func 1918*0a7e5f1fSJoseph Mingrone 1919*0a7e5f1fSJoseph Mingrone# ac_fn_c_try_cpp LINENO 1920*0a7e5f1fSJoseph Mingrone# ---------------------- 1921*0a7e5f1fSJoseph Mingrone# Try to preprocess conftest.$ac_ext, and return whether this succeeded. 1922*0a7e5f1fSJoseph Mingroneac_fn_c_try_cpp () 1923*0a7e5f1fSJoseph Mingrone{ 1924*0a7e5f1fSJoseph Mingrone as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1925*0a7e5f1fSJoseph Mingrone if { { ac_try="$ac_cpp conftest.$ac_ext" 1926*0a7e5f1fSJoseph Mingronecase "(($ac_try" in 1927*0a7e5f1fSJoseph Mingrone *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 1928*0a7e5f1fSJoseph Mingrone *) ac_try_echo=$ac_try;; 1929*0a7e5f1fSJoseph Mingroneesac 1930*0a7e5f1fSJoseph Mingroneeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 1931*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_try_echo"; } >&5 1932*0a7e5f1fSJoseph Mingrone (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err 1933*0a7e5f1fSJoseph Mingrone ac_status=$? 1934*0a7e5f1fSJoseph Mingrone if test -s conftest.err; then 1935*0a7e5f1fSJoseph Mingrone grep -v '^ *+' conftest.err >conftest.er1 1936*0a7e5f1fSJoseph Mingrone cat conftest.er1 >&5 1937*0a7e5f1fSJoseph Mingrone mv -f conftest.er1 conftest.err 1938*0a7e5f1fSJoseph Mingrone fi 1939*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 1940*0a7e5f1fSJoseph Mingrone test $ac_status = 0; } > conftest.i && { 1941*0a7e5f1fSJoseph Mingrone test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 1942*0a7e5f1fSJoseph Mingrone test ! -s conftest.err 1943*0a7e5f1fSJoseph Mingrone } 1944*0a7e5f1fSJoseph Mingronethen : 1945*0a7e5f1fSJoseph Mingrone ac_retval=0 1946*0a7e5f1fSJoseph Mingroneelse $as_nop 1947*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me: failed program was:" >&5 1948*0a7e5f1fSJoseph Mingronesed 's/^/| /' conftest.$ac_ext >&5 1949*0a7e5f1fSJoseph Mingrone 1950*0a7e5f1fSJoseph Mingrone ac_retval=1 1951*0a7e5f1fSJoseph Mingronefi 1952*0a7e5f1fSJoseph Mingrone eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 1953*0a7e5f1fSJoseph Mingrone as_fn_set_status $ac_retval 1954*0a7e5f1fSJoseph Mingrone 1955*0a7e5f1fSJoseph Mingrone} # ac_fn_c_try_cpp 1956*0a7e5f1fSJoseph Mingrone 1957*0a7e5f1fSJoseph Mingrone# ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR 1958*0a7e5f1fSJoseph Mingrone# ------------------------------------------------------------------ 1959d03c0883SXin LI# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR 1960*0a7e5f1fSJoseph Mingrone# accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. 1961*0a7e5f1fSJoseph Mingroneac_fn_check_decl () 1962d03c0883SXin LI{ 1963d03c0883SXin LI as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 1964d03c0883SXin LI as_decl_name=`echo $2|sed 's/ *(.*//'` 1965*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 1966*0a7e5f1fSJoseph Mingroneprintf %s "checking whether $as_decl_name is declared... " >&6; } 1967*0a7e5f1fSJoseph Mingroneif eval test \${$3+y} 1968*0a7e5f1fSJoseph Mingronethen : 1969*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 1970*0a7e5f1fSJoseph Mingroneelse $as_nop 1971d03c0883SXin LI as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` 1972*0a7e5f1fSJoseph Mingrone eval ac_save_FLAGS=\$$6 1973*0a7e5f1fSJoseph Mingrone as_fn_append $6 " $5" 1974d03c0883SXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 1975d03c0883SXin LI/* end confdefs.h. */ 1976d03c0883SXin LI$4 1977d03c0883SXin LIint 1978*0a7e5f1fSJoseph Mingronemain (void) 1979d03c0883SXin LI{ 1980d03c0883SXin LI#ifndef $as_decl_name 1981d03c0883SXin LI#ifdef __cplusplus 1982d03c0883SXin LI (void) $as_decl_use; 1983d03c0883SXin LI#else 1984d03c0883SXin LI (void) $as_decl_name; 1985d03c0883SXin LI#endif 1986d03c0883SXin LI#endif 1987d03c0883SXin LI 1988d03c0883SXin LI ; 1989d03c0883SXin LI return 0; 1990d03c0883SXin LI} 1991d03c0883SXin LI_ACEOF 1992*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 1993*0a7e5f1fSJoseph Mingronethen : 1994d03c0883SXin LI eval "$3=yes" 1995*0a7e5f1fSJoseph Mingroneelse $as_nop 1996d03c0883SXin LI eval "$3=no" 1997d03c0883SXin LIfi 1998*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 1999*0a7e5f1fSJoseph Mingrone eval $6=\$ac_save_FLAGS 2000*0a7e5f1fSJoseph Mingrone 2001d03c0883SXin LIfi 2002d03c0883SXin LIeval ac_res=\$$3 2003*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2004*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_res" >&6; } 2005d03c0883SXin LI eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2006d03c0883SXin LI 2007*0a7e5f1fSJoseph Mingrone} # ac_fn_check_decl 2008d03c0883SXin LI 2009d03c0883SXin LI# ac_fn_c_check_type LINENO TYPE VAR INCLUDES 2010d03c0883SXin LI# ------------------------------------------- 2011d03c0883SXin LI# Tests whether TYPE exists after having included INCLUDES, setting cache 2012d03c0883SXin LI# variable VAR accordingly. 2013d03c0883SXin LIac_fn_c_check_type () 2014d03c0883SXin LI{ 2015d03c0883SXin LI as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2016*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2017*0a7e5f1fSJoseph Mingroneprintf %s "checking for $2... " >&6; } 2018*0a7e5f1fSJoseph Mingroneif eval test \${$3+y} 2019*0a7e5f1fSJoseph Mingronethen : 2020*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 2021*0a7e5f1fSJoseph Mingroneelse $as_nop 2022d03c0883SXin LI eval "$3=no" 2023d03c0883SXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2024d03c0883SXin LI/* end confdefs.h. */ 2025d03c0883SXin LI$4 2026d03c0883SXin LIint 2027*0a7e5f1fSJoseph Mingronemain (void) 2028d03c0883SXin LI{ 2029d03c0883SXin LIif (sizeof ($2)) 2030d03c0883SXin LI return 0; 2031d03c0883SXin LI ; 2032d03c0883SXin LI return 0; 2033d03c0883SXin LI} 2034d03c0883SXin LI_ACEOF 2035*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 2036*0a7e5f1fSJoseph Mingronethen : 2037d03c0883SXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2038d03c0883SXin LI/* end confdefs.h. */ 2039d03c0883SXin LI$4 2040d03c0883SXin LIint 2041*0a7e5f1fSJoseph Mingronemain (void) 2042d03c0883SXin LI{ 2043d03c0883SXin LIif (sizeof (($2))) 2044d03c0883SXin LI return 0; 2045d03c0883SXin LI ; 2046d03c0883SXin LI return 0; 2047d03c0883SXin LI} 2048d03c0883SXin LI_ACEOF 2049*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 2050*0a7e5f1fSJoseph Mingronethen : 2051d03c0883SXin LI 2052*0a7e5f1fSJoseph Mingroneelse $as_nop 2053d03c0883SXin LI eval "$3=yes" 2054d03c0883SXin LIfi 2055*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 2056d03c0883SXin LIfi 2057*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 2058d03c0883SXin LIfi 2059d03c0883SXin LIeval ac_res=\$$3 2060*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2061*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_res" >&6; } 2062d03c0883SXin LI eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2063d03c0883SXin LI 2064d03c0883SXin LI} # ac_fn_c_check_type 2065*0a7e5f1fSJoseph Mingroneac_configure_args_raw= 2066*0a7e5f1fSJoseph Mingronefor ac_arg 2067*0a7e5f1fSJoseph Mingronedo 2068*0a7e5f1fSJoseph Mingrone case $ac_arg in 2069*0a7e5f1fSJoseph Mingrone *\'*) 2070*0a7e5f1fSJoseph Mingrone ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 2071*0a7e5f1fSJoseph Mingrone esac 2072*0a7e5f1fSJoseph Mingrone as_fn_append ac_configure_args_raw " '$ac_arg'" 2073*0a7e5f1fSJoseph Mingronedone 2074*0a7e5f1fSJoseph Mingrone 2075*0a7e5f1fSJoseph Mingronecase $ac_configure_args_raw in 2076*0a7e5f1fSJoseph Mingrone *$as_nl*) 2077*0a7e5f1fSJoseph Mingrone ac_safe_unquote= ;; 2078*0a7e5f1fSJoseph Mingrone *) 2079*0a7e5f1fSJoseph Mingrone ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. 2080*0a7e5f1fSJoseph Mingrone ac_unsafe_a="$ac_unsafe_z#~" 2081*0a7e5f1fSJoseph Mingrone ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" 2082*0a7e5f1fSJoseph Mingrone ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; 2083*0a7e5f1fSJoseph Mingroneesac 2084*0a7e5f1fSJoseph Mingrone 2085b5bfcb5dSMax Laiercat >config.log <<_ACEOF 20865b0fe478SBruce M SimpsonThis file contains any messages produced by compilers while 20875b0fe478SBruce M Simpsonrunning configure, to aid debugging if configure makes a mistake. 20885b0fe478SBruce M Simpson 2089*0a7e5f1fSJoseph MingroneIt was created by tcpdump $as_me 4.99.5, which was 2090*0a7e5f1fSJoseph Mingronegenerated by GNU Autoconf 2.71. Invocation command line was 20915b0fe478SBruce M Simpson 2092*0a7e5f1fSJoseph Mingrone $ $0$ac_configure_args_raw 20935b0fe478SBruce M Simpson 20945b0fe478SBruce M Simpson_ACEOF 2095b5bfcb5dSMax Laierexec 5>>config.log 20965b0fe478SBruce M Simpson{ 20975b0fe478SBruce M Simpsoncat <<_ASUNAME 20985b0fe478SBruce M Simpson## --------- ## 20995b0fe478SBruce M Simpson## Platform. ## 21005b0fe478SBruce M Simpson## --------- ## 21015b0fe478SBruce M Simpson 21025b0fe478SBruce M Simpsonhostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 21035b0fe478SBruce M Simpsonuname -m = `(uname -m) 2>/dev/null || echo unknown` 21045b0fe478SBruce M Simpsonuname -r = `(uname -r) 2>/dev/null || echo unknown` 21055b0fe478SBruce M Simpsonuname -s = `(uname -s) 2>/dev/null || echo unknown` 21065b0fe478SBruce M Simpsonuname -v = `(uname -v) 2>/dev/null || echo unknown` 21075b0fe478SBruce M Simpson 21085b0fe478SBruce M Simpson/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 21095b0fe478SBruce M Simpson/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 21105b0fe478SBruce M Simpson 21115b0fe478SBruce M Simpson/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 21125b0fe478SBruce M Simpson/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 21135b0fe478SBruce M Simpson/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 2114b5bfcb5dSMax Laier/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 21155b0fe478SBruce M Simpson/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 21165b0fe478SBruce M Simpson/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 21175b0fe478SBruce M Simpson/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 21185b0fe478SBruce M Simpson 21195b0fe478SBruce M Simpson_ASUNAME 21205b0fe478SBruce M Simpson 21215b0fe478SBruce M Simpsonas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 21225b0fe478SBruce M Simpsonfor as_dir in $PATH 21235b0fe478SBruce M Simpsondo 21245b0fe478SBruce M Simpson IFS=$as_save_IFS 2125*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 2126*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 2127*0a7e5f1fSJoseph Mingrone */) ;; 2128*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 2129*0a7e5f1fSJoseph Mingrone esac 2130*0a7e5f1fSJoseph Mingrone printf "%s\n" "PATH: $as_dir" 21315b0fe478SBruce M Simpson done 2132b5bfcb5dSMax LaierIFS=$as_save_IFS 21335b0fe478SBruce M Simpson 21345b0fe478SBruce M Simpson} >&5 21355b0fe478SBruce M Simpson 21365b0fe478SBruce M Simpsoncat >&5 <<_ACEOF 21375b0fe478SBruce M Simpson 21385b0fe478SBruce M Simpson 21395b0fe478SBruce M Simpson## ----------- ## 21405b0fe478SBruce M Simpson## Core tests. ## 21415b0fe478SBruce M Simpson## ----------- ## 21425b0fe478SBruce M Simpson 21435b0fe478SBruce M Simpson_ACEOF 21445b0fe478SBruce M Simpson 21455b0fe478SBruce M Simpson 21465b0fe478SBruce M Simpson# Keep a trace of the command line. 21475b0fe478SBruce M Simpson# Strip out --no-create and --no-recursion so they do not pile up. 21485b0fe478SBruce M Simpson# Strip out --silent because we don't want to record it for future runs. 21495b0fe478SBruce M Simpson# Also quote any args containing shell meta-characters. 21505b0fe478SBruce M Simpson# Make two passes to allow for proper duplicate-argument suppression. 21515b0fe478SBruce M Simpsonac_configure_args= 21525b0fe478SBruce M Simpsonac_configure_args0= 21535b0fe478SBruce M Simpsonac_configure_args1= 21545b0fe478SBruce M Simpsonac_must_keep_next=false 21555b0fe478SBruce M Simpsonfor ac_pass in 1 2 21565b0fe478SBruce M Simpsondo 21575b0fe478SBruce M Simpson for ac_arg 21585b0fe478SBruce M Simpson do 21595b0fe478SBruce M Simpson case $ac_arg in 21605b0fe478SBruce M Simpson -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; 21615b0fe478SBruce M Simpson -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 21625b0fe478SBruce M Simpson | -silent | --silent | --silen | --sile | --sil) 21635b0fe478SBruce M Simpson continue ;; 2164b5bfcb5dSMax Laier *\'*) 2165*0a7e5f1fSJoseph Mingrone ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 21665b0fe478SBruce M Simpson esac 21675b0fe478SBruce M Simpson case $ac_pass in 2168d03c0883SXin LI 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 21695b0fe478SBruce M Simpson 2) 2170d03c0883SXin LI as_fn_append ac_configure_args1 " '$ac_arg'" 21715b0fe478SBruce M Simpson if test $ac_must_keep_next = true; then 21725b0fe478SBruce M Simpson ac_must_keep_next=false # Got value, back to normal. 21735b0fe478SBruce M Simpson else 21745b0fe478SBruce M Simpson case $ac_arg in 21755b0fe478SBruce M Simpson *=* | --config-cache | -C | -disable-* | --disable-* \ 21765b0fe478SBruce M Simpson | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ 21775b0fe478SBruce M Simpson | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ 21785b0fe478SBruce M Simpson | -with-* | --with-* | -without-* | --without-* | --x) 21795b0fe478SBruce M Simpson case "$ac_configure_args0 " in 21805b0fe478SBruce M Simpson "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; 21815b0fe478SBruce M Simpson esac 21825b0fe478SBruce M Simpson ;; 21835b0fe478SBruce M Simpson -* ) ac_must_keep_next=true ;; 21845b0fe478SBruce M Simpson esac 21855b0fe478SBruce M Simpson fi 2186d03c0883SXin LI as_fn_append ac_configure_args " '$ac_arg'" 21875b0fe478SBruce M Simpson ;; 21885b0fe478SBruce M Simpson esac 21895b0fe478SBruce M Simpson done 21905b0fe478SBruce M Simpsondone 2191d03c0883SXin LI{ ac_configure_args0=; unset ac_configure_args0;} 2192d03c0883SXin LI{ ac_configure_args1=; unset ac_configure_args1;} 21935b0fe478SBruce M Simpson 21945b0fe478SBruce M Simpson# When interrupted or exit'd, cleanup temporary files, and complete 21955b0fe478SBruce M Simpson# config.log. We remove comments because anyway the quotes in there 21965b0fe478SBruce M Simpson# would cause problems or look ugly. 2197b5bfcb5dSMax Laier# WARNING: Use '\'' to represent an apostrophe within the trap. 2198b5bfcb5dSMax Laier# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 21995b0fe478SBruce M Simpsontrap 'exit_status=$? 2200*0a7e5f1fSJoseph Mingrone # Sanitize IFS. 2201*0a7e5f1fSJoseph Mingrone IFS=" "" $as_nl" 22025b0fe478SBruce M Simpson # Save into config.log some information that might help in debugging. 22035b0fe478SBruce M Simpson { 22045b0fe478SBruce M Simpson echo 22055b0fe478SBruce M Simpson 2206*0a7e5f1fSJoseph Mingrone printf "%s\n" "## ---------------- ## 22075b0fe478SBruce M Simpson## Cache variables. ## 2208d03c0883SXin LI## ---------------- ##" 22095b0fe478SBruce M Simpson echo 22105b0fe478SBruce M Simpson # The following way of writing the cache mishandles newlines in values, 2211b5bfcb5dSMax Laier( 2212b5bfcb5dSMax Laier for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do 2213b5bfcb5dSMax Laier eval ac_val=\$$ac_var 2214b5bfcb5dSMax Laier case $ac_val in #( 2215b5bfcb5dSMax Laier *${as_nl}*) 2216b5bfcb5dSMax Laier case $ac_var in #( 2217*0a7e5f1fSJoseph Mingrone *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 2218*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 2219b5bfcb5dSMax Laier esac 2220b5bfcb5dSMax Laier case $ac_var in #( 2221b5bfcb5dSMax Laier _ | IFS | as_nl) ;; #( 2222d03c0883SXin LI BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 2223d03c0883SXin LI *) { eval $ac_var=; unset $ac_var;} ;; 2224b5bfcb5dSMax Laier esac ;; 2225b5bfcb5dSMax Laier esac 2226b5bfcb5dSMax Laier done 22275b0fe478SBruce M Simpson (set) 2>&1 | 2228b5bfcb5dSMax Laier case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( 2229b5bfcb5dSMax Laier *${as_nl}ac_space=\ *) 22305b0fe478SBruce M Simpson sed -n \ 2231b5bfcb5dSMax Laier "s/'\''/'\''\\\\'\'''\''/g; 2232b5bfcb5dSMax Laier s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" 2233b5bfcb5dSMax Laier ;; #( 22345b0fe478SBruce M Simpson *) 2235b5bfcb5dSMax Laier sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 22365b0fe478SBruce M Simpson ;; 2237b5bfcb5dSMax Laier esac | 2238b5bfcb5dSMax Laier sort 2239b5bfcb5dSMax Laier) 22405b0fe478SBruce M Simpson echo 22415b0fe478SBruce M Simpson 2242*0a7e5f1fSJoseph Mingrone printf "%s\n" "## ----------------- ## 22435b0fe478SBruce M Simpson## Output variables. ## 2244d03c0883SXin LI## ----------------- ##" 22455b0fe478SBruce M Simpson echo 22465b0fe478SBruce M Simpson for ac_var in $ac_subst_vars 22475b0fe478SBruce M Simpson do 2248b5bfcb5dSMax Laier eval ac_val=\$$ac_var 2249b5bfcb5dSMax Laier case $ac_val in 2250*0a7e5f1fSJoseph Mingrone *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2251b5bfcb5dSMax Laier esac 2252*0a7e5f1fSJoseph Mingrone printf "%s\n" "$ac_var='\''$ac_val'\''" 22535b0fe478SBruce M Simpson done | sort 22545b0fe478SBruce M Simpson echo 22555b0fe478SBruce M Simpson 22565b0fe478SBruce M Simpson if test -n "$ac_subst_files"; then 2257*0a7e5f1fSJoseph Mingrone printf "%s\n" "## ------------------- ## 2258b5bfcb5dSMax Laier## File substitutions. ## 2259d03c0883SXin LI## ------------------- ##" 22605b0fe478SBruce M Simpson echo 22615b0fe478SBruce M Simpson for ac_var in $ac_subst_files 22625b0fe478SBruce M Simpson do 2263b5bfcb5dSMax Laier eval ac_val=\$$ac_var 2264b5bfcb5dSMax Laier case $ac_val in 2265*0a7e5f1fSJoseph Mingrone *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2266b5bfcb5dSMax Laier esac 2267*0a7e5f1fSJoseph Mingrone printf "%s\n" "$ac_var='\''$ac_val'\''" 22685b0fe478SBruce M Simpson done | sort 22695b0fe478SBruce M Simpson echo 22705b0fe478SBruce M Simpson fi 22715b0fe478SBruce M Simpson 22725b0fe478SBruce M Simpson if test -s confdefs.h; then 2273*0a7e5f1fSJoseph Mingrone printf "%s\n" "## ----------- ## 22745b0fe478SBruce M Simpson## confdefs.h. ## 2275d03c0883SXin LI## ----------- ##" 22765b0fe478SBruce M Simpson echo 2277b5bfcb5dSMax Laier cat confdefs.h 22785b0fe478SBruce M Simpson echo 22795b0fe478SBruce M Simpson fi 22805b0fe478SBruce M Simpson test "$ac_signal" != 0 && 2281*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me: caught signal $ac_signal" 2282*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me: exit $exit_status" 22835b0fe478SBruce M Simpson } >&5 2284b5bfcb5dSMax Laier rm -f core *.core core.conftest.* && 2285b5bfcb5dSMax Laier rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 22865b0fe478SBruce M Simpson exit $exit_status 22875b0fe478SBruce M Simpson' 0 22885b0fe478SBruce M Simpsonfor ac_signal in 1 2 13 15; do 2289d03c0883SXin LI trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal 22905b0fe478SBruce M Simpsondone 22915b0fe478SBruce M Simpsonac_signal=0 22925b0fe478SBruce M Simpson 22935b0fe478SBruce M Simpson# confdefs.h avoids OS command line length limits that DEFS can exceed. 2294b5bfcb5dSMax Laierrm -f -r conftest* confdefs.h 22955b0fe478SBruce M Simpson 2296*0a7e5f1fSJoseph Mingroneprintf "%s\n" "/* confdefs.h */" > confdefs.h 2297d03c0883SXin LI 22985b0fe478SBruce M Simpson# Predefined preprocessor variables. 22995b0fe478SBruce M Simpson 2300*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h 23015b0fe478SBruce M Simpson 2302*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h 23035b0fe478SBruce M Simpson 2304*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h 23055b0fe478SBruce M Simpson 2306*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h 23075b0fe478SBruce M Simpson 2308*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h 23095b0fe478SBruce M Simpson 2310*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h 2311d03c0883SXin LI 23125b0fe478SBruce M Simpson 23135b0fe478SBruce M Simpson# Let the site file select an alternate cache file if it wants to. 2314d03c0883SXin LI# Prefer an explicitly selected file to automatically selected ones. 2315b5bfcb5dSMax Laierif test -n "$CONFIG_SITE"; then 2316*0a7e5f1fSJoseph Mingrone ac_site_files="$CONFIG_SITE" 2317b5bfcb5dSMax Laierelif test "x$prefix" != xNONE; then 2318*0a7e5f1fSJoseph Mingrone ac_site_files="$prefix/share/config.site $prefix/etc/config.site" 23194edb46e9SPaul Trainaelse 2320*0a7e5f1fSJoseph Mingrone ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" 23214edb46e9SPaul Trainafi 2322*0a7e5f1fSJoseph Mingrone 2323*0a7e5f1fSJoseph Mingronefor ac_site_file in $ac_site_files 2324b5bfcb5dSMax Laierdo 2325*0a7e5f1fSJoseph Mingrone case $ac_site_file in #( 2326*0a7e5f1fSJoseph Mingrone */*) : 2327*0a7e5f1fSJoseph Mingrone ;; #( 2328*0a7e5f1fSJoseph Mingrone *) : 2329*0a7e5f1fSJoseph Mingrone ac_site_file=./$ac_site_file ;; 2330*0a7e5f1fSJoseph Mingroneesac 2331*0a7e5f1fSJoseph Mingrone if test -f "$ac_site_file" && test -r "$ac_site_file"; then 2332*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 2333*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} 23345b0fe478SBruce M Simpson sed 's/^/| /' "$ac_site_file" >&5 2335d03c0883SXin LI . "$ac_site_file" \ 2336*0a7e5f1fSJoseph Mingrone || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2337*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 2338d03c0883SXin LIas_fn_error $? "failed to load site script $ac_site_file 2339d03c0883SXin LISee \`config.log' for more details" "$LINENO" 5; } 23404edb46e9SPaul Traina fi 23414edb46e9SPaul Trainadone 23424edb46e9SPaul Traina 23434edb46e9SPaul Trainaif test -r "$cache_file"; then 2344d03c0883SXin LI # Some versions of bash will fail to source /dev/null (special files 2345d03c0883SXin LI # actually), so we avoid doing that. DJGPP emulates it as a regular file. 2346d03c0883SXin LI if test /dev/null != "$cache_file" && test -f "$cache_file"; then 2347*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 2348*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: loading cache $cache_file" >&6;} 23495b0fe478SBruce M Simpson case $cache_file in 2350b5bfcb5dSMax Laier [\\/]* | ?:[\\/]* ) . "$cache_file";; 2351b5bfcb5dSMax Laier *) . "./$cache_file";; 23525b0fe478SBruce M Simpson esac 23535b0fe478SBruce M Simpson fi 23544edb46e9SPaul Trainaelse 2355*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 2356*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: creating cache $cache_file" >&6;} 23574edb46e9SPaul Traina >$cache_file 23584edb46e9SPaul Trainafi 23594edb46e9SPaul Traina 2360*0a7e5f1fSJoseph Mingrone# Test code for whether the C compiler supports C89 (global declarations) 2361*0a7e5f1fSJoseph Mingroneac_c_conftest_c89_globals=' 2362*0a7e5f1fSJoseph Mingrone/* Does the compiler advertise C89 conformance? 2363*0a7e5f1fSJoseph Mingrone Do not test the value of __STDC__, because some compilers set it to 0 2364*0a7e5f1fSJoseph Mingrone while being otherwise adequately conformant. */ 2365*0a7e5f1fSJoseph Mingrone#if !defined __STDC__ 2366*0a7e5f1fSJoseph Mingrone# error "Compiler does not advertise C89 conformance" 23674edb46e9SPaul Traina#endif 23684edb46e9SPaul Traina 2369*0a7e5f1fSJoseph Mingrone#include <stddef.h> 23705b0fe478SBruce M Simpson#include <stdarg.h> 23713c602fabSXin LIstruct stat; 2372*0a7e5f1fSJoseph Mingrone/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ 23735b0fe478SBruce M Simpsonstruct buf { int x; }; 2374*0a7e5f1fSJoseph Mingronestruct buf * (*rcsopen) (struct buf *, struct stat *, int); 23755b0fe478SBruce M Simpsonstatic char *e (p, i) 23765b0fe478SBruce M Simpson char **p; 23775b0fe478SBruce M Simpson int i; 23785b0fe478SBruce M Simpson{ 23795b0fe478SBruce M Simpson return p[i]; 23805b0fe478SBruce M Simpson} 23815b0fe478SBruce M Simpsonstatic char *f (char * (*g) (char **, int), char **p, ...) 23825b0fe478SBruce M Simpson{ 23835b0fe478SBruce M Simpson char *s; 23845b0fe478SBruce M Simpson va_list v; 23855b0fe478SBruce M Simpson va_start (v,p); 23865b0fe478SBruce M Simpson s = g (p, va_arg (v,int)); 23875b0fe478SBruce M Simpson va_end (v); 23885b0fe478SBruce M Simpson return s; 23895b0fe478SBruce M Simpson} 2390b5bfcb5dSMax Laier 2391b5bfcb5dSMax Laier/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 2392*0a7e5f1fSJoseph Mingrone function prototypes and stuff, but not \xHH hex character constants. 2393*0a7e5f1fSJoseph Mingrone These do not provoke an error unfortunately, instead are silently treated 2394*0a7e5f1fSJoseph Mingrone as an "x". The following induces an error, until -std is added to get 2395*0a7e5f1fSJoseph Mingrone proper ANSI mode. Curiously \x00 != x always comes out true, for an 2396*0a7e5f1fSJoseph Mingrone array size at least. It is necessary to write \x00 == 0 to get something 2397*0a7e5f1fSJoseph Mingrone that is true only with -std. */ 2398*0a7e5f1fSJoseph Mingroneint osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; 2399b5bfcb5dSMax Laier 2400b5bfcb5dSMax Laier/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters 2401b5bfcb5dSMax Laier inside strings and character constants. */ 2402*0a7e5f1fSJoseph Mingrone#define FOO(x) '\''x'\'' 2403*0a7e5f1fSJoseph Mingroneint xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; 2404b5bfcb5dSMax Laier 24055b0fe478SBruce M Simpsonint test (int i, double x); 24065b0fe478SBruce M Simpsonstruct s1 {int (*f) (int a);}; 24075b0fe478SBruce M Simpsonstruct s2 {int (*f) (double a);}; 2408*0a7e5f1fSJoseph Mingroneint pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), 2409*0a7e5f1fSJoseph Mingrone int, int);' 24105b0fe478SBruce M Simpson 2411*0a7e5f1fSJoseph Mingrone# Test code for whether the C compiler supports C89 (body of main). 2412*0a7e5f1fSJoseph Mingroneac_c_conftest_c89_main=' 2413*0a7e5f1fSJoseph Mingroneok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); 2414*0a7e5f1fSJoseph Mingrone' 24155b0fe478SBruce M Simpson 2416*0a7e5f1fSJoseph Mingrone# Test code for whether the C compiler supports C99 (global declarations) 2417*0a7e5f1fSJoseph Mingroneac_c_conftest_c99_globals=' 2418*0a7e5f1fSJoseph Mingrone// Does the compiler advertise C99 conformance? 2419*0a7e5f1fSJoseph Mingrone#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L 2420*0a7e5f1fSJoseph Mingrone# error "Compiler does not advertise C99 conformance" 2421*0a7e5f1fSJoseph Mingrone#endif 24225b0fe478SBruce M Simpson 2423ee67461eSJoseph Mingrone#include <stdbool.h> 2424*0a7e5f1fSJoseph Mingroneextern int puts (const char *); 2425*0a7e5f1fSJoseph Mingroneextern int printf (const char *, ...); 2426*0a7e5f1fSJoseph Mingroneextern int dprintf (int, const char *, ...); 2427*0a7e5f1fSJoseph Mingroneextern void *malloc (size_t); 242827df3f5dSRui Paulo 2429ee67461eSJoseph Mingrone// Check varargs macros. These examples are taken from C99 6.10.3.5. 2430*0a7e5f1fSJoseph Mingrone// dprintf is used instead of fprintf to avoid needing to declare 2431*0a7e5f1fSJoseph Mingrone// FILE and stderr. 2432*0a7e5f1fSJoseph Mingrone#define debug(...) dprintf (2, __VA_ARGS__) 2433ee67461eSJoseph Mingrone#define showlist(...) puts (#__VA_ARGS__) 2434ee67461eSJoseph Mingrone#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) 2435ee67461eSJoseph Mingronestatic void 2436ee67461eSJoseph Mingronetest_varargs_macros (void) 2437ee67461eSJoseph Mingrone{ 2438ee67461eSJoseph Mingrone int x = 1234; 2439ee67461eSJoseph Mingrone int y = 5678; 2440ee67461eSJoseph Mingrone debug ("Flag"); 2441ee67461eSJoseph Mingrone debug ("X = %d\n", x); 2442ee67461eSJoseph Mingrone showlist (The first, second, and third items.); 2443ee67461eSJoseph Mingrone report (x>y, "x is %d but y is %d", x, y); 2444ee67461eSJoseph Mingrone} 2445ee67461eSJoseph Mingrone 2446ee67461eSJoseph Mingrone// Check long long types. 2447ee67461eSJoseph Mingrone#define BIG64 18446744073709551615ull 2448ee67461eSJoseph Mingrone#define BIG32 4294967295ul 2449ee67461eSJoseph Mingrone#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) 2450ee67461eSJoseph Mingrone#if !BIG_OK 2451*0a7e5f1fSJoseph Mingrone #error "your preprocessor is broken" 2452ee67461eSJoseph Mingrone#endif 2453ee67461eSJoseph Mingrone#if BIG_OK 2454ee67461eSJoseph Mingrone#else 2455*0a7e5f1fSJoseph Mingrone #error "your preprocessor is broken" 2456ee67461eSJoseph Mingrone#endif 2457ee67461eSJoseph Mingronestatic long long int bignum = -9223372036854775807LL; 2458ee67461eSJoseph Mingronestatic unsigned long long int ubignum = BIG64; 2459ee67461eSJoseph Mingrone 2460ee67461eSJoseph Mingronestruct incomplete_array 2461ee67461eSJoseph Mingrone{ 2462ee67461eSJoseph Mingrone int datasize; 2463ee67461eSJoseph Mingrone double data[]; 2464ee67461eSJoseph Mingrone}; 2465ee67461eSJoseph Mingrone 2466ee67461eSJoseph Mingronestruct named_init { 2467ee67461eSJoseph Mingrone int number; 2468ee67461eSJoseph Mingrone const wchar_t *name; 2469ee67461eSJoseph Mingrone double average; 2470ee67461eSJoseph Mingrone}; 2471ee67461eSJoseph Mingrone 2472ee67461eSJoseph Mingronetypedef const char *ccp; 2473ee67461eSJoseph Mingrone 2474ee67461eSJoseph Mingronestatic inline int 2475ee67461eSJoseph Mingronetest_restrict (ccp restrict text) 2476ee67461eSJoseph Mingrone{ 2477ee67461eSJoseph Mingrone // See if C++-style comments work. 2478ee67461eSJoseph Mingrone // Iterate through items via the restricted pointer. 2479ee67461eSJoseph Mingrone // Also check for declarations in for loops. 2480*0a7e5f1fSJoseph Mingrone for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) 2481ee67461eSJoseph Mingrone continue; 2482ee67461eSJoseph Mingrone return 0; 2483ee67461eSJoseph Mingrone} 2484ee67461eSJoseph Mingrone 2485ee67461eSJoseph Mingrone// Check varargs and va_copy. 2486*0a7e5f1fSJoseph Mingronestatic bool 2487ee67461eSJoseph Mingronetest_varargs (const char *format, ...) 2488ee67461eSJoseph Mingrone{ 2489ee67461eSJoseph Mingrone va_list args; 2490ee67461eSJoseph Mingrone va_start (args, format); 2491ee67461eSJoseph Mingrone va_list args_copy; 2492ee67461eSJoseph Mingrone va_copy (args_copy, args); 2493ee67461eSJoseph Mingrone 2494*0a7e5f1fSJoseph Mingrone const char *str = ""; 2495*0a7e5f1fSJoseph Mingrone int number = 0; 2496*0a7e5f1fSJoseph Mingrone float fnumber = 0; 2497ee67461eSJoseph Mingrone 2498ee67461eSJoseph Mingrone while (*format) 2499ee67461eSJoseph Mingrone { 2500ee67461eSJoseph Mingrone switch (*format++) 2501ee67461eSJoseph Mingrone { 2502*0a7e5f1fSJoseph Mingrone case '\''s'\'': // string 2503ee67461eSJoseph Mingrone str = va_arg (args_copy, const char *); 2504ee67461eSJoseph Mingrone break; 2505*0a7e5f1fSJoseph Mingrone case '\''d'\'': // int 2506ee67461eSJoseph Mingrone number = va_arg (args_copy, int); 2507ee67461eSJoseph Mingrone break; 2508*0a7e5f1fSJoseph Mingrone case '\''f'\'': // float 2509ee67461eSJoseph Mingrone fnumber = va_arg (args_copy, double); 2510ee67461eSJoseph Mingrone break; 2511ee67461eSJoseph Mingrone default: 2512ee67461eSJoseph Mingrone break; 2513ee67461eSJoseph Mingrone } 2514ee67461eSJoseph Mingrone } 2515ee67461eSJoseph Mingrone va_end (args_copy); 2516ee67461eSJoseph Mingrone va_end (args); 2517*0a7e5f1fSJoseph Mingrone 2518*0a7e5f1fSJoseph Mingrone return *str && number && fnumber; 2519ee67461eSJoseph Mingrone} 2520*0a7e5f1fSJoseph Mingrone' 2521ee67461eSJoseph Mingrone 2522*0a7e5f1fSJoseph Mingrone# Test code for whether the C compiler supports C99 (body of main). 2523*0a7e5f1fSJoseph Mingroneac_c_conftest_c99_main=' 2524ee67461eSJoseph Mingrone // Check bool. 2525ee67461eSJoseph Mingrone _Bool success = false; 2526*0a7e5f1fSJoseph Mingrone success |= (argc != 0); 2527ee67461eSJoseph Mingrone 2528ee67461eSJoseph Mingrone // Check restrict. 2529ee67461eSJoseph Mingrone if (test_restrict ("String literal") == 0) 2530ee67461eSJoseph Mingrone success = true; 2531ee67461eSJoseph Mingrone char *restrict newvar = "Another string"; 2532ee67461eSJoseph Mingrone 2533ee67461eSJoseph Mingrone // Check varargs. 2534*0a7e5f1fSJoseph Mingrone success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); 2535ee67461eSJoseph Mingrone test_varargs_macros (); 2536ee67461eSJoseph Mingrone 2537ee67461eSJoseph Mingrone // Check flexible array members. 2538ee67461eSJoseph Mingrone struct incomplete_array *ia = 2539ee67461eSJoseph Mingrone malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); 2540ee67461eSJoseph Mingrone ia->datasize = 10; 2541ee67461eSJoseph Mingrone for (int i = 0; i < ia->datasize; ++i) 2542ee67461eSJoseph Mingrone ia->data[i] = i * 1.234; 2543ee67461eSJoseph Mingrone 2544ee67461eSJoseph Mingrone // Check named initializers. 2545ee67461eSJoseph Mingrone struct named_init ni = { 2546ee67461eSJoseph Mingrone .number = 34, 2547ee67461eSJoseph Mingrone .name = L"Test wide string", 2548ee67461eSJoseph Mingrone .average = 543.34343, 2549ee67461eSJoseph Mingrone }; 2550ee67461eSJoseph Mingrone 2551ee67461eSJoseph Mingrone ni.number = 58; 2552ee67461eSJoseph Mingrone 2553ee67461eSJoseph Mingrone int dynamic_array[ni.number]; 2554*0a7e5f1fSJoseph Mingrone dynamic_array[0] = argv[0][0]; 2555ee67461eSJoseph Mingrone dynamic_array[ni.number - 1] = 543; 2556ee67461eSJoseph Mingrone 2557ee67461eSJoseph Mingrone // work around unused variable warnings 2558*0a7e5f1fSJoseph Mingrone ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' 2559ee67461eSJoseph Mingrone || dynamic_array[ni.number - 1] != 543); 2560*0a7e5f1fSJoseph Mingrone' 2561*0a7e5f1fSJoseph Mingrone 2562*0a7e5f1fSJoseph Mingrone# Test code for whether the C compiler supports C11 (global declarations) 2563*0a7e5f1fSJoseph Mingroneac_c_conftest_c11_globals=' 2564*0a7e5f1fSJoseph Mingrone// Does the compiler advertise C11 conformance? 2565*0a7e5f1fSJoseph Mingrone#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L 2566*0a7e5f1fSJoseph Mingrone# error "Compiler does not advertise C11 conformance" 2567*0a7e5f1fSJoseph Mingrone#endif 2568*0a7e5f1fSJoseph Mingrone 2569*0a7e5f1fSJoseph Mingrone// Check _Alignas. 2570*0a7e5f1fSJoseph Mingronechar _Alignas (double) aligned_as_double; 2571*0a7e5f1fSJoseph Mingronechar _Alignas (0) no_special_alignment; 2572*0a7e5f1fSJoseph Mingroneextern char aligned_as_int; 2573*0a7e5f1fSJoseph Mingronechar _Alignas (0) _Alignas (int) aligned_as_int; 2574*0a7e5f1fSJoseph Mingrone 2575*0a7e5f1fSJoseph Mingrone// Check _Alignof. 2576*0a7e5f1fSJoseph Mingroneenum 2577*0a7e5f1fSJoseph Mingrone{ 2578*0a7e5f1fSJoseph Mingrone int_alignment = _Alignof (int), 2579*0a7e5f1fSJoseph Mingrone int_array_alignment = _Alignof (int[100]), 2580*0a7e5f1fSJoseph Mingrone char_alignment = _Alignof (char) 2581*0a7e5f1fSJoseph Mingrone}; 2582*0a7e5f1fSJoseph Mingrone_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); 2583*0a7e5f1fSJoseph Mingrone 2584*0a7e5f1fSJoseph Mingrone// Check _Noreturn. 2585*0a7e5f1fSJoseph Mingroneint _Noreturn does_not_return (void) { for (;;) continue; } 2586*0a7e5f1fSJoseph Mingrone 2587*0a7e5f1fSJoseph Mingrone// Check _Static_assert. 2588*0a7e5f1fSJoseph Mingronestruct test_static_assert 2589*0a7e5f1fSJoseph Mingrone{ 2590*0a7e5f1fSJoseph Mingrone int x; 2591*0a7e5f1fSJoseph Mingrone _Static_assert (sizeof (int) <= sizeof (long int), 2592*0a7e5f1fSJoseph Mingrone "_Static_assert does not work in struct"); 2593*0a7e5f1fSJoseph Mingrone long int y; 2594*0a7e5f1fSJoseph Mingrone}; 2595*0a7e5f1fSJoseph Mingrone 2596*0a7e5f1fSJoseph Mingrone// Check UTF-8 literals. 2597*0a7e5f1fSJoseph Mingrone#define u8 syntax error! 2598*0a7e5f1fSJoseph Mingronechar const utf8_literal[] = u8"happens to be ASCII" "another string"; 2599*0a7e5f1fSJoseph Mingrone 2600*0a7e5f1fSJoseph Mingrone// Check duplicate typedefs. 2601*0a7e5f1fSJoseph Mingronetypedef long *long_ptr; 2602*0a7e5f1fSJoseph Mingronetypedef long int *long_ptr; 2603*0a7e5f1fSJoseph Mingronetypedef long_ptr long_ptr; 2604*0a7e5f1fSJoseph Mingrone 2605*0a7e5f1fSJoseph Mingrone// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. 2606*0a7e5f1fSJoseph Mingronestruct anonymous 2607*0a7e5f1fSJoseph Mingrone{ 2608*0a7e5f1fSJoseph Mingrone union { 2609*0a7e5f1fSJoseph Mingrone struct { int i; int j; }; 2610*0a7e5f1fSJoseph Mingrone struct { int k; long int l; } w; 2611*0a7e5f1fSJoseph Mingrone }; 2612*0a7e5f1fSJoseph Mingrone int m; 2613*0a7e5f1fSJoseph Mingrone} v1; 2614*0a7e5f1fSJoseph Mingrone' 2615*0a7e5f1fSJoseph Mingrone 2616*0a7e5f1fSJoseph Mingrone# Test code for whether the C compiler supports C11 (body of main). 2617*0a7e5f1fSJoseph Mingroneac_c_conftest_c11_main=' 2618*0a7e5f1fSJoseph Mingrone _Static_assert ((offsetof (struct anonymous, i) 2619*0a7e5f1fSJoseph Mingrone == offsetof (struct anonymous, w.k)), 2620*0a7e5f1fSJoseph Mingrone "Anonymous union alignment botch"); 2621*0a7e5f1fSJoseph Mingrone v1.i = 2; 2622*0a7e5f1fSJoseph Mingrone v1.w.k = 5; 2623*0a7e5f1fSJoseph Mingrone ok |= v1.i != 5; 2624*0a7e5f1fSJoseph Mingrone' 2625*0a7e5f1fSJoseph Mingrone 2626*0a7e5f1fSJoseph Mingrone# Test code for whether the C compiler supports C11 (complete). 2627*0a7e5f1fSJoseph Mingroneac_c_conftest_c11_program="${ac_c_conftest_c89_globals} 2628*0a7e5f1fSJoseph Mingrone${ac_c_conftest_c99_globals} 2629*0a7e5f1fSJoseph Mingrone${ac_c_conftest_c11_globals} 2630*0a7e5f1fSJoseph Mingrone 2631*0a7e5f1fSJoseph Mingroneint 2632*0a7e5f1fSJoseph Mingronemain (int argc, char **argv) 2633*0a7e5f1fSJoseph Mingrone{ 2634*0a7e5f1fSJoseph Mingrone int ok = 0; 2635*0a7e5f1fSJoseph Mingrone ${ac_c_conftest_c89_main} 2636*0a7e5f1fSJoseph Mingrone ${ac_c_conftest_c99_main} 2637*0a7e5f1fSJoseph Mingrone ${ac_c_conftest_c11_main} 2638*0a7e5f1fSJoseph Mingrone return ok; 2639*0a7e5f1fSJoseph Mingrone} 2640*0a7e5f1fSJoseph Mingrone" 2641*0a7e5f1fSJoseph Mingrone 2642*0a7e5f1fSJoseph Mingrone# Test code for whether the C compiler supports C99 (complete). 2643*0a7e5f1fSJoseph Mingroneac_c_conftest_c99_program="${ac_c_conftest_c89_globals} 2644*0a7e5f1fSJoseph Mingrone${ac_c_conftest_c99_globals} 2645*0a7e5f1fSJoseph Mingrone 2646*0a7e5f1fSJoseph Mingroneint 2647*0a7e5f1fSJoseph Mingronemain (int argc, char **argv) 2648*0a7e5f1fSJoseph Mingrone{ 2649*0a7e5f1fSJoseph Mingrone int ok = 0; 2650*0a7e5f1fSJoseph Mingrone ${ac_c_conftest_c89_main} 2651*0a7e5f1fSJoseph Mingrone ${ac_c_conftest_c99_main} 2652*0a7e5f1fSJoseph Mingrone return ok; 2653*0a7e5f1fSJoseph Mingrone} 2654*0a7e5f1fSJoseph Mingrone" 2655*0a7e5f1fSJoseph Mingrone 2656*0a7e5f1fSJoseph Mingrone# Test code for whether the C compiler supports C89 (complete). 2657*0a7e5f1fSJoseph Mingroneac_c_conftest_c89_program="${ac_c_conftest_c89_globals} 2658*0a7e5f1fSJoseph Mingrone 2659*0a7e5f1fSJoseph Mingroneint 2660*0a7e5f1fSJoseph Mingronemain (int argc, char **argv) 2661*0a7e5f1fSJoseph Mingrone{ 2662*0a7e5f1fSJoseph Mingrone int ok = 0; 2663*0a7e5f1fSJoseph Mingrone ${ac_c_conftest_c89_main} 2664*0a7e5f1fSJoseph Mingrone return ok; 2665*0a7e5f1fSJoseph Mingrone} 2666*0a7e5f1fSJoseph Mingrone" 2667*0a7e5f1fSJoseph Mingrone 2668*0a7e5f1fSJoseph Mingroneas_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" 2669*0a7e5f1fSJoseph Mingroneas_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" 2670*0a7e5f1fSJoseph Mingroneas_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" 2671*0a7e5f1fSJoseph Mingroneas_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" 2672*0a7e5f1fSJoseph Mingroneas_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" 2673*0a7e5f1fSJoseph Mingroneas_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" 2674*0a7e5f1fSJoseph Mingroneas_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" 2675*0a7e5f1fSJoseph Mingroneas_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" 2676*0a7e5f1fSJoseph Mingroneas_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" 2677*0a7e5f1fSJoseph Mingrone 2678*0a7e5f1fSJoseph Mingrone# Auxiliary files required by this configure script. 2679*0a7e5f1fSJoseph Mingroneac_aux_files="install-sh config.guess config.sub" 2680*0a7e5f1fSJoseph Mingrone 2681*0a7e5f1fSJoseph Mingrone# Locations in which to look for auxiliary files. 2682*0a7e5f1fSJoseph Mingroneac_aux_dir_candidates="${srcdir}${PATH_SEPARATOR}${srcdir}/..${PATH_SEPARATOR}${srcdir}/../.." 2683*0a7e5f1fSJoseph Mingrone 2684*0a7e5f1fSJoseph Mingrone# Search for a directory containing all of the required auxiliary files, 2685*0a7e5f1fSJoseph Mingrone# $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. 2686*0a7e5f1fSJoseph Mingrone# If we don't find one directory that contains all the files we need, 2687*0a7e5f1fSJoseph Mingrone# we report the set of missing files from the *first* directory in 2688*0a7e5f1fSJoseph Mingrone# $ac_aux_dir_candidates and give up. 2689*0a7e5f1fSJoseph Mingroneac_missing_aux_files="" 2690*0a7e5f1fSJoseph Mingroneac_first_candidate=: 2691*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 2692*0a7e5f1fSJoseph Mingroneas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2693*0a7e5f1fSJoseph Mingroneas_found=false 2694*0a7e5f1fSJoseph Mingronefor as_dir in $ac_aux_dir_candidates 2695*0a7e5f1fSJoseph Mingronedo 2696*0a7e5f1fSJoseph Mingrone IFS=$as_save_IFS 2697*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 2698*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 2699*0a7e5f1fSJoseph Mingrone */) ;; 2700*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 2701*0a7e5f1fSJoseph Mingrone esac 2702*0a7e5f1fSJoseph Mingrone as_found=: 2703*0a7e5f1fSJoseph Mingrone 2704*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 2705*0a7e5f1fSJoseph Mingrone ac_aux_dir_found=yes 2706*0a7e5f1fSJoseph Mingrone ac_install_sh= 2707*0a7e5f1fSJoseph Mingrone for ac_aux in $ac_aux_files 2708*0a7e5f1fSJoseph Mingrone do 2709*0a7e5f1fSJoseph Mingrone # As a special case, if "install-sh" is required, that requirement 2710*0a7e5f1fSJoseph Mingrone # can be satisfied by any of "install-sh", "install.sh", or "shtool", 2711*0a7e5f1fSJoseph Mingrone # and $ac_install_sh is set appropriately for whichever one is found. 2712*0a7e5f1fSJoseph Mingrone if test x"$ac_aux" = x"install-sh" 2713*0a7e5f1fSJoseph Mingrone then 2714*0a7e5f1fSJoseph Mingrone if test -f "${as_dir}install-sh"; then 2715*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 2716*0a7e5f1fSJoseph Mingrone ac_install_sh="${as_dir}install-sh -c" 2717*0a7e5f1fSJoseph Mingrone elif test -f "${as_dir}install.sh"; then 2718*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 2719*0a7e5f1fSJoseph Mingrone ac_install_sh="${as_dir}install.sh -c" 2720*0a7e5f1fSJoseph Mingrone elif test -f "${as_dir}shtool"; then 2721*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 2722*0a7e5f1fSJoseph Mingrone ac_install_sh="${as_dir}shtool install -c" 2723*0a7e5f1fSJoseph Mingrone else 2724*0a7e5f1fSJoseph Mingrone ac_aux_dir_found=no 2725*0a7e5f1fSJoseph Mingrone if $ac_first_candidate; then 2726*0a7e5f1fSJoseph Mingrone ac_missing_aux_files="${ac_missing_aux_files} install-sh" 2727*0a7e5f1fSJoseph Mingrone else 2728*0a7e5f1fSJoseph Mingrone break 2729*0a7e5f1fSJoseph Mingrone fi 2730*0a7e5f1fSJoseph Mingrone fi 2731*0a7e5f1fSJoseph Mingrone else 2732*0a7e5f1fSJoseph Mingrone if test -f "${as_dir}${ac_aux}"; then 2733*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 2734*0a7e5f1fSJoseph Mingrone else 2735*0a7e5f1fSJoseph Mingrone ac_aux_dir_found=no 2736*0a7e5f1fSJoseph Mingrone if $ac_first_candidate; then 2737*0a7e5f1fSJoseph Mingrone ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" 2738*0a7e5f1fSJoseph Mingrone else 2739*0a7e5f1fSJoseph Mingrone break 2740*0a7e5f1fSJoseph Mingrone fi 2741*0a7e5f1fSJoseph Mingrone fi 2742*0a7e5f1fSJoseph Mingrone fi 2743*0a7e5f1fSJoseph Mingrone done 2744*0a7e5f1fSJoseph Mingrone if test "$ac_aux_dir_found" = yes; then 2745*0a7e5f1fSJoseph Mingrone ac_aux_dir="$as_dir" 2746*0a7e5f1fSJoseph Mingrone break 2747*0a7e5f1fSJoseph Mingrone fi 2748*0a7e5f1fSJoseph Mingrone ac_first_candidate=false 2749*0a7e5f1fSJoseph Mingrone 2750*0a7e5f1fSJoseph Mingrone as_found=false 2751*0a7e5f1fSJoseph Mingronedone 2752*0a7e5f1fSJoseph MingroneIFS=$as_save_IFS 2753*0a7e5f1fSJoseph Mingroneif $as_found 2754*0a7e5f1fSJoseph Mingronethen : 2755*0a7e5f1fSJoseph Mingrone 2756*0a7e5f1fSJoseph Mingroneelse $as_nop 2757*0a7e5f1fSJoseph Mingrone as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 2758*0a7e5f1fSJoseph Mingronefi 2759*0a7e5f1fSJoseph Mingrone 2760*0a7e5f1fSJoseph Mingrone 2761*0a7e5f1fSJoseph Mingrone# These three variables are undocumented and unsupported, 2762*0a7e5f1fSJoseph Mingrone# and are intended to be withdrawn in a future Autoconf release. 2763*0a7e5f1fSJoseph Mingrone# They can cause serious problems if a builder's source tree is in a directory 2764*0a7e5f1fSJoseph Mingrone# whose full name contains unusual characters. 2765*0a7e5f1fSJoseph Mingroneif test -f "${ac_aux_dir}config.guess"; then 2766*0a7e5f1fSJoseph Mingrone ac_config_guess="$SHELL ${ac_aux_dir}config.guess" 2767*0a7e5f1fSJoseph Mingronefi 2768*0a7e5f1fSJoseph Mingroneif test -f "${ac_aux_dir}config.sub"; then 2769*0a7e5f1fSJoseph Mingrone ac_config_sub="$SHELL ${ac_aux_dir}config.sub" 2770*0a7e5f1fSJoseph Mingronefi 2771*0a7e5f1fSJoseph Mingroneif test -f "$ac_aux_dir/configure"; then 2772*0a7e5f1fSJoseph Mingrone ac_configure="$SHELL ${ac_aux_dir}configure" 2773*0a7e5f1fSJoseph Mingronefi 2774*0a7e5f1fSJoseph Mingrone 2775*0a7e5f1fSJoseph Mingrone# Check that the precious variables saved in the cache have kept the same 2776*0a7e5f1fSJoseph Mingrone# value. 2777*0a7e5f1fSJoseph Mingroneac_cache_corrupted=false 2778*0a7e5f1fSJoseph Mingronefor ac_var in $ac_precious_vars; do 2779*0a7e5f1fSJoseph Mingrone eval ac_old_set=\$ac_cv_env_${ac_var}_set 2780*0a7e5f1fSJoseph Mingrone eval ac_new_set=\$ac_env_${ac_var}_set 2781*0a7e5f1fSJoseph Mingrone eval ac_old_val=\$ac_cv_env_${ac_var}_value 2782*0a7e5f1fSJoseph Mingrone eval ac_new_val=\$ac_env_${ac_var}_value 2783*0a7e5f1fSJoseph Mingrone case $ac_old_set,$ac_new_set in 2784*0a7e5f1fSJoseph Mingrone set,) 2785*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 2786*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 2787*0a7e5f1fSJoseph Mingrone ac_cache_corrupted=: ;; 2788*0a7e5f1fSJoseph Mingrone ,set) 2789*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 2790*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 2791*0a7e5f1fSJoseph Mingrone ac_cache_corrupted=: ;; 2792*0a7e5f1fSJoseph Mingrone ,);; 2793*0a7e5f1fSJoseph Mingrone *) 2794*0a7e5f1fSJoseph Mingrone if test "x$ac_old_val" != "x$ac_new_val"; then 2795*0a7e5f1fSJoseph Mingrone # differences in whitespace do not lead to failure. 2796*0a7e5f1fSJoseph Mingrone ac_old_val_w=`echo x $ac_old_val` 2797*0a7e5f1fSJoseph Mingrone ac_new_val_w=`echo x $ac_new_val` 2798*0a7e5f1fSJoseph Mingrone if test "$ac_old_val_w" != "$ac_new_val_w"; then 2799*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 2800*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 2801*0a7e5f1fSJoseph Mingrone ac_cache_corrupted=: 2802*0a7e5f1fSJoseph Mingrone else 2803*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 2804*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} 2805*0a7e5f1fSJoseph Mingrone eval $ac_var=\$ac_old_val 2806*0a7e5f1fSJoseph Mingrone fi 2807*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 2808*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} 2809*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 2810*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} 2811*0a7e5f1fSJoseph Mingrone fi;; 2812*0a7e5f1fSJoseph Mingrone esac 2813*0a7e5f1fSJoseph Mingrone # Pass precious variables to config.status. 2814*0a7e5f1fSJoseph Mingrone if test "$ac_new_set" = set; then 2815*0a7e5f1fSJoseph Mingrone case $ac_new_val in 2816*0a7e5f1fSJoseph Mingrone *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 2817*0a7e5f1fSJoseph Mingrone *) ac_arg=$ac_var=$ac_new_val ;; 2818*0a7e5f1fSJoseph Mingrone esac 2819*0a7e5f1fSJoseph Mingrone case " $ac_configure_args " in 2820*0a7e5f1fSJoseph Mingrone *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. 2821*0a7e5f1fSJoseph Mingrone *) as_fn_append ac_configure_args " '$ac_arg'" ;; 2822*0a7e5f1fSJoseph Mingrone esac 2823*0a7e5f1fSJoseph Mingrone fi 2824*0a7e5f1fSJoseph Mingronedone 2825*0a7e5f1fSJoseph Mingroneif $ac_cache_corrupted; then 2826*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 2827*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 2828*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 2829*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} 2830*0a7e5f1fSJoseph Mingrone as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' 2831*0a7e5f1fSJoseph Mingrone and start over" "$LINENO" 5 2832*0a7e5f1fSJoseph Mingronefi 2833*0a7e5f1fSJoseph Mingrone## -------------------- ## 2834*0a7e5f1fSJoseph Mingrone## Main body of script. ## 2835*0a7e5f1fSJoseph Mingrone## -------------------- ## 2836*0a7e5f1fSJoseph Mingrone 2837*0a7e5f1fSJoseph Mingroneac_ext=c 2838*0a7e5f1fSJoseph Mingroneac_cpp='$CPP $CPPFLAGS' 2839*0a7e5f1fSJoseph Mingroneac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 2840*0a7e5f1fSJoseph Mingroneac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 2841*0a7e5f1fSJoseph Mingroneac_compiler_gnu=$ac_cv_c_compiler_gnu 2842*0a7e5f1fSJoseph Mingrone 2843*0a7e5f1fSJoseph Mingrone 2844*0a7e5f1fSJoseph Mingrone 2845*0a7e5f1fSJoseph Mingrone 2846*0a7e5f1fSJoseph Mingrone 2847*0a7e5f1fSJoseph Mingrone 2848*0a7e5f1fSJoseph Mingrone 2849*0a7e5f1fSJoseph Mingrone # Make sure we can run config.sub. 2850*0a7e5f1fSJoseph Mingrone$SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || 2851*0a7e5f1fSJoseph Mingrone as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 2852*0a7e5f1fSJoseph Mingrone 2853*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 2854*0a7e5f1fSJoseph Mingroneprintf %s "checking build system type... " >&6; } 2855*0a7e5f1fSJoseph Mingroneif test ${ac_cv_build+y} 2856*0a7e5f1fSJoseph Mingronethen : 2857*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 2858*0a7e5f1fSJoseph Mingroneelse $as_nop 2859*0a7e5f1fSJoseph Mingrone ac_build_alias=$build_alias 2860*0a7e5f1fSJoseph Mingronetest "x$ac_build_alias" = x && 2861*0a7e5f1fSJoseph Mingrone ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` 2862*0a7e5f1fSJoseph Mingronetest "x$ac_build_alias" = x && 2863*0a7e5f1fSJoseph Mingrone as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 2864*0a7e5f1fSJoseph Mingroneac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || 2865*0a7e5f1fSJoseph Mingrone as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 2866*0a7e5f1fSJoseph Mingrone 2867*0a7e5f1fSJoseph Mingronefi 2868*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 2869*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_build" >&6; } 2870*0a7e5f1fSJoseph Mingronecase $ac_cv_build in 2871*0a7e5f1fSJoseph Mingrone*-*-*) ;; 2872*0a7e5f1fSJoseph Mingrone*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; 2873*0a7e5f1fSJoseph Mingroneesac 2874*0a7e5f1fSJoseph Mingronebuild=$ac_cv_build 2875*0a7e5f1fSJoseph Mingroneac_save_IFS=$IFS; IFS='-' 2876*0a7e5f1fSJoseph Mingroneset x $ac_cv_build 2877*0a7e5f1fSJoseph Mingroneshift 2878*0a7e5f1fSJoseph Mingronebuild_cpu=$1 2879*0a7e5f1fSJoseph Mingronebuild_vendor=$2 2880*0a7e5f1fSJoseph Mingroneshift; shift 2881*0a7e5f1fSJoseph Mingrone# Remember, the first character of IFS is used to create $*, 2882*0a7e5f1fSJoseph Mingrone# except with old shells: 2883*0a7e5f1fSJoseph Mingronebuild_os=$* 2884*0a7e5f1fSJoseph MingroneIFS=$ac_save_IFS 2885*0a7e5f1fSJoseph Mingronecase $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac 2886*0a7e5f1fSJoseph Mingrone 2887*0a7e5f1fSJoseph Mingrone 2888*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 2889*0a7e5f1fSJoseph Mingroneprintf %s "checking host system type... " >&6; } 2890*0a7e5f1fSJoseph Mingroneif test ${ac_cv_host+y} 2891*0a7e5f1fSJoseph Mingronethen : 2892*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 2893*0a7e5f1fSJoseph Mingroneelse $as_nop 2894*0a7e5f1fSJoseph Mingrone if test "x$host_alias" = x; then 2895*0a7e5f1fSJoseph Mingrone ac_cv_host=$ac_cv_build 2896*0a7e5f1fSJoseph Mingroneelse 2897*0a7e5f1fSJoseph Mingrone ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || 2898*0a7e5f1fSJoseph Mingrone as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 2899*0a7e5f1fSJoseph Mingronefi 2900*0a7e5f1fSJoseph Mingrone 2901*0a7e5f1fSJoseph Mingronefi 2902*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 2903*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_host" >&6; } 2904*0a7e5f1fSJoseph Mingronecase $ac_cv_host in 2905*0a7e5f1fSJoseph Mingrone*-*-*) ;; 2906*0a7e5f1fSJoseph Mingrone*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; 2907*0a7e5f1fSJoseph Mingroneesac 2908*0a7e5f1fSJoseph Mingronehost=$ac_cv_host 2909*0a7e5f1fSJoseph Mingroneac_save_IFS=$IFS; IFS='-' 2910*0a7e5f1fSJoseph Mingroneset x $ac_cv_host 2911*0a7e5f1fSJoseph Mingroneshift 2912*0a7e5f1fSJoseph Mingronehost_cpu=$1 2913*0a7e5f1fSJoseph Mingronehost_vendor=$2 2914*0a7e5f1fSJoseph Mingroneshift; shift 2915*0a7e5f1fSJoseph Mingrone# Remember, the first character of IFS is used to create $*, 2916*0a7e5f1fSJoseph Mingrone# except with old shells: 2917*0a7e5f1fSJoseph Mingronehost_os=$* 2918*0a7e5f1fSJoseph MingroneIFS=$ac_save_IFS 2919*0a7e5f1fSJoseph Mingronecase $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac 2920*0a7e5f1fSJoseph Mingrone 2921*0a7e5f1fSJoseph Mingrone 2922*0a7e5f1fSJoseph Mingrone 2923*0a7e5f1fSJoseph Mingrone 2924*0a7e5f1fSJoseph Mingrone 2925*0a7e5f1fSJoseph Mingrone 2926*0a7e5f1fSJoseph Mingrone 2927*0a7e5f1fSJoseph Mingrone 2928*0a7e5f1fSJoseph Mingrone# Check whether --with-gcc was given. 2929*0a7e5f1fSJoseph Mingroneif test ${with_gcc+y} 2930*0a7e5f1fSJoseph Mingronethen : 2931*0a7e5f1fSJoseph Mingrone withval=$with_gcc; 2932*0a7e5f1fSJoseph Mingronefi 2933*0a7e5f1fSJoseph Mingrone 2934*0a7e5f1fSJoseph Mingrone V_INCLS="" 2935*0a7e5f1fSJoseph Mingrone if test "${srcdir}" != "." ; then 2936*0a7e5f1fSJoseph Mingrone V_INCLS="-I$srcdir" 2937*0a7e5f1fSJoseph Mingrone fi 2938*0a7e5f1fSJoseph Mingrone if test "${CFLAGS+set}" = set; then 2939*0a7e5f1fSJoseph Mingrone LBL_CFLAGS="$CFLAGS" 2940*0a7e5f1fSJoseph Mingrone fi 2941*0a7e5f1fSJoseph Mingrone if test -z "$CC" ; then 2942*0a7e5f1fSJoseph Mingrone case "$host_os" in 2943*0a7e5f1fSJoseph Mingrone 2944*0a7e5f1fSJoseph Mingrone bsdi*) 2945*0a7e5f1fSJoseph Mingrone # Extract the first word of "shlicc2", so it can be a program name with args. 2946*0a7e5f1fSJoseph Mingroneset dummy shlicc2; ac_word=$2 2947*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 2948*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 2949*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_SHLICC2+y} 2950*0a7e5f1fSJoseph Mingronethen : 2951*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 2952*0a7e5f1fSJoseph Mingroneelse $as_nop 2953*0a7e5f1fSJoseph Mingrone if test -n "$SHLICC2"; then 2954*0a7e5f1fSJoseph Mingrone ac_cv_prog_SHLICC2="$SHLICC2" # Let the user override the test. 2955*0a7e5f1fSJoseph Mingroneelse 2956*0a7e5f1fSJoseph Mingroneas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 2957*0a7e5f1fSJoseph Mingronefor as_dir in $PATH 2958*0a7e5f1fSJoseph Mingronedo 2959*0a7e5f1fSJoseph Mingrone IFS=$as_save_IFS 2960*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 2961*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 2962*0a7e5f1fSJoseph Mingrone */) ;; 2963*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 2964*0a7e5f1fSJoseph Mingrone esac 2965*0a7e5f1fSJoseph Mingrone for ac_exec_ext in '' $ac_executable_extensions; do 2966*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 2967*0a7e5f1fSJoseph Mingrone ac_cv_prog_SHLICC2="yes" 2968*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 2969*0a7e5f1fSJoseph Mingrone break 2 2970*0a7e5f1fSJoseph Mingrone fi 2971*0a7e5f1fSJoseph Mingronedone 2972*0a7e5f1fSJoseph Mingrone done 2973*0a7e5f1fSJoseph MingroneIFS=$as_save_IFS 2974*0a7e5f1fSJoseph Mingrone 2975*0a7e5f1fSJoseph Mingrone test -z "$ac_cv_prog_SHLICC2" && ac_cv_prog_SHLICC2="no" 2976*0a7e5f1fSJoseph Mingronefi 2977*0a7e5f1fSJoseph Mingronefi 2978*0a7e5f1fSJoseph MingroneSHLICC2=$ac_cv_prog_SHLICC2 2979*0a7e5f1fSJoseph Mingroneif test -n "$SHLICC2"; then 2980*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHLICC2" >&5 2981*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$SHLICC2" >&6; } 2982*0a7e5f1fSJoseph Mingroneelse 2983*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 2984*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 2985*0a7e5f1fSJoseph Mingronefi 2986*0a7e5f1fSJoseph Mingrone 2987*0a7e5f1fSJoseph Mingrone 2988*0a7e5f1fSJoseph Mingrone if test $SHLICC2 = yes ; then 2989*0a7e5f1fSJoseph Mingrone CC=shlicc2 2990*0a7e5f1fSJoseph Mingrone export CC 2991*0a7e5f1fSJoseph Mingrone fi 2992*0a7e5f1fSJoseph Mingrone ;; 2993*0a7e5f1fSJoseph Mingrone esac 2994*0a7e5f1fSJoseph Mingrone fi 2995*0a7e5f1fSJoseph Mingrone if test -z "$CC" -a "$with_gcc" = no ; then 2996*0a7e5f1fSJoseph Mingrone CC=cc 2997*0a7e5f1fSJoseph Mingrone export CC 2998*0a7e5f1fSJoseph Mingrone fi 2999*0a7e5f1fSJoseph Mingrone 3000*0a7e5f1fSJoseph Mingrone# 3001*0a7e5f1fSJoseph Mingrone# Try to enable as many C99 features as we can. 3002*0a7e5f1fSJoseph Mingrone# At minimum, we want C++/C99-style // comments. 3003*0a7e5f1fSJoseph Mingrone# 3004*0a7e5f1fSJoseph Mingrone 3005*0a7e5f1fSJoseph Mingrone 3006*0a7e5f1fSJoseph Mingrone 3007*0a7e5f1fSJoseph Mingrone 3008*0a7e5f1fSJoseph Mingrone 3009*0a7e5f1fSJoseph Mingrone 3010*0a7e5f1fSJoseph Mingrone 3011*0a7e5f1fSJoseph Mingrone 3012*0a7e5f1fSJoseph Mingrone 3013*0a7e5f1fSJoseph Mingroneac_ext=c 3014*0a7e5f1fSJoseph Mingroneac_cpp='$CPP $CPPFLAGS' 3015*0a7e5f1fSJoseph Mingroneac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3016*0a7e5f1fSJoseph Mingroneac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3017*0a7e5f1fSJoseph Mingroneac_compiler_gnu=$ac_cv_c_compiler_gnu 3018*0a7e5f1fSJoseph Mingroneif test -n "$ac_tool_prefix"; then 3019*0a7e5f1fSJoseph Mingrone # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 3020*0a7e5f1fSJoseph Mingroneset dummy ${ac_tool_prefix}gcc; ac_word=$2 3021*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3022*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 3023*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_CC+y} 3024*0a7e5f1fSJoseph Mingronethen : 3025*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 3026*0a7e5f1fSJoseph Mingroneelse $as_nop 3027*0a7e5f1fSJoseph Mingrone if test -n "$CC"; then 3028*0a7e5f1fSJoseph Mingrone ac_cv_prog_CC="$CC" # Let the user override the test. 3029*0a7e5f1fSJoseph Mingroneelse 3030*0a7e5f1fSJoseph Mingroneas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3031*0a7e5f1fSJoseph Mingronefor as_dir in $PATH 3032*0a7e5f1fSJoseph Mingronedo 3033*0a7e5f1fSJoseph Mingrone IFS=$as_save_IFS 3034*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 3035*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 3036*0a7e5f1fSJoseph Mingrone */) ;; 3037*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 3038*0a7e5f1fSJoseph Mingrone esac 3039*0a7e5f1fSJoseph Mingrone for ac_exec_ext in '' $ac_executable_extensions; do 3040*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3041*0a7e5f1fSJoseph Mingrone ac_cv_prog_CC="${ac_tool_prefix}gcc" 3042*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3043*0a7e5f1fSJoseph Mingrone break 2 3044*0a7e5f1fSJoseph Mingrone fi 3045*0a7e5f1fSJoseph Mingronedone 3046*0a7e5f1fSJoseph Mingrone done 3047*0a7e5f1fSJoseph MingroneIFS=$as_save_IFS 3048*0a7e5f1fSJoseph Mingrone 3049*0a7e5f1fSJoseph Mingronefi 3050*0a7e5f1fSJoseph Mingronefi 3051*0a7e5f1fSJoseph MingroneCC=$ac_cv_prog_CC 3052*0a7e5f1fSJoseph Mingroneif test -n "$CC"; then 3053*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3054*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$CC" >&6; } 3055*0a7e5f1fSJoseph Mingroneelse 3056*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3057*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 3058*0a7e5f1fSJoseph Mingronefi 3059*0a7e5f1fSJoseph Mingrone 3060*0a7e5f1fSJoseph Mingrone 3061*0a7e5f1fSJoseph Mingronefi 3062*0a7e5f1fSJoseph Mingroneif test -z "$ac_cv_prog_CC"; then 3063*0a7e5f1fSJoseph Mingrone ac_ct_CC=$CC 3064*0a7e5f1fSJoseph Mingrone # Extract the first word of "gcc", so it can be a program name with args. 3065*0a7e5f1fSJoseph Mingroneset dummy gcc; ac_word=$2 3066*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3067*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 3068*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_ac_ct_CC+y} 3069*0a7e5f1fSJoseph Mingronethen : 3070*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 3071*0a7e5f1fSJoseph Mingroneelse $as_nop 3072*0a7e5f1fSJoseph Mingrone if test -n "$ac_ct_CC"; then 3073*0a7e5f1fSJoseph Mingrone ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 3074*0a7e5f1fSJoseph Mingroneelse 3075*0a7e5f1fSJoseph Mingroneas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3076*0a7e5f1fSJoseph Mingronefor as_dir in $PATH 3077*0a7e5f1fSJoseph Mingronedo 3078*0a7e5f1fSJoseph Mingrone IFS=$as_save_IFS 3079*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 3080*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 3081*0a7e5f1fSJoseph Mingrone */) ;; 3082*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 3083*0a7e5f1fSJoseph Mingrone esac 3084*0a7e5f1fSJoseph Mingrone for ac_exec_ext in '' $ac_executable_extensions; do 3085*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3086*0a7e5f1fSJoseph Mingrone ac_cv_prog_ac_ct_CC="gcc" 3087*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3088*0a7e5f1fSJoseph Mingrone break 2 3089*0a7e5f1fSJoseph Mingrone fi 3090*0a7e5f1fSJoseph Mingronedone 3091*0a7e5f1fSJoseph Mingrone done 3092*0a7e5f1fSJoseph MingroneIFS=$as_save_IFS 3093*0a7e5f1fSJoseph Mingrone 3094*0a7e5f1fSJoseph Mingronefi 3095*0a7e5f1fSJoseph Mingronefi 3096*0a7e5f1fSJoseph Mingroneac_ct_CC=$ac_cv_prog_ac_ct_CC 3097*0a7e5f1fSJoseph Mingroneif test -n "$ac_ct_CC"; then 3098*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 3099*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_ct_CC" >&6; } 3100*0a7e5f1fSJoseph Mingroneelse 3101*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3102*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 3103*0a7e5f1fSJoseph Mingronefi 3104*0a7e5f1fSJoseph Mingrone 3105*0a7e5f1fSJoseph Mingrone if test "x$ac_ct_CC" = x; then 3106*0a7e5f1fSJoseph Mingrone CC="" 3107*0a7e5f1fSJoseph Mingrone else 3108*0a7e5f1fSJoseph Mingrone case $cross_compiling:$ac_tool_warned in 3109*0a7e5f1fSJoseph Mingroneyes:) 3110*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 3111*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 3112*0a7e5f1fSJoseph Mingroneac_tool_warned=yes ;; 3113*0a7e5f1fSJoseph Mingroneesac 3114*0a7e5f1fSJoseph Mingrone CC=$ac_ct_CC 3115*0a7e5f1fSJoseph Mingrone fi 3116*0a7e5f1fSJoseph Mingroneelse 3117*0a7e5f1fSJoseph Mingrone CC="$ac_cv_prog_CC" 3118*0a7e5f1fSJoseph Mingronefi 3119*0a7e5f1fSJoseph Mingrone 3120*0a7e5f1fSJoseph Mingroneif test -z "$CC"; then 3121*0a7e5f1fSJoseph Mingrone if test -n "$ac_tool_prefix"; then 3122*0a7e5f1fSJoseph Mingrone # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 3123*0a7e5f1fSJoseph Mingroneset dummy ${ac_tool_prefix}cc; ac_word=$2 3124*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3125*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 3126*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_CC+y} 3127*0a7e5f1fSJoseph Mingronethen : 3128*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 3129*0a7e5f1fSJoseph Mingroneelse $as_nop 3130*0a7e5f1fSJoseph Mingrone if test -n "$CC"; then 3131*0a7e5f1fSJoseph Mingrone ac_cv_prog_CC="$CC" # Let the user override the test. 3132*0a7e5f1fSJoseph Mingroneelse 3133*0a7e5f1fSJoseph Mingroneas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3134*0a7e5f1fSJoseph Mingronefor as_dir in $PATH 3135*0a7e5f1fSJoseph Mingronedo 3136*0a7e5f1fSJoseph Mingrone IFS=$as_save_IFS 3137*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 3138*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 3139*0a7e5f1fSJoseph Mingrone */) ;; 3140*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 3141*0a7e5f1fSJoseph Mingrone esac 3142*0a7e5f1fSJoseph Mingrone for ac_exec_ext in '' $ac_executable_extensions; do 3143*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3144*0a7e5f1fSJoseph Mingrone ac_cv_prog_CC="${ac_tool_prefix}cc" 3145*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3146*0a7e5f1fSJoseph Mingrone break 2 3147*0a7e5f1fSJoseph Mingrone fi 3148*0a7e5f1fSJoseph Mingronedone 3149*0a7e5f1fSJoseph Mingrone done 3150*0a7e5f1fSJoseph MingroneIFS=$as_save_IFS 3151*0a7e5f1fSJoseph Mingrone 3152*0a7e5f1fSJoseph Mingronefi 3153*0a7e5f1fSJoseph Mingronefi 3154*0a7e5f1fSJoseph MingroneCC=$ac_cv_prog_CC 3155*0a7e5f1fSJoseph Mingroneif test -n "$CC"; then 3156*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3157*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$CC" >&6; } 3158*0a7e5f1fSJoseph Mingroneelse 3159*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3160*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 3161*0a7e5f1fSJoseph Mingronefi 3162*0a7e5f1fSJoseph Mingrone 3163*0a7e5f1fSJoseph Mingrone 3164*0a7e5f1fSJoseph Mingrone fi 3165*0a7e5f1fSJoseph Mingronefi 3166*0a7e5f1fSJoseph Mingroneif test -z "$CC"; then 3167*0a7e5f1fSJoseph Mingrone # Extract the first word of "cc", so it can be a program name with args. 3168*0a7e5f1fSJoseph Mingroneset dummy cc; ac_word=$2 3169*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3170*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 3171*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_CC+y} 3172*0a7e5f1fSJoseph Mingronethen : 3173*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 3174*0a7e5f1fSJoseph Mingroneelse $as_nop 3175*0a7e5f1fSJoseph Mingrone if test -n "$CC"; then 3176*0a7e5f1fSJoseph Mingrone ac_cv_prog_CC="$CC" # Let the user override the test. 3177*0a7e5f1fSJoseph Mingroneelse 3178*0a7e5f1fSJoseph Mingrone ac_prog_rejected=no 3179*0a7e5f1fSJoseph Mingroneas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3180*0a7e5f1fSJoseph Mingronefor as_dir in $PATH 3181*0a7e5f1fSJoseph Mingronedo 3182*0a7e5f1fSJoseph Mingrone IFS=$as_save_IFS 3183*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 3184*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 3185*0a7e5f1fSJoseph Mingrone */) ;; 3186*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 3187*0a7e5f1fSJoseph Mingrone esac 3188*0a7e5f1fSJoseph Mingrone for ac_exec_ext in '' $ac_executable_extensions; do 3189*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3190*0a7e5f1fSJoseph Mingrone if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then 3191*0a7e5f1fSJoseph Mingrone ac_prog_rejected=yes 3192*0a7e5f1fSJoseph Mingrone continue 3193*0a7e5f1fSJoseph Mingrone fi 3194*0a7e5f1fSJoseph Mingrone ac_cv_prog_CC="cc" 3195*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3196*0a7e5f1fSJoseph Mingrone break 2 3197*0a7e5f1fSJoseph Mingrone fi 3198*0a7e5f1fSJoseph Mingronedone 3199*0a7e5f1fSJoseph Mingrone done 3200*0a7e5f1fSJoseph MingroneIFS=$as_save_IFS 3201*0a7e5f1fSJoseph Mingrone 3202*0a7e5f1fSJoseph Mingroneif test $ac_prog_rejected = yes; then 3203*0a7e5f1fSJoseph Mingrone # We found a bogon in the path, so make sure we never use it. 3204*0a7e5f1fSJoseph Mingrone set dummy $ac_cv_prog_CC 3205*0a7e5f1fSJoseph Mingrone shift 3206*0a7e5f1fSJoseph Mingrone if test $# != 0; then 3207*0a7e5f1fSJoseph Mingrone # We chose a different compiler from the bogus one. 3208*0a7e5f1fSJoseph Mingrone # However, it has the same basename, so the bogon will be chosen 3209*0a7e5f1fSJoseph Mingrone # first if we set CC to just the basename; use the full file name. 3210*0a7e5f1fSJoseph Mingrone shift 3211*0a7e5f1fSJoseph Mingrone ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" 3212*0a7e5f1fSJoseph Mingrone fi 3213*0a7e5f1fSJoseph Mingronefi 3214*0a7e5f1fSJoseph Mingronefi 3215*0a7e5f1fSJoseph Mingronefi 3216*0a7e5f1fSJoseph MingroneCC=$ac_cv_prog_CC 3217*0a7e5f1fSJoseph Mingroneif test -n "$CC"; then 3218*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3219*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$CC" >&6; } 3220*0a7e5f1fSJoseph Mingroneelse 3221*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3222*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 3223*0a7e5f1fSJoseph Mingronefi 3224*0a7e5f1fSJoseph Mingrone 3225*0a7e5f1fSJoseph Mingrone 3226*0a7e5f1fSJoseph Mingronefi 3227*0a7e5f1fSJoseph Mingroneif test -z "$CC"; then 3228*0a7e5f1fSJoseph Mingrone if test -n "$ac_tool_prefix"; then 3229*0a7e5f1fSJoseph Mingrone for ac_prog in cl.exe 3230*0a7e5f1fSJoseph Mingrone do 3231*0a7e5f1fSJoseph Mingrone # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 3232*0a7e5f1fSJoseph Mingroneset dummy $ac_tool_prefix$ac_prog; ac_word=$2 3233*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3234*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 3235*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_CC+y} 3236*0a7e5f1fSJoseph Mingronethen : 3237*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 3238*0a7e5f1fSJoseph Mingroneelse $as_nop 3239*0a7e5f1fSJoseph Mingrone if test -n "$CC"; then 3240*0a7e5f1fSJoseph Mingrone ac_cv_prog_CC="$CC" # Let the user override the test. 3241*0a7e5f1fSJoseph Mingroneelse 3242*0a7e5f1fSJoseph Mingroneas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3243*0a7e5f1fSJoseph Mingronefor as_dir in $PATH 3244*0a7e5f1fSJoseph Mingronedo 3245*0a7e5f1fSJoseph Mingrone IFS=$as_save_IFS 3246*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 3247*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 3248*0a7e5f1fSJoseph Mingrone */) ;; 3249*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 3250*0a7e5f1fSJoseph Mingrone esac 3251*0a7e5f1fSJoseph Mingrone for ac_exec_ext in '' $ac_executable_extensions; do 3252*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3253*0a7e5f1fSJoseph Mingrone ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 3254*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3255*0a7e5f1fSJoseph Mingrone break 2 3256*0a7e5f1fSJoseph Mingrone fi 3257*0a7e5f1fSJoseph Mingronedone 3258*0a7e5f1fSJoseph Mingrone done 3259*0a7e5f1fSJoseph MingroneIFS=$as_save_IFS 3260*0a7e5f1fSJoseph Mingrone 3261*0a7e5f1fSJoseph Mingronefi 3262*0a7e5f1fSJoseph Mingronefi 3263*0a7e5f1fSJoseph MingroneCC=$ac_cv_prog_CC 3264*0a7e5f1fSJoseph Mingroneif test -n "$CC"; then 3265*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3266*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$CC" >&6; } 3267*0a7e5f1fSJoseph Mingroneelse 3268*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3269*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 3270*0a7e5f1fSJoseph Mingronefi 3271*0a7e5f1fSJoseph Mingrone 3272*0a7e5f1fSJoseph Mingrone 3273*0a7e5f1fSJoseph Mingrone test -n "$CC" && break 3274*0a7e5f1fSJoseph Mingrone done 3275*0a7e5f1fSJoseph Mingronefi 3276*0a7e5f1fSJoseph Mingroneif test -z "$CC"; then 3277*0a7e5f1fSJoseph Mingrone ac_ct_CC=$CC 3278*0a7e5f1fSJoseph Mingrone for ac_prog in cl.exe 3279*0a7e5f1fSJoseph Mingronedo 3280*0a7e5f1fSJoseph Mingrone # Extract the first word of "$ac_prog", so it can be a program name with args. 3281*0a7e5f1fSJoseph Mingroneset dummy $ac_prog; ac_word=$2 3282*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3283*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 3284*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_ac_ct_CC+y} 3285*0a7e5f1fSJoseph Mingronethen : 3286*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 3287*0a7e5f1fSJoseph Mingroneelse $as_nop 3288*0a7e5f1fSJoseph Mingrone if test -n "$ac_ct_CC"; then 3289*0a7e5f1fSJoseph Mingrone ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 3290*0a7e5f1fSJoseph Mingroneelse 3291*0a7e5f1fSJoseph Mingroneas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3292*0a7e5f1fSJoseph Mingronefor as_dir in $PATH 3293*0a7e5f1fSJoseph Mingronedo 3294*0a7e5f1fSJoseph Mingrone IFS=$as_save_IFS 3295*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 3296*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 3297*0a7e5f1fSJoseph Mingrone */) ;; 3298*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 3299*0a7e5f1fSJoseph Mingrone esac 3300*0a7e5f1fSJoseph Mingrone for ac_exec_ext in '' $ac_executable_extensions; do 3301*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3302*0a7e5f1fSJoseph Mingrone ac_cv_prog_ac_ct_CC="$ac_prog" 3303*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3304*0a7e5f1fSJoseph Mingrone break 2 3305*0a7e5f1fSJoseph Mingrone fi 3306*0a7e5f1fSJoseph Mingronedone 3307*0a7e5f1fSJoseph Mingrone done 3308*0a7e5f1fSJoseph MingroneIFS=$as_save_IFS 3309*0a7e5f1fSJoseph Mingrone 3310*0a7e5f1fSJoseph Mingronefi 3311*0a7e5f1fSJoseph Mingronefi 3312*0a7e5f1fSJoseph Mingroneac_ct_CC=$ac_cv_prog_ac_ct_CC 3313*0a7e5f1fSJoseph Mingroneif test -n "$ac_ct_CC"; then 3314*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 3315*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_ct_CC" >&6; } 3316*0a7e5f1fSJoseph Mingroneelse 3317*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3318*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 3319*0a7e5f1fSJoseph Mingronefi 3320*0a7e5f1fSJoseph Mingrone 3321*0a7e5f1fSJoseph Mingrone 3322*0a7e5f1fSJoseph Mingrone test -n "$ac_ct_CC" && break 3323*0a7e5f1fSJoseph Mingronedone 3324*0a7e5f1fSJoseph Mingrone 3325*0a7e5f1fSJoseph Mingrone if test "x$ac_ct_CC" = x; then 3326*0a7e5f1fSJoseph Mingrone CC="" 3327*0a7e5f1fSJoseph Mingrone else 3328*0a7e5f1fSJoseph Mingrone case $cross_compiling:$ac_tool_warned in 3329*0a7e5f1fSJoseph Mingroneyes:) 3330*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 3331*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 3332*0a7e5f1fSJoseph Mingroneac_tool_warned=yes ;; 3333*0a7e5f1fSJoseph Mingroneesac 3334*0a7e5f1fSJoseph Mingrone CC=$ac_ct_CC 3335*0a7e5f1fSJoseph Mingrone fi 3336*0a7e5f1fSJoseph Mingronefi 3337*0a7e5f1fSJoseph Mingrone 3338*0a7e5f1fSJoseph Mingronefi 3339*0a7e5f1fSJoseph Mingroneif test -z "$CC"; then 3340*0a7e5f1fSJoseph Mingrone if test -n "$ac_tool_prefix"; then 3341*0a7e5f1fSJoseph Mingrone # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. 3342*0a7e5f1fSJoseph Mingroneset dummy ${ac_tool_prefix}clang; ac_word=$2 3343*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3344*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 3345*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_CC+y} 3346*0a7e5f1fSJoseph Mingronethen : 3347*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 3348*0a7e5f1fSJoseph Mingroneelse $as_nop 3349*0a7e5f1fSJoseph Mingrone if test -n "$CC"; then 3350*0a7e5f1fSJoseph Mingrone ac_cv_prog_CC="$CC" # Let the user override the test. 3351*0a7e5f1fSJoseph Mingroneelse 3352*0a7e5f1fSJoseph Mingroneas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3353*0a7e5f1fSJoseph Mingronefor as_dir in $PATH 3354*0a7e5f1fSJoseph Mingronedo 3355*0a7e5f1fSJoseph Mingrone IFS=$as_save_IFS 3356*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 3357*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 3358*0a7e5f1fSJoseph Mingrone */) ;; 3359*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 3360*0a7e5f1fSJoseph Mingrone esac 3361*0a7e5f1fSJoseph Mingrone for ac_exec_ext in '' $ac_executable_extensions; do 3362*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3363*0a7e5f1fSJoseph Mingrone ac_cv_prog_CC="${ac_tool_prefix}clang" 3364*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3365*0a7e5f1fSJoseph Mingrone break 2 3366*0a7e5f1fSJoseph Mingrone fi 3367*0a7e5f1fSJoseph Mingronedone 3368*0a7e5f1fSJoseph Mingrone done 3369*0a7e5f1fSJoseph MingroneIFS=$as_save_IFS 3370*0a7e5f1fSJoseph Mingrone 3371*0a7e5f1fSJoseph Mingronefi 3372*0a7e5f1fSJoseph Mingronefi 3373*0a7e5f1fSJoseph MingroneCC=$ac_cv_prog_CC 3374*0a7e5f1fSJoseph Mingroneif test -n "$CC"; then 3375*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3376*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$CC" >&6; } 3377*0a7e5f1fSJoseph Mingroneelse 3378*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3379*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 3380*0a7e5f1fSJoseph Mingronefi 3381*0a7e5f1fSJoseph Mingrone 3382*0a7e5f1fSJoseph Mingrone 3383*0a7e5f1fSJoseph Mingronefi 3384*0a7e5f1fSJoseph Mingroneif test -z "$ac_cv_prog_CC"; then 3385*0a7e5f1fSJoseph Mingrone ac_ct_CC=$CC 3386*0a7e5f1fSJoseph Mingrone # Extract the first word of "clang", so it can be a program name with args. 3387*0a7e5f1fSJoseph Mingroneset dummy clang; ac_word=$2 3388*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3389*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 3390*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_ac_ct_CC+y} 3391*0a7e5f1fSJoseph Mingronethen : 3392*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 3393*0a7e5f1fSJoseph Mingroneelse $as_nop 3394*0a7e5f1fSJoseph Mingrone if test -n "$ac_ct_CC"; then 3395*0a7e5f1fSJoseph Mingrone ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 3396*0a7e5f1fSJoseph Mingroneelse 3397*0a7e5f1fSJoseph Mingroneas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3398*0a7e5f1fSJoseph Mingronefor as_dir in $PATH 3399*0a7e5f1fSJoseph Mingronedo 3400*0a7e5f1fSJoseph Mingrone IFS=$as_save_IFS 3401*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 3402*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 3403*0a7e5f1fSJoseph Mingrone */) ;; 3404*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 3405*0a7e5f1fSJoseph Mingrone esac 3406*0a7e5f1fSJoseph Mingrone for ac_exec_ext in '' $ac_executable_extensions; do 3407*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 3408*0a7e5f1fSJoseph Mingrone ac_cv_prog_ac_ct_CC="clang" 3409*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 3410*0a7e5f1fSJoseph Mingrone break 2 3411*0a7e5f1fSJoseph Mingrone fi 3412*0a7e5f1fSJoseph Mingronedone 3413*0a7e5f1fSJoseph Mingrone done 3414*0a7e5f1fSJoseph MingroneIFS=$as_save_IFS 3415*0a7e5f1fSJoseph Mingrone 3416*0a7e5f1fSJoseph Mingronefi 3417*0a7e5f1fSJoseph Mingronefi 3418*0a7e5f1fSJoseph Mingroneac_ct_CC=$ac_cv_prog_ac_ct_CC 3419*0a7e5f1fSJoseph Mingroneif test -n "$ac_ct_CC"; then 3420*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 3421*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_ct_CC" >&6; } 3422*0a7e5f1fSJoseph Mingroneelse 3423*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3424*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 3425*0a7e5f1fSJoseph Mingronefi 3426*0a7e5f1fSJoseph Mingrone 3427*0a7e5f1fSJoseph Mingrone if test "x$ac_ct_CC" = x; then 3428*0a7e5f1fSJoseph Mingrone CC="" 3429*0a7e5f1fSJoseph Mingrone else 3430*0a7e5f1fSJoseph Mingrone case $cross_compiling:$ac_tool_warned in 3431*0a7e5f1fSJoseph Mingroneyes:) 3432*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 3433*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 3434*0a7e5f1fSJoseph Mingroneac_tool_warned=yes ;; 3435*0a7e5f1fSJoseph Mingroneesac 3436*0a7e5f1fSJoseph Mingrone CC=$ac_ct_CC 3437*0a7e5f1fSJoseph Mingrone fi 3438*0a7e5f1fSJoseph Mingroneelse 3439*0a7e5f1fSJoseph Mingrone CC="$ac_cv_prog_CC" 3440*0a7e5f1fSJoseph Mingronefi 3441*0a7e5f1fSJoseph Mingrone 3442*0a7e5f1fSJoseph Mingronefi 3443*0a7e5f1fSJoseph Mingrone 3444*0a7e5f1fSJoseph Mingrone 3445*0a7e5f1fSJoseph Mingronetest -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3446*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 3447*0a7e5f1fSJoseph Mingroneas_fn_error $? "no acceptable C compiler found in \$PATH 3448*0a7e5f1fSJoseph MingroneSee \`config.log' for more details" "$LINENO" 5; } 3449*0a7e5f1fSJoseph Mingrone 3450*0a7e5f1fSJoseph Mingrone# Provide some information about the compiler. 3451*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 3452*0a7e5f1fSJoseph Mingroneset X $ac_compile 3453*0a7e5f1fSJoseph Mingroneac_compiler=$2 3454*0a7e5f1fSJoseph Mingronefor ac_option in --version -v -V -qversion -version; do 3455*0a7e5f1fSJoseph Mingrone { { ac_try="$ac_compiler $ac_option >&5" 3456*0a7e5f1fSJoseph Mingronecase "(($ac_try" in 3457*0a7e5f1fSJoseph Mingrone *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3458*0a7e5f1fSJoseph Mingrone *) ac_try_echo=$ac_try;; 3459*0a7e5f1fSJoseph Mingroneesac 3460*0a7e5f1fSJoseph Mingroneeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3461*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_try_echo"; } >&5 3462*0a7e5f1fSJoseph Mingrone (eval "$ac_compiler $ac_option >&5") 2>conftest.err 3463*0a7e5f1fSJoseph Mingrone ac_status=$? 3464*0a7e5f1fSJoseph Mingrone if test -s conftest.err; then 3465*0a7e5f1fSJoseph Mingrone sed '10a\ 3466*0a7e5f1fSJoseph Mingrone... rest of stderr output deleted ... 3467*0a7e5f1fSJoseph Mingrone 10q' conftest.err >conftest.er1 3468*0a7e5f1fSJoseph Mingrone cat conftest.er1 >&5 3469*0a7e5f1fSJoseph Mingrone fi 3470*0a7e5f1fSJoseph Mingrone rm -f conftest.er1 conftest.err 3471*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3472*0a7e5f1fSJoseph Mingrone test $ac_status = 0; } 3473*0a7e5f1fSJoseph Mingronedone 3474*0a7e5f1fSJoseph Mingrone 3475*0a7e5f1fSJoseph Mingronecat confdefs.h - <<_ACEOF >conftest.$ac_ext 3476*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 3477*0a7e5f1fSJoseph Mingrone 3478*0a7e5f1fSJoseph Mingroneint 3479*0a7e5f1fSJoseph Mingronemain (void) 3480*0a7e5f1fSJoseph Mingrone{ 3481ee67461eSJoseph Mingrone 3482ee67461eSJoseph Mingrone ; 3483ee67461eSJoseph Mingrone return 0; 3484ee67461eSJoseph Mingrone} 3485ee67461eSJoseph Mingrone_ACEOF 3486*0a7e5f1fSJoseph Mingroneac_clean_files_save=$ac_clean_files 3487*0a7e5f1fSJoseph Mingroneac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" 3488*0a7e5f1fSJoseph Mingrone# Try to create an executable without -o first, disregard a.out. 3489*0a7e5f1fSJoseph Mingrone# It will help us diagnose broken compilers, and finding out an intuition 3490*0a7e5f1fSJoseph Mingrone# of exeext. 3491*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 3492*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the C compiler works... " >&6; } 3493*0a7e5f1fSJoseph Mingroneac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 3494*0a7e5f1fSJoseph Mingrone 3495*0a7e5f1fSJoseph Mingrone# The possible output files: 3496*0a7e5f1fSJoseph Mingroneac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" 3497*0a7e5f1fSJoseph Mingrone 3498*0a7e5f1fSJoseph Mingroneac_rmfiles= 3499*0a7e5f1fSJoseph Mingronefor ac_file in $ac_files 3500*0a7e5f1fSJoseph Mingronedo 3501*0a7e5f1fSJoseph Mingrone case $ac_file in 3502*0a7e5f1fSJoseph Mingrone *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 3503*0a7e5f1fSJoseph Mingrone * ) ac_rmfiles="$ac_rmfiles $ac_file";; 3504*0a7e5f1fSJoseph Mingrone esac 3505*0a7e5f1fSJoseph Mingronedone 3506*0a7e5f1fSJoseph Mingronerm -f $ac_rmfiles 3507*0a7e5f1fSJoseph Mingrone 3508*0a7e5f1fSJoseph Mingroneif { { ac_try="$ac_link_default" 3509*0a7e5f1fSJoseph Mingronecase "(($ac_try" in 3510*0a7e5f1fSJoseph Mingrone *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3511*0a7e5f1fSJoseph Mingrone *) ac_try_echo=$ac_try;; 3512*0a7e5f1fSJoseph Mingroneesac 3513*0a7e5f1fSJoseph Mingroneeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3514*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_try_echo"; } >&5 3515*0a7e5f1fSJoseph Mingrone (eval "$ac_link_default") 2>&5 3516*0a7e5f1fSJoseph Mingrone ac_status=$? 3517*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3518*0a7e5f1fSJoseph Mingrone test $ac_status = 0; } 3519*0a7e5f1fSJoseph Mingronethen : 3520*0a7e5f1fSJoseph Mingrone # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. 3521*0a7e5f1fSJoseph Mingrone# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' 3522*0a7e5f1fSJoseph Mingrone# in a Makefile. We should not override ac_cv_exeext if it was cached, 3523*0a7e5f1fSJoseph Mingrone# so that the user can short-circuit this test for compilers unknown to 3524*0a7e5f1fSJoseph Mingrone# Autoconf. 3525*0a7e5f1fSJoseph Mingronefor ac_file in $ac_files '' 3526*0a7e5f1fSJoseph Mingronedo 3527*0a7e5f1fSJoseph Mingrone test -f "$ac_file" || continue 3528*0a7e5f1fSJoseph Mingrone case $ac_file in 3529*0a7e5f1fSJoseph Mingrone *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) 3530*0a7e5f1fSJoseph Mingrone ;; 3531*0a7e5f1fSJoseph Mingrone [ab].out ) 3532*0a7e5f1fSJoseph Mingrone # We found the default executable, but exeext='' is most 3533*0a7e5f1fSJoseph Mingrone # certainly right. 3534*0a7e5f1fSJoseph Mingrone break;; 3535*0a7e5f1fSJoseph Mingrone *.* ) 3536*0a7e5f1fSJoseph Mingrone if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; 3537*0a7e5f1fSJoseph Mingrone then :; else 3538*0a7e5f1fSJoseph Mingrone ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 3539*0a7e5f1fSJoseph Mingrone fi 3540*0a7e5f1fSJoseph Mingrone # We set ac_cv_exeext here because the later test for it is not 3541*0a7e5f1fSJoseph Mingrone # safe: cross compilers may not add the suffix if given an `-o' 3542*0a7e5f1fSJoseph Mingrone # argument, so we may need to know it at that point already. 3543*0a7e5f1fSJoseph Mingrone # Even if this section looks crufty: it has the advantage of 3544*0a7e5f1fSJoseph Mingrone # actually working. 3545*0a7e5f1fSJoseph Mingrone break;; 3546*0a7e5f1fSJoseph Mingrone * ) 3547*0a7e5f1fSJoseph Mingrone break;; 3548*0a7e5f1fSJoseph Mingrone esac 3549*0a7e5f1fSJoseph Mingronedone 3550*0a7e5f1fSJoseph Mingronetest "$ac_cv_exeext" = no && ac_cv_exeext= 3551*0a7e5f1fSJoseph Mingrone 3552*0a7e5f1fSJoseph Mingroneelse $as_nop 3553*0a7e5f1fSJoseph Mingrone ac_file='' 3554*0a7e5f1fSJoseph Mingronefi 3555*0a7e5f1fSJoseph Mingroneif test -z "$ac_file" 3556*0a7e5f1fSJoseph Mingronethen : 3557*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 3558*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 3559*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: failed program was:" >&5 3560*0a7e5f1fSJoseph Mingronesed 's/^/| /' conftest.$ac_ext >&5 3561*0a7e5f1fSJoseph Mingrone 3562*0a7e5f1fSJoseph Mingrone{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3563*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 3564*0a7e5f1fSJoseph Mingroneas_fn_error 77 "C compiler cannot create executables 3565*0a7e5f1fSJoseph MingroneSee \`config.log' for more details" "$LINENO" 5; } 3566*0a7e5f1fSJoseph Mingroneelse $as_nop 3567*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 3568*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 3569*0a7e5f1fSJoseph Mingronefi 3570*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 3571*0a7e5f1fSJoseph Mingroneprintf %s "checking for C compiler default output file name... " >&6; } 3572*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 3573*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_file" >&6; } 3574*0a7e5f1fSJoseph Mingroneac_exeext=$ac_cv_exeext 3575*0a7e5f1fSJoseph Mingrone 3576*0a7e5f1fSJoseph Mingronerm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out 3577*0a7e5f1fSJoseph Mingroneac_clean_files=$ac_clean_files_save 3578*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 3579*0a7e5f1fSJoseph Mingroneprintf %s "checking for suffix of executables... " >&6; } 3580*0a7e5f1fSJoseph Mingroneif { { ac_try="$ac_link" 3581*0a7e5f1fSJoseph Mingronecase "(($ac_try" in 3582*0a7e5f1fSJoseph Mingrone *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3583*0a7e5f1fSJoseph Mingrone *) ac_try_echo=$ac_try;; 3584*0a7e5f1fSJoseph Mingroneesac 3585*0a7e5f1fSJoseph Mingroneeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3586*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_try_echo"; } >&5 3587*0a7e5f1fSJoseph Mingrone (eval "$ac_link") 2>&5 3588*0a7e5f1fSJoseph Mingrone ac_status=$? 3589*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3590*0a7e5f1fSJoseph Mingrone test $ac_status = 0; } 3591*0a7e5f1fSJoseph Mingronethen : 3592*0a7e5f1fSJoseph Mingrone # If both `conftest.exe' and `conftest' are `present' (well, observable) 3593*0a7e5f1fSJoseph Mingrone# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will 3594*0a7e5f1fSJoseph Mingrone# work properly (i.e., refer to `conftest.exe'), while it won't with 3595*0a7e5f1fSJoseph Mingrone# `rm'. 3596*0a7e5f1fSJoseph Mingronefor ac_file in conftest.exe conftest conftest.*; do 3597*0a7e5f1fSJoseph Mingrone test -f "$ac_file" || continue 3598*0a7e5f1fSJoseph Mingrone case $ac_file in 3599*0a7e5f1fSJoseph Mingrone *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 3600*0a7e5f1fSJoseph Mingrone *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 3601*0a7e5f1fSJoseph Mingrone break;; 3602*0a7e5f1fSJoseph Mingrone * ) break;; 3603*0a7e5f1fSJoseph Mingrone esac 3604*0a7e5f1fSJoseph Mingronedone 3605*0a7e5f1fSJoseph Mingroneelse $as_nop 3606*0a7e5f1fSJoseph Mingrone { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3607*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 3608*0a7e5f1fSJoseph Mingroneas_fn_error $? "cannot compute suffix of executables: cannot compile and link 3609*0a7e5f1fSJoseph MingroneSee \`config.log' for more details" "$LINENO" 5; } 3610*0a7e5f1fSJoseph Mingronefi 3611*0a7e5f1fSJoseph Mingronerm -f conftest conftest$ac_cv_exeext 3612*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 3613*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_exeext" >&6; } 3614*0a7e5f1fSJoseph Mingrone 3615*0a7e5f1fSJoseph Mingronerm -f conftest.$ac_ext 3616*0a7e5f1fSJoseph MingroneEXEEXT=$ac_cv_exeext 3617*0a7e5f1fSJoseph Mingroneac_exeext=$EXEEXT 3618*0a7e5f1fSJoseph Mingronecat confdefs.h - <<_ACEOF >conftest.$ac_ext 3619*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 3620*0a7e5f1fSJoseph Mingrone#include <stdio.h> 3621*0a7e5f1fSJoseph Mingroneint 3622*0a7e5f1fSJoseph Mingronemain (void) 3623*0a7e5f1fSJoseph Mingrone{ 3624*0a7e5f1fSJoseph MingroneFILE *f = fopen ("conftest.out", "w"); 3625*0a7e5f1fSJoseph Mingrone return ferror (f) || fclose (f) != 0; 3626*0a7e5f1fSJoseph Mingrone 3627*0a7e5f1fSJoseph Mingrone ; 3628*0a7e5f1fSJoseph Mingrone return 0; 3629*0a7e5f1fSJoseph Mingrone} 3630*0a7e5f1fSJoseph Mingrone_ACEOF 3631*0a7e5f1fSJoseph Mingroneac_clean_files="$ac_clean_files conftest.out" 3632*0a7e5f1fSJoseph Mingrone# Check that the compiler produces executables we can run. If not, either 3633*0a7e5f1fSJoseph Mingrone# the compiler is broken, or we cross compile. 3634*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 3635*0a7e5f1fSJoseph Mingroneprintf %s "checking whether we are cross compiling... " >&6; } 3636*0a7e5f1fSJoseph Mingroneif test "$cross_compiling" != yes; then 3637*0a7e5f1fSJoseph Mingrone { { ac_try="$ac_link" 3638*0a7e5f1fSJoseph Mingronecase "(($ac_try" in 3639*0a7e5f1fSJoseph Mingrone *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3640*0a7e5f1fSJoseph Mingrone *) ac_try_echo=$ac_try;; 3641*0a7e5f1fSJoseph Mingroneesac 3642*0a7e5f1fSJoseph Mingroneeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3643*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_try_echo"; } >&5 3644*0a7e5f1fSJoseph Mingrone (eval "$ac_link") 2>&5 3645*0a7e5f1fSJoseph Mingrone ac_status=$? 3646*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3647*0a7e5f1fSJoseph Mingrone test $ac_status = 0; } 3648*0a7e5f1fSJoseph Mingrone if { ac_try='./conftest$ac_cv_exeext' 3649*0a7e5f1fSJoseph Mingrone { { case "(($ac_try" in 3650*0a7e5f1fSJoseph Mingrone *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3651*0a7e5f1fSJoseph Mingrone *) ac_try_echo=$ac_try;; 3652*0a7e5f1fSJoseph Mingroneesac 3653*0a7e5f1fSJoseph Mingroneeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3654*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_try_echo"; } >&5 3655*0a7e5f1fSJoseph Mingrone (eval "$ac_try") 2>&5 3656*0a7e5f1fSJoseph Mingrone ac_status=$? 3657*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3658*0a7e5f1fSJoseph Mingrone test $ac_status = 0; }; }; then 3659*0a7e5f1fSJoseph Mingrone cross_compiling=no 3660*0a7e5f1fSJoseph Mingrone else 3661*0a7e5f1fSJoseph Mingrone if test "$cross_compiling" = maybe; then 3662*0a7e5f1fSJoseph Mingrone cross_compiling=yes 3663*0a7e5f1fSJoseph Mingrone else 3664*0a7e5f1fSJoseph Mingrone { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3665*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 3666*0a7e5f1fSJoseph Mingroneas_fn_error 77 "cannot run C compiled programs. 3667*0a7e5f1fSJoseph MingroneIf you meant to cross compile, use \`--host'. 3668*0a7e5f1fSJoseph MingroneSee \`config.log' for more details" "$LINENO" 5; } 3669*0a7e5f1fSJoseph Mingrone fi 3670*0a7e5f1fSJoseph Mingrone fi 3671*0a7e5f1fSJoseph Mingronefi 3672*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 3673*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$cross_compiling" >&6; } 3674*0a7e5f1fSJoseph Mingrone 3675*0a7e5f1fSJoseph Mingronerm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out 3676*0a7e5f1fSJoseph Mingroneac_clean_files=$ac_clean_files_save 3677*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 3678*0a7e5f1fSJoseph Mingroneprintf %s "checking for suffix of object files... " >&6; } 3679*0a7e5f1fSJoseph Mingroneif test ${ac_cv_objext+y} 3680*0a7e5f1fSJoseph Mingronethen : 3681*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 3682*0a7e5f1fSJoseph Mingroneelse $as_nop 3683*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3684*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 3685*0a7e5f1fSJoseph Mingrone 3686*0a7e5f1fSJoseph Mingroneint 3687*0a7e5f1fSJoseph Mingronemain (void) 3688*0a7e5f1fSJoseph Mingrone{ 3689*0a7e5f1fSJoseph Mingrone 3690*0a7e5f1fSJoseph Mingrone ; 3691*0a7e5f1fSJoseph Mingrone return 0; 3692*0a7e5f1fSJoseph Mingrone} 3693*0a7e5f1fSJoseph Mingrone_ACEOF 3694*0a7e5f1fSJoseph Mingronerm -f conftest.o conftest.obj 3695*0a7e5f1fSJoseph Mingroneif { { ac_try="$ac_compile" 3696*0a7e5f1fSJoseph Mingronecase "(($ac_try" in 3697*0a7e5f1fSJoseph Mingrone *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3698*0a7e5f1fSJoseph Mingrone *) ac_try_echo=$ac_try;; 3699*0a7e5f1fSJoseph Mingroneesac 3700*0a7e5f1fSJoseph Mingroneeval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 3701*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_try_echo"; } >&5 3702*0a7e5f1fSJoseph Mingrone (eval "$ac_compile") 2>&5 3703*0a7e5f1fSJoseph Mingrone ac_status=$? 3704*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 3705*0a7e5f1fSJoseph Mingrone test $ac_status = 0; } 3706*0a7e5f1fSJoseph Mingronethen : 3707*0a7e5f1fSJoseph Mingrone for ac_file in conftest.o conftest.obj conftest.*; do 3708*0a7e5f1fSJoseph Mingrone test -f "$ac_file" || continue; 3709*0a7e5f1fSJoseph Mingrone case $ac_file in 3710*0a7e5f1fSJoseph Mingrone *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; 3711*0a7e5f1fSJoseph Mingrone *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 3712*0a7e5f1fSJoseph Mingrone break;; 3713*0a7e5f1fSJoseph Mingrone esac 3714*0a7e5f1fSJoseph Mingronedone 3715*0a7e5f1fSJoseph Mingroneelse $as_nop 3716*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me: failed program was:" >&5 3717*0a7e5f1fSJoseph Mingronesed 's/^/| /' conftest.$ac_ext >&5 3718*0a7e5f1fSJoseph Mingrone 3719*0a7e5f1fSJoseph Mingrone{ { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3720*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 3721*0a7e5f1fSJoseph Mingroneas_fn_error $? "cannot compute suffix of object files: cannot compile 3722*0a7e5f1fSJoseph MingroneSee \`config.log' for more details" "$LINENO" 5; } 3723*0a7e5f1fSJoseph Mingronefi 3724*0a7e5f1fSJoseph Mingronerm -f conftest.$ac_cv_objext conftest.$ac_ext 3725*0a7e5f1fSJoseph Mingronefi 3726*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 3727*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_objext" >&6; } 3728*0a7e5f1fSJoseph MingroneOBJEXT=$ac_cv_objext 3729*0a7e5f1fSJoseph Mingroneac_objext=$OBJEXT 3730*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 3731*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports GNU C... " >&6; } 3732*0a7e5f1fSJoseph Mingroneif test ${ac_cv_c_compiler_gnu+y} 3733*0a7e5f1fSJoseph Mingronethen : 3734*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 3735*0a7e5f1fSJoseph Mingroneelse $as_nop 3736*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3737*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 3738*0a7e5f1fSJoseph Mingrone 3739*0a7e5f1fSJoseph Mingroneint 3740*0a7e5f1fSJoseph Mingronemain (void) 3741*0a7e5f1fSJoseph Mingrone{ 3742*0a7e5f1fSJoseph Mingrone#ifndef __GNUC__ 3743*0a7e5f1fSJoseph Mingrone choke me 3744*0a7e5f1fSJoseph Mingrone#endif 3745*0a7e5f1fSJoseph Mingrone 3746*0a7e5f1fSJoseph Mingrone ; 3747*0a7e5f1fSJoseph Mingrone return 0; 3748*0a7e5f1fSJoseph Mingrone} 3749*0a7e5f1fSJoseph Mingrone_ACEOF 3750*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 3751*0a7e5f1fSJoseph Mingronethen : 3752*0a7e5f1fSJoseph Mingrone ac_compiler_gnu=yes 3753*0a7e5f1fSJoseph Mingroneelse $as_nop 3754*0a7e5f1fSJoseph Mingrone ac_compiler_gnu=no 3755*0a7e5f1fSJoseph Mingronefi 3756*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 3757*0a7e5f1fSJoseph Mingroneac_cv_c_compiler_gnu=$ac_compiler_gnu 3758*0a7e5f1fSJoseph Mingrone 3759*0a7e5f1fSJoseph Mingronefi 3760*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 3761*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } 3762*0a7e5f1fSJoseph Mingroneac_compiler_gnu=$ac_cv_c_compiler_gnu 3763*0a7e5f1fSJoseph Mingrone 3764*0a7e5f1fSJoseph Mingroneif test $ac_compiler_gnu = yes; then 3765*0a7e5f1fSJoseph Mingrone GCC=yes 3766*0a7e5f1fSJoseph Mingroneelse 3767*0a7e5f1fSJoseph Mingrone GCC= 3768*0a7e5f1fSJoseph Mingronefi 3769*0a7e5f1fSJoseph Mingroneac_test_CFLAGS=${CFLAGS+y} 3770*0a7e5f1fSJoseph Mingroneac_save_CFLAGS=$CFLAGS 3771*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 3772*0a7e5f1fSJoseph Mingroneprintf %s "checking whether $CC accepts -g... " >&6; } 3773*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_cc_g+y} 3774*0a7e5f1fSJoseph Mingronethen : 3775*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 3776*0a7e5f1fSJoseph Mingroneelse $as_nop 3777*0a7e5f1fSJoseph Mingrone ac_save_c_werror_flag=$ac_c_werror_flag 3778*0a7e5f1fSJoseph Mingrone ac_c_werror_flag=yes 3779*0a7e5f1fSJoseph Mingrone ac_cv_prog_cc_g=no 3780*0a7e5f1fSJoseph Mingrone CFLAGS="-g" 3781*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3782*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 3783*0a7e5f1fSJoseph Mingrone 3784*0a7e5f1fSJoseph Mingroneint 3785*0a7e5f1fSJoseph Mingronemain (void) 3786*0a7e5f1fSJoseph Mingrone{ 3787*0a7e5f1fSJoseph Mingrone 3788*0a7e5f1fSJoseph Mingrone ; 3789*0a7e5f1fSJoseph Mingrone return 0; 3790*0a7e5f1fSJoseph Mingrone} 3791*0a7e5f1fSJoseph Mingrone_ACEOF 3792*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 3793*0a7e5f1fSJoseph Mingronethen : 3794*0a7e5f1fSJoseph Mingrone ac_cv_prog_cc_g=yes 3795*0a7e5f1fSJoseph Mingroneelse $as_nop 3796*0a7e5f1fSJoseph Mingrone CFLAGS="" 3797*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3798*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 3799*0a7e5f1fSJoseph Mingrone 3800*0a7e5f1fSJoseph Mingroneint 3801*0a7e5f1fSJoseph Mingronemain (void) 3802*0a7e5f1fSJoseph Mingrone{ 3803*0a7e5f1fSJoseph Mingrone 3804*0a7e5f1fSJoseph Mingrone ; 3805*0a7e5f1fSJoseph Mingrone return 0; 3806*0a7e5f1fSJoseph Mingrone} 3807*0a7e5f1fSJoseph Mingrone_ACEOF 3808*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 3809*0a7e5f1fSJoseph Mingronethen : 3810*0a7e5f1fSJoseph Mingrone 3811*0a7e5f1fSJoseph Mingroneelse $as_nop 3812*0a7e5f1fSJoseph Mingrone ac_c_werror_flag=$ac_save_c_werror_flag 3813*0a7e5f1fSJoseph Mingrone CFLAGS="-g" 3814*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3815*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 3816*0a7e5f1fSJoseph Mingrone 3817*0a7e5f1fSJoseph Mingroneint 3818*0a7e5f1fSJoseph Mingronemain (void) 3819*0a7e5f1fSJoseph Mingrone{ 3820*0a7e5f1fSJoseph Mingrone 3821*0a7e5f1fSJoseph Mingrone ; 3822*0a7e5f1fSJoseph Mingrone return 0; 3823*0a7e5f1fSJoseph Mingrone} 3824*0a7e5f1fSJoseph Mingrone_ACEOF 3825*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 3826*0a7e5f1fSJoseph Mingronethen : 3827*0a7e5f1fSJoseph Mingrone ac_cv_prog_cc_g=yes 3828*0a7e5f1fSJoseph Mingronefi 3829*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 3830*0a7e5f1fSJoseph Mingronefi 3831*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 3832*0a7e5f1fSJoseph Mingronefi 3833*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 3834*0a7e5f1fSJoseph Mingrone ac_c_werror_flag=$ac_save_c_werror_flag 3835*0a7e5f1fSJoseph Mingronefi 3836*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 3837*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_prog_cc_g" >&6; } 3838*0a7e5f1fSJoseph Mingroneif test $ac_test_CFLAGS; then 3839*0a7e5f1fSJoseph Mingrone CFLAGS=$ac_save_CFLAGS 3840*0a7e5f1fSJoseph Mingroneelif test $ac_cv_prog_cc_g = yes; then 3841*0a7e5f1fSJoseph Mingrone if test "$GCC" = yes; then 3842*0a7e5f1fSJoseph Mingrone CFLAGS="-g -O2" 3843*0a7e5f1fSJoseph Mingrone else 3844*0a7e5f1fSJoseph Mingrone CFLAGS="-g" 3845*0a7e5f1fSJoseph Mingrone fi 3846*0a7e5f1fSJoseph Mingroneelse 3847*0a7e5f1fSJoseph Mingrone if test "$GCC" = yes; then 3848*0a7e5f1fSJoseph Mingrone CFLAGS="-O2" 3849*0a7e5f1fSJoseph Mingrone else 3850*0a7e5f1fSJoseph Mingrone CFLAGS= 3851*0a7e5f1fSJoseph Mingrone fi 3852*0a7e5f1fSJoseph Mingronefi 3853*0a7e5f1fSJoseph Mingroneac_prog_cc_stdc=no 3854*0a7e5f1fSJoseph Mingroneif test x$ac_prog_cc_stdc = xno 3855*0a7e5f1fSJoseph Mingronethen : 3856*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 3857*0a7e5f1fSJoseph Mingroneprintf %s "checking for $CC option to enable C11 features... " >&6; } 3858*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_cc_c11+y} 3859*0a7e5f1fSJoseph Mingronethen : 3860*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 3861*0a7e5f1fSJoseph Mingroneelse $as_nop 3862*0a7e5f1fSJoseph Mingrone ac_cv_prog_cc_c11=no 3863*0a7e5f1fSJoseph Mingroneac_save_CC=$CC 3864*0a7e5f1fSJoseph Mingronecat confdefs.h - <<_ACEOF >conftest.$ac_ext 3865*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 3866*0a7e5f1fSJoseph Mingrone$ac_c_conftest_c11_program 3867*0a7e5f1fSJoseph Mingrone_ACEOF 3868*0a7e5f1fSJoseph Mingronefor ac_arg in '' -std=gnu11 3869ee67461eSJoseph Mingronedo 3870ee67461eSJoseph Mingrone CC="$ac_save_CC $ac_arg" 3871*0a7e5f1fSJoseph Mingrone if ac_fn_c_try_compile "$LINENO" 3872*0a7e5f1fSJoseph Mingronethen : 3873*0a7e5f1fSJoseph Mingrone ac_cv_prog_cc_c11=$ac_arg 3874*0a7e5f1fSJoseph Mingronefi 3875*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam 3876*0a7e5f1fSJoseph Mingrone test "x$ac_cv_prog_cc_c11" != "xno" && break 3877*0a7e5f1fSJoseph Mingronedone 3878*0a7e5f1fSJoseph Mingronerm -f conftest.$ac_ext 3879*0a7e5f1fSJoseph MingroneCC=$ac_save_CC 3880*0a7e5f1fSJoseph Mingronefi 3881*0a7e5f1fSJoseph Mingrone 3882*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_prog_cc_c11" = xno 3883*0a7e5f1fSJoseph Mingronethen : 3884*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 3885*0a7e5f1fSJoseph Mingroneprintf "%s\n" "unsupported" >&6; } 3886*0a7e5f1fSJoseph Mingroneelse $as_nop 3887*0a7e5f1fSJoseph Mingrone if test "x$ac_cv_prog_cc_c11" = x 3888*0a7e5f1fSJoseph Mingronethen : 3889*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 3890*0a7e5f1fSJoseph Mingroneprintf "%s\n" "none needed" >&6; } 3891*0a7e5f1fSJoseph Mingroneelse $as_nop 3892*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 3893*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_prog_cc_c11" >&6; } 3894*0a7e5f1fSJoseph Mingrone CC="$CC $ac_cv_prog_cc_c11" 3895*0a7e5f1fSJoseph Mingronefi 3896*0a7e5f1fSJoseph Mingrone ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 3897*0a7e5f1fSJoseph Mingrone ac_prog_cc_stdc=c11 3898*0a7e5f1fSJoseph Mingronefi 3899*0a7e5f1fSJoseph Mingronefi 3900*0a7e5f1fSJoseph Mingroneif test x$ac_prog_cc_stdc = xno 3901*0a7e5f1fSJoseph Mingronethen : 3902*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 3903*0a7e5f1fSJoseph Mingroneprintf %s "checking for $CC option to enable C99 features... " >&6; } 3904*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_cc_c99+y} 3905*0a7e5f1fSJoseph Mingronethen : 3906*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 3907*0a7e5f1fSJoseph Mingroneelse $as_nop 3908*0a7e5f1fSJoseph Mingrone ac_cv_prog_cc_c99=no 3909*0a7e5f1fSJoseph Mingroneac_save_CC=$CC 3910*0a7e5f1fSJoseph Mingronecat confdefs.h - <<_ACEOF >conftest.$ac_ext 3911*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 3912*0a7e5f1fSJoseph Mingrone$ac_c_conftest_c99_program 3913*0a7e5f1fSJoseph Mingrone_ACEOF 3914*0a7e5f1fSJoseph Mingronefor ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= 3915*0a7e5f1fSJoseph Mingronedo 3916*0a7e5f1fSJoseph Mingrone CC="$ac_save_CC $ac_arg" 3917*0a7e5f1fSJoseph Mingrone if ac_fn_c_try_compile "$LINENO" 3918*0a7e5f1fSJoseph Mingronethen : 3919ee67461eSJoseph Mingrone ac_cv_prog_cc_c99=$ac_arg 3920ee67461eSJoseph Mingronefi 3921*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam 3922ee67461eSJoseph Mingrone test "x$ac_cv_prog_cc_c99" != "xno" && break 3923ee67461eSJoseph Mingronedone 3924ee67461eSJoseph Mingronerm -f conftest.$ac_ext 3925ee67461eSJoseph MingroneCC=$ac_save_CC 3926ee67461eSJoseph Mingronefi 3927*0a7e5f1fSJoseph Mingrone 3928*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_prog_cc_c99" = xno 3929*0a7e5f1fSJoseph Mingronethen : 3930*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 3931*0a7e5f1fSJoseph Mingroneprintf "%s\n" "unsupported" >&6; } 3932*0a7e5f1fSJoseph Mingroneelse $as_nop 3933*0a7e5f1fSJoseph Mingrone if test "x$ac_cv_prog_cc_c99" = x 3934*0a7e5f1fSJoseph Mingronethen : 3935*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 3936*0a7e5f1fSJoseph Mingroneprintf "%s\n" "none needed" >&6; } 3937*0a7e5f1fSJoseph Mingroneelse $as_nop 3938*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 3939*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_prog_cc_c99" >&6; } 3940ee67461eSJoseph Mingrone CC="$CC $ac_cv_prog_cc_c99" 3941ee67461eSJoseph Mingronefi 3942*0a7e5f1fSJoseph Mingrone ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 3943*0a7e5f1fSJoseph Mingrone ac_prog_cc_stdc=c99 3944*0a7e5f1fSJoseph Mingronefi 3945*0a7e5f1fSJoseph Mingronefi 3946*0a7e5f1fSJoseph Mingroneif test x$ac_prog_cc_stdc = xno 3947*0a7e5f1fSJoseph Mingronethen : 3948*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 3949*0a7e5f1fSJoseph Mingroneprintf %s "checking for $CC option to enable C89 features... " >&6; } 3950*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_cc_c89+y} 3951*0a7e5f1fSJoseph Mingronethen : 3952*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 3953*0a7e5f1fSJoseph Mingroneelse $as_nop 3954*0a7e5f1fSJoseph Mingrone ac_cv_prog_cc_c89=no 3955*0a7e5f1fSJoseph Mingroneac_save_CC=$CC 3956*0a7e5f1fSJoseph Mingronecat confdefs.h - <<_ACEOF >conftest.$ac_ext 3957*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 3958*0a7e5f1fSJoseph Mingrone$ac_c_conftest_c89_program 3959*0a7e5f1fSJoseph Mingrone_ACEOF 3960*0a7e5f1fSJoseph Mingronefor ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 3961*0a7e5f1fSJoseph Mingronedo 3962*0a7e5f1fSJoseph Mingrone CC="$ac_save_CC $ac_arg" 3963*0a7e5f1fSJoseph Mingrone if ac_fn_c_try_compile "$LINENO" 3964*0a7e5f1fSJoseph Mingronethen : 3965*0a7e5f1fSJoseph Mingrone ac_cv_prog_cc_c89=$ac_arg 3966*0a7e5f1fSJoseph Mingronefi 3967*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam 3968*0a7e5f1fSJoseph Mingrone test "x$ac_cv_prog_cc_c89" != "xno" && break 3969*0a7e5f1fSJoseph Mingronedone 3970*0a7e5f1fSJoseph Mingronerm -f conftest.$ac_ext 3971*0a7e5f1fSJoseph MingroneCC=$ac_save_CC 3972*0a7e5f1fSJoseph Mingronefi 3973*0a7e5f1fSJoseph Mingrone 3974*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_prog_cc_c89" = xno 3975*0a7e5f1fSJoseph Mingronethen : 3976*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 3977*0a7e5f1fSJoseph Mingroneprintf "%s\n" "unsupported" >&6; } 3978*0a7e5f1fSJoseph Mingroneelse $as_nop 3979*0a7e5f1fSJoseph Mingrone if test "x$ac_cv_prog_cc_c89" = x 3980*0a7e5f1fSJoseph Mingronethen : 3981*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 3982*0a7e5f1fSJoseph Mingroneprintf "%s\n" "none needed" >&6; } 3983*0a7e5f1fSJoseph Mingroneelse $as_nop 3984*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 3985*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_prog_cc_c89" >&6; } 3986*0a7e5f1fSJoseph Mingrone CC="$CC $ac_cv_prog_cc_c89" 3987*0a7e5f1fSJoseph Mingronefi 3988*0a7e5f1fSJoseph Mingrone ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 3989*0a7e5f1fSJoseph Mingrone ac_prog_cc_stdc=c89 3990*0a7e5f1fSJoseph Mingronefi 3991*0a7e5f1fSJoseph Mingronefi 3992*0a7e5f1fSJoseph Mingrone 3993*0a7e5f1fSJoseph Mingroneac_ext=c 3994*0a7e5f1fSJoseph Mingroneac_cpp='$CPP $CPPFLAGS' 3995*0a7e5f1fSJoseph Mingroneac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3996*0a7e5f1fSJoseph Mingroneac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3997*0a7e5f1fSJoseph Mingroneac_compiler_gnu=$ac_cv_c_compiler_gnu 3998ee67461eSJoseph Mingrone 3999ee67461eSJoseph Mingrone 4000ee67461eSJoseph Mingroneif test "$ac_cv_prog_cc_c99" = "no"; then 4001*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: The C compiler does not support C99; there may be compiler errors" >&5 4002*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: WARNING: The C compiler does not support C99; there may be compiler errors" >&2;} 4003ee67461eSJoseph Mingronefi 400427df3f5dSRui Paulo 400527df3f5dSRui Paulo 40064644f044SBill Fenner if test "$GCC" = yes ; then 40073c602fabSXin LI # 40083c602fabSXin LI # -Werror forces warnings to be errors. 40093c602fabSXin LI # 40103c602fabSXin LI ac_lbl_cc_force_warning_errors=-Werror 40114edb46e9SPaul Traina else 40124644f044SBill Fenner V_INCLS="$V_INCLS -I/usr/local/include" 40134644f044SBill Fenner LDFLAGS="$LDFLAGS -L/usr/local/lib" 40144edb46e9SPaul Traina 4015a90e161bSBill Fenner case "$host_os" in 40164edb46e9SPaul Traina 40173c602fabSXin LI darwin*) 40183c602fabSXin LI # 40193c602fabSXin LI # This is assumed either to be GCC or clang, both 40203c602fabSXin LI # of which use -Werror to force warnings to be errors. 40213c602fabSXin LI # 40223c602fabSXin LI ac_lbl_cc_force_warning_errors=-Werror 40233c602fabSXin LI ;; 40243c602fabSXin LI 40253c602fabSXin LI hpux*) 40263c602fabSXin LI # 40273c602fabSXin LI # HP C, which is what we presume we're using, doesn't 40283c602fabSXin LI # exit with a non-zero exit status if we hand it an 40293c602fabSXin LI # invalid -W flag, can't be forced to do so even with 40303c602fabSXin LI # +We, and doesn't handle GCC-style -W flags, so we 40313c602fabSXin LI # don't want to try using GCC-style -W flags. 40323c602fabSXin LI # 40333c602fabSXin LI ac_lbl_cc_dont_try_gcc_dashW=yes 40343c602fabSXin LI ;; 40353c602fabSXin LI 40364edb46e9SPaul Traina irix*) 40373c602fabSXin LI # 40383c602fabSXin LI # MIPS C, which is what we presume we're using, doesn't 40393c602fabSXin LI # necessarily exit with a non-zero exit status if we 40403c602fabSXin LI # hand it an invalid -W flag, can't be forced to do 40413c602fabSXin LI # so, and doesn't handle GCC-style -W flags, so we 40423c602fabSXin LI # don't want to try using GCC-style -W flags. 40433c602fabSXin LI # 40443c602fabSXin LI ac_lbl_cc_dont_try_gcc_dashW=yes 40453c602fabSXin LI # 40463c602fabSXin LI # It also, apparently, defaults to "char" being 40473c602fabSXin LI # unsigned, unlike most other C implementations; 40483c602fabSXin LI # I suppose we could say "signed char" whenever 40493c602fabSXin LI # we want to guarantee a signed "char", but let's 40503c602fabSXin LI # just force signed chars. 40513c602fabSXin LI # 40523c602fabSXin LI # -xansi is normally the default, but the 40533c602fabSXin LI # configure script was setting it; perhaps -cckr 40543c602fabSXin LI # was the default in the Old Days. (Then again, 40553c602fabSXin LI # that would probably be for backwards compatibility 40563c602fabSXin LI # in the days when ANSI C was Shiny and New, i.e. 40573c602fabSXin LI # 1989 and the early '90's, so maybe we can just 40583c602fabSXin LI # drop support for those compilers.) 40593c602fabSXin LI # 40603c602fabSXin LI # -g is equivalent to -g2, which turns off 40613c602fabSXin LI # optimization; we choose -g3, which generates 40623c602fabSXin LI # debugging information but doesn't turn off 40633c602fabSXin LI # optimization (even if the optimization would 40643c602fabSXin LI # cause inaccuracies in debugging). 40653c602fabSXin LI # 40663c602fabSXin LI V_CCOPT="$V_CCOPT -xansi -signed -g3" 40674edb46e9SPaul Traina ;; 40684edb46e9SPaul Traina 40694edb46e9SPaul Traina osf*) 407027df3f5dSRui Paulo # 407127df3f5dSRui Paulo # Presumed to be DEC OSF/1, Digital UNIX, or 407227df3f5dSRui Paulo # Tru64 UNIX. 407327df3f5dSRui Paulo # 40743c602fabSXin LI # The DEC C compiler, which is what we presume we're 40753c602fabSXin LI # using, doesn't exit with a non-zero exit status if we 40763c602fabSXin LI # hand it an invalid -W flag, can't be forced to do 40773c602fabSXin LI # so, and doesn't handle GCC-style -W flags, so we 40783c602fabSXin LI # don't want to try using GCC-style -W flags. 40793c602fabSXin LI # 40803c602fabSXin LI ac_lbl_cc_dont_try_gcc_dashW=yes 40813c602fabSXin LI # 40823c602fabSXin LI # -g is equivalent to -g2, which turns off 40833c602fabSXin LI # optimization; we choose -g3, which generates 40843c602fabSXin LI # debugging information but doesn't turn off 40853c602fabSXin LI # optimization (even if the optimization would 40863c602fabSXin LI # cause inaccuracies in debugging). 40873c602fabSXin LI # 40883c602fabSXin LI V_CCOPT="$V_CCOPT -g3" 40893c602fabSXin LI ;; 40903c602fabSXin LI 40913c602fabSXin LI solaris*) 40923c602fabSXin LI # 40933c602fabSXin LI # Assumed to be Sun C, which requires -errwarn to force 40943c602fabSXin LI # warnings to be treated as errors. 40953c602fabSXin LI # 40963c602fabSXin LI ac_lbl_cc_force_warning_errors=-errwarn 40974edb46e9SPaul Traina ;; 40984edb46e9SPaul Traina 40994edb46e9SPaul Traina ultrix*) 4100*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking that Ultrix $CC hacks const in prototypes" >&5 4101*0a7e5f1fSJoseph Mingroneprintf %s "checking that Ultrix $CC hacks const in prototypes... " >&6; } 4102*0a7e5f1fSJoseph Mingrone if test ${ac_cv_lbl_cc_const_proto+y} 4103*0a7e5f1fSJoseph Mingronethen : 4104*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 4105*0a7e5f1fSJoseph Mingroneelse $as_nop 4106ee67461eSJoseph Mingrone 4107d03c0883SXin LIcat confdefs.h - <<_ACEOF >conftest.$ac_ext 41085b0fe478SBruce M Simpson/* end confdefs.h. */ 41094edb46e9SPaul Traina#include <sys/types.h> 41105b0fe478SBruce M Simpsonint 4111*0a7e5f1fSJoseph Mingronemain (void) 41125b0fe478SBruce M Simpson{ 41134edb46e9SPaul Trainastruct a { int b; }; 41144edb46e9SPaul Traina void c(const struct a *) 41155b0fe478SBruce M Simpson ; 41165b0fe478SBruce M Simpson return 0; 41175b0fe478SBruce M Simpson} 41185b0fe478SBruce M Simpson_ACEOF 4119*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 4120*0a7e5f1fSJoseph Mingronethen : 41214644f044SBill Fenner ac_cv_lbl_cc_const_proto=yes 4122*0a7e5f1fSJoseph Mingroneelse $as_nop 41234644f044SBill Fenner ac_cv_lbl_cc_const_proto=no 41244edb46e9SPaul Trainafi 4125*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 41264edb46e9SPaul Trainafi 41274edb46e9SPaul Traina 4128*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_cc_const_proto" >&5 4129*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_lbl_cc_const_proto" >&6; } 41304644f044SBill Fenner if test $ac_cv_lbl_cc_const_proto = no ; then 413127df3f5dSRui Paulo 4132*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define const /**/" >>confdefs.h 41334edb46e9SPaul Traina 41344edb46e9SPaul Traina fi 41354edb46e9SPaul Traina ;; 41364edb46e9SPaul Traina esac 41373c602fabSXin LI V_CCOPT="$V_CCOPT -O" 41384edb46e9SPaul Traina fi 41394edb46e9SPaul Traina 4140*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 4141*0a7e5f1fSJoseph Mingroneprintf %s "checking for inline... " >&6; } 414227df3f5dSRui Paulo save_CFLAGS="$CFLAGS" 414327df3f5dSRui Paulo CFLAGS="$V_CCOPT" 4144*0a7e5f1fSJoseph Mingrone if test ${ac_cv_lbl_inline+y} 4145*0a7e5f1fSJoseph Mingronethen : 4146*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 4147*0a7e5f1fSJoseph Mingroneelse $as_nop 4148b0453382SBill Fenner 41499afd0c29SBill Fenner ac_cv_lbl_inline="" 41509afd0c29SBill Fenner ac_lbl_cc_inline=no 41519afd0c29SBill Fenner for ac_lbl_inline in inline __inline__ __inline 41529afd0c29SBill Fenner do 4153d03c0883SXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 41545b0fe478SBruce M Simpson/* end confdefs.h. */ 41559afd0c29SBill Fenner#define inline $ac_lbl_inline 41569afd0c29SBill Fenner static inline struct iltest *foo(void); 41579afd0c29SBill Fenner struct iltest { 41589afd0c29SBill Fenner int iltest1; 41599afd0c29SBill Fenner int iltest2; 41609afd0c29SBill Fenner }; 41619afd0c29SBill Fenner 41629afd0c29SBill Fenner static inline struct iltest * 41639afd0c29SBill Fenner foo() 41649afd0c29SBill Fenner { 41659afd0c29SBill Fenner static struct iltest xxx; 41669afd0c29SBill Fenner 41679afd0c29SBill Fenner return &xxx; 41689afd0c29SBill Fenner } 41695b0fe478SBruce M Simpsonint 4170*0a7e5f1fSJoseph Mingronemain (void) 41715b0fe478SBruce M Simpson{ 41729afd0c29SBill Fenner 41735b0fe478SBruce M Simpson ; 41745b0fe478SBruce M Simpson return 0; 41755b0fe478SBruce M Simpson} 41765b0fe478SBruce M Simpson_ACEOF 4177*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 4178*0a7e5f1fSJoseph Mingronethen : 41799afd0c29SBill Fenner ac_lbl_cc_inline=yes 4180b0453382SBill Fennerfi 4181*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 41829afd0c29SBill Fenner if test "$ac_lbl_cc_inline" = yes ; then 41839afd0c29SBill Fenner break; 41849afd0c29SBill Fenner fi 4185b0453382SBill Fenner done 41869afd0c29SBill Fenner if test "$ac_lbl_cc_inline" = yes ; then 41879afd0c29SBill Fenner ac_cv_lbl_inline=$ac_lbl_inline 41889afd0c29SBill Fenner fi 4189b0453382SBill Fennerfi 4190b0453382SBill Fenner 419127df3f5dSRui Paulo CFLAGS="$save_CFLAGS" 41929afd0c29SBill Fenner if test ! -z "$ac_cv_lbl_inline" ; then 4193*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lbl_inline" >&5 4194*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_lbl_inline" >&6; } 41959afd0c29SBill Fenner else 4196*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4197*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 41989afd0c29SBill Fenner fi 41995b0fe478SBruce M Simpson 4200*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define inline $ac_cv_lbl_inline" >>confdefs.h 4201b0453382SBill Fenner 42024edb46e9SPaul Traina 4203*0a7e5f1fSJoseph Mingroneac_header= ac_cache= 4204*0a7e5f1fSJoseph Mingronefor ac_item in $ac_header_c_list 42054edb46e9SPaul Trainado 4206*0a7e5f1fSJoseph Mingrone if test $ac_cache; then 4207*0a7e5f1fSJoseph Mingrone ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" 4208*0a7e5f1fSJoseph Mingrone if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then 4209*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define $ac_item 1" >> confdefs.h 42105b0fe478SBruce M Simpson fi 4211*0a7e5f1fSJoseph Mingrone ac_header= ac_cache= 4212*0a7e5f1fSJoseph Mingrone elif test $ac_header; then 4213*0a7e5f1fSJoseph Mingrone ac_cache=$ac_item 42145b0fe478SBruce M Simpson else 4215*0a7e5f1fSJoseph Mingrone ac_header=$ac_item 42165b0fe478SBruce M Simpson fi 42175b0fe478SBruce M Simpsondone 42185b0fe478SBruce M Simpson 4219*0a7e5f1fSJoseph Mingrone 4220*0a7e5f1fSJoseph Mingrone 4221*0a7e5f1fSJoseph Mingrone 4222*0a7e5f1fSJoseph Mingrone 4223*0a7e5f1fSJoseph Mingrone 4224*0a7e5f1fSJoseph Mingrone 4225*0a7e5f1fSJoseph Mingrone 4226*0a7e5f1fSJoseph Mingroneif test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes 4227*0a7e5f1fSJoseph Mingronethen : 4228*0a7e5f1fSJoseph Mingrone 4229*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h 42305b0fe478SBruce M Simpson 42315b0fe478SBruce M Simpsonfi 4232*0a7e5f1fSJoseph Mingroneac_fn_c_check_header_compile "$LINENO" "rpc/rpc.h" "ac_cv_header_rpc_rpc_h" "$ac_includes_default" 4233*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_header_rpc_rpc_h" = xyes 4234*0a7e5f1fSJoseph Mingronethen : 4235*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_RPC_RPC_H 1" >>confdefs.h 4236*0a7e5f1fSJoseph Mingrone 42375b0fe478SBruce M Simpsonfi 4238*0a7e5f1fSJoseph Mingroneac_fn_c_check_header_compile "$LINENO" "rpc/rpcent.h" "ac_cv_header_rpc_rpcent_h" "$ac_includes_default" 4239*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_header_rpc_rpcent_h" = xyes 4240*0a7e5f1fSJoseph Mingronethen : 4241*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_RPC_RPCENT_H 1" >>confdefs.h 42425b0fe478SBruce M Simpson 42435b0fe478SBruce M Simpsonfi 4244*0a7e5f1fSJoseph Mingroneac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default" 4245*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_header_net_if_h" = xyes 4246*0a7e5f1fSJoseph Mingronethen : 4247*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_NET_IF_H 1" >>confdefs.h 42485b0fe478SBruce M Simpson 42495b0fe478SBruce M Simpsonfi 42505b0fe478SBruce M Simpson 4251*0a7e5f1fSJoseph Mingrone# 4252*0a7e5f1fSJoseph Mingrone# Get the size of a void *, to know whether this is a 32-bit or 64-bit build. 4253*0a7e5f1fSJoseph Mingrone# 4254*0a7e5f1fSJoseph Mingrone# The cast to long int works around a bug in the HP C Compiler 4255*0a7e5f1fSJoseph Mingrone# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 4256*0a7e5f1fSJoseph Mingrone# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 4257*0a7e5f1fSJoseph Mingrone# This bug is HP SR number 8606223364. 4258*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 4259*0a7e5f1fSJoseph Mingroneprintf %s "checking size of void *... " >&6; } 4260*0a7e5f1fSJoseph Mingroneif test ${ac_cv_sizeof_void_p+y} 4261*0a7e5f1fSJoseph Mingronethen : 4262*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 4263*0a7e5f1fSJoseph Mingroneelse $as_nop 4264*0a7e5f1fSJoseph Mingrone if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" 4265*0a7e5f1fSJoseph Mingronethen : 4266d03c0883SXin LI 4267*0a7e5f1fSJoseph Mingroneelse $as_nop 4268*0a7e5f1fSJoseph Mingrone if test "$ac_cv_type_void_p" = yes; then 4269*0a7e5f1fSJoseph Mingrone { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4270*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 4271*0a7e5f1fSJoseph Mingroneas_fn_error 77 "cannot compute sizeof (void *) 4272d03c0883SXin LISee \`config.log' for more details" "$LINENO" 5; } 42735b0fe478SBruce M Simpson else 4274*0a7e5f1fSJoseph Mingrone ac_cv_sizeof_void_p=0 42755b0fe478SBruce M Simpson fi 4276b5bfcb5dSMax Laierfi 4277b5bfcb5dSMax Laier 4278b5bfcb5dSMax Laierfi 4279*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 4280*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_sizeof_void_p" >&6; } 4281b5bfcb5dSMax Laier 4282b5bfcb5dSMax Laier 4283b5bfcb5dSMax Laier 4284*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h 4285b5bfcb5dSMax Laier 4286b5bfcb5dSMax Laier 42875b0fe478SBruce M Simpson 4288*0a7e5f1fSJoseph Mingrone# 4289*0a7e5f1fSJoseph Mingrone# Get the size of a time_t, to know whether it's 32-bit or 64-bit. 4290*0a7e5f1fSJoseph Mingrone# 4291*0a7e5f1fSJoseph Mingrone# The cast to long int works around a bug in the HP C Compiler 4292*0a7e5f1fSJoseph Mingrone# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 4293*0a7e5f1fSJoseph Mingrone# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 4294*0a7e5f1fSJoseph Mingrone# This bug is HP SR number 8606223364. 4295*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of time_t" >&5 4296*0a7e5f1fSJoseph Mingroneprintf %s "checking size of time_t... " >&6; } 4297*0a7e5f1fSJoseph Mingroneif test ${ac_cv_sizeof_time_t+y} 4298*0a7e5f1fSJoseph Mingronethen : 4299*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 4300*0a7e5f1fSJoseph Mingroneelse $as_nop 4301*0a7e5f1fSJoseph Mingrone if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (time_t))" "ac_cv_sizeof_time_t" "#include <time.h> 4302d03c0883SXin LI" 4303*0a7e5f1fSJoseph Mingronethen : 43045b0fe478SBruce M Simpson 4305*0a7e5f1fSJoseph Mingroneelse $as_nop 4306*0a7e5f1fSJoseph Mingrone if test "$ac_cv_type_time_t" = yes; then 4307*0a7e5f1fSJoseph Mingrone { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4308*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 4309*0a7e5f1fSJoseph Mingroneas_fn_error 77 "cannot compute sizeof (time_t) 4310*0a7e5f1fSJoseph MingroneSee \`config.log' for more details" "$LINENO" 5; } 4311*0a7e5f1fSJoseph Mingrone else 4312*0a7e5f1fSJoseph Mingrone ac_cv_sizeof_time_t=0 4313*0a7e5f1fSJoseph Mingrone fi 43145b0fe478SBruce M Simpsonfi 43155b0fe478SBruce M Simpson 43165b0fe478SBruce M Simpsonfi 4317*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_time_t" >&5 4318*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_sizeof_time_t" >&6; } 43195b0fe478SBruce M Simpson 4320*0a7e5f1fSJoseph Mingrone 4321*0a7e5f1fSJoseph Mingrone 4322*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define SIZEOF_TIME_T $ac_cv_sizeof_time_t" >>confdefs.h 4323*0a7e5f1fSJoseph Mingrone 43245b0fe478SBruce M Simpson 43254edb46e9SPaul Traina 4326a90e161bSBill Fennercase "$host_os" in 43274644f044SBill Fenner 4328cac3dcd5SXin LIdarwin*) 4329cac3dcd5SXin LI # Check whether --enable-universal was given. 4330*0a7e5f1fSJoseph Mingroneif test ${enable_universal+y} 4331*0a7e5f1fSJoseph Mingronethen : 4332cac3dcd5SXin LI enableval=$enable_universal; 4333cac3dcd5SXin LIfi 4334cac3dcd5SXin LI 4335cac3dcd5SXin LI if test "$enable_universal" != "no"; then 4336cac3dcd5SXin LI case "$host_os" in 4337cac3dcd5SXin LI 4338cac3dcd5SXin LI darwin9.*) 4339cac3dcd5SXin LI # 4340cac3dcd5SXin LI # Leopard. Build for x86 and 32-bit PowerPC, with 4341cac3dcd5SXin LI # x86 first. (That's what Apple does.) 4342cac3dcd5SXin LI # 4343cac3dcd5SXin LI V_CCOPT="$V_CCOPT -arch i386 -arch ppc" 4344cac3dcd5SXin LI LDFLAGS="$LDFLAGS -arch i386 -arch ppc" 4345cac3dcd5SXin LI ;; 4346cac3dcd5SXin LI 4347cac3dcd5SXin LI darwin10.*) 4348cac3dcd5SXin LI # 4349cac3dcd5SXin LI # Snow Leopard. Build for x86-64 and x86, with 4350cac3dcd5SXin LI # x86-64 first. (That's what Apple does.) 4351cac3dcd5SXin LI # 4352cac3dcd5SXin LI V_CCOPT="$V_CCOPT -arch x86_64 -arch i386" 4353cac3dcd5SXin LI LDFLAGS="$LDFLAGS -arch x86_64 -arch i386" 4354cac3dcd5SXin LI ;; 4355cac3dcd5SXin LI esac 4356cac3dcd5SXin LI fi 4357cac3dcd5SXin LI ;; 43584644f044SBill Fenneresac 43594644f044SBill Fenner 4360*0a7e5f1fSJoseph Mingrone# 4361*0a7e5f1fSJoseph Mingrone# Do we have pkg-config? 4362*0a7e5f1fSJoseph Mingrone# 4363*0a7e5f1fSJoseph Mingrone 4364*0a7e5f1fSJoseph Mingrone 4365*0a7e5f1fSJoseph Mingrone 4366*0a7e5f1fSJoseph Mingrone 4367*0a7e5f1fSJoseph Mingrone 4368*0a7e5f1fSJoseph Mingrone 4369*0a7e5f1fSJoseph Mingrone 4370*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then 4371*0a7e5f1fSJoseph Mingrone if test -n "$ac_tool_prefix"; then 4372*0a7e5f1fSJoseph Mingrone # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. 4373*0a7e5f1fSJoseph Mingroneset dummy ${ac_tool_prefix}pkg-config; ac_word=$2 4374*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4375*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 4376*0a7e5f1fSJoseph Mingroneif test ${ac_cv_path_PKG_CONFIG+y} 4377*0a7e5f1fSJoseph Mingronethen : 4378*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 4379*0a7e5f1fSJoseph Mingroneelse $as_nop 4380*0a7e5f1fSJoseph Mingrone case $PKG_CONFIG in 4381*0a7e5f1fSJoseph Mingrone [\\/]* | ?:[\\/]*) 4382*0a7e5f1fSJoseph Mingrone ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. 4383*0a7e5f1fSJoseph Mingrone ;; 4384*0a7e5f1fSJoseph Mingrone *) 4385*0a7e5f1fSJoseph Mingrone as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4386*0a7e5f1fSJoseph Mingronefor as_dir in $PATH 4387*0a7e5f1fSJoseph Mingronedo 4388*0a7e5f1fSJoseph Mingrone IFS=$as_save_IFS 4389*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 4390*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 4391*0a7e5f1fSJoseph Mingrone */) ;; 4392*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 4393*0a7e5f1fSJoseph Mingrone esac 4394*0a7e5f1fSJoseph Mingrone for ac_exec_ext in '' $ac_executable_extensions; do 4395*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 4396*0a7e5f1fSJoseph Mingrone ac_cv_path_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" 4397*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 4398*0a7e5f1fSJoseph Mingrone break 2 4399*0a7e5f1fSJoseph Mingrone fi 4400*0a7e5f1fSJoseph Mingronedone 4401*0a7e5f1fSJoseph Mingrone done 4402*0a7e5f1fSJoseph MingroneIFS=$as_save_IFS 4403*0a7e5f1fSJoseph Mingrone 4404*0a7e5f1fSJoseph Mingrone ;; 4405*0a7e5f1fSJoseph Mingroneesac 4406*0a7e5f1fSJoseph Mingronefi 4407*0a7e5f1fSJoseph MingronePKG_CONFIG=$ac_cv_path_PKG_CONFIG 4408*0a7e5f1fSJoseph Mingroneif test -n "$PKG_CONFIG"; then 4409*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 4410*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$PKG_CONFIG" >&6; } 4411*0a7e5f1fSJoseph Mingroneelse 4412*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4413*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 4414*0a7e5f1fSJoseph Mingronefi 4415*0a7e5f1fSJoseph Mingrone 4416*0a7e5f1fSJoseph Mingrone 4417*0a7e5f1fSJoseph Mingronefi 4418*0a7e5f1fSJoseph Mingroneif test -z "$ac_cv_path_PKG_CONFIG"; then 4419*0a7e5f1fSJoseph Mingrone ac_pt_PKG_CONFIG=$PKG_CONFIG 4420*0a7e5f1fSJoseph Mingrone # Extract the first word of "pkg-config", so it can be a program name with args. 4421*0a7e5f1fSJoseph Mingroneset dummy pkg-config; ac_word=$2 4422*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4423*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 4424*0a7e5f1fSJoseph Mingroneif test ${ac_cv_path_ac_pt_PKG_CONFIG+y} 4425*0a7e5f1fSJoseph Mingronethen : 4426*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 4427*0a7e5f1fSJoseph Mingroneelse $as_nop 4428*0a7e5f1fSJoseph Mingrone case $ac_pt_PKG_CONFIG in 4429*0a7e5f1fSJoseph Mingrone [\\/]* | ?:[\\/]*) 4430*0a7e5f1fSJoseph Mingrone ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. 4431*0a7e5f1fSJoseph Mingrone ;; 4432*0a7e5f1fSJoseph Mingrone *) 4433*0a7e5f1fSJoseph Mingrone as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4434*0a7e5f1fSJoseph Mingronefor as_dir in $PATH 4435*0a7e5f1fSJoseph Mingronedo 4436*0a7e5f1fSJoseph Mingrone IFS=$as_save_IFS 4437*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 4438*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 4439*0a7e5f1fSJoseph Mingrone */) ;; 4440*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 4441*0a7e5f1fSJoseph Mingrone esac 4442*0a7e5f1fSJoseph Mingrone for ac_exec_ext in '' $ac_executable_extensions; do 4443*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 4444*0a7e5f1fSJoseph Mingrone ac_cv_path_ac_pt_PKG_CONFIG="$as_dir$ac_word$ac_exec_ext" 4445*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 4446*0a7e5f1fSJoseph Mingrone break 2 4447*0a7e5f1fSJoseph Mingrone fi 4448*0a7e5f1fSJoseph Mingronedone 4449*0a7e5f1fSJoseph Mingrone done 4450*0a7e5f1fSJoseph MingroneIFS=$as_save_IFS 4451*0a7e5f1fSJoseph Mingrone 4452*0a7e5f1fSJoseph Mingrone ;; 4453*0a7e5f1fSJoseph Mingroneesac 4454*0a7e5f1fSJoseph Mingronefi 4455*0a7e5f1fSJoseph Mingroneac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG 4456*0a7e5f1fSJoseph Mingroneif test -n "$ac_pt_PKG_CONFIG"; then 4457*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 4458*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_pt_PKG_CONFIG" >&6; } 4459*0a7e5f1fSJoseph Mingroneelse 4460*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4461*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 4462*0a7e5f1fSJoseph Mingronefi 4463*0a7e5f1fSJoseph Mingrone 4464*0a7e5f1fSJoseph Mingrone if test "x$ac_pt_PKG_CONFIG" = x; then 4465*0a7e5f1fSJoseph Mingrone PKG_CONFIG="" 4466*0a7e5f1fSJoseph Mingrone else 4467*0a7e5f1fSJoseph Mingrone case $cross_compiling:$ac_tool_warned in 4468*0a7e5f1fSJoseph Mingroneyes:) 4469*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 4470*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 4471*0a7e5f1fSJoseph Mingroneac_tool_warned=yes ;; 4472*0a7e5f1fSJoseph Mingroneesac 4473*0a7e5f1fSJoseph Mingrone PKG_CONFIG=$ac_pt_PKG_CONFIG 4474*0a7e5f1fSJoseph Mingrone fi 4475*0a7e5f1fSJoseph Mingroneelse 4476*0a7e5f1fSJoseph Mingrone PKG_CONFIG="$ac_cv_path_PKG_CONFIG" 4477*0a7e5f1fSJoseph Mingronefi 4478*0a7e5f1fSJoseph Mingrone 4479*0a7e5f1fSJoseph Mingronefi 4480*0a7e5f1fSJoseph Mingroneif test -n "$PKG_CONFIG"; then 4481*0a7e5f1fSJoseph Mingrone _pkg_min_version=0.17.0 4482*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 4483*0a7e5f1fSJoseph Mingroneprintf %s "checking pkg-config is at least version $_pkg_min_version... " >&6; } 4484*0a7e5f1fSJoseph Mingrone if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then 4485*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4486*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 4487*0a7e5f1fSJoseph Mingrone else 4488*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4489*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 4490*0a7e5f1fSJoseph Mingrone PKG_CONFIG="" 4491*0a7e5f1fSJoseph Mingrone fi 4492*0a7e5f1fSJoseph Mingronefi 4493*0a7e5f1fSJoseph Mingrone 4494*0a7e5f1fSJoseph Mingrone# 4495*0a7e5f1fSJoseph Mingrone# Do we have the brew command from Homebrew? 4496*0a7e5f1fSJoseph Mingrone# 4497*0a7e5f1fSJoseph Mingrone# Extract the first word of "brew", so it can be a program name with args. 4498*0a7e5f1fSJoseph Mingroneset dummy brew; ac_word=$2 4499*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4500*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 4501*0a7e5f1fSJoseph Mingroneif test ${ac_cv_path_BREW+y} 4502*0a7e5f1fSJoseph Mingronethen : 4503*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 4504*0a7e5f1fSJoseph Mingroneelse $as_nop 4505*0a7e5f1fSJoseph Mingrone case $BREW in 4506*0a7e5f1fSJoseph Mingrone [\\/]* | ?:[\\/]*) 4507*0a7e5f1fSJoseph Mingrone ac_cv_path_BREW="$BREW" # Let the user override the test with a path. 4508*0a7e5f1fSJoseph Mingrone ;; 4509*0a7e5f1fSJoseph Mingrone *) 4510*0a7e5f1fSJoseph Mingrone as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4511*0a7e5f1fSJoseph Mingronefor as_dir in $PATH 4512*0a7e5f1fSJoseph Mingronedo 4513*0a7e5f1fSJoseph Mingrone IFS=$as_save_IFS 4514*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 4515*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 4516*0a7e5f1fSJoseph Mingrone */) ;; 4517*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 4518*0a7e5f1fSJoseph Mingrone esac 4519*0a7e5f1fSJoseph Mingrone for ac_exec_ext in '' $ac_executable_extensions; do 4520*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 4521*0a7e5f1fSJoseph Mingrone ac_cv_path_BREW="$as_dir$ac_word$ac_exec_ext" 4522*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 4523*0a7e5f1fSJoseph Mingrone break 2 4524*0a7e5f1fSJoseph Mingrone fi 4525*0a7e5f1fSJoseph Mingronedone 4526*0a7e5f1fSJoseph Mingrone done 4527*0a7e5f1fSJoseph MingroneIFS=$as_save_IFS 4528*0a7e5f1fSJoseph Mingrone 4529*0a7e5f1fSJoseph Mingrone ;; 4530*0a7e5f1fSJoseph Mingroneesac 4531*0a7e5f1fSJoseph Mingronefi 4532*0a7e5f1fSJoseph MingroneBREW=$ac_cv_path_BREW 4533*0a7e5f1fSJoseph Mingroneif test -n "$BREW"; then 4534*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $BREW" >&5 4535*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$BREW" >&6; } 4536*0a7e5f1fSJoseph Mingroneelse 4537*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4538*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 4539*0a7e5f1fSJoseph Mingronefi 4540*0a7e5f1fSJoseph Mingrone 4541*0a7e5f1fSJoseph Mingrone 4542b0453382SBill Fenner 4543b0453382SBill Fenner 454427df3f5dSRui Paulo# Check whether --with-smi was given. 4545*0a7e5f1fSJoseph Mingroneif test ${with_smi+y} 4546*0a7e5f1fSJoseph Mingronethen : 454727df3f5dSRui Paulo withval=$with_smi; 4548*0a7e5f1fSJoseph Mingroneelse $as_nop 454927df3f5dSRui Paulo with_smi=yes 455027df3f5dSRui Paulofi 455127df3f5dSRui Paulo 455227df3f5dSRui Paulo 455327df3f5dSRui Pauloif test "x$with_smi" != "xno" ; then 4554*0a7e5f1fSJoseph Mingrone ac_fn_c_check_header_compile "$LINENO" "smi.h" "ac_cv_header_smi_h" "$ac_includes_default" 4555*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_header_smi_h" = xyes 4556*0a7e5f1fSJoseph Mingronethen : 45575b0fe478SBruce M Simpson 45583c602fabSXin LI # 45593c602fabSXin LI # OK, we found smi.h. Do we have libsmi with smiInit? 45603c602fabSXin LI # 4561*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for smiInit in -lsmi" >&5 4562*0a7e5f1fSJoseph Mingroneprintf %s "checking for smiInit in -lsmi... " >&6; } 4563*0a7e5f1fSJoseph Mingroneif test ${ac_cv_lib_smi_smiInit+y} 4564*0a7e5f1fSJoseph Mingronethen : 4565*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 4566*0a7e5f1fSJoseph Mingroneelse $as_nop 45675b0fe478SBruce M Simpson ac_check_lib_save_LIBS=$LIBS 4568b0453382SBill FennerLIBS="-lsmi $LIBS" 4569d03c0883SXin LIcat confdefs.h - <<_ACEOF >conftest.$ac_ext 45705b0fe478SBruce M Simpson/* end confdefs.h. */ 45715b0fe478SBruce M Simpson 4572b5bfcb5dSMax Laier/* Override any GCC internal prototype to avoid an error. 4573b5bfcb5dSMax Laier Use char because int might match the return type of a GCC 4574b5bfcb5dSMax Laier builtin and then its argument prototype would still apply. */ 4575685295f4SBill Fennerchar smiInit (); 45765b0fe478SBruce M Simpsonint 4577*0a7e5f1fSJoseph Mingronemain (void) 45785b0fe478SBruce M Simpson{ 4579b5bfcb5dSMax Laierreturn smiInit (); 45805b0fe478SBruce M Simpson ; 45815b0fe478SBruce M Simpson return 0; 45825b0fe478SBruce M Simpson} 45835b0fe478SBruce M Simpson_ACEOF 4584*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 4585*0a7e5f1fSJoseph Mingronethen : 45865b0fe478SBruce M Simpson ac_cv_lib_smi_smiInit=yes 4587*0a7e5f1fSJoseph Mingroneelse $as_nop 45885b0fe478SBruce M Simpson ac_cv_lib_smi_smiInit=no 4589b0453382SBill Fennerfi 4590*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 4591b5bfcb5dSMax Laier conftest$ac_exeext conftest.$ac_ext 45925b0fe478SBruce M SimpsonLIBS=$ac_check_lib_save_LIBS 45935b0fe478SBruce M Simpsonfi 4594*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_smi_smiInit" >&5 4595*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_lib_smi_smiInit" >&6; } 4596*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_lib_smi_smiInit" = xyes 4597*0a7e5f1fSJoseph Mingronethen : 4598b0453382SBill Fenner 45993c602fabSXin LI # 46003c602fabSXin LI # OK, we have libsmi with smiInit. Can we use it? 46013c602fabSXin LI # 4602*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable libsmi" >&5 4603*0a7e5f1fSJoseph Mingroneprintf %s "checking whether to enable libsmi... " >&6; } 46043c602fabSXin LI savedlibs="$LIBS" 46053c602fabSXin LI LIBS="-lsmi $LIBS" 4606*0a7e5f1fSJoseph Mingrone if test "$cross_compiling" = yes 4607*0a7e5f1fSJoseph Mingronethen : 46083c602fabSXin LI 4609*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not when cross-compiling" >&5 4610*0a7e5f1fSJoseph Mingroneprintf "%s\n" "not when cross-compiling" >&6; } 46113c602fabSXin LI LIBS="$savedlibs" 46123c602fabSXin LI 4613685295f4SBill Fenner 4614*0a7e5f1fSJoseph Mingroneelse $as_nop 4615d03c0883SXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 46165b0fe478SBruce M Simpson/* end confdefs.h. */ 46173c602fabSXin LI 4618b0453382SBill Fenner/* libsmi available check */ 4619ee67461eSJoseph Mingrone#include <stdio.h> 4620ee67461eSJoseph Mingrone#include <stdlib.h> 4621ee67461eSJoseph Mingrone#include <string.h> 4622b0453382SBill Fenner#include <smi.h> 4623ee67461eSJoseph Mingroneint main() 4624b0453382SBill Fenner{ 4625685295f4SBill Fenner int current, revision, age, n; 4626685295f4SBill Fenner const int required = 2; 4627b0453382SBill Fenner if (smiInit("")) 4628b0453382SBill Fenner exit(1); 4629685295f4SBill Fenner if (strcmp(SMI_LIBRARY_VERSION, smi_library_version)) 4630685295f4SBill Fenner exit(2); 4631685295f4SBill Fenner n = sscanf(smi_library_version, "%d:%d:%d", ¤t, &revision, &age); 4632685295f4SBill Fenner if (n != 3) 4633685295f4SBill Fenner exit(3); 4634685295f4SBill Fenner if (required < current - age || required > current) 4635685295f4SBill Fenner exit(4); 4636b0453382SBill Fenner exit(0); 4637b0453382SBill Fenner} 4638b0453382SBill Fenner 4639*0a7e5f1fSJoseph Mingrone 46405b0fe478SBruce M Simpson_ACEOF 4641*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_run "$LINENO" 4642*0a7e5f1fSJoseph Mingronethen : 46433c602fabSXin LI 4644*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4645*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 4646b0453382SBill Fenner 4647*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define USE_LIBSMI 1" >>confdefs.h 46483c602fabSXin LI 46493c602fabSXin LI 4650*0a7e5f1fSJoseph Mingroneelse $as_nop 46513c602fabSXin LI 4652a90e161bSBill Fenner case $? in 4653*0a7e5f1fSJoseph Mingrone 1) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - smiInit failed" >&5 4654*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no - smiInit failed" >&6; } ;; 4655*0a7e5f1fSJoseph Mingrone 2) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - header/library version mismatch" >&5 4656*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no - header/library version mismatch" >&6; } ;; 4657*0a7e5f1fSJoseph Mingrone 3) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - can't determine library version" >&5 4658*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no - can't determine library version" >&6; } ;; 4659*0a7e5f1fSJoseph Mingrone 4) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no - too old" >&5 4660*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no - too old" >&6; } ;; 4661*0a7e5f1fSJoseph Mingrone *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4662*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } ;; 4663a90e161bSBill Fenner esac 46643c602fabSXin LI LIBS="$savedlibs" 46653c602fabSXin LI 4666b0453382SBill Fennerfi 4667d03c0883SXin LIrm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 4668d03c0883SXin LI conftest.$ac_objext conftest.beam conftest.$ac_ext 4669b0453382SBill Fennerfi 4670b0453382SBill Fenner 46713c602fabSXin LI 4672b5bfcb5dSMax Laierfi 46733c602fabSXin LI 46743c602fabSXin LI 46753c602fabSXin LIfi 46763c602fabSXin LI 467727df3f5dSRui Paulofi 4678b5bfcb5dSMax Laier 4679*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable the instrument functions code" >&5 4680*0a7e5f1fSJoseph Mingroneprintf %s "checking whether to enable the instrument functions code... " >&6; } 4681*0a7e5f1fSJoseph Mingrone# Check whether --enable-instrument-functions was given. 4682*0a7e5f1fSJoseph Mingroneif test ${enable_instrument_functions+y} 4683*0a7e5f1fSJoseph Mingronethen : 4684*0a7e5f1fSJoseph Mingrone enableval=$enable_instrument_functions; 4685*0a7e5f1fSJoseph Mingroneelse $as_nop 468639e421e8SCy Schubert enableval=no 4687b5bfcb5dSMax Laierfi 4688b5bfcb5dSMax Laier 4689a90e161bSBill Fennercase "$enableval" in 4690*0a7e5f1fSJoseph Mingroneyes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4691*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 4692*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bfd_init in -lbfd" >&5 4693*0a7e5f1fSJoseph Mingroneprintf %s "checking for bfd_init in -lbfd... " >&6; } 4694*0a7e5f1fSJoseph Mingroneif test ${ac_cv_lib_bfd_bfd_init+y} 4695*0a7e5f1fSJoseph Mingronethen : 4696*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 4697*0a7e5f1fSJoseph Mingroneelse $as_nop 4698*0a7e5f1fSJoseph Mingrone ac_check_lib_save_LIBS=$LIBS 4699*0a7e5f1fSJoseph MingroneLIBS="-lbfd $LIBS" 4700*0a7e5f1fSJoseph Mingronecat confdefs.h - <<_ACEOF >conftest.$ac_ext 4701*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 47023c602fabSXin LI 4703*0a7e5f1fSJoseph Mingrone/* Override any GCC internal prototype to avoid an error. 4704*0a7e5f1fSJoseph Mingrone Use char because int might match the return type of a GCC 4705*0a7e5f1fSJoseph Mingrone builtin and then its argument prototype would still apply. */ 4706*0a7e5f1fSJoseph Mingronechar bfd_init (); 4707*0a7e5f1fSJoseph Mingroneint 4708*0a7e5f1fSJoseph Mingronemain (void) 4709*0a7e5f1fSJoseph Mingrone{ 4710*0a7e5f1fSJoseph Mingronereturn bfd_init (); 4711*0a7e5f1fSJoseph Mingrone ; 4712*0a7e5f1fSJoseph Mingrone return 0; 4713*0a7e5f1fSJoseph Mingrone} 4714*0a7e5f1fSJoseph Mingrone_ACEOF 4715*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 4716*0a7e5f1fSJoseph Mingronethen : 4717*0a7e5f1fSJoseph Mingrone ac_cv_lib_bfd_bfd_init=yes 4718*0a7e5f1fSJoseph Mingroneelse $as_nop 4719*0a7e5f1fSJoseph Mingrone ac_cv_lib_bfd_bfd_init=no 4720*0a7e5f1fSJoseph Mingronefi 4721*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 4722*0a7e5f1fSJoseph Mingrone conftest$ac_exeext conftest.$ac_ext 4723*0a7e5f1fSJoseph MingroneLIBS=$ac_check_lib_save_LIBS 4724*0a7e5f1fSJoseph Mingronefi 4725*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bfd_bfd_init" >&5 4726*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_lib_bfd_bfd_init" >&6; } 4727*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_lib_bfd_bfd_init" = xyes 4728*0a7e5f1fSJoseph Mingronethen : 4729*0a7e5f1fSJoseph Mingrone true 4730*0a7e5f1fSJoseph Mingroneelse $as_nop 4731*0a7e5f1fSJoseph Mingrone as_fn_error $? "--enable-instrument-functions was given, but test for library libbfd failed. Please install the 'binutils-dev' package." "$LINENO" 5 4732*0a7e5f1fSJoseph Mingronefi 4733*0a7e5f1fSJoseph Mingrone 4734*0a7e5f1fSJoseph Mingrone 4735*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define ENABLE_INSTRUMENT_FUNCTIONS 1" >>confdefs.h 4736*0a7e5f1fSJoseph Mingrone 4737*0a7e5f1fSJoseph Mingrone LOCALSRC="$LOCALSRC instrument-functions.c" 4738*0a7e5f1fSJoseph Mingrone # Add '-finstrument-functions' instrumentation option to generate 4739*0a7e5f1fSJoseph Mingrone # instrumentation calls for entry and exit to functions. 4740*0a7e5f1fSJoseph Mingrone # Try to avoid Address Space Layout Randomization (ALSR). 4741*0a7e5f1fSJoseph Mingrone CFLAGS="$CFLAGS -O0 -ggdb -finstrument-functions -fno-stack-protector -fno-pic" 4742*0a7e5f1fSJoseph Mingrone LDFLAGS="$LDFLAGS -O0 -ggdb -fno-stack-protector -no-pie" 4743*0a7e5f1fSJoseph Mingrone LIBS="$LIBS -lbfd" 4744*0a7e5f1fSJoseph Mingrone ;; 4745*0a7e5f1fSJoseph Mingrone*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4746*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 4747*0a7e5f1fSJoseph Mingrone ;; 4748*0a7e5f1fSJoseph Mingroneesac 4749*0a7e5f1fSJoseph Mingrone 4750*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to enable the possibly-buggy SMB printer" >&5 4751*0a7e5f1fSJoseph Mingroneprintf %s "checking whether to enable the possibly-buggy SMB printer... " >&6; } 4752*0a7e5f1fSJoseph Mingrone# Check whether --enable-smb was given. 4753*0a7e5f1fSJoseph Mingroneif test ${enable_smb+y} 4754*0a7e5f1fSJoseph Mingronethen : 4755*0a7e5f1fSJoseph Mingrone enableval=$enable_smb; 4756*0a7e5f1fSJoseph Mingroneelse $as_nop 4757*0a7e5f1fSJoseph Mingrone enableval=no 4758*0a7e5f1fSJoseph Mingronefi 4759*0a7e5f1fSJoseph Mingrone 4760*0a7e5f1fSJoseph Mingronecase "$enableval" in 4761*0a7e5f1fSJoseph Mingroneyes) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4762*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 4763*0a7e5f1fSJoseph Mingrone 4764*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define ENABLE_SMB 1" >>confdefs.h 4765a90e161bSBill Fenner 4766a90e161bSBill Fenner LOCALSRC="print-smb.c smbutil.c $LOCALSRC" 4767a90e161bSBill Fenner ;; 4768*0a7e5f1fSJoseph Mingrone*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4769*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 4770*0a7e5f1fSJoseph Mingrone ;; 4771*0a7e5f1fSJoseph Mingroneesac 4772*0a7e5f1fSJoseph Mingrone 4773*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to drop root privileges by default" >&5 4774*0a7e5f1fSJoseph Mingroneprintf %s "checking whether to drop root privileges by default... " >&6; } 4775*0a7e5f1fSJoseph Mingrone 4776*0a7e5f1fSJoseph Mingrone# Check whether --with-user was given. 4777*0a7e5f1fSJoseph Mingroneif test ${with_user+y} 4778*0a7e5f1fSJoseph Mingronethen : 4779*0a7e5f1fSJoseph Mingrone withval=$with_user; 4780*0a7e5f1fSJoseph Mingroneelse $as_nop 4781*0a7e5f1fSJoseph Mingrone withval=no 4782*0a7e5f1fSJoseph Mingronefi 4783*0a7e5f1fSJoseph Mingrone 4784*0a7e5f1fSJoseph Mingronecase "$withval" in #( 4785*0a7e5f1fSJoseph Mingrone no) : 4786*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4787*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } ;; #( 4788*0a7e5f1fSJoseph Mingrone ''|yes) : 4789*0a7e5f1fSJoseph Mingrone as_fn_error $? "--with-user requires a username" "$LINENO" 5 ;; #( 4790*0a7e5f1fSJoseph Mingrone *) : 4791*0a7e5f1fSJoseph Mingrone 4792*0a7e5f1fSJoseph Mingrone 4793*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define WITH_USER \"$withval\"" >>confdefs.h 4794*0a7e5f1fSJoseph Mingrone 4795*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, to user \"$withval\"" >&5 4796*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes, to user \"$withval\"" >&6; } 4797*0a7e5f1fSJoseph Mingrone 4798*0a7e5f1fSJoseph Mingrone ;; 4799*0a7e5f1fSJoseph Mingroneesac 4800*0a7e5f1fSJoseph Mingrone 4801*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to chroot" >&5 4802*0a7e5f1fSJoseph Mingroneprintf %s "checking whether to chroot... " >&6; } 4803*0a7e5f1fSJoseph Mingrone 4804*0a7e5f1fSJoseph Mingrone# Check whether --with-chroot was given. 4805*0a7e5f1fSJoseph Mingroneif test ${with_chroot+y} 4806*0a7e5f1fSJoseph Mingronethen : 4807*0a7e5f1fSJoseph Mingrone withval=$with_chroot; 4808*0a7e5f1fSJoseph Mingroneelse $as_nop 4809*0a7e5f1fSJoseph Mingrone withval=no 4810*0a7e5f1fSJoseph Mingrone 4811*0a7e5f1fSJoseph Mingronefi 4812*0a7e5f1fSJoseph Mingrone 4813*0a7e5f1fSJoseph Mingronecase "$withval" in #( 4814*0a7e5f1fSJoseph Mingrone no) : 4815*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4816*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } ;; #( 4817*0a7e5f1fSJoseph Mingrone ''|yes) : 4818*0a7e5f1fSJoseph Mingrone as_fn_error $? "--with-chroot requires a directory" "$LINENO" 5 ;; #( 4819*0a7e5f1fSJoseph Mingrone *) : 4820*0a7e5f1fSJoseph Mingrone 4821*0a7e5f1fSJoseph Mingrone 4822*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define WITH_CHROOT \"$withval\"" >>confdefs.h 4823*0a7e5f1fSJoseph Mingrone 4824*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, to directory \"$withval\"" >&5 4825*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes, to directory \"$withval\"" >&6; } 4826*0a7e5f1fSJoseph Mingrone 4827a90e161bSBill Fenner ;; 4828a90e161bSBill Fenneresac 4829b0453382SBill Fenner 48301de50e9fSSam Leffler 48313c602fabSXin LI# Check whether --with-sandbox-capsicum was given. 4832*0a7e5f1fSJoseph Mingroneif test ${with_sandbox_capsicum+y} 4833*0a7e5f1fSJoseph Mingronethen : 48343c602fabSXin LI withval=$with_sandbox_capsicum; 48353c602fabSXin LIfi 48363c602fabSXin LI 48373c602fabSXin LI# 48383c602fabSXin LI# Check whether various functions are available. If any are, set 48393c602fabSXin LI# ac_lbl_capsicum_function_seen to yes; if any are not, set 48403c602fabSXin LI# ac_lbl_capsicum_function_not_seen to yes. 48413c602fabSXin LI# 48428bdc5a62SPatrick Kelsey# We don't check cap_rights_init(), as it's a macro, wrapping another 48438bdc5a62SPatrick Kelsey# function, in at least some versions of FreeBSD, and AC_CHECK_FUNCS() 48448bdc5a62SPatrick Kelsey# doesn't handle that. 48458bdc5a62SPatrick Kelsey# 48468bdc5a62SPatrick Kelsey# All of the ones we check for must be available in order to enable 48478bdc5a62SPatrick Kelsey# capsicum sandboxing. 48488bdc5a62SPatrick Kelsey# 48498bdc5a62SPatrick Kelsey# XXX - do we need to check for all of them, or are there some that, if 48508bdc5a62SPatrick Kelsey# present, imply others are present? 48513c602fabSXin LI# 4852ee67461eSJoseph Mingroneif test -z "$with_sandbox_capsicum" || test "$with_sandbox_capsicum" != "no" ; then 4853ee67461eSJoseph Mingrone # 4854ee67461eSJoseph Mingrone # First, make sure we have the required header. 4855ee67461eSJoseph Mingrone # 4856*0a7e5f1fSJoseph Mingrone ac_fn_c_check_header_compile "$LINENO" "sys/capsicum.h" "ac_cv_header_sys_capsicum_h" "$ac_includes_default" 4857*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_header_sys_capsicum_h" = xyes 4858*0a7e5f1fSJoseph Mingronethen : 4859ee67461eSJoseph Mingrone 4860ee67461eSJoseph Mingrone # 4861ee67461eSJoseph Mingrone # We do; now make sure we have the required functions. 4862ee67461eSJoseph Mingrone # 4863*0a7e5f1fSJoseph Mingrone 48648bdc5a62SPatrick Kelsey for ac_func in cap_enter cap_rights_limit cap_ioctls_limit openat 48653c602fabSXin LIdo : 4866*0a7e5f1fSJoseph Mingrone as_ac_var=`printf "%s\n" "ac_cv_func_$ac_func" | $as_tr_sh` 48673c602fabSXin LIac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 4868*0a7e5f1fSJoseph Mingroneif eval test \"x\$"$as_ac_var"\" = x"yes" 4869*0a7e5f1fSJoseph Mingronethen : 48703c602fabSXin LI cat >>confdefs.h <<_ACEOF 4871*0a7e5f1fSJoseph Mingrone#define `printf "%s\n" "HAVE_$ac_func" | $as_tr_cpp` 1 48723c602fabSXin LI_ACEOF 48733c602fabSXin LI ac_lbl_capsicum_function_seen=yes 4874*0a7e5f1fSJoseph Mingroneelse $as_nop 48753c602fabSXin LI ac_lbl_capsicum_function_not_seen=yes 48763c602fabSXin LIfi 48773c602fabSXin LI 4878*0a7e5f1fSJoseph Mingronedone 4879ee67461eSJoseph Mingrone 4880ee67461eSJoseph Mingronefi 4881ee67461eSJoseph Mingrone 4882*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cap_init in -lcasper" >&5 4883*0a7e5f1fSJoseph Mingroneprintf %s "checking for cap_init in -lcasper... " >&6; } 4884*0a7e5f1fSJoseph Mingroneif test ${ac_cv_lib_casper_cap_init+y} 4885*0a7e5f1fSJoseph Mingronethen : 4886*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 4887*0a7e5f1fSJoseph Mingroneelse $as_nop 4888ee67461eSJoseph Mingrone ac_check_lib_save_LIBS=$LIBS 4889ee67461eSJoseph MingroneLIBS="-lcasper $LIBS" 4890ee67461eSJoseph Mingronecat confdefs.h - <<_ACEOF >conftest.$ac_ext 4891ee67461eSJoseph Mingrone/* end confdefs.h. */ 4892ee67461eSJoseph Mingrone 4893ee67461eSJoseph Mingrone/* Override any GCC internal prototype to avoid an error. 4894ee67461eSJoseph Mingrone Use char because int might match the return type of a GCC 4895ee67461eSJoseph Mingrone builtin and then its argument prototype would still apply. */ 4896ee67461eSJoseph Mingronechar cap_init (); 4897ee67461eSJoseph Mingroneint 4898*0a7e5f1fSJoseph Mingronemain (void) 4899ee67461eSJoseph Mingrone{ 4900ee67461eSJoseph Mingronereturn cap_init (); 4901ee67461eSJoseph Mingrone ; 4902ee67461eSJoseph Mingrone return 0; 4903ee67461eSJoseph Mingrone} 4904ee67461eSJoseph Mingrone_ACEOF 4905*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 4906*0a7e5f1fSJoseph Mingronethen : 4907ee67461eSJoseph Mingrone ac_cv_lib_casper_cap_init=yes 4908*0a7e5f1fSJoseph Mingroneelse $as_nop 4909ee67461eSJoseph Mingrone ac_cv_lib_casper_cap_init=no 4910ee67461eSJoseph Mingronefi 4911*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 4912ee67461eSJoseph Mingrone conftest$ac_exeext conftest.$ac_ext 4913ee67461eSJoseph MingroneLIBS=$ac_check_lib_save_LIBS 4914ee67461eSJoseph Mingronefi 4915*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_casper_cap_init" >&5 4916*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_lib_casper_cap_init" >&6; } 4917*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_lib_casper_cap_init" = xyes 4918*0a7e5f1fSJoseph Mingronethen : 4919ee67461eSJoseph Mingrone LIBS="$LIBS -lcasper" 4920ee67461eSJoseph Mingronefi 4921ee67461eSJoseph Mingrone 4922*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for cap_gethostbyaddr in -lcap_dns" >&5 4923*0a7e5f1fSJoseph Mingroneprintf %s "checking for cap_gethostbyaddr in -lcap_dns... " >&6; } 4924*0a7e5f1fSJoseph Mingroneif test ${ac_cv_lib_cap_dns_cap_gethostbyaddr+y} 4925*0a7e5f1fSJoseph Mingronethen : 4926*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 4927*0a7e5f1fSJoseph Mingroneelse $as_nop 4928ee67461eSJoseph Mingrone ac_check_lib_save_LIBS=$LIBS 4929ee67461eSJoseph MingroneLIBS="-lcap_dns $LIBS" 4930ee67461eSJoseph Mingronecat confdefs.h - <<_ACEOF >conftest.$ac_ext 4931ee67461eSJoseph Mingrone/* end confdefs.h. */ 4932ee67461eSJoseph Mingrone 4933ee67461eSJoseph Mingrone/* Override any GCC internal prototype to avoid an error. 4934ee67461eSJoseph Mingrone Use char because int might match the return type of a GCC 4935ee67461eSJoseph Mingrone builtin and then its argument prototype would still apply. */ 4936ee67461eSJoseph Mingronechar cap_gethostbyaddr (); 4937ee67461eSJoseph Mingroneint 4938*0a7e5f1fSJoseph Mingronemain (void) 4939ee67461eSJoseph Mingrone{ 4940ee67461eSJoseph Mingronereturn cap_gethostbyaddr (); 4941ee67461eSJoseph Mingrone ; 4942ee67461eSJoseph Mingrone return 0; 4943ee67461eSJoseph Mingrone} 4944ee67461eSJoseph Mingrone_ACEOF 4945*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 4946*0a7e5f1fSJoseph Mingronethen : 4947ee67461eSJoseph Mingrone ac_cv_lib_cap_dns_cap_gethostbyaddr=yes 4948*0a7e5f1fSJoseph Mingroneelse $as_nop 4949ee67461eSJoseph Mingrone ac_cv_lib_cap_dns_cap_gethostbyaddr=no 4950ee67461eSJoseph Mingronefi 4951*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 4952ee67461eSJoseph Mingrone conftest$ac_exeext conftest.$ac_ext 4953ee67461eSJoseph MingroneLIBS=$ac_check_lib_save_LIBS 4954ee67461eSJoseph Mingronefi 4955*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_dns_cap_gethostbyaddr" >&5 4956*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_lib_cap_dns_cap_gethostbyaddr" >&6; } 4957*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_lib_cap_dns_cap_gethostbyaddr" = xyes 4958*0a7e5f1fSJoseph Mingronethen : 4959ee67461eSJoseph Mingrone LIBS="$LIBS -lcap_dns" 4960ee67461eSJoseph Mingronefi 4961ee67461eSJoseph Mingrone 49623c602fabSXin LIfi 4963*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to sandbox using capsicum" >&5 4964*0a7e5f1fSJoseph Mingroneprintf %s "checking whether to sandbox using capsicum... " >&6; } 49653c602fabSXin LIif test "x$ac_lbl_capsicum_function_seen" = "xyes" -a "x$ac_lbl_capsicum_function_not_seen" != "xyes"; then 49663c602fabSXin LI 4967*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define HAVE_CAPSICUM 1" >>confdefs.h 49683c602fabSXin LI 4969*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4970*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 49713c602fabSXin LIelse 4972*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4973*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 49743c602fabSXin LIfi 4975*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to sandbox using Casper library" >&5 4976*0a7e5f1fSJoseph Mingroneprintf %s "checking whether to sandbox using Casper library... " >&6; } 4977ee67461eSJoseph Mingroneif test "x$ac_cv_lib_casper_cap_init" = "xyes" -a "x$ac_cv_lib_cap_dns_cap_gethostbyaddr" = "xyes"; then 4978ee67461eSJoseph Mingrone 4979*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define HAVE_CASPER 1" >>confdefs.h 4980ee67461eSJoseph Mingrone 4981*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4982*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 4983ee67461eSJoseph Mingroneelse 4984*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 4985*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 4986ee67461eSJoseph Mingronefi 49873c602fabSXin LI 49883c602fabSXin LI# 49893340d773SGleb Smirnoff# We must check this before checking whether to check the OS's IPv6, 49903340d773SGleb Smirnoff# support because, on some platforms (such as SunOS 5.x), the test 49913340d773SGleb Smirnoff# program requires the extra networking libraries. 49923c602fabSXin LI# 49933c602fabSXin LI 4994*0a7e5f1fSJoseph Mingrone # Most operating systems have gethostbyaddr() in the default searched 49953c602fabSXin LI # libraries (i.e. libc): 49963c602fabSXin LI # Some OSes (eg. Solaris) place it in libnsl 49973c602fabSXin LI # Some strange OSes (SINIX) have it in libsocket: 4998*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyaddr" >&5 4999*0a7e5f1fSJoseph Mingroneprintf %s "checking for library containing gethostbyaddr... " >&6; } 5000*0a7e5f1fSJoseph Mingroneif test ${ac_cv_search_gethostbyaddr+y} 5001*0a7e5f1fSJoseph Mingronethen : 5002*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 5003*0a7e5f1fSJoseph Mingroneelse $as_nop 50043c602fabSXin LI ac_func_search_save_LIBS=$LIBS 50053c602fabSXin LIcat confdefs.h - <<_ACEOF >conftest.$ac_ext 50063c602fabSXin LI/* end confdefs.h. */ 50073c602fabSXin LI 50083c602fabSXin LI/* Override any GCC internal prototype to avoid an error. 50093c602fabSXin LI Use char because int might match the return type of a GCC 50103c602fabSXin LI builtin and then its argument prototype would still apply. */ 5011*0a7e5f1fSJoseph Mingronechar gethostbyaddr (); 50123c602fabSXin LIint 5013*0a7e5f1fSJoseph Mingronemain (void) 50143c602fabSXin LI{ 5015*0a7e5f1fSJoseph Mingronereturn gethostbyaddr (); 50163c602fabSXin LI ; 50173c602fabSXin LI return 0; 50183c602fabSXin LI} 50193c602fabSXin LI_ACEOF 5020*0a7e5f1fSJoseph Mingronefor ac_lib in '' network nsl socket resolv 5021*0a7e5f1fSJoseph Mingronedo 50223c602fabSXin LI if test -z "$ac_lib"; then 50233c602fabSXin LI ac_res="none required" 50243c602fabSXin LI else 50253c602fabSXin LI ac_res=-l$ac_lib 50263c602fabSXin LI LIBS="-l$ac_lib $ac_func_search_save_LIBS" 50273c602fabSXin LI fi 5028*0a7e5f1fSJoseph Mingrone if ac_fn_c_try_link "$LINENO" 5029*0a7e5f1fSJoseph Mingronethen : 5030*0a7e5f1fSJoseph Mingrone ac_cv_search_gethostbyaddr=$ac_res 50313c602fabSXin LIfi 5032*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 50333c602fabSXin LI conftest$ac_exeext 5034*0a7e5f1fSJoseph Mingrone if test ${ac_cv_search_gethostbyaddr+y} 5035*0a7e5f1fSJoseph Mingronethen : 50363c602fabSXin LI break 50373c602fabSXin LIfi 50383c602fabSXin LIdone 5039*0a7e5f1fSJoseph Mingroneif test ${ac_cv_search_gethostbyaddr+y} 5040*0a7e5f1fSJoseph Mingronethen : 50413c602fabSXin LI 5042*0a7e5f1fSJoseph Mingroneelse $as_nop 5043*0a7e5f1fSJoseph Mingrone ac_cv_search_gethostbyaddr=no 50443c602fabSXin LIfi 50453c602fabSXin LIrm conftest.$ac_ext 50463c602fabSXin LILIBS=$ac_func_search_save_LIBS 50473c602fabSXin LIfi 5048*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyaddr" >&5 5049*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_search_gethostbyaddr" >&6; } 5050*0a7e5f1fSJoseph Mingroneac_res=$ac_cv_search_gethostbyaddr 5051*0a7e5f1fSJoseph Mingroneif test "$ac_res" != no 5052*0a7e5f1fSJoseph Mingronethen : 50533c602fabSXin LI test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 50543c602fabSXin LI 50553c602fabSXin LIfi 50563c602fabSXin LI 50573c602fabSXin LI # Unfortunately libsocket sometimes depends on libnsl and 50583c602fabSXin LI # AC_SEARCH_LIBS isn't up to the task of handling dependencies like this. 5059*0a7e5f1fSJoseph Mingrone if test "$ac_cv_search_gethostbyaddr" = "no" 50603c602fabSXin LI then 5061*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyaddr in -lsocket" >&5 5062*0a7e5f1fSJoseph Mingroneprintf %s "checking for gethostbyaddr in -lsocket... " >&6; } 5063*0a7e5f1fSJoseph Mingroneif test ${ac_cv_lib_socket_gethostbyaddr+y} 5064*0a7e5f1fSJoseph Mingronethen : 5065*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 5066*0a7e5f1fSJoseph Mingroneelse $as_nop 50673c602fabSXin LI ac_check_lib_save_LIBS=$LIBS 50683c602fabSXin LILIBS="-lsocket -lnsl $LIBS" 50693c602fabSXin LIcat confdefs.h - <<_ACEOF >conftest.$ac_ext 50703c602fabSXin LI/* end confdefs.h. */ 50713c602fabSXin LI 50723c602fabSXin LI/* Override any GCC internal prototype to avoid an error. 50733c602fabSXin LI Use char because int might match the return type of a GCC 50743c602fabSXin LI builtin and then its argument prototype would still apply. */ 5075*0a7e5f1fSJoseph Mingronechar gethostbyaddr (); 50763c602fabSXin LIint 5077*0a7e5f1fSJoseph Mingronemain (void) 50783c602fabSXin LI{ 5079*0a7e5f1fSJoseph Mingronereturn gethostbyaddr (); 50803c602fabSXin LI ; 50813c602fabSXin LI return 0; 50823c602fabSXin LI} 50833c602fabSXin LI_ACEOF 5084*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 5085*0a7e5f1fSJoseph Mingronethen : 5086*0a7e5f1fSJoseph Mingrone ac_cv_lib_socket_gethostbyaddr=yes 5087*0a7e5f1fSJoseph Mingroneelse $as_nop 5088*0a7e5f1fSJoseph Mingrone ac_cv_lib_socket_gethostbyaddr=no 50893c602fabSXin LIfi 5090*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 50913c602fabSXin LI conftest$ac_exeext conftest.$ac_ext 50923c602fabSXin LILIBS=$ac_check_lib_save_LIBS 50933c602fabSXin LIfi 5094*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_gethostbyaddr" >&5 5095*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_lib_socket_gethostbyaddr" >&6; } 5096*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_lib_socket_gethostbyaddr" = xyes 5097*0a7e5f1fSJoseph Mingronethen : 50983c602fabSXin LI LIBS="-lsocket -lnsl $LIBS" 50993c602fabSXin LIfi 51003c602fabSXin LI 51013c602fabSXin LI fi 5102*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing socket" >&5 5103*0a7e5f1fSJoseph Mingroneprintf %s "checking for library containing socket... " >&6; } 5104*0a7e5f1fSJoseph Mingroneif test ${ac_cv_search_socket+y} 5105*0a7e5f1fSJoseph Mingronethen : 5106*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 5107*0a7e5f1fSJoseph Mingroneelse $as_nop 51083c602fabSXin LI ac_func_search_save_LIBS=$LIBS 51093c602fabSXin LIcat confdefs.h - <<_ACEOF >conftest.$ac_ext 51103c602fabSXin LI/* end confdefs.h. */ 51113c602fabSXin LI 51123c602fabSXin LI/* Override any GCC internal prototype to avoid an error. 51133c602fabSXin LI Use char because int might match the return type of a GCC 51143c602fabSXin LI builtin and then its argument prototype would still apply. */ 51153c602fabSXin LIchar socket (); 51163c602fabSXin LIint 5117*0a7e5f1fSJoseph Mingronemain (void) 51183c602fabSXin LI{ 51193c602fabSXin LIreturn socket (); 51203c602fabSXin LI ; 51213c602fabSXin LI return 0; 51223c602fabSXin LI} 51233c602fabSXin LI_ACEOF 5124*0a7e5f1fSJoseph Mingronefor ac_lib in '' socket 5125*0a7e5f1fSJoseph Mingronedo 51263c602fabSXin LI if test -z "$ac_lib"; then 51273c602fabSXin LI ac_res="none required" 51283c602fabSXin LI else 51293c602fabSXin LI ac_res=-l$ac_lib 51303c602fabSXin LI LIBS="-l$ac_lib $ac_func_search_save_LIBS" 51313c602fabSXin LI fi 5132*0a7e5f1fSJoseph Mingrone if ac_fn_c_try_link "$LINENO" 5133*0a7e5f1fSJoseph Mingronethen : 51343c602fabSXin LI ac_cv_search_socket=$ac_res 51353c602fabSXin LIfi 5136*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 51373c602fabSXin LI conftest$ac_exeext 5138*0a7e5f1fSJoseph Mingrone if test ${ac_cv_search_socket+y} 5139*0a7e5f1fSJoseph Mingronethen : 51403c602fabSXin LI break 51413c602fabSXin LIfi 51423c602fabSXin LIdone 5143*0a7e5f1fSJoseph Mingroneif test ${ac_cv_search_socket+y} 5144*0a7e5f1fSJoseph Mingronethen : 51453c602fabSXin LI 5146*0a7e5f1fSJoseph Mingroneelse $as_nop 51473c602fabSXin LI ac_cv_search_socket=no 51483c602fabSXin LIfi 51493c602fabSXin LIrm conftest.$ac_ext 51503c602fabSXin LILIBS=$ac_func_search_save_LIBS 51513c602fabSXin LIfi 5152*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socket" >&5 5153*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_search_socket" >&6; } 51543c602fabSXin LIac_res=$ac_cv_search_socket 5155*0a7e5f1fSJoseph Mingroneif test "$ac_res" != no 5156*0a7e5f1fSJoseph Mingronethen : 51573c602fabSXin LI test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 51583c602fabSXin LI 5159*0a7e5f1fSJoseph Mingroneelse $as_nop 5160*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 5161*0a7e5f1fSJoseph Mingroneprintf %s "checking for socket in -lsocket... " >&6; } 5162*0a7e5f1fSJoseph Mingroneif test ${ac_cv_lib_socket_socket+y} 5163*0a7e5f1fSJoseph Mingronethen : 5164*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 5165*0a7e5f1fSJoseph Mingroneelse $as_nop 51663c602fabSXin LI ac_check_lib_save_LIBS=$LIBS 51673c602fabSXin LILIBS="-lsocket -lnsl $LIBS" 51683c602fabSXin LIcat confdefs.h - <<_ACEOF >conftest.$ac_ext 51693c602fabSXin LI/* end confdefs.h. */ 51703c602fabSXin LI 51713c602fabSXin LI/* Override any GCC internal prototype to avoid an error. 51723c602fabSXin LI Use char because int might match the return type of a GCC 51733c602fabSXin LI builtin and then its argument prototype would still apply. */ 51743c602fabSXin LIchar socket (); 51753c602fabSXin LIint 5176*0a7e5f1fSJoseph Mingronemain (void) 51773c602fabSXin LI{ 51783c602fabSXin LIreturn socket (); 51793c602fabSXin LI ; 51803c602fabSXin LI return 0; 51813c602fabSXin LI} 51823c602fabSXin LI_ACEOF 5183*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 5184*0a7e5f1fSJoseph Mingronethen : 51853c602fabSXin LI ac_cv_lib_socket_socket=yes 5186*0a7e5f1fSJoseph Mingroneelse $as_nop 51873c602fabSXin LI ac_cv_lib_socket_socket=no 51883c602fabSXin LIfi 5189*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 51903c602fabSXin LI conftest$ac_exeext conftest.$ac_ext 51913c602fabSXin LILIBS=$ac_check_lib_save_LIBS 51923c602fabSXin LIfi 5193*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 5194*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_lib_socket_socket" >&6; } 5195*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_lib_socket_socket" = xyes 5196*0a7e5f1fSJoseph Mingronethen : 51973c602fabSXin LI LIBS="-lsocket -lnsl $LIBS" 51983c602fabSXin LIfi 51993c602fabSXin LI 52003c602fabSXin LIfi 52013c602fabSXin LI 52023c602fabSXin LI # DLPI needs putmsg under HPUX so test for -lstr while we're at it 5203*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing putmsg" >&5 5204*0a7e5f1fSJoseph Mingroneprintf %s "checking for library containing putmsg... " >&6; } 5205*0a7e5f1fSJoseph Mingroneif test ${ac_cv_search_putmsg+y} 5206*0a7e5f1fSJoseph Mingronethen : 5207*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 5208*0a7e5f1fSJoseph Mingroneelse $as_nop 52093c602fabSXin LI ac_func_search_save_LIBS=$LIBS 52103c602fabSXin LIcat confdefs.h - <<_ACEOF >conftest.$ac_ext 52113c602fabSXin LI/* end confdefs.h. */ 52123c602fabSXin LI 52133c602fabSXin LI/* Override any GCC internal prototype to avoid an error. 52143c602fabSXin LI Use char because int might match the return type of a GCC 52153c602fabSXin LI builtin and then its argument prototype would still apply. */ 52163c602fabSXin LIchar putmsg (); 52173c602fabSXin LIint 5218*0a7e5f1fSJoseph Mingronemain (void) 52193c602fabSXin LI{ 52203c602fabSXin LIreturn putmsg (); 52213c602fabSXin LI ; 52223c602fabSXin LI return 0; 52233c602fabSXin LI} 52243c602fabSXin LI_ACEOF 5225*0a7e5f1fSJoseph Mingronefor ac_lib in '' str 5226*0a7e5f1fSJoseph Mingronedo 52273c602fabSXin LI if test -z "$ac_lib"; then 52283c602fabSXin LI ac_res="none required" 52293c602fabSXin LI else 52303c602fabSXin LI ac_res=-l$ac_lib 52313c602fabSXin LI LIBS="-l$ac_lib $ac_func_search_save_LIBS" 52323c602fabSXin LI fi 5233*0a7e5f1fSJoseph Mingrone if ac_fn_c_try_link "$LINENO" 5234*0a7e5f1fSJoseph Mingronethen : 52353c602fabSXin LI ac_cv_search_putmsg=$ac_res 52363c602fabSXin LIfi 5237*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 52383c602fabSXin LI conftest$ac_exeext 5239*0a7e5f1fSJoseph Mingrone if test ${ac_cv_search_putmsg+y} 5240*0a7e5f1fSJoseph Mingronethen : 52413c602fabSXin LI break 52423c602fabSXin LIfi 52433c602fabSXin LIdone 5244*0a7e5f1fSJoseph Mingroneif test ${ac_cv_search_putmsg+y} 5245*0a7e5f1fSJoseph Mingronethen : 52463c602fabSXin LI 5247*0a7e5f1fSJoseph Mingroneelse $as_nop 52483c602fabSXin LI ac_cv_search_putmsg=no 52493c602fabSXin LIfi 52503c602fabSXin LIrm conftest.$ac_ext 52513c602fabSXin LILIBS=$ac_func_search_save_LIBS 52523c602fabSXin LIfi 5253*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_putmsg" >&5 5254*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_search_putmsg" >&6; } 52553c602fabSXin LIac_res=$ac_cv_search_putmsg 5256*0a7e5f1fSJoseph Mingroneif test "$ac_res" != no 5257*0a7e5f1fSJoseph Mingronethen : 52583c602fabSXin LI test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 52593c602fabSXin LI 52603c602fabSXin LIfi 52613c602fabSXin LI 52623c602fabSXin LI 52633c602fabSXin LI 52643340d773SGleb Smirnoff# 52653340d773SGleb Smirnoff# Check whether AF_INET6 and struct in6_addr are defined. 52663340d773SGleb Smirnoff# If they aren't both defined, we don't have sufficient OS 52673340d773SGleb Smirnoff# support for IPv6, so we don't look for IPv6 support libraries, 52683340d773SGleb Smirnoff# and we define AF_INET6 and struct in6_addr ourselves. 52693340d773SGleb Smirnoff# 5270*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the operating system supports IPv6" >&5 5271*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the operating system supports IPv6... " >&6; } 5272d03c0883SXin LIcat confdefs.h - <<_ACEOF >conftest.$ac_ext 52735b0fe478SBruce M Simpson/* end confdefs.h. */ 52743c602fabSXin LI 52753340d773SGleb Smirnoff 5276ee67461eSJoseph Mingrone#include <string.h> 5277b0453382SBill Fenner/* AF_INET6 available check */ 5278b0453382SBill Fenner#include <sys/types.h> 5279ee67461eSJoseph Mingrone#ifdef _WIN32 5280ee67461eSJoseph Mingrone#include <ws2tcpip.h> 5281ee67461eSJoseph Mingrone#else 5282b0453382SBill Fenner#include <sys/socket.h> 52833c602fabSXin LI#include <netinet/in.h> 5284ee67461eSJoseph Mingrone#endif 52853c602fabSXin LI#ifdef AF_INET6 52863c602fabSXin LIvoid 52873c602fabSXin LIfoo(struct in6_addr *addr) 5288b0453382SBill Fenner{ 52893c602fabSXin LI memset(addr, 0, sizeof (struct in6_addr)); 5290b0453382SBill Fenner} 52913c602fabSXin LI#else 52923c602fabSXin LI#error "AF_INET6 not defined" 52933c602fabSXin LI#endif 52943c602fabSXin LI 5295b0453382SBill Fenner 52965b0fe478SBruce M Simpson_ACEOF 5297*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 5298*0a7e5f1fSJoseph Mingronethen : 52993340d773SGleb Smirnoff 5300*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5301*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 53023c602fabSXin LI 5303*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define HAVE_OS_IPV6_SUPPORT 1" >>confdefs.h 5304b0453382SBill Fenner 5305b0453382SBill Fenner ipv6=yes 53063340d773SGleb Smirnoff 5307*0a7e5f1fSJoseph Mingroneelse $as_nop 53083340d773SGleb Smirnoff 5309*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 5310*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 5311b0453382SBill Fenner ipv6=no 53123340d773SGleb Smirnoff 53133340d773SGleb Smirnoff 5314b0453382SBill Fennerfi 5315*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 5316b0453382SBill Fenner 5317b0453382SBill Fenneripv6type=unknown 5318b0453382SBill Fenneripv6lib=none 5319b0453382SBill Fenneripv6trylibc=no 5320b0453382SBill Fenner 5321b0453382SBill Fennerif test "$ipv6" = "yes"; then 5322*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking ipv6 stack type" >&5 5323*0a7e5f1fSJoseph Mingroneprintf %s "checking ipv6 stack type... " >&6; } 5324b0453382SBill Fenner for i in inria kame linux-glibc linux-libinet6 toshiba v6d zeta; do 5325b0453382SBill Fenner case $i in 5326b0453382SBill Fenner inria) 5327*0a7e5f1fSJoseph Mingrone ac_ext=c 5328*0a7e5f1fSJoseph Mingroneac_cpp='$CPP $CPPFLAGS' 5329*0a7e5f1fSJoseph Mingroneac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 5330*0a7e5f1fSJoseph Mingroneac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 5331*0a7e5f1fSJoseph Mingroneac_compiler_gnu=$ac_cv_c_compiler_gnu 5332*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 5333*0a7e5f1fSJoseph Mingroneprintf %s "checking how to run the C preprocessor... " >&6; } 5334*0a7e5f1fSJoseph Mingrone# On Suns, sometimes $CPP names a directory. 5335*0a7e5f1fSJoseph Mingroneif test -n "$CPP" && test -d "$CPP"; then 5336*0a7e5f1fSJoseph Mingrone CPP= 5337*0a7e5f1fSJoseph Mingronefi 5338*0a7e5f1fSJoseph Mingroneif test -z "$CPP"; then 5339*0a7e5f1fSJoseph Mingrone if test ${ac_cv_prog_CPP+y} 5340*0a7e5f1fSJoseph Mingronethen : 5341*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 5342*0a7e5f1fSJoseph Mingroneelse $as_nop 5343*0a7e5f1fSJoseph Mingrone # Double quotes because $CC needs to be expanded 5344*0a7e5f1fSJoseph Mingrone for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp 5345*0a7e5f1fSJoseph Mingrone do 5346*0a7e5f1fSJoseph Mingrone ac_preproc_ok=false 5347*0a7e5f1fSJoseph Mingronefor ac_c_preproc_warn_flag in '' yes 5348*0a7e5f1fSJoseph Mingronedo 5349*0a7e5f1fSJoseph Mingrone # Use a header file that comes with gcc, so configuring glibc 5350*0a7e5f1fSJoseph Mingrone # with a fresh cross-compiler works. 5351*0a7e5f1fSJoseph Mingrone # On the NeXT, cc -E runs the code through the compiler's parser, 5352*0a7e5f1fSJoseph Mingrone # not just through cpp. "Syntax error" is here to catch this case. 5353*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5354*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 5355*0a7e5f1fSJoseph Mingrone#include <limits.h> 5356*0a7e5f1fSJoseph Mingrone Syntax error 5357*0a7e5f1fSJoseph Mingrone_ACEOF 5358*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_cpp "$LINENO" 5359*0a7e5f1fSJoseph Mingronethen : 5360*0a7e5f1fSJoseph Mingrone 5361*0a7e5f1fSJoseph Mingroneelse $as_nop 5362*0a7e5f1fSJoseph Mingrone # Broken: fails on valid input. 5363*0a7e5f1fSJoseph Mingronecontinue 5364*0a7e5f1fSJoseph Mingronefi 5365*0a7e5f1fSJoseph Mingronerm -f conftest.err conftest.i conftest.$ac_ext 5366*0a7e5f1fSJoseph Mingrone 5367*0a7e5f1fSJoseph Mingrone # OK, works on sane cases. Now check whether nonexistent headers 5368*0a7e5f1fSJoseph Mingrone # can be detected and how. 5369*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5370*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 5371*0a7e5f1fSJoseph Mingrone#include <ac_nonexistent.h> 5372*0a7e5f1fSJoseph Mingrone_ACEOF 5373*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_cpp "$LINENO" 5374*0a7e5f1fSJoseph Mingronethen : 5375*0a7e5f1fSJoseph Mingrone # Broken: success on invalid input. 5376*0a7e5f1fSJoseph Mingronecontinue 5377*0a7e5f1fSJoseph Mingroneelse $as_nop 5378*0a7e5f1fSJoseph Mingrone # Passes both tests. 5379*0a7e5f1fSJoseph Mingroneac_preproc_ok=: 5380*0a7e5f1fSJoseph Mingronebreak 5381*0a7e5f1fSJoseph Mingronefi 5382*0a7e5f1fSJoseph Mingronerm -f conftest.err conftest.i conftest.$ac_ext 5383*0a7e5f1fSJoseph Mingrone 5384*0a7e5f1fSJoseph Mingronedone 5385*0a7e5f1fSJoseph Mingrone# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 5386*0a7e5f1fSJoseph Mingronerm -f conftest.i conftest.err conftest.$ac_ext 5387*0a7e5f1fSJoseph Mingroneif $ac_preproc_ok 5388*0a7e5f1fSJoseph Mingronethen : 5389*0a7e5f1fSJoseph Mingrone break 5390*0a7e5f1fSJoseph Mingronefi 5391*0a7e5f1fSJoseph Mingrone 5392*0a7e5f1fSJoseph Mingrone done 5393*0a7e5f1fSJoseph Mingrone ac_cv_prog_CPP=$CPP 5394*0a7e5f1fSJoseph Mingrone 5395*0a7e5f1fSJoseph Mingronefi 5396*0a7e5f1fSJoseph Mingrone CPP=$ac_cv_prog_CPP 5397*0a7e5f1fSJoseph Mingroneelse 5398*0a7e5f1fSJoseph Mingrone ac_cv_prog_CPP=$CPP 5399*0a7e5f1fSJoseph Mingronefi 5400*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 5401*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$CPP" >&6; } 5402*0a7e5f1fSJoseph Mingroneac_preproc_ok=false 5403*0a7e5f1fSJoseph Mingronefor ac_c_preproc_warn_flag in '' yes 5404*0a7e5f1fSJoseph Mingronedo 5405*0a7e5f1fSJoseph Mingrone # Use a header file that comes with gcc, so configuring glibc 5406*0a7e5f1fSJoseph Mingrone # with a fresh cross-compiler works. 5407*0a7e5f1fSJoseph Mingrone # On the NeXT, cc -E runs the code through the compiler's parser, 5408*0a7e5f1fSJoseph Mingrone # not just through cpp. "Syntax error" is here to catch this case. 5409*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5410*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 5411*0a7e5f1fSJoseph Mingrone#include <limits.h> 5412*0a7e5f1fSJoseph Mingrone Syntax error 5413*0a7e5f1fSJoseph Mingrone_ACEOF 5414*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_cpp "$LINENO" 5415*0a7e5f1fSJoseph Mingronethen : 5416*0a7e5f1fSJoseph Mingrone 5417*0a7e5f1fSJoseph Mingroneelse $as_nop 5418*0a7e5f1fSJoseph Mingrone # Broken: fails on valid input. 5419*0a7e5f1fSJoseph Mingronecontinue 5420*0a7e5f1fSJoseph Mingronefi 5421*0a7e5f1fSJoseph Mingronerm -f conftest.err conftest.i conftest.$ac_ext 5422*0a7e5f1fSJoseph Mingrone 5423*0a7e5f1fSJoseph Mingrone # OK, works on sane cases. Now check whether nonexistent headers 5424*0a7e5f1fSJoseph Mingrone # can be detected and how. 5425*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5426*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 5427*0a7e5f1fSJoseph Mingrone#include <ac_nonexistent.h> 5428*0a7e5f1fSJoseph Mingrone_ACEOF 5429*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_cpp "$LINENO" 5430*0a7e5f1fSJoseph Mingronethen : 5431*0a7e5f1fSJoseph Mingrone # Broken: success on invalid input. 5432*0a7e5f1fSJoseph Mingronecontinue 5433*0a7e5f1fSJoseph Mingroneelse $as_nop 5434*0a7e5f1fSJoseph Mingrone # Passes both tests. 5435*0a7e5f1fSJoseph Mingroneac_preproc_ok=: 5436*0a7e5f1fSJoseph Mingronebreak 5437*0a7e5f1fSJoseph Mingronefi 5438*0a7e5f1fSJoseph Mingronerm -f conftest.err conftest.i conftest.$ac_ext 5439*0a7e5f1fSJoseph Mingrone 5440*0a7e5f1fSJoseph Mingronedone 5441*0a7e5f1fSJoseph Mingrone# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 5442*0a7e5f1fSJoseph Mingronerm -f conftest.i conftest.err conftest.$ac_ext 5443*0a7e5f1fSJoseph Mingroneif $ac_preproc_ok 5444*0a7e5f1fSJoseph Mingronethen : 5445*0a7e5f1fSJoseph Mingrone 5446*0a7e5f1fSJoseph Mingroneelse $as_nop 5447*0a7e5f1fSJoseph Mingrone { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 5448*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 5449*0a7e5f1fSJoseph Mingroneas_fn_error $? "C preprocessor \"$CPP\" fails sanity check 5450*0a7e5f1fSJoseph MingroneSee \`config.log' for more details" "$LINENO" 5; } 5451*0a7e5f1fSJoseph Mingronefi 5452*0a7e5f1fSJoseph Mingrone 5453*0a7e5f1fSJoseph Mingroneac_ext=c 5454*0a7e5f1fSJoseph Mingroneac_cpp='$CPP $CPPFLAGS' 5455*0a7e5f1fSJoseph Mingroneac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 5456*0a7e5f1fSJoseph Mingroneac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 5457*0a7e5f1fSJoseph Mingroneac_compiler_gnu=$ac_cv_c_compiler_gnu 5458*0a7e5f1fSJoseph Mingrone 5459*0a7e5f1fSJoseph Mingrone 5460*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 5461*0a7e5f1fSJoseph Mingroneprintf %s "checking for grep that handles long lines and -e... " >&6; } 5462*0a7e5f1fSJoseph Mingroneif test ${ac_cv_path_GREP+y} 5463*0a7e5f1fSJoseph Mingronethen : 5464*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 5465*0a7e5f1fSJoseph Mingroneelse $as_nop 5466*0a7e5f1fSJoseph Mingrone if test -z "$GREP"; then 5467*0a7e5f1fSJoseph Mingrone ac_path_GREP_found=false 5468*0a7e5f1fSJoseph Mingrone # Loop through the user's path and test for each of PROGNAME-LIST 5469*0a7e5f1fSJoseph Mingrone as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5470*0a7e5f1fSJoseph Mingronefor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 5471*0a7e5f1fSJoseph Mingronedo 5472*0a7e5f1fSJoseph Mingrone IFS=$as_save_IFS 5473*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 5474*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 5475*0a7e5f1fSJoseph Mingrone */) ;; 5476*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 5477*0a7e5f1fSJoseph Mingrone esac 5478*0a7e5f1fSJoseph Mingrone for ac_prog in grep ggrep 5479*0a7e5f1fSJoseph Mingrone do 5480*0a7e5f1fSJoseph Mingrone for ac_exec_ext in '' $ac_executable_extensions; do 5481*0a7e5f1fSJoseph Mingrone ac_path_GREP="$as_dir$ac_prog$ac_exec_ext" 5482*0a7e5f1fSJoseph Mingrone as_fn_executable_p "$ac_path_GREP" || continue 5483*0a7e5f1fSJoseph Mingrone# Check for GNU ac_path_GREP and select it if it is found. 5484*0a7e5f1fSJoseph Mingrone # Check for GNU $ac_path_GREP 5485*0a7e5f1fSJoseph Mingronecase `"$ac_path_GREP" --version 2>&1` in 5486*0a7e5f1fSJoseph Mingrone*GNU*) 5487*0a7e5f1fSJoseph Mingrone ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; 5488*0a7e5f1fSJoseph Mingrone*) 5489*0a7e5f1fSJoseph Mingrone ac_count=0 5490*0a7e5f1fSJoseph Mingrone printf %s 0123456789 >"conftest.in" 5491*0a7e5f1fSJoseph Mingrone while : 5492*0a7e5f1fSJoseph Mingrone do 5493*0a7e5f1fSJoseph Mingrone cat "conftest.in" "conftest.in" >"conftest.tmp" 5494*0a7e5f1fSJoseph Mingrone mv "conftest.tmp" "conftest.in" 5495*0a7e5f1fSJoseph Mingrone cp "conftest.in" "conftest.nl" 5496*0a7e5f1fSJoseph Mingrone printf "%s\n" 'GREP' >> "conftest.nl" 5497*0a7e5f1fSJoseph Mingrone "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break 5498*0a7e5f1fSJoseph Mingrone diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 5499*0a7e5f1fSJoseph Mingrone as_fn_arith $ac_count + 1 && ac_count=$as_val 5500*0a7e5f1fSJoseph Mingrone if test $ac_count -gt ${ac_path_GREP_max-0}; then 5501*0a7e5f1fSJoseph Mingrone # Best one so far, save it but keep looking for a better one 5502*0a7e5f1fSJoseph Mingrone ac_cv_path_GREP="$ac_path_GREP" 5503*0a7e5f1fSJoseph Mingrone ac_path_GREP_max=$ac_count 5504*0a7e5f1fSJoseph Mingrone fi 5505*0a7e5f1fSJoseph Mingrone # 10*(2^10) chars as input seems more than enough 5506*0a7e5f1fSJoseph Mingrone test $ac_count -gt 10 && break 5507*0a7e5f1fSJoseph Mingrone done 5508*0a7e5f1fSJoseph Mingrone rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 5509*0a7e5f1fSJoseph Mingroneesac 5510*0a7e5f1fSJoseph Mingrone 5511*0a7e5f1fSJoseph Mingrone $ac_path_GREP_found && break 3 5512*0a7e5f1fSJoseph Mingrone done 5513*0a7e5f1fSJoseph Mingrone done 5514*0a7e5f1fSJoseph Mingrone done 5515*0a7e5f1fSJoseph MingroneIFS=$as_save_IFS 5516*0a7e5f1fSJoseph Mingrone if test -z "$ac_cv_path_GREP"; then 5517*0a7e5f1fSJoseph Mingrone as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 5518*0a7e5f1fSJoseph Mingrone fi 5519*0a7e5f1fSJoseph Mingroneelse 5520*0a7e5f1fSJoseph Mingrone ac_cv_path_GREP=$GREP 5521*0a7e5f1fSJoseph Mingronefi 5522*0a7e5f1fSJoseph Mingrone 5523*0a7e5f1fSJoseph Mingronefi 5524*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 5525*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_path_GREP" >&6; } 5526*0a7e5f1fSJoseph Mingrone GREP="$ac_cv_path_GREP" 5527*0a7e5f1fSJoseph Mingrone 5528*0a7e5f1fSJoseph Mingrone 5529*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 5530*0a7e5f1fSJoseph Mingroneprintf %s "checking for egrep... " >&6; } 5531*0a7e5f1fSJoseph Mingroneif test ${ac_cv_path_EGREP+y} 5532*0a7e5f1fSJoseph Mingronethen : 5533*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 5534*0a7e5f1fSJoseph Mingroneelse $as_nop 5535*0a7e5f1fSJoseph Mingrone if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 5536*0a7e5f1fSJoseph Mingrone then ac_cv_path_EGREP="$GREP -E" 5537*0a7e5f1fSJoseph Mingrone else 5538*0a7e5f1fSJoseph Mingrone if test -z "$EGREP"; then 5539*0a7e5f1fSJoseph Mingrone ac_path_EGREP_found=false 5540*0a7e5f1fSJoseph Mingrone # Loop through the user's path and test for each of PROGNAME-LIST 5541*0a7e5f1fSJoseph Mingrone as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5542*0a7e5f1fSJoseph Mingronefor as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 5543*0a7e5f1fSJoseph Mingronedo 5544*0a7e5f1fSJoseph Mingrone IFS=$as_save_IFS 5545*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 5546*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 5547*0a7e5f1fSJoseph Mingrone */) ;; 5548*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 5549*0a7e5f1fSJoseph Mingrone esac 5550*0a7e5f1fSJoseph Mingrone for ac_prog in egrep 5551*0a7e5f1fSJoseph Mingrone do 5552*0a7e5f1fSJoseph Mingrone for ac_exec_ext in '' $ac_executable_extensions; do 5553*0a7e5f1fSJoseph Mingrone ac_path_EGREP="$as_dir$ac_prog$ac_exec_ext" 5554*0a7e5f1fSJoseph Mingrone as_fn_executable_p "$ac_path_EGREP" || continue 5555*0a7e5f1fSJoseph Mingrone# Check for GNU ac_path_EGREP and select it if it is found. 5556*0a7e5f1fSJoseph Mingrone # Check for GNU $ac_path_EGREP 5557*0a7e5f1fSJoseph Mingronecase `"$ac_path_EGREP" --version 2>&1` in 5558*0a7e5f1fSJoseph Mingrone*GNU*) 5559*0a7e5f1fSJoseph Mingrone ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; 5560*0a7e5f1fSJoseph Mingrone*) 5561*0a7e5f1fSJoseph Mingrone ac_count=0 5562*0a7e5f1fSJoseph Mingrone printf %s 0123456789 >"conftest.in" 5563*0a7e5f1fSJoseph Mingrone while : 5564*0a7e5f1fSJoseph Mingrone do 5565*0a7e5f1fSJoseph Mingrone cat "conftest.in" "conftest.in" >"conftest.tmp" 5566*0a7e5f1fSJoseph Mingrone mv "conftest.tmp" "conftest.in" 5567*0a7e5f1fSJoseph Mingrone cp "conftest.in" "conftest.nl" 5568*0a7e5f1fSJoseph Mingrone printf "%s\n" 'EGREP' >> "conftest.nl" 5569*0a7e5f1fSJoseph Mingrone "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break 5570*0a7e5f1fSJoseph Mingrone diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 5571*0a7e5f1fSJoseph Mingrone as_fn_arith $ac_count + 1 && ac_count=$as_val 5572*0a7e5f1fSJoseph Mingrone if test $ac_count -gt ${ac_path_EGREP_max-0}; then 5573*0a7e5f1fSJoseph Mingrone # Best one so far, save it but keep looking for a better one 5574*0a7e5f1fSJoseph Mingrone ac_cv_path_EGREP="$ac_path_EGREP" 5575*0a7e5f1fSJoseph Mingrone ac_path_EGREP_max=$ac_count 5576*0a7e5f1fSJoseph Mingrone fi 5577*0a7e5f1fSJoseph Mingrone # 10*(2^10) chars as input seems more than enough 5578*0a7e5f1fSJoseph Mingrone test $ac_count -gt 10 && break 5579*0a7e5f1fSJoseph Mingrone done 5580*0a7e5f1fSJoseph Mingrone rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 5581*0a7e5f1fSJoseph Mingroneesac 5582*0a7e5f1fSJoseph Mingrone 5583*0a7e5f1fSJoseph Mingrone $ac_path_EGREP_found && break 3 5584*0a7e5f1fSJoseph Mingrone done 5585*0a7e5f1fSJoseph Mingrone done 5586*0a7e5f1fSJoseph Mingrone done 5587*0a7e5f1fSJoseph MingroneIFS=$as_save_IFS 5588*0a7e5f1fSJoseph Mingrone if test -z "$ac_cv_path_EGREP"; then 5589*0a7e5f1fSJoseph Mingrone as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 5590*0a7e5f1fSJoseph Mingrone fi 5591*0a7e5f1fSJoseph Mingroneelse 5592*0a7e5f1fSJoseph Mingrone ac_cv_path_EGREP=$EGREP 5593*0a7e5f1fSJoseph Mingronefi 5594*0a7e5f1fSJoseph Mingrone 5595*0a7e5f1fSJoseph Mingrone fi 5596*0a7e5f1fSJoseph Mingronefi 5597*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 5598*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_path_EGREP" >&6; } 5599*0a7e5f1fSJoseph Mingrone EGREP="$ac_cv_path_EGREP" 5600*0a7e5f1fSJoseph Mingrone 5601*0a7e5f1fSJoseph Mingrone 5602d03c0883SXin LIcat confdefs.h - <<_ACEOF >conftest.$ac_ext 56035b0fe478SBruce M Simpson/* end confdefs.h. */ 5604b0453382SBill Fenner#include <netinet/in.h> 5605b0453382SBill Fenner#ifdef IPV6_INRIA_VERSION 5606b0453382SBill Fenneryes 5607b0453382SBill Fenner#endif 56085b0fe478SBruce M Simpson_ACEOF 5609b0453382SBill Fennerif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 5610*0a7e5f1fSJoseph Mingrone $EGREP "yes" >/dev/null 2>&1 5611*0a7e5f1fSJoseph Mingronethen : 56123340d773SGleb Smirnoff ipv6type=$i 5613b0453382SBill Fennerfi 5614*0a7e5f1fSJoseph Mingronerm -rf conftest* 5615b0453382SBill Fenner 5616b0453382SBill Fenner ;; 5617b0453382SBill Fenner kame) 5618d03c0883SXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 56195b0fe478SBruce M Simpson/* end confdefs.h. */ 5620b0453382SBill Fenner#include <netinet/in.h> 5621b0453382SBill Fenner#ifdef __KAME__ 5622b0453382SBill Fenneryes 5623b0453382SBill Fenner#endif 56245b0fe478SBruce M Simpson_ACEOF 5625b0453382SBill Fennerif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 5626*0a7e5f1fSJoseph Mingrone $EGREP "yes" >/dev/null 2>&1 5627*0a7e5f1fSJoseph Mingronethen : 5628b0453382SBill Fenner ipv6type=$i; 5629b0453382SBill Fenner ipv6lib=inet6; 5630b0453382SBill Fenner ipv6libdir=/usr/local/v6/lib; 56313340d773SGleb Smirnoff ipv6trylibc=yes 5632b0453382SBill Fennerfi 5633*0a7e5f1fSJoseph Mingronerm -rf conftest* 5634b0453382SBill Fenner 5635b0453382SBill Fenner ;; 5636b0453382SBill Fenner linux-glibc) 5637d03c0883SXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 56385b0fe478SBruce M Simpson/* end confdefs.h. */ 5639b0453382SBill Fenner#include <features.h> 5640b0453382SBill Fenner#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1 5641b0453382SBill Fenneryes 5642b0453382SBill Fenner#endif 56435b0fe478SBruce M Simpson_ACEOF 5644b0453382SBill Fennerif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 5645*0a7e5f1fSJoseph Mingrone $EGREP "yes" >/dev/null 2>&1 5646*0a7e5f1fSJoseph Mingronethen : 56473340d773SGleb Smirnoff ipv6type=$i 5648b0453382SBill Fennerfi 5649*0a7e5f1fSJoseph Mingronerm -rf conftest* 5650b0453382SBill Fenner 5651b0453382SBill Fenner ;; 5652b0453382SBill Fenner linux-libinet6) 5653b0453382SBill Fenner if test -d /usr/inet6 -o -f /usr/include/netinet/ip6.h; then 5654b0453382SBill Fenner ipv6type=$i 5655b0453382SBill Fenner ipv6lib=inet6 5656b0453382SBill Fenner ipv6libdir=/usr/inet6/lib 5657b0453382SBill Fenner ipv6trylibc=yes; 56583340d773SGleb Smirnoff CFLAGS="-I/usr/inet6/include $CFLAGS" 5659b0453382SBill Fenner fi 5660b0453382SBill Fenner ;; 5661b0453382SBill Fenner toshiba) 5662d03c0883SXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 56635b0fe478SBruce M Simpson/* end confdefs.h. */ 5664b0453382SBill Fenner#include <sys/param.h> 5665b0453382SBill Fenner#ifdef _TOSHIBA_INET6 5666b0453382SBill Fenneryes 5667b0453382SBill Fenner#endif 56685b0fe478SBruce M Simpson_ACEOF 5669b0453382SBill Fennerif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 5670*0a7e5f1fSJoseph Mingrone $EGREP "yes" >/dev/null 2>&1 5671*0a7e5f1fSJoseph Mingronethen : 5672b0453382SBill Fenner ipv6type=$i; 5673b0453382SBill Fenner ipv6lib=inet6; 56743340d773SGleb Smirnoff ipv6libdir=/usr/local/v6/lib 5675b0453382SBill Fennerfi 5676*0a7e5f1fSJoseph Mingronerm -rf conftest* 5677b0453382SBill Fenner 5678b0453382SBill Fenner ;; 5679b0453382SBill Fenner v6d) 5680d03c0883SXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 56815b0fe478SBruce M Simpson/* end confdefs.h. */ 5682b0453382SBill Fenner#include </usr/local/v6/include/sys/v6config.h> 5683b0453382SBill Fenner#ifdef __V6D__ 5684b0453382SBill Fenneryes 5685b0453382SBill Fenner#endif 56865b0fe478SBruce M Simpson_ACEOF 5687b0453382SBill Fennerif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 5688*0a7e5f1fSJoseph Mingrone $EGREP "yes" >/dev/null 2>&1 5689*0a7e5f1fSJoseph Mingronethen : 5690b0453382SBill Fenner ipv6type=$i; 5691b0453382SBill Fenner ipv6lib=v6; 5692b0453382SBill Fenner ipv6libdir=/usr/local/v6/lib; 5693b0453382SBill Fenner CFLAGS="-I/usr/local/v6/include $CFLAGS" 5694b0453382SBill Fennerfi 5695*0a7e5f1fSJoseph Mingronerm -rf conftest* 5696b0453382SBill Fenner 5697b0453382SBill Fenner ;; 5698b0453382SBill Fenner zeta) 5699d03c0883SXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 57005b0fe478SBruce M Simpson/* end confdefs.h. */ 5701b0453382SBill Fenner#include <sys/param.h> 5702b0453382SBill Fenner#ifdef _ZETA_MINAMI_INET6 5703b0453382SBill Fenneryes 5704b0453382SBill Fenner#endif 57055b0fe478SBruce M Simpson_ACEOF 5706b0453382SBill Fennerif (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 5707*0a7e5f1fSJoseph Mingrone $EGREP "yes" >/dev/null 2>&1 5708*0a7e5f1fSJoseph Mingronethen : 5709b0453382SBill Fenner ipv6type=$i; 5710b0453382SBill Fenner ipv6lib=inet6; 57113340d773SGleb Smirnoff ipv6libdir=/usr/local/v6/lib 5712b0453382SBill Fennerfi 5713*0a7e5f1fSJoseph Mingronerm -rf conftest* 5714b0453382SBill Fenner 5715b0453382SBill Fenner ;; 5716b0453382SBill Fenner esac 5717b0453382SBill Fenner if test "$ipv6type" != "unknown"; then 5718b0453382SBill Fenner break 5719b0453382SBill Fenner fi 5720b0453382SBill Fenner done 5721*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ipv6type" >&5 5722*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ipv6type" >&6; } 5723b0453382SBill Fennerfi 5724b0453382SBill Fenner 5725b0453382SBill Fennerif test "$ipv6" = "yes" -a "$ipv6lib" != "none"; then 5726b0453382SBill Fenner if test -d $ipv6libdir -a -f $ipv6libdir/lib$ipv6lib.a; then 5727b0453382SBill Fenner LIBS="-L$ipv6libdir -l$ipv6lib $LIBS" 5728b0453382SBill Fenner echo "You have $ipv6lib library, using it" 5729b0453382SBill Fenner else 5730b0453382SBill Fenner if test "$ipv6trylibc" = "yes"; then 5731b0453382SBill Fenner echo "You do not have $ipv6lib library, using libc" 5732b0453382SBill Fenner else 5733b0453382SBill Fenner echo 'Fatal: no $ipv6lib library found. cannot continue.' 5734b0453382SBill Fenner echo "You need to fetch lib$ipv6lib.a from appropriate" 5735b0453382SBill Fenner echo 'ipv6 kit and compile beforehand.' 5736b0453382SBill Fenner exit 1 5737b0453382SBill Fenner fi 5738b0453382SBill Fenner fi 5739b0453382SBill Fennerfi 5740b0453382SBill Fenner 5741d03c0883SXin LIac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" 5742*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_strlcat" = xyes 5743*0a7e5f1fSJoseph Mingronethen : 5744*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h 5745d03c0883SXin LI 5746*0a7e5f1fSJoseph Mingroneelse $as_nop 5747d03c0883SXin LI case " $LIBOBJS " in 5748d03c0883SXin LI *" strlcat.$ac_objext "* ) ;; 5749d03c0883SXin LI *) LIBOBJS="$LIBOBJS strlcat.$ac_objext" 5750d03c0883SXin LI ;; 5751d03c0883SXin LIesac 5752d03c0883SXin LI 5753d03c0883SXin LIfi 5754d03c0883SXin LIac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" 5755*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_strlcpy" = xyes 5756*0a7e5f1fSJoseph Mingronethen : 5757*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h 5758d03c0883SXin LI 5759*0a7e5f1fSJoseph Mingroneelse $as_nop 5760d03c0883SXin LI case " $LIBOBJS " in 5761d03c0883SXin LI *" strlcpy.$ac_objext "* ) ;; 5762d03c0883SXin LI *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext" 5763d03c0883SXin LI ;; 5764d03c0883SXin LIesac 5765d03c0883SXin LI 5766d03c0883SXin LIfi 5767d03c0883SXin LIac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" 5768*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_strdup" = xyes 5769*0a7e5f1fSJoseph Mingronethen : 5770*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h 5771d03c0883SXin LI 5772*0a7e5f1fSJoseph Mingroneelse $as_nop 5773d03c0883SXin LI case " $LIBOBJS " in 5774d03c0883SXin LI *" strdup.$ac_objext "* ) ;; 5775d03c0883SXin LI *) LIBOBJS="$LIBOBJS strdup.$ac_objext" 5776d03c0883SXin LI ;; 5777d03c0883SXin LIesac 5778d03c0883SXin LI 5779d03c0883SXin LIfi 5780d03c0883SXin LIac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep" 5781*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_strsep" = xyes 5782*0a7e5f1fSJoseph Mingronethen : 5783*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_STRSEP 1" >>confdefs.h 5784d03c0883SXin LI 5785*0a7e5f1fSJoseph Mingroneelse $as_nop 5786d03c0883SXin LI case " $LIBOBJS " in 5787d03c0883SXin LI *" strsep.$ac_objext "* ) ;; 5788d03c0883SXin LI *) LIBOBJS="$LIBOBJS strsep.$ac_objext" 5789d03c0883SXin LI ;; 5790d03c0883SXin LIesac 5791d03c0883SXin LI 5792d03c0883SXin LIfi 5793ee67461eSJoseph Mingroneac_fn_c_check_func "$LINENO" "getservent" "ac_cv_func_getservent" 5794*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_getservent" = xyes 5795*0a7e5f1fSJoseph Mingronethen : 5796*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_GETSERVENT 1" >>confdefs.h 5797ee67461eSJoseph Mingrone 5798*0a7e5f1fSJoseph Mingroneelse $as_nop 5799ee67461eSJoseph Mingrone case " $LIBOBJS " in 5800ee67461eSJoseph Mingrone *" getservent.$ac_objext "* ) ;; 5801ee67461eSJoseph Mingrone *) LIBOBJS="$LIBOBJS getservent.$ac_objext" 5802ee67461eSJoseph Mingrone ;; 5803ee67461eSJoseph Mingroneesac 5804ee67461eSJoseph Mingrone 5805ee67461eSJoseph Mingronefi 58063c602fabSXin LIac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" 5807*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_getopt_long" = xyes 5808*0a7e5f1fSJoseph Mingronethen : 5809*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_GETOPT_LONG 1" >>confdefs.h 58103c602fabSXin LI 5811*0a7e5f1fSJoseph Mingroneelse $as_nop 58123c602fabSXin LI case " $LIBOBJS " in 58133c602fabSXin LI *" getopt_long.$ac_objext "* ) ;; 58143c602fabSXin LI *) LIBOBJS="$LIBOBJS getopt_long.$ac_objext" 58153c602fabSXin LI ;; 58163c602fabSXin LIesac 58173c602fabSXin LI 58183c602fabSXin LIfi 58193c602fabSXin LI 5820*0a7e5f1fSJoseph Mingroneac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork" 5821*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_fork" = xyes 5822*0a7e5f1fSJoseph Mingronethen : 5823*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_FORK 1" >>confdefs.h 58245b0fe478SBruce M Simpson 5825b0453382SBill Fennerfi 5826*0a7e5f1fSJoseph Mingroneac_fn_c_check_func "$LINENO" "vfork" "ac_cv_func_vfork" 5827*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_vfork" = xyes 5828*0a7e5f1fSJoseph Mingronethen : 5829*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_VFORK 1" >>confdefs.h 5830b0453382SBill Fenner 5831*0a7e5f1fSJoseph Mingronefi 5832*0a7e5f1fSJoseph Mingrone 5833ee67461eSJoseph Mingroneac_fn_c_check_func "$LINENO" "setlinebuf" "ac_cv_func_setlinebuf" 5834*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_setlinebuf" = xyes 5835*0a7e5f1fSJoseph Mingronethen : 5836*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_SETLINEBUF 1" >>confdefs.h 5837a90e161bSBill Fenner 5838a90e161bSBill Fennerfi 5839a90e161bSBill Fenner 5840a90e161bSBill Fenner 5841ee67461eSJoseph Mingrone# 5842*0a7e5f1fSJoseph Mingrone# Make sure we have snprintf(); we require it. 5843ee67461eSJoseph Mingrone# 5844ee67461eSJoseph Mingroneac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" 5845*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_snprintf" = xyes 5846*0a7e5f1fSJoseph Mingronethen : 5847b5bfcb5dSMax Laier 5848*0a7e5f1fSJoseph Mingroneelse $as_nop 5849ee67461eSJoseph Mingrone as_fn_error $? "snprintf() is required but wasn't found" "$LINENO" 5 5850685295f4SBill Fennerfi 5851685295f4SBill Fenner 58524de76e31SBill Fenner 5853ee67461eSJoseph Mingrone# 5854*0a7e5f1fSJoseph Mingrone# It became apparent at some point that using a suitable C99 compiler does not 5855*0a7e5f1fSJoseph Mingrone# automatically mean snprintf(3) implementation in the libc supports all the 5856*0a7e5f1fSJoseph Mingrone# modifiers and specifiers used in the project, so let's test that before the 5857*0a7e5f1fSJoseph Mingrone# build, not after. 5858ee67461eSJoseph Mingrone# 5859*0a7e5f1fSJoseph Mingrone# Testing the sizeof_t length modifier takes making an snprintf() call and 5860*0a7e5f1fSJoseph Mingrone# comparing the actual result with the expected result. If this fails, it will 5861*0a7e5f1fSJoseph Mingrone# most likely happen at run time, not compile time. 5862*0a7e5f1fSJoseph Mingrone# 5863*0a7e5f1fSJoseph Mingrone# Testing the 64-bit conversion specifiers in addition to that requires the 5864*0a7e5f1fSJoseph Mingrone# <inttypes.h> header to be present and the macros to be defined, so if this 5865*0a7e5f1fSJoseph Mingrone# fails, it will more likely happen at compile time. 5866*0a7e5f1fSJoseph Mingrone# 5867*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether snprintf is suitable" >&5 5868*0a7e5f1fSJoseph Mingroneprintf %s "checking whether snprintf is suitable... " >&6; } 5869*0a7e5f1fSJoseph Mingroneif test "$cross_compiling" = yes 5870*0a7e5f1fSJoseph Mingronethen : 5871ee67461eSJoseph Mingrone 5872*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not while cross-compiling" >&5 5873*0a7e5f1fSJoseph Mingroneprintf "%s\n" "not while cross-compiling" >&6; } 5874ee67461eSJoseph Mingrone 5875ee67461eSJoseph Mingrone 5876*0a7e5f1fSJoseph Mingroneelse $as_nop 5877d03c0883SXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 58785b0fe478SBruce M Simpson/* end confdefs.h. */ 58794edb46e9SPaul Traina 5880ee67461eSJoseph Mingrone 5881ee67461eSJoseph Mingrone#include <stdio.h> 5882ee67461eSJoseph Mingrone#include <string.h> 5883*0a7e5f1fSJoseph Mingrone#include <inttypes.h> 5884*0a7e5f1fSJoseph Mingrone#include <sys/types.h> 5885ee67461eSJoseph Mingrone 5886ee67461eSJoseph Mingroneint main() 58875b0fe478SBruce M Simpson{ 5888ee67461eSJoseph Mingrone char buf[100]; 5889*0a7e5f1fSJoseph Mingrone uint64_t t = (uint64_t)1 << 32; 5890*0a7e5f1fSJoseph Mingrone 5891ee67461eSJoseph Mingrone snprintf(buf, sizeof(buf), "%zu", sizeof(buf)); 5892*0a7e5f1fSJoseph Mingrone if (strncmp(buf, "100", sizeof(buf))) 5893*0a7e5f1fSJoseph Mingrone return 1; 5894*0a7e5f1fSJoseph Mingrone 5895*0a7e5f1fSJoseph Mingrone snprintf(buf, sizeof(buf), "%zd", -sizeof(buf)); 5896*0a7e5f1fSJoseph Mingrone if (strncmp(buf, "-100", sizeof(buf))) 5897*0a7e5f1fSJoseph Mingrone return 2; 5898*0a7e5f1fSJoseph Mingrone 5899*0a7e5f1fSJoseph Mingrone snprintf(buf, sizeof(buf), "%" PRId64, -t); 5900*0a7e5f1fSJoseph Mingrone if (strncmp(buf, "-4294967296", sizeof(buf))) 5901*0a7e5f1fSJoseph Mingrone return 3; 5902*0a7e5f1fSJoseph Mingrone 5903*0a7e5f1fSJoseph Mingrone snprintf(buf, sizeof(buf), "0o%" PRIo64, t); 5904*0a7e5f1fSJoseph Mingrone if (strncmp(buf, "0o40000000000", sizeof(buf))) 5905*0a7e5f1fSJoseph Mingrone return 4; 5906*0a7e5f1fSJoseph Mingrone 5907*0a7e5f1fSJoseph Mingrone snprintf(buf, sizeof(buf), "0x%" PRIx64, t); 5908*0a7e5f1fSJoseph Mingrone if (strncmp(buf, "0x100000000", sizeof(buf))) 5909*0a7e5f1fSJoseph Mingrone return 5; 5910*0a7e5f1fSJoseph Mingrone 5911*0a7e5f1fSJoseph Mingrone snprintf(buf, sizeof(buf), "%" PRIu64, t); 5912*0a7e5f1fSJoseph Mingrone if (strncmp(buf, "4294967296", sizeof(buf))) 5913*0a7e5f1fSJoseph Mingrone return 6; 5914*0a7e5f1fSJoseph Mingrone 5915*0a7e5f1fSJoseph Mingrone return 0; 59165b0fe478SBruce M Simpson} 5917ee67461eSJoseph Mingrone 5918ee67461eSJoseph Mingrone 59195b0fe478SBruce M Simpson_ACEOF 5920*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_run "$LINENO" 5921*0a7e5f1fSJoseph Mingronethen : 59224edb46e9SPaul Traina 5923*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 5924*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 59254edb46e9SPaul Traina 5926*0a7e5f1fSJoseph Mingroneelse $as_nop 592727df3f5dSRui Paulo 5928*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 5929*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 5930*0a7e5f1fSJoseph Mingrone as_fn_error $? "The snprintf(3) implementation in this libc is not suitable, 5931*0a7e5f1fSJoseph Mingronetcpdump would not work correctly even if it managed to compile." "$LINENO" 5 59324edb46e9SPaul Traina 59334edb46e9SPaul Trainafi 5934ee67461eSJoseph Mingronerm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 5935ee67461eSJoseph Mingrone conftest.$ac_objext conftest.beam conftest.$ac_ext 59364edb46e9SPaul Trainafi 59374edb46e9SPaul Traina 59384644f044SBill Fenner 5939*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lrpc" >&5 5940*0a7e5f1fSJoseph Mingroneprintf %s "checking for main in -lrpc... " >&6; } 5941*0a7e5f1fSJoseph Mingroneif test ${ac_cv_lib_rpc_main+y} 5942*0a7e5f1fSJoseph Mingronethen : 5943*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 5944*0a7e5f1fSJoseph Mingroneelse $as_nop 59455b0fe478SBruce M Simpson ac_check_lib_save_LIBS=$LIBS 59465b0fe478SBruce M SimpsonLIBS="-lrpc $LIBS" 5947d03c0883SXin LIcat confdefs.h - <<_ACEOF >conftest.$ac_ext 59485b0fe478SBruce M Simpson/* end confdefs.h. */ 59495b0fe478SBruce M Simpson 59505b0fe478SBruce M Simpson 59515b0fe478SBruce M Simpsonint 5952*0a7e5f1fSJoseph Mingronemain (void) 59535b0fe478SBruce M Simpson{ 5954b5bfcb5dSMax Laierreturn main (); 59555b0fe478SBruce M Simpson ; 59565b0fe478SBruce M Simpson return 0; 59575b0fe478SBruce M Simpson} 59585b0fe478SBruce M Simpson_ACEOF 5959*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 5960*0a7e5f1fSJoseph Mingronethen : 59615b0fe478SBruce M Simpson ac_cv_lib_rpc_main=yes 5962*0a7e5f1fSJoseph Mingroneelse $as_nop 59635b0fe478SBruce M Simpson ac_cv_lib_rpc_main=no 59645b0fe478SBruce M Simpsonfi 5965*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 5966b5bfcb5dSMax Laier conftest$ac_exeext conftest.$ac_ext 59675b0fe478SBruce M SimpsonLIBS=$ac_check_lib_save_LIBS 59685b0fe478SBruce M Simpsonfi 5969*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rpc_main" >&5 5970*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_lib_rpc_main" >&6; } 5971*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_lib_rpc_main" = xyes 5972*0a7e5f1fSJoseph Mingronethen : 5973*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_LIBRPC 1" >>confdefs.h 59745b0fe478SBruce M Simpson 59755b0fe478SBruce M Simpson LIBS="-lrpc $LIBS" 59765b0fe478SBruce M Simpson 59775b0fe478SBruce M Simpsonfi 59785b0fe478SBruce M Simpson 5979*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing getrpcbynumber" >&5 5980*0a7e5f1fSJoseph Mingroneprintf %s "checking for library containing getrpcbynumber... " >&6; } 5981*0a7e5f1fSJoseph Mingroneif test ${ac_cv_search_getrpcbynumber+y} 5982*0a7e5f1fSJoseph Mingronethen : 5983*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 5984*0a7e5f1fSJoseph Mingroneelse $as_nop 59855b0fe478SBruce M Simpson ac_func_search_save_LIBS=$LIBS 5986d03c0883SXin LIcat confdefs.h - <<_ACEOF >conftest.$ac_ext 59875b0fe478SBruce M Simpson/* end confdefs.h. */ 59885b0fe478SBruce M Simpson 5989b5bfcb5dSMax Laier/* Override any GCC internal prototype to avoid an error. 5990b5bfcb5dSMax Laier Use char because int might match the return type of a GCC 5991b5bfcb5dSMax Laier builtin and then its argument prototype would still apply. */ 59925b0fe478SBruce M Simpsonchar getrpcbynumber (); 59935b0fe478SBruce M Simpsonint 5994*0a7e5f1fSJoseph Mingronemain (void) 59955b0fe478SBruce M Simpson{ 5996b5bfcb5dSMax Laierreturn getrpcbynumber (); 59975b0fe478SBruce M Simpson ; 59985b0fe478SBruce M Simpson return 0; 59995b0fe478SBruce M Simpson} 60005b0fe478SBruce M Simpson_ACEOF 6001*0a7e5f1fSJoseph Mingronefor ac_lib in '' nsl 6002*0a7e5f1fSJoseph Mingronedo 6003b5bfcb5dSMax Laier if test -z "$ac_lib"; then 6004b5bfcb5dSMax Laier ac_res="none required" 60055b0fe478SBruce M Simpson else 6006b5bfcb5dSMax Laier ac_res=-l$ac_lib 60075b0fe478SBruce M Simpson LIBS="-l$ac_lib $ac_func_search_save_LIBS" 6008b5bfcb5dSMax Laier fi 6009*0a7e5f1fSJoseph Mingrone if ac_fn_c_try_link "$LINENO" 6010*0a7e5f1fSJoseph Mingronethen : 6011b5bfcb5dSMax Laier ac_cv_search_getrpcbynumber=$ac_res 60125b0fe478SBruce M Simpsonfi 6013*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 6014b5bfcb5dSMax Laier conftest$ac_exeext 6015*0a7e5f1fSJoseph Mingrone if test ${ac_cv_search_getrpcbynumber+y} 6016*0a7e5f1fSJoseph Mingronethen : 6017b5bfcb5dSMax Laier break 6018b5bfcb5dSMax Laierfi 60195b0fe478SBruce M Simpsondone 6020*0a7e5f1fSJoseph Mingroneif test ${ac_cv_search_getrpcbynumber+y} 6021*0a7e5f1fSJoseph Mingronethen : 6022d03c0883SXin LI 6023*0a7e5f1fSJoseph Mingroneelse $as_nop 6024b5bfcb5dSMax Laier ac_cv_search_getrpcbynumber=no 60255b0fe478SBruce M Simpsonfi 6026b5bfcb5dSMax Laierrm conftest.$ac_ext 60275b0fe478SBruce M SimpsonLIBS=$ac_func_search_save_LIBS 60285b0fe478SBruce M Simpsonfi 6029*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getrpcbynumber" >&5 6030*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_search_getrpcbynumber" >&6; } 6031b5bfcb5dSMax Laierac_res=$ac_cv_search_getrpcbynumber 6032*0a7e5f1fSJoseph Mingroneif test "$ac_res" != no 6033*0a7e5f1fSJoseph Mingronethen : 6034b5bfcb5dSMax Laier test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 60353c602fabSXin LI 6036*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define HAVE_GETRPCBYNUMBER 1" >>confdefs.h 6037a90e161bSBill Fenner 6038a90e161bSBill Fennerfi 6039a90e161bSBill Fenner 6040a90e161bSBill Fenner 6041a90e161bSBill Fenner 6042*0a7e5f1fSJoseph Mingrone 6043*0a7e5f1fSJoseph Mingrone 60444644f044SBill Fenner LBL_LIBS="$LIBS" 60454644f044SBill Fenner pfopen=/usr/examples/packetfilter/pfopen.c 60464644f044SBill Fenner if test -f $pfopen ; then 6047d03c0883SXin LI ac_fn_c_check_func "$LINENO" "pfopen" "ac_cv_func_pfopen" 6048*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pfopen" = xyes 6049*0a7e5f1fSJoseph Mingronethen : 6050*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PFOPEN 1" >>confdefs.h 60514644f044SBill Fenner 60524644f044SBill Fennerfi 60534644f044SBill Fenner 60544644f044SBill Fenner if test $ac_cv_func_pfopen = "no" ; then 6055*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: Using $pfopen" >&5 6056*0a7e5f1fSJoseph Mingroneprintf "%s\n" "Using $pfopen" >&6; } 60574644f044SBill Fenner LIBS="$LIBS $pfopen" 60584644f044SBill Fenner fi 60594644f044SBill Fenner fi 60608bdc5a62SPatrick Kelsey libpcap=FAIL 6061*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to look for a local libpcap" >&5 6062*0a7e5f1fSJoseph Mingroneprintf %s "checking whether to look for a local libpcap... " >&6; } 6063ee67461eSJoseph Mingrone # Check whether --enable-local-libpcap was given. 6064*0a7e5f1fSJoseph Mingroneif test ${enable_local_libpcap+y} 6065*0a7e5f1fSJoseph Mingronethen : 6066ee67461eSJoseph Mingrone enableval=$enable_local_libpcap; 6067*0a7e5f1fSJoseph Mingroneelse $as_nop 6068ee67461eSJoseph Mingrone enableval=yes 60698bdc5a62SPatrick Kelseyfi 60708bdc5a62SPatrick Kelsey 6071ee67461eSJoseph Mingrone case "$enableval" in 6072ee67461eSJoseph Mingrone 6073ee67461eSJoseph Mingrone no) 6074*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 6075*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 6076ee67461eSJoseph Mingrone # 6077ee67461eSJoseph Mingrone # Don't look for a local libpcap. 6078ee67461eSJoseph Mingrone # 6079ee67461eSJoseph Mingrone using_local_libpcap=no 6080ee67461eSJoseph Mingrone ;; 6081ee67461eSJoseph Mingrone 6082ee67461eSJoseph Mingrone *) 6083*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 6084*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 6085ee67461eSJoseph Mingrone # 6086ee67461eSJoseph Mingrone # Look for a local pcap library. 6087ee67461eSJoseph Mingrone # 6088*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for local pcap library" >&5 6089*0a7e5f1fSJoseph Mingroneprintf %s "checking for local pcap library... " >&6; } 60904644f044SBill Fenner lastdir=FAIL 60915b0fe478SBruce M Simpson places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \ 6092*0a7e5f1fSJoseph Mingrone $EGREP '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT|rc.)?$'` 60933c602fabSXin LI places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \ 6094*0a7e5f1fSJoseph Mingrone $EGREP '/libpcap-[0-9]+\.[0-9]+(\.[0-9]*)?([ab][0-9]*|-PRE-GIT|rc.)?$'` 60953c602fabSXin LI for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do 609627df3f5dSRui Paulo basedir=`echo $dir | sed -e 's/[ab][0-9]*$//' | \ 609727df3f5dSRui Paulo sed -e 's/-PRE-GIT$//' ` 60984644f044SBill Fenner if test $lastdir = $basedir ; then 60994644f044SBill Fenner continue; 61004644f044SBill Fenner fi 61014644f044SBill Fenner lastdir=$dir 6102b0453382SBill Fenner if test -r $dir/libpcap.a ; then 61034644f044SBill Fenner libpcap=$dir/libpcap.a 6104ee67461eSJoseph Mingrone local_pcap_dir=$dir 61054644f044SBill Fenner fi 61064644f044SBill Fenner done 61074644f044SBill Fenner if test $libpcap = FAIL ; then 6108ee67461eSJoseph Mingrone # 6109ee67461eSJoseph Mingrone # We didn't find a local libpcap. 6110ee67461eSJoseph Mingrone # 6111*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 6112*0a7e5f1fSJoseph Mingroneprintf "%s\n" "not found" >&6; } 6113ee67461eSJoseph Mingrone using_local_libpcap=no; 6114ee67461eSJoseph Mingrone else 611527df3f5dSRui Paulo # 6116ee67461eSJoseph Mingrone # We found a local libpcap. 6117ee67461eSJoseph Mingrone # 6118*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $libpcap" >&5 6119*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$libpcap" >&6; } 6120ee67461eSJoseph Mingrone using_local_libpcap=yes 6121ee67461eSJoseph Mingrone fi 6122ee67461eSJoseph Mingrone ;; 6123ee67461eSJoseph Mingrone esac 6124ee67461eSJoseph Mingrone 6125ee67461eSJoseph Mingrone if test $using_local_libpcap = no ; then 6126ee67461eSJoseph Mingrone # 6127ee67461eSJoseph Mingrone # We didn't find a local libpcap. 6128ee67461eSJoseph Mingrone # Look for an installed pkg-config. 6129ee67461eSJoseph Mingrone # 6130ee67461eSJoseph Mingrone if test -n "$PKG_CONFIG" ; then 6131ee67461eSJoseph Mingrone # 6132ee67461eSJoseph Mingrone # We have it. Are there .pc files for libpcap? 6133ee67461eSJoseph Mingrone # 6134ee67461eSJoseph Mingrone # --exists was introduced in pkg-config 0.4.0; that 6135ee67461eSJoseph Mingrone # dates back to late 2000, so we won't worry about 6136ee67461eSJoseph Mingrone # earlier releases that lack it. 6137ee67461eSJoseph Mingrone # 6138*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether there are .pc files for libpcap" >&5 6139*0a7e5f1fSJoseph Mingroneprintf %s "checking whether there are .pc files for libpcap... " >&6; } 6140ee67461eSJoseph Mingrone if "$PKG_CONFIG" libpcap --exists ; then 6141ee67461eSJoseph Mingrone # 6142ee67461eSJoseph Mingrone # Yes, so we can use pkg-config to get configuration 6143ee67461eSJoseph Mingrone # information for libpcap. 6144ee67461eSJoseph Mingrone # 6145*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 6146*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 6147ee67461eSJoseph Mingrone pkg_config_usable=yes 6148ee67461eSJoseph Mingrone else 6149ee67461eSJoseph Mingrone # 6150ee67461eSJoseph Mingrone # No, so we can't use pkg-config to get configuration 6151ee67461eSJoseph Mingrone # information for libpcap. 6152ee67461eSJoseph Mingrone # 6153*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 6154*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 6155ee67461eSJoseph Mingrone pkg_config_usable=no 6156ee67461eSJoseph Mingrone fi 6157ee67461eSJoseph Mingrone else 6158ee67461eSJoseph Mingrone # 6159ee67461eSJoseph Mingrone # We don't have it, so we obviously can't use it. 6160ee67461eSJoseph Mingrone # 6161ee67461eSJoseph Mingrone pkg_config_usable=no 6162ee67461eSJoseph Mingrone fi 6163ee67461eSJoseph Mingrone if test "$pkg_config_usable" = "yes" ; then 6164ee67461eSJoseph Mingrone # 6165ee67461eSJoseph Mingrone # Found both - use pkg-config to get the include flags for 6166ee67461eSJoseph Mingrone # libpcap and the flags to link with libpcap. 6167ee67461eSJoseph Mingrone # 6168ee67461eSJoseph Mingrone # Please read section 11.6 "Shell Substitutions" 6169ee67461eSJoseph Mingrone # in the autoconf manual before doing anything 6170ee67461eSJoseph Mingrone # to this that involves quoting. Especially note 6171ee67461eSJoseph Mingrone # the statement "There is just no portable way to use 6172ee67461eSJoseph Mingrone # double-quoted strings inside double-quoted back-quoted 6173ee67461eSJoseph Mingrone # expressions (pfew!)." 6174ee67461eSJoseph Mingrone # 6175ee67461eSJoseph Mingrone cflags=`"$PKG_CONFIG" libpcap --cflags` 6176ee67461eSJoseph Mingrone V_INCLS="$cflags $V_INCLS" 6177ee67461eSJoseph Mingrone libpcap=`"$PKG_CONFIG" libpcap --libs` 6178ee67461eSJoseph Mingrone else 6179ee67461eSJoseph Mingrone # 6180ee67461eSJoseph Mingrone # No pkg-config 6181ee67461eSJoseph Mingrone # Look for an installed pcap-config. 618227df3f5dSRui Paulo # 6183cac3dcd5SXin LI if test -n "$ac_tool_prefix"; then 6184cac3dcd5SXin LI # Extract the first word of "${ac_tool_prefix}pcap-config", so it can be a program name with args. 6185cac3dcd5SXin LIset dummy ${ac_tool_prefix}pcap-config; ac_word=$2 6186*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6187*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 6188*0a7e5f1fSJoseph Mingroneif test ${ac_cv_path_PCAP_CONFIG+y} 6189*0a7e5f1fSJoseph Mingronethen : 6190*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 6191*0a7e5f1fSJoseph Mingroneelse $as_nop 619227df3f5dSRui Paulo case $PCAP_CONFIG in 619327df3f5dSRui Paulo [\\/]* | ?:[\\/]*) 619427df3f5dSRui Paulo ac_cv_path_PCAP_CONFIG="$PCAP_CONFIG" # Let the user override the test with a path. 619527df3f5dSRui Paulo ;; 619627df3f5dSRui Paulo *) 619727df3f5dSRui Paulo as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 619827df3f5dSRui Paulofor as_dir in $PATH 619927df3f5dSRui Paulodo 620027df3f5dSRui Paulo IFS=$as_save_IFS 6201*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 6202*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 6203*0a7e5f1fSJoseph Mingrone */) ;; 6204*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 6205*0a7e5f1fSJoseph Mingrone esac 620627df3f5dSRui Paulo for ac_exec_ext in '' $ac_executable_extensions; do 6207*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 6208*0a7e5f1fSJoseph Mingrone ac_cv_path_PCAP_CONFIG="$as_dir$ac_word$ac_exec_ext" 6209*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 621027df3f5dSRui Paulo break 2 621127df3f5dSRui Paulo fi 621227df3f5dSRui Paulodone 621327df3f5dSRui Paulo done 621427df3f5dSRui PauloIFS=$as_save_IFS 621527df3f5dSRui Paulo 621627df3f5dSRui Paulo ;; 621727df3f5dSRui Pauloesac 621827df3f5dSRui Paulofi 621927df3f5dSRui PauloPCAP_CONFIG=$ac_cv_path_PCAP_CONFIG 622027df3f5dSRui Pauloif test -n "$PCAP_CONFIG"; then 6221*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PCAP_CONFIG" >&5 6222*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$PCAP_CONFIG" >&6; } 622327df3f5dSRui Pauloelse 6224*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 6225*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 622627df3f5dSRui Paulofi 622727df3f5dSRui Paulo 622827df3f5dSRui Paulo 6229cac3dcd5SXin LIfi 6230cac3dcd5SXin LIif test -z "$ac_cv_path_PCAP_CONFIG"; then 6231cac3dcd5SXin LI ac_pt_PCAP_CONFIG=$PCAP_CONFIG 6232cac3dcd5SXin LI # Extract the first word of "pcap-config", so it can be a program name with args. 6233cac3dcd5SXin LIset dummy pcap-config; ac_word=$2 6234*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6235*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 6236*0a7e5f1fSJoseph Mingroneif test ${ac_cv_path_ac_pt_PCAP_CONFIG+y} 6237*0a7e5f1fSJoseph Mingronethen : 6238*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 6239*0a7e5f1fSJoseph Mingroneelse $as_nop 6240cac3dcd5SXin LI case $ac_pt_PCAP_CONFIG in 6241cac3dcd5SXin LI [\\/]* | ?:[\\/]*) 6242cac3dcd5SXin LI ac_cv_path_ac_pt_PCAP_CONFIG="$ac_pt_PCAP_CONFIG" # Let the user override the test with a path. 6243cac3dcd5SXin LI ;; 6244cac3dcd5SXin LI *) 6245cac3dcd5SXin LI as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6246cac3dcd5SXin LIfor as_dir in $PATH 6247cac3dcd5SXin LIdo 6248cac3dcd5SXin LI IFS=$as_save_IFS 6249*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 6250*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 6251*0a7e5f1fSJoseph Mingrone */) ;; 6252*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 6253*0a7e5f1fSJoseph Mingrone esac 6254cac3dcd5SXin LI for ac_exec_ext in '' $ac_executable_extensions; do 6255*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 6256*0a7e5f1fSJoseph Mingrone ac_cv_path_ac_pt_PCAP_CONFIG="$as_dir$ac_word$ac_exec_ext" 6257*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 6258cac3dcd5SXin LI break 2 6259cac3dcd5SXin LI fi 6260cac3dcd5SXin LIdone 6261cac3dcd5SXin LI done 6262cac3dcd5SXin LIIFS=$as_save_IFS 6263cac3dcd5SXin LI 6264cac3dcd5SXin LI ;; 6265cac3dcd5SXin LIesac 6266cac3dcd5SXin LIfi 6267cac3dcd5SXin LIac_pt_PCAP_CONFIG=$ac_cv_path_ac_pt_PCAP_CONFIG 6268cac3dcd5SXin LIif test -n "$ac_pt_PCAP_CONFIG"; then 6269*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PCAP_CONFIG" >&5 6270*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_pt_PCAP_CONFIG" >&6; } 6271cac3dcd5SXin LIelse 6272*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 6273*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 6274cac3dcd5SXin LIfi 6275cac3dcd5SXin LI 6276cac3dcd5SXin LI if test "x$ac_pt_PCAP_CONFIG" = x; then 6277cac3dcd5SXin LI PCAP_CONFIG="" 6278cac3dcd5SXin LI else 6279cac3dcd5SXin LI case $cross_compiling:$ac_tool_warned in 6280cac3dcd5SXin LIyes:) 6281*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 6282*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 6283cac3dcd5SXin LIac_tool_warned=yes ;; 6284cac3dcd5SXin LIesac 6285cac3dcd5SXin LI PCAP_CONFIG=$ac_pt_PCAP_CONFIG 6286cac3dcd5SXin LI fi 6287cac3dcd5SXin LIelse 6288cac3dcd5SXin LI PCAP_CONFIG="$ac_cv_path_PCAP_CONFIG" 6289cac3dcd5SXin LIfi 6290cac3dcd5SXin LI 629127df3f5dSRui Paulo if test -n "$PCAP_CONFIG" ; then 629227df3f5dSRui Paulo # 629327df3f5dSRui Paulo # Found - use it to get the include flags for 629427df3f5dSRui Paulo # libpcap and the flags to link with libpcap. 629527df3f5dSRui Paulo # 6296ee67461eSJoseph Mingrone # If this is a vendor-supplied pcap-config, which 6297ee67461eSJoseph Mingrone # we define as being "a pcap-config in /usr/bin 6298ee67461eSJoseph Mingrone # or /usr/ccs/bin" (the latter is for Solaris and 6299ee67461eSJoseph Mingrone # Sun/Oracle Studio), there are some issues. Work 6300ee67461eSJoseph Mingrone # around them. 6301ee67461eSJoseph Mingrone # 6302ee67461eSJoseph Mingrone if test \( "$PCAP_CONFIG" = "/usr/bin/pcap-config" \) -o \ 6303ee67461eSJoseph Mingrone \( "$PCAP_CONFIG" = "/usr/ccs/bin/pcap-config" \) ; then 6304ee67461eSJoseph Mingrone # 6305ee67461eSJoseph Mingrone # It's vendor-supplied. 6306ee67461eSJoseph Mingrone # 6307ee67461eSJoseph Mingrone case "$host_os" in 6308ee67461eSJoseph Mingrone 6309ee67461eSJoseph Mingrone darwin*) 6310ee67461eSJoseph Mingrone # 6311ee67461eSJoseph Mingrone # This is macOS or another Darwin-based OS. 6312ee67461eSJoseph Mingrone # 6313ee67461eSJoseph Mingrone # That means that /usr/bin/pcap-config it 6314ee67461eSJoseph Mingrone # may provide -I/usr/local/include with --cflags 6315ee67461eSJoseph Mingrone # and -L/usr/local/lib with --libs, rather than 6316ee67461eSJoseph Mingrone # pointing to the OS-supplied library and 6317ee67461eSJoseph Mingrone # Xcode-supplied headers. Remember that, so we 6318ee67461eSJoseph Mingrone # ignore those values. 6319ee67461eSJoseph Mingrone # 6320ee67461eSJoseph Mingrone _broken_apple_pcap_config=yes 6321*0a7e5f1fSJoseph Mingrone 6322*0a7e5f1fSJoseph Mingrone # 6323*0a7e5f1fSJoseph Mingrone # Furthermore: 6324*0a7e5f1fSJoseph Mingrone # 6325*0a7e5f1fSJoseph Mingrone # macOS Sonoma's libpcap includes stub versions 6326*0a7e5f1fSJoseph Mingrone # of the remote-capture APIs. They are exported 6327*0a7e5f1fSJoseph Mingrone # as "weakly linked symbols". 6328*0a7e5f1fSJoseph Mingrone # 6329*0a7e5f1fSJoseph Mingrone # Xcode 15 offers only a macOS Sonoma SDK, which 6330*0a7e5f1fSJoseph Mingrone # has a .tbd file for libpcap that claims it 6331*0a7e5f1fSJoseph Mingrone # includes those APIs. (Newer versions of macOS 6332*0a7e5f1fSJoseph Mingrone # don't provide the system shared libraries, 6333*0a7e5f1fSJoseph Mingrone # they only provide the dyld shared cache 6334*0a7e5f1fSJoseph Mingrone # containing those libraries, so the OS provides 6335*0a7e5f1fSJoseph Mingrone # SDKs that include a .tbd file to use when 6336*0a7e5f1fSJoseph Mingrone # linking.) 6337*0a7e5f1fSJoseph Mingrone # 6338*0a7e5f1fSJoseph Mingrone # This means that AC_CHECK_FUNCS() will think 6339*0a7e5f1fSJoseph Mingrone # that the remote-capture APIs are present, 6340*0a7e5f1fSJoseph Mingrone # including pcap_open() and 6341*0a7e5f1fSJoseph Mingrone # pcap_findalldevs_ex(). 6342*0a7e5f1fSJoseph Mingrone # 6343*0a7e5f1fSJoseph Mingrone # However, they are *not* present in macOS 6344*0a7e5f1fSJoseph Mingrone # Ventura and earlier, which means that building 6345*0a7e5f1fSJoseph Mingrone # on Ventura with Xcode 15 produces executables 6346*0a7e5f1fSJoseph Mingrone # that fail to start because one of those APIs 6347*0a7e5f1fSJoseph Mingrone # isn't found in the system libpcap. 6348*0a7e5f1fSJoseph Mingrone # 6349*0a7e5f1fSJoseph Mingrone # Protecting calls to those APIs with 6350*0a7e5f1fSJoseph Mingrone # __builtin_available() does not appear to 6351*0a7e5f1fSJoseph Mingrone # prevent this, for some unknown reason, and it 6352*0a7e5f1fSJoseph Mingrone # doesn't even allow the program to compile with 6353*0a7e5f1fSJoseph Mingrone # versions of Xcode prior to Xcode 15, as the 6354*0a7e5f1fSJoseph Mingrone # pcap.h file doesn't specify minimum OS 6355*0a7e5f1fSJoseph Mingrone # versions for those functions. 6356*0a7e5f1fSJoseph Mingrone # 6357*0a7e5f1fSJoseph Mingrone # Given all that, and given that the versions of 6358*0a7e5f1fSJoseph Mingrone # the remote-capture APIs in Sonoma are stubs 6359*0a7e5f1fSJoseph Mingrone # that always fail, there doesn't seem to be any 6360*0a7e5f1fSJoseph Mingrone # point in checking for pcap_open() if we're 6361*0a7e5f1fSJoseph Mingrone # linking against the Apple libpcap. 6362*0a7e5f1fSJoseph Mingrone # 6363*0a7e5f1fSJoseph Mingrone # However, if we're *not* linking against the 6364*0a7e5f1fSJoseph Mingrone # Apple libpcap, we should check for it, so that 6365*0a7e5f1fSJoseph Mingrone # we can use it if it's present. 6366*0a7e5f1fSJoseph Mingrone # 6367*0a7e5f1fSJoseph Mingrone # We know this is macOS and that we're using 6368*0a7e5f1fSJoseph Mingrone # the system-provided pcap-config to find 6369*0a7e5f1fSJoseph Mingrone # libpcap, so we know it'll be the system 6370*0a7e5f1fSJoseph Mingrone # libpcap, and note that we should not search 6371*0a7e5f1fSJoseph Mingrone # for remote-capture APIs. 6372*0a7e5f1fSJoseph Mingrone # 6373*0a7e5f1fSJoseph Mingrone _dont_check_for_remote_apis=yes 6374ee67461eSJoseph Mingrone ;; 6375ee67461eSJoseph Mingrone 6376ee67461eSJoseph Mingrone solaris*) 6377ee67461eSJoseph Mingrone # 6378ee67461eSJoseph Mingrone # This is Solaris 2 or later, i.e. SunOS 5.x. 6379ee67461eSJoseph Mingrone # 6380ee67461eSJoseph Mingrone # At least on Solaris 11; there's /usr/bin/pcap-config, 6381ee67461eSJoseph Mingrone # which reports -L/usr/lib with --libs, causing 6382ee67461eSJoseph Mingrone # the 32-bit libraries to be found, and there's 6383ee67461eSJoseph Mingrone # /usr/bin/{64bitarch}/pcap-config, where {64bitarch} 6384ee67461eSJoseph Mingrone # is a name for the 64-bit version of the instruction 6385ee67461eSJoseph Mingrone # set, which reports -L /usr/lib/{64bitarch}, causing 6386ee67461eSJoseph Mingrone # the 64-bit libraries to be found. 6387ee67461eSJoseph Mingrone # 6388ee67461eSJoseph Mingrone # So if we're building 64-bit targets, we replace 6389ee67461eSJoseph Mingrone # PCAP_CONFIG with /usr/bin/{64bitarch}; we get 6390ee67461eSJoseph Mingrone # {64bitarch} as the output of "isainfo -n". 6391ee67461eSJoseph Mingrone # 6392ee67461eSJoseph Mingrone # Are we building 32-bit or 64-bit? Get the 6393ee67461eSJoseph Mingrone # size of void *, and check that. 6394ee67461eSJoseph Mingrone # 6395ee67461eSJoseph Mingrone # The cast to long int works around a bug in the HP C Compiler 6396ee67461eSJoseph Mingrone# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 6397ee67461eSJoseph Mingrone# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 6398ee67461eSJoseph Mingrone# This bug is HP SR number 8606223364. 6399*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 6400*0a7e5f1fSJoseph Mingroneprintf %s "checking size of void *... " >&6; } 6401*0a7e5f1fSJoseph Mingroneif test ${ac_cv_sizeof_void_p+y} 6402*0a7e5f1fSJoseph Mingronethen : 6403*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 6404*0a7e5f1fSJoseph Mingroneelse $as_nop 6405*0a7e5f1fSJoseph Mingrone if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default" 6406*0a7e5f1fSJoseph Mingronethen : 6407ee67461eSJoseph Mingrone 6408*0a7e5f1fSJoseph Mingroneelse $as_nop 6409ee67461eSJoseph Mingrone if test "$ac_cv_type_void_p" = yes; then 6410*0a7e5f1fSJoseph Mingrone { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 6411*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 6412ee67461eSJoseph Mingroneas_fn_error 77 "cannot compute sizeof (void *) 6413ee67461eSJoseph MingroneSee \`config.log' for more details" "$LINENO" 5; } 6414ee67461eSJoseph Mingrone else 6415ee67461eSJoseph Mingrone ac_cv_sizeof_void_p=0 6416ee67461eSJoseph Mingrone fi 6417ee67461eSJoseph Mingronefi 6418ee67461eSJoseph Mingrone 6419ee67461eSJoseph Mingronefi 6420*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 6421*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_sizeof_void_p" >&6; } 6422ee67461eSJoseph Mingrone 6423ee67461eSJoseph Mingrone 6424ee67461eSJoseph Mingrone 6425*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define SIZEOF_VOID_P $ac_cv_sizeof_void_p" >>confdefs.h 6426ee67461eSJoseph Mingrone 6427ee67461eSJoseph Mingrone 6428ee67461eSJoseph Mingrone if test ac_cv_sizeof_void_p -eq 8 ; then 6429ee67461eSJoseph Mingrone isainfo_output=`isainfo -n` 6430ee67461eSJoseph Mingrone if test ! -z "$isainfo_output" ; then 6431ee67461eSJoseph Mingrone # 6432ee67461eSJoseph Mingrone # Success - change PCAP_CONFIG. 6433ee67461eSJoseph Mingrone # 6434ee67461eSJoseph Mingrone PCAP_CONFIG=`echo $PCAP_CONFIG | sed "s;/bin/;/bin/$isainfo_output/;"` 6435ee67461eSJoseph Mingrone fi 6436ee67461eSJoseph Mingrone fi 6437ee67461eSJoseph Mingrone ;; 6438ee67461eSJoseph Mingrone esac 6439ee67461eSJoseph Mingrone fi 6440ee67461eSJoseph Mingrone # 6441cac3dcd5SXin LI # Please read section 11.6 "Shell Substitutions" 6442cac3dcd5SXin LI # in the autoconf manual before doing anything 6443cac3dcd5SXin LI # to this that involves quoting. Especially note 6444cac3dcd5SXin LI # the statement "There is just no portable way to use 6445cac3dcd5SXin LI # double-quoted strings inside double-quoted back-quoted 6446cac3dcd5SXin LI # expressions (pfew!)." 6447cac3dcd5SXin LI # 6448cac3dcd5SXin LI cflags=`"$PCAP_CONFIG" --cflags` 6449ee67461eSJoseph Mingrone # 6450ee67461eSJoseph Mingrone # Work around macOS (and probably other Darwin) brokenness, 6451ee67461eSJoseph Mingrone # by not adding /usr/local/include if it's from the broken 6452ee67461eSJoseph Mingrone # Apple pcap-config. 6453ee67461eSJoseph Mingrone # 6454ee67461eSJoseph Mingrone if test "$_broken_apple_pcap_config" = "yes" ; then 6455ee67461eSJoseph Mingrone # 6456ee67461eSJoseph Mingrone # Strip -I/usr/local/include with sed. 6457ee67461eSJoseph Mingrone # 6458ee67461eSJoseph Mingrone cflags=`echo $cflags | sed 's;-I/usr/local/include;;'` 6459ee67461eSJoseph Mingrone fi 6460cac3dcd5SXin LI V_INCLS="$cflags $V_INCLS" 6461cac3dcd5SXin LI libpcap=`"$PCAP_CONFIG" --libs` 6462ee67461eSJoseph Mingrone # 6463ee67461eSJoseph Mingrone # Work around macOS (and probably other Darwin) brokenness, 6464ee67461eSJoseph Mingrone # by not adding /usr/local/lib if it's from the broken 6465ee67461eSJoseph Mingrone # Apple pcap-config. 6466ee67461eSJoseph Mingrone # 6467ee67461eSJoseph Mingrone if test "$_broken_apple_pcap_config" = "yes" ; then 6468ee67461eSJoseph Mingrone # 6469ee67461eSJoseph Mingrone # Strip -L/usr/local/lib with sed. 6470ee67461eSJoseph Mingrone # 6471ee67461eSJoseph Mingrone libpcap=`echo $libpcap | sed 's;-L/usr/local/lib;;'` 6472ee67461eSJoseph Mingrone fi 647327df3f5dSRui Paulo else 647427df3f5dSRui Paulo # 6475ee67461eSJoseph Mingrone # Not found; look for an installed pcap. 647627df3f5dSRui Paulo # 6477*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for main in -lpcap" >&5 6478*0a7e5f1fSJoseph Mingroneprintf %s "checking for main in -lpcap... " >&6; } 6479*0a7e5f1fSJoseph Mingroneif test ${ac_cv_lib_pcap_main+y} 6480*0a7e5f1fSJoseph Mingronethen : 6481*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 6482*0a7e5f1fSJoseph Mingroneelse $as_nop 64835b0fe478SBruce M Simpson ac_check_lib_save_LIBS=$LIBS 64844644f044SBill FennerLIBS="-lpcap $LIBS" 6485d03c0883SXin LIcat confdefs.h - <<_ACEOF >conftest.$ac_ext 64865b0fe478SBruce M Simpson/* end confdefs.h. */ 64874644f044SBill Fenner 64885b0fe478SBruce M Simpson 64895b0fe478SBruce M Simpsonint 6490*0a7e5f1fSJoseph Mingronemain (void) 64915b0fe478SBruce M Simpson{ 6492b5bfcb5dSMax Laierreturn main (); 64935b0fe478SBruce M Simpson ; 64945b0fe478SBruce M Simpson return 0; 64955b0fe478SBruce M Simpson} 64965b0fe478SBruce M Simpson_ACEOF 6497*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 6498*0a7e5f1fSJoseph Mingronethen : 64995b0fe478SBruce M Simpson ac_cv_lib_pcap_main=yes 6500*0a7e5f1fSJoseph Mingroneelse $as_nop 65015b0fe478SBruce M Simpson ac_cv_lib_pcap_main=no 65024644f044SBill Fennerfi 6503*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 6504b5bfcb5dSMax Laier conftest$ac_exeext conftest.$ac_ext 65055b0fe478SBruce M SimpsonLIBS=$ac_check_lib_save_LIBS 65065b0fe478SBruce M Simpsonfi 6507*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pcap_main" >&5 6508*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_lib_pcap_main" >&6; } 6509*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_lib_pcap_main" = xyes 6510*0a7e5f1fSJoseph Mingronethen : 65114644f044SBill Fenner libpcap="-lpcap" 65124644f044SBill Fennerfi 65134644f044SBill Fenner 65144644f044SBill Fenner if test $libpcap = FAIL ; then 6515*0a7e5f1fSJoseph Mingrone as_fn_error $? "see the INSTALL.md file for more info" "$LINENO" 5 65165b0fe478SBruce M Simpson fi 6517*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for extraneous pcap header directories" >&5 6518*0a7e5f1fSJoseph Mingroneprintf %s "checking for extraneous pcap header directories... " >&6; } 65195b0fe478SBruce M Simpson if test \( ! -r /usr/local/include/pcap.h \) -a \ 65205b0fe478SBruce M Simpson \( ! -r /usr/include/pcap.h \); then 65215b0fe478SBruce M Simpson if test -r /usr/local/include/pcap/pcap.h; then 65225b0fe478SBruce M Simpson d="/usr/local/include/pcap" 65235b0fe478SBruce M Simpson elif test -r /usr/include/pcap/pcap.h; then 65245b0fe478SBruce M Simpson d="/usr/include/pcap" 65255b0fe478SBruce M Simpson fi 65265b0fe478SBruce M Simpson fi 65275b0fe478SBruce M Simpson if test -z "$d" ; then 6528*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 6529*0a7e5f1fSJoseph Mingroneprintf "%s\n" "not found" >&6; } 65305b0fe478SBruce M Simpson else 65315b0fe478SBruce M Simpson V_INCLS="-I$d $V_INCLS" 6532*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found -- -I$d added" >&5 6533*0a7e5f1fSJoseph Mingroneprintf "%s\n" "found -- -I$d added" >&6; } 65344644f044SBill Fenner fi 653527df3f5dSRui Paulo fi 6536ee67461eSJoseph Mingrone fi 65374644f044SBill Fenner else 6538ee67461eSJoseph Mingrone # 6539ee67461eSJoseph Mingrone # We found a local libpcap. Add it to the dependencies for 6540ee67461eSJoseph Mingrone # tcpdump. 6541ee67461eSJoseph Mingrone # 65424644f044SBill Fenner V_PCAPDEP=$libpcap 65433c602fabSXin LI 6544ee67461eSJoseph Mingrone # 6545ee67461eSJoseph Mingrone # Look for its pcap-config script. 6546ee67461eSJoseph Mingrone # 654727df3f5dSRui Paulo # Extract the first word of "pcap-config", so it can be a program name with args. 654827df3f5dSRui Pauloset dummy pcap-config; ac_word=$2 6549*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6550*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 6551*0a7e5f1fSJoseph Mingroneif test ${ac_cv_path_PCAP_CONFIG+y} 6552*0a7e5f1fSJoseph Mingronethen : 6553*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 6554*0a7e5f1fSJoseph Mingroneelse $as_nop 655527df3f5dSRui Paulo case $PCAP_CONFIG in 655627df3f5dSRui Paulo [\\/]* | ?:[\\/]*) 655727df3f5dSRui Paulo ac_cv_path_PCAP_CONFIG="$PCAP_CONFIG" # Let the user override the test with a path. 655827df3f5dSRui Paulo ;; 655927df3f5dSRui Paulo *) 656027df3f5dSRui Paulo as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6561ee67461eSJoseph Mingronefor as_dir in $local_pcap_dir 656227df3f5dSRui Paulodo 656327df3f5dSRui Paulo IFS=$as_save_IFS 6564*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 6565*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 6566*0a7e5f1fSJoseph Mingrone */) ;; 6567*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 6568*0a7e5f1fSJoseph Mingrone esac 656927df3f5dSRui Paulo for ac_exec_ext in '' $ac_executable_extensions; do 6570*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 6571*0a7e5f1fSJoseph Mingrone ac_cv_path_PCAP_CONFIG="$as_dir$ac_word$ac_exec_ext" 6572*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 657327df3f5dSRui Paulo break 2 657427df3f5dSRui Paulo fi 657527df3f5dSRui Paulodone 657627df3f5dSRui Paulo done 657727df3f5dSRui PauloIFS=$as_save_IFS 657827df3f5dSRui Paulo 657927df3f5dSRui Paulo ;; 658027df3f5dSRui Pauloesac 658127df3f5dSRui Paulofi 658227df3f5dSRui PauloPCAP_CONFIG=$ac_cv_path_PCAP_CONFIG 658327df3f5dSRui Pauloif test -n "$PCAP_CONFIG"; then 6584*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PCAP_CONFIG" >&5 6585*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$PCAP_CONFIG" >&6; } 658627df3f5dSRui Pauloelse 6587*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 6588*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 658927df3f5dSRui Paulofi 659027df3f5dSRui Paulo 659127df3f5dSRui Paulo 6592ee67461eSJoseph Mingrone 659327df3f5dSRui Paulo if test -n "$PCAP_CONFIG"; then 659427df3f5dSRui Paulo # 6595ee67461eSJoseph Mingrone # We don't want its --cflags or --libs output, because 6596ee67461eSJoseph Mingrone # those presume it's installed. For the C compiler flags, 6597ee67461eSJoseph Mingrone # we add the source directory for the local libpcap, so 6598ee67461eSJoseph Mingrone # we pick up its header files. 659927df3f5dSRui Paulo # 6600ee67461eSJoseph Mingrone # We do, however, want its additional libraries, as required 6601ee67461eSJoseph Mingrone # when linking statically, because it makes calls to 6602ee67461eSJoseph Mingrone # routines in those libraries, so we'll need to link with 6603ee67461eSJoseph Mingrone # them, because we'll be linking statically with it. 6604cac3dcd5SXin LI # 6605ee67461eSJoseph Mingrone # If it supports --static-pcap-only. use that, as we will be 6606ee67461eSJoseph Mingrone # linking with a static libpcap but won't be linking 6607ee67461eSJoseph Mingrone # statically with any of the libraries on which it depends; 6608ee67461eSJoseph Mingrone # those libraries might not even have static versions 6609ee67461eSJoseph Mingrone # installed. 6610ee67461eSJoseph Mingrone # 6611ee67461eSJoseph Mingrone # That means we need to find out the libraries on which 6612ee67461eSJoseph Mingrone # libpcap directly depends, so we can link with them, but we 6613ee67461eSJoseph Mingrone # don't need to link with the libraries on which those 6614ee67461eSJoseph Mingrone # libraries depend as, on all UN*Xes with which I'm 6615ee67461eSJoseph Mingrone # familiar, the libraries on which a shared library depends 6616ee67461eSJoseph Mingrone # are stored in the library and are automatically loaded by 6617ee67461eSJoseph Mingrone # the run-time linker, without the executable having to be 6618ee67461eSJoseph Mingrone # linked with those libraries. (This allows a library to be 6619ee67461eSJoseph Mingrone # changed to depend on more libraries without breaking that 6620ee67461eSJoseph Mingrone # library's ABI.) 6621ee67461eSJoseph Mingrone # 6622ee67461eSJoseph Mingrone # The only way to test for that support is to see if the 6623ee67461eSJoseph Mingrone # script contains the string "static-pcap-only"; we can't 6624ee67461eSJoseph Mingrone # try using that flag and checking for errors, as the 6625ee67461eSJoseph Mingrone # versions of the script that didn't have that flag wouldn't 6626ee67461eSJoseph Mingrone # report or return an error for an unsupported command-line 6627ee67461eSJoseph Mingrone # flag. Those older versions provided, with --static, only 6628ee67461eSJoseph Mingrone # the libraries on which libpcap depends, not the 6629ee67461eSJoseph Mingrone # dependencies of those libraries; the versions with 6630ee67461eSJoseph Mingrone # --static-pcap-only provide all the dependencies with 6631ee67461eSJoseph Mingrone # --static, for the benefit of programs that are completely 6632ee67461eSJoseph Mingrone # statically linked, and provide only the direct 6633ee67461eSJoseph Mingrone # dependencies with --static-pcap-only. 6634ee67461eSJoseph Mingrone # 6635*0a7e5f1fSJoseph Mingrone if grep "static-pcap-only" "$PCAP_CONFIG" >/dev/null 2>&1 6636ee67461eSJoseph Mingrone then 6637ee67461eSJoseph Mingrone static_opt="--static-pcap-only" 6638ee67461eSJoseph Mingrone else 6639ee67461eSJoseph Mingrone static_opt="--static" 6640ee67461eSJoseph Mingrone fi 6641ee67461eSJoseph Mingrone V_INCLS="-I$local_pcap_dir $V_INCLS" 6642ee67461eSJoseph Mingrone additional_libs=`"$PCAP_CONFIG" $static_opt --additional-libs` 6643cac3dcd5SXin LI libpcap="$libpcap $additional_libs" 6644ee67461eSJoseph Mingrone else 664527df3f5dSRui Paulo # 6646ee67461eSJoseph Mingrone # It doesn't have a pcap-config script. 6647ee67461eSJoseph Mingrone # Make sure it has a pcap.h file. 6648ee67461eSJoseph Mingrone # 6649ee67461eSJoseph Mingrone places=`ls $srcdir/.. | sed -e 's,/$,,' -e "s,^,$srcdir/../," | \ 6650*0a7e5f1fSJoseph Mingrone $EGREP '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'` 6651ee67461eSJoseph Mingrone places2=`ls .. | sed -e 's,/$,,' -e "s,^,../," | \ 6652*0a7e5f1fSJoseph Mingrone $EGREP '/libpcap-[0-9]*.[0-9]*(.[0-9]*)?([ab][0-9]*)?$'` 6653ee67461eSJoseph Mingrone pcapH=FAIL 6654ee67461eSJoseph Mingrone if test -r $local_pcap_dir/pcap.h; then 6655ee67461eSJoseph Mingrone pcapH=$local_pcap_dir 6656ee67461eSJoseph Mingrone else 6657ee67461eSJoseph Mingrone for dir in $places $srcdir/../libpcap ../libpcap $srcdir/libpcap $places2 ; do 6658ee67461eSJoseph Mingrone if test -r $dir/pcap.h ; then 6659ee67461eSJoseph Mingrone pcapH=$dir 6660ee67461eSJoseph Mingrone fi 6661ee67461eSJoseph Mingrone done 6662ee67461eSJoseph Mingrone fi 6663ee67461eSJoseph Mingrone 6664ee67461eSJoseph Mingrone if test $pcapH = FAIL ; then 6665*0a7e5f1fSJoseph Mingrone as_fn_error $? "cannot find pcap.h: see the INSTALL.md file" "$LINENO" 5 6666ee67461eSJoseph Mingrone fi 6667ee67461eSJoseph Mingrone 6668ee67461eSJoseph Mingrone # 6669ee67461eSJoseph Mingrone # Force the compiler to look for header files in the 6670ee67461eSJoseph Mingrone # directory containing pcap.h. 6671ee67461eSJoseph Mingrone # 6672ee67461eSJoseph Mingrone V_INCLS="-I$pcapH $V_INCLS" 6673ee67461eSJoseph Mingrone fi 6674ee67461eSJoseph Mingrone fi 6675ee67461eSJoseph Mingrone 6676ee67461eSJoseph Mingrone if test -z "$PKG_CONFIG" -a -z "$PCAP_CONFIG"; then 6677ee67461eSJoseph Mingrone # 6678ee67461eSJoseph Mingrone # We don't have pkg-config or pcap-config; find out any additional 6679ee67461eSJoseph Mingrone # link flags we need. (If we have pkg-config or pcap-config, we 6680ee67461eSJoseph Mingrone # assume it tells us what we need.) 668127df3f5dSRui Paulo # 6682a90e161bSBill Fenner case "$host_os" in 66834644f044SBill Fenner 66844644f044SBill Fenner aix*) 668527df3f5dSRui Paulo # 668627df3f5dSRui Paulo # If libpcap is DLPI-based, we have to use /lib/pse.exp if 668727df3f5dSRui Paulo # present, as we use the STREAMS routines. 668827df3f5dSRui Paulo # 668927df3f5dSRui Paulo # (XXX - true only if we're linking with a static libpcap?) 669027df3f5dSRui Paulo # 66914644f044SBill Fenner pseexe="/lib/pse.exp" 6692*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $pseexe" >&5 6693*0a7e5f1fSJoseph Mingroneprintf %s "checking for $pseexe... " >&6; } 66944644f044SBill Fenner if test -f $pseexe ; then 6695*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 6696*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 66974644f044SBill Fenner LIBS="$LIBS -I:$pseexe" 66984644f044SBill Fenner fi 669927df3f5dSRui Paulo 67005b0fe478SBruce M Simpson # 670127df3f5dSRui Paulo # If libpcap is BPF-based, we need "-lodm" and "-lcfg", as 670227df3f5dSRui Paulo # we use them to load the BPF module. 670327df3f5dSRui Paulo # 670427df3f5dSRui Paulo # (XXX - true only if we're linking with a static libpcap?) 67055b0fe478SBruce M Simpson # 67065b0fe478SBruce M Simpson LIBS="$LIBS -lodm -lcfg" 67074644f044SBill Fenner ;; 67084644f044SBill Fenner 6709ee67461eSJoseph Mingrone solaris*) 6710a5779b6eSRui Paulo # libdlpi is needed for Solaris 11 and later. 6711*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlpi_walk in -ldlpi" >&5 6712*0a7e5f1fSJoseph Mingroneprintf %s "checking for dlpi_walk in -ldlpi... " >&6; } 6713*0a7e5f1fSJoseph Mingroneif test ${ac_cv_lib_dlpi_dlpi_walk+y} 6714*0a7e5f1fSJoseph Mingronethen : 6715*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 6716*0a7e5f1fSJoseph Mingroneelse $as_nop 6717a5779b6eSRui Paulo ac_check_lib_save_LIBS=$LIBS 6718a5779b6eSRui PauloLIBS="-ldlpi -L/lib $LIBS" 6719d03c0883SXin LIcat confdefs.h - <<_ACEOF >conftest.$ac_ext 6720a5779b6eSRui Paulo/* end confdefs.h. */ 6721a5779b6eSRui Paulo 6722a5779b6eSRui Paulo/* Override any GCC internal prototype to avoid an error. 6723a5779b6eSRui Paulo Use char because int might match the return type of a GCC 6724a5779b6eSRui Paulo builtin and then its argument prototype would still apply. */ 6725a5779b6eSRui Paulochar dlpi_walk (); 6726a5779b6eSRui Pauloint 6727*0a7e5f1fSJoseph Mingronemain (void) 6728a5779b6eSRui Paulo{ 6729a5779b6eSRui Pauloreturn dlpi_walk (); 6730a5779b6eSRui Paulo ; 6731a5779b6eSRui Paulo return 0; 6732a5779b6eSRui Paulo} 6733a5779b6eSRui Paulo_ACEOF 6734*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 6735*0a7e5f1fSJoseph Mingronethen : 6736a5779b6eSRui Paulo ac_cv_lib_dlpi_dlpi_walk=yes 6737*0a7e5f1fSJoseph Mingroneelse $as_nop 6738a5779b6eSRui Paulo ac_cv_lib_dlpi_dlpi_walk=no 6739a5779b6eSRui Paulofi 6740*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 6741a5779b6eSRui Paulo conftest$ac_exeext conftest.$ac_ext 6742a5779b6eSRui PauloLIBS=$ac_check_lib_save_LIBS 6743a5779b6eSRui Paulofi 6744*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dlpi_dlpi_walk" >&5 6745*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_lib_dlpi_dlpi_walk" >&6; } 6746*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_lib_dlpi_dlpi_walk" = xyes 6747*0a7e5f1fSJoseph Mingronethen : 6748a5779b6eSRui Paulo LIBS="$LIBS -ldlpi" LDFLAGS="-L/lib $LDFLAGS" 6749a5779b6eSRui Paulofi 6750a5779b6eSRui Paulo 6751ee67461eSJoseph Mingrone ;; 6752ee67461eSJoseph Mingrone esac 6753ee67461eSJoseph Mingrone fi 6754ee67461eSJoseph Mingrone 6755ee67461eSJoseph Mingrone LIBS="$libpcap $LIBS" 6756ee67461eSJoseph Mingrone 6757ee67461eSJoseph Mingrone ac_fn_c_check_func "$LINENO" "pcap_loop" "ac_cv_func_pcap_loop" 6758*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_loop" = xyes 6759*0a7e5f1fSJoseph Mingronethen : 6760ee67461eSJoseph Mingrone 6761*0a7e5f1fSJoseph Mingroneelse $as_nop 6762ee67461eSJoseph Mingrone 6763*0a7e5f1fSJoseph Mingrone as_fn_error $? " 6764*0a7e5f1fSJoseph Mingrone1. Do you try to build a 32-bit tcpdump with a 64-bit libpcap or vice versa? 6765*0a7e5f1fSJoseph Mingrone2. This is a bug, please follow the guidelines in CONTRIBUTING.md and include 6766*0a7e5f1fSJoseph Mingronethe config.log file in your report. If you have downloaded libpcap from 6767ee67461eSJoseph Mingronetcpdump.org, and built it yourself, please also include the config.log 6768ee67461eSJoseph Mingronefile from the libpcap source directory, the Makefile from the libpcap 6769ee67461eSJoseph Mingronesource directory, and the output of the make process for libpcap, as 6770ee67461eSJoseph Mingronethis could be a problem with the libpcap that was built, and we will 6771ee67461eSJoseph Mingronenot be able to determine why this is happening, and thus will not be 6772ee67461eSJoseph Mingroneable to fix it, without that information, as we have not been able to 6773ee67461eSJoseph Mingronereproduce this problem ourselves." "$LINENO" 5 6774ee67461eSJoseph Mingrone 6775ee67461eSJoseph Mingronefi 6776ee67461eSJoseph Mingrone 6777ee67461eSJoseph Mingrone 6778ee67461eSJoseph Mingrone 6779ee67461eSJoseph Mingrone# 6780ee67461eSJoseph Mingrone# Check for these after AC_LBL_LIBPCAP, so we link with the appropriate 6781ee67461eSJoseph Mingrone# libraries (e.g., "-lsocket -lnsl" on Solaris). 6782ee67461eSJoseph Mingrone# 6783ee67461eSJoseph Mingrone# You are in a twisty little maze of UN*Xes, all different. 6784ee67461eSJoseph Mingrone# Some might not have ether_ntohost(). 6785ee67461eSJoseph Mingrone# Some might have it and declare it in <net/ethernet.h>. 6786ee67461eSJoseph Mingrone# Some might have it and declare it in <netinet/ether.h> 6787ee67461eSJoseph Mingrone# Some might have it and declare it in <sys/ethernet.h>. 6788ee67461eSJoseph Mingrone# Some might have it and declare it in <arpa/inet.h>. 6789ee67461eSJoseph Mingrone# Some might have it and declare it in <netinet/if_ether.h>. 6790ee67461eSJoseph Mingrone# Some might have it and not declare it in any header file. 6791ee67461eSJoseph Mingrone# 6792ee67461eSJoseph Mingrone# Before you is a C compiler. 6793ee67461eSJoseph Mingrone# 6794*0a7e5f1fSJoseph Mingrone 6795ee67461eSJoseph Mingrone for ac_func in ether_ntohost 6796ee67461eSJoseph Mingronedo : 6797ee67461eSJoseph Mingrone ac_fn_c_check_func "$LINENO" "ether_ntohost" "ac_cv_func_ether_ntohost" 6798*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_ether_ntohost" = xyes 6799*0a7e5f1fSJoseph Mingronethen : 6800*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_ETHER_NTOHOST 1" >>confdefs.h 6801ee67461eSJoseph Mingrone 6802*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for buggy ether_ntohost" >&5 6803*0a7e5f1fSJoseph Mingroneprintf %s "checking for buggy ether_ntohost... " >&6; } 6804*0a7e5f1fSJoseph Mingroneif test ${ac_cv_buggy_ether_ntohost+y} 6805*0a7e5f1fSJoseph Mingronethen : 6806*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 6807*0a7e5f1fSJoseph Mingroneelse $as_nop 6808ee67461eSJoseph Mingrone 6809*0a7e5f1fSJoseph Mingrone if test "$cross_compiling" = yes 6810*0a7e5f1fSJoseph Mingronethen : 6811ee67461eSJoseph Mingrone ac_cv_buggy_ether_ntohost="not while cross-compiling" 6812*0a7e5f1fSJoseph Mingroneelse $as_nop 6813ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6814ee67461eSJoseph Mingrone/* end confdefs.h. */ 6815ee67461eSJoseph Mingrone 6816ee67461eSJoseph Mingrone #include <netdb.h> 6817ee67461eSJoseph Mingrone #include <netinet/ether.h> 6818ee67461eSJoseph Mingrone #include <stdlib.h> 6819ee67461eSJoseph Mingrone #include <sys/types.h> 6820ee67461eSJoseph Mingrone #include <sys/param.h> 6821ee67461eSJoseph Mingrone #include <sys/socket.h> 6822ee67461eSJoseph Mingrone 6823ee67461eSJoseph Mingrone int 6824ee67461eSJoseph Mingrone main(int argc, char **argv) 6825ee67461eSJoseph Mingrone { 6826ee67461eSJoseph Mingrone u_char ea[6] = { 0xff, 0xff, 0xff, 0xff, 0xff }; 6827ee67461eSJoseph Mingrone char name[MAXHOSTNAMELEN]; 6828ee67461eSJoseph Mingrone 6829ee67461eSJoseph Mingrone ether_ntohost(name, (struct ether_addr *)ea); 6830ee67461eSJoseph Mingrone exit(0); 6831ee67461eSJoseph Mingrone } 6832ee67461eSJoseph Mingrone 6833*0a7e5f1fSJoseph Mingrone 6834ee67461eSJoseph Mingrone_ACEOF 6835*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_run "$LINENO" 6836*0a7e5f1fSJoseph Mingronethen : 6837ee67461eSJoseph Mingrone ac_cv_buggy_ether_ntohost=no 6838*0a7e5f1fSJoseph Mingroneelse $as_nop 6839ee67461eSJoseph Mingrone ac_cv_buggy_ether_ntohost=yes 6840ee67461eSJoseph Mingronefi 6841ee67461eSJoseph Mingronerm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 6842ee67461eSJoseph Mingrone conftest.$ac_objext conftest.beam conftest.$ac_ext 6843ee67461eSJoseph Mingronefi 6844ee67461eSJoseph Mingrone 6845ee67461eSJoseph Mingronefi 6846*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_buggy_ether_ntohost" >&5 6847*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_buggy_ether_ntohost" >&6; } 6848ee67461eSJoseph Mingrone if test "$ac_cv_buggy_ether_ntohost" = "no"; then 6849ee67461eSJoseph Mingrone 6850*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define USE_ETHER_NTOHOST 1" >>confdefs.h 6851ee67461eSJoseph Mingrone 6852ee67461eSJoseph Mingrone fi 6853ee67461eSJoseph Mingrone 6854ee67461eSJoseph Mingronefi 6855*0a7e5f1fSJoseph Mingrone 6856ee67461eSJoseph Mingronedone 6857ee67461eSJoseph Mingroneif test "$ac_cv_func_ether_ntohost" = yes -a \ 6858ee67461eSJoseph Mingrone "$ac_cv_buggy_ether_ntohost" = "no"; then 6859ee67461eSJoseph Mingrone # 6860ee67461eSJoseph Mingrone # OK, we have ether_ntohost(). Is it declared in <net/ethernet.h>? 6861ee67461eSJoseph Mingrone # 6862ee67461eSJoseph Mingrone # This test fails if we don't have <net/ethernet.h> or if we do 6863ee67461eSJoseph Mingrone # but it doesn't declare ether_ntohost(). 6864ee67461eSJoseph Mingrone # 6865*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 6866*0a7e5f1fSJoseph Mingroneprintf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } 6867*0a7e5f1fSJoseph Mingroneif test ${ac_cv_c_undeclared_builtin_options+y} 6868*0a7e5f1fSJoseph Mingronethen : 6869*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 6870*0a7e5f1fSJoseph Mingroneelse $as_nop 6871*0a7e5f1fSJoseph Mingrone ac_save_CFLAGS=$CFLAGS 6872*0a7e5f1fSJoseph Mingrone ac_cv_c_undeclared_builtin_options='cannot detect' 6873*0a7e5f1fSJoseph Mingrone for ac_arg in '' -fno-builtin; do 6874*0a7e5f1fSJoseph Mingrone CFLAGS="$ac_save_CFLAGS $ac_arg" 6875*0a7e5f1fSJoseph Mingrone # This test program should *not* compile successfully. 6876*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6877*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 6878*0a7e5f1fSJoseph Mingrone 6879*0a7e5f1fSJoseph Mingroneint 6880*0a7e5f1fSJoseph Mingronemain (void) 6881*0a7e5f1fSJoseph Mingrone{ 6882*0a7e5f1fSJoseph Mingrone(void) strchr; 6883*0a7e5f1fSJoseph Mingrone ; 6884*0a7e5f1fSJoseph Mingrone return 0; 6885*0a7e5f1fSJoseph Mingrone} 6886*0a7e5f1fSJoseph Mingrone_ACEOF 6887*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 6888*0a7e5f1fSJoseph Mingronethen : 6889*0a7e5f1fSJoseph Mingrone 6890*0a7e5f1fSJoseph Mingroneelse $as_nop 6891*0a7e5f1fSJoseph Mingrone # This test program should compile successfully. 6892*0a7e5f1fSJoseph Mingrone # No library function is consistently available on 6893*0a7e5f1fSJoseph Mingrone # freestanding implementations, so test against a dummy 6894*0a7e5f1fSJoseph Mingrone # declaration. Include always-available headers on the 6895*0a7e5f1fSJoseph Mingrone # off chance that they somehow elicit warnings. 6896*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6897*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 6898*0a7e5f1fSJoseph Mingrone#include <float.h> 6899*0a7e5f1fSJoseph Mingrone#include <limits.h> 6900*0a7e5f1fSJoseph Mingrone#include <stdarg.h> 6901*0a7e5f1fSJoseph Mingrone#include <stddef.h> 6902*0a7e5f1fSJoseph Mingroneextern void ac_decl (int, char *); 6903*0a7e5f1fSJoseph Mingrone 6904*0a7e5f1fSJoseph Mingroneint 6905*0a7e5f1fSJoseph Mingronemain (void) 6906*0a7e5f1fSJoseph Mingrone{ 6907*0a7e5f1fSJoseph Mingrone(void) ac_decl (0, (char *) 0); 6908*0a7e5f1fSJoseph Mingrone (void) ac_decl; 6909*0a7e5f1fSJoseph Mingrone 6910*0a7e5f1fSJoseph Mingrone ; 6911*0a7e5f1fSJoseph Mingrone return 0; 6912*0a7e5f1fSJoseph Mingrone} 6913*0a7e5f1fSJoseph Mingrone_ACEOF 6914*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 6915*0a7e5f1fSJoseph Mingronethen : 6916*0a7e5f1fSJoseph Mingrone if test x"$ac_arg" = x 6917*0a7e5f1fSJoseph Mingronethen : 6918*0a7e5f1fSJoseph Mingrone ac_cv_c_undeclared_builtin_options='none needed' 6919*0a7e5f1fSJoseph Mingroneelse $as_nop 6920*0a7e5f1fSJoseph Mingrone ac_cv_c_undeclared_builtin_options=$ac_arg 6921*0a7e5f1fSJoseph Mingronefi 6922*0a7e5f1fSJoseph Mingrone break 6923*0a7e5f1fSJoseph Mingronefi 6924*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 6925*0a7e5f1fSJoseph Mingronefi 6926*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 6927*0a7e5f1fSJoseph Mingrone done 6928*0a7e5f1fSJoseph Mingrone CFLAGS=$ac_save_CFLAGS 6929*0a7e5f1fSJoseph Mingrone 6930*0a7e5f1fSJoseph Mingronefi 6931*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 6932*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } 6933*0a7e5f1fSJoseph Mingrone case $ac_cv_c_undeclared_builtin_options in #( 6934*0a7e5f1fSJoseph Mingrone 'cannot detect') : 6935*0a7e5f1fSJoseph Mingrone { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 6936*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} 6937*0a7e5f1fSJoseph Mingroneas_fn_error $? "cannot make $CC report undeclared builtins 6938*0a7e5f1fSJoseph MingroneSee \`config.log' for more details" "$LINENO" 5; } ;; #( 6939*0a7e5f1fSJoseph Mingrone 'none needed') : 6940*0a7e5f1fSJoseph Mingrone ac_c_undeclared_builtin_options='' ;; #( 6941*0a7e5f1fSJoseph Mingrone *) : 6942*0a7e5f1fSJoseph Mingrone ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; 6943*0a7e5f1fSJoseph Mingroneesac 6944*0a7e5f1fSJoseph Mingrone 6945*0a7e5f1fSJoseph Mingroneac_fn_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" " 6946ee67461eSJoseph Mingrone#include <net/ethernet.h> 6947ee67461eSJoseph Mingrone 6948*0a7e5f1fSJoseph Mingrone" "$ac_c_undeclared_builtin_options" "CFLAGS" 6949*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_have_decl_ether_ntohost" = xyes 6950*0a7e5f1fSJoseph Mingronethen : 6951ee67461eSJoseph Mingrone 6952ee67461eSJoseph Mingrone 6953*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define NET_ETHERNET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h 6954ee67461eSJoseph Mingrone 6955ee67461eSJoseph Mingrone 6956ee67461eSJoseph Mingronefi 6957ee67461eSJoseph Mingrone # 6958ee67461eSJoseph Mingrone # Did that succeed? 6959ee67461eSJoseph Mingrone # 6960ee67461eSJoseph Mingrone if test "$ac_cv_have_decl_ether_ntohost" != yes; then 6961ee67461eSJoseph Mingrone # 6962ee67461eSJoseph Mingrone # No, how about <netinet/ether.h>, as on Linux? 6963ee67461eSJoseph Mingrone # 6964ee67461eSJoseph Mingrone # This test fails if we don't have <netinet/ether.h> 6965ee67461eSJoseph Mingrone # or if we do but it doesn't declare ether_ntohost(). 6966ee67461eSJoseph Mingrone # 6967ee67461eSJoseph Mingrone # Unset ac_cv_have_decl_ether_ntohost so we don't 6968ee67461eSJoseph Mingrone # treat the previous failure as a cached value and 6969ee67461eSJoseph Mingrone # suppress the next test. 6970ee67461eSJoseph Mingrone # 6971ee67461eSJoseph Mingrone unset ac_cv_have_decl_ether_ntohost 6972*0a7e5f1fSJoseph Mingrone ac_fn_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" " 6973ee67461eSJoseph Mingrone#include <netinet/ether.h> 6974ee67461eSJoseph Mingrone 6975*0a7e5f1fSJoseph Mingrone" "$ac_c_undeclared_builtin_options" "CFLAGS" 6976*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_have_decl_ether_ntohost" = xyes 6977*0a7e5f1fSJoseph Mingronethen : 6978ee67461eSJoseph Mingrone 6979ee67461eSJoseph Mingrone 6980*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define NETINET_ETHER_H_DECLARES_ETHER_NTOHOST 1" >>confdefs.h 6981ee67461eSJoseph Mingrone 6982ee67461eSJoseph Mingrone 6983ee67461eSJoseph Mingronefi 6984ee67461eSJoseph Mingrone fi 6985ee67461eSJoseph Mingrone # 6986ee67461eSJoseph Mingrone # Did that succeed? 6987ee67461eSJoseph Mingrone # 6988ee67461eSJoseph Mingrone if test "$ac_cv_have_decl_ether_ntohost" != yes; then 6989ee67461eSJoseph Mingrone # 6990ee67461eSJoseph Mingrone # No, how about <sys/ethernet.h>, as on Solaris 10 6991ee67461eSJoseph Mingrone # and later? 6992ee67461eSJoseph Mingrone # 6993ee67461eSJoseph Mingrone # This test fails if we don't have <sys/ethernet.h> 6994ee67461eSJoseph Mingrone # or if we do but it doesn't declare ether_ntohost(). 6995ee67461eSJoseph Mingrone # 6996ee67461eSJoseph Mingrone # Unset ac_cv_have_decl_ether_ntohost so we don't 6997ee67461eSJoseph Mingrone # treat the previous failure as a cached value and 6998ee67461eSJoseph Mingrone # suppress the next test. 6999ee67461eSJoseph Mingrone # 7000ee67461eSJoseph Mingrone unset ac_cv_have_decl_ether_ntohost 7001*0a7e5f1fSJoseph Mingrone ac_fn_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" " 7002ee67461eSJoseph Mingrone#include <sys/ethernet.h> 7003ee67461eSJoseph Mingrone 7004*0a7e5f1fSJoseph Mingrone" "$ac_c_undeclared_builtin_options" "CFLAGS" 7005*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_have_decl_ether_ntohost" = xyes 7006*0a7e5f1fSJoseph Mingronethen : 7007ee67461eSJoseph Mingrone 7008ee67461eSJoseph Mingrone 7009*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define SYS_ETHERNET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h 7010ee67461eSJoseph Mingrone 7011ee67461eSJoseph Mingrone 7012ee67461eSJoseph Mingronefi 7013ee67461eSJoseph Mingrone fi 7014ee67461eSJoseph Mingrone # 7015ee67461eSJoseph Mingrone # Did that succeed? 7016ee67461eSJoseph Mingrone # 7017ee67461eSJoseph Mingrone if test "$ac_cv_have_decl_ether_ntohost" != yes; then 7018ee67461eSJoseph Mingrone # 7019ee67461eSJoseph Mingrone # No, how about <arpa/inet.h>, as in AIX? 7020ee67461eSJoseph Mingrone # 7021ee67461eSJoseph Mingrone # This test fails if we don't have <arpa/inet.h> 7022ee67461eSJoseph Mingrone # (if we have ether_ntohost(), we should have 7023ee67461eSJoseph Mingrone # networking, and if we have networking, we should 7024ee67461eSJoseph Mingrone # have <arpa/inet.h>) or if we do but it doesn't 7025ee67461eSJoseph Mingrone # declare ether_ntohost(). 7026ee67461eSJoseph Mingrone # 7027ee67461eSJoseph Mingrone # Unset ac_cv_have_decl_ether_ntohost so we don't 7028ee67461eSJoseph Mingrone # treat the previous failure as a cached value and 7029ee67461eSJoseph Mingrone # suppress the next test. 7030ee67461eSJoseph Mingrone # 7031ee67461eSJoseph Mingrone unset ac_cv_have_decl_ether_ntohost 7032*0a7e5f1fSJoseph Mingrone ac_fn_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" " 7033ee67461eSJoseph Mingrone#include <arpa/inet.h> 7034ee67461eSJoseph Mingrone 7035*0a7e5f1fSJoseph Mingrone" "$ac_c_undeclared_builtin_options" "CFLAGS" 7036*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_have_decl_ether_ntohost" = xyes 7037*0a7e5f1fSJoseph Mingronethen : 7038ee67461eSJoseph Mingrone 7039ee67461eSJoseph Mingrone 7040*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define ARPA_INET_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h 7041ee67461eSJoseph Mingrone 7042ee67461eSJoseph Mingrone 7043ee67461eSJoseph Mingronefi 7044ee67461eSJoseph Mingrone fi 7045ee67461eSJoseph Mingrone # 7046ee67461eSJoseph Mingrone # Did that succeed? 7047ee67461eSJoseph Mingrone # 7048ee67461eSJoseph Mingrone if test "$ac_cv_have_decl_ether_ntohost" != yes; then 7049ee67461eSJoseph Mingrone # 7050ee67461eSJoseph Mingrone # No, how about <netinet/if_ether.h>? 7051ee67461eSJoseph Mingrone # On some platforms, it requires <net/if.h> and 7052ee67461eSJoseph Mingrone # <netinet/in.h>, and we always include it with 7053ee67461eSJoseph Mingrone # both of them, so test it with both of them. 7054ee67461eSJoseph Mingrone # 7055ee67461eSJoseph Mingrone # This test fails if we don't have <netinet/if_ether.h> 7056ee67461eSJoseph Mingrone # and the headers we include before it, or if we do but 7057ee67461eSJoseph Mingrone # <netinet/if_ether.h> doesn't declare ether_hostton(). 7058ee67461eSJoseph Mingrone # 7059ee67461eSJoseph Mingrone # Unset ac_cv_have_decl_ether_ntohost so we don't 7060ee67461eSJoseph Mingrone # treat the previous failure as a cached value and 7061ee67461eSJoseph Mingrone # suppress the next test. 7062ee67461eSJoseph Mingrone # 7063ee67461eSJoseph Mingrone unset ac_cv_have_decl_ether_ntohost 7064*0a7e5f1fSJoseph Mingrone ac_fn_check_decl "$LINENO" "ether_ntohost" "ac_cv_have_decl_ether_ntohost" " 7065ee67461eSJoseph Mingrone#include <sys/types.h> 7066ee67461eSJoseph Mingrone#include <sys/socket.h> 7067ee67461eSJoseph Mingrone#include <net/if.h> 7068ee67461eSJoseph Mingrone#include <netinet/in.h> 7069ee67461eSJoseph Mingrone#include <netinet/if_ether.h> 7070ee67461eSJoseph Mingrone 7071*0a7e5f1fSJoseph Mingrone" "$ac_c_undeclared_builtin_options" "CFLAGS" 7072*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_have_decl_ether_ntohost" = xyes 7073*0a7e5f1fSJoseph Mingronethen : 7074ee67461eSJoseph Mingrone 7075ee67461eSJoseph Mingrone 7076*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define NETINET_IF_ETHER_H_DECLARES_ETHER_NTOHOST /**/" >>confdefs.h 7077ee67461eSJoseph Mingrone 7078ee67461eSJoseph Mingrone 7079ee67461eSJoseph Mingronefi 7080ee67461eSJoseph Mingrone fi 7081ee67461eSJoseph Mingrone # 7082ee67461eSJoseph Mingrone # After all that, is ether_ntohost() declared? 7083ee67461eSJoseph Mingrone # 7084ee67461eSJoseph Mingrone if test "$ac_cv_have_decl_ether_ntohost" = yes; then 7085ee67461eSJoseph Mingrone # 7086ee67461eSJoseph Mingrone # Yes. 7087ee67461eSJoseph Mingrone # 7088ee67461eSJoseph Mingrone 7089*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define HAVE_DECL_ETHER_NTOHOST 1" >>confdefs.h 7090ee67461eSJoseph Mingrone 7091ee67461eSJoseph Mingrone else 7092ee67461eSJoseph Mingrone # 7093ee67461eSJoseph Mingrone # No, we'll have to declare it ourselves. 7094ee67461eSJoseph Mingrone # Do we have "struct ether_addr" if we include 7095ee67461eSJoseph Mingrone # <netinet/if_ether.h>? 7096ee67461eSJoseph Mingrone # 7097ee67461eSJoseph Mingrone ac_fn_c_check_type "$LINENO" "struct ether_addr" "ac_cv_type_struct_ether_addr" " 7098ee67461eSJoseph Mingrone #include <sys/types.h> 7099ee67461eSJoseph Mingrone #include <sys/socket.h> 7100ee67461eSJoseph Mingrone #include <net/if.h> 7101ee67461eSJoseph Mingrone #include <netinet/in.h> 7102ee67461eSJoseph Mingrone #include <netinet/if_ether.h> 7103ee67461eSJoseph Mingrone 7104ee67461eSJoseph Mingrone" 7105*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_type_struct_ether_addr" = xyes 7106*0a7e5f1fSJoseph Mingronethen : 7107ee67461eSJoseph Mingrone 7108*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define HAVE_STRUCT_ETHER_ADDR 1" >>confdefs.h 7109ee67461eSJoseph Mingrone 7110ee67461eSJoseph Mingrone 7111ee67461eSJoseph Mingronefi 7112ee67461eSJoseph Mingrone 7113ee67461eSJoseph Mingrone fi 7114ee67461eSJoseph Mingronefi 7115a5779b6eSRui Paulo 71168bdc5a62SPatrick Kelseyac_fn_c_check_func "$LINENO" "pcap_list_datalinks" "ac_cv_func_pcap_list_datalinks" 7117*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_list_datalinks" = xyes 7118*0a7e5f1fSJoseph Mingronethen : 71198bdc5a62SPatrick Kelsey 71208bdc5a62SPatrick Kelsey 7121*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define HAVE_PCAP_LIST_DATALINKS 1" >>confdefs.h 71228bdc5a62SPatrick Kelsey 71238bdc5a62SPatrick Kelsey ac_fn_c_check_func "$LINENO" "pcap_free_datalinks" "ac_cv_func_pcap_free_datalinks" 7124*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_free_datalinks" = xyes 7125*0a7e5f1fSJoseph Mingronethen : 7126*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_FREE_DATALINKS 1" >>confdefs.h 71278bdc5a62SPatrick Kelsey 71288bdc5a62SPatrick Kelseyfi 71298bdc5a62SPatrick Kelsey 71308bdc5a62SPatrick Kelsey 7131*0a7e5f1fSJoseph Mingroneelse $as_nop 71328bdc5a62SPatrick Kelsey 71338bdc5a62SPatrick Kelsey case " $LIBOBJS " in 71348bdc5a62SPatrick Kelsey *" datalinks.$ac_objext "* ) ;; 71358bdc5a62SPatrick Kelsey *) LIBOBJS="$LIBOBJS datalinks.$ac_objext" 71368bdc5a62SPatrick Kelsey ;; 71378bdc5a62SPatrick Kelseyesac 71388bdc5a62SPatrick Kelsey 71398bdc5a62SPatrick Kelsey 71408bdc5a62SPatrick Kelseyfi 71418bdc5a62SPatrick Kelsey 71428bdc5a62SPatrick Kelsey 71438bdc5a62SPatrick Kelseyac_fn_c_check_func "$LINENO" "pcap_datalink_name_to_val" "ac_cv_func_pcap_datalink_name_to_val" 7144*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_datalink_name_to_val" = xyes 7145*0a7e5f1fSJoseph Mingronethen : 71468bdc5a62SPatrick Kelsey 71478bdc5a62SPatrick Kelsey 7148*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define HAVE_PCAP_DATALINK_NAME_TO_VAL 1" >>confdefs.h 71498bdc5a62SPatrick Kelsey 71508bdc5a62SPatrick Kelsey ac_fn_c_check_func "$LINENO" "pcap_datalink_val_to_description" "ac_cv_func_pcap_datalink_val_to_description" 7151*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_datalink_val_to_description" = xyes 7152*0a7e5f1fSJoseph Mingronethen : 71538bdc5a62SPatrick Kelsey 7154*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define HAVE_PCAP_DATALINK_VAL_TO_DESCRIPTION 1" >>confdefs.h 71558bdc5a62SPatrick Kelsey 7156*0a7e5f1fSJoseph Mingroneelse $as_nop 71578bdc5a62SPatrick Kelsey 71588bdc5a62SPatrick Kelsey case " $LIBOBJS " in 71598bdc5a62SPatrick Kelsey *" dlnames.$ac_objext "* ) ;; 71608bdc5a62SPatrick Kelsey *) LIBOBJS="$LIBOBJS dlnames.$ac_objext" 71618bdc5a62SPatrick Kelsey ;; 71628bdc5a62SPatrick Kelseyesac 71638bdc5a62SPatrick Kelsey 71648bdc5a62SPatrick Kelsey 71658bdc5a62SPatrick Kelseyfi 71668bdc5a62SPatrick Kelsey 71678bdc5a62SPatrick Kelsey 7168*0a7e5f1fSJoseph Mingroneelse $as_nop 71698bdc5a62SPatrick Kelsey 71708bdc5a62SPatrick Kelsey case " $LIBOBJS " in 71718bdc5a62SPatrick Kelsey *" dlnames.$ac_objext "* ) ;; 71728bdc5a62SPatrick Kelsey *) LIBOBJS="$LIBOBJS dlnames.$ac_objext" 71738bdc5a62SPatrick Kelsey ;; 71748bdc5a62SPatrick Kelseyesac 71758bdc5a62SPatrick Kelsey 71768bdc5a62SPatrick Kelsey 71778bdc5a62SPatrick Kelseyfi 71788bdc5a62SPatrick Kelsey 71798bdc5a62SPatrick Kelsey 7180ee67461eSJoseph Mingroneac_fn_c_check_func "$LINENO" "pcap_set_datalink" "ac_cv_func_pcap_set_datalink" 7181*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_set_datalink" = xyes 7182*0a7e5f1fSJoseph Mingronethen : 7183*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_SET_DATALINK 1" >>confdefs.h 7184ee67461eSJoseph Mingrone 7185ee67461eSJoseph Mingronefi 7186ee67461eSJoseph Mingrone 7187ee67461eSJoseph Mingrone 71888bdc5a62SPatrick Kelseyac_fn_c_check_func "$LINENO" "pcap_breakloop" "ac_cv_func_pcap_breakloop" 7189*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_breakloop" = xyes 7190*0a7e5f1fSJoseph Mingronethen : 7191*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_BREAKLOOP 1" >>confdefs.h 71928bdc5a62SPatrick Kelsey 71938bdc5a62SPatrick Kelseyfi 71948bdc5a62SPatrick Kelsey 71958bdc5a62SPatrick Kelsey 7196a5779b6eSRui Paulo# 7197a5779b6eSRui Paulo# Do we have the new open API? Check for pcap_create, and assume that, 7198cac3dcd5SXin LI# if we do, we also have pcap_activate() and the other new routines 7199cac3dcd5SXin LI# introduced in libpcap 1.0.0. 7200cac3dcd5SXin LI# 7201d03c0883SXin LIac_fn_c_check_func "$LINENO" "pcap_create" "ac_cv_func_pcap_create" 7202*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_create" = xyes 7203*0a7e5f1fSJoseph Mingronethen : 7204*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_CREATE 1" >>confdefs.h 7205a5779b6eSRui Paulo 7206a5779b6eSRui Paulofi 7207a5779b6eSRui Paulo 7208cac3dcd5SXin LIif test $ac_cv_func_pcap_create = "yes" ; then 7209cac3dcd5SXin LI # 7210cac3dcd5SXin LI # OK, do we have pcap_set_tstamp_type? If so, assume we have 7211cac3dcd5SXin LI # pcap_list_tstamp_types and pcap_free_tstamp_types as well. 7212cac3dcd5SXin LI # 7213d03c0883SXin LI ac_fn_c_check_func "$LINENO" "pcap_set_tstamp_type" "ac_cv_func_pcap_set_tstamp_type" 7214*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_set_tstamp_type" = xyes 7215*0a7e5f1fSJoseph Mingronethen : 7216*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_SET_TSTAMP_TYPE 1" >>confdefs.h 7217cac3dcd5SXin LI 7218cac3dcd5SXin LIfi 7219cac3dcd5SXin LI 72203c602fabSXin LI # 72213c602fabSXin LI # And do we have pcap_set_tstamp_precision? If so, we assume 72223c602fabSXin LI # we also have pcap_open_offline_with_tstamp_precision. 72233c602fabSXin LI # 72243c602fabSXin LI ac_fn_c_check_func "$LINENO" "pcap_set_tstamp_precision" "ac_cv_func_pcap_set_tstamp_precision" 7225*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_set_tstamp_precision" = xyes 7226*0a7e5f1fSJoseph Mingronethen : 7227*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_SET_TSTAMP_PRECISION 1" >>confdefs.h 72283c602fabSXin LI 72293c602fabSXin LIfi 72303c602fabSXin LI 7231cac3dcd5SXin LIfi 7232a5779b6eSRui Paulo 72338bdc5a62SPatrick Kelsey# 72348bdc5a62SPatrick Kelsey# Check for a miscellaneous collection of functions which we use 72358bdc5a62SPatrick Kelsey# if we have them. 72368bdc5a62SPatrick Kelsey# 7237ee67461eSJoseph Mingroneac_fn_c_check_func "$LINENO" "pcap_findalldevs" "ac_cv_func_pcap_findalldevs" 7238*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_findalldevs" = xyes 7239*0a7e5f1fSJoseph Mingronethen : 7240*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_FINDALLDEVS 1" >>confdefs.h 72415b0fe478SBruce M Simpson 72425b0fe478SBruce M Simpsonfi 72435b0fe478SBruce M Simpson 7244*0a7e5f1fSJoseph Mingroneac_fn_c_check_func "$LINENO" "pcap_dump_flush" "ac_cv_func_pcap_dump_flush" 7245*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_dump_flush" = xyes 7246*0a7e5f1fSJoseph Mingronethen : 7247*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_DUMP_FLUSH 1" >>confdefs.h 7248ee67461eSJoseph Mingrone 7249ee67461eSJoseph Mingronefi 7250*0a7e5f1fSJoseph Mingroneac_fn_c_check_func "$LINENO" "pcap_lib_version" "ac_cv_func_pcap_lib_version" 7251*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_lib_version" = xyes 7252*0a7e5f1fSJoseph Mingronethen : 7253*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_LIB_VERSION 1" >>confdefs.h 7254*0a7e5f1fSJoseph Mingrone 7255*0a7e5f1fSJoseph Mingronefi 72561de50e9fSSam Leffler 72575b0fe478SBruce M Simpsonif test $ac_cv_func_pcap_lib_version = "no" ; then 7258*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pcap_version is defined by libpcap" >&5 7259*0a7e5f1fSJoseph Mingroneprintf %s "checking whether pcap_version is defined by libpcap... " >&6; } 7260d03c0883SXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 72615b0fe478SBruce M Simpson/* end confdefs.h. */ 72625b0fe478SBruce M Simpson 72635b0fe478SBruce M Simpsonint 7264*0a7e5f1fSJoseph Mingronemain (void) 72655b0fe478SBruce M Simpson{ 72665b0fe478SBruce M Simpson 72675b0fe478SBruce M Simpson extern char pcap_version[]; 72685b0fe478SBruce M Simpson 72691de50e9fSSam Leffler return (int)pcap_version; 72705b0fe478SBruce M Simpson 72715b0fe478SBruce M Simpson ; 72725b0fe478SBruce M Simpson return 0; 72735b0fe478SBruce M Simpson} 7274*0a7e5f1fSJoseph Mingrone 72755b0fe478SBruce M Simpson_ACEOF 7276*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 7277*0a7e5f1fSJoseph Mingronethen : 72785b0fe478SBruce M Simpson ac_lbl_cv_pcap_version_defined=yes 7279*0a7e5f1fSJoseph Mingroneelse $as_nop 72805b0fe478SBruce M Simpson ac_lbl_cv_pcap_version_defined=no 72815b0fe478SBruce M Simpsonfi 7282*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 7283b5bfcb5dSMax Laier conftest$ac_exeext conftest.$ac_ext 72845b0fe478SBruce M Simpson if test "$ac_lbl_cv_pcap_version_defined" = yes ; then 7285*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 7286*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 72873c602fabSXin LI 7288*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define HAVE_PCAP_VERSION 1" >>confdefs.h 7289685295f4SBill Fenner 7290685295f4SBill Fenner else 7291*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 7292*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 72935b0fe478SBruce M Simpson fi 72945b0fe478SBruce M Simpsonfi 7295*0a7e5f1fSJoseph Mingroneac_fn_c_check_func "$LINENO" "pcap_setdirection" "ac_cv_func_pcap_setdirection" 7296*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_setdirection" = xyes 7297*0a7e5f1fSJoseph Mingronethen : 7298*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_SETDIRECTION 1" >>confdefs.h 7299ee67461eSJoseph Mingrone 7300ee67461eSJoseph Mingronefi 7301*0a7e5f1fSJoseph Mingroneac_fn_c_check_func "$LINENO" "pcap_set_immediate_mode" "ac_cv_func_pcap_set_immediate_mode" 7302*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_set_immediate_mode" = xyes 7303*0a7e5f1fSJoseph Mingronethen : 7304*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_SET_IMMEDIATE_MODE 1" >>confdefs.h 7305ee67461eSJoseph Mingrone 7306ee67461eSJoseph Mingronefi 7307*0a7e5f1fSJoseph Mingroneac_fn_c_check_func "$LINENO" "pcap_dump_ftell64" "ac_cv_func_pcap_dump_ftell64" 7308*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_dump_ftell64" = xyes 7309*0a7e5f1fSJoseph Mingronethen : 7310*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_DUMP_FTELL64 1" >>confdefs.h 7311ee67461eSJoseph Mingrone 7312*0a7e5f1fSJoseph Mingronefi 7313*0a7e5f1fSJoseph Mingrone 7314*0a7e5f1fSJoseph Mingrone# 7315*0a7e5f1fSJoseph Mingrone# See the comment in AC_LBL_LIBPCAP in aclocal.m4 for the reason 7316*0a7e5f1fSJoseph Mingrone# why we don't check for remote-capture APIs if we're building 7317*0a7e5f1fSJoseph Mingrone# with the system libpcap on macOS. 7318*0a7e5f1fSJoseph Mingrone# 7319*0a7e5f1fSJoseph Mingroneif test "$_dont_check_for_remote_apis" != "yes"; then 7320*0a7e5f1fSJoseph Mingrone ac_fn_c_check_func "$LINENO" "pcap_open" "ac_cv_func_pcap_open" 7321*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_open" = xyes 7322*0a7e5f1fSJoseph Mingronethen : 7323*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_OPEN 1" >>confdefs.h 7324*0a7e5f1fSJoseph Mingrone 7325*0a7e5f1fSJoseph Mingronefi 7326*0a7e5f1fSJoseph Mingroneac_fn_c_check_func "$LINENO" "pcap_findalldevs_ex" "ac_cv_func_pcap_findalldevs_ex" 7327*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_findalldevs_ex" = xyes 7328*0a7e5f1fSJoseph Mingronethen : 7329*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_FINDALLDEVS_EX 1" >>confdefs.h 7330*0a7e5f1fSJoseph Mingrone 7331*0a7e5f1fSJoseph Mingronefi 7332*0a7e5f1fSJoseph Mingrone 7333*0a7e5f1fSJoseph Mingronefi 7334ee67461eSJoseph Mingroneac_fn_c_check_func "$LINENO" "pcap_dump_ftell" "ac_cv_func_pcap_dump_ftell" 7335*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_dump_ftell" = xyes 7336*0a7e5f1fSJoseph Mingronethen : 7337*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_DUMP_FTELL 1" >>confdefs.h 7338ee67461eSJoseph Mingrone 7339*0a7e5f1fSJoseph Mingroneelse $as_nop 7340ee67461eSJoseph Mingrone case " $LIBOBJS " in 7341ee67461eSJoseph Mingrone *" pcap_dump_ftell.$ac_objext "* ) ;; 7342ee67461eSJoseph Mingrone *) LIBOBJS="$LIBOBJS pcap_dump_ftell.$ac_objext" 7343ee67461eSJoseph Mingrone ;; 7344ee67461eSJoseph Mingroneesac 7345ee67461eSJoseph Mingrone 7346ee67461eSJoseph Mingronefi 7347ee67461eSJoseph Mingrone 7348ee67461eSJoseph Mingrone 73493340d773SGleb Smirnoff# 73503340d773SGleb Smirnoff# Check for special debugging functions 73513340d773SGleb Smirnoff# 73523340d773SGleb Smirnoffac_fn_c_check_func "$LINENO" "pcap_set_parser_debug" "ac_cv_func_pcap_set_parser_debug" 7353*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_set_parser_debug" = xyes 7354*0a7e5f1fSJoseph Mingronethen : 7355*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_SET_PARSER_DEBUG 1" >>confdefs.h 73563340d773SGleb Smirnoff 73573340d773SGleb Smirnofffi 73583340d773SGleb Smirnoff 73593340d773SGleb Smirnoffif test "$ac_cv_func_pcap_set_parser_debug" = "no" ; then 73603340d773SGleb Smirnoff # 73613340d773SGleb Smirnoff # OK, we don't have pcap_set_parser_debug() to set the libpcap 73623340d773SGleb Smirnoff # filter expression parser debug flag; can we directly set the 73633340d773SGleb Smirnoff # flag? 7364*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pcap_debug is defined by libpcap" >&5 7365*0a7e5f1fSJoseph Mingroneprintf %s "checking whether pcap_debug is defined by libpcap... " >&6; } 7366d03c0883SXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 73675b0fe478SBruce M Simpson/* end confdefs.h. */ 73685b0fe478SBruce M Simpson 73695b0fe478SBruce M Simpsonint 7370*0a7e5f1fSJoseph Mingronemain (void) 73715b0fe478SBruce M Simpson{ 73725b0fe478SBruce M Simpson 73735b0fe478SBruce M Simpson extern int pcap_debug; 73745b0fe478SBruce M Simpson 73755b0fe478SBruce M Simpson return pcap_debug; 73765b0fe478SBruce M Simpson 73775b0fe478SBruce M Simpson ; 73785b0fe478SBruce M Simpson return 0; 73795b0fe478SBruce M Simpson} 7380*0a7e5f1fSJoseph Mingrone 73815b0fe478SBruce M Simpson_ACEOF 7382*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 7383*0a7e5f1fSJoseph Mingronethen : 73845b0fe478SBruce M Simpson ac_lbl_cv_pcap_debug_defined=yes 7385*0a7e5f1fSJoseph Mingroneelse $as_nop 73865b0fe478SBruce M Simpson ac_lbl_cv_pcap_debug_defined=no 73875b0fe478SBruce M Simpsonfi 7388*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 7389b5bfcb5dSMax Laier conftest$ac_exeext conftest.$ac_ext 73905b0fe478SBruce M Simpson if test "$ac_lbl_cv_pcap_debug_defined" = yes ; then 7391*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 7392*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 73933c602fabSXin LI 7394*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define HAVE_PCAP_DEBUG 1" >>confdefs.h 73955b0fe478SBruce M Simpson 73965b0fe478SBruce M Simpson else 7397*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 7398*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 73995b0fe478SBruce M Simpson # 74005b0fe478SBruce M Simpson # OK, what about "yydebug"? 74015b0fe478SBruce M Simpson # 7402*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether yydebug is defined by libpcap" >&5 7403*0a7e5f1fSJoseph Mingroneprintf %s "checking whether yydebug is defined by libpcap... " >&6; } 7404d03c0883SXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 74055b0fe478SBruce M Simpson/* end confdefs.h. */ 74065b0fe478SBruce M Simpson 74075b0fe478SBruce M Simpsonint 7408*0a7e5f1fSJoseph Mingronemain (void) 74095b0fe478SBruce M Simpson{ 74105b0fe478SBruce M Simpson 74115b0fe478SBruce M Simpson extern int yydebug; 74125b0fe478SBruce M Simpson 74135b0fe478SBruce M Simpson return yydebug; 74145b0fe478SBruce M Simpson 74155b0fe478SBruce M Simpson ; 74165b0fe478SBruce M Simpson return 0; 74175b0fe478SBruce M Simpson} 7418*0a7e5f1fSJoseph Mingrone 74195b0fe478SBruce M Simpson_ACEOF 7420*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 7421*0a7e5f1fSJoseph Mingronethen : 74225b0fe478SBruce M Simpson ac_lbl_cv_yydebug_defined=yes 7423*0a7e5f1fSJoseph Mingroneelse $as_nop 74245b0fe478SBruce M Simpson ac_lbl_cv_yydebug_defined=no 74255b0fe478SBruce M Simpsonfi 7426*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 7427b5bfcb5dSMax Laier conftest$ac_exeext conftest.$ac_ext 74285b0fe478SBruce M Simpson if test "$ac_lbl_cv_yydebug_defined" = yes ; then 7429*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 7430*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 74313c602fabSXin LI 7432*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define HAVE_YYDEBUG 1" >>confdefs.h 74335b0fe478SBruce M Simpson 74345b0fe478SBruce M Simpson else 7435*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 7436*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 74375b0fe478SBruce M Simpson fi 74385b0fe478SBruce M Simpson fi 74393340d773SGleb Smirnofffi 74403340d773SGleb Smirnoffac_fn_c_check_func "$LINENO" "pcap_set_optimizer_debug" "ac_cv_func_pcap_set_optimizer_debug" 7441*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_pcap_set_optimizer_debug" = xyes 7442*0a7e5f1fSJoseph Mingronethen : 7443*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_SET_OPTIMIZER_DEBUG 1" >>confdefs.h 74443340d773SGleb Smirnoff 74453340d773SGleb Smirnofffi 74463340d773SGleb Smirnoff 7447d03c0883SXin LIac_fn_c_check_func "$LINENO" "bpf_dump" "ac_cv_func_bpf_dump" 7448*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_bpf_dump" = xyes 7449*0a7e5f1fSJoseph Mingronethen : 7450*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_BPF_DUMP 1" >>confdefs.h 74515b0fe478SBruce M Simpson 7452*0a7e5f1fSJoseph Mingroneelse $as_nop 7453b5bfcb5dSMax Laier case " $LIBOBJS " in 7454d03c0883SXin LI *" bpf_dump.$ac_objext "* ) ;; 7455d03c0883SXin LI *) LIBOBJS="$LIBOBJS bpf_dump.$ac_objext" 7456b5bfcb5dSMax Laier ;; 7457b5bfcb5dSMax Laieresac 7458b5bfcb5dSMax Laier 7459685295f4SBill Fennerfi 7460685295f4SBill Fenner 746127df3f5dSRui Paulo# 746227df3f5dSRui Paulo# Assume V7/BSD convention for man pages (file formats in section 5, 746327df3f5dSRui Paulo# miscellaneous info in section 7). 746427df3f5dSRui Paulo# 746527df3f5dSRui PauloMAN_FILE_FORMATS=5 746627df3f5dSRui PauloMAN_MISC_INFO=7 7467a90e161bSBill Fennercase "$host_os" in 74684644f044SBill Fenner 74694644f044SBill Fenneraix*) 7470cac3dcd5SXin LI 7471*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define _SUN 1" >>confdefs.h 74724644f044SBill Fenner 74734644f044SBill Fenner ;; 74744644f044SBill Fenner 747527df3f5dSRui Paulohpux*) 747627df3f5dSRui Paulo # 747727df3f5dSRui Paulo # Use System V conventions for man pages. 747827df3f5dSRui Paulo # 747927df3f5dSRui Paulo MAN_FILE_FORMATS=4 748027df3f5dSRui Paulo MAN_MISC_INFO=5 748127df3f5dSRui Paulo ;; 748227df3f5dSRui Paulo 74834644f044SBill Fenneririx*) 74844644f044SBill Fenner V_GROUP=sys 748527df3f5dSRui Paulo 748627df3f5dSRui Paulo # 748727df3f5dSRui Paulo # Use System V conventions for man pages. 748827df3f5dSRui Paulo # 748927df3f5dSRui Paulo MAN_FILE_FORMATS=4 749027df3f5dSRui Paulo MAN_MISC_INFO=5 74914644f044SBill Fenner ;; 74924644f044SBill Fenner 74934644f044SBill Fennerosf*) 74944644f044SBill Fenner V_GROUP=system 749527df3f5dSRui Paulo 749627df3f5dSRui Paulo # 749727df3f5dSRui Paulo # Use System V conventions for man pages. 749827df3f5dSRui Paulo # 749927df3f5dSRui Paulo MAN_FILE_FORMATS=4 750027df3f5dSRui Paulo MAN_MISC_INFO=5 75014644f044SBill Fenner ;; 75024644f044SBill Fenner 75034644f044SBill Fennersolaris*) 750427df3f5dSRui Paulo # 750527df3f5dSRui Paulo # Use System V conventions for man pages. 750627df3f5dSRui Paulo # 750727df3f5dSRui Paulo MAN_FILE_FORMATS=4 750827df3f5dSRui Paulo MAN_MISC_INFO=5 75094644f044SBill Fenner ;; 75104644f044SBill Fenneresac 75114644f044SBill Fenner 75123c602fabSXin LI# 75138bdc5a62SPatrick Kelsey# Make sure we have a definition for C99's uintptr_t (regardless of 75148bdc5a62SPatrick Kelsey# whether the environment is a C99 environment or not). 75158bdc5a62SPatrick Kelsey# 75168bdc5a62SPatrick Kelsey 75178bdc5a62SPatrick Kelsey ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" 7518*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_type_uintptr_t" = xyes 7519*0a7e5f1fSJoseph Mingronethen : 75208bdc5a62SPatrick Kelsey 7521*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h 75228bdc5a62SPatrick Kelsey 7523*0a7e5f1fSJoseph Mingroneelse $as_nop 75248bdc5a62SPatrick Kelsey for ac_type in 'unsigned int' 'unsigned long int' \ 75258bdc5a62SPatrick Kelsey 'unsigned long long int'; do 75268bdc5a62SPatrick Kelsey cat confdefs.h - <<_ACEOF >conftest.$ac_ext 75278bdc5a62SPatrick Kelsey/* end confdefs.h. */ 75288bdc5a62SPatrick Kelsey$ac_includes_default 75298bdc5a62SPatrick Kelseyint 7530*0a7e5f1fSJoseph Mingronemain (void) 75318bdc5a62SPatrick Kelsey{ 75328bdc5a62SPatrick Kelseystatic int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; 75338bdc5a62SPatrick Kelseytest_array [0] = 0; 75348bdc5a62SPatrick Kelseyreturn test_array [0]; 75358bdc5a62SPatrick Kelsey 75368bdc5a62SPatrick Kelsey ; 75378bdc5a62SPatrick Kelsey return 0; 75388bdc5a62SPatrick Kelsey} 75398bdc5a62SPatrick Kelsey_ACEOF 7540*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 7541*0a7e5f1fSJoseph Mingronethen : 75428bdc5a62SPatrick Kelsey 7543*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define uintptr_t $ac_type" >>confdefs.h 75448bdc5a62SPatrick Kelsey 75458bdc5a62SPatrick Kelsey ac_type= 75468bdc5a62SPatrick Kelseyfi 7547*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 75488bdc5a62SPatrick Kelsey test -z "$ac_type" && break 75498bdc5a62SPatrick Kelsey done 75508bdc5a62SPatrick Kelseyfi 75518bdc5a62SPatrick Kelsey 75528bdc5a62SPatrick Kelsey 75538bdc5a62SPatrick Kelsey 7554*0a7e5f1fSJoseph Mingronesavedcppflags="$CPPFLAGS" 7555*0a7e5f1fSJoseph MingroneCPPFLAGS="$CPPFLAGS $V_INCLS" 7556*0a7e5f1fSJoseph Mingrone 75578bdc5a62SPatrick Kelsey# 7558ee67461eSJoseph Mingrone# Check whether we have pcap/pcap-inttypes.h. 7559ee67461eSJoseph Mingrone# If we do, we use that to get the C99 types defined. 7560ee67461eSJoseph Mingrone# 7561*0a7e5f1fSJoseph Mingroneac_fn_c_check_header_compile "$LINENO" "pcap/pcap-inttypes.h" "ac_cv_header_pcap_pcap_inttypes_h" "$ac_includes_default" 7562*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_header_pcap_pcap_inttypes_h" = xyes 7563*0a7e5f1fSJoseph Mingronethen : 7564*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_PCAP_PCAP_INTTYPES_H 1" >>confdefs.h 7565ee67461eSJoseph Mingrone 7566ee67461eSJoseph Mingronefi 7567ee67461eSJoseph Mingrone 7568*0a7e5f1fSJoseph Mingrone 7569*0a7e5f1fSJoseph Mingrone# 7570*0a7e5f1fSJoseph Mingrone# At compile time HAVE_PCAP_FINDALLDEVS depends on HAVE_PCAP_IF_T. 7571*0a7e5f1fSJoseph Mingrone# 7572*0a7e5f1fSJoseph Mingroneac_fn_c_check_type "$LINENO" "pcap_if_t" "ac_cv_type_pcap_if_t" "#include <pcap.h> 7573*0a7e5f1fSJoseph Mingrone" 7574*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_type_pcap_if_t" = xyes 7575*0a7e5f1fSJoseph Mingronethen : 7576*0a7e5f1fSJoseph Mingrone 7577*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define HAVE_PCAP_IF_T 1" >>confdefs.h 7578*0a7e5f1fSJoseph Mingrone 7579*0a7e5f1fSJoseph Mingrone 7580*0a7e5f1fSJoseph Mingronefi 7581*0a7e5f1fSJoseph Mingrone 7582ee67461eSJoseph Mingrone 7583ee67461eSJoseph MingroneCPPFLAGS="$savedcppflags" 7584ee67461eSJoseph Mingrone 7585ee67461eSJoseph Mingrone# 75863c602fabSXin LI# Define the old BSD specified-width types in terms of the C99 types; 75873c602fabSXin LI# we may need them with libpcap include files. 75883c602fabSXin LI# 7589d03c0883SXin LIac_fn_c_check_type "$LINENO" "u_int8_t" "ac_cv_type_u_int8_t" "$ac_includes_default 75903c602fabSXin LI#include <sys/types.h> 75913c602fabSXin LI 7592d03c0883SXin LI" 7593*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_type_u_int8_t" = xyes 7594*0a7e5f1fSJoseph Mingronethen : 7595f4d0c64aSSam Leffler 7596*0a7e5f1fSJoseph Mingroneelse $as_nop 7597b0453382SBill Fenner 7598*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define u_int8_t uint8_t" >>confdefs.h 7599b0453382SBill Fenner 7600b0453382SBill Fennerfi 7601f4d0c64aSSam Leffler 7602d03c0883SXin LIac_fn_c_check_type "$LINENO" "u_int16_t" "ac_cv_type_u_int16_t" "$ac_includes_default 76033c602fabSXin LI#include <sys/types.h> 76043c602fabSXin LI 7605d03c0883SXin LI" 7606*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_type_u_int16_t" = xyes 7607*0a7e5f1fSJoseph Mingronethen : 7608f4d0c64aSSam Leffler 7609*0a7e5f1fSJoseph Mingroneelse $as_nop 7610b0453382SBill Fenner 7611*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define u_int16_t uint16_t" >>confdefs.h 76124644f044SBill Fenner 76134644f044SBill Fennerfi 7614f4d0c64aSSam Leffler 7615d03c0883SXin LIac_fn_c_check_type "$LINENO" "u_int32_t" "ac_cv_type_u_int32_t" "$ac_includes_default 76163c602fabSXin LI#include <sys/types.h> 76173c602fabSXin LI 7618d03c0883SXin LI" 7619*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_type_u_int32_t" = xyes 7620*0a7e5f1fSJoseph Mingronethen : 7621f4d0c64aSSam Leffler 7622*0a7e5f1fSJoseph Mingroneelse $as_nop 76234644f044SBill Fenner 7624*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define u_int32_t uint32_t" >>confdefs.h 76251de50e9fSSam Leffler 76261de50e9fSSam Lefflerfi 7627f4d0c64aSSam Leffler 7628d03c0883SXin LIac_fn_c_check_type "$LINENO" "u_int64_t" "ac_cv_type_u_int64_t" "$ac_includes_default 76293c602fabSXin LI#include <sys/types.h> 76303c602fabSXin LI 7631d03c0883SXin LI" 7632*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_type_u_int64_t" = xyes 7633*0a7e5f1fSJoseph Mingronethen : 7634f4d0c64aSSam Leffler 7635*0a7e5f1fSJoseph Mingroneelse $as_nop 76361de50e9fSSam Leffler 7637*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define u_int64_t uint64_t" >>confdefs.h 76381de50e9fSSam Leffler 76391de50e9fSSam Lefflerfi 76401de50e9fSSam Leffler 7641f4d0c64aSSam Leffler 7642a5779b6eSRui Pauloif test -n "$ac_tool_prefix"; then 7643a5779b6eSRui Paulo # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 7644a5779b6eSRui Pauloset dummy ${ac_tool_prefix}ranlib; ac_word=$2 7645*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 7646*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 7647*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_RANLIB+y} 7648*0a7e5f1fSJoseph Mingronethen : 7649*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 7650*0a7e5f1fSJoseph Mingroneelse $as_nop 7651a5779b6eSRui Paulo if test -n "$RANLIB"; then 7652a5779b6eSRui Paulo ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 7653a5779b6eSRui Pauloelse 7654a5779b6eSRui Pauloas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7655a5779b6eSRui Paulofor as_dir in $PATH 7656a5779b6eSRui Paulodo 7657a5779b6eSRui Paulo IFS=$as_save_IFS 7658*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 7659*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 7660*0a7e5f1fSJoseph Mingrone */) ;; 7661*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 7662*0a7e5f1fSJoseph Mingrone esac 7663a5779b6eSRui Paulo for ac_exec_ext in '' $ac_executable_extensions; do 7664*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 7665a5779b6eSRui Paulo ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 7666*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 7667a5779b6eSRui Paulo break 2 7668a5779b6eSRui Paulo fi 7669a5779b6eSRui Paulodone 7670a5779b6eSRui Paulo done 7671a5779b6eSRui PauloIFS=$as_save_IFS 7672a5779b6eSRui Paulo 7673a5779b6eSRui Paulofi 7674a5779b6eSRui Paulofi 7675a5779b6eSRui PauloRANLIB=$ac_cv_prog_RANLIB 7676a5779b6eSRui Pauloif test -n "$RANLIB"; then 7677*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 7678*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$RANLIB" >&6; } 7679a5779b6eSRui Pauloelse 7680*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 7681*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 7682a5779b6eSRui Paulofi 7683a5779b6eSRui Paulo 7684a5779b6eSRui Paulo 7685a5779b6eSRui Paulofi 7686a5779b6eSRui Pauloif test -z "$ac_cv_prog_RANLIB"; then 7687a5779b6eSRui Paulo ac_ct_RANLIB=$RANLIB 7688a5779b6eSRui Paulo # Extract the first word of "ranlib", so it can be a program name with args. 7689a5779b6eSRui Pauloset dummy ranlib; ac_word=$2 7690*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 7691*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 7692*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_ac_ct_RANLIB+y} 7693*0a7e5f1fSJoseph Mingronethen : 7694*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 7695*0a7e5f1fSJoseph Mingroneelse $as_nop 7696a5779b6eSRui Paulo if test -n "$ac_ct_RANLIB"; then 7697a5779b6eSRui Paulo ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. 7698a5779b6eSRui Pauloelse 7699a5779b6eSRui Pauloas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7700a5779b6eSRui Paulofor as_dir in $PATH 7701a5779b6eSRui Paulodo 7702a5779b6eSRui Paulo IFS=$as_save_IFS 7703*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 7704*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 7705*0a7e5f1fSJoseph Mingrone */) ;; 7706*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 7707*0a7e5f1fSJoseph Mingrone esac 7708a5779b6eSRui Paulo for ac_exec_ext in '' $ac_executable_extensions; do 7709*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 7710a5779b6eSRui Paulo ac_cv_prog_ac_ct_RANLIB="ranlib" 7711*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 7712a5779b6eSRui Paulo break 2 7713a5779b6eSRui Paulo fi 7714a5779b6eSRui Paulodone 7715a5779b6eSRui Paulo done 7716a5779b6eSRui PauloIFS=$as_save_IFS 7717a5779b6eSRui Paulo 7718a5779b6eSRui Paulofi 7719a5779b6eSRui Paulofi 7720a5779b6eSRui Pauloac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB 7721a5779b6eSRui Pauloif test -n "$ac_ct_RANLIB"; then 7722*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 7723*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_ct_RANLIB" >&6; } 7724a5779b6eSRui Pauloelse 7725*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 7726*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 7727a5779b6eSRui Paulofi 7728a5779b6eSRui Paulo 7729a5779b6eSRui Paulo if test "x$ac_ct_RANLIB" = x; then 7730a5779b6eSRui Paulo RANLIB=":" 7731a5779b6eSRui Paulo else 7732a5779b6eSRui Paulo case $cross_compiling:$ac_tool_warned in 7733a5779b6eSRui Pauloyes:) 7734*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 7735*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 7736a5779b6eSRui Pauloac_tool_warned=yes ;; 7737a5779b6eSRui Pauloesac 7738a5779b6eSRui Paulo RANLIB=$ac_ct_RANLIB 7739a5779b6eSRui Paulo fi 7740a5779b6eSRui Pauloelse 7741a5779b6eSRui Paulo RANLIB="$ac_cv_prog_RANLIB" 7742a5779b6eSRui Paulofi 7743a5779b6eSRui Paulo 77443c602fabSXin LIif test -n "$ac_tool_prefix"; then 77453c602fabSXin LI # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. 77463c602fabSXin LIset dummy ${ac_tool_prefix}ar; ac_word=$2 7747*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 7748*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 7749*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_AR+y} 7750*0a7e5f1fSJoseph Mingronethen : 7751*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 7752*0a7e5f1fSJoseph Mingroneelse $as_nop 77533c602fabSXin LI if test -n "$AR"; then 77543c602fabSXin LI ac_cv_prog_AR="$AR" # Let the user override the test. 77553c602fabSXin LIelse 77563c602fabSXin LIas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 77573c602fabSXin LIfor as_dir in $PATH 77583c602fabSXin LIdo 77593c602fabSXin LI IFS=$as_save_IFS 7760*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 7761*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 7762*0a7e5f1fSJoseph Mingrone */) ;; 7763*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 7764*0a7e5f1fSJoseph Mingrone esac 77653c602fabSXin LI for ac_exec_ext in '' $ac_executable_extensions; do 7766*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 77673c602fabSXin LI ac_cv_prog_AR="${ac_tool_prefix}ar" 7768*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 77693c602fabSXin LI break 2 77703c602fabSXin LI fi 77713c602fabSXin LIdone 77723c602fabSXin LI done 77733c602fabSXin LIIFS=$as_save_IFS 77743c602fabSXin LI 77753c602fabSXin LIfi 77763c602fabSXin LIfi 77773c602fabSXin LIAR=$ac_cv_prog_AR 77783c602fabSXin LIif test -n "$AR"; then 7779*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 7780*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$AR" >&6; } 77813c602fabSXin LIelse 7782*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 7783*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 77843c602fabSXin LIfi 77853c602fabSXin LI 77863c602fabSXin LI 77873c602fabSXin LIfi 77883c602fabSXin LIif test -z "$ac_cv_prog_AR"; then 77893c602fabSXin LI ac_ct_AR=$AR 77903c602fabSXin LI # Extract the first word of "ar", so it can be a program name with args. 77913c602fabSXin LIset dummy ar; ac_word=$2 7792*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 7793*0a7e5f1fSJoseph Mingroneprintf %s "checking for $ac_word... " >&6; } 7794*0a7e5f1fSJoseph Mingroneif test ${ac_cv_prog_ac_ct_AR+y} 7795*0a7e5f1fSJoseph Mingronethen : 7796*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 7797*0a7e5f1fSJoseph Mingroneelse $as_nop 77983c602fabSXin LI if test -n "$ac_ct_AR"; then 77993c602fabSXin LI ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. 78003c602fabSXin LIelse 78013c602fabSXin LIas_save_IFS=$IFS; IFS=$PATH_SEPARATOR 78023c602fabSXin LIfor as_dir in $PATH 78033c602fabSXin LIdo 78043c602fabSXin LI IFS=$as_save_IFS 7805*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 7806*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 7807*0a7e5f1fSJoseph Mingrone */) ;; 7808*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 7809*0a7e5f1fSJoseph Mingrone esac 78103c602fabSXin LI for ac_exec_ext in '' $ac_executable_extensions; do 7811*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then 78123c602fabSXin LI ac_cv_prog_ac_ct_AR="ar" 7813*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 78143c602fabSXin LI break 2 78153c602fabSXin LI fi 78163c602fabSXin LIdone 78173c602fabSXin LI done 78183c602fabSXin LIIFS=$as_save_IFS 78193c602fabSXin LI 78203c602fabSXin LIfi 78213c602fabSXin LIfi 78223c602fabSXin LIac_ct_AR=$ac_cv_prog_ac_ct_AR 78233c602fabSXin LIif test -n "$ac_ct_AR"; then 7824*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 7825*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_ct_AR" >&6; } 78263c602fabSXin LIelse 7827*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 7828*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 78293c602fabSXin LIfi 78303c602fabSXin LI 78313c602fabSXin LI if test "x$ac_ct_AR" = x; then 78323c602fabSXin LI AR="" 78333c602fabSXin LI else 78343c602fabSXin LI case $cross_compiling:$ac_tool_warned in 78353c602fabSXin LIyes:) 7836*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 7837*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 78383c602fabSXin LIac_tool_warned=yes ;; 78393c602fabSXin LIesac 78403c602fabSXin LI AR=$ac_ct_AR 78413c602fabSXin LI fi 78423c602fabSXin LIelse 78433c602fabSXin LI AR="$ac_cv_prog_AR" 78443c602fabSXin LIfi 78453c602fabSXin LI 7846a5779b6eSRui Paulo 78474644f044SBill Fennerrm -f os-proto.h 78484644f044SBill Fenner if test "${LBL_CFLAGS+set}" = set; then 78494644f044SBill Fenner V_CCOPT="$V_CCOPT ${LBL_CFLAGS}" 78504644f044SBill Fenner fi 78514644f044SBill Fenner if test -f .devel ; then 78523c602fabSXin LI # 78533c602fabSXin LI # Skip all the warning option stuff on some compilers. 78543c602fabSXin LI # 78553c602fabSXin LI if test "$ac_lbl_cc_dont_try_gcc_dashW" != yes; then 78563c602fabSXin LI 7857*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -W option" >&5 7858*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -W option... " >&6; } 78593c602fabSXin LI save_CFLAGS="$CFLAGS" 78603340d773SGleb Smirnoff CFLAGS="$CFLAGS -W" 7861ee67461eSJoseph Mingrone # 7862ee67461eSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 7863ee67461eSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 7864ee67461eSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 7865ee67461eSJoseph Mingrone # testing compiler options - 15 years after somebody asked 7866ee67461eSJoseph Mingrone # for it: 7867ee67461eSJoseph Mingrone # 7868ee67461eSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 7869ee67461eSJoseph Mingrone # 7870ee67461eSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 7871ee67461eSJoseph Mingrone ac_c_werror_flag=yes 7872ee67461eSJoseph Mingrone # 7873ee67461eSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 7874ee67461eSJoseph Mingrone # content of the program being compiled. We do not, for example, 7875ee67461eSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 7876ee67461eSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 7877ee67461eSJoseph Mingrone # that we would treat it as not working, as the test will fail if 7878ee67461eSJoseph Mingrone # *any* error output, including a warning due to the flag we're 7879ee67461eSJoseph Mingrone # testing, is generated; see 7880ee67461eSJoseph Mingrone # 7881ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 7882ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 7883ee67461eSJoseph Mingrone # 7884ee67461eSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 7885*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 7886ee67461eSJoseph Mingrone # 78873c602fabSXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 78883c602fabSXin LI/* end confdefs.h. */ 7889ee67461eSJoseph Mingroneint main(void) { return 0; } 78903c602fabSXin LI_ACEOF 7891*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 7892*0a7e5f1fSJoseph Mingronethen : 78933c602fabSXin LI 7894*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 7895*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 78963c602fabSXin LI CFLAGS="$save_CFLAGS" 78973c602fabSXin LI V_CCOPT="$V_CCOPT -W" 78983c602fabSXin LI 7899*0a7e5f1fSJoseph Mingroneelse $as_nop 79003c602fabSXin LI 7901*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 7902*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 79033c602fabSXin LI CFLAGS="$save_CFLAGS" 79043c602fabSXin LI 79053c602fabSXin LIfi 7906*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 7907ee67461eSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 7908ee67461eSJoseph Mingrone 7909ee67461eSJoseph Mingrone 7910*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wall option" >&5 7911*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wall option... " >&6; } 7912ee67461eSJoseph Mingrone save_CFLAGS="$CFLAGS" 7913ee67461eSJoseph Mingrone CFLAGS="$CFLAGS -Wall" 7914ee67461eSJoseph Mingrone # 7915ee67461eSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 7916ee67461eSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 7917ee67461eSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 7918ee67461eSJoseph Mingrone # testing compiler options - 15 years after somebody asked 7919ee67461eSJoseph Mingrone # for it: 7920ee67461eSJoseph Mingrone # 7921ee67461eSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 7922ee67461eSJoseph Mingrone # 7923ee67461eSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 7924ee67461eSJoseph Mingrone ac_c_werror_flag=yes 7925ee67461eSJoseph Mingrone # 7926ee67461eSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 7927ee67461eSJoseph Mingrone # content of the program being compiled. We do not, for example, 7928ee67461eSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 7929ee67461eSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 7930ee67461eSJoseph Mingrone # that we would treat it as not working, as the test will fail if 7931ee67461eSJoseph Mingrone # *any* error output, including a warning due to the flag we're 7932ee67461eSJoseph Mingrone # testing, is generated; see 7933ee67461eSJoseph Mingrone # 7934ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 7935ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 7936ee67461eSJoseph Mingrone # 7937ee67461eSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 7938*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 7939ee67461eSJoseph Mingrone # 7940ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7941ee67461eSJoseph Mingrone/* end confdefs.h. */ 7942ee67461eSJoseph Mingroneint main(void) { return 0; } 7943ee67461eSJoseph Mingrone_ACEOF 7944*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 7945*0a7e5f1fSJoseph Mingronethen : 7946ee67461eSJoseph Mingrone 7947*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 7948*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 7949ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 7950ee67461eSJoseph Mingrone V_CCOPT="$V_CCOPT -Wall" 7951ee67461eSJoseph Mingrone 7952*0a7e5f1fSJoseph Mingroneelse $as_nop 7953ee67461eSJoseph Mingrone 7954*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 7955*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 7956ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 7957ee67461eSJoseph Mingrone 7958ee67461eSJoseph Mingronefi 7959*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 7960ee67461eSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 7961ee67461eSJoseph Mingrone 7962ee67461eSJoseph Mingrone 7963*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wassign-enum option" >&5 7964*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wassign-enum option... " >&6; } 7965ee67461eSJoseph Mingrone save_CFLAGS="$CFLAGS" 7966ee67461eSJoseph Mingrone CFLAGS="$CFLAGS -Wassign-enum" 7967ee67461eSJoseph Mingrone # 7968ee67461eSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 7969ee67461eSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 7970ee67461eSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 7971ee67461eSJoseph Mingrone # testing compiler options - 15 years after somebody asked 7972ee67461eSJoseph Mingrone # for it: 7973ee67461eSJoseph Mingrone # 7974ee67461eSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 7975ee67461eSJoseph Mingrone # 7976ee67461eSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 7977ee67461eSJoseph Mingrone ac_c_werror_flag=yes 7978ee67461eSJoseph Mingrone # 7979ee67461eSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 7980ee67461eSJoseph Mingrone # content of the program being compiled. We do not, for example, 7981ee67461eSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 7982ee67461eSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 7983ee67461eSJoseph Mingrone # that we would treat it as not working, as the test will fail if 7984ee67461eSJoseph Mingrone # *any* error output, including a warning due to the flag we're 7985ee67461eSJoseph Mingrone # testing, is generated; see 7986ee67461eSJoseph Mingrone # 7987ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 7988ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 7989ee67461eSJoseph Mingrone # 7990ee67461eSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 7991*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 7992ee67461eSJoseph Mingrone # 7993ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7994ee67461eSJoseph Mingrone/* end confdefs.h. */ 7995ee67461eSJoseph Mingroneint main(void) { return 0; } 7996ee67461eSJoseph Mingrone_ACEOF 7997*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 7998*0a7e5f1fSJoseph Mingronethen : 7999ee67461eSJoseph Mingrone 8000*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8001*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8002ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8003ee67461eSJoseph Mingrone V_CCOPT="$V_CCOPT -Wassign-enum" 8004ee67461eSJoseph Mingrone 8005*0a7e5f1fSJoseph Mingroneelse $as_nop 8006ee67461eSJoseph Mingrone 8007*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8008*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8009ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8010ee67461eSJoseph Mingrone 8011ee67461eSJoseph Mingronefi 8012*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8013ee67461eSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8014ee67461eSJoseph Mingrone 8015ee67461eSJoseph Mingrone 8016*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wcast-qual option" >&5 8017*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wcast-qual option... " >&6; } 8018ee67461eSJoseph Mingrone save_CFLAGS="$CFLAGS" 8019ee67461eSJoseph Mingrone CFLAGS="$CFLAGS -Wcast-qual" 8020ee67461eSJoseph Mingrone # 8021ee67461eSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8022ee67461eSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8023ee67461eSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8024ee67461eSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8025ee67461eSJoseph Mingrone # for it: 8026ee67461eSJoseph Mingrone # 8027ee67461eSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8028ee67461eSJoseph Mingrone # 8029ee67461eSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8030ee67461eSJoseph Mingrone ac_c_werror_flag=yes 8031ee67461eSJoseph Mingrone # 8032ee67461eSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8033ee67461eSJoseph Mingrone # content of the program being compiled. We do not, for example, 8034ee67461eSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8035ee67461eSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8036ee67461eSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8037ee67461eSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8038ee67461eSJoseph Mingrone # testing, is generated; see 8039ee67461eSJoseph Mingrone # 8040ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8041ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8042ee67461eSJoseph Mingrone # 8043ee67461eSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8044*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8045ee67461eSJoseph Mingrone # 8046ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8047ee67461eSJoseph Mingrone/* end confdefs.h. */ 8048ee67461eSJoseph Mingroneint main(void) { return 0; } 8049ee67461eSJoseph Mingrone_ACEOF 8050*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8051*0a7e5f1fSJoseph Mingronethen : 8052ee67461eSJoseph Mingrone 8053*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8054*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8055ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8056ee67461eSJoseph Mingrone V_CCOPT="$V_CCOPT -Wcast-qual" 8057ee67461eSJoseph Mingrone 8058*0a7e5f1fSJoseph Mingroneelse $as_nop 8059ee67461eSJoseph Mingrone 8060*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8061*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8062ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8063ee67461eSJoseph Mingrone 8064ee67461eSJoseph Mingronefi 8065*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8066ee67461eSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8067ee67461eSJoseph Mingrone 8068ee67461eSJoseph Mingrone 8069*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-prototypes option" >&5 8070*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wmissing-prototypes option... " >&6; } 8071ee67461eSJoseph Mingrone save_CFLAGS="$CFLAGS" 8072ee67461eSJoseph Mingrone CFLAGS="$CFLAGS -Wmissing-prototypes" 8073ee67461eSJoseph Mingrone # 8074ee67461eSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8075ee67461eSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8076ee67461eSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8077ee67461eSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8078ee67461eSJoseph Mingrone # for it: 8079ee67461eSJoseph Mingrone # 8080ee67461eSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8081ee67461eSJoseph Mingrone # 8082ee67461eSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8083ee67461eSJoseph Mingrone ac_c_werror_flag=yes 8084ee67461eSJoseph Mingrone # 8085ee67461eSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8086ee67461eSJoseph Mingrone # content of the program being compiled. We do not, for example, 8087ee67461eSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8088ee67461eSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8089ee67461eSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8090ee67461eSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8091ee67461eSJoseph Mingrone # testing, is generated; see 8092ee67461eSJoseph Mingrone # 8093ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8094ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8095ee67461eSJoseph Mingrone # 8096ee67461eSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8097*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8098ee67461eSJoseph Mingrone # 8099ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8100ee67461eSJoseph Mingrone/* end confdefs.h. */ 8101ee67461eSJoseph Mingroneint main(void) { return 0; } 8102ee67461eSJoseph Mingrone_ACEOF 8103*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8104*0a7e5f1fSJoseph Mingronethen : 8105ee67461eSJoseph Mingrone 8106*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8107*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8108ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8109ee67461eSJoseph Mingrone V_CCOPT="$V_CCOPT -Wmissing-prototypes" 8110ee67461eSJoseph Mingrone 8111*0a7e5f1fSJoseph Mingroneelse $as_nop 8112ee67461eSJoseph Mingrone 8113*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8114*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8115ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8116ee67461eSJoseph Mingrone 8117ee67461eSJoseph Mingronefi 8118*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8119ee67461eSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8120ee67461eSJoseph Mingrone 8121ee67461eSJoseph Mingrone 8122*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wmissing-variable-declarations option" >&5 8123*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wmissing-variable-declarations option... " >&6; } 8124ee67461eSJoseph Mingrone save_CFLAGS="$CFLAGS" 8125ee67461eSJoseph Mingrone CFLAGS="$CFLAGS -Wmissing-variable-declarations" 8126ee67461eSJoseph Mingrone # 8127ee67461eSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8128ee67461eSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8129ee67461eSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8130ee67461eSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8131ee67461eSJoseph Mingrone # for it: 8132ee67461eSJoseph Mingrone # 8133ee67461eSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8134ee67461eSJoseph Mingrone # 8135ee67461eSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8136ee67461eSJoseph Mingrone ac_c_werror_flag=yes 8137ee67461eSJoseph Mingrone # 8138ee67461eSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8139ee67461eSJoseph Mingrone # content of the program being compiled. We do not, for example, 8140ee67461eSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8141ee67461eSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8142ee67461eSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8143ee67461eSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8144ee67461eSJoseph Mingrone # testing, is generated; see 8145ee67461eSJoseph Mingrone # 8146ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8147ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8148ee67461eSJoseph Mingrone # 8149ee67461eSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8150*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8151ee67461eSJoseph Mingrone # 8152ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8153ee67461eSJoseph Mingrone/* end confdefs.h. */ 8154ee67461eSJoseph Mingroneint main(void) { return 0; } 8155ee67461eSJoseph Mingrone_ACEOF 8156*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8157*0a7e5f1fSJoseph Mingronethen : 8158ee67461eSJoseph Mingrone 8159*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8160*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8161ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8162ee67461eSJoseph Mingrone V_CCOPT="$V_CCOPT -Wmissing-variable-declarations" 8163ee67461eSJoseph Mingrone 8164*0a7e5f1fSJoseph Mingroneelse $as_nop 8165ee67461eSJoseph Mingrone 8166*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8167*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8168ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8169ee67461eSJoseph Mingrone 8170ee67461eSJoseph Mingronefi 8171*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8172ee67461eSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8173ee67461eSJoseph Mingrone 8174ee67461eSJoseph Mingrone 8175*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wnull-pointer-subtraction option" >&5 8176*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wnull-pointer-subtraction option... " >&6; } 8177*0a7e5f1fSJoseph Mingrone save_CFLAGS="$CFLAGS" 8178*0a7e5f1fSJoseph Mingrone CFLAGS="$CFLAGS -Wnull-pointer-subtraction" 8179*0a7e5f1fSJoseph Mingrone # 8180*0a7e5f1fSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8181*0a7e5f1fSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8182*0a7e5f1fSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8183*0a7e5f1fSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8184*0a7e5f1fSJoseph Mingrone # for it: 8185*0a7e5f1fSJoseph Mingrone # 8186*0a7e5f1fSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8187*0a7e5f1fSJoseph Mingrone # 8188*0a7e5f1fSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8189*0a7e5f1fSJoseph Mingrone ac_c_werror_flag=yes 8190*0a7e5f1fSJoseph Mingrone # 8191*0a7e5f1fSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8192*0a7e5f1fSJoseph Mingrone # content of the program being compiled. We do not, for example, 8193*0a7e5f1fSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8194*0a7e5f1fSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8195*0a7e5f1fSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8196*0a7e5f1fSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8197*0a7e5f1fSJoseph Mingrone # testing, is generated; see 8198*0a7e5f1fSJoseph Mingrone # 8199*0a7e5f1fSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8200*0a7e5f1fSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8201*0a7e5f1fSJoseph Mingrone # 8202*0a7e5f1fSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8203*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8204*0a7e5f1fSJoseph Mingrone # 8205*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8206*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 8207*0a7e5f1fSJoseph Mingroneint main(void) { return 0; } 8208*0a7e5f1fSJoseph Mingrone_ACEOF 8209*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8210*0a7e5f1fSJoseph Mingronethen : 8211*0a7e5f1fSJoseph Mingrone 8212*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8213*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8214*0a7e5f1fSJoseph Mingrone CFLAGS="$save_CFLAGS" 8215*0a7e5f1fSJoseph Mingrone V_CCOPT="$V_CCOPT -Wnull-pointer-subtraction" 8216*0a7e5f1fSJoseph Mingrone 8217*0a7e5f1fSJoseph Mingroneelse $as_nop 8218*0a7e5f1fSJoseph Mingrone 8219*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8220*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8221*0a7e5f1fSJoseph Mingrone CFLAGS="$save_CFLAGS" 8222*0a7e5f1fSJoseph Mingrone 8223*0a7e5f1fSJoseph Mingronefi 8224*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8225*0a7e5f1fSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8226*0a7e5f1fSJoseph Mingrone 8227*0a7e5f1fSJoseph Mingrone 8228*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wold-style-definition option" >&5 8229*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wold-style-definition option... " >&6; } 8230ee67461eSJoseph Mingrone save_CFLAGS="$CFLAGS" 8231ee67461eSJoseph Mingrone CFLAGS="$CFLAGS -Wold-style-definition" 8232ee67461eSJoseph Mingrone # 8233ee67461eSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8234ee67461eSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8235ee67461eSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8236ee67461eSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8237ee67461eSJoseph Mingrone # for it: 8238ee67461eSJoseph Mingrone # 8239ee67461eSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8240ee67461eSJoseph Mingrone # 8241ee67461eSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8242ee67461eSJoseph Mingrone ac_c_werror_flag=yes 8243ee67461eSJoseph Mingrone # 8244ee67461eSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8245ee67461eSJoseph Mingrone # content of the program being compiled. We do not, for example, 8246ee67461eSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8247ee67461eSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8248ee67461eSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8249ee67461eSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8250ee67461eSJoseph Mingrone # testing, is generated; see 8251ee67461eSJoseph Mingrone # 8252ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8253ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8254ee67461eSJoseph Mingrone # 8255ee67461eSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8256*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8257ee67461eSJoseph Mingrone # 8258ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8259ee67461eSJoseph Mingrone/* end confdefs.h. */ 8260ee67461eSJoseph Mingroneint main(void) { return 0; } 8261ee67461eSJoseph Mingrone_ACEOF 8262*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8263*0a7e5f1fSJoseph Mingronethen : 8264ee67461eSJoseph Mingrone 8265*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8266*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8267ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8268ee67461eSJoseph Mingrone V_CCOPT="$V_CCOPT -Wold-style-definition" 8269ee67461eSJoseph Mingrone 8270*0a7e5f1fSJoseph Mingroneelse $as_nop 8271ee67461eSJoseph Mingrone 8272*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8273*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8274ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8275ee67461eSJoseph Mingrone 8276ee67461eSJoseph Mingronefi 8277*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8278ee67461eSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8279ee67461eSJoseph Mingrone 8280ee67461eSJoseph Mingrone 8281*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpedantic option" >&5 8282*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wpedantic option... " >&6; } 8283ee67461eSJoseph Mingrone save_CFLAGS="$CFLAGS" 8284ee67461eSJoseph Mingrone CFLAGS="$CFLAGS -Wpedantic" 8285ee67461eSJoseph Mingrone # 8286ee67461eSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8287ee67461eSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8288ee67461eSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8289ee67461eSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8290ee67461eSJoseph Mingrone # for it: 8291ee67461eSJoseph Mingrone # 8292ee67461eSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8293ee67461eSJoseph Mingrone # 8294ee67461eSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8295ee67461eSJoseph Mingrone ac_c_werror_flag=yes 8296ee67461eSJoseph Mingrone # 8297ee67461eSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8298ee67461eSJoseph Mingrone # content of the program being compiled. We do not, for example, 8299ee67461eSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8300ee67461eSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8301ee67461eSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8302ee67461eSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8303ee67461eSJoseph Mingrone # testing, is generated; see 8304ee67461eSJoseph Mingrone # 8305ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8306ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8307ee67461eSJoseph Mingrone # 8308ee67461eSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8309*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8310ee67461eSJoseph Mingrone # 8311ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8312ee67461eSJoseph Mingrone/* end confdefs.h. */ 8313ee67461eSJoseph Mingroneint main(void) { return 0; } 8314ee67461eSJoseph Mingrone_ACEOF 8315*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8316*0a7e5f1fSJoseph Mingronethen : 8317ee67461eSJoseph Mingrone 8318*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8319*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8320ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8321ee67461eSJoseph Mingrone V_CCOPT="$V_CCOPT -Wpedantic" 8322ee67461eSJoseph Mingrone 8323*0a7e5f1fSJoseph Mingroneelse $as_nop 8324ee67461eSJoseph Mingrone 8325*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8326*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8327ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8328ee67461eSJoseph Mingrone 8329ee67461eSJoseph Mingronefi 8330*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8331ee67461eSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8332ee67461eSJoseph Mingrone 8333ee67461eSJoseph Mingrone 8334*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-arith option" >&5 8335*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wpointer-arith option... " >&6; } 8336ee67461eSJoseph Mingrone save_CFLAGS="$CFLAGS" 8337ee67461eSJoseph Mingrone CFLAGS="$CFLAGS -Wpointer-arith" 8338ee67461eSJoseph Mingrone # 8339ee67461eSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8340ee67461eSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8341ee67461eSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8342ee67461eSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8343ee67461eSJoseph Mingrone # for it: 8344ee67461eSJoseph Mingrone # 8345ee67461eSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8346ee67461eSJoseph Mingrone # 8347ee67461eSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8348ee67461eSJoseph Mingrone ac_c_werror_flag=yes 8349ee67461eSJoseph Mingrone # 8350ee67461eSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8351ee67461eSJoseph Mingrone # content of the program being compiled. We do not, for example, 8352ee67461eSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8353ee67461eSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8354ee67461eSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8355ee67461eSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8356ee67461eSJoseph Mingrone # testing, is generated; see 8357ee67461eSJoseph Mingrone # 8358ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8359ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8360ee67461eSJoseph Mingrone # 8361ee67461eSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8362*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8363ee67461eSJoseph Mingrone # 8364ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8365ee67461eSJoseph Mingrone/* end confdefs.h. */ 8366ee67461eSJoseph Mingroneint main(void) { return 0; } 8367ee67461eSJoseph Mingrone_ACEOF 8368*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8369*0a7e5f1fSJoseph Mingronethen : 8370ee67461eSJoseph Mingrone 8371*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8372*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8373ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8374ee67461eSJoseph Mingrone V_CCOPT="$V_CCOPT -Wpointer-arith" 8375ee67461eSJoseph Mingrone 8376*0a7e5f1fSJoseph Mingroneelse $as_nop 8377ee67461eSJoseph Mingrone 8378*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8379*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8380ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8381ee67461eSJoseph Mingrone 8382ee67461eSJoseph Mingronefi 8383*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8384ee67461eSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8385ee67461eSJoseph Mingrone 8386ee67461eSJoseph Mingrone 8387*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wpointer-sign option" >&5 8388*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wpointer-sign option... " >&6; } 8389ee67461eSJoseph Mingrone save_CFLAGS="$CFLAGS" 8390ee67461eSJoseph Mingrone CFLAGS="$CFLAGS -Wpointer-sign" 8391ee67461eSJoseph Mingrone # 8392ee67461eSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8393ee67461eSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8394ee67461eSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8395ee67461eSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8396ee67461eSJoseph Mingrone # for it: 8397ee67461eSJoseph Mingrone # 8398ee67461eSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8399ee67461eSJoseph Mingrone # 8400ee67461eSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8401ee67461eSJoseph Mingrone ac_c_werror_flag=yes 8402ee67461eSJoseph Mingrone # 8403ee67461eSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8404ee67461eSJoseph Mingrone # content of the program being compiled. We do not, for example, 8405ee67461eSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8406ee67461eSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8407ee67461eSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8408ee67461eSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8409ee67461eSJoseph Mingrone # testing, is generated; see 8410ee67461eSJoseph Mingrone # 8411ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8412ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8413ee67461eSJoseph Mingrone # 8414ee67461eSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8415*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8416ee67461eSJoseph Mingrone # 8417ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8418ee67461eSJoseph Mingrone/* end confdefs.h. */ 8419ee67461eSJoseph Mingroneint main(void) { return 0; } 8420ee67461eSJoseph Mingrone_ACEOF 8421*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8422*0a7e5f1fSJoseph Mingronethen : 8423ee67461eSJoseph Mingrone 8424*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8425*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8426ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8427ee67461eSJoseph Mingrone V_CCOPT="$V_CCOPT -Wpointer-sign" 8428ee67461eSJoseph Mingrone 8429*0a7e5f1fSJoseph Mingroneelse $as_nop 8430ee67461eSJoseph Mingrone 8431*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8432*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8433ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8434ee67461eSJoseph Mingrone 8435ee67461eSJoseph Mingronefi 8436*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8437ee67461eSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8438ee67461eSJoseph Mingrone 8439ee67461eSJoseph Mingrone 8440*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wshadow option" >&5 8441*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wshadow option... " >&6; } 8442ee67461eSJoseph Mingrone save_CFLAGS="$CFLAGS" 8443ee67461eSJoseph Mingrone CFLAGS="$CFLAGS -Wshadow" 8444ee67461eSJoseph Mingrone # 8445ee67461eSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8446ee67461eSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8447ee67461eSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8448ee67461eSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8449ee67461eSJoseph Mingrone # for it: 8450ee67461eSJoseph Mingrone # 8451ee67461eSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8452ee67461eSJoseph Mingrone # 8453ee67461eSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8454ee67461eSJoseph Mingrone ac_c_werror_flag=yes 8455ee67461eSJoseph Mingrone # 8456ee67461eSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8457ee67461eSJoseph Mingrone # content of the program being compiled. We do not, for example, 8458ee67461eSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8459ee67461eSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8460ee67461eSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8461ee67461eSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8462ee67461eSJoseph Mingrone # testing, is generated; see 8463ee67461eSJoseph Mingrone # 8464ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8465ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8466ee67461eSJoseph Mingrone # 8467ee67461eSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8468*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8469ee67461eSJoseph Mingrone # 8470ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8471ee67461eSJoseph Mingrone/* end confdefs.h. */ 8472ee67461eSJoseph Mingroneint main(void) { return 0; } 8473ee67461eSJoseph Mingrone_ACEOF 8474*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8475*0a7e5f1fSJoseph Mingronethen : 8476ee67461eSJoseph Mingrone 8477*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8478*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8479ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8480ee67461eSJoseph Mingrone V_CCOPT="$V_CCOPT -Wshadow" 8481ee67461eSJoseph Mingrone 8482*0a7e5f1fSJoseph Mingroneelse $as_nop 8483ee67461eSJoseph Mingrone 8484*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8485*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8486ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8487ee67461eSJoseph Mingrone 8488ee67461eSJoseph Mingronefi 8489*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8490ee67461eSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8491ee67461eSJoseph Mingrone 8492ee67461eSJoseph Mingrone 8493*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wsign-compare option" >&5 8494*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wsign-compare option... " >&6; } 8495ee67461eSJoseph Mingrone save_CFLAGS="$CFLAGS" 8496ee67461eSJoseph Mingrone CFLAGS="$CFLAGS -Wsign-compare" 8497ee67461eSJoseph Mingrone # 8498ee67461eSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8499ee67461eSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8500ee67461eSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8501ee67461eSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8502ee67461eSJoseph Mingrone # for it: 8503ee67461eSJoseph Mingrone # 8504ee67461eSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8505ee67461eSJoseph Mingrone # 8506ee67461eSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8507ee67461eSJoseph Mingrone ac_c_werror_flag=yes 8508ee67461eSJoseph Mingrone # 8509ee67461eSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8510ee67461eSJoseph Mingrone # content of the program being compiled. We do not, for example, 8511ee67461eSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8512ee67461eSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8513ee67461eSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8514ee67461eSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8515ee67461eSJoseph Mingrone # testing, is generated; see 8516ee67461eSJoseph Mingrone # 8517ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8518ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8519ee67461eSJoseph Mingrone # 8520ee67461eSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8521*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8522ee67461eSJoseph Mingrone # 8523ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8524ee67461eSJoseph Mingrone/* end confdefs.h. */ 8525ee67461eSJoseph Mingroneint main(void) { return 0; } 8526ee67461eSJoseph Mingrone_ACEOF 8527*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8528*0a7e5f1fSJoseph Mingronethen : 8529ee67461eSJoseph Mingrone 8530*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8531*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8532ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8533ee67461eSJoseph Mingrone V_CCOPT="$V_CCOPT -Wsign-compare" 8534ee67461eSJoseph Mingrone 8535*0a7e5f1fSJoseph Mingroneelse $as_nop 8536ee67461eSJoseph Mingrone 8537*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8538*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8539ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8540ee67461eSJoseph Mingrone 8541ee67461eSJoseph Mingronefi 8542*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8543ee67461eSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8544ee67461eSJoseph Mingrone 8545ee67461eSJoseph Mingrone 8546*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wstrict-prototypes option" >&5 8547*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wstrict-prototypes option... " >&6; } 8548ee67461eSJoseph Mingrone save_CFLAGS="$CFLAGS" 8549ee67461eSJoseph Mingrone CFLAGS="$CFLAGS -Wstrict-prototypes" 8550ee67461eSJoseph Mingrone # 8551ee67461eSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8552ee67461eSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8553ee67461eSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8554ee67461eSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8555ee67461eSJoseph Mingrone # for it: 8556ee67461eSJoseph Mingrone # 8557ee67461eSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8558ee67461eSJoseph Mingrone # 8559ee67461eSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8560ee67461eSJoseph Mingrone ac_c_werror_flag=yes 8561ee67461eSJoseph Mingrone # 8562ee67461eSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8563ee67461eSJoseph Mingrone # content of the program being compiled. We do not, for example, 8564ee67461eSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8565ee67461eSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8566ee67461eSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8567ee67461eSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8568ee67461eSJoseph Mingrone # testing, is generated; see 8569ee67461eSJoseph Mingrone # 8570ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8571ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8572ee67461eSJoseph Mingrone # 8573ee67461eSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8574*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8575ee67461eSJoseph Mingrone # 8576ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8577ee67461eSJoseph Mingrone/* end confdefs.h. */ 8578ee67461eSJoseph Mingroneint main(void) { return 0; } 8579ee67461eSJoseph Mingrone_ACEOF 8580*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8581*0a7e5f1fSJoseph Mingronethen : 8582ee67461eSJoseph Mingrone 8583*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8584*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8585ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8586ee67461eSJoseph Mingrone V_CCOPT="$V_CCOPT -Wstrict-prototypes" 8587ee67461eSJoseph Mingrone 8588*0a7e5f1fSJoseph Mingroneelse $as_nop 8589ee67461eSJoseph Mingrone 8590*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8591*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8592ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8593ee67461eSJoseph Mingrone 8594ee67461eSJoseph Mingronefi 8595*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8596ee67461eSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8597ee67461eSJoseph Mingrone 8598ee67461eSJoseph Mingrone 8599*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wundef option" >&5 8600*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wundef option... " >&6; } 8601*0a7e5f1fSJoseph Mingrone save_CFLAGS="$CFLAGS" 8602*0a7e5f1fSJoseph Mingrone CFLAGS="$CFLAGS -Wundef" 8603*0a7e5f1fSJoseph Mingrone # 8604*0a7e5f1fSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8605*0a7e5f1fSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8606*0a7e5f1fSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8607*0a7e5f1fSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8608*0a7e5f1fSJoseph Mingrone # for it: 8609*0a7e5f1fSJoseph Mingrone # 8610*0a7e5f1fSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8611*0a7e5f1fSJoseph Mingrone # 8612*0a7e5f1fSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8613*0a7e5f1fSJoseph Mingrone ac_c_werror_flag=yes 8614*0a7e5f1fSJoseph Mingrone # 8615*0a7e5f1fSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8616*0a7e5f1fSJoseph Mingrone # content of the program being compiled. We do not, for example, 8617*0a7e5f1fSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8618*0a7e5f1fSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8619*0a7e5f1fSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8620*0a7e5f1fSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8621*0a7e5f1fSJoseph Mingrone # testing, is generated; see 8622*0a7e5f1fSJoseph Mingrone # 8623*0a7e5f1fSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8624*0a7e5f1fSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8625*0a7e5f1fSJoseph Mingrone # 8626*0a7e5f1fSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8627*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8628*0a7e5f1fSJoseph Mingrone # 8629*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8630*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 8631*0a7e5f1fSJoseph Mingroneint main(void) { return 0; } 8632*0a7e5f1fSJoseph Mingrone_ACEOF 8633*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8634*0a7e5f1fSJoseph Mingronethen : 8635*0a7e5f1fSJoseph Mingrone 8636*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8637*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8638*0a7e5f1fSJoseph Mingrone CFLAGS="$save_CFLAGS" 8639*0a7e5f1fSJoseph Mingrone V_CCOPT="$V_CCOPT -Wundef" 8640*0a7e5f1fSJoseph Mingrone 8641*0a7e5f1fSJoseph Mingroneelse $as_nop 8642*0a7e5f1fSJoseph Mingrone 8643*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8644*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8645*0a7e5f1fSJoseph Mingrone CFLAGS="$save_CFLAGS" 8646*0a7e5f1fSJoseph Mingrone 8647*0a7e5f1fSJoseph Mingronefi 8648*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8649*0a7e5f1fSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8650*0a7e5f1fSJoseph Mingrone 8651*0a7e5f1fSJoseph Mingrone 8652*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunreachable-code-return option" >&5 8653*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wunreachable-code-return option... " >&6; } 8654ee67461eSJoseph Mingrone save_CFLAGS="$CFLAGS" 8655ee67461eSJoseph Mingrone CFLAGS="$CFLAGS -Wunreachable-code-return" 8656ee67461eSJoseph Mingrone # 8657ee67461eSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8658ee67461eSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8659ee67461eSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8660ee67461eSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8661ee67461eSJoseph Mingrone # for it: 8662ee67461eSJoseph Mingrone # 8663ee67461eSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8664ee67461eSJoseph Mingrone # 8665ee67461eSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8666ee67461eSJoseph Mingrone ac_c_werror_flag=yes 8667ee67461eSJoseph Mingrone # 8668ee67461eSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8669ee67461eSJoseph Mingrone # content of the program being compiled. We do not, for example, 8670ee67461eSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8671ee67461eSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8672ee67461eSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8673ee67461eSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8674ee67461eSJoseph Mingrone # testing, is generated; see 8675ee67461eSJoseph Mingrone # 8676ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8677ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8678ee67461eSJoseph Mingrone # 8679ee67461eSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8680*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8681ee67461eSJoseph Mingrone # 8682ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8683ee67461eSJoseph Mingrone/* end confdefs.h. */ 8684ee67461eSJoseph Mingroneint main(void) { return 0; } 8685ee67461eSJoseph Mingrone_ACEOF 8686*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8687*0a7e5f1fSJoseph Mingronethen : 8688ee67461eSJoseph Mingrone 8689*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8690*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8691ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8692ee67461eSJoseph Mingrone V_CCOPT="$V_CCOPT -Wunreachable-code-return" 8693ee67461eSJoseph Mingrone 8694*0a7e5f1fSJoseph Mingroneelse $as_nop 8695ee67461eSJoseph Mingrone 8696*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8697*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8698ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8699ee67461eSJoseph Mingrone 8700ee67461eSJoseph Mingronefi 8701*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8702ee67461eSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8703ee67461eSJoseph Mingrone 8704ee67461eSJoseph Mingrone 8705*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-but-set-parameter option" >&5 8706*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wunused-but-set-parameter option... " >&6; } 8707*0a7e5f1fSJoseph Mingrone save_CFLAGS="$CFLAGS" 8708*0a7e5f1fSJoseph Mingrone CFLAGS="$CFLAGS -Wunused-but-set-parameter" 8709*0a7e5f1fSJoseph Mingrone # 8710*0a7e5f1fSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8711*0a7e5f1fSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8712*0a7e5f1fSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8713*0a7e5f1fSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8714*0a7e5f1fSJoseph Mingrone # for it: 8715*0a7e5f1fSJoseph Mingrone # 8716*0a7e5f1fSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8717*0a7e5f1fSJoseph Mingrone # 8718*0a7e5f1fSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8719*0a7e5f1fSJoseph Mingrone ac_c_werror_flag=yes 8720*0a7e5f1fSJoseph Mingrone # 8721*0a7e5f1fSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8722*0a7e5f1fSJoseph Mingrone # content of the program being compiled. We do not, for example, 8723*0a7e5f1fSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8724*0a7e5f1fSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8725*0a7e5f1fSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8726*0a7e5f1fSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8727*0a7e5f1fSJoseph Mingrone # testing, is generated; see 8728*0a7e5f1fSJoseph Mingrone # 8729*0a7e5f1fSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8730*0a7e5f1fSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8731*0a7e5f1fSJoseph Mingrone # 8732*0a7e5f1fSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8733*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8734*0a7e5f1fSJoseph Mingrone # 8735*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8736*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 8737*0a7e5f1fSJoseph Mingroneint main(void) { return 0; } 8738*0a7e5f1fSJoseph Mingrone_ACEOF 8739*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8740*0a7e5f1fSJoseph Mingronethen : 8741*0a7e5f1fSJoseph Mingrone 8742*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8743*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8744*0a7e5f1fSJoseph Mingrone CFLAGS="$save_CFLAGS" 8745*0a7e5f1fSJoseph Mingrone V_CCOPT="$V_CCOPT -Wunused-but-set-parameter" 8746*0a7e5f1fSJoseph Mingrone 8747*0a7e5f1fSJoseph Mingroneelse $as_nop 8748*0a7e5f1fSJoseph Mingrone 8749*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8750*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8751*0a7e5f1fSJoseph Mingrone CFLAGS="$save_CFLAGS" 8752*0a7e5f1fSJoseph Mingrone 8753*0a7e5f1fSJoseph Mingronefi 8754*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8755*0a7e5f1fSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8756*0a7e5f1fSJoseph Mingrone 8757*0a7e5f1fSJoseph Mingrone 8758*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wunused-but-set-variable option" >&5 8759*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wunused-but-set-variable option... " >&6; } 8760*0a7e5f1fSJoseph Mingrone save_CFLAGS="$CFLAGS" 8761*0a7e5f1fSJoseph Mingrone CFLAGS="$CFLAGS -Wunused-but-set-variable" 8762*0a7e5f1fSJoseph Mingrone # 8763*0a7e5f1fSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8764*0a7e5f1fSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8765*0a7e5f1fSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8766*0a7e5f1fSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8767*0a7e5f1fSJoseph Mingrone # for it: 8768*0a7e5f1fSJoseph Mingrone # 8769*0a7e5f1fSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8770*0a7e5f1fSJoseph Mingrone # 8771*0a7e5f1fSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8772*0a7e5f1fSJoseph Mingrone ac_c_werror_flag=yes 8773*0a7e5f1fSJoseph Mingrone # 8774*0a7e5f1fSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8775*0a7e5f1fSJoseph Mingrone # content of the program being compiled. We do not, for example, 8776*0a7e5f1fSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8777*0a7e5f1fSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8778*0a7e5f1fSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8779*0a7e5f1fSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8780*0a7e5f1fSJoseph Mingrone # testing, is generated; see 8781*0a7e5f1fSJoseph Mingrone # 8782*0a7e5f1fSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8783*0a7e5f1fSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8784*0a7e5f1fSJoseph Mingrone # 8785*0a7e5f1fSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8786*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8787*0a7e5f1fSJoseph Mingrone # 8788*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8789*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 8790*0a7e5f1fSJoseph Mingroneint main(void) { return 0; } 8791*0a7e5f1fSJoseph Mingrone_ACEOF 8792*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8793*0a7e5f1fSJoseph Mingronethen : 8794*0a7e5f1fSJoseph Mingrone 8795*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8796*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8797*0a7e5f1fSJoseph Mingrone CFLAGS="$save_CFLAGS" 8798*0a7e5f1fSJoseph Mingrone V_CCOPT="$V_CCOPT -Wunused-but-set-variable" 8799*0a7e5f1fSJoseph Mingrone 8800*0a7e5f1fSJoseph Mingroneelse $as_nop 8801*0a7e5f1fSJoseph Mingrone 8802*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8803*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8804*0a7e5f1fSJoseph Mingrone CFLAGS="$save_CFLAGS" 8805*0a7e5f1fSJoseph Mingrone 8806*0a7e5f1fSJoseph Mingronefi 8807*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8808*0a7e5f1fSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8809*0a7e5f1fSJoseph Mingrone 8810*0a7e5f1fSJoseph Mingrone 8811*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wused-but-marked-unused option" >&5 8812*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wused-but-marked-unused option... " >&6; } 8813ee67461eSJoseph Mingrone save_CFLAGS="$CFLAGS" 8814ee67461eSJoseph Mingrone CFLAGS="$CFLAGS -Wused-but-marked-unused" 8815ee67461eSJoseph Mingrone # 8816ee67461eSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8817ee67461eSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8818ee67461eSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8819ee67461eSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8820ee67461eSJoseph Mingrone # for it: 8821ee67461eSJoseph Mingrone # 8822ee67461eSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8823ee67461eSJoseph Mingrone # 8824ee67461eSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8825ee67461eSJoseph Mingrone ac_c_werror_flag=yes 8826ee67461eSJoseph Mingrone # 8827ee67461eSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8828ee67461eSJoseph Mingrone # content of the program being compiled. We do not, for example, 8829ee67461eSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8830ee67461eSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8831ee67461eSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8832ee67461eSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8833ee67461eSJoseph Mingrone # testing, is generated; see 8834ee67461eSJoseph Mingrone # 8835ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8836ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8837ee67461eSJoseph Mingrone # 8838ee67461eSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8839*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8840ee67461eSJoseph Mingrone # 8841ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8842ee67461eSJoseph Mingrone/* end confdefs.h. */ 8843ee67461eSJoseph Mingroneint main(void) { return 0; } 8844ee67461eSJoseph Mingrone_ACEOF 8845*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8846*0a7e5f1fSJoseph Mingronethen : 8847ee67461eSJoseph Mingrone 8848*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8849*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8850ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8851ee67461eSJoseph Mingrone V_CCOPT="$V_CCOPT -Wused-but-marked-unused" 8852ee67461eSJoseph Mingrone 8853*0a7e5f1fSJoseph Mingroneelse $as_nop 8854ee67461eSJoseph Mingrone 8855*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8856*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8857ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8858ee67461eSJoseph Mingrone 8859ee67461eSJoseph Mingronefi 8860*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8861ee67461eSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 8862ee67461eSJoseph Mingrone 8863ee67461eSJoseph Mingrone 8864*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the -Wwrite-strings option" >&5 8865*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports the -Wwrite-strings option... " >&6; } 8866ee67461eSJoseph Mingrone save_CFLAGS="$CFLAGS" 8867ee67461eSJoseph Mingrone CFLAGS="$CFLAGS -Wwrite-strings" 8868ee67461eSJoseph Mingrone # 8869ee67461eSJoseph Mingrone # XXX - yes, this depends on the way AC_LANG_WERROR works, 8870ee67461eSJoseph Mingrone # but no mechanism is provided to turn AC_LANG_WERROR on 8871ee67461eSJoseph Mingrone # *and then turn it back off*, so that we *only* do it when 8872ee67461eSJoseph Mingrone # testing compiler options - 15 years after somebody asked 8873ee67461eSJoseph Mingrone # for it: 8874ee67461eSJoseph Mingrone # 8875ee67461eSJoseph Mingrone # https://autoconf.gnu.narkive.com/gTAVmfKD/how-to-cancel-flags-set-by-ac-lang-werror 8876ee67461eSJoseph Mingrone # 8877ee67461eSJoseph Mingrone save_ac_c_werror_flag="$ac_c_werror_flag" 8878ee67461eSJoseph Mingrone ac_c_werror_flag=yes 8879ee67461eSJoseph Mingrone # 8880ee67461eSJoseph Mingrone # We use AC_LANG_SOURCE() so that we can control the complete 8881ee67461eSJoseph Mingrone # content of the program being compiled. We do not, for example, 8882ee67461eSJoseph Mingrone # want the default "int main()" that AC_LANG_PROGRAM() generates, 8883ee67461eSJoseph Mingrone # as it will generate a warning with -Wold-style-definition, meaning 8884ee67461eSJoseph Mingrone # that we would treat it as not working, as the test will fail if 8885ee67461eSJoseph Mingrone # *any* error output, including a warning due to the flag we're 8886ee67461eSJoseph Mingrone # testing, is generated; see 8887ee67461eSJoseph Mingrone # 8888ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8889ee67461eSJoseph Mingrone # https://www.postgresql.org/message-id/2192993.1591682589%40sss.pgh.pa.us 8890ee67461eSJoseph Mingrone # 8891ee67461eSJoseph Mingrone # This may, as per those two messages, be fixed in autoconf 2.70, 8892*0a7e5f1fSJoseph Mingrone # but we only require 2.69 or newer for now. 8893ee67461eSJoseph Mingrone # 8894ee67461eSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8895ee67461eSJoseph Mingrone/* end confdefs.h. */ 8896ee67461eSJoseph Mingroneint main(void) { return 0; } 8897ee67461eSJoseph Mingrone_ACEOF 8898*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_compile "$LINENO" 8899*0a7e5f1fSJoseph Mingronethen : 8900ee67461eSJoseph Mingrone 8901*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 8902*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 8903ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8904ee67461eSJoseph Mingrone V_CCOPT="$V_CCOPT -Wwrite-strings" 8905ee67461eSJoseph Mingrone 8906*0a7e5f1fSJoseph Mingroneelse $as_nop 8907ee67461eSJoseph Mingrone 8908*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8909*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 8910ee67461eSJoseph Mingrone CFLAGS="$save_CFLAGS" 8911ee67461eSJoseph Mingrone 8912ee67461eSJoseph Mingronefi 8913*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext 8914ee67461eSJoseph Mingrone ac_c_werror_flag="$save_ac_c_werror_flag" 89153c602fabSXin LI 89163c602fabSXin LI fi 89173c602fabSXin LI 8918*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports generating dependencies" >&5 8919*0a7e5f1fSJoseph Mingroneprintf %s "checking whether the compiler supports generating dependencies... " >&6; } 89203c602fabSXin LI if test "$GCC" = yes ; then 89213c602fabSXin LI # 89223c602fabSXin LI # GCC, or a compiler deemed to be GCC by AC_PROG_CC (even 89233c602fabSXin LI # though it's not); we assume that, in this case, the flag 89243c602fabSXin LI # would be -M. 89253c602fabSXin LI # 89263c602fabSXin LI ac_lbl_dependency_flag="-M" 89273c602fabSXin LI else 89283c602fabSXin LI # 89293c602fabSXin LI # Not GCC or a compiler deemed to be GCC; what platform is 89303c602fabSXin LI # this? (We're assuming that if the compiler isn't GCC 89313c602fabSXin LI # it's the compiler from the vendor of the OS; that won't 89323c602fabSXin LI # necessarily be true for x86 platforms, where it might be 89333c602fabSXin LI # the Intel C compiler.) 89343c602fabSXin LI # 8935a90e161bSBill Fenner case "$host_os" in 89364644f044SBill Fenner 89373c602fabSXin LI irix*|osf*|darwin*) 89383c602fabSXin LI # 89393c602fabSXin LI # MIPS C for IRIX, DEC C, and clang all use -M. 89403c602fabSXin LI # 89413c602fabSXin LI ac_lbl_dependency_flag="-M" 89423c602fabSXin LI ;; 89433c602fabSXin LI 89443c602fabSXin LI solaris*) 89453c602fabSXin LI # 89463c602fabSXin LI # Sun C uses -xM. 89473c602fabSXin LI # 89483c602fabSXin LI ac_lbl_dependency_flag="-xM" 89493c602fabSXin LI ;; 89503c602fabSXin LI 89513c602fabSXin LI hpux*) 89523c602fabSXin LI # 89533c602fabSXin LI # HP's older C compilers don't support this. 89543c602fabSXin LI # HP's newer C compilers support this with 89553c602fabSXin LI # either +M or +Make; the older compilers 89563c602fabSXin LI # interpret +M as something completely 89573c602fabSXin LI # different, so we use +Make so we don't 89583c602fabSXin LI # think it works with the older compilers. 89593c602fabSXin LI # 89603c602fabSXin LI ac_lbl_dependency_flag="+Make" 89614644f044SBill Fenner ;; 89624644f044SBill Fenner 89634644f044SBill Fenner *) 89643c602fabSXin LI # 89653c602fabSXin LI # Not one of the above; assume no support for 89663c602fabSXin LI # generating dependencies. 89673c602fabSXin LI # 89683c602fabSXin LI ac_lbl_dependency_flag="" 89694644f044SBill Fenner ;; 89704644f044SBill Fenner esac 89714644f044SBill Fenner fi 89723c602fabSXin LI 89733c602fabSXin LI # 89743c602fabSXin LI # Is ac_lbl_dependency_flag defined and, if so, does the compiler 89753c602fabSXin LI # complain about it? 89763c602fabSXin LI # 89773c602fabSXin LI # Note: clang doesn't seem to exit with an error status when handed 89783c602fabSXin LI # an unknown non-warning error, even if you pass it 89793c602fabSXin LI # -Werror=unknown-warning-option. However, it always supports 89803c602fabSXin LI # -M, so the fact that this test always succeeds with clang 89813c602fabSXin LI # isn't an issue. 89823c602fabSXin LI # 89833c602fabSXin LI if test ! -z "$ac_lbl_dependency_flag"; then 89843c602fabSXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 89853c602fabSXin LI/* end confdefs.h. */ 89863c602fabSXin LIint main(void) { return 0; } 89873c602fabSXin LI_ACEOF 8988*0a7e5f1fSJoseph Mingrone if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: eval \"\$CC \$ac_lbl_dependency_flag conftest.c >/dev/null 2>&1\""; } >&5 8989ee67461eSJoseph Mingrone (eval "$CC $ac_lbl_dependency_flag conftest.c >/dev/null 2>&1") 2>&5 8990ee67461eSJoseph Mingrone ac_status=$? 8991*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 8992ee67461eSJoseph Mingrone test $ac_status = 0; }; then 8993*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, with $ac_lbl_dependency_flag" >&5 8994*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes, with $ac_lbl_dependency_flag" >&6; } 89953c602fabSXin LI DEPENDENCY_CFLAG="$ac_lbl_dependency_flag" 8996ee67461eSJoseph Mingrone MKDEP='${top_srcdir}/mkdep' 89973c602fabSXin LI else 8998*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 8999*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 90003c602fabSXin LI # 90013c602fabSXin LI # We can't run mkdep, so have "make depend" do 90023c602fabSXin LI # nothing. 90033c602fabSXin LI # 90043c602fabSXin LI MKDEP=: 90053c602fabSXin LI fi 90063c602fabSXin LI rm -rf conftest* 90073c602fabSXin LI else 9008*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9009*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 90103c602fabSXin LI # 90113c602fabSXin LI # We can't run mkdep, so have "make depend" do 90123c602fabSXin LI # nothing. 90133c602fabSXin LI # 90143c602fabSXin LI MKDEP=: 90153c602fabSXin LI fi 90163c602fabSXin LI 90173c602fabSXin LI 90183c602fabSXin LI 90193c602fabSXin LI # 90203c602fabSXin LI # We used to set -n32 for IRIX 6 when not using GCC (presumed 90213c602fabSXin LI # to mean that we're using MIPS C or MIPSpro C); it specified 90223c602fabSXin LI # the "new" faster 32-bit ABI, introduced in IRIX 6.2. I'm 90233c602fabSXin LI # not sure why that would be something to do *only* with a 90243c602fabSXin LI # .devel file; why should the ABI for which we produce code 90253c602fabSXin LI # depend on .devel? 90263c602fabSXin LI # 9027a90e161bSBill Fenner os=`echo $host_os | sed -e 's/\([0-9][0-9]*\)[^0-9].*$/\1/'` 90284644f044SBill Fenner name="lbl/os-$os.h" 90294644f044SBill Fenner if test -f $name ; then 90304644f044SBill Fenner ln -s $name os-proto.h 903127df3f5dSRui Paulo 9032*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define HAVE_OS_PROTO_H 1" >>confdefs.h 90334644f044SBill Fenner 90344644f044SBill Fenner else 9035*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: can't find $name" >&5 9036*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: WARNING: can't find $name" >&2;} 90374644f044SBill Fenner fi 90384644f044SBill Fenner fi 90394644f044SBill Fenner 90403340d773SGleb Smirnoff# Check for OpenSSL/libressl libcrypto 9041*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use OpenSSL/libressl libcrypto" >&5 9042*0a7e5f1fSJoseph Mingroneprintf %s "checking whether to use OpenSSL/libressl libcrypto... " >&6; } 9043a5779b6eSRui Paulo# Specify location for both includes and libraries. 9044d03c0883SXin LIwant_libcrypto=ifavailable 90455b0fe478SBruce M Simpson 9046b5bfcb5dSMax Laier# Check whether --with-crypto was given. 9047*0a7e5f1fSJoseph Mingroneif test ${with_crypto+y} 9048*0a7e5f1fSJoseph Mingronethen : 9049b5bfcb5dSMax Laier withval=$with_crypto; 9050a5779b6eSRui Paulo if test $withval = no 9051a5779b6eSRui Paulo then 90523340d773SGleb Smirnoff # User doesn't want to link with libcrypto. 9053a5779b6eSRui Paulo want_libcrypto=no 9054*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9055*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 9056a5779b6eSRui Paulo elif test $withval = yes 9057a5779b6eSRui Paulo then 90583340d773SGleb Smirnoff # User wants to link with libcrypto but hasn't specified 90593340d773SGleb Smirnoff # a directory. 9060a5779b6eSRui Paulo want_libcrypto=yes 9061*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9062*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 90633340d773SGleb Smirnoff else 90643340d773SGleb Smirnoff # User wants to link with libcrypto and has specified 90653340d773SGleb Smirnoff # a directory, so use the provided value. 90663340d773SGleb Smirnoff want_libcrypto=yes 90673340d773SGleb Smirnoff libcrypto_root=$withval 9068*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, using the version installed in $withval" >&5 9069*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes, using the version installed in $withval" >&6; } 90702ebc47dbSSam Leffler fi 90711de50e9fSSam Leffler 9072*0a7e5f1fSJoseph Mingroneelse $as_nop 9073a5779b6eSRui Paulo 9074a5779b6eSRui Paulo # 90753340d773SGleb Smirnoff # Use libcrypto if it's present, otherwise don't; no directory 90763340d773SGleb Smirnoff # was specified. 9077a5779b6eSRui Paulo # 9078a5779b6eSRui Paulo want_libcrypto=ifavailable 9079*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, if available" >&5 9080*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes, if available" >&6; } 9081a5779b6eSRui Paulo 9082a5779b6eSRui Paulofi 9083a5779b6eSRui Paulo 9084a5779b6eSRui Pauloif test "$want_libcrypto" != "no"; then 90853340d773SGleb Smirnoff # 9086*0a7e5f1fSJoseph Mingrone # Were we told where to look for libcrypto? 90873340d773SGleb Smirnoff # 9088*0a7e5f1fSJoseph Mingrone if test -z "$libcrypto_root"; then 9089*0a7e5f1fSJoseph Mingrone # 9090*0a7e5f1fSJoseph Mingrone # No. 9091*0a7e5f1fSJoseph Mingrone # 9092*0a7e5f1fSJoseph Mingrone # First, try looking for it with pkg-config, if we have it. 9093*0a7e5f1fSJoseph Mingrone # 9094*0a7e5f1fSJoseph Mingrone # Homebrew's pkg-config does not, by default, look for 9095*0a7e5f1fSJoseph Mingrone # pkg-config files for packages it has installed. 9096*0a7e5f1fSJoseph Mingrone # Furthermore, at least for OpenSSL, they appear to be 9097*0a7e5f1fSJoseph Mingrone # dumped in package-specific directories whose paths are 9098*0a7e5f1fSJoseph Mingrone # not only package-specific but package-version-specific. 9099*0a7e5f1fSJoseph Mingrone # 9100*0a7e5f1fSJoseph Mingrone # So the only way to find openssl is to get the value of 9101*0a7e5f1fSJoseph Mingrone # PKG_CONFIG_PATH from "brew --env openssl" and add that 9102*0a7e5f1fSJoseph Mingrone # to PKG_CONFIG_PATH. (No, we can't just assume it's under 9103*0a7e5f1fSJoseph Mingrone # /usr/local; Homebrew have conveniently chosen to put it 9104*0a7e5f1fSJoseph Mingrone # under /opt/homebrew on ARM.) 9105*0a7e5f1fSJoseph Mingrone # 9106*0a7e5f1fSJoseph Mingrone # That's the nice thing about Homebrew - it makes things easier! 9107*0a7e5f1fSJoseph Mingrone # Thanks! 9108*0a7e5f1fSJoseph Mingrone # 9109*0a7e5f1fSJoseph Mingrone save_PKG_CONFIG_PATH="$PKG_CONFIG_PATH" 9110*0a7e5f1fSJoseph Mingrone if test -n "$BREW"; then 9111*0a7e5f1fSJoseph Mingrone openssl_pkgconfig_dir=`$BREW --env --plain openssl | sed -n 's/PKG_CONFIG_PATH: //p'` 9112*0a7e5f1fSJoseph Mingrone PKG_CONFIG_PATH="$openssl_pkgconfig_dir:$PKG_CONFIG_PATH" 9113*0a7e5f1fSJoseph Mingrone fi 91143340d773SGleb Smirnoff 9115*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libcrypto with pkg-config" >&5 9116*0a7e5f1fSJoseph Mingroneprintf %s "checking for libcrypto with pkg-config... " >&6; } 9117*0a7e5f1fSJoseph Mingroneif test -n "$PKG_CONFIG"; then 9118*0a7e5f1fSJoseph Mingrone 9119*0a7e5f1fSJoseph Mingrone if { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libcrypto\""; } >&5 9120*0a7e5f1fSJoseph Mingrone ($PKG_CONFIG --exists --print-errors "libcrypto") 2>&5 9121*0a7e5f1fSJoseph Mingrone ac_status=$? 9122*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 9123*0a7e5f1fSJoseph Mingrone test $ac_status = 0; }; then 9124*0a7e5f1fSJoseph Mingrone # 9125*0a7e5f1fSJoseph Mingrone # The package was found, so try to get its C flags and 9126*0a7e5f1fSJoseph Mingrone # libraries. 9127*0a7e5f1fSJoseph Mingrone # 9128*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: found" >&5 9129*0a7e5f1fSJoseph Mingroneprintf "%s\n" "found" >&6; } 9130*0a7e5f1fSJoseph Mingrone if test ! -n "$LIBCRYPTO_CFLAGS"; then 9131*0a7e5f1fSJoseph Mingrone LIBCRYPTO_CFLAGS=`$PKG_CONFIG --cflags "libcrypto" 2>/dev/null` 9132*0a7e5f1fSJoseph Mingrone if test "x$?" != "x0"; then 9133*0a7e5f1fSJoseph Mingrone # 9134*0a7e5f1fSJoseph Mingrone # That failed - report an error. 9135*0a7e5f1fSJoseph Mingrone # Re-run the command, telling pkg-config to print an error 9136*0a7e5f1fSJoseph Mingrone # message, capture the error message, and report it. 9137*0a7e5f1fSJoseph Mingrone # This causes the configuration script to fail, as it means 9138*0a7e5f1fSJoseph Mingrone # the script is almost certainly doing something wrong. 9139*0a7e5f1fSJoseph Mingrone # 9140*0a7e5f1fSJoseph Mingrone 9141*0a7e5f1fSJoseph Mingroneif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9142*0a7e5f1fSJoseph Mingrone _pkg_short_errors_supported=yes 9143b0453382SBill Fennerelse 9144*0a7e5f1fSJoseph Mingrone _pkg_short_errors_supported=no 9145*0a7e5f1fSJoseph Mingronefi 9146*0a7e5f1fSJoseph Mingrone if test $_pkg_short_errors_supported = yes; then 9147*0a7e5f1fSJoseph Mingrone _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --cflags "libcrypto" 2>&1` 9148*0a7e5f1fSJoseph Mingrone else 9149*0a7e5f1fSJoseph Mingrone _pkg_error_string=`$PKG_CONFIG --print-errors --cflags "libcrypto" 2>&1` 9150*0a7e5f1fSJoseph Mingrone fi 9151*0a7e5f1fSJoseph Mingrone as_fn_error $? "$PKG_CONFIG --cflags \"libcrypto\" failed: $_pkg_error_string" "$LINENO" 5 9152*0a7e5f1fSJoseph Mingrone fi 9153*0a7e5f1fSJoseph Mingrone fi 9154*0a7e5f1fSJoseph Mingrone if test ! -n "$LIBCRYPTO_LIBS"; then 9155*0a7e5f1fSJoseph Mingrone LIBCRYPTO_LIBS=`$PKG_CONFIG --libs "libcrypto" 2>/dev/null` 9156*0a7e5f1fSJoseph Mingrone if test "x$?" != "x0"; then 9157*0a7e5f1fSJoseph Mingrone # 9158*0a7e5f1fSJoseph Mingrone # That failed - report an error. 9159*0a7e5f1fSJoseph Mingrone # Re-run the command, telling pkg-config to print an error 9160*0a7e5f1fSJoseph Mingrone # message, capture the error message, and report it. 9161*0a7e5f1fSJoseph Mingrone # This causes the configuration script to fail, as it means 9162*0a7e5f1fSJoseph Mingrone # the script is almost certainly doing something wrong. 9163*0a7e5f1fSJoseph Mingrone # 9164*0a7e5f1fSJoseph Mingrone 9165*0a7e5f1fSJoseph Mingroneif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9166*0a7e5f1fSJoseph Mingrone _pkg_short_errors_supported=yes 9167*0a7e5f1fSJoseph Mingroneelse 9168*0a7e5f1fSJoseph Mingrone _pkg_short_errors_supported=no 9169*0a7e5f1fSJoseph Mingronefi 9170*0a7e5f1fSJoseph Mingrone if test $_pkg_short_errors_supported = yes; then 9171*0a7e5f1fSJoseph Mingrone _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs "libcrypto" 2>&1` 9172*0a7e5f1fSJoseph Mingrone else 9173*0a7e5f1fSJoseph Mingrone _pkg_error_string=`$PKG_CONFIG --print-errors --libs "libcrypto" 2>&1` 9174*0a7e5f1fSJoseph Mingrone fi 9175*0a7e5f1fSJoseph Mingrone as_fn_error $? "$PKG_CONFIG --libs \"libcrypto\" failed: $_pkg_error_string" "$LINENO" 5 9176*0a7e5f1fSJoseph Mingrone fi 9177*0a7e5f1fSJoseph Mingrone fi 9178*0a7e5f1fSJoseph Mingrone if test ! -n "$LIBCRYPTO_LIBS_STATIC"; then 9179*0a7e5f1fSJoseph Mingrone LIBCRYPTO_LIBS_STATIC=`$PKG_CONFIG --libs --static "libcrypto" 2>/dev/null` 9180*0a7e5f1fSJoseph Mingrone if test "x$?" != "x0"; then 9181*0a7e5f1fSJoseph Mingrone # 9182*0a7e5f1fSJoseph Mingrone # That failed - report an error. 9183*0a7e5f1fSJoseph Mingrone # Re-run the command, telling pkg-config to print an error 9184*0a7e5f1fSJoseph Mingrone # message, capture the error message, and report it. 9185*0a7e5f1fSJoseph Mingrone # This causes the configuration script to fail, as it means 9186*0a7e5f1fSJoseph Mingrone # the script is almost certainly doing something wrong. 9187*0a7e5f1fSJoseph Mingrone # 9188*0a7e5f1fSJoseph Mingrone 9189*0a7e5f1fSJoseph Mingroneif $PKG_CONFIG --atleast-pkgconfig-version 0.20; then 9190*0a7e5f1fSJoseph Mingrone _pkg_short_errors_supported=yes 9191*0a7e5f1fSJoseph Mingroneelse 9192*0a7e5f1fSJoseph Mingrone _pkg_short_errors_supported=no 9193*0a7e5f1fSJoseph Mingronefi 9194*0a7e5f1fSJoseph Mingrone if test $_pkg_short_errors_supported = yes; then 9195*0a7e5f1fSJoseph Mingrone _pkg_error_string=`$PKG_CONFIG --short-errors --print-errors --libs --static "libcrypto" 2>&1` 9196*0a7e5f1fSJoseph Mingrone else 9197*0a7e5f1fSJoseph Mingrone _pkg_error_string=`$PKG_CONFIG --print-errors --libs --static "libcrypto" 2>&1` 9198*0a7e5f1fSJoseph Mingrone fi 9199*0a7e5f1fSJoseph Mingrone as_fn_error $? "$PKG_CONFIG --libs --static \"libcrypto\" failed: $_pkg_error_string" "$LINENO" 5 9200*0a7e5f1fSJoseph Mingrone fi 9201*0a7e5f1fSJoseph Mingrone fi 9202*0a7e5f1fSJoseph Mingrone 9203*0a7e5f1fSJoseph Mingrone # 9204*0a7e5f1fSJoseph Mingrone # We found OpenSSL/libressl libcrypto. 9205*0a7e5f1fSJoseph Mingrone # 9206*0a7e5f1fSJoseph Mingrone HAVE_LIBCRYPTO=yes 9207*0a7e5f1fSJoseph Mingrone 9208*0a7e5f1fSJoseph Mingrone else 9209*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 9210*0a7e5f1fSJoseph Mingroneprintf "%s\n" "not found" >&6; } 9211*0a7e5f1fSJoseph Mingrone : 9212*0a7e5f1fSJoseph Mingrone fi 9213*0a7e5f1fSJoseph Mingroneelse 9214*0a7e5f1fSJoseph Mingrone # No pkg-config, so obviously not found with pkg-config. 9215*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: pkg-config not found" >&5 9216*0a7e5f1fSJoseph Mingroneprintf "%s\n" "pkg-config not found" >&6; } 9217*0a7e5f1fSJoseph Mingrone : 9218*0a7e5f1fSJoseph Mingronefi 9219*0a7e5f1fSJoseph Mingrone 9220*0a7e5f1fSJoseph Mingrone PKG_CONFIG_PATH="$save_PKG_CONFIG_PATH" 9221*0a7e5f1fSJoseph Mingrone 9222*0a7e5f1fSJoseph Mingrone # 9223*0a7e5f1fSJoseph Mingrone # If it wasn't found, and we have Homebrew installed, see 9224*0a7e5f1fSJoseph Mingrone # if it's in Homebrew. 9225*0a7e5f1fSJoseph Mingrone # 9226*0a7e5f1fSJoseph Mingrone if test "x$HAVE_LIBCRYPTO" != "xyes" -a -n "$BREW"; then 9227*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for openssl in Homebrew" >&5 9228*0a7e5f1fSJoseph Mingroneprintf %s "checking for openssl in Homebrew... " >&6; } 9229*0a7e5f1fSJoseph Mingrone # 9230*0a7e5f1fSJoseph Mingrone # The brew man page lies when it speaks of 9231*0a7e5f1fSJoseph Mingrone # $BREW --prefix --installed <formula> 9232*0a7e5f1fSJoseph Mingrone # outputting nothing. In Homebrew 3.3.16, 9233*0a7e5f1fSJoseph Mingrone # it produces output regardless of whether 9234*0a7e5f1fSJoseph Mingrone # the formula is installed or not, so we 9235*0a7e5f1fSJoseph Mingrone # send the standard output and error to 9236*0a7e5f1fSJoseph Mingrone # the bit bucket. 9237*0a7e5f1fSJoseph Mingrone # 9238*0a7e5f1fSJoseph Mingrone # libcrypto isn't a formula, openssl is a formula. 9239*0a7e5f1fSJoseph Mingrone # 9240*0a7e5f1fSJoseph Mingrone if $BREW --prefix --installed openssl >/dev/null 2>&1; then 9241*0a7e5f1fSJoseph Mingrone # 9242*0a7e5f1fSJoseph Mingrone # Yes. Get the include directory and library 9243*0a7e5f1fSJoseph Mingrone # directory. (No, we can't just assume it's 9244*0a7e5f1fSJoseph Mingrone # under /usr/local; Homebrew have conveniently 9245*0a7e5f1fSJoseph Mingrone # chosen to put it under /opt/homebrew on ARM.) 9246*0a7e5f1fSJoseph Mingrone # 9247*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9248*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 9249*0a7e5f1fSJoseph Mingrone HAVE_LIBCRYPTO=yes 9250*0a7e5f1fSJoseph Mingrone openssl_path=`$BREW --prefix openssl` 9251*0a7e5f1fSJoseph Mingrone LIBCRYPTO_CFLAGS="-I$openssl_path/include" 9252*0a7e5f1fSJoseph Mingrone LIBCRYPTO_LIBS="-L$openssl_path/lib -lcrypto" 9253*0a7e5f1fSJoseph Mingrone else 9254*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9255*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 9256*0a7e5f1fSJoseph Mingrone fi 9257*0a7e5f1fSJoseph Mingrone fi 9258*0a7e5f1fSJoseph Mingrone 9259*0a7e5f1fSJoseph Mingrone # 9260*0a7e5f1fSJoseph Mingrone # If it wasn't found, and /usr/local/include and /usr/local/lib 9261*0a7e5f1fSJoseph Mingrone # exist, check if it's in /usr/local. (We check whether they 9262*0a7e5f1fSJoseph Mingrone # exist because, if they don't exist, the compiler will warn 9263*0a7e5f1fSJoseph Mingrone # about that and then ignore the argument, so they test 9264*0a7e5f1fSJoseph Mingrone # using just the system header files and libraries.) 9265*0a7e5f1fSJoseph Mingrone # 9266*0a7e5f1fSJoseph Mingrone # We include the standard include file to 1) make sure that 9267*0a7e5f1fSJoseph Mingrone # it's installed (if it's just a shared library for the 9268*0a7e5f1fSJoseph Mingrone # benefit of existing programs, that's not useful) and 2) 9269*0a7e5f1fSJoseph Mingrone # because SSL_library_init() is a library routine in some 9270*0a7e5f1fSJoseph Mingrone # versions and a #defined wrapper around OPENSSL_init_ssl() 9271*0a7e5f1fSJoseph Mingrone # in others. 9272*0a7e5f1fSJoseph Mingrone # 9273*0a7e5f1fSJoseph Mingrone if test "x$HAVE_LIBCRYPTO" != "xyes" -a -d "/usr/local/include" -a -d "/usr/local/lib"; then 9274*0a7e5f1fSJoseph Mingrone 9275*0a7e5f1fSJoseph Mingrone save_CFLAGS="$CFLAGS" 9276*0a7e5f1fSJoseph Mingrone save_LIBS="$LIBS" 9277*0a7e5f1fSJoseph Mingrone save_LDFLAGS="$LDFLAGS" 9278*0a7e5f1fSJoseph Mingrone 9279*0a7e5f1fSJoseph Mingrone CFLAGS="$CFLAGS -I/usr/local/include" 9280*0a7e5f1fSJoseph Mingrone LIBS="$LIBS -L/usr/local/lib -lcrypto" 9281*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have an OpenSSL/libressl libcrypto in /usr/local that we can use" >&5 9282*0a7e5f1fSJoseph Mingroneprintf %s "checking whether we have an OpenSSL/libressl libcrypto in /usr/local that we can use... " >&6; } 9283d03c0883SXin LI cat confdefs.h - <<_ACEOF >conftest.$ac_ext 92845b0fe478SBruce M Simpson/* end confdefs.h. */ 92855b0fe478SBruce M Simpson 9286*0a7e5f1fSJoseph Mingrone#include <openssl/evp.h> 9287*0a7e5f1fSJoseph Mingrone 92885b0fe478SBruce M Simpsonint 9289*0a7e5f1fSJoseph Mingronemain (void) 92905b0fe478SBruce M Simpson{ 9291*0a7e5f1fSJoseph Mingrone 9292*0a7e5f1fSJoseph MingroneEVP_CIPHER_CTX_block_size((EVP_CIPHER_CTX *)0); 9293*0a7e5f1fSJoseph Mingronereturn 0; 9294*0a7e5f1fSJoseph Mingrone 92955b0fe478SBruce M Simpson ; 92965b0fe478SBruce M Simpson return 0; 92975b0fe478SBruce M Simpson} 92985b0fe478SBruce M Simpson_ACEOF 9299*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 9300*0a7e5f1fSJoseph Mingronethen : 9301*0a7e5f1fSJoseph Mingrone 9302*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9303*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 9304*0a7e5f1fSJoseph Mingrone HAVE_LIBCRYPTO=yes 9305*0a7e5f1fSJoseph Mingrone LIBCRYPTO_CFLAGS="-I/usr/local/include" 9306*0a7e5f1fSJoseph Mingrone LIBCRYPTO_LIBS="-L/usr/local/lib -lcrypto" 9307*0a7e5f1fSJoseph Mingrone 9308*0a7e5f1fSJoseph Mingroneelse $as_nop 9309*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9310*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 9311b0453382SBill Fennerfi 9312*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 9313b5bfcb5dSMax Laier conftest$ac_exeext conftest.$ac_ext 9314*0a7e5f1fSJoseph Mingrone 9315*0a7e5f1fSJoseph Mingrone CFLAGS="$save_CFLAGS" 9316*0a7e5f1fSJoseph Mingrone LIBS="$save_LIBS" 9317*0a7e5f1fSJoseph Mingrone LDFLAGS="$save_LDFLAGS" 9318*0a7e5f1fSJoseph Mingrone 93195b0fe478SBruce M Simpson fi 9320*0a7e5f1fSJoseph Mingrone 9321*0a7e5f1fSJoseph Mingrone # 9322*0a7e5f1fSJoseph Mingrone # If it wasn't found, check if it's a system library. 9323*0a7e5f1fSJoseph Mingrone # 9324*0a7e5f1fSJoseph Mingrone # We include the standard include file to 1) make sure that 9325*0a7e5f1fSJoseph Mingrone # it's installed (if it's just a shared library for the 9326*0a7e5f1fSJoseph Mingrone # benefit of existing programs, that's not useful) and 2) 9327*0a7e5f1fSJoseph Mingrone # make sure this isn't a newer macOS that provides libcrypto 9328*0a7e5f1fSJoseph Mingrone # as a shared library but doesn't provide headers - Apple, 9329*0a7e5f1fSJoseph Mingrone # bless their pointy little heads, apparently ship libcrypto 9330*0a7e5f1fSJoseph Mingrone # as a library, but not the header files, in El Capitan and 9331*0a7e5f1fSJoseph Mingrone # later, probably because they don't want you writing nasty 9332*0a7e5f1fSJoseph Mingrone # portable code that could run on other UN*Xes, they want you 9333*0a7e5f1fSJoseph Mingrone # writing code that uses their Shiny New Crypto Library and 9334*0a7e5f1fSJoseph Mingrone # that thus only runs on macOS. 9335*0a7e5f1fSJoseph Mingrone # 9336*0a7e5f1fSJoseph Mingrone if test "x$HAVE_LIBCRYPTO" != "xyes"; then 9337*0a7e5f1fSJoseph Mingrone 9338*0a7e5f1fSJoseph Mingrone save_CFLAGS="$CFLAGS" 9339*0a7e5f1fSJoseph Mingrone save_LIBS="$LIBS" 9340*0a7e5f1fSJoseph Mingrone save_LDFLAGS="$LDFLAGS" 9341*0a7e5f1fSJoseph Mingrone 9342*0a7e5f1fSJoseph Mingrone LIBS="$LIBS -lcrypto" 9343*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have a system OpenSSL/libressl that we can use" >&5 9344*0a7e5f1fSJoseph Mingroneprintf %s "checking whether we have a system OpenSSL/libressl that we can use... " >&6; } 9345*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9346*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 9347*0a7e5f1fSJoseph Mingrone 9348*0a7e5f1fSJoseph Mingrone#include <openssl/evp.h> 9349*0a7e5f1fSJoseph Mingrone 9350*0a7e5f1fSJoseph Mingroneint 9351*0a7e5f1fSJoseph Mingronemain (void) 9352*0a7e5f1fSJoseph Mingrone{ 9353*0a7e5f1fSJoseph Mingrone 9354*0a7e5f1fSJoseph MingroneEVP_CIPHER_CTX_block_size((EVP_CIPHER_CTX *)0); 9355*0a7e5f1fSJoseph Mingronereturn 0; 9356*0a7e5f1fSJoseph Mingrone 9357*0a7e5f1fSJoseph Mingrone ; 9358*0a7e5f1fSJoseph Mingrone return 0; 9359*0a7e5f1fSJoseph Mingrone} 93605b0fe478SBruce M Simpson_ACEOF 9361*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 9362*0a7e5f1fSJoseph Mingronethen : 9363b0453382SBill Fenner 9364*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9365*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 9366*0a7e5f1fSJoseph Mingrone HAVE_LIBCRYPTO=yes 9367*0a7e5f1fSJoseph Mingrone LIBCRYPTO_LIBS="-lcrypto" 9368*0a7e5f1fSJoseph Mingrone 9369*0a7e5f1fSJoseph Mingroneelse $as_nop 9370*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9371*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 9372*0a7e5f1fSJoseph Mingronefi 9373*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 9374*0a7e5f1fSJoseph Mingrone conftest$ac_exeext conftest.$ac_ext 9375*0a7e5f1fSJoseph Mingrone 9376*0a7e5f1fSJoseph Mingrone CFLAGS="$save_CFLAGS" 9377*0a7e5f1fSJoseph Mingrone LIBS="$save_LIBS" 9378*0a7e5f1fSJoseph Mingrone LDFLAGS="$save_LDFLAGS" 9379b0453382SBill Fenner 9380b0453382SBill Fenner fi 9381*0a7e5f1fSJoseph Mingrone else 9382*0a7e5f1fSJoseph Mingrone # 9383*0a7e5f1fSJoseph Mingrone # Yes. 9384*0a7e5f1fSJoseph Mingrone # 9385*0a7e5f1fSJoseph Mingrone # Look for it there. 9386*0a7e5f1fSJoseph Mingrone # 9387b0453382SBill Fenner 9388*0a7e5f1fSJoseph Mingrone save_CFLAGS="$CFLAGS" 9389*0a7e5f1fSJoseph Mingrone save_LIBS="$LIBS" 9390*0a7e5f1fSJoseph Mingrone save_LDFLAGS="$LDFLAGS" 9391*0a7e5f1fSJoseph Mingrone 9392*0a7e5f1fSJoseph Mingrone CFLAGS="$CFLAGS -I$libcrypto_root/include" 9393*0a7e5f1fSJoseph Mingrone LIBS="$LIBS -L$libcrypto_root/lib -lcrypto" 9394*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we have a system OpenSSL/libressl that we can use" >&5 9395*0a7e5f1fSJoseph Mingroneprintf %s "checking whether we have a system OpenSSL/libressl that we can use... " >&6; } 9396*0a7e5f1fSJoseph Mingrone cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9397*0a7e5f1fSJoseph Mingrone/* end confdefs.h. */ 9398*0a7e5f1fSJoseph Mingrone 9399*0a7e5f1fSJoseph Mingrone#include <openssl/evp.h> 9400*0a7e5f1fSJoseph Mingrone 9401*0a7e5f1fSJoseph Mingroneint 9402*0a7e5f1fSJoseph Mingronemain (void) 9403*0a7e5f1fSJoseph Mingrone{ 9404*0a7e5f1fSJoseph Mingrone 9405*0a7e5f1fSJoseph MingroneEVP_CIPHER_CTX_block_size((EVP_CIPHER_CTX *)0); 9406*0a7e5f1fSJoseph Mingronereturn 0; 9407*0a7e5f1fSJoseph Mingrone 9408*0a7e5f1fSJoseph Mingrone ; 9409*0a7e5f1fSJoseph Mingrone return 0; 9410*0a7e5f1fSJoseph Mingrone} 94115b0fe478SBruce M Simpson_ACEOF 9412*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 9413*0a7e5f1fSJoseph Mingronethen : 9414*0a7e5f1fSJoseph Mingrone 9415*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9416*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 9417*0a7e5f1fSJoseph Mingrone HAVE_LIBCRYPTO=yes 9418*0a7e5f1fSJoseph Mingrone LIBCRYPTO_CFLAGS="-I$libcrypto_root/include" 9419*0a7e5f1fSJoseph Mingrone LIBCRYPTO_LIBS="-L$libcrypto_root/lib -lcrypto" 9420*0a7e5f1fSJoseph Mingrone 9421*0a7e5f1fSJoseph Mingroneelse $as_nop 9422*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9423*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 9424*0a7e5f1fSJoseph Mingronefi 9425*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 9426*0a7e5f1fSJoseph Mingrone conftest$ac_exeext conftest.$ac_ext 9427*0a7e5f1fSJoseph Mingrone 9428*0a7e5f1fSJoseph Mingrone CFLAGS="$save_CFLAGS" 9429*0a7e5f1fSJoseph Mingrone LIBS="$save_LIBS" 9430*0a7e5f1fSJoseph Mingrone LDFLAGS="$save_LDFLAGS" 94315b0fe478SBruce M Simpson 94325b0fe478SBruce M Simpson fi 94335b0fe478SBruce M Simpson 9434*0a7e5f1fSJoseph Mingrone # 9435*0a7e5f1fSJoseph Mingrone # OK, did we find it? 9436*0a7e5f1fSJoseph Mingrone # 9437*0a7e5f1fSJoseph Mingrone if test "x$HAVE_LIBCRYPTO" = "xyes"; then 9438*0a7e5f1fSJoseph Mingrone 9439*0a7e5f1fSJoseph Mingroneprintf "%s\n" "#define HAVE_LIBCRYPTO 1" >>confdefs.h 9440*0a7e5f1fSJoseph Mingrone 9441*0a7e5f1fSJoseph Mingrone 9442*0a7e5f1fSJoseph Mingrone # 9443*0a7e5f1fSJoseph Mingrone # Put the subdirectories of the libcrypto root directory 9444*0a7e5f1fSJoseph Mingrone # at the end of the header and library search path, to 9445*0a7e5f1fSJoseph Mingrone # make sure they come after any -I or -L flags for 9446*0a7e5f1fSJoseph Mingrone # a local libpcap - those must take precedence of any 9447*0a7e5f1fSJoseph Mingrone # directory that might contain an installed version of 9448*0a7e5f1fSJoseph Mingrone # libpcap. 9449*0a7e5f1fSJoseph Mingrone # 9450*0a7e5f1fSJoseph Mingrone V_INCLS="$V_INCLS $LIBCRYPTO_CFLAGS" 9451*0a7e5f1fSJoseph Mingrone LIBS="$LIBS $LIBCRYPTO_LIBS" 9452b0453382SBill Fenner 94533340d773SGleb Smirnoff # 94540bff6a5aSEd Maste # OK, then: 94550bff6a5aSEd Maste # 94560bff6a5aSEd Maste # 1) do we have EVP_CIPHER_CTX_new? 9457*0a7e5f1fSJoseph Mingrone # If so, we use it to allocate an EVP_CIPHER_CTX, as 9458*0a7e5f1fSJoseph Mingrone # EVP_CIPHER_CTX may be opaque; otherwise, we allocate it 9459*0a7e5f1fSJoseph Mingrone # ourselves. 94603340d773SGleb Smirnoff # 9461ee67461eSJoseph Mingrone # 2) do we have EVP_DecryptInit_ex()? 9462*0a7e5f1fSJoseph Mingrone # If so, we use it, because we need to be able to make 9463*0a7e5f1fSJoseph Mingrone # two "initialize the cipher" calls, one with the cipher 9464*0a7e5f1fSJoseph Mingrone # and key, and one with the IV, and, as of OpenSSL 1.1, 9465*0a7e5f1fSJoseph Mingrone # You Can't Do That with EVP_DecryptInit(), because a 9466*0a7e5f1fSJoseph Mingrone # call to EVP_DecryptInit() will unconditionally clear 9467*0a7e5f1fSJoseph Mingrone # the context, and if you don't supply a cipher, it'll 9468*0a7e5f1fSJoseph Mingrone # clear the cipher, rendering the context unusable and 9469*0a7e5f1fSJoseph Mingrone # causing a crash. 94700bff6a5aSEd Maste # 9471*0a7e5f1fSJoseph Mingrone ac_fn_c_check_func "$LINENO" "EVP_CIPHER_CTX_new" "ac_cv_func_EVP_CIPHER_CTX_new" 9472*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_EVP_CIPHER_CTX_new" = xyes 9473*0a7e5f1fSJoseph Mingronethen : 9474*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_EVP_CIPHER_CTX_NEW 1" >>confdefs.h 94753340d773SGleb Smirnoff 94763340d773SGleb Smirnofffi 9477*0a7e5f1fSJoseph Mingroneac_fn_c_check_func "$LINENO" "EVP_DecryptInit_ex" "ac_cv_func_EVP_DecryptInit_ex" 9478*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_func_EVP_DecryptInit_ex" = xyes 9479*0a7e5f1fSJoseph Mingronethen : 9480*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_EVP_DECRYPTINIT_EX 1" >>confdefs.h 94813340d773SGleb Smirnoff 94823340d773SGleb Smirnofffi 94833340d773SGleb Smirnoff 9484*0a7e5f1fSJoseph Mingrone else 9485*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenSSL/libressl libcrypto not found" >&5 9486*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: OpenSSL/libressl libcrypto not found" >&6;} 94873340d773SGleb Smirnoff fi 9488a5779b6eSRui Paulofi 9489685295f4SBill Fenner 94908bdc5a62SPatrick Kelsey# Check for libcap-ng 9491*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use libcap-ng" >&5 9492*0a7e5f1fSJoseph Mingroneprintf %s "checking whether to use libcap-ng... " >&6; } 94938bdc5a62SPatrick Kelsey# Specify location for both includes and libraries. 94948bdc5a62SPatrick Kelseywant_libcap_ng=ifavailable 94958bdc5a62SPatrick Kelsey 94968bdc5a62SPatrick Kelsey# Check whether --with-cap_ng was given. 9497*0a7e5f1fSJoseph Mingroneif test ${with_cap_ng+y} 9498*0a7e5f1fSJoseph Mingronethen : 94998bdc5a62SPatrick Kelsey withval=$with_cap_ng; 95008bdc5a62SPatrick Kelsey if test $withval = no 95018bdc5a62SPatrick Kelsey then 95028bdc5a62SPatrick Kelsey want_libcap_ng=no 9503*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 9504*0a7e5f1fSJoseph Mingroneprintf "%s\n" "no" >&6; } 95058bdc5a62SPatrick Kelsey elif test $withval = yes 95068bdc5a62SPatrick Kelsey then 95078bdc5a62SPatrick Kelsey want_libcap_ng=yes 9508*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 9509*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes" >&6; } 95108bdc5a62SPatrick Kelsey fi 95118bdc5a62SPatrick Kelsey 9512*0a7e5f1fSJoseph Mingroneelse $as_nop 95138bdc5a62SPatrick Kelsey 95148bdc5a62SPatrick Kelsey # 95158bdc5a62SPatrick Kelsey # Use libcap-ng if it's present, otherwise don't. 95168bdc5a62SPatrick Kelsey # 95178bdc5a62SPatrick Kelsey want_libcap_ng=ifavailable 9518*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes, if available" >&5 9519*0a7e5f1fSJoseph Mingroneprintf "%s\n" "yes, if available" >&6; } 95208bdc5a62SPatrick Kelsey 95218bdc5a62SPatrick Kelseyfi 95228bdc5a62SPatrick Kelsey 95238bdc5a62SPatrick Kelseyif test "$want_libcap_ng" != "no"; then 9524*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for capng_change_id in -lcap-ng" >&5 9525*0a7e5f1fSJoseph Mingroneprintf %s "checking for capng_change_id in -lcap-ng... " >&6; } 9526*0a7e5f1fSJoseph Mingroneif test ${ac_cv_lib_cap_ng_capng_change_id+y} 9527*0a7e5f1fSJoseph Mingronethen : 9528*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 9529*0a7e5f1fSJoseph Mingroneelse $as_nop 95308bdc5a62SPatrick Kelsey ac_check_lib_save_LIBS=$LIBS 95318bdc5a62SPatrick KelseyLIBS="-lcap-ng $LIBS" 95328bdc5a62SPatrick Kelseycat confdefs.h - <<_ACEOF >conftest.$ac_ext 95338bdc5a62SPatrick Kelsey/* end confdefs.h. */ 95348bdc5a62SPatrick Kelsey 95358bdc5a62SPatrick Kelsey/* Override any GCC internal prototype to avoid an error. 95368bdc5a62SPatrick Kelsey Use char because int might match the return type of a GCC 95378bdc5a62SPatrick Kelsey builtin and then its argument prototype would still apply. */ 95388bdc5a62SPatrick Kelseychar capng_change_id (); 95398bdc5a62SPatrick Kelseyint 9540*0a7e5f1fSJoseph Mingronemain (void) 95418bdc5a62SPatrick Kelsey{ 95428bdc5a62SPatrick Kelseyreturn capng_change_id (); 95438bdc5a62SPatrick Kelsey ; 95448bdc5a62SPatrick Kelsey return 0; 95458bdc5a62SPatrick Kelsey} 95468bdc5a62SPatrick Kelsey_ACEOF 9547*0a7e5f1fSJoseph Mingroneif ac_fn_c_try_link "$LINENO" 9548*0a7e5f1fSJoseph Mingronethen : 95498bdc5a62SPatrick Kelsey ac_cv_lib_cap_ng_capng_change_id=yes 9550*0a7e5f1fSJoseph Mingroneelse $as_nop 95518bdc5a62SPatrick Kelsey ac_cv_lib_cap_ng_capng_change_id=no 95528bdc5a62SPatrick Kelseyfi 9553*0a7e5f1fSJoseph Mingronerm -f core conftest.err conftest.$ac_objext conftest.beam \ 95548bdc5a62SPatrick Kelsey conftest$ac_exeext conftest.$ac_ext 95558bdc5a62SPatrick KelseyLIBS=$ac_check_lib_save_LIBS 95568bdc5a62SPatrick Kelseyfi 9557*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_cap_ng_capng_change_id" >&5 9558*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$ac_cv_lib_cap_ng_capng_change_id" >&6; } 9559*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_lib_cap_ng_capng_change_id" = xyes 9560*0a7e5f1fSJoseph Mingronethen : 9561*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_LIBCAP_NG 1" >>confdefs.h 95628bdc5a62SPatrick Kelsey 95638bdc5a62SPatrick Kelsey LIBS="-lcap-ng $LIBS" 95648bdc5a62SPatrick Kelsey 95658bdc5a62SPatrick Kelseyfi 95668bdc5a62SPatrick Kelsey 9567*0a7e5f1fSJoseph Mingrone ac_fn_c_check_header_compile "$LINENO" "cap-ng.h" "ac_cv_header_cap_ng_h" "$ac_includes_default" 9568*0a7e5f1fSJoseph Mingroneif test "x$ac_cv_header_cap_ng_h" = xyes 9569*0a7e5f1fSJoseph Mingronethen : 9570*0a7e5f1fSJoseph Mingrone printf "%s\n" "#define HAVE_CAP_NG_H 1" >>confdefs.h 95718bdc5a62SPatrick Kelsey 95728bdc5a62SPatrick Kelseyfi 95738bdc5a62SPatrick Kelsey 95748bdc5a62SPatrick Kelseyfi 95758bdc5a62SPatrick Kelsey 95761de50e9fSSam Lefflerif test "$missing_includes" = "yes"; then 9577cac3dcd5SXin LI CPPFLAGS="$CPPFLAGS -I$srcdir/missing" 9578cac3dcd5SXin LI V_INCLS="$V_INCLS -I$srcdir/missing" 95791de50e9fSSam Lefflerfi 95801de50e9fSSam Leffler 9581685295f4SBill Fenner 9582b0453382SBill Fenner 9583b0453382SBill Fenner 95844edb46e9SPaul Traina 95854edb46e9SPaul Traina 95864edb46e9SPaul Traina 95874edb46e9SPaul Traina 958827df3f5dSRui Paulo 958927df3f5dSRui Paulo 95904edb46e9SPaul Traina # Find a good install program. We prefer a C program (faster), 95914edb46e9SPaul Traina# so one script is as good as another. But avoid the broken or 95924edb46e9SPaul Traina# incompatible versions: 95934edb46e9SPaul Traina# SysV /etc/install, /usr/sbin/install 95944edb46e9SPaul Traina# SunOS /usr/etc/install 95954edb46e9SPaul Traina# IRIX /sbin/install 95964edb46e9SPaul Traina# AIX /bin/install 95975b0fe478SBruce M Simpson# AmigaOS /C/install, which installs bootblocks on floppy discs 9598b0453382SBill Fenner# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag 95994edb46e9SPaul Traina# AFS /usr/afsws/bin/install, which mishandles nonexistent args 96004edb46e9SPaul Traina# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" 9601b5bfcb5dSMax Laier# OS/2's system install, which has a completely different semantic 96024edb46e9SPaul Traina# ./install, which can be erroneously created by make from ./install.sh. 9603d03c0883SXin LI# Reject install programs that cannot install multiple files. 9604*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 9605*0a7e5f1fSJoseph Mingroneprintf %s "checking for a BSD-compatible install... " >&6; } 96064edb46e9SPaul Trainaif test -z "$INSTALL"; then 9607*0a7e5f1fSJoseph Mingroneif test ${ac_cv_path_install+y} 9608*0a7e5f1fSJoseph Mingronethen : 9609*0a7e5f1fSJoseph Mingrone printf %s "(cached) " >&6 9610*0a7e5f1fSJoseph Mingroneelse $as_nop 96115b0fe478SBruce M Simpson as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 96125b0fe478SBruce M Simpsonfor as_dir in $PATH 96135b0fe478SBruce M Simpsondo 96145b0fe478SBruce M Simpson IFS=$as_save_IFS 9615*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 9616*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 9617*0a7e5f1fSJoseph Mingrone */) ;; 9618*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 9619*0a7e5f1fSJoseph Mingrone esac 9620*0a7e5f1fSJoseph Mingrone # Account for fact that we put trailing slashes in our PATH walk. 9621*0a7e5f1fSJoseph Mingronecase $as_dir in #(( 9622*0a7e5f1fSJoseph Mingrone ./ | /[cC]/* | \ 96235b0fe478SBruce M Simpson /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ 9624d03c0883SXin LI ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ 96255b0fe478SBruce M Simpson /usr/ucb/* ) ;; 96264edb46e9SPaul Traina *) 96274edb46e9SPaul Traina # OSF1 and SCO ODT 3.0 have their own names for install. 9628b0453382SBill Fenner # Don't use installbsd from OSF since it installs stuff as root 9629b0453382SBill Fenner # by default. 9630b0453382SBill Fenner for ac_prog in ginstall scoinst install; do 96315b0fe478SBruce M Simpson for ac_exec_ext in '' $ac_executable_extensions; do 9632*0a7e5f1fSJoseph Mingrone if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then 96334edb46e9SPaul Traina if test $ac_prog = install && 9634*0a7e5f1fSJoseph Mingrone grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 96354edb46e9SPaul Traina # AIX install. It has an incompatible calling convention. 96364edb46e9SPaul Traina : 96375b0fe478SBruce M Simpson elif test $ac_prog = install && 9638*0a7e5f1fSJoseph Mingrone grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 96395b0fe478SBruce M Simpson # program-specific install script used by HP pwplus--don't use. 96405b0fe478SBruce M Simpson : 96414edb46e9SPaul Traina else 9642d03c0883SXin LI rm -rf conftest.one conftest.two conftest.dir 9643d03c0883SXin LI echo one > conftest.one 9644d03c0883SXin LI echo two > conftest.two 9645d03c0883SXin LI mkdir conftest.dir 9646*0a7e5f1fSJoseph Mingrone if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && 9647d03c0883SXin LI test -s conftest.one && test -s conftest.two && 9648d03c0883SXin LI test -s conftest.dir/conftest.one && 9649d03c0883SXin LI test -s conftest.dir/conftest.two 9650d03c0883SXin LI then 9651*0a7e5f1fSJoseph Mingrone ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" 96525b0fe478SBruce M Simpson break 3 96534edb46e9SPaul Traina fi 96544edb46e9SPaul Traina fi 9655d03c0883SXin LI fi 96564edb46e9SPaul Traina done 96575b0fe478SBruce M Simpson done 96584edb46e9SPaul Traina ;; 96594edb46e9SPaul Trainaesac 9660d03c0883SXin LI 96614edb46e9SPaul Traina done 9662b5bfcb5dSMax LaierIFS=$as_save_IFS 96635b0fe478SBruce M Simpson 9664d03c0883SXin LIrm -rf conftest.one conftest.two conftest.dir 96654edb46e9SPaul Traina 96664edb46e9SPaul Trainafi 9667*0a7e5f1fSJoseph Mingrone if test ${ac_cv_path_install+y}; then 96685b0fe478SBruce M Simpson INSTALL=$ac_cv_path_install 96694edb46e9SPaul Traina else 9670b5bfcb5dSMax Laier # As a last resort, use the slow shell script. Don't cache a 9671b5bfcb5dSMax Laier # value for INSTALL within a source directory, because that will 96724edb46e9SPaul Traina # break other packages using the cache if that directory is 9673b5bfcb5dSMax Laier # removed, or if the value is a relative name. 96745b0fe478SBruce M Simpson INSTALL=$ac_install_sh 96754edb46e9SPaul Traina fi 96764edb46e9SPaul Trainafi 9677*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 9678*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$INSTALL" >&6; } 96794edb46e9SPaul Traina 96804edb46e9SPaul Traina# Use test -z because SunOS4 sh mishandles braces in ${var-val}. 96814edb46e9SPaul Traina# It thinks the first close brace ends the variable substitution. 96824edb46e9SPaul Trainatest -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' 96834edb46e9SPaul Traina 96845b0fe478SBruce M Simpsontest -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' 9685b0453382SBill Fenner 96864edb46e9SPaul Trainatest -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 96874edb46e9SPaul Traina 96884edb46e9SPaul Traina 96895b0fe478SBruce M Simpsonac_config_headers="$ac_config_headers config.h" 9690b0453382SBill Fenner 9691b0453382SBill Fenner 9692*0a7e5f1fSJoseph Mingroneac_config_commands="$ac_config_commands .devel" 9693685295f4SBill Fenner 969427df3f5dSRui Pauloac_config_files="$ac_config_files Makefile tcpdump.1" 9695b5bfcb5dSMax Laier 96965b0fe478SBruce M Simpsoncat >confcache <<\_ACEOF 96974edb46e9SPaul Traina# This file is a shell script that caches the results of configure 96984edb46e9SPaul Traina# tests run on this system so they can be shared between configure 96995b0fe478SBruce M Simpson# scripts and configure runs, see configure's option --config-cache. 97005b0fe478SBruce M Simpson# It is not useful on other systems. If it contains results you don't 97015b0fe478SBruce M Simpson# want to keep, you may remove or edit it. 97024edb46e9SPaul Traina# 97035b0fe478SBruce M Simpson# config.status only pays attention to the cache file if you give it 97045b0fe478SBruce M Simpson# the --recheck option to rerun configure. 97054edb46e9SPaul Traina# 97065b0fe478SBruce M Simpson# `ac_cv_env_foo' variables (set or unset) will be overridden when 97075b0fe478SBruce M Simpson# loading this file, other *unset* `ac_cv_foo' will be assigned the 97085b0fe478SBruce M Simpson# following values. 97095b0fe478SBruce M Simpson 97105b0fe478SBruce M Simpson_ACEOF 97115b0fe478SBruce M Simpson 97124de76e31SBill Fenner# The following way of writing the cache mishandles newlines in values, 97134de76e31SBill Fenner# but we know of no workaround that is simple, portable, and efficient. 9714b5bfcb5dSMax Laier# So, we kill variables containing newlines. 97154edb46e9SPaul Traina# Ultrix sh set writes to stderr and can't be redirected directly, 97164edb46e9SPaul Traina# and sets the high bit in the cache file unless we assign to the vars. 9717b5bfcb5dSMax Laier( 9718b5bfcb5dSMax Laier for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do 9719b5bfcb5dSMax Laier eval ac_val=\$$ac_var 9720b5bfcb5dSMax Laier case $ac_val in #( 9721b5bfcb5dSMax Laier *${as_nl}*) 9722b5bfcb5dSMax Laier case $ac_var in #( 9723*0a7e5f1fSJoseph Mingrone *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 9724*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 9725b5bfcb5dSMax Laier esac 9726b5bfcb5dSMax Laier case $ac_var in #( 9727b5bfcb5dSMax Laier _ | IFS | as_nl) ;; #( 9728d03c0883SXin LI BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 9729d03c0883SXin LI *) { eval $ac_var=; unset $ac_var;} ;; 9730b5bfcb5dSMax Laier esac ;; 9731b5bfcb5dSMax Laier esac 9732b5bfcb5dSMax Laier done 9733b5bfcb5dSMax Laier 97344edb46e9SPaul Traina (set) 2>&1 | 9735b5bfcb5dSMax Laier case $as_nl`(ac_space=' '; set) 2>&1` in #( 9736b5bfcb5dSMax Laier *${as_nl}ac_space=\ *) 9737d03c0883SXin LI # `set' does not quote correctly, so add quotes: double-quote 9738d03c0883SXin LI # substitution turns \\\\ into \\, and sed turns \\ into \. 97394de76e31SBill Fenner sed -n \ 97405b0fe478SBruce M Simpson "s/'/'\\\\''/g; 97415b0fe478SBruce M Simpson s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 9742b5bfcb5dSMax Laier ;; #( 97434de76e31SBill Fenner *) 97444de76e31SBill Fenner # `set' quotes correctly as required by POSIX, so do not add quotes. 9745b5bfcb5dSMax Laier sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 97464de76e31SBill Fenner ;; 9747b5bfcb5dSMax Laier esac | 9748b5bfcb5dSMax Laier sort 9749b5bfcb5dSMax Laier) | 97505b0fe478SBruce M Simpson sed ' 9751b5bfcb5dSMax Laier /^ac_cv_env_/b end 97525b0fe478SBruce M Simpson t clear 97535b0fe478SBruce M Simpson :clear 9754*0a7e5f1fSJoseph Mingrone s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ 97555b0fe478SBruce M Simpson t end 9756b5bfcb5dSMax Laier s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 97575b0fe478SBruce M Simpson :end' >>confcache 9758b5bfcb5dSMax Laierif diff "$cache_file" confcache >/dev/null 2>&1; then :; else 9759b5bfcb5dSMax Laier if test -w "$cache_file"; then 9760d03c0883SXin LI if test "x$cache_file" != "x/dev/null"; then 9761*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 9762*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: updating cache $cache_file" >&6;} 9763d03c0883SXin LI if test ! -f "$cache_file" || test -h "$cache_file"; then 9764d03c0883SXin LI cat confcache >"$cache_file" 97654edb46e9SPaul Traina else 9766d03c0883SXin LI case $cache_file in #( 9767d03c0883SXin LI */* | ?:*) 9768d03c0883SXin LI mv -f confcache "$cache_file"$$ && 9769d03c0883SXin LI mv -f "$cache_file"$$ "$cache_file" ;; #( 9770d03c0883SXin LI *) 9771d03c0883SXin LI mv -f confcache "$cache_file" ;; 9772d03c0883SXin LI esac 9773d03c0883SXin LI fi 9774d03c0883SXin LI fi 9775d03c0883SXin LI else 9776*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 9777*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} 97784edb46e9SPaul Traina fi 97794edb46e9SPaul Trainafi 97804edb46e9SPaul Trainarm -f confcache 97814edb46e9SPaul Traina 97824edb46e9SPaul Trainatest "x$prefix" = xNONE && prefix=$ac_default_prefix 97834edb46e9SPaul Traina# Let make expand exec_prefix. 97844edb46e9SPaul Trainatest "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 97854edb46e9SPaul Traina 9786b0453382SBill FennerDEFS=-DHAVE_CONFIG_H 97874edb46e9SPaul Traina 97885b0fe478SBruce M Simpsonac_libobjs= 97895b0fe478SBruce M Simpsonac_ltlibobjs= 9790d03c0883SXin LIU= 97915b0fe478SBruce M Simpsonfor ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 97925b0fe478SBruce M Simpson # 1. Remove the extension, and $U if already installed. 9793b5bfcb5dSMax Laier ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 9794*0a7e5f1fSJoseph Mingrone ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` 9795b5bfcb5dSMax Laier # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 9796b5bfcb5dSMax Laier # will be set to the directory where LIBOBJS objects are built. 9797d03c0883SXin LI as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" 9798d03c0883SXin LI as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' 97995b0fe478SBruce M Simpsondone 98005b0fe478SBruce M SimpsonLIBOBJS=$ac_libobjs 98015b0fe478SBruce M Simpson 98025b0fe478SBruce M SimpsonLTLIBOBJS=$ac_ltlibobjs 98035b0fe478SBruce M Simpson 98045b0fe478SBruce M Simpson 98055b0fe478SBruce M Simpson 9806d03c0883SXin LI: "${CONFIG_STATUS=./config.status}" 9807d03c0883SXin LIac_write_fail=0 98085b0fe478SBruce M Simpsonac_clean_files_save=$ac_clean_files 98095b0fe478SBruce M Simpsonac_clean_files="$ac_clean_files $CONFIG_STATUS" 9810*0a7e5f1fSJoseph Mingrone{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 9811*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} 9812d03c0883SXin LIas_write_fail=0 9813d03c0883SXin LIcat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 98145b0fe478SBruce M Simpson#! $SHELL 98155b0fe478SBruce M Simpson# Generated by $as_me. 98164edb46e9SPaul Traina# Run this file to recreate the current configuration. 98174edb46e9SPaul Traina# Compiler output produced by configure, useful for debugging 98185b0fe478SBruce M Simpson# configure, is in config.log if it exists. 98194edb46e9SPaul Traina 98205b0fe478SBruce M Simpsondebug=false 98215b0fe478SBruce M Simpsonac_cs_recheck=false 98225b0fe478SBruce M Simpsonac_cs_silent=false 98235b0fe478SBruce M Simpson 9824d03c0883SXin LISHELL=\${CONFIG_SHELL-$SHELL} 9825d03c0883SXin LIexport SHELL 9826d03c0883SXin LI_ASEOF 9827d03c0883SXin LIcat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 9828d03c0883SXin LI## -------------------- ## 98295b0fe478SBruce M Simpson## M4sh Initialization. ## 9830d03c0883SXin LI## -------------------- ## 98315b0fe478SBruce M Simpson 9832b5bfcb5dSMax Laier# Be more Bourne compatible 9833b5bfcb5dSMax LaierDUALCASE=1; export DUALCASE # for MKS sh 9834*0a7e5f1fSJoseph Mingroneas_nop=: 9835*0a7e5f1fSJoseph Mingroneif test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 9836*0a7e5f1fSJoseph Mingronethen : 98375b0fe478SBruce M Simpson emulate sh 98385b0fe478SBruce M Simpson NULLCMD=: 9839d03c0883SXin LI # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 98405b0fe478SBruce M Simpson # is contrary to our usage. Disable this feature. 98415b0fe478SBruce M Simpson alias -g '${1+"$@"}'='"$@"' 9842b5bfcb5dSMax Laier setopt NO_GLOB_SUBST 9843*0a7e5f1fSJoseph Mingroneelse $as_nop 9844d03c0883SXin LI case `(set -o) 2>/dev/null` in #( 9845d03c0883SXin LI *posix*) : 9846d03c0883SXin LI set -o posix ;; #( 9847d03c0883SXin LI *) : 9848d03c0883SXin LI ;; 9849b5bfcb5dSMax Laieresac 98505b0fe478SBruce M Simpsonfi 98515b0fe478SBruce M Simpson 98525b0fe478SBruce M Simpson 9853*0a7e5f1fSJoseph Mingrone 9854*0a7e5f1fSJoseph Mingrone# Reset variables that may have inherited troublesome values from 9855*0a7e5f1fSJoseph Mingrone# the environment. 9856*0a7e5f1fSJoseph Mingrone 9857*0a7e5f1fSJoseph Mingrone# IFS needs to be set, to space, tab, and newline, in precisely that order. 9858*0a7e5f1fSJoseph Mingrone# (If _AS_PATH_WALK were called with IFS unset, it would have the 9859*0a7e5f1fSJoseph Mingrone# side effect of setting IFS to empty, thus disabling word splitting.) 9860*0a7e5f1fSJoseph Mingrone# Quoting is to prevent editors from complaining about space-tab. 9861d03c0883SXin LIas_nl=' 9862d03c0883SXin LI' 9863d03c0883SXin LIexport as_nl 9864*0a7e5f1fSJoseph MingroneIFS=" "" $as_nl" 9865*0a7e5f1fSJoseph Mingrone 9866*0a7e5f1fSJoseph MingronePS1='$ ' 9867*0a7e5f1fSJoseph MingronePS2='> ' 9868*0a7e5f1fSJoseph MingronePS4='+ ' 9869*0a7e5f1fSJoseph Mingrone 9870*0a7e5f1fSJoseph Mingrone# Ensure predictable behavior from utilities with locale-dependent output. 9871*0a7e5f1fSJoseph MingroneLC_ALL=C 9872*0a7e5f1fSJoseph Mingroneexport LC_ALL 9873*0a7e5f1fSJoseph MingroneLANGUAGE=C 9874*0a7e5f1fSJoseph Mingroneexport LANGUAGE 9875*0a7e5f1fSJoseph Mingrone 9876*0a7e5f1fSJoseph Mingrone# We cannot yet rely on "unset" to work, but we need these variables 9877*0a7e5f1fSJoseph Mingrone# to be unset--not just set to an empty or harmless value--now, to 9878*0a7e5f1fSJoseph Mingrone# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct 9879*0a7e5f1fSJoseph Mingrone# also avoids known problems related to "unset" and subshell syntax 9880*0a7e5f1fSJoseph Mingrone# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). 9881*0a7e5f1fSJoseph Mingronefor as_var in BASH_ENV ENV MAIL MAILPATH CDPATH 9882*0a7e5f1fSJoseph Mingronedo eval test \${$as_var+y} \ 9883*0a7e5f1fSJoseph Mingrone && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 9884*0a7e5f1fSJoseph Mingronedone 9885*0a7e5f1fSJoseph Mingrone 9886*0a7e5f1fSJoseph Mingrone# Ensure that fds 0, 1, and 2 are open. 9887*0a7e5f1fSJoseph Mingroneif (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi 9888*0a7e5f1fSJoseph Mingroneif (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi 9889*0a7e5f1fSJoseph Mingroneif (exec 3>&2) ; then :; else exec 2>/dev/null; fi 98905b0fe478SBruce M Simpson 98915b0fe478SBruce M Simpson# The user is always right. 9892*0a7e5f1fSJoseph Mingroneif ${PATH_SEPARATOR+false} :; then 98935b0fe478SBruce M Simpson PATH_SEPARATOR=: 9894d03c0883SXin LI (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 9895d03c0883SXin LI (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 9896d03c0883SXin LI PATH_SEPARATOR=';' 9897d03c0883SXin LI } 9898b5bfcb5dSMax Laierfi 98995b0fe478SBruce M Simpson 9900b5bfcb5dSMax Laier 9901b5bfcb5dSMax Laier# Find who we are. Look in the path if we contain no directory separator. 9902d03c0883SXin LIas_myself= 9903d03c0883SXin LIcase $0 in #(( 99045b0fe478SBruce M Simpson *[\\/]* ) as_myself=$0 ;; 99055b0fe478SBruce M Simpson *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 99065b0fe478SBruce M Simpsonfor as_dir in $PATH 99075b0fe478SBruce M Simpsondo 99085b0fe478SBruce M Simpson IFS=$as_save_IFS 9909*0a7e5f1fSJoseph Mingrone case $as_dir in #((( 9910*0a7e5f1fSJoseph Mingrone '') as_dir=./ ;; 9911*0a7e5f1fSJoseph Mingrone */) ;; 9912*0a7e5f1fSJoseph Mingrone *) as_dir=$as_dir/ ;; 9913*0a7e5f1fSJoseph Mingrone esac 9914*0a7e5f1fSJoseph Mingrone test -r "$as_dir$0" && as_myself=$as_dir$0 && break 99155b0fe478SBruce M Simpson done 9916b5bfcb5dSMax LaierIFS=$as_save_IFS 99175b0fe478SBruce M Simpson 99185b0fe478SBruce M Simpson ;; 99195b0fe478SBruce M Simpsonesac 99205b0fe478SBruce M Simpson# We did not find ourselves, most probably we were run as `sh COMMAND' 99215b0fe478SBruce M Simpson# in which case we are not to be found in the path. 99225b0fe478SBruce M Simpsonif test "x$as_myself" = x; then 99235b0fe478SBruce M Simpson as_myself=$0 99245b0fe478SBruce M Simpsonfi 99255b0fe478SBruce M Simpsonif test ! -f "$as_myself"; then 9926*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 9927d03c0883SXin LI exit 1 99285b0fe478SBruce M Simpsonfi 9929b5bfcb5dSMax Laier 9930d03c0883SXin LI 9931d03c0883SXin LI 9932d03c0883SXin LI# as_fn_error STATUS ERROR [LINENO LOG_FD] 9933d03c0883SXin LI# ---------------------------------------- 9934d03c0883SXin LI# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 9935d03c0883SXin LI# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 9936d03c0883SXin LI# script with STATUS, using 1 if that was 0. 9937d03c0883SXin LIas_fn_error () 9938d03c0883SXin LI{ 9939d03c0883SXin LI as_status=$1; test $as_status -eq 0 && as_status=1 9940d03c0883SXin LI if test "$4"; then 9941d03c0883SXin LI as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 9942*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 9943d03c0883SXin LI fi 9944*0a7e5f1fSJoseph Mingrone printf "%s\n" "$as_me: error: $2" >&2 9945d03c0883SXin LI as_fn_exit $as_status 9946d03c0883SXin LI} # as_fn_error 9947d03c0883SXin LI 9948d03c0883SXin LI 9949*0a7e5f1fSJoseph Mingrone 9950d03c0883SXin LI# as_fn_set_status STATUS 9951d03c0883SXin LI# ----------------------- 9952d03c0883SXin LI# Set $? to STATUS, without forking. 9953d03c0883SXin LIas_fn_set_status () 9954d03c0883SXin LI{ 9955d03c0883SXin LI return $1 9956d03c0883SXin LI} # as_fn_set_status 9957d03c0883SXin LI 9958d03c0883SXin LI# as_fn_exit STATUS 9959d03c0883SXin LI# ----------------- 9960d03c0883SXin LI# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 9961d03c0883SXin LIas_fn_exit () 9962d03c0883SXin LI{ 9963d03c0883SXin LI set +e 9964d03c0883SXin LI as_fn_set_status $1 9965d03c0883SXin LI exit $1 9966d03c0883SXin LI} # as_fn_exit 9967d03c0883SXin LI 9968d03c0883SXin LI# as_fn_unset VAR 9969d03c0883SXin LI# --------------- 9970d03c0883SXin LI# Portably unset VAR. 9971d03c0883SXin LIas_fn_unset () 9972d03c0883SXin LI{ 9973d03c0883SXin LI { eval $1=; unset $1;} 9974d03c0883SXin LI} 9975d03c0883SXin LIas_unset=as_fn_unset 9976*0a7e5f1fSJoseph Mingrone 9977d03c0883SXin LI# as_fn_append VAR VALUE 9978d03c0883SXin LI# ---------------------- 9979d03c0883SXin LI# Append the text in VALUE to the end of the definition contained in VAR. Take 9980d03c0883SXin LI# advantage of any shell optimizations that allow amortized linear growth over 9981d03c0883SXin LI# repeated appends, instead of the typical quadratic growth present in naive 9982d03c0883SXin LI# implementations. 9983*0a7e5f1fSJoseph Mingroneif (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null 9984*0a7e5f1fSJoseph Mingronethen : 9985d03c0883SXin LI eval 'as_fn_append () 9986d03c0883SXin LI { 9987d03c0883SXin LI eval $1+=\$2 9988d03c0883SXin LI }' 9989*0a7e5f1fSJoseph Mingroneelse $as_nop 9990d03c0883SXin LI as_fn_append () 9991d03c0883SXin LI { 9992d03c0883SXin LI eval $1=\$$1\$2 9993d03c0883SXin LI } 9994d03c0883SXin LIfi # as_fn_append 9995d03c0883SXin LI 9996d03c0883SXin LI# as_fn_arith ARG... 9997d03c0883SXin LI# ------------------ 9998d03c0883SXin LI# Perform arithmetic evaluation on the ARGs, and store the result in the 9999d03c0883SXin LI# global $as_val. Take advantage of shells that can avoid forks. The arguments 10000d03c0883SXin LI# must be portable across $(()) and expr. 10001*0a7e5f1fSJoseph Mingroneif (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null 10002*0a7e5f1fSJoseph Mingronethen : 10003d03c0883SXin LI eval 'as_fn_arith () 10004d03c0883SXin LI { 10005d03c0883SXin LI as_val=$(( $* )) 10006d03c0883SXin LI }' 10007*0a7e5f1fSJoseph Mingroneelse $as_nop 10008d03c0883SXin LI as_fn_arith () 10009d03c0883SXin LI { 10010d03c0883SXin LI as_val=`expr "$@" || test $? -eq 1` 10011d03c0883SXin LI } 10012d03c0883SXin LIfi # as_fn_arith 10013d03c0883SXin LI 10014d03c0883SXin LI 10015b5bfcb5dSMax Laierif expr a : '\(a\)' >/dev/null 2>&1 && 10016b5bfcb5dSMax Laier test "X`expr 00001 : '.*\(...\)'`" = X001; then 10017b5bfcb5dSMax Laier as_expr=expr 10018b5bfcb5dSMax Laierelse 10019b5bfcb5dSMax Laier as_expr=false 10020b5bfcb5dSMax Laierfi 10021b5bfcb5dSMax Laier 10022b5bfcb5dSMax Laierif (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 10023b5bfcb5dSMax Laier as_basename=basename 10024b5bfcb5dSMax Laierelse 10025b5bfcb5dSMax Laier as_basename=false 10026b5bfcb5dSMax Laierfi 10027b5bfcb5dSMax Laier 10028d03c0883SXin LIif (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 10029d03c0883SXin LI as_dirname=dirname 10030d03c0883SXin LIelse 10031d03c0883SXin LI as_dirname=false 10032d03c0883SXin LIfi 10033b5bfcb5dSMax Laier 10034b5bfcb5dSMax Laieras_me=`$as_basename -- "$0" || 10035b5bfcb5dSMax Laier$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 10036b5bfcb5dSMax Laier X"$0" : 'X\(//\)$' \| \ 10037b5bfcb5dSMax Laier X"$0" : 'X\(/\)' \| . 2>/dev/null || 10038*0a7e5f1fSJoseph Mingroneprintf "%s\n" X/"$0" | 10039b5bfcb5dSMax Laier sed '/^.*\/\([^/][^/]*\)\/*$/{ 10040b5bfcb5dSMax Laier s//\1/ 10041b5bfcb5dSMax Laier q 10042b5bfcb5dSMax Laier } 10043b5bfcb5dSMax Laier /^X\/\(\/\/\)$/{ 10044b5bfcb5dSMax Laier s//\1/ 10045b5bfcb5dSMax Laier q 10046b5bfcb5dSMax Laier } 10047b5bfcb5dSMax Laier /^X\/\(\/\).*/{ 10048b5bfcb5dSMax Laier s//\1/ 10049b5bfcb5dSMax Laier q 10050b5bfcb5dSMax Laier } 10051b5bfcb5dSMax Laier s/.*/./; q'` 10052b5bfcb5dSMax Laier 10053d03c0883SXin LI# Avoid depending upon Character Ranges. 10054d03c0883SXin LIas_cr_letters='abcdefghijklmnopqrstuvwxyz' 10055d03c0883SXin LIas_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 10056d03c0883SXin LIas_cr_Letters=$as_cr_letters$as_cr_LETTERS 10057d03c0883SXin LIas_cr_digits='0123456789' 10058d03c0883SXin LIas_cr_alnum=$as_cr_Letters$as_cr_digits 10059b5bfcb5dSMax Laier 10060*0a7e5f1fSJoseph Mingrone 10061*0a7e5f1fSJoseph Mingrone# Determine whether it's possible to make 'echo' print without a newline. 10062*0a7e5f1fSJoseph Mingrone# These variables are no longer used directly by Autoconf, but are AC_SUBSTed 10063*0a7e5f1fSJoseph Mingrone# for compatibility with existing Makefiles. 10064b5bfcb5dSMax LaierECHO_C= ECHO_N= ECHO_T= 10065d03c0883SXin LIcase `echo -n x` in #((((( 10066b5bfcb5dSMax Laier-n*) 10067d03c0883SXin LI case `echo 'xy\c'` in 10068b5bfcb5dSMax Laier *c*) ECHO_T=' ';; # ECHO_T is single tab character. 10069d03c0883SXin LI xy) ECHO_C='\c';; 10070d03c0883SXin LI *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 10071d03c0883SXin LI ECHO_T=' ';; 10072b5bfcb5dSMax Laier esac;; 10073b5bfcb5dSMax Laier*) 10074b5bfcb5dSMax Laier ECHO_N='-n';; 100755b0fe478SBruce M Simpsonesac 100765b0fe478SBruce M Simpson 10077*0a7e5f1fSJoseph Mingrone# For backward compatibility with old third-party macros, we provide 10078*0a7e5f1fSJoseph Mingrone# the shell variables $as_echo and $as_echo_n. New code should use 10079*0a7e5f1fSJoseph Mingrone# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. 10080*0a7e5f1fSJoseph Mingroneas_echo='printf %s\n' 10081*0a7e5f1fSJoseph Mingroneas_echo_n='printf %s' 10082*0a7e5f1fSJoseph Mingrone 100835b0fe478SBruce M Simpsonrm -f conf$$ conf$$.exe conf$$.file 10084b5bfcb5dSMax Laierif test -d conf$$.dir; then 10085b5bfcb5dSMax Laier rm -f conf$$.dir/conf$$.file 10086b5bfcb5dSMax Laierelse 10087b5bfcb5dSMax Laier rm -f conf$$.dir 10088d03c0883SXin LI mkdir conf$$.dir 2>/dev/null 10089b5bfcb5dSMax Laierfi 10090d03c0883SXin LIif (echo >conf$$.file) 2>/dev/null; then 100915b0fe478SBruce M Simpson if ln -s conf$$.file conf$$ 2>/dev/null; then 100925b0fe478SBruce M Simpson as_ln_s='ln -s' 10093b5bfcb5dSMax Laier # ... but there are two gotchas: 10094b5bfcb5dSMax Laier # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 10095b5bfcb5dSMax Laier # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 100963c602fabSXin LI # In both cases, we have to default to `cp -pR'. 10097b5bfcb5dSMax Laier ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 100983c602fabSXin LI as_ln_s='cp -pR' 100995b0fe478SBruce M Simpson elif ln conf$$.file conf$$ 2>/dev/null; then 101005b0fe478SBruce M Simpson as_ln_s=ln 101015b0fe478SBruce M Simpson else 101023c602fabSXin LI as_ln_s='cp -pR' 101035b0fe478SBruce M Simpson fi 10104d03c0883SXin LIelse 101053c602fabSXin LI as_ln_s='cp -pR' 10106d03c0883SXin LIfi 10107b5bfcb5dSMax Laierrm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 10108b5bfcb5dSMax Laierrmdir conf$$.dir 2>/dev/null 101095b0fe478SBruce M Simpson 10110d03c0883SXin LI 10111d03c0883SXin LI# as_fn_mkdir_p 10112d03c0883SXin LI# ------------- 10113d03c0883SXin LI# Create "$as_dir" as a directory, including parents if necessary. 10114d03c0883SXin LIas_fn_mkdir_p () 10115d03c0883SXin LI{ 10116d03c0883SXin LI 10117d03c0883SXin LI case $as_dir in #( 10118d03c0883SXin LI -*) as_dir=./$as_dir;; 10119d03c0883SXin LI esac 10120d03c0883SXin LI test -d "$as_dir" || eval $as_mkdir_p || { 10121d03c0883SXin LI as_dirs= 10122d03c0883SXin LI while :; do 10123d03c0883SXin LI case $as_dir in #( 10124*0a7e5f1fSJoseph Mingrone *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 10125d03c0883SXin LI *) as_qdir=$as_dir;; 10126d03c0883SXin LI esac 10127d03c0883SXin LI as_dirs="'$as_qdir' $as_dirs" 10128d03c0883SXin LI as_dir=`$as_dirname -- "$as_dir" || 10129d03c0883SXin LI$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 10130d03c0883SXin LI X"$as_dir" : 'X\(//\)[^/]' \| \ 10131d03c0883SXin LI X"$as_dir" : 'X\(//\)$' \| \ 10132d03c0883SXin LI X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 10133*0a7e5f1fSJoseph Mingroneprintf "%s\n" X"$as_dir" | 10134d03c0883SXin LI sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 10135d03c0883SXin LI s//\1/ 10136d03c0883SXin LI q 10137d03c0883SXin LI } 10138d03c0883SXin LI /^X\(\/\/\)[^/].*/{ 10139d03c0883SXin LI s//\1/ 10140d03c0883SXin LI q 10141d03c0883SXin LI } 10142d03c0883SXin LI /^X\(\/\/\)$/{ 10143d03c0883SXin LI s//\1/ 10144d03c0883SXin LI q 10145d03c0883SXin LI } 10146d03c0883SXin LI /^X\(\/\).*/{ 10147d03c0883SXin LI s//\1/ 10148d03c0883SXin LI q 10149d03c0883SXin LI } 10150d03c0883SXin LI s/.*/./; q'` 10151d03c0883SXin LI test -d "$as_dir" && break 10152d03c0883SXin LI done 10153d03c0883SXin LI test -z "$as_dirs" || eval "mkdir $as_dirs" 10154d03c0883SXin LI } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 10155d03c0883SXin LI 10156d03c0883SXin LI 10157d03c0883SXin LI} # as_fn_mkdir_p 101585b0fe478SBruce M Simpsonif mkdir -p . 2>/dev/null; then 10159d03c0883SXin LI as_mkdir_p='mkdir -p "$as_dir"' 101605b0fe478SBruce M Simpsonelse 10161b5bfcb5dSMax Laier test -d ./-p && rmdir ./-p 101625b0fe478SBruce M Simpson as_mkdir_p=false 101635b0fe478SBruce M Simpsonfi 101645b0fe478SBruce M Simpson 101653c602fabSXin LI 101663c602fabSXin LI# as_fn_executable_p FILE 101673c602fabSXin LI# ----------------------- 101683c602fabSXin LI# Test if FILE is an executable regular file. 101693c602fabSXin LIas_fn_executable_p () 101703c602fabSXin LI{ 101713c602fabSXin LI test -f "$1" && test -x "$1" 101723c602fabSXin LI} # as_fn_executable_p 10173b5bfcb5dSMax Laieras_test_x='test -x' 101743c602fabSXin LIas_executable_p=as_fn_executable_p 101755b0fe478SBruce M Simpson 101765b0fe478SBruce M Simpson# Sed expression to map a string onto a valid CPP name. 10177b5bfcb5dSMax Laieras_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 101785b0fe478SBruce M Simpson 101795b0fe478SBruce M Simpson# Sed expression to map a string onto a valid variable name. 10180b5bfcb5dSMax Laieras_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 101815b0fe478SBruce M Simpson 101825b0fe478SBruce M Simpson 101835b0fe478SBruce M Simpsonexec 6>&1 10184d03c0883SXin LI## ----------------------------------- ## 10185d03c0883SXin LI## Main body of $CONFIG_STATUS script. ## 10186d03c0883SXin LI## ----------------------------------- ## 10187d03c0883SXin LI_ASEOF 10188d03c0883SXin LItest $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 101895b0fe478SBruce M Simpson 10190d03c0883SXin LIcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 10191d03c0883SXin LI# Save the log message, to keep $0 and so on meaningful, and to 101925b0fe478SBruce M Simpson# report actual input values of CONFIG_FILES etc. instead of their 10193b5bfcb5dSMax Laier# values after options handling. 10194b5bfcb5dSMax Laierac_log=" 10195*0a7e5f1fSJoseph MingroneThis file was extended by tcpdump $as_me 4.99.5, which was 10196*0a7e5f1fSJoseph Mingronegenerated by GNU Autoconf 2.71. Invocation command line was 101975b0fe478SBruce M Simpson 101985b0fe478SBruce M Simpson CONFIG_FILES = $CONFIG_FILES 101995b0fe478SBruce M Simpson CONFIG_HEADERS = $CONFIG_HEADERS 102005b0fe478SBruce M Simpson CONFIG_LINKS = $CONFIG_LINKS 102015b0fe478SBruce M Simpson CONFIG_COMMANDS = $CONFIG_COMMANDS 102025b0fe478SBruce M Simpson $ $0 $@ 102035b0fe478SBruce M Simpson 10204b5bfcb5dSMax Laieron `(hostname || uname -n) 2>/dev/null | sed 1q` 10205b5bfcb5dSMax Laier" 10206b5bfcb5dSMax Laier 102075b0fe478SBruce M Simpson_ACEOF 102085b0fe478SBruce M Simpson 10209d03c0883SXin LIcase $ac_config_files in *" 10210d03c0883SXin LI"*) set x $ac_config_files; shift; ac_config_files=$*;; 10211d03c0883SXin LIesac 10212d03c0883SXin LI 10213d03c0883SXin LIcase $ac_config_headers in *" 10214d03c0883SXin LI"*) set x $ac_config_headers; shift; ac_config_headers=$*;; 10215d03c0883SXin LIesac 10216d03c0883SXin LI 10217d03c0883SXin LI 10218d03c0883SXin LIcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 102195b0fe478SBruce M Simpson# Files that config.status was made for. 10220b5bfcb5dSMax Laierconfig_files="$ac_config_files" 10221b5bfcb5dSMax Laierconfig_headers="$ac_config_headers" 10222b5bfcb5dSMax Laierconfig_commands="$ac_config_commands" 102235b0fe478SBruce M Simpson 10224b5bfcb5dSMax Laier_ACEOF 102255b0fe478SBruce M Simpson 10226d03c0883SXin LIcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 102275b0fe478SBruce M Simpsonac_cs_usage="\ 10228d03c0883SXin LI\`$as_me' instantiates files and other configuration actions 10229d03c0883SXin LIfrom templates according to the current configuration. Unless the files 10230d03c0883SXin LIand actions are specified as TAGs, all are instantiated by default. 102315b0fe478SBruce M Simpson 10232d03c0883SXin LIUsage: $0 [OPTION]... [TAG]... 102335b0fe478SBruce M Simpson 102345b0fe478SBruce M Simpson -h, --help print this help, then exit 10235b5bfcb5dSMax Laier -V, --version print version number and configuration settings, then exit 10236d03c0883SXin LI --config print configuration, then exit 10237d03c0883SXin LI -q, --quiet, --silent 10238d03c0883SXin LI do not print progress messages 102395b0fe478SBruce M Simpson -d, --debug don't remove temporary files 102405b0fe478SBruce M Simpson --recheck update $as_me by reconfiguring in the same conditions 102415b0fe478SBruce M Simpson --file=FILE[:TEMPLATE] 102425b0fe478SBruce M Simpson instantiate the configuration file FILE 102435b0fe478SBruce M Simpson --header=FILE[:TEMPLATE] 102445b0fe478SBruce M Simpson instantiate the configuration header FILE 102455b0fe478SBruce M Simpson 102465b0fe478SBruce M SimpsonConfiguration files: 102475b0fe478SBruce M Simpson$config_files 102485b0fe478SBruce M Simpson 102495b0fe478SBruce M SimpsonConfiguration headers: 102505b0fe478SBruce M Simpson$config_headers 102515b0fe478SBruce M Simpson 102525b0fe478SBruce M SimpsonConfiguration commands: 102535b0fe478SBruce M Simpson$config_commands 102545b0fe478SBruce M Simpson 10255d03c0883SXin LIReport bugs to the package provider." 102565b0fe478SBruce M Simpson 10257b5bfcb5dSMax Laier_ACEOF 10258*0a7e5f1fSJoseph Mingroneac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` 10259*0a7e5f1fSJoseph Mingroneac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` 10260d03c0883SXin LIcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 10261*0a7e5f1fSJoseph Mingroneac_cs_config='$ac_cs_config_escaped' 102625b0fe478SBruce M Simpsonac_cs_version="\\ 10263*0a7e5f1fSJoseph Mingronetcpdump config.status 4.99.5 10264*0a7e5f1fSJoseph Mingroneconfigured by $0, generated by GNU Autoconf 2.71, 10265d03c0883SXin LI with options \\"\$ac_cs_config\\" 102665b0fe478SBruce M Simpson 10267*0a7e5f1fSJoseph MingroneCopyright (C) 2021 Free Software Foundation, Inc. 102685b0fe478SBruce M SimpsonThis config.status script is free software; the Free Software Foundation 102695b0fe478SBruce M Simpsongives unlimited permission to copy, distribute and modify it." 10270b5bfcb5dSMax Laier 10271b5bfcb5dSMax Laierac_pwd='$ac_pwd' 10272b5bfcb5dSMax Laiersrcdir='$srcdir' 10273b5bfcb5dSMax LaierINSTALL='$INSTALL' 10274d03c0883SXin LItest -n "\$AWK" || AWK=awk 102755b0fe478SBruce M Simpson_ACEOF 102765b0fe478SBruce M Simpson 10277d03c0883SXin LIcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 10278d03c0883SXin LI# The default lists apply if the user does not specify any file. 102795b0fe478SBruce M Simpsonac_need_defaults=: 102805b0fe478SBruce M Simpsonwhile test $# != 0 102815b0fe478SBruce M Simpsondo 102825b0fe478SBruce M Simpson case $1 in 10283d03c0883SXin LI --*=?*) 10284b5bfcb5dSMax Laier ac_option=`expr "X$1" : 'X\([^=]*\)='` 10285b5bfcb5dSMax Laier ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 102865b0fe478SBruce M Simpson ac_shift=: 102875b0fe478SBruce M Simpson ;; 10288d03c0883SXin LI --*=) 10289d03c0883SXin LI ac_option=`expr "X$1" : 'X\([^=]*\)='` 10290d03c0883SXin LI ac_optarg= 10291d03c0883SXin LI ac_shift=: 10292d03c0883SXin LI ;; 10293b5bfcb5dSMax Laier *) 102945b0fe478SBruce M Simpson ac_option=$1 102955b0fe478SBruce M Simpson ac_optarg=$2 102965b0fe478SBruce M Simpson ac_shift=shift 102975b0fe478SBruce M Simpson ;; 102985b0fe478SBruce M Simpson esac 102995b0fe478SBruce M Simpson 103005b0fe478SBruce M Simpson case $ac_option in 103015b0fe478SBruce M Simpson # Handling of the options. 103024edb46e9SPaul Traina -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 103035b0fe478SBruce M Simpson ac_cs_recheck=: ;; 10304b5bfcb5dSMax Laier --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 10305*0a7e5f1fSJoseph Mingrone printf "%s\n" "$ac_cs_version"; exit ;; 10306d03c0883SXin LI --config | --confi | --conf | --con | --co | --c ) 10307*0a7e5f1fSJoseph Mingrone printf "%s\n" "$ac_cs_config"; exit ;; 10308b5bfcb5dSMax Laier --debug | --debu | --deb | --de | --d | -d ) 103095b0fe478SBruce M Simpson debug=: ;; 103105b0fe478SBruce M Simpson --file | --fil | --fi | --f ) 103115b0fe478SBruce M Simpson $ac_shift 10312d03c0883SXin LI case $ac_optarg in 10313*0a7e5f1fSJoseph Mingrone *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 10314d03c0883SXin LI '') as_fn_error $? "missing file argument" ;; 10315d03c0883SXin LI esac 10316d03c0883SXin LI as_fn_append CONFIG_FILES " '$ac_optarg'" 103175b0fe478SBruce M Simpson ac_need_defaults=false;; 103185b0fe478SBruce M Simpson --header | --heade | --head | --hea ) 103195b0fe478SBruce M Simpson $ac_shift 10320d03c0883SXin LI case $ac_optarg in 10321*0a7e5f1fSJoseph Mingrone *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 10322d03c0883SXin LI esac 10323d03c0883SXin LI as_fn_append CONFIG_HEADERS " '$ac_optarg'" 103245b0fe478SBruce M Simpson ac_need_defaults=false;; 10325b5bfcb5dSMax Laier --he | --h) 10326b5bfcb5dSMax Laier # Conflict between --help and --header 10327d03c0883SXin LI as_fn_error $? "ambiguous option: \`$1' 10328d03c0883SXin LITry \`$0 --help' for more information.";; 10329b5bfcb5dSMax Laier --help | --hel | -h ) 10330*0a7e5f1fSJoseph Mingrone printf "%s\n" "$ac_cs_usage"; exit ;; 103315b0fe478SBruce M Simpson -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 103325b0fe478SBruce M Simpson | -silent | --silent | --silen | --sile | --sil | --si | --s) 103335b0fe478SBruce M Simpson ac_cs_silent=: ;; 103345b0fe478SBruce M Simpson 103355b0fe478SBruce M Simpson # This is an error. 10336d03c0883SXin LI -*) as_fn_error $? "unrecognized option: \`$1' 10337d03c0883SXin LITry \`$0 --help' for more information." ;; 103385b0fe478SBruce M Simpson 10339d03c0883SXin LI *) as_fn_append ac_config_targets " $1" 10340b5bfcb5dSMax Laier ac_need_defaults=false ;; 103415b0fe478SBruce M Simpson 103425b0fe478SBruce M Simpson esac 103435b0fe478SBruce M Simpson shift 103445b0fe478SBruce M Simpsondone 103455b0fe478SBruce M Simpson 103465b0fe478SBruce M Simpsonac_configure_extra_args= 103475b0fe478SBruce M Simpson 103485b0fe478SBruce M Simpsonif $ac_cs_silent; then 103495b0fe478SBruce M Simpson exec 6>/dev/null 103505b0fe478SBruce M Simpson ac_configure_extra_args="$ac_configure_extra_args --silent" 103515b0fe478SBruce M Simpsonfi 103525b0fe478SBruce M Simpson 103535b0fe478SBruce M Simpson_ACEOF 10354d03c0883SXin LIcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 103555b0fe478SBruce M Simpsonif \$ac_cs_recheck; then 103563c602fabSXin LI set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 10357d03c0883SXin LI shift 10358*0a7e5f1fSJoseph Mingrone \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 10359d03c0883SXin LI CONFIG_SHELL='$SHELL' 10360b5bfcb5dSMax Laier export CONFIG_SHELL 10361d03c0883SXin LI exec "\$@" 103625b0fe478SBruce M Simpsonfi 103635b0fe478SBruce M Simpson 103645b0fe478SBruce M Simpson_ACEOF 10365d03c0883SXin LIcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 10366b5bfcb5dSMax Laierexec 5>>config.log 10367b5bfcb5dSMax Laier{ 10368b5bfcb5dSMax Laier echo 10369b5bfcb5dSMax Laier sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 10370b5bfcb5dSMax Laier## Running $as_me. ## 10371b5bfcb5dSMax Laier_ASBOX 10372*0a7e5f1fSJoseph Mingrone printf "%s\n" "$ac_log" 10373b5bfcb5dSMax Laier} >&5 103745b0fe478SBruce M Simpson 10375b5bfcb5dSMax Laier_ACEOF 10376d03c0883SXin LIcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 103775b0fe478SBruce M Simpson# 10378b5bfcb5dSMax Laier# INIT-COMMANDS 103795b0fe478SBruce M Simpson# 103805b0fe478SBruce M Simpson 103815b0fe478SBruce M Simpson 103825b0fe478SBruce M Simpson_ACEOF 103835b0fe478SBruce M Simpson 10384d03c0883SXin LIcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 10385b5bfcb5dSMax Laier 10386b5bfcb5dSMax Laier# Handling of arguments. 103875b0fe478SBruce M Simpsonfor ac_config_target in $ac_config_targets 103885b0fe478SBruce M Simpsondo 10389b5bfcb5dSMax Laier case $ac_config_target in 103905b0fe478SBruce M Simpson "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; 10391*0a7e5f1fSJoseph Mingrone ".devel") CONFIG_COMMANDS="$CONFIG_COMMANDS .devel" ;; 10392b5bfcb5dSMax Laier "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; 1039327df3f5dSRui Paulo "tcpdump.1") CONFIG_FILES="$CONFIG_FILES tcpdump.1" ;; 10394b5bfcb5dSMax Laier 10395d03c0883SXin LI *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 103964edb46e9SPaul Traina esac 103974edb46e9SPaul Trainadone 103984edb46e9SPaul Traina 10399b5bfcb5dSMax Laier 104005b0fe478SBruce M Simpson# If the user did not use the arguments to specify the items to instantiate, 104015b0fe478SBruce M Simpson# then the envvar interface is used. Set only those that are not. 104025b0fe478SBruce M Simpson# We use the long form for the default assignment because of an extremely 104035b0fe478SBruce M Simpson# bizarre bug on SunOS 4.1.3. 104045b0fe478SBruce M Simpsonif $ac_need_defaults; then 10405*0a7e5f1fSJoseph Mingrone test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files 10406*0a7e5f1fSJoseph Mingrone test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers 10407*0a7e5f1fSJoseph Mingrone test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands 104085b0fe478SBruce M Simpsonfi 104094edb46e9SPaul Traina 104105b0fe478SBruce M Simpson# Have a temporary directory for convenience. Make it in the build tree 10411b5bfcb5dSMax Laier# simply because there is no reason against having it here, and in addition, 104125b0fe478SBruce M Simpson# creating and moving files from /tmp can sometimes cause problems. 10413b5bfcb5dSMax Laier# Hook for its removal unless debugging. 10414b5bfcb5dSMax Laier# Note that there is a small window in which the directory will not be cleaned: 10415b5bfcb5dSMax Laier# after its creation but before its name has been assigned to `$tmp'. 104165b0fe478SBruce M Simpson$debug || 104175b0fe478SBruce M Simpson{ 10418d03c0883SXin LI tmp= ac_tmp= 10419b5bfcb5dSMax Laier trap 'exit_status=$? 10420d03c0883SXin LI : "${ac_tmp:=$tmp}" 10421d03c0883SXin LI { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status 10422b5bfcb5dSMax Laier' 0 10423d03c0883SXin LI trap 'as_fn_exit 1' 1 2 13 15 104245b0fe478SBruce M Simpson} 104255b0fe478SBruce M Simpson# Create a (secure) tmp directory for tmp files. 104265b0fe478SBruce M Simpson 104275b0fe478SBruce M Simpson{ 10428b5bfcb5dSMax Laier tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && 10429d03c0883SXin LI test -d "$tmp" 104305b0fe478SBruce M Simpson} || 104315b0fe478SBruce M Simpson{ 10432b5bfcb5dSMax Laier tmp=./conf$$-$RANDOM 10433b5bfcb5dSMax Laier (umask 077 && mkdir "$tmp") 10434d03c0883SXin LI} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 10435d03c0883SXin LIac_tmp=$tmp 104365b0fe478SBruce M Simpson 10437d03c0883SXin LI# Set up the scripts for CONFIG_FILES section. 10438d03c0883SXin LI# No need to generate them if there are no CONFIG_FILES. 10439d03c0883SXin LI# This happens for instance with `./config.status config.h'. 10440b5bfcb5dSMax Laierif test -n "$CONFIG_FILES"; then 104414de76e31SBill Fenner 10442d03c0883SXin LI 10443d03c0883SXin LIac_cr=`echo X | tr X '\015'` 10444d03c0883SXin LI# On cygwin, bash can eat \r inside `` if the user requested igncr. 10445d03c0883SXin LI# But we know of no other shell where ac_cr would be empty at this 10446d03c0883SXin LI# point, so we can use a bashism as a fallback. 10447d03c0883SXin LIif test "x$ac_cr" = x; then 10448d03c0883SXin LI eval ac_cr=\$\'\\r\' 10449d03c0883SXin LIfi 10450d03c0883SXin LIac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 10451d03c0883SXin LIif test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 10452d03c0883SXin LI ac_cs_awk_cr='\\r' 10453d03c0883SXin LIelse 10454d03c0883SXin LI ac_cs_awk_cr=$ac_cr 10455d03c0883SXin LIfi 10456d03c0883SXin LI 10457d03c0883SXin LIecho 'BEGIN {' >"$ac_tmp/subs1.awk" && 104585b0fe478SBruce M Simpson_ACEOF 104594de76e31SBill Fenner 10460b5bfcb5dSMax Laier 10461d03c0883SXin LI{ 10462d03c0883SXin LI echo "cat >conf$$subs.awk <<_ACEOF" && 10463d03c0883SXin LI echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 10464d03c0883SXin LI echo "_ACEOF" 10465d03c0883SXin LI} >conf$$subs.sh || 10466d03c0883SXin LI as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 10467d03c0883SXin LIac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` 10468b5bfcb5dSMax Laierac_delim='%!_!# ' 10469b5bfcb5dSMax Laierfor ac_last_try in false false false false false :; do 10470d03c0883SXin LI . ./conf$$subs.sh || 10471d03c0883SXin LI as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 10472b5bfcb5dSMax Laier 10473d03c0883SXin LI ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` 10474d03c0883SXin LI if test $ac_delim_n = $ac_delim_num; then 10475b5bfcb5dSMax Laier break 10476b5bfcb5dSMax Laier elif $ac_last_try; then 10477d03c0883SXin LI as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 10478d03c0883SXin LI else 10479d03c0883SXin LI ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 10480d03c0883SXin LI fi 10481d03c0883SXin LIdone 10482d03c0883SXin LIrm -f conf$$subs.sh 10483d03c0883SXin LI 10484d03c0883SXin LIcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 10485d03c0883SXin LIcat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && 10486d03c0883SXin LI_ACEOF 10487d03c0883SXin LIsed -n ' 10488d03c0883SXin LIh 10489d03c0883SXin LIs/^/S["/; s/!.*/"]=/ 10490d03c0883SXin LIp 10491d03c0883SXin LIg 10492d03c0883SXin LIs/^[^!]*!// 10493d03c0883SXin LI:repl 10494d03c0883SXin LIt repl 10495d03c0883SXin LIs/'"$ac_delim"'$// 10496d03c0883SXin LIt delim 10497d03c0883SXin LI:nl 10498d03c0883SXin LIh 10499d03c0883SXin LIs/\(.\{148\}\)..*/\1/ 10500d03c0883SXin LIt more1 10501d03c0883SXin LIs/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ 10502d03c0883SXin LIp 10503d03c0883SXin LIn 10504d03c0883SXin LIb repl 10505d03c0883SXin LI:more1 10506d03c0883SXin LIs/["\\]/\\&/g; s/^/"/; s/$/"\\/ 10507d03c0883SXin LIp 10508d03c0883SXin LIg 10509d03c0883SXin LIs/.\{148\}// 10510d03c0883SXin LIt nl 10511d03c0883SXin LI:delim 10512d03c0883SXin LIh 10513d03c0883SXin LIs/\(.\{148\}\)..*/\1/ 10514d03c0883SXin LIt more2 10515d03c0883SXin LIs/["\\]/\\&/g; s/^/"/; s/$/"/ 10516d03c0883SXin LIp 10517d03c0883SXin LIb 10518d03c0883SXin LI:more2 10519d03c0883SXin LIs/["\\]/\\&/g; s/^/"/; s/$/"\\/ 10520d03c0883SXin LIp 10521d03c0883SXin LIg 10522d03c0883SXin LIs/.\{148\}// 10523d03c0883SXin LIt delim 10524d03c0883SXin LI' <conf$$subs.awk | sed ' 10525d03c0883SXin LI/^[^""]/{ 10526d03c0883SXin LI N 10527d03c0883SXin LI s/\n// 10528d03c0883SXin LI} 10529d03c0883SXin LI' >>$CONFIG_STATUS || ac_write_fail=1 10530d03c0883SXin LIrm -f conf$$subs.awk 10531d03c0883SXin LIcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 10532d03c0883SXin LI_ACAWK 10533d03c0883SXin LIcat >>"\$ac_tmp/subs1.awk" <<_ACAWK && 10534d03c0883SXin LI for (key in S) S_is_set[key] = 1 10535d03c0883SXin LI FS = "" 10536d03c0883SXin LI 10537d03c0883SXin LI} 10538d03c0883SXin LI{ 10539d03c0883SXin LI line = $ 0 10540d03c0883SXin LI nfields = split(line, field, "@") 10541d03c0883SXin LI substed = 0 10542d03c0883SXin LI len = length(field[1]) 10543d03c0883SXin LI for (i = 2; i < nfields; i++) { 10544d03c0883SXin LI key = field[i] 10545d03c0883SXin LI keylen = length(key) 10546d03c0883SXin LI if (S_is_set[key]) { 10547d03c0883SXin LI value = S[key] 10548d03c0883SXin LI line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) 10549d03c0883SXin LI len += length(value) + length(field[++i]) 10550d03c0883SXin LI substed = 1 10551d03c0883SXin LI } else 10552d03c0883SXin LI len += 1 + keylen 10553d03c0883SXin LI } 10554d03c0883SXin LI 10555d03c0883SXin LI print line 10556d03c0883SXin LI} 10557d03c0883SXin LI 10558d03c0883SXin LI_ACAWK 10559d03c0883SXin LI_ACEOF 10560d03c0883SXin LIcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 10561d03c0883SXin LIif sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then 10562d03c0883SXin LI sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" 10563d03c0883SXin LIelse 10564d03c0883SXin LI cat 10565d03c0883SXin LIfi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ 10566d03c0883SXin LI || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 10567d03c0883SXin LI_ACEOF 10568d03c0883SXin LI 10569d03c0883SXin LI# VPATH may cause trouble with some makes, so we remove sole $(srcdir), 10570d03c0883SXin LI# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and 10571d03c0883SXin LI# trailing colons and then remove the whole line if VPATH becomes empty 10572d03c0883SXin LI# (actually we leave an empty line to preserve line numbers). 10573d03c0883SXin LIif test "x$srcdir" = x.; then 10574d03c0883SXin LI ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 10575d03c0883SXin LIh 10576d03c0883SXin LIs/// 10577d03c0883SXin LIs/^/:/ 10578d03c0883SXin LIs/[ ]*$/:/ 10579d03c0883SXin LIs/:\$(srcdir):/:/g 10580d03c0883SXin LIs/:\${srcdir}:/:/g 10581d03c0883SXin LIs/:@srcdir@:/:/g 10582d03c0883SXin LIs/^:*// 10583d03c0883SXin LIs/:*$// 10584d03c0883SXin LIx 10585d03c0883SXin LIs/\(=[ ]*\).*/\1/ 10586d03c0883SXin LIG 10587d03c0883SXin LIs/\n// 10588d03c0883SXin LIs/^[^=]*=[ ]*$// 10589d03c0883SXin LI}' 10590d03c0883SXin LIfi 10591d03c0883SXin LI 10592d03c0883SXin LIcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 10593d03c0883SXin LIfi # test -n "$CONFIG_FILES" 10594d03c0883SXin LI 10595d03c0883SXin LI# Set up the scripts for CONFIG_HEADERS section. 10596d03c0883SXin LI# No need to generate them if there are no CONFIG_HEADERS. 10597d03c0883SXin LI# This happens for instance with `./config.status Makefile'. 10598d03c0883SXin LIif test -n "$CONFIG_HEADERS"; then 10599d03c0883SXin LIcat >"$ac_tmp/defines.awk" <<\_ACAWK || 10600d03c0883SXin LIBEGIN { 10601d03c0883SXin LI_ACEOF 10602d03c0883SXin LI 10603d03c0883SXin LI# Transform confdefs.h into an awk script `defines.awk', embedded as 10604d03c0883SXin LI# here-document in config.status, that substitutes the proper values into 10605d03c0883SXin LI# config.h.in to produce config.h. 10606d03c0883SXin LI 10607d03c0883SXin LI# Create a delimiter string that does not exist in confdefs.h, to ease 10608d03c0883SXin LI# handling of long lines. 10609d03c0883SXin LIac_delim='%!_!# ' 10610d03c0883SXin LIfor ac_last_try in false false :; do 10611d03c0883SXin LI ac_tt=`sed -n "/$ac_delim/p" confdefs.h` 10612d03c0883SXin LI if test -z "$ac_tt"; then 10613d03c0883SXin LI break 10614d03c0883SXin LI elif $ac_last_try; then 10615d03c0883SXin LI as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 106164de76e31SBill Fenner else 10617b5bfcb5dSMax Laier ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 106184de76e31SBill Fenner fi 106194de76e31SBill Fennerdone 10620b5bfcb5dSMax Laier 10621d03c0883SXin LI# For the awk script, D is an array of macro values keyed by name, 10622d03c0883SXin LI# likewise P contains macro parameters if any. Preserve backslash 10623d03c0883SXin LI# newline sequences. 10624b5bfcb5dSMax Laier 10625d03c0883SXin LIac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* 10626d03c0883SXin LIsed -n ' 10627d03c0883SXin LIs/.\{148\}/&'"$ac_delim"'/g 10628d03c0883SXin LIt rset 10629d03c0883SXin LI:rset 10630d03c0883SXin LIs/^[ ]*#[ ]*define[ ][ ]*/ / 10631d03c0883SXin LIt def 10632d03c0883SXin LId 10633d03c0883SXin LI:def 10634d03c0883SXin LIs/\\$// 10635d03c0883SXin LIt bsnl 10636d03c0883SXin LIs/["\\]/\\&/g 10637d03c0883SXin LIs/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 10638d03c0883SXin LID["\1"]=" \3"/p 10639d03c0883SXin LIs/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p 10640d03c0883SXin LId 10641d03c0883SXin LI:bsnl 10642d03c0883SXin LIs/["\\]/\\&/g 10643d03c0883SXin LIs/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 10644d03c0883SXin LID["\1"]=" \3\\\\\\n"\\/p 10645d03c0883SXin LIt cont 10646d03c0883SXin LIs/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p 10647d03c0883SXin LIt cont 10648d03c0883SXin LId 10649d03c0883SXin LI:cont 10650d03c0883SXin LIn 10651d03c0883SXin LIs/.\{148\}/&'"$ac_delim"'/g 10652d03c0883SXin LIt clear 10653d03c0883SXin LI:clear 10654d03c0883SXin LIs/\\$// 10655d03c0883SXin LIt bsnlc 10656d03c0883SXin LIs/["\\]/\\&/g; s/^/"/; s/$/"/p 10657d03c0883SXin LId 10658d03c0883SXin LI:bsnlc 10659d03c0883SXin LIs/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p 10660d03c0883SXin LIb cont 10661d03c0883SXin LI' <confdefs.h | sed ' 10662d03c0883SXin LIs/'"$ac_delim"'/"\\\ 10663d03c0883SXin LI"/g' >>$CONFIG_STATUS || ac_write_fail=1 10664d03c0883SXin LI 10665d03c0883SXin LIcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 10666d03c0883SXin LI for (key in D) D_is_set[key] = 1 10667d03c0883SXin LI FS = "" 10668d03c0883SXin LI} 10669d03c0883SXin LI/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { 10670d03c0883SXin LI line = \$ 0 10671d03c0883SXin LI split(line, arg, " ") 10672d03c0883SXin LI if (arg[1] == "#") { 10673d03c0883SXin LI defundef = arg[2] 10674d03c0883SXin LI mac1 = arg[3] 10675d03c0883SXin LI } else { 10676d03c0883SXin LI defundef = substr(arg[1], 2) 10677d03c0883SXin LI mac1 = arg[2] 10678d03c0883SXin LI } 10679d03c0883SXin LI split(mac1, mac2, "(") #) 10680d03c0883SXin LI macro = mac2[1] 10681d03c0883SXin LI prefix = substr(line, 1, index(line, defundef) - 1) 10682d03c0883SXin LI if (D_is_set[macro]) { 10683d03c0883SXin LI # Preserve the white space surrounding the "#". 10684d03c0883SXin LI print prefix "define", macro P[macro] D[macro] 10685d03c0883SXin LI next 10686d03c0883SXin LI } else { 10687d03c0883SXin LI # Replace #undef with comments. This is necessary, for example, 10688d03c0883SXin LI # in the case of _POSIX_SOURCE, which is predefined and required 10689d03c0883SXin LI # on some systems where configure will not decide to define it. 10690d03c0883SXin LI if (defundef == "undef") { 10691d03c0883SXin LI print "/*", prefix defundef, macro, "*/" 10692d03c0883SXin LI next 10693d03c0883SXin LI } 10694d03c0883SXin LI } 10695d03c0883SXin LI} 10696d03c0883SXin LI{ print } 10697d03c0883SXin LI_ACAWK 10698b5bfcb5dSMax Laier_ACEOF 10699d03c0883SXin LIcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 10700d03c0883SXin LI as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 10701d03c0883SXin LIfi # test -n "$CONFIG_HEADERS" 10702b5bfcb5dSMax Laier 10703b5bfcb5dSMax Laier 10704d03c0883SXin LIeval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" 10705d03c0883SXin LIshift 10706d03c0883SXin LIfor ac_tag 10707b5bfcb5dSMax Laierdo 10708b5bfcb5dSMax Laier case $ac_tag in 10709b5bfcb5dSMax Laier :[FHLC]) ac_mode=$ac_tag; continue;; 10710b5bfcb5dSMax Laier esac 10711b5bfcb5dSMax Laier case $ac_mode$ac_tag in 10712b5bfcb5dSMax Laier :[FHL]*:*);; 10713d03c0883SXin LI :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; 10714b5bfcb5dSMax Laier :[FH]-) ac_tag=-:-;; 10715b5bfcb5dSMax Laier :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 10716b5bfcb5dSMax Laier esac 10717b5bfcb5dSMax Laier ac_save_IFS=$IFS 10718b5bfcb5dSMax Laier IFS=: 10719b5bfcb5dSMax Laier set x $ac_tag 10720b5bfcb5dSMax Laier IFS=$ac_save_IFS 10721b5bfcb5dSMax Laier shift 10722b5bfcb5dSMax Laier ac_file=$1 10723b5bfcb5dSMax Laier shift 10724b5bfcb5dSMax Laier 10725b5bfcb5dSMax Laier case $ac_mode in 10726b5bfcb5dSMax Laier :L) ac_source=$1;; 10727b5bfcb5dSMax Laier :[FH]) 10728b5bfcb5dSMax Laier ac_file_inputs= 10729b5bfcb5dSMax Laier for ac_f 10730b5bfcb5dSMax Laier do 10731b5bfcb5dSMax Laier case $ac_f in 10732d03c0883SXin LI -) ac_f="$ac_tmp/stdin";; 10733b5bfcb5dSMax Laier *) # Look for the file first in the build tree, then in the source tree 10734b5bfcb5dSMax Laier # (if the path is not absolute). The absolute path cannot be DOS-style, 10735b5bfcb5dSMax Laier # because $ac_f cannot contain `:'. 10736b5bfcb5dSMax Laier test -f "$ac_f" || 10737b5bfcb5dSMax Laier case $ac_f in 10738b5bfcb5dSMax Laier [\\/$]*) false;; 10739b5bfcb5dSMax Laier *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 10740b5bfcb5dSMax Laier esac || 10741d03c0883SXin LI as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; 10742b5bfcb5dSMax Laier esac 10743*0a7e5f1fSJoseph Mingrone case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 10744d03c0883SXin LI as_fn_append ac_file_inputs " '$ac_f'" 107455b0fe478SBruce M Simpson done 107465b0fe478SBruce M Simpson 107475b0fe478SBruce M Simpson # Let's still pretend it is `configure' which instantiates (i.e., don't 107485b0fe478SBruce M Simpson # use $as_me), people would be surprised to read: 107495b0fe478SBruce M Simpson # /* config.h. Generated by config.status. */ 10750d03c0883SXin LI configure_input='Generated from '` 10751*0a7e5f1fSJoseph Mingrone printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' 10752d03c0883SXin LI `' by configure.' 10753b5bfcb5dSMax Laier if test x"$ac_file" != x-; then 10754b5bfcb5dSMax Laier configure_input="$ac_file. $configure_input" 10755*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 10756*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: creating $ac_file" >&6;} 107575b0fe478SBruce M Simpson fi 10758d03c0883SXin LI # Neutralize special characters interpreted by sed in replacement strings. 10759d03c0883SXin LI case $configure_input in #( 10760d03c0883SXin LI *\&* | *\|* | *\\* ) 10761*0a7e5f1fSJoseph Mingrone ac_sed_conf_input=`printf "%s\n" "$configure_input" | 10762d03c0883SXin LI sed 's/[\\\\&|]/\\\\&/g'`;; #( 10763d03c0883SXin LI *) ac_sed_conf_input=$configure_input;; 10764d03c0883SXin LI esac 107654de76e31SBill Fenner 10766b5bfcb5dSMax Laier case $ac_tag in 10767d03c0883SXin LI *:-:* | *:-) cat >"$ac_tmp/stdin" \ 10768d03c0883SXin LI || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 107695b0fe478SBruce M Simpson esac 10770b5bfcb5dSMax Laier ;; 10771b5bfcb5dSMax Laier esac 10772b5bfcb5dSMax Laier 10773b5bfcb5dSMax Laier ac_dir=`$as_dirname -- "$ac_file" || 10774b5bfcb5dSMax Laier$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 10775b5bfcb5dSMax Laier X"$ac_file" : 'X\(//\)[^/]' \| \ 10776b5bfcb5dSMax Laier X"$ac_file" : 'X\(//\)$' \| \ 10777b5bfcb5dSMax Laier X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 10778*0a7e5f1fSJoseph Mingroneprintf "%s\n" X"$ac_file" | 10779b5bfcb5dSMax Laier sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 10780b5bfcb5dSMax Laier s//\1/ 10781b5bfcb5dSMax Laier q 10782b5bfcb5dSMax Laier } 10783b5bfcb5dSMax Laier /^X\(\/\/\)[^/].*/{ 10784b5bfcb5dSMax Laier s//\1/ 10785b5bfcb5dSMax Laier q 10786b5bfcb5dSMax Laier } 10787b5bfcb5dSMax Laier /^X\(\/\/\)$/{ 10788b5bfcb5dSMax Laier s//\1/ 10789b5bfcb5dSMax Laier q 10790b5bfcb5dSMax Laier } 10791b5bfcb5dSMax Laier /^X\(\/\).*/{ 10792b5bfcb5dSMax Laier s//\1/ 10793b5bfcb5dSMax Laier q 10794b5bfcb5dSMax Laier } 10795b5bfcb5dSMax Laier s/.*/./; q'` 10796d03c0883SXin LI as_dir="$ac_dir"; as_fn_mkdir_p 10797b5bfcb5dSMax Laier ac_builddir=. 10798b5bfcb5dSMax Laier 10799b5bfcb5dSMax Laiercase "$ac_dir" in 10800b5bfcb5dSMax Laier.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 10801b5bfcb5dSMax Laier*) 10802*0a7e5f1fSJoseph Mingrone ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` 10803b5bfcb5dSMax Laier # A ".." for each directory in $ac_dir_suffix. 10804*0a7e5f1fSJoseph Mingrone ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 10805b5bfcb5dSMax Laier case $ac_top_builddir_sub in 10806b5bfcb5dSMax Laier "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 10807b5bfcb5dSMax Laier *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 10808b5bfcb5dSMax Laier esac ;; 10809b5bfcb5dSMax Laieresac 10810b5bfcb5dSMax Laierac_abs_top_builddir=$ac_pwd 10811b5bfcb5dSMax Laierac_abs_builddir=$ac_pwd$ac_dir_suffix 10812b5bfcb5dSMax Laier# for backward compatibility: 10813b5bfcb5dSMax Laierac_top_builddir=$ac_top_build_prefix 10814b5bfcb5dSMax Laier 10815b5bfcb5dSMax Laiercase $srcdir in 10816b5bfcb5dSMax Laier .) # We are building in place. 10817b5bfcb5dSMax Laier ac_srcdir=. 10818b5bfcb5dSMax Laier ac_top_srcdir=$ac_top_builddir_sub 10819b5bfcb5dSMax Laier ac_abs_top_srcdir=$ac_pwd ;; 10820b5bfcb5dSMax Laier [\\/]* | ?:[\\/]* ) # Absolute name. 10821b5bfcb5dSMax Laier ac_srcdir=$srcdir$ac_dir_suffix; 10822b5bfcb5dSMax Laier ac_top_srcdir=$srcdir 10823b5bfcb5dSMax Laier ac_abs_top_srcdir=$srcdir ;; 10824b5bfcb5dSMax Laier *) # Relative name. 10825b5bfcb5dSMax Laier ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 10826b5bfcb5dSMax Laier ac_top_srcdir=$ac_top_build_prefix$srcdir 10827b5bfcb5dSMax Laier ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 10828b5bfcb5dSMax Laieresac 10829b5bfcb5dSMax Laierac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 10830b5bfcb5dSMax Laier 10831b5bfcb5dSMax Laier 10832b5bfcb5dSMax Laier case $ac_mode in 10833b5bfcb5dSMax Laier :F) 10834b5bfcb5dSMax Laier # 10835b5bfcb5dSMax Laier # CONFIG_FILE 10836b5bfcb5dSMax Laier # 10837b5bfcb5dSMax Laier 10838b5bfcb5dSMax Laier case $INSTALL in 10839b5bfcb5dSMax Laier [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; 10840b5bfcb5dSMax Laier *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; 10841b5bfcb5dSMax Laier esac 108425b0fe478SBruce M Simpson_ACEOF 10843b5bfcb5dSMax Laier 10844d03c0883SXin LIcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 10845b5bfcb5dSMax Laier# If the template does not know about datarootdir, expand it. 10846b5bfcb5dSMax Laier# FIXME: This hack should be removed a few years after 2.60. 10847b5bfcb5dSMax Laierac_datarootdir_hack=; ac_datarootdir_seen= 10848d03c0883SXin LIac_sed_dataroot=' 10849d03c0883SXin LI/datarootdir/ { 10850b5bfcb5dSMax Laier p 10851b5bfcb5dSMax Laier q 10852b5bfcb5dSMax Laier} 10853b5bfcb5dSMax Laier/@datadir@/p 10854b5bfcb5dSMax Laier/@docdir@/p 10855b5bfcb5dSMax Laier/@infodir@/p 10856b5bfcb5dSMax Laier/@localedir@/p 10857d03c0883SXin LI/@mandir@/p' 10858d03c0883SXin LIcase `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in 10859b5bfcb5dSMax Laier*datarootdir*) ac_datarootdir_seen=yes;; 10860b5bfcb5dSMax Laier*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 10861*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 10862*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 10863b5bfcb5dSMax Laier_ACEOF 10864d03c0883SXin LIcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 10865b5bfcb5dSMax Laier ac_datarootdir_hack=' 10866b5bfcb5dSMax Laier s&@datadir@&$datadir&g 10867b5bfcb5dSMax Laier s&@docdir@&$docdir&g 10868b5bfcb5dSMax Laier s&@infodir@&$infodir&g 10869b5bfcb5dSMax Laier s&@localedir@&$localedir&g 10870b5bfcb5dSMax Laier s&@mandir@&$mandir&g 10871b5bfcb5dSMax Laier s&\\\${datarootdir}&$datarootdir&g' ;; 10872b5bfcb5dSMax Laieresac 10873b5bfcb5dSMax Laier_ACEOF 10874b5bfcb5dSMax Laier 10875b5bfcb5dSMax Laier# Neutralize VPATH when `$srcdir' = `.'. 10876b5bfcb5dSMax Laier# Shell code in configure.ac might set extrasub. 10877b5bfcb5dSMax Laier# FIXME: do we really want to maintain this feature? 10878d03c0883SXin LIcat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 10879d03c0883SXin LIac_sed_extra="$ac_vpsub 108805b0fe478SBruce M Simpson$extrasub 108815b0fe478SBruce M Simpson_ACEOF 10882d03c0883SXin LIcat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 108835b0fe478SBruce M Simpson:t 108845b0fe478SBruce M Simpson/@[a-zA-Z_][a-zA-Z_0-9]*@/!b 10885d03c0883SXin LIs|@configure_input@|$ac_sed_conf_input|;t t 10886b5bfcb5dSMax Laiers&@top_builddir@&$ac_top_builddir_sub&;t t 10887d03c0883SXin LIs&@top_build_prefix@&$ac_top_build_prefix&;t t 10888b5bfcb5dSMax Laiers&@srcdir@&$ac_srcdir&;t t 10889b5bfcb5dSMax Laiers&@abs_srcdir@&$ac_abs_srcdir&;t t 10890b5bfcb5dSMax Laiers&@top_srcdir@&$ac_top_srcdir&;t t 10891b5bfcb5dSMax Laiers&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t 10892b5bfcb5dSMax Laiers&@builddir@&$ac_builddir&;t t 10893b5bfcb5dSMax Laiers&@abs_builddir@&$ac_abs_builddir&;t t 10894b5bfcb5dSMax Laiers&@abs_top_builddir@&$ac_abs_top_builddir&;t t 10895b5bfcb5dSMax Laiers&@INSTALL@&$ac_INSTALL&;t t 10896b5bfcb5dSMax Laier$ac_datarootdir_hack 10897d03c0883SXin LI" 10898d03c0883SXin LIeval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ 10899d03c0883SXin LI >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 109005b0fe478SBruce M Simpson 10901b5bfcb5dSMax Laiertest -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 10902d03c0883SXin LI { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && 10903d03c0883SXin LI { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ 10904d03c0883SXin LI "$ac_tmp/out"`; test -z "$ac_out"; } && 10905*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 10906d03c0883SXin LIwhich seems to be undefined. Please make sure it is defined" >&5 10907*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 10908d03c0883SXin LIwhich seems to be undefined. Please make sure it is defined" >&2;} 109095b0fe478SBruce M Simpson 10910d03c0883SXin LI rm -f "$ac_tmp/stdin" 109115b0fe478SBruce M Simpson case $ac_file in 10912d03c0883SXin LI -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; 10913d03c0883SXin LI *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; 10914d03c0883SXin LI esac \ 10915d03c0883SXin LI || as_fn_error $? "could not create $ac_file" "$LINENO" 5 10916b5bfcb5dSMax Laier ;; 10917b5bfcb5dSMax Laier :H) 109185b0fe478SBruce M Simpson # 10919b5bfcb5dSMax Laier # CONFIG_HEADER 10920b5bfcb5dSMax Laier # 109215b0fe478SBruce M Simpson if test x"$ac_file" != x-; then 10922d03c0883SXin LI { 10923*0a7e5f1fSJoseph Mingrone printf "%s\n" "/* $configure_input */" >&1 \ 10924d03c0883SXin LI && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" 10925d03c0883SXin LI } >"$ac_tmp/config.h" \ 10926d03c0883SXin LI || as_fn_error $? "could not create $ac_file" "$LINENO" 5 10927d03c0883SXin LI if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then 10928*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 10929*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: $ac_file is unchanged" >&6;} 109305b0fe478SBruce M Simpson else 10931d03c0883SXin LI rm -f "$ac_file" 10932d03c0883SXin LI mv "$ac_tmp/config.h" "$ac_file" \ 10933d03c0883SXin LI || as_fn_error $? "could not create $ac_file" "$LINENO" 5 10934b0453382SBill Fenner fi 109355b0fe478SBruce M Simpson else 10936*0a7e5f1fSJoseph Mingrone printf "%s\n" "/* $configure_input */" >&1 \ 10937d03c0883SXin LI && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ 10938d03c0883SXin LI || as_fn_error $? "could not create -" "$LINENO" 5 109395b0fe478SBruce M Simpson fi 10940b5bfcb5dSMax Laier ;; 10941b0453382SBill Fenner 10942*0a7e5f1fSJoseph Mingrone :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 10943*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: executing $ac_file commands" >&6;} 10944b5bfcb5dSMax Laier ;; 109455b0fe478SBruce M Simpson esac 109464edb46e9SPaul Traina 10947685295f4SBill Fenner 10948b5bfcb5dSMax Laier case $ac_file$ac_mode in 10949*0a7e5f1fSJoseph Mingrone ".devel":C) if test -f .devel; then 10950685295f4SBill Fenner echo timestamp > stamp-h 10951ee67461eSJoseph Mingrone cat $srcdir/Makefile-devel-adds >> Makefile 10952ee67461eSJoseph Mingrone make depend || exit 1 109535b0fe478SBruce M Simpsonfi ;; 109544edb46e9SPaul Traina 10955b5bfcb5dSMax Laier esac 10956b5bfcb5dSMax Laierdone # for ac_tag 10957b5bfcb5dSMax Laier 109585b0fe478SBruce M Simpson 10959d03c0883SXin LIas_fn_exit 0 109605b0fe478SBruce M Simpson_ACEOF 109615b0fe478SBruce M Simpsonac_clean_files=$ac_clean_files_save 109625b0fe478SBruce M Simpson 10963d03c0883SXin LItest $ac_write_fail = 0 || 10964d03c0883SXin LI as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 10965d03c0883SXin LI 109665b0fe478SBruce M Simpson 109675b0fe478SBruce M Simpson# configure is writing to config.log, and then calls config.status. 109685b0fe478SBruce M Simpson# config.status does its own redirection, appending to config.log. 109695b0fe478SBruce M Simpson# Unfortunately, on DOS this fails, as config.log is still kept open 109705b0fe478SBruce M Simpson# by configure, so config.status won't be able to write to it; its 109715b0fe478SBruce M Simpson# output is simply discarded. So we exec the FD to /dev/null, 109725b0fe478SBruce M Simpson# effectively closing config.log, so it can be properly (re)opened and 109735b0fe478SBruce M Simpson# appended to by config.status. When coming back to configure, we 109745b0fe478SBruce M Simpson# need to make the FD available again. 109755b0fe478SBruce M Simpsonif test "$no_create" != yes; then 109765b0fe478SBruce M Simpson ac_cs_success=: 109775b0fe478SBruce M Simpson ac_config_status_args= 109785b0fe478SBruce M Simpson test "$silent" = yes && 109795b0fe478SBruce M Simpson ac_config_status_args="$ac_config_status_args --quiet" 109805b0fe478SBruce M Simpson exec 5>/dev/null 109815b0fe478SBruce M Simpson $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 109825b0fe478SBruce M Simpson exec 5>>config.log 109835b0fe478SBruce M Simpson # Use ||, not &&, to avoid exiting from the if with $? = 1, which 109845b0fe478SBruce M Simpson # would make configure fail if this is the last instruction. 10985d03c0883SXin LI $ac_cs_success || as_fn_exit 1 10986d03c0883SXin LIfi 10987d03c0883SXin LIif test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 10988*0a7e5f1fSJoseph Mingrone { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 10989*0a7e5f1fSJoseph Mingroneprintf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} 109905b0fe478SBruce M Simpsonfi 109914edb46e9SPaul Traina 109924edb46e9SPaul Trainaexit 0 10993*0a7e5f1fSJoseph Mingrone 10994