blob: 5eaaa392f0995e657c681c7f1b1a4ce09a392d91 [file] [log] [blame]
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001#! /bin/sh
Adam Langleyd0592972015-03-30 14:49:51 -07002# From configure.ac Revision: 1.583 .
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003# Guess values for system-dependent variables and create Makefiles.
Greg Hartman9768ca42017-06-22 20:49:52 -07004# Generated by GNU Autoconf 2.69 for OpenSSH Portable.
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005#
6# Report bugs to <openssh-unix-dev@mindrot.org>.
7#
Greg Hartman9768ca42017-06-22 20:49:52 -07008#
9# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
10#
11#
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
Greg Hartman9768ca42017-06-22 20:49:52 -070014## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017
18# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
Greg Hartman9768ca42017-06-22 20:49:52 -070020if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080021 emulate sh
22 NULLCMD=:
Greg Hartman9768ca42017-06-22 20:49:52 -070023 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Greg Hartmanbd77cf72015-02-25 13:21:06 -080024 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
26 setopt NO_GLOB_SUBST
27else
Greg Hartman9768ca42017-06-22 20:49:52 -070028 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080033esac
34fi
35
36
Greg Hartman9768ca42017-06-22 20:49:52 -070037as_nl='
38'
39export as_nl
40# Printing a long string crashes Solaris 7 /usr/bin/printf.
41as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
44# Prefer a ksh shell builtin over an external printf program on Solaris,
45# but without wasting forks for bash or zsh.
46if test -z "$BASH_VERSION$ZSH_VERSION" \
47 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
48 as_echo='print -r --'
49 as_echo_n='print -rn --'
50elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 as_echo='printf %s\n'
52 as_echo_n='printf %s'
53else
54 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
55 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
56 as_echo_n='/usr/ucb/echo -n'
57 else
58 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
59 as_echo_n_body='eval
60 arg=$1;
61 case $arg in #(
62 *"$as_nl"*)
63 expr "X$arg" : "X\\(.*\\)$as_nl";
64 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
65 esac;
66 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
67 '
68 export as_echo_n_body
69 as_echo_n='sh -c $as_echo_n_body as_echo'
70 fi
71 export as_echo_body
72 as_echo='sh -c $as_echo_body as_echo'
73fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -080074
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
Greg Hartman9768ca42017-06-22 20:49:52 -070077 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080082fi
83
84
85# IFS
86# We need space, tab and new line, in precisely that order. Quoting is
87# there to prevent editors from complaining about space-tab.
88# (If _AS_PATH_WALK were called with IFS unset, it would disable word
89# splitting by setting IFS to empty value.)
90IFS=" "" $as_nl"
91
92# Find who we are. Look in the path if we contain no directory separator.
Greg Hartman9768ca42017-06-22 20:49:52 -070093as_myself=
94case $0 in #((
Greg Hartmanbd77cf72015-02-25 13:21:06 -080095 *[\\/]* ) as_myself=$0 ;;
96 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97for as_dir in $PATH
98do
99 IFS=$as_save_IFS
100 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -0700101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800103IFS=$as_save_IFS
104
105 ;;
106esac
107# We did not find ourselves, most probably we were run as `sh COMMAND'
108# in which case we are not to be found in the path.
109if test "x$as_myself" = x; then
110 as_myself=$0
111fi
112if test ! -f "$as_myself"; then
Greg Hartman9768ca42017-06-22 20:49:52 -0700113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800115fi
116
Greg Hartman9768ca42017-06-22 20:49:52 -0700117# Unset variables that we do not need and which cause bugs (e.g. in
118# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
119# suppresses any "Segmentation fault" message there. '((' could
120# trigger a bug in pdksh 5.2.14.
121for as_var in BASH_ENV ENV MAIL MAILPATH
122do eval test x\${$as_var+set} = xset \
123 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
Greg Hartman9768ca42017-06-22 20:49:52 -0700130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800134
Greg Hartman9768ca42017-06-22 20:49:52 -0700135# CDPATH.
136(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
137
138# Use a proper internal environment variable to ensure we don't fall
139 # into an infinite loop, continuously re-executing ourselves.
140 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
141 _as_can_reexec=no; export _as_can_reexec;
142 # We cannot yet assume a decent shell, so we have to provide a
143# neutralization value for shells without unset; and this also
144# works around shells that cannot unset nonexistent variables.
145# Preserve -v and -x to the replacement shell.
146BASH_ENV=/dev/null
147ENV=/dev/null
148(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149case $- in # ((((
150 *v*x* | *x*v* ) as_opts=-vx ;;
151 *v* ) as_opts=-v ;;
152 *x* ) as_opts=-x ;;
153 * ) as_opts= ;;
154esac
155exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
156# Admittedly, this is quite paranoid, since all the known shells bail
157# out after a failed `exec'.
158$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
159as_fn_exit 255
160 fi
161 # We don't want this to propagate to other subprocesses.
162 { _as_can_reexec=; unset _as_can_reexec;}
163if test "x$CONFIG_SHELL" = x; then
164 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
165 emulate sh
166 NULLCMD=:
167 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
168 # is contrary to our usage. Disable this feature.
169 alias -g '\${1+\"\$@\"}'='\"\$@\"'
170 setopt NO_GLOB_SUBST
171else
172 case \`(set -o) 2>/dev/null\` in #(
173 *posix*) :
174 set -o posix ;; #(
175 *) :
176 ;;
177esac
178fi
179"
180 as_required="as_fn_return () { (exit \$1); }
181as_fn_success () { as_fn_return 0; }
182as_fn_failure () { as_fn_return 1; }
183as_fn_ret_success () { return 0; }
184as_fn_ret_failure () { return 1; }
185
186exitcode=0
187as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193else
194 exitcode=1; echo positional parameters were not saved.
195fi
196test x\$exitcode = x0 || exit 1
197test -x / || exit 1"
198 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
199 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
200 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
201 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
202test \$(( 1 + 1 )) = 2 || exit 1"
203 if (eval "$as_required") 2>/dev/null; then :
204 as_have_required=yes
205else
206 as_have_required=no
207fi
208 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210else
211 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212as_found=false
213for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214do
215 IFS=$as_save_IFS
216 test -z "$as_dir" && as_dir=.
217 as_found=:
218 case $as_dir in #(
219 /*)
220 for as_base in sh bash ksh sh5; do
221 # Try only shells that exist, to save several forks.
222 as_shell=$as_dir/$as_base
223 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
224 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
225 CONFIG_SHELL=$as_shell as_have_required=yes
226 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
227 break 2
228fi
229fi
230 done;;
231 esac
232 as_found=false
233done
234$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
235 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
236 CONFIG_SHELL=$SHELL as_have_required=yes
237fi; }
238IFS=$as_save_IFS
239
240
241 if test "x$CONFIG_SHELL" != x; then :
242 export CONFIG_SHELL
243 # We cannot yet assume a decent shell, so we have to provide a
244# neutralization value for shells without unset; and this also
245# works around shells that cannot unset nonexistent variables.
246# Preserve -v and -x to the replacement shell.
247BASH_ENV=/dev/null
248ENV=/dev/null
249(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250case $- in # ((((
251 *v*x* | *x*v* ) as_opts=-vx ;;
252 *v* ) as_opts=-v ;;
253 *x* ) as_opts=-x ;;
254 * ) as_opts= ;;
255esac
256exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
257# Admittedly, this is quite paranoid, since all the known shells bail
258# out after a failed `exec'.
259$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260exit 255
261fi
262
263 if test x$as_have_required = xno; then :
264 $as_echo "$0: This script requires a shell more modern than all"
265 $as_echo "$0: the shells that I found on your system."
266 if test x${ZSH_VERSION+set} = xset ; then
267 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
268 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
269 else
270 $as_echo "$0: Please tell bug-autoconf@gnu.org and
271$0: openssh-unix-dev@mindrot.org about your system,
272$0: including any error possibly output before this
273$0: message. Then install a modern shell, or manually run
274$0: the script under such a shell if you do have one."
275 fi
276 exit 1
277fi
278fi
279fi
280SHELL=${CONFIG_SHELL-/bin/sh}
281export SHELL
282# Unset more variables known to interfere with behavior of common tools.
283CLICOLOR_FORCE= GREP_OPTIONS=
284unset CLICOLOR_FORCE GREP_OPTIONS
285
286## --------------------- ##
287## M4sh Shell Functions. ##
288## --------------------- ##
289# as_fn_unset VAR
290# ---------------
291# Portably unset VAR.
292as_fn_unset ()
293{
294 { eval $1=; unset $1;}
295}
296as_unset=as_fn_unset
297
298# as_fn_set_status STATUS
299# -----------------------
300# Set $? to STATUS, without forking.
301as_fn_set_status ()
302{
303 return $1
304} # as_fn_set_status
305
306# as_fn_exit STATUS
307# -----------------
308# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
309as_fn_exit ()
310{
311 set +e
312 as_fn_set_status $1
313 exit $1
314} # as_fn_exit
315
316# as_fn_mkdir_p
317# -------------
318# Create "$as_dir" as a directory, including parents if necessary.
319as_fn_mkdir_p ()
320{
321
322 case $as_dir in #(
323 -*) as_dir=./$as_dir;;
324 esac
325 test -d "$as_dir" || eval $as_mkdir_p || {
326 as_dirs=
327 while :; do
328 case $as_dir in #(
329 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
330 *) as_qdir=$as_dir;;
331 esac
332 as_dirs="'$as_qdir' $as_dirs"
333 as_dir=`$as_dirname -- "$as_dir" ||
334$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
335 X"$as_dir" : 'X\(//\)[^/]' \| \
336 X"$as_dir" : 'X\(//\)$' \| \
337 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
338$as_echo X"$as_dir" |
339 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
340 s//\1/
341 q
342 }
343 /^X\(\/\/\)[^/].*/{
344 s//\1/
345 q
346 }
347 /^X\(\/\/\)$/{
348 s//\1/
349 q
350 }
351 /^X\(\/\).*/{
352 s//\1/
353 q
354 }
355 s/.*/./; q'`
356 test -d "$as_dir" && break
357 done
358 test -z "$as_dirs" || eval "mkdir $as_dirs"
359 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
360
361
362} # as_fn_mkdir_p
363
364# as_fn_executable_p FILE
365# -----------------------
366# Test if FILE is an executable regular file.
367as_fn_executable_p ()
368{
369 test -f "$1" && test -x "$1"
370} # as_fn_executable_p
371# as_fn_append VAR VALUE
372# ----------------------
373# Append the text in VALUE to the end of the definition contained in VAR. Take
374# advantage of any shell optimizations that allow amortized linear growth over
375# repeated appends, instead of the typical quadratic growth present in naive
376# implementations.
377if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
378 eval 'as_fn_append ()
379 {
380 eval $1+=\$2
381 }'
382else
383 as_fn_append ()
384 {
385 eval $1=\$$1\$2
386 }
387fi # as_fn_append
388
389# as_fn_arith ARG...
390# ------------------
391# Perform arithmetic evaluation on the ARGs, and store the result in the
392# global $as_val. Take advantage of shells that can avoid forks. The arguments
393# must be portable across $(()) and expr.
394if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395 eval 'as_fn_arith ()
396 {
397 as_val=$(( $* ))
398 }'
399else
400 as_fn_arith ()
401 {
402 as_val=`expr "$@" || test $? -eq 1`
403 }
404fi # as_fn_arith
405
406
407# as_fn_error STATUS ERROR [LINENO LOG_FD]
408# ----------------------------------------
409# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
410# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
411# script with STATUS, using 1 if that was 0.
412as_fn_error ()
413{
414 as_status=$1; test $as_status -eq 0 && as_status=1
415 if test "$4"; then
416 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
417 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
418 fi
419 $as_echo "$as_me: error: $2" >&2
420 as_fn_exit $as_status
421} # as_fn_error
422
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800423if expr a : '\(a\)' >/dev/null 2>&1 &&
424 test "X`expr 00001 : '.*\(...\)'`" = X001; then
425 as_expr=expr
426else
427 as_expr=false
428fi
429
430if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431 as_basename=basename
432else
433 as_basename=false
434fi
435
Greg Hartman9768ca42017-06-22 20:49:52 -0700436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800441
442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Greg Hartman9768ca42017-06-22 20:49:52 -0700446$as_echo X/"$0" |
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800447 sed '/^.*\/\([^/][^/]*\)\/*$/{
448 s//\1/
449 q
450 }
451 /^X\/\(\/\/\)$/{
452 s//\1/
453 q
454 }
455 /^X\/\(\/\).*/{
456 s//\1/
457 q
458 }
459 s/.*/./; q'`
460
Greg Hartman9768ca42017-06-22 20:49:52 -0700461# Avoid depending upon Character Ranges.
462as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465as_cr_digits='0123456789'
466as_cr_alnum=$as_cr_Letters$as_cr_digits
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800467
468
Greg Hartman9768ca42017-06-22 20:49:52 -0700469 as_lineno_1=$LINENO as_lineno_1a=$LINENO
470 as_lineno_2=$LINENO as_lineno_2a=$LINENO
471 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
472 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
473 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800474 sed -n '
475 p
476 /[$]LINENO/=
477 ' <$as_myself |
478 sed '
479 s/[$]LINENO.*/&-/
480 t lineno
481 b
482 :lineno
483 N
484 :loop
485 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
486 t loop
487 s/-\n.*//
488 ' >$as_me.lineno &&
489 chmod +x "$as_me.lineno" ||
Greg Hartman9768ca42017-06-22 20:49:52 -0700490 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800491
Greg Hartman9768ca42017-06-22 20:49:52 -0700492 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
493 # already done that, so ensure we don't try to do so again and fall
494 # in an infinite loop. This has already happened in practice.
495 _as_can_reexec=no; export _as_can_reexec
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800496 # Don't try to exec as it changes $[0], causing all sort of problems
497 # (the dirname of $[0] is not the place where we might find the
498 # original and so on. Autoconf is especially sensitive to this).
499 . "./$as_me.lineno"
500 # Exit status is that of the last command.
501 exit
502}
503
504ECHO_C= ECHO_N= ECHO_T=
Greg Hartman9768ca42017-06-22 20:49:52 -0700505case `echo -n x` in #(((((
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800506-n*)
Greg Hartman9768ca42017-06-22 20:49:52 -0700507 case `echo 'xy\c'` in
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Greg Hartman9768ca42017-06-22 20:49:52 -0700509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800512 esac;;
513*)
514 ECHO_N='-n';;
515esac
516
517rm -f conf$$ conf$$.exe conf$$.file
518if test -d conf$$.dir; then
519 rm -f conf$$.dir/conf$$.file
520else
521 rm -f conf$$.dir
Greg Hartman9768ca42017-06-22 20:49:52 -0700522 mkdir conf$$.dir 2>/dev/null
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800523fi
Greg Hartman9768ca42017-06-22 20:49:52 -0700524if (echo >conf$$.file) 2>/dev/null; then
525 if ln -s conf$$.file conf$$ 2>/dev/null; then
526 as_ln_s='ln -s'
527 # ... but there are two gotchas:
528 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
529 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
530 # In both cases, we have to default to `cp -pR'.
531 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
532 as_ln_s='cp -pR'
533 elif ln conf$$.file conf$$ 2>/dev/null; then
534 as_ln_s=ln
535 else
536 as_ln_s='cp -pR'
537 fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800538else
Greg Hartman9768ca42017-06-22 20:49:52 -0700539 as_ln_s='cp -pR'
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800540fi
541rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542rmdir conf$$.dir 2>/dev/null
543
544if mkdir -p . 2>/dev/null; then
Greg Hartman9768ca42017-06-22 20:49:52 -0700545 as_mkdir_p='mkdir -p "$as_dir"'
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800546else
547 test -d ./-p && rmdir ./-p
548 as_mkdir_p=false
549fi
550
Greg Hartman9768ca42017-06-22 20:49:52 -0700551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800553
554# Sed expression to map a string onto a valid CPP name.
555as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
556
557# Sed expression to map a string onto a valid variable name.
558as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
559
560
Greg Hartman9768ca42017-06-22 20:49:52 -0700561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800563
564# Name of the host.
Greg Hartman9768ca42017-06-22 20:49:52 -0700565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800566# so uname gets run too.
567ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
569#
570# Initializations.
571#
572ac_default_prefix=/usr/local
573ac_clean_files=
574ac_config_libobj_dir=.
575LIBOBJS=
576cross_compiling=no
577subdirs=
578MFLAGS=
579MAKEFLAGS=
580
581# Identity of this package.
582PACKAGE_NAME='OpenSSH'
583PACKAGE_TARNAME='openssh'
584PACKAGE_VERSION='Portable'
585PACKAGE_STRING='OpenSSH Portable'
586PACKAGE_BUGREPORT='openssh-unix-dev@mindrot.org'
Greg Hartman9768ca42017-06-22 20:49:52 -0700587PACKAGE_URL=''
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800588
589ac_unique_file="ssh.c"
590# Factoring default headers for most tests.
591ac_includes_default="\
592#include <stdio.h>
593#ifdef HAVE_SYS_TYPES_H
594# include <sys/types.h>
595#endif
596#ifdef HAVE_SYS_STAT_H
597# include <sys/stat.h>
598#endif
599#ifdef STDC_HEADERS
600# include <stdlib.h>
601# include <stddef.h>
602#else
603# ifdef HAVE_STDLIB_H
604# include <stdlib.h>
605# endif
606#endif
607#ifdef HAVE_STRING_H
608# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
609# include <memory.h>
610# endif
611# include <string.h>
612#endif
613#ifdef HAVE_STRINGS_H
614# include <strings.h>
615#endif
616#ifdef HAVE_INTTYPES_H
617# include <inttypes.h>
618#endif
619#ifdef HAVE_STDINT_H
620# include <stdint.h>
621#endif
622#ifdef HAVE_UNISTD_H
623# include <unistd.h>
624#endif"
625
Greg Hartman9768ca42017-06-22 20:49:52 -0700626ac_subst_vars='LTLIBOBJS
Adam Langleyd0592972015-03-30 14:49:51 -0700627LIBOBJS
Greg Hartman9768ca42017-06-22 20:49:52 -0700628UNSUPPORTED_ALGORITHMS
629TEST_MALLOC_OPTIONS
630TEST_SSH_UTF8
631TEST_SSH_IPV6
632piddir
633user_path
634mansubdir
635MANTYPE
636XAUTH_PATH
637STRIP_OPT
638xauth_path
639PRIVSEP_PATH
640K5LIBS
641GSSLIBS
642KRB5CONF
643SSHDLIBS
644SSHLIBS
645SSH_PRIVSEP_USER
646COMMENT_OUT_ECC
647TEST_SSH_ECC
648LIBEDIT
649PKGCONFIG
650LDNSCONFIG
651COMMENT_OUT_RSA1
652LD
653PATH_PASSWD_PROG
654STARTUP_SCRIPT_SHELL
655MAKE_PACKAGE_SUPPORTED
656PATH_USERADD_PROG
657PATH_GROUPADD_PROG
658MANFMT
659TEST_SHELL
660MANDOC
661NROFF
662GROFF
663SH
664TEST_MINUS_S_SH
665ENT
666SED
667PERL
668KILL
669CAT
670ac_ct_AR
671AR
672INSTALL_DATA
673INSTALL_SCRIPT
674INSTALL_PROGRAM
675RANLIB
676AWK
677EGREP
678GREP
679CPP
680host_os
681host_vendor
682host_cpu
683host
684build_os
685build_vendor
686build_cpu
687build
688OBJEXT
689EXEEXT
690ac_ct_CC
691CPPFLAGS
692LDFLAGS
693CFLAGS
694CC
695target_alias
696host_alias
697build_alias
698LIBS
699ECHO_T
700ECHO_N
701ECHO_C
702DEFS
703mandir
704localedir
705libdir
706psdir
707pdfdir
708dvidir
709htmldir
710infodir
711docdir
712oldincludedir
713includedir
714localstatedir
715sharedstatedir
716sysconfdir
717datadir
718datarootdir
719libexecdir
720sbindir
721bindir
722program_transform_name
723prefix
724exec_prefix
725PACKAGE_URL
726PACKAGE_BUGREPORT
727PACKAGE_STRING
728PACKAGE_VERSION
729PACKAGE_TARNAME
730PACKAGE_NAME
731PATH_SEPARATOR
732SHELL'
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800733ac_subst_files=''
Greg Hartman9768ca42017-06-22 20:49:52 -0700734ac_user_opts='
735enable_option_checking
736enable_largefile
737with_openssl
738with_ssh1
739with_stackprotect
740with_hardening
741with_rpath
742with_cflags
743with_cppflags
744with_ldflags
745with_libs
746with_Werror
747with_solaris_contracts
748with_solaris_projects
749with_solaris_privs
750with_osfsia
751with_zlib
752with_zlib_version_check
753with_skey
754with_ldns
755with_libedit
756with_audit
757with_pie
758enable_pkcs11
759with_ssl_dir
760with_openssl_header_check
761with_ssl_engine
762with_prngd_port
763with_prngd_socket
764with_pam
765with_pam_service
766with_privsep_user
767with_sandbox
768with_selinux
769with_kerberos5
770with_privsep_path
771with_xauth
772enable_strip
773with_maildir
774with_mantype
775with_md5_passwords
776with_shadow
777with_ipaddr_display
778enable_etc_default_login
779with_default_path
780with_superuser_path
781with_4in6
782with_bsd_auth
783with_pid_dir
784enable_lastlog
785enable_utmp
786enable_utmpx
787enable_wtmp
788enable_wtmpx
789enable_libutil
790enable_pututline
791enable_pututxline
792with_lastlog
793'
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800794 ac_precious_vars='build_alias
795host_alias
796target_alias
797CC
798CFLAGS
799LDFLAGS
800LIBS
801CPPFLAGS
802CPP'
803
804
805# Initialize some variables set by options.
806ac_init_help=
807ac_init_version=false
Greg Hartman9768ca42017-06-22 20:49:52 -0700808ac_unrecognized_opts=
809ac_unrecognized_sep=
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800810# The variables have the same names as the options, with
811# dashes changed to underlines.
812cache_file=/dev/null
813exec_prefix=NONE
814no_create=
815no_recursion=
816prefix=NONE
817program_prefix=NONE
818program_suffix=NONE
819program_transform_name=s,x,x,
820silent=
821site=
822srcdir=
823verbose=
824x_includes=NONE
825x_libraries=NONE
826
827# Installation directory options.
828# These are left unexpanded so users can "make install exec_prefix=/foo"
829# and all the variables that are supposed to be based on exec_prefix
830# by default will actually change.
831# Use braces instead of parens because sh, perl, etc. also accept them.
832# (The list follows the same order as the GNU Coding Standards.)
833bindir='${exec_prefix}/bin'
834sbindir='${exec_prefix}/sbin'
835libexecdir='${exec_prefix}/libexec'
836datarootdir='${prefix}/share'
837datadir='${datarootdir}'
838sysconfdir='${prefix}/etc'
839sharedstatedir='${prefix}/com'
840localstatedir='${prefix}/var'
841includedir='${prefix}/include'
842oldincludedir='/usr/include'
843docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
844infodir='${datarootdir}/info'
845htmldir='${docdir}'
846dvidir='${docdir}'
847pdfdir='${docdir}'
848psdir='${docdir}'
849libdir='${exec_prefix}/lib'
850localedir='${datarootdir}/locale'
851mandir='${datarootdir}/man'
852
853ac_prev=
854ac_dashdash=
855for ac_option
856do
857 # If the previous option needs an argument, assign it.
858 if test -n "$ac_prev"; then
859 eval $ac_prev=\$ac_option
860 ac_prev=
861 continue
862 fi
863
864 case $ac_option in
Greg Hartman9768ca42017-06-22 20:49:52 -0700865 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
866 *=) ac_optarg= ;;
867 *) ac_optarg=yes ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800868 esac
869
870 # Accept the important Cygnus configure options, so we can diagnose typos.
871
872 case $ac_dashdash$ac_option in
873 --)
874 ac_dashdash=yes ;;
875
876 -bindir | --bindir | --bindi | --bind | --bin | --bi)
877 ac_prev=bindir ;;
878 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
879 bindir=$ac_optarg ;;
880
881 -build | --build | --buil | --bui | --bu)
882 ac_prev=build_alias ;;
883 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
884 build_alias=$ac_optarg ;;
885
886 -cache-file | --cache-file | --cache-fil | --cache-fi \
887 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
888 ac_prev=cache_file ;;
889 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
890 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
891 cache_file=$ac_optarg ;;
892
893 --config-cache | -C)
894 cache_file=config.cache ;;
895
896 -datadir | --datadir | --datadi | --datad)
897 ac_prev=datadir ;;
898 -datadir=* | --datadir=* | --datadi=* | --datad=*)
899 datadir=$ac_optarg ;;
900
901 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
902 | --dataroo | --dataro | --datar)
903 ac_prev=datarootdir ;;
904 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
905 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
906 datarootdir=$ac_optarg ;;
907
908 -disable-* | --disable-*)
Greg Hartman9768ca42017-06-22 20:49:52 -0700909 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800910 # Reject names that are not valid shell variable names.
Greg Hartman9768ca42017-06-22 20:49:52 -0700911 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
912 as_fn_error $? "invalid feature name: $ac_useropt"
913 ac_useropt_orig=$ac_useropt
914 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
915 case $ac_user_opts in
916 *"
917"enable_$ac_useropt"
918"*) ;;
919 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
920 ac_unrecognized_sep=', ';;
921 esac
922 eval enable_$ac_useropt=no ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800923
924 -docdir | --docdir | --docdi | --doc | --do)
925 ac_prev=docdir ;;
926 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
927 docdir=$ac_optarg ;;
928
929 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
930 ac_prev=dvidir ;;
931 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
932 dvidir=$ac_optarg ;;
933
934 -enable-* | --enable-*)
Greg Hartman9768ca42017-06-22 20:49:52 -0700935 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800936 # Reject names that are not valid shell variable names.
Greg Hartman9768ca42017-06-22 20:49:52 -0700937 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
938 as_fn_error $? "invalid feature name: $ac_useropt"
939 ac_useropt_orig=$ac_useropt
940 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
941 case $ac_user_opts in
942 *"
943"enable_$ac_useropt"
944"*) ;;
945 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
946 ac_unrecognized_sep=', ';;
947 esac
948 eval enable_$ac_useropt=\$ac_optarg ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -0800949
950 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
951 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
952 | --exec | --exe | --ex)
953 ac_prev=exec_prefix ;;
954 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
955 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
956 | --exec=* | --exe=* | --ex=*)
957 exec_prefix=$ac_optarg ;;
958
959 -gas | --gas | --ga | --g)
960 # Obsolete; use --with-gas.
961 with_gas=yes ;;
962
963 -help | --help | --hel | --he | -h)
964 ac_init_help=long ;;
965 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
966 ac_init_help=recursive ;;
967 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
968 ac_init_help=short ;;
969
970 -host | --host | --hos | --ho)
971 ac_prev=host_alias ;;
972 -host=* | --host=* | --hos=* | --ho=*)
973 host_alias=$ac_optarg ;;
974
975 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
976 ac_prev=htmldir ;;
977 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
978 | --ht=*)
979 htmldir=$ac_optarg ;;
980
981 -includedir | --includedir | --includedi | --included | --include \
982 | --includ | --inclu | --incl | --inc)
983 ac_prev=includedir ;;
984 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
985 | --includ=* | --inclu=* | --incl=* | --inc=*)
986 includedir=$ac_optarg ;;
987
988 -infodir | --infodir | --infodi | --infod | --info | --inf)
989 ac_prev=infodir ;;
990 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
991 infodir=$ac_optarg ;;
992
993 -libdir | --libdir | --libdi | --libd)
994 ac_prev=libdir ;;
995 -libdir=* | --libdir=* | --libdi=* | --libd=*)
996 libdir=$ac_optarg ;;
997
998 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
999 | --libexe | --libex | --libe)
1000 ac_prev=libexecdir ;;
1001 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1002 | --libexe=* | --libex=* | --libe=*)
1003 libexecdir=$ac_optarg ;;
1004
1005 -localedir | --localedir | --localedi | --localed | --locale)
1006 ac_prev=localedir ;;
1007 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1008 localedir=$ac_optarg ;;
1009
1010 -localstatedir | --localstatedir | --localstatedi | --localstated \
1011 | --localstate | --localstat | --localsta | --localst | --locals)
1012 ac_prev=localstatedir ;;
1013 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1014 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1015 localstatedir=$ac_optarg ;;
1016
1017 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1018 ac_prev=mandir ;;
1019 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1020 mandir=$ac_optarg ;;
1021
1022 -nfp | --nfp | --nf)
1023 # Obsolete; use --without-fp.
1024 with_fp=no ;;
1025
1026 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1027 | --no-cr | --no-c | -n)
1028 no_create=yes ;;
1029
1030 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1031 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1032 no_recursion=yes ;;
1033
1034 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1035 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1036 | --oldin | --oldi | --old | --ol | --o)
1037 ac_prev=oldincludedir ;;
1038 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1039 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1040 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1041 oldincludedir=$ac_optarg ;;
1042
1043 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1044 ac_prev=prefix ;;
1045 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1046 prefix=$ac_optarg ;;
1047
1048 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1049 | --program-pre | --program-pr | --program-p)
1050 ac_prev=program_prefix ;;
1051 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1052 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1053 program_prefix=$ac_optarg ;;
1054
1055 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1056 | --program-suf | --program-su | --program-s)
1057 ac_prev=program_suffix ;;
1058 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1059 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1060 program_suffix=$ac_optarg ;;
1061
1062 -program-transform-name | --program-transform-name \
1063 | --program-transform-nam | --program-transform-na \
1064 | --program-transform-n | --program-transform- \
1065 | --program-transform | --program-transfor \
1066 | --program-transfo | --program-transf \
1067 | --program-trans | --program-tran \
1068 | --progr-tra | --program-tr | --program-t)
1069 ac_prev=program_transform_name ;;
1070 -program-transform-name=* | --program-transform-name=* \
1071 | --program-transform-nam=* | --program-transform-na=* \
1072 | --program-transform-n=* | --program-transform-=* \
1073 | --program-transform=* | --program-transfor=* \
1074 | --program-transfo=* | --program-transf=* \
1075 | --program-trans=* | --program-tran=* \
1076 | --progr-tra=* | --program-tr=* | --program-t=*)
1077 program_transform_name=$ac_optarg ;;
1078
1079 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1080 ac_prev=pdfdir ;;
1081 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1082 pdfdir=$ac_optarg ;;
1083
1084 -psdir | --psdir | --psdi | --psd | --ps)
1085 ac_prev=psdir ;;
1086 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1087 psdir=$ac_optarg ;;
1088
1089 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1090 | -silent | --silent | --silen | --sile | --sil)
1091 silent=yes ;;
1092
1093 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1094 ac_prev=sbindir ;;
1095 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1096 | --sbi=* | --sb=*)
1097 sbindir=$ac_optarg ;;
1098
1099 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1100 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1101 | --sharedst | --shareds | --shared | --share | --shar \
1102 | --sha | --sh)
1103 ac_prev=sharedstatedir ;;
1104 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1105 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1106 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1107 | --sha=* | --sh=*)
1108 sharedstatedir=$ac_optarg ;;
1109
1110 -site | --site | --sit)
1111 ac_prev=site ;;
1112 -site=* | --site=* | --sit=*)
1113 site=$ac_optarg ;;
1114
1115 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1116 ac_prev=srcdir ;;
1117 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1118 srcdir=$ac_optarg ;;
1119
1120 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1121 | --syscon | --sysco | --sysc | --sys | --sy)
1122 ac_prev=sysconfdir ;;
1123 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1124 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1125 sysconfdir=$ac_optarg ;;
1126
1127 -target | --target | --targe | --targ | --tar | --ta | --t)
1128 ac_prev=target_alias ;;
1129 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1130 target_alias=$ac_optarg ;;
1131
1132 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1133 verbose=yes ;;
1134
1135 -version | --version | --versio | --versi | --vers | -V)
1136 ac_init_version=: ;;
1137
1138 -with-* | --with-*)
Greg Hartman9768ca42017-06-22 20:49:52 -07001139 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001140 # Reject names that are not valid shell variable names.
Greg Hartman9768ca42017-06-22 20:49:52 -07001141 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1142 as_fn_error $? "invalid package name: $ac_useropt"
1143 ac_useropt_orig=$ac_useropt
1144 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1145 case $ac_user_opts in
1146 *"
1147"with_$ac_useropt"
1148"*) ;;
1149 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1150 ac_unrecognized_sep=', ';;
1151 esac
1152 eval with_$ac_useropt=\$ac_optarg ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001153
1154 -without-* | --without-*)
Greg Hartman9768ca42017-06-22 20:49:52 -07001155 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001156 # Reject names that are not valid shell variable names.
Greg Hartman9768ca42017-06-22 20:49:52 -07001157 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1158 as_fn_error $? "invalid package name: $ac_useropt"
1159 ac_useropt_orig=$ac_useropt
1160 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1161 case $ac_user_opts in
1162 *"
1163"with_$ac_useropt"
1164"*) ;;
1165 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1166 ac_unrecognized_sep=', ';;
1167 esac
1168 eval with_$ac_useropt=no ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001169
1170 --x)
1171 # Obsolete; use --with-x.
1172 with_x=yes ;;
1173
1174 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1175 | --x-incl | --x-inc | --x-in | --x-i)
1176 ac_prev=x_includes ;;
1177 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1178 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1179 x_includes=$ac_optarg ;;
1180
1181 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1182 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1183 ac_prev=x_libraries ;;
1184 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1185 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1186 x_libraries=$ac_optarg ;;
1187
Greg Hartman9768ca42017-06-22 20:49:52 -07001188 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1189Try \`$0 --help' for more information"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001190 ;;
1191
1192 *=*)
1193 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1194 # Reject names that are not valid shell variable names.
Greg Hartman9768ca42017-06-22 20:49:52 -07001195 case $ac_envvar in #(
1196 '' | [0-9]* | *[!_$as_cr_alnum]* )
1197 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1198 esac
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001199 eval $ac_envvar=\$ac_optarg
1200 export $ac_envvar ;;
1201
1202 *)
1203 # FIXME: should be removed in autoconf 3.0.
Greg Hartman9768ca42017-06-22 20:49:52 -07001204 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001205 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
Greg Hartman9768ca42017-06-22 20:49:52 -07001206 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1207 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001208 ;;
1209
1210 esac
1211done
1212
1213if test -n "$ac_prev"; then
1214 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
Greg Hartman9768ca42017-06-22 20:49:52 -07001215 as_fn_error $? "missing argument to $ac_option"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001216fi
1217
Greg Hartman9768ca42017-06-22 20:49:52 -07001218if test -n "$ac_unrecognized_opts"; then
1219 case $enable_option_checking in
1220 no) ;;
1221 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1222 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1223 esac
1224fi
1225
1226# Check all directory arguments for consistency.
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001227for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1228 datadir sysconfdir sharedstatedir localstatedir includedir \
1229 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1230 libdir localedir mandir
1231do
1232 eval ac_val=\$$ac_var
Greg Hartman9768ca42017-06-22 20:49:52 -07001233 # Remove trailing slashes.
1234 case $ac_val in
1235 */ )
1236 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1237 eval $ac_var=\$ac_val;;
1238 esac
1239 # Be sure to have absolute directory names.
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001240 case $ac_val in
1241 [\\/$]* | ?:[\\/]* ) continue;;
1242 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1243 esac
Greg Hartman9768ca42017-06-22 20:49:52 -07001244 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001245done
1246
1247# There might be people who depend on the old broken behavior: `$host'
1248# used to hold the argument of --host etc.
1249# FIXME: To remove some day.
1250build=$build_alias
1251host=$host_alias
1252target=$target_alias
1253
1254# FIXME: To remove some day.
1255if test "x$host_alias" != x; then
1256 if test "x$build_alias" = x; then
1257 cross_compiling=maybe
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001258 elif test "x$build_alias" != "x$host_alias"; then
1259 cross_compiling=yes
1260 fi
1261fi
1262
1263ac_tool_prefix=
1264test -n "$host_alias" && ac_tool_prefix=$host_alias-
1265
1266test "$silent" = yes && exec 6>/dev/null
1267
1268
1269ac_pwd=`pwd` && test -n "$ac_pwd" &&
1270ac_ls_di=`ls -di .` &&
1271ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
Greg Hartman9768ca42017-06-22 20:49:52 -07001272 as_fn_error $? "working directory cannot be determined"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001273test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
Greg Hartman9768ca42017-06-22 20:49:52 -07001274 as_fn_error $? "pwd does not report name of working directory"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001275
1276
1277# Find the source files, if location was not specified.
1278if test -z "$srcdir"; then
1279 ac_srcdir_defaulted=yes
1280 # Try the directory containing this script, then the parent directory.
Greg Hartman9768ca42017-06-22 20:49:52 -07001281 ac_confdir=`$as_dirname -- "$as_myself" ||
1282$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1283 X"$as_myself" : 'X\(//\)[^/]' \| \
1284 X"$as_myself" : 'X\(//\)$' \| \
1285 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1286$as_echo X"$as_myself" |
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001287 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1288 s//\1/
1289 q
1290 }
1291 /^X\(\/\/\)[^/].*/{
1292 s//\1/
1293 q
1294 }
1295 /^X\(\/\/\)$/{
1296 s//\1/
1297 q
1298 }
1299 /^X\(\/\).*/{
1300 s//\1/
1301 q
1302 }
1303 s/.*/./; q'`
1304 srcdir=$ac_confdir
1305 if test ! -r "$srcdir/$ac_unique_file"; then
1306 srcdir=..
1307 fi
1308else
1309 ac_srcdir_defaulted=no
1310fi
1311if test ! -r "$srcdir/$ac_unique_file"; then
1312 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
Greg Hartman9768ca42017-06-22 20:49:52 -07001313 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001314fi
1315ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1316ac_abs_confdir=`(
Greg Hartman9768ca42017-06-22 20:49:52 -07001317 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001318 pwd)`
1319# When building in place, set srcdir=.
1320if test "$ac_abs_confdir" = "$ac_pwd"; then
1321 srcdir=.
1322fi
1323# Remove unnecessary trailing slashes from srcdir.
1324# Double slashes in file names in object file debugging info
1325# mess up M-x gdb in Emacs.
1326case $srcdir in
1327*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1328esac
1329for ac_var in $ac_precious_vars; do
1330 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1331 eval ac_env_${ac_var}_value=\$${ac_var}
1332 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1333 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1334done
1335
1336#
1337# Report the --help message.
1338#
1339if test "$ac_init_help" = "long"; then
1340 # Omit some internal or obsolete options to make the list less imposing.
1341 # This message is too long to be a string in the A/UX 3.1 sh.
1342 cat <<_ACEOF
1343\`configure' configures OpenSSH Portable to adapt to many kinds of systems.
1344
1345Usage: $0 [OPTION]... [VAR=VALUE]...
1346
1347To assign environment variables (e.g., CC, CFLAGS...), specify them as
1348VAR=VALUE. See below for descriptions of some of the useful variables.
1349
1350Defaults for the options are specified in brackets.
1351
1352Configuration:
1353 -h, --help display this help and exit
1354 --help=short display options specific to this package
1355 --help=recursive display the short help of all the included packages
1356 -V, --version display version information and exit
Greg Hartman9768ca42017-06-22 20:49:52 -07001357 -q, --quiet, --silent do not print \`checking ...' messages
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001358 --cache-file=FILE cache test results in FILE [disabled]
1359 -C, --config-cache alias for \`--cache-file=config.cache'
1360 -n, --no-create do not create output files
1361 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1362
1363Installation directories:
1364 --prefix=PREFIX install architecture-independent files in PREFIX
Greg Hartman9768ca42017-06-22 20:49:52 -07001365 [$ac_default_prefix]
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001366 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
Greg Hartman9768ca42017-06-22 20:49:52 -07001367 [PREFIX]
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001368
1369By default, \`make install' will install all the files in
1370\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1371an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1372for instance \`--prefix=\$HOME'.
1373
1374For better control, use the options below.
1375
1376Fine tuning of the installation directories:
Greg Hartman9768ca42017-06-22 20:49:52 -07001377 --bindir=DIR user executables [EPREFIX/bin]
1378 --sbindir=DIR system admin executables [EPREFIX/sbin]
1379 --libexecdir=DIR program executables [EPREFIX/libexec]
1380 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1381 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1382 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1383 --libdir=DIR object code libraries [EPREFIX/lib]
1384 --includedir=DIR C header files [PREFIX/include]
1385 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1386 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1387 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1388 --infodir=DIR info documentation [DATAROOTDIR/info]
1389 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1390 --mandir=DIR man documentation [DATAROOTDIR/man]
1391 --docdir=DIR documentation root [DATAROOTDIR/doc/openssh]
1392 --htmldir=DIR html documentation [DOCDIR]
1393 --dvidir=DIR dvi documentation [DOCDIR]
1394 --pdfdir=DIR pdf documentation [DOCDIR]
1395 --psdir=DIR ps documentation [DOCDIR]
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001396_ACEOF
1397
1398 cat <<\_ACEOF
1399
1400System types:
1401 --build=BUILD configure for building on BUILD [guessed]
1402 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1403_ACEOF
1404fi
1405
1406if test -n "$ac_init_help"; then
1407 case $ac_init_help in
1408 short | recursive ) echo "Configuration of OpenSSH Portable:";;
1409 esac
1410 cat <<\_ACEOF
1411
1412Optional Features:
Greg Hartman9768ca42017-06-22 20:49:52 -07001413 --disable-option-checking ignore unrecognized --enable/--with options
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001414 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1415 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1416 --disable-largefile omit support for large files
Greg Hartman9768ca42017-06-22 20:49:52 -07001417 --disable-pkcs11 disable PKCS#11 support code [no]
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001418 --disable-strip Disable calling strip(1) on install
1419 --disable-etc-default-login Disable using PATH from /etc/default/login no
1420 --disable-lastlog disable use of lastlog even if detected no
1421 --disable-utmp disable use of utmp even if detected no
1422 --disable-utmpx disable use of utmpx even if detected no
1423 --disable-wtmp disable use of wtmp even if detected no
1424 --disable-wtmpx disable use of wtmpx even if detected no
1425 --disable-libutil disable use of libutil (login() etc.) no
1426 --disable-pututline disable use of pututline() etc. (uwtmp) no
1427 --disable-pututxline disable use of pututxline() etc. (uwtmpx) no
1428
1429Optional Packages:
1430 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1431 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
Adam Langleyd0592972015-03-30 14:49:51 -07001432 --without-openssl Disable use of OpenSSL; use only limited internal crypto **EXPERIMENTAL**
Greg Hartman9768ca42017-06-22 20:49:52 -07001433 --with-ssh1 Enable support for SSH protocol 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001434 --without-stackprotect Don't use compiler's stack protection
Adam Langleyd0592972015-03-30 14:49:51 -07001435 --without-hardening Don't use toolchain hardening flags
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001436 --without-rpath Disable auto-added -R linker paths
1437 --with-cflags Specify additional flags to pass to compiler
1438 --with-cppflags Specify additional flags to pass to preprocessor
1439 --with-ldflags Specify additional flags to pass to linker
1440 --with-libs Specify additional libraries to link with
1441 --with-Werror Build main code with -Werror
1442 --with-solaris-contracts Enable Solaris process contracts (experimental)
1443 --with-solaris-projects Enable Solaris projects (experimental)
Greg Hartman9768ca42017-06-22 20:49:52 -07001444 --with-solaris-privs Enable Solaris/Illumos privileges (experimental)
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001445 --with-osfsia Enable Digital Unix SIA
1446 --with-zlib=PATH Use zlib in PATH
1447 --without-zlib-version-check Disable zlib version check
1448 --with-skey[=PATH] Enable S/Key support (optionally in PATH)
Adam Langleyd0592972015-03-30 14:49:51 -07001449 --with-ldns[=PATH] Use ldns for DNSSEC support (optionally in PATH)
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001450 --with-libedit[=PATH] Enable libedit support for sftp
1451 --with-audit=module Enable audit support (modules=debug,bsm,linux)
Adam Langleyd0592972015-03-30 14:49:51 -07001452 --with-pie Build Position Independent Executables if possible
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001453 --with-ssl-dir=PATH Specify path to OpenSSL installation
1454 --without-openssl-header-check Disable OpenSSL version consistency check
1455 --with-ssl-engine Enable OpenSSL (hardware) ENGINE support
1456 --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT
1457 --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)
1458 --with-pam Enable PAM support
Greg Hartman9768ca42017-06-22 20:49:52 -07001459 --with-pam-service=name Specify PAM service name
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001460 --with-privsep-user=user Specify non-privileged user for privilege separation
Greg Hartman9768ca42017-06-22 20:49:52 -07001461 --with-sandbox=style Specify privilege separation sandbox (no, capsicum, darwin, rlimit, seccomp_filter, systrace, pledge)
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001462 --with-selinux Enable SELinux support
1463 --with-kerberos5=PATH Enable Kerberos 5 support
1464 --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)
1465 --with-xauth=PATH Specify path to xauth program
1466 --with-maildir=/path/to/mail Specify your system mail directory
1467 --with-mantype=man|cat|doc Set man page type
1468 --with-md5-passwords Enable use of MD5 passwords
1469 --without-shadow Disable shadow password support
Greg Hartmanccacbc92016-02-03 09:59:44 -08001470 --with-ipaddr-display Use ip address instead of hostname in $DISPLAY
1471 --with-default-path= Specify default $PATH environment for server
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001472 --with-superuser-path= Specify different path for super-user
1473 --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses
1474 --with-bsd-auth Enable BSD auth support
1475 --with-pid-dir=PATH Specify location of ssh.pid file
1476 --with-lastlog=FILE|DIR specify lastlog location common locations
1477
1478Some influential environment variables:
1479 CC C compiler command
1480 CFLAGS C compiler flags
1481 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1482 nonstandard directory <lib dir>
1483 LIBS libraries to pass to the linker, e.g. -l<library>
Greg Hartman9768ca42017-06-22 20:49:52 -07001484 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001485 you have headers in a nonstandard directory <include dir>
1486 CPP C preprocessor
1487
1488Use these variables to override the choices made by `configure' or to help
1489it to find libraries and programs with nonstandard names/locations.
1490
1491Report bugs to <openssh-unix-dev@mindrot.org>.
1492_ACEOF
1493ac_status=$?
1494fi
1495
1496if test "$ac_init_help" = "recursive"; then
1497 # If there are subdirs, report their specific --help.
1498 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
Greg Hartman9768ca42017-06-22 20:49:52 -07001499 test -d "$ac_dir" ||
1500 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1501 continue
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001502 ac_builddir=.
1503
1504case "$ac_dir" in
1505.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1506*)
Greg Hartman9768ca42017-06-22 20:49:52 -07001507 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001508 # A ".." for each directory in $ac_dir_suffix.
Greg Hartman9768ca42017-06-22 20:49:52 -07001509 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001510 case $ac_top_builddir_sub in
1511 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1512 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1513 esac ;;
1514esac
1515ac_abs_top_builddir=$ac_pwd
1516ac_abs_builddir=$ac_pwd$ac_dir_suffix
1517# for backward compatibility:
1518ac_top_builddir=$ac_top_build_prefix
1519
1520case $srcdir in
1521 .) # We are building in place.
1522 ac_srcdir=.
1523 ac_top_srcdir=$ac_top_builddir_sub
1524 ac_abs_top_srcdir=$ac_pwd ;;
1525 [\\/]* | ?:[\\/]* ) # Absolute name.
1526 ac_srcdir=$srcdir$ac_dir_suffix;
1527 ac_top_srcdir=$srcdir
1528 ac_abs_top_srcdir=$srcdir ;;
1529 *) # Relative name.
1530 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1531 ac_top_srcdir=$ac_top_build_prefix$srcdir
1532 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1533esac
1534ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1535
1536 cd "$ac_dir" || { ac_status=$?; continue; }
1537 # Check for guested configure.
1538 if test -f "$ac_srcdir/configure.gnu"; then
1539 echo &&
1540 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1541 elif test -f "$ac_srcdir/configure"; then
1542 echo &&
1543 $SHELL "$ac_srcdir/configure" --help=recursive
1544 else
Greg Hartman9768ca42017-06-22 20:49:52 -07001545 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001546 fi || ac_status=$?
1547 cd "$ac_pwd" || { ac_status=$?; break; }
1548 done
1549fi
1550
1551test -n "$ac_init_help" && exit $ac_status
1552if $ac_init_version; then
1553 cat <<\_ACEOF
1554OpenSSH configure Portable
Greg Hartman9768ca42017-06-22 20:49:52 -07001555generated by GNU Autoconf 2.69
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001556
Greg Hartman9768ca42017-06-22 20:49:52 -07001557Copyright (C) 2012 Free Software Foundation, Inc.
Greg Hartmanbd77cf72015-02-25 13:21:06 -08001558This configure script is free software; the Free Software Foundation
1559gives unlimited permission to copy, distribute and modify it.
1560_ACEOF
1561 exit
1562fi
Greg Hartman9768ca42017-06-22 20:49:52 -07001563
1564## ------------------------ ##
1565## Autoconf initialization. ##
1566## ------------------------ ##
1567
1568# ac_fn_c_try_compile LINENO
1569# --------------------------
1570# Try to compile conftest.$ac_ext, and return whether this succeeded.
1571ac_fn_c_try_compile ()
1572{
1573 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1574 rm -f conftest.$ac_objext
1575 if { { ac_try="$ac_compile"
1576case "(($ac_try" in
1577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1578 *) ac_try_echo=$ac_try;;
1579esac
1580eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1581$as_echo "$ac_try_echo"; } >&5
1582 (eval "$ac_compile") 2>conftest.err
1583 ac_status=$?
1584 if test -s conftest.err; then
1585 grep -v '^ *+' conftest.err >conftest.er1
1586 cat conftest.er1 >&5
1587 mv -f conftest.er1 conftest.err
1588 fi
1589 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1590 test $ac_status = 0; } && {
1591 test -z "$ac_c_werror_flag" ||
1592 test ! -s conftest.err
1593 } && test -s conftest.$ac_objext; then :
1594 ac_retval=0
1595else
1596 $as_echo "$as_me: failed program was:" >&5
1597sed 's/^/| /' conftest.$ac_ext >&5
1598
1599 ac_retval=1
1600fi
1601 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1602 as_fn_set_status $ac_retval
1603
1604} # ac_fn_c_try_compile
1605
1606# ac_fn_c_try_run LINENO
1607# ----------------------
1608# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1609# that executables *can* be run.
1610ac_fn_c_try_run ()
1611{
1612 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1613 if { { ac_try="$ac_link"
1614case "(($ac_try" in
1615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1616 *) ac_try_echo=$ac_try;;
1617esac
1618eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1619$as_echo "$ac_try_echo"; } >&5
1620 (eval "$ac_link") 2>&5
1621 ac_status=$?
1622 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1623 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1624 { { case "(($ac_try" in
1625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1626 *) ac_try_echo=$ac_try;;
1627esac
1628eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1629$as_echo "$ac_try_echo"; } >&5
1630 (eval "$ac_try") 2>&5
1631 ac_status=$?
1632 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1633 test $ac_status = 0; }; }; then :
1634 ac_retval=0
1635else
1636 $as_echo "$as_me: program exited with status $ac_status" >&5
1637 $as_echo "$as_me: failed program was:" >&5
1638sed 's/^/| /' conftest.$ac_ext >&5
1639
1640 ac_retval=$ac_status
1641fi
1642 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1643 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1644 as_fn_set_status $ac_retval
1645
1646} # ac_fn_c_try_run
1647
1648# ac_fn_c_try_cpp LINENO
1649# ----------------------
1650# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1651ac_fn_c_try_cpp ()
1652{
1653 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1654 if { { ac_try="$ac_cpp conftest.$ac_ext"
1655case "(($ac_try" in
1656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1657 *) ac_try_echo=$ac_try;;
1658esac
1659eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1660$as_echo "$ac_try_echo"; } >&5
1661 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1662 ac_status=$?
1663 if test -s conftest.err; then
1664 grep -v '^ *+' conftest.err >conftest.er1
1665 cat conftest.er1 >&5
1666 mv -f conftest.er1 conftest.err
1667 fi
1668 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1669 test $ac_status = 0; } > conftest.i && {
1670 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1671 test ! -s conftest.err
1672 }; then :
1673 ac_retval=0
1674else
1675 $as_echo "$as_me: failed program was:" >&5
1676sed 's/^/| /' conftest.$ac_ext >&5
1677
1678 ac_retval=1
1679fi
1680 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1681 as_fn_set_status $ac_retval
1682
1683} # ac_fn_c_try_cpp
1684
1685# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1686# -------------------------------------------------------
1687# Tests whether HEADER exists and can be compiled using the include files in
1688# INCLUDES, setting the cache variable VAR accordingly.
1689ac_fn_c_check_header_compile ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1693$as_echo_n "checking for $2... " >&6; }
1694if eval \${$3+:} false; then :
1695 $as_echo_n "(cached) " >&6
1696else
1697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1698/* end confdefs.h. */
1699$4
1700#include <$2>
1701_ACEOF
1702if ac_fn_c_try_compile "$LINENO"; then :
1703 eval "$3=yes"
1704else
1705 eval "$3=no"
1706fi
1707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1708fi
1709eval ac_res=\$$3
1710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1711$as_echo "$ac_res" >&6; }
1712 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1713
1714} # ac_fn_c_check_header_compile
1715
1716# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1717# ---------------------------------------------
1718# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1719# accordingly.
1720ac_fn_c_check_decl ()
1721{
1722 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1723 as_decl_name=`echo $2|sed 's/ *(.*//'`
1724 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1726$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1727if eval \${$3+:} false; then :
1728 $as_echo_n "(cached) " >&6
1729else
1730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1731/* end confdefs.h. */
1732$4
1733int
1734main ()
1735{
1736#ifndef $as_decl_name
1737#ifdef __cplusplus
1738 (void) $as_decl_use;
1739#else
1740 (void) $as_decl_name;
1741#endif
1742#endif
1743
1744 ;
1745 return 0;
1746}
1747_ACEOF
1748if ac_fn_c_try_compile "$LINENO"; then :
1749 eval "$3=yes"
1750else
1751 eval "$3=no"
1752fi
1753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1754fi
1755eval ac_res=\$$3
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1757$as_echo "$ac_res" >&6; }
1758 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1759
1760} # ac_fn_c_check_decl
1761
1762# ac_fn_c_try_link LINENO
1763# -----------------------
1764# Try to link conftest.$ac_ext, and return whether this succeeded.
1765ac_fn_c_try_link ()
1766{
1767 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1768 rm -f conftest.$ac_objext conftest$ac_exeext
1769 if { { ac_try="$ac_link"
1770case "(($ac_try" in
1771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1772 *) ac_try_echo=$ac_try;;
1773esac
1774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1775$as_echo "$ac_try_echo"; } >&5
1776 (eval "$ac_link") 2>conftest.err
1777 ac_status=$?
1778 if test -s conftest.err; then
1779 grep -v '^ *+' conftest.err >conftest.er1
1780 cat conftest.er1 >&5
1781 mv -f conftest.er1 conftest.err
1782 fi
1783 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1784 test $ac_status = 0; } && {
1785 test -z "$ac_c_werror_flag" ||
1786 test ! -s conftest.err
1787 } && test -s conftest$ac_exeext && {
1788 test "$cross_compiling" = yes ||
1789 test -x conftest$ac_exeext
1790 }; then :
1791 ac_retval=0
1792else
1793 $as_echo "$as_me: failed program was:" >&5
1794sed 's/^/| /' conftest.$ac_ext >&5
1795
1796 ac_retval=1
1797fi
1798 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1799 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1800 # interfere with the next link command; also delete a directory that is
1801 # left behind by Apple's compiler. We do this before executing the actions.
1802 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1803 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1804 as_fn_set_status $ac_retval
1805
1806} # ac_fn_c_try_link
1807
1808# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1809# -------------------------------------------------------
1810# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1811# the include files in INCLUDES and setting the cache variable VAR
1812# accordingly.
1813ac_fn_c_check_header_mongrel ()
1814{
1815 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1816 if eval \${$3+:} false; then :
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1818$as_echo_n "checking for $2... " >&6; }
1819if eval \${$3+:} false; then :
1820 $as_echo_n "(cached) " >&6
1821fi
1822eval ac_res=\$$3
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1824$as_echo "$ac_res" >&6; }
1825else
1826 # Is the header compilable?
1827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1828$as_echo_n "checking $2 usability... " >&6; }
1829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1830/* end confdefs.h. */
1831$4
1832#include <$2>
1833_ACEOF
1834if ac_fn_c_try_compile "$LINENO"; then :
1835 ac_header_compiler=yes
1836else
1837 ac_header_compiler=no
1838fi
1839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1841$as_echo "$ac_header_compiler" >&6; }
1842
1843# Is the header present?
1844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1845$as_echo_n "checking $2 presence... " >&6; }
1846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1847/* end confdefs.h. */
1848#include <$2>
1849_ACEOF
1850if ac_fn_c_try_cpp "$LINENO"; then :
1851 ac_header_preproc=yes
1852else
1853 ac_header_preproc=no
1854fi
1855rm -f conftest.err conftest.i conftest.$ac_ext
1856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1857$as_echo "$ac_header_preproc" >&6; }
1858
1859# So? What about this header?
1860case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1861 yes:no: )
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1863$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1865$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1866 ;;
1867 no:yes:* )
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1869$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1871$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1873$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1875$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1877$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1878( $as_echo "## ------------------------------------------- ##
1879## Report this to openssh-unix-dev@mindrot.org ##
1880## ------------------------------------------- ##"
1881 ) | sed "s/^/$as_me: WARNING: /" >&2
1882 ;;
1883esac
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1885$as_echo_n "checking for $2... " >&6; }
1886if eval \${$3+:} false; then :
1887 $as_echo_n "(cached) " >&6
1888else
1889 eval "$3=\$ac_header_compiler"
1890fi
1891eval ac_res=\$$3
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1893$as_echo "$ac_res" >&6; }
1894fi
1895 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1896
1897} # ac_fn_c_check_header_mongrel
1898
1899# ac_fn_c_check_func LINENO FUNC VAR
1900# ----------------------------------
1901# Tests whether FUNC exists, setting the cache variable VAR accordingly
1902ac_fn_c_check_func ()
1903{
1904 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1906$as_echo_n "checking for $2... " >&6; }
1907if eval \${$3+:} false; then :
1908 $as_echo_n "(cached) " >&6
1909else
1910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1911/* end confdefs.h. */
1912/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1913 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1914#define $2 innocuous_$2
1915
1916/* System header to define __stub macros and hopefully few prototypes,
1917 which can conflict with char $2 (); below.
1918 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1919 <limits.h> exists even on freestanding compilers. */
1920
1921#ifdef __STDC__
1922# include <limits.h>
1923#else
1924# include <assert.h>
1925#endif
1926
1927#undef $2
1928
1929/* Override any GCC internal prototype to avoid an error.
1930 Use char because int might match the return type of a GCC
1931 builtin and then its argument prototype would still apply. */
1932#ifdef __cplusplus
1933extern "C"
1934#endif
1935char $2 ();
1936/* The GNU C library defines this for functions which it implements
1937 to always fail with ENOSYS. Some functions are actually named
1938 something starting with __ and the normal name is an alias. */
1939#if defined __stub_$2 || defined __stub___$2
1940choke me
1941#endif
1942
1943int
1944main ()
1945{
1946return $2 ();
1947 ;
1948 return 0;
1949}
1950_ACEOF
1951if ac_fn_c_try_link "$LINENO"; then :
1952 eval "$3=yes"
1953else
1954 eval "$3=no"
1955fi
1956rm -f core conftest.err conftest.$ac_objext \
1957 conftest$ac_exeext conftest.$ac_ext
1958fi
1959eval ac_res=\$$3
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1961$as_echo "$ac_res" >&6; }
1962 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1963
1964} # ac_fn_c_check_func
1965
1966# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1967# -------------------------------------------
1968# Tests whether TYPE exists after having included INCLUDES, setting cache
1969# variable VAR accordingly.
1970ac_fn_c_check_type ()
1971{
1972 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1974$as_echo_n "checking for $2... " >&6; }
1975if eval \${$3+:} false; then :
1976 $as_echo_n "(cached) " >&6
1977else
1978 eval "$3=no"
1979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1980/* end confdefs.h. */
1981$4
1982int
1983main ()
1984{
1985if (sizeof ($2))
1986 return 0;
1987 ;
1988 return 0;
1989}
1990_ACEOF
1991if ac_fn_c_try_compile "$LINENO"; then :
1992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$4
1995int
1996main ()
1997{
1998if (sizeof (($2)))
1999 return 0;
2000 ;
2001 return 0;
2002}
2003_ACEOF
2004if ac_fn_c_try_compile "$LINENO"; then :
2005
2006else
2007 eval "$3=yes"
2008fi
2009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2010fi
2011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2012fi
2013eval ac_res=\$$3
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2015$as_echo "$ac_res" >&6; }
2016 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2017
2018} # ac_fn_c_check_type
2019
2020# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2021# --------------------------------------------
2022# Tries to find the compile-time value of EXPR in a program that includes
2023# INCLUDES, setting VAR accordingly. Returns whether the value could be
2024# computed
2025ac_fn_c_compute_int ()
2026{
2027 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2028 if test "$cross_compiling" = yes; then
2029 # Depending upon the size, compute the lo and hi bounds.
2030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
2034main ()
2035{
2036static int test_array [1 - 2 * !(($2) >= 0)];
2037test_array [0] = 0;
2038return test_array [0];
2039
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_compile "$LINENO"; then :
2045 ac_lo=0 ac_mid=0
2046 while :; do
2047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h. */
2049$4
2050int
2051main ()
2052{
2053static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2054test_array [0] = 0;
2055return test_array [0];
2056
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_compile "$LINENO"; then :
2062 ac_hi=$ac_mid; break
2063else
2064 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2065 if test $ac_lo -le $ac_mid; then
2066 ac_lo= ac_hi=
2067 break
2068 fi
2069 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2070fi
2071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2072 done
2073else
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) < 0)];
2081test_array [0] = 0;
2082return test_array [0];
2083
2084 ;
2085 return 0;
2086}
2087_ACEOF
2088if ac_fn_c_try_compile "$LINENO"; then :
2089 ac_hi=-1 ac_mid=-1
2090 while :; do
2091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h. */
2093$4
2094int
2095main ()
2096{
2097static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2098test_array [0] = 0;
2099return test_array [0];
2100
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_lo=$ac_mid; break
2107else
2108 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2109 if test $ac_mid -le $ac_hi; then
2110 ac_lo= ac_hi=
2111 break
2112 fi
2113 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2114fi
2115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2116 done
2117else
2118 ac_lo= ac_hi=
2119fi
2120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123# Binary search between lo and hi bounds.
2124while test "x$ac_lo" != "x$ac_hi"; do
2125 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2127/* end confdefs.h. */
2128$4
2129int
2130main ()
2131{
2132static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2133test_array [0] = 0;
2134return test_array [0];
2135
2136 ;
2137 return 0;
2138}
2139_ACEOF
2140if ac_fn_c_try_compile "$LINENO"; then :
2141 ac_hi=$ac_mid
2142else
2143 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2144fi
2145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146done
2147case $ac_lo in #((
2148?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2149'') ac_retval=1 ;;
2150esac
2151 else
2152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2153/* end confdefs.h. */
2154$4
2155static long int longval () { return $2; }
2156static unsigned long int ulongval () { return $2; }
2157#include <stdio.h>
2158#include <stdlib.h>
2159int
2160main ()
2161{
2162
2163 FILE *f = fopen ("conftest.val", "w");
2164 if (! f)
2165 return 1;
2166 if (($2) < 0)
2167 {
2168 long int i = longval ();
2169 if (i != ($2))
2170 return 1;
2171 fprintf (f, "%ld", i);
2172 }
2173 else
2174 {
2175 unsigned long int i = ulongval ();
2176 if (i != ($2))
2177 return 1;
2178 fprintf (f, "%lu", i);
2179 }
2180 /* Do not output a trailing newline, as this causes \r\n confusion
2181 on some platforms. */
2182 return ferror (f) || fclose (f) != 0;
2183
2184 ;
2185 return 0;
2186}
2187_ACEOF
2188if ac_fn_c_try_run "$LINENO"; then :
2189 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2190else
2191 ac_retval=1
2192fi
2193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2194 conftest.$ac_objext conftest.beam conftest.$ac_ext
2195rm -f conftest.val
2196
2197 fi
2198 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2199 as_fn_set_status $ac_retval
2200
2201} # ac_fn_c_compute_int
2202
2203# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2204# ----------------------------------------------------
2205# Tries to find if the field MEMBER exists in type AGGR, after including
2206# INCLUDES, setting cache variable VAR accordingly.
2207ac_fn_c_check_member ()
2208{
2209 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2211$as_echo_n "checking for $2.$3... " >&6; }
2212if eval \${$4+:} false; then :
2213 $as_echo_n "(cached) " >&6
2214else
2215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2216/* end confdefs.h. */
2217$5
2218int
2219main ()
2220{
2221static $2 ac_aggr;
2222if (ac_aggr.$3)
2223return 0;
2224 ;
2225 return 0;
2226}
2227_ACEOF
2228if ac_fn_c_try_compile "$LINENO"; then :
2229 eval "$4=yes"
2230else
2231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2232/* end confdefs.h. */
2233$5
2234int
2235main ()
2236{
2237static $2 ac_aggr;
2238if (sizeof ac_aggr.$3)
2239return 0;
2240 ;
2241 return 0;
2242}
2243_ACEOF
2244if ac_fn_c_try_compile "$LINENO"; then :
2245 eval "$4=yes"
2246else
2247 eval "$4=no"
2248fi
2249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2250fi
2251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2252fi
2253eval ac_res=\$$4
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2255$as_echo "$ac_res" >&6; }
2256 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2257
2258} # ac_fn_c_check_member
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002259cat >config.log <<_ACEOF
2260This file contains any messages produced by compilers while
2261running configure, to aid debugging if configure makes a mistake.
2262
2263It was created by OpenSSH $as_me Portable, which was
Greg Hartman9768ca42017-06-22 20:49:52 -07002264generated by GNU Autoconf 2.69. Invocation command line was
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002265
2266 $ $0 $@
2267
2268_ACEOF
2269exec 5>>config.log
2270{
2271cat <<_ASUNAME
2272## --------- ##
2273## Platform. ##
2274## --------- ##
2275
2276hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2277uname -m = `(uname -m) 2>/dev/null || echo unknown`
2278uname -r = `(uname -r) 2>/dev/null || echo unknown`
2279uname -s = `(uname -s) 2>/dev/null || echo unknown`
2280uname -v = `(uname -v) 2>/dev/null || echo unknown`
2281
2282/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2283/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2284
2285/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2286/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2287/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2288/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2289/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2290/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2291/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2292
2293_ASUNAME
2294
2295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2296for as_dir in $PATH
2297do
2298 IFS=$as_save_IFS
2299 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07002300 $as_echo "PATH: $as_dir"
2301 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002302IFS=$as_save_IFS
2303
2304} >&5
2305
2306cat >&5 <<_ACEOF
2307
2308
2309## ----------- ##
2310## Core tests. ##
2311## ----------- ##
2312
2313_ACEOF
2314
2315
2316# Keep a trace of the command line.
2317# Strip out --no-create and --no-recursion so they do not pile up.
2318# Strip out --silent because we don't want to record it for future runs.
2319# Also quote any args containing shell meta-characters.
2320# Make two passes to allow for proper duplicate-argument suppression.
2321ac_configure_args=
2322ac_configure_args0=
2323ac_configure_args1=
2324ac_must_keep_next=false
2325for ac_pass in 1 2
2326do
2327 for ac_arg
2328 do
2329 case $ac_arg in
2330 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2331 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2332 | -silent | --silent | --silen | --sile | --sil)
2333 continue ;;
2334 *\'*)
Greg Hartman9768ca42017-06-22 20:49:52 -07002335 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002336 esac
2337 case $ac_pass in
Greg Hartman9768ca42017-06-22 20:49:52 -07002338 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002339 2)
Greg Hartman9768ca42017-06-22 20:49:52 -07002340 as_fn_append ac_configure_args1 " '$ac_arg'"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002341 if test $ac_must_keep_next = true; then
2342 ac_must_keep_next=false # Got value, back to normal.
2343 else
2344 case $ac_arg in
2345 *=* | --config-cache | -C | -disable-* | --disable-* \
2346 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2347 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2348 | -with-* | --with-* | -without-* | --without-* | --x)
2349 case "$ac_configure_args0 " in
2350 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2351 esac
2352 ;;
2353 -* ) ac_must_keep_next=true ;;
2354 esac
2355 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07002356 as_fn_append ac_configure_args " '$ac_arg'"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002357 ;;
2358 esac
2359 done
2360done
Greg Hartman9768ca42017-06-22 20:49:52 -07002361{ ac_configure_args0=; unset ac_configure_args0;}
2362{ ac_configure_args1=; unset ac_configure_args1;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002363
2364# When interrupted or exit'd, cleanup temporary files, and complete
2365# config.log. We remove comments because anyway the quotes in there
2366# would cause problems or look ugly.
2367# WARNING: Use '\'' to represent an apostrophe within the trap.
2368# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2369trap 'exit_status=$?
2370 # Save into config.log some information that might help in debugging.
2371 {
2372 echo
2373
Greg Hartman9768ca42017-06-22 20:49:52 -07002374 $as_echo "## ---------------- ##
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002375## Cache variables. ##
Greg Hartman9768ca42017-06-22 20:49:52 -07002376## ---------------- ##"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002377 echo
2378 # The following way of writing the cache mishandles newlines in values,
2379(
2380 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2381 eval ac_val=\$$ac_var
2382 case $ac_val in #(
2383 *${as_nl}*)
2384 case $ac_var in #(
Greg Hartman9768ca42017-06-22 20:49:52 -07002385 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2386$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002387 esac
2388 case $ac_var in #(
2389 _ | IFS | as_nl) ;; #(
Greg Hartman9768ca42017-06-22 20:49:52 -07002390 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2391 *) { eval $ac_var=; unset $ac_var;} ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002392 esac ;;
2393 esac
2394 done
2395 (set) 2>&1 |
2396 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2397 *${as_nl}ac_space=\ *)
2398 sed -n \
2399 "s/'\''/'\''\\\\'\'''\''/g;
2400 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2401 ;; #(
2402 *)
2403 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2404 ;;
2405 esac |
2406 sort
2407)
2408 echo
2409
Greg Hartman9768ca42017-06-22 20:49:52 -07002410 $as_echo "## ----------------- ##
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002411## Output variables. ##
Greg Hartman9768ca42017-06-22 20:49:52 -07002412## ----------------- ##"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002413 echo
2414 for ac_var in $ac_subst_vars
2415 do
2416 eval ac_val=\$$ac_var
2417 case $ac_val in
Greg Hartman9768ca42017-06-22 20:49:52 -07002418 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002419 esac
Greg Hartman9768ca42017-06-22 20:49:52 -07002420 $as_echo "$ac_var='\''$ac_val'\''"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002421 done | sort
2422 echo
2423
2424 if test -n "$ac_subst_files"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07002425 $as_echo "## ------------------- ##
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002426## File substitutions. ##
Greg Hartman9768ca42017-06-22 20:49:52 -07002427## ------------------- ##"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002428 echo
2429 for ac_var in $ac_subst_files
2430 do
2431 eval ac_val=\$$ac_var
2432 case $ac_val in
Greg Hartman9768ca42017-06-22 20:49:52 -07002433 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002434 esac
Greg Hartman9768ca42017-06-22 20:49:52 -07002435 $as_echo "$ac_var='\''$ac_val'\''"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002436 done | sort
2437 echo
2438 fi
2439
2440 if test -s confdefs.h; then
Greg Hartman9768ca42017-06-22 20:49:52 -07002441 $as_echo "## ----------- ##
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002442## confdefs.h. ##
Greg Hartman9768ca42017-06-22 20:49:52 -07002443## ----------- ##"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002444 echo
2445 cat confdefs.h
2446 echo
2447 fi
2448 test "$ac_signal" != 0 &&
Greg Hartman9768ca42017-06-22 20:49:52 -07002449 $as_echo "$as_me: caught signal $ac_signal"
2450 $as_echo "$as_me: exit $exit_status"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002451 } >&5
2452 rm -f core *.core core.conftest.* &&
2453 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2454 exit $exit_status
2455' 0
2456for ac_signal in 1 2 13 15; do
Greg Hartman9768ca42017-06-22 20:49:52 -07002457 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002458done
2459ac_signal=0
2460
2461# confdefs.h avoids OS command line length limits that DEFS can exceed.
2462rm -f -r conftest* confdefs.h
2463
Greg Hartman9768ca42017-06-22 20:49:52 -07002464$as_echo "/* confdefs.h */" > confdefs.h
2465
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002466# Predefined preprocessor variables.
2467
2468cat >>confdefs.h <<_ACEOF
2469#define PACKAGE_NAME "$PACKAGE_NAME"
2470_ACEOF
2471
2472cat >>confdefs.h <<_ACEOF
2473#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2474_ACEOF
2475
2476cat >>confdefs.h <<_ACEOF
2477#define PACKAGE_VERSION "$PACKAGE_VERSION"
2478_ACEOF
2479
2480cat >>confdefs.h <<_ACEOF
2481#define PACKAGE_STRING "$PACKAGE_STRING"
2482_ACEOF
2483
2484cat >>confdefs.h <<_ACEOF
2485#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2486_ACEOF
2487
Greg Hartman9768ca42017-06-22 20:49:52 -07002488cat >>confdefs.h <<_ACEOF
2489#define PACKAGE_URL "$PACKAGE_URL"
2490_ACEOF
2491
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002492
2493# Let the site file select an alternate cache file if it wants to.
Greg Hartman9768ca42017-06-22 20:49:52 -07002494# Prefer an explicitly selected file to automatically selected ones.
2495ac_site_file1=NONE
2496ac_site_file2=NONE
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002497if test -n "$CONFIG_SITE"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07002498 # We do not want a PATH search for config.site.
2499 case $CONFIG_SITE in #((
2500 -*) ac_site_file1=./$CONFIG_SITE;;
2501 */*) ac_site_file1=$CONFIG_SITE;;
2502 *) ac_site_file1=./$CONFIG_SITE;;
2503 esac
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002504elif test "x$prefix" != xNONE; then
Greg Hartman9768ca42017-06-22 20:49:52 -07002505 ac_site_file1=$prefix/share/config.site
2506 ac_site_file2=$prefix/etc/config.site
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002507else
Greg Hartman9768ca42017-06-22 20:49:52 -07002508 ac_site_file1=$ac_default_prefix/share/config.site
2509 ac_site_file2=$ac_default_prefix/etc/config.site
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002510fi
Greg Hartman9768ca42017-06-22 20:49:52 -07002511for ac_site_file in "$ac_site_file1" "$ac_site_file2"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002512do
Greg Hartman9768ca42017-06-22 20:49:52 -07002513 test "x$ac_site_file" = xNONE && continue
2514 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2515 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2516$as_echo "$as_me: loading site script $ac_site_file" >&6;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002517 sed 's/^/| /' "$ac_site_file" >&5
Greg Hartman9768ca42017-06-22 20:49:52 -07002518 . "$ac_site_file" \
2519 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2520$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2521as_fn_error $? "failed to load site script $ac_site_file
2522See \`config.log' for more details" "$LINENO" 5; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002523 fi
2524done
2525
2526if test -r "$cache_file"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07002527 # Some versions of bash will fail to source /dev/null (special files
2528 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2529 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2530 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2531$as_echo "$as_me: loading cache $cache_file" >&6;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002532 case $cache_file in
2533 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2534 *) . "./$cache_file";;
2535 esac
2536 fi
2537else
Greg Hartman9768ca42017-06-22 20:49:52 -07002538 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2539$as_echo "$as_me: creating cache $cache_file" >&6;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002540 >$cache_file
2541fi
2542
2543# Check that the precious variables saved in the cache have kept the same
2544# value.
2545ac_cache_corrupted=false
2546for ac_var in $ac_precious_vars; do
2547 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2548 eval ac_new_set=\$ac_env_${ac_var}_set
2549 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2550 eval ac_new_val=\$ac_env_${ac_var}_value
2551 case $ac_old_set,$ac_new_set in
2552 set,)
Greg Hartman9768ca42017-06-22 20:49:52 -07002553 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2554$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002555 ac_cache_corrupted=: ;;
2556 ,set)
Greg Hartman9768ca42017-06-22 20:49:52 -07002557 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2558$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002559 ac_cache_corrupted=: ;;
2560 ,);;
2561 *)
2562 if test "x$ac_old_val" != "x$ac_new_val"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07002563 # differences in whitespace do not lead to failure.
2564 ac_old_val_w=`echo x $ac_old_val`
2565 ac_new_val_w=`echo x $ac_new_val`
2566 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2567 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2568$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2569 ac_cache_corrupted=:
2570 else
2571 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2572$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2573 eval $ac_var=\$ac_old_val
2574 fi
2575 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2576$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2577 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2578$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002579 fi;;
2580 esac
2581 # Pass precious variables to config.status.
2582 if test "$ac_new_set" = set; then
2583 case $ac_new_val in
Greg Hartman9768ca42017-06-22 20:49:52 -07002584 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002585 *) ac_arg=$ac_var=$ac_new_val ;;
2586 esac
2587 case " $ac_configure_args " in
2588 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
Greg Hartman9768ca42017-06-22 20:49:52 -07002589 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002590 esac
2591 fi
2592done
2593if $ac_cache_corrupted; then
Greg Hartman9768ca42017-06-22 20:49:52 -07002594 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2597$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2598 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002599fi
Greg Hartman9768ca42017-06-22 20:49:52 -07002600## -------------------- ##
2601## Main body of script. ##
2602## -------------------- ##
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002603
2604ac_ext=c
2605ac_cpp='$CPP $CPPFLAGS'
2606ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2607ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2608ac_compiler_gnu=$ac_cv_c_compiler_gnu
2609
2610
2611
2612
2613ac_ext=c
2614ac_cpp='$CPP $CPPFLAGS'
2615ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2616ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2617ac_compiler_gnu=$ac_cv_c_compiler_gnu
2618
2619
2620ac_config_headers="$ac_config_headers config.h"
2621
2622ac_ext=c
2623ac_cpp='$CPP $CPPFLAGS'
2624ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2625ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2626ac_compiler_gnu=$ac_cv_c_compiler_gnu
2627if test -n "$ac_tool_prefix"; then
2628 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2629set dummy ${ac_tool_prefix}gcc; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07002630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2631$as_echo_n "checking for $ac_word... " >&6; }
2632if ${ac_cv_prog_CC+:} false; then :
2633 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002634else
2635 if test -n "$CC"; then
2636 ac_cv_prog_CC="$CC" # Let the user override the test.
2637else
2638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2639for as_dir in $PATH
2640do
2641 IFS=$as_save_IFS
2642 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07002643 for ac_exec_ext in '' $ac_executable_extensions; do
2644 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002645 ac_cv_prog_CC="${ac_tool_prefix}gcc"
Greg Hartman9768ca42017-06-22 20:49:52 -07002646 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002647 break 2
2648 fi
2649done
Greg Hartman9768ca42017-06-22 20:49:52 -07002650 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002651IFS=$as_save_IFS
2652
2653fi
2654fi
2655CC=$ac_cv_prog_CC
2656if test -n "$CC"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07002657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2658$as_echo "$CC" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002659else
Greg Hartman9768ca42017-06-22 20:49:52 -07002660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2661$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002662fi
2663
2664
2665fi
2666if test -z "$ac_cv_prog_CC"; then
2667 ac_ct_CC=$CC
2668 # Extract the first word of "gcc", so it can be a program name with args.
2669set dummy gcc; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07002670{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2671$as_echo_n "checking for $ac_word... " >&6; }
2672if ${ac_cv_prog_ac_ct_CC+:} false; then :
2673 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002674else
2675 if test -n "$ac_ct_CC"; then
2676 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2677else
2678as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2679for as_dir in $PATH
2680do
2681 IFS=$as_save_IFS
2682 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07002683 for ac_exec_ext in '' $ac_executable_extensions; do
2684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002685 ac_cv_prog_ac_ct_CC="gcc"
Greg Hartman9768ca42017-06-22 20:49:52 -07002686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002687 break 2
2688 fi
2689done
Greg Hartman9768ca42017-06-22 20:49:52 -07002690 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002691IFS=$as_save_IFS
2692
2693fi
2694fi
2695ac_ct_CC=$ac_cv_prog_ac_ct_CC
2696if test -n "$ac_ct_CC"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07002697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2698$as_echo "$ac_ct_CC" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002699else
Greg Hartman9768ca42017-06-22 20:49:52 -07002700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2701$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002702fi
2703
2704 if test "x$ac_ct_CC" = x; then
2705 CC=""
2706 else
2707 case $cross_compiling:$ac_tool_warned in
2708yes:)
Greg Hartman9768ca42017-06-22 20:49:52 -07002709{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2710$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002711ac_tool_warned=yes ;;
2712esac
2713 CC=$ac_ct_CC
2714 fi
2715else
2716 CC="$ac_cv_prog_CC"
2717fi
2718
2719if test -z "$CC"; then
2720 if test -n "$ac_tool_prefix"; then
2721 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2722set dummy ${ac_tool_prefix}cc; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07002723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2724$as_echo_n "checking for $ac_word... " >&6; }
2725if ${ac_cv_prog_CC+:} false; then :
2726 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002727else
2728 if test -n "$CC"; then
2729 ac_cv_prog_CC="$CC" # Let the user override the test.
2730else
2731as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2732for as_dir in $PATH
2733do
2734 IFS=$as_save_IFS
2735 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07002736 for ac_exec_ext in '' $ac_executable_extensions; do
2737 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002738 ac_cv_prog_CC="${ac_tool_prefix}cc"
Greg Hartman9768ca42017-06-22 20:49:52 -07002739 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002740 break 2
2741 fi
2742done
Greg Hartman9768ca42017-06-22 20:49:52 -07002743 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002744IFS=$as_save_IFS
2745
2746fi
2747fi
2748CC=$ac_cv_prog_CC
2749if test -n "$CC"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07002750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2751$as_echo "$CC" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002752else
Greg Hartman9768ca42017-06-22 20:49:52 -07002753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2754$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002755fi
2756
2757
2758 fi
2759fi
2760if test -z "$CC"; then
2761 # Extract the first word of "cc", so it can be a program name with args.
2762set dummy cc; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07002763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2764$as_echo_n "checking for $ac_word... " >&6; }
2765if ${ac_cv_prog_CC+:} false; then :
2766 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002767else
2768 if test -n "$CC"; then
2769 ac_cv_prog_CC="$CC" # Let the user override the test.
2770else
2771 ac_prog_rejected=no
2772as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2773for as_dir in $PATH
2774do
2775 IFS=$as_save_IFS
2776 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07002777 for ac_exec_ext in '' $ac_executable_extensions; do
2778 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002779 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2780 ac_prog_rejected=yes
2781 continue
2782 fi
2783 ac_cv_prog_CC="cc"
Greg Hartman9768ca42017-06-22 20:49:52 -07002784 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002785 break 2
2786 fi
2787done
Greg Hartman9768ca42017-06-22 20:49:52 -07002788 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002789IFS=$as_save_IFS
2790
2791if test $ac_prog_rejected = yes; then
2792 # We found a bogon in the path, so make sure we never use it.
2793 set dummy $ac_cv_prog_CC
2794 shift
2795 if test $# != 0; then
2796 # We chose a different compiler from the bogus one.
2797 # However, it has the same basename, so the bogon will be chosen
2798 # first if we set CC to just the basename; use the full file name.
2799 shift
2800 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2801 fi
2802fi
2803fi
2804fi
2805CC=$ac_cv_prog_CC
2806if test -n "$CC"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07002807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2808$as_echo "$CC" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002809else
Greg Hartman9768ca42017-06-22 20:49:52 -07002810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2811$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002812fi
2813
2814
2815fi
2816if test -z "$CC"; then
2817 if test -n "$ac_tool_prefix"; then
2818 for ac_prog in cl.exe
2819 do
2820 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2821set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07002822{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2823$as_echo_n "checking for $ac_word... " >&6; }
2824if ${ac_cv_prog_CC+:} false; then :
2825 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002826else
2827 if test -n "$CC"; then
2828 ac_cv_prog_CC="$CC" # Let the user override the test.
2829else
2830as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2831for as_dir in $PATH
2832do
2833 IFS=$as_save_IFS
2834 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07002835 for ac_exec_ext in '' $ac_executable_extensions; do
2836 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002837 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
Greg Hartman9768ca42017-06-22 20:49:52 -07002838 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002839 break 2
2840 fi
2841done
Greg Hartman9768ca42017-06-22 20:49:52 -07002842 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002843IFS=$as_save_IFS
2844
2845fi
2846fi
2847CC=$ac_cv_prog_CC
2848if test -n "$CC"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07002849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2850$as_echo "$CC" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002851else
Greg Hartman9768ca42017-06-22 20:49:52 -07002852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2853$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002854fi
2855
2856
2857 test -n "$CC" && break
2858 done
2859fi
2860if test -z "$CC"; then
2861 ac_ct_CC=$CC
2862 for ac_prog in cl.exe
2863do
2864 # Extract the first word of "$ac_prog", so it can be a program name with args.
2865set dummy $ac_prog; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07002866{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2867$as_echo_n "checking for $ac_word... " >&6; }
2868if ${ac_cv_prog_ac_ct_CC+:} false; then :
2869 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002870else
2871 if test -n "$ac_ct_CC"; then
2872 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2873else
2874as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2875for as_dir in $PATH
2876do
2877 IFS=$as_save_IFS
2878 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07002879 for ac_exec_ext in '' $ac_executable_extensions; do
2880 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002881 ac_cv_prog_ac_ct_CC="$ac_prog"
Greg Hartman9768ca42017-06-22 20:49:52 -07002882 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002883 break 2
2884 fi
2885done
Greg Hartman9768ca42017-06-22 20:49:52 -07002886 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002887IFS=$as_save_IFS
2888
2889fi
2890fi
2891ac_ct_CC=$ac_cv_prog_ac_ct_CC
2892if test -n "$ac_ct_CC"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07002893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2894$as_echo "$ac_ct_CC" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002895else
Greg Hartman9768ca42017-06-22 20:49:52 -07002896 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2897$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002898fi
2899
2900
2901 test -n "$ac_ct_CC" && break
2902done
2903
2904 if test "x$ac_ct_CC" = x; then
2905 CC=""
2906 else
2907 case $cross_compiling:$ac_tool_warned in
2908yes:)
Greg Hartman9768ca42017-06-22 20:49:52 -07002909{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2910$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002911ac_tool_warned=yes ;;
2912esac
2913 CC=$ac_ct_CC
2914 fi
2915fi
2916
2917fi
2918
2919
Greg Hartman9768ca42017-06-22 20:49:52 -07002920test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2921$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2922as_fn_error $? "no acceptable C compiler found in \$PATH
2923See \`config.log' for more details" "$LINENO" 5; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002924
2925# Provide some information about the compiler.
Greg Hartman9768ca42017-06-22 20:49:52 -07002926$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2927set X $ac_compile
2928ac_compiler=$2
2929for ac_option in --version -v -V -qversion; do
2930 { { ac_try="$ac_compiler $ac_option >&5"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002931case "(($ac_try" in
2932 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2933 *) ac_try_echo=$ac_try;;
2934esac
Greg Hartman9768ca42017-06-22 20:49:52 -07002935eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2936$as_echo "$ac_try_echo"; } >&5
2937 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002938 ac_status=$?
Greg Hartman9768ca42017-06-22 20:49:52 -07002939 if test -s conftest.err; then
2940 sed '10a\
2941... rest of stderr output deleted ...
2942 10q' conftest.err >conftest.er1
2943 cat conftest.er1 >&5
2944 fi
2945 rm -f conftest.er1 conftest.err
2946 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2947 test $ac_status = 0; }
2948done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002949
Greg Hartman9768ca42017-06-22 20:49:52 -07002950cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002951/* end confdefs.h. */
2952
2953int
2954main ()
2955{
2956
2957 ;
2958 return 0;
2959}
2960_ACEOF
2961ac_clean_files_save=$ac_clean_files
Greg Hartman9768ca42017-06-22 20:49:52 -07002962ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002963# Try to create an executable without -o first, disregard a.out.
2964# It will help us diagnose broken compilers, and finding out an intuition
2965# of exeext.
Greg Hartman9768ca42017-06-22 20:49:52 -07002966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2967$as_echo_n "checking whether the C compiler works... " >&6; }
2968ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2969
2970# The possible output files:
2971ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2972
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002973ac_rmfiles=
2974for ac_file in $ac_files
2975do
2976 case $ac_file in
Greg Hartman9768ca42017-06-22 20:49:52 -07002977 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002978 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2979 esac
2980done
2981rm -f $ac_rmfiles
2982
Greg Hartman9768ca42017-06-22 20:49:52 -07002983if { { ac_try="$ac_link_default"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002984case "(($ac_try" in
2985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2986 *) ac_try_echo=$ac_try;;
2987esac
Greg Hartman9768ca42017-06-22 20:49:52 -07002988eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2989$as_echo "$ac_try_echo"; } >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002990 (eval "$ac_link_default") 2>&5
2991 ac_status=$?
Greg Hartman9768ca42017-06-22 20:49:52 -07002992 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2993 test $ac_status = 0; }; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08002994 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2995# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2996# in a Makefile. We should not override ac_cv_exeext if it was cached,
2997# so that the user can short-circuit this test for compilers unknown to
2998# Autoconf.
2999for ac_file in $ac_files ''
3000do
3001 test -f "$ac_file" || continue
3002 case $ac_file in
Greg Hartman9768ca42017-06-22 20:49:52 -07003003 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003004 ;;
3005 [ab].out )
3006 # We found the default executable, but exeext='' is most
3007 # certainly right.
3008 break;;
3009 *.* )
Greg Hartman9768ca42017-06-22 20:49:52 -07003010 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003011 then :; else
3012 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3013 fi
3014 # We set ac_cv_exeext here because the later test for it is not
3015 # safe: cross compilers may not add the suffix if given an `-o'
3016 # argument, so we may need to know it at that point already.
3017 # Even if this section looks crufty: it has the advantage of
3018 # actually working.
3019 break;;
3020 * )
3021 break;;
3022 esac
3023done
3024test "$ac_cv_exeext" = no && ac_cv_exeext=
3025
3026else
3027 ac_file=''
3028fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003029if test -z "$ac_file"; then :
3030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3031$as_echo "no" >&6; }
3032$as_echo "$as_me: failed program was:" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003033sed 's/^/| /' conftest.$ac_ext >&5
3034
Greg Hartman9768ca42017-06-22 20:49:52 -07003035{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3036$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3037as_fn_error 77 "C compiler cannot create executables
3038See \`config.log' for more details" "$LINENO" 5; }
3039else
3040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3041$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003042fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3044$as_echo_n "checking for C compiler default output file name... " >&6; }
3045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3046$as_echo "$ac_file" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003047ac_exeext=$ac_cv_exeext
3048
Greg Hartman9768ca42017-06-22 20:49:52 -07003049rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003050ac_clean_files=$ac_clean_files_save
Greg Hartman9768ca42017-06-22 20:49:52 -07003051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3052$as_echo_n "checking for suffix of executables... " >&6; }
3053if { { ac_try="$ac_link"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003054case "(($ac_try" in
3055 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3056 *) ac_try_echo=$ac_try;;
3057esac
Greg Hartman9768ca42017-06-22 20:49:52 -07003058eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3059$as_echo "$ac_try_echo"; } >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003060 (eval "$ac_link") 2>&5
3061 ac_status=$?
Greg Hartman9768ca42017-06-22 20:49:52 -07003062 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3063 test $ac_status = 0; }; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003064 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3065# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3066# work properly (i.e., refer to `conftest.exe'), while it won't with
3067# `rm'.
3068for ac_file in conftest.exe conftest conftest.*; do
3069 test -f "$ac_file" || continue
3070 case $ac_file in
Greg Hartman9768ca42017-06-22 20:49:52 -07003071 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003072 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3073 break;;
3074 * ) break;;
3075 esac
3076done
3077else
Greg Hartman9768ca42017-06-22 20:49:52 -07003078 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3079$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3080as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3081See \`config.log' for more details" "$LINENO" 5; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003082fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003083rm -f conftest conftest$ac_cv_exeext
3084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3085$as_echo "$ac_cv_exeext" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003086
3087rm -f conftest.$ac_ext
3088EXEEXT=$ac_cv_exeext
3089ac_exeext=$EXEEXT
Greg Hartman9768ca42017-06-22 20:49:52 -07003090cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3091/* end confdefs.h. */
3092#include <stdio.h>
3093int
3094main ()
3095{
3096FILE *f = fopen ("conftest.out", "w");
3097 return ferror (f) || fclose (f) != 0;
3098
3099 ;
3100 return 0;
3101}
Adam Langleyd0592972015-03-30 14:49:51 -07003102_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07003103ac_clean_files="$ac_clean_files conftest.out"
3104# Check that the compiler produces executables we can run. If not, either
3105# the compiler is broken, or we cross compile.
3106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3107$as_echo_n "checking whether we are cross compiling... " >&6; }
3108if test "$cross_compiling" != yes; then
3109 { { ac_try="$ac_link"
3110case "(($ac_try" in
3111 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3112 *) ac_try_echo=$ac_try;;
3113esac
3114eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3115$as_echo "$ac_try_echo"; } >&5
3116 (eval "$ac_link") 2>&5
3117 ac_status=$?
3118 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3119 test $ac_status = 0; }
3120 if { ac_try='./conftest$ac_cv_exeext'
3121 { { case "(($ac_try" in
3122 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3123 *) ac_try_echo=$ac_try;;
3124esac
3125eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3126$as_echo "$ac_try_echo"; } >&5
3127 (eval "$ac_try") 2>&5
3128 ac_status=$?
3129 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3130 test $ac_status = 0; }; }; then
3131 cross_compiling=no
3132 else
3133 if test "$cross_compiling" = maybe; then
3134 cross_compiling=yes
3135 else
3136 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3137$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3138as_fn_error $? "cannot run C compiled programs.
3139If you meant to cross compile, use \`--host'.
3140See \`config.log' for more details" "$LINENO" 5; }
3141 fi
3142 fi
3143fi
3144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3145$as_echo "$cross_compiling" >&6; }
3146
3147rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3148ac_clean_files=$ac_clean_files_save
3149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3150$as_echo_n "checking for suffix of object files... " >&6; }
3151if ${ac_cv_objext+:} false; then :
3152 $as_echo_n "(cached) " >&6
3153else
3154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003155/* end confdefs.h. */
3156
3157int
3158main ()
3159{
3160
3161 ;
3162 return 0;
3163}
3164_ACEOF
3165rm -f conftest.o conftest.obj
Greg Hartman9768ca42017-06-22 20:49:52 -07003166if { { ac_try="$ac_compile"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003167case "(($ac_try" in
3168 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3169 *) ac_try_echo=$ac_try;;
3170esac
Greg Hartman9768ca42017-06-22 20:49:52 -07003171eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3172$as_echo "$ac_try_echo"; } >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003173 (eval "$ac_compile") 2>&5
3174 ac_status=$?
Greg Hartman9768ca42017-06-22 20:49:52 -07003175 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3176 test $ac_status = 0; }; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003177 for ac_file in conftest.o conftest.obj conftest.*; do
3178 test -f "$ac_file" || continue;
3179 case $ac_file in
Greg Hartman9768ca42017-06-22 20:49:52 -07003180 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003181 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3182 break;;
3183 esac
3184done
3185else
Greg Hartman9768ca42017-06-22 20:49:52 -07003186 $as_echo "$as_me: failed program was:" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003187sed 's/^/| /' conftest.$ac_ext >&5
3188
Greg Hartman9768ca42017-06-22 20:49:52 -07003189{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3190$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3191as_fn_error $? "cannot compute suffix of object files: cannot compile
3192See \`config.log' for more details" "$LINENO" 5; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003193fi
3194rm -f conftest.$ac_cv_objext conftest.$ac_ext
3195fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3197$as_echo "$ac_cv_objext" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003198OBJEXT=$ac_cv_objext
3199ac_objext=$OBJEXT
Greg Hartman9768ca42017-06-22 20:49:52 -07003200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3201$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3202if ${ac_cv_c_compiler_gnu+:} false; then :
3203 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003204else
Greg Hartman9768ca42017-06-22 20:49:52 -07003205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003206/* end confdefs.h. */
3207
3208int
3209main ()
3210{
3211#ifndef __GNUC__
3212 choke me
3213#endif
3214
3215 ;
3216 return 0;
3217}
3218_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07003219if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003220 ac_compiler_gnu=yes
3221else
Greg Hartman9768ca42017-06-22 20:49:52 -07003222 ac_compiler_gnu=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003223fi
3224rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3225ac_cv_c_compiler_gnu=$ac_compiler_gnu
3226
3227fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3229$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3230if test $ac_compiler_gnu = yes; then
3231 GCC=yes
3232else
3233 GCC=
3234fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003235ac_test_CFLAGS=${CFLAGS+set}
3236ac_save_CFLAGS=$CFLAGS
Greg Hartman9768ca42017-06-22 20:49:52 -07003237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3238$as_echo_n "checking whether $CC accepts -g... " >&6; }
3239if ${ac_cv_prog_cc_g+:} false; then :
3240 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003241else
3242 ac_save_c_werror_flag=$ac_c_werror_flag
3243 ac_c_werror_flag=yes
3244 ac_cv_prog_cc_g=no
3245 CFLAGS="-g"
Greg Hartman9768ca42017-06-22 20:49:52 -07003246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003247/* end confdefs.h. */
3248
3249int
3250main ()
3251{
3252
3253 ;
3254 return 0;
3255}
3256_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07003257if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003258 ac_cv_prog_cc_g=yes
3259else
Greg Hartman9768ca42017-06-22 20:49:52 -07003260 CFLAGS=""
3261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003262/* end confdefs.h. */
3263
3264int
3265main ()
3266{
3267
3268 ;
3269 return 0;
3270}
3271_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07003272if ac_fn_c_try_compile "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07003273
Greg Hartman9768ca42017-06-22 20:49:52 -07003274else
3275 ac_c_werror_flag=$ac_save_c_werror_flag
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003276 CFLAGS="-g"
Greg Hartman9768ca42017-06-22 20:49:52 -07003277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003278/* end confdefs.h. */
3279
3280int
3281main ()
3282{
3283
3284 ;
3285 return 0;
3286}
3287_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07003288if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003289 ac_cv_prog_cc_g=yes
3290fi
3291rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3292fi
3293rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3294fi
3295rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3296 ac_c_werror_flag=$ac_save_c_werror_flag
3297fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3299$as_echo "$ac_cv_prog_cc_g" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003300if test "$ac_test_CFLAGS" = set; then
3301 CFLAGS=$ac_save_CFLAGS
3302elif test $ac_cv_prog_cc_g = yes; then
3303 if test "$GCC" = yes; then
3304 CFLAGS="-g -O2"
3305 else
3306 CFLAGS="-g"
3307 fi
3308else
3309 if test "$GCC" = yes; then
3310 CFLAGS="-O2"
3311 else
3312 CFLAGS=
3313 fi
3314fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3316$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3317if ${ac_cv_prog_cc_c89+:} false; then :
3318 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003319else
3320 ac_cv_prog_cc_c89=no
3321ac_save_CC=$CC
Greg Hartman9768ca42017-06-22 20:49:52 -07003322cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003323/* end confdefs.h. */
3324#include <stdarg.h>
3325#include <stdio.h>
Greg Hartman9768ca42017-06-22 20:49:52 -07003326struct stat;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003327/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3328struct buf { int x; };
3329FILE * (*rcsopen) (struct buf *, struct stat *, int);
3330static char *e (p, i)
3331 char **p;
3332 int i;
3333{
3334 return p[i];
3335}
3336static char *f (char * (*g) (char **, int), char **p, ...)
3337{
3338 char *s;
3339 va_list v;
3340 va_start (v,p);
3341 s = g (p, va_arg (v,int));
3342 va_end (v);
3343 return s;
3344}
3345
3346/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3347 function prototypes and stuff, but not '\xHH' hex character constants.
3348 These don't provoke an error unfortunately, instead are silently treated
3349 as 'x'. The following induces an error, until -std is added to get
3350 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3351 array size at least. It's necessary to write '\x00'==0 to get something
3352 that's true only with -std. */
3353int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3354
3355/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3356 inside strings and character constants. */
3357#define FOO(x) 'x'
3358int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3359
3360int test (int i, double x);
3361struct s1 {int (*f) (int a);};
3362struct s2 {int (*f) (double a);};
3363int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3364int argc;
3365char **argv;
3366int
3367main ()
3368{
3369return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3370 ;
3371 return 0;
3372}
3373_ACEOF
3374for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3375 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3376do
3377 CC="$ac_save_CC $ac_arg"
Greg Hartman9768ca42017-06-22 20:49:52 -07003378 if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003379 ac_cv_prog_cc_c89=$ac_arg
3380fi
3381rm -f core conftest.err conftest.$ac_objext
3382 test "x$ac_cv_prog_cc_c89" != "xno" && break
3383done
3384rm -f conftest.$ac_ext
3385CC=$ac_save_CC
3386
3387fi
3388# AC_CACHE_VAL
3389case "x$ac_cv_prog_cc_c89" in
3390 x)
Greg Hartman9768ca42017-06-22 20:49:52 -07003391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3392$as_echo "none needed" >&6; } ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003393 xno)
Greg Hartman9768ca42017-06-22 20:49:52 -07003394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3395$as_echo "unsupported" >&6; } ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003396 *)
3397 CC="$CC $ac_cv_prog_cc_c89"
Greg Hartman9768ca42017-06-22 20:49:52 -07003398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3399$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003400esac
Greg Hartman9768ca42017-06-22 20:49:52 -07003401if test "x$ac_cv_prog_cc_c89" != xno; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003402
Greg Hartman9768ca42017-06-22 20:49:52 -07003403fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003404
3405ac_ext=c
3406ac_cpp='$CPP $CPPFLAGS'
3407ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3408ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3409ac_compiler_gnu=$ac_cv_c_compiler_gnu
3410
3411ac_aux_dir=
3412for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3413 if test -f "$ac_dir/install-sh"; then
3414 ac_aux_dir=$ac_dir
3415 ac_install_sh="$ac_aux_dir/install-sh -c"
3416 break
3417 elif test -f "$ac_dir/install.sh"; then
3418 ac_aux_dir=$ac_dir
3419 ac_install_sh="$ac_aux_dir/install.sh -c"
3420 break
3421 elif test -f "$ac_dir/shtool"; then
3422 ac_aux_dir=$ac_dir
3423 ac_install_sh="$ac_aux_dir/shtool install -c"
3424 break
3425 fi
3426done
3427if test -z "$ac_aux_dir"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07003428 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003429fi
3430
3431# These three variables are undocumented and unsupported,
3432# and are intended to be withdrawn in a future Autoconf release.
3433# They can cause serious problems if a builder's source tree is in a directory
3434# whose full name contains unusual characters.
3435ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3436ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3437ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3438
3439
3440# Make sure we can run config.sub.
3441$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
Greg Hartman9768ca42017-06-22 20:49:52 -07003442 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003443
Greg Hartman9768ca42017-06-22 20:49:52 -07003444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3445$as_echo_n "checking build system type... " >&6; }
3446if ${ac_cv_build+:} false; then :
3447 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003448else
3449 ac_build_alias=$build_alias
3450test "x$ac_build_alias" = x &&
3451 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3452test "x$ac_build_alias" = x &&
Greg Hartman9768ca42017-06-22 20:49:52 -07003453 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003454ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
Greg Hartman9768ca42017-06-22 20:49:52 -07003455 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003456
3457fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003458{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3459$as_echo "$ac_cv_build" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003460case $ac_cv_build in
3461*-*-*) ;;
Greg Hartman9768ca42017-06-22 20:49:52 -07003462*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003463esac
3464build=$ac_cv_build
3465ac_save_IFS=$IFS; IFS='-'
3466set x $ac_cv_build
3467shift
3468build_cpu=$1
3469build_vendor=$2
3470shift; shift
3471# Remember, the first character of IFS is used to create $*,
3472# except with old shells:
3473build_os=$*
3474IFS=$ac_save_IFS
3475case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3476
3477
Greg Hartman9768ca42017-06-22 20:49:52 -07003478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3479$as_echo_n "checking host system type... " >&6; }
3480if ${ac_cv_host+:} false; then :
3481 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003482else
3483 if test "x$host_alias" = x; then
3484 ac_cv_host=$ac_cv_build
3485else
3486 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
Greg Hartman9768ca42017-06-22 20:49:52 -07003487 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003488fi
3489
3490fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3492$as_echo "$ac_cv_host" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003493case $ac_cv_host in
3494*-*-*) ;;
Greg Hartman9768ca42017-06-22 20:49:52 -07003495*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003496esac
3497host=$ac_cv_host
3498ac_save_IFS=$IFS; IFS='-'
3499set x $ac_cv_host
3500shift
3501host_cpu=$1
3502host_vendor=$2
3503shift; shift
3504# Remember, the first character of IFS is used to create $*,
3505# except with old shells:
3506host_os=$*
3507IFS=$ac_save_IFS
3508case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3509
3510
3511
3512ac_ext=c
3513ac_cpp='$CPP $CPPFLAGS'
3514ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3515ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3516ac_compiler_gnu=$ac_cv_c_compiler_gnu
Greg Hartman9768ca42017-06-22 20:49:52 -07003517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3518$as_echo_n "checking how to run the C preprocessor... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003519# On Suns, sometimes $CPP names a directory.
3520if test -n "$CPP" && test -d "$CPP"; then
3521 CPP=
3522fi
3523if test -z "$CPP"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07003524 if ${ac_cv_prog_CPP+:} false; then :
3525 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003526else
3527 # Double quotes because CPP needs to be expanded
3528 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3529 do
3530 ac_preproc_ok=false
3531for ac_c_preproc_warn_flag in '' yes
3532do
3533 # Use a header file that comes with gcc, so configuring glibc
3534 # with a fresh cross-compiler works.
3535 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3536 # <limits.h> exists even on freestanding compilers.
3537 # On the NeXT, cc -E runs the code through the compiler's parser,
3538 # not just through cpp. "Syntax error" is here to catch this case.
Greg Hartman9768ca42017-06-22 20:49:52 -07003539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003540/* end confdefs.h. */
3541#ifdef __STDC__
3542# include <limits.h>
3543#else
3544# include <assert.h>
3545#endif
3546 Syntax error
3547_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07003548if ac_fn_c_try_cpp "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07003549
Greg Hartman9768ca42017-06-22 20:49:52 -07003550else
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003551 # Broken: fails on valid input.
3552continue
3553fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003554rm -f conftest.err conftest.i conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003555
3556 # OK, works on sane cases. Now check whether nonexistent headers
3557 # can be detected and how.
Greg Hartman9768ca42017-06-22 20:49:52 -07003558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003559/* end confdefs.h. */
3560#include <ac_nonexistent.h>
3561_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07003562if ac_fn_c_try_cpp "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003563 # Broken: success on invalid input.
3564continue
3565else
3566 # Passes both tests.
3567ac_preproc_ok=:
3568break
3569fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003570rm -f conftest.err conftest.i conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003571
3572done
3573# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Greg Hartman9768ca42017-06-22 20:49:52 -07003574rm -f conftest.i conftest.err conftest.$ac_ext
3575if $ac_preproc_ok; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003576 break
3577fi
3578
3579 done
3580 ac_cv_prog_CPP=$CPP
3581
3582fi
3583 CPP=$ac_cv_prog_CPP
3584else
3585 ac_cv_prog_CPP=$CPP
3586fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3588$as_echo "$CPP" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003589ac_preproc_ok=false
3590for ac_c_preproc_warn_flag in '' yes
3591do
3592 # Use a header file that comes with gcc, so configuring glibc
3593 # with a fresh cross-compiler works.
3594 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3595 # <limits.h> exists even on freestanding compilers.
3596 # On the NeXT, cc -E runs the code through the compiler's parser,
3597 # not just through cpp. "Syntax error" is here to catch this case.
Greg Hartman9768ca42017-06-22 20:49:52 -07003598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003599/* end confdefs.h. */
3600#ifdef __STDC__
3601# include <limits.h>
3602#else
3603# include <assert.h>
3604#endif
3605 Syntax error
3606_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07003607if ac_fn_c_try_cpp "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07003608
Greg Hartman9768ca42017-06-22 20:49:52 -07003609else
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003610 # Broken: fails on valid input.
3611continue
3612fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003613rm -f conftest.err conftest.i conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003614
3615 # OK, works on sane cases. Now check whether nonexistent headers
3616 # can be detected and how.
Greg Hartman9768ca42017-06-22 20:49:52 -07003617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003618/* end confdefs.h. */
3619#include <ac_nonexistent.h>
3620_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07003621if ac_fn_c_try_cpp "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003622 # Broken: success on invalid input.
3623continue
3624else
3625 # Passes both tests.
3626ac_preproc_ok=:
3627break
3628fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003629rm -f conftest.err conftest.i conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003630
3631done
3632# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Greg Hartman9768ca42017-06-22 20:49:52 -07003633rm -f conftest.i conftest.err conftest.$ac_ext
3634if $ac_preproc_ok; then :
3635
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003636else
Greg Hartman9768ca42017-06-22 20:49:52 -07003637 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3638$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3639as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3640See \`config.log' for more details" "$LINENO" 5; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003641fi
3642
3643ac_ext=c
3644ac_cpp='$CPP $CPPFLAGS'
3645ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3646ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3647ac_compiler_gnu=$ac_cv_c_compiler_gnu
3648
3649
Greg Hartman9768ca42017-06-22 20:49:52 -07003650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3651$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3652if ${ac_cv_path_GREP+:} false; then :
3653 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003654else
Greg Hartman9768ca42017-06-22 20:49:52 -07003655 if test -z "$GREP"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003656 ac_path_GREP_found=false
Greg Hartman9768ca42017-06-22 20:49:52 -07003657 # Loop through the user's path and test for each of PROGNAME-LIST
3658 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003659for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3660do
3661 IFS=$as_save_IFS
3662 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07003663 for ac_prog in grep ggrep; do
3664 for ac_exec_ext in '' $ac_executable_extensions; do
3665 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3666 as_fn_executable_p "$ac_path_GREP" || continue
3667# Check for GNU ac_path_GREP and select it if it is found.
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003668 # Check for GNU $ac_path_GREP
3669case `"$ac_path_GREP" --version 2>&1` in
3670*GNU*)
3671 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3672*)
3673 ac_count=0
Greg Hartman9768ca42017-06-22 20:49:52 -07003674 $as_echo_n 0123456789 >"conftest.in"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003675 while :
3676 do
3677 cat "conftest.in" "conftest.in" >"conftest.tmp"
3678 mv "conftest.tmp" "conftest.in"
3679 cp "conftest.in" "conftest.nl"
Greg Hartman9768ca42017-06-22 20:49:52 -07003680 $as_echo 'GREP' >> "conftest.nl"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003681 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3682 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Greg Hartman9768ca42017-06-22 20:49:52 -07003683 as_fn_arith $ac_count + 1 && ac_count=$as_val
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003684 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3685 # Best one so far, save it but keep looking for a better one
3686 ac_cv_path_GREP="$ac_path_GREP"
3687 ac_path_GREP_max=$ac_count
3688 fi
3689 # 10*(2^10) chars as input seems more than enough
3690 test $ac_count -gt 10 && break
3691 done
3692 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3693esac
3694
Greg Hartman9768ca42017-06-22 20:49:52 -07003695 $ac_path_GREP_found && break 3
3696 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003697 done
Greg Hartman9768ca42017-06-22 20:49:52 -07003698 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003699IFS=$as_save_IFS
Greg Hartman9768ca42017-06-22 20:49:52 -07003700 if test -z "$ac_cv_path_GREP"; then
3701 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3702 fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003703else
3704 ac_cv_path_GREP=$GREP
3705fi
3706
3707fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003708{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3709$as_echo "$ac_cv_path_GREP" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003710 GREP="$ac_cv_path_GREP"
3711
3712
Greg Hartman9768ca42017-06-22 20:49:52 -07003713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3714$as_echo_n "checking for egrep... " >&6; }
3715if ${ac_cv_path_EGREP+:} false; then :
3716 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003717else
3718 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3719 then ac_cv_path_EGREP="$GREP -E"
3720 else
Greg Hartman9768ca42017-06-22 20:49:52 -07003721 if test -z "$EGREP"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003722 ac_path_EGREP_found=false
Greg Hartman9768ca42017-06-22 20:49:52 -07003723 # Loop through the user's path and test for each of PROGNAME-LIST
3724 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003725for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3726do
3727 IFS=$as_save_IFS
3728 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07003729 for ac_prog in egrep; do
3730 for ac_exec_ext in '' $ac_executable_extensions; do
3731 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3732 as_fn_executable_p "$ac_path_EGREP" || continue
3733# Check for GNU ac_path_EGREP and select it if it is found.
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003734 # Check for GNU $ac_path_EGREP
3735case `"$ac_path_EGREP" --version 2>&1` in
3736*GNU*)
3737 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3738*)
3739 ac_count=0
Greg Hartman9768ca42017-06-22 20:49:52 -07003740 $as_echo_n 0123456789 >"conftest.in"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003741 while :
3742 do
3743 cat "conftest.in" "conftest.in" >"conftest.tmp"
3744 mv "conftest.tmp" "conftest.in"
3745 cp "conftest.in" "conftest.nl"
Greg Hartman9768ca42017-06-22 20:49:52 -07003746 $as_echo 'EGREP' >> "conftest.nl"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003747 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3748 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Greg Hartman9768ca42017-06-22 20:49:52 -07003749 as_fn_arith $ac_count + 1 && ac_count=$as_val
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003750 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3751 # Best one so far, save it but keep looking for a better one
3752 ac_cv_path_EGREP="$ac_path_EGREP"
3753 ac_path_EGREP_max=$ac_count
3754 fi
3755 # 10*(2^10) chars as input seems more than enough
3756 test $ac_count -gt 10 && break
3757 done
3758 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3759esac
3760
Greg Hartman9768ca42017-06-22 20:49:52 -07003761 $ac_path_EGREP_found && break 3
3762 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003763 done
Greg Hartman9768ca42017-06-22 20:49:52 -07003764 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003765IFS=$as_save_IFS
Greg Hartman9768ca42017-06-22 20:49:52 -07003766 if test -z "$ac_cv_path_EGREP"; then
3767 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3768 fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003769else
3770 ac_cv_path_EGREP=$EGREP
3771fi
3772
3773 fi
3774fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3776$as_echo "$ac_cv_path_EGREP" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003777 EGREP="$ac_cv_path_EGREP"
3778
3779
Greg Hartman9768ca42017-06-22 20:49:52 -07003780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3781$as_echo_n "checking for ANSI C header files... " >&6; }
3782if ${ac_cv_header_stdc+:} false; then :
3783 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003784else
Greg Hartman9768ca42017-06-22 20:49:52 -07003785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003786/* end confdefs.h. */
3787#include <stdlib.h>
3788#include <stdarg.h>
3789#include <string.h>
3790#include <float.h>
3791
3792int
3793main ()
3794{
3795
3796 ;
3797 return 0;
3798}
3799_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07003800if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003801 ac_cv_header_stdc=yes
3802else
Greg Hartman9768ca42017-06-22 20:49:52 -07003803 ac_cv_header_stdc=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003804fi
3805rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3806
3807if test $ac_cv_header_stdc = yes; then
3808 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
Greg Hartman9768ca42017-06-22 20:49:52 -07003809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003810/* end confdefs.h. */
3811#include <string.h>
3812
3813_ACEOF
3814if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -07003815 $EGREP "memchr" >/dev/null 2>&1; then :
3816
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003817else
3818 ac_cv_header_stdc=no
3819fi
3820rm -f conftest*
3821
3822fi
3823
3824if test $ac_cv_header_stdc = yes; then
3825 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
Greg Hartman9768ca42017-06-22 20:49:52 -07003826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003827/* end confdefs.h. */
3828#include <stdlib.h>
3829
3830_ACEOF
3831if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -07003832 $EGREP "free" >/dev/null 2>&1; then :
3833
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003834else
3835 ac_cv_header_stdc=no
3836fi
3837rm -f conftest*
3838
3839fi
3840
3841if test $ac_cv_header_stdc = yes; then
3842 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
Greg Hartman9768ca42017-06-22 20:49:52 -07003843 if test "$cross_compiling" = yes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003844 :
3845else
Greg Hartman9768ca42017-06-22 20:49:52 -07003846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003847/* end confdefs.h. */
3848#include <ctype.h>
3849#include <stdlib.h>
3850#if ((' ' & 0x0FF) == 0x020)
3851# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3852# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3853#else
3854# define ISLOWER(c) \
3855 (('a' <= (c) && (c) <= 'i') \
3856 || ('j' <= (c) && (c) <= 'r') \
3857 || ('s' <= (c) && (c) <= 'z'))
3858# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3859#endif
3860
3861#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3862int
3863main ()
3864{
3865 int i;
3866 for (i = 0; i < 256; i++)
3867 if (XOR (islower (i), ISLOWER (i))
3868 || toupper (i) != TOUPPER (i))
3869 return 2;
3870 return 0;
3871}
3872_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07003873if ac_fn_c_try_run "$LINENO"; then :
3874
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003875else
Greg Hartman9768ca42017-06-22 20:49:52 -07003876 ac_cv_header_stdc=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003877fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3879 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003880fi
3881
3882fi
3883fi
Greg Hartman9768ca42017-06-22 20:49:52 -07003884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3885$as_echo "$ac_cv_header_stdc" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003886if test $ac_cv_header_stdc = yes; then
3887
Greg Hartman9768ca42017-06-22 20:49:52 -07003888$as_echo "#define STDC_HEADERS 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003889
3890fi
3891
3892# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3893for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3894 inttypes.h stdint.h unistd.h
Greg Hartman9768ca42017-06-22 20:49:52 -07003895do :
3896 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3897ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3898"
3899if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003900 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07003901#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003902_ACEOF
3903
3904fi
3905
3906done
3907
3908
Greg Hartman9768ca42017-06-22 20:49:52 -07003909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
3910$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
3911if ${ac_cv_c_bigendian+:} false; then :
3912 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003913else
Greg Hartman9768ca42017-06-22 20:49:52 -07003914 ac_cv_c_bigendian=unknown
3915 # See if we're dealing with a universal compiler.
3916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3917/* end confdefs.h. */
3918#ifndef __APPLE_CC__
3919 not a universal capable compiler
3920 #endif
3921 typedef int dummy;
3922
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003923_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07003924if ac_fn_c_try_compile "$LINENO"; then :
3925
3926 # Check for potential -arch flags. It is not universal unless
3927 # there are at least two -arch flags with different values.
3928 ac_arch=
3929 ac_prev=
3930 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
3931 if test -n "$ac_prev"; then
3932 case $ac_word in
3933 i?86 | x86_64 | ppc | ppc64)
3934 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
3935 ac_arch=$ac_word
3936 else
3937 ac_cv_c_bigendian=universal
3938 break
3939 fi
3940 ;;
3941 esac
3942 ac_prev=
3943 elif test "x$ac_word" = "x-arch"; then
3944 ac_prev=arch
3945 fi
3946 done
3947fi
3948rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3949 if test $ac_cv_c_bigendian = unknown; then
3950 # See if sys/param.h defines the BYTE_ORDER macro.
3951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003952/* end confdefs.h. */
3953#include <sys/types.h>
Greg Hartman9768ca42017-06-22 20:49:52 -07003954 #include <sys/param.h>
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003955
3956int
3957main ()
3958{
Greg Hartman9768ca42017-06-22 20:49:52 -07003959#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
3960 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
3961 && LITTLE_ENDIAN)
3962 bogus endian macros
3963 #endif
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003964
3965 ;
3966 return 0;
3967}
3968_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07003969if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003970 # It does; now see whether it defined to BIG_ENDIAN or not.
Greg Hartman9768ca42017-06-22 20:49:52 -07003971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003972/* end confdefs.h. */
3973#include <sys/types.h>
Greg Hartman9768ca42017-06-22 20:49:52 -07003974 #include <sys/param.h>
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003975
3976int
3977main ()
3978{
3979#if BYTE_ORDER != BIG_ENDIAN
Greg Hartman9768ca42017-06-22 20:49:52 -07003980 not big endian
3981 #endif
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003982
3983 ;
3984 return 0;
3985}
3986_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07003987if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08003988 ac_cv_c_bigendian=yes
3989else
Greg Hartman9768ca42017-06-22 20:49:52 -07003990 ac_cv_c_bigendian=no
Adam Langleyd0592972015-03-30 14:49:51 -07003991fi
Adam Langleyd0592972015-03-30 14:49:51 -07003992rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Greg Hartman9768ca42017-06-22 20:49:52 -07003993fi
3994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3995 fi
3996 if test $ac_cv_c_bigendian = unknown; then
3997 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
3998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07003999/* end confdefs.h. */
Greg Hartman9768ca42017-06-22 20:49:52 -07004000#include <limits.h>
4001
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004002int
4003main ()
4004{
Greg Hartman9768ca42017-06-22 20:49:52 -07004005#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
4006 bogus endian macros
4007 #endif
4008
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004009 ;
4010 return 0;
4011}
4012_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07004013if ac_fn_c_try_compile "$LINENO"; then :
4014 # It does; now see whether it defined to _BIG_ENDIAN or not.
4015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4016/* end confdefs.h. */
4017#include <limits.h>
4018
4019int
4020main ()
4021{
4022#ifndef _BIG_ENDIAN
4023 not big endian
4024 #endif
4025
4026 ;
4027 return 0;
4028}
4029_ACEOF
4030if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004031 ac_cv_c_bigendian=yes
4032else
Greg Hartman9768ca42017-06-22 20:49:52 -07004033 ac_cv_c_bigendian=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004034fi
Greg Hartman9768ca42017-06-22 20:49:52 -07004035rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4036fi
4037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4038 fi
4039 if test $ac_cv_c_bigendian = unknown; then
4040 # Compile a test program.
4041 if test "$cross_compiling" = yes; then :
4042 # Try to guess by grepping values from an object file.
4043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4044/* end confdefs.h. */
4045short int ascii_mm[] =
4046 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4047 short int ascii_ii[] =
4048 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4049 int use_ascii (int i) {
4050 return ascii_mm[i] + ascii_ii[i];
4051 }
4052 short int ebcdic_ii[] =
4053 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4054 short int ebcdic_mm[] =
4055 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4056 int use_ebcdic (int i) {
4057 return ebcdic_mm[i] + ebcdic_ii[i];
4058 }
4059 extern int foo;
Adam Langleyd0592972015-03-30 14:49:51 -07004060
Greg Hartman9768ca42017-06-22 20:49:52 -07004061int
4062main ()
4063{
4064return use_ascii (foo) == use_ebcdic (foo);
4065 ;
4066 return 0;
4067}
4068_ACEOF
4069if ac_fn_c_try_compile "$LINENO"; then :
4070 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4071 ac_cv_c_bigendian=yes
4072 fi
4073 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4074 if test "$ac_cv_c_bigendian" = unknown; then
4075 ac_cv_c_bigendian=no
4076 else
4077 # finding both strings is unlikely to happen, but who knows?
4078 ac_cv_c_bigendian=unknown
4079 fi
4080 fi
4081fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004082rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4083else
Greg Hartman9768ca42017-06-22 20:49:52 -07004084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004085/* end confdefs.h. */
4086$ac_includes_default
4087int
4088main ()
4089{
4090
Greg Hartman9768ca42017-06-22 20:49:52 -07004091 /* Are we little or big endian? From Harbison&Steele. */
4092 union
4093 {
4094 long int l;
4095 char c[sizeof (long int)];
4096 } u;
4097 u.l = 1;
4098 return u.c[sizeof (long int) - 1] == 1;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004099
4100 ;
4101 return 0;
4102}
4103_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07004104if ac_fn_c_try_run "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004105 ac_cv_c_bigendian=no
4106else
Greg Hartman9768ca42017-06-22 20:49:52 -07004107 ac_cv_c_bigendian=yes
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004108fi
Greg Hartman9768ca42017-06-22 20:49:52 -07004109rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4110 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004111fi
4112
Greg Hartman9768ca42017-06-22 20:49:52 -07004113 fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004114fi
Greg Hartman9768ca42017-06-22 20:49:52 -07004115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
4116$as_echo "$ac_cv_c_bigendian" >&6; }
4117 case $ac_cv_c_bigendian in #(
4118 yes)
4119 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
4120;; #(
4121 no)
4122 ;; #(
4123 universal)
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004124
Greg Hartman9768ca42017-06-22 20:49:52 -07004125$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004126
Greg Hartman9768ca42017-06-22 20:49:52 -07004127 ;; #(
4128 *)
4129 as_fn_error $? "unknown endianness
4130 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
4131 esac
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004132
4133
4134# Checks for programs.
4135for ac_prog in gawk mawk nawk awk
4136do
4137 # Extract the first word of "$ac_prog", so it can be a program name with args.
4138set dummy $ac_prog; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07004139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4140$as_echo_n "checking for $ac_word... " >&6; }
4141if ${ac_cv_prog_AWK+:} false; then :
4142 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004143else
4144 if test -n "$AWK"; then
4145 ac_cv_prog_AWK="$AWK" # Let the user override the test.
4146else
4147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4148for as_dir in $PATH
4149do
4150 IFS=$as_save_IFS
4151 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07004152 for ac_exec_ext in '' $ac_executable_extensions; do
4153 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004154 ac_cv_prog_AWK="$ac_prog"
Greg Hartman9768ca42017-06-22 20:49:52 -07004155 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004156 break 2
4157 fi
4158done
Greg Hartman9768ca42017-06-22 20:49:52 -07004159 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004160IFS=$as_save_IFS
4161
4162fi
4163fi
4164AWK=$ac_cv_prog_AWK
4165if test -n "$AWK"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07004166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4167$as_echo "$AWK" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004168else
Greg Hartman9768ca42017-06-22 20:49:52 -07004169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4170$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004171fi
4172
4173
4174 test -n "$AWK" && break
4175done
4176
4177ac_ext=c
4178ac_cpp='$CPP $CPPFLAGS'
4179ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4180ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4181ac_compiler_gnu=$ac_cv_c_compiler_gnu
Greg Hartman9768ca42017-06-22 20:49:52 -07004182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4183$as_echo_n "checking how to run the C preprocessor... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004184# On Suns, sometimes $CPP names a directory.
4185if test -n "$CPP" && test -d "$CPP"; then
4186 CPP=
4187fi
4188if test -z "$CPP"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07004189 if ${ac_cv_prog_CPP+:} false; then :
4190 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004191else
4192 # Double quotes because CPP needs to be expanded
4193 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4194 do
4195 ac_preproc_ok=false
4196for ac_c_preproc_warn_flag in '' yes
4197do
4198 # Use a header file that comes with gcc, so configuring glibc
4199 # with a fresh cross-compiler works.
4200 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4201 # <limits.h> exists even on freestanding compilers.
4202 # On the NeXT, cc -E runs the code through the compiler's parser,
4203 # not just through cpp. "Syntax error" is here to catch this case.
Greg Hartman9768ca42017-06-22 20:49:52 -07004204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004205/* end confdefs.h. */
4206#ifdef __STDC__
4207# include <limits.h>
4208#else
4209# include <assert.h>
4210#endif
4211 Syntax error
4212_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07004213if ac_fn_c_try_cpp "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07004214
Greg Hartman9768ca42017-06-22 20:49:52 -07004215else
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004216 # Broken: fails on valid input.
4217continue
4218fi
Greg Hartman9768ca42017-06-22 20:49:52 -07004219rm -f conftest.err conftest.i conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004220
4221 # OK, works on sane cases. Now check whether nonexistent headers
4222 # can be detected and how.
Greg Hartman9768ca42017-06-22 20:49:52 -07004223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004224/* end confdefs.h. */
4225#include <ac_nonexistent.h>
4226_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07004227if ac_fn_c_try_cpp "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004228 # Broken: success on invalid input.
4229continue
4230else
4231 # Passes both tests.
4232ac_preproc_ok=:
4233break
4234fi
Greg Hartman9768ca42017-06-22 20:49:52 -07004235rm -f conftest.err conftest.i conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004236
4237done
4238# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Greg Hartman9768ca42017-06-22 20:49:52 -07004239rm -f conftest.i conftest.err conftest.$ac_ext
4240if $ac_preproc_ok; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004241 break
4242fi
4243
4244 done
4245 ac_cv_prog_CPP=$CPP
4246
4247fi
4248 CPP=$ac_cv_prog_CPP
4249else
4250 ac_cv_prog_CPP=$CPP
4251fi
Greg Hartman9768ca42017-06-22 20:49:52 -07004252{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4253$as_echo "$CPP" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004254ac_preproc_ok=false
4255for ac_c_preproc_warn_flag in '' yes
4256do
4257 # Use a header file that comes with gcc, so configuring glibc
4258 # with a fresh cross-compiler works.
4259 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4260 # <limits.h> exists even on freestanding compilers.
4261 # On the NeXT, cc -E runs the code through the compiler's parser,
4262 # not just through cpp. "Syntax error" is here to catch this case.
Greg Hartman9768ca42017-06-22 20:49:52 -07004263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004264/* end confdefs.h. */
4265#ifdef __STDC__
4266# include <limits.h>
4267#else
4268# include <assert.h>
4269#endif
4270 Syntax error
4271_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07004272if ac_fn_c_try_cpp "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07004273
Greg Hartman9768ca42017-06-22 20:49:52 -07004274else
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004275 # Broken: fails on valid input.
4276continue
4277fi
Greg Hartman9768ca42017-06-22 20:49:52 -07004278rm -f conftest.err conftest.i conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004279
4280 # OK, works on sane cases. Now check whether nonexistent headers
4281 # can be detected and how.
Greg Hartman9768ca42017-06-22 20:49:52 -07004282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004283/* end confdefs.h. */
4284#include <ac_nonexistent.h>
4285_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07004286if ac_fn_c_try_cpp "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004287 # Broken: success on invalid input.
4288continue
4289else
4290 # Passes both tests.
4291ac_preproc_ok=:
4292break
4293fi
Greg Hartman9768ca42017-06-22 20:49:52 -07004294rm -f conftest.err conftest.i conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004295
4296done
4297# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
Greg Hartman9768ca42017-06-22 20:49:52 -07004298rm -f conftest.i conftest.err conftest.$ac_ext
4299if $ac_preproc_ok; then :
4300
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004301else
Greg Hartman9768ca42017-06-22 20:49:52 -07004302 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4303$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4304as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4305See \`config.log' for more details" "$LINENO" 5; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004306fi
4307
4308ac_ext=c
4309ac_cpp='$CPP $CPPFLAGS'
4310ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4311ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4312ac_compiler_gnu=$ac_cv_c_compiler_gnu
4313
4314if test -n "$ac_tool_prefix"; then
4315 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4316set dummy ${ac_tool_prefix}ranlib; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07004317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4318$as_echo_n "checking for $ac_word... " >&6; }
4319if ${ac_cv_prog_RANLIB+:} false; then :
4320 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004321else
4322 if test -n "$RANLIB"; then
4323 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4324else
4325as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4326for as_dir in $PATH
4327do
4328 IFS=$as_save_IFS
4329 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07004330 for ac_exec_ext in '' $ac_executable_extensions; do
4331 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004332 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
Greg Hartman9768ca42017-06-22 20:49:52 -07004333 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004334 break 2
4335 fi
4336done
Greg Hartman9768ca42017-06-22 20:49:52 -07004337 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004338IFS=$as_save_IFS
4339
4340fi
4341fi
4342RANLIB=$ac_cv_prog_RANLIB
4343if test -n "$RANLIB"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07004344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4345$as_echo "$RANLIB" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004346else
Greg Hartman9768ca42017-06-22 20:49:52 -07004347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4348$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004349fi
4350
4351
4352fi
4353if test -z "$ac_cv_prog_RANLIB"; then
4354 ac_ct_RANLIB=$RANLIB
4355 # Extract the first word of "ranlib", so it can be a program name with args.
4356set dummy ranlib; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07004357{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4358$as_echo_n "checking for $ac_word... " >&6; }
4359if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4360 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004361else
4362 if test -n "$ac_ct_RANLIB"; then
4363 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4364else
4365as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4366for as_dir in $PATH
4367do
4368 IFS=$as_save_IFS
4369 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07004370 for ac_exec_ext in '' $ac_executable_extensions; do
4371 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004372 ac_cv_prog_ac_ct_RANLIB="ranlib"
Greg Hartman9768ca42017-06-22 20:49:52 -07004373 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004374 break 2
4375 fi
4376done
Greg Hartman9768ca42017-06-22 20:49:52 -07004377 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004378IFS=$as_save_IFS
4379
4380fi
4381fi
4382ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4383if test -n "$ac_ct_RANLIB"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07004384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4385$as_echo "$ac_ct_RANLIB" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004386else
Greg Hartman9768ca42017-06-22 20:49:52 -07004387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4388$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004389fi
4390
4391 if test "x$ac_ct_RANLIB" = x; then
4392 RANLIB=":"
4393 else
4394 case $cross_compiling:$ac_tool_warned in
4395yes:)
Greg Hartman9768ca42017-06-22 20:49:52 -07004396{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4397$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004398ac_tool_warned=yes ;;
4399esac
4400 RANLIB=$ac_ct_RANLIB
4401 fi
4402else
4403 RANLIB="$ac_cv_prog_RANLIB"
4404fi
4405
4406# Find a good install program. We prefer a C program (faster),
4407# so one script is as good as another. But avoid the broken or
4408# incompatible versions:
4409# SysV /etc/install, /usr/sbin/install
4410# SunOS /usr/etc/install
4411# IRIX /sbin/install
4412# AIX /bin/install
4413# AmigaOS /C/install, which installs bootblocks on floppy discs
4414# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4415# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4416# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4417# OS/2's system install, which has a completely different semantic
4418# ./install, which can be erroneously created by make from ./install.sh.
Greg Hartman9768ca42017-06-22 20:49:52 -07004419# Reject install programs that cannot install multiple files.
4420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4421$as_echo_n "checking for a BSD-compatible install... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004422if test -z "$INSTALL"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07004423if ${ac_cv_path_install+:} false; then :
4424 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004425else
4426 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4427for as_dir in $PATH
4428do
4429 IFS=$as_save_IFS
4430 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07004431 # Account for people who put trailing slashes in PATH elements.
4432case $as_dir/ in #((
4433 ./ | .// | /[cC]/* | \
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004434 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
Greg Hartman9768ca42017-06-22 20:49:52 -07004435 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004436 /usr/ucb/* ) ;;
4437 *)
4438 # OSF1 and SCO ODT 3.0 have their own names for install.
4439 # Don't use installbsd from OSF since it installs stuff as root
4440 # by default.
4441 for ac_prog in ginstall scoinst install; do
4442 for ac_exec_ext in '' $ac_executable_extensions; do
Greg Hartman9768ca42017-06-22 20:49:52 -07004443 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004444 if test $ac_prog = install &&
4445 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4446 # AIX install. It has an incompatible calling convention.
4447 :
4448 elif test $ac_prog = install &&
4449 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4450 # program-specific install script used by HP pwplus--don't use.
4451 :
4452 else
Greg Hartman9768ca42017-06-22 20:49:52 -07004453 rm -rf conftest.one conftest.two conftest.dir
4454 echo one > conftest.one
4455 echo two > conftest.two
4456 mkdir conftest.dir
4457 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4458 test -s conftest.one && test -s conftest.two &&
4459 test -s conftest.dir/conftest.one &&
4460 test -s conftest.dir/conftest.two
4461 then
4462 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4463 break 3
4464 fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004465 fi
4466 fi
4467 done
4468 done
4469 ;;
4470esac
Greg Hartman9768ca42017-06-22 20:49:52 -07004471
4472 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004473IFS=$as_save_IFS
4474
Greg Hartman9768ca42017-06-22 20:49:52 -07004475rm -rf conftest.one conftest.two conftest.dir
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004476
4477fi
4478 if test "${ac_cv_path_install+set}" = set; then
4479 INSTALL=$ac_cv_path_install
4480 else
4481 # As a last resort, use the slow shell script. Don't cache a
4482 # value for INSTALL within a source directory, because that will
4483 # break other packages using the cache if that directory is
4484 # removed, or if the value is a relative name.
4485 INSTALL=$ac_install_sh
4486 fi
4487fi
Greg Hartman9768ca42017-06-22 20:49:52 -07004488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4489$as_echo "$INSTALL" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004490
4491# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4492# It thinks the first close brace ends the variable substitution.
4493test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4494
4495test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4496
4497test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4498
Greg Hartman9768ca42017-06-22 20:49:52 -07004499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4500$as_echo_n "checking for egrep... " >&6; }
4501if ${ac_cv_path_EGREP+:} false; then :
4502 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004503else
4504 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4505 then ac_cv_path_EGREP="$GREP -E"
4506 else
Greg Hartman9768ca42017-06-22 20:49:52 -07004507 if test -z "$EGREP"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004508 ac_path_EGREP_found=false
Greg Hartman9768ca42017-06-22 20:49:52 -07004509 # Loop through the user's path and test for each of PROGNAME-LIST
4510 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004511for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4512do
4513 IFS=$as_save_IFS
4514 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07004515 for ac_prog in egrep; do
4516 for ac_exec_ext in '' $ac_executable_extensions; do
4517 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4518 as_fn_executable_p "$ac_path_EGREP" || continue
4519# Check for GNU ac_path_EGREP and select it if it is found.
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004520 # Check for GNU $ac_path_EGREP
4521case `"$ac_path_EGREP" --version 2>&1` in
4522*GNU*)
4523 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4524*)
4525 ac_count=0
Greg Hartman9768ca42017-06-22 20:49:52 -07004526 $as_echo_n 0123456789 >"conftest.in"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004527 while :
4528 do
4529 cat "conftest.in" "conftest.in" >"conftest.tmp"
4530 mv "conftest.tmp" "conftest.in"
4531 cp "conftest.in" "conftest.nl"
Greg Hartman9768ca42017-06-22 20:49:52 -07004532 $as_echo 'EGREP' >> "conftest.nl"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004533 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4534 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
Greg Hartman9768ca42017-06-22 20:49:52 -07004535 as_fn_arith $ac_count + 1 && ac_count=$as_val
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004536 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4537 # Best one so far, save it but keep looking for a better one
4538 ac_cv_path_EGREP="$ac_path_EGREP"
4539 ac_path_EGREP_max=$ac_count
4540 fi
4541 # 10*(2^10) chars as input seems more than enough
4542 test $ac_count -gt 10 && break
4543 done
4544 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4545esac
4546
Greg Hartman9768ca42017-06-22 20:49:52 -07004547 $ac_path_EGREP_found && break 3
4548 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004549 done
Greg Hartman9768ca42017-06-22 20:49:52 -07004550 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004551IFS=$as_save_IFS
Greg Hartman9768ca42017-06-22 20:49:52 -07004552 if test -z "$ac_cv_path_EGREP"; then
4553 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4554 fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004555else
4556 ac_cv_path_EGREP=$EGREP
4557fi
4558
4559 fi
4560fi
Greg Hartman9768ca42017-06-22 20:49:52 -07004561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4562$as_echo "$ac_cv_path_EGREP" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004563 EGREP="$ac_cv_path_EGREP"
4564
4565
Greg Hartmanccacbc92016-02-03 09:59:44 -08004566if test -n "$ac_tool_prefix"; then
4567 for ac_prog in ar
4568 do
4569 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4570set dummy $ac_tool_prefix$ac_prog; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07004571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4572$as_echo_n "checking for $ac_word... " >&6; }
4573if ${ac_cv_prog_AR+:} false; then :
4574 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004575else
Greg Hartmanccacbc92016-02-03 09:59:44 -08004576 if test -n "$AR"; then
4577 ac_cv_prog_AR="$AR" # Let the user override the test.
4578else
4579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004580for as_dir in $PATH
4581do
4582 IFS=$as_save_IFS
4583 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07004584 for ac_exec_ext in '' $ac_executable_extensions; do
4585 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanccacbc92016-02-03 09:59:44 -08004586 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
Greg Hartman9768ca42017-06-22 20:49:52 -07004587 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004588 break 2
4589 fi
4590done
Greg Hartman9768ca42017-06-22 20:49:52 -07004591 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004592IFS=$as_save_IFS
4593
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004594fi
Greg Hartmanccacbc92016-02-03 09:59:44 -08004595fi
4596AR=$ac_cv_prog_AR
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004597if test -n "$AR"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07004598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4599$as_echo "$AR" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004600else
Greg Hartman9768ca42017-06-22 20:49:52 -07004601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4602$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004603fi
4604
4605
Greg Hartmanccacbc92016-02-03 09:59:44 -08004606 test -n "$AR" && break
4607 done
4608fi
4609if test -z "$AR"; then
4610 ac_ct_AR=$AR
4611 for ac_prog in ar
4612do
4613 # Extract the first word of "$ac_prog", so it can be a program name with args.
4614set dummy $ac_prog; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07004615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4616$as_echo_n "checking for $ac_word... " >&6; }
4617if ${ac_cv_prog_ac_ct_AR+:} false; then :
4618 $as_echo_n "(cached) " >&6
Greg Hartmanccacbc92016-02-03 09:59:44 -08004619else
4620 if test -n "$ac_ct_AR"; then
4621 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4622else
4623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4624for as_dir in $PATH
4625do
4626 IFS=$as_save_IFS
4627 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07004628 for ac_exec_ext in '' $ac_executable_extensions; do
4629 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanccacbc92016-02-03 09:59:44 -08004630 ac_cv_prog_ac_ct_AR="$ac_prog"
Greg Hartman9768ca42017-06-22 20:49:52 -07004631 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanccacbc92016-02-03 09:59:44 -08004632 break 2
4633 fi
4634done
Greg Hartman9768ca42017-06-22 20:49:52 -07004635 done
Greg Hartmanccacbc92016-02-03 09:59:44 -08004636IFS=$as_save_IFS
4637
4638fi
4639fi
4640ac_ct_AR=$ac_cv_prog_ac_ct_AR
4641if test -n "$ac_ct_AR"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07004642 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4643$as_echo "$ac_ct_AR" >&6; }
Greg Hartmanccacbc92016-02-03 09:59:44 -08004644else
Greg Hartman9768ca42017-06-22 20:49:52 -07004645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4646$as_echo "no" >&6; }
Greg Hartmanccacbc92016-02-03 09:59:44 -08004647fi
4648
4649
4650 test -n "$ac_ct_AR" && break
4651done
4652
4653 if test "x$ac_ct_AR" = x; then
4654 AR=""
4655 else
4656 case $cross_compiling:$ac_tool_warned in
4657yes:)
Greg Hartman9768ca42017-06-22 20:49:52 -07004658{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4659$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Greg Hartmanccacbc92016-02-03 09:59:44 -08004660ac_tool_warned=yes ;;
4661esac
4662 AR=$ac_ct_AR
4663 fi
4664fi
4665
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004666# Extract the first word of "cat", so it can be a program name with args.
4667set dummy cat; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07004668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4669$as_echo_n "checking for $ac_word... " >&6; }
4670if ${ac_cv_path_CAT+:} false; then :
4671 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004672else
4673 case $CAT in
4674 [\\/]* | ?:[\\/]*)
4675 ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4676 ;;
4677 *)
4678 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4679for as_dir in $PATH
4680do
4681 IFS=$as_save_IFS
4682 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07004683 for ac_exec_ext in '' $ac_executable_extensions; do
4684 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004685 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -07004686 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004687 break 2
4688 fi
4689done
Greg Hartman9768ca42017-06-22 20:49:52 -07004690 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004691IFS=$as_save_IFS
4692
4693 ;;
4694esac
4695fi
4696CAT=$ac_cv_path_CAT
4697if test -n "$CAT"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07004698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4699$as_echo "$CAT" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004700else
Greg Hartman9768ca42017-06-22 20:49:52 -07004701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4702$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004703fi
4704
4705
4706# Extract the first word of "kill", so it can be a program name with args.
4707set dummy kill; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07004708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4709$as_echo_n "checking for $ac_word... " >&6; }
4710if ${ac_cv_path_KILL+:} false; then :
4711 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004712else
4713 case $KILL in
4714 [\\/]* | ?:[\\/]*)
4715 ac_cv_path_KILL="$KILL" # Let the user override the test with a path.
4716 ;;
4717 *)
4718 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4719for as_dir in $PATH
4720do
4721 IFS=$as_save_IFS
4722 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07004723 for ac_exec_ext in '' $ac_executable_extensions; do
4724 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004725 ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -07004726 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004727 break 2
4728 fi
4729done
Greg Hartman9768ca42017-06-22 20:49:52 -07004730 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004731IFS=$as_save_IFS
4732
4733 ;;
4734esac
4735fi
4736KILL=$ac_cv_path_KILL
4737if test -n "$KILL"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07004738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KILL" >&5
4739$as_echo "$KILL" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004740else
Greg Hartman9768ca42017-06-22 20:49:52 -07004741 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4742$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004743fi
4744
4745
4746for ac_prog in perl5 perl
4747do
4748 # Extract the first word of "$ac_prog", so it can be a program name with args.
4749set dummy $ac_prog; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07004750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4751$as_echo_n "checking for $ac_word... " >&6; }
4752if ${ac_cv_path_PERL+:} false; then :
4753 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004754else
4755 case $PERL in
4756 [\\/]* | ?:[\\/]*)
4757 ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4758 ;;
4759 *)
4760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4761for as_dir in $PATH
4762do
4763 IFS=$as_save_IFS
4764 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07004765 for ac_exec_ext in '' $ac_executable_extensions; do
4766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004767 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -07004768 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004769 break 2
4770 fi
4771done
Greg Hartman9768ca42017-06-22 20:49:52 -07004772 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004773IFS=$as_save_IFS
4774
4775 ;;
4776esac
4777fi
4778PERL=$ac_cv_path_PERL
4779if test -n "$PERL"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07004780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
4781$as_echo "$PERL" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004782else
Greg Hartman9768ca42017-06-22 20:49:52 -07004783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4784$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004785fi
4786
4787
4788 test -n "$PERL" && break
4789done
4790
4791# Extract the first word of "sed", so it can be a program name with args.
4792set dummy sed; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07004793{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4794$as_echo_n "checking for $ac_word... " >&6; }
4795if ${ac_cv_path_SED+:} false; then :
4796 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004797else
4798 case $SED in
4799 [\\/]* | ?:[\\/]*)
4800 ac_cv_path_SED="$SED" # Let the user override the test with a path.
4801 ;;
4802 *)
4803 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4804for as_dir in $PATH
4805do
4806 IFS=$as_save_IFS
4807 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07004808 for ac_exec_ext in '' $ac_executable_extensions; do
4809 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004810 ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -07004811 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004812 break 2
4813 fi
4814done
Greg Hartman9768ca42017-06-22 20:49:52 -07004815 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004816IFS=$as_save_IFS
4817
4818 ;;
4819esac
4820fi
4821SED=$ac_cv_path_SED
4822if test -n "$SED"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07004823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
4824$as_echo "$SED" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004825else
Greg Hartman9768ca42017-06-22 20:49:52 -07004826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4827$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004828fi
4829
4830
4831
4832# Extract the first word of "ent", so it can be a program name with args.
4833set dummy ent; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07004834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4835$as_echo_n "checking for $ac_word... " >&6; }
4836if ${ac_cv_path_ENT+:} false; then :
4837 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004838else
4839 case $ENT in
4840 [\\/]* | ?:[\\/]*)
4841 ac_cv_path_ENT="$ENT" # Let the user override the test with a path.
4842 ;;
4843 *)
4844 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4845for as_dir in $PATH
4846do
4847 IFS=$as_save_IFS
4848 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07004849 for ac_exec_ext in '' $ac_executable_extensions; do
4850 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004851 ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -07004852 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004853 break 2
4854 fi
4855done
Greg Hartman9768ca42017-06-22 20:49:52 -07004856 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004857IFS=$as_save_IFS
4858
4859 ;;
4860esac
4861fi
4862ENT=$ac_cv_path_ENT
4863if test -n "$ENT"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07004864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENT" >&5
4865$as_echo "$ENT" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004866else
Greg Hartman9768ca42017-06-22 20:49:52 -07004867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4868$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004869fi
4870
4871
4872
4873# Extract the first word of "bash", so it can be a program name with args.
4874set dummy bash; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07004875{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4876$as_echo_n "checking for $ac_word... " >&6; }
4877if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4878 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004879else
4880 case $TEST_MINUS_S_SH in
4881 [\\/]* | ?:[\\/]*)
4882 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4883 ;;
4884 *)
4885 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4886for as_dir in $PATH
4887do
4888 IFS=$as_save_IFS
4889 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07004890 for ac_exec_ext in '' $ac_executable_extensions; do
4891 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004892 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -07004893 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004894 break 2
4895 fi
4896done
Greg Hartman9768ca42017-06-22 20:49:52 -07004897 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004898IFS=$as_save_IFS
4899
4900 ;;
4901esac
4902fi
4903TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4904if test -n "$TEST_MINUS_S_SH"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07004905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4906$as_echo "$TEST_MINUS_S_SH" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004907else
Greg Hartman9768ca42017-06-22 20:49:52 -07004908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4909$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004910fi
4911
4912
4913# Extract the first word of "ksh", so it can be a program name with args.
4914set dummy ksh; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07004915{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4916$as_echo_n "checking for $ac_word... " >&6; }
4917if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4918 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004919else
4920 case $TEST_MINUS_S_SH in
4921 [\\/]* | ?:[\\/]*)
4922 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4923 ;;
4924 *)
4925 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4926for as_dir in $PATH
4927do
4928 IFS=$as_save_IFS
4929 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07004930 for ac_exec_ext in '' $ac_executable_extensions; do
4931 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004932 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -07004933 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004934 break 2
4935 fi
4936done
Greg Hartman9768ca42017-06-22 20:49:52 -07004937 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004938IFS=$as_save_IFS
4939
4940 ;;
4941esac
4942fi
4943TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4944if test -n "$TEST_MINUS_S_SH"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07004945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4946$as_echo "$TEST_MINUS_S_SH" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004947else
Greg Hartman9768ca42017-06-22 20:49:52 -07004948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4949$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004950fi
4951
4952
4953# Extract the first word of "sh", so it can be a program name with args.
4954set dummy sh; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07004955{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4956$as_echo_n "checking for $ac_word... " >&6; }
4957if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4958 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004959else
4960 case $TEST_MINUS_S_SH in
4961 [\\/]* | ?:[\\/]*)
4962 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4963 ;;
4964 *)
4965 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4966for as_dir in $PATH
4967do
4968 IFS=$as_save_IFS
4969 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07004970 for ac_exec_ext in '' $ac_executable_extensions; do
4971 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004972 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -07004973 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004974 break 2
4975 fi
4976done
Greg Hartman9768ca42017-06-22 20:49:52 -07004977 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004978IFS=$as_save_IFS
4979
4980 ;;
4981esac
4982fi
4983TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4984if test -n "$TEST_MINUS_S_SH"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07004985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4986$as_echo "$TEST_MINUS_S_SH" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004987else
Greg Hartman9768ca42017-06-22 20:49:52 -07004988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4989$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004990fi
4991
4992
4993# Extract the first word of "sh", so it can be a program name with args.
4994set dummy sh; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07004995{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4996$as_echo_n "checking for $ac_word... " >&6; }
4997if ${ac_cv_path_SH+:} false; then :
4998 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08004999else
5000 case $SH in
5001 [\\/]* | ?:[\\/]*)
5002 ac_cv_path_SH="$SH" # Let the user override the test with a path.
5003 ;;
5004 *)
5005 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5006for as_dir in $PATH
5007do
5008 IFS=$as_save_IFS
5009 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07005010 for ac_exec_ext in '' $ac_executable_extensions; do
5011 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005012 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -07005013 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005014 break 2
5015 fi
5016done
Greg Hartman9768ca42017-06-22 20:49:52 -07005017 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005018IFS=$as_save_IFS
5019
5020 ;;
5021esac
5022fi
5023SH=$ac_cv_path_SH
5024if test -n "$SH"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07005025 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5026$as_echo "$SH" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005027else
Greg Hartman9768ca42017-06-22 20:49:52 -07005028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5029$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005030fi
5031
5032
5033# Extract the first word of "groff", so it can be a program name with args.
5034set dummy groff; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07005035{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5036$as_echo_n "checking for $ac_word... " >&6; }
5037if ${ac_cv_path_GROFF+:} false; then :
5038 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005039else
5040 case $GROFF in
5041 [\\/]* | ?:[\\/]*)
5042 ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path.
5043 ;;
5044 *)
5045 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5046for as_dir in $PATH
5047do
5048 IFS=$as_save_IFS
5049 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07005050 for ac_exec_ext in '' $ac_executable_extensions; do
5051 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005052 ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -07005053 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005054 break 2
5055 fi
5056done
Greg Hartman9768ca42017-06-22 20:49:52 -07005057 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005058IFS=$as_save_IFS
5059
5060 ;;
5061esac
5062fi
5063GROFF=$ac_cv_path_GROFF
5064if test -n "$GROFF"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07005065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5
5066$as_echo "$GROFF" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005067else
Greg Hartman9768ca42017-06-22 20:49:52 -07005068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5069$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005070fi
5071
5072
5073# Extract the first word of "nroff", so it can be a program name with args.
5074set dummy nroff; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07005075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5076$as_echo_n "checking for $ac_word... " >&6; }
5077if ${ac_cv_path_NROFF+:} false; then :
5078 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005079else
5080 case $NROFF in
5081 [\\/]* | ?:[\\/]*)
5082 ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
5083 ;;
5084 *)
5085 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5086for as_dir in $PATH
5087do
5088 IFS=$as_save_IFS
5089 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07005090 for ac_exec_ext in '' $ac_executable_extensions; do
5091 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005092 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -07005093 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005094 break 2
5095 fi
5096done
Greg Hartman9768ca42017-06-22 20:49:52 -07005097 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005098IFS=$as_save_IFS
5099
5100 ;;
5101esac
5102fi
5103NROFF=$ac_cv_path_NROFF
5104if test -n "$NROFF"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07005105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
5106$as_echo "$NROFF" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005107else
Greg Hartman9768ca42017-06-22 20:49:52 -07005108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5109$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005110fi
5111
5112
5113# Extract the first word of "mandoc", so it can be a program name with args.
5114set dummy mandoc; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07005115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5116$as_echo_n "checking for $ac_word... " >&6; }
5117if ${ac_cv_path_MANDOC+:} false; then :
5118 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005119else
5120 case $MANDOC in
5121 [\\/]* | ?:[\\/]*)
5122 ac_cv_path_MANDOC="$MANDOC" # Let the user override the test with a path.
5123 ;;
5124 *)
5125 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5126for as_dir in $PATH
5127do
5128 IFS=$as_save_IFS
5129 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07005130 for ac_exec_ext in '' $ac_executable_extensions; do
5131 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005132 ac_cv_path_MANDOC="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -07005133 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005134 break 2
5135 fi
5136done
Greg Hartman9768ca42017-06-22 20:49:52 -07005137 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005138IFS=$as_save_IFS
5139
5140 ;;
5141esac
5142fi
5143MANDOC=$ac_cv_path_MANDOC
5144if test -n "$MANDOC"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07005145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANDOC" >&5
5146$as_echo "$MANDOC" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005147else
Greg Hartman9768ca42017-06-22 20:49:52 -07005148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5149$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005150fi
5151
5152
5153TEST_SHELL=sh
5154
5155
5156if test "x$MANDOC" != "x" ; then
5157 MANFMT="$MANDOC"
5158elif test "x$NROFF" != "x" ; then
5159 MANFMT="$NROFF -mandoc"
5160elif test "x$GROFF" != "x" ; then
5161 MANFMT="$GROFF -mandoc -Tascii"
5162else
Greg Hartman9768ca42017-06-22 20:49:52 -07005163 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no manpage formatted found" >&5
5164$as_echo "$as_me: WARNING: no manpage formatted found" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005165 MANFMT="false"
5166fi
5167
5168
5169# Extract the first word of "groupadd", so it can be a program name with args.
5170set dummy groupadd; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07005171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5172$as_echo_n "checking for $ac_word... " >&6; }
5173if ${ac_cv_path_PATH_GROUPADD_PROG+:} false; then :
5174 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005175else
5176 case $PATH_GROUPADD_PROG in
5177 [\\/]* | ?:[\\/]*)
5178 ac_cv_path_PATH_GROUPADD_PROG="$PATH_GROUPADD_PROG" # Let the user override the test with a path.
5179 ;;
5180 *)
5181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5182for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
5183do
5184 IFS=$as_save_IFS
5185 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07005186 for ac_exec_ext in '' $ac_executable_extensions; do
5187 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005188 ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -07005189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005190 break 2
5191 fi
5192done
Greg Hartman9768ca42017-06-22 20:49:52 -07005193 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005194IFS=$as_save_IFS
5195
5196 test -z "$ac_cv_path_PATH_GROUPADD_PROG" && ac_cv_path_PATH_GROUPADD_PROG="groupadd"
5197 ;;
5198esac
5199fi
5200PATH_GROUPADD_PROG=$ac_cv_path_PATH_GROUPADD_PROG
5201if test -n "$PATH_GROUPADD_PROG"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07005202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_GROUPADD_PROG" >&5
5203$as_echo "$PATH_GROUPADD_PROG" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005204else
Greg Hartman9768ca42017-06-22 20:49:52 -07005205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5206$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005207fi
5208
5209
5210# Extract the first word of "useradd", so it can be a program name with args.
5211set dummy useradd; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07005212{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5213$as_echo_n "checking for $ac_word... " >&6; }
5214if ${ac_cv_path_PATH_USERADD_PROG+:} false; then :
5215 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005216else
5217 case $PATH_USERADD_PROG in
5218 [\\/]* | ?:[\\/]*)
5219 ac_cv_path_PATH_USERADD_PROG="$PATH_USERADD_PROG" # Let the user override the test with a path.
5220 ;;
5221 *)
5222 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5223for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
5224do
5225 IFS=$as_save_IFS
5226 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07005227 for ac_exec_ext in '' $ac_executable_extensions; do
5228 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005229 ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -07005230 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005231 break 2
5232 fi
5233done
Greg Hartman9768ca42017-06-22 20:49:52 -07005234 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005235IFS=$as_save_IFS
5236
5237 test -z "$ac_cv_path_PATH_USERADD_PROG" && ac_cv_path_PATH_USERADD_PROG="useradd"
5238 ;;
5239esac
5240fi
5241PATH_USERADD_PROG=$ac_cv_path_PATH_USERADD_PROG
5242if test -n "$PATH_USERADD_PROG"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07005243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_USERADD_PROG" >&5
5244$as_echo "$PATH_USERADD_PROG" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005245else
Greg Hartman9768ca42017-06-22 20:49:52 -07005246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5247$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005248fi
5249
5250
5251# Extract the first word of "pkgmk", so it can be a program name with args.
5252set dummy pkgmk; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07005253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5254$as_echo_n "checking for $ac_word... " >&6; }
5255if ${ac_cv_prog_MAKE_PACKAGE_SUPPORTED+:} false; then :
5256 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005257else
5258 if test -n "$MAKE_PACKAGE_SUPPORTED"; then
5259 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="$MAKE_PACKAGE_SUPPORTED" # Let the user override the test.
5260else
5261as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5262for as_dir in $PATH
5263do
5264 IFS=$as_save_IFS
5265 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07005266 for ac_exec_ext in '' $ac_executable_extensions; do
5267 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005268 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes"
Greg Hartman9768ca42017-06-22 20:49:52 -07005269 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005270 break 2
5271 fi
5272done
Greg Hartman9768ca42017-06-22 20:49:52 -07005273 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005274IFS=$as_save_IFS
5275
5276 test -z "$ac_cv_prog_MAKE_PACKAGE_SUPPORTED" && ac_cv_prog_MAKE_PACKAGE_SUPPORTED="no"
5277fi
5278fi
5279MAKE_PACKAGE_SUPPORTED=$ac_cv_prog_MAKE_PACKAGE_SUPPORTED
5280if test -n "$MAKE_PACKAGE_SUPPORTED"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07005281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE_PACKAGE_SUPPORTED" >&5
5282$as_echo "$MAKE_PACKAGE_SUPPORTED" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005283else
Greg Hartman9768ca42017-06-22 20:49:52 -07005284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5285$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005286fi
5287
5288
5289if test -x /sbin/sh; then
5290 STARTUP_SCRIPT_SHELL=/sbin/sh
5291
5292else
5293 STARTUP_SCRIPT_SHELL=/bin/sh
5294
5295fi
5296
5297# System features
5298# Check whether --enable-largefile was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07005299if test "${enable_largefile+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005300 enableval=$enable_largefile;
5301fi
5302
5303if test "$enable_largefile" != no; then
5304
Greg Hartman9768ca42017-06-22 20:49:52 -07005305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5306$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5307if ${ac_cv_sys_largefile_CC+:} false; then :
5308 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005309else
5310 ac_cv_sys_largefile_CC=no
5311 if test "$GCC" != yes; then
5312 ac_save_CC=$CC
5313 while :; do
5314 # IRIX 6.2 and later do not support large files by default,
5315 # so use the C compiler's -n32 option if that helps.
Greg Hartman9768ca42017-06-22 20:49:52 -07005316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005317/* end confdefs.h. */
5318#include <sys/types.h>
5319 /* Check that off_t can represent 2**63 - 1 correctly.
5320 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5321 since some C++ compilers masquerading as C compilers
5322 incorrectly reject 9223372036854775807. */
5323#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5324 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5325 && LARGE_OFF_T % 2147483647 == 1)
5326 ? 1 : -1];
5327int
5328main ()
5329{
5330
5331 ;
5332 return 0;
5333}
5334_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07005335 if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005336 break
5337fi
5338rm -f core conftest.err conftest.$ac_objext
5339 CC="$CC -n32"
Greg Hartman9768ca42017-06-22 20:49:52 -07005340 if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005341 ac_cv_sys_largefile_CC=' -n32'; break
5342fi
5343rm -f core conftest.err conftest.$ac_objext
5344 break
5345 done
5346 CC=$ac_save_CC
5347 rm -f conftest.$ac_ext
5348 fi
5349fi
Greg Hartman9768ca42017-06-22 20:49:52 -07005350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5351$as_echo "$ac_cv_sys_largefile_CC" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005352 if test "$ac_cv_sys_largefile_CC" != no; then
5353 CC=$CC$ac_cv_sys_largefile_CC
5354 fi
5355
Greg Hartman9768ca42017-06-22 20:49:52 -07005356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5357$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5358if ${ac_cv_sys_file_offset_bits+:} false; then :
5359 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005360else
5361 while :; do
Greg Hartman9768ca42017-06-22 20:49:52 -07005362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005363/* end confdefs.h. */
5364#include <sys/types.h>
5365 /* Check that off_t can represent 2**63 - 1 correctly.
5366 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5367 since some C++ compilers masquerading as C compilers
5368 incorrectly reject 9223372036854775807. */
5369#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5370 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5371 && LARGE_OFF_T % 2147483647 == 1)
5372 ? 1 : -1];
5373int
5374main ()
5375{
5376
5377 ;
5378 return 0;
5379}
5380_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07005381if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005382 ac_cv_sys_file_offset_bits=no; break
5383fi
5384rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Greg Hartman9768ca42017-06-22 20:49:52 -07005385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005386/* end confdefs.h. */
5387#define _FILE_OFFSET_BITS 64
5388#include <sys/types.h>
5389 /* Check that off_t can represent 2**63 - 1 correctly.
5390 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5391 since some C++ compilers masquerading as C compilers
5392 incorrectly reject 9223372036854775807. */
5393#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5394 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5395 && LARGE_OFF_T % 2147483647 == 1)
5396 ? 1 : -1];
5397int
5398main ()
5399{
5400
5401 ;
5402 return 0;
5403}
5404_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07005405if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005406 ac_cv_sys_file_offset_bits=64; break
5407fi
5408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5409 ac_cv_sys_file_offset_bits=unknown
5410 break
5411done
5412fi
Greg Hartman9768ca42017-06-22 20:49:52 -07005413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5414$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005415case $ac_cv_sys_file_offset_bits in #(
5416 no | unknown) ;;
5417 *)
5418cat >>confdefs.h <<_ACEOF
5419#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5420_ACEOF
5421;;
5422esac
Greg Hartman9768ca42017-06-22 20:49:52 -07005423rm -rf conftest*
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005424 if test $ac_cv_sys_file_offset_bits = unknown; then
Greg Hartman9768ca42017-06-22 20:49:52 -07005425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5426$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5427if ${ac_cv_sys_large_files+:} false; then :
5428 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005429else
5430 while :; do
Greg Hartman9768ca42017-06-22 20:49:52 -07005431 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005432/* end confdefs.h. */
5433#include <sys/types.h>
5434 /* Check that off_t can represent 2**63 - 1 correctly.
5435 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5436 since some C++ compilers masquerading as C compilers
5437 incorrectly reject 9223372036854775807. */
5438#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5439 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5440 && LARGE_OFF_T % 2147483647 == 1)
5441 ? 1 : -1];
5442int
5443main ()
5444{
5445
5446 ;
5447 return 0;
5448}
5449_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07005450if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005451 ac_cv_sys_large_files=no; break
5452fi
5453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Greg Hartman9768ca42017-06-22 20:49:52 -07005454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005455/* end confdefs.h. */
5456#define _LARGE_FILES 1
5457#include <sys/types.h>
5458 /* Check that off_t can represent 2**63 - 1 correctly.
5459 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5460 since some C++ compilers masquerading as C compilers
5461 incorrectly reject 9223372036854775807. */
5462#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5463 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5464 && LARGE_OFF_T % 2147483647 == 1)
5465 ? 1 : -1];
5466int
5467main ()
5468{
5469
5470 ;
5471 return 0;
5472}
5473_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07005474if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005475 ac_cv_sys_large_files=1; break
5476fi
5477rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5478 ac_cv_sys_large_files=unknown
5479 break
5480done
5481fi
Greg Hartman9768ca42017-06-22 20:49:52 -07005482{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5483$as_echo "$ac_cv_sys_large_files" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005484case $ac_cv_sys_large_files in #(
5485 no | unknown) ;;
5486 *)
5487cat >>confdefs.h <<_ACEOF
5488#define _LARGE_FILES $ac_cv_sys_large_files
5489_ACEOF
5490;;
5491esac
Greg Hartman9768ca42017-06-22 20:49:52 -07005492rm -rf conftest*
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005493 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07005494
5495
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005496fi
5497
5498
5499if test -z "$AR" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -07005500 as_fn_error $? "*** 'ar' missing, please install or fix your \$PATH ***" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005501fi
5502
5503# Extract the first word of "passwd", so it can be a program name with args.
5504set dummy passwd; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -07005505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5506$as_echo_n "checking for $ac_word... " >&6; }
5507if ${ac_cv_path_PATH_PASSWD_PROG+:} false; then :
5508 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005509else
5510 case $PATH_PASSWD_PROG in
5511 [\\/]* | ?:[\\/]*)
5512 ac_cv_path_PATH_PASSWD_PROG="$PATH_PASSWD_PROG" # Let the user override the test with a path.
5513 ;;
5514 *)
5515 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5516for as_dir in $PATH
5517do
5518 IFS=$as_save_IFS
5519 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -07005520 for ac_exec_ext in '' $ac_executable_extensions; do
5521 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005522 ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -07005523 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005524 break 2
5525 fi
5526done
Greg Hartman9768ca42017-06-22 20:49:52 -07005527 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005528IFS=$as_save_IFS
5529
5530 ;;
5531esac
5532fi
5533PATH_PASSWD_PROG=$ac_cv_path_PATH_PASSWD_PROG
5534if test -n "$PATH_PASSWD_PROG"; then
Greg Hartman9768ca42017-06-22 20:49:52 -07005535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_PASSWD_PROG" >&5
5536$as_echo "$PATH_PASSWD_PROG" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005537else
Greg Hartman9768ca42017-06-22 20:49:52 -07005538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5539$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005540fi
5541
5542
5543if test ! -z "$PATH_PASSWD_PROG" ; then
5544
5545cat >>confdefs.h <<_ACEOF
5546#define _PATH_PASSWD_PROG "$PATH_PASSWD_PROG"
5547_ACEOF
5548
5549fi
5550
5551if test -z "$LD" ; then
5552 LD=$CC
5553fi
5554
5555
Greg Hartman9768ca42017-06-22 20:49:52 -07005556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5557$as_echo_n "checking for inline... " >&6; }
5558if ${ac_cv_c_inline+:} false; then :
5559 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005560else
5561 ac_cv_c_inline=no
5562for ac_kw in inline __inline__ __inline; do
Greg Hartman9768ca42017-06-22 20:49:52 -07005563 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005564/* end confdefs.h. */
5565#ifndef __cplusplus
5566typedef int foo_t;
5567static $ac_kw foo_t static_foo () {return 0; }
5568$ac_kw foo_t foo () {return 0; }
5569#endif
5570
5571_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07005572if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005573 ac_cv_c_inline=$ac_kw
5574fi
5575rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5576 test "$ac_cv_c_inline" != no && break
5577done
5578
5579fi
Greg Hartman9768ca42017-06-22 20:49:52 -07005580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5581$as_echo "$ac_cv_c_inline" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005582
5583case $ac_cv_c_inline in
5584 inline | yes) ;;
5585 *)
5586 case $ac_cv_c_inline in
5587 no) ac_val=;;
5588 *) ac_val=$ac_cv_c_inline;;
5589 esac
5590 cat >>confdefs.h <<_ACEOF
5591#ifndef __cplusplus
5592#define inline $ac_val
5593#endif
5594_ACEOF
5595 ;;
5596esac
5597
5598
Greg Hartman9768ca42017-06-22 20:49:52 -07005599ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
5600"
5601if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005602 have_llong_max=1
5603fi
5604
Greg Hartman9768ca42017-06-22 20:49:52 -07005605ac_fn_c_check_decl "$LINENO" "SYSTR_POLICY_KILL" "ac_cv_have_decl_SYSTR_POLICY_KILL" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005606 #include <sys/types.h>
5607 #include <sys/param.h>
5608 #include <dev/systrace.h>
5609
Greg Hartman9768ca42017-06-22 20:49:52 -07005610"
5611if test "x$ac_cv_have_decl_SYSTR_POLICY_KILL" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005612 have_systr_policy_kill=1
5613fi
5614
Greg Hartman9768ca42017-06-22 20:49:52 -07005615ac_fn_c_check_decl "$LINENO" "RLIMIT_NPROC" "ac_cv_have_decl_RLIMIT_NPROC" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005616 #include <sys/types.h>
5617 #include <sys/resource.h>
5618
Greg Hartman9768ca42017-06-22 20:49:52 -07005619"
5620if test "x$ac_cv_have_decl_RLIMIT_NPROC" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005621
Greg Hartman9768ca42017-06-22 20:49:52 -07005622$as_echo "#define HAVE_RLIMIT_NPROC /**/" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005623
5624fi
5625
Greg Hartman9768ca42017-06-22 20:49:52 -07005626ac_fn_c_check_decl "$LINENO" "PR_SET_NO_NEW_PRIVS" "ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" "
Adam Langleyd0592972015-03-30 14:49:51 -07005627 #include <sys/types.h>
5628 #include <linux/prctl.h>
5629
Greg Hartman9768ca42017-06-22 20:49:52 -07005630"
5631if test "x$ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -07005632 have_linux_no_new_privs=1
5633fi
5634
5635
5636openssl=yes
Greg Hartmanccacbc92016-02-03 09:59:44 -08005637ssh1=no
Greg Hartman9768ca42017-06-22 20:49:52 -07005638COMMENT_OUT_RSA1="#no ssh1#"
Adam Langleyd0592972015-03-30 14:49:51 -07005639
5640# Check whether --with-openssl was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07005641if test "${with_openssl+set}" = set; then :
Adam Langleyd0592972015-03-30 14:49:51 -07005642 withval=$with_openssl; if test "x$withval" = "xno" ; then
5643 openssl=no
5644 ssh1=no
5645 fi
5646
5647
5648fi
5649
Greg Hartman9768ca42017-06-22 20:49:52 -07005650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL will be used for cryptography" >&5
5651$as_echo_n "checking whether OpenSSL will be used for cryptography... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005652if test "x$openssl" = "xyes" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -07005653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5654$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005655
5656cat >>confdefs.h <<_ACEOF
5657#define WITH_OPENSSL 1
5658_ACEOF
5659
5660else
Greg Hartman9768ca42017-06-22 20:49:52 -07005661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5662$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005663fi
5664
5665
5666# Check whether --with-ssh1 was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07005667if test "${with_ssh1+set}" = set; then :
Adam Langleyd0592972015-03-30 14:49:51 -07005668 withval=$with_ssh1;
Greg Hartmanccacbc92016-02-03 09:59:44 -08005669 if test "x$withval" = "xyes" ; then
5670 if test "x$openssl" = "xno" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -07005671 as_fn_error $? "Cannot enable SSH protocol 1 with OpenSSL disabled" "$LINENO" 5
Greg Hartmanccacbc92016-02-03 09:59:44 -08005672 fi
5673 ssh1=yes
Greg Hartman9768ca42017-06-22 20:49:52 -07005674 COMMENT_OUT_RSA1=""
Greg Hartmanccacbc92016-02-03 09:59:44 -08005675 elif test "x$withval" = "xno" ; then
5676 ssh1=no
5677 else
Greg Hartman9768ca42017-06-22 20:49:52 -07005678 as_fn_error $? "unknown --with-ssh1 argument" "$LINENO" 5
Adam Langleyd0592972015-03-30 14:49:51 -07005679 fi
5680
5681
5682fi
5683
Greg Hartman9768ca42017-06-22 20:49:52 -07005684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether SSH protocol 1 support is enabled" >&5
5685$as_echo_n "checking whether SSH protocol 1 support is enabled... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005686if test "x$ssh1" = "xyes" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -07005687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5688$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005689
5690cat >>confdefs.h <<_ACEOF
5691#define WITH_SSH1 1
5692_ACEOF
5693
Greg Hartman9768ca42017-06-22 20:49:52 -07005694
Adam Langleyd0592972015-03-30 14:49:51 -07005695else
Greg Hartman9768ca42017-06-22 20:49:52 -07005696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5697$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005698fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005699
5700use_stack_protector=1
Adam Langleyd0592972015-03-30 14:49:51 -07005701use_toolchain_hardening=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005702
5703# Check whether --with-stackprotect was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07005704if test "${with_stackprotect+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005705 withval=$with_stackprotect;
5706 if test "x$withval" = "xno"; then
5707 use_stack_protector=0
5708 fi
5709fi
5710
5711
Adam Langleyd0592972015-03-30 14:49:51 -07005712# Check whether --with-hardening was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07005713if test "${with_hardening+set}" = set; then :
Adam Langleyd0592972015-03-30 14:49:51 -07005714 withval=$with_hardening;
5715 if test "x$withval" = "xno"; then
5716 use_toolchain_hardening=0
5717 fi
5718fi
5719
5720
5721# We use -Werror for the tests only so that we catch warnings like "this is
5722# on by default" for things like -fPIE.
Greg Hartman9768ca42017-06-22 20:49:52 -07005723{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5
5724$as_echo_n "checking if $CC supports -Werror... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005725saved_CFLAGS="$CFLAGS"
5726CFLAGS="$CFLAGS -Werror"
Greg Hartman9768ca42017-06-22 20:49:52 -07005727cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07005728/* end confdefs.h. */
5729int main(void) { return 0; }
5730_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07005731if ac_fn_c_try_compile "$LINENO"; then :
5732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5733$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005734 WERROR="-Werror"
5735else
Greg Hartman9768ca42017-06-22 20:49:52 -07005736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5737$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005738 WERROR=""
5739
5740fi
Adam Langleyd0592972015-03-30 14:49:51 -07005741rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5742CFLAGS="$saved_CFLAGS"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005743
5744if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
5745 {
Greg Hartman9768ca42017-06-22 20:49:52 -07005746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Qunused-arguments" >&5
5747$as_echo_n "checking if $CC supports compile flag -Qunused-arguments... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005748 saved_CFLAGS="$CFLAGS"
Adam Langleyd0592972015-03-30 14:49:51 -07005749 CFLAGS="$CFLAGS $WERROR -Qunused-arguments"
5750 _define_flag=""
5751 test "x$_define_flag" = "x" && _define_flag="-Qunused-arguments"
Greg Hartman9768ca42017-06-22 20:49:52 -07005752 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07005753/* end confdefs.h. */
5754
5755#include <stdlib.h>
5756#include <stdio.h>
5757int main(int argc, char **argv) {
5758 /* Some math to catch -ftrapv problems in the toolchain */
5759 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5760 float l = i * 2.1;
5761 double m = l / 0.5;
5762 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5763 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5764 exit(0);
5765}
5766
5767_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07005768if ac_fn_c_try_compile "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07005769
5770if `grep -i "unrecognized option" conftest.err >/dev/null`
5771then
Greg Hartman9768ca42017-06-22 20:49:52 -07005772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5773$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005774 CFLAGS="$saved_CFLAGS"
5775else
Greg Hartman9768ca42017-06-22 20:49:52 -07005776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5777$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005778 CFLAGS="$saved_CFLAGS $_define_flag"
5779fi
5780else
Greg Hartman9768ca42017-06-22 20:49:52 -07005781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5782$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005783 CFLAGS="$saved_CFLAGS"
5784
5785fi
Adam Langleyd0592972015-03-30 14:49:51 -07005786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5787}
5788 {
Greg Hartman9768ca42017-06-22 20:49:52 -07005789 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wunknown-warning-option" >&5
5790$as_echo_n "checking if $CC supports compile flag -Wunknown-warning-option... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005791 saved_CFLAGS="$CFLAGS"
5792 CFLAGS="$CFLAGS $WERROR -Wunknown-warning-option"
5793 _define_flag=""
5794 test "x$_define_flag" = "x" && _define_flag="-Wunknown-warning-option"
Greg Hartman9768ca42017-06-22 20:49:52 -07005795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07005796/* end confdefs.h. */
5797
5798#include <stdlib.h>
5799#include <stdio.h>
5800int main(int argc, char **argv) {
5801 /* Some math to catch -ftrapv problems in the toolchain */
5802 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5803 float l = i * 2.1;
5804 double m = l / 0.5;
5805 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5806 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5807 exit(0);
5808}
5809
5810_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07005811if ac_fn_c_try_compile "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07005812
5813if `grep -i "unrecognized option" conftest.err >/dev/null`
5814then
Greg Hartman9768ca42017-06-22 20:49:52 -07005815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5816$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005817 CFLAGS="$saved_CFLAGS"
5818else
Greg Hartman9768ca42017-06-22 20:49:52 -07005819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5820$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005821 CFLAGS="$saved_CFLAGS $_define_flag"
5822fi
5823else
Greg Hartman9768ca42017-06-22 20:49:52 -07005824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5825$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005826 CFLAGS="$saved_CFLAGS"
5827
5828fi
Adam Langleyd0592972015-03-30 14:49:51 -07005829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5830}
5831 {
Greg Hartman9768ca42017-06-22 20:49:52 -07005832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wall" >&5
5833$as_echo_n "checking if $CC supports compile flag -Wall... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005834 saved_CFLAGS="$CFLAGS"
5835 CFLAGS="$CFLAGS $WERROR -Wall"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005836 _define_flag=""
5837 test "x$_define_flag" = "x" && _define_flag="-Wall"
Greg Hartman9768ca42017-06-22 20:49:52 -07005838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07005839/* end confdefs.h. */
5840
5841#include <stdlib.h>
5842#include <stdio.h>
5843int main(int argc, char **argv) {
5844 /* Some math to catch -ftrapv problems in the toolchain */
5845 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5846 float l = i * 2.1;
5847 double m = l / 0.5;
5848 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5849 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5850 exit(0);
5851}
5852
5853_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07005854if ac_fn_c_try_compile "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07005855
5856if `grep -i "unrecognized option" conftest.err >/dev/null`
5857then
Greg Hartman9768ca42017-06-22 20:49:52 -07005858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5859$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005860 CFLAGS="$saved_CFLAGS"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005861else
Greg Hartman9768ca42017-06-22 20:49:52 -07005862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5863$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005864 CFLAGS="$saved_CFLAGS $_define_flag"
5865fi
5866else
Greg Hartman9768ca42017-06-22 20:49:52 -07005867 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5868$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005869 CFLAGS="$saved_CFLAGS"
5870
5871fi
5872rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5873}
5874 {
Greg Hartman9768ca42017-06-22 20:49:52 -07005875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wpointer-arith" >&5
5876$as_echo_n "checking if $CC supports compile flag -Wpointer-arith... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005877 saved_CFLAGS="$CFLAGS"
Adam Langleyd0592972015-03-30 14:49:51 -07005878 CFLAGS="$CFLAGS $WERROR -Wpointer-arith"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005879 _define_flag=""
5880 test "x$_define_flag" = "x" && _define_flag="-Wpointer-arith"
Greg Hartman9768ca42017-06-22 20:49:52 -07005881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07005882/* end confdefs.h. */
5883
5884#include <stdlib.h>
5885#include <stdio.h>
5886int main(int argc, char **argv) {
5887 /* Some math to catch -ftrapv problems in the toolchain */
5888 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5889 float l = i * 2.1;
5890 double m = l / 0.5;
5891 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5892 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5893 exit(0);
5894}
5895
5896_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07005897if ac_fn_c_try_compile "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07005898
5899if `grep -i "unrecognized option" conftest.err >/dev/null`
5900then
Greg Hartman9768ca42017-06-22 20:49:52 -07005901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5902$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005903 CFLAGS="$saved_CFLAGS"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005904else
Greg Hartman9768ca42017-06-22 20:49:52 -07005905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5906$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005907 CFLAGS="$saved_CFLAGS $_define_flag"
5908fi
5909else
Greg Hartman9768ca42017-06-22 20:49:52 -07005910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5911$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005912 CFLAGS="$saved_CFLAGS"
5913
5914fi
5915rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5916}
5917 {
Greg Hartman9768ca42017-06-22 20:49:52 -07005918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wuninitialized" >&5
5919$as_echo_n "checking if $CC supports compile flag -Wuninitialized... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005920 saved_CFLAGS="$CFLAGS"
Adam Langleyd0592972015-03-30 14:49:51 -07005921 CFLAGS="$CFLAGS $WERROR -Wuninitialized"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005922 _define_flag=""
5923 test "x$_define_flag" = "x" && _define_flag="-Wuninitialized"
Greg Hartman9768ca42017-06-22 20:49:52 -07005924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07005925/* end confdefs.h. */
5926
5927#include <stdlib.h>
5928#include <stdio.h>
5929int main(int argc, char **argv) {
5930 /* Some math to catch -ftrapv problems in the toolchain */
5931 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5932 float l = i * 2.1;
5933 double m = l / 0.5;
5934 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5935 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5936 exit(0);
5937}
5938
5939_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07005940if ac_fn_c_try_compile "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07005941
5942if `grep -i "unrecognized option" conftest.err >/dev/null`
5943then
Greg Hartman9768ca42017-06-22 20:49:52 -07005944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5945$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005946 CFLAGS="$saved_CFLAGS"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005947else
Greg Hartman9768ca42017-06-22 20:49:52 -07005948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5949$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005950 CFLAGS="$saved_CFLAGS $_define_flag"
5951fi
5952else
Greg Hartman9768ca42017-06-22 20:49:52 -07005953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5954$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005955 CFLAGS="$saved_CFLAGS"
5956
5957fi
5958rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5959}
5960 {
Greg Hartman9768ca42017-06-22 20:49:52 -07005961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wsign-compare" >&5
5962$as_echo_n "checking if $CC supports compile flag -Wsign-compare... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005963 saved_CFLAGS="$CFLAGS"
Adam Langleyd0592972015-03-30 14:49:51 -07005964 CFLAGS="$CFLAGS $WERROR -Wsign-compare"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005965 _define_flag=""
5966 test "x$_define_flag" = "x" && _define_flag="-Wsign-compare"
Greg Hartman9768ca42017-06-22 20:49:52 -07005967 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07005968/* end confdefs.h. */
5969
5970#include <stdlib.h>
5971#include <stdio.h>
5972int main(int argc, char **argv) {
5973 /* Some math to catch -ftrapv problems in the toolchain */
5974 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5975 float l = i * 2.1;
5976 double m = l / 0.5;
5977 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5978 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5979 exit(0);
5980}
5981
5982_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07005983if ac_fn_c_try_compile "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07005984
5985if `grep -i "unrecognized option" conftest.err >/dev/null`
5986then
Greg Hartman9768ca42017-06-22 20:49:52 -07005987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5988$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005989 CFLAGS="$saved_CFLAGS"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005990else
Greg Hartman9768ca42017-06-22 20:49:52 -07005991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5992$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07005993 CFLAGS="$saved_CFLAGS $_define_flag"
5994fi
5995else
Greg Hartman9768ca42017-06-22 20:49:52 -07005996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5997$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08005998 CFLAGS="$saved_CFLAGS"
5999
6000fi
6001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6002}
6003 {
Greg Hartman9768ca42017-06-22 20:49:52 -07006004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wformat-security" >&5
6005$as_echo_n "checking if $CC supports compile flag -Wformat-security... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006006 saved_CFLAGS="$CFLAGS"
Adam Langleyd0592972015-03-30 14:49:51 -07006007 CFLAGS="$CFLAGS $WERROR -Wformat-security"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006008 _define_flag=""
6009 test "x$_define_flag" = "x" && _define_flag="-Wformat-security"
Greg Hartman9768ca42017-06-22 20:49:52 -07006010 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07006011/* end confdefs.h. */
6012
6013#include <stdlib.h>
6014#include <stdio.h>
6015int main(int argc, char **argv) {
6016 /* Some math to catch -ftrapv problems in the toolchain */
6017 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6018 float l = i * 2.1;
6019 double m = l / 0.5;
6020 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6021 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6022 exit(0);
6023}
6024
6025_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006026if ac_fn_c_try_compile "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07006027
6028if `grep -i "unrecognized option" conftest.err >/dev/null`
6029then
Greg Hartman9768ca42017-06-22 20:49:52 -07006030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6031$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006032 CFLAGS="$saved_CFLAGS"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006033else
Greg Hartman9768ca42017-06-22 20:49:52 -07006034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6035$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006036 CFLAGS="$saved_CFLAGS $_define_flag"
6037fi
6038else
Greg Hartman9768ca42017-06-22 20:49:52 -07006039 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6040$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006041 CFLAGS="$saved_CFLAGS"
6042
6043fi
6044rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6045}
6046 {
Greg Hartman9768ca42017-06-22 20:49:52 -07006047 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wsizeof-pointer-memaccess" >&5
6048$as_echo_n "checking if $CC supports compile flag -Wsizeof-pointer-memaccess... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006049 saved_CFLAGS="$CFLAGS"
Adam Langleyd0592972015-03-30 14:49:51 -07006050 CFLAGS="$CFLAGS $WERROR -Wsizeof-pointer-memaccess"
6051 _define_flag=""
6052 test "x$_define_flag" = "x" && _define_flag="-Wsizeof-pointer-memaccess"
Greg Hartman9768ca42017-06-22 20:49:52 -07006053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07006054/* end confdefs.h. */
6055
6056#include <stdlib.h>
6057#include <stdio.h>
6058int main(int argc, char **argv) {
6059 /* Some math to catch -ftrapv problems in the toolchain */
6060 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6061 float l = i * 2.1;
6062 double m = l / 0.5;
6063 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6064 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6065 exit(0);
6066}
6067
6068_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006069if ac_fn_c_try_compile "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07006070
6071if `grep -i "unrecognized option" conftest.err >/dev/null`
6072then
Greg Hartman9768ca42017-06-22 20:49:52 -07006073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6074$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006075 CFLAGS="$saved_CFLAGS"
6076else
Greg Hartman9768ca42017-06-22 20:49:52 -07006077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6078$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006079 CFLAGS="$saved_CFLAGS $_define_flag"
6080fi
6081else
Greg Hartman9768ca42017-06-22 20:49:52 -07006082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6083$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006084 CFLAGS="$saved_CFLAGS"
6085
6086fi
Adam Langleyd0592972015-03-30 14:49:51 -07006087rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6088}
6089 {
Greg Hartman9768ca42017-06-22 20:49:52 -07006090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wpointer-sign" >&5
6091$as_echo_n "checking if $CC supports compile flag -Wpointer-sign... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006092 saved_CFLAGS="$CFLAGS"
6093 CFLAGS="$CFLAGS $WERROR -Wpointer-sign"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006094 _define_flag="-Wno-pointer-sign"
6095 test "x$_define_flag" = "x" && _define_flag="-Wpointer-sign"
Greg Hartman9768ca42017-06-22 20:49:52 -07006096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07006097/* end confdefs.h. */
6098
6099#include <stdlib.h>
6100#include <stdio.h>
6101int main(int argc, char **argv) {
6102 /* Some math to catch -ftrapv problems in the toolchain */
6103 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6104 float l = i * 2.1;
6105 double m = l / 0.5;
6106 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6107 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6108 exit(0);
6109}
6110
6111_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006112if ac_fn_c_try_compile "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07006113
6114if `grep -i "unrecognized option" conftest.err >/dev/null`
6115then
Greg Hartman9768ca42017-06-22 20:49:52 -07006116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6117$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006118 CFLAGS="$saved_CFLAGS"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006119else
Greg Hartman9768ca42017-06-22 20:49:52 -07006120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6121$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006122 CFLAGS="$saved_CFLAGS $_define_flag"
6123fi
6124else
Greg Hartman9768ca42017-06-22 20:49:52 -07006125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6126$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006127 CFLAGS="$saved_CFLAGS"
6128
6129fi
6130rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6131}
6132 {
Greg Hartman9768ca42017-06-22 20:49:52 -07006133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wunused-result" >&5
6134$as_echo_n "checking if $CC supports compile flag -Wunused-result... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006135 saved_CFLAGS="$CFLAGS"
Adam Langleyd0592972015-03-30 14:49:51 -07006136 CFLAGS="$CFLAGS $WERROR -Wunused-result"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006137 _define_flag="-Wno-unused-result"
6138 test "x$_define_flag" = "x" && _define_flag="-Wunused-result"
Greg Hartman9768ca42017-06-22 20:49:52 -07006139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07006140/* end confdefs.h. */
6141
6142#include <stdlib.h>
6143#include <stdio.h>
6144int main(int argc, char **argv) {
6145 /* Some math to catch -ftrapv problems in the toolchain */
6146 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6147 float l = i * 2.1;
6148 double m = l / 0.5;
6149 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6150 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6151 exit(0);
6152}
6153
6154_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006155if ac_fn_c_try_compile "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07006156
6157if `grep -i "unrecognized option" conftest.err >/dev/null`
6158then
Greg Hartman9768ca42017-06-22 20:49:52 -07006159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6160$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006161 CFLAGS="$saved_CFLAGS"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006162else
Greg Hartman9768ca42017-06-22 20:49:52 -07006163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6164$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006165 CFLAGS="$saved_CFLAGS $_define_flag"
6166fi
6167else
Greg Hartman9768ca42017-06-22 20:49:52 -07006168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6169$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006170 CFLAGS="$saved_CFLAGS"
6171
6172fi
6173rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6174}
6175 {
Greg Hartman9768ca42017-06-22 20:49:52 -07006176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -fno-strict-aliasing" >&5
6177$as_echo_n "checking if $CC supports compile flag -fno-strict-aliasing... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006178 saved_CFLAGS="$CFLAGS"
Adam Langleyd0592972015-03-30 14:49:51 -07006179 CFLAGS="$CFLAGS $WERROR -fno-strict-aliasing"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006180 _define_flag=""
6181 test "x$_define_flag" = "x" && _define_flag="-fno-strict-aliasing"
Greg Hartman9768ca42017-06-22 20:49:52 -07006182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07006183/* end confdefs.h. */
6184
6185#include <stdlib.h>
6186#include <stdio.h>
6187int main(int argc, char **argv) {
6188 /* Some math to catch -ftrapv problems in the toolchain */
6189 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6190 float l = i * 2.1;
6191 double m = l / 0.5;
6192 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6193 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6194 exit(0);
6195}
6196
6197_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006198if ac_fn_c_try_compile "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07006199
6200if `grep -i "unrecognized option" conftest.err >/dev/null`
6201then
Greg Hartman9768ca42017-06-22 20:49:52 -07006202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6203$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006204 CFLAGS="$saved_CFLAGS"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006205else
Greg Hartman9768ca42017-06-22 20:49:52 -07006206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6207$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006208 CFLAGS="$saved_CFLAGS $_define_flag"
6209fi
6210else
Greg Hartman9768ca42017-06-22 20:49:52 -07006211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6212$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006213 CFLAGS="$saved_CFLAGS"
6214
6215fi
6216rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6217}
Adam Langleyd0592972015-03-30 14:49:51 -07006218 {
Greg Hartman9768ca42017-06-22 20:49:52 -07006219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -D_FORTIFY_SOURCE=2" >&5
6220$as_echo_n "checking if $CC supports compile flag -D_FORTIFY_SOURCE=2... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006221 saved_CFLAGS="$CFLAGS"
6222 CFLAGS="$CFLAGS $WERROR -D_FORTIFY_SOURCE=2"
6223 _define_flag=""
6224 test "x$_define_flag" = "x" && _define_flag="-D_FORTIFY_SOURCE=2"
Greg Hartman9768ca42017-06-22 20:49:52 -07006225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07006226/* end confdefs.h. */
6227
6228#include <stdlib.h>
6229#include <stdio.h>
6230int main(int argc, char **argv) {
6231 /* Some math to catch -ftrapv problems in the toolchain */
6232 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6233 float l = i * 2.1;
6234 double m = l / 0.5;
6235 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6236 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6237 exit(0);
6238}
6239
6240_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006241if ac_fn_c_try_compile "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07006242
6243if `grep -i "unrecognized option" conftest.err >/dev/null`
6244then
Greg Hartman9768ca42017-06-22 20:49:52 -07006245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6246$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006247 CFLAGS="$saved_CFLAGS"
6248else
Greg Hartman9768ca42017-06-22 20:49:52 -07006249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6250$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006251 CFLAGS="$saved_CFLAGS $_define_flag"
6252fi
6253else
Greg Hartman9768ca42017-06-22 20:49:52 -07006254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6255$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006256 CFLAGS="$saved_CFLAGS"
6257
6258fi
Adam Langleyd0592972015-03-30 14:49:51 -07006259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6260}
6261 if test "x$use_toolchain_hardening" = "x1"; then
6262 {
Greg Hartman9768ca42017-06-22 20:49:52 -07006263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,relro" >&5
6264$as_echo_n "checking if $LD supports link flag -Wl,-z,relro... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006265 saved_LDFLAGS="$LDFLAGS"
6266 LDFLAGS="$LDFLAGS $WERROR -Wl,-z,relro"
6267 _define_flag=""
6268 test "x$_define_flag" = "x" && _define_flag="-Wl,-z,relro"
Greg Hartman9768ca42017-06-22 20:49:52 -07006269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07006270/* end confdefs.h. */
6271
6272#include <stdlib.h>
6273#include <stdio.h>
6274int main(int argc, char **argv) {
6275 /* Some math to catch -ftrapv problems in the toolchain */
6276 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6277 float l = i * 2.1;
6278 double m = l / 0.5;
6279 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
Greg Hartman9768ca42017-06-22 20:49:52 -07006280 long long p = n * o;
6281 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
Adam Langleyd0592972015-03-30 14:49:51 -07006282 exit(0);
6283}
6284
6285_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006286if ac_fn_c_try_link "$LINENO"; then :
6287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6288$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006289 LDFLAGS="$saved_LDFLAGS $_define_flag"
6290else
Greg Hartman9768ca42017-06-22 20:49:52 -07006291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6292$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006293 LDFLAGS="$saved_LDFLAGS"
6294
6295fi
Greg Hartman9768ca42017-06-22 20:49:52 -07006296rm -f core conftest.err conftest.$ac_objext \
6297 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07006298}
6299 {
Greg Hartman9768ca42017-06-22 20:49:52 -07006300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,now" >&5
6301$as_echo_n "checking if $LD supports link flag -Wl,-z,now... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006302 saved_LDFLAGS="$LDFLAGS"
6303 LDFLAGS="$LDFLAGS $WERROR -Wl,-z,now"
6304 _define_flag=""
6305 test "x$_define_flag" = "x" && _define_flag="-Wl,-z,now"
Greg Hartman9768ca42017-06-22 20:49:52 -07006306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07006307/* end confdefs.h. */
6308
6309#include <stdlib.h>
6310#include <stdio.h>
6311int main(int argc, char **argv) {
6312 /* Some math to catch -ftrapv problems in the toolchain */
6313 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6314 float l = i * 2.1;
6315 double m = l / 0.5;
6316 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
Greg Hartman9768ca42017-06-22 20:49:52 -07006317 long long p = n * o;
6318 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
Adam Langleyd0592972015-03-30 14:49:51 -07006319 exit(0);
6320}
6321
6322_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006323if ac_fn_c_try_link "$LINENO"; then :
6324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6325$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006326 LDFLAGS="$saved_LDFLAGS $_define_flag"
6327else
Greg Hartman9768ca42017-06-22 20:49:52 -07006328 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6329$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006330 LDFLAGS="$saved_LDFLAGS"
6331
6332fi
Greg Hartman9768ca42017-06-22 20:49:52 -07006333rm -f core conftest.err conftest.$ac_objext \
6334 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07006335}
6336 {
Greg Hartman9768ca42017-06-22 20:49:52 -07006337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,noexecstack" >&5
6338$as_echo_n "checking if $LD supports link flag -Wl,-z,noexecstack... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006339 saved_LDFLAGS="$LDFLAGS"
6340 LDFLAGS="$LDFLAGS $WERROR -Wl,-z,noexecstack"
6341 _define_flag=""
6342 test "x$_define_flag" = "x" && _define_flag="-Wl,-z,noexecstack"
Greg Hartman9768ca42017-06-22 20:49:52 -07006343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07006344/* end confdefs.h. */
6345
6346#include <stdlib.h>
6347#include <stdio.h>
6348int main(int argc, char **argv) {
6349 /* Some math to catch -ftrapv problems in the toolchain */
6350 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6351 float l = i * 2.1;
6352 double m = l / 0.5;
6353 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
Greg Hartman9768ca42017-06-22 20:49:52 -07006354 long long p = n * o;
6355 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
Adam Langleyd0592972015-03-30 14:49:51 -07006356 exit(0);
6357}
6358
6359_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006360if ac_fn_c_try_link "$LINENO"; then :
6361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6362$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006363 LDFLAGS="$saved_LDFLAGS $_define_flag"
6364else
Greg Hartman9768ca42017-06-22 20:49:52 -07006365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6366$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006367 LDFLAGS="$saved_LDFLAGS"
6368
6369fi
Greg Hartman9768ca42017-06-22 20:49:52 -07006370rm -f core conftest.err conftest.$ac_objext \
6371 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07006372}
6373 # NB. -ftrapv expects certain support functions to be present in
6374 # the compiler library (libgcc or similar) to detect integer operations
6375 # that can overflow. We must check that the result of enabling it
6376 # actually links. The test program compiled/linked includes a number
6377 # of integer operations that should exercise this.
6378 {
Greg Hartman9768ca42017-06-22 20:49:52 -07006379 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -ftrapv and linking succeeds" >&5
6380$as_echo_n "checking if $CC supports compile flag -ftrapv and linking succeeds... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006381 saved_CFLAGS="$CFLAGS"
6382 CFLAGS="$CFLAGS $WERROR -ftrapv"
6383 _define_flag=""
6384 test "x$_define_flag" = "x" && _define_flag="-ftrapv"
Greg Hartman9768ca42017-06-22 20:49:52 -07006385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07006386/* end confdefs.h. */
6387
6388#include <stdlib.h>
6389#include <stdio.h>
6390int main(int argc, char **argv) {
6391 /* Some math to catch -ftrapv problems in the toolchain */
6392 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6393 float l = i * 2.1;
6394 double m = l / 0.5;
6395 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
Greg Hartman9768ca42017-06-22 20:49:52 -07006396 long long int p = n * o;
6397 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
Adam Langleyd0592972015-03-30 14:49:51 -07006398 exit(0);
6399}
6400
6401_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006402if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07006403
6404if `grep -i "unrecognized option" conftest.err >/dev/null`
6405then
Greg Hartman9768ca42017-06-22 20:49:52 -07006406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6407$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006408 CFLAGS="$saved_CFLAGS"
6409else
Greg Hartman9768ca42017-06-22 20:49:52 -07006410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6411$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006412 CFLAGS="$saved_CFLAGS $_define_flag"
6413fi
6414else
Greg Hartman9768ca42017-06-22 20:49:52 -07006415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6416$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006417 CFLAGS="$saved_CFLAGS"
6418
6419fi
Greg Hartman9768ca42017-06-22 20:49:52 -07006420rm -f core conftest.err conftest.$ac_objext \
6421 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07006422}
6423 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07006424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc version" >&5
6425$as_echo_n "checking gcc version... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006426 GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`
6427 case $GCC_VER in
6428 1.*) no_attrib_nonnull=1 ;;
6429 2.8* | 2.9*)
6430 no_attrib_nonnull=1
6431 ;;
6432 2.*) no_attrib_nonnull=1 ;;
6433 *) ;;
6434 esac
Greg Hartman9768ca42017-06-22 20:49:52 -07006435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC_VER" >&5
6436$as_echo "$GCC_VER" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006437
Greg Hartman9768ca42017-06-22 20:49:52 -07006438 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-builtin-memset" >&5
6439$as_echo_n "checking if $CC accepts -fno-builtin-memset... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006440 saved_CFLAGS="$CFLAGS"
6441 CFLAGS="$CFLAGS -fno-builtin-memset"
Greg Hartman9768ca42017-06-22 20:49:52 -07006442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006443/* end confdefs.h. */
6444 #include <string.h>
6445int
6446main ()
6447{
6448 char b[10]; memset(b, 0, sizeof(b));
6449 ;
6450 return 0;
6451}
6452_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006453if ac_fn_c_try_link "$LINENO"; then :
6454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6455$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006456else
Greg Hartman9768ca42017-06-22 20:49:52 -07006457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6458$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006459 CFLAGS="$saved_CFLAGS"
6460
6461fi
Greg Hartman9768ca42017-06-22 20:49:52 -07006462rm -f core conftest.err conftest.$ac_objext \
6463 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006464
6465 # -fstack-protector-all doesn't always work for some GCC versions
6466 # and/or platforms, so we test if we can. If it's not supported
6467 # on a given platform gcc will emit a warning so we use -Werror.
6468 if test "x$use_stack_protector" = "x1"; then
Adam Langleyd0592972015-03-30 14:49:51 -07006469 for t in -fstack-protector-strong -fstack-protector-all \
6470 -fstack-protector; do
Greg Hartman9768ca42017-06-22 20:49:52 -07006471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports $t" >&5
6472$as_echo_n "checking if $CC supports $t... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006473 saved_CFLAGS="$CFLAGS"
6474 saved_LDFLAGS="$LDFLAGS"
6475 CFLAGS="$CFLAGS $t -Werror"
6476 LDFLAGS="$LDFLAGS $t -Werror"
Greg Hartman9768ca42017-06-22 20:49:52 -07006477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006478/* end confdefs.h. */
6479 #include <stdio.h>
6480int
6481main ()
6482{
6483
6484 char x[256];
6485 snprintf(x, sizeof(x), "XXX");
6486
6487 ;
6488 return 0;
6489}
6490_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006491if ac_fn_c_try_link "$LINENO"; then :
6492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6493$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006494 CFLAGS="$saved_CFLAGS $t"
6495 LDFLAGS="$saved_LDFLAGS $t"
Greg Hartman9768ca42017-06-22 20:49:52 -07006496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $t works" >&5
6497$as_echo_n "checking if $t works... " >&6; }
6498 if test "$cross_compiling" = yes; then :
6499 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: cannot test" >&5
6500$as_echo "$as_me: WARNING: cross compiling: cannot test" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006501 break
6502
6503else
Greg Hartman9768ca42017-06-22 20:49:52 -07006504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006505/* end confdefs.h. */
6506 #include <stdio.h>
6507int
6508main ()
6509{
6510
6511 char x[256];
6512 snprintf(x, sizeof(x), "XXX");
6513
6514 ;
6515 return 0;
6516}
6517_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006518if ac_fn_c_try_run "$LINENO"; then :
6519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6520$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006521 break
6522else
Greg Hartman9768ca42017-06-22 20:49:52 -07006523 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6524$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006525fi
Greg Hartman9768ca42017-06-22 20:49:52 -07006526rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6527 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006528fi
6529
6530
6531else
Greg Hartman9768ca42017-06-22 20:49:52 -07006532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6533$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006534
6535fi
Greg Hartman9768ca42017-06-22 20:49:52 -07006536rm -f core conftest.err conftest.$ac_objext \
6537 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006538 CFLAGS="$saved_CFLAGS"
6539 LDFLAGS="$saved_LDFLAGS"
6540 done
6541 fi
6542
6543 if test -z "$have_llong_max"; then
6544 # retry LLONG_MAX with -std=gnu99, needed on some Linuxes
6545 unset ac_cv_have_decl_LLONG_MAX
6546 saved_CFLAGS="$CFLAGS"
6547 CFLAGS="$CFLAGS -std=gnu99"
Greg Hartman9768ca42017-06-22 20:49:52 -07006548 ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006549
Greg Hartman9768ca42017-06-22 20:49:52 -07006550"
6551if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006552 have_llong_max=1
6553else
6554 CFLAGS="$saved_CFLAGS"
6555fi
6556
6557 fi
6558fi
6559
Greg Hartman9768ca42017-06-22 20:49:52 -07006560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows __attribute__ on return types" >&5
6561$as_echo_n "checking if compiler allows __attribute__ on return types... " >&6; }
6562cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07006563/* end confdefs.h. */
6564
6565#include <stdlib.h>
6566__attribute__((__unused__)) static void foo(void){return;}
6567int
6568main ()
6569{
6570 exit(0);
6571 ;
6572 return 0;
6573}
6574_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006575if ac_fn_c_try_compile "$LINENO"; then :
6576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6577$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006578else
Greg Hartman9768ca42017-06-22 20:49:52 -07006579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6580$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07006581
Greg Hartman9768ca42017-06-22 20:49:52 -07006582$as_echo "#define NO_ATTRIBUTE_ON_RETURN_TYPE 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -07006583
6584
6585fi
Adam Langleyd0592972015-03-30 14:49:51 -07006586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6587
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006588if test "x$no_attrib_nonnull" != "x1" ; then
6589
Greg Hartman9768ca42017-06-22 20:49:52 -07006590$as_echo "#define HAVE_ATTRIBUTE__NONNULL__ 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006591
6592fi
6593
6594
6595# Check whether --with-rpath was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07006596if test "${with_rpath+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006597 withval=$with_rpath;
6598 if test "x$withval" = "xno" ; then
6599 need_dash_r=""
6600 fi
6601 if test "x$withval" = "xyes" ; then
6602 need_dash_r=1
6603 fi
6604
6605
6606fi
6607
6608
6609# Allow user to specify flags
6610
6611# Check whether --with-cflags was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07006612if test "${with_cflags+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006613 withval=$with_cflags;
6614 if test -n "$withval" && test "x$withval" != "xno" && \
6615 test "x${withval}" != "xyes"; then
6616 CFLAGS="$CFLAGS $withval"
6617 fi
6618
6619
6620fi
6621
6622
6623# Check whether --with-cppflags was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07006624if test "${with_cppflags+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006625 withval=$with_cppflags;
6626 if test -n "$withval" && test "x$withval" != "xno" && \
6627 test "x${withval}" != "xyes"; then
6628 CPPFLAGS="$CPPFLAGS $withval"
6629 fi
6630
6631
6632fi
6633
6634
6635# Check whether --with-ldflags was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07006636if test "${with_ldflags+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006637 withval=$with_ldflags;
6638 if test -n "$withval" && test "x$withval" != "xno" && \
6639 test "x${withval}" != "xyes"; then
6640 LDFLAGS="$LDFLAGS $withval"
6641 fi
6642
6643
6644fi
6645
6646
6647# Check whether --with-libs was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07006648if test "${with_libs+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006649 withval=$with_libs;
6650 if test -n "$withval" && test "x$withval" != "xno" && \
6651 test "x${withval}" != "xyes"; then
6652 LIBS="$LIBS $withval"
6653 fi
6654
6655
6656fi
6657
6658
6659# Check whether --with-Werror was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07006660if test "${with_Werror+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006661 withval=$with_Werror;
6662 if test -n "$withval" && test "x$withval" != "xno"; then
6663 werror_flags="-Werror"
6664 if test "x${withval}" != "xyes"; then
6665 werror_flags="$withval"
6666 fi
6667 fi
6668
6669
6670fi
6671
6672
6673for ac_header in \
Adam Langleyd0592972015-03-30 14:49:51 -07006674 blf.h \
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006675 bstring.h \
6676 crypt.h \
6677 crypto/sha2.h \
6678 dirent.h \
6679 endian.h \
Adam Langleyd0592972015-03-30 14:49:51 -07006680 elf.h \
Greg Hartman9768ca42017-06-22 20:49:52 -07006681 err.h \
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006682 features.h \
6683 fcntl.h \
6684 floatingpoint.h \
6685 getopt.h \
6686 glob.h \
6687 ia.h \
6688 iaf.h \
Adam Langleyd0592972015-03-30 14:49:51 -07006689 inttypes.h \
Greg Hartman9768ca42017-06-22 20:49:52 -07006690 langinfo.h \
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006691 limits.h \
Adam Langleyd0592972015-03-30 14:49:51 -07006692 locale.h \
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006693 login.h \
6694 maillock.h \
6695 ndir.h \
6696 net/if_tun.h \
6697 netdb.h \
6698 netgroup.h \
6699 pam/pam_appl.h \
6700 paths.h \
6701 poll.h \
6702 pty.h \
6703 readpassphrase.h \
6704 rpc/types.h \
6705 security/pam_appl.h \
6706 sha2.h \
6707 shadow.h \
6708 stddef.h \
6709 stdint.h \
6710 string.h \
6711 strings.h \
6712 sys/audit.h \
6713 sys/bitypes.h \
6714 sys/bsdtty.h \
Adam Langleyd0592972015-03-30 14:49:51 -07006715 sys/capability.h \
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006716 sys/cdefs.h \
6717 sys/dir.h \
6718 sys/mman.h \
6719 sys/ndir.h \
6720 sys/poll.h \
6721 sys/prctl.h \
6722 sys/pstat.h \
Greg Hartman9768ca42017-06-22 20:49:52 -07006723 sys/ptrace.h \
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006724 sys/select.h \
6725 sys/stat.h \
6726 sys/stream.h \
6727 sys/stropts.h \
6728 sys/strtio.h \
6729 sys/statvfs.h \
6730 sys/sysmacros.h \
6731 sys/time.h \
6732 sys/timers.h \
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006733 time.h \
6734 tmpdir.h \
6735 ttyent.h \
6736 ucred.h \
6737 unistd.h \
6738 usersec.h \
6739 util.h \
6740 utime.h \
6741 utmp.h \
6742 utmpx.h \
6743 vis.h \
Greg Hartman9768ca42017-06-22 20:49:52 -07006744 wchar.h \
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006745
Greg Hartman9768ca42017-06-22 20:49:52 -07006746do :
6747 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6748ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6749if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006750 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006751#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006752_ACEOF
6753
6754fi
6755
6756done
6757
6758
6759# lastlog.h requires sys/time.h to be included first on Solaris
6760for ac_header in lastlog.h
Greg Hartman9768ca42017-06-22 20:49:52 -07006761do :
6762 ac_fn_c_check_header_compile "$LINENO" "lastlog.h" "ac_cv_header_lastlog_h" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006763#ifdef HAVE_SYS_TIME_H
6764# include <sys/time.h>
6765#endif
6766
Greg Hartman9768ca42017-06-22 20:49:52 -07006767"
6768if test "x$ac_cv_header_lastlog_h" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006769 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006770#define HAVE_LASTLOG_H 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006771_ACEOF
6772
6773fi
6774
6775done
6776
6777
6778# sys/ptms.h requires sys/stream.h to be included first on Solaris
6779for ac_header in sys/ptms.h
Greg Hartman9768ca42017-06-22 20:49:52 -07006780do :
6781 ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006782#ifdef HAVE_SYS_STREAM_H
6783# include <sys/stream.h>
6784#endif
6785
Greg Hartman9768ca42017-06-22 20:49:52 -07006786"
6787if test "x$ac_cv_header_sys_ptms_h" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006788 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006789#define HAVE_SYS_PTMS_H 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006790_ACEOF
6791
6792fi
6793
6794done
6795
6796
6797# login_cap.h requires sys/types.h on NetBSD
6798for ac_header in login_cap.h
Greg Hartman9768ca42017-06-22 20:49:52 -07006799do :
6800 ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006801#include <sys/types.h>
6802
Greg Hartman9768ca42017-06-22 20:49:52 -07006803"
6804if test "x$ac_cv_header_login_cap_h" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006805 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006806#define HAVE_LOGIN_CAP_H 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006807_ACEOF
6808
6809fi
6810
6811done
6812
6813
6814# older BSDs need sys/param.h before sys/mount.h
6815for ac_header in sys/mount.h
Greg Hartman9768ca42017-06-22 20:49:52 -07006816do :
6817 ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006818#include <sys/param.h>
6819
Greg Hartman9768ca42017-06-22 20:49:52 -07006820"
6821if test "x$ac_cv_header_sys_mount_h" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006822 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006823#define HAVE_SYS_MOUNT_H 1
Adam Langleyd0592972015-03-30 14:49:51 -07006824_ACEOF
6825
6826fi
6827
6828done
6829
6830
6831# Android requires sys/socket.h to be included before sys/un.h
Adam Langleyd0592972015-03-30 14:49:51 -07006832for ac_header in sys/un.h
Greg Hartman9768ca42017-06-22 20:49:52 -07006833do :
6834 ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "
Adam Langleyd0592972015-03-30 14:49:51 -07006835#include <sys/types.h>
6836#include <sys/socket.h>
6837
Greg Hartman9768ca42017-06-22 20:49:52 -07006838"
6839if test "x$ac_cv_header_sys_un_h" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -07006840 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006841#define HAVE_SYS_UN_H 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006842_ACEOF
6843
6844fi
6845
6846done
6847
6848
6849# Messages for features tested for in target-specific section
6850SIA_MSG="no"
6851SPC_MSG="no"
6852SP_MSG="no"
Greg Hartman9768ca42017-06-22 20:49:52 -07006853SPP_MSG="no"
6854
6855# Support for Solaris/Illumos privileges (this test is used by both
6856# the --with-solaris-privs option and --with-sandbox=solaris).
6857SOLARIS_PRIVS="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006858
6859# Check for some target-specific stuff
6860case "$host" in
6861*-*-aix*)
6862 # Some versions of VAC won't allow macro redefinitions at
6863 # -qlanglevel=ansi, and autoconf 2.60 sometimes insists on using that
6864 # particularly with older versions of vac or xlc.
6865 # It also throws errors about null macro argments, but these are
6866 # not fatal.
Greg Hartman9768ca42017-06-22 20:49:52 -07006867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows macro redefinitions" >&5
6868$as_echo_n "checking if compiler allows macro redefinitions... " >&6; }
6869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006870/* end confdefs.h. */
6871
6872#define testmacro foo
6873#define testmacro bar
6874int
6875main ()
6876{
6877 exit(0);
6878 ;
6879 return 0;
6880}
6881_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006882if ac_fn_c_try_compile "$LINENO"; then :
6883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6884$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006885else
Greg Hartman9768ca42017-06-22 20:49:52 -07006886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6887$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006888 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
6889 LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`"
6890 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
6891 CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`"
6892
6893
6894fi
6895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6896
Greg Hartman9768ca42017-06-22 20:49:52 -07006897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to specify blibpath for linker ($LD)" >&5
6898$as_echo_n "checking how to specify blibpath for linker ($LD)... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006899 if (test -z "$blibpath"); then
6900 blibpath="/usr/lib:/lib"
6901 fi
6902 saved_LDFLAGS="$LDFLAGS"
6903 if test "$GCC" = "yes"; then
6904 flags="-Wl,-blibpath: -Wl,-rpath, -blibpath:"
6905 else
6906 flags="-blibpath: -Wl,-blibpath: -Wl,-rpath,"
6907 fi
6908 for tryflags in $flags ;do
6909 if (test -z "$blibflags"); then
6910 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
Greg Hartman9768ca42017-06-22 20:49:52 -07006911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006912/* end confdefs.h. */
6913
6914int
6915main ()
6916{
6917
6918 ;
6919 return 0;
6920}
6921_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006922if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006923 blibflags=$tryflags
6924fi
Greg Hartman9768ca42017-06-22 20:49:52 -07006925rm -f core conftest.err conftest.$ac_objext \
6926 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006927 fi
6928 done
6929 if (test -z "$blibflags"); then
Greg Hartman9768ca42017-06-22 20:49:52 -07006930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6931$as_echo "not found" >&6; }
6932 as_fn_error $? "*** must be able to specify blibpath on AIX - check config.log" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006933 else
Greg Hartman9768ca42017-06-22 20:49:52 -07006934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $blibflags" >&5
6935$as_echo "$blibflags" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006936 fi
6937 LDFLAGS="$saved_LDFLAGS"
Greg Hartman9768ca42017-06-22 20:49:52 -07006938 ac_fn_c_check_func "$LINENO" "authenticate" "ac_cv_func_authenticate"
6939if test "x$ac_cv_func_authenticate" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006940
Greg Hartman9768ca42017-06-22 20:49:52 -07006941$as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006942
6943else
Greg Hartman9768ca42017-06-22 20:49:52 -07006944 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for authenticate in -ls" >&5
6945$as_echo_n "checking for authenticate in -ls... " >&6; }
6946if ${ac_cv_lib_s_authenticate+:} false; then :
6947 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006948else
6949 ac_check_lib_save_LIBS=$LIBS
6950LIBS="-ls $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -07006951cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006952/* end confdefs.h. */
6953
6954/* Override any GCC internal prototype to avoid an error.
6955 Use char because int might match the return type of a GCC
6956 builtin and then its argument prototype would still apply. */
6957#ifdef __cplusplus
6958extern "C"
6959#endif
6960char authenticate ();
6961int
6962main ()
6963{
6964return authenticate ();
6965 ;
6966 return 0;
6967}
6968_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006969if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006970 ac_cv_lib_s_authenticate=yes
6971else
Greg Hartman9768ca42017-06-22 20:49:52 -07006972 ac_cv_lib_s_authenticate=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006973fi
Greg Hartman9768ca42017-06-22 20:49:52 -07006974rm -f core conftest.err conftest.$ac_objext \
6975 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006976LIBS=$ac_check_lib_save_LIBS
6977fi
Greg Hartman9768ca42017-06-22 20:49:52 -07006978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_s_authenticate" >&5
6979$as_echo "$ac_cv_lib_s_authenticate" >&6; }
6980if test "x$ac_cv_lib_s_authenticate" = xyes; then :
6981 $as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006982
6983 LIBS="$LIBS -ls"
6984
6985fi
6986
6987
6988fi
6989
Greg Hartman9768ca42017-06-22 20:49:52 -07006990 ac_fn_c_check_decl "$LINENO" "authenticate" "ac_cv_have_decl_authenticate" "#include <usersec.h>
6991"
6992if test "x$ac_cv_have_decl_authenticate" = xyes; then :
6993 ac_have_decl=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006994else
Greg Hartman9768ca42017-06-22 20:49:52 -07006995 ac_have_decl=0
Greg Hartmanbd77cf72015-02-25 13:21:06 -08006996fi
6997
6998cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07006999#define HAVE_DECL_AUTHENTICATE $ac_have_decl
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007000_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007001ac_fn_c_check_decl "$LINENO" "loginrestrictions" "ac_cv_have_decl_loginrestrictions" "#include <usersec.h>
7002"
7003if test "x$ac_cv_have_decl_loginrestrictions" = xyes; then :
7004 ac_have_decl=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007005else
Greg Hartman9768ca42017-06-22 20:49:52 -07007006 ac_have_decl=0
Adam Langleyd0592972015-03-30 14:49:51 -07007007fi
Adam Langleyd0592972015-03-30 14:49:51 -07007008
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007009cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007010#define HAVE_DECL_LOGINRESTRICTIONS $ac_have_decl
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007011_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007012ac_fn_c_check_decl "$LINENO" "loginsuccess" "ac_cv_have_decl_loginsuccess" "#include <usersec.h>
7013"
7014if test "x$ac_cv_have_decl_loginsuccess" = xyes; then :
7015 ac_have_decl=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007016else
Greg Hartman9768ca42017-06-22 20:49:52 -07007017 ac_have_decl=0
Adam Langleyd0592972015-03-30 14:49:51 -07007018fi
Adam Langleyd0592972015-03-30 14:49:51 -07007019
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007020cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007021#define HAVE_DECL_LOGINSUCCESS $ac_have_decl
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007022_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007023ac_fn_c_check_decl "$LINENO" "passwdexpired" "ac_cv_have_decl_passwdexpired" "#include <usersec.h>
7024"
7025if test "x$ac_cv_have_decl_passwdexpired" = xyes; then :
7026 ac_have_decl=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007027else
Greg Hartman9768ca42017-06-22 20:49:52 -07007028 ac_have_decl=0
Adam Langleyd0592972015-03-30 14:49:51 -07007029fi
Adam Langleyd0592972015-03-30 14:49:51 -07007030
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007031cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007032#define HAVE_DECL_PASSWDEXPIRED $ac_have_decl
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007033_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007034ac_fn_c_check_decl "$LINENO" "setauthdb" "ac_cv_have_decl_setauthdb" "#include <usersec.h>
7035"
7036if test "x$ac_cv_have_decl_setauthdb" = xyes; then :
7037 ac_have_decl=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007038else
Greg Hartman9768ca42017-06-22 20:49:52 -07007039 ac_have_decl=0
Adam Langleyd0592972015-03-30 14:49:51 -07007040fi
Adam Langleyd0592972015-03-30 14:49:51 -07007041
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007042cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007043#define HAVE_DECL_SETAUTHDB $ac_have_decl
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007044_ACEOF
7045
Greg Hartman9768ca42017-06-22 20:49:52 -07007046 ac_fn_c_check_decl "$LINENO" "loginfailed" "ac_cv_have_decl_loginfailed" "#include <usersec.h>
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007047
Greg Hartman9768ca42017-06-22 20:49:52 -07007048"
7049if test "x$ac_cv_have_decl_loginfailed" = xyes; then :
7050 ac_have_decl=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007051else
Greg Hartman9768ca42017-06-22 20:49:52 -07007052 ac_have_decl=0
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007053fi
7054
Adam Langleyd0592972015-03-30 14:49:51 -07007055cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007056#define HAVE_DECL_LOGINFAILED $ac_have_decl
Adam Langleyd0592972015-03-30 14:49:51 -07007057_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007058if test $ac_have_decl = 1; then :
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if loginfailed takes 4 arguments" >&5
7060$as_echo_n "checking if loginfailed takes 4 arguments... " >&6; }
7061 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007062/* end confdefs.h. */
7063 #include <usersec.h>
7064int
7065main ()
7066{
7067 (void)loginfailed("user","host","tty",0);
7068 ;
7069 return 0;
7070}
7071_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007072if ac_fn_c_try_compile "$LINENO"; then :
7073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7074$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007075
Greg Hartman9768ca42017-06-22 20:49:52 -07007076$as_echo "#define AIX_LOGINFAILED_4ARG 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007077
7078else
Greg Hartman9768ca42017-06-22 20:49:52 -07007079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7080$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007081
7082fi
7083rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Greg Hartman9768ca42017-06-22 20:49:52 -07007084fi
7085
7086 for ac_func in getgrset setauthdb
7087do :
7088 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7089ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7090if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07007091 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007092#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007093_ACEOF
7094
7095fi
7096done
7097
Greg Hartman9768ca42017-06-22 20:49:52 -07007098 ac_fn_c_check_decl "$LINENO" "F_CLOSEM" "ac_cv_have_decl_F_CLOSEM" " #include <limits.h>
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007099 #include <fcntl.h>
7100
Greg Hartman9768ca42017-06-22 20:49:52 -07007101"
7102if test "x$ac_cv_have_decl_F_CLOSEM" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007103
Greg Hartman9768ca42017-06-22 20:49:52 -07007104$as_echo "#define HAVE_FCNTL_CLOSEM 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007105
7106fi
7107
7108 check_for_aix_broken_getaddrinfo=1
7109
Greg Hartman9768ca42017-06-22 20:49:52 -07007110$as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007111
7112
Greg Hartman9768ca42017-06-22 20:49:52 -07007113$as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007114
7115
Greg Hartman9768ca42017-06-22 20:49:52 -07007116$as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007117
7118
Greg Hartman9768ca42017-06-22 20:49:52 -07007119$as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007120
7121
Greg Hartman9768ca42017-06-22 20:49:52 -07007122$as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007123
7124
Greg Hartman9768ca42017-06-22 20:49:52 -07007125$as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007126
7127
Greg Hartman9768ca42017-06-22 20:49:52 -07007128$as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007129
7130
Greg Hartman9768ca42017-06-22 20:49:52 -07007131$as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007132
7133
Greg Hartman9768ca42017-06-22 20:49:52 -07007134$as_echo "#define PTY_ZEROREAD 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -07007135
7136
Greg Hartman9768ca42017-06-22 20:49:52 -07007137$as_echo "#define PLATFORM_SYS_DIR_UID 2" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -07007138
7139 ;;
7140*-*-android*)
7141
Greg Hartman9768ca42017-06-22 20:49:52 -07007142$as_echo "#define DISABLE_UTMP 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -07007143
7144
Greg Hartman9768ca42017-06-22 20:49:52 -07007145$as_echo "#define DISABLE_WTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007146
7147 ;;
7148*-*-cygwin*)
7149 check_for_libcrypt_later=1
7150 LIBS="$LIBS /usr/lib/textreadmode.o"
7151
Greg Hartman9768ca42017-06-22 20:49:52 -07007152$as_echo "#define HAVE_CYGWIN 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007153
7154
Greg Hartman9768ca42017-06-22 20:49:52 -07007155$as_echo "#define USE_PIPES 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007156
7157
Greg Hartman9768ca42017-06-22 20:49:52 -07007158$as_echo "#define NO_UID_RESTORATION_TEST 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007159
7160
Greg Hartman9768ca42017-06-22 20:49:52 -07007161$as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007162
7163
Greg Hartman9768ca42017-06-22 20:49:52 -07007164$as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007165
7166
Greg Hartman9768ca42017-06-22 20:49:52 -07007167$as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007168
7169
Greg Hartman9768ca42017-06-22 20:49:52 -07007170$as_echo "#define SSH_IOBUFSZ 65535" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007171
7172
Greg Hartman9768ca42017-06-22 20:49:52 -07007173$as_echo "#define FILESYSTEM_NO_BACKSLASH 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007174
Adam Langleyd0592972015-03-30 14:49:51 -07007175 # Cygwin defines optargs, optargs as declspec(dllimport) for historical
7176 # reasons which cause compile warnings, so we disable those warnings.
7177 {
Greg Hartman9768ca42017-06-22 20:49:52 -07007178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wno-attributes" >&5
7179$as_echo_n "checking if $CC supports compile flag -Wno-attributes... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07007180 saved_CFLAGS="$CFLAGS"
7181 CFLAGS="$CFLAGS $WERROR -Wno-attributes"
7182 _define_flag=""
7183 test "x$_define_flag" = "x" && _define_flag="-Wno-attributes"
Greg Hartman9768ca42017-06-22 20:49:52 -07007184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07007185/* end confdefs.h. */
7186
7187#include <stdlib.h>
7188#include <stdio.h>
7189int main(int argc, char **argv) {
7190 /* Some math to catch -ftrapv problems in the toolchain */
7191 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
7192 float l = i * 2.1;
7193 double m = l / 0.5;
7194 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
7195 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
7196 exit(0);
7197}
7198
7199_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007200if ac_fn_c_try_compile "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07007201
7202if `grep -i "unrecognized option" conftest.err >/dev/null`
7203then
Greg Hartman9768ca42017-06-22 20:49:52 -07007204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7205$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07007206 CFLAGS="$saved_CFLAGS"
7207else
Greg Hartman9768ca42017-06-22 20:49:52 -07007208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7209$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07007210 CFLAGS="$saved_CFLAGS $_define_flag"
7211fi
7212else
Greg Hartman9768ca42017-06-22 20:49:52 -07007213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7214$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07007215 CFLAGS="$saved_CFLAGS"
7216
7217fi
Adam Langleyd0592972015-03-30 14:49:51 -07007218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7219}
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007220 ;;
7221*-*-dgux*)
7222
Greg Hartman9768ca42017-06-22 20:49:52 -07007223$as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007224
Greg Hartman9768ca42017-06-22 20:49:52 -07007225 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007226
Greg Hartman9768ca42017-06-22 20:49:52 -07007227 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007228
Greg Hartman9768ca42017-06-22 20:49:52 -07007229 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007230
7231 ;;
7232*-*-darwin*)
Adam Langleyd0592972015-03-30 14:49:51 -07007233 use_pie=auto
Greg Hartman9768ca42017-06-22 20:49:52 -07007234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have working getaddrinfo" >&5
7235$as_echo_n "checking if we have working getaddrinfo... " >&6; }
7236 if test "$cross_compiling" = yes; then :
7237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assume it is working" >&5
7238$as_echo "assume it is working" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007239else
Greg Hartman9768ca42017-06-22 20:49:52 -07007240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007241/* end confdefs.h. */
7242 #include <mach-o/dyld.h>
7243main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
7244 exit(0);
7245 else
7246 exit(1);
7247}
7248
7249_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007250if ac_fn_c_try_run "$LINENO"; then :
7251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: working" >&5
7252$as_echo "working" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007253else
Greg Hartman9768ca42017-06-22 20:49:52 -07007254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5
7255$as_echo "buggy" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007256
Greg Hartman9768ca42017-06-22 20:49:52 -07007257$as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007258
7259
7260fi
Greg Hartman9768ca42017-06-22 20:49:52 -07007261rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7262 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007263fi
7264
Greg Hartman9768ca42017-06-22 20:49:52 -07007265 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007266
Greg Hartman9768ca42017-06-22 20:49:52 -07007267 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007268
Greg Hartman9768ca42017-06-22 20:49:52 -07007269 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007270
7271
Greg Hartman9768ca42017-06-22 20:49:52 -07007272$as_echo "#define BROKEN_GLOB 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007273
7274
7275cat >>confdefs.h <<_ACEOF
7276#define BIND_8_COMPAT 1
7277_ACEOF
7278
7279
Greg Hartman9768ca42017-06-22 20:49:52 -07007280$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007281
7282
Greg Hartman9768ca42017-06-22 20:49:52 -07007283$as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007284
7285
Greg Hartman9768ca42017-06-22 20:49:52 -07007286$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007287
7288
Greg Hartman9768ca42017-06-22 20:49:52 -07007289 ac_fn_c_check_decl "$LINENO" "AU_IPv4" "ac_cv_have_decl_AU_IPv4" "$ac_includes_default"
7290if test "x$ac_cv_have_decl_AU_IPv4" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007291
7292else
7293
Greg Hartman9768ca42017-06-22 20:49:52 -07007294$as_echo "#define AU_IPv4 0" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007295
7296 #include <bsm/audit.h>
7297
Greg Hartman9768ca42017-06-22 20:49:52 -07007298$as_echo "#define LASTLOG_WRITE_PUTUTXLINE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007299
7300
7301fi
7302
7303
Greg Hartman9768ca42017-06-22 20:49:52 -07007304$as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7305
7306 for ac_func in sandbox_init
7307do :
7308 ac_fn_c_check_func "$LINENO" "sandbox_init" "ac_cv_func_sandbox_init"
7309if test "x$ac_cv_func_sandbox_init" = xyes; then :
7310 cat >>confdefs.h <<_ACEOF
7311#define HAVE_SANDBOX_INIT 1
Adam Langleyd0592972015-03-30 14:49:51 -07007312_ACEOF
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007313
Greg Hartman9768ca42017-06-22 20:49:52 -07007314fi
7315done
Adam Langleyd0592972015-03-30 14:49:51 -07007316
Greg Hartman9768ca42017-06-22 20:49:52 -07007317 for ac_header in sandbox.h
7318do :
7319 ac_fn_c_check_header_mongrel "$LINENO" "sandbox.h" "ac_cv_header_sandbox_h" "$ac_includes_default"
7320if test "x$ac_cv_header_sandbox_h" = xyes; then :
7321 cat >>confdefs.h <<_ACEOF
7322#define HAVE_SANDBOX_H 1
7323_ACEOF
7324
7325fi
7326
7327done
7328
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sandbox_apply in -lsandbox" >&5
7330$as_echo_n "checking for sandbox_apply in -lsandbox... " >&6; }
7331if ${ac_cv_lib_sandbox_sandbox_apply+:} false; then :
7332 $as_echo_n "(cached) " >&6
Adam Langleyd0592972015-03-30 14:49:51 -07007333else
Greg Hartman9768ca42017-06-22 20:49:52 -07007334 ac_check_lib_save_LIBS=$LIBS
7335LIBS="-lsandbox $LIBS"
7336cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07007337/* end confdefs.h. */
Adam Langleyd0592972015-03-30 14:49:51 -07007338
7339/* Override any GCC internal prototype to avoid an error.
7340 Use char because int might match the return type of a GCC
7341 builtin and then its argument prototype would still apply. */
7342#ifdef __cplusplus
7343extern "C"
7344#endif
Greg Hartman9768ca42017-06-22 20:49:52 -07007345char sandbox_apply ();
Adam Langleyd0592972015-03-30 14:49:51 -07007346int
7347main ()
7348{
Greg Hartman9768ca42017-06-22 20:49:52 -07007349return sandbox_apply ();
Adam Langleyd0592972015-03-30 14:49:51 -07007350 ;
7351 return 0;
7352}
7353_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007354if ac_fn_c_try_link "$LINENO"; then :
7355 ac_cv_lib_sandbox_sandbox_apply=yes
Adam Langleyd0592972015-03-30 14:49:51 -07007356else
Greg Hartman9768ca42017-06-22 20:49:52 -07007357 ac_cv_lib_sandbox_sandbox_apply=no
Adam Langleyd0592972015-03-30 14:49:51 -07007358fi
Greg Hartman9768ca42017-06-22 20:49:52 -07007359rm -f core conftest.err conftest.$ac_objext \
7360 conftest$ac_exeext conftest.$ac_ext
7361LIBS=$ac_check_lib_save_LIBS
Adam Langleyd0592972015-03-30 14:49:51 -07007362fi
Greg Hartman9768ca42017-06-22 20:49:52 -07007363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sandbox_sandbox_apply" >&5
7364$as_echo "$ac_cv_lib_sandbox_sandbox_apply" >&6; }
7365if test "x$ac_cv_lib_sandbox_sandbox_apply" = xyes; then :
7366
7367 SSHDLIBS="$SSHDLIBS -lsandbox"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007368
7369fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007370
7371 ;;
7372*-*-dragonfly*)
7373 SSHDLIBS="$SSHDLIBS -lcrypt"
Adam Langleyd0592972015-03-30 14:49:51 -07007374 TEST_MALLOC_OPTIONS="AFGJPRX"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007375 ;;
7376*-*-haiku*)
Greg Hartman9768ca42017-06-22 20:49:52 -07007377 LIBS="$LIBS -lbsd "
7378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
7379$as_echo_n "checking for socket in -lnetwork... " >&6; }
7380if ${ac_cv_lib_network_socket+:} false; then :
7381 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007382else
7383 ac_check_lib_save_LIBS=$LIBS
7384LIBS="-lnetwork $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -07007385cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007386/* end confdefs.h. */
7387
7388/* Override any GCC internal prototype to avoid an error.
7389 Use char because int might match the return type of a GCC
7390 builtin and then its argument prototype would still apply. */
7391#ifdef __cplusplus
7392extern "C"
7393#endif
7394char socket ();
7395int
7396main ()
7397{
7398return socket ();
7399 ;
7400 return 0;
7401}
7402_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007403if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007404 ac_cv_lib_network_socket=yes
7405else
Greg Hartman9768ca42017-06-22 20:49:52 -07007406 ac_cv_lib_network_socket=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007407fi
Greg Hartman9768ca42017-06-22 20:49:52 -07007408rm -f core conftest.err conftest.$ac_objext \
7409 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007410LIBS=$ac_check_lib_save_LIBS
7411fi
Greg Hartman9768ca42017-06-22 20:49:52 -07007412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
7413$as_echo "$ac_cv_lib_network_socket" >&6; }
7414if test "x$ac_cv_lib_network_socket" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007415 cat >>confdefs.h <<_ACEOF
7416#define HAVE_LIBNETWORK 1
7417_ACEOF
7418
7419 LIBS="-lnetwork $LIBS"
7420
7421fi
7422
Greg Hartman9768ca42017-06-22 20:49:52 -07007423 $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007424
Greg Hartman9768ca42017-06-22 20:49:52 -07007425 MANTYPE=man
7426 ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007427*-*-hpux*)
7428 # first we define all of the options common to all HP-UX releases
7429 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
7430 IPADDR_IN_DISPLAY=yes
Greg Hartman9768ca42017-06-22 20:49:52 -07007431 $as_echo "#define USE_PIPES 1" >>confdefs.h
7432
7433 $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007434
7435
Greg Hartman9768ca42017-06-22 20:49:52 -07007436$as_echo "#define LOCKED_PASSWD_STRING \"*\"" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007437
Greg Hartman9768ca42017-06-22 20:49:52 -07007438 $as_echo "#define SPT_TYPE SPT_PSTAT" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007439
7440
Greg Hartman9768ca42017-06-22 20:49:52 -07007441$as_echo "#define PLATFORM_SYS_DIR_UID 2" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007442
7443 maildir="/var/mail"
7444 LIBS="$LIBS -lsec"
Greg Hartman9768ca42017-06-22 20:49:52 -07007445 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_error in -lxnet" >&5
7446$as_echo_n "checking for t_error in -lxnet... " >&6; }
7447if ${ac_cv_lib_xnet_t_error+:} false; then :
7448 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007449else
7450 ac_check_lib_save_LIBS=$LIBS
7451LIBS="-lxnet $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -07007452cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007453/* end confdefs.h. */
7454
7455/* Override any GCC internal prototype to avoid an error.
7456 Use char because int might match the return type of a GCC
7457 builtin and then its argument prototype would still apply. */
7458#ifdef __cplusplus
7459extern "C"
7460#endif
7461char t_error ();
7462int
7463main ()
7464{
7465return t_error ();
7466 ;
7467 return 0;
7468}
7469_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007470if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007471 ac_cv_lib_xnet_t_error=yes
7472else
Greg Hartman9768ca42017-06-22 20:49:52 -07007473 ac_cv_lib_xnet_t_error=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007474fi
Greg Hartman9768ca42017-06-22 20:49:52 -07007475rm -f core conftest.err conftest.$ac_objext \
7476 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007477LIBS=$ac_check_lib_save_LIBS
7478fi
Greg Hartman9768ca42017-06-22 20:49:52 -07007479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_t_error" >&5
7480$as_echo "$ac_cv_lib_xnet_t_error" >&6; }
7481if test "x$ac_cv_lib_xnet_t_error" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007482 cat >>confdefs.h <<_ACEOF
7483#define HAVE_LIBXNET 1
7484_ACEOF
7485
7486 LIBS="-lxnet $LIBS"
7487
7488else
Greg Hartman9768ca42017-06-22 20:49:52 -07007489 as_fn_error $? "*** -lxnet needed on HP-UX - check config.log ***" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007490fi
7491
7492
7493 # next, we define all of the options specific to major releases
7494 case "$host" in
7495 *-*-hpux10*)
7496 if test -z "$GCC"; then
7497 CFLAGS="$CFLAGS -Ae"
7498 fi
7499 ;;
7500 *-*-hpux11*)
7501
Greg Hartman9768ca42017-06-22 20:49:52 -07007502$as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007503
7504
Greg Hartman9768ca42017-06-22 20:49:52 -07007505$as_echo "#define DISABLE_UTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007506
7507
Greg Hartman9768ca42017-06-22 20:49:52 -07007508$as_echo "#define USE_BTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007509
7510 check_for_hpux_broken_getaddrinfo=1
7511 check_for_conflicting_getspnam=1
7512 ;;
7513 esac
7514
7515 # lastly, we define options specific to minor releases
7516 case "$host" in
7517 *-*-hpux10.26)
7518
Greg Hartman9768ca42017-06-22 20:49:52 -07007519$as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007520
7521 disable_ptmx_check=yes
7522 LIBS="$LIBS -lsecpw"
7523 ;;
7524 esac
7525 ;;
7526*-*-irix5*)
7527 PATH="$PATH:/usr/etc"
7528
Greg Hartman9768ca42017-06-22 20:49:52 -07007529$as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007530
Greg Hartman9768ca42017-06-22 20:49:52 -07007531 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007532
Greg Hartman9768ca42017-06-22 20:49:52 -07007533 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007534
Greg Hartman9768ca42017-06-22 20:49:52 -07007535 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007536
7537
Greg Hartman9768ca42017-06-22 20:49:52 -07007538$as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007539
Greg Hartman9768ca42017-06-22 20:49:52 -07007540 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007541
7542 ;;
7543*-*-irix6*)
7544 PATH="$PATH:/usr/etc"
7545
Greg Hartman9768ca42017-06-22 20:49:52 -07007546$as_echo "#define WITH_IRIX_ARRAY 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007547
7548
Greg Hartman9768ca42017-06-22 20:49:52 -07007549$as_echo "#define WITH_IRIX_PROJECT 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007550
7551
Greg Hartman9768ca42017-06-22 20:49:52 -07007552$as_echo "#define WITH_IRIX_AUDIT 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007553
Greg Hartman9768ca42017-06-22 20:49:52 -07007554 ac_fn_c_check_func "$LINENO" "jlimit_startjob" "ac_cv_func_jlimit_startjob"
7555if test "x$ac_cv_func_jlimit_startjob" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007556
Greg Hartman9768ca42017-06-22 20:49:52 -07007557$as_echo "#define WITH_IRIX_JOBS 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007558
7559fi
7560
Greg Hartman9768ca42017-06-22 20:49:52 -07007561 $as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007562
Greg Hartman9768ca42017-06-22 20:49:52 -07007563 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007564
Greg Hartman9768ca42017-06-22 20:49:52 -07007565 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007566
Greg Hartman9768ca42017-06-22 20:49:52 -07007567 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007568
7569
Greg Hartman9768ca42017-06-22 20:49:52 -07007570$as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007571
Greg Hartman9768ca42017-06-22 20:49:52 -07007572 $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007573
Greg Hartman9768ca42017-06-22 20:49:52 -07007574 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007575
7576 ;;
7577*-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
7578 check_for_libcrypt_later=1
Greg Hartman9768ca42017-06-22 20:49:52 -07007579 $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007580
Greg Hartman9768ca42017-06-22 20:49:52 -07007581 $as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007582
Greg Hartman9768ca42017-06-22 20:49:52 -07007583 $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007584
7585
Greg Hartman9768ca42017-06-22 20:49:52 -07007586$as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007587
7588
Greg Hartman9768ca42017-06-22 20:49:52 -07007589$as_echo "#define USE_BTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007590
7591 ;;
7592*-*-linux*)
7593 no_dev_ptmx=1
Adam Langleyd0592972015-03-30 14:49:51 -07007594 use_pie=auto
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007595 check_for_libcrypt_later=1
7596 check_for_openpty_ctty_bug=1
Greg Hartman9768ca42017-06-22 20:49:52 -07007597 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007598
Greg Hartman9768ca42017-06-22 20:49:52 -07007599$as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007600
7601
Greg Hartman9768ca42017-06-22 20:49:52 -07007602$as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007603
Greg Hartman9768ca42017-06-22 20:49:52 -07007604 $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007605
7606
Greg Hartman9768ca42017-06-22 20:49:52 -07007607$as_echo "#define LINK_OPNOTSUPP_ERRNO EPERM" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007608
7609
Greg Hartman9768ca42017-06-22 20:49:52 -07007610$as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007611
Greg Hartman9768ca42017-06-22 20:49:52 -07007612 $as_echo "#define USE_BTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007613
7614
Greg Hartman9768ca42017-06-22 20:49:52 -07007615$as_echo "#define LINUX_OOM_ADJUST 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007616
7617 inet6_default_4in6=yes
7618 case `uname -r` in
7619 1.*|2.0.*)
7620
Greg Hartman9768ca42017-06-22 20:49:52 -07007621$as_echo "#define BROKEN_CMSG_TYPE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007622
7623 ;;
7624 esac
7625 # tun(4) forwarding compat code
Greg Hartman9768ca42017-06-22 20:49:52 -07007626 for ac_header in linux/if_tun.h
7627do :
7628 ac_fn_c_check_header_mongrel "$LINENO" "linux/if_tun.h" "ac_cv_header_linux_if_tun_h" "$ac_includes_default"
7629if test "x$ac_cv_header_linux_if_tun_h" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007630 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007631#define HAVE_LINUX_IF_TUN_H 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007632_ACEOF
7633
7634fi
7635
7636done
7637
7638 if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then
7639
Greg Hartman9768ca42017-06-22 20:49:52 -07007640$as_echo "#define SSH_TUN_LINUX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007641
7642
Greg Hartman9768ca42017-06-22 20:49:52 -07007643$as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007644
7645
Greg Hartman9768ca42017-06-22 20:49:52 -07007646$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007647
7648 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07007649 for ac_header in linux/seccomp.h linux/filter.h linux/audit.h
7650do :
7651 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7652ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <linux/types.h>
7653"
7654if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07007655 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007656#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Adam Langleyd0592972015-03-30 14:49:51 -07007657_ACEOF
7658
7659fi
7660
7661done
7662
Greg Hartman9768ca42017-06-22 20:49:52 -07007663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for seccomp architecture" >&5
7664$as_echo_n "checking for seccomp architecture... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07007665 seccomp_audit_arch=
7666 case "$host" in
7667 x86_64-*)
7668 seccomp_audit_arch=AUDIT_ARCH_X86_64
7669 ;;
7670 i*86-*)
7671 seccomp_audit_arch=AUDIT_ARCH_I386
7672 ;;
Greg Hartmanccacbc92016-02-03 09:59:44 -08007673 arm*-*)
Adam Langleyd0592972015-03-30 14:49:51 -07007674 seccomp_audit_arch=AUDIT_ARCH_ARM
Greg Hartmanccacbc92016-02-03 09:59:44 -08007675 ;;
7676 aarch64*-*)
7677 seccomp_audit_arch=AUDIT_ARCH_AARCH64
7678 ;;
Greg Hartman9768ca42017-06-22 20:49:52 -07007679 s390x-*)
7680 seccomp_audit_arch=AUDIT_ARCH_S390X
7681 ;;
7682 s390-*)
7683 seccomp_audit_arch=AUDIT_ARCH_S390
7684 ;;
7685 powerpc64-*)
7686 seccomp_audit_arch=AUDIT_ARCH_PPC64
7687 ;;
7688 powerpc64le-*)
7689 seccomp_audit_arch=AUDIT_ARCH_PPC64LE
7690 ;;
7691 mips-*)
7692 seccomp_audit_arch=AUDIT_ARCH_MIPS
7693 ;;
7694 mipsel-*)
7695 seccomp_audit_arch=AUDIT_ARCH_MIPSEL
7696 ;;
7697 mips64-*)
7698 seccomp_audit_arch=AUDIT_ARCH_MIPS64
7699 ;;
7700 mips64el-*)
7701 seccomp_audit_arch=AUDIT_ARCH_MIPSEL64
7702 ;;
Adam Langleyd0592972015-03-30 14:49:51 -07007703 esac
7704 if test "x$seccomp_audit_arch" != "x" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -07007705 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$seccomp_audit_arch\"" >&5
7706$as_echo "\"$seccomp_audit_arch\"" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07007707
7708cat >>confdefs.h <<_ACEOF
7709#define SECCOMP_AUDIT_ARCH $seccomp_audit_arch
7710_ACEOF
7711
7712 else
Greg Hartman9768ca42017-06-22 20:49:52 -07007713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: architecture not supported" >&5
7714$as_echo "architecture not supported" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07007715 fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007716 ;;
7717mips-sony-bsd|mips-sony-newsos4)
7718
Greg Hartman9768ca42017-06-22 20:49:52 -07007719$as_echo "#define NEED_SETPGRP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007720
7721 SONY=1
7722 ;;
7723*-*-netbsd*)
7724 check_for_libcrypt_before=1
7725 if test "x$withval" != "xno" ; then
7726 need_dash_r=1
7727 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07007728 CPPFLAGS="$CPPFLAGS -D_OPENBSD_SOURCE"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007729
Greg Hartman9768ca42017-06-22 20:49:52 -07007730$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007731
Greg Hartman9768ca42017-06-22 20:49:52 -07007732 ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
7733if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007734
7735else
7736
Greg Hartman9768ca42017-06-22 20:49:52 -07007737$as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007738
7739fi
7740
7741
7742
Greg Hartman9768ca42017-06-22 20:49:52 -07007743$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -07007744
7745 TEST_MALLOC_OPTIONS="AJRX"
7746
Greg Hartman9768ca42017-06-22 20:49:52 -07007747$as_echo "#define BROKEN_READ_COMPARISON 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007748
7749 ;;
7750*-*-freebsd*)
7751 check_for_libcrypt_later=1
7752
Greg Hartman9768ca42017-06-22 20:49:52 -07007753$as_echo "#define LOCKED_PASSWD_PREFIX \"*LOCKED*\"" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007754
7755
Greg Hartman9768ca42017-06-22 20:49:52 -07007756$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007757
Greg Hartman9768ca42017-06-22 20:49:52 -07007758 ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
7759if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007760
7761else
7762
Greg Hartman9768ca42017-06-22 20:49:52 -07007763$as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007764
7765fi
7766
7767
7768
Greg Hartman9768ca42017-06-22 20:49:52 -07007769$as_echo "#define BROKEN_GLOB 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -07007770
7771 TEST_MALLOC_OPTIONS="AJRX"
7772 # Preauth crypto occasionally uses file descriptors for crypto offload
7773 # and will crash if they cannot be opened.
7774
Greg Hartman9768ca42017-06-22 20:49:52 -07007775$as_echo "#define SANDBOX_SKIP_RLIMIT_NOFILE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007776
7777 ;;
7778*-*-bsdi*)
Greg Hartman9768ca42017-06-22 20:49:52 -07007779 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007780
Greg Hartman9768ca42017-06-22 20:49:52 -07007781 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007782
Greg Hartman9768ca42017-06-22 20:49:52 -07007783 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007784
7785 ;;
7786*-next-*)
7787 conf_lastlog_location="/usr/adm/lastlog"
7788 conf_utmp_location=/etc/utmp
7789 conf_wtmp_location=/usr/adm/wtmp
7790 maildir=/usr/spool/mail
7791
Greg Hartman9768ca42017-06-22 20:49:52 -07007792$as_echo "#define HAVE_NEXT 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007793
Greg Hartman9768ca42017-06-22 20:49:52 -07007794 $as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007795
Greg Hartman9768ca42017-06-22 20:49:52 -07007796 $as_echo "#define USE_PIPES 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007797
7798
Greg Hartman9768ca42017-06-22 20:49:52 -07007799$as_echo "#define BROKEN_SAVED_UIDS 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007800
7801 ;;
7802*-*-openbsd*)
Adam Langleyd0592972015-03-30 14:49:51 -07007803 use_pie=auto
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007804
Greg Hartman9768ca42017-06-22 20:49:52 -07007805$as_echo "#define HAVE_ATTRIBUTE__SENTINEL__ 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007806
7807
Greg Hartman9768ca42017-06-22 20:49:52 -07007808$as_echo "#define HAVE_ATTRIBUTE__BOUNDED__ 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007809
7810
Greg Hartman9768ca42017-06-22 20:49:52 -07007811$as_echo "#define SSH_TUN_OPENBSD 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007812
7813
Greg Hartman9768ca42017-06-22 20:49:52 -07007814$as_echo "#define SYSLOG_R_SAFE_IN_SIGHAND 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007815
Adam Langleyd0592972015-03-30 14:49:51 -07007816 TEST_MALLOC_OPTIONS="AFGJPRX"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007817 ;;
7818*-*-solaris*)
7819 if test "x$withval" != "xno" ; then
7820 need_dash_r=1
7821 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07007822 $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007823
Greg Hartman9768ca42017-06-22 20:49:52 -07007824 $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
7825
7826 $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007827
7828
Greg Hartman9768ca42017-06-22 20:49:52 -07007829$as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007830
Greg Hartman9768ca42017-06-22 20:49:52 -07007831 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007832
7833 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
7834
Greg Hartman9768ca42017-06-22 20:49:52 -07007835$as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007836
7837
Greg Hartman9768ca42017-06-22 20:49:52 -07007838$as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007839
7840
Greg Hartman9768ca42017-06-22 20:49:52 -07007841$as_echo "#define BROKEN_TCGETATTR_ICANON 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007842
7843 external_path_file=/etc/default/login
7844 # hardwire lastlog location (can't detect it on some versions)
7845 conf_lastlog_location="/var/adm/lastlog"
Greg Hartman9768ca42017-06-22 20:49:52 -07007846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obsolete utmp and wtmp in solaris2.x" >&5
7847$as_echo_n "checking for obsolete utmp and wtmp in solaris2.x... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007848 sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
7849 if test "$sol2ver" -ge 8; then
Greg Hartman9768ca42017-06-22 20:49:52 -07007850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7851$as_echo "yes" >&6; }
7852 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007853
7854
Greg Hartman9768ca42017-06-22 20:49:52 -07007855$as_echo "#define DISABLE_WTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007856
7857 else
Greg Hartman9768ca42017-06-22 20:49:52 -07007858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7859$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007860 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07007861 for ac_func in setpflags
7862do :
7863 ac_fn_c_check_func "$LINENO" "setpflags" "ac_cv_func_setpflags"
7864if test "x$ac_cv_func_setpflags" = xyes; then :
7865 cat >>confdefs.h <<_ACEOF
7866#define HAVE_SETPFLAGS 1
7867_ACEOF
7868
7869fi
7870done
7871
7872 for ac_func in setppriv
7873do :
7874 ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
7875if test "x$ac_cv_func_setppriv" = xyes; then :
7876 cat >>confdefs.h <<_ACEOF
7877#define HAVE_SETPPRIV 1
7878_ACEOF
7879
7880fi
7881done
7882
7883 for ac_func in priv_basicset
7884do :
7885 ac_fn_c_check_func "$LINENO" "priv_basicset" "ac_cv_func_priv_basicset"
7886if test "x$ac_cv_func_priv_basicset" = xyes; then :
7887 cat >>confdefs.h <<_ACEOF
7888#define HAVE_PRIV_BASICSET 1
7889_ACEOF
7890
7891fi
7892done
7893
7894 for ac_header in priv.h
7895do :
7896 ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
7897if test "x$ac_cv_header_priv_h" = xyes; then :
7898 cat >>confdefs.h <<_ACEOF
7899#define HAVE_PRIV_H 1
7900_ACEOF
7901
7902fi
7903
7904done
7905
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007906
7907# Check whether --with-solaris-contracts was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07007908if test "${with_solaris_contracts+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007909 withval=$with_solaris_contracts;
Greg Hartman9768ca42017-06-22 20:49:52 -07007910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ct_tmpl_activate in -lcontract" >&5
7911$as_echo_n "checking for ct_tmpl_activate in -lcontract... " >&6; }
7912if ${ac_cv_lib_contract_ct_tmpl_activate+:} false; then :
7913 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007914else
7915 ac_check_lib_save_LIBS=$LIBS
7916LIBS="-lcontract $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -07007917cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007918/* end confdefs.h. */
7919
7920/* Override any GCC internal prototype to avoid an error.
7921 Use char because int might match the return type of a GCC
7922 builtin and then its argument prototype would still apply. */
7923#ifdef __cplusplus
7924extern "C"
7925#endif
7926char ct_tmpl_activate ();
7927int
7928main ()
7929{
7930return ct_tmpl_activate ();
7931 ;
7932 return 0;
7933}
7934_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007935if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007936 ac_cv_lib_contract_ct_tmpl_activate=yes
7937else
Greg Hartman9768ca42017-06-22 20:49:52 -07007938 ac_cv_lib_contract_ct_tmpl_activate=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007939fi
Greg Hartman9768ca42017-06-22 20:49:52 -07007940rm -f core conftest.err conftest.$ac_objext \
7941 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007942LIBS=$ac_check_lib_save_LIBS
7943fi
Greg Hartman9768ca42017-06-22 20:49:52 -07007944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_contract_ct_tmpl_activate" >&5
7945$as_echo "$ac_cv_lib_contract_ct_tmpl_activate" >&6; }
7946if test "x$ac_cv_lib_contract_ct_tmpl_activate" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007947
Greg Hartman9768ca42017-06-22 20:49:52 -07007948$as_echo "#define USE_SOLARIS_PROCESS_CONTRACTS 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007949
Greg Hartman9768ca42017-06-22 20:49:52 -07007950 LIBS="$LIBS -lcontract"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007951 SPC_MSG="yes"
7952fi
7953
7954
7955fi
7956
7957
7958# Check whether --with-solaris-projects was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07007959if test "${with_solaris_projects+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007960 withval=$with_solaris_projects;
Greg Hartman9768ca42017-06-22 20:49:52 -07007961 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproject in -lproject" >&5
7962$as_echo_n "checking for setproject in -lproject... " >&6; }
7963if ${ac_cv_lib_project_setproject+:} false; then :
7964 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007965else
7966 ac_check_lib_save_LIBS=$LIBS
7967LIBS="-lproject $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -07007968cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007969/* end confdefs.h. */
7970
7971/* Override any GCC internal prototype to avoid an error.
7972 Use char because int might match the return type of a GCC
7973 builtin and then its argument prototype would still apply. */
7974#ifdef __cplusplus
7975extern "C"
7976#endif
7977char setproject ();
7978int
7979main ()
7980{
7981return setproject ();
7982 ;
7983 return 0;
7984}
7985_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07007986if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007987 ac_cv_lib_project_setproject=yes
7988else
Greg Hartman9768ca42017-06-22 20:49:52 -07007989 ac_cv_lib_project_setproject=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007990fi
Greg Hartman9768ca42017-06-22 20:49:52 -07007991rm -f core conftest.err conftest.$ac_objext \
7992 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007993LIBS=$ac_check_lib_save_LIBS
7994fi
Greg Hartman9768ca42017-06-22 20:49:52 -07007995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_project_setproject" >&5
7996$as_echo "$ac_cv_lib_project_setproject" >&6; }
7997if test "x$ac_cv_lib_project_setproject" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08007998
Greg Hartman9768ca42017-06-22 20:49:52 -07007999$as_echo "#define USE_SOLARIS_PROJECTS 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008000
Greg Hartman9768ca42017-06-22 20:49:52 -07008001 LIBS="$LIBS -lproject"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008002 SP_MSG="yes"
8003fi
8004
8005
8006fi
8007
Greg Hartman9768ca42017-06-22 20:49:52 -07008008
8009# Check whether --with-solaris-privs was given.
8010if test "${with_solaris_privs+set}" = set; then :
8011 withval=$with_solaris_privs;
8012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/Illumos privilege support" >&5
8013$as_echo_n "checking for Solaris/Illumos privilege support... " >&6; }
8014 if test "x$ac_cv_func_setppriv" = "xyes" -a \
8015 "x$ac_cv_header_priv_h" = "xyes" ; then
8016 SOLARIS_PRIVS=yes
8017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
8018$as_echo "found" >&6; }
8019
8020$as_echo "#define NO_UID_RESTORATION_TEST 1" >>confdefs.h
8021
8022
8023$as_echo "#define USE_SOLARIS_PRIVS 1" >>confdefs.h
8024
8025 SPP_MSG="yes"
8026 else
8027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8028$as_echo "not found" >&6; }
8029 as_fn_error $? "*** must have support for Solaris privileges to use --with-solaris-privs" "$LINENO" 5
8030 fi
8031
8032fi
8033
Adam Langleyd0592972015-03-30 14:49:51 -07008034 TEST_SHELL=$SHELL # let configure find us a capable shell
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008035 ;;
8036*-*-sunos4*)
8037 CPPFLAGS="$CPPFLAGS -DSUNOS4"
Greg Hartman9768ca42017-06-22 20:49:52 -07008038 for ac_func in getpwanam
8039do :
8040 ac_fn_c_check_func "$LINENO" "getpwanam" "ac_cv_func_getpwanam"
8041if test "x$ac_cv_func_getpwanam" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008042 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008043#define HAVE_GETPWANAM 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008044_ACEOF
8045
8046fi
8047done
8048
Greg Hartman9768ca42017-06-22 20:49:52 -07008049 $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008050
8051 conf_utmp_location=/etc/utmp
8052 conf_wtmp_location=/var/adm/wtmp
8053 conf_lastlog_location=/var/adm/lastlog
Greg Hartman9768ca42017-06-22 20:49:52 -07008054 $as_echo "#define USE_PIPES 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008055
8056 ;;
8057*-ncr-sysv*)
8058 LIBS="$LIBS -lc89"
Greg Hartman9768ca42017-06-22 20:49:52 -07008059 $as_echo "#define USE_PIPES 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008060
Greg Hartman9768ca42017-06-22 20:49:52 -07008061 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008062
Greg Hartman9768ca42017-06-22 20:49:52 -07008063 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008064
Greg Hartman9768ca42017-06-22 20:49:52 -07008065 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008066
Greg Hartman9768ca42017-06-22 20:49:52 -07008067 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008068
8069 ;;
8070*-sni-sysv*)
8071 # /usr/ucblib MUST NOT be searched on ReliantUNIX
Greg Hartman9768ca42017-06-22 20:49:52 -07008072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
8073$as_echo_n "checking for dlsym in -ldl... " >&6; }
8074if ${ac_cv_lib_dl_dlsym+:} false; then :
8075 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008076else
8077 ac_check_lib_save_LIBS=$LIBS
8078LIBS="-ldl $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -07008079cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008080/* end confdefs.h. */
8081
8082/* Override any GCC internal prototype to avoid an error.
8083 Use char because int might match the return type of a GCC
8084 builtin and then its argument prototype would still apply. */
8085#ifdef __cplusplus
8086extern "C"
8087#endif
8088char dlsym ();
8089int
8090main ()
8091{
8092return dlsym ();
8093 ;
8094 return 0;
8095}
8096_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008097if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008098 ac_cv_lib_dl_dlsym=yes
8099else
Greg Hartman9768ca42017-06-22 20:49:52 -07008100 ac_cv_lib_dl_dlsym=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008101fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008102rm -f core conftest.err conftest.$ac_objext \
8103 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008104LIBS=$ac_check_lib_save_LIBS
8105fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
8107$as_echo "$ac_cv_lib_dl_dlsym" >&6; }
8108if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008109 cat >>confdefs.h <<_ACEOF
8110#define HAVE_LIBDL 1
8111_ACEOF
8112
8113 LIBS="-ldl $LIBS"
8114
8115fi
8116
8117 # -lresolv needs to be at the end of LIBS or DNS lookups break
Greg Hartman9768ca42017-06-22 20:49:52 -07008118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
8119$as_echo_n "checking for res_query in -lresolv... " >&6; }
8120if ${ac_cv_lib_resolv_res_query+:} false; then :
8121 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008122else
8123 ac_check_lib_save_LIBS=$LIBS
8124LIBS="-lresolv $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -07008125cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008126/* end confdefs.h. */
8127
8128/* Override any GCC internal prototype to avoid an error.
8129 Use char because int might match the return type of a GCC
8130 builtin and then its argument prototype would still apply. */
8131#ifdef __cplusplus
8132extern "C"
8133#endif
8134char res_query ();
8135int
8136main ()
8137{
8138return res_query ();
8139 ;
8140 return 0;
8141}
8142_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008143if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008144 ac_cv_lib_resolv_res_query=yes
8145else
Greg Hartman9768ca42017-06-22 20:49:52 -07008146 ac_cv_lib_resolv_res_query=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008147fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008148rm -f core conftest.err conftest.$ac_objext \
8149 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008150LIBS=$ac_check_lib_save_LIBS
8151fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_query" >&5
8153$as_echo "$ac_cv_lib_resolv_res_query" >&6; }
8154if test "x$ac_cv_lib_resolv_res_query" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008155 LIBS="$LIBS -lresolv"
8156fi
8157
8158 IPADDR_IN_DISPLAY=yes
Greg Hartman9768ca42017-06-22 20:49:52 -07008159 $as_echo "#define USE_PIPES 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008160
Greg Hartman9768ca42017-06-22 20:49:52 -07008161 $as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008162
Greg Hartman9768ca42017-06-22 20:49:52 -07008163 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008164
Greg Hartman9768ca42017-06-22 20:49:52 -07008165 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008166
Greg Hartman9768ca42017-06-22 20:49:52 -07008167 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008168
Greg Hartman9768ca42017-06-22 20:49:52 -07008169 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008170
8171 external_path_file=/etc/default/login
8172 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
8173 # Attention: always take care to bind libsocket and libnsl before libc,
8174 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
8175 ;;
8176# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel.
8177*-*-sysv4.2*)
Greg Hartman9768ca42017-06-22 20:49:52 -07008178 $as_echo "#define USE_PIPES 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008179
Greg Hartman9768ca42017-06-22 20:49:52 -07008180 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008181
Greg Hartman9768ca42017-06-22 20:49:52 -07008182 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008183
Greg Hartman9768ca42017-06-22 20:49:52 -07008184 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008185
8186
Greg Hartman9768ca42017-06-22 20:49:52 -07008187$as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008188
Greg Hartman9768ca42017-06-22 20:49:52 -07008189 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008190
Adam Langleyd0592972015-03-30 14:49:51 -07008191 TEST_SHELL=$SHELL # let configure find us a capable shell
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008192 ;;
8193# UnixWare 7.x, OpenUNIX 8
8194*-*-sysv5*)
8195 CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf"
8196
Greg Hartman9768ca42017-06-22 20:49:52 -07008197$as_echo "#define UNIXWARE_LONG_PASSWORDS 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008198
Greg Hartman9768ca42017-06-22 20:49:52 -07008199 $as_echo "#define USE_PIPES 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008200
Greg Hartman9768ca42017-06-22 20:49:52 -07008201 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008202
Greg Hartman9768ca42017-06-22 20:49:52 -07008203 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008204
Greg Hartman9768ca42017-06-22 20:49:52 -07008205 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008206
Greg Hartman9768ca42017-06-22 20:49:52 -07008207 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008208
Greg Hartman9768ca42017-06-22 20:49:52 -07008209 $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008210
Adam Langleyd0592972015-03-30 14:49:51 -07008211 TEST_SHELL=$SHELL # let configure find us a capable shell
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008212 case "$host" in
8213 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x
8214 maildir=/var/spool/mail
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008215
Greg Hartman9768ca42017-06-22 20:49:52 -07008216$as_echo "#define BROKEN_LIBIAF 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008217
Greg Hartman9768ca42017-06-22 20:49:52 -07008218 $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008219
Greg Hartman9768ca42017-06-22 20:49:52 -07008220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getluid in -lprot" >&5
8221$as_echo_n "checking for getluid in -lprot... " >&6; }
8222if ${ac_cv_lib_prot_getluid+:} false; then :
8223 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008224else
8225 ac_check_lib_save_LIBS=$LIBS
8226LIBS="-lprot $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -07008227cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008228/* end confdefs.h. */
8229
8230/* Override any GCC internal prototype to avoid an error.
8231 Use char because int might match the return type of a GCC
8232 builtin and then its argument prototype would still apply. */
8233#ifdef __cplusplus
8234extern "C"
8235#endif
8236char getluid ();
8237int
8238main ()
8239{
8240return getluid ();
8241 ;
8242 return 0;
8243}
8244_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008245if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008246 ac_cv_lib_prot_getluid=yes
8247else
Greg Hartman9768ca42017-06-22 20:49:52 -07008248 ac_cv_lib_prot_getluid=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008249fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008250rm -f core conftest.err conftest.$ac_objext \
8251 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008252LIBS=$ac_check_lib_save_LIBS
8253fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getluid" >&5
8255$as_echo "$ac_cv_lib_prot_getluid" >&6; }
8256if test "x$ac_cv_lib_prot_getluid" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008257 LIBS="$LIBS -lprot"
Greg Hartman9768ca42017-06-22 20:49:52 -07008258 for ac_func in getluid setluid
8259do :
8260 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8261ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8262if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008263 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008264#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008265_ACEOF
8266
8267fi
8268done
8269
Greg Hartman9768ca42017-06-22 20:49:52 -07008270 $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008271
Greg Hartman9768ca42017-06-22 20:49:52 -07008272 $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008273
8274
8275fi
8276
8277 ;;
Greg Hartman9768ca42017-06-22 20:49:52 -07008278 *) $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008279
8280 check_for_libcrypt_later=1
8281 ;;
8282 esac
8283 ;;
8284*-*-sysv*)
8285 ;;
8286# SCO UNIX and OEM versions of SCO UNIX
8287*-*-sco3.2v4*)
Greg Hartman9768ca42017-06-22 20:49:52 -07008288 as_fn_error $? "\"This Platform is no longer supported.\"" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008289 ;;
8290# SCO OpenServer 5.x
8291*-*-sco3.2v5*)
8292 if test -z "$GCC"; then
8293 CFLAGS="$CFLAGS -belf"
8294 fi
8295 LIBS="$LIBS -lprot -lx -ltinfo -lm"
8296 no_dev_ptmx=1
Greg Hartman9768ca42017-06-22 20:49:52 -07008297 $as_echo "#define USE_PIPES 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008298
Greg Hartman9768ca42017-06-22 20:49:52 -07008299 $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008300
Greg Hartman9768ca42017-06-22 20:49:52 -07008301 $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008302
Greg Hartman9768ca42017-06-22 20:49:52 -07008303 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008304
Greg Hartman9768ca42017-06-22 20:49:52 -07008305 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008306
Greg Hartman9768ca42017-06-22 20:49:52 -07008307 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008308
Greg Hartman9768ca42017-06-22 20:49:52 -07008309 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008310
Greg Hartman9768ca42017-06-22 20:49:52 -07008311 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008312
Greg Hartman9768ca42017-06-22 20:49:52 -07008313 $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008314
Greg Hartman9768ca42017-06-22 20:49:52 -07008315 $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008316
Greg Hartman9768ca42017-06-22 20:49:52 -07008317 $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008318
Greg Hartman9768ca42017-06-22 20:49:52 -07008319 for ac_func in getluid setluid
8320do :
8321 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8322ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8323if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008324 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008325#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008326_ACEOF
8327
8328fi
8329done
8330
8331 MANTYPE=man
Adam Langleyd0592972015-03-30 14:49:51 -07008332 TEST_SHELL=$SHELL # let configure find us a capable shell
8333 SKIP_DISABLE_LASTLOG_DEFINE=yes
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008334 ;;
8335*-*-unicosmk*)
8336
Greg Hartman9768ca42017-06-22 20:49:52 -07008337$as_echo "#define NO_SSH_LASTLOG 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008338
Greg Hartman9768ca42017-06-22 20:49:52 -07008339 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008340
Greg Hartman9768ca42017-06-22 20:49:52 -07008341 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008342
Greg Hartman9768ca42017-06-22 20:49:52 -07008343 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008344
Greg Hartman9768ca42017-06-22 20:49:52 -07008345 $as_echo "#define USE_PIPES 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008346
Greg Hartman9768ca42017-06-22 20:49:52 -07008347 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008348
8349 LDFLAGS="$LDFLAGS"
8350 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
8351 MANTYPE=cat
8352 ;;
8353*-*-unicosmp*)
Greg Hartman9768ca42017-06-22 20:49:52 -07008354 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008355
Greg Hartman9768ca42017-06-22 20:49:52 -07008356 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008357
Greg Hartman9768ca42017-06-22 20:49:52 -07008358 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008359
Greg Hartman9768ca42017-06-22 20:49:52 -07008360 $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008361
Greg Hartman9768ca42017-06-22 20:49:52 -07008362 $as_echo "#define USE_PIPES 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008363
Greg Hartman9768ca42017-06-22 20:49:52 -07008364 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008365
8366 LDFLAGS="$LDFLAGS"
8367 LIBS="$LIBS -lgen -lacid -ldb"
8368 MANTYPE=cat
8369 ;;
8370*-*-unicos*)
Greg Hartman9768ca42017-06-22 20:49:52 -07008371 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008372
Greg Hartman9768ca42017-06-22 20:49:52 -07008373 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008374
Greg Hartman9768ca42017-06-22 20:49:52 -07008375 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008376
Greg Hartman9768ca42017-06-22 20:49:52 -07008377 $as_echo "#define USE_PIPES 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008378
Greg Hartman9768ca42017-06-22 20:49:52 -07008379 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008380
Greg Hartman9768ca42017-06-22 20:49:52 -07008381 $as_echo "#define NO_SSH_LASTLOG 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008382
8383 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal"
8384 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
8385 MANTYPE=cat
8386 ;;
8387*-dec-osf*)
Greg Hartman9768ca42017-06-22 20:49:52 -07008388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Digital Unix SIA" >&5
8389$as_echo_n "checking for Digital Unix SIA... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008390 no_osfsia=""
8391
8392# Check whether --with-osfsia was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07008393if test "${with_osfsia+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008394 withval=$with_osfsia;
8395 if test "x$withval" = "xno" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -07008396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8397$as_echo "disabled" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008398 no_osfsia=1
8399 fi
8400
8401fi
8402
8403 if test -z "$no_osfsia" ; then
8404 if test -f /etc/sia/matrix.conf; then
Greg Hartman9768ca42017-06-22 20:49:52 -07008405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8406$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008407
Greg Hartman9768ca42017-06-22 20:49:52 -07008408$as_echo "#define HAVE_OSF_SIA 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008409
8410
Greg Hartman9768ca42017-06-22 20:49:52 -07008411$as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008412
Greg Hartman9768ca42017-06-22 20:49:52 -07008413 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008414
8415 LIBS="$LIBS -lsecurity -ldb -lm -laud"
8416 SIA_MSG="yes"
8417 else
Greg Hartman9768ca42017-06-22 20:49:52 -07008418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8419$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008420
Greg Hartman9768ca42017-06-22 20:49:52 -07008421$as_echo "#define LOCKED_PASSWD_SUBSTR \"Nologin\"" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008422
8423 fi
8424 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008425 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008426
Greg Hartman9768ca42017-06-22 20:49:52 -07008427 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008428
Greg Hartman9768ca42017-06-22 20:49:52 -07008429 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008430
Greg Hartman9768ca42017-06-22 20:49:52 -07008431 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008432
8433
Greg Hartman9768ca42017-06-22 20:49:52 -07008434$as_echo "#define BROKEN_READV_COMPARISON 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008435
8436 ;;
8437
8438*-*-nto-qnx*)
Greg Hartman9768ca42017-06-22 20:49:52 -07008439 $as_echo "#define USE_PIPES 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008440
Greg Hartman9768ca42017-06-22 20:49:52 -07008441 $as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -07008442
Greg Hartman9768ca42017-06-22 20:49:52 -07008443 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -07008444
Greg Hartman9768ca42017-06-22 20:49:52 -07008445 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008446
8447
Greg Hartman9768ca42017-06-22 20:49:52 -07008448$as_echo "#define BROKEN_SHADOW_EXPIRE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008449
8450 enable_etc_default_login=no # has incompatible /etc/default/login
8451 case "$host" in
8452 *-*-nto-qnx6*)
Greg Hartman9768ca42017-06-22 20:49:52 -07008453 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008454
8455 ;;
8456 esac
8457 ;;
8458
8459*-*-ultrix*)
8460
Greg Hartman9768ca42017-06-22 20:49:52 -07008461$as_echo "#define BROKEN_GETGROUPS 1" >>confdefs.h
8462
8463 $as_echo "#define NEED_SETPGRP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008464
8465
Greg Hartman9768ca42017-06-22 20:49:52 -07008466$as_echo "#define HAVE_SYS_SYSLOG_H 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008467
8468 ;;
8469
8470*-*-lynxos)
Greg Hartman9768ca42017-06-22 20:49:52 -07008471 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008472
Greg Hartman9768ca42017-06-22 20:49:52 -07008473$as_echo "#define BROKEN_SETVBUF 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008474
Greg Hartman9768ca42017-06-22 20:49:52 -07008475 ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008476esac
8477
Greg Hartman9768ca42017-06-22 20:49:52 -07008478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler and flags for sanity" >&5
8479$as_echo_n "checking compiler and flags for sanity... " >&6; }
8480if test "$cross_compiling" = yes; then :
8481 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking compiler sanity" >&5
8482$as_echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008483
8484else
Greg Hartman9768ca42017-06-22 20:49:52 -07008485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008486/* end confdefs.h. */
8487 #include <stdio.h>
8488int
8489main ()
8490{
8491 exit(0);
8492 ;
8493 return 0;
8494}
8495_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008496if ac_fn_c_try_run "$LINENO"; then :
8497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8498$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008499else
8500
Greg Hartman9768ca42017-06-22 20:49:52 -07008501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8502$as_echo "no" >&6; }
8503 as_fn_error $? "*** compiler cannot create working executables, check config.log ***" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008504
8505fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8507 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008508fi
8509
8510
8511# Checks for libraries.
Greg Hartman9768ca42017-06-22 20:49:52 -07008512ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt"
8513if test "x$ac_cv_func_setsockopt" = xyes; then :
8514
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008515else
Greg Hartman9768ca42017-06-22 20:49:52 -07008516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5
8517$as_echo_n "checking for setsockopt in -lsocket... " >&6; }
8518if ${ac_cv_lib_socket_setsockopt+:} false; then :
8519 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008520else
8521 ac_check_lib_save_LIBS=$LIBS
8522LIBS="-lsocket $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -07008523cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008524/* end confdefs.h. */
8525
8526/* Override any GCC internal prototype to avoid an error.
8527 Use char because int might match the return type of a GCC
8528 builtin and then its argument prototype would still apply. */
8529#ifdef __cplusplus
8530extern "C"
8531#endif
8532char setsockopt ();
8533int
8534main ()
8535{
8536return setsockopt ();
8537 ;
8538 return 0;
8539}
8540_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008541if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008542 ac_cv_lib_socket_setsockopt=yes
8543else
Greg Hartman9768ca42017-06-22 20:49:52 -07008544 ac_cv_lib_socket_setsockopt=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008545fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008546rm -f core conftest.err conftest.$ac_objext \
8547 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008548LIBS=$ac_check_lib_save_LIBS
8549fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008550{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5
8551$as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
8552if test "x$ac_cv_lib_socket_setsockopt" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008553 cat >>confdefs.h <<_ACEOF
8554#define HAVE_LIBSOCKET 1
8555_ACEOF
8556
8557 LIBS="-lsocket $LIBS"
8558
8559fi
8560
8561fi
8562
8563
8564for ac_func in dirname
Greg Hartman9768ca42017-06-22 20:49:52 -07008565do :
8566 ac_fn_c_check_func "$LINENO" "dirname" "ac_cv_func_dirname"
8567if test "x$ac_cv_func_dirname" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008568 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008569#define HAVE_DIRNAME 1
Adam Langleyd0592972015-03-30 14:49:51 -07008570_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008571 for ac_header in libgen.h
8572do :
8573 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
8574if test "x$ac_cv_header_libgen_h" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -07008575 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008576#define HAVE_LIBGEN_H 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008577_ACEOF
8578
8579fi
8580
8581done
8582
8583else
8584
Greg Hartman9768ca42017-06-22 20:49:52 -07008585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirname in -lgen" >&5
8586$as_echo_n "checking for dirname in -lgen... " >&6; }
8587if ${ac_cv_lib_gen_dirname+:} false; then :
8588 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008589else
8590 ac_check_lib_save_LIBS=$LIBS
8591LIBS="-lgen $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -07008592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008593/* end confdefs.h. */
8594
8595/* Override any GCC internal prototype to avoid an error.
8596 Use char because int might match the return type of a GCC
8597 builtin and then its argument prototype would still apply. */
8598#ifdef __cplusplus
8599extern "C"
8600#endif
8601char dirname ();
8602int
8603main ()
8604{
8605return dirname ();
8606 ;
8607 return 0;
8608}
8609_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008610if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008611 ac_cv_lib_gen_dirname=yes
8612else
Greg Hartman9768ca42017-06-22 20:49:52 -07008613 ac_cv_lib_gen_dirname=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008614fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008615rm -f core conftest.err conftest.$ac_objext \
8616 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008617LIBS=$ac_check_lib_save_LIBS
8618fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_dirname" >&5
8620$as_echo "$ac_cv_lib_gen_dirname" >&6; }
8621if test "x$ac_cv_lib_gen_dirname" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008622
Greg Hartman9768ca42017-06-22 20:49:52 -07008623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken dirname" >&5
8624$as_echo_n "checking for broken dirname... " >&6; }
8625if ${ac_cv_have_broken_dirname+:} false; then :
8626 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008627else
8628
8629 save_LIBS="$LIBS"
8630 LIBS="$LIBS -lgen"
Greg Hartman9768ca42017-06-22 20:49:52 -07008631 if test "$cross_compiling" = yes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008632 ac_cv_have_broken_dirname="no"
8633else
Greg Hartman9768ca42017-06-22 20:49:52 -07008634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008635/* end confdefs.h. */
8636
8637#include <libgen.h>
8638#include <string.h>
8639
8640int main(int argc, char **argv) {
8641 char *s, buf[32];
8642
8643 strncpy(buf,"/etc", 32);
8644 s = dirname(buf);
8645 if (!s || strncmp(s, "/", 32) != 0) {
8646 exit(1);
8647 } else {
8648 exit(0);
8649 }
8650}
8651
8652_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008653if ac_fn_c_try_run "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008654 ac_cv_have_broken_dirname="no"
8655else
Greg Hartman9768ca42017-06-22 20:49:52 -07008656 ac_cv_have_broken_dirname="yes"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008657fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008658rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8659 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008660fi
8661
8662 LIBS="$save_LIBS"
8663
8664fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_broken_dirname" >&5
8666$as_echo "$ac_cv_have_broken_dirname" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008667 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
8668 LIBS="$LIBS -lgen"
Greg Hartman9768ca42017-06-22 20:49:52 -07008669 $as_echo "#define HAVE_DIRNAME 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008670
Greg Hartman9768ca42017-06-22 20:49:52 -07008671 for ac_header in libgen.h
8672do :
8673 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
8674if test "x$ac_cv_header_libgen_h" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008675 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008676#define HAVE_LIBGEN_H 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008677_ACEOF
8678
8679fi
8680
8681done
8682
8683 fi
8684
8685fi
8686
8687
8688fi
8689done
8690
8691
Greg Hartman9768ca42017-06-22 20:49:52 -07008692ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
8693if test "x$ac_cv_func_getspnam" = xyes; then :
8694
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008695else
Greg Hartman9768ca42017-06-22 20:49:52 -07008696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
8697$as_echo_n "checking for getspnam in -lgen... " >&6; }
8698if ${ac_cv_lib_gen_getspnam+:} false; then :
8699 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008700else
8701 ac_check_lib_save_LIBS=$LIBS
8702LIBS="-lgen $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -07008703cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008704/* end confdefs.h. */
8705
8706/* Override any GCC internal prototype to avoid an error.
8707 Use char because int might match the return type of a GCC
8708 builtin and then its argument prototype would still apply. */
8709#ifdef __cplusplus
8710extern "C"
8711#endif
8712char getspnam ();
8713int
8714main ()
8715{
8716return getspnam ();
8717 ;
8718 return 0;
8719}
8720_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008721if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008722 ac_cv_lib_gen_getspnam=yes
8723else
Greg Hartman9768ca42017-06-22 20:49:52 -07008724 ac_cv_lib_gen_getspnam=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008725fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008726rm -f core conftest.err conftest.$ac_objext \
8727 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008728LIBS=$ac_check_lib_save_LIBS
8729fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
8731$as_echo "$ac_cv_lib_gen_getspnam" >&6; }
8732if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008733 LIBS="$LIBS -lgen"
8734fi
8735
8736fi
8737
Greg Hartman9768ca42017-06-22 20:49:52 -07008738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing basename" >&5
8739$as_echo_n "checking for library containing basename... " >&6; }
8740if ${ac_cv_search_basename+:} false; then :
8741 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008742else
8743 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -07008744cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008745/* end confdefs.h. */
8746
8747/* Override any GCC internal prototype to avoid an error.
8748 Use char because int might match the return type of a GCC
8749 builtin and then its argument prototype would still apply. */
8750#ifdef __cplusplus
8751extern "C"
8752#endif
8753char basename ();
8754int
8755main ()
8756{
8757return basename ();
8758 ;
8759 return 0;
8760}
8761_ACEOF
8762for ac_lib in '' gen; do
8763 if test -z "$ac_lib"; then
8764 ac_res="none required"
8765 else
8766 ac_res=-l$ac_lib
8767 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8768 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008769 if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008770 ac_cv_search_basename=$ac_res
8771fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008772rm -f core conftest.err conftest.$ac_objext \
8773 conftest$ac_exeext
8774 if ${ac_cv_search_basename+:} false; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008775 break
8776fi
8777done
Greg Hartman9768ca42017-06-22 20:49:52 -07008778if ${ac_cv_search_basename+:} false; then :
8779
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008780else
8781 ac_cv_search_basename=no
8782fi
8783rm conftest.$ac_ext
8784LIBS=$ac_func_search_save_LIBS
8785fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008786{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_basename" >&5
8787$as_echo "$ac_cv_search_basename" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008788ac_res=$ac_cv_search_basename
Greg Hartman9768ca42017-06-22 20:49:52 -07008789if test "$ac_res" != no; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008790 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8791
Greg Hartman9768ca42017-06-22 20:49:52 -07008792$as_echo "#define HAVE_BASENAME 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008793
8794fi
8795
8796
8797
8798# Check whether --with-zlib was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07008799if test "${with_zlib+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008800 withval=$with_zlib; if test "x$withval" = "xno" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -07008801 as_fn_error $? "*** zlib is required ***" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008802 elif test "x$withval" != "xyes"; then
8803 if test -d "$withval/lib"; then
8804 if test -n "${need_dash_r}"; then
8805 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
8806 else
8807 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
8808 fi
8809 else
8810 if test -n "${need_dash_r}"; then
8811 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
8812 else
8813 LDFLAGS="-L${withval} ${LDFLAGS}"
8814 fi
8815 fi
8816 if test -d "$withval/include"; then
8817 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
8818 else
8819 CPPFLAGS="-I${withval} ${CPPFLAGS}"
8820 fi
8821 fi
8822
8823fi
8824
8825
Greg Hartman9768ca42017-06-22 20:49:52 -07008826ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
8827if test "x$ac_cv_header_zlib_h" = xyes; then :
8828
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008829else
Greg Hartman9768ca42017-06-22 20:49:52 -07008830 as_fn_error $? "*** zlib.h missing - please install first or check config.log ***" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008831fi
8832
8833
Greg Hartman9768ca42017-06-22 20:49:52 -07008834{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
8835$as_echo_n "checking for deflate in -lz... " >&6; }
8836if ${ac_cv_lib_z_deflate+:} false; then :
8837 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008838else
8839 ac_check_lib_save_LIBS=$LIBS
8840LIBS="-lz $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -07008841cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008842/* end confdefs.h. */
8843
8844/* Override any GCC internal prototype to avoid an error.
8845 Use char because int might match the return type of a GCC
8846 builtin and then its argument prototype would still apply. */
8847#ifdef __cplusplus
8848extern "C"
8849#endif
8850char deflate ();
8851int
8852main ()
8853{
8854return deflate ();
8855 ;
8856 return 0;
8857}
8858_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008859if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008860 ac_cv_lib_z_deflate=yes
8861else
Greg Hartman9768ca42017-06-22 20:49:52 -07008862 ac_cv_lib_z_deflate=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008863fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008864rm -f core conftest.err conftest.$ac_objext \
8865 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008866LIBS=$ac_check_lib_save_LIBS
8867fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
8869$as_echo "$ac_cv_lib_z_deflate" >&6; }
8870if test "x$ac_cv_lib_z_deflate" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008871 cat >>confdefs.h <<_ACEOF
8872#define HAVE_LIBZ 1
8873_ACEOF
8874
8875 LIBS="-lz $LIBS"
8876
8877else
8878
8879 saved_CPPFLAGS="$CPPFLAGS"
8880 saved_LDFLAGS="$LDFLAGS"
8881 save_LIBS="$LIBS"
8882 if test -n "${need_dash_r}"; then
8883 LDFLAGS="-L/usr/local/lib -R/usr/local/lib ${saved_LDFLAGS}"
8884 else
8885 LDFLAGS="-L/usr/local/lib ${saved_LDFLAGS}"
8886 fi
8887 CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}"
8888 LIBS="$LIBS -lz"
Greg Hartman9768ca42017-06-22 20:49:52 -07008889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008890/* end confdefs.h. */
8891
8892/* Override any GCC internal prototype to avoid an error.
8893 Use char because int might match the return type of a GCC
8894 builtin and then its argument prototype would still apply. */
8895#ifdef __cplusplus
8896extern "C"
8897#endif
8898char deflate ();
8899int
8900main ()
8901{
8902return deflate ();
8903 ;
8904 return 0;
8905}
8906_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008907if ac_fn_c_try_link "$LINENO"; then :
8908 $as_echo "#define HAVE_LIBZ 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008909
8910else
8911
Greg Hartman9768ca42017-06-22 20:49:52 -07008912 as_fn_error $? "*** zlib missing - please install first or check config.log ***" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008913
8914
8915fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008916rm -f core conftest.err conftest.$ac_objext \
8917 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008918
8919
8920fi
8921
8922
8923
8924# Check whether --with-zlib-version-check was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07008925if test "${with_zlib_version_check+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008926 withval=$with_zlib_version_check; if test "x$withval" = "xno" ; then
8927 zlib_check_nonfatal=1
8928 fi
8929
8930
8931fi
8932
8933
Greg Hartman9768ca42017-06-22 20:49:52 -07008934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for possibly buggy zlib" >&5
8935$as_echo_n "checking for possibly buggy zlib... " >&6; }
8936if test "$cross_compiling" = yes; then :
8937 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking zlib version" >&5
8938$as_echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008939
8940else
Greg Hartman9768ca42017-06-22 20:49:52 -07008941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008942/* end confdefs.h. */
8943
8944#include <stdio.h>
Adam Langleyd0592972015-03-30 14:49:51 -07008945#include <stdlib.h>
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008946#include <zlib.h>
8947
8948int
8949main ()
8950{
8951
8952 int a=0, b=0, c=0, d=0, n, v;
8953 n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
8954 if (n != 3 && n != 4)
8955 exit(1);
8956 v = a*1000000 + b*10000 + c*100 + d;
8957 fprintf(stderr, "found zlib version %s (%d)\n", ZLIB_VERSION, v);
8958
8959 /* 1.1.4 is OK */
8960 if (a == 1 && b == 1 && c >= 4)
8961 exit(0);
8962
8963 /* 1.2.3 and up are OK */
8964 if (v >= 1020300)
8965 exit(0);
8966
8967 exit(2);
8968
8969 ;
8970 return 0;
8971}
8972_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07008973if ac_fn_c_try_run "$LINENO"; then :
8974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8975$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008976else
Greg Hartman9768ca42017-06-22 20:49:52 -07008977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8978$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008979 if test -z "$zlib_check_nonfatal" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -07008980 as_fn_error $? "*** zlib too old - check config.log ***
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008981Your reported zlib version has known security problems. It's possible your
8982vendor has fixed these problems without changing the version number. If you
8983are sure this is the case, you can disable the check by running
8984\"./configure --without-zlib-version-check\".
8985If you are in doubt, upgrade zlib to version 1.2.3 or greater.
Greg Hartman9768ca42017-06-22 20:49:52 -07008986See http://www.gzip.org/zlib/ for details." "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008987 else
Greg Hartman9768ca42017-06-22 20:49:52 -07008988 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib version may have security problems" >&5
8989$as_echo "$as_me: WARNING: zlib version may have security problems" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008990 fi
8991
8992fi
Greg Hartman9768ca42017-06-22 20:49:52 -07008993rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8994 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08008995fi
8996
8997
Greg Hartman9768ca42017-06-22 20:49:52 -07008998ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
8999if test "x$ac_cv_func_strcasecmp" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009000
9001else
Greg Hartman9768ca42017-06-22 20:49:52 -07009002 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp in -lresolv" >&5
9003$as_echo_n "checking for strcasecmp in -lresolv... " >&6; }
9004if ${ac_cv_lib_resolv_strcasecmp+:} false; then :
9005 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009006else
9007 ac_check_lib_save_LIBS=$LIBS
9008LIBS="-lresolv $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -07009009cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009010/* end confdefs.h. */
9011
9012/* Override any GCC internal prototype to avoid an error.
9013 Use char because int might match the return type of a GCC
9014 builtin and then its argument prototype would still apply. */
9015#ifdef __cplusplus
9016extern "C"
9017#endif
9018char strcasecmp ();
9019int
9020main ()
9021{
9022return strcasecmp ();
9023 ;
9024 return 0;
9025}
9026_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07009027if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009028 ac_cv_lib_resolv_strcasecmp=yes
9029else
Greg Hartman9768ca42017-06-22 20:49:52 -07009030 ac_cv_lib_resolv_strcasecmp=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009031fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009032rm -f core conftest.err conftest.$ac_objext \
9033 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009034LIBS=$ac_check_lib_save_LIBS
9035fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_strcasecmp" >&5
9037$as_echo "$ac_cv_lib_resolv_strcasecmp" >&6; }
9038if test "x$ac_cv_lib_resolv_strcasecmp" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009039 LIBS="$LIBS -lresolv"
9040fi
9041
9042
9043fi
9044
9045for ac_func in utimes
Greg Hartman9768ca42017-06-22 20:49:52 -07009046do :
9047 ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
9048if test "x$ac_cv_func_utimes" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009049 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07009050#define HAVE_UTIMES 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009051_ACEOF
9052
9053else
Greg Hartman9768ca42017-06-22 20:49:52 -07009054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimes in -lc89" >&5
9055$as_echo_n "checking for utimes in -lc89... " >&6; }
9056if ${ac_cv_lib_c89_utimes+:} false; then :
9057 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009058else
9059 ac_check_lib_save_LIBS=$LIBS
9060LIBS="-lc89 $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -07009061cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009062/* end confdefs.h. */
9063
9064/* Override any GCC internal prototype to avoid an error.
9065 Use char because int might match the return type of a GCC
9066 builtin and then its argument prototype would still apply. */
9067#ifdef __cplusplus
9068extern "C"
9069#endif
9070char utimes ();
9071int
9072main ()
9073{
9074return utimes ();
9075 ;
9076 return 0;
9077}
9078_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07009079if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009080 ac_cv_lib_c89_utimes=yes
9081else
Greg Hartman9768ca42017-06-22 20:49:52 -07009082 ac_cv_lib_c89_utimes=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009083fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009084rm -f core conftest.err conftest.$ac_objext \
9085 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009086LIBS=$ac_check_lib_save_LIBS
9087fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c89_utimes" >&5
9089$as_echo "$ac_cv_lib_c89_utimes" >&6; }
9090if test "x$ac_cv_lib_c89_utimes" = xyes; then :
9091 $as_echo "#define HAVE_UTIMES 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009092
9093 LIBS="$LIBS -lc89"
9094fi
9095
9096
9097fi
9098done
9099
9100
Adam Langleyd0592972015-03-30 14:49:51 -07009101for ac_header in bsd/libutil.h libutil.h
Greg Hartman9768ca42017-06-22 20:49:52 -07009102do :
9103 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9104ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9105if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009106 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07009107#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009108_ACEOF
9109
9110fi
9111
9112done
9113
Greg Hartman9768ca42017-06-22 20:49:52 -07009114{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fmt_scaled" >&5
9115$as_echo_n "checking for library containing fmt_scaled... " >&6; }
9116if ${ac_cv_search_fmt_scaled+:} false; then :
9117 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009118else
9119 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -07009120cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07009121/* end confdefs.h. */
9122
9123/* Override any GCC internal prototype to avoid an error.
9124 Use char because int might match the return type of a GCC
9125 builtin and then its argument prototype would still apply. */
9126#ifdef __cplusplus
9127extern "C"
9128#endif
9129char fmt_scaled ();
9130int
9131main ()
9132{
9133return fmt_scaled ();
9134 ;
9135 return 0;
9136}
9137_ACEOF
9138for ac_lib in '' util bsd; do
9139 if test -z "$ac_lib"; then
9140 ac_res="none required"
9141 else
9142 ac_res=-l$ac_lib
9143 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9144 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009145 if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009146 ac_cv_search_fmt_scaled=$ac_res
Adam Langleyd0592972015-03-30 14:49:51 -07009147fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009148rm -f core conftest.err conftest.$ac_objext \
9149 conftest$ac_exeext
9150 if ${ac_cv_search_fmt_scaled+:} false; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009151 break
9152fi
9153done
Greg Hartman9768ca42017-06-22 20:49:52 -07009154if ${ac_cv_search_fmt_scaled+:} false; then :
9155
Adam Langleyd0592972015-03-30 14:49:51 -07009156else
9157 ac_cv_search_fmt_scaled=no
9158fi
9159rm conftest.$ac_ext
9160LIBS=$ac_func_search_save_LIBS
9161fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009162{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fmt_scaled" >&5
9163$as_echo "$ac_cv_search_fmt_scaled" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07009164ac_res=$ac_cv_search_fmt_scaled
Greg Hartman9768ca42017-06-22 20:49:52 -07009165if test "$ac_res" != no; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009166 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9167
9168fi
9169
Greg Hartman9768ca42017-06-22 20:49:52 -07009170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing scan_scaled" >&5
9171$as_echo_n "checking for library containing scan_scaled... " >&6; }
9172if ${ac_cv_search_scan_scaled+:} false; then :
9173 $as_echo_n "(cached) " >&6
Adam Langleyd0592972015-03-30 14:49:51 -07009174else
9175 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -07009176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07009177/* end confdefs.h. */
9178
9179/* Override any GCC internal prototype to avoid an error.
9180 Use char because int might match the return type of a GCC
9181 builtin and then its argument prototype would still apply. */
9182#ifdef __cplusplus
9183extern "C"
9184#endif
9185char scan_scaled ();
9186int
9187main ()
9188{
9189return scan_scaled ();
9190 ;
9191 return 0;
9192}
9193_ACEOF
9194for ac_lib in '' util bsd; do
9195 if test -z "$ac_lib"; then
9196 ac_res="none required"
9197 else
9198 ac_res=-l$ac_lib
9199 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9200 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009201 if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009202 ac_cv_search_scan_scaled=$ac_res
Adam Langleyd0592972015-03-30 14:49:51 -07009203fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009204rm -f core conftest.err conftest.$ac_objext \
9205 conftest$ac_exeext
9206 if ${ac_cv_search_scan_scaled+:} false; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009207 break
9208fi
9209done
Greg Hartman9768ca42017-06-22 20:49:52 -07009210if ${ac_cv_search_scan_scaled+:} false; then :
9211
Adam Langleyd0592972015-03-30 14:49:51 -07009212else
9213 ac_cv_search_scan_scaled=no
9214fi
9215rm conftest.$ac_ext
9216LIBS=$ac_func_search_save_LIBS
9217fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_scan_scaled" >&5
9219$as_echo "$ac_cv_search_scan_scaled" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07009220ac_res=$ac_cv_search_scan_scaled
Greg Hartman9768ca42017-06-22 20:49:52 -07009221if test "$ac_res" != no; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009222 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9223
9224fi
9225
Greg Hartman9768ca42017-06-22 20:49:52 -07009226{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing login" >&5
9227$as_echo_n "checking for library containing login... " >&6; }
9228if ${ac_cv_search_login+:} false; then :
9229 $as_echo_n "(cached) " >&6
Adam Langleyd0592972015-03-30 14:49:51 -07009230else
9231 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -07009232cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009233/* end confdefs.h. */
9234
9235/* Override any GCC internal prototype to avoid an error.
9236 Use char because int might match the return type of a GCC
9237 builtin and then its argument prototype would still apply. */
9238#ifdef __cplusplus
9239extern "C"
9240#endif
9241char login ();
9242int
9243main ()
9244{
9245return login ();
9246 ;
9247 return 0;
9248}
9249_ACEOF
9250for ac_lib in '' util bsd; do
9251 if test -z "$ac_lib"; then
9252 ac_res="none required"
9253 else
9254 ac_res=-l$ac_lib
9255 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9256 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009257 if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009258 ac_cv_search_login=$ac_res
9259fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009260rm -f core conftest.err conftest.$ac_objext \
9261 conftest$ac_exeext
9262 if ${ac_cv_search_login+:} false; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009263 break
9264fi
9265done
Greg Hartman9768ca42017-06-22 20:49:52 -07009266if ${ac_cv_search_login+:} false; then :
9267
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009268else
9269 ac_cv_search_login=no
9270fi
9271rm conftest.$ac_ext
9272LIBS=$ac_func_search_save_LIBS
9273fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009274{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_login" >&5
9275$as_echo "$ac_cv_search_login" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009276ac_res=$ac_cv_search_login
Greg Hartman9768ca42017-06-22 20:49:52 -07009277if test "$ac_res" != no; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009278 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9279
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009280fi
9281
Greg Hartman9768ca42017-06-22 20:49:52 -07009282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing logout" >&5
9283$as_echo_n "checking for library containing logout... " >&6; }
9284if ${ac_cv_search_logout+:} false; then :
9285 $as_echo_n "(cached) " >&6
Adam Langleyd0592972015-03-30 14:49:51 -07009286else
9287 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -07009288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07009289/* end confdefs.h. */
9290
9291/* Override any GCC internal prototype to avoid an error.
9292 Use char because int might match the return type of a GCC
9293 builtin and then its argument prototype would still apply. */
9294#ifdef __cplusplus
9295extern "C"
9296#endif
9297char logout ();
9298int
9299main ()
9300{
9301return logout ();
9302 ;
9303 return 0;
9304}
9305_ACEOF
9306for ac_lib in '' util bsd; do
9307 if test -z "$ac_lib"; then
9308 ac_res="none required"
9309 else
9310 ac_res=-l$ac_lib
9311 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9312 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009313 if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009314 ac_cv_search_logout=$ac_res
Adam Langleyd0592972015-03-30 14:49:51 -07009315fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009316rm -f core conftest.err conftest.$ac_objext \
9317 conftest$ac_exeext
9318 if ${ac_cv_search_logout+:} false; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009319 break
9320fi
9321done
Greg Hartman9768ca42017-06-22 20:49:52 -07009322if ${ac_cv_search_logout+:} false; then :
9323
Adam Langleyd0592972015-03-30 14:49:51 -07009324else
9325 ac_cv_search_logout=no
9326fi
9327rm conftest.$ac_ext
9328LIBS=$ac_func_search_save_LIBS
9329fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009330{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_logout" >&5
9331$as_echo "$ac_cv_search_logout" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07009332ac_res=$ac_cv_search_logout
Greg Hartman9768ca42017-06-22 20:49:52 -07009333if test "$ac_res" != no; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009334 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9335
9336fi
9337
Greg Hartman9768ca42017-06-22 20:49:52 -07009338{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing logwtmp" >&5
9339$as_echo_n "checking for library containing logwtmp... " >&6; }
9340if ${ac_cv_search_logwtmp+:} false; then :
9341 $as_echo_n "(cached) " >&6
Adam Langleyd0592972015-03-30 14:49:51 -07009342else
9343 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -07009344cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07009345/* end confdefs.h. */
9346
9347/* Override any GCC internal prototype to avoid an error.
9348 Use char because int might match the return type of a GCC
9349 builtin and then its argument prototype would still apply. */
9350#ifdef __cplusplus
9351extern "C"
9352#endif
9353char logwtmp ();
9354int
9355main ()
9356{
9357return logwtmp ();
9358 ;
9359 return 0;
9360}
9361_ACEOF
9362for ac_lib in '' util bsd; do
9363 if test -z "$ac_lib"; then
9364 ac_res="none required"
9365 else
9366 ac_res=-l$ac_lib
9367 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9368 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009369 if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009370 ac_cv_search_logwtmp=$ac_res
Adam Langleyd0592972015-03-30 14:49:51 -07009371fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009372rm -f core conftest.err conftest.$ac_objext \
9373 conftest$ac_exeext
9374 if ${ac_cv_search_logwtmp+:} false; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009375 break
9376fi
9377done
Greg Hartman9768ca42017-06-22 20:49:52 -07009378if ${ac_cv_search_logwtmp+:} false; then :
9379
Adam Langleyd0592972015-03-30 14:49:51 -07009380else
9381 ac_cv_search_logwtmp=no
9382fi
9383rm conftest.$ac_ext
9384LIBS=$ac_func_search_save_LIBS
9385fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009386{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_logwtmp" >&5
9387$as_echo "$ac_cv_search_logwtmp" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07009388ac_res=$ac_cv_search_logwtmp
Greg Hartman9768ca42017-06-22 20:49:52 -07009389if test "$ac_res" != no; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009390 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9391
9392fi
9393
Greg Hartman9768ca42017-06-22 20:49:52 -07009394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openpty" >&5
9395$as_echo_n "checking for library containing openpty... " >&6; }
9396if ${ac_cv_search_openpty+:} false; then :
9397 $as_echo_n "(cached) " >&6
Adam Langleyd0592972015-03-30 14:49:51 -07009398else
9399 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -07009400cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07009401/* end confdefs.h. */
9402
9403/* Override any GCC internal prototype to avoid an error.
9404 Use char because int might match the return type of a GCC
9405 builtin and then its argument prototype would still apply. */
9406#ifdef __cplusplus
9407extern "C"
9408#endif
9409char openpty ();
9410int
9411main ()
9412{
9413return openpty ();
9414 ;
9415 return 0;
9416}
9417_ACEOF
9418for ac_lib in '' util bsd; do
9419 if test -z "$ac_lib"; then
9420 ac_res="none required"
9421 else
9422 ac_res=-l$ac_lib
9423 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9424 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009425 if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009426 ac_cv_search_openpty=$ac_res
Adam Langleyd0592972015-03-30 14:49:51 -07009427fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009428rm -f core conftest.err conftest.$ac_objext \
9429 conftest$ac_exeext
9430 if ${ac_cv_search_openpty+:} false; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009431 break
9432fi
9433done
Greg Hartman9768ca42017-06-22 20:49:52 -07009434if ${ac_cv_search_openpty+:} false; then :
9435
Adam Langleyd0592972015-03-30 14:49:51 -07009436else
9437 ac_cv_search_openpty=no
9438fi
9439rm conftest.$ac_ext
9440LIBS=$ac_func_search_save_LIBS
9441fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openpty" >&5
9443$as_echo "$ac_cv_search_openpty" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07009444ac_res=$ac_cv_search_openpty
Greg Hartman9768ca42017-06-22 20:49:52 -07009445if test "$ac_res" != no; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009446 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9447
9448fi
9449
Greg Hartman9768ca42017-06-22 20:49:52 -07009450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing updwtmp" >&5
9451$as_echo_n "checking for library containing updwtmp... " >&6; }
9452if ${ac_cv_search_updwtmp+:} false; then :
9453 $as_echo_n "(cached) " >&6
Adam Langleyd0592972015-03-30 14:49:51 -07009454else
9455 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -07009456cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07009457/* end confdefs.h. */
9458
9459/* Override any GCC internal prototype to avoid an error.
9460 Use char because int might match the return type of a GCC
9461 builtin and then its argument prototype would still apply. */
9462#ifdef __cplusplus
9463extern "C"
9464#endif
9465char updwtmp ();
9466int
9467main ()
9468{
9469return updwtmp ();
9470 ;
9471 return 0;
9472}
9473_ACEOF
9474for ac_lib in '' util bsd; do
9475 if test -z "$ac_lib"; then
9476 ac_res="none required"
9477 else
9478 ac_res=-l$ac_lib
9479 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9480 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009481 if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009482 ac_cv_search_updwtmp=$ac_res
Adam Langleyd0592972015-03-30 14:49:51 -07009483fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009484rm -f core conftest.err conftest.$ac_objext \
9485 conftest$ac_exeext
9486 if ${ac_cv_search_updwtmp+:} false; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009487 break
9488fi
9489done
Greg Hartman9768ca42017-06-22 20:49:52 -07009490if ${ac_cv_search_updwtmp+:} false; then :
9491
Adam Langleyd0592972015-03-30 14:49:51 -07009492else
9493 ac_cv_search_updwtmp=no
9494fi
9495rm conftest.$ac_ext
9496LIBS=$ac_func_search_save_LIBS
9497fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_updwtmp" >&5
9499$as_echo "$ac_cv_search_updwtmp" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07009500ac_res=$ac_cv_search_updwtmp
Greg Hartman9768ca42017-06-22 20:49:52 -07009501if test "$ac_res" != no; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009502 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9503
9504fi
9505
Adam Langleyd0592972015-03-30 14:49:51 -07009506for ac_func in fmt_scaled scan_scaled login logout openpty updwtmp logwtmp
Greg Hartman9768ca42017-06-22 20:49:52 -07009507do :
9508 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9509ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9510if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009511 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07009512#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009513_ACEOF
9514
9515fi
9516done
9517
9518
Greg Hartman9768ca42017-06-22 20:49:52 -07009519# On some platforms, inet_ntop and gethostbyname may be found in libresolv
9520# or libnsl.
9521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
9522$as_echo_n "checking for library containing inet_ntop... " >&6; }
9523if ${ac_cv_search_inet_ntop+:} false; then :
9524 $as_echo_n "(cached) " >&6
Adam Langleyd0592972015-03-30 14:49:51 -07009525else
9526 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -07009527cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07009528/* end confdefs.h. */
9529
9530/* Override any GCC internal prototype to avoid an error.
9531 Use char because int might match the return type of a GCC
9532 builtin and then its argument prototype would still apply. */
9533#ifdef __cplusplus
9534extern "C"
9535#endif
9536char inet_ntop ();
9537int
9538main ()
9539{
9540return inet_ntop ();
9541 ;
9542 return 0;
9543}
9544_ACEOF
9545for ac_lib in '' resolv nsl; do
9546 if test -z "$ac_lib"; then
9547 ac_res="none required"
9548 else
9549 ac_res=-l$ac_lib
9550 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9551 fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009552 if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009553 ac_cv_search_inet_ntop=$ac_res
Adam Langleyd0592972015-03-30 14:49:51 -07009554fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009555rm -f core conftest.err conftest.$ac_objext \
9556 conftest$ac_exeext
9557 if ${ac_cv_search_inet_ntop+:} false; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009558 break
9559fi
9560done
Greg Hartman9768ca42017-06-22 20:49:52 -07009561if ${ac_cv_search_inet_ntop+:} false; then :
9562
Adam Langleyd0592972015-03-30 14:49:51 -07009563else
9564 ac_cv_search_inet_ntop=no
9565fi
9566rm conftest.$ac_ext
9567LIBS=$ac_func_search_save_LIBS
9568fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009569{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
9570$as_echo "$ac_cv_search_inet_ntop" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -07009571ac_res=$ac_cv_search_inet_ntop
Greg Hartman9768ca42017-06-22 20:49:52 -07009572if test "$ac_res" != no; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009573 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9574
9575fi
9576
Greg Hartman9768ca42017-06-22 20:49:52 -07009577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
9578$as_echo_n "checking for library containing gethostbyname... " >&6; }
9579if ${ac_cv_search_gethostbyname+:} false; then :
9580 $as_echo_n "(cached) " >&6
Adam Langleyd0592972015-03-30 14:49:51 -07009581else
Greg Hartman9768ca42017-06-22 20:49:52 -07009582 ac_func_search_save_LIBS=$LIBS
9583cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -07009584/* end confdefs.h. */
Adam Langleyd0592972015-03-30 14:49:51 -07009585
9586/* Override any GCC internal prototype to avoid an error.
9587 Use char because int might match the return type of a GCC
9588 builtin and then its argument prototype would still apply. */
9589#ifdef __cplusplus
9590extern "C"
9591#endif
Greg Hartman9768ca42017-06-22 20:49:52 -07009592char gethostbyname ();
Adam Langleyd0592972015-03-30 14:49:51 -07009593int
9594main ()
9595{
Greg Hartman9768ca42017-06-22 20:49:52 -07009596return gethostbyname ();
Adam Langleyd0592972015-03-30 14:49:51 -07009597 ;
9598 return 0;
9599}
9600_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07009601for ac_lib in '' resolv nsl; do
9602 if test -z "$ac_lib"; then
9603 ac_res="none required"
9604 else
9605 ac_res=-l$ac_lib
9606 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9607 fi
9608 if ac_fn_c_try_link "$LINENO"; then :
9609 ac_cv_search_gethostbyname=$ac_res
9610fi
9611rm -f core conftest.err conftest.$ac_objext \
9612 conftest$ac_exeext
9613 if ${ac_cv_search_gethostbyname+:} false; then :
9614 break
9615fi
9616done
9617if ${ac_cv_search_gethostbyname+:} false; then :
9618
Adam Langleyd0592972015-03-30 14:49:51 -07009619else
Greg Hartman9768ca42017-06-22 20:49:52 -07009620 ac_cv_search_gethostbyname=no
9621fi
9622rm conftest.$ac_ext
9623LIBS=$ac_func_search_save_LIBS
9624fi
9625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
9626$as_echo "$ac_cv_search_gethostbyname" >&6; }
9627ac_res=$ac_cv_search_gethostbyname
9628if test "$ac_res" != no; then :
9629 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
Adam Langleyd0592972015-03-30 14:49:51 -07009630
Adam Langleyd0592972015-03-30 14:49:51 -07009631fi
9632
Greg Hartman9768ca42017-06-22 20:49:52 -07009633
9634for ac_func in strftime
9635do :
9636 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
9637if test "x$ac_cv_func_strftime" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009638 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07009639#define HAVE_STRFTIME 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009640_ACEOF
9641
9642else
9643 # strftime is in -lintl on SCO UNIX.
Greg Hartman9768ca42017-06-22 20:49:52 -07009644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
9645$as_echo_n "checking for strftime in -lintl... " >&6; }
9646if ${ac_cv_lib_intl_strftime+:} false; then :
9647 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009648else
9649 ac_check_lib_save_LIBS=$LIBS
9650LIBS="-lintl $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -07009651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009652/* end confdefs.h. */
9653
9654/* Override any GCC internal prototype to avoid an error.
9655 Use char because int might match the return type of a GCC
9656 builtin and then its argument prototype would still apply. */
9657#ifdef __cplusplus
9658extern "C"
9659#endif
9660char strftime ();
9661int
9662main ()
9663{
9664return strftime ();
9665 ;
9666 return 0;
9667}
9668_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07009669if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009670 ac_cv_lib_intl_strftime=yes
9671else
Greg Hartman9768ca42017-06-22 20:49:52 -07009672 ac_cv_lib_intl_strftime=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009673fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009674rm -f core conftest.err conftest.$ac_objext \
9675 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009676LIBS=$ac_check_lib_save_LIBS
9677fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
9679$as_echo "$ac_cv_lib_intl_strftime" >&6; }
9680if test "x$ac_cv_lib_intl_strftime" = xyes; then :
9681 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009682
9683LIBS="-lintl $LIBS"
9684fi
9685
9686fi
9687done
9688
9689
9690# Check for ALTDIRFUNC glob() extension
Greg Hartman9768ca42017-06-22 20:49:52 -07009691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_ALTDIRFUNC support" >&5
9692$as_echo_n "checking for GLOB_ALTDIRFUNC support... " >&6; }
9693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009694/* end confdefs.h. */
9695
9696 #include <glob.h>
9697 #ifdef GLOB_ALTDIRFUNC
9698 FOUNDIT
9699 #endif
9700
9701_ACEOF
9702if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -07009703 $EGREP "FOUNDIT" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009704
9705
Greg Hartman9768ca42017-06-22 20:49:52 -07009706$as_echo "#define GLOB_HAS_ALTDIRFUNC 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009707
Greg Hartman9768ca42017-06-22 20:49:52 -07009708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9709$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009710
9711else
9712
Greg Hartman9768ca42017-06-22 20:49:52 -07009713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9714$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009715
9716
9717fi
9718rm -f conftest*
9719
9720
9721# Check for g.gl_matchc glob() extension
Greg Hartman9768ca42017-06-22 20:49:52 -07009722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_matchc field in glob_t" >&5
9723$as_echo_n "checking for gl_matchc field in glob_t... " >&6; }
9724cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009725/* end confdefs.h. */
9726 #include <glob.h>
9727int
9728main ()
9729{
9730 glob_t g; g.gl_matchc = 1;
9731 ;
9732 return 0;
9733}
9734_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07009735if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009736
9737
Greg Hartman9768ca42017-06-22 20:49:52 -07009738$as_echo "#define GLOB_HAS_GL_MATCHC 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009739
Greg Hartman9768ca42017-06-22 20:49:52 -07009740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9741$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009742
9743else
9744
Greg Hartman9768ca42017-06-22 20:49:52 -07009745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9746$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009747
9748fi
9749rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9750
9751# Check for g.gl_statv glob() extension
Greg Hartman9768ca42017-06-22 20:49:52 -07009752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_statv and GLOB_KEEPSTAT extensions for glob" >&5
9753$as_echo_n "checking for gl_statv and GLOB_KEEPSTAT extensions for glob... " >&6; }
9754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009755/* end confdefs.h. */
9756 #include <glob.h>
9757int
9758main ()
9759{
9760
9761#ifndef GLOB_KEEPSTAT
9762#error "glob does not support GLOB_KEEPSTAT extension"
9763#endif
9764glob_t g;
9765g.gl_statv = NULL;
9766
9767 ;
9768 return 0;
9769}
9770_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07009771if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009772
9773
Greg Hartman9768ca42017-06-22 20:49:52 -07009774$as_echo "#define GLOB_HAS_GL_STATV 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009775
Greg Hartman9768ca42017-06-22 20:49:52 -07009776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9777$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009778
9779else
9780
Greg Hartman9768ca42017-06-22 20:49:52 -07009781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9782$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009783
9784
9785fi
9786rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9787
Greg Hartman9768ca42017-06-22 20:49:52 -07009788ac_fn_c_check_decl "$LINENO" "GLOB_NOMATCH" "ac_cv_have_decl_GLOB_NOMATCH" "#include <glob.h>
9789"
9790if test "x$ac_cv_have_decl_GLOB_NOMATCH" = xyes; then :
9791 ac_have_decl=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009792else
Greg Hartman9768ca42017-06-22 20:49:52 -07009793 ac_have_decl=0
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009794fi
9795
9796cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07009797#define HAVE_DECL_GLOB_NOMATCH $ac_have_decl
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009798_ACEOF
9799
9800
Greg Hartman9768ca42017-06-22 20:49:52 -07009801ac_fn_c_check_decl "$LINENO" "VIS_ALL" "ac_cv_have_decl_VIS_ALL" "#include <vis.h>
9802"
9803if test "x$ac_cv_have_decl_VIS_ALL" = xyes; then :
9804
Adam Langleyd0592972015-03-30 14:49:51 -07009805else
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009806
Greg Hartman9768ca42017-06-22 20:49:52 -07009807$as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -07009808
9809fi
9810
9811
Greg Hartman9768ca42017-06-22 20:49:52 -07009812{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct dirent allocates space for d_name" >&5
9813$as_echo_n "checking whether struct dirent allocates space for d_name... " >&6; }
9814if test "$cross_compiling" = yes; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009815
Greg Hartman9768ca42017-06-22 20:49:52 -07009816 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&5
9817$as_echo "$as_me: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&2;}
9818 $as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009819
9820
9821
9822else
Greg Hartman9768ca42017-06-22 20:49:52 -07009823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009824/* end confdefs.h. */
9825
9826#include <sys/types.h>
9827#include <dirent.h>
9828int
9829main ()
9830{
9831
9832 struct dirent d;
9833 exit(sizeof(d.d_name)<=sizeof(char));
9834
9835 ;
9836 return 0;
9837}
9838_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07009839if ac_fn_c_try_run "$LINENO"; then :
9840 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9841$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009842else
9843
Greg Hartman9768ca42017-06-22 20:49:52 -07009844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9845$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009846
Greg Hartman9768ca42017-06-22 20:49:52 -07009847$as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009848
9849
9850fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9852 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009853fi
9854
9855
Greg Hartman9768ca42017-06-22 20:49:52 -07009856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /proc/pid/fd directory" >&5
9857$as_echo_n "checking for /proc/pid/fd directory... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009858if test -d "/proc/$$/fd" ; then
9859
Greg Hartman9768ca42017-06-22 20:49:52 -07009860$as_echo "#define HAVE_PROC_PID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009861
Greg Hartman9768ca42017-06-22 20:49:52 -07009862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9863$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009864else
Greg Hartman9768ca42017-06-22 20:49:52 -07009865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9866$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009867fi
9868
9869# Check whether user wants S/Key support
9870SKEY_MSG="no"
9871
9872# Check whether --with-skey was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07009873if test "${with_skey+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009874 withval=$with_skey;
9875 if test "x$withval" != "xno" ; then
9876
9877 if test "x$withval" != "xyes" ; then
9878 CPPFLAGS="$CPPFLAGS -I${withval}/include"
9879 LDFLAGS="$LDFLAGS -L${withval}/lib"
9880 fi
9881
9882
Greg Hartman9768ca42017-06-22 20:49:52 -07009883$as_echo "#define SKEY 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009884
9885 LIBS="-lskey $LIBS"
9886 SKEY_MSG="yes"
9887
Greg Hartman9768ca42017-06-22 20:49:52 -07009888 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for s/key support" >&5
9889$as_echo_n "checking for s/key support... " >&6; }
9890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009891/* end confdefs.h. */
9892
9893#include <stdio.h>
9894#include <skey.h>
9895
9896int
9897main ()
9898{
9899
9900 char *ff = skey_keyinfo(""); ff="";
9901 exit(0);
9902
9903 ;
9904 return 0;
9905}
9906_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07009907if ac_fn_c_try_link "$LINENO"; then :
9908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9909$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009910else
9911
Greg Hartman9768ca42017-06-22 20:49:52 -07009912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9913$as_echo "no" >&6; }
9914 as_fn_error $? "** Incomplete or missing s/key libraries." "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009915
9916fi
Greg Hartman9768ca42017-06-22 20:49:52 -07009917rm -f core conftest.err conftest.$ac_objext \
9918 conftest$ac_exeext conftest.$ac_ext
9919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if skeychallenge takes 4 arguments" >&5
9920$as_echo_n "checking if skeychallenge takes 4 arguments... " >&6; }
9921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009922/* end confdefs.h. */
9923
9924#include <stdio.h>
9925#include <skey.h>
9926
9927int
9928main ()
9929{
9930
9931 (void)skeychallenge(NULL,"name","",0);
9932
9933 ;
9934 return 0;
9935}
9936_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -07009937if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009938
Greg Hartman9768ca42017-06-22 20:49:52 -07009939 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9940$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009941
Greg Hartman9768ca42017-06-22 20:49:52 -07009942$as_echo "#define SKEYCHALLENGE_4ARG 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009943
9944else
9945
Greg Hartman9768ca42017-06-22 20:49:52 -07009946 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9947$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009948
9949fi
9950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9951 fi
9952
9953
9954fi
9955
9956
Adam Langleyd0592972015-03-30 14:49:51 -07009957# Check whether user wants to use ldns
9958LDNS_MSG="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -08009959
Adam Langleyd0592972015-03-30 14:49:51 -07009960# Check whether --with-ldns was given.
Greg Hartman9768ca42017-06-22 20:49:52 -07009961if test "${with_ldns+set}" = set; then :
Adam Langleyd0592972015-03-30 14:49:51 -07009962 withval=$with_ldns;
Greg Hartman9768ca42017-06-22 20:49:52 -07009963 ldns=""
9964 if test "x$withval" = "xyes" ; then
9965 if test -n "$ac_tool_prefix"; then
9966 # Extract the first word of "${ac_tool_prefix}ldns-config", so it can be a program name with args.
9967set dummy ${ac_tool_prefix}ldns-config; ac_word=$2
9968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9969$as_echo_n "checking for $ac_word... " >&6; }
9970if ${ac_cv_path_LDNSCONFIG+:} false; then :
9971 $as_echo_n "(cached) " >&6
9972else
9973 case $LDNSCONFIG in
9974 [\\/]* | ?:[\\/]*)
9975 ac_cv_path_LDNSCONFIG="$LDNSCONFIG" # Let the user override the test with a path.
9976 ;;
9977 *)
9978 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9979for as_dir in $PATH
9980do
9981 IFS=$as_save_IFS
9982 test -z "$as_dir" && as_dir=.
9983 for ac_exec_ext in '' $ac_executable_extensions; do
9984 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9985 ac_cv_path_LDNSCONFIG="$as_dir/$ac_word$ac_exec_ext"
9986 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9987 break 2
9988 fi
9989done
9990 done
9991IFS=$as_save_IFS
Adam Langleyd0592972015-03-30 14:49:51 -07009992
Greg Hartman9768ca42017-06-22 20:49:52 -07009993 ;;
9994esac
9995fi
9996LDNSCONFIG=$ac_cv_path_LDNSCONFIG
9997if test -n "$LDNSCONFIG"; then
9998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDNSCONFIG" >&5
9999$as_echo "$LDNSCONFIG" >&6; }
10000else
10001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10002$as_echo "no" >&6; }
10003fi
Adam Langleyd0592972015-03-30 14:49:51 -070010004
10005
Greg Hartman9768ca42017-06-22 20:49:52 -070010006fi
10007if test -z "$ac_cv_path_LDNSCONFIG"; then
10008 ac_pt_LDNSCONFIG=$LDNSCONFIG
10009 # Extract the first word of "ldns-config", so it can be a program name with args.
10010set dummy ldns-config; ac_word=$2
10011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10012$as_echo_n "checking for $ac_word... " >&6; }
10013if ${ac_cv_path_ac_pt_LDNSCONFIG+:} false; then :
10014 $as_echo_n "(cached) " >&6
10015else
10016 case $ac_pt_LDNSCONFIG in
10017 [\\/]* | ?:[\\/]*)
10018 ac_cv_path_ac_pt_LDNSCONFIG="$ac_pt_LDNSCONFIG" # Let the user override the test with a path.
10019 ;;
10020 *)
10021 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10022for as_dir in $PATH
10023do
10024 IFS=$as_save_IFS
10025 test -z "$as_dir" && as_dir=.
10026 for ac_exec_ext in '' $ac_executable_extensions; do
10027 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10028 ac_cv_path_ac_pt_LDNSCONFIG="$as_dir/$ac_word$ac_exec_ext"
10029 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10030 break 2
10031 fi
10032done
10033 done
10034IFS=$as_save_IFS
Adam Langleyd0592972015-03-30 14:49:51 -070010035
Greg Hartman9768ca42017-06-22 20:49:52 -070010036 ;;
10037esac
10038fi
10039ac_pt_LDNSCONFIG=$ac_cv_path_ac_pt_LDNSCONFIG
10040if test -n "$ac_pt_LDNSCONFIG"; then
10041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LDNSCONFIG" >&5
10042$as_echo "$ac_pt_LDNSCONFIG" >&6; }
10043else
10044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10045$as_echo "no" >&6; }
10046fi
Adam Langleyd0592972015-03-30 14:49:51 -070010047
Greg Hartman9768ca42017-06-22 20:49:52 -070010048 if test "x$ac_pt_LDNSCONFIG" = x; then
10049 LDNSCONFIG="no"
10050 else
10051 case $cross_compiling:$ac_tool_warned in
10052yes:)
10053{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10054$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10055ac_tool_warned=yes ;;
10056esac
10057 LDNSCONFIG=$ac_pt_LDNSCONFIG
10058 fi
10059else
10060 LDNSCONFIG="$ac_cv_path_LDNSCONFIG"
10061fi
10062
10063 if test "x$PKGCONFIG" = "xno"; then
10064 CPPFLAGS="$CPPFLAGS -I${withval}/include"
10065 LDFLAGS="$LDFLAGS -L${withval}/lib"
10066 LIBS="-lldns $LIBS"
10067 ldns=yes
10068 else
10069 LIBS="$LIBS `$LDNSCONFIG --libs`"
10070 CPPFLAGS="$CPPFLAGS `$LDNSCONFIG --cflags`"
10071 fi
10072 elif test "x$withval" != "xno" ; then
10073 CPPFLAGS="$CPPFLAGS -I${withval}/include"
10074 LDFLAGS="$LDFLAGS -L${withval}/lib"
10075 LIBS="-lldns $LIBS"
10076 ldns=yes
10077 fi
10078
10079 # Verify that it works.
10080 if test "x$ldns" = "xyes" ; then
10081
10082$as_echo "#define HAVE_LDNS 1" >>confdefs.h
10083
10084 LDNS_MSG="yes"
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldns support" >&5
10086$as_echo_n "checking for ldns support... " >&6; }
10087 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010088/* end confdefs.h. */
10089
Adam Langleyd0592972015-03-30 14:49:51 -070010090#include <stdio.h>
10091#include <stdlib.h>
10092#include <stdint.h>
10093#include <ldns/ldns.h>
10094int main() { ldns_status status = ldns_verify_trusted(NULL, NULL, NULL, NULL); status=LDNS_STATUS_OK; exit(0); }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010095
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010096
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010097_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070010098if ac_fn_c_try_link "$LINENO"; then :
10099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10100$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010101else
10102
Greg Hartman9768ca42017-06-22 20:49:52 -070010103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10104$as_echo "no" >&6; }
10105 as_fn_error $? "** Incomplete or missing ldns libraries." "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010106
10107fi
Greg Hartman9768ca42017-06-22 20:49:52 -070010108rm -f core conftest.err conftest.$ac_objext \
10109 conftest$ac_exeext conftest.$ac_ext
10110 fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010111
10112fi
10113
10114
10115# Check whether user wants libedit support
10116LIBEDIT_MSG="no"
10117
10118# Check whether --with-libedit was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070010119if test "${with_libedit+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010120 withval=$with_libedit; if test "x$withval" != "xno" ; then
10121 if test "x$withval" = "xyes" ; then
Adam Langleyd0592972015-03-30 14:49:51 -070010122 if test -n "$ac_tool_prefix"; then
10123 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10124set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -070010125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10126$as_echo_n "checking for $ac_word... " >&6; }
10127if ${ac_cv_path_PKGCONFIG+:} false; then :
10128 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010129else
10130 case $PKGCONFIG in
10131 [\\/]* | ?:[\\/]*)
10132 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
10133 ;;
10134 *)
10135 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10136for as_dir in $PATH
10137do
10138 IFS=$as_save_IFS
10139 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -070010140 for ac_exec_ext in '' $ac_executable_extensions; do
10141 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010142 ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -070010143 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010144 break 2
10145 fi
10146done
Greg Hartman9768ca42017-06-22 20:49:52 -070010147 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010148IFS=$as_save_IFS
10149
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010150 ;;
10151esac
10152fi
10153PKGCONFIG=$ac_cv_path_PKGCONFIG
10154if test -n "$PKGCONFIG"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070010155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
10156$as_echo "$PKGCONFIG" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010157else
Greg Hartman9768ca42017-06-22 20:49:52 -070010158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10159$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010160fi
10161
10162
Adam Langleyd0592972015-03-30 14:49:51 -070010163fi
10164if test -z "$ac_cv_path_PKGCONFIG"; then
10165 ac_pt_PKGCONFIG=$PKGCONFIG
10166 # Extract the first word of "pkg-config", so it can be a program name with args.
10167set dummy pkg-config; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -070010168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10169$as_echo_n "checking for $ac_word... " >&6; }
10170if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
10171 $as_echo_n "(cached) " >&6
Adam Langleyd0592972015-03-30 14:49:51 -070010172else
10173 case $ac_pt_PKGCONFIG in
10174 [\\/]* | ?:[\\/]*)
10175 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
10176 ;;
10177 *)
10178 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10179for as_dir in $PATH
10180do
10181 IFS=$as_save_IFS
10182 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -070010183 for ac_exec_ext in '' $ac_executable_extensions; do
10184 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Adam Langleyd0592972015-03-30 14:49:51 -070010185 ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -070010186 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Adam Langleyd0592972015-03-30 14:49:51 -070010187 break 2
10188 fi
10189done
Greg Hartman9768ca42017-06-22 20:49:52 -070010190 done
Adam Langleyd0592972015-03-30 14:49:51 -070010191IFS=$as_save_IFS
10192
10193 ;;
10194esac
10195fi
10196ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
10197if test -n "$ac_pt_PKGCONFIG"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070010198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
10199$as_echo "$ac_pt_PKGCONFIG" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070010200else
Greg Hartman9768ca42017-06-22 20:49:52 -070010201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10202$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070010203fi
10204
10205 if test "x$ac_pt_PKGCONFIG" = x; then
10206 PKGCONFIG="no"
10207 else
10208 case $cross_compiling:$ac_tool_warned in
10209yes:)
Greg Hartman9768ca42017-06-22 20:49:52 -070010210{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10211$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
Adam Langleyd0592972015-03-30 14:49:51 -070010212ac_tool_warned=yes ;;
10213esac
10214 PKGCONFIG=$ac_pt_PKGCONFIG
10215 fi
10216else
10217 PKGCONFIG="$ac_cv_path_PKGCONFIG"
10218fi
10219
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010220 if test "x$PKGCONFIG" != "xno"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070010221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PKGCONFIG knows about libedit" >&5
10222$as_echo_n "checking if $PKGCONFIG knows about libedit... " >&6; }
10223 if "$PKGCONFIG" libedit; then
10224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10225$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010226 use_pkgconfig_for_libedit=yes
10227 else
Greg Hartman9768ca42017-06-22 20:49:52 -070010228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10229$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010230 fi
10231 fi
10232 else
10233 CPPFLAGS="$CPPFLAGS -I${withval}/include"
10234 if test -n "${need_dash_r}"; then
10235 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
10236 else
10237 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
10238 fi
10239 fi
10240 if test "x$use_pkgconfig_for_libedit" = "xyes"; then
Adam Langleyd0592972015-03-30 14:49:51 -070010241 LIBEDIT=`$PKGCONFIG --libs libedit`
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010242 CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libedit`"
10243 else
10244 LIBEDIT="-ledit -lcurses"
10245 fi
10246 OTHERLIBS=`echo $LIBEDIT | sed 's/-ledit//'`
Greg Hartman9768ca42017-06-22 20:49:52 -070010247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_init in -ledit" >&5
10248$as_echo_n "checking for el_init in -ledit... " >&6; }
10249if ${ac_cv_lib_edit_el_init+:} false; then :
10250 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010251else
10252 ac_check_lib_save_LIBS=$LIBS
10253LIBS="-ledit $OTHERLIBS
10254 $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070010255cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010256/* end confdefs.h. */
10257
10258/* Override any GCC internal prototype to avoid an error.
10259 Use char because int might match the return type of a GCC
10260 builtin and then its argument prototype would still apply. */
10261#ifdef __cplusplus
10262extern "C"
10263#endif
10264char el_init ();
10265int
10266main ()
10267{
10268return el_init ();
10269 ;
10270 return 0;
10271}
10272_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070010273if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010274 ac_cv_lib_edit_el_init=yes
10275else
Greg Hartman9768ca42017-06-22 20:49:52 -070010276 ac_cv_lib_edit_el_init=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010277fi
Greg Hartman9768ca42017-06-22 20:49:52 -070010278rm -f core conftest.err conftest.$ac_objext \
10279 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010280LIBS=$ac_check_lib_save_LIBS
10281fi
Greg Hartman9768ca42017-06-22 20:49:52 -070010282{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_el_init" >&5
10283$as_echo "$ac_cv_lib_edit_el_init" >&6; }
10284if test "x$ac_cv_lib_edit_el_init" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010285
Greg Hartman9768ca42017-06-22 20:49:52 -070010286$as_echo "#define USE_LIBEDIT 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010287
10288 LIBEDIT_MSG="yes"
10289
10290
10291else
Greg Hartman9768ca42017-06-22 20:49:52 -070010292 as_fn_error $? "libedit not found" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010293fi
10294
Greg Hartman9768ca42017-06-22 20:49:52 -070010295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libedit version is compatible" >&5
10296$as_echo_n "checking if libedit version is compatible... " >&6; }
10297 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010298/* end confdefs.h. */
10299 #include <histedit.h>
10300int
10301main ()
10302{
10303
10304 int i = H_SETSIZE;
10305 el_init("", NULL, NULL, NULL);
10306 exit(0);
10307
10308 ;
10309 return 0;
10310}
10311_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070010312if ac_fn_c_try_compile "$LINENO"; then :
10313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10314$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010315else
Greg Hartman9768ca42017-06-22 20:49:52 -070010316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10317$as_echo "no" >&6; }
10318 as_fn_error $? "libedit version is not compatible" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010319
10320fi
10321rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10322 fi
10323
10324fi
10325
10326
10327AUDIT_MODULE=none
10328
10329# Check whether --with-audit was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070010330if test "${with_audit+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010331 withval=$with_audit;
Greg Hartman9768ca42017-06-22 20:49:52 -070010332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported audit module" >&5
10333$as_echo_n "checking for supported audit module... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010334 case "$withval" in
10335 bsm)
Greg Hartman9768ca42017-06-22 20:49:52 -070010336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bsm" >&5
10337$as_echo "bsm" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010338 AUDIT_MODULE=bsm
Greg Hartman9768ca42017-06-22 20:49:52 -070010339 for ac_header in bsm/audit.h
10340do :
10341 ac_fn_c_check_header_compile "$LINENO" "bsm/audit.h" "ac_cv_header_bsm_audit_h" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010342#ifdef HAVE_TIME_H
10343# include <time.h>
10344#endif
10345
10346
Greg Hartman9768ca42017-06-22 20:49:52 -070010347"
10348if test "x$ac_cv_header_bsm_audit_h" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010349 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070010350#define HAVE_BSM_AUDIT_H 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010351_ACEOF
10352
10353else
Greg Hartman9768ca42017-06-22 20:49:52 -070010354 as_fn_error $? "BSM enabled and bsm/audit.h not found" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010355fi
10356
10357done
10358
Greg Hartman9768ca42017-06-22 20:49:52 -070010359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaudit in -lbsm" >&5
10360$as_echo_n "checking for getaudit in -lbsm... " >&6; }
10361if ${ac_cv_lib_bsm_getaudit+:} false; then :
10362 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010363else
10364 ac_check_lib_save_LIBS=$LIBS
10365LIBS="-lbsm $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070010366cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010367/* end confdefs.h. */
10368
10369/* Override any GCC internal prototype to avoid an error.
10370 Use char because int might match the return type of a GCC
10371 builtin and then its argument prototype would still apply. */
10372#ifdef __cplusplus
10373extern "C"
10374#endif
10375char getaudit ();
10376int
10377main ()
10378{
10379return getaudit ();
10380 ;
10381 return 0;
10382}
10383_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070010384if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010385 ac_cv_lib_bsm_getaudit=yes
10386else
Greg Hartman9768ca42017-06-22 20:49:52 -070010387 ac_cv_lib_bsm_getaudit=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010388fi
Greg Hartman9768ca42017-06-22 20:49:52 -070010389rm -f core conftest.err conftest.$ac_objext \
10390 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010391LIBS=$ac_check_lib_save_LIBS
10392fi
Greg Hartman9768ca42017-06-22 20:49:52 -070010393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsm_getaudit" >&5
10394$as_echo "$ac_cv_lib_bsm_getaudit" >&6; }
10395if test "x$ac_cv_lib_bsm_getaudit" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010396 cat >>confdefs.h <<_ACEOF
10397#define HAVE_LIBBSM 1
10398_ACEOF
10399
10400 LIBS="-lbsm $LIBS"
10401
10402else
Greg Hartman9768ca42017-06-22 20:49:52 -070010403 as_fn_error $? "BSM enabled and required library not found" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010404fi
10405
Greg Hartman9768ca42017-06-22 20:49:52 -070010406 for ac_func in getaudit
10407do :
10408 ac_fn_c_check_func "$LINENO" "getaudit" "ac_cv_func_getaudit"
10409if test "x$ac_cv_func_getaudit" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010410 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070010411#define HAVE_GETAUDIT 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010412_ACEOF
10413
10414else
Greg Hartman9768ca42017-06-22 20:49:52 -070010415 as_fn_error $? "BSM enabled and required function not found" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010416fi
10417done
10418
10419 # These are optional
Greg Hartman9768ca42017-06-22 20:49:52 -070010420 for ac_func in getaudit_addr aug_get_machine
10421do :
10422 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10423ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10424if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010425 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070010426#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010427_ACEOF
10428
10429fi
10430done
10431
10432
Greg Hartman9768ca42017-06-22 20:49:52 -070010433$as_echo "#define USE_BSM_AUDIT 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010434
Adam Langleyd0592972015-03-30 14:49:51 -070010435 if test "$sol2ver" -ge 11; then
Greg Hartman9768ca42017-06-22 20:49:52 -070010436 SSHDLIBS="$SSHDLIBS -lscf"
Adam Langleyd0592972015-03-30 14:49:51 -070010437
Greg Hartman9768ca42017-06-22 20:49:52 -070010438$as_echo "#define BROKEN_BSM_API 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070010439
10440 fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010441 ;;
10442 linux)
Greg Hartman9768ca42017-06-22 20:49:52 -070010443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux" >&5
10444$as_echo "linux" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010445 AUDIT_MODULE=linux
Greg Hartman9768ca42017-06-22 20:49:52 -070010446 for ac_header in libaudit.h
10447do :
10448 ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
10449if test "x$ac_cv_header_libaudit_h" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010450 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070010451#define HAVE_LIBAUDIT_H 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010452_ACEOF
10453
10454fi
10455
10456done
10457
10458 SSHDLIBS="$SSHDLIBS -laudit"
10459
Greg Hartman9768ca42017-06-22 20:49:52 -070010460$as_echo "#define USE_LINUX_AUDIT 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010461
10462 ;;
10463 debug)
10464 AUDIT_MODULE=debug
Greg Hartman9768ca42017-06-22 20:49:52 -070010465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: debug" >&5
10466$as_echo "debug" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010467
Greg Hartman9768ca42017-06-22 20:49:52 -070010468$as_echo "#define SSH_AUDIT_EVENTS 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010469
10470 ;;
10471 no)
Greg Hartman9768ca42017-06-22 20:49:52 -070010472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10473$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010474 ;;
10475 *)
Greg Hartman9768ca42017-06-22 20:49:52 -070010476 as_fn_error $? "Unknown audit module $withval" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010477 ;;
10478 esac
10479
10480fi
10481
10482
Adam Langleyd0592972015-03-30 14:49:51 -070010483
10484# Check whether --with-pie was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070010485if test "${with_pie+set}" = set; then :
Adam Langleyd0592972015-03-30 14:49:51 -070010486 withval=$with_pie;
10487 if test "x$withval" = "xno"; then
10488 use_pie=no
10489 fi
10490 if test "x$withval" = "xyes"; then
10491 use_pie=yes
10492 fi
10493
10494
10495fi
10496
10497if test "x$use_pie" = "x"; then
10498 use_pie=no
10499fi
10500if test "x$use_toolchain_hardening" != "x1" && test "x$use_pie" = "xauto"; then
10501 # Turn off automatic PIE when toolchain hardening is off.
10502 use_pie=no
10503fi
10504if test "x$use_pie" = "xauto"; then
10505 # Automatic PIE requires gcc >= 4.x
Greg Hartman9768ca42017-06-22 20:49:52 -070010506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc >= 4.x" >&5
10507$as_echo_n "checking for gcc >= 4.x... " >&6; }
10508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070010509/* end confdefs.h. */
10510
10511#if !defined(__GNUC__) || __GNUC__ < 4
10512#error gcc is too old
10513#endif
10514
10515_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070010516if ac_fn_c_try_compile "$LINENO"; then :
10517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10518$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070010519else
Greg Hartman9768ca42017-06-22 20:49:52 -070010520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10521$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070010522 use_pie=no
10523
10524fi
Adam Langleyd0592972015-03-30 14:49:51 -070010525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10526fi
10527if test "x$use_pie" != "xno"; then
10528 SAVED_CFLAGS="$CFLAGS"
10529 SAVED_LDFLAGS="$LDFLAGS"
10530 {
Greg Hartman9768ca42017-06-22 20:49:52 -070010531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -fPIE" >&5
10532$as_echo_n "checking if $CC supports compile flag -fPIE... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070010533 saved_CFLAGS="$CFLAGS"
10534 CFLAGS="$CFLAGS $WERROR -fPIE"
10535 _define_flag=""
10536 test "x$_define_flag" = "x" && _define_flag="-fPIE"
Greg Hartman9768ca42017-06-22 20:49:52 -070010537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070010538/* end confdefs.h. */
10539
10540#include <stdlib.h>
10541#include <stdio.h>
10542int main(int argc, char **argv) {
10543 /* Some math to catch -ftrapv problems in the toolchain */
10544 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
10545 float l = i * 2.1;
10546 double m = l / 0.5;
10547 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
10548 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
10549 exit(0);
10550}
10551
10552_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070010553if ac_fn_c_try_compile "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070010554
10555if `grep -i "unrecognized option" conftest.err >/dev/null`
10556then
Greg Hartman9768ca42017-06-22 20:49:52 -070010557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10558$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070010559 CFLAGS="$saved_CFLAGS"
10560else
Greg Hartman9768ca42017-06-22 20:49:52 -070010561 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10562$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070010563 CFLAGS="$saved_CFLAGS $_define_flag"
10564fi
10565else
Greg Hartman9768ca42017-06-22 20:49:52 -070010566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10567$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070010568 CFLAGS="$saved_CFLAGS"
10569
10570fi
Adam Langleyd0592972015-03-30 14:49:51 -070010571rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10572}
10573 {
Greg Hartman9768ca42017-06-22 20:49:52 -070010574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -pie" >&5
10575$as_echo_n "checking if $LD supports link flag -pie... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070010576 saved_LDFLAGS="$LDFLAGS"
10577 LDFLAGS="$LDFLAGS $WERROR -pie"
10578 _define_flag=""
10579 test "x$_define_flag" = "x" && _define_flag="-pie"
Greg Hartman9768ca42017-06-22 20:49:52 -070010580 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070010581/* end confdefs.h. */
10582
10583#include <stdlib.h>
10584#include <stdio.h>
10585int main(int argc, char **argv) {
10586 /* Some math to catch -ftrapv problems in the toolchain */
10587 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
10588 float l = i * 2.1;
10589 double m = l / 0.5;
10590 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
Greg Hartman9768ca42017-06-22 20:49:52 -070010591 long long p = n * o;
10592 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
Adam Langleyd0592972015-03-30 14:49:51 -070010593 exit(0);
10594}
10595
10596_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070010597if ac_fn_c_try_link "$LINENO"; then :
10598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10599$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070010600 LDFLAGS="$saved_LDFLAGS $_define_flag"
10601else
Greg Hartman9768ca42017-06-22 20:49:52 -070010602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10603$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070010604 LDFLAGS="$saved_LDFLAGS"
10605
10606fi
Greg Hartman9768ca42017-06-22 20:49:52 -070010607rm -f core conftest.err conftest.$ac_objext \
10608 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070010609}
10610 # We use both -fPIE and -pie or neither.
Greg Hartman9768ca42017-06-22 20:49:52 -070010611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether both -fPIE and -pie are supported" >&5
10612$as_echo_n "checking whether both -fPIE and -pie are supported... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070010613 if echo "x $CFLAGS" | grep ' -fPIE' >/dev/null 2>&1 && \
10614 echo "x $LDFLAGS" | grep ' -pie' >/dev/null 2>&1 ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070010615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10616$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070010617 else
Greg Hartman9768ca42017-06-22 20:49:52 -070010618 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10619$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070010620 CFLAGS="$SAVED_CFLAGS"
10621 LDFLAGS="$SAVED_LDFLAGS"
10622 fi
10623fi
10624
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010625for ac_func in \
Adam Langleyd0592972015-03-30 14:49:51 -070010626 Blowfish_initstate \
10627 Blowfish_expandstate \
10628 Blowfish_expand0state \
10629 Blowfish_stream2word \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010630 asprintf \
10631 b64_ntop \
10632 __b64_ntop \
10633 b64_pton \
10634 __b64_pton \
10635 bcopy \
Adam Langleyd0592972015-03-30 14:49:51 -070010636 bcrypt_pbkdf \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010637 bindresvport_sa \
Adam Langleyd0592972015-03-30 14:49:51 -070010638 blf_enc \
10639 cap_rights_limit \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010640 clock \
10641 closefrom \
10642 dirfd \
Adam Langleyd0592972015-03-30 14:49:51 -070010643 endgrent \
Greg Hartman9768ca42017-06-22 20:49:52 -070010644 err \
10645 errx \
Adam Langleyd0592972015-03-30 14:49:51 -070010646 explicit_bzero \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010647 fchmod \
10648 fchown \
10649 freeaddrinfo \
Adam Langleyd0592972015-03-30 14:49:51 -070010650 fstatfs \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010651 fstatvfs \
10652 futimes \
10653 getaddrinfo \
10654 getcwd \
10655 getgrouplist \
10656 getnameinfo \
10657 getopt \
10658 getpeereid \
10659 getpeerucred \
Adam Langleyd0592972015-03-30 14:49:51 -070010660 getpgid \
10661 getpgrp \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010662 _getpty \
10663 getrlimit \
10664 getttyent \
10665 glob \
10666 group_from_gid \
10667 inet_aton \
10668 inet_ntoa \
10669 inet_ntop \
10670 innetgr \
Greg Hartman9768ca42017-06-22 20:49:52 -070010671 llabs \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010672 login_getcapbool \
10673 md5_crypt \
10674 memmove \
Adam Langleyd0592972015-03-30 14:49:51 -070010675 memset_s \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010676 mkdtemp \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010677 ngetaddrinfo \
10678 nsleep \
10679 ogetaddrinfo \
10680 openlog_r \
Greg Hartman9768ca42017-06-22 20:49:52 -070010681 pledge \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010682 poll \
10683 prctl \
10684 pstat \
10685 readpassphrase \
Adam Langleyd0592972015-03-30 14:49:51 -070010686 reallocarray \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010687 recvmsg \
10688 rresvport_af \
10689 sendmsg \
10690 setdtablesize \
10691 setegid \
10692 setenv \
10693 seteuid \
10694 setgroupent \
10695 setgroups \
Adam Langleyd0592972015-03-30 14:49:51 -070010696 setlinebuf \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010697 setlogin \
10698 setpassent\
10699 setpcred \
10700 setproctitle \
10701 setregid \
10702 setreuid \
10703 setrlimit \
10704 setsid \
10705 setvbuf \
10706 sigaction \
10707 sigvec \
10708 snprintf \
10709 socketpair \
10710 statfs \
10711 statvfs \
Greg Hartman9768ca42017-06-22 20:49:52 -070010712 strcasestr \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010713 strdup \
10714 strerror \
10715 strlcat \
10716 strlcpy \
10717 strmode \
Adam Langleyd0592972015-03-30 14:49:51 -070010718 strnlen \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010719 strnvis \
10720 strptime \
10721 strtonum \
10722 strtoll \
10723 strtoul \
Adam Langleyd0592972015-03-30 14:49:51 -070010724 strtoull \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010725 swap32 \
10726 sysconf \
10727 tcgetpgrp \
10728 timingsafe_bcmp \
10729 truncate \
10730 unsetenv \
10731 updwtmpx \
10732 user_from_uid \
Adam Langleyd0592972015-03-30 14:49:51 -070010733 usleep \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010734 vasprintf \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010735 vsnprintf \
10736 waitpid \
Greg Hartman9768ca42017-06-22 20:49:52 -070010737 warn \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010738
Greg Hartman9768ca42017-06-22 20:49:52 -070010739do :
10740 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10741ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10742if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010743 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070010744#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010745_ACEOF
10746
10747fi
10748done
10749
10750
Greg Hartman9768ca42017-06-22 20:49:52 -070010751for ac_func in mblen mbtowc nl_langinfo wcwidth
10752do :
10753 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10754ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10755if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10756 cat >>confdefs.h <<_ACEOF
10757#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Adam Langleyd0592972015-03-30 14:49:51 -070010758_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070010759
10760fi
10761done
10762
10763
10764TEST_SSH_UTF8=${TEST_SSH_UTF8:=yes}
10765{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for utf8 locale support" >&5
10766$as_echo_n "checking for utf8 locale support... " >&6; }
10767if test "$cross_compiling" = yes; then :
10768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
10769$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
10770
10771else
10772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10773/* end confdefs.h. */
10774
10775#include <locale.h>
10776#include <stdlib.h>
10777
10778int
10779main ()
10780{
10781
10782 char *loc = setlocale(LC_CTYPE, "en_US.UTF-8");
10783 if (loc != NULL)
10784 exit(0);
10785 exit(1);
10786
10787 ;
10788 return 0;
10789}
10790_ACEOF
10791if ac_fn_c_try_run "$LINENO"; then :
10792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10793$as_echo "yes" >&6; }
10794else
10795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10796$as_echo "no" >&6; }
10797 TEST_SSH_UTF8=no
10798fi
10799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10800 conftest.$ac_objext conftest.beam conftest.$ac_ext
10801fi
10802
10803
10804cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010805/* end confdefs.h. */
10806 #include <ctype.h>
10807int
10808main ()
10809{
10810 return (isblank('a'));
10811 ;
10812 return 0;
10813}
10814_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070010815if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010816
Greg Hartman9768ca42017-06-22 20:49:52 -070010817$as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070010818
10819
Greg Hartman9768ca42017-06-22 20:49:52 -070010820fi
10821rm -f core conftest.err conftest.$ac_objext \
10822 conftest$ac_exeext conftest.$ac_ext
10823
10824disable_pkcs11=
10825# Check whether --enable-pkcs11 was given.
10826if test "${enable_pkcs11+set}" = set; then :
10827 enableval=$enable_pkcs11;
10828 if test "x$enableval" = "xno" ; then
10829 disable_pkcs11=1
10830 fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010831
10832
10833fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010834
Adam Langleyd0592972015-03-30 14:49:51 -070010835
10836# PKCS11 depends on OpenSSL.
Greg Hartman9768ca42017-06-22 20:49:52 -070010837if test "x$openssl" = "xyes" && test "x$disable_pkcs11" = "x"; then
Adam Langleyd0592972015-03-30 14:49:51 -070010838 # PKCS#11 support requires dlopen() and co
Greg Hartman9768ca42017-06-22 20:49:52 -070010839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
10840$as_echo_n "checking for library containing dlopen... " >&6; }
10841if ${ac_cv_search_dlopen+:} false; then :
10842 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010843else
10844 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -070010845cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010846/* end confdefs.h. */
10847
10848/* Override any GCC internal prototype to avoid an error.
10849 Use char because int might match the return type of a GCC
10850 builtin and then its argument prototype would still apply. */
10851#ifdef __cplusplus
10852extern "C"
10853#endif
10854char dlopen ();
10855int
10856main ()
10857{
10858return dlopen ();
10859 ;
10860 return 0;
10861}
10862_ACEOF
10863for ac_lib in '' dl; do
10864 if test -z "$ac_lib"; then
10865 ac_res="none required"
10866 else
10867 ac_res=-l$ac_lib
10868 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10869 fi
Greg Hartman9768ca42017-06-22 20:49:52 -070010870 if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010871 ac_cv_search_dlopen=$ac_res
10872fi
Greg Hartman9768ca42017-06-22 20:49:52 -070010873rm -f core conftest.err conftest.$ac_objext \
10874 conftest$ac_exeext
10875 if ${ac_cv_search_dlopen+:} false; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010876 break
10877fi
10878done
Greg Hartman9768ca42017-06-22 20:49:52 -070010879if ${ac_cv_search_dlopen+:} false; then :
10880
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010881else
10882 ac_cv_search_dlopen=no
10883fi
10884rm conftest.$ac_ext
10885LIBS=$ac_func_search_save_LIBS
10886fi
Greg Hartman9768ca42017-06-22 20:49:52 -070010887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
10888$as_echo "$ac_cv_search_dlopen" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010889ac_res=$ac_cv_search_dlopen
Greg Hartman9768ca42017-06-22 20:49:52 -070010890if test "$ac_res" != no; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010891 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10892
Greg Hartman9768ca42017-06-22 20:49:52 -070010893$as_echo "#define ENABLE_PKCS11 /**/" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010894
10895
10896fi
10897
Adam Langleyd0592972015-03-30 14:49:51 -070010898fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010899
10900# IRIX has a const char return value for gai_strerror()
10901for ac_func in gai_strerror
Greg Hartman9768ca42017-06-22 20:49:52 -070010902do :
10903 ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror"
10904if test "x$ac_cv_func_gai_strerror" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010905 cat >>confdefs.h <<_ACEOF
10906#define HAVE_GAI_STRERROR 1
10907_ACEOF
10908
Greg Hartman9768ca42017-06-22 20:49:52 -070010909 $as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h
10910
10911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010912/* end confdefs.h. */
10913
10914#include <sys/types.h>
10915#include <sys/socket.h>
10916#include <netdb.h>
10917
10918const char *gai_strerror(int);
10919
10920int
10921main ()
10922{
10923
10924 char *str;
10925 str = gai_strerror(0);
10926
10927 ;
10928 return 0;
10929}
10930_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070010931if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010932
10933
Greg Hartman9768ca42017-06-22 20:49:52 -070010934$as_echo "#define HAVE_CONST_GAI_STRERROR_PROTO 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010935
10936fi
10937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10938fi
10939done
10940
10941
Greg Hartman9768ca42017-06-22 20:49:52 -070010942{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
10943$as_echo_n "checking for library containing nanosleep... " >&6; }
10944if ${ac_cv_search_nanosleep+:} false; then :
10945 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010946else
10947 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -070010948cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010949/* end confdefs.h. */
10950
10951/* Override any GCC internal prototype to avoid an error.
10952 Use char because int might match the return type of a GCC
10953 builtin and then its argument prototype would still apply. */
10954#ifdef __cplusplus
10955extern "C"
10956#endif
10957char nanosleep ();
10958int
10959main ()
10960{
10961return nanosleep ();
10962 ;
10963 return 0;
10964}
10965_ACEOF
10966for ac_lib in '' rt posix4; do
10967 if test -z "$ac_lib"; then
10968 ac_res="none required"
10969 else
10970 ac_res=-l$ac_lib
10971 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
10972 fi
Greg Hartman9768ca42017-06-22 20:49:52 -070010973 if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010974 ac_cv_search_nanosleep=$ac_res
10975fi
Greg Hartman9768ca42017-06-22 20:49:52 -070010976rm -f core conftest.err conftest.$ac_objext \
10977 conftest$ac_exeext
10978 if ${ac_cv_search_nanosleep+:} false; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010979 break
10980fi
10981done
Greg Hartman9768ca42017-06-22 20:49:52 -070010982if ${ac_cv_search_nanosleep+:} false; then :
10983
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010984else
10985 ac_cv_search_nanosleep=no
10986fi
10987rm conftest.$ac_ext
10988LIBS=$ac_func_search_save_LIBS
10989fi
Greg Hartman9768ca42017-06-22 20:49:52 -070010990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
10991$as_echo "$ac_cv_search_nanosleep" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010992ac_res=$ac_cv_search_nanosleep
Greg Hartman9768ca42017-06-22 20:49:52 -070010993if test "$ac_res" != no; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010994 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10995
Greg Hartman9768ca42017-06-22 20:49:52 -070010996$as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080010997
10998fi
10999
11000
Greg Hartman9768ca42017-06-22 20:49:52 -070011001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11002$as_echo_n "checking for library containing clock_gettime... " >&6; }
11003if ${ac_cv_search_clock_gettime+:} false; then :
11004 $as_echo_n "(cached) " >&6
Adam Langleyd0592972015-03-30 14:49:51 -070011005else
11006 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -070011007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070011008/* end confdefs.h. */
11009
11010/* Override any GCC internal prototype to avoid an error.
11011 Use char because int might match the return type of a GCC
11012 builtin and then its argument prototype would still apply. */
11013#ifdef __cplusplus
11014extern "C"
11015#endif
11016char clock_gettime ();
11017int
11018main ()
11019{
11020return clock_gettime ();
11021 ;
11022 return 0;
11023}
11024_ACEOF
11025for ac_lib in '' rt; do
11026 if test -z "$ac_lib"; then
11027 ac_res="none required"
11028 else
11029 ac_res=-l$ac_lib
11030 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11031 fi
Greg Hartman9768ca42017-06-22 20:49:52 -070011032 if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070011033 ac_cv_search_clock_gettime=$ac_res
Adam Langleyd0592972015-03-30 14:49:51 -070011034fi
Greg Hartman9768ca42017-06-22 20:49:52 -070011035rm -f core conftest.err conftest.$ac_objext \
11036 conftest$ac_exeext
11037 if ${ac_cv_search_clock_gettime+:} false; then :
Adam Langleyd0592972015-03-30 14:49:51 -070011038 break
11039fi
11040done
Greg Hartman9768ca42017-06-22 20:49:52 -070011041if ${ac_cv_search_clock_gettime+:} false; then :
11042
Adam Langleyd0592972015-03-30 14:49:51 -070011043else
11044 ac_cv_search_clock_gettime=no
11045fi
11046rm conftest.$ac_ext
11047LIBS=$ac_func_search_save_LIBS
11048fi
Greg Hartman9768ca42017-06-22 20:49:52 -070011049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11050$as_echo "$ac_cv_search_clock_gettime" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070011051ac_res=$ac_cv_search_clock_gettime
Greg Hartman9768ca42017-06-22 20:49:52 -070011052if test "$ac_res" != no; then :
Adam Langleyd0592972015-03-30 14:49:51 -070011053 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11054
Greg Hartman9768ca42017-06-22 20:49:52 -070011055$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070011056
11057fi
11058
11059
Greg Hartman9768ca42017-06-22 20:49:52 -070011060ac_fn_c_check_decl "$LINENO" "getrusage" "ac_cv_have_decl_getrusage" "$ac_includes_default"
11061if test "x$ac_cv_have_decl_getrusage" = xyes; then :
11062 for ac_func in getrusage
11063do :
11064 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
11065if test "x$ac_cv_func_getrusage" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011066 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011067#define HAVE_GETRUSAGE 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011068_ACEOF
11069
11070fi
11071done
11072
11073fi
11074
Greg Hartman9768ca42017-06-22 20:49:52 -070011075ac_fn_c_check_decl "$LINENO" "strsep" "ac_cv_have_decl_strsep" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011076#ifdef HAVE_STRING_H
11077# include <string.h>
11078#endif
11079
Greg Hartman9768ca42017-06-22 20:49:52 -070011080"
11081if test "x$ac_cv_have_decl_strsep" = xyes; then :
11082 for ac_func in strsep
11083do :
11084 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
11085if test "x$ac_cv_func_strsep" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011086 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011087#define HAVE_STRSEP 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011088_ACEOF
11089
11090fi
11091done
11092
11093fi
11094
11095
Greg Hartman9768ca42017-06-22 20:49:52 -070011096ac_fn_c_check_decl "$LINENO" "tcsendbreak" "ac_cv_have_decl_tcsendbreak" "#include <termios.h>
11097
11098"
11099if test "x$ac_cv_have_decl_tcsendbreak" = xyes; then :
11100 $as_echo "#define HAVE_TCSENDBREAK 1" >>confdefs.h
11101
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011102else
Greg Hartman9768ca42017-06-22 20:49:52 -070011103 for ac_func in tcsendbreak
11104do :
11105 ac_fn_c_check_func "$LINENO" "tcsendbreak" "ac_cv_func_tcsendbreak"
11106if test "x$ac_cv_func_tcsendbreak" = xyes; then :
11107 cat >>confdefs.h <<_ACEOF
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011108#define HAVE_TCSENDBREAK 1
11109_ACEOF
11110
11111fi
11112done
11113
11114fi
11115
11116
Greg Hartman9768ca42017-06-22 20:49:52 -070011117ac_fn_c_check_decl "$LINENO" "h_errno" "ac_cv_have_decl_h_errno" "#include <netdb.h>
11118"
11119if test "x$ac_cv_have_decl_h_errno" = xyes; then :
11120 ac_have_decl=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011121else
Greg Hartman9768ca42017-06-22 20:49:52 -070011122 ac_have_decl=0
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011123fi
11124
11125cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011126#define HAVE_DECL_H_ERRNO $ac_have_decl
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011127_ACEOF
11128
11129
Greg Hartman9768ca42017-06-22 20:49:52 -070011130ac_fn_c_check_decl "$LINENO" "SHUT_RD" "ac_cv_have_decl_SHUT_RD" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011131#include <sys/types.h>
11132#include <sys/socket.h>
11133
Greg Hartman9768ca42017-06-22 20:49:52 -070011134"
11135if test "x$ac_cv_have_decl_SHUT_RD" = xyes; then :
11136 ac_have_decl=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011137else
Greg Hartman9768ca42017-06-22 20:49:52 -070011138 ac_have_decl=0
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011139fi
11140
11141cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011142#define HAVE_DECL_SHUT_RD $ac_have_decl
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011143_ACEOF
11144
11145
Greg Hartman9768ca42017-06-22 20:49:52 -070011146ac_fn_c_check_decl "$LINENO" "O_NONBLOCK" "ac_cv_have_decl_O_NONBLOCK" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011147#include <sys/types.h>
11148#ifdef HAVE_SYS_STAT_H
11149# include <sys/stat.h>
11150#endif
11151#ifdef HAVE_FCNTL_H
11152# include <fcntl.h>
11153#endif
11154
Greg Hartman9768ca42017-06-22 20:49:52 -070011155"
11156if test "x$ac_cv_have_decl_O_NONBLOCK" = xyes; then :
11157 ac_have_decl=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011158else
Greg Hartman9768ca42017-06-22 20:49:52 -070011159 ac_have_decl=0
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011160fi
11161
11162cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011163#define HAVE_DECL_O_NONBLOCK $ac_have_decl
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011164_ACEOF
11165
11166
Greg Hartman9768ca42017-06-22 20:49:52 -070011167ac_fn_c_check_decl "$LINENO" "writev" "ac_cv_have_decl_writev" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011168#include <sys/types.h>
11169#include <sys/uio.h>
11170#include <unistd.h>
11171
Greg Hartman9768ca42017-06-22 20:49:52 -070011172"
11173if test "x$ac_cv_have_decl_writev" = xyes; then :
11174 ac_have_decl=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011175else
Greg Hartman9768ca42017-06-22 20:49:52 -070011176 ac_have_decl=0
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011177fi
11178
11179cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011180#define HAVE_DECL_WRITEV $ac_have_decl
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011181_ACEOF
11182
11183
Greg Hartman9768ca42017-06-22 20:49:52 -070011184ac_fn_c_check_decl "$LINENO" "MAXSYMLINKS" "ac_cv_have_decl_MAXSYMLINKS" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011185#include <sys/param.h>
11186
Greg Hartman9768ca42017-06-22 20:49:52 -070011187"
11188if test "x$ac_cv_have_decl_MAXSYMLINKS" = xyes; then :
11189 ac_have_decl=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011190else
Greg Hartman9768ca42017-06-22 20:49:52 -070011191 ac_have_decl=0
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011192fi
11193
11194cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011195#define HAVE_DECL_MAXSYMLINKS $ac_have_decl
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011196_ACEOF
11197
11198
Greg Hartman9768ca42017-06-22 20:49:52 -070011199ac_fn_c_check_decl "$LINENO" "offsetof" "ac_cv_have_decl_offsetof" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011200#include <stddef.h>
11201
Greg Hartman9768ca42017-06-22 20:49:52 -070011202"
11203if test "x$ac_cv_have_decl_offsetof" = xyes; then :
11204 ac_have_decl=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011205else
Greg Hartman9768ca42017-06-22 20:49:52 -070011206 ac_have_decl=0
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011207fi
11208
11209cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011210#define HAVE_DECL_OFFSETOF $ac_have_decl
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011211_ACEOF
11212
11213
Adam Langleyd0592972015-03-30 14:49:51 -070011214# extra bits for select(2)
Greg Hartman9768ca42017-06-22 20:49:52 -070011215ac_fn_c_check_decl "$LINENO" "howmany" "ac_cv_have_decl_howmany" "
Adam Langleyd0592972015-03-30 14:49:51 -070011216#include <sys/param.h>
11217#include <sys/types.h>
11218#ifdef HAVE_SYS_SYSMACROS_H
11219#include <sys/sysmacros.h>
11220#endif
11221#ifdef HAVE_SYS_SELECT_H
11222#include <sys/select.h>
11223#endif
11224#ifdef HAVE_SYS_TIME_H
11225#include <sys/time.h>
11226#endif
11227#ifdef HAVE_UNISTD_H
11228#include <unistd.h>
11229#endif
11230
Greg Hartman9768ca42017-06-22 20:49:52 -070011231"
11232if test "x$ac_cv_have_decl_howmany" = xyes; then :
11233 ac_have_decl=1
Adam Langleyd0592972015-03-30 14:49:51 -070011234else
Greg Hartman9768ca42017-06-22 20:49:52 -070011235 ac_have_decl=0
Adam Langleyd0592972015-03-30 14:49:51 -070011236fi
11237
Adam Langleyd0592972015-03-30 14:49:51 -070011238cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011239#define HAVE_DECL_HOWMANY $ac_have_decl
Adam Langleyd0592972015-03-30 14:49:51 -070011240_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011241ac_fn_c_check_decl "$LINENO" "NFDBITS" "ac_cv_have_decl_NFDBITS" "
Adam Langleyd0592972015-03-30 14:49:51 -070011242#include <sys/param.h>
11243#include <sys/types.h>
11244#ifdef HAVE_SYS_SYSMACROS_H
11245#include <sys/sysmacros.h>
11246#endif
11247#ifdef HAVE_SYS_SELECT_H
11248#include <sys/select.h>
11249#endif
11250#ifdef HAVE_SYS_TIME_H
11251#include <sys/time.h>
11252#endif
11253#ifdef HAVE_UNISTD_H
11254#include <unistd.h>
11255#endif
11256
Greg Hartman9768ca42017-06-22 20:49:52 -070011257"
11258if test "x$ac_cv_have_decl_NFDBITS" = xyes; then :
11259 ac_have_decl=1
Adam Langleyd0592972015-03-30 14:49:51 -070011260else
Greg Hartman9768ca42017-06-22 20:49:52 -070011261 ac_have_decl=0
Adam Langleyd0592972015-03-30 14:49:51 -070011262fi
11263
Adam Langleyd0592972015-03-30 14:49:51 -070011264cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011265#define HAVE_DECL_NFDBITS $ac_have_decl
Adam Langleyd0592972015-03-30 14:49:51 -070011266_ACEOF
11267
Greg Hartman9768ca42017-06-22 20:49:52 -070011268ac_fn_c_check_type "$LINENO" "fd_mask" "ac_cv_type_fd_mask" "
Adam Langleyd0592972015-03-30 14:49:51 -070011269#include <sys/param.h>
11270#include <sys/types.h>
11271#ifdef HAVE_SYS_SELECT_H
11272#include <sys/select.h>
11273#endif
11274#ifdef HAVE_SYS_TIME_H
11275#include <sys/time.h>
11276#endif
11277#ifdef HAVE_UNISTD_H
11278#include <unistd.h>
11279#endif
11280
Greg Hartman9768ca42017-06-22 20:49:52 -070011281"
11282if test "x$ac_cv_type_fd_mask" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070011283
11284cat >>confdefs.h <<_ACEOF
11285#define HAVE_FD_MASK 1
11286_ACEOF
11287
11288
11289fi
11290
11291
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011292for ac_func in setresuid
Greg Hartman9768ca42017-06-22 20:49:52 -070011293do :
11294 ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
11295if test "x$ac_cv_func_setresuid" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011296 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011297#define HAVE_SETRESUID 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011298_ACEOF
11299
Greg Hartman9768ca42017-06-22 20:49:52 -070011300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresuid seems to work" >&5
11301$as_echo_n "checking if setresuid seems to work... " >&6; }
11302 if test "$cross_compiling" = yes; then :
11303 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
11304$as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011305
11306else
Greg Hartman9768ca42017-06-22 20:49:52 -070011307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011308/* end confdefs.h. */
11309
11310#include <stdlib.h>
11311#include <errno.h>
11312
11313int
11314main ()
11315{
11316
11317 errno=0;
11318 setresuid(0,0,0);
11319 if (errno==ENOSYS)
11320 exit(1);
11321 else
11322 exit(0);
11323
11324 ;
11325 return 0;
11326}
11327_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011328if ac_fn_c_try_run "$LINENO"; then :
11329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11330$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011331else
11332
Greg Hartman9768ca42017-06-22 20:49:52 -070011333$as_echo "#define BROKEN_SETRESUID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011334
Greg Hartman9768ca42017-06-22 20:49:52 -070011335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
11336$as_echo "not implemented" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011337fi
Greg Hartman9768ca42017-06-22 20:49:52 -070011338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11339 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011340fi
11341
11342
11343fi
11344done
11345
11346
11347for ac_func in setresgid
Greg Hartman9768ca42017-06-22 20:49:52 -070011348do :
11349 ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
11350if test "x$ac_cv_func_setresgid" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011351 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011352#define HAVE_SETRESGID 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011353_ACEOF
11354
Greg Hartman9768ca42017-06-22 20:49:52 -070011355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresgid seems to work" >&5
11356$as_echo_n "checking if setresgid seems to work... " >&6; }
11357 if test "$cross_compiling" = yes; then :
11358 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
11359$as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011360
11361else
Greg Hartman9768ca42017-06-22 20:49:52 -070011362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011363/* end confdefs.h. */
11364
11365#include <stdlib.h>
11366#include <errno.h>
11367
11368int
11369main ()
11370{
11371
11372 errno=0;
11373 setresgid(0,0,0);
11374 if (errno==ENOSYS)
11375 exit(1);
11376 else
11377 exit(0);
11378
11379 ;
11380 return 0;
11381}
11382_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011383if ac_fn_c_try_run "$LINENO"; then :
11384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11385$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011386else
11387
Greg Hartman9768ca42017-06-22 20:49:52 -070011388$as_echo "#define BROKEN_SETRESGID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011389
Greg Hartman9768ca42017-06-22 20:49:52 -070011390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
11391$as_echo "not implemented" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011392fi
Greg Hartman9768ca42017-06-22 20:49:52 -070011393rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11394 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011395fi
11396
11397
11398fi
11399done
11400
11401
Greg Hartmanccacbc92016-02-03 09:59:44 -080011402for ac_func in realpath
Greg Hartman9768ca42017-06-22 20:49:52 -070011403do :
11404 ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath"
11405if test "x$ac_cv_func_realpath" = xyes; then :
Greg Hartmanccacbc92016-02-03 09:59:44 -080011406 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011407#define HAVE_REALPATH 1
Greg Hartmanccacbc92016-02-03 09:59:44 -080011408_ACEOF
11409
Greg Hartman9768ca42017-06-22 20:49:52 -070011410 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if realpath works with non-existent files" >&5
11411$as_echo_n "checking if realpath works with non-existent files... " >&6; }
11412 if test "$cross_compiling" = yes; then :
11413 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming working" >&5
11414$as_echo "$as_me: WARNING: cross compiling: assuming working" >&2;}
Greg Hartmanccacbc92016-02-03 09:59:44 -080011415
11416else
Greg Hartman9768ca42017-06-22 20:49:52 -070011417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanccacbc92016-02-03 09:59:44 -080011418/* end confdefs.h. */
11419
11420#include <limits.h>
11421#include <stdlib.h>
11422#include <errno.h>
11423
11424int
11425main ()
11426{
11427
11428 char buf[PATH_MAX];
11429 if (realpath("/opensshnonexistentfilename1234", buf) == NULL)
11430 if (errno == ENOENT)
11431 exit(1);
11432 exit(0);
11433
11434 ;
11435 return 0;
11436}
11437_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011438if ac_fn_c_try_run "$LINENO"; then :
11439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11440$as_echo "yes" >&6; }
Greg Hartmanccacbc92016-02-03 09:59:44 -080011441else
Greg Hartmanccacbc92016-02-03 09:59:44 -080011442
Greg Hartman9768ca42017-06-22 20:49:52 -070011443$as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
Greg Hartmanccacbc92016-02-03 09:59:44 -080011444
Greg Hartman9768ca42017-06-22 20:49:52 -070011445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11446$as_echo "no" >&6; }
Greg Hartmanccacbc92016-02-03 09:59:44 -080011447fi
Greg Hartman9768ca42017-06-22 20:49:52 -070011448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11449 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanccacbc92016-02-03 09:59:44 -080011450fi
11451
11452
Greg Hartmanccacbc92016-02-03 09:59:44 -080011453fi
11454done
11455
11456
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011457for ac_func in gettimeofday time
Greg Hartman9768ca42017-06-22 20:49:52 -070011458do :
11459 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11460ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11461if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011462 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011463#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011464_ACEOF
11465
11466fi
11467done
11468
11469for ac_func in endutent getutent getutid getutline pututline setutent
Greg Hartman9768ca42017-06-22 20:49:52 -070011470do :
11471 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11472ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11473if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011474 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011475#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011476_ACEOF
11477
11478fi
11479done
11480
11481for ac_func in utmpname
Greg Hartman9768ca42017-06-22 20:49:52 -070011482do :
11483 ac_fn_c_check_func "$LINENO" "utmpname" "ac_cv_func_utmpname"
11484if test "x$ac_cv_func_utmpname" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011485 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011486#define HAVE_UTMPNAME 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011487_ACEOF
11488
11489fi
11490done
11491
11492for ac_func in endutxent getutxent getutxid getutxline getutxuser pututxline
Greg Hartman9768ca42017-06-22 20:49:52 -070011493do :
11494 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11495ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11496if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011497 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011498#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011499_ACEOF
11500
11501fi
11502done
11503
11504for ac_func in setutxdb setutxent utmpxname
Greg Hartman9768ca42017-06-22 20:49:52 -070011505do :
11506 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11507ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11508if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011509 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011510#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011511_ACEOF
11512
11513fi
11514done
11515
11516for ac_func in getlastlogxbyname
Greg Hartman9768ca42017-06-22 20:49:52 -070011517do :
11518 ac_fn_c_check_func "$LINENO" "getlastlogxbyname" "ac_cv_func_getlastlogxbyname"
11519if test "x$ac_cv_func_getlastlogxbyname" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011520 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011521#define HAVE_GETLASTLOGXBYNAME 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011522_ACEOF
11523
11524fi
11525done
11526
11527
Greg Hartman9768ca42017-06-22 20:49:52 -070011528ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
11529if test "x$ac_cv_func_daemon" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011530
Greg Hartman9768ca42017-06-22 20:49:52 -070011531$as_echo "#define HAVE_DAEMON 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011532
11533else
Greg Hartman9768ca42017-06-22 20:49:52 -070011534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for daemon in -lbsd" >&5
11535$as_echo_n "checking for daemon in -lbsd... " >&6; }
11536if ${ac_cv_lib_bsd_daemon+:} false; then :
11537 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011538else
11539 ac_check_lib_save_LIBS=$LIBS
11540LIBS="-lbsd $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070011541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011542/* end confdefs.h. */
11543
11544/* Override any GCC internal prototype to avoid an error.
11545 Use char because int might match the return type of a GCC
11546 builtin and then its argument prototype would still apply. */
11547#ifdef __cplusplus
11548extern "C"
11549#endif
11550char daemon ();
11551int
11552main ()
11553{
11554return daemon ();
11555 ;
11556 return 0;
11557}
11558_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011559if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011560 ac_cv_lib_bsd_daemon=yes
11561else
Greg Hartman9768ca42017-06-22 20:49:52 -070011562 ac_cv_lib_bsd_daemon=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011563fi
Greg Hartman9768ca42017-06-22 20:49:52 -070011564rm -f core conftest.err conftest.$ac_objext \
11565 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011566LIBS=$ac_check_lib_save_LIBS
11567fi
Greg Hartman9768ca42017-06-22 20:49:52 -070011568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_daemon" >&5
11569$as_echo "$ac_cv_lib_bsd_daemon" >&6; }
11570if test "x$ac_cv_lib_bsd_daemon" = xyes; then :
11571 LIBS="$LIBS -lbsd"; $as_echo "#define HAVE_DAEMON 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011572
11573fi
11574
11575
11576fi
11577
11578
Greg Hartman9768ca42017-06-22 20:49:52 -070011579ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
11580if test "x$ac_cv_func_getpagesize" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011581
Greg Hartman9768ca42017-06-22 20:49:52 -070011582$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011583
11584else
Greg Hartman9768ca42017-06-22 20:49:52 -070011585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize in -lucb" >&5
11586$as_echo_n "checking for getpagesize in -lucb... " >&6; }
11587if ${ac_cv_lib_ucb_getpagesize+:} false; then :
11588 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011589else
11590 ac_check_lib_save_LIBS=$LIBS
11591LIBS="-lucb $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070011592cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011593/* end confdefs.h. */
11594
11595/* Override any GCC internal prototype to avoid an error.
11596 Use char because int might match the return type of a GCC
11597 builtin and then its argument prototype would still apply. */
11598#ifdef __cplusplus
11599extern "C"
11600#endif
11601char getpagesize ();
11602int
11603main ()
11604{
11605return getpagesize ();
11606 ;
11607 return 0;
11608}
11609_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011610if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011611 ac_cv_lib_ucb_getpagesize=yes
11612else
Greg Hartman9768ca42017-06-22 20:49:52 -070011613 ac_cv_lib_ucb_getpagesize=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011614fi
Greg Hartman9768ca42017-06-22 20:49:52 -070011615rm -f core conftest.err conftest.$ac_objext \
11616 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011617LIBS=$ac_check_lib_save_LIBS
11618fi
Greg Hartman9768ca42017-06-22 20:49:52 -070011619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ucb_getpagesize" >&5
11620$as_echo "$ac_cv_lib_ucb_getpagesize" >&6; }
11621if test "x$ac_cv_lib_ucb_getpagesize" = xyes; then :
11622 LIBS="$LIBS -lucb"; $as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011623
11624fi
11625
11626
11627fi
11628
11629
11630# Check for broken snprintf
11631if test "x$ac_cv_func_snprintf" = "xyes" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070011632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf correctly terminates long strings" >&5
11633$as_echo_n "checking whether snprintf correctly terminates long strings... " >&6; }
11634 if test "$cross_compiling" = yes; then :
11635 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
11636$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011637
11638else
Greg Hartman9768ca42017-06-22 20:49:52 -070011639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011640/* end confdefs.h. */
11641 #include <stdio.h>
11642int
11643main ()
11644{
11645
11646 char b[5];
11647 snprintf(b,5,"123456789");
11648 exit(b[4]!='\0');
11649
11650 ;
11651 return 0;
11652}
11653_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011654if ac_fn_c_try_run "$LINENO"; then :
11655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11656$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011657else
11658
Greg Hartman9768ca42017-06-22 20:49:52 -070011659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11660$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011661
Greg Hartman9768ca42017-06-22 20:49:52 -070011662$as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011663
Greg Hartman9768ca42017-06-22 20:49:52 -070011664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
11665$as_echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011666
11667fi
Greg Hartman9768ca42017-06-22 20:49:52 -070011668rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11669 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011670fi
11671
11672fi
11673
Adam Langleyd0592972015-03-30 14:49:51 -070011674# We depend on vsnprintf returning the right thing on overflow: the
11675# number of characters it tried to create (as per SUSv3)
11676if test "x$ac_cv_func_vsnprintf" = "xyes" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070011677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf returns correct values on overflow" >&5
11678$as_echo_n "checking whether vsnprintf returns correct values on overflow... " >&6; }
11679 if test "$cross_compiling" = yes; then :
11680 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working vsnprintf()" >&5
11681$as_echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011682
11683else
Greg Hartman9768ca42017-06-22 20:49:52 -070011684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011685/* end confdefs.h. */
11686
11687#include <sys/types.h>
11688#include <stdio.h>
11689#include <stdarg.h>
11690
Adam Langleyd0592972015-03-30 14:49:51 -070011691int x_snprintf(char *str, size_t count, const char *fmt, ...)
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011692{
Adam Langleyd0592972015-03-30 14:49:51 -070011693 size_t ret;
11694 va_list ap;
11695
11696 va_start(ap, fmt);
11697 ret = vsnprintf(str, count, fmt, ap);
11698 va_end(ap);
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011699 return ret;
11700}
11701
11702int
11703main ()
11704{
11705
Adam Langleyd0592972015-03-30 14:49:51 -070011706char x[1];
11707if (x_snprintf(x, 1, "%s %d", "hello", 12345) != 11)
11708 return 1;
11709if (x_snprintf(NULL, 0, "%s %d", "hello", 12345) != 11)
11710 return 1;
11711return 0;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011712
11713 ;
11714 return 0;
11715}
11716_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011717if ac_fn_c_try_run "$LINENO"; then :
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11719$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011720else
11721
Greg Hartman9768ca42017-06-22 20:49:52 -070011722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11723$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011724
Greg Hartman9768ca42017-06-22 20:49:52 -070011725$as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011726
Greg Hartman9768ca42017-06-22 20:49:52 -070011727 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&5
11728$as_echo "$as_me: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011729
11730fi
Greg Hartman9768ca42017-06-22 20:49:52 -070011731rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11732 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011733fi
11734
11735fi
11736
11737# On systems where [v]snprintf is broken, but is declared in stdio,
11738# check that the fmt argument is const char * or just char *.
11739# This is only useful for when BROKEN_SNPRINTF
Greg Hartman9768ca42017-06-22 20:49:52 -070011740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf can declare const char *fmt" >&5
11741$as_echo_n "checking whether snprintf can declare const char *fmt... " >&6; }
11742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011743/* end confdefs.h. */
11744
11745#include <stdio.h>
11746int snprintf(char *a, size_t b, const char *c, ...) { return 0; }
11747
11748int
11749main ()
11750{
11751
11752 snprintf(0, 0, 0);
11753
11754 ;
11755 return 0;
11756}
11757_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011758if ac_fn_c_try_compile "$LINENO"; then :
11759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11760$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011761
Greg Hartman9768ca42017-06-22 20:49:52 -070011762$as_echo "#define SNPRINTF_CONST const" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011763
11764else
Greg Hartman9768ca42017-06-22 20:49:52 -070011765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11766$as_echo "no" >&6; }
11767 $as_echo "#define SNPRINTF_CONST /* not const */" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011768
11769fi
11770rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11771
11772# Check for missing getpeereid (or equiv) support
11773NO_PEERCHECK=""
11774if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070011775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports SO_PEERCRED getsockopt" >&5
11776$as_echo_n "checking whether system supports SO_PEERCRED getsockopt... " >&6; }
11777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011778/* end confdefs.h. */
11779
11780#include <sys/types.h>
11781#include <sys/socket.h>
11782int
11783main ()
11784{
11785int i = SO_PEERCRED;
11786 ;
11787 return 0;
11788}
11789_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011790if ac_fn_c_try_compile "$LINENO"; then :
11791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11792$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011793
Greg Hartman9768ca42017-06-22 20:49:52 -070011794$as_echo "#define HAVE_SO_PEERCRED 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011795
11796
11797else
Greg Hartman9768ca42017-06-22 20:49:52 -070011798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11799$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011800 NO_PEERCHECK=1
11801
11802fi
11803rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11804fi
11805
11806if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070011807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for (overly) strict mkstemp" >&5
11808$as_echo_n "checking for (overly) strict mkstemp... " >&6; }
11809if test "$cross_compiling" = yes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011810
Greg Hartman9768ca42017-06-22 20:49:52 -070011811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11812$as_echo "yes" >&6; }
11813 $as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011814
11815
11816
11817else
Greg Hartman9768ca42017-06-22 20:49:52 -070011818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011819/* end confdefs.h. */
11820
11821#include <stdlib.h>
11822
11823int
11824main ()
11825{
11826
11827 char template[]="conftest.mkstemp-test";
11828 if (mkstemp(template) == -1)
11829 exit(1);
11830 unlink(template);
11831 exit(0);
11832
11833 ;
11834 return 0;
11835}
11836_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011837if ac_fn_c_try_run "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011838
Greg Hartman9768ca42017-06-22 20:49:52 -070011839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11840$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011841
11842else
11843
Greg Hartman9768ca42017-06-22 20:49:52 -070011844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11845$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011846
Greg Hartman9768ca42017-06-22 20:49:52 -070011847$as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011848
11849
11850fi
Greg Hartman9768ca42017-06-22 20:49:52 -070011851rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11852 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011853fi
11854
11855fi
11856
11857if test ! -z "$check_for_openpty_ctty_bug"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070011858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openpty correctly handles controlling tty" >&5
11859$as_echo_n "checking if openpty correctly handles controlling tty... " >&6; }
11860 if test "$cross_compiling" = yes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011861
Greg Hartman9768ca42017-06-22 20:49:52 -070011862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
11863$as_echo "cross-compiling, assuming yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011864
11865
11866else
Greg Hartman9768ca42017-06-22 20:49:52 -070011867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011868/* end confdefs.h. */
11869
11870#include <stdio.h>
11871#include <sys/fcntl.h>
11872#include <sys/types.h>
11873#include <sys/wait.h>
11874
11875int
11876main ()
11877{
11878
11879 pid_t pid;
11880 int fd, ptyfd, ttyfd, status;
11881
11882 pid = fork();
11883 if (pid < 0) { /* failed */
11884 exit(1);
11885 } else if (pid > 0) { /* parent */
11886 waitpid(pid, &status, 0);
11887 if (WIFEXITED(status))
11888 exit(WEXITSTATUS(status));
11889 else
11890 exit(2);
11891 } else { /* child */
11892 close(0); close(1); close(2);
11893 setsid();
11894 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
11895 fd = open("/dev/tty", O_RDWR | O_NOCTTY);
11896 if (fd >= 0)
11897 exit(3); /* Acquired ctty: broken */
11898 else
11899 exit(0); /* Did not acquire ctty: OK */
11900 }
11901
11902 ;
11903 return 0;
11904}
11905_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011906if ac_fn_c_try_run "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011907
Greg Hartman9768ca42017-06-22 20:49:52 -070011908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11909$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011910
11911else
11912
Greg Hartman9768ca42017-06-22 20:49:52 -070011913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11914$as_echo "no" >&6; }
11915 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011916
11917
11918fi
Greg Hartman9768ca42017-06-22 20:49:52 -070011919rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11920 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011921fi
11922
11923fi
11924
11925if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
11926 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070011927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
11928$as_echo_n "checking if getaddrinfo seems to work... " >&6; }
11929 if test "$cross_compiling" = yes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011930
Greg Hartman9768ca42017-06-22 20:49:52 -070011931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
11932$as_echo "cross-compiling, assuming yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011933
11934
11935else
Greg Hartman9768ca42017-06-22 20:49:52 -070011936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011937/* end confdefs.h. */
11938
11939#include <stdio.h>
11940#include <sys/socket.h>
11941#include <netdb.h>
11942#include <errno.h>
11943#include <netinet/in.h>
11944
11945#define TEST_PORT "2222"
11946
11947int
11948main ()
11949{
11950
11951 int err, sock;
11952 struct addrinfo *gai_ai, *ai, hints;
11953 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
11954
11955 memset(&hints, 0, sizeof(hints));
11956 hints.ai_family = PF_UNSPEC;
11957 hints.ai_socktype = SOCK_STREAM;
11958 hints.ai_flags = AI_PASSIVE;
11959
11960 err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
11961 if (err != 0) {
11962 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
11963 exit(1);
11964 }
11965
11966 for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
11967 if (ai->ai_family != AF_INET6)
11968 continue;
11969
11970 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
11971 sizeof(ntop), strport, sizeof(strport),
11972 NI_NUMERICHOST|NI_NUMERICSERV);
11973
11974 if (err != 0) {
11975 if (err == EAI_SYSTEM)
11976 perror("getnameinfo EAI_SYSTEM");
11977 else
11978 fprintf(stderr, "getnameinfo failed: %s\n",
11979 gai_strerror(err));
11980 exit(2);
11981 }
11982
11983 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
11984 if (sock < 0)
11985 perror("socket");
11986 if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
11987 if (errno == EBADF)
11988 exit(3);
11989 }
11990 }
11991 exit(0);
11992
11993 ;
11994 return 0;
11995}
11996_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070011997if ac_fn_c_try_run "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080011998
Greg Hartman9768ca42017-06-22 20:49:52 -070011999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12000$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012001
12002else
12003
Greg Hartman9768ca42017-06-22 20:49:52 -070012004 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12005$as_echo "no" >&6; }
12006 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012007
12008
12009fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012010rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12011 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012012fi
12013
12014fi
12015
12016if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
12017 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070012018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
12019$as_echo_n "checking if getaddrinfo seems to work... " >&6; }
12020 if test "$cross_compiling" = yes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012021
Greg Hartman9768ca42017-06-22 20:49:52 -070012022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming no" >&5
12023$as_echo "cross-compiling, assuming no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012024
12025
12026else
Greg Hartman9768ca42017-06-22 20:49:52 -070012027 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012028/* end confdefs.h. */
12029
12030#include <stdio.h>
12031#include <sys/socket.h>
12032#include <netdb.h>
12033#include <errno.h>
12034#include <netinet/in.h>
12035
12036#define TEST_PORT "2222"
12037
12038int
12039main ()
12040{
12041
12042 int err, sock;
12043 struct addrinfo *gai_ai, *ai, hints;
12044 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
12045
12046 memset(&hints, 0, sizeof(hints));
12047 hints.ai_family = PF_UNSPEC;
12048 hints.ai_socktype = SOCK_STREAM;
12049 hints.ai_flags = AI_PASSIVE;
12050
12051 err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
12052 if (err != 0) {
12053 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
12054 exit(1);
12055 }
12056
12057 for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
12058 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
12059 continue;
12060
12061 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
12062 sizeof(ntop), strport, sizeof(strport),
12063 NI_NUMERICHOST|NI_NUMERICSERV);
12064
12065 if (ai->ai_family == AF_INET && err != 0) {
12066 perror("getnameinfo");
12067 exit(2);
12068 }
12069 }
12070 exit(0);
12071
12072 ;
12073 return 0;
12074}
12075_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012076if ac_fn_c_try_run "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012077
Greg Hartman9768ca42017-06-22 20:49:52 -070012078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12079$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012080
Greg Hartman9768ca42017-06-22 20:49:52 -070012081$as_echo "#define AIX_GETNAMEINFO_HACK 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012082
12083
12084else
12085
Greg Hartman9768ca42017-06-22 20:49:52 -070012086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12087$as_echo "no" >&6; }
12088 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012089
12090
12091fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012092rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12093 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012094fi
12095
Adam Langleyd0592972015-03-30 14:49:51 -070012096fi
12097
12098if test "x$ac_cv_func_getaddrinfo" = "xyes"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070012099 ac_fn_c_check_decl "$LINENO" "AI_NUMERICSERV" "ac_cv_have_decl_AI_NUMERICSERV" "#include <sys/types.h>
Adam Langleyd0592972015-03-30 14:49:51 -070012100 #include <sys/socket.h>
12101 #include <netdb.h>
Greg Hartman9768ca42017-06-22 20:49:52 -070012102"
12103if test "x$ac_cv_have_decl_AI_NUMERICSERV" = xyes; then :
12104 ac_have_decl=1
Adam Langleyd0592972015-03-30 14:49:51 -070012105else
Greg Hartman9768ca42017-06-22 20:49:52 -070012106 ac_have_decl=0
Adam Langleyd0592972015-03-30 14:49:51 -070012107fi
12108
Adam Langleyd0592972015-03-30 14:49:51 -070012109cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012110#define HAVE_DECL_AI_NUMERICSERV $ac_have_decl
Adam Langleyd0592972015-03-30 14:49:51 -070012111_ACEOF
12112
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012113fi
12114
12115if test "x$check_for_conflicting_getspnam" = "x1"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070012116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for conflicting getspnam in shadow.h" >&5
12117$as_echo_n "checking for conflicting getspnam in shadow.h... " >&6; }
12118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012119/* end confdefs.h. */
12120 #include <shadow.h>
12121int
12122main ()
12123{
12124 exit(0);
12125 ;
12126 return 0;
12127}
12128_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012129if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012130
Greg Hartman9768ca42017-06-22 20:49:52 -070012131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12132$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012133
12134else
12135
Greg Hartman9768ca42017-06-22 20:49:52 -070012136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12137$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012138
Greg Hartman9768ca42017-06-22 20:49:52 -070012139$as_echo "#define GETSPNAM_CONFLICTING_DEFS 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012140
12141
12142
12143fi
12144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12145fi
12146
Greg Hartman9768ca42017-06-22 20:49:52 -070012147if test "x$ac_cv_func_strnvis" = "xyes"; then
12148 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnvis" >&5
12149$as_echo_n "checking for working strnvis... " >&6; }
12150 if test "$cross_compiling" = yes; then :
12151 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming broken" >&5
12152$as_echo "$as_me: WARNING: cross compiling: assuming broken" >&2;}
12153
12154$as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
12155
12156
12157else
12158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12159/* end confdefs.h. */
12160
12161#include <signal.h>
12162#include <stdlib.h>
12163#include <string.h>
12164#include <vis.h>
12165static void sighandler(int sig) { _exit(1); }
12166
12167int
12168main ()
12169{
12170
12171 char dst[16];
12172
12173 signal(SIGSEGV, sighandler);
12174 if (strnvis(dst, "src", 4, 0) && strcmp(dst, "src") == 0)
12175 exit(0);
12176 exit(1)
12177
12178 ;
12179 return 0;
12180}
12181_ACEOF
12182if ac_fn_c_try_run "$LINENO"; then :
12183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12184$as_echo "yes" >&6; }
12185else
12186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12187$as_echo "no" >&6; }
12188
12189$as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
12190
12191fi
12192rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12193 conftest.$ac_objext conftest.beam conftest.$ac_ext
12194fi
12195
12196fi
12197
12198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
12199$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
12200if ${ac_cv_func_getpgrp_void+:} false; then :
12201 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012202else
12203 # Use it with a single arg.
Greg Hartman9768ca42017-06-22 20:49:52 -070012204cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012205/* end confdefs.h. */
12206$ac_includes_default
12207int
12208main ()
12209{
12210getpgrp (0);
12211 ;
12212 return 0;
12213}
12214_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012215if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012216 ac_cv_func_getpgrp_void=no
12217else
Greg Hartman9768ca42017-06-22 20:49:52 -070012218 ac_cv_func_getpgrp_void=yes
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012219fi
12220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12221
12222fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012223{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
12224$as_echo "$ac_cv_func_getpgrp_void" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012225if test $ac_cv_func_getpgrp_void = yes; then
12226
Greg Hartman9768ca42017-06-22 20:49:52 -070012227$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012228
12229fi
12230
12231
12232# Search for OpenSSL
12233saved_CPPFLAGS="$CPPFLAGS"
12234saved_LDFLAGS="$LDFLAGS"
12235
12236# Check whether --with-ssl-dir was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070012237if test "${with_ssl_dir+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012238 withval=$with_ssl_dir;
Adam Langleyd0592972015-03-30 14:49:51 -070012239 if test "x$openssl" = "xno" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070012240 as_fn_error $? "cannot use --with-ssl-dir when OpenSSL disabled" "$LINENO" 5
Adam Langleyd0592972015-03-30 14:49:51 -070012241 fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012242 if test "x$withval" != "xno" ; then
12243 case "$withval" in
12244 # Relative paths
12245 ./*|../*) withval="`pwd`/$withval"
12246 esac
12247 if test -d "$withval/lib"; then
12248 if test -n "${need_dash_r}"; then
12249 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
12250 else
12251 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
12252 fi
12253 elif test -d "$withval/lib64"; then
12254 if test -n "${need_dash_r}"; then
12255 LDFLAGS="-L${withval}/lib64 -R${withval}/lib64 ${LDFLAGS}"
12256 else
12257 LDFLAGS="-L${withval}/lib64 ${LDFLAGS}"
12258 fi
12259 else
12260 if test -n "${need_dash_r}"; then
12261 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
12262 else
12263 LDFLAGS="-L${withval} ${LDFLAGS}"
12264 fi
12265 fi
12266 if test -d "$withval/include"; then
12267 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
12268 else
12269 CPPFLAGS="-I${withval} ${CPPFLAGS}"
12270 fi
12271 fi
12272
12273
12274fi
12275
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012276
12277
12278# Check whether --with-openssl-header-check was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070012279if test "${with_openssl_header_check+set}" = set; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012280 withval=$with_openssl_header_check;
12281 if test "x$withval" = "xno" ; then
12282 openssl_check_nonfatal=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012283 fi
12284
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012285
12286fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012287
12288
Adam Langleyd0592972015-03-30 14:49:51 -070012289openssl_engine=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012290
12291# Check whether --with-ssl-engine was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070012292if test "${with_ssl_engine+set}" = set; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012293 withval=$with_ssl_engine;
Adam Langleyd0592972015-03-30 14:49:51 -070012294 if test "x$withval" != "xno" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070012295 if test "x$openssl" = "xno" ; then
12296 as_fn_error $? "cannot use --with-ssl-engine when OpenSSL disabled" "$LINENO" 5
12297 fi
Adam Langleyd0592972015-03-30 14:49:51 -070012298 openssl_engine=yes
12299 fi
12300
12301
12302fi
12303
12304
12305if test "x$openssl" = "xyes" ; then
12306 LIBS="-lcrypto $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070012307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012308/* end confdefs.h. */
12309
Adam Langleyd0592972015-03-30 14:49:51 -070012310/* Override any GCC internal prototype to avoid an error.
12311 Use char because int might match the return type of a GCC
12312 builtin and then its argument prototype would still apply. */
12313#ifdef __cplusplus
12314extern "C"
12315#endif
12316char RAND_add ();
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012317int
12318main ()
12319{
Adam Langleyd0592972015-03-30 14:49:51 -070012320return RAND_add ();
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012321 ;
12322 return 0;
12323}
12324_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012325if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012326
Greg Hartman9768ca42017-06-22 20:49:52 -070012327$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012328
12329else
Adam Langleyd0592972015-03-30 14:49:51 -070012330
12331 if test -n "${need_dash_r}"; then
12332 LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
12333 else
12334 LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
12335 fi
12336 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
Greg Hartman9768ca42017-06-22 20:49:52 -070012337 ac_fn_c_check_header_mongrel "$LINENO" "openssl/opensslv.h" "ac_cv_header_openssl_opensslv_h" "$ac_includes_default"
12338if test "x$ac_cv_header_openssl_opensslv_h" = xyes; then :
12339
Adam Langleyd0592972015-03-30 14:49:51 -070012340else
Greg Hartman9768ca42017-06-22 20:49:52 -070012341 as_fn_error $? "*** OpenSSL headers missing - please install first or check config.log ***" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012342fi
12343
12344
Greg Hartman9768ca42017-06-22 20:49:52 -070012345 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012346/* end confdefs.h. */
12347
Adam Langleyd0592972015-03-30 14:49:51 -070012348/* Override any GCC internal prototype to avoid an error.
12349 Use char because int might match the return type of a GCC
12350 builtin and then its argument prototype would still apply. */
12351#ifdef __cplusplus
12352extern "C"
12353#endif
12354char RAND_add ();
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012355int
12356main ()
12357{
Adam Langleyd0592972015-03-30 14:49:51 -070012358return RAND_add ();
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012359 ;
12360 return 0;
12361}
12362_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012363if ac_fn_c_try_link "$LINENO"; then :
12364 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012365
12366else
12367
Greg Hartman9768ca42017-06-22 20:49:52 -070012368 as_fn_error $? "*** Can't find recent OpenSSL libcrypto (see config.log for details) ***" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012369
12370
12371fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012372rm -f core conftest.err conftest.$ac_objext \
12373 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012374
12375
12376fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012377rm -f core conftest.err conftest.$ac_objext \
12378 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012379
12380 # Determine OpenSSL header version
Greg Hartman9768ca42017-06-22 20:49:52 -070012381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL header version" >&5
12382$as_echo_n "checking OpenSSL header version... " >&6; }
12383 if test "$cross_compiling" = yes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012384
Greg Hartman9768ca42017-06-22 20:49:52 -070012385 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
12386$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
Adam Langleyd0592972015-03-30 14:49:51 -070012387
12388
12389else
Greg Hartman9768ca42017-06-22 20:49:52 -070012390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012391/* end confdefs.h. */
12392
Greg Hartman9768ca42017-06-22 20:49:52 -070012393 #include <stdlib.h>
Adam Langleyd0592972015-03-30 14:49:51 -070012394 #include <stdio.h>
12395 #include <string.h>
12396 #include <openssl/opensslv.h>
12397 #define DATA "conftest.sslincver"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012398
12399int
12400main ()
12401{
12402
Adam Langleyd0592972015-03-30 14:49:51 -070012403 FILE *fd;
12404 int rc;
12405
12406 fd = fopen(DATA,"w");
12407 if(fd == NULL)
12408 exit(1);
12409
Greg Hartman9768ca42017-06-22 20:49:52 -070012410 if ((rc = fprintf(fd, "%08lx (%s)\n",
12411 (unsigned long)OPENSSL_VERSION_NUMBER,
12412 OPENSSL_VERSION_TEXT)) < 0)
Adam Langleyd0592972015-03-30 14:49:51 -070012413 exit(1);
12414
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012415 exit(0);
12416
12417 ;
12418 return 0;
12419}
12420_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012421if ac_fn_c_try_run "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012422
Adam Langleyd0592972015-03-30 14:49:51 -070012423 ssl_header_ver=`cat conftest.sslincver`
Greg Hartman9768ca42017-06-22 20:49:52 -070012424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_header_ver" >&5
12425$as_echo "$ssl_header_ver" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012426
12427else
12428
Greg Hartman9768ca42017-06-22 20:49:52 -070012429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12430$as_echo "not found" >&6; }
12431 as_fn_error $? "OpenSSL version header not found." "$LINENO" 5
Adam Langleyd0592972015-03-30 14:49:51 -070012432
12433fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012434rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12435 conftest.$ac_objext conftest.beam conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012436fi
12437
12438
Adam Langleyd0592972015-03-30 14:49:51 -070012439 # Determine OpenSSL library version
Greg Hartman9768ca42017-06-22 20:49:52 -070012440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version" >&5
12441$as_echo_n "checking OpenSSL library version... " >&6; }
12442 if test "$cross_compiling" = yes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012443
Greg Hartman9768ca42017-06-22 20:49:52 -070012444 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
12445$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
Adam Langleyd0592972015-03-30 14:49:51 -070012446
12447
12448else
Greg Hartman9768ca42017-06-22 20:49:52 -070012449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012450/* end confdefs.h. */
12451
12452 #include <stdio.h>
12453 #include <string.h>
12454 #include <openssl/opensslv.h>
12455 #include <openssl/crypto.h>
12456 #define DATA "conftest.ssllibver"
12457
12458int
12459main ()
12460{
12461
12462 FILE *fd;
12463 int rc;
12464
12465 fd = fopen(DATA,"w");
12466 if(fd == NULL)
12467 exit(1);
12468
Greg Hartman9768ca42017-06-22 20:49:52 -070012469 if ((rc = fprintf(fd, "%08lx (%s)\n", (unsigned long)SSLeay(),
12470 SSLeay_version(SSLEAY_VERSION))) < 0)
Adam Langleyd0592972015-03-30 14:49:51 -070012471 exit(1);
12472
12473 exit(0);
12474
12475 ;
12476 return 0;
12477}
12478_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012479if ac_fn_c_try_run "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012480
12481 ssl_library_ver=`cat conftest.ssllibver`
12482 # Check version is supported.
12483 case "$ssl_library_ver" in
Greg Hartman9768ca42017-06-22 20:49:52 -070012484 10000*|0*)
12485 as_fn_error $? "OpenSSL >= 1.0.1 required (have \"$ssl_library_ver\")" "$LINENO" 5
Adam Langleyd0592972015-03-30 14:49:51 -070012486 ;;
12487 *) ;;
12488 esac
Greg Hartman9768ca42017-06-22 20:49:52 -070012489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_library_ver" >&5
12490$as_echo "$ssl_library_ver" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012491
12492else
Adam Langleyd0592972015-03-30 14:49:51 -070012493
Greg Hartman9768ca42017-06-22 20:49:52 -070012494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12495$as_echo "not found" >&6; }
12496 as_fn_error $? "OpenSSL library not found." "$LINENO" 5
Adam Langleyd0592972015-03-30 14:49:51 -070012497
12498fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012499rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12500 conftest.$ac_objext conftest.beam conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012501fi
12502
12503
Adam Langleyd0592972015-03-30 14:49:51 -070012504 # Sanity check OpenSSL headers
Greg Hartman9768ca42017-06-22 20:49:52 -070012505 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's headers match the library" >&5
12506$as_echo_n "checking whether OpenSSL's headers match the library... " >&6; }
12507 if test "$cross_compiling" = yes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012508
Greg Hartman9768ca42017-06-22 20:49:52 -070012509 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
12510$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
Adam Langleyd0592972015-03-30 14:49:51 -070012511
12512
12513else
Greg Hartman9768ca42017-06-22 20:49:52 -070012514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012515/* end confdefs.h. */
12516
12517 #include <string.h>
12518 #include <openssl/opensslv.h>
Greg Hartman9768ca42017-06-22 20:49:52 -070012519 #include <openssl/crypto.h>
Adam Langleyd0592972015-03-30 14:49:51 -070012520
12521int
12522main ()
12523{
12524
12525 exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1);
12526
12527 ;
12528 return 0;
12529}
12530_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012531if ac_fn_c_try_run "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012532
Greg Hartman9768ca42017-06-22 20:49:52 -070012533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12534$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012535
12536else
Adam Langleyd0592972015-03-30 14:49:51 -070012537
Greg Hartman9768ca42017-06-22 20:49:52 -070012538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12539$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012540 if test "x$openssl_check_nonfatal" = "x"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070012541 as_fn_error $? "Your OpenSSL headers do not match your
Adam Langleyd0592972015-03-30 14:49:51 -070012542 library. Check config.log for details.
12543 If you are sure your installation is consistent, you can disable the check
12544 by running \"./configure --without-openssl-header-check\".
12545 Also see contrib/findssl.sh for help identifying header/library mismatches.
Greg Hartman9768ca42017-06-22 20:49:52 -070012546 " "$LINENO" 5
Adam Langleyd0592972015-03-30 14:49:51 -070012547 else
Greg Hartman9768ca42017-06-22 20:49:52 -070012548 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your OpenSSL headers do not match your
Adam Langleyd0592972015-03-30 14:49:51 -070012549 library. Check config.log for details.
12550 Also see contrib/findssl.sh for help identifying header/library mismatches." >&5
Greg Hartman9768ca42017-06-22 20:49:52 -070012551$as_echo "$as_me: WARNING: Your OpenSSL headers do not match your
Adam Langleyd0592972015-03-30 14:49:51 -070012552 library. Check config.log for details.
12553 Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;}
12554 fi
12555
12556fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12558 conftest.$ac_objext conftest.beam conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012559fi
12560
12561
Greg Hartman9768ca42017-06-22 20:49:52 -070012562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL functions will link" >&5
12563$as_echo_n "checking if programs using OpenSSL functions will link... " >&6; }
12564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012565/* end confdefs.h. */
12566 #include <openssl/evp.h>
12567int
12568main ()
12569{
12570 SSLeay_add_all_algorithms();
12571 ;
12572 return 0;
12573}
12574_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012575if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012576
Greg Hartman9768ca42017-06-22 20:49:52 -070012577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12578$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012579
12580else
Adam Langleyd0592972015-03-30 14:49:51 -070012581
Greg Hartman9768ca42017-06-22 20:49:52 -070012582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12583$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012584 saved_LIBS="$LIBS"
12585 LIBS="$LIBS -ldl"
Greg Hartman9768ca42017-06-22 20:49:52 -070012586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL need -ldl" >&5
12587$as_echo_n "checking if programs using OpenSSL need -ldl... " >&6; }
12588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012589/* end confdefs.h. */
12590 #include <openssl/evp.h>
12591int
12592main ()
12593{
12594 SSLeay_add_all_algorithms();
12595 ;
12596 return 0;
12597}
12598_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012599if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012600
Greg Hartman9768ca42017-06-22 20:49:52 -070012601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12602$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012603
12604else
Adam Langleyd0592972015-03-30 14:49:51 -070012605
Greg Hartman9768ca42017-06-22 20:49:52 -070012606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12607$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012608 LIBS="$saved_LIBS"
12609
12610
12611fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012612rm -f core conftest.err conftest.$ac_objext \
12613 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012614
12615
12616fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012617rm -f core conftest.err conftest.$ac_objext \
12618 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012619
Greg Hartman9768ca42017-06-22 20:49:52 -070012620 for ac_func in \
Adam Langleyd0592972015-03-30 14:49:51 -070012621 BN_is_prime_ex \
12622 DSA_generate_parameters_ex \
12623 EVP_DigestInit_ex \
12624 EVP_DigestFinal_ex \
12625 EVP_MD_CTX_init \
12626 EVP_MD_CTX_cleanup \
12627 EVP_MD_CTX_copy_ex \
12628 HMAC_CTX_init \
12629 RSA_generate_key_ex \
12630 RSA_get_default_method \
12631
Greg Hartman9768ca42017-06-22 20:49:52 -070012632do :
12633 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12634ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12635if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012636 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012637#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Adam Langleyd0592972015-03-30 14:49:51 -070012638_ACEOF
12639
12640fi
12641done
12642
12643
12644 if test "x$openssl_engine" = "xyes" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070012645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL ENGINE support" >&5
12646$as_echo_n "checking for OpenSSL ENGINE support... " >&6; }
12647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012648/* end confdefs.h. */
12649
12650 #include <openssl/engine.h>
12651
12652int
12653main ()
12654{
12655
12656 ENGINE_load_builtin_engines();
12657 ENGINE_register_all_complete();
12658
12659 ;
12660 return 0;
12661}
12662_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012663if ac_fn_c_try_compile "$LINENO"; then :
12664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12665$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012666
Greg Hartman9768ca42017-06-22 20:49:52 -070012667$as_echo "#define USE_OPENSSL_ENGINE 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070012668
12669
12670else
Greg Hartman9768ca42017-06-22 20:49:52 -070012671 as_fn_error $? "OpenSSL ENGINE support not found" "$LINENO" 5
Adam Langleyd0592972015-03-30 14:49:51 -070012672
12673fi
Adam Langleyd0592972015-03-30 14:49:51 -070012674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12675 fi
12676
12677 # Check for OpenSSL without EVP_aes_{192,256}_cbc
Greg Hartman9768ca42017-06-22 20:49:52 -070012678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has crippled AES support" >&5
12679$as_echo_n "checking whether OpenSSL has crippled AES support... " >&6; }
12680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012681/* end confdefs.h. */
12682
12683 #include <string.h>
12684 #include <openssl/evp.h>
12685
12686int
12687main ()
12688{
12689
12690 exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);
12691
12692 ;
12693 return 0;
12694}
12695_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012696if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012697
Greg Hartman9768ca42017-06-22 20:49:52 -070012698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12699$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012700
12701else
Adam Langleyd0592972015-03-30 14:49:51 -070012702
Greg Hartman9768ca42017-06-22 20:49:52 -070012703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12704$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012705
Greg Hartman9768ca42017-06-22 20:49:52 -070012706$as_echo "#define OPENSSL_LOBOTOMISED_AES 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012707
12708
12709
12710fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012711rm -f core conftest.err conftest.$ac_objext \
12712 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012713
12714 # Check for OpenSSL with EVP_aes_*ctr
Greg Hartman9768ca42017-06-22 20:49:52 -070012715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has AES CTR via EVP" >&5
12716$as_echo_n "checking whether OpenSSL has AES CTR via EVP... " >&6; }
12717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012718/* end confdefs.h. */
12719
12720 #include <string.h>
12721 #include <openssl/evp.h>
12722
12723int
12724main ()
12725{
12726
12727 exit(EVP_aes_128_ctr() == NULL ||
12728 EVP_aes_192_cbc() == NULL ||
12729 EVP_aes_256_cbc() == NULL);
12730
12731 ;
12732 return 0;
12733}
12734_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012735if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012736
Greg Hartman9768ca42017-06-22 20:49:52 -070012737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12738$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012739
Greg Hartman9768ca42017-06-22 20:49:52 -070012740$as_echo "#define OPENSSL_HAVE_EVPCTR 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070012741
12742
12743else
Adam Langleyd0592972015-03-30 14:49:51 -070012744
Greg Hartman9768ca42017-06-22 20:49:52 -070012745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12746$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012747
12748
12749fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012750rm -f core conftest.err conftest.$ac_objext \
12751 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012752
12753 # Check for OpenSSL with EVP_aes_*gcm
Greg Hartman9768ca42017-06-22 20:49:52 -070012754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has AES GCM via EVP" >&5
12755$as_echo_n "checking whether OpenSSL has AES GCM via EVP... " >&6; }
12756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012757/* end confdefs.h. */
12758
12759 #include <string.h>
12760 #include <openssl/evp.h>
12761
12762int
12763main ()
12764{
12765
12766 exit(EVP_aes_128_gcm() == NULL ||
12767 EVP_aes_256_gcm() == NULL ||
12768 EVP_CTRL_GCM_SET_IV_FIXED == 0 ||
12769 EVP_CTRL_GCM_IV_GEN == 0 ||
12770 EVP_CTRL_GCM_SET_TAG == 0 ||
12771 EVP_CTRL_GCM_GET_TAG == 0 ||
12772 EVP_CIPHER_CTX_ctrl(NULL, 0, 0, NULL) == 0);
12773
12774 ;
12775 return 0;
12776}
12777_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012778if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012779
Greg Hartman9768ca42017-06-22 20:49:52 -070012780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12781$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012782
Greg Hartman9768ca42017-06-22 20:49:52 -070012783$as_echo "#define OPENSSL_HAVE_EVPGCM 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070012784
12785
12786else
Adam Langleyd0592972015-03-30 14:49:51 -070012787
Greg Hartman9768ca42017-06-22 20:49:52 -070012788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12789$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012790 unsupported_algorithms="$unsupported_cipers \
Greg Hartman9768ca42017-06-22 20:49:52 -070012791 aes128-gcm@openssh.com \
12792 aes256-gcm@openssh.com"
Adam Langleyd0592972015-03-30 14:49:51 -070012793
12794
12795fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012796rm -f core conftest.err conftest.$ac_objext \
12797 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012798
Greg Hartman9768ca42017-06-22 20:49:52 -070012799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing EVP_CIPHER_CTX_ctrl" >&5
12800$as_echo_n "checking for library containing EVP_CIPHER_CTX_ctrl... " >&6; }
12801if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
12802 $as_echo_n "(cached) " >&6
Adam Langleyd0592972015-03-30 14:49:51 -070012803else
12804 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -070012805cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012806/* end confdefs.h. */
12807
12808/* Override any GCC internal prototype to avoid an error.
12809 Use char because int might match the return type of a GCC
12810 builtin and then its argument prototype would still apply. */
12811#ifdef __cplusplus
12812extern "C"
12813#endif
12814char EVP_CIPHER_CTX_ctrl ();
12815int
12816main ()
12817{
12818return EVP_CIPHER_CTX_ctrl ();
12819 ;
12820 return 0;
12821}
12822_ACEOF
12823for ac_lib in '' crypto; do
12824 if test -z "$ac_lib"; then
12825 ac_res="none required"
12826 else
12827 ac_res=-l$ac_lib
12828 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12829 fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012830 if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012831 ac_cv_search_EVP_CIPHER_CTX_ctrl=$ac_res
Adam Langleyd0592972015-03-30 14:49:51 -070012832fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012833rm -f core conftest.err conftest.$ac_objext \
12834 conftest$ac_exeext
12835 if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012836 break
12837fi
12838done
Greg Hartman9768ca42017-06-22 20:49:52 -070012839if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
12840
Adam Langleyd0592972015-03-30 14:49:51 -070012841else
12842 ac_cv_search_EVP_CIPHER_CTX_ctrl=no
12843fi
12844rm conftest.$ac_ext
12845LIBS=$ac_func_search_save_LIBS
12846fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_EVP_CIPHER_CTX_ctrl" >&5
12848$as_echo "$ac_cv_search_EVP_CIPHER_CTX_ctrl" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012849ac_res=$ac_cv_search_EVP_CIPHER_CTX_ctrl
Greg Hartman9768ca42017-06-22 20:49:52 -070012850if test "$ac_res" != no; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012851 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12852
Greg Hartman9768ca42017-06-22 20:49:52 -070012853$as_echo "#define HAVE_EVP_CIPHER_CTX_CTRL 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070012854
12855fi
12856
12857
Greg Hartman9768ca42017-06-22 20:49:52 -070012858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if EVP_DigestUpdate returns an int" >&5
12859$as_echo_n "checking if EVP_DigestUpdate returns an int... " >&6; }
12860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012861/* end confdefs.h. */
12862
12863 #include <string.h>
12864 #include <openssl/evp.h>
12865
12866int
12867main ()
12868{
12869
12870 if(EVP_DigestUpdate(NULL, NULL,0))
12871 exit(0);
12872
12873 ;
12874 return 0;
12875}
12876_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012877if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012878
Greg Hartman9768ca42017-06-22 20:49:52 -070012879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12880$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012881
12882else
Adam Langleyd0592972015-03-30 14:49:51 -070012883
Greg Hartman9768ca42017-06-22 20:49:52 -070012884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12885$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070012886
Greg Hartman9768ca42017-06-22 20:49:52 -070012887$as_echo "#define OPENSSL_EVP_DIGESTUPDATE_VOID 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070012888
12889
12890
12891fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012892rm -f core conftest.err conftest.$ac_objext \
12893 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070012894
12895 # Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
12896 # because the system crypt() is more featureful.
12897 if test "x$check_for_libcrypt_before" = "x1"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070012898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
12899$as_echo_n "checking for crypt in -lcrypt... " >&6; }
12900if ${ac_cv_lib_crypt_crypt+:} false; then :
12901 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012902else
12903 ac_check_lib_save_LIBS=$LIBS
12904LIBS="-lcrypt $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070012905cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012906/* end confdefs.h. */
12907
12908/* Override any GCC internal prototype to avoid an error.
12909 Use char because int might match the return type of a GCC
12910 builtin and then its argument prototype would still apply. */
12911#ifdef __cplusplus
12912extern "C"
12913#endif
12914char crypt ();
12915int
12916main ()
12917{
12918return crypt ();
12919 ;
12920 return 0;
12921}
12922_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012923if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012924 ac_cv_lib_crypt_crypt=yes
12925else
Greg Hartman9768ca42017-06-22 20:49:52 -070012926 ac_cv_lib_crypt_crypt=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012927fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012928rm -f core conftest.err conftest.$ac_objext \
12929 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012930LIBS=$ac_check_lib_save_LIBS
12931fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
12933$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
12934if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012935 cat >>confdefs.h <<_ACEOF
12936#define HAVE_LIBCRYPT 1
12937_ACEOF
12938
12939 LIBS="-lcrypt $LIBS"
12940
12941fi
12942
Adam Langleyd0592972015-03-30 14:49:51 -070012943 fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012944
Adam Langleyd0592972015-03-30 14:49:51 -070012945 # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
12946 # version in OpenSSL.
12947 if test "x$check_for_libcrypt_later" = "x1"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070012948 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
12949$as_echo_n "checking for crypt in -lcrypt... " >&6; }
12950if ${ac_cv_lib_crypt_crypt+:} false; then :
12951 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012952else
12953 ac_check_lib_save_LIBS=$LIBS
12954LIBS="-lcrypt $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070012955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012956/* end confdefs.h. */
12957
12958/* Override any GCC internal prototype to avoid an error.
12959 Use char because int might match the return type of a GCC
12960 builtin and then its argument prototype would still apply. */
12961#ifdef __cplusplus
12962extern "C"
12963#endif
12964char crypt ();
12965int
12966main ()
12967{
12968return crypt ();
12969 ;
12970 return 0;
12971}
12972_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012973if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012974 ac_cv_lib_crypt_crypt=yes
12975else
Greg Hartman9768ca42017-06-22 20:49:52 -070012976 ac_cv_lib_crypt_crypt=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012977fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012978rm -f core conftest.err conftest.$ac_objext \
12979 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012980LIBS=$ac_check_lib_save_LIBS
12981fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
12983$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
12984if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080012985 LIBS="$LIBS -lcrypt"
12986fi
12987
Adam Langleyd0592972015-03-30 14:49:51 -070012988 fi
Greg Hartman9768ca42017-06-22 20:49:52 -070012989 for ac_func in crypt DES_crypt
12990do :
12991 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12992ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12993if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070012994 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070012995#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Adam Langleyd0592972015-03-30 14:49:51 -070012996_ACEOF
12997
12998fi
12999done
13000
13001
13002 # Search for SHA256 support in libc and/or OpenSSL
Greg Hartman9768ca42017-06-22 20:49:52 -070013003 for ac_func in SHA256_Update EVP_sha256
13004do :
13005 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13006ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13007if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070013008 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013009#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Adam Langleyd0592972015-03-30 14:49:51 -070013010_ACEOF
13011
13012else
13013 unsupported_algorithms="$unsupported_algorithms \
Greg Hartman9768ca42017-06-22 20:49:52 -070013014 hmac-sha2-256 \
13015 hmac-sha2-512 \
Adam Langleyd0592972015-03-30 14:49:51 -070013016 diffie-hellman-group-exchange-sha256 \
Greg Hartman9768ca42017-06-22 20:49:52 -070013017 hmac-sha2-256-etm@openssh.com \
13018 hmac-sha2-512-etm@openssh.com"
Adam Langleyd0592972015-03-30 14:49:51 -070013019
13020
13021fi
13022done
13023
13024 # Search for RIPE-MD support in OpenSSL
Greg Hartman9768ca42017-06-22 20:49:52 -070013025 for ac_func in EVP_ripemd160
13026do :
13027 ac_fn_c_check_func "$LINENO" "EVP_ripemd160" "ac_cv_func_EVP_ripemd160"
13028if test "x$ac_cv_func_EVP_ripemd160" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070013029 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013030#define HAVE_EVP_RIPEMD160 1
Adam Langleyd0592972015-03-30 14:49:51 -070013031_ACEOF
13032
13033else
13034 unsupported_algorithms="$unsupported_algorithms \
Greg Hartman9768ca42017-06-22 20:49:52 -070013035 hmac-ripemd160 \
13036 hmac-ripemd160@openssh.com \
Adam Langleyd0592972015-03-30 14:49:51 -070013037 hmac-ripemd160-etm@openssh.com"
13038
13039
13040fi
13041done
13042
13043
13044 # Check complete ECC support in OpenSSL
Greg Hartman9768ca42017-06-22 20:49:52 -070013045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_X9_62_prime256v1" >&5
13046$as_echo_n "checking whether OpenSSL has NID_X9_62_prime256v1... " >&6; }
13047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013048/* end confdefs.h. */
13049
13050 #include <openssl/ec.h>
13051 #include <openssl/ecdh.h>
13052 #include <openssl/ecdsa.h>
13053 #include <openssl/evp.h>
13054 #include <openssl/objects.h>
13055 #include <openssl/opensslv.h>
13056 #if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */
13057 # error "OpenSSL < 0.9.8g has unreliable ECC code"
13058 #endif
13059
13060int
13061main ()
13062{
13063
13064 EC_KEY *e = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
13065 const EVP_MD *m = EVP_sha256(); /* We need this too */
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013066
13067 ;
13068 return 0;
13069}
13070_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013071if ac_fn_c_try_link "$LINENO"; then :
13072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13073$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070013074 enable_nistp256=1
13075else
Greg Hartman9768ca42017-06-22 20:49:52 -070013076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13077$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013078
Adam Langleyd0592972015-03-30 14:49:51 -070013079fi
Greg Hartman9768ca42017-06-22 20:49:52 -070013080rm -f core conftest.err conftest.$ac_objext \
13081 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013082
Greg Hartman9768ca42017-06-22 20:49:52 -070013083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_secp384r1" >&5
13084$as_echo_n "checking whether OpenSSL has NID_secp384r1... " >&6; }
13085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013086/* end confdefs.h. */
13087
13088 #include <openssl/ec.h>
13089 #include <openssl/ecdh.h>
13090 #include <openssl/ecdsa.h>
13091 #include <openssl/evp.h>
13092 #include <openssl/objects.h>
13093 #include <openssl/opensslv.h>
13094 #if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */
13095 # error "OpenSSL < 0.9.8g has unreliable ECC code"
13096 #endif
13097
13098int
13099main ()
13100{
13101
13102 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp384r1);
13103 const EVP_MD *m = EVP_sha384(); /* We need this too */
13104
13105 ;
13106 return 0;
13107}
13108_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013109if ac_fn_c_try_link "$LINENO"; then :
13110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13111$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070013112 enable_nistp384=1
13113else
Greg Hartman9768ca42017-06-22 20:49:52 -070013114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13115$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070013116
13117fi
Greg Hartman9768ca42017-06-22 20:49:52 -070013118rm -f core conftest.err conftest.$ac_objext \
13119 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013120
Greg Hartman9768ca42017-06-22 20:49:52 -070013121 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_secp521r1" >&5
13122$as_echo_n "checking whether OpenSSL has NID_secp521r1... " >&6; }
13123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013124/* end confdefs.h. */
13125
13126 #include <openssl/ec.h>
13127 #include <openssl/ecdh.h>
13128 #include <openssl/ecdsa.h>
13129 #include <openssl/evp.h>
13130 #include <openssl/objects.h>
13131 #include <openssl/opensslv.h>
13132 #if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */
13133 # error "OpenSSL < 0.9.8g has unreliable ECC code"
13134 #endif
13135
13136int
13137main ()
13138{
13139
13140 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
13141 const EVP_MD *m = EVP_sha512(); /* We need this too */
13142
13143 ;
13144 return 0;
13145}
13146_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013147if ac_fn_c_try_link "$LINENO"; then :
13148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13149$as_echo "yes" >&6; }
13150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenSSL's NID_secp521r1 is functional" >&5
13151$as_echo_n "checking if OpenSSL's NID_secp521r1 is functional... " >&6; }
13152 if test "$cross_compiling" = yes; then :
13153 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: assuming yes" >&5
13154$as_echo "$as_me: WARNING: cross-compiling: assuming yes" >&2;}
Adam Langleyd0592972015-03-30 14:49:51 -070013155 enable_nistp521=1
13156
13157else
Greg Hartman9768ca42017-06-22 20:49:52 -070013158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013159/* end confdefs.h. */
13160
13161 #include <openssl/ec.h>
13162 #include <openssl/ecdh.h>
13163 #include <openssl/ecdsa.h>
13164 #include <openssl/evp.h>
13165 #include <openssl/objects.h>
13166 #include <openssl/opensslv.h>
13167
13168int
13169main ()
13170{
13171
13172 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
13173 const EVP_MD *m = EVP_sha512(); /* We need this too */
13174 exit(e == NULL || m == NULL);
13175
13176 ;
13177 return 0;
13178}
13179_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013180if ac_fn_c_try_run "$LINENO"; then :
13181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13182$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070013183 enable_nistp521=1
13184else
Greg Hartman9768ca42017-06-22 20:49:52 -070013185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13186$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070013187fi
Greg Hartman9768ca42017-06-22 20:49:52 -070013188rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13189 conftest.$ac_objext conftest.beam conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013190fi
13191
Adam Langleyd0592972015-03-30 14:49:51 -070013192else
Greg Hartman9768ca42017-06-22 20:49:52 -070013193 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13194$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070013195
13196fi
Greg Hartman9768ca42017-06-22 20:49:52 -070013197rm -f core conftest.err conftest.$ac_objext \
13198 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013199
13200 COMMENT_OUT_ECC="#no ecc#"
13201 TEST_SSH_ECC=no
13202
13203 if test x$enable_nistp256 = x1 || test x$enable_nistp384 = x1 || \
13204 test x$enable_nistp521 = x1; then
13205
Greg Hartman9768ca42017-06-22 20:49:52 -070013206$as_echo "#define OPENSSL_HAS_ECC 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070013207
13208 fi
13209 if test x$enable_nistp256 = x1; then
13210
Greg Hartman9768ca42017-06-22 20:49:52 -070013211$as_echo "#define OPENSSL_HAS_NISTP256 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013212
13213 TEST_SSH_ECC=yes
13214 COMMENT_OUT_ECC=""
Adam Langleyd0592972015-03-30 14:49:51 -070013215 else
Greg Hartman9768ca42017-06-22 20:49:52 -070013216 unsupported_algorithms="$unsupported_algorithms \
13217 ecdsa-sha2-nistp256 \
13218 ecdh-sha2-nistp256 \
13219 ecdsa-sha2-nistp256-cert-v01@openssh.com"
Adam Langleyd0592972015-03-30 14:49:51 -070013220 fi
13221 if test x$enable_nistp384 = x1; then
13222
Greg Hartman9768ca42017-06-22 20:49:52 -070013223$as_echo "#define OPENSSL_HAS_NISTP384 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070013224
13225 TEST_SSH_ECC=yes
13226 COMMENT_OUT_ECC=""
13227 else
Greg Hartman9768ca42017-06-22 20:49:52 -070013228 unsupported_algorithms="$unsupported_algorithms \
13229 ecdsa-sha2-nistp384 \
13230 ecdh-sha2-nistp384 \
13231 ecdsa-sha2-nistp384-cert-v01@openssh.com"
Adam Langleyd0592972015-03-30 14:49:51 -070013232 fi
13233 if test x$enable_nistp521 = x1; then
13234
Greg Hartman9768ca42017-06-22 20:49:52 -070013235$as_echo "#define OPENSSL_HAS_NISTP521 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070013236
13237 TEST_SSH_ECC=yes
13238 COMMENT_OUT_ECC=""
13239 else
Greg Hartman9768ca42017-06-22 20:49:52 -070013240 unsupported_algorithms="$unsupported_algorithms \
13241 ecdh-sha2-nistp521 \
13242 ecdsa-sha2-nistp521 \
13243 ecdsa-sha2-nistp521-cert-v01@openssh.com"
Adam Langleyd0592972015-03-30 14:49:51 -070013244 fi
13245
13246
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013247
13248else
Greg Hartman9768ca42017-06-22 20:49:52 -070013249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
13250$as_echo_n "checking for crypt in -lcrypt... " >&6; }
13251if ${ac_cv_lib_crypt_crypt+:} false; then :
13252 $as_echo_n "(cached) " >&6
Adam Langleyd0592972015-03-30 14:49:51 -070013253else
13254 ac_check_lib_save_LIBS=$LIBS
13255LIBS="-lcrypt $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070013256cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013257/* end confdefs.h. */
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013258
Adam Langleyd0592972015-03-30 14:49:51 -070013259/* Override any GCC internal prototype to avoid an error.
13260 Use char because int might match the return type of a GCC
13261 builtin and then its argument prototype would still apply. */
13262#ifdef __cplusplus
13263extern "C"
13264#endif
13265char crypt ();
13266int
13267main ()
13268{
13269return crypt ();
13270 ;
13271 return 0;
13272}
13273_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013274if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070013275 ac_cv_lib_crypt_crypt=yes
13276else
Greg Hartman9768ca42017-06-22 20:49:52 -070013277 ac_cv_lib_crypt_crypt=no
Adam Langleyd0592972015-03-30 14:49:51 -070013278fi
Greg Hartman9768ca42017-06-22 20:49:52 -070013279rm -f core conftest.err conftest.$ac_objext \
13280 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013281LIBS=$ac_check_lib_save_LIBS
13282fi
Greg Hartman9768ca42017-06-22 20:49:52 -070013283{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
13284$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
13285if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070013286 LIBS="$LIBS -lcrypt"
13287fi
13288
Greg Hartman9768ca42017-06-22 20:49:52 -070013289 for ac_func in crypt
13290do :
13291 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
13292if test "x$ac_cv_func_crypt" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070013293 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013294#define HAVE_CRYPT 1
Adam Langleyd0592972015-03-30 14:49:51 -070013295_ACEOF
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013296
13297fi
Adam Langleyd0592972015-03-30 14:49:51 -070013298done
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013299
Adam Langleyd0592972015-03-30 14:49:51 -070013300fi
13301
Adam Langleyd0592972015-03-30 14:49:51 -070013302for ac_func in \
13303 arc4random \
13304 arc4random_buf \
13305 arc4random_stir \
13306 arc4random_uniform \
13307
Greg Hartman9768ca42017-06-22 20:49:52 -070013308do :
13309 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13310ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13311if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070013312 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013313#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Adam Langleyd0592972015-03-30 14:49:51 -070013314_ACEOF
13315
13316fi
13317done
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013318
13319
13320saved_LIBS="$LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070013321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ia_openinfo in -liaf" >&5
13322$as_echo_n "checking for ia_openinfo in -liaf... " >&6; }
13323if ${ac_cv_lib_iaf_ia_openinfo+:} false; then :
13324 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013325else
13326 ac_check_lib_save_LIBS=$LIBS
13327LIBS="-liaf $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070013328cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013329/* end confdefs.h. */
13330
13331/* Override any GCC internal prototype to avoid an error.
13332 Use char because int might match the return type of a GCC
13333 builtin and then its argument prototype would still apply. */
13334#ifdef __cplusplus
13335extern "C"
13336#endif
13337char ia_openinfo ();
13338int
13339main ()
13340{
13341return ia_openinfo ();
13342 ;
13343 return 0;
13344}
13345_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013346if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013347 ac_cv_lib_iaf_ia_openinfo=yes
13348else
Greg Hartman9768ca42017-06-22 20:49:52 -070013349 ac_cv_lib_iaf_ia_openinfo=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013350fi
Greg Hartman9768ca42017-06-22 20:49:52 -070013351rm -f core conftest.err conftest.$ac_objext \
13352 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013353LIBS=$ac_check_lib_save_LIBS
13354fi
Greg Hartman9768ca42017-06-22 20:49:52 -070013355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iaf_ia_openinfo" >&5
13356$as_echo "$ac_cv_lib_iaf_ia_openinfo" >&6; }
13357if test "x$ac_cv_lib_iaf_ia_openinfo" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013358
13359 LIBS="$LIBS -liaf"
Greg Hartman9768ca42017-06-22 20:49:52 -070013360 for ac_func in set_id
13361do :
13362 ac_fn_c_check_func "$LINENO" "set_id" "ac_cv_func_set_id"
13363if test "x$ac_cv_func_set_id" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013364 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013365#define HAVE_SET_ID 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013366_ACEOF
13367 SSHDLIBS="$SSHDLIBS -liaf"
13368
Greg Hartman9768ca42017-06-22 20:49:52 -070013369$as_echo "#define HAVE_LIBIAF 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013370
13371
13372fi
13373done
13374
13375
13376fi
13377
13378LIBS="$saved_LIBS"
13379
13380### Configure cryptographic random number support
13381
13382# Check wheter OpenSSL seeds itself
Adam Langleyd0592972015-03-30 14:49:51 -070013383if test "x$openssl" = "xyes" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070013384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's PRNG is internally seeded" >&5
13385$as_echo_n "checking whether OpenSSL's PRNG is internally seeded... " >&6; }
13386 if test "$cross_compiling" = yes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013387
Greg Hartman9768ca42017-06-22 20:49:52 -070013388 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
13389$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
Adam Langleyd0592972015-03-30 14:49:51 -070013390 # This is safe, since we will fatal() at runtime if
13391 # OpenSSL is not seeded correctly.
13392 OPENSSL_SEEDS_ITSELF=yes
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013393
13394
13395else
Greg Hartman9768ca42017-06-22 20:49:52 -070013396 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013397/* end confdefs.h. */
13398
Adam Langleyd0592972015-03-30 14:49:51 -070013399 #include <string.h>
13400 #include <openssl/rand.h>
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013401
13402int
13403main ()
13404{
13405
Adam Langleyd0592972015-03-30 14:49:51 -070013406 exit(RAND_status() == 1 ? 0 : 1);
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013407
13408 ;
13409 return 0;
13410}
13411_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013412if ac_fn_c_try_run "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013413
Adam Langleyd0592972015-03-30 14:49:51 -070013414 OPENSSL_SEEDS_ITSELF=yes
Greg Hartman9768ca42017-06-22 20:49:52 -070013415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13416$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013417
13418else
13419
Greg Hartman9768ca42017-06-22 20:49:52 -070013420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13421$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013422
13423fi
Greg Hartman9768ca42017-06-22 20:49:52 -070013424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13425 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013426fi
13427
Adam Langleyd0592972015-03-30 14:49:51 -070013428fi
13429
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013430# PRNGD TCP socket
13431
13432# Check whether --with-prngd-port was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070013433if test "${with_prngd_port+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013434 withval=$with_prngd_port;
13435 case "$withval" in
13436 no)
13437 withval=""
13438 ;;
13439 [0-9]*)
13440 ;;
13441 *)
Greg Hartman9768ca42017-06-22 20:49:52 -070013442 as_fn_error $? "You must specify a numeric port number for --with-prngd-port" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013443 ;;
13444 esac
13445 if test ! -z "$withval" ; then
13446 PRNGD_PORT="$withval"
13447
13448cat >>confdefs.h <<_ACEOF
13449#define PRNGD_PORT $PRNGD_PORT
13450_ACEOF
13451
13452 fi
13453
13454
13455fi
13456
13457
13458# PRNGD Unix domain socket
13459
13460# Check whether --with-prngd-socket was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070013461if test "${with_prngd_socket+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013462 withval=$with_prngd_socket;
13463 case "$withval" in
13464 yes)
13465 withval="/var/run/egd-pool"
13466 ;;
13467 no)
13468 withval=""
13469 ;;
13470 /*)
13471 ;;
13472 *)
Greg Hartman9768ca42017-06-22 20:49:52 -070013473 as_fn_error $? "You must specify an absolute path to the entropy socket" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013474 ;;
13475 esac
13476
13477 if test ! -z "$withval" ; then
13478 if test ! -z "$PRNGD_PORT" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070013479 as_fn_error $? "You may not specify both a PRNGD/EGD port and socket" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013480 fi
13481 if test ! -r "$withval" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070013482 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Entropy socket is not readable" >&5
13483$as_echo "$as_me: WARNING: Entropy socket is not readable" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013484 fi
13485 PRNGD_SOCKET="$withval"
13486
13487cat >>confdefs.h <<_ACEOF
13488#define PRNGD_SOCKET "$PRNGD_SOCKET"
13489_ACEOF
13490
13491 fi
13492
13493else
13494
13495 # Check for existing socket only if we don't have a random device already
13496 if test "x$OPENSSL_SEEDS_ITSELF" != "xyes" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070013497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRNGD/EGD socket" >&5
13498$as_echo_n "checking for PRNGD/EGD socket... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013499 # Insert other locations here
13500 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
13501 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
13502 PRNGD_SOCKET="$sock"
13503 cat >>confdefs.h <<_ACEOF
13504#define PRNGD_SOCKET "$PRNGD_SOCKET"
13505_ACEOF
13506
13507 break;
13508 fi
13509 done
13510 if test ! -z "$PRNGD_SOCKET" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070013511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRNGD_SOCKET" >&5
13512$as_echo "$PRNGD_SOCKET" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013513 else
Greg Hartman9768ca42017-06-22 20:49:52 -070013514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13515$as_echo "not found" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013516 fi
13517 fi
13518
13519
13520fi
13521
13522
13523# Which randomness source do we use?
13524if test ! -z "$PRNGD_PORT" ; then
13525 RAND_MSG="PRNGd port $PRNGD_PORT"
13526elif test ! -z "$PRNGD_SOCKET" ; then
13527 RAND_MSG="PRNGd socket $PRNGD_SOCKET"
13528elif test ! -z "$OPENSSL_SEEDS_ITSELF" ; then
13529
Greg Hartman9768ca42017-06-22 20:49:52 -070013530$as_echo "#define OPENSSL_PRNG_ONLY 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013531
13532 RAND_MSG="OpenSSL internal ONLY"
Adam Langleyd0592972015-03-30 14:49:51 -070013533elif test "x$openssl" = "xno" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070013534 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OpenSSH will use /dev/urandom as a source of random numbers. It will fail if this device is not supported or accessible" >&5
13535$as_echo "$as_me: WARNING: OpenSSH will use /dev/urandom as a source of random numbers. It will fail if this device is not supported or accessible" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013536else
Greg Hartman9768ca42017-06-22 20:49:52 -070013537 as_fn_error $? "OpenSSH has no source of random numbers. Please configure OpenSSL with an entropy source or re-run configure using one of the --with-prngd-port or --with-prngd-socket options" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013538fi
13539
13540# Check for PAM libs
13541PAM_MSG="no"
13542
13543# Check whether --with-pam was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070013544if test "${with_pam+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013545 withval=$with_pam;
13546 if test "x$withval" != "xno" ; then
13547 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
13548 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070013549 as_fn_error $? "PAM headers not found" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013550 fi
13551
13552 saved_LIBS="$LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070013553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13554$as_echo_n "checking for dlopen in -ldl... " >&6; }
13555if ${ac_cv_lib_dl_dlopen+:} false; then :
13556 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013557else
13558 ac_check_lib_save_LIBS=$LIBS
13559LIBS="-ldl $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070013560cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013561/* end confdefs.h. */
13562
13563/* Override any GCC internal prototype to avoid an error.
13564 Use char because int might match the return type of a GCC
13565 builtin and then its argument prototype would still apply. */
13566#ifdef __cplusplus
13567extern "C"
13568#endif
13569char dlopen ();
13570int
13571main ()
13572{
13573return dlopen ();
13574 ;
13575 return 0;
13576}
13577_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013578if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013579 ac_cv_lib_dl_dlopen=yes
13580else
Greg Hartman9768ca42017-06-22 20:49:52 -070013581 ac_cv_lib_dl_dlopen=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013582fi
Greg Hartman9768ca42017-06-22 20:49:52 -070013583rm -f core conftest.err conftest.$ac_objext \
13584 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013585LIBS=$ac_check_lib_save_LIBS
13586fi
Greg Hartman9768ca42017-06-22 20:49:52 -070013587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13588$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13589if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013590 cat >>confdefs.h <<_ACEOF
13591#define HAVE_LIBDL 1
13592_ACEOF
13593
13594 LIBS="-ldl $LIBS"
13595
13596fi
13597
Greg Hartman9768ca42017-06-22 20:49:52 -070013598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_set_item in -lpam" >&5
13599$as_echo_n "checking for pam_set_item in -lpam... " >&6; }
13600if ${ac_cv_lib_pam_pam_set_item+:} false; then :
13601 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013602else
13603 ac_check_lib_save_LIBS=$LIBS
13604LIBS="-lpam $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070013605cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013606/* end confdefs.h. */
13607
13608/* Override any GCC internal prototype to avoid an error.
13609 Use char because int might match the return type of a GCC
13610 builtin and then its argument prototype would still apply. */
13611#ifdef __cplusplus
13612extern "C"
13613#endif
13614char pam_set_item ();
13615int
13616main ()
13617{
13618return pam_set_item ();
13619 ;
13620 return 0;
13621}
13622_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013623if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013624 ac_cv_lib_pam_pam_set_item=yes
13625else
Greg Hartman9768ca42017-06-22 20:49:52 -070013626 ac_cv_lib_pam_pam_set_item=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013627fi
Greg Hartman9768ca42017-06-22 20:49:52 -070013628rm -f core conftest.err conftest.$ac_objext \
13629 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013630LIBS=$ac_check_lib_save_LIBS
13631fi
Greg Hartman9768ca42017-06-22 20:49:52 -070013632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_set_item" >&5
13633$as_echo "$ac_cv_lib_pam_pam_set_item" >&6; }
13634if test "x$ac_cv_lib_pam_pam_set_item" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013635 cat >>confdefs.h <<_ACEOF
13636#define HAVE_LIBPAM 1
13637_ACEOF
13638
13639 LIBS="-lpam $LIBS"
13640
13641else
Greg Hartman9768ca42017-06-22 20:49:52 -070013642 as_fn_error $? "*** libpam missing" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013643fi
13644
Greg Hartman9768ca42017-06-22 20:49:52 -070013645 for ac_func in pam_getenvlist
13646do :
13647 ac_fn_c_check_func "$LINENO" "pam_getenvlist" "ac_cv_func_pam_getenvlist"
13648if test "x$ac_cv_func_pam_getenvlist" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013649 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013650#define HAVE_PAM_GETENVLIST 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013651_ACEOF
13652
13653fi
13654done
13655
Greg Hartman9768ca42017-06-22 20:49:52 -070013656 for ac_func in pam_putenv
13657do :
13658 ac_fn_c_check_func "$LINENO" "pam_putenv" "ac_cv_func_pam_putenv"
13659if test "x$ac_cv_func_pam_putenv" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013660 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013661#define HAVE_PAM_PUTENV 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013662_ACEOF
13663
13664fi
13665done
13666
13667 LIBS="$saved_LIBS"
13668
13669 PAM_MSG="yes"
13670
13671 SSHDLIBS="$SSHDLIBS -lpam"
13672
Greg Hartman9768ca42017-06-22 20:49:52 -070013673$as_echo "#define USE_PAM 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013674
13675
13676 if test $ac_cv_lib_dl_dlopen = yes; then
13677 case "$LIBS" in
13678 *-ldl*)
13679 # libdl already in LIBS
13680 ;;
13681 *)
13682 SSHDLIBS="$SSHDLIBS -ldl"
13683 ;;
13684 esac
13685 fi
13686 fi
13687
13688
13689fi
13690
13691
Greg Hartman9768ca42017-06-22 20:49:52 -070013692
13693# Check whether --with-pam-service was given.
13694if test "${with_pam_service+set}" = set; then :
13695 withval=$with_pam_service;
13696 if test "x$withval" != "xno" && \
13697 test "x$withval" != "xyes" ; then
13698
13699cat >>confdefs.h <<_ACEOF
13700#define SSHD_PAM_SERVICE "$withval"
13701_ACEOF
13702
13703 fi
13704
13705
13706fi
13707
13708
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013709# Check for older PAM
13710if test "x$PAM_MSG" = "xyes" ; then
13711 # Check PAM strerror arguments (old PAM)
Greg Hartman9768ca42017-06-22 20:49:52 -070013712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pam_strerror takes only one argument" >&5
13713$as_echo_n "checking whether pam_strerror takes only one argument... " >&6; }
13714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013715/* end confdefs.h. */
13716
13717#include <stdlib.h>
13718#if defined(HAVE_SECURITY_PAM_APPL_H)
13719#include <security/pam_appl.h>
13720#elif defined (HAVE_PAM_PAM_APPL_H)
13721#include <pam/pam_appl.h>
13722#endif
13723
13724int
13725main ()
13726{
13727
13728(void)pam_strerror((pam_handle_t *)NULL, -1);
13729
13730 ;
13731 return 0;
13732}
13733_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013734if ac_fn_c_try_compile "$LINENO"; then :
13735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13736$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013737else
13738
13739
Greg Hartman9768ca42017-06-22 20:49:52 -070013740$as_echo "#define HAVE_OLD_PAM 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013741
Greg Hartman9768ca42017-06-22 20:49:52 -070013742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13743$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013744 PAM_MSG="yes (old library)"
13745
13746
13747fi
13748rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13749fi
13750
Adam Langleyd0592972015-03-30 14:49:51 -070013751case "$host" in
13752*-*-cygwin*)
13753 SSH_PRIVSEP_USER=CYGWIN_SSH_PRIVSEP_USER
13754 ;;
13755*)
13756 SSH_PRIVSEP_USER=sshd
13757 ;;
13758esac
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013759
13760# Check whether --with-privsep-user was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070013761if test "${with_privsep_user+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013762 withval=$with_privsep_user;
13763 if test -n "$withval" && test "x$withval" != "xno" && \
13764 test "x${withval}" != "xyes"; then
13765 SSH_PRIVSEP_USER=$withval
13766 fi
13767
13768
13769fi
13770
Adam Langleyd0592972015-03-30 14:49:51 -070013771if test "x$SSH_PRIVSEP_USER" = "xCYGWIN_SSH_PRIVSEP_USER" ; then
13772
13773cat >>confdefs.h <<_ACEOF
13774#define SSH_PRIVSEP_USER CYGWIN_SSH_PRIVSEP_USER
13775_ACEOF
13776
13777else
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013778
13779cat >>confdefs.h <<_ACEOF
13780#define SSH_PRIVSEP_USER "$SSH_PRIVSEP_USER"
13781_ACEOF
13782
Adam Langleyd0592972015-03-30 14:49:51 -070013783fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013784
13785
Adam Langleyd0592972015-03-30 14:49:51 -070013786if test "x$have_linux_no_new_privs" = "x1" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070013787ac_fn_c_check_decl "$LINENO" "SECCOMP_MODE_FILTER" "ac_cv_have_decl_SECCOMP_MODE_FILTER" "
Adam Langleyd0592972015-03-30 14:49:51 -070013788 #include <sys/types.h>
13789 #include <linux/seccomp.h>
13790
Greg Hartman9768ca42017-06-22 20:49:52 -070013791"
13792if test "x$ac_cv_have_decl_SECCOMP_MODE_FILTER" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070013793 have_seccomp_filter=1
13794fi
13795
13796fi
13797if test "x$have_seccomp_filter" = "x1" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070013798{ $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel for seccomp_filter support" >&5
13799$as_echo_n "checking kernel for seccomp_filter support... " >&6; }
13800cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013801/* end confdefs.h. */
13802
13803 #include <errno.h>
13804 #include <elf.h>
13805 #include <linux/audit.h>
13806 #include <linux/seccomp.h>
13807 #include <stdlib.h>
13808 #include <sys/prctl.h>
13809
13810int
13811main ()
13812{
13813 int i = $seccomp_audit_arch;
13814 errno = 0;
13815 prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0);
13816 exit(errno == EFAULT ? 0 : 1);
13817 ;
13818 return 0;
13819}
13820_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013821if ac_fn_c_try_link "$LINENO"; then :
13822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13823$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070013824else
Adam Langleyd0592972015-03-30 14:49:51 -070013825
Greg Hartman9768ca42017-06-22 20:49:52 -070013826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13827$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070013828 # Disable seccomp filter as a target
13829 have_seccomp_filter=0
13830
13831
13832fi
Greg Hartman9768ca42017-06-22 20:49:52 -070013833rm -f core conftest.err conftest.$ac_objext \
13834 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013835fi
13836
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013837# Decide which sandbox style to use
13838sandbox_arg=""
13839
13840# Check whether --with-sandbox was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070013841if test "${with_sandbox+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080013842 withval=$with_sandbox;
13843 if test "x$withval" = "xyes" ; then
13844 sandbox_arg=""
13845 else
13846 sandbox_arg="$withval"
13847 fi
13848
13849
13850fi
13851
Adam Langleyd0592972015-03-30 14:49:51 -070013852
13853# Some platforms (seems to be the ones that have a kernel poll(2)-type
13854# function with which they implement select(2)) use an extra file descriptor
13855# when calling select(2), which means we can't use the rlimit sandbox.
Greg Hartman9768ca42017-06-22 20:49:52 -070013856{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if select works with descriptor rlimit" >&5
13857$as_echo_n "checking if select works with descriptor rlimit... " >&6; }
13858if test "$cross_compiling" = yes; then :
13859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
13860$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
Adam Langleyd0592972015-03-30 14:49:51 -070013861
13862else
Greg Hartman9768ca42017-06-22 20:49:52 -070013863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013864/* end confdefs.h. */
13865
13866#include <sys/types.h>
13867#ifdef HAVE_SYS_TIME_H
13868# include <sys/time.h>
13869#endif
13870#include <sys/resource.h>
13871#ifdef HAVE_SYS_SELECT_H
13872# include <sys/select.h>
13873#endif
13874#include <errno.h>
13875#include <fcntl.h>
13876#include <stdlib.h>
13877
13878int
13879main ()
13880{
13881
13882 struct rlimit rl_zero;
13883 int fd, r;
13884 fd_set fds;
13885 struct timeval tv;
13886
13887 fd = open("/dev/null", O_RDONLY);
13888 FD_ZERO(&fds);
13889 FD_SET(fd, &fds);
13890 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
13891 setrlimit(RLIMIT_FSIZE, &rl_zero);
13892 setrlimit(RLIMIT_NOFILE, &rl_zero);
13893 tv.tv_sec = 1;
13894 tv.tv_usec = 0;
13895 r = select(fd+1, &fds, NULL, NULL, &tv);
13896 exit (r == -1 ? 1 : 0);
13897
13898 ;
13899 return 0;
13900}
13901_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013902if ac_fn_c_try_run "$LINENO"; then :
13903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13904$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070013905 select_works_with_rlimit=yes
13906else
Greg Hartman9768ca42017-06-22 20:49:52 -070013907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13908$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070013909 select_works_with_rlimit=no
13910fi
Greg Hartman9768ca42017-06-22 20:49:52 -070013911rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13912 conftest.$ac_objext conftest.beam conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013913fi
13914
13915
Greg Hartman9768ca42017-06-22 20:49:52 -070013916{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if setrlimit(RLIMIT_NOFILE,{0,0}) works" >&5
13917$as_echo_n "checking if setrlimit(RLIMIT_NOFILE,{0,0}) works... " >&6; }
13918if test "$cross_compiling" = yes; then :
13919 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
13920$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
Adam Langleyd0592972015-03-30 14:49:51 -070013921
13922else
Greg Hartman9768ca42017-06-22 20:49:52 -070013923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013924/* end confdefs.h. */
13925
13926#include <sys/types.h>
13927#ifdef HAVE_SYS_TIME_H
13928# include <sys/time.h>
13929#endif
13930#include <sys/resource.h>
13931#include <errno.h>
13932#include <stdlib.h>
13933
13934int
13935main ()
13936{
13937
13938 struct rlimit rl_zero;
13939 int fd, r;
13940 fd_set fds;
13941
13942 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
13943 r = setrlimit(RLIMIT_NOFILE, &rl_zero);
13944 exit (r == -1 ? 1 : 0);
13945
13946 ;
13947 return 0;
13948}
13949_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013950if ac_fn_c_try_run "$LINENO"; then :
13951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13952$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070013953 rlimit_nofile_zero_works=yes
13954else
Greg Hartman9768ca42017-06-22 20:49:52 -070013955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13956$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070013957 rlimit_nofile_zero_works=no
13958fi
Greg Hartman9768ca42017-06-22 20:49:52 -070013959rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13960 conftest.$ac_objext conftest.beam conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013961fi
13962
13963
Greg Hartman9768ca42017-06-22 20:49:52 -070013964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if setrlimit RLIMIT_FSIZE works" >&5
13965$as_echo_n "checking if setrlimit RLIMIT_FSIZE works... " >&6; }
13966if test "$cross_compiling" = yes; then :
13967 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
13968$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
Adam Langleyd0592972015-03-30 14:49:51 -070013969
13970else
Greg Hartman9768ca42017-06-22 20:49:52 -070013971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070013972/* end confdefs.h. */
13973
13974#include <sys/types.h>
13975#include <sys/resource.h>
13976#include <stdlib.h>
13977
13978int
13979main ()
13980{
13981
13982 struct rlimit rl_zero;
13983
13984 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
13985 exit(setrlimit(RLIMIT_FSIZE, &rl_zero) != 0);
13986
13987 ;
13988 return 0;
13989}
13990_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070013991if ac_fn_c_try_run "$LINENO"; then :
13992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13993$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070013994else
Greg Hartman9768ca42017-06-22 20:49:52 -070013995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13996$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070013997
Greg Hartman9768ca42017-06-22 20:49:52 -070013998$as_echo "#define SANDBOX_SKIP_RLIMIT_FSIZE 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070013999
14000fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014001rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14002 conftest.$ac_objext conftest.beam conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070014003fi
14004
14005
Greg Hartman9768ca42017-06-22 20:49:52 -070014006if test "x$sandbox_arg" = "xpledge" || \
14007 ( test -z "$sandbox_arg" && test "x$ac_cv_func_pledge" = "xyes" ) ; then
14008 test "x$ac_cv_func_pledge" != "xyes" && \
14009 as_fn_error $? "pledge sandbox requires pledge(2) support" "$LINENO" 5
14010 SANDBOX_STYLE="pledge"
Adam Langleyd0592972015-03-30 14:49:51 -070014011
Greg Hartman9768ca42017-06-22 20:49:52 -070014012$as_echo "#define SANDBOX_PLEDGE 1" >>confdefs.h
14013
14014elif test "x$sandbox_arg" = "xsystrace" || \
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014015 ( test -z "$sandbox_arg" && test "x$have_systr_policy_kill" = "x1" ) ; then
14016 test "x$have_systr_policy_kill" != "x1" && \
Greg Hartman9768ca42017-06-22 20:49:52 -070014017 as_fn_error $? "systrace sandbox requires systrace headers and SYSTR_POLICY_KILL support" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014018 SANDBOX_STYLE="systrace"
14019
Greg Hartman9768ca42017-06-22 20:49:52 -070014020$as_echo "#define SANDBOX_SYSTRACE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014021
14022elif test "x$sandbox_arg" = "xdarwin" || \
14023 ( test -z "$sandbox_arg" && test "x$ac_cv_func_sandbox_init" = "xyes" && \
14024 test "x$ac_cv_header_sandbox_h" = "xyes") ; then
14025 test "x$ac_cv_func_sandbox_init" != "xyes" -o \
14026 "x$ac_cv_header_sandbox_h" != "xyes" && \
Greg Hartman9768ca42017-06-22 20:49:52 -070014027 as_fn_error $? "Darwin seatbelt sandbox requires sandbox.h and sandbox_init function" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014028 SANDBOX_STYLE="darwin"
14029
Greg Hartman9768ca42017-06-22 20:49:52 -070014030$as_echo "#define SANDBOX_DARWIN 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070014031
14032elif test "x$sandbox_arg" = "xseccomp_filter" || \
14033 ( test -z "$sandbox_arg" && \
14034 test "x$have_seccomp_filter" = "x1" && \
14035 test "x$ac_cv_header_elf_h" = "xyes" && \
14036 test "x$ac_cv_header_linux_audit_h" = "xyes" && \
14037 test "x$ac_cv_header_linux_filter_h" = "xyes" && \
14038 test "x$seccomp_audit_arch" != "x" && \
14039 test "x$have_linux_no_new_privs" = "x1" && \
14040 test "x$ac_cv_func_prctl" = "xyes" ) ; then
14041 test "x$seccomp_audit_arch" = "x" && \
Greg Hartman9768ca42017-06-22 20:49:52 -070014042 as_fn_error $? "seccomp_filter sandbox not supported on $host" "$LINENO" 5
Adam Langleyd0592972015-03-30 14:49:51 -070014043 test "x$have_linux_no_new_privs" != "x1" && \
Greg Hartman9768ca42017-06-22 20:49:52 -070014044 as_fn_error $? "seccomp_filter sandbox requires PR_SET_NO_NEW_PRIVS" "$LINENO" 5
Adam Langleyd0592972015-03-30 14:49:51 -070014045 test "x$have_seccomp_filter" != "x1" && \
Greg Hartman9768ca42017-06-22 20:49:52 -070014046 as_fn_error $? "seccomp_filter sandbox requires seccomp headers" "$LINENO" 5
Adam Langleyd0592972015-03-30 14:49:51 -070014047 test "x$ac_cv_func_prctl" != "xyes" && \
Greg Hartman9768ca42017-06-22 20:49:52 -070014048 as_fn_error $? "seccomp_filter sandbox requires prctl function" "$LINENO" 5
Adam Langleyd0592972015-03-30 14:49:51 -070014049 SANDBOX_STYLE="seccomp_filter"
14050
Greg Hartman9768ca42017-06-22 20:49:52 -070014051$as_echo "#define SANDBOX_SECCOMP_FILTER 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070014052
14053elif test "x$sandbox_arg" = "xcapsicum" || \
14054 ( test -z "$sandbox_arg" && \
14055 test "x$ac_cv_header_sys_capability_h" = "xyes" && \
14056 test "x$ac_cv_func_cap_rights_limit" = "xyes") ; then
14057 test "x$ac_cv_header_sys_capability_h" != "xyes" && \
Greg Hartman9768ca42017-06-22 20:49:52 -070014058 as_fn_error $? "capsicum sandbox requires sys/capability.h header" "$LINENO" 5
Adam Langleyd0592972015-03-30 14:49:51 -070014059 test "x$ac_cv_func_cap_rights_limit" != "xyes" && \
Greg Hartman9768ca42017-06-22 20:49:52 -070014060 as_fn_error $? "capsicum sandbox requires cap_rights_limit function" "$LINENO" 5
Adam Langleyd0592972015-03-30 14:49:51 -070014061 SANDBOX_STYLE="capsicum"
14062
Greg Hartman9768ca42017-06-22 20:49:52 -070014063$as_echo "#define SANDBOX_CAPSICUM 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014064
14065elif test "x$sandbox_arg" = "xrlimit" || \
Adam Langleyd0592972015-03-30 14:49:51 -070014066 ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" && \
14067 test "x$select_works_with_rlimit" = "xyes" && \
14068 test "x$rlimit_nofile_zero_works" = "xyes" ) ; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014069 test "x$ac_cv_func_setrlimit" != "xyes" && \
Greg Hartman9768ca42017-06-22 20:49:52 -070014070 as_fn_error $? "rlimit sandbox requires setrlimit function" "$LINENO" 5
Adam Langleyd0592972015-03-30 14:49:51 -070014071 test "x$select_works_with_rlimit" != "xyes" && \
Greg Hartman9768ca42017-06-22 20:49:52 -070014072 as_fn_error $? "rlimit sandbox requires select to work with rlimit" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014073 SANDBOX_STYLE="rlimit"
14074
Greg Hartman9768ca42017-06-22 20:49:52 -070014075$as_echo "#define SANDBOX_RLIMIT 1" >>confdefs.h
14076
14077elif test "x$sandbox_arg" = "xsolaris" || \
14078 ( test -z "$sandbox_arg" && test "x$SOLARIS_PRIVS" = "xyes" ) ; then
14079 SANDBOX_STYLE="solaris"
14080
14081$as_echo "#define SANDBOX_SOLARIS 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014082
14083elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \
14084 test "x$sandbox_arg" = "xnone" || test "x$sandbox_arg" = "xnull" ; then
14085 SANDBOX_STYLE="none"
14086
Greg Hartman9768ca42017-06-22 20:49:52 -070014087$as_echo "#define SANDBOX_NULL 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014088
14089else
Greg Hartman9768ca42017-06-22 20:49:52 -070014090 as_fn_error $? "unsupported --with-sandbox" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014091fi
14092
14093# Cheap hack to ensure NEWS-OS libraries are arranged right.
14094if test ! -z "$SONY" ; then
14095 LIBS="$LIBS -liberty";
14096fi
14097
14098# Check for long long datatypes
Greg Hartman9768ca42017-06-22 20:49:52 -070014099ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
14100if test "x$ac_cv_type_long_long" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014101
14102cat >>confdefs.h <<_ACEOF
14103#define HAVE_LONG_LONG 1
14104_ACEOF
14105
14106
14107fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014108ac_fn_c_check_type "$LINENO" "unsigned long long" "ac_cv_type_unsigned_long_long" "$ac_includes_default"
14109if test "x$ac_cv_type_unsigned_long_long" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014110
14111cat >>confdefs.h <<_ACEOF
14112#define HAVE_UNSIGNED_LONG_LONG 1
14113_ACEOF
14114
14115
14116fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014117ac_fn_c_check_type "$LINENO" "long double" "ac_cv_type_long_double" "$ac_includes_default"
14118if test "x$ac_cv_type_long_double" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014119
14120cat >>confdefs.h <<_ACEOF
14121#define HAVE_LONG_DOUBLE 1
14122_ACEOF
14123
14124
14125fi
14126
14127
14128# Check datatype sizes
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014129# The cast to long int works around a bug in the HP C Compiler
14130# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14131# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14132# This bug is HP SR number 8606223364.
Greg Hartman9768ca42017-06-22 20:49:52 -070014133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short int" >&5
14134$as_echo_n "checking size of short int... " >&6; }
14135if ${ac_cv_sizeof_short_int+:} false; then :
14136 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014137else
Greg Hartman9768ca42017-06-22 20:49:52 -070014138 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short int))" "ac_cv_sizeof_short_int" "$ac_includes_default"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014139
14140else
Greg Hartman9768ca42017-06-22 20:49:52 -070014141 if test "$ac_cv_type_short_int" = yes; then
14142 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14143$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14144as_fn_error 77 "cannot compute sizeof (short int)
14145See \`config.log' for more details" "$LINENO" 5; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014146 else
14147 ac_cv_sizeof_short_int=0
14148 fi
14149fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014150
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014151fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short_int" >&5
14153$as_echo "$ac_cv_sizeof_short_int" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014154
14155
14156
14157cat >>confdefs.h <<_ACEOF
14158#define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
14159_ACEOF
14160
14161
14162# The cast to long int works around a bug in the HP C Compiler
14163# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14164# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14165# This bug is HP SR number 8606223364.
Greg Hartman9768ca42017-06-22 20:49:52 -070014166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
14167$as_echo_n "checking size of int... " >&6; }
14168if ${ac_cv_sizeof_int+:} false; then :
14169 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014170else
Greg Hartman9768ca42017-06-22 20:49:52 -070014171 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014172
14173else
Greg Hartman9768ca42017-06-22 20:49:52 -070014174 if test "$ac_cv_type_int" = yes; then
14175 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14176$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14177as_fn_error 77 "cannot compute sizeof (int)
14178See \`config.log' for more details" "$LINENO" 5; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014179 else
14180 ac_cv_sizeof_int=0
14181 fi
14182fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014183
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014184fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
14186$as_echo "$ac_cv_sizeof_int" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014187
14188
14189
14190cat >>confdefs.h <<_ACEOF
14191#define SIZEOF_INT $ac_cv_sizeof_int
14192_ACEOF
14193
14194
14195# The cast to long int works around a bug in the HP C Compiler
14196# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14197# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14198# This bug is HP SR number 8606223364.
Greg Hartman9768ca42017-06-22 20:49:52 -070014199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5
14200$as_echo_n "checking size of long int... " >&6; }
14201if ${ac_cv_sizeof_long_int+:} false; then :
14202 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014203else
Greg Hartman9768ca42017-06-22 20:49:52 -070014204 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014205
14206else
Greg Hartman9768ca42017-06-22 20:49:52 -070014207 if test "$ac_cv_type_long_int" = yes; then
14208 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14209$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14210as_fn_error 77 "cannot compute sizeof (long int)
14211See \`config.log' for more details" "$LINENO" 5; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014212 else
14213 ac_cv_sizeof_long_int=0
14214 fi
14215fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014216
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014217fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_int" >&5
14219$as_echo "$ac_cv_sizeof_long_int" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014220
14221
14222
14223cat >>confdefs.h <<_ACEOF
14224#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
14225_ACEOF
14226
14227
14228# The cast to long int works around a bug in the HP C Compiler
14229# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14230# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14231# This bug is HP SR number 8606223364.
Greg Hartman9768ca42017-06-22 20:49:52 -070014232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5
14233$as_echo_n "checking size of long long int... " >&6; }
14234if ${ac_cv_sizeof_long_long_int+:} false; then :
14235 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014236else
Greg Hartman9768ca42017-06-22 20:49:52 -070014237 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014238
14239else
Greg Hartman9768ca42017-06-22 20:49:52 -070014240 if test "$ac_cv_type_long_long_int" = yes; then
14241 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14242$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14243as_fn_error 77 "cannot compute sizeof (long long int)
14244See \`config.log' for more details" "$LINENO" 5; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014245 else
14246 ac_cv_sizeof_long_long_int=0
14247 fi
14248fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014249
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014250fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long_int" >&5
14252$as_echo "$ac_cv_sizeof_long_long_int" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014253
14254
14255
14256cat >>confdefs.h <<_ACEOF
14257#define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
14258_ACEOF
14259
14260
14261
14262# Sanity check long long for some platforms (AIX)
14263if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
14264 ac_cv_sizeof_long_long_int=0
14265fi
14266
14267# compute LLONG_MIN and LLONG_MAX if we don't know them.
14268if test -z "$have_llong_max"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070014269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for max value of long long" >&5
14270$as_echo_n "checking for max value of long long... " >&6; }
14271 if test "$cross_compiling" = yes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014272
Greg Hartman9768ca42017-06-22 20:49:52 -070014273 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
14274$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014275
14276
14277else
Greg Hartman9768ca42017-06-22 20:49:52 -070014278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014279/* end confdefs.h. */
14280
14281#include <stdio.h>
14282/* Why is this so damn hard? */
14283#ifdef __GNUC__
14284# undef __GNUC__
14285#endif
14286#define __USE_ISOC99
14287#include <limits.h>
14288#define DATA "conftest.llminmax"
14289#define my_abs(a) ((a) < 0 ? ((a) * -1) : (a))
14290
14291/*
14292 * printf in libc on some platforms (eg old Tru64) does not understand %lld so
14293 * we do this the hard way.
14294 */
14295static int
14296fprint_ll(FILE *f, long long n)
14297{
14298 unsigned int i;
14299 int l[sizeof(long long) * 8];
14300
14301 if (n < 0)
14302 if (fprintf(f, "-") < 0)
14303 return -1;
14304 for (i = 0; n != 0; i++) {
14305 l[i] = my_abs(n % 10);
14306 n /= 10;
14307 }
14308 do {
14309 if (fprintf(f, "%d", l[--i]) < 0)
14310 return -1;
14311 } while (i != 0);
14312 if (fprintf(f, " ") < 0)
14313 return -1;
14314 return 0;
14315}
14316
14317int
14318main ()
14319{
14320
14321 FILE *f;
14322 long long i, llmin, llmax = 0;
14323
14324 if((f = fopen(DATA,"w")) == NULL)
14325 exit(1);
14326
14327#if defined(LLONG_MIN) && defined(LLONG_MAX)
14328 fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n");
14329 llmin = LLONG_MIN;
14330 llmax = LLONG_MAX;
14331#else
14332 fprintf(stderr, "Calculating LLONG_MIN and LLONG_MAX\n");
14333 /* This will work on one's complement and two's complement */
14334 for (i = 1; i > llmax; i <<= 1, i++)
14335 llmax = i;
14336 llmin = llmax + 1LL; /* wrap */
14337#endif
14338
14339 /* Sanity check */
14340 if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
14341 || llmax - 1 > llmax || llmin == llmax || llmin == 0
14342 || llmax == 0 || llmax < LONG_MAX || llmin > LONG_MIN) {
14343 fprintf(f, "unknown unknown\n");
14344 exit(2);
14345 }
14346
14347 if (fprint_ll(f, llmin) < 0)
14348 exit(3);
14349 if (fprint_ll(f, llmax) < 0)
14350 exit(4);
14351 if (fclose(f) < 0)
14352 exit(5);
14353 exit(0);
14354
14355 ;
14356 return 0;
14357}
14358_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070014359if ac_fn_c_try_run "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014360
14361 llong_min=`$AWK '{print $1}' conftest.llminmax`
14362 llong_max=`$AWK '{print $2}' conftest.llminmax`
14363
Greg Hartman9768ca42017-06-22 20:49:52 -070014364 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_max" >&5
14365$as_echo "$llong_max" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014366
14367cat >>confdefs.h <<_ACEOF
14368#define LLONG_MAX ${llong_max}LL
14369_ACEOF
14370
Greg Hartman9768ca42017-06-22 20:49:52 -070014371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for min value of long long" >&5
14372$as_echo_n "checking for min value of long long... " >&6; }
14373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_min" >&5
14374$as_echo "$llong_min" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014375
14376cat >>confdefs.h <<_ACEOF
14377#define LLONG_MIN ${llong_min}LL
14378_ACEOF
14379
14380
14381else
14382
Greg Hartman9768ca42017-06-22 20:49:52 -070014383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14384$as_echo "not found" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014385
14386fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014387rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14388 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014389fi
14390
14391fi
14392
14393
14394# More checks for data types
Greg Hartman9768ca42017-06-22 20:49:52 -070014395{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int type" >&5
14396$as_echo_n "checking for u_int type... " >&6; }
14397if ${ac_cv_have_u_int+:} false; then :
14398 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014399else
14400
Greg Hartman9768ca42017-06-22 20:49:52 -070014401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014402/* end confdefs.h. */
14403 #include <sys/types.h>
14404int
14405main ()
14406{
14407 u_int a; a = 1;
14408 ;
14409 return 0;
14410}
14411_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070014412if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014413 ac_cv_have_u_int="yes"
14414else
Greg Hartman9768ca42017-06-22 20:49:52 -070014415 ac_cv_have_u_int="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014416
14417fi
14418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14419
14420fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int" >&5
14422$as_echo "$ac_cv_have_u_int" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014423if test "x$ac_cv_have_u_int" = "xyes" ; then
14424
Greg Hartman9768ca42017-06-22 20:49:52 -070014425$as_echo "#define HAVE_U_INT 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014426
14427 have_u_int=1
14428fi
14429
Greg Hartman9768ca42017-06-22 20:49:52 -070014430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types" >&5
14431$as_echo_n "checking for intXX_t types... " >&6; }
14432if ${ac_cv_have_intxx_t+:} false; then :
14433 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014434else
14435
Greg Hartman9768ca42017-06-22 20:49:52 -070014436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014437/* end confdefs.h. */
14438 #include <sys/types.h>
14439int
14440main ()
14441{
14442 int8_t a; int16_t b; int32_t c; a = b = c = 1;
14443 ;
14444 return 0;
14445}
14446_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070014447if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014448 ac_cv_have_intxx_t="yes"
14449else
Greg Hartman9768ca42017-06-22 20:49:52 -070014450 ac_cv_have_intxx_t="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014451
14452fi
14453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14454
14455fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_intxx_t" >&5
14457$as_echo "$ac_cv_have_intxx_t" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014458if test "x$ac_cv_have_intxx_t" = "xyes" ; then
14459
Greg Hartman9768ca42017-06-22 20:49:52 -070014460$as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014461
14462 have_intxx_t=1
14463fi
14464
14465if (test -z "$have_intxx_t" && \
14466 test "x$ac_cv_header_stdint_h" = "xyes")
14467then
Greg Hartman9768ca42017-06-22 20:49:52 -070014468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types in stdint.h" >&5
14469$as_echo_n "checking for intXX_t types in stdint.h... " >&6; }
14470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014471/* end confdefs.h. */
14472 #include <stdint.h>
14473int
14474main ()
14475{
14476 int8_t a; int16_t b; int32_t c; a = b = c = 1;
14477 ;
14478 return 0;
14479}
14480_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070014481if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014482
Greg Hartman9768ca42017-06-22 20:49:52 -070014483 $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014484
Greg Hartman9768ca42017-06-22 20:49:52 -070014485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14486$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014487
14488else
Greg Hartman9768ca42017-06-22 20:49:52 -070014489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14490$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014491
14492fi
14493rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14494fi
14495
Greg Hartman9768ca42017-06-22 20:49:52 -070014496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int64_t type" >&5
14497$as_echo_n "checking for int64_t type... " >&6; }
14498if ${ac_cv_have_int64_t+:} false; then :
14499 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014500else
14501
Greg Hartman9768ca42017-06-22 20:49:52 -070014502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014503/* end confdefs.h. */
14504
14505#include <sys/types.h>
14506#ifdef HAVE_STDINT_H
14507# include <stdint.h>
14508#endif
14509#include <sys/socket.h>
14510#ifdef HAVE_SYS_BITYPES_H
14511# include <sys/bitypes.h>
14512#endif
14513
14514int
14515main ()
14516{
14517
14518int64_t a; a = 1;
14519
14520 ;
14521 return 0;
14522}
14523_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070014524if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014525 ac_cv_have_int64_t="yes"
14526else
Greg Hartman9768ca42017-06-22 20:49:52 -070014527 ac_cv_have_int64_t="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014528
14529fi
14530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14531
14532fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_int64_t" >&5
14534$as_echo "$ac_cv_have_int64_t" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014535if test "x$ac_cv_have_int64_t" = "xyes" ; then
14536
Greg Hartman9768ca42017-06-22 20:49:52 -070014537$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014538
14539fi
14540
Greg Hartman9768ca42017-06-22 20:49:52 -070014541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types" >&5
14542$as_echo_n "checking for u_intXX_t types... " >&6; }
14543if ${ac_cv_have_u_intxx_t+:} false; then :
14544 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014545else
14546
Greg Hartman9768ca42017-06-22 20:49:52 -070014547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014548/* end confdefs.h. */
14549 #include <sys/types.h>
14550int
14551main ()
14552{
14553 u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
14554 ;
14555 return 0;
14556}
14557_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070014558if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014559 ac_cv_have_u_intxx_t="yes"
14560else
Greg Hartman9768ca42017-06-22 20:49:52 -070014561 ac_cv_have_u_intxx_t="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014562
14563fi
14564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14565
14566fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_intxx_t" >&5
14568$as_echo "$ac_cv_have_u_intxx_t" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014569if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
14570
Greg Hartman9768ca42017-06-22 20:49:52 -070014571$as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014572
14573 have_u_intxx_t=1
14574fi
14575
14576if test -z "$have_u_intxx_t" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070014577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types in sys/socket.h" >&5
14578$as_echo_n "checking for u_intXX_t types in sys/socket.h... " >&6; }
14579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014580/* end confdefs.h. */
14581 #include <sys/socket.h>
14582int
14583main ()
14584{
14585 u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
14586 ;
14587 return 0;
14588}
14589_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070014590if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014591
Greg Hartman9768ca42017-06-22 20:49:52 -070014592 $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014593
Greg Hartman9768ca42017-06-22 20:49:52 -070014594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14595$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014596
14597else
Greg Hartman9768ca42017-06-22 20:49:52 -070014598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14599$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014600
14601fi
14602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14603fi
14604
Greg Hartman9768ca42017-06-22 20:49:52 -070014605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t types" >&5
14606$as_echo_n "checking for u_int64_t types... " >&6; }
14607if ${ac_cv_have_u_int64_t+:} false; then :
14608 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014609else
14610
Greg Hartman9768ca42017-06-22 20:49:52 -070014611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014612/* end confdefs.h. */
14613 #include <sys/types.h>
14614int
14615main ()
14616{
14617 u_int64_t a; a = 1;
14618 ;
14619 return 0;
14620}
14621_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070014622if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014623 ac_cv_have_u_int64_t="yes"
14624else
Greg Hartman9768ca42017-06-22 20:49:52 -070014625 ac_cv_have_u_int64_t="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014626
14627fi
14628rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14629
14630fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int64_t" >&5
14632$as_echo "$ac_cv_have_u_int64_t" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014633if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
14634
Greg Hartman9768ca42017-06-22 20:49:52 -070014635$as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014636
14637 have_u_int64_t=1
14638fi
14639
Adam Langleyd0592972015-03-30 14:49:51 -070014640if (test -z "$have_u_int64_t" && \
14641 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
14642then
Greg Hartman9768ca42017-06-22 20:49:52 -070014643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t type in sys/bitypes.h" >&5
14644$as_echo_n "checking for u_int64_t type in sys/bitypes.h... " >&6; }
14645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014646/* end confdefs.h. */
14647 #include <sys/bitypes.h>
14648int
14649main ()
14650{
14651 u_int64_t a; a = 1
14652 ;
14653 return 0;
14654}
14655_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070014656if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014657
Greg Hartman9768ca42017-06-22 20:49:52 -070014658 $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014659
Greg Hartman9768ca42017-06-22 20:49:52 -070014660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14661$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014662
14663else
Greg Hartman9768ca42017-06-22 20:49:52 -070014664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14665$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014666
14667fi
14668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14669fi
14670
14671if test -z "$have_u_intxx_t" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070014672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types" >&5
14673$as_echo_n "checking for uintXX_t types... " >&6; }
14674if ${ac_cv_have_uintxx_t+:} false; then :
14675 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014676else
14677
Greg Hartman9768ca42017-06-22 20:49:52 -070014678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014679/* end confdefs.h. */
14680
14681#include <sys/types.h>
14682
14683int
14684main ()
14685{
14686
14687 uint8_t a;
14688 uint16_t b;
14689 uint32_t c;
14690 a = b = c = 1;
14691
14692 ;
14693 return 0;
14694}
14695_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070014696if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014697 ac_cv_have_uintxx_t="yes"
14698else
Greg Hartman9768ca42017-06-22 20:49:52 -070014699 ac_cv_have_uintxx_t="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014700
14701fi
14702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14703
14704fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_uintxx_t" >&5
14706$as_echo "$ac_cv_have_uintxx_t" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014707 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
14708
Greg Hartman9768ca42017-06-22 20:49:52 -070014709$as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014710
14711 fi
14712fi
14713
Adam Langleyd0592972015-03-30 14:49:51 -070014714if (test -z "$have_uintxx_t" && \
14715 test "x$ac_cv_header_stdint_h" = "xyes")
14716then
Greg Hartman9768ca42017-06-22 20:49:52 -070014717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in stdint.h" >&5
14718$as_echo_n "checking for uintXX_t types in stdint.h... " >&6; }
14719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014720/* end confdefs.h. */
14721 #include <stdint.h>
14722int
14723main ()
14724{
14725 uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
14726 ;
14727 return 0;
14728}
14729_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070014730if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014731
Greg Hartman9768ca42017-06-22 20:49:52 -070014732 $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014733
Greg Hartman9768ca42017-06-22 20:49:52 -070014734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14735$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014736
14737else
Greg Hartman9768ca42017-06-22 20:49:52 -070014738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14739$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014740
14741fi
Adam Langleyd0592972015-03-30 14:49:51 -070014742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14743fi
14744
14745if (test -z "$have_uintxx_t" && \
14746 test "x$ac_cv_header_inttypes_h" = "xyes")
14747then
Greg Hartman9768ca42017-06-22 20:49:52 -070014748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in inttypes.h" >&5
14749$as_echo_n "checking for uintXX_t types in inttypes.h... " >&6; }
14750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070014751/* end confdefs.h. */
14752 #include <inttypes.h>
14753int
14754main ()
14755{
14756 uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
14757 ;
14758 return 0;
14759}
14760_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070014761if ac_fn_c_try_compile "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070014762
Greg Hartman9768ca42017-06-22 20:49:52 -070014763 $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070014764
Greg Hartman9768ca42017-06-22 20:49:52 -070014765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14766$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070014767
14768else
Greg Hartman9768ca42017-06-22 20:49:52 -070014769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14770$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070014771
14772fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14774fi
14775
14776if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
14777 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
14778then
Greg Hartman9768ca42017-06-22 20:49:52 -070014779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
14780$as_echo_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h... " >&6; }
14781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014782/* end confdefs.h. */
14783
14784#include <sys/bitypes.h>
14785
14786int
14787main ()
14788{
14789
14790 int8_t a; int16_t b; int32_t c;
14791 u_int8_t e; u_int16_t f; u_int32_t g;
14792 a = b = c = e = f = g = 1;
14793
14794 ;
14795 return 0;
14796}
14797_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070014798if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014799
Greg Hartman9768ca42017-06-22 20:49:52 -070014800 $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014801
Greg Hartman9768ca42017-06-22 20:49:52 -070014802 $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014803
Greg Hartman9768ca42017-06-22 20:49:52 -070014804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14805$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014806
14807else
Greg Hartman9768ca42017-06-22 20:49:52 -070014808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14809$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014810
14811fi
14812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14813fi
14814
14815
Greg Hartman9768ca42017-06-22 20:49:52 -070014816{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_char" >&5
14817$as_echo_n "checking for u_char... " >&6; }
14818if ${ac_cv_have_u_char+:} false; then :
14819 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014820else
14821
Greg Hartman9768ca42017-06-22 20:49:52 -070014822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014823/* end confdefs.h. */
14824 #include <sys/types.h>
14825int
14826main ()
14827{
14828 u_char foo; foo = 125;
14829 ;
14830 return 0;
14831}
14832_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070014833if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014834 ac_cv_have_u_char="yes"
14835else
Greg Hartman9768ca42017-06-22 20:49:52 -070014836 ac_cv_have_u_char="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014837
14838fi
14839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14840
14841fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_char" >&5
14843$as_echo "$ac_cv_have_u_char" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014844if test "x$ac_cv_have_u_char" = "xyes" ; then
14845
Greg Hartman9768ca42017-06-22 20:49:52 -070014846$as_echo "#define HAVE_U_CHAR 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070014847
14848fi
14849
Greg Hartman9768ca42017-06-22 20:49:52 -070014850ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "
Adam Langleyd0592972015-03-30 14:49:51 -070014851#include <sys/types.h>
14852#include <stdint.h>
14853
Greg Hartman9768ca42017-06-22 20:49:52 -070014854"
14855if test "x$ac_cv_type_intmax_t" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070014856
14857cat >>confdefs.h <<_ACEOF
14858#define HAVE_INTMAX_T 1
14859_ACEOF
14860
14861
14862fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014863ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "
Adam Langleyd0592972015-03-30 14:49:51 -070014864#include <sys/types.h>
14865#include <stdint.h>
14866
Greg Hartman9768ca42017-06-22 20:49:52 -070014867"
14868if test "x$ac_cv_type_uintmax_t" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070014869
14870cat >>confdefs.h <<_ACEOF
14871#define HAVE_UINTMAX_T 1
14872_ACEOF
14873
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014874
14875fi
14876
14877
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014878
Greg Hartman9768ca42017-06-22 20:49:52 -070014879 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
Adam Langleyd0592972015-03-30 14:49:51 -070014880#include <sys/socket.h>
Greg Hartman9768ca42017-06-22 20:49:52 -070014881"
14882if test "x$ac_cv_type_socklen_t" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070014883
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014884else
14885
Greg Hartman9768ca42017-06-22 20:49:52 -070014886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
14887$as_echo_n "checking for socklen_t equivalent... " >&6; }
14888 if ${curl_cv_socklen_t_equiv+:} false; then :
14889 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014890else
14891
14892 # Systems have either "struct sockaddr *" or
14893 # "void *" as the second argument to getpeername
14894 curl_cv_socklen_t_equiv=
14895 for arg2 in "struct sockaddr" void; do
14896 for t in int size_t unsigned long "unsigned long"; do
Greg Hartman9768ca42017-06-22 20:49:52 -070014897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014898/* end confdefs.h. */
14899
14900 #include <sys/types.h>
14901 #include <sys/socket.h>
14902
14903 int getpeername (int, $arg2 *, $t *);
14904
14905int
14906main ()
14907{
14908
14909 $t len;
14910 getpeername(0,0,&len);
14911
14912 ;
14913 return 0;
14914}
14915_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070014916if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014917
14918 curl_cv_socklen_t_equiv="$t"
14919 break
14920
14921fi
14922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14923 done
14924 done
14925
14926 if test "x$curl_cv_socklen_t_equiv" = x; then
Greg Hartman9768ca42017-06-22 20:49:52 -070014927 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014928 fi
14929
14930fi
14931
Greg Hartman9768ca42017-06-22 20:49:52 -070014932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_socklen_t_equiv" >&5
14933$as_echo "$curl_cv_socklen_t_equiv" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014934
14935cat >>confdefs.h <<_ACEOF
14936#define socklen_t $curl_cv_socklen_t_equiv
14937_ACEOF
14938
14939fi
14940
14941
14942
Greg Hartman9768ca42017-06-22 20:49:52 -070014943ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
14944"
14945if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014946
14947cat >>confdefs.h <<_ACEOF
14948#define HAVE_SIG_ATOMIC_T 1
14949_ACEOF
14950
14951
14952fi
14953
Greg Hartman9768ca42017-06-22 20:49:52 -070014954ac_fn_c_check_type "$LINENO" "fsblkcnt_t" "ac_cv_type_fsblkcnt_t" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014955#include <sys/types.h>
14956#ifdef HAVE_SYS_BITYPES_H
14957#include <sys/bitypes.h>
14958#endif
14959#ifdef HAVE_SYS_STATFS_H
14960#include <sys/statfs.h>
14961#endif
14962#ifdef HAVE_SYS_STATVFS_H
14963#include <sys/statvfs.h>
14964#endif
14965
Greg Hartman9768ca42017-06-22 20:49:52 -070014966"
14967if test "x$ac_cv_type_fsblkcnt_t" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014968
14969cat >>confdefs.h <<_ACEOF
14970#define HAVE_FSBLKCNT_T 1
14971_ACEOF
14972
14973
14974fi
Greg Hartman9768ca42017-06-22 20:49:52 -070014975ac_fn_c_check_type "$LINENO" "fsfilcnt_t" "ac_cv_type_fsfilcnt_t" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014976#include <sys/types.h>
14977#ifdef HAVE_SYS_BITYPES_H
14978#include <sys/bitypes.h>
14979#endif
14980#ifdef HAVE_SYS_STATFS_H
14981#include <sys/statfs.h>
14982#endif
14983#ifdef HAVE_SYS_STATVFS_H
14984#include <sys/statvfs.h>
14985#endif
14986
Greg Hartman9768ca42017-06-22 20:49:52 -070014987"
14988if test "x$ac_cv_type_fsfilcnt_t" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014989
14990cat >>confdefs.h <<_ACEOF
14991#define HAVE_FSFILCNT_T 1
14992_ACEOF
14993
14994
14995fi
14996
14997
Greg Hartman9768ca42017-06-22 20:49:52 -070014998ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "#include <sys/types.h>
Greg Hartmanbd77cf72015-02-25 13:21:06 -080014999#include <netinet/in.h>
Greg Hartman9768ca42017-06-22 20:49:52 -070015000"
15001if test "x$ac_cv_type_in_addr_t" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015002
15003cat >>confdefs.h <<_ACEOF
15004#define HAVE_IN_ADDR_T 1
15005_ACEOF
15006
15007
15008fi
Greg Hartman9768ca42017-06-22 20:49:52 -070015009ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "#include <sys/types.h>
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015010#include <netinet/in.h>
Greg Hartman9768ca42017-06-22 20:49:52 -070015011"
15012if test "x$ac_cv_type_in_port_t" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015013
15014cat >>confdefs.h <<_ACEOF
15015#define HAVE_IN_PORT_T 1
15016_ACEOF
15017
15018
15019fi
15020
15021
Greg Hartman9768ca42017-06-22 20:49:52 -070015022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size_t" >&5
15023$as_echo_n "checking for size_t... " >&6; }
15024if ${ac_cv_have_size_t+:} false; then :
15025 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015026else
15027
Greg Hartman9768ca42017-06-22 20:49:52 -070015028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015029/* end confdefs.h. */
15030 #include <sys/types.h>
15031int
15032main ()
15033{
15034 size_t foo; foo = 1235;
15035 ;
15036 return 0;
15037}
15038_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070015039if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015040 ac_cv_have_size_t="yes"
15041else
Greg Hartman9768ca42017-06-22 20:49:52 -070015042 ac_cv_have_size_t="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015043
15044fi
15045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15046
15047fi
Greg Hartman9768ca42017-06-22 20:49:52 -070015048{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t" >&5
15049$as_echo "$ac_cv_have_size_t" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015050if test "x$ac_cv_have_size_t" = "xyes" ; then
15051
Greg Hartman9768ca42017-06-22 20:49:52 -070015052$as_echo "#define HAVE_SIZE_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015053
15054fi
15055
Greg Hartman9768ca42017-06-22 20:49:52 -070015056{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
15057$as_echo_n "checking for ssize_t... " >&6; }
15058if ${ac_cv_have_ssize_t+:} false; then :
15059 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015060else
15061
Greg Hartman9768ca42017-06-22 20:49:52 -070015062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015063/* end confdefs.h. */
15064 #include <sys/types.h>
15065int
15066main ()
15067{
15068 ssize_t foo; foo = 1235;
15069 ;
15070 return 0;
15071}
15072_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070015073if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015074 ac_cv_have_ssize_t="yes"
15075else
Greg Hartman9768ca42017-06-22 20:49:52 -070015076 ac_cv_have_ssize_t="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015077
15078fi
15079rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15080
15081fi
Greg Hartman9768ca42017-06-22 20:49:52 -070015082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ssize_t" >&5
15083$as_echo "$ac_cv_have_ssize_t" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015084if test "x$ac_cv_have_ssize_t" = "xyes" ; then
15085
Greg Hartman9768ca42017-06-22 20:49:52 -070015086$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015087
15088fi
15089
Greg Hartman9768ca42017-06-22 20:49:52 -070015090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
15091$as_echo_n "checking for clock_t... " >&6; }
15092if ${ac_cv_have_clock_t+:} false; then :
15093 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015094else
15095
Greg Hartman9768ca42017-06-22 20:49:52 -070015096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015097/* end confdefs.h. */
15098 #include <time.h>
15099int
15100main ()
15101{
15102 clock_t foo; foo = 1235;
15103 ;
15104 return 0;
15105}
15106_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070015107if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015108 ac_cv_have_clock_t="yes"
15109else
Greg Hartman9768ca42017-06-22 20:49:52 -070015110 ac_cv_have_clock_t="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015111
15112fi
15113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15114
15115fi
Greg Hartman9768ca42017-06-22 20:49:52 -070015116{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_clock_t" >&5
15117$as_echo "$ac_cv_have_clock_t" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015118if test "x$ac_cv_have_clock_t" = "xyes" ; then
15119
Greg Hartman9768ca42017-06-22 20:49:52 -070015120$as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015121
15122fi
15123
Greg Hartman9768ca42017-06-22 20:49:52 -070015124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_family_t" >&5
15125$as_echo_n "checking for sa_family_t... " >&6; }
15126if ${ac_cv_have_sa_family_t+:} false; then :
15127 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015128else
15129
Greg Hartman9768ca42017-06-22 20:49:52 -070015130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015131/* end confdefs.h. */
15132
15133#include <sys/types.h>
15134#include <sys/socket.h>
15135
15136int
15137main ()
15138{
15139 sa_family_t foo; foo = 1235;
15140 ;
15141 return 0;
15142}
15143_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070015144if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015145 ac_cv_have_sa_family_t="yes"
15146else
Greg Hartman9768ca42017-06-22 20:49:52 -070015147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015148/* end confdefs.h. */
15149
15150#include <sys/types.h>
15151#include <sys/socket.h>
15152#include <netinet/in.h>
15153
15154int
15155main ()
15156{
15157 sa_family_t foo; foo = 1235;
15158 ;
15159 return 0;
15160}
15161_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070015162if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015163 ac_cv_have_sa_family_t="yes"
15164else
Greg Hartman9768ca42017-06-22 20:49:52 -070015165 ac_cv_have_sa_family_t="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015166
15167fi
15168rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15169
15170fi
15171rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15172
15173fi
Greg Hartman9768ca42017-06-22 20:49:52 -070015174{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sa_family_t" >&5
15175$as_echo "$ac_cv_have_sa_family_t" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015176if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
15177
Greg Hartman9768ca42017-06-22 20:49:52 -070015178$as_echo "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015179
15180fi
15181
Greg Hartman9768ca42017-06-22 20:49:52 -070015182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pid_t" >&5
15183$as_echo_n "checking for pid_t... " >&6; }
15184if ${ac_cv_have_pid_t+:} false; then :
15185 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015186else
15187
Greg Hartman9768ca42017-06-22 20:49:52 -070015188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015189/* end confdefs.h. */
15190 #include <sys/types.h>
15191int
15192main ()
15193{
15194 pid_t foo; foo = 1235;
15195 ;
15196 return 0;
15197}
15198_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070015199if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015200 ac_cv_have_pid_t="yes"
15201else
Greg Hartman9768ca42017-06-22 20:49:52 -070015202 ac_cv_have_pid_t="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015203
15204fi
15205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15206
15207fi
Greg Hartman9768ca42017-06-22 20:49:52 -070015208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pid_t" >&5
15209$as_echo "$ac_cv_have_pid_t" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015210if test "x$ac_cv_have_pid_t" = "xyes" ; then
15211
Greg Hartman9768ca42017-06-22 20:49:52 -070015212$as_echo "#define HAVE_PID_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015213
15214fi
15215
Greg Hartman9768ca42017-06-22 20:49:52 -070015216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mode_t" >&5
15217$as_echo_n "checking for mode_t... " >&6; }
15218if ${ac_cv_have_mode_t+:} false; then :
15219 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015220else
15221
Greg Hartman9768ca42017-06-22 20:49:52 -070015222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015223/* end confdefs.h. */
15224 #include <sys/types.h>
15225int
15226main ()
15227{
15228 mode_t foo; foo = 1235;
15229 ;
15230 return 0;
15231}
15232_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070015233if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015234 ac_cv_have_mode_t="yes"
15235else
Greg Hartman9768ca42017-06-22 20:49:52 -070015236 ac_cv_have_mode_t="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015237
15238fi
15239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15240
15241fi
Greg Hartman9768ca42017-06-22 20:49:52 -070015242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_mode_t" >&5
15243$as_echo "$ac_cv_have_mode_t" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015244if test "x$ac_cv_have_mode_t" = "xyes" ; then
15245
Greg Hartman9768ca42017-06-22 20:49:52 -070015246$as_echo "#define HAVE_MODE_T 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015247
15248fi
15249
15250
Greg Hartman9768ca42017-06-22 20:49:52 -070015251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
15252$as_echo_n "checking for struct sockaddr_storage... " >&6; }
15253if ${ac_cv_have_struct_sockaddr_storage+:} false; then :
15254 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015255else
15256
Greg Hartman9768ca42017-06-22 20:49:52 -070015257 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015258/* end confdefs.h. */
15259
15260#include <sys/types.h>
15261#include <sys/socket.h>
15262
15263int
15264main ()
15265{
15266 struct sockaddr_storage s;
15267 ;
15268 return 0;
15269}
15270_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070015271if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015272 ac_cv_have_struct_sockaddr_storage="yes"
15273else
Greg Hartman9768ca42017-06-22 20:49:52 -070015274 ac_cv_have_struct_sockaddr_storage="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015275
15276fi
15277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15278
15279fi
Greg Hartman9768ca42017-06-22 20:49:52 -070015280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_storage" >&5
15281$as_echo "$ac_cv_have_struct_sockaddr_storage" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015282if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
15283
Greg Hartman9768ca42017-06-22 20:49:52 -070015284$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015285
15286fi
15287
Greg Hartman9768ca42017-06-22 20:49:52 -070015288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6" >&5
15289$as_echo_n "checking for struct sockaddr_in6... " >&6; }
15290if ${ac_cv_have_struct_sockaddr_in6+:} false; then :
15291 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015292else
15293
Greg Hartman9768ca42017-06-22 20:49:52 -070015294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015295/* end confdefs.h. */
15296
15297#include <sys/types.h>
15298#include <netinet/in.h>
15299
15300int
15301main ()
15302{
15303 struct sockaddr_in6 s; s.sin6_family = 0;
15304 ;
15305 return 0;
15306}
15307_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070015308if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015309 ac_cv_have_struct_sockaddr_in6="yes"
15310else
Greg Hartman9768ca42017-06-22 20:49:52 -070015311 ac_cv_have_struct_sockaddr_in6="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015312
15313fi
15314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15315
15316fi
Greg Hartman9768ca42017-06-22 20:49:52 -070015317{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_in6" >&5
15318$as_echo "$ac_cv_have_struct_sockaddr_in6" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015319if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
15320
Greg Hartman9768ca42017-06-22 20:49:52 -070015321$as_echo "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015322
15323fi
15324
Greg Hartman9768ca42017-06-22 20:49:52 -070015325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct in6_addr" >&5
15326$as_echo_n "checking for struct in6_addr... " >&6; }
15327if ${ac_cv_have_struct_in6_addr+:} false; then :
15328 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015329else
15330
Greg Hartman9768ca42017-06-22 20:49:52 -070015331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015332/* end confdefs.h. */
15333
15334#include <sys/types.h>
15335#include <netinet/in.h>
15336
15337int
15338main ()
15339{
15340 struct in6_addr s; s.s6_addr[0] = 0;
15341 ;
15342 return 0;
15343}
15344_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070015345if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015346 ac_cv_have_struct_in6_addr="yes"
15347else
Greg Hartman9768ca42017-06-22 20:49:52 -070015348 ac_cv_have_struct_in6_addr="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015349
15350fi
15351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15352
15353fi
Greg Hartman9768ca42017-06-22 20:49:52 -070015354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_in6_addr" >&5
15355$as_echo "$ac_cv_have_struct_in6_addr" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015356if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
15357
Greg Hartman9768ca42017-06-22 20:49:52 -070015358$as_echo "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015359
15360
Greg Hartman9768ca42017-06-22 20:49:52 -070015361 ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015362#ifdef HAVE_SYS_TYPES_H
15363#include <sys/types.h>
15364#endif
15365#include <netinet/in.h>
15366
Greg Hartman9768ca42017-06-22 20:49:52 -070015367"
15368if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015369
15370cat >>confdefs.h <<_ACEOF
15371#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
15372_ACEOF
15373
15374
15375fi
15376
15377fi
15378
Greg Hartman9768ca42017-06-22 20:49:52 -070015379{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct addrinfo" >&5
15380$as_echo_n "checking for struct addrinfo... " >&6; }
15381if ${ac_cv_have_struct_addrinfo+:} false; then :
15382 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015383else
15384
Greg Hartman9768ca42017-06-22 20:49:52 -070015385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015386/* end confdefs.h. */
15387
15388#include <sys/types.h>
15389#include <sys/socket.h>
15390#include <netdb.h>
15391
15392int
15393main ()
15394{
15395 struct addrinfo s; s.ai_flags = AI_PASSIVE;
15396 ;
15397 return 0;
15398}
15399_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070015400if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015401 ac_cv_have_struct_addrinfo="yes"
15402else
Greg Hartman9768ca42017-06-22 20:49:52 -070015403 ac_cv_have_struct_addrinfo="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015404
15405fi
15406rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15407
15408fi
Greg Hartman9768ca42017-06-22 20:49:52 -070015409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_addrinfo" >&5
15410$as_echo "$ac_cv_have_struct_addrinfo" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015411if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
15412
Greg Hartman9768ca42017-06-22 20:49:52 -070015413$as_echo "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015414
15415fi
15416
Greg Hartman9768ca42017-06-22 20:49:52 -070015417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
15418$as_echo_n "checking for struct timeval... " >&6; }
15419if ${ac_cv_have_struct_timeval+:} false; then :
15420 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015421else
15422
Greg Hartman9768ca42017-06-22 20:49:52 -070015423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015424/* end confdefs.h. */
15425 #include <sys/time.h>
15426int
15427main ()
15428{
15429 struct timeval tv; tv.tv_sec = 1;
15430 ;
15431 return 0;
15432}
15433_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070015434if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015435 ac_cv_have_struct_timeval="yes"
15436else
Greg Hartman9768ca42017-06-22 20:49:52 -070015437 ac_cv_have_struct_timeval="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015438
15439fi
15440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15441
15442fi
Greg Hartman9768ca42017-06-22 20:49:52 -070015443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_timeval" >&5
15444$as_echo "$ac_cv_have_struct_timeval" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015445if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
15446
Greg Hartman9768ca42017-06-22 20:49:52 -070015447$as_echo "#define HAVE_STRUCT_TIMEVAL 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015448
15449 have_struct_timeval=1
15450fi
15451
Greg Hartman9768ca42017-06-22 20:49:52 -070015452ac_fn_c_check_type "$LINENO" "struct timespec" "ac_cv_type_struct_timespec" "$ac_includes_default"
15453if test "x$ac_cv_type_struct_timespec" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015454
15455cat >>confdefs.h <<_ACEOF
15456#define HAVE_STRUCT_TIMESPEC 1
15457_ACEOF
15458
15459
15460fi
15461
15462
15463# We need int64_t or else certian parts of the compile will fail.
15464if test "x$ac_cv_have_int64_t" = "xno" && \
15465 test "x$ac_cv_sizeof_long_int" != "x8" && \
15466 test "x$ac_cv_sizeof_long_long_int" = "x0" ; then
15467 echo "OpenSSH requires int64_t support. Contact your vendor or install"
15468 echo "an alternative compiler (I.E., GCC) before continuing."
15469 echo ""
15470 exit 1;
15471else
Greg Hartman9768ca42017-06-22 20:49:52 -070015472 if test "$cross_compiling" = yes; then :
15473 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
15474$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015475
15476else
Greg Hartman9768ca42017-06-22 20:49:52 -070015477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015478/* end confdefs.h. */
15479
15480#include <stdio.h>
15481#include <string.h>
15482#ifdef HAVE_SNPRINTF
15483main()
15484{
15485 char buf[50];
15486 char expected_out[50];
15487 int mazsize = 50 ;
15488#if (SIZEOF_LONG_INT == 8)
15489 long int num = 0x7fffffffffffffff;
15490#else
15491 long long num = 0x7fffffffffffffffll;
15492#endif
15493 strcpy(expected_out, "9223372036854775807");
15494 snprintf(buf, mazsize, "%lld", num);
15495 if(strcmp(buf, expected_out) != 0)
15496 exit(1);
15497 exit(0);
15498}
15499#else
15500main() { exit(0); }
15501#endif
15502
15503_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070015504if ac_fn_c_try_run "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015505 true
15506else
Greg Hartman9768ca42017-06-22 20:49:52 -070015507 $as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015508
15509fi
Greg Hartman9768ca42017-06-22 20:49:52 -070015510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15511 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015512fi
15513
15514fi
15515
15516
15517# look for field 'ut_host' in header 'utmp.h'
15518 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
15519 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
Greg Hartman9768ca42017-06-22 20:49:52 -070015520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmp.h" >&5
15521$as_echo_n "checking for ut_host field in utmp.h... " >&6; }
15522 if eval \${$ossh_varname+:} false; then :
15523 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015524else
15525
Greg Hartman9768ca42017-06-22 20:49:52 -070015526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015527/* end confdefs.h. */
15528#include <utmp.h>
15529
15530_ACEOF
15531if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070015532 $EGREP "ut_host" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015533 eval "$ossh_varname=yes"
15534else
15535 eval "$ossh_varname=no"
15536fi
15537rm -f conftest*
15538
15539fi
15540
15541 ossh_result=`eval 'echo $'"$ossh_varname"`
15542 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070015543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15544$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015545 if test "x$ossh_result" = "xyes"; then
15546
Greg Hartman9768ca42017-06-22 20:49:52 -070015547$as_echo "#define HAVE_HOST_IN_UTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015548
15549 fi
15550 else
Greg Hartman9768ca42017-06-22 20:49:52 -070015551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15552$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015553 fi
15554
15555
15556# look for field 'ut_host' in header 'utmpx.h'
15557 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
15558 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
Greg Hartman9768ca42017-06-22 20:49:52 -070015559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmpx.h" >&5
15560$as_echo_n "checking for ut_host field in utmpx.h... " >&6; }
15561 if eval \${$ossh_varname+:} false; then :
15562 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015563else
15564
Greg Hartman9768ca42017-06-22 20:49:52 -070015565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015566/* end confdefs.h. */
15567#include <utmpx.h>
15568
15569_ACEOF
15570if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070015571 $EGREP "ut_host" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015572 eval "$ossh_varname=yes"
15573else
15574 eval "$ossh_varname=no"
15575fi
15576rm -f conftest*
15577
15578fi
15579
15580 ossh_result=`eval 'echo $'"$ossh_varname"`
15581 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070015582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15583$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015584 if test "x$ossh_result" = "xyes"; then
15585
Greg Hartman9768ca42017-06-22 20:49:52 -070015586$as_echo "#define HAVE_HOST_IN_UTMPX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015587
15588 fi
15589 else
Greg Hartman9768ca42017-06-22 20:49:52 -070015590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15591$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015592 fi
15593
15594
15595# look for field 'syslen' in header 'utmpx.h'
15596 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
15597 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
Greg Hartman9768ca42017-06-22 20:49:52 -070015598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for syslen field in utmpx.h" >&5
15599$as_echo_n "checking for syslen field in utmpx.h... " >&6; }
15600 if eval \${$ossh_varname+:} false; then :
15601 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015602else
15603
Greg Hartman9768ca42017-06-22 20:49:52 -070015604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015605/* end confdefs.h. */
15606#include <utmpx.h>
15607
15608_ACEOF
15609if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070015610 $EGREP "syslen" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015611 eval "$ossh_varname=yes"
15612else
15613 eval "$ossh_varname=no"
15614fi
15615rm -f conftest*
15616
15617fi
15618
15619 ossh_result=`eval 'echo $'"$ossh_varname"`
15620 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070015621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15622$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015623 if test "x$ossh_result" = "xyes"; then
15624
Greg Hartman9768ca42017-06-22 20:49:52 -070015625$as_echo "#define HAVE_SYSLEN_IN_UTMPX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015626
15627 fi
15628 else
Greg Hartman9768ca42017-06-22 20:49:52 -070015629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15630$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015631 fi
15632
15633
15634# look for field 'ut_pid' in header 'utmp.h'
15635 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
15636 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
Greg Hartman9768ca42017-06-22 20:49:52 -070015637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_pid field in utmp.h" >&5
15638$as_echo_n "checking for ut_pid field in utmp.h... " >&6; }
15639 if eval \${$ossh_varname+:} false; then :
15640 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015641else
15642
Greg Hartman9768ca42017-06-22 20:49:52 -070015643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015644/* end confdefs.h. */
15645#include <utmp.h>
15646
15647_ACEOF
15648if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070015649 $EGREP "ut_pid" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015650 eval "$ossh_varname=yes"
15651else
15652 eval "$ossh_varname=no"
15653fi
15654rm -f conftest*
15655
15656fi
15657
15658 ossh_result=`eval 'echo $'"$ossh_varname"`
15659 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070015660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15661$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015662 if test "x$ossh_result" = "xyes"; then
15663
Greg Hartman9768ca42017-06-22 20:49:52 -070015664$as_echo "#define HAVE_PID_IN_UTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015665
15666 fi
15667 else
Greg Hartman9768ca42017-06-22 20:49:52 -070015668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15669$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015670 fi
15671
15672
15673# look for field 'ut_type' in header 'utmp.h'
15674 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
15675 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
Greg Hartman9768ca42017-06-22 20:49:52 -070015676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmp.h" >&5
15677$as_echo_n "checking for ut_type field in utmp.h... " >&6; }
15678 if eval \${$ossh_varname+:} false; then :
15679 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015680else
15681
Greg Hartman9768ca42017-06-22 20:49:52 -070015682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015683/* end confdefs.h. */
15684#include <utmp.h>
15685
15686_ACEOF
15687if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070015688 $EGREP "ut_type" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015689 eval "$ossh_varname=yes"
15690else
15691 eval "$ossh_varname=no"
15692fi
15693rm -f conftest*
15694
15695fi
15696
15697 ossh_result=`eval 'echo $'"$ossh_varname"`
15698 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070015699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15700$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015701 if test "x$ossh_result" = "xyes"; then
15702
Greg Hartman9768ca42017-06-22 20:49:52 -070015703$as_echo "#define HAVE_TYPE_IN_UTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015704
15705 fi
15706 else
Greg Hartman9768ca42017-06-22 20:49:52 -070015707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15708$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015709 fi
15710
15711
15712# look for field 'ut_type' in header 'utmpx.h'
15713 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
15714 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
Greg Hartman9768ca42017-06-22 20:49:52 -070015715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmpx.h" >&5
15716$as_echo_n "checking for ut_type field in utmpx.h... " >&6; }
15717 if eval \${$ossh_varname+:} false; then :
15718 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015719else
15720
Greg Hartman9768ca42017-06-22 20:49:52 -070015721 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015722/* end confdefs.h. */
15723#include <utmpx.h>
15724
15725_ACEOF
15726if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070015727 $EGREP "ut_type" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015728 eval "$ossh_varname=yes"
15729else
15730 eval "$ossh_varname=no"
15731fi
15732rm -f conftest*
15733
15734fi
15735
15736 ossh_result=`eval 'echo $'"$ossh_varname"`
15737 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070015738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15739$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015740 if test "x$ossh_result" = "xyes"; then
15741
Greg Hartman9768ca42017-06-22 20:49:52 -070015742$as_echo "#define HAVE_TYPE_IN_UTMPX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015743
15744 fi
15745 else
Greg Hartman9768ca42017-06-22 20:49:52 -070015746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15747$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015748 fi
15749
15750
15751# look for field 'ut_tv' in header 'utmp.h'
15752 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
15753 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
Greg Hartman9768ca42017-06-22 20:49:52 -070015754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmp.h" >&5
15755$as_echo_n "checking for ut_tv field in utmp.h... " >&6; }
15756 if eval \${$ossh_varname+:} false; then :
15757 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015758else
15759
Greg Hartman9768ca42017-06-22 20:49:52 -070015760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015761/* end confdefs.h. */
15762#include <utmp.h>
15763
15764_ACEOF
15765if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070015766 $EGREP "ut_tv" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015767 eval "$ossh_varname=yes"
15768else
15769 eval "$ossh_varname=no"
15770fi
15771rm -f conftest*
15772
15773fi
15774
15775 ossh_result=`eval 'echo $'"$ossh_varname"`
15776 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070015777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15778$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015779 if test "x$ossh_result" = "xyes"; then
15780
Greg Hartman9768ca42017-06-22 20:49:52 -070015781$as_echo "#define HAVE_TV_IN_UTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015782
15783 fi
15784 else
Greg Hartman9768ca42017-06-22 20:49:52 -070015785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15786$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015787 fi
15788
15789
15790# look for field 'ut_id' in header 'utmp.h'
15791 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
15792 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
Greg Hartman9768ca42017-06-22 20:49:52 -070015793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmp.h" >&5
15794$as_echo_n "checking for ut_id field in utmp.h... " >&6; }
15795 if eval \${$ossh_varname+:} false; then :
15796 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015797else
15798
Greg Hartman9768ca42017-06-22 20:49:52 -070015799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015800/* end confdefs.h. */
15801#include <utmp.h>
15802
15803_ACEOF
15804if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070015805 $EGREP "ut_id" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015806 eval "$ossh_varname=yes"
15807else
15808 eval "$ossh_varname=no"
15809fi
15810rm -f conftest*
15811
15812fi
15813
15814 ossh_result=`eval 'echo $'"$ossh_varname"`
15815 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070015816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15817$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015818 if test "x$ossh_result" = "xyes"; then
15819
Greg Hartman9768ca42017-06-22 20:49:52 -070015820$as_echo "#define HAVE_ID_IN_UTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015821
15822 fi
15823 else
Greg Hartman9768ca42017-06-22 20:49:52 -070015824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15825$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015826 fi
15827
15828
15829# look for field 'ut_id' in header 'utmpx.h'
15830 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
15831 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
Greg Hartman9768ca42017-06-22 20:49:52 -070015832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmpx.h" >&5
15833$as_echo_n "checking for ut_id field in utmpx.h... " >&6; }
15834 if eval \${$ossh_varname+:} false; then :
15835 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015836else
15837
Greg Hartman9768ca42017-06-22 20:49:52 -070015838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015839/* end confdefs.h. */
15840#include <utmpx.h>
15841
15842_ACEOF
15843if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070015844 $EGREP "ut_id" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015845 eval "$ossh_varname=yes"
15846else
15847 eval "$ossh_varname=no"
15848fi
15849rm -f conftest*
15850
15851fi
15852
15853 ossh_result=`eval 'echo $'"$ossh_varname"`
15854 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070015855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15856$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015857 if test "x$ossh_result" = "xyes"; then
15858
Greg Hartman9768ca42017-06-22 20:49:52 -070015859$as_echo "#define HAVE_ID_IN_UTMPX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015860
15861 fi
15862 else
Greg Hartman9768ca42017-06-22 20:49:52 -070015863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15864$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015865 fi
15866
15867
15868# look for field 'ut_addr' in header 'utmp.h'
15869 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
15870 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
Greg Hartman9768ca42017-06-22 20:49:52 -070015871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmp.h" >&5
15872$as_echo_n "checking for ut_addr field in utmp.h... " >&6; }
15873 if eval \${$ossh_varname+:} false; then :
15874 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015875else
15876
Greg Hartman9768ca42017-06-22 20:49:52 -070015877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015878/* end confdefs.h. */
15879#include <utmp.h>
15880
15881_ACEOF
15882if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070015883 $EGREP "ut_addr" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015884 eval "$ossh_varname=yes"
15885else
15886 eval "$ossh_varname=no"
15887fi
15888rm -f conftest*
15889
15890fi
15891
15892 ossh_result=`eval 'echo $'"$ossh_varname"`
15893 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070015894 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15895$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015896 if test "x$ossh_result" = "xyes"; then
15897
Greg Hartman9768ca42017-06-22 20:49:52 -070015898$as_echo "#define HAVE_ADDR_IN_UTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015899
15900 fi
15901 else
Greg Hartman9768ca42017-06-22 20:49:52 -070015902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15903$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015904 fi
15905
15906
15907# look for field 'ut_addr' in header 'utmpx.h'
15908 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
15909 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
Greg Hartman9768ca42017-06-22 20:49:52 -070015910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmpx.h" >&5
15911$as_echo_n "checking for ut_addr field in utmpx.h... " >&6; }
15912 if eval \${$ossh_varname+:} false; then :
15913 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015914else
15915
Greg Hartman9768ca42017-06-22 20:49:52 -070015916 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015917/* end confdefs.h. */
15918#include <utmpx.h>
15919
15920_ACEOF
15921if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070015922 $EGREP "ut_addr" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015923 eval "$ossh_varname=yes"
15924else
15925 eval "$ossh_varname=no"
15926fi
15927rm -f conftest*
15928
15929fi
15930
15931 ossh_result=`eval 'echo $'"$ossh_varname"`
15932 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070015933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15934$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015935 if test "x$ossh_result" = "xyes"; then
15936
Greg Hartman9768ca42017-06-22 20:49:52 -070015937$as_echo "#define HAVE_ADDR_IN_UTMPX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015938
15939 fi
15940 else
Greg Hartman9768ca42017-06-22 20:49:52 -070015941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15942$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015943 fi
15944
15945
15946# look for field 'ut_addr_v6' in header 'utmp.h'
15947 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
15948 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
Greg Hartman9768ca42017-06-22 20:49:52 -070015949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmp.h" >&5
15950$as_echo_n "checking for ut_addr_v6 field in utmp.h... " >&6; }
15951 if eval \${$ossh_varname+:} false; then :
15952 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015953else
15954
Greg Hartman9768ca42017-06-22 20:49:52 -070015955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015956/* end confdefs.h. */
15957#include <utmp.h>
15958
15959_ACEOF
15960if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070015961 $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015962 eval "$ossh_varname=yes"
15963else
15964 eval "$ossh_varname=no"
15965fi
15966rm -f conftest*
15967
15968fi
15969
15970 ossh_result=`eval 'echo $'"$ossh_varname"`
15971 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070015972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15973$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015974 if test "x$ossh_result" = "xyes"; then
15975
Greg Hartman9768ca42017-06-22 20:49:52 -070015976$as_echo "#define HAVE_ADDR_V6_IN_UTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015977
15978 fi
15979 else
Greg Hartman9768ca42017-06-22 20:49:52 -070015980 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15981$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015982 fi
15983
15984
15985# look for field 'ut_addr_v6' in header 'utmpx.h'
15986 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
15987 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
Greg Hartman9768ca42017-06-22 20:49:52 -070015988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmpx.h" >&5
15989$as_echo_n "checking for ut_addr_v6 field in utmpx.h... " >&6; }
15990 if eval \${$ossh_varname+:} false; then :
15991 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015992else
15993
Greg Hartman9768ca42017-06-22 20:49:52 -070015994 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080015995/* end confdefs.h. */
15996#include <utmpx.h>
15997
15998_ACEOF
15999if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070016000 $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016001 eval "$ossh_varname=yes"
16002else
16003 eval "$ossh_varname=no"
16004fi
16005rm -f conftest*
16006
16007fi
16008
16009 ossh_result=`eval 'echo $'"$ossh_varname"`
16010 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070016011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16012$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016013 if test "x$ossh_result" = "xyes"; then
16014
Greg Hartman9768ca42017-06-22 20:49:52 -070016015$as_echo "#define HAVE_ADDR_V6_IN_UTMPX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016016
16017 fi
16018 else
Greg Hartman9768ca42017-06-22 20:49:52 -070016019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16020$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016021 fi
16022
16023
16024# look for field 'ut_exit' in header 'utmp.h'
16025 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16026 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
Greg Hartman9768ca42017-06-22 20:49:52 -070016027 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_exit field in utmp.h" >&5
16028$as_echo_n "checking for ut_exit field in utmp.h... " >&6; }
16029 if eval \${$ossh_varname+:} false; then :
16030 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016031else
16032
Greg Hartman9768ca42017-06-22 20:49:52 -070016033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016034/* end confdefs.h. */
16035#include <utmp.h>
16036
16037_ACEOF
16038if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070016039 $EGREP "ut_exit" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016040 eval "$ossh_varname=yes"
16041else
16042 eval "$ossh_varname=no"
16043fi
16044rm -f conftest*
16045
16046fi
16047
16048 ossh_result=`eval 'echo $'"$ossh_varname"`
16049 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070016050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16051$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016052 if test "x$ossh_result" = "xyes"; then
16053
Greg Hartman9768ca42017-06-22 20:49:52 -070016054$as_echo "#define HAVE_EXIT_IN_UTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016055
16056 fi
16057 else
Greg Hartman9768ca42017-06-22 20:49:52 -070016058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16059$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016060 fi
16061
16062
16063# look for field 'ut_time' in header 'utmp.h'
16064 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16065 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
Greg Hartman9768ca42017-06-22 20:49:52 -070016066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmp.h" >&5
16067$as_echo_n "checking for ut_time field in utmp.h... " >&6; }
16068 if eval \${$ossh_varname+:} false; then :
16069 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016070else
16071
Greg Hartman9768ca42017-06-22 20:49:52 -070016072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016073/* end confdefs.h. */
16074#include <utmp.h>
16075
16076_ACEOF
16077if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070016078 $EGREP "ut_time" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016079 eval "$ossh_varname=yes"
16080else
16081 eval "$ossh_varname=no"
16082fi
16083rm -f conftest*
16084
16085fi
16086
16087 ossh_result=`eval 'echo $'"$ossh_varname"`
16088 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070016089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16090$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016091 if test "x$ossh_result" = "xyes"; then
16092
Greg Hartman9768ca42017-06-22 20:49:52 -070016093$as_echo "#define HAVE_TIME_IN_UTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016094
16095 fi
16096 else
Greg Hartman9768ca42017-06-22 20:49:52 -070016097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16098$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016099 fi
16100
16101
16102# look for field 'ut_time' in header 'utmpx.h'
16103 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16104 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
Greg Hartman9768ca42017-06-22 20:49:52 -070016105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmpx.h" >&5
16106$as_echo_n "checking for ut_time field in utmpx.h... " >&6; }
16107 if eval \${$ossh_varname+:} false; then :
16108 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016109else
16110
Greg Hartman9768ca42017-06-22 20:49:52 -070016111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016112/* end confdefs.h. */
16113#include <utmpx.h>
16114
16115_ACEOF
16116if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070016117 $EGREP "ut_time" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016118 eval "$ossh_varname=yes"
16119else
16120 eval "$ossh_varname=no"
16121fi
16122rm -f conftest*
16123
16124fi
16125
16126 ossh_result=`eval 'echo $'"$ossh_varname"`
16127 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070016128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16129$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016130 if test "x$ossh_result" = "xyes"; then
16131
Greg Hartman9768ca42017-06-22 20:49:52 -070016132$as_echo "#define HAVE_TIME_IN_UTMPX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016133
16134 fi
16135 else
Greg Hartman9768ca42017-06-22 20:49:52 -070016136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16137$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016138 fi
16139
16140
16141# look for field 'ut_tv' in header 'utmpx.h'
16142 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16143 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
Greg Hartman9768ca42017-06-22 20:49:52 -070016144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmpx.h" >&5
16145$as_echo_n "checking for ut_tv field in utmpx.h... " >&6; }
16146 if eval \${$ossh_varname+:} false; then :
16147 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016148else
16149
Greg Hartman9768ca42017-06-22 20:49:52 -070016150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016151/* end confdefs.h. */
16152#include <utmpx.h>
16153
16154_ACEOF
16155if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
Greg Hartman9768ca42017-06-22 20:49:52 -070016156 $EGREP "ut_tv" >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016157 eval "$ossh_varname=yes"
16158else
16159 eval "$ossh_varname=no"
16160fi
16161rm -f conftest*
16162
16163fi
16164
16165 ossh_result=`eval 'echo $'"$ossh_varname"`
16166 if test -n "`echo $ossh_varname`"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070016167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16168$as_echo "$ossh_result" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016169 if test "x$ossh_result" = "xyes"; then
16170
Greg Hartman9768ca42017-06-22 20:49:52 -070016171$as_echo "#define HAVE_TV_IN_UTMPX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016172
16173 fi
16174 else
Greg Hartman9768ca42017-06-22 20:49:52 -070016175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16176$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016177 fi
16178
16179
Greg Hartman9768ca42017-06-22 20:49:52 -070016180ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
16181if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016182
16183cat >>confdefs.h <<_ACEOF
16184#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
16185_ACEOF
16186
16187
16188fi
16189
Greg Hartman9768ca42017-06-22 20:49:52 -070016190ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
Adam Langleyd0592972015-03-30 14:49:51 -070016191#include <sys/types.h>
16192#include <pwd.h>
16193
Greg Hartman9768ca42017-06-22 20:49:52 -070016194"
16195if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070016196
16197cat >>confdefs.h <<_ACEOF
16198#define HAVE_STRUCT_PASSWD_PW_GECOS 1
16199_ACEOF
16200
16201
16202fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016203ac_fn_c_check_member "$LINENO" "struct passwd" "pw_class" "ac_cv_member_struct_passwd_pw_class" "
Adam Langleyd0592972015-03-30 14:49:51 -070016204#include <sys/types.h>
16205#include <pwd.h>
16206
Greg Hartman9768ca42017-06-22 20:49:52 -070016207"
16208if test "x$ac_cv_member_struct_passwd_pw_class" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070016209
16210cat >>confdefs.h <<_ACEOF
16211#define HAVE_STRUCT_PASSWD_PW_CLASS 1
16212_ACEOF
16213
16214
16215fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016216ac_fn_c_check_member "$LINENO" "struct passwd" "pw_change" "ac_cv_member_struct_passwd_pw_change" "
Adam Langleyd0592972015-03-30 14:49:51 -070016217#include <sys/types.h>
16218#include <pwd.h>
16219
Greg Hartman9768ca42017-06-22 20:49:52 -070016220"
16221if test "x$ac_cv_member_struct_passwd_pw_change" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070016222
16223cat >>confdefs.h <<_ACEOF
16224#define HAVE_STRUCT_PASSWD_PW_CHANGE 1
16225_ACEOF
16226
16227
16228fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016229ac_fn_c_check_member "$LINENO" "struct passwd" "pw_expire" "ac_cv_member_struct_passwd_pw_expire" "
Adam Langleyd0592972015-03-30 14:49:51 -070016230#include <sys/types.h>
16231#include <pwd.h>
16232
Greg Hartman9768ca42017-06-22 20:49:52 -070016233"
16234if test "x$ac_cv_member_struct_passwd_pw_expire" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070016235
16236cat >>confdefs.h <<_ACEOF
16237#define HAVE_STRUCT_PASSWD_PW_EXPIRE 1
16238_ACEOF
16239
16240
16241fi
16242
16243
Greg Hartman9768ca42017-06-22 20:49:52 -070016244ac_fn_c_check_member "$LINENO" "struct __res_state" "retrans" "ac_cv_member_struct___res_state_retrans" "
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016245#include <stdio.h>
16246#if HAVE_SYS_TYPES_H
16247# include <sys/types.h>
16248#endif
16249#include <netinet/in.h>
16250#include <arpa/nameser.h>
16251#include <resolv.h>
16252
Greg Hartman9768ca42017-06-22 20:49:52 -070016253"
16254if test "x$ac_cv_member_struct___res_state_retrans" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016255
16256else
16257
Greg Hartman9768ca42017-06-22 20:49:52 -070016258$as_echo "#define __res_state state" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016259
16260fi
16261
16262
Greg Hartman9768ca42017-06-22 20:49:52 -070016263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ss_family field in struct sockaddr_storage" >&5
16264$as_echo_n "checking for ss_family field in struct sockaddr_storage... " >&6; }
16265if ${ac_cv_have_ss_family_in_struct_ss+:} false; then :
16266 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016267else
16268
Greg Hartman9768ca42017-06-22 20:49:52 -070016269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016270/* end confdefs.h. */
16271
16272#include <sys/types.h>
16273#include <sys/socket.h>
16274
16275int
16276main ()
16277{
16278 struct sockaddr_storage s; s.ss_family = 1;
16279 ;
16280 return 0;
16281}
16282_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070016283if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016284 ac_cv_have_ss_family_in_struct_ss="yes"
16285else
Greg Hartman9768ca42017-06-22 20:49:52 -070016286 ac_cv_have_ss_family_in_struct_ss="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016287fi
16288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16289
16290fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016291{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ss_family_in_struct_ss" >&5
16292$as_echo "$ac_cv_have_ss_family_in_struct_ss" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016293if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
16294
Greg Hartman9768ca42017-06-22 20:49:52 -070016295$as_echo "#define HAVE_SS_FAMILY_IN_SS 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016296
16297fi
16298
Greg Hartman9768ca42017-06-22 20:49:52 -070016299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __ss_family field in struct sockaddr_storage" >&5
16300$as_echo_n "checking for __ss_family field in struct sockaddr_storage... " >&6; }
16301if ${ac_cv_have___ss_family_in_struct_ss+:} false; then :
16302 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016303else
16304
Greg Hartman9768ca42017-06-22 20:49:52 -070016305 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016306/* end confdefs.h. */
16307
16308#include <sys/types.h>
16309#include <sys/socket.h>
16310
16311int
16312main ()
16313{
16314 struct sockaddr_storage s; s.__ss_family = 1;
16315 ;
16316 return 0;
16317}
16318_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070016319if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016320 ac_cv_have___ss_family_in_struct_ss="yes"
16321else
Greg Hartman9768ca42017-06-22 20:49:52 -070016322 ac_cv_have___ss_family_in_struct_ss="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016323
16324fi
16325rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16326
16327fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016328{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___ss_family_in_struct_ss" >&5
16329$as_echo "$ac_cv_have___ss_family_in_struct_ss" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016330if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
16331
Greg Hartman9768ca42017-06-22 20:49:52 -070016332$as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016333
16334fi
16335
Greg Hartman9768ca42017-06-22 20:49:52 -070016336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_accrights field in struct msghdr" >&5
16337$as_echo_n "checking for msg_accrights field in struct msghdr... " >&6; }
16338if ${ac_cv_have_accrights_in_msghdr+:} false; then :
16339 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016340else
16341
Greg Hartman9768ca42017-06-22 20:49:52 -070016342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016343/* end confdefs.h. */
16344
16345#include <sys/types.h>
16346#include <sys/socket.h>
16347#include <sys/uio.h>
16348
16349int
16350main ()
16351{
16352
16353#ifdef msg_accrights
16354#error "msg_accrights is a macro"
16355exit(1);
16356#endif
16357struct msghdr m;
16358m.msg_accrights = 0;
16359exit(0);
16360
16361 ;
16362 return 0;
16363}
16364_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070016365if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016366 ac_cv_have_accrights_in_msghdr="yes"
16367else
Greg Hartman9768ca42017-06-22 20:49:52 -070016368 ac_cv_have_accrights_in_msghdr="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016369
16370fi
16371rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16372
16373fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_accrights_in_msghdr" >&5
16375$as_echo "$ac_cv_have_accrights_in_msghdr" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016376if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
16377
Greg Hartman9768ca42017-06-22 20:49:52 -070016378$as_echo "#define HAVE_ACCRIGHTS_IN_MSGHDR 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016379
16380fi
16381
Greg Hartman9768ca42017-06-22 20:49:52 -070016382{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct statvfs.f_fsid is integral type" >&5
16383$as_echo_n "checking if struct statvfs.f_fsid is integral type... " >&6; }
16384cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016385/* end confdefs.h. */
16386
Adam Langleyd0592972015-03-30 14:49:51 -070016387#include <sys/param.h>
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016388#include <sys/stat.h>
16389#ifdef HAVE_SYS_TIME_H
16390# include <sys/time.h>
16391#endif
16392#ifdef HAVE_SYS_MOUNT_H
16393#include <sys/mount.h>
16394#endif
16395#ifdef HAVE_SYS_STATVFS_H
16396#include <sys/statvfs.h>
16397#endif
16398
16399int
16400main ()
16401{
16402 struct statvfs s; s.f_fsid = 0;
16403 ;
16404 return 0;
16405}
16406_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070016407if ac_fn_c_try_compile "$LINENO"; then :
16408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16409$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016410else
Greg Hartman9768ca42017-06-22 20:49:52 -070016411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16412$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016413
Greg Hartman9768ca42017-06-22 20:49:52 -070016414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fsid_t has member val" >&5
16415$as_echo_n "checking if fsid_t has member val... " >&6; }
16416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016417/* end confdefs.h. */
16418
16419#include <sys/types.h>
16420#include <sys/statvfs.h>
16421
16422int
16423main ()
16424{
16425 fsid_t t; t.val[0] = 0;
16426 ;
16427 return 0;
16428}
16429_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070016430if ac_fn_c_try_compile "$LINENO"; then :
16431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16432$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016433
Greg Hartman9768ca42017-06-22 20:49:52 -070016434$as_echo "#define FSID_HAS_VAL 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016435
16436else
Greg Hartman9768ca42017-06-22 20:49:52 -070016437 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16438$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016439fi
16440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16441
Greg Hartman9768ca42017-06-22 20:49:52 -070016442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if f_fsid has member __val" >&5
16443$as_echo_n "checking if f_fsid has member __val... " >&6; }
16444 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016445/* end confdefs.h. */
16446
16447#include <sys/types.h>
16448#include <sys/statvfs.h>
16449
16450int
16451main ()
16452{
16453 fsid_t t; t.__val[0] = 0;
16454 ;
16455 return 0;
16456}
16457_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070016458if ac_fn_c_try_compile "$LINENO"; then :
16459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16460$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016461
Greg Hartman9768ca42017-06-22 20:49:52 -070016462$as_echo "#define FSID_HAS___VAL 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016463
16464else
Greg Hartman9768ca42017-06-22 20:49:52 -070016465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16466$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016467fi
16468rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16469
16470fi
16471rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16472
Greg Hartman9768ca42017-06-22 20:49:52 -070016473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_control field in struct msghdr" >&5
16474$as_echo_n "checking for msg_control field in struct msghdr... " >&6; }
16475if ${ac_cv_have_control_in_msghdr+:} false; then :
16476 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016477else
16478
Greg Hartman9768ca42017-06-22 20:49:52 -070016479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016480/* end confdefs.h. */
16481
16482#include <sys/types.h>
16483#include <sys/socket.h>
16484#include <sys/uio.h>
16485
16486int
16487main ()
16488{
16489
16490#ifdef msg_control
16491#error "msg_control is a macro"
16492exit(1);
16493#endif
16494struct msghdr m;
16495m.msg_control = 0;
16496exit(0);
16497
16498 ;
16499 return 0;
16500}
16501_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070016502if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016503 ac_cv_have_control_in_msghdr="yes"
16504else
Greg Hartman9768ca42017-06-22 20:49:52 -070016505 ac_cv_have_control_in_msghdr="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016506
16507fi
16508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16509
16510fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_control_in_msghdr" >&5
16512$as_echo "$ac_cv_have_control_in_msghdr" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016513if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
16514
Greg Hartman9768ca42017-06-22 20:49:52 -070016515$as_echo "#define HAVE_CONTROL_IN_MSGHDR 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016516
16517fi
16518
Greg Hartman9768ca42017-06-22 20:49:52 -070016519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines __progname" >&5
16520$as_echo_n "checking if libc defines __progname... " >&6; }
16521if ${ac_cv_libc_defines___progname+:} false; then :
16522 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016523else
16524
Greg Hartman9768ca42017-06-22 20:49:52 -070016525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016526/* end confdefs.h. */
16527
16528int
16529main ()
16530{
16531 extern char *__progname; printf("%s", __progname);
16532 ;
16533 return 0;
16534}
16535_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070016536if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016537 ac_cv_libc_defines___progname="yes"
16538else
Greg Hartman9768ca42017-06-22 20:49:52 -070016539 ac_cv_libc_defines___progname="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016540
16541fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016542rm -f core conftest.err conftest.$ac_objext \
16543 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016544
16545fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016546{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines___progname" >&5
16547$as_echo "$ac_cv_libc_defines___progname" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016548if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
16549
Greg Hartman9768ca42017-06-22 20:49:52 -070016550$as_echo "#define HAVE___PROGNAME 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016551
16552fi
16553
Greg Hartman9768ca42017-06-22 20:49:52 -070016554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __FUNCTION__" >&5
16555$as_echo_n "checking whether $CC implements __FUNCTION__... " >&6; }
16556if ${ac_cv_cc_implements___FUNCTION__+:} false; then :
16557 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016558else
16559
Greg Hartman9768ca42017-06-22 20:49:52 -070016560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016561/* end confdefs.h. */
16562 #include <stdio.h>
16563int
16564main ()
16565{
16566 printf("%s", __FUNCTION__);
16567 ;
16568 return 0;
16569}
16570_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070016571if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016572 ac_cv_cc_implements___FUNCTION__="yes"
16573else
Greg Hartman9768ca42017-06-22 20:49:52 -070016574 ac_cv_cc_implements___FUNCTION__="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016575
16576fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016577rm -f core conftest.err conftest.$ac_objext \
16578 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016579
16580fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016581{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___FUNCTION__" >&5
16582$as_echo "$ac_cv_cc_implements___FUNCTION__" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016583if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
16584
Greg Hartman9768ca42017-06-22 20:49:52 -070016585$as_echo "#define HAVE___FUNCTION__ 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016586
16587fi
16588
Greg Hartman9768ca42017-06-22 20:49:52 -070016589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __func__" >&5
16590$as_echo_n "checking whether $CC implements __func__... " >&6; }
16591if ${ac_cv_cc_implements___func__+:} false; then :
16592 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016593else
16594
Greg Hartman9768ca42017-06-22 20:49:52 -070016595 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016596/* end confdefs.h. */
16597 #include <stdio.h>
16598int
16599main ()
16600{
16601 printf("%s", __func__);
16602 ;
16603 return 0;
16604}
16605_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070016606if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016607 ac_cv_cc_implements___func__="yes"
16608else
Greg Hartman9768ca42017-06-22 20:49:52 -070016609 ac_cv_cc_implements___func__="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016610
16611fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016612rm -f core conftest.err conftest.$ac_objext \
16613 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016614
16615fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___func__" >&5
16617$as_echo "$ac_cv_cc_implements___func__" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016618if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
16619
Greg Hartman9768ca42017-06-22 20:49:52 -070016620$as_echo "#define HAVE___func__ 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016621
16622fi
16623
Greg Hartman9768ca42017-06-22 20:49:52 -070016624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_copy exists" >&5
16625$as_echo_n "checking whether va_copy exists... " >&6; }
16626if ${ac_cv_have_va_copy+:} false; then :
16627 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016628else
16629
Greg Hartman9768ca42017-06-22 20:49:52 -070016630 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016631/* end confdefs.h. */
16632
16633#include <stdarg.h>
16634va_list x,y;
16635
16636int
16637main ()
16638{
16639 va_copy(x,y);
16640 ;
16641 return 0;
16642}
16643_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070016644if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016645 ac_cv_have_va_copy="yes"
16646else
Greg Hartman9768ca42017-06-22 20:49:52 -070016647 ac_cv_have_va_copy="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016648
16649fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016650rm -f core conftest.err conftest.$ac_objext \
16651 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016652
16653fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_va_copy" >&5
16655$as_echo "$ac_cv_have_va_copy" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016656if test "x$ac_cv_have_va_copy" = "xyes" ; then
16657
Greg Hartman9768ca42017-06-22 20:49:52 -070016658$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016659
16660fi
16661
Greg Hartman9768ca42017-06-22 20:49:52 -070016662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __va_copy exists" >&5
16663$as_echo_n "checking whether __va_copy exists... " >&6; }
16664if ${ac_cv_have___va_copy+:} false; then :
16665 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016666else
16667
Greg Hartman9768ca42017-06-22 20:49:52 -070016668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016669/* end confdefs.h. */
16670
16671#include <stdarg.h>
16672va_list x,y;
16673
16674int
16675main ()
16676{
16677 __va_copy(x,y);
16678 ;
16679 return 0;
16680}
16681_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070016682if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016683 ac_cv_have___va_copy="yes"
16684else
Greg Hartman9768ca42017-06-22 20:49:52 -070016685 ac_cv_have___va_copy="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016686
16687fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016688rm -f core conftest.err conftest.$ac_objext \
16689 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016690
16691fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___va_copy" >&5
16693$as_echo "$ac_cv_have___va_copy" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016694if test "x$ac_cv_have___va_copy" = "xyes" ; then
16695
Greg Hartman9768ca42017-06-22 20:49:52 -070016696$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016697
16698fi
16699
Greg Hartman9768ca42017-06-22 20:49:52 -070016700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt has optreset support" >&5
16701$as_echo_n "checking whether getopt has optreset support... " >&6; }
16702if ${ac_cv_have_getopt_optreset+:} false; then :
16703 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016704else
16705
Greg Hartman9768ca42017-06-22 20:49:52 -070016706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016707/* end confdefs.h. */
16708 #include <getopt.h>
16709int
16710main ()
16711{
16712 extern int optreset; optreset = 0;
16713 ;
16714 return 0;
16715}
16716_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070016717if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016718 ac_cv_have_getopt_optreset="yes"
16719else
Greg Hartman9768ca42017-06-22 20:49:52 -070016720 ac_cv_have_getopt_optreset="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016721
16722fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016723rm -f core conftest.err conftest.$ac_objext \
16724 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016725
16726fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getopt_optreset" >&5
16728$as_echo "$ac_cv_have_getopt_optreset" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016729if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
16730
Greg Hartman9768ca42017-06-22 20:49:52 -070016731$as_echo "#define HAVE_GETOPT_OPTRESET 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016732
16733fi
16734
Greg Hartman9768ca42017-06-22 20:49:52 -070016735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_errlist" >&5
16736$as_echo_n "checking if libc defines sys_errlist... " >&6; }
16737if ${ac_cv_libc_defines_sys_errlist+:} false; then :
16738 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016739else
16740
Greg Hartman9768ca42017-06-22 20:49:52 -070016741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016742/* end confdefs.h. */
16743
16744int
16745main ()
16746{
16747 extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);
16748 ;
16749 return 0;
16750}
16751_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070016752if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016753 ac_cv_libc_defines_sys_errlist="yes"
16754else
Greg Hartman9768ca42017-06-22 20:49:52 -070016755 ac_cv_libc_defines_sys_errlist="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016756
16757fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016758rm -f core conftest.err conftest.$ac_objext \
16759 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016760
16761fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_errlist" >&5
16763$as_echo "$ac_cv_libc_defines_sys_errlist" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016764if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
16765
Greg Hartman9768ca42017-06-22 20:49:52 -070016766$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016767
16768fi
16769
16770
Greg Hartman9768ca42017-06-22 20:49:52 -070016771{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_nerr" >&5
16772$as_echo_n "checking if libc defines sys_nerr... " >&6; }
16773if ${ac_cv_libc_defines_sys_nerr+:} false; then :
16774 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016775else
16776
Greg Hartman9768ca42017-06-22 20:49:52 -070016777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016778/* end confdefs.h. */
16779
16780int
16781main ()
16782{
16783 extern int sys_nerr; printf("%i", sys_nerr);
16784 ;
16785 return 0;
16786}
16787_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070016788if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016789 ac_cv_libc_defines_sys_nerr="yes"
16790else
Greg Hartman9768ca42017-06-22 20:49:52 -070016791 ac_cv_libc_defines_sys_nerr="no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016792
16793fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016794rm -f core conftest.err conftest.$ac_objext \
16795 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016796
16797fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_nerr" >&5
16799$as_echo "$ac_cv_libc_defines_sys_nerr" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016800if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
16801
Greg Hartman9768ca42017-06-22 20:49:52 -070016802$as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016803
16804fi
16805
16806# Check libraries needed by DNS fingerprint support
Greg Hartman9768ca42017-06-22 20:49:52 -070016807{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getrrsetbyname" >&5
16808$as_echo_n "checking for library containing getrrsetbyname... " >&6; }
16809if ${ac_cv_search_getrrsetbyname+:} false; then :
16810 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016811else
16812 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -070016813cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016814/* end confdefs.h. */
16815
16816/* Override any GCC internal prototype to avoid an error.
16817 Use char because int might match the return type of a GCC
16818 builtin and then its argument prototype would still apply. */
16819#ifdef __cplusplus
16820extern "C"
16821#endif
16822char getrrsetbyname ();
16823int
16824main ()
16825{
16826return getrrsetbyname ();
16827 ;
16828 return 0;
16829}
16830_ACEOF
16831for ac_lib in '' resolv; do
16832 if test -z "$ac_lib"; then
16833 ac_res="none required"
16834 else
16835 ac_res=-l$ac_lib
16836 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16837 fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016838 if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016839 ac_cv_search_getrrsetbyname=$ac_res
16840fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016841rm -f core conftest.err conftest.$ac_objext \
16842 conftest$ac_exeext
16843 if ${ac_cv_search_getrrsetbyname+:} false; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016844 break
16845fi
16846done
Greg Hartman9768ca42017-06-22 20:49:52 -070016847if ${ac_cv_search_getrrsetbyname+:} false; then :
16848
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016849else
16850 ac_cv_search_getrrsetbyname=no
16851fi
16852rm conftest.$ac_ext
16853LIBS=$ac_func_search_save_LIBS
16854fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getrrsetbyname" >&5
16856$as_echo "$ac_cv_search_getrrsetbyname" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016857ac_res=$ac_cv_search_getrrsetbyname
Greg Hartman9768ca42017-06-22 20:49:52 -070016858if test "$ac_res" != no; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016859 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16860
Greg Hartman9768ca42017-06-22 20:49:52 -070016861$as_echo "#define HAVE_GETRRSETBYNAME 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016862
16863else
16864
16865 # Needed by our getrrsetbyname()
Greg Hartman9768ca42017-06-22 20:49:52 -070016866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_query" >&5
16867$as_echo_n "checking for library containing res_query... " >&6; }
16868if ${ac_cv_search_res_query+:} false; then :
16869 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016870else
16871 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -070016872cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016873/* end confdefs.h. */
16874
16875/* Override any GCC internal prototype to avoid an error.
16876 Use char because int might match the return type of a GCC
16877 builtin and then its argument prototype would still apply. */
16878#ifdef __cplusplus
16879extern "C"
16880#endif
16881char res_query ();
16882int
16883main ()
16884{
16885return res_query ();
16886 ;
16887 return 0;
16888}
16889_ACEOF
16890for ac_lib in '' resolv; do
16891 if test -z "$ac_lib"; then
16892 ac_res="none required"
16893 else
16894 ac_res=-l$ac_lib
16895 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16896 fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016897 if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016898 ac_cv_search_res_query=$ac_res
16899fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016900rm -f core conftest.err conftest.$ac_objext \
16901 conftest$ac_exeext
16902 if ${ac_cv_search_res_query+:} false; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016903 break
16904fi
16905done
Greg Hartman9768ca42017-06-22 20:49:52 -070016906if ${ac_cv_search_res_query+:} false; then :
16907
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016908else
16909 ac_cv_search_res_query=no
16910fi
16911rm conftest.$ac_ext
16912LIBS=$ac_func_search_save_LIBS
16913fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016914{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_query" >&5
16915$as_echo "$ac_cv_search_res_query" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016916ac_res=$ac_cv_search_res_query
Greg Hartman9768ca42017-06-22 20:49:52 -070016917if test "$ac_res" != no; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016918 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16919
16920fi
16921
Greg Hartman9768ca42017-06-22 20:49:52 -070016922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
16923$as_echo_n "checking for library containing dn_expand... " >&6; }
16924if ${ac_cv_search_dn_expand+:} false; then :
16925 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016926else
16927 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -070016928cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016929/* end confdefs.h. */
16930
16931/* Override any GCC internal prototype to avoid an error.
16932 Use char because int might match the return type of a GCC
16933 builtin and then its argument prototype would still apply. */
16934#ifdef __cplusplus
16935extern "C"
16936#endif
16937char dn_expand ();
16938int
16939main ()
16940{
16941return dn_expand ();
16942 ;
16943 return 0;
16944}
16945_ACEOF
16946for ac_lib in '' resolv; do
16947 if test -z "$ac_lib"; then
16948 ac_res="none required"
16949 else
16950 ac_res=-l$ac_lib
16951 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16952 fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016953 if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016954 ac_cv_search_dn_expand=$ac_res
16955fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016956rm -f core conftest.err conftest.$ac_objext \
16957 conftest$ac_exeext
16958 if ${ac_cv_search_dn_expand+:} false; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016959 break
16960fi
16961done
Greg Hartman9768ca42017-06-22 20:49:52 -070016962if ${ac_cv_search_dn_expand+:} false; then :
16963
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016964else
16965 ac_cv_search_dn_expand=no
16966fi
16967rm conftest.$ac_ext
16968LIBS=$ac_func_search_save_LIBS
16969fi
Greg Hartman9768ca42017-06-22 20:49:52 -070016970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
16971$as_echo "$ac_cv_search_dn_expand" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016972ac_res=$ac_cv_search_dn_expand
Greg Hartman9768ca42017-06-22 20:49:52 -070016973if test "$ac_res" != no; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016974 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16975
16976fi
16977
Greg Hartman9768ca42017-06-22 20:49:52 -070016978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if res_query will link" >&5
16979$as_echo_n "checking if res_query will link... " >&6; }
16980 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080016981/* end confdefs.h. */
16982
16983#include <sys/types.h>
16984#include <netinet/in.h>
16985#include <arpa/nameser.h>
16986#include <netdb.h>
16987#include <resolv.h>
16988
16989int
16990main ()
16991{
16992
16993 res_query (0, 0, 0, 0, 0);
16994
16995 ;
16996 return 0;
16997}
16998_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070016999if ac_fn_c_try_link "$LINENO"; then :
17000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17001$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017002else
Greg Hartman9768ca42017-06-22 20:49:52 -070017003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17004$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017005 saved_LIBS="$LIBS"
17006 LIBS="$LIBS -lresolv"
Greg Hartman9768ca42017-06-22 20:49:52 -070017007 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
17008$as_echo_n "checking for res_query in -lresolv... " >&6; }
17009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017010/* end confdefs.h. */
17011
17012#include <sys/types.h>
17013#include <netinet/in.h>
17014#include <arpa/nameser.h>
17015#include <netdb.h>
17016#include <resolv.h>
17017
17018int
17019main ()
17020{
17021
17022 res_query (0, 0, 0, 0, 0);
17023
17024 ;
17025 return 0;
17026}
17027_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017028if ac_fn_c_try_link "$LINENO"; then :
17029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17030$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017031else
Greg Hartman9768ca42017-06-22 20:49:52 -070017032 LIBS="$saved_LIBS"
17033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17034$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017035fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017036rm -f core conftest.err conftest.$ac_objext \
17037 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017038
17039fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017040rm -f core conftest.err conftest.$ac_objext \
17041 conftest$ac_exeext conftest.$ac_ext
17042 for ac_func in _getshort _getlong
17043do :
17044 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17045ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17046if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017047 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017048#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017049_ACEOF
17050
17051fi
17052done
17053
Greg Hartman9768ca42017-06-22 20:49:52 -070017054 ac_fn_c_check_decl "$LINENO" "_getshort" "ac_cv_have_decl__getshort" "#include <sys/types.h>
Adam Langleyd0592972015-03-30 14:49:51 -070017055 #include <arpa/nameser.h>
Greg Hartman9768ca42017-06-22 20:49:52 -070017056"
17057if test "x$ac_cv_have_decl__getshort" = xyes; then :
17058 ac_have_decl=1
Adam Langleyd0592972015-03-30 14:49:51 -070017059else
Greg Hartman9768ca42017-06-22 20:49:52 -070017060 ac_have_decl=0
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017061fi
17062
17063cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017064#define HAVE_DECL__GETSHORT $ac_have_decl
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017065_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017066ac_fn_c_check_decl "$LINENO" "_getlong" "ac_cv_have_decl__getlong" "#include <sys/types.h>
Adam Langleyd0592972015-03-30 14:49:51 -070017067 #include <arpa/nameser.h>
Greg Hartman9768ca42017-06-22 20:49:52 -070017068"
17069if test "x$ac_cv_have_decl__getlong" = xyes; then :
17070 ac_have_decl=1
Adam Langleyd0592972015-03-30 14:49:51 -070017071else
Greg Hartman9768ca42017-06-22 20:49:52 -070017072 ac_have_decl=0
Adam Langleyd0592972015-03-30 14:49:51 -070017073fi
17074
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017075cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017076#define HAVE_DECL__GETLONG $ac_have_decl
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017077_ACEOF
17078
Greg Hartman9768ca42017-06-22 20:49:52 -070017079 ac_fn_c_check_member "$LINENO" "HEADER" "ad" "ac_cv_member_HEADER_ad" "#include <arpa/nameser.h>
17080"
17081if test "x$ac_cv_member_HEADER_ad" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017082
Greg Hartman9768ca42017-06-22 20:49:52 -070017083$as_echo "#define HAVE_HEADER_AD 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017084
17085fi
17086
17087
17088fi
17089
17090
Greg Hartman9768ca42017-06-22 20:49:52 -070017091{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct __res_state _res is an extern" >&5
17092$as_echo_n "checking if struct __res_state _res is an extern... " >&6; }
17093cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017094/* end confdefs.h. */
17095
17096#include <stdio.h>
17097#if HAVE_SYS_TYPES_H
17098# include <sys/types.h>
17099#endif
17100#include <netinet/in.h>
17101#include <arpa/nameser.h>
17102#include <resolv.h>
17103extern struct __res_state _res;
17104
17105int
17106main ()
17107{
17108
Greg Hartman9768ca42017-06-22 20:49:52 -070017109struct __res_state *volatile p = &_res; /* force resolution of _res */
17110return 0;
17111
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017112 ;
17113 return 0;
17114}
17115_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017116if ac_fn_c_try_link "$LINENO"; then :
17117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17118$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017119
Greg Hartman9768ca42017-06-22 20:49:52 -070017120$as_echo "#define HAVE__RES_EXTERN 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017121
17122
17123else
Greg Hartman9768ca42017-06-22 20:49:52 -070017124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17125$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017126
17127fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017128rm -f core conftest.err conftest.$ac_objext \
17129 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017130
17131# Check whether user wants SELinux support
17132SELINUX_MSG="no"
17133LIBSELINUX=""
17134
17135# Check whether --with-selinux was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070017136if test "${with_selinux+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017137 withval=$with_selinux; if test "x$withval" != "xno" ; then
17138 save_LIBS="$LIBS"
17139
Greg Hartman9768ca42017-06-22 20:49:52 -070017140$as_echo "#define WITH_SELINUX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017141
17142 SELINUX_MSG="yes"
Greg Hartman9768ca42017-06-22 20:49:52 -070017143 ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
17144if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
17145
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017146else
Greg Hartman9768ca42017-06-22 20:49:52 -070017147 as_fn_error $? "SELinux support requires selinux.h header" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017148fi
17149
17150
Greg Hartman9768ca42017-06-22 20:49:52 -070017151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setexeccon in -lselinux" >&5
17152$as_echo_n "checking for setexeccon in -lselinux... " >&6; }
17153if ${ac_cv_lib_selinux_setexeccon+:} false; then :
17154 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017155else
17156 ac_check_lib_save_LIBS=$LIBS
17157LIBS="-lselinux $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070017158cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017159/* end confdefs.h. */
17160
17161/* Override any GCC internal prototype to avoid an error.
17162 Use char because int might match the return type of a GCC
17163 builtin and then its argument prototype would still apply. */
17164#ifdef __cplusplus
17165extern "C"
17166#endif
17167char setexeccon ();
17168int
17169main ()
17170{
17171return setexeccon ();
17172 ;
17173 return 0;
17174}
17175_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017176if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017177 ac_cv_lib_selinux_setexeccon=yes
17178else
Greg Hartman9768ca42017-06-22 20:49:52 -070017179 ac_cv_lib_selinux_setexeccon=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017180fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017181rm -f core conftest.err conftest.$ac_objext \
17182 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017183LIBS=$ac_check_lib_save_LIBS
17184fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_setexeccon" >&5
17186$as_echo "$ac_cv_lib_selinux_setexeccon" >&6; }
17187if test "x$ac_cv_lib_selinux_setexeccon" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017188 LIBSELINUX="-lselinux"
17189 LIBS="$LIBS -lselinux"
17190
17191else
Greg Hartman9768ca42017-06-22 20:49:52 -070017192 as_fn_error $? "SELinux support requires libselinux library" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017193fi
17194
17195 SSHLIBS="$SSHLIBS $LIBSELINUX"
17196 SSHDLIBS="$SSHDLIBS $LIBSELINUX"
Greg Hartman9768ca42017-06-22 20:49:52 -070017197 for ac_func in getseuserbyname get_default_context_with_level
17198do :
17199 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17200ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17201if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017202 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017203#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017204_ACEOF
17205
17206fi
17207done
17208
17209 LIBS="$save_LIBS"
17210 fi
17211
17212fi
17213
17214
17215
17216
17217# Check whether user wants Kerberos 5 support
17218KRB5_MSG="no"
17219
17220# Check whether --with-kerberos5 was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070017221if test "${with_kerberos5+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017222 withval=$with_kerberos5; if test "x$withval" != "xno" ; then
17223 if test "x$withval" = "xyes" ; then
17224 KRB5ROOT="/usr/local"
17225 else
17226 KRB5ROOT=${withval}
17227 fi
17228
17229
Greg Hartman9768ca42017-06-22 20:49:52 -070017230$as_echo "#define KRB5 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017231
17232 KRB5_MSG="yes"
17233
Greg Hartman9768ca42017-06-22 20:49:52 -070017234 if test -n "$ac_tool_prefix"; then
17235 # Extract the first word of "${ac_tool_prefix}krb5-config", so it can be a program name with args.
17236set dummy ${ac_tool_prefix}krb5-config; ac_word=$2
17237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17238$as_echo_n "checking for $ac_word... " >&6; }
17239if ${ac_cv_path_KRB5CONF+:} false; then :
17240 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017241else
17242 case $KRB5CONF in
17243 [\\/]* | ?:[\\/]*)
17244 ac_cv_path_KRB5CONF="$KRB5CONF" # Let the user override the test with a path.
17245 ;;
17246 *)
17247 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17248as_dummy="$KRB5ROOT/bin:$PATH"
17249for as_dir in $as_dummy
17250do
17251 IFS=$as_save_IFS
17252 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -070017253 for ac_exec_ext in '' $ac_executable_extensions; do
17254 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017255 ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -070017256 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017257 break 2
17258 fi
17259done
Greg Hartman9768ca42017-06-22 20:49:52 -070017260 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017261IFS=$as_save_IFS
17262
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017263 ;;
17264esac
17265fi
17266KRB5CONF=$ac_cv_path_KRB5CONF
17267if test -n "$KRB5CONF"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070017268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5CONF" >&5
17269$as_echo "$KRB5CONF" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017270else
Greg Hartman9768ca42017-06-22 20:49:52 -070017271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17272$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017273fi
17274
17275
Greg Hartman9768ca42017-06-22 20:49:52 -070017276fi
17277if test -z "$ac_cv_path_KRB5CONF"; then
17278 ac_pt_KRB5CONF=$KRB5CONF
17279 # Extract the first word of "krb5-config", so it can be a program name with args.
17280set dummy krb5-config; ac_word=$2
17281{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17282$as_echo_n "checking for $ac_word... " >&6; }
17283if ${ac_cv_path_ac_pt_KRB5CONF+:} false; then :
17284 $as_echo_n "(cached) " >&6
17285else
17286 case $ac_pt_KRB5CONF in
17287 [\\/]* | ?:[\\/]*)
17288 ac_cv_path_ac_pt_KRB5CONF="$ac_pt_KRB5CONF" # Let the user override the test with a path.
17289 ;;
17290 *)
17291 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17292as_dummy="$KRB5ROOT/bin:$PATH"
17293for as_dir in $as_dummy
17294do
17295 IFS=$as_save_IFS
17296 test -z "$as_dir" && as_dir=.
17297 for ac_exec_ext in '' $ac_executable_extensions; do
17298 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17299 ac_cv_path_ac_pt_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
17300 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17301 break 2
17302 fi
17303done
17304 done
17305IFS=$as_save_IFS
17306
17307 ;;
17308esac
17309fi
17310ac_pt_KRB5CONF=$ac_cv_path_ac_pt_KRB5CONF
17311if test -n "$ac_pt_KRB5CONF"; then
17312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_KRB5CONF" >&5
17313$as_echo "$ac_pt_KRB5CONF" >&6; }
17314else
17315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17316$as_echo "no" >&6; }
17317fi
17318
17319 if test "x$ac_pt_KRB5CONF" = x; then
17320 KRB5CONF="$KRB5ROOT/bin/krb5-config"
17321 else
17322 case $cross_compiling:$ac_tool_warned in
17323yes:)
17324{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17325$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17326ac_tool_warned=yes ;;
17327esac
17328 KRB5CONF=$ac_pt_KRB5CONF
17329 fi
17330else
17331 KRB5CONF="$ac_cv_path_KRB5CONF"
17332fi
17333
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017334 if test -x $KRB5CONF ; then
Adam Langleyd0592972015-03-30 14:49:51 -070017335 K5CFLAGS="`$KRB5CONF --cflags`"
17336 K5LIBS="`$KRB5CONF --libs`"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017337 CPPFLAGS="$CPPFLAGS $K5CFLAGS"
Adam Langleyd0592972015-03-30 14:49:51 -070017338
Greg Hartman9768ca42017-06-22 20:49:52 -070017339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gssapi support" >&5
17340$as_echo_n "checking for gssapi support... " >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070017341 if $KRB5CONF | grep gssapi >/dev/null ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070017342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17343$as_echo "yes" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070017344
Greg Hartman9768ca42017-06-22 20:49:52 -070017345$as_echo "#define GSSAPI 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070017346
17347 GSSCFLAGS="`$KRB5CONF --cflags gssapi`"
17348 GSSLIBS="`$KRB5CONF --libs gssapi`"
17349 CPPFLAGS="$CPPFLAGS $GSSCFLAGS"
17350 else
Greg Hartman9768ca42017-06-22 20:49:52 -070017351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17352$as_echo "no" >&6; }
Adam Langleyd0592972015-03-30 14:49:51 -070017353 fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
17355$as_echo_n "checking whether we are using Heimdal... " >&6; }
17356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017357/* end confdefs.h. */
17358 #include <krb5.h>
17359
17360int
17361main ()
17362{
17363 char *tmp = heimdal_version;
17364 ;
17365 return 0;
17366}
17367_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017368if ac_fn_c_try_compile "$LINENO"; then :
17369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17370$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017371
Greg Hartman9768ca42017-06-22 20:49:52 -070017372$as_echo "#define HEIMDAL 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017373
17374else
Greg Hartman9768ca42017-06-22 20:49:52 -070017375 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17376$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017377
17378fi
17379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17380 else
17381 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
17382 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
Greg Hartman9768ca42017-06-22 20:49:52 -070017383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
17384$as_echo_n "checking whether we are using Heimdal... " >&6; }
17385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017386/* end confdefs.h. */
17387 #include <krb5.h>
17388
17389int
17390main ()
17391{
17392 char *tmp = heimdal_version;
17393 ;
17394 return 0;
17395}
17396_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017397if ac_fn_c_try_compile "$LINENO"; then :
17398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17399$as_echo "yes" >&6; }
17400 $as_echo "#define HEIMDAL 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017401
17402 K5LIBS="-lkrb5"
17403 K5LIBS="$K5LIBS -lcom_err -lasn1"
Greg Hartman9768ca42017-06-22 20:49:52 -070017404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for net_write in -lroken" >&5
17405$as_echo_n "checking for net_write in -lroken... " >&6; }
17406if ${ac_cv_lib_roken_net_write+:} false; then :
17407 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017408else
17409 ac_check_lib_save_LIBS=$LIBS
17410LIBS="-lroken $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070017411cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017412/* end confdefs.h. */
17413
17414/* Override any GCC internal prototype to avoid an error.
17415 Use char because int might match the return type of a GCC
17416 builtin and then its argument prototype would still apply. */
17417#ifdef __cplusplus
17418extern "C"
17419#endif
17420char net_write ();
17421int
17422main ()
17423{
17424return net_write ();
17425 ;
17426 return 0;
17427}
17428_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017429if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017430 ac_cv_lib_roken_net_write=yes
17431else
Greg Hartman9768ca42017-06-22 20:49:52 -070017432 ac_cv_lib_roken_net_write=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017433fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017434rm -f core conftest.err conftest.$ac_objext \
17435 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017436LIBS=$ac_check_lib_save_LIBS
17437fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_roken_net_write" >&5
17439$as_echo "$ac_cv_lib_roken_net_write" >&6; }
17440if test "x$ac_cv_lib_roken_net_write" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017441 K5LIBS="$K5LIBS -lroken"
17442fi
17443
Greg Hartman9768ca42017-06-22 20:49:52 -070017444 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
17445$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
17446if ${ac_cv_lib_des_des_cbc_encrypt+:} false; then :
17447 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017448else
17449 ac_check_lib_save_LIBS=$LIBS
17450LIBS="-ldes $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070017451cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017452/* end confdefs.h. */
17453
17454/* Override any GCC internal prototype to avoid an error.
17455 Use char because int might match the return type of a GCC
17456 builtin and then its argument prototype would still apply. */
17457#ifdef __cplusplus
17458extern "C"
17459#endif
17460char des_cbc_encrypt ();
17461int
17462main ()
17463{
17464return des_cbc_encrypt ();
17465 ;
17466 return 0;
17467}
17468_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017469if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017470 ac_cv_lib_des_des_cbc_encrypt=yes
17471else
Greg Hartman9768ca42017-06-22 20:49:52 -070017472 ac_cv_lib_des_des_cbc_encrypt=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017473fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017474rm -f core conftest.err conftest.$ac_objext \
17475 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017476LIBS=$ac_check_lib_save_LIBS
17477fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
17479$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
17480if test "x$ac_cv_lib_des_des_cbc_encrypt" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017481 K5LIBS="$K5LIBS -ldes"
17482fi
17483
17484
17485else
Greg Hartman9768ca42017-06-22 20:49:52 -070017486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17487$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017488 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
17489
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017490fi
17491rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
Greg Hartman9768ca42017-06-22 20:49:52 -070017492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
17493$as_echo_n "checking for library containing dn_expand... " >&6; }
17494if ${ac_cv_search_dn_expand+:} false; then :
17495 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017496else
17497 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -070017498cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017499/* end confdefs.h. */
17500
17501/* Override any GCC internal prototype to avoid an error.
17502 Use char because int might match the return type of a GCC
17503 builtin and then its argument prototype would still apply. */
17504#ifdef __cplusplus
17505extern "C"
17506#endif
17507char dn_expand ();
17508int
17509main ()
17510{
17511return dn_expand ();
17512 ;
17513 return 0;
17514}
17515_ACEOF
17516for ac_lib in '' resolv; do
17517 if test -z "$ac_lib"; then
17518 ac_res="none required"
17519 else
17520 ac_res=-l$ac_lib
17521 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17522 fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017523 if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017524 ac_cv_search_dn_expand=$ac_res
17525fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017526rm -f core conftest.err conftest.$ac_objext \
17527 conftest$ac_exeext
17528 if ${ac_cv_search_dn_expand+:} false; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017529 break
17530fi
17531done
Greg Hartman9768ca42017-06-22 20:49:52 -070017532if ${ac_cv_search_dn_expand+:} false; then :
17533
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017534else
17535 ac_cv_search_dn_expand=no
17536fi
17537rm conftest.$ac_ext
17538LIBS=$ac_func_search_save_LIBS
17539fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
17541$as_echo "$ac_cv_search_dn_expand" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017542ac_res=$ac_cv_search_dn_expand
Greg Hartman9768ca42017-06-22 20:49:52 -070017543if test "$ac_res" != no; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017544 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17545
17546fi
17547
17548
Greg Hartman9768ca42017-06-22 20:49:52 -070017549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi_krb5" >&5
17550$as_echo_n "checking for gss_init_sec_context in -lgssapi_krb5... " >&6; }
17551if ${ac_cv_lib_gssapi_krb5_gss_init_sec_context+:} false; then :
17552 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017553else
17554 ac_check_lib_save_LIBS=$LIBS
Adam Langleyd0592972015-03-30 14:49:51 -070017555LIBS="-lgssapi_krb5 $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070017556cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017557/* end confdefs.h. */
17558
17559/* Override any GCC internal prototype to avoid an error.
17560 Use char because int might match the return type of a GCC
17561 builtin and then its argument prototype would still apply. */
17562#ifdef __cplusplus
17563extern "C"
17564#endif
17565char gss_init_sec_context ();
17566int
17567main ()
17568{
17569return gss_init_sec_context ();
17570 ;
17571 return 0;
17572}
17573_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017574if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017575 ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes
17576else
Greg Hartman9768ca42017-06-22 20:49:52 -070017577 ac_cv_lib_gssapi_krb5_gss_init_sec_context=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017578fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017579rm -f core conftest.err conftest.$ac_objext \
17580 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017581LIBS=$ac_check_lib_save_LIBS
17582fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5
17584$as_echo "$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6; }
17585if test "x$ac_cv_lib_gssapi_krb5_gss_init_sec_context" = xyes; then :
17586 $as_echo "#define GSSAPI 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017587
Adam Langleyd0592972015-03-30 14:49:51 -070017588 GSSLIBS="-lgssapi_krb5"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017589else
Greg Hartman9768ca42017-06-22 20:49:52 -070017590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi" >&5
17591$as_echo_n "checking for gss_init_sec_context in -lgssapi... " >&6; }
17592if ${ac_cv_lib_gssapi_gss_init_sec_context+:} false; then :
17593 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017594else
17595 ac_check_lib_save_LIBS=$LIBS
Adam Langleyd0592972015-03-30 14:49:51 -070017596LIBS="-lgssapi $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070017597cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017598/* end confdefs.h. */
17599
17600/* Override any GCC internal prototype to avoid an error.
17601 Use char because int might match the return type of a GCC
17602 builtin and then its argument prototype would still apply. */
17603#ifdef __cplusplus
17604extern "C"
17605#endif
17606char gss_init_sec_context ();
17607int
17608main ()
17609{
17610return gss_init_sec_context ();
17611 ;
17612 return 0;
17613}
17614_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017615if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017616 ac_cv_lib_gssapi_gss_init_sec_context=yes
17617else
Greg Hartman9768ca42017-06-22 20:49:52 -070017618 ac_cv_lib_gssapi_gss_init_sec_context=no
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017619fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017620rm -f core conftest.err conftest.$ac_objext \
17621 conftest$ac_exeext conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017622LIBS=$ac_check_lib_save_LIBS
17623fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017624{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5
17625$as_echo "$ac_cv_lib_gssapi_gss_init_sec_context" >&6; }
17626if test "x$ac_cv_lib_gssapi_gss_init_sec_context" = xyes; then :
17627 $as_echo "#define GSSAPI 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017628
Adam Langleyd0592972015-03-30 14:49:51 -070017629 GSSLIBS="-lgssapi"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017630else
Greg Hartman9768ca42017-06-22 20:49:52 -070017631 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgss" >&5
17632$as_echo_n "checking for gss_init_sec_context in -lgss... " >&6; }
17633if ${ac_cv_lib_gss_gss_init_sec_context+:} false; then :
17634 $as_echo_n "(cached) " >&6
Adam Langleyd0592972015-03-30 14:49:51 -070017635else
17636 ac_check_lib_save_LIBS=$LIBS
17637LIBS="-lgss $LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070017638cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070017639/* end confdefs.h. */
17640
17641/* Override any GCC internal prototype to avoid an error.
17642 Use char because int might match the return type of a GCC
17643 builtin and then its argument prototype would still apply. */
17644#ifdef __cplusplus
17645extern "C"
17646#endif
17647char gss_init_sec_context ();
17648int
17649main ()
17650{
17651return gss_init_sec_context ();
17652 ;
17653 return 0;
17654}
17655_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017656if ac_fn_c_try_link "$LINENO"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070017657 ac_cv_lib_gss_gss_init_sec_context=yes
17658else
Greg Hartman9768ca42017-06-22 20:49:52 -070017659 ac_cv_lib_gss_gss_init_sec_context=no
Adam Langleyd0592972015-03-30 14:49:51 -070017660fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017661rm -f core conftest.err conftest.$ac_objext \
17662 conftest$ac_exeext conftest.$ac_ext
Adam Langleyd0592972015-03-30 14:49:51 -070017663LIBS=$ac_check_lib_save_LIBS
17664fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_init_sec_context" >&5
17666$as_echo "$ac_cv_lib_gss_gss_init_sec_context" >&6; }
17667if test "x$ac_cv_lib_gss_gss_init_sec_context" = xyes; then :
17668 $as_echo "#define GSSAPI 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070017669
17670 GSSLIBS="-lgss"
17671else
Greg Hartman9768ca42017-06-22 20:49:52 -070017672 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api library - build may fail" >&5
17673$as_echo "$as_me: WARNING: Cannot find any suitable gss-api library - build may fail" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017674fi
17675
17676
17677fi
17678
17679
Adam Langleyd0592972015-03-30 14:49:51 -070017680fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017681
Adam Langleyd0592972015-03-30 14:49:51 -070017682
Greg Hartman9768ca42017-06-22 20:49:52 -070017683 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
17684if test "x$ac_cv_header_gssapi_h" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070017685
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017686else
17687 unset ac_cv_header_gssapi_h
17688 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
Greg Hartman9768ca42017-06-22 20:49:52 -070017689 for ac_header in gssapi.h
17690do :
17691 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
17692if test "x$ac_cv_header_gssapi_h" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017693 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017694#define HAVE_GSSAPI_H 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017695_ACEOF
17696
17697else
Greg Hartman9768ca42017-06-22 20:49:52 -070017698 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api header - build may fail" >&5
17699$as_echo "$as_me: WARNING: Cannot find any suitable gss-api header - build may fail" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017700
17701fi
17702
17703done
17704
17705
17706
17707fi
17708
17709
17710
17711 oldCPP="$CPPFLAGS"
17712 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
Greg Hartman9768ca42017-06-22 20:49:52 -070017713 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_krb5.h" "ac_cv_header_gssapi_krb5_h" "$ac_includes_default"
17714if test "x$ac_cv_header_gssapi_krb5_h" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017715
17716else
17717 CPPFLAGS="$oldCPP"
17718fi
17719
17720
17721
17722 fi
17723 if test ! -z "$need_dash_r" ; then
17724 LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
17725 fi
17726 if test ! -z "$blibpath" ; then
17727 blibpath="$blibpath:${KRB5ROOT}/lib"
17728 fi
17729
Greg Hartman9768ca42017-06-22 20:49:52 -070017730 for ac_header in gssapi.h gssapi/gssapi.h
17731do :
17732 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17733ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17734if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017735 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017736#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17737_ACEOF
17738
17739fi
17740
17741done
17742
17743 for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h
17744do :
17745 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17746ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17747if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17748 cat >>confdefs.h <<_ACEOF
17749#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17750_ACEOF
17751
17752fi
17753
17754done
17755
17756 for ac_header in gssapi_generic.h gssapi/gssapi_generic.h
17757do :
17758 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17759ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17760if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17761 cat >>confdefs.h <<_ACEOF
17762#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017763_ACEOF
17764
17765fi
17766
17767done
17768
17769
Greg Hartman9768ca42017-06-22 20:49:52 -070017770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing k_hasafs" >&5
17771$as_echo_n "checking for library containing k_hasafs... " >&6; }
17772if ${ac_cv_search_k_hasafs+:} false; then :
17773 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017774else
17775 ac_func_search_save_LIBS=$LIBS
Greg Hartman9768ca42017-06-22 20:49:52 -070017776cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017777/* end confdefs.h. */
17778
17779/* Override any GCC internal prototype to avoid an error.
17780 Use char because int might match the return type of a GCC
17781 builtin and then its argument prototype would still apply. */
17782#ifdef __cplusplus
17783extern "C"
17784#endif
17785char k_hasafs ();
17786int
17787main ()
17788{
17789return k_hasafs ();
17790 ;
17791 return 0;
17792}
17793_ACEOF
17794for ac_lib in '' kafs; do
17795 if test -z "$ac_lib"; then
17796 ac_res="none required"
17797 else
17798 ac_res=-l$ac_lib
17799 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17800 fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017801 if ac_fn_c_try_link "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017802 ac_cv_search_k_hasafs=$ac_res
17803fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017804rm -f core conftest.err conftest.$ac_objext \
17805 conftest$ac_exeext
17806 if ${ac_cv_search_k_hasafs+:} false; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017807 break
17808fi
17809done
Greg Hartman9768ca42017-06-22 20:49:52 -070017810if ${ac_cv_search_k_hasafs+:} false; then :
17811
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017812else
17813 ac_cv_search_k_hasafs=no
17814fi
17815rm conftest.$ac_ext
17816LIBS=$ac_func_search_save_LIBS
17817fi
Greg Hartman9768ca42017-06-22 20:49:52 -070017818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_k_hasafs" >&5
17819$as_echo "$ac_cv_search_k_hasafs" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017820ac_res=$ac_cv_search_k_hasafs
Greg Hartman9768ca42017-06-22 20:49:52 -070017821if test "$ac_res" != no; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017822 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17823
Greg Hartman9768ca42017-06-22 20:49:52 -070017824$as_echo "#define USE_AFS 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017825
17826fi
17827
Adam Langleyd0592972015-03-30 14:49:51 -070017828
Greg Hartman9768ca42017-06-22 20:49:52 -070017829 ac_fn_c_check_decl "$LINENO" "GSS_C_NT_HOSTBASED_SERVICE" "ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" "
Adam Langleyd0592972015-03-30 14:49:51 -070017830#ifdef HAVE_GSSAPI_H
17831# include <gssapi.h>
17832#elif defined(HAVE_GSSAPI_GSSAPI_H)
17833# include <gssapi/gssapi.h>
17834#endif
17835
17836#ifdef HAVE_GSSAPI_GENERIC_H
17837# include <gssapi_generic.h>
17838#elif defined(HAVE_GSSAPI_GSSAPI_GENERIC_H)
17839# include <gssapi/gssapi_generic.h>
17840#endif
17841
Greg Hartman9768ca42017-06-22 20:49:52 -070017842"
17843if test "x$ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" = xyes; then :
17844 ac_have_decl=1
Adam Langleyd0592972015-03-30 14:49:51 -070017845else
Greg Hartman9768ca42017-06-22 20:49:52 -070017846 ac_have_decl=0
Adam Langleyd0592972015-03-30 14:49:51 -070017847fi
17848
Adam Langleyd0592972015-03-30 14:49:51 -070017849cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017850#define HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE $ac_have_decl
Adam Langleyd0592972015-03-30 14:49:51 -070017851_ACEOF
17852
Adam Langleyd0592972015-03-30 14:49:51 -070017853 saved_LIBS="$LIBS"
17854 LIBS="$LIBS $K5LIBS"
Greg Hartman9768ca42017-06-22 20:49:52 -070017855 for ac_func in krb5_cc_new_unique krb5_get_error_message krb5_free_error_message
17856do :
17857 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17858ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17859if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
Adam Langleyd0592972015-03-30 14:49:51 -070017860 cat >>confdefs.h <<_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070017861#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
Adam Langleyd0592972015-03-30 14:49:51 -070017862_ACEOF
17863
17864fi
17865done
17866
17867 LIBS="$saved_LIBS"
17868
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017869 fi
17870
17871
17872fi
17873
17874
Adam Langleyd0592972015-03-30 14:49:51 -070017875
17876
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017877# Looking for programs, paths and files
17878
17879PRIVSEP_PATH=/var/empty
17880
17881# Check whether --with-privsep-path was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070017882if test "${with_privsep_path+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017883 withval=$with_privsep_path;
17884 if test -n "$withval" && test "x$withval" != "xno" && \
17885 test "x${withval}" != "xyes"; then
17886 PRIVSEP_PATH=$withval
17887 fi
17888
17889
17890fi
17891
17892
17893
17894
17895# Check whether --with-xauth was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070017896if test "${with_xauth+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017897 withval=$with_xauth;
17898 if test -n "$withval" && test "x$withval" != "xno" && \
17899 test "x${withval}" != "xyes"; then
17900 xauth_path=$withval
17901 fi
17902
17903else
17904
17905 TestPath="$PATH"
17906 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X/bin"
17907 TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11"
17908 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin"
17909 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
17910 # Extract the first word of "xauth", so it can be a program name with args.
17911set dummy xauth; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -070017912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17913$as_echo_n "checking for $ac_word... " >&6; }
17914if ${ac_cv_path_xauth_path+:} false; then :
17915 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017916else
17917 case $xauth_path in
17918 [\\/]* | ?:[\\/]*)
17919 ac_cv_path_xauth_path="$xauth_path" # Let the user override the test with a path.
17920 ;;
17921 *)
17922 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17923for as_dir in $TestPath
17924do
17925 IFS=$as_save_IFS
17926 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -070017927 for ac_exec_ext in '' $ac_executable_extensions; do
17928 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017929 ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -070017930 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017931 break 2
17932 fi
17933done
Greg Hartman9768ca42017-06-22 20:49:52 -070017934 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017935IFS=$as_save_IFS
17936
17937 ;;
17938esac
17939fi
17940xauth_path=$ac_cv_path_xauth_path
17941if test -n "$xauth_path"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070017942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xauth_path" >&5
17943$as_echo "$xauth_path" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017944else
Greg Hartman9768ca42017-06-22 20:49:52 -070017945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17946$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017947fi
17948
17949
17950 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
17951 xauth_path="/usr/openwin/bin/xauth"
17952 fi
17953
17954
17955fi
17956
17957
17958STRIP_OPT=-s
17959# Check whether --enable-strip was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070017960if test "${enable_strip+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017961 enableval=$enable_strip;
17962 if test "x$enableval" = "xno" ; then
17963 STRIP_OPT=
17964 fi
17965
17966
17967fi
17968
17969
17970
17971if test -z "$xauth_path" ; then
17972 XAUTH_PATH="undefined"
17973
17974else
17975
17976cat >>confdefs.h <<_ACEOF
17977#define XAUTH_PATH "$xauth_path"
17978_ACEOF
17979
17980 XAUTH_PATH=$xauth_path
17981
17982fi
17983
17984# Check for mail directory
17985
17986# Check whether --with-maildir was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070017987if test "${with_maildir+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080017988 withval=$with_maildir;
17989 if test "X$withval" != X && test "x$withval" != xno && \
17990 test "x${withval}" != xyes; then
17991
17992cat >>confdefs.h <<_ACEOF
17993#define MAIL_DIRECTORY "$withval"
17994_ACEOF
17995
17996 fi
17997
17998else
17999
18000 if test "X$maildir" != "X"; then
18001 cat >>confdefs.h <<_ACEOF
18002#define MAIL_DIRECTORY "$maildir"
18003_ACEOF
18004
18005 else
Greg Hartman9768ca42017-06-22 20:49:52 -070018006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Discovering system mail directory" >&5
18007$as_echo_n "checking Discovering system mail directory... " >&6; }
18008 if test "$cross_compiling" = yes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018009
Greg Hartman9768ca42017-06-22 20:49:52 -070018010 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&5
18011$as_echo "$as_me: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018012
18013
18014else
Greg Hartman9768ca42017-06-22 20:49:52 -070018015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018016/* end confdefs.h. */
18017
18018#include <stdio.h>
18019#include <string.h>
18020#ifdef HAVE_PATHS_H
18021#include <paths.h>
18022#endif
18023#ifdef HAVE_MAILLOCK_H
18024#include <maillock.h>
18025#endif
18026#define DATA "conftest.maildir"
18027
18028int
18029main ()
18030{
18031
18032 FILE *fd;
18033 int rc;
18034
18035 fd = fopen(DATA,"w");
18036 if(fd == NULL)
18037 exit(1);
18038
18039#if defined (_PATH_MAILDIR)
18040 if ((rc = fprintf(fd ,"_PATH_MAILDIR:%s\n", _PATH_MAILDIR)) <0)
18041 exit(1);
18042#elif defined (MAILDIR)
18043 if ((rc = fprintf(fd ,"MAILDIR:%s\n", MAILDIR)) <0)
18044 exit(1);
18045#elif defined (_PATH_MAIL)
18046 if ((rc = fprintf(fd ,"_PATH_MAIL:%s\n", _PATH_MAIL)) <0)
18047 exit(1);
18048#else
18049 exit (2);
18050#endif
18051
18052 exit(0);
18053
18054 ;
18055 return 0;
18056}
18057_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070018058if ac_fn_c_try_run "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018059
Greg Hartman9768ca42017-06-22 20:49:52 -070018060 maildir_what=`awk -F: '{print $1}' conftest.maildir`
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018061 maildir=`awk -F: '{print $2}' conftest.maildir \
18062 | sed 's|/$||'`
Greg Hartman9768ca42017-06-22 20:49:52 -070018063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: $maildir from $maildir_what" >&5
18064$as_echo "Using: $maildir from $maildir_what" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018065 if test "x$maildir_what" != "x_PATH_MAILDIR"; then
18066 cat >>confdefs.h <<_ACEOF
18067#define MAIL_DIRECTORY "$maildir"
18068_ACEOF
18069
18070 fi
18071
18072else
18073
18074 if test "X$ac_status" = "X2";then
18075# our test program didn't find it. Default to /var/spool/mail
Greg Hartman9768ca42017-06-22 20:49:52 -070018076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: default value of /var/spool/mail" >&5
18077$as_echo "Using: default value of /var/spool/mail" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018078 cat >>confdefs.h <<_ACEOF
18079#define MAIL_DIRECTORY "/var/spool/mail"
18080_ACEOF
18081
18082 else
Greg Hartman9768ca42017-06-22 20:49:52 -070018083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** not found ***" >&5
18084$as_echo "*** not found ***" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018085 fi
18086
18087fi
Greg Hartman9768ca42017-06-22 20:49:52 -070018088rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18089 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018090fi
18091
18092 fi
18093
18094
18095fi
18096 # maildir
18097
18098if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018099 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptmx test" >&5
18100$as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptmx test" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018101 disable_ptmx_check=yes
18102fi
18103if test -z "$no_dev_ptmx" ; then
18104 if test "x$disable_ptmx_check" != "xyes" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018105 as_ac_File=`$as_echo "ac_cv_file_"/dev/ptmx"" | $as_tr_sh`
18106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptmx\"" >&5
18107$as_echo_n "checking for \"/dev/ptmx\"... " >&6; }
18108if eval \${$as_ac_File+:} false; then :
18109 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018110else
18111 test "$cross_compiling" = yes &&
Greg Hartman9768ca42017-06-22 20:49:52 -070018112 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018113if test -r ""/dev/ptmx""; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018114 eval "$as_ac_File=yes"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018115else
Greg Hartman9768ca42017-06-22 20:49:52 -070018116 eval "$as_ac_File=no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018117fi
18118fi
Greg Hartman9768ca42017-06-22 20:49:52 -070018119eval ac_res=\$$as_ac_File
18120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18121$as_echo "$ac_res" >&6; }
18122if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018123
18124
18125cat >>confdefs.h <<_ACEOF
18126#define HAVE_DEV_PTMX 1
18127_ACEOF
18128
18129 have_dev_ptmx=1
18130
18131
18132fi
18133
18134 fi
18135fi
18136
18137if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018138 as_ac_File=`$as_echo "ac_cv_file_"/dev/ptc"" | $as_tr_sh`
18139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptc\"" >&5
18140$as_echo_n "checking for \"/dev/ptc\"... " >&6; }
18141if eval \${$as_ac_File+:} false; then :
18142 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018143else
18144 test "$cross_compiling" = yes &&
Greg Hartman9768ca42017-06-22 20:49:52 -070018145 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018146if test -r ""/dev/ptc""; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018147 eval "$as_ac_File=yes"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018148else
Greg Hartman9768ca42017-06-22 20:49:52 -070018149 eval "$as_ac_File=no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018150fi
18151fi
Greg Hartman9768ca42017-06-22 20:49:52 -070018152eval ac_res=\$$as_ac_File
18153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18154$as_echo "$ac_res" >&6; }
18155if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018156
18157
18158cat >>confdefs.h <<_ACEOF
18159#define HAVE_DEV_PTS_AND_PTC 1
18160_ACEOF
18161
18162 have_dev_ptc=1
18163
18164
18165fi
18166
18167else
Greg Hartman9768ca42017-06-22 20:49:52 -070018168 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptc test" >&5
18169$as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptc test" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018170fi
18171
18172# Options from here on. Some of these are preset by platform above
18173
18174# Check whether --with-mantype was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018175if test "${with_mantype+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018176 withval=$with_mantype;
18177 case "$withval" in
18178 man|cat|doc)
18179 MANTYPE=$withval
18180 ;;
18181 *)
Greg Hartman9768ca42017-06-22 20:49:52 -070018182 as_fn_error $? "invalid man type: $withval" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018183 ;;
18184 esac
18185
18186
18187fi
18188
18189if test -z "$MANTYPE"; then
18190 TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb"
18191 for ac_prog in nroff awf
18192do
18193 # Extract the first word of "$ac_prog", so it can be a program name with args.
18194set dummy $ac_prog; ac_word=$2
Greg Hartman9768ca42017-06-22 20:49:52 -070018195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18196$as_echo_n "checking for $ac_word... " >&6; }
18197if ${ac_cv_path_NROFF+:} false; then :
18198 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018199else
18200 case $NROFF in
18201 [\\/]* | ?:[\\/]*)
18202 ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
18203 ;;
18204 *)
18205 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18206for as_dir in $TestPath
18207do
18208 IFS=$as_save_IFS
18209 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -070018210 for ac_exec_ext in '' $ac_executable_extensions; do
18211 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018212 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
Greg Hartman9768ca42017-06-22 20:49:52 -070018213 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018214 break 2
18215 fi
18216done
Greg Hartman9768ca42017-06-22 20:49:52 -070018217 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018218IFS=$as_save_IFS
18219
18220 ;;
18221esac
18222fi
18223NROFF=$ac_cv_path_NROFF
18224if test -n "$NROFF"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
18226$as_echo "$NROFF" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018227else
Greg Hartman9768ca42017-06-22 20:49:52 -070018228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18229$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018230fi
18231
18232
18233 test -n "$NROFF" && break
18234done
18235test -n "$NROFF" || NROFF="/bin/false"
18236
18237 if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
18238 MANTYPE=doc
18239 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
18240 MANTYPE=man
18241 else
18242 MANTYPE=cat
18243 fi
18244fi
18245
18246if test "$MANTYPE" = "doc"; then
18247 mansubdir=man;
18248else
18249 mansubdir=$MANTYPE;
18250fi
18251
18252
18253# Check whether to enable MD5 passwords
18254MD5_MSG="no"
18255
18256# Check whether --with-md5-passwords was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018257if test "${with_md5_passwords+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018258 withval=$with_md5_passwords;
18259 if test "x$withval" != "xno" ; then
18260
Greg Hartman9768ca42017-06-22 20:49:52 -070018261$as_echo "#define HAVE_MD5_PASSWORDS 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018262
18263 MD5_MSG="yes"
18264 fi
18265
18266
18267fi
18268
18269
18270# Whether to disable shadow password support
18271
18272# Check whether --with-shadow was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018273if test "${with_shadow+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018274 withval=$with_shadow;
18275 if test "x$withval" = "xno" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018276 $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018277
18278 disable_shadow=yes
18279 fi
18280
18281
18282fi
18283
18284
18285if test -z "$disable_shadow" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the systems has expire shadow information" >&5
18287$as_echo_n "checking if the systems has expire shadow information... " >&6; }
18288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018289/* end confdefs.h. */
18290
18291#include <sys/types.h>
18292#include <shadow.h>
18293struct spwd sp;
18294
18295int
18296main ()
18297{
18298 sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0;
18299 ;
18300 return 0;
18301}
18302_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070018303if ac_fn_c_try_compile "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018304 sp_expire_available=yes
18305fi
18306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18307
18308 if test "x$sp_expire_available" = "xyes" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018309 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18310$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018311
Greg Hartman9768ca42017-06-22 20:49:52 -070018312$as_echo "#define HAS_SHADOW_EXPIRE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018313
18314 else
Greg Hartman9768ca42017-06-22 20:49:52 -070018315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18316$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018317 fi
18318fi
18319
18320# Use ip address instead of hostname in $DISPLAY
18321if test ! -z "$IPADDR_IN_DISPLAY" ; then
18322 DISPLAY_HACK_MSG="yes"
18323
Greg Hartman9768ca42017-06-22 20:49:52 -070018324$as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018325
18326else
18327 DISPLAY_HACK_MSG="no"
18328
18329# Check whether --with-ipaddr-display was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018330if test "${with_ipaddr_display+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018331 withval=$with_ipaddr_display;
18332 if test "x$withval" != "xno" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018333 $as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018334
18335 DISPLAY_HACK_MSG="yes"
18336 fi
18337
18338
18339fi
18340
18341fi
18342
18343# check for /etc/default/login and use it if present.
18344# Check whether --enable-etc-default-login was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018345if test "${enable_etc_default_login+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018346 enableval=$enable_etc_default_login; if test "x$enableval" = "xno"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018347 { $as_echo "$as_me:${as_lineno-$LINENO}: /etc/default/login handling disabled" >&5
18348$as_echo "$as_me: /etc/default/login handling disabled" >&6;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018349 etc_default_login=no
18350 else
18351 etc_default_login=yes
18352 fi
18353else
18354 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
18355 then
Greg Hartman9768ca42017-06-22 20:49:52 -070018356 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking /etc/default/login" >&5
18357$as_echo "$as_me: WARNING: cross compiling: not checking /etc/default/login" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018358 etc_default_login=no
18359 else
18360 etc_default_login=yes
18361 fi
18362
18363fi
18364
18365
18366if test "x$etc_default_login" != "xno"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018367 as_ac_File=`$as_echo "ac_cv_file_"/etc/default/login"" | $as_tr_sh`
18368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/etc/default/login\"" >&5
18369$as_echo_n "checking for \"/etc/default/login\"... " >&6; }
18370if eval \${$as_ac_File+:} false; then :
18371 $as_echo_n "(cached) " >&6
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018372else
18373 test "$cross_compiling" = yes &&
Greg Hartman9768ca42017-06-22 20:49:52 -070018374 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018375if test -r ""/etc/default/login""; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018376 eval "$as_ac_File=yes"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018377else
Greg Hartman9768ca42017-06-22 20:49:52 -070018378 eval "$as_ac_File=no"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018379fi
18380fi
Greg Hartman9768ca42017-06-22 20:49:52 -070018381eval ac_res=\$$as_ac_File
18382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18383$as_echo "$ac_res" >&6; }
18384if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018385 external_path_file=/etc/default/login
18386fi
18387
18388 if test "x$external_path_file" = "x/etc/default/login"; then
18389
Greg Hartman9768ca42017-06-22 20:49:52 -070018390$as_echo "#define HAVE_ETC_DEFAULT_LOGIN 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018391
18392 fi
18393fi
18394
18395if test $ac_cv_func_login_getcapbool = "yes" && \
18396 test $ac_cv_header_login_cap_h = "yes" ; then
18397 external_path_file=/etc/login.conf
18398fi
18399
18400# Whether to mess with the default path
18401SERVER_PATH_MSG="(default)"
18402
18403# Check whether --with-default-path was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018404if test "${with_default_path+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018405 withval=$with_default_path;
18406 if test "x$external_path_file" = "x/etc/login.conf" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018407 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018408--with-default-path=PATH has no effect on this system.
18409Edit /etc/login.conf instead." >&5
Greg Hartman9768ca42017-06-22 20:49:52 -070018410$as_echo "$as_me: WARNING:
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018411--with-default-path=PATH has no effect on this system.
18412Edit /etc/login.conf instead." >&2;}
18413 elif test "x$withval" != "xno" ; then
18414 if test ! -z "$external_path_file" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018415 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018416--with-default-path=PATH will only be used if PATH is not defined in
18417$external_path_file ." >&5
Greg Hartman9768ca42017-06-22 20:49:52 -070018418$as_echo "$as_me: WARNING:
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018419--with-default-path=PATH will only be used if PATH is not defined in
18420$external_path_file ." >&2;}
18421 fi
18422 user_path="$withval"
18423 SERVER_PATH_MSG="$withval"
18424 fi
18425
18426else
18427 if test "x$external_path_file" = "x/etc/login.conf" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018428 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Make sure the path to scp is in /etc/login.conf" >&5
18429$as_echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018430 else
18431 if test ! -z "$external_path_file" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018432 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018433If PATH is defined in $external_path_file, ensure the path to scp is included,
18434otherwise scp will not work." >&5
Greg Hartman9768ca42017-06-22 20:49:52 -070018435$as_echo "$as_me: WARNING:
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018436If PATH is defined in $external_path_file, ensure the path to scp is included,
18437otherwise scp will not work." >&2;}
18438 fi
Greg Hartman9768ca42017-06-22 20:49:52 -070018439 if test "$cross_compiling" = yes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018440 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
18441
18442else
Greg Hartman9768ca42017-06-22 20:49:52 -070018443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018444/* end confdefs.h. */
18445
18446/* find out what STDPATH is */
18447#include <stdio.h>
18448#ifdef HAVE_PATHS_H
18449# include <paths.h>
18450#endif
18451#ifndef _PATH_STDPATH
18452# ifdef _PATH_USERPATH /* Irix */
18453# define _PATH_STDPATH _PATH_USERPATH
18454# else
18455# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
18456# endif
18457#endif
18458#include <sys/types.h>
18459#include <sys/stat.h>
18460#include <fcntl.h>
18461#define DATA "conftest.stdpath"
18462
18463int
18464main ()
18465{
18466
18467 FILE *fd;
18468 int rc;
18469
18470 fd = fopen(DATA,"w");
18471 if(fd == NULL)
18472 exit(1);
18473
18474 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
18475 exit(1);
18476
18477 exit(0);
18478
18479 ;
18480 return 0;
18481}
18482_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070018483if ac_fn_c_try_run "$LINENO"; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018484 user_path=`cat conftest.stdpath`
18485else
Greg Hartman9768ca42017-06-22 20:49:52 -070018486 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018487fi
Greg Hartman9768ca42017-06-22 20:49:52 -070018488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18489 conftest.$ac_objext conftest.beam conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018490fi
18491
18492# make sure $bindir is in USER_PATH so scp will work
Adam Langleyd0592972015-03-30 14:49:51 -070018493 t_bindir="${bindir}"
18494 while echo "${t_bindir}" | egrep '\$\{|NONE/' >/dev/null 2>&1; do
18495 t_bindir=`eval echo ${t_bindir}`
18496 case $t_bindir in
18497 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
18498 esac
18499 case $t_bindir in
18500 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
18501 esac
18502 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018503 echo $user_path | grep ":$t_bindir" > /dev/null 2>&1
18504 if test $? -ne 0 ; then
18505 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
18506 if test $? -ne 0 ; then
18507 user_path=$user_path:$t_bindir
Greg Hartman9768ca42017-06-22 20:49:52 -070018508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Adding $t_bindir to USER_PATH so scp will work" >&5
18509$as_echo "Adding $t_bindir to USER_PATH so scp will work" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018510 fi
18511 fi
18512 fi
18513
18514fi
18515
18516if test "x$external_path_file" != "x/etc/login.conf" ; then
18517
18518cat >>confdefs.h <<_ACEOF
18519#define USER_PATH "$user_path"
18520_ACEOF
18521
18522
18523fi
18524
18525# Set superuser path separately to user path
18526
18527# Check whether --with-superuser-path was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018528if test "${with_superuser_path+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018529 withval=$with_superuser_path;
18530 if test -n "$withval" && test "x$withval" != "xno" && \
18531 test "x${withval}" != "xyes"; then
18532
18533cat >>confdefs.h <<_ACEOF
18534#define SUPERUSER_PATH "$withval"
18535_ACEOF
18536
18537 superuser_path=$withval
18538 fi
18539
18540
18541fi
18542
18543
18544
Greg Hartman9768ca42017-06-22 20:49:52 -070018545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
18546$as_echo_n "checking if we need to convert IPv4 in IPv6-mapped addresses... " >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018547IPV4_IN6_HACK_MSG="no"
18548
18549# Check whether --with-4in6 was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018550if test "${with_4in6+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018551 withval=$with_4in6;
18552 if test "x$withval" != "xno" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018553 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18554$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018555
Greg Hartman9768ca42017-06-22 20:49:52 -070018556$as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018557
18558 IPV4_IN6_HACK_MSG="yes"
18559 else
Greg Hartman9768ca42017-06-22 20:49:52 -070018560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18561$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018562 fi
18563
18564else
18565
18566 if test "x$inet6_default_4in6" = "xyes"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
18568$as_echo "yes (default)" >&6; }
18569 $as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018570
18571 IPV4_IN6_HACK_MSG="yes"
18572 else
Greg Hartman9768ca42017-06-22 20:49:52 -070018573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5
18574$as_echo "no (default)" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018575 fi
18576
18577
18578fi
18579
18580
18581# Whether to enable BSD auth support
18582BSD_AUTH_MSG=no
18583
18584# Check whether --with-bsd-auth was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018585if test "${with_bsd_auth+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018586 withval=$with_bsd_auth;
18587 if test "x$withval" != "xno" ; then
18588
Greg Hartman9768ca42017-06-22 20:49:52 -070018589$as_echo "#define BSD_AUTH 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018590
18591 BSD_AUTH_MSG=yes
18592 fi
18593
18594
18595fi
18596
18597
18598# Where to place sshd.pid
18599piddir=/var/run
18600# make sure the directory exists
18601if test ! -d $piddir ; then
18602 piddir=`eval echo ${sysconfdir}`
18603 case $piddir in
18604 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
18605 esac
18606fi
18607
18608
18609# Check whether --with-pid-dir was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018610if test "${with_pid_dir+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018611 withval=$with_pid_dir;
18612 if test -n "$withval" && test "x$withval" != "xno" && \
18613 test "x${withval}" != "xyes"; then
18614 piddir=$withval
18615 if test ! -d $piddir ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018616 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** no $piddir directory on this system **" >&5
18617$as_echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018618 fi
18619 fi
18620
18621
18622fi
18623
18624
18625
18626cat >>confdefs.h <<_ACEOF
18627#define _PATH_SSH_PIDDIR "$piddir"
18628_ACEOF
18629
18630
18631
18632# Check whether --enable-lastlog was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018633if test "${enable_lastlog+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018634 enableval=$enable_lastlog;
18635 if test "x$enableval" = "xno" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018636 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018637
18638 fi
18639
18640
18641fi
18642
18643# Check whether --enable-utmp was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018644if test "${enable_utmp+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018645 enableval=$enable_utmp;
18646 if test "x$enableval" = "xno" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018647 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018648
18649 fi
18650
18651
18652fi
18653
18654# Check whether --enable-utmpx was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018655if test "${enable_utmpx+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018656 enableval=$enable_utmpx;
18657 if test "x$enableval" = "xno" ; then
18658
Greg Hartman9768ca42017-06-22 20:49:52 -070018659$as_echo "#define DISABLE_UTMPX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018660
18661 fi
18662
18663
18664fi
18665
18666# Check whether --enable-wtmp was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018667if test "${enable_wtmp+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018668 enableval=$enable_wtmp;
18669 if test "x$enableval" = "xno" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018670 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018671
18672 fi
18673
18674
18675fi
18676
18677# Check whether --enable-wtmpx was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018678if test "${enable_wtmpx+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018679 enableval=$enable_wtmpx;
18680 if test "x$enableval" = "xno" ; then
18681
Greg Hartman9768ca42017-06-22 20:49:52 -070018682$as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018683
18684 fi
18685
18686
18687fi
18688
18689# Check whether --enable-libutil was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018690if test "${enable_libutil+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018691 enableval=$enable_libutil;
18692 if test "x$enableval" = "xno" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018693 $as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018694
18695 fi
18696
18697
18698fi
18699
18700# Check whether --enable-pututline was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018701if test "${enable_pututline+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018702 enableval=$enable_pututline;
18703 if test "x$enableval" = "xno" ; then
18704
Greg Hartman9768ca42017-06-22 20:49:52 -070018705$as_echo "#define DISABLE_PUTUTLINE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018706
18707 fi
18708
18709
18710fi
18711
18712# Check whether --enable-pututxline was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018713if test "${enable_pututxline+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018714 enableval=$enable_pututxline;
18715 if test "x$enableval" = "xno" ; then
18716
Greg Hartman9768ca42017-06-22 20:49:52 -070018717$as_echo "#define DISABLE_PUTUTXLINE 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018718
18719 fi
18720
18721
18722fi
18723
18724
18725# Check whether --with-lastlog was given.
Greg Hartman9768ca42017-06-22 20:49:52 -070018726if test "${with_lastlog+set}" = set; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018727 withval=$with_lastlog;
18728 if test "x$withval" = "xno" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018729 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018730
18731 elif test -n "$withval" && test "x${withval}" != "xyes"; then
18732 conf_lastlog_location=$withval
18733 fi
18734
18735
18736fi
18737
18738
18739
Greg Hartman9768ca42017-06-22 20:49:52 -070018740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines LASTLOG_FILE" >&5
18741$as_echo_n "checking if your system defines LASTLOG_FILE... " >&6; }
18742cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018743/* end confdefs.h. */
18744
18745#include <sys/types.h>
18746#include <utmp.h>
18747#ifdef HAVE_LASTLOG_H
18748# include <lastlog.h>
18749#endif
18750#ifdef HAVE_PATHS_H
18751# include <paths.h>
18752#endif
18753#ifdef HAVE_LOGIN_H
18754# include <login.h>
18755#endif
18756
18757int
18758main ()
18759{
18760 char *lastlog = LASTLOG_FILE;
18761 ;
18762 return 0;
18763}
18764_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070018765if ac_fn_c_try_compile "$LINENO"; then :
18766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18767$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018768else
18769
Greg Hartman9768ca42017-06-22 20:49:52 -070018770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18771$as_echo "no" >&6; }
18772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines _PATH_LASTLOG" >&5
18773$as_echo_n "checking if your system defines _PATH_LASTLOG... " >&6; }
18774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018775/* end confdefs.h. */
18776
18777#include <sys/types.h>
18778#include <utmp.h>
18779#ifdef HAVE_LASTLOG_H
18780# include <lastlog.h>
18781#endif
18782#ifdef HAVE_PATHS_H
18783# include <paths.h>
18784#endif
18785
18786int
18787main ()
18788{
18789 char *lastlog = _PATH_LASTLOG;
18790 ;
18791 return 0;
18792}
18793_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070018794if ac_fn_c_try_compile "$LINENO"; then :
18795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18796$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018797else
18798
Greg Hartman9768ca42017-06-22 20:49:52 -070018799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18800$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018801 system_lastlog_path=no
18802
18803fi
18804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18805
18806fi
18807rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18808
18809if test -z "$conf_lastlog_location"; then
18810 if test x"$system_lastlog_path" = x"no" ; then
18811 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
18812 if (test -d "$f" || test -f "$f") ; then
18813 conf_lastlog_location=$f
18814 fi
18815 done
18816 if test -z "$conf_lastlog_location"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018817 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** Cannot find lastlog **" >&5
18818$as_echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018819 fi
18820 fi
18821fi
18822
18823if test -n "$conf_lastlog_location"; then
18824
18825cat >>confdefs.h <<_ACEOF
18826#define CONF_LASTLOG_FILE "$conf_lastlog_location"
18827_ACEOF
18828
18829fi
18830
Greg Hartman9768ca42017-06-22 20:49:52 -070018831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines UTMP_FILE" >&5
18832$as_echo_n "checking if your system defines UTMP_FILE... " >&6; }
18833cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018834/* end confdefs.h. */
18835
18836#include <sys/types.h>
18837#include <utmp.h>
18838#ifdef HAVE_PATHS_H
18839# include <paths.h>
18840#endif
18841
18842int
18843main ()
18844{
18845 char *utmp = UTMP_FILE;
18846 ;
18847 return 0;
18848}
18849_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070018850if ac_fn_c_try_compile "$LINENO"; then :
18851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18852$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018853else
Greg Hartman9768ca42017-06-22 20:49:52 -070018854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18855$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018856 system_utmp_path=no
18857
18858fi
18859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18860if test -z "$conf_utmp_location"; then
18861 if test x"$system_utmp_path" = x"no" ; then
18862 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
18863 if test -f $f ; then
18864 conf_utmp_location=$f
18865 fi
18866 done
18867 if test -z "$conf_utmp_location"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018868 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018869
18870 fi
18871 fi
18872fi
18873if test -n "$conf_utmp_location"; then
18874
18875cat >>confdefs.h <<_ACEOF
18876#define CONF_UTMP_FILE "$conf_utmp_location"
18877_ACEOF
18878
18879fi
18880
Greg Hartman9768ca42017-06-22 20:49:52 -070018881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMP_FILE" >&5
18882$as_echo_n "checking if your system defines WTMP_FILE... " >&6; }
18883cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018884/* end confdefs.h. */
18885
18886#include <sys/types.h>
18887#include <utmp.h>
18888#ifdef HAVE_PATHS_H
18889# include <paths.h>
18890#endif
18891
18892int
18893main ()
18894{
18895 char *wtmp = WTMP_FILE;
18896 ;
18897 return 0;
18898}
18899_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070018900if ac_fn_c_try_compile "$LINENO"; then :
18901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18902$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018903else
Greg Hartman9768ca42017-06-22 20:49:52 -070018904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18905$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018906 system_wtmp_path=no
18907
18908fi
18909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18910if test -z "$conf_wtmp_location"; then
18911 if test x"$system_wtmp_path" = x"no" ; then
18912 for f in /usr/adm/wtmp /var/log/wtmp; do
18913 if test -f $f ; then
18914 conf_wtmp_location=$f
18915 fi
18916 done
18917 if test -z "$conf_wtmp_location"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018918 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018919
18920 fi
18921 fi
18922fi
18923if test -n "$conf_wtmp_location"; then
18924
18925cat >>confdefs.h <<_ACEOF
18926#define CONF_WTMP_FILE "$conf_wtmp_location"
18927_ACEOF
18928
18929fi
18930
Greg Hartman9768ca42017-06-22 20:49:52 -070018931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMPX_FILE" >&5
18932$as_echo_n "checking if your system defines WTMPX_FILE... " >&6; }
18933cat confdefs.h - <<_ACEOF >conftest.$ac_ext
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018934/* end confdefs.h. */
18935
18936#include <sys/types.h>
18937#include <utmp.h>
18938#ifdef HAVE_UTMPX_H
18939#include <utmpx.h>
18940#endif
18941#ifdef HAVE_PATHS_H
18942# include <paths.h>
18943#endif
18944
18945int
18946main ()
18947{
18948 char *wtmpx = WTMPX_FILE;
18949 ;
18950 return 0;
18951}
18952_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070018953if ac_fn_c_try_compile "$LINENO"; then :
18954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18955$as_echo "yes" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018956else
Greg Hartman9768ca42017-06-22 20:49:52 -070018957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18958$as_echo "no" >&6; }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018959 system_wtmpx_path=no
18960
18961fi
18962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18963if test -z "$conf_wtmpx_location"; then
18964 if test x"$system_wtmpx_path" = x"no" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070018965 $as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018966
18967 fi
18968else
18969
18970cat >>confdefs.h <<_ACEOF
18971#define CONF_WTMPX_FILE "$conf_wtmpx_location"
18972_ACEOF
18973
18974fi
18975
18976
18977if test ! -z "$blibpath" ; then
18978 LDFLAGS="$LDFLAGS $blibflags$blibpath"
Greg Hartman9768ca42017-06-22 20:49:52 -070018979 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&5
18980$as_echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080018981fi
18982
Greg Hartman9768ca42017-06-22 20:49:52 -070018983ac_fn_c_check_member "$LINENO" "struct lastlog" "ll_line" "ac_cv_member_struct_lastlog_ll_line" "
Adam Langleyd0592972015-03-30 14:49:51 -070018984#ifdef HAVE_SYS_TYPES_H
18985#include <sys/types.h>
18986#endif
18987#ifdef HAVE_UTMP_H
18988#include <utmp.h>
18989#endif
18990#ifdef HAVE_UTMPX_H
18991#include <utmpx.h>
18992#endif
18993#ifdef HAVE_LASTLOG_H
18994#include <lastlog.h>
18995#endif
18996
Greg Hartman9768ca42017-06-22 20:49:52 -070018997"
18998if test "x$ac_cv_member_struct_lastlog_ll_line" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070018999
Adam Langleyd0592972015-03-30 14:49:51 -070019000else
19001
19002 if test x$SKIP_DISABLE_LASTLOG_DEFINE != "xyes" ; then
Greg Hartman9768ca42017-06-22 20:49:52 -070019003 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070019004
19005 fi
19006
19007fi
19008
19009
Greg Hartman9768ca42017-06-22 20:49:52 -070019010ac_fn_c_check_member "$LINENO" "struct utmp" "ut_line" "ac_cv_member_struct_utmp_ut_line" "
Adam Langleyd0592972015-03-30 14:49:51 -070019011#ifdef HAVE_SYS_TYPES_H
19012#include <sys/types.h>
19013#endif
19014#ifdef HAVE_UTMP_H
19015#include <utmp.h>
19016#endif
19017#ifdef HAVE_UTMPX_H
19018#include <utmpx.h>
19019#endif
19020#ifdef HAVE_LASTLOG_H
19021#include <lastlog.h>
19022#endif
19023
Greg Hartman9768ca42017-06-22 20:49:52 -070019024"
19025if test "x$ac_cv_member_struct_utmp_ut_line" = xyes; then :
Adam Langleyd0592972015-03-30 14:49:51 -070019026
Adam Langleyd0592972015-03-30 14:49:51 -070019027else
19028
Greg Hartman9768ca42017-06-22 20:49:52 -070019029 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070019030
Greg Hartman9768ca42017-06-22 20:49:52 -070019031 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
Adam Langleyd0592972015-03-30 14:49:51 -070019032
19033
19034fi
19035
19036
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019037CFLAGS="$CFLAGS $werror_flags"
19038
19039if test "x$ac_cv_func_getaddrinfo" != "xyes" ; then
19040 TEST_SSH_IPV6=no
19041else
19042 TEST_SSH_IPV6=yes
19043fi
Greg Hartman9768ca42017-06-22 20:49:52 -070019044ac_fn_c_check_decl "$LINENO" "BROKEN_GETADDRINFO" "ac_cv_have_decl_BROKEN_GETADDRINFO" "$ac_includes_default"
19045if test "x$ac_cv_have_decl_BROKEN_GETADDRINFO" = xyes; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019046 TEST_SSH_IPV6=no
19047fi
19048
19049TEST_SSH_IPV6=$TEST_SSH_IPV6
19050
Greg Hartman9768ca42017-06-22 20:49:52 -070019051TEST_SSH_UTF8=$TEST_SSH_UTF8
19052
Adam Langleyd0592972015-03-30 14:49:51 -070019053TEST_MALLOC_OPTIONS=$TEST_MALLOC_OPTIONS
19054
19055UNSUPPORTED_ALGORITHMS=$unsupported_algorithms
19056
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019057
19058
19059ac_config_files="$ac_config_files Makefile buildpkg.sh opensshd.init openssh.xml openbsd-compat/Makefile openbsd-compat/regress/Makefile survey.sh"
19060
19061cat >confcache <<\_ACEOF
19062# This file is a shell script that caches the results of configure
19063# tests run on this system so they can be shared between configure
19064# scripts and configure runs, see configure's option --config-cache.
19065# It is not useful on other systems. If it contains results you don't
19066# want to keep, you may remove or edit it.
19067#
19068# config.status only pays attention to the cache file if you give it
19069# the --recheck option to rerun configure.
19070#
19071# `ac_cv_env_foo' variables (set or unset) will be overridden when
19072# loading this file, other *unset* `ac_cv_foo' will be assigned the
19073# following values.
19074
19075_ACEOF
19076
19077# The following way of writing the cache mishandles newlines in values,
19078# but we know of no workaround that is simple, portable, and efficient.
19079# So, we kill variables containing newlines.
19080# Ultrix sh set writes to stderr and can't be redirected directly,
19081# and sets the high bit in the cache file unless we assign to the vars.
19082(
19083 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19084 eval ac_val=\$$ac_var
19085 case $ac_val in #(
19086 *${as_nl}*)
19087 case $ac_var in #(
Greg Hartman9768ca42017-06-22 20:49:52 -070019088 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19089$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019090 esac
19091 case $ac_var in #(
19092 _ | IFS | as_nl) ;; #(
Greg Hartman9768ca42017-06-22 20:49:52 -070019093 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19094 *) { eval $ac_var=; unset $ac_var;} ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019095 esac ;;
19096 esac
19097 done
19098
19099 (set) 2>&1 |
19100 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19101 *${as_nl}ac_space=\ *)
Greg Hartman9768ca42017-06-22 20:49:52 -070019102 # `set' does not quote correctly, so add quotes: double-quote
19103 # substitution turns \\\\ into \\, and sed turns \\ into \.
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019104 sed -n \
19105 "s/'/'\\\\''/g;
19106 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19107 ;; #(
19108 *)
19109 # `set' quotes correctly as required by POSIX, so do not add quotes.
19110 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19111 ;;
19112 esac |
19113 sort
19114) |
19115 sed '
19116 /^ac_cv_env_/b end
19117 t clear
19118 :clear
19119 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19120 t end
19121 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19122 :end' >>confcache
19123if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19124 if test -w "$cache_file"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070019125 if test "x$cache_file" != "x/dev/null"; then
19126 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19127$as_echo "$as_me: updating cache $cache_file" >&6;}
19128 if test ! -f "$cache_file" || test -h "$cache_file"; then
19129 cat confcache >"$cache_file"
19130 else
19131 case $cache_file in #(
19132 */* | ?:*)
19133 mv -f confcache "$cache_file"$$ &&
19134 mv -f "$cache_file"$$ "$cache_file" ;; #(
19135 *)
19136 mv -f confcache "$cache_file" ;;
19137 esac
19138 fi
19139 fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019140 else
Greg Hartman9768ca42017-06-22 20:49:52 -070019141 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19142$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019143 fi
19144fi
19145rm -f confcache
19146
19147test "x$prefix" = xNONE && prefix=$ac_default_prefix
19148# Let make expand exec_prefix.
19149test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19150
19151DEFS=-DHAVE_CONFIG_H
19152
19153ac_libobjs=
19154ac_ltlibobjs=
Greg Hartman9768ca42017-06-22 20:49:52 -070019155U=
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019156for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19157 # 1. Remove the extension, and $U if already installed.
19158 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
Greg Hartman9768ca42017-06-22 20:49:52 -070019159 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019160 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19161 # will be set to the directory where LIBOBJS objects are built.
Greg Hartman9768ca42017-06-22 20:49:52 -070019162 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19163 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019164done
19165LIBOBJS=$ac_libobjs
19166
19167LTLIBOBJS=$ac_ltlibobjs
19168
19169
19170
Greg Hartman9768ca42017-06-22 20:49:52 -070019171
19172: "${CONFIG_STATUS=./config.status}"
19173ac_write_fail=0
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019174ac_clean_files_save=$ac_clean_files
19175ac_clean_files="$ac_clean_files $CONFIG_STATUS"
Greg Hartman9768ca42017-06-22 20:49:52 -070019176{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19177$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19178as_write_fail=0
19179cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019180#! $SHELL
19181# Generated by $as_me.
19182# Run this file to recreate the current configuration.
19183# Compiler output produced by configure, useful for debugging
19184# configure, is in config.log if it exists.
19185
19186debug=false
19187ac_cs_recheck=false
19188ac_cs_silent=false
Adam Langleyd0592972015-03-30 14:49:51 -070019189
Greg Hartman9768ca42017-06-22 20:49:52 -070019190SHELL=\${CONFIG_SHELL-$SHELL}
19191export SHELL
19192_ASEOF
19193cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19194## -------------------- ##
19195## M4sh Initialization. ##
19196## -------------------- ##
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019197
19198# Be more Bourne compatible
19199DUALCASE=1; export DUALCASE # for MKS sh
Greg Hartman9768ca42017-06-22 20:49:52 -070019200if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019201 emulate sh
19202 NULLCMD=:
Greg Hartman9768ca42017-06-22 20:49:52 -070019203 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019204 # is contrary to our usage. Disable this feature.
19205 alias -g '${1+"$@"}'='"$@"'
19206 setopt NO_GLOB_SUBST
19207else
Greg Hartman9768ca42017-06-22 20:49:52 -070019208 case `(set -o) 2>/dev/null` in #(
19209 *posix*) :
19210 set -o posix ;; #(
19211 *) :
19212 ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019213esac
19214fi
19215
19216
Greg Hartman9768ca42017-06-22 20:49:52 -070019217as_nl='
19218'
19219export as_nl
19220# Printing a long string crashes Solaris 7 /usr/bin/printf.
19221as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19222as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19223as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19224# Prefer a ksh shell builtin over an external printf program on Solaris,
19225# but without wasting forks for bash or zsh.
19226if test -z "$BASH_VERSION$ZSH_VERSION" \
19227 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19228 as_echo='print -r --'
19229 as_echo_n='print -rn --'
19230elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19231 as_echo='printf %s\n'
19232 as_echo_n='printf %s'
19233else
19234 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19235 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19236 as_echo_n='/usr/ucb/echo -n'
19237 else
19238 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19239 as_echo_n_body='eval
19240 arg=$1;
19241 case $arg in #(
19242 *"$as_nl"*)
19243 expr "X$arg" : "X\\(.*\\)$as_nl";
19244 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19245 esac;
19246 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19247 '
19248 export as_echo_n_body
19249 as_echo_n='sh -c $as_echo_n_body as_echo'
19250 fi
19251 export as_echo_body
19252 as_echo='sh -c $as_echo_body as_echo'
19253fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019254
19255# The user is always right.
19256if test "${PATH_SEPARATOR+set}" != set; then
Greg Hartman9768ca42017-06-22 20:49:52 -070019257 PATH_SEPARATOR=:
19258 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19259 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19260 PATH_SEPARATOR=';'
19261 }
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019262fi
19263
19264
19265# IFS
19266# We need space, tab and new line, in precisely that order. Quoting is
19267# there to prevent editors from complaining about space-tab.
19268# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19269# splitting by setting IFS to empty value.)
19270IFS=" "" $as_nl"
19271
19272# Find who we are. Look in the path if we contain no directory separator.
Greg Hartman9768ca42017-06-22 20:49:52 -070019273as_myself=
19274case $0 in #((
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019275 *[\\/]* ) as_myself=$0 ;;
19276 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19277for as_dir in $PATH
19278do
19279 IFS=$as_save_IFS
19280 test -z "$as_dir" && as_dir=.
Greg Hartman9768ca42017-06-22 20:49:52 -070019281 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19282 done
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019283IFS=$as_save_IFS
19284
19285 ;;
19286esac
19287# We did not find ourselves, most probably we were run as `sh COMMAND'
19288# in which case we are not to be found in the path.
19289if test "x$as_myself" = x; then
19290 as_myself=$0
19291fi
19292if test ! -f "$as_myself"; then
Greg Hartman9768ca42017-06-22 20:49:52 -070019293 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19294 exit 1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019295fi
19296
Greg Hartman9768ca42017-06-22 20:49:52 -070019297# Unset variables that we do not need and which cause bugs (e.g. in
19298# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19299# suppresses any "Segmentation fault" message there. '((' could
19300# trigger a bug in pdksh 5.2.14.
19301for as_var in BASH_ENV ENV MAIL MAILPATH
19302do eval test x\${$as_var+set} = xset \
19303 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019304done
19305PS1='$ '
19306PS2='> '
19307PS4='+ '
19308
19309# NLS nuisances.
Greg Hartman9768ca42017-06-22 20:49:52 -070019310LC_ALL=C
19311export LC_ALL
19312LANGUAGE=C
19313export LANGUAGE
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019314
Greg Hartman9768ca42017-06-22 20:49:52 -070019315# CDPATH.
19316(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19317
19318
19319# as_fn_error STATUS ERROR [LINENO LOG_FD]
19320# ----------------------------------------
19321# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19322# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19323# script with STATUS, using 1 if that was 0.
19324as_fn_error ()
19325{
19326 as_status=$1; test $as_status -eq 0 && as_status=1
19327 if test "$4"; then
19328 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19329 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19330 fi
19331 $as_echo "$as_me: error: $2" >&2
19332 as_fn_exit $as_status
19333} # as_fn_error
19334
19335
19336# as_fn_set_status STATUS
19337# -----------------------
19338# Set $? to STATUS, without forking.
19339as_fn_set_status ()
19340{
19341 return $1
19342} # as_fn_set_status
19343
19344# as_fn_exit STATUS
19345# -----------------
19346# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19347as_fn_exit ()
19348{
19349 set +e
19350 as_fn_set_status $1
19351 exit $1
19352} # as_fn_exit
19353
19354# as_fn_unset VAR
19355# ---------------
19356# Portably unset VAR.
19357as_fn_unset ()
19358{
19359 { eval $1=; unset $1;}
19360}
19361as_unset=as_fn_unset
19362# as_fn_append VAR VALUE
19363# ----------------------
19364# Append the text in VALUE to the end of the definition contained in VAR. Take
19365# advantage of any shell optimizations that allow amortized linear growth over
19366# repeated appends, instead of the typical quadratic growth present in naive
19367# implementations.
19368if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19369 eval 'as_fn_append ()
19370 {
19371 eval $1+=\$2
19372 }'
19373else
19374 as_fn_append ()
19375 {
19376 eval $1=\$$1\$2
19377 }
19378fi # as_fn_append
19379
19380# as_fn_arith ARG...
19381# ------------------
19382# Perform arithmetic evaluation on the ARGs, and store the result in the
19383# global $as_val. Take advantage of shells that can avoid forks. The arguments
19384# must be portable across $(()) and expr.
19385if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19386 eval 'as_fn_arith ()
19387 {
19388 as_val=$(( $* ))
19389 }'
19390else
19391 as_fn_arith ()
19392 {
19393 as_val=`expr "$@" || test $? -eq 1`
19394 }
19395fi # as_fn_arith
19396
19397
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019398if expr a : '\(a\)' >/dev/null 2>&1 &&
19399 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19400 as_expr=expr
19401else
19402 as_expr=false
19403fi
19404
19405if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19406 as_basename=basename
19407else
19408 as_basename=false
19409fi
19410
Greg Hartman9768ca42017-06-22 20:49:52 -070019411if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19412 as_dirname=dirname
19413else
19414 as_dirname=false
19415fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019416
19417as_me=`$as_basename -- "$0" ||
19418$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19419 X"$0" : 'X\(//\)$' \| \
19420 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
Greg Hartman9768ca42017-06-22 20:49:52 -070019421$as_echo X/"$0" |
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019422 sed '/^.*\/\([^/][^/]*\)\/*$/{
19423 s//\1/
19424 q
19425 }
19426 /^X\/\(\/\/\)$/{
19427 s//\1/
19428 q
19429 }
19430 /^X\/\(\/\).*/{
19431 s//\1/
19432 q
19433 }
19434 s/.*/./; q'`
19435
Greg Hartman9768ca42017-06-22 20:49:52 -070019436# Avoid depending upon Character Ranges.
19437as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19438as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19439as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19440as_cr_digits='0123456789'
19441as_cr_alnum=$as_cr_Letters$as_cr_digits
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019442
19443ECHO_C= ECHO_N= ECHO_T=
Greg Hartman9768ca42017-06-22 20:49:52 -070019444case `echo -n x` in #(((((
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019445-n*)
Greg Hartman9768ca42017-06-22 20:49:52 -070019446 case `echo 'xy\c'` in
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019447 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
Greg Hartman9768ca42017-06-22 20:49:52 -070019448 xy) ECHO_C='\c';;
19449 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19450 ECHO_T=' ';;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019451 esac;;
19452*)
19453 ECHO_N='-n';;
19454esac
19455
19456rm -f conf$$ conf$$.exe conf$$.file
19457if test -d conf$$.dir; then
19458 rm -f conf$$.dir/conf$$.file
19459else
19460 rm -f conf$$.dir
Greg Hartman9768ca42017-06-22 20:49:52 -070019461 mkdir conf$$.dir 2>/dev/null
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019462fi
Greg Hartman9768ca42017-06-22 20:49:52 -070019463if (echo >conf$$.file) 2>/dev/null; then
19464 if ln -s conf$$.file conf$$ 2>/dev/null; then
19465 as_ln_s='ln -s'
19466 # ... but there are two gotchas:
19467 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19468 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19469 # In both cases, we have to default to `cp -pR'.
19470 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19471 as_ln_s='cp -pR'
19472 elif ln conf$$.file conf$$ 2>/dev/null; then
19473 as_ln_s=ln
19474 else
19475 as_ln_s='cp -pR'
19476 fi
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019477else
Greg Hartman9768ca42017-06-22 20:49:52 -070019478 as_ln_s='cp -pR'
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019479fi
19480rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19481rmdir conf$$.dir 2>/dev/null
19482
Greg Hartman9768ca42017-06-22 20:49:52 -070019483
19484# as_fn_mkdir_p
19485# -------------
19486# Create "$as_dir" as a directory, including parents if necessary.
19487as_fn_mkdir_p ()
19488{
19489
19490 case $as_dir in #(
19491 -*) as_dir=./$as_dir;;
19492 esac
19493 test -d "$as_dir" || eval $as_mkdir_p || {
19494 as_dirs=
19495 while :; do
19496 case $as_dir in #(
19497 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19498 *) as_qdir=$as_dir;;
19499 esac
19500 as_dirs="'$as_qdir' $as_dirs"
19501 as_dir=`$as_dirname -- "$as_dir" ||
19502$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19503 X"$as_dir" : 'X\(//\)[^/]' \| \
19504 X"$as_dir" : 'X\(//\)$' \| \
19505 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19506$as_echo X"$as_dir" |
19507 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19508 s//\1/
19509 q
19510 }
19511 /^X\(\/\/\)[^/].*/{
19512 s//\1/
19513 q
19514 }
19515 /^X\(\/\/\)$/{
19516 s//\1/
19517 q
19518 }
19519 /^X\(\/\).*/{
19520 s//\1/
19521 q
19522 }
19523 s/.*/./; q'`
19524 test -d "$as_dir" && break
19525 done
19526 test -z "$as_dirs" || eval "mkdir $as_dirs"
19527 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19528
19529
19530} # as_fn_mkdir_p
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019531if mkdir -p . 2>/dev/null; then
Greg Hartman9768ca42017-06-22 20:49:52 -070019532 as_mkdir_p='mkdir -p "$as_dir"'
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019533else
19534 test -d ./-p && rmdir ./-p
19535 as_mkdir_p=false
19536fi
19537
Greg Hartman9768ca42017-06-22 20:49:52 -070019538
19539# as_fn_executable_p FILE
19540# -----------------------
19541# Test if FILE is an executable regular file.
19542as_fn_executable_p ()
19543{
19544 test -f "$1" && test -x "$1"
19545} # as_fn_executable_p
19546as_test_x='test -x'
19547as_executable_p=as_fn_executable_p
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019548
19549# Sed expression to map a string onto a valid CPP name.
19550as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19551
19552# Sed expression to map a string onto a valid variable name.
19553as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19554
19555
19556exec 6>&1
Greg Hartman9768ca42017-06-22 20:49:52 -070019557## ----------------------------------- ##
19558## Main body of $CONFIG_STATUS script. ##
19559## ----------------------------------- ##
19560_ASEOF
19561test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019562
Greg Hartman9768ca42017-06-22 20:49:52 -070019563cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19564# Save the log message, to keep $0 and so on meaningful, and to
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019565# report actual input values of CONFIG_FILES etc. instead of their
19566# values after options handling.
19567ac_log="
19568This file was extended by OpenSSH $as_me Portable, which was
Greg Hartman9768ca42017-06-22 20:49:52 -070019569generated by GNU Autoconf 2.69. Invocation command line was
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019570
19571 CONFIG_FILES = $CONFIG_FILES
19572 CONFIG_HEADERS = $CONFIG_HEADERS
19573 CONFIG_LINKS = $CONFIG_LINKS
19574 CONFIG_COMMANDS = $CONFIG_COMMANDS
19575 $ $0 $@
19576
19577on `(hostname || uname -n) 2>/dev/null | sed 1q`
19578"
19579
19580_ACEOF
19581
Greg Hartman9768ca42017-06-22 20:49:52 -070019582case $ac_config_files in *"
19583"*) set x $ac_config_files; shift; ac_config_files=$*;;
19584esac
19585
19586case $ac_config_headers in *"
19587"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19588esac
19589
19590
19591cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019592# Files that config.status was made for.
19593config_files="$ac_config_files"
19594config_headers="$ac_config_headers"
19595
19596_ACEOF
19597
Greg Hartman9768ca42017-06-22 20:49:52 -070019598cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019599ac_cs_usage="\
Greg Hartman9768ca42017-06-22 20:49:52 -070019600\`$as_me' instantiates files and other configuration actions
19601from templates according to the current configuration. Unless the files
19602and actions are specified as TAGs, all are instantiated by default.
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019603
Greg Hartman9768ca42017-06-22 20:49:52 -070019604Usage: $0 [OPTION]... [TAG]...
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019605
19606 -h, --help print this help, then exit
19607 -V, --version print version number and configuration settings, then exit
Greg Hartman9768ca42017-06-22 20:49:52 -070019608 --config print configuration, then exit
19609 -q, --quiet, --silent
19610 do not print progress messages
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019611 -d, --debug don't remove temporary files
19612 --recheck update $as_me by reconfiguring in the same conditions
Greg Hartman9768ca42017-06-22 20:49:52 -070019613 --file=FILE[:TEMPLATE]
19614 instantiate the configuration file FILE
19615 --header=FILE[:TEMPLATE]
19616 instantiate the configuration header FILE
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019617
19618Configuration files:
19619$config_files
19620
19621Configuration headers:
19622$config_headers
19623
Greg Hartman9768ca42017-06-22 20:49:52 -070019624Report bugs to <openssh-unix-dev@mindrot.org>."
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019625
19626_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070019627cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19628ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019629ac_cs_version="\\
19630OpenSSH config.status Portable
Greg Hartman9768ca42017-06-22 20:49:52 -070019631configured by $0, generated by GNU Autoconf 2.69,
19632 with options \\"\$ac_cs_config\\"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019633
Greg Hartman9768ca42017-06-22 20:49:52 -070019634Copyright (C) 2012 Free Software Foundation, Inc.
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019635This config.status script is free software; the Free Software Foundation
19636gives unlimited permission to copy, distribute and modify it."
19637
19638ac_pwd='$ac_pwd'
19639srcdir='$srcdir'
19640INSTALL='$INSTALL'
Greg Hartman9768ca42017-06-22 20:49:52 -070019641AWK='$AWK'
19642test -n "\$AWK" || AWK=awk
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019643_ACEOF
19644
Greg Hartman9768ca42017-06-22 20:49:52 -070019645cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19646# The default lists apply if the user does not specify any file.
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019647ac_need_defaults=:
19648while test $# != 0
19649do
19650 case $1 in
Greg Hartman9768ca42017-06-22 20:49:52 -070019651 --*=?*)
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019652 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19653 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19654 ac_shift=:
19655 ;;
Greg Hartman9768ca42017-06-22 20:49:52 -070019656 --*=)
19657 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19658 ac_optarg=
19659 ac_shift=:
19660 ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019661 *)
19662 ac_option=$1
19663 ac_optarg=$2
19664 ac_shift=shift
19665 ;;
19666 esac
19667
19668 case $ac_option in
19669 # Handling of the options.
19670 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19671 ac_cs_recheck=: ;;
19672 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
Greg Hartman9768ca42017-06-22 20:49:52 -070019673 $as_echo "$ac_cs_version"; exit ;;
19674 --config | --confi | --conf | --con | --co | --c )
19675 $as_echo "$ac_cs_config"; exit ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019676 --debug | --debu | --deb | --de | --d | -d )
19677 debug=: ;;
19678 --file | --fil | --fi | --f )
19679 $ac_shift
Greg Hartman9768ca42017-06-22 20:49:52 -070019680 case $ac_optarg in
19681 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19682 '') as_fn_error $? "missing file argument" ;;
19683 esac
19684 as_fn_append CONFIG_FILES " '$ac_optarg'"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019685 ac_need_defaults=false;;
19686 --header | --heade | --head | --hea )
19687 $ac_shift
Greg Hartman9768ca42017-06-22 20:49:52 -070019688 case $ac_optarg in
19689 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19690 esac
19691 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019692 ac_need_defaults=false;;
19693 --he | --h)
19694 # Conflict between --help and --header
Greg Hartman9768ca42017-06-22 20:49:52 -070019695 as_fn_error $? "ambiguous option: \`$1'
19696Try \`$0 --help' for more information.";;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019697 --help | --hel | -h )
Greg Hartman9768ca42017-06-22 20:49:52 -070019698 $as_echo "$ac_cs_usage"; exit ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019699 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19700 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19701 ac_cs_silent=: ;;
19702
19703 # This is an error.
Greg Hartman9768ca42017-06-22 20:49:52 -070019704 -*) as_fn_error $? "unrecognized option: \`$1'
19705Try \`$0 --help' for more information." ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019706
Greg Hartman9768ca42017-06-22 20:49:52 -070019707 *) as_fn_append ac_config_targets " $1"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019708 ac_need_defaults=false ;;
19709
19710 esac
19711 shift
19712done
19713
19714ac_configure_extra_args=
19715
19716if $ac_cs_silent; then
19717 exec 6>/dev/null
19718 ac_configure_extra_args="$ac_configure_extra_args --silent"
19719fi
19720
19721_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070019722cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019723if \$ac_cs_recheck; then
Greg Hartman9768ca42017-06-22 20:49:52 -070019724 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19725 shift
19726 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19727 CONFIG_SHELL='$SHELL'
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019728 export CONFIG_SHELL
Greg Hartman9768ca42017-06-22 20:49:52 -070019729 exec "\$@"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019730fi
19731
19732_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070019733cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019734exec 5>>config.log
19735{
19736 echo
19737 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19738## Running $as_me. ##
19739_ASBOX
Greg Hartman9768ca42017-06-22 20:49:52 -070019740 $as_echo "$ac_log"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019741} >&5
19742
19743_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070019744cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019745_ACEOF
19746
Greg Hartman9768ca42017-06-22 20:49:52 -070019747cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019748
19749# Handling of arguments.
19750for ac_config_target in $ac_config_targets
19751do
19752 case $ac_config_target in
19753 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
19754 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19755 "buildpkg.sh") CONFIG_FILES="$CONFIG_FILES buildpkg.sh" ;;
19756 "opensshd.init") CONFIG_FILES="$CONFIG_FILES opensshd.init" ;;
19757 "openssh.xml") CONFIG_FILES="$CONFIG_FILES openssh.xml" ;;
19758 "openbsd-compat/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;;
19759 "openbsd-compat/regress/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/regress/Makefile" ;;
19760 "survey.sh") CONFIG_FILES="$CONFIG_FILES survey.sh" ;;
19761
Greg Hartman9768ca42017-06-22 20:49:52 -070019762 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019763 esac
19764done
19765
19766
19767# If the user did not use the arguments to specify the items to instantiate,
19768# then the envvar interface is used. Set only those that are not.
19769# We use the long form for the default assignment because of an extremely
19770# bizarre bug on SunOS 4.1.3.
19771if $ac_need_defaults; then
19772 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19773 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19774fi
19775
19776# Have a temporary directory for convenience. Make it in the build tree
19777# simply because there is no reason against having it here, and in addition,
19778# creating and moving files from /tmp can sometimes cause problems.
19779# Hook for its removal unless debugging.
19780# Note that there is a small window in which the directory will not be cleaned:
19781# after its creation but before its name has been assigned to `$tmp'.
19782$debug ||
19783{
Greg Hartman9768ca42017-06-22 20:49:52 -070019784 tmp= ac_tmp=
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019785 trap 'exit_status=$?
Greg Hartman9768ca42017-06-22 20:49:52 -070019786 : "${ac_tmp:=$tmp}"
19787 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019788' 0
Greg Hartman9768ca42017-06-22 20:49:52 -070019789 trap 'as_fn_exit 1' 1 2 13 15
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019790}
19791# Create a (secure) tmp directory for tmp files.
19792
19793{
19794 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
Greg Hartman9768ca42017-06-22 20:49:52 -070019795 test -d "$tmp"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019796} ||
19797{
19798 tmp=./conf$$-$RANDOM
19799 (umask 077 && mkdir "$tmp")
Greg Hartman9768ca42017-06-22 20:49:52 -070019800} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19801ac_tmp=$tmp
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019802
Greg Hartman9768ca42017-06-22 20:49:52 -070019803# Set up the scripts for CONFIG_FILES section.
19804# No need to generate them if there are no CONFIG_FILES.
19805# This happens for instance with `./config.status config.h'.
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019806if test -n "$CONFIG_FILES"; then
19807
Greg Hartman9768ca42017-06-22 20:49:52 -070019808
19809ac_cr=`echo X | tr X '\015'`
19810# On cygwin, bash can eat \r inside `` if the user requested igncr.
19811# But we know of no other shell where ac_cr would be empty at this
19812# point, so we can use a bashism as a fallback.
19813if test "x$ac_cr" = x; then
19814 eval ac_cr=\$\'\\r\'
19815fi
19816ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19817if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19818 ac_cs_awk_cr='\\r'
19819else
19820 ac_cs_awk_cr=$ac_cr
19821fi
19822
19823echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019824_ACEOF
19825
19826
Greg Hartman9768ca42017-06-22 20:49:52 -070019827{
19828 echo "cat >conf$$subs.awk <<_ACEOF" &&
19829 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19830 echo "_ACEOF"
19831} >conf$$subs.sh ||
19832 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19833ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019834ac_delim='%!_!# '
19835for ac_last_try in false false false false false :; do
Greg Hartman9768ca42017-06-22 20:49:52 -070019836 . ./conf$$subs.sh ||
19837 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019838
Greg Hartman9768ca42017-06-22 20:49:52 -070019839 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19840 if test $ac_delim_n = $ac_delim_num; then
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019841 break
19842 elif $ac_last_try; then
Greg Hartman9768ca42017-06-22 20:49:52 -070019843 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019844 else
19845 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19846 fi
19847done
Greg Hartman9768ca42017-06-22 20:49:52 -070019848rm -f conf$$subs.sh
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019849
Greg Hartman9768ca42017-06-22 20:49:52 -070019850cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19851cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019852_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070019853sed -n '
19854h
19855s/^/S["/; s/!.*/"]=/
19856p
19857g
19858s/^[^!]*!//
19859:repl
19860t repl
19861s/'"$ac_delim"'$//
19862t delim
19863:nl
19864h
19865s/\(.\{148\}\)..*/\1/
19866t more1
19867s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19868p
19869n
19870b repl
19871:more1
19872s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19873p
19874g
19875s/.\{148\}//
19876t nl
19877:delim
19878h
19879s/\(.\{148\}\)..*/\1/
19880t more2
19881s/["\\]/\\&/g; s/^/"/; s/$/"/
19882p
19883b
19884:more2
19885s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19886p
19887g
19888s/.\{148\}//
19889t delim
19890' <conf$$subs.awk | sed '
19891/^[^""]/{
19892 N
19893 s/\n//
19894}
19895' >>$CONFIG_STATUS || ac_write_fail=1
19896rm -f conf$$subs.awk
19897cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19898_ACAWK
19899cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19900 for (key in S) S_is_set[key] = 1
19901 FS = ""
19902
19903}
19904{
19905 line = $ 0
19906 nfields = split(line, field, "@")
19907 substed = 0
19908 len = length(field[1])
19909 for (i = 2; i < nfields; i++) {
19910 key = field[i]
19911 keylen = length(key)
19912 if (S_is_set[key]) {
19913 value = S[key]
19914 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19915 len += length(value) + length(field[++i])
19916 substed = 1
19917 } else
19918 len += 1 + keylen
19919 }
19920
19921 print line
19922}
19923
19924_ACAWK
19925_ACEOF
19926cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19927if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19928 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19929else
19930 cat
19931fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19932 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019933_ACEOF
19934
Greg Hartman9768ca42017-06-22 20:49:52 -070019935# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19936# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019937# trailing colons and then remove the whole line if VPATH becomes empty
19938# (actually we leave an empty line to preserve line numbers).
19939if test "x$srcdir" = x.; then
Greg Hartman9768ca42017-06-22 20:49:52 -070019940 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
19941h
19942s///
19943s/^/:/
19944s/[ ]*$/:/
19945s/:\$(srcdir):/:/g
19946s/:\${srcdir}:/:/g
19947s/:@srcdir@:/:/g
19948s/^:*//
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019949s/:*$//
Greg Hartman9768ca42017-06-22 20:49:52 -070019950x
19951s/\(=[ ]*\).*/\1/
19952G
19953s/\n//
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019954s/^[^=]*=[ ]*$//
19955}'
19956fi
19957
Greg Hartman9768ca42017-06-22 20:49:52 -070019958cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019959fi # test -n "$CONFIG_FILES"
19960
Greg Hartman9768ca42017-06-22 20:49:52 -070019961# Set up the scripts for CONFIG_HEADERS section.
19962# No need to generate them if there are no CONFIG_HEADERS.
19963# This happens for instance with `./config.status Makefile'.
19964if test -n "$CONFIG_HEADERS"; then
19965cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19966BEGIN {
19967_ACEOF
Greg Hartmanbd77cf72015-02-25 13:21:06 -080019968
Greg Hartman9768ca42017-06-22 20:49:52 -070019969# Transform confdefs.h into an awk script `defines.awk', embedded as
19970# here-document in config.status, that substitutes the proper values into
19971# config.h.in to produce config.h.
19972
19973# Create a delimiter string that does not exist in confdefs.h, to ease
19974# handling of long lines.
19975ac_delim='%!_!# '
19976for ac_last_try in false false :; do
19977 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19978 if test -z "$ac_tt"; then
19979 break
19980 elif $ac_last_try; then
19981 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19982 else
19983 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19984 fi
19985done
19986
19987# For the awk script, D is an array of macro values keyed by name,
19988# likewise P contains macro parameters if any. Preserve backslash
19989# newline sequences.
19990
19991ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19992sed -n '
19993s/.\{148\}/&'"$ac_delim"'/g
19994t rset
19995:rset
19996s/^[ ]*#[ ]*define[ ][ ]*/ /
19997t def
19998d
19999:def
20000s/\\$//
20001t bsnl
20002s/["\\]/\\&/g
20003s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20004D["\1"]=" \3"/p
20005s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20006d
20007:bsnl
20008s/["\\]/\\&/g
20009s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20010D["\1"]=" \3\\\\\\n"\\/p
20011t cont
20012s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20013t cont
20014d
20015:cont
20016n
20017s/.\{148\}/&'"$ac_delim"'/g
20018t clear
20019:clear
20020s/\\$//
20021t bsnlc
20022s/["\\]/\\&/g; s/^/"/; s/$/"/p
20023d
20024:bsnlc
20025s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20026b cont
20027' <confdefs.h | sed '
20028s/'"$ac_delim"'/"\\\
20029"/g' >>$CONFIG_STATUS || ac_write_fail=1
20030
20031cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20032 for (key in D) D_is_set[key] = 1
20033 FS = ""
20034}
20035/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20036 line = \$ 0
20037 split(line, arg, " ")
20038 if (arg[1] == "#") {
20039 defundef = arg[2]
20040 mac1 = arg[3]
20041 } else {
20042 defundef = substr(arg[1], 2)
20043 mac1 = arg[2]
20044 }
20045 split(mac1, mac2, "(") #)
20046 macro = mac2[1]
20047 prefix = substr(line, 1, index(line, defundef) - 1)
20048 if (D_is_set[macro]) {
20049 # Preserve the white space surrounding the "#".
20050 print prefix "define", macro P[macro] D[macro]
20051 next
20052 } else {
20053 # Replace #undef with comments. This is necessary, for example,
20054 # in the case of _POSIX_SOURCE, which is predefined and required
20055 # on some systems where configure will not decide to define it.
20056 if (defundef == "undef") {
20057 print "/*", prefix defundef, macro, "*/"
20058 next
20059 }
20060 }
20061}
20062{ print }
20063_ACAWK
20064_ACEOF
20065cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20066 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20067fi # test -n "$CONFIG_HEADERS"
20068
20069
20070eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
20071shift
20072for ac_tag
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020073do
20074 case $ac_tag in
20075 :[FHLC]) ac_mode=$ac_tag; continue;;
20076 esac
20077 case $ac_mode$ac_tag in
20078 :[FHL]*:*);;
Greg Hartman9768ca42017-06-22 20:49:52 -070020079 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020080 :[FH]-) ac_tag=-:-;;
20081 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20082 esac
20083 ac_save_IFS=$IFS
20084 IFS=:
20085 set x $ac_tag
20086 IFS=$ac_save_IFS
20087 shift
20088 ac_file=$1
20089 shift
20090
20091 case $ac_mode in
20092 :L) ac_source=$1;;
20093 :[FH])
20094 ac_file_inputs=
20095 for ac_f
20096 do
20097 case $ac_f in
Greg Hartman9768ca42017-06-22 20:49:52 -070020098 -) ac_f="$ac_tmp/stdin";;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020099 *) # Look for the file first in the build tree, then in the source tree
20100 # (if the path is not absolute). The absolute path cannot be DOS-style,
20101 # because $ac_f cannot contain `:'.
20102 test -f "$ac_f" ||
20103 case $ac_f in
20104 [\\/$]*) false;;
20105 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20106 esac ||
Greg Hartman9768ca42017-06-22 20:49:52 -070020107 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020108 esac
Greg Hartman9768ca42017-06-22 20:49:52 -070020109 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20110 as_fn_append ac_file_inputs " '$ac_f'"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020111 done
20112
20113 # Let's still pretend it is `configure' which instantiates (i.e., don't
20114 # use $as_me), people would be surprised to read:
20115 # /* config.h. Generated by config.status. */
Greg Hartman9768ca42017-06-22 20:49:52 -070020116 configure_input='Generated from '`
20117 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20118 `' by configure.'
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020119 if test x"$ac_file" != x-; then
20120 configure_input="$ac_file. $configure_input"
Greg Hartman9768ca42017-06-22 20:49:52 -070020121 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20122$as_echo "$as_me: creating $ac_file" >&6;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020123 fi
Greg Hartman9768ca42017-06-22 20:49:52 -070020124 # Neutralize special characters interpreted by sed in replacement strings.
20125 case $configure_input in #(
20126 *\&* | *\|* | *\\* )
20127 ac_sed_conf_input=`$as_echo "$configure_input" |
20128 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20129 *) ac_sed_conf_input=$configure_input;;
20130 esac
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020131
20132 case $ac_tag in
Greg Hartman9768ca42017-06-22 20:49:52 -070020133 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20134 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020135 esac
20136 ;;
20137 esac
20138
20139 ac_dir=`$as_dirname -- "$ac_file" ||
20140$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20141 X"$ac_file" : 'X\(//\)[^/]' \| \
20142 X"$ac_file" : 'X\(//\)$' \| \
20143 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
Greg Hartman9768ca42017-06-22 20:49:52 -070020144$as_echo X"$ac_file" |
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020145 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20146 s//\1/
20147 q
20148 }
20149 /^X\(\/\/\)[^/].*/{
20150 s//\1/
20151 q
20152 }
20153 /^X\(\/\/\)$/{
20154 s//\1/
20155 q
20156 }
20157 /^X\(\/\).*/{
20158 s//\1/
20159 q
20160 }
20161 s/.*/./; q'`
Greg Hartman9768ca42017-06-22 20:49:52 -070020162 as_dir="$ac_dir"; as_fn_mkdir_p
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020163 ac_builddir=.
20164
20165case "$ac_dir" in
20166.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20167*)
Greg Hartman9768ca42017-06-22 20:49:52 -070020168 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020169 # A ".." for each directory in $ac_dir_suffix.
Greg Hartman9768ca42017-06-22 20:49:52 -070020170 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020171 case $ac_top_builddir_sub in
20172 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20173 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20174 esac ;;
20175esac
20176ac_abs_top_builddir=$ac_pwd
20177ac_abs_builddir=$ac_pwd$ac_dir_suffix
20178# for backward compatibility:
20179ac_top_builddir=$ac_top_build_prefix
20180
20181case $srcdir in
20182 .) # We are building in place.
20183 ac_srcdir=.
20184 ac_top_srcdir=$ac_top_builddir_sub
20185 ac_abs_top_srcdir=$ac_pwd ;;
20186 [\\/]* | ?:[\\/]* ) # Absolute name.
20187 ac_srcdir=$srcdir$ac_dir_suffix;
20188 ac_top_srcdir=$srcdir
20189 ac_abs_top_srcdir=$srcdir ;;
20190 *) # Relative name.
20191 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20192 ac_top_srcdir=$ac_top_build_prefix$srcdir
20193 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20194esac
20195ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20196
20197
20198 case $ac_mode in
20199 :F)
20200 #
20201 # CONFIG_FILE
20202 #
20203
20204 case $INSTALL in
20205 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20206 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20207 esac
20208_ACEOF
20209
Greg Hartman9768ca42017-06-22 20:49:52 -070020210cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020211# If the template does not know about datarootdir, expand it.
20212# FIXME: This hack should be removed a few years after 2.60.
20213ac_datarootdir_hack=; ac_datarootdir_seen=
Greg Hartman9768ca42017-06-22 20:49:52 -070020214ac_sed_dataroot='
20215/datarootdir/ {
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020216 p
20217 q
20218}
20219/@datadir@/p
20220/@docdir@/p
20221/@infodir@/p
20222/@localedir@/p
Greg Hartman9768ca42017-06-22 20:49:52 -070020223/@mandir@/p'
20224case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020225*datarootdir*) ac_datarootdir_seen=yes;;
20226*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
Greg Hartman9768ca42017-06-22 20:49:52 -070020227 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20228$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020229_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070020230cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020231 ac_datarootdir_hack='
20232 s&@datadir@&$datadir&g
20233 s&@docdir@&$docdir&g
20234 s&@infodir@&$infodir&g
20235 s&@localedir@&$localedir&g
20236 s&@mandir@&$mandir&g
Greg Hartman9768ca42017-06-22 20:49:52 -070020237 s&\\\${datarootdir}&$datarootdir&g' ;;
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020238esac
20239_ACEOF
20240
20241# Neutralize VPATH when `$srcdir' = `.'.
20242# Shell code in configure.ac might set extrasub.
20243# FIXME: do we really want to maintain this feature?
Greg Hartman9768ca42017-06-22 20:49:52 -070020244cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20245ac_sed_extra="$ac_vpsub
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020246$extrasub
20247_ACEOF
Greg Hartman9768ca42017-06-22 20:49:52 -070020248cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020249:t
20250/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
Greg Hartman9768ca42017-06-22 20:49:52 -070020251s|@configure_input@|$ac_sed_conf_input|;t t
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020252s&@top_builddir@&$ac_top_builddir_sub&;t t
Greg Hartman9768ca42017-06-22 20:49:52 -070020253s&@top_build_prefix@&$ac_top_build_prefix&;t t
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020254s&@srcdir@&$ac_srcdir&;t t
20255s&@abs_srcdir@&$ac_abs_srcdir&;t t
20256s&@top_srcdir@&$ac_top_srcdir&;t t
20257s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20258s&@builddir@&$ac_builddir&;t t
20259s&@abs_builddir@&$ac_abs_builddir&;t t
20260s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20261s&@INSTALL@&$ac_INSTALL&;t t
20262$ac_datarootdir_hack
Greg Hartman9768ca42017-06-22 20:49:52 -070020263"
20264eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20265 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020266
20267test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
Greg Hartman9768ca42017-06-22 20:49:52 -070020268 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20269 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20270 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20271 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20272which seems to be undefined. Please make sure it is defined" >&5
20273$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20274which seems to be undefined. Please make sure it is defined" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020275
Greg Hartman9768ca42017-06-22 20:49:52 -070020276 rm -f "$ac_tmp/stdin"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020277 case $ac_file in
Greg Hartman9768ca42017-06-22 20:49:52 -070020278 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20279 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20280 esac \
20281 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020282 ;;
20283 :H)
20284 #
20285 # CONFIG_HEADER
20286 #
20287 if test x"$ac_file" != x-; then
Greg Hartman9768ca42017-06-22 20:49:52 -070020288 {
20289 $as_echo "/* $configure_input */" \
20290 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20291 } >"$ac_tmp/config.h" \
20292 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20293 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20294 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20295$as_echo "$as_me: $ac_file is unchanged" >&6;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020296 else
Greg Hartman9768ca42017-06-22 20:49:52 -070020297 rm -f "$ac_file"
20298 mv "$ac_tmp/config.h" "$ac_file" \
20299 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020300 fi
20301 else
Greg Hartman9768ca42017-06-22 20:49:52 -070020302 $as_echo "/* $configure_input */" \
20303 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20304 || as_fn_error $? "could not create -" "$LINENO" 5
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020305 fi
20306 ;;
20307
20308
20309 esac
20310
20311done # for ac_tag
20312
20313
Greg Hartman9768ca42017-06-22 20:49:52 -070020314as_fn_exit 0
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020315_ACEOF
20316ac_clean_files=$ac_clean_files_save
20317
Greg Hartman9768ca42017-06-22 20:49:52 -070020318test $ac_write_fail = 0 ||
20319 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20320
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020321
20322# configure is writing to config.log, and then calls config.status.
20323# config.status does its own redirection, appending to config.log.
20324# Unfortunately, on DOS this fails, as config.log is still kept open
20325# by configure, so config.status won't be able to write to it; its
20326# output is simply discarded. So we exec the FD to /dev/null,
20327# effectively closing config.log, so it can be properly (re)opened and
20328# appended to by config.status. When coming back to configure, we
20329# need to make the FD available again.
20330if test "$no_create" != yes; then
20331 ac_cs_success=:
20332 ac_config_status_args=
20333 test "$silent" = yes &&
20334 ac_config_status_args="$ac_config_status_args --quiet"
20335 exec 5>/dev/null
20336 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20337 exec 5>>config.log
20338 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20339 # would make configure fail if this is the last instruction.
Greg Hartman9768ca42017-06-22 20:49:52 -070020340 $ac_cs_success || as_fn_exit 1
20341fi
20342if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20343 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20344$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020345fi
20346
20347
20348# Print summary of options
20349
20350# Someone please show me a better way :)
20351A=`eval echo ${prefix}` ; A=`eval echo ${A}`
20352B=`eval echo ${bindir}` ; B=`eval echo ${B}`
20353C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
20354D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
20355E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
20356F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
20357G=`eval echo ${piddir}` ; G=`eval echo ${G}`
20358H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}`
20359I=`eval echo ${user_path}` ; I=`eval echo ${I}`
20360J=`eval echo ${superuser_path}` ; J=`eval echo ${J}`
20361
20362echo ""
20363echo "OpenSSH has been configured with the following options:"
20364echo " User binaries: $B"
20365echo " System binaries: $C"
20366echo " Configuration files: $D"
20367echo " Askpass program: $E"
20368echo " Manual pages: $F"
20369echo " PID file: $G"
20370echo " Privilege separation chroot path: $H"
20371if test "x$external_path_file" = "x/etc/login.conf" ; then
20372echo " At runtime, sshd will use the path defined in $external_path_file"
20373echo " Make sure the path to scp is present, otherwise scp will not work"
20374else
20375echo " sshd default user PATH: $I"
20376 if test ! -z "$external_path_file"; then
20377echo " (If PATH is set in $external_path_file it will be used instead. If"
20378echo " used, ensure the path to scp is present, otherwise scp will not work.)"
20379 fi
20380fi
20381if test ! -z "$superuser_path" ; then
20382echo " sshd superuser user PATH: $J"
20383fi
20384echo " Manpage format: $MANTYPE"
20385echo " PAM support: $PAM_MSG"
20386echo " OSF SIA support: $SIA_MSG"
20387echo " KerberosV support: $KRB5_MSG"
20388echo " SELinux support: $SELINUX_MSG"
20389echo " Smartcard support: $SCARD_MSG"
20390echo " S/KEY support: $SKEY_MSG"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020391echo " MD5 password support: $MD5_MSG"
20392echo " libedit support: $LIBEDIT_MSG"
Greg Hartman9768ca42017-06-22 20:49:52 -070020393echo " libldns support: $LDNS_MSG"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020394echo " Solaris process contract support: $SPC_MSG"
20395echo " Solaris project support: $SP_MSG"
Greg Hartman9768ca42017-06-22 20:49:52 -070020396echo " Solaris privilege support: $SPP_MSG"
Greg Hartmanbd77cf72015-02-25 13:21:06 -080020397echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
20398echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
20399echo " BSD Auth support: $BSD_AUTH_MSG"
20400echo " Random number source: $RAND_MSG"
20401echo " Privsep sandbox style: $SANDBOX_STYLE"
20402
20403echo ""
20404
20405echo " Host: ${host}"
20406echo " Compiler: ${CC}"
20407echo " Compiler flags: ${CFLAGS}"
20408echo "Preprocessor flags: ${CPPFLAGS}"
20409echo " Linker flags: ${LDFLAGS}"
20410echo " Libraries: ${LIBS}"
20411if test ! -z "${SSHDLIBS}"; then
20412echo " +for sshd: ${SSHDLIBS}"
20413fi
20414if test ! -z "${SSHLIBS}"; then
20415echo " +for ssh: ${SSHLIBS}"
20416fi
20417
20418echo ""
20419
20420if test "x$MAKE_PACKAGE_SUPPORTED" = "xyes" ; then
20421 echo "SVR4 style packages are supported with \"make package\""
20422 echo ""
20423fi
20424
20425if test "x$PAM_MSG" = "xyes" ; then
20426 echo "PAM is enabled. You may need to install a PAM control file "
20427 echo "for sshd, otherwise password authentication may fail. "
20428 echo "Example PAM control files can be found in the contrib/ "
20429 echo "subdirectory"
20430 echo ""
20431fi
20432
20433if test ! -z "$NO_PEERCHECK" ; then
20434 echo "WARNING: the operating system that you are using does not"
20435 echo "appear to support getpeereid(), getpeerucred() or the"
20436 echo "SO_PEERCRED getsockopt() option. These facilities are used to"
20437 echo "enforce security checks to prevent unauthorised connections to"
20438 echo "ssh-agent. Their absence increases the risk that a malicious"
20439 echo "user can connect to your agent."
20440 echo ""
20441fi
20442
20443if test "$AUDIT_MODULE" = "bsm" ; then
20444 echo "WARNING: BSM audit support is currently considered EXPERIMENTAL."
20445 echo "See the Solaris section in README.platform for details."
20446fi