summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure21461
1 files changed, 21461 insertions, 0 deletions
diff --git a/configure b/configure
new file mode 100755
index 000000000..d2465270a
--- /dev/null
+++ b/configure
@@ -0,0 +1,21461 @@
1#! /bin/sh
2# From configure.ac Revision: 1.583 .
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by GNU Autoconf 2.69 for OpenSSH Portable.
5#
6# Report bugs to <openssh-unix-dev@mindrot.org>.
7#
8#
9# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
10#
11#
12# This configure script is free software; the Free Software Foundation
13# gives unlimited permission to copy, distribute and modify it.
14## -------------------- ##
15## M4sh Initialization. ##
16## -------------------- ##
17
18# Be more Bourne compatible
19DUALCASE=1; export DUALCASE # for MKS sh
20if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
21 emulate sh
22 NULLCMD=:
23 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
24 # is contrary to our usage. Disable this feature.
25 alias -g '${1+"$@"}'='"$@"'
26 setopt NO_GLOB_SUBST
27else
28 case `(set -o) 2>/dev/null` in #(
29 *posix*) :
30 set -o posix ;; #(
31 *) :
32 ;;
33esac
34fi
35
36
37as_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
74
75# The user is always right.
76if test "${PATH_SEPARATOR+set}" != set; then
77 PATH_SEPARATOR=:
78 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
79 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
80 PATH_SEPARATOR=';'
81 }
82fi
83
84
85# 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.
93as_myself=
94case $0 in #((
95 *[\\/]* ) 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=.
101 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
102 done
103IFS=$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
113 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 exit 1
115fi
116
117# 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 || :
124done
125PS1='$ '
126PS2='> '
127PS4='+ '
128
129# NLS nuisances.
130LC_ALL=C
131export LC_ALL
132LANGUAGE=C
133export LANGUAGE
134
135# 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
423if 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
436if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437 as_dirname=dirname
438else
439 as_dirname=false
440fi
441
442as_me=`$as_basename -- "$0" ||
443$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
444 X"$0" : 'X\(//\)$' \| \
445 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
446$as_echo X/"$0" |
447 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
461# 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
467
468
469 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. :-)
474 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" ||
490 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
491
492 # 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
496 # 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=
505case `echo -n x` in #(((((
506-n*)
507 case `echo 'xy\c'` in
508 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
509 xy) ECHO_C='\c';;
510 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
511 ECHO_T=' ';;
512 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
522 mkdir conf$$.dir 2>/dev/null
523fi
524if (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
538else
539 as_ln_s='cp -pR'
540fi
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
545 as_mkdir_p='mkdir -p "$as_dir"'
546else
547 test -d ./-p && rmdir ./-p
548 as_mkdir_p=false
549fi
550
551as_test_x='test -x'
552as_executable_p=as_fn_executable_p
553
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
561test -n "$DJDIR" || exec 7<&0 </dev/null
562exec 6>&1
563
564# Name of the host.
565# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
566# 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'
587PACKAGE_URL=''
588
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
626ac_subst_vars='LTLIBOBJS
627CFLAGS_NOPIE
628LDFLAGS_NOPIE
629DEPEND
630UNSUPPORTED_ALGORITHMS
631TEST_MALLOC_OPTIONS
632TEST_SSH_UTF8
633TEST_SSH_IPV6
634piddir
635user_path
636mansubdir
637MANTYPE
638XAUTH_PATH
639STRIP_OPT
640xauth_path
641PRIVSEP_PATH
642K5LIBS
643GSSLIBS
644KRB5CONF
645SSHDLIBS
646SSHLIBS
647SSH_PRIVSEP_USER
648LIBFIDO2
649SK_DUMMY_LIBRARY
650COMMENT_OUT_ECC
651TEST_SSH_ECC
652PICFLAG
653LIBEDIT
654PKGCONFIG
655LDNSCONFIG
656LIBOBJS
657LD
658PATH_PASSWD_PROG
659STARTUP_SCRIPT_SHELL
660MAKE_PACKAGE_SUPPORTED
661PATH_USERADD_PROG
662PATH_GROUPADD_PROG
663MANFMT
664TEST_SHELL
665MANDOC
666NROFF
667GROFF
668SH
669TEST_MINUS_S_SH
670ENT
671SED
672KILL
673CAT
674ac_ct_AR
675AR
676MKDIR_P
677INSTALL_DATA
678INSTALL_SCRIPT
679INSTALL_PROGRAM
680RANLIB
681AWK
682EGREP
683GREP
684CPP
685host_os
686host_vendor
687host_cpu
688host
689build_os
690build_vendor
691build_cpu
692build
693OBJEXT
694EXEEXT
695ac_ct_CC
696CPPFLAGS
697LDFLAGS
698CFLAGS
699CC
700target_alias
701host_alias
702build_alias
703LIBS
704ECHO_T
705ECHO_N
706ECHO_C
707DEFS
708mandir
709localedir
710libdir
711psdir
712pdfdir
713dvidir
714htmldir
715infodir
716docdir
717oldincludedir
718includedir
719localstatedir
720sharedstatedir
721sysconfdir
722datadir
723datarootdir
724libexecdir
725sbindir
726bindir
727program_transform_name
728prefix
729exec_prefix
730PACKAGE_URL
731PACKAGE_BUGREPORT
732PACKAGE_STRING
733PACKAGE_VERSION
734PACKAGE_TARNAME
735PACKAGE_NAME
736PATH_SEPARATOR
737SHELL'
738ac_subst_files=''
739ac_user_opts='
740enable_option_checking
741enable_largefile
742with_openssl
743with_stackprotect
744with_hardening
745with_rpath
746with_cflags
747with_cflags_after
748with_cppflags
749with_ldflags
750with_ldflags_after
751with_libs
752with_Werror
753with_solaris_contracts
754with_solaris_projects
755with_solaris_privs
756with_osfsia
757with_zlib
758with_zlib_version_check
759with_ldns
760with_libedit
761with_audit
762with_pie
763enable_pkcs11
764enable_security_key
765with_security_key_builtin
766with_ssl_dir
767with_openssl_header_check
768with_ssl_engine
769with_prngd_port
770with_prngd_socket
771with_pam
772with_pam_service
773with_privsep_user
774with_sandbox
775with_selinux
776with_kerberos5
777with_privsep_path
778with_xauth
779enable_strip
780with_maildir
781with_mantype
782with_md5_passwords
783with_shadow
784with_ipaddr_display
785enable_etc_default_login
786with_default_path
787with_superuser_path
788with_4in6
789with_bsd_auth
790with_pid_dir
791enable_lastlog
792enable_utmp
793enable_utmpx
794enable_wtmp
795enable_wtmpx
796enable_libutil
797enable_pututline
798enable_pututxline
799with_lastlog
800'
801 ac_precious_vars='build_alias
802host_alias
803target_alias
804CC
805CFLAGS
806LDFLAGS
807LIBS
808CPPFLAGS
809CPP'
810
811
812# Initialize some variables set by options.
813ac_init_help=
814ac_init_version=false
815ac_unrecognized_opts=
816ac_unrecognized_sep=
817# The variables have the same names as the options, with
818# dashes changed to underlines.
819cache_file=/dev/null
820exec_prefix=NONE
821no_create=
822no_recursion=
823prefix=NONE
824program_prefix=NONE
825program_suffix=NONE
826program_transform_name=s,x,x,
827silent=
828site=
829srcdir=
830verbose=
831x_includes=NONE
832x_libraries=NONE
833
834# Installation directory options.
835# These are left unexpanded so users can "make install exec_prefix=/foo"
836# and all the variables that are supposed to be based on exec_prefix
837# by default will actually change.
838# Use braces instead of parens because sh, perl, etc. also accept them.
839# (The list follows the same order as the GNU Coding Standards.)
840bindir='${exec_prefix}/bin'
841sbindir='${exec_prefix}/sbin'
842libexecdir='${exec_prefix}/libexec'
843datarootdir='${prefix}/share'
844datadir='${datarootdir}'
845sysconfdir='${prefix}/etc'
846sharedstatedir='${prefix}/com'
847localstatedir='${prefix}/var'
848includedir='${prefix}/include'
849oldincludedir='/usr/include'
850docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
851infodir='${datarootdir}/info'
852htmldir='${docdir}'
853dvidir='${docdir}'
854pdfdir='${docdir}'
855psdir='${docdir}'
856libdir='${exec_prefix}/lib'
857localedir='${datarootdir}/locale'
858mandir='${datarootdir}/man'
859
860ac_prev=
861ac_dashdash=
862for ac_option
863do
864 # If the previous option needs an argument, assign it.
865 if test -n "$ac_prev"; then
866 eval $ac_prev=\$ac_option
867 ac_prev=
868 continue
869 fi
870
871 case $ac_option in
872 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
873 *=) ac_optarg= ;;
874 *) ac_optarg=yes ;;
875 esac
876
877 # Accept the important Cygnus configure options, so we can diagnose typos.
878
879 case $ac_dashdash$ac_option in
880 --)
881 ac_dashdash=yes ;;
882
883 -bindir | --bindir | --bindi | --bind | --bin | --bi)
884 ac_prev=bindir ;;
885 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
886 bindir=$ac_optarg ;;
887
888 -build | --build | --buil | --bui | --bu)
889 ac_prev=build_alias ;;
890 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
891 build_alias=$ac_optarg ;;
892
893 -cache-file | --cache-file | --cache-fil | --cache-fi \
894 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
895 ac_prev=cache_file ;;
896 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
897 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
898 cache_file=$ac_optarg ;;
899
900 --config-cache | -C)
901 cache_file=config.cache ;;
902
903 -datadir | --datadir | --datadi | --datad)
904 ac_prev=datadir ;;
905 -datadir=* | --datadir=* | --datadi=* | --datad=*)
906 datadir=$ac_optarg ;;
907
908 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
909 | --dataroo | --dataro | --datar)
910 ac_prev=datarootdir ;;
911 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
912 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
913 datarootdir=$ac_optarg ;;
914
915 -disable-* | --disable-*)
916 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
917 # Reject names that are not valid shell variable names.
918 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
919 as_fn_error $? "invalid feature name: $ac_useropt"
920 ac_useropt_orig=$ac_useropt
921 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
922 case $ac_user_opts in
923 *"
924"enable_$ac_useropt"
925"*) ;;
926 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
927 ac_unrecognized_sep=', ';;
928 esac
929 eval enable_$ac_useropt=no ;;
930
931 -docdir | --docdir | --docdi | --doc | --do)
932 ac_prev=docdir ;;
933 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
934 docdir=$ac_optarg ;;
935
936 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
937 ac_prev=dvidir ;;
938 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
939 dvidir=$ac_optarg ;;
940
941 -enable-* | --enable-*)
942 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
943 # Reject names that are not valid shell variable names.
944 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
945 as_fn_error $? "invalid feature name: $ac_useropt"
946 ac_useropt_orig=$ac_useropt
947 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
948 case $ac_user_opts in
949 *"
950"enable_$ac_useropt"
951"*) ;;
952 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
953 ac_unrecognized_sep=', ';;
954 esac
955 eval enable_$ac_useropt=\$ac_optarg ;;
956
957 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
958 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
959 | --exec | --exe | --ex)
960 ac_prev=exec_prefix ;;
961 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
962 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
963 | --exec=* | --exe=* | --ex=*)
964 exec_prefix=$ac_optarg ;;
965
966 -gas | --gas | --ga | --g)
967 # Obsolete; use --with-gas.
968 with_gas=yes ;;
969
970 -help | --help | --hel | --he | -h)
971 ac_init_help=long ;;
972 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
973 ac_init_help=recursive ;;
974 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
975 ac_init_help=short ;;
976
977 -host | --host | --hos | --ho)
978 ac_prev=host_alias ;;
979 -host=* | --host=* | --hos=* | --ho=*)
980 host_alias=$ac_optarg ;;
981
982 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
983 ac_prev=htmldir ;;
984 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
985 | --ht=*)
986 htmldir=$ac_optarg ;;
987
988 -includedir | --includedir | --includedi | --included | --include \
989 | --includ | --inclu | --incl | --inc)
990 ac_prev=includedir ;;
991 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
992 | --includ=* | --inclu=* | --incl=* | --inc=*)
993 includedir=$ac_optarg ;;
994
995 -infodir | --infodir | --infodi | --infod | --info | --inf)
996 ac_prev=infodir ;;
997 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
998 infodir=$ac_optarg ;;
999
1000 -libdir | --libdir | --libdi | --libd)
1001 ac_prev=libdir ;;
1002 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1003 libdir=$ac_optarg ;;
1004
1005 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1006 | --libexe | --libex | --libe)
1007 ac_prev=libexecdir ;;
1008 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1009 | --libexe=* | --libex=* | --libe=*)
1010 libexecdir=$ac_optarg ;;
1011
1012 -localedir | --localedir | --localedi | --localed | --locale)
1013 ac_prev=localedir ;;
1014 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1015 localedir=$ac_optarg ;;
1016
1017 -localstatedir | --localstatedir | --localstatedi | --localstated \
1018 | --localstate | --localstat | --localsta | --localst | --locals)
1019 ac_prev=localstatedir ;;
1020 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1021 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1022 localstatedir=$ac_optarg ;;
1023
1024 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1025 ac_prev=mandir ;;
1026 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1027 mandir=$ac_optarg ;;
1028
1029 -nfp | --nfp | --nf)
1030 # Obsolete; use --without-fp.
1031 with_fp=no ;;
1032
1033 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1034 | --no-cr | --no-c | -n)
1035 no_create=yes ;;
1036
1037 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1038 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1039 no_recursion=yes ;;
1040
1041 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1042 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1043 | --oldin | --oldi | --old | --ol | --o)
1044 ac_prev=oldincludedir ;;
1045 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1046 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1047 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1048 oldincludedir=$ac_optarg ;;
1049
1050 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1051 ac_prev=prefix ;;
1052 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1053 prefix=$ac_optarg ;;
1054
1055 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1056 | --program-pre | --program-pr | --program-p)
1057 ac_prev=program_prefix ;;
1058 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1059 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1060 program_prefix=$ac_optarg ;;
1061
1062 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1063 | --program-suf | --program-su | --program-s)
1064 ac_prev=program_suffix ;;
1065 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1066 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1067 program_suffix=$ac_optarg ;;
1068
1069 -program-transform-name | --program-transform-name \
1070 | --program-transform-nam | --program-transform-na \
1071 | --program-transform-n | --program-transform- \
1072 | --program-transform | --program-transfor \
1073 | --program-transfo | --program-transf \
1074 | --program-trans | --program-tran \
1075 | --progr-tra | --program-tr | --program-t)
1076 ac_prev=program_transform_name ;;
1077 -program-transform-name=* | --program-transform-name=* \
1078 | --program-transform-nam=* | --program-transform-na=* \
1079 | --program-transform-n=* | --program-transform-=* \
1080 | --program-transform=* | --program-transfor=* \
1081 | --program-transfo=* | --program-transf=* \
1082 | --program-trans=* | --program-tran=* \
1083 | --progr-tra=* | --program-tr=* | --program-t=*)
1084 program_transform_name=$ac_optarg ;;
1085
1086 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1087 ac_prev=pdfdir ;;
1088 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1089 pdfdir=$ac_optarg ;;
1090
1091 -psdir | --psdir | --psdi | --psd | --ps)
1092 ac_prev=psdir ;;
1093 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1094 psdir=$ac_optarg ;;
1095
1096 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1097 | -silent | --silent | --silen | --sile | --sil)
1098 silent=yes ;;
1099
1100 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1101 ac_prev=sbindir ;;
1102 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1103 | --sbi=* | --sb=*)
1104 sbindir=$ac_optarg ;;
1105
1106 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1107 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1108 | --sharedst | --shareds | --shared | --share | --shar \
1109 | --sha | --sh)
1110 ac_prev=sharedstatedir ;;
1111 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1112 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1113 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1114 | --sha=* | --sh=*)
1115 sharedstatedir=$ac_optarg ;;
1116
1117 -site | --site | --sit)
1118 ac_prev=site ;;
1119 -site=* | --site=* | --sit=*)
1120 site=$ac_optarg ;;
1121
1122 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1123 ac_prev=srcdir ;;
1124 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1125 srcdir=$ac_optarg ;;
1126
1127 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1128 | --syscon | --sysco | --sysc | --sys | --sy)
1129 ac_prev=sysconfdir ;;
1130 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1131 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1132 sysconfdir=$ac_optarg ;;
1133
1134 -target | --target | --targe | --targ | --tar | --ta | --t)
1135 ac_prev=target_alias ;;
1136 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1137 target_alias=$ac_optarg ;;
1138
1139 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1140 verbose=yes ;;
1141
1142 -version | --version | --versio | --versi | --vers | -V)
1143 ac_init_version=: ;;
1144
1145 -with-* | --with-*)
1146 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1147 # Reject names that are not valid shell variable names.
1148 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1149 as_fn_error $? "invalid package name: $ac_useropt"
1150 ac_useropt_orig=$ac_useropt
1151 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1152 case $ac_user_opts in
1153 *"
1154"with_$ac_useropt"
1155"*) ;;
1156 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1157 ac_unrecognized_sep=', ';;
1158 esac
1159 eval with_$ac_useropt=\$ac_optarg ;;
1160
1161 -without-* | --without-*)
1162 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1163 # Reject names that are not valid shell variable names.
1164 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1165 as_fn_error $? "invalid package name: $ac_useropt"
1166 ac_useropt_orig=$ac_useropt
1167 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1168 case $ac_user_opts in
1169 *"
1170"with_$ac_useropt"
1171"*) ;;
1172 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1173 ac_unrecognized_sep=', ';;
1174 esac
1175 eval with_$ac_useropt=no ;;
1176
1177 --x)
1178 # Obsolete; use --with-x.
1179 with_x=yes ;;
1180
1181 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1182 | --x-incl | --x-inc | --x-in | --x-i)
1183 ac_prev=x_includes ;;
1184 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1185 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1186 x_includes=$ac_optarg ;;
1187
1188 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1189 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1190 ac_prev=x_libraries ;;
1191 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1192 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1193 x_libraries=$ac_optarg ;;
1194
1195 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1196Try \`$0 --help' for more information"
1197 ;;
1198
1199 *=*)
1200 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1201 # Reject names that are not valid shell variable names.
1202 case $ac_envvar in #(
1203 '' | [0-9]* | *[!_$as_cr_alnum]* )
1204 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1205 esac
1206 eval $ac_envvar=\$ac_optarg
1207 export $ac_envvar ;;
1208
1209 *)
1210 # FIXME: should be removed in autoconf 3.0.
1211 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1212 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1213 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1214 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1215 ;;
1216
1217 esac
1218done
1219
1220if test -n "$ac_prev"; then
1221 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1222 as_fn_error $? "missing argument to $ac_option"
1223fi
1224
1225if test -n "$ac_unrecognized_opts"; then
1226 case $enable_option_checking in
1227 no) ;;
1228 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1229 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1230 esac
1231fi
1232
1233# Check all directory arguments for consistency.
1234for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1235 datadir sysconfdir sharedstatedir localstatedir includedir \
1236 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1237 libdir localedir mandir
1238do
1239 eval ac_val=\$$ac_var
1240 # Remove trailing slashes.
1241 case $ac_val in
1242 */ )
1243 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1244 eval $ac_var=\$ac_val;;
1245 esac
1246 # Be sure to have absolute directory names.
1247 case $ac_val in
1248 [\\/$]* | ?:[\\/]* ) continue;;
1249 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1250 esac
1251 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1252done
1253
1254# There might be people who depend on the old broken behavior: `$host'
1255# used to hold the argument of --host etc.
1256# FIXME: To remove some day.
1257build=$build_alias
1258host=$host_alias
1259target=$target_alias
1260
1261# FIXME: To remove some day.
1262if test "x$host_alias" != x; then
1263 if test "x$build_alias" = x; then
1264 cross_compiling=maybe
1265 elif test "x$build_alias" != "x$host_alias"; then
1266 cross_compiling=yes
1267 fi
1268fi
1269
1270ac_tool_prefix=
1271test -n "$host_alias" && ac_tool_prefix=$host_alias-
1272
1273test "$silent" = yes && exec 6>/dev/null
1274
1275
1276ac_pwd=`pwd` && test -n "$ac_pwd" &&
1277ac_ls_di=`ls -di .` &&
1278ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1279 as_fn_error $? "working directory cannot be determined"
1280test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1281 as_fn_error $? "pwd does not report name of working directory"
1282
1283
1284# Find the source files, if location was not specified.
1285if test -z "$srcdir"; then
1286 ac_srcdir_defaulted=yes
1287 # Try the directory containing this script, then the parent directory.
1288 ac_confdir=`$as_dirname -- "$as_myself" ||
1289$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1290 X"$as_myself" : 'X\(//\)[^/]' \| \
1291 X"$as_myself" : 'X\(//\)$' \| \
1292 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1293$as_echo X"$as_myself" |
1294 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1295 s//\1/
1296 q
1297 }
1298 /^X\(\/\/\)[^/].*/{
1299 s//\1/
1300 q
1301 }
1302 /^X\(\/\/\)$/{
1303 s//\1/
1304 q
1305 }
1306 /^X\(\/\).*/{
1307 s//\1/
1308 q
1309 }
1310 s/.*/./; q'`
1311 srcdir=$ac_confdir
1312 if test ! -r "$srcdir/$ac_unique_file"; then
1313 srcdir=..
1314 fi
1315else
1316 ac_srcdir_defaulted=no
1317fi
1318if test ! -r "$srcdir/$ac_unique_file"; then
1319 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1320 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1321fi
1322ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1323ac_abs_confdir=`(
1324 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1325 pwd)`
1326# When building in place, set srcdir=.
1327if test "$ac_abs_confdir" = "$ac_pwd"; then
1328 srcdir=.
1329fi
1330# Remove unnecessary trailing slashes from srcdir.
1331# Double slashes in file names in object file debugging info
1332# mess up M-x gdb in Emacs.
1333case $srcdir in
1334*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1335esac
1336for ac_var in $ac_precious_vars; do
1337 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1338 eval ac_env_${ac_var}_value=\$${ac_var}
1339 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1340 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1341done
1342
1343#
1344# Report the --help message.
1345#
1346if test "$ac_init_help" = "long"; then
1347 # Omit some internal or obsolete options to make the list less imposing.
1348 # This message is too long to be a string in the A/UX 3.1 sh.
1349 cat <<_ACEOF
1350\`configure' configures OpenSSH Portable to adapt to many kinds of systems.
1351
1352Usage: $0 [OPTION]... [VAR=VALUE]...
1353
1354To assign environment variables (e.g., CC, CFLAGS...), specify them as
1355VAR=VALUE. See below for descriptions of some of the useful variables.
1356
1357Defaults for the options are specified in brackets.
1358
1359Configuration:
1360 -h, --help display this help and exit
1361 --help=short display options specific to this package
1362 --help=recursive display the short help of all the included packages
1363 -V, --version display version information and exit
1364 -q, --quiet, --silent do not print \`checking ...' messages
1365 --cache-file=FILE cache test results in FILE [disabled]
1366 -C, --config-cache alias for \`--cache-file=config.cache'
1367 -n, --no-create do not create output files
1368 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1369
1370Installation directories:
1371 --prefix=PREFIX install architecture-independent files in PREFIX
1372 [$ac_default_prefix]
1373 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1374 [PREFIX]
1375
1376By default, \`make install' will install all the files in
1377\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1378an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1379for instance \`--prefix=\$HOME'.
1380
1381For better control, use the options below.
1382
1383Fine tuning of the installation directories:
1384 --bindir=DIR user executables [EPREFIX/bin]
1385 --sbindir=DIR system admin executables [EPREFIX/sbin]
1386 --libexecdir=DIR program executables [EPREFIX/libexec]
1387 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1388 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1389 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1390 --libdir=DIR object code libraries [EPREFIX/lib]
1391 --includedir=DIR C header files [PREFIX/include]
1392 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1393 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1394 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1395 --infodir=DIR info documentation [DATAROOTDIR/info]
1396 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1397 --mandir=DIR man documentation [DATAROOTDIR/man]
1398 --docdir=DIR documentation root [DATAROOTDIR/doc/openssh]
1399 --htmldir=DIR html documentation [DOCDIR]
1400 --dvidir=DIR dvi documentation [DOCDIR]
1401 --pdfdir=DIR pdf documentation [DOCDIR]
1402 --psdir=DIR ps documentation [DOCDIR]
1403_ACEOF
1404
1405 cat <<\_ACEOF
1406
1407System types:
1408 --build=BUILD configure for building on BUILD [guessed]
1409 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1410_ACEOF
1411fi
1412
1413if test -n "$ac_init_help"; then
1414 case $ac_init_help in
1415 short | recursive ) echo "Configuration of OpenSSH Portable:";;
1416 esac
1417 cat <<\_ACEOF
1418
1419Optional Features:
1420 --disable-option-checking ignore unrecognized --enable/--with options
1421 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1422 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1423 --disable-largefile omit support for large files
1424 --disable-pkcs11 disable PKCS#11 support code [no]
1425 --disable-security-key disable U2F/FIDO support code no
1426 --disable-strip Disable calling strip(1) on install
1427 --disable-etc-default-login Disable using PATH from /etc/default/login no
1428 --disable-lastlog disable use of lastlog even if detected no
1429 --disable-utmp disable use of utmp even if detected no
1430 --disable-utmpx disable use of utmpx even if detected no
1431 --disable-wtmp disable use of wtmp even if detected no
1432 --disable-wtmpx disable use of wtmpx even if detected no
1433 --disable-libutil disable use of libutil (login() etc.) no
1434 --disable-pututline disable use of pututline() etc. (uwtmp) no
1435 --disable-pututxline disable use of pututxline() etc. (uwtmpx) no
1436
1437Optional Packages:
1438 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1439 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1440 --without-openssl Disable use of OpenSSL; use only limited internal crypto **EXPERIMENTAL**
1441 --without-stackprotect Don't use compiler's stack protection
1442 --without-hardening Don't use toolchain hardening flags
1443 --without-rpath Disable auto-added -R linker paths
1444 --with-cflags Specify additional flags to pass to compiler
1445 --with-cflags-after Specify additional flags to pass to compiler after configure
1446 --with-cppflags Specify additional flags to pass to preprocessor
1447 --with-ldflags Specify additional flags to pass to linker
1448 --with-ldflags-after Specify additional flags to pass to linker after configure
1449 --with-libs Specify additional libraries to link with
1450 --with-Werror Build main code with -Werror
1451 --with-solaris-contracts Enable Solaris process contracts (experimental)
1452 --with-solaris-projects Enable Solaris projects (experimental)
1453 --with-solaris-privs Enable Solaris/Illumos privileges (experimental)
1454 --with-osfsia Enable Digital Unix SIA
1455 --with-zlib=PATH Use zlib in PATH
1456 --without-zlib-version-check Disable zlib version check
1457 --with-ldns[=PATH] Use ldns for DNSSEC support (optionally in PATH)
1458 --with-libedit[=PATH] Enable libedit support for sftp
1459 --with-audit=module Enable audit support (modules=debug,bsm,linux)
1460 --with-pie Build Position Independent Executables if possible
1461 --with-security-key-builtin include builtin U2F/FIDO support
1462 --with-ssl-dir=PATH Specify path to OpenSSL installation
1463 --without-openssl-header-check Disable OpenSSL version consistency check
1464 --with-ssl-engine Enable OpenSSL (hardware) ENGINE support
1465 --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT
1466 --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)
1467 --with-pam Enable PAM support
1468 --with-pam-service=name Specify PAM service name
1469 --with-privsep-user=user Specify non-privileged user for privilege separation
1470 --with-sandbox=style Specify privilege separation sandbox (no, capsicum, darwin, rlimit, seccomp_filter, systrace, pledge)
1471 --with-selinux Enable SELinux support
1472 --with-kerberos5=PATH Enable Kerberos 5 support
1473 --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)
1474 --with-xauth=PATH Specify path to xauth program
1475 --with-maildir=/path/to/mail Specify your system mail directory
1476 --with-mantype=man|cat|doc Set man page type
1477 --with-md5-passwords Enable use of MD5 passwords
1478 --without-shadow Disable shadow password support
1479 --with-ipaddr-display Use ip address instead of hostname in $DISPLAY
1480 --with-default-path= Specify default $PATH environment for server
1481 --with-superuser-path= Specify different path for super-user
1482 --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses
1483 --with-bsd-auth Enable BSD auth support
1484 --with-pid-dir=PATH Specify location of sshd.pid file
1485 --with-lastlog=FILE|DIR specify lastlog location common locations
1486
1487Some influential environment variables:
1488 CC C compiler command
1489 CFLAGS C compiler flags
1490 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1491 nonstandard directory <lib dir>
1492 LIBS libraries to pass to the linker, e.g. -l<library>
1493 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1494 you have headers in a nonstandard directory <include dir>
1495 CPP C preprocessor
1496
1497Use these variables to override the choices made by `configure' or to help
1498it to find libraries and programs with nonstandard names/locations.
1499
1500Report bugs to <openssh-unix-dev@mindrot.org>.
1501_ACEOF
1502ac_status=$?
1503fi
1504
1505if test "$ac_init_help" = "recursive"; then
1506 # If there are subdirs, report their specific --help.
1507 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1508 test -d "$ac_dir" ||
1509 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1510 continue
1511 ac_builddir=.
1512
1513case "$ac_dir" in
1514.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1515*)
1516 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1517 # A ".." for each directory in $ac_dir_suffix.
1518 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1519 case $ac_top_builddir_sub in
1520 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1521 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1522 esac ;;
1523esac
1524ac_abs_top_builddir=$ac_pwd
1525ac_abs_builddir=$ac_pwd$ac_dir_suffix
1526# for backward compatibility:
1527ac_top_builddir=$ac_top_build_prefix
1528
1529case $srcdir in
1530 .) # We are building in place.
1531 ac_srcdir=.
1532 ac_top_srcdir=$ac_top_builddir_sub
1533 ac_abs_top_srcdir=$ac_pwd ;;
1534 [\\/]* | ?:[\\/]* ) # Absolute name.
1535 ac_srcdir=$srcdir$ac_dir_suffix;
1536 ac_top_srcdir=$srcdir
1537 ac_abs_top_srcdir=$srcdir ;;
1538 *) # Relative name.
1539 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1540 ac_top_srcdir=$ac_top_build_prefix$srcdir
1541 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1542esac
1543ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1544
1545 cd "$ac_dir" || { ac_status=$?; continue; }
1546 # Check for guested configure.
1547 if test -f "$ac_srcdir/configure.gnu"; then
1548 echo &&
1549 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1550 elif test -f "$ac_srcdir/configure"; then
1551 echo &&
1552 $SHELL "$ac_srcdir/configure" --help=recursive
1553 else
1554 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1555 fi || ac_status=$?
1556 cd "$ac_pwd" || { ac_status=$?; break; }
1557 done
1558fi
1559
1560test -n "$ac_init_help" && exit $ac_status
1561if $ac_init_version; then
1562 cat <<\_ACEOF
1563OpenSSH configure Portable
1564generated by GNU Autoconf 2.69
1565
1566Copyright (C) 2012 Free Software Foundation, Inc.
1567This configure script is free software; the Free Software Foundation
1568gives unlimited permission to copy, distribute and modify it.
1569_ACEOF
1570 exit
1571fi
1572
1573## ------------------------ ##
1574## Autoconf initialization. ##
1575## ------------------------ ##
1576
1577# ac_fn_c_try_compile LINENO
1578# --------------------------
1579# Try to compile conftest.$ac_ext, and return whether this succeeded.
1580ac_fn_c_try_compile ()
1581{
1582 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1583 rm -f conftest.$ac_objext
1584 if { { ac_try="$ac_compile"
1585case "(($ac_try" in
1586 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1587 *) ac_try_echo=$ac_try;;
1588esac
1589eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1590$as_echo "$ac_try_echo"; } >&5
1591 (eval "$ac_compile") 2>conftest.err
1592 ac_status=$?
1593 if test -s conftest.err; then
1594 grep -v '^ *+' conftest.err >conftest.er1
1595 cat conftest.er1 >&5
1596 mv -f conftest.er1 conftest.err
1597 fi
1598 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1599 test $ac_status = 0; } && {
1600 test -z "$ac_c_werror_flag" ||
1601 test ! -s conftest.err
1602 } && test -s conftest.$ac_objext; then :
1603 ac_retval=0
1604else
1605 $as_echo "$as_me: failed program was:" >&5
1606sed 's/^/| /' conftest.$ac_ext >&5
1607
1608 ac_retval=1
1609fi
1610 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1611 as_fn_set_status $ac_retval
1612
1613} # ac_fn_c_try_compile
1614
1615# ac_fn_c_try_run LINENO
1616# ----------------------
1617# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1618# that executables *can* be run.
1619ac_fn_c_try_run ()
1620{
1621 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1622 if { { ac_try="$ac_link"
1623case "(($ac_try" in
1624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1625 *) ac_try_echo=$ac_try;;
1626esac
1627eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1628$as_echo "$ac_try_echo"; } >&5
1629 (eval "$ac_link") 2>&5
1630 ac_status=$?
1631 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1632 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1633 { { case "(($ac_try" in
1634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1635 *) ac_try_echo=$ac_try;;
1636esac
1637eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1638$as_echo "$ac_try_echo"; } >&5
1639 (eval "$ac_try") 2>&5
1640 ac_status=$?
1641 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1642 test $ac_status = 0; }; }; then :
1643 ac_retval=0
1644else
1645 $as_echo "$as_me: program exited with status $ac_status" >&5
1646 $as_echo "$as_me: failed program was:" >&5
1647sed 's/^/| /' conftest.$ac_ext >&5
1648
1649 ac_retval=$ac_status
1650fi
1651 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1652 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1653 as_fn_set_status $ac_retval
1654
1655} # ac_fn_c_try_run
1656
1657# ac_fn_c_try_cpp LINENO
1658# ----------------------
1659# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1660ac_fn_c_try_cpp ()
1661{
1662 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1663 if { { ac_try="$ac_cpp conftest.$ac_ext"
1664case "(($ac_try" in
1665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1666 *) ac_try_echo=$ac_try;;
1667esac
1668eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1669$as_echo "$ac_try_echo"; } >&5
1670 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1671 ac_status=$?
1672 if test -s conftest.err; then
1673 grep -v '^ *+' conftest.err >conftest.er1
1674 cat conftest.er1 >&5
1675 mv -f conftest.er1 conftest.err
1676 fi
1677 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1678 test $ac_status = 0; } > conftest.i && {
1679 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1680 test ! -s conftest.err
1681 }; then :
1682 ac_retval=0
1683else
1684 $as_echo "$as_me: failed program was:" >&5
1685sed 's/^/| /' conftest.$ac_ext >&5
1686
1687 ac_retval=1
1688fi
1689 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1690 as_fn_set_status $ac_retval
1691
1692} # ac_fn_c_try_cpp
1693
1694# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1695# -------------------------------------------------------
1696# Tests whether HEADER exists and can be compiled using the include files in
1697# INCLUDES, setting the cache variable VAR accordingly.
1698ac_fn_c_check_header_compile ()
1699{
1700 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1701 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1702$as_echo_n "checking for $2... " >&6; }
1703if eval \${$3+:} false; then :
1704 $as_echo_n "(cached) " >&6
1705else
1706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1707/* end confdefs.h. */
1708$4
1709#include <$2>
1710_ACEOF
1711if ac_fn_c_try_compile "$LINENO"; then :
1712 eval "$3=yes"
1713else
1714 eval "$3=no"
1715fi
1716rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1717fi
1718eval ac_res=\$$3
1719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1720$as_echo "$ac_res" >&6; }
1721 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1722
1723} # ac_fn_c_check_header_compile
1724
1725# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1726# ---------------------------------------------
1727# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1728# accordingly.
1729ac_fn_c_check_decl ()
1730{
1731 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1732 as_decl_name=`echo $2|sed 's/ *(.*//'`
1733 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1735$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1736if eval \${$3+:} false; then :
1737 $as_echo_n "(cached) " >&6
1738else
1739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1740/* end confdefs.h. */
1741$4
1742int
1743main ()
1744{
1745#ifndef $as_decl_name
1746#ifdef __cplusplus
1747 (void) $as_decl_use;
1748#else
1749 (void) $as_decl_name;
1750#endif
1751#endif
1752
1753 ;
1754 return 0;
1755}
1756_ACEOF
1757if ac_fn_c_try_compile "$LINENO"; then :
1758 eval "$3=yes"
1759else
1760 eval "$3=no"
1761fi
1762rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1763fi
1764eval ac_res=\$$3
1765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1766$as_echo "$ac_res" >&6; }
1767 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1768
1769} # ac_fn_c_check_decl
1770
1771# ac_fn_c_try_link LINENO
1772# -----------------------
1773# Try to link conftest.$ac_ext, and return whether this succeeded.
1774ac_fn_c_try_link ()
1775{
1776 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1777 rm -f conftest.$ac_objext conftest$ac_exeext
1778 if { { ac_try="$ac_link"
1779case "(($ac_try" in
1780 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1781 *) ac_try_echo=$ac_try;;
1782esac
1783eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1784$as_echo "$ac_try_echo"; } >&5
1785 (eval "$ac_link") 2>conftest.err
1786 ac_status=$?
1787 if test -s conftest.err; then
1788 grep -v '^ *+' conftest.err >conftest.er1
1789 cat conftest.er1 >&5
1790 mv -f conftest.er1 conftest.err
1791 fi
1792 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1793 test $ac_status = 0; } && {
1794 test -z "$ac_c_werror_flag" ||
1795 test ! -s conftest.err
1796 } && test -s conftest$ac_exeext && {
1797 test "$cross_compiling" = yes ||
1798 test -x conftest$ac_exeext
1799 }; then :
1800 ac_retval=0
1801else
1802 $as_echo "$as_me: failed program was:" >&5
1803sed 's/^/| /' conftest.$ac_ext >&5
1804
1805 ac_retval=1
1806fi
1807 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1808 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1809 # interfere with the next link command; also delete a directory that is
1810 # left behind by Apple's compiler. We do this before executing the actions.
1811 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1812 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1813 as_fn_set_status $ac_retval
1814
1815} # ac_fn_c_try_link
1816
1817# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1818# -------------------------------------------------------
1819# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1820# the include files in INCLUDES and setting the cache variable VAR
1821# accordingly.
1822ac_fn_c_check_header_mongrel ()
1823{
1824 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1825 if eval \${$3+:} false; then :
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1827$as_echo_n "checking for $2... " >&6; }
1828if eval \${$3+:} false; then :
1829 $as_echo_n "(cached) " >&6
1830fi
1831eval ac_res=\$$3
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1833$as_echo "$ac_res" >&6; }
1834else
1835 # Is the header compilable?
1836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1837$as_echo_n "checking $2 usability... " >&6; }
1838cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1839/* end confdefs.h. */
1840$4
1841#include <$2>
1842_ACEOF
1843if ac_fn_c_try_compile "$LINENO"; then :
1844 ac_header_compiler=yes
1845else
1846 ac_header_compiler=no
1847fi
1848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1850$as_echo "$ac_header_compiler" >&6; }
1851
1852# Is the header present?
1853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1854$as_echo_n "checking $2 presence... " >&6; }
1855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1856/* end confdefs.h. */
1857#include <$2>
1858_ACEOF
1859if ac_fn_c_try_cpp "$LINENO"; then :
1860 ac_header_preproc=yes
1861else
1862 ac_header_preproc=no
1863fi
1864rm -f conftest.err conftest.i conftest.$ac_ext
1865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1866$as_echo "$ac_header_preproc" >&6; }
1867
1868# So? What about this header?
1869case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1870 yes:no: )
1871 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1872$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1873 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1874$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1875 ;;
1876 no:yes:* )
1877 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1878$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1879 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1880$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1881 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1882$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1883 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1884$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1885 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1886$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1887( $as_echo "## ------------------------------------------- ##
1888## Report this to openssh-unix-dev@mindrot.org ##
1889## ------------------------------------------- ##"
1890 ) | sed "s/^/$as_me: WARNING: /" >&2
1891 ;;
1892esac
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1894$as_echo_n "checking for $2... " >&6; }
1895if eval \${$3+:} false; then :
1896 $as_echo_n "(cached) " >&6
1897else
1898 eval "$3=\$ac_header_compiler"
1899fi
1900eval ac_res=\$$3
1901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1902$as_echo "$ac_res" >&6; }
1903fi
1904 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1905
1906} # ac_fn_c_check_header_mongrel
1907
1908# ac_fn_c_check_func LINENO FUNC VAR
1909# ----------------------------------
1910# Tests whether FUNC exists, setting the cache variable VAR accordingly
1911ac_fn_c_check_func ()
1912{
1913 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1915$as_echo_n "checking for $2... " >&6; }
1916if eval \${$3+:} false; then :
1917 $as_echo_n "(cached) " >&6
1918else
1919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1920/* end confdefs.h. */
1921/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1922 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1923#define $2 innocuous_$2
1924
1925/* System header to define __stub macros and hopefully few prototypes,
1926 which can conflict with char $2 (); below.
1927 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1928 <limits.h> exists even on freestanding compilers. */
1929
1930#ifdef __STDC__
1931# include <limits.h>
1932#else
1933# include <assert.h>
1934#endif
1935
1936#undef $2
1937
1938/* Override any GCC internal prototype to avoid an error.
1939 Use char because int might match the return type of a GCC
1940 builtin and then its argument prototype would still apply. */
1941#ifdef __cplusplus
1942extern "C"
1943#endif
1944char $2 ();
1945/* The GNU C library defines this for functions which it implements
1946 to always fail with ENOSYS. Some functions are actually named
1947 something starting with __ and the normal name is an alias. */
1948#if defined __stub_$2 || defined __stub___$2
1949choke me
1950#endif
1951
1952int
1953main ()
1954{
1955return $2 ();
1956 ;
1957 return 0;
1958}
1959_ACEOF
1960if ac_fn_c_try_link "$LINENO"; then :
1961 eval "$3=yes"
1962else
1963 eval "$3=no"
1964fi
1965rm -f core conftest.err conftest.$ac_objext \
1966 conftest$ac_exeext conftest.$ac_ext
1967fi
1968eval ac_res=\$$3
1969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1970$as_echo "$ac_res" >&6; }
1971 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1972
1973} # ac_fn_c_check_func
1974
1975# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1976# -------------------------------------------
1977# Tests whether TYPE exists after having included INCLUDES, setting cache
1978# variable VAR accordingly.
1979ac_fn_c_check_type ()
1980{
1981 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1983$as_echo_n "checking for $2... " >&6; }
1984if eval \${$3+:} false; then :
1985 $as_echo_n "(cached) " >&6
1986else
1987 eval "$3=no"
1988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1989/* end confdefs.h. */
1990$4
1991int
1992main ()
1993{
1994if (sizeof ($2))
1995 return 0;
1996 ;
1997 return 0;
1998}
1999_ACEOF
2000if ac_fn_c_try_compile "$LINENO"; then :
2001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2002/* end confdefs.h. */
2003$4
2004int
2005main ()
2006{
2007if (sizeof (($2)))
2008 return 0;
2009 ;
2010 return 0;
2011}
2012_ACEOF
2013if ac_fn_c_try_compile "$LINENO"; then :
2014
2015else
2016 eval "$3=yes"
2017fi
2018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2019fi
2020rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2021fi
2022eval ac_res=\$$3
2023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2024$as_echo "$ac_res" >&6; }
2025 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2026
2027} # ac_fn_c_check_type
2028
2029# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2030# --------------------------------------------
2031# Tries to find the compile-time value of EXPR in a program that includes
2032# INCLUDES, setting VAR accordingly. Returns whether the value could be
2033# computed
2034ac_fn_c_compute_int ()
2035{
2036 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2037 if test "$cross_compiling" = yes; then
2038 # Depending upon the size, compute the lo and hi bounds.
2039cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040/* end confdefs.h. */
2041$4
2042int
2043main ()
2044{
2045static int test_array [1 - 2 * !(($2) >= 0)];
2046test_array [0] = 0;
2047return test_array [0];
2048
2049 ;
2050 return 0;
2051}
2052_ACEOF
2053if ac_fn_c_try_compile "$LINENO"; then :
2054 ac_lo=0 ac_mid=0
2055 while :; do
2056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2057/* end confdefs.h. */
2058$4
2059int
2060main ()
2061{
2062static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2063test_array [0] = 0;
2064return test_array [0];
2065
2066 ;
2067 return 0;
2068}
2069_ACEOF
2070if ac_fn_c_try_compile "$LINENO"; then :
2071 ac_hi=$ac_mid; break
2072else
2073 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2074 if test $ac_lo -le $ac_mid; then
2075 ac_lo= ac_hi=
2076 break
2077 fi
2078 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2079fi
2080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2081 done
2082else
2083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2084/* end confdefs.h. */
2085$4
2086int
2087main ()
2088{
2089static int test_array [1 - 2 * !(($2) < 0)];
2090test_array [0] = 0;
2091return test_array [0];
2092
2093 ;
2094 return 0;
2095}
2096_ACEOF
2097if ac_fn_c_try_compile "$LINENO"; then :
2098 ac_hi=-1 ac_mid=-1
2099 while :; do
2100 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2101/* end confdefs.h. */
2102$4
2103int
2104main ()
2105{
2106static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2107test_array [0] = 0;
2108return test_array [0];
2109
2110 ;
2111 return 0;
2112}
2113_ACEOF
2114if ac_fn_c_try_compile "$LINENO"; then :
2115 ac_lo=$ac_mid; break
2116else
2117 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2118 if test $ac_mid -le $ac_hi; then
2119 ac_lo= ac_hi=
2120 break
2121 fi
2122 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2123fi
2124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2125 done
2126else
2127 ac_lo= ac_hi=
2128fi
2129rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2130fi
2131rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2132# Binary search between lo and hi bounds.
2133while test "x$ac_lo" != "x$ac_hi"; do
2134 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2135 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2136/* end confdefs.h. */
2137$4
2138int
2139main ()
2140{
2141static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2142test_array [0] = 0;
2143return test_array [0];
2144
2145 ;
2146 return 0;
2147}
2148_ACEOF
2149if ac_fn_c_try_compile "$LINENO"; then :
2150 ac_hi=$ac_mid
2151else
2152 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2153fi
2154rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2155done
2156case $ac_lo in #((
2157?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2158'') ac_retval=1 ;;
2159esac
2160 else
2161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2162/* end confdefs.h. */
2163$4
2164static long int longval () { return $2; }
2165static unsigned long int ulongval () { return $2; }
2166#include <stdio.h>
2167#include <stdlib.h>
2168int
2169main ()
2170{
2171
2172 FILE *f = fopen ("conftest.val", "w");
2173 if (! f)
2174 return 1;
2175 if (($2) < 0)
2176 {
2177 long int i = longval ();
2178 if (i != ($2))
2179 return 1;
2180 fprintf (f, "%ld", i);
2181 }
2182 else
2183 {
2184 unsigned long int i = ulongval ();
2185 if (i != ($2))
2186 return 1;
2187 fprintf (f, "%lu", i);
2188 }
2189 /* Do not output a trailing newline, as this causes \r\n confusion
2190 on some platforms. */
2191 return ferror (f) || fclose (f) != 0;
2192
2193 ;
2194 return 0;
2195}
2196_ACEOF
2197if ac_fn_c_try_run "$LINENO"; then :
2198 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2199else
2200 ac_retval=1
2201fi
2202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2203 conftest.$ac_objext conftest.beam conftest.$ac_ext
2204rm -f conftest.val
2205
2206 fi
2207 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2208 as_fn_set_status $ac_retval
2209
2210} # ac_fn_c_compute_int
2211
2212# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2213# ----------------------------------------------------
2214# Tries to find if the field MEMBER exists in type AGGR, after including
2215# INCLUDES, setting cache variable VAR accordingly.
2216ac_fn_c_check_member ()
2217{
2218 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2220$as_echo_n "checking for $2.$3... " >&6; }
2221if eval \${$4+:} false; then :
2222 $as_echo_n "(cached) " >&6
2223else
2224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2225/* end confdefs.h. */
2226$5
2227int
2228main ()
2229{
2230static $2 ac_aggr;
2231if (ac_aggr.$3)
2232return 0;
2233 ;
2234 return 0;
2235}
2236_ACEOF
2237if ac_fn_c_try_compile "$LINENO"; then :
2238 eval "$4=yes"
2239else
2240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2241/* end confdefs.h. */
2242$5
2243int
2244main ()
2245{
2246static $2 ac_aggr;
2247if (sizeof ac_aggr.$3)
2248return 0;
2249 ;
2250 return 0;
2251}
2252_ACEOF
2253if ac_fn_c_try_compile "$LINENO"; then :
2254 eval "$4=yes"
2255else
2256 eval "$4=no"
2257fi
2258rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2259fi
2260rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2261fi
2262eval ac_res=\$$4
2263 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2264$as_echo "$ac_res" >&6; }
2265 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2266
2267} # ac_fn_c_check_member
2268cat >config.log <<_ACEOF
2269This file contains any messages produced by compilers while
2270running configure, to aid debugging if configure makes a mistake.
2271
2272It was created by OpenSSH $as_me Portable, which was
2273generated by GNU Autoconf 2.69. Invocation command line was
2274
2275 $ $0 $@
2276
2277_ACEOF
2278exec 5>>config.log
2279{
2280cat <<_ASUNAME
2281## --------- ##
2282## Platform. ##
2283## --------- ##
2284
2285hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2286uname -m = `(uname -m) 2>/dev/null || echo unknown`
2287uname -r = `(uname -r) 2>/dev/null || echo unknown`
2288uname -s = `(uname -s) 2>/dev/null || echo unknown`
2289uname -v = `(uname -v) 2>/dev/null || echo unknown`
2290
2291/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2292/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2293
2294/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2295/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2296/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2297/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2298/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2299/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2300/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2301
2302_ASUNAME
2303
2304as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2305for as_dir in $PATH
2306do
2307 IFS=$as_save_IFS
2308 test -z "$as_dir" && as_dir=.
2309 $as_echo "PATH: $as_dir"
2310 done
2311IFS=$as_save_IFS
2312
2313} >&5
2314
2315cat >&5 <<_ACEOF
2316
2317
2318## ----------- ##
2319## Core tests. ##
2320## ----------- ##
2321
2322_ACEOF
2323
2324
2325# Keep a trace of the command line.
2326# Strip out --no-create and --no-recursion so they do not pile up.
2327# Strip out --silent because we don't want to record it for future runs.
2328# Also quote any args containing shell meta-characters.
2329# Make two passes to allow for proper duplicate-argument suppression.
2330ac_configure_args=
2331ac_configure_args0=
2332ac_configure_args1=
2333ac_must_keep_next=false
2334for ac_pass in 1 2
2335do
2336 for ac_arg
2337 do
2338 case $ac_arg in
2339 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2340 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2341 | -silent | --silent | --silen | --sile | --sil)
2342 continue ;;
2343 *\'*)
2344 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2345 esac
2346 case $ac_pass in
2347 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2348 2)
2349 as_fn_append ac_configure_args1 " '$ac_arg'"
2350 if test $ac_must_keep_next = true; then
2351 ac_must_keep_next=false # Got value, back to normal.
2352 else
2353 case $ac_arg in
2354 *=* | --config-cache | -C | -disable-* | --disable-* \
2355 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2356 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2357 | -with-* | --with-* | -without-* | --without-* | --x)
2358 case "$ac_configure_args0 " in
2359 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2360 esac
2361 ;;
2362 -* ) ac_must_keep_next=true ;;
2363 esac
2364 fi
2365 as_fn_append ac_configure_args " '$ac_arg'"
2366 ;;
2367 esac
2368 done
2369done
2370{ ac_configure_args0=; unset ac_configure_args0;}
2371{ ac_configure_args1=; unset ac_configure_args1;}
2372
2373# When interrupted or exit'd, cleanup temporary files, and complete
2374# config.log. We remove comments because anyway the quotes in there
2375# would cause problems or look ugly.
2376# WARNING: Use '\'' to represent an apostrophe within the trap.
2377# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2378trap 'exit_status=$?
2379 # Save into config.log some information that might help in debugging.
2380 {
2381 echo
2382
2383 $as_echo "## ---------------- ##
2384## Cache variables. ##
2385## ---------------- ##"
2386 echo
2387 # The following way of writing the cache mishandles newlines in values,
2388(
2389 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2390 eval ac_val=\$$ac_var
2391 case $ac_val in #(
2392 *${as_nl}*)
2393 case $ac_var in #(
2394 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2395$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2396 esac
2397 case $ac_var in #(
2398 _ | IFS | as_nl) ;; #(
2399 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2400 *) { eval $ac_var=; unset $ac_var;} ;;
2401 esac ;;
2402 esac
2403 done
2404 (set) 2>&1 |
2405 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2406 *${as_nl}ac_space=\ *)
2407 sed -n \
2408 "s/'\''/'\''\\\\'\'''\''/g;
2409 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2410 ;; #(
2411 *)
2412 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2413 ;;
2414 esac |
2415 sort
2416)
2417 echo
2418
2419 $as_echo "## ----------------- ##
2420## Output variables. ##
2421## ----------------- ##"
2422 echo
2423 for ac_var in $ac_subst_vars
2424 do
2425 eval ac_val=\$$ac_var
2426 case $ac_val in
2427 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2428 esac
2429 $as_echo "$ac_var='\''$ac_val'\''"
2430 done | sort
2431 echo
2432
2433 if test -n "$ac_subst_files"; then
2434 $as_echo "## ------------------- ##
2435## File substitutions. ##
2436## ------------------- ##"
2437 echo
2438 for ac_var in $ac_subst_files
2439 do
2440 eval ac_val=\$$ac_var
2441 case $ac_val in
2442 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2443 esac
2444 $as_echo "$ac_var='\''$ac_val'\''"
2445 done | sort
2446 echo
2447 fi
2448
2449 if test -s confdefs.h; then
2450 $as_echo "## ----------- ##
2451## confdefs.h. ##
2452## ----------- ##"
2453 echo
2454 cat confdefs.h
2455 echo
2456 fi
2457 test "$ac_signal" != 0 &&
2458 $as_echo "$as_me: caught signal $ac_signal"
2459 $as_echo "$as_me: exit $exit_status"
2460 } >&5
2461 rm -f core *.core core.conftest.* &&
2462 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2463 exit $exit_status
2464' 0
2465for ac_signal in 1 2 13 15; do
2466 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2467done
2468ac_signal=0
2469
2470# confdefs.h avoids OS command line length limits that DEFS can exceed.
2471rm -f -r conftest* confdefs.h
2472
2473$as_echo "/* confdefs.h */" > confdefs.h
2474
2475# Predefined preprocessor variables.
2476
2477cat >>confdefs.h <<_ACEOF
2478#define PACKAGE_NAME "$PACKAGE_NAME"
2479_ACEOF
2480
2481cat >>confdefs.h <<_ACEOF
2482#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2483_ACEOF
2484
2485cat >>confdefs.h <<_ACEOF
2486#define PACKAGE_VERSION "$PACKAGE_VERSION"
2487_ACEOF
2488
2489cat >>confdefs.h <<_ACEOF
2490#define PACKAGE_STRING "$PACKAGE_STRING"
2491_ACEOF
2492
2493cat >>confdefs.h <<_ACEOF
2494#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2495_ACEOF
2496
2497cat >>confdefs.h <<_ACEOF
2498#define PACKAGE_URL "$PACKAGE_URL"
2499_ACEOF
2500
2501
2502# Let the site file select an alternate cache file if it wants to.
2503# Prefer an explicitly selected file to automatically selected ones.
2504ac_site_file1=NONE
2505ac_site_file2=NONE
2506if test -n "$CONFIG_SITE"; then
2507 # We do not want a PATH search for config.site.
2508 case $CONFIG_SITE in #((
2509 -*) ac_site_file1=./$CONFIG_SITE;;
2510 */*) ac_site_file1=$CONFIG_SITE;;
2511 *) ac_site_file1=./$CONFIG_SITE;;
2512 esac
2513elif test "x$prefix" != xNONE; then
2514 ac_site_file1=$prefix/share/config.site
2515 ac_site_file2=$prefix/etc/config.site
2516else
2517 ac_site_file1=$ac_default_prefix/share/config.site
2518 ac_site_file2=$ac_default_prefix/etc/config.site
2519fi
2520for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2521do
2522 test "x$ac_site_file" = xNONE && continue
2523 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2524 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2525$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2526 sed 's/^/| /' "$ac_site_file" >&5
2527 . "$ac_site_file" \
2528 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2529$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2530as_fn_error $? "failed to load site script $ac_site_file
2531See \`config.log' for more details" "$LINENO" 5; }
2532 fi
2533done
2534
2535if test -r "$cache_file"; then
2536 # Some versions of bash will fail to source /dev/null (special files
2537 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2538 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2539 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2540$as_echo "$as_me: loading cache $cache_file" >&6;}
2541 case $cache_file in
2542 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2543 *) . "./$cache_file";;
2544 esac
2545 fi
2546else
2547 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2548$as_echo "$as_me: creating cache $cache_file" >&6;}
2549 >$cache_file
2550fi
2551
2552# Check that the precious variables saved in the cache have kept the same
2553# value.
2554ac_cache_corrupted=false
2555for ac_var in $ac_precious_vars; do
2556 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2557 eval ac_new_set=\$ac_env_${ac_var}_set
2558 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2559 eval ac_new_val=\$ac_env_${ac_var}_value
2560 case $ac_old_set,$ac_new_set in
2561 set,)
2562 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2563$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2564 ac_cache_corrupted=: ;;
2565 ,set)
2566 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2567$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2568 ac_cache_corrupted=: ;;
2569 ,);;
2570 *)
2571 if test "x$ac_old_val" != "x$ac_new_val"; then
2572 # differences in whitespace do not lead to failure.
2573 ac_old_val_w=`echo x $ac_old_val`
2574 ac_new_val_w=`echo x $ac_new_val`
2575 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2576 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2577$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2578 ac_cache_corrupted=:
2579 else
2580 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2581$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2582 eval $ac_var=\$ac_old_val
2583 fi
2584 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2585$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2586 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2587$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2588 fi;;
2589 esac
2590 # Pass precious variables to config.status.
2591 if test "$ac_new_set" = set; then
2592 case $ac_new_val in
2593 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2594 *) ac_arg=$ac_var=$ac_new_val ;;
2595 esac
2596 case " $ac_configure_args " in
2597 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2598 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2599 esac
2600 fi
2601done
2602if $ac_cache_corrupted; then
2603 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2604$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2605 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2606$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2607 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2608fi
2609## -------------------- ##
2610## Main body of script. ##
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
2620
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
2627
2628
2629ac_config_headers="$ac_config_headers config.h"
2630
2631ac_ext=c
2632ac_cpp='$CPP $CPPFLAGS'
2633ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2634ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2635ac_compiler_gnu=$ac_cv_c_compiler_gnu
2636if test -n "$ac_tool_prefix"; then
2637 for ac_prog in cc gcc
2638 do
2639 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2640set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2642$as_echo_n "checking for $ac_word... " >&6; }
2643if ${ac_cv_prog_CC+:} false; then :
2644 $as_echo_n "(cached) " >&6
2645else
2646 if test -n "$CC"; then
2647 ac_cv_prog_CC="$CC" # Let the user override the test.
2648else
2649as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2650for as_dir in $PATH
2651do
2652 IFS=$as_save_IFS
2653 test -z "$as_dir" && as_dir=.
2654 for ac_exec_ext in '' $ac_executable_extensions; do
2655 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2656 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2657 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2658 break 2
2659 fi
2660done
2661 done
2662IFS=$as_save_IFS
2663
2664fi
2665fi
2666CC=$ac_cv_prog_CC
2667if test -n "$CC"; then
2668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2669$as_echo "$CC" >&6; }
2670else
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2672$as_echo "no" >&6; }
2673fi
2674
2675
2676 test -n "$CC" && break
2677 done
2678fi
2679if test -z "$CC"; then
2680 ac_ct_CC=$CC
2681 for ac_prog in cc gcc
2682do
2683 # Extract the first word of "$ac_prog", so it can be a program name with args.
2684set dummy $ac_prog; ac_word=$2
2685{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2686$as_echo_n "checking for $ac_word... " >&6; }
2687if ${ac_cv_prog_ac_ct_CC+:} false; then :
2688 $as_echo_n "(cached) " >&6
2689else
2690 if test -n "$ac_ct_CC"; then
2691 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2692else
2693as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2694for as_dir in $PATH
2695do
2696 IFS=$as_save_IFS
2697 test -z "$as_dir" && as_dir=.
2698 for ac_exec_ext in '' $ac_executable_extensions; do
2699 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2700 ac_cv_prog_ac_ct_CC="$ac_prog"
2701 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2702 break 2
2703 fi
2704done
2705 done
2706IFS=$as_save_IFS
2707
2708fi
2709fi
2710ac_ct_CC=$ac_cv_prog_ac_ct_CC
2711if test -n "$ac_ct_CC"; then
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2713$as_echo "$ac_ct_CC" >&6; }
2714else
2715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2716$as_echo "no" >&6; }
2717fi
2718
2719
2720 test -n "$ac_ct_CC" && break
2721done
2722
2723 if test "x$ac_ct_CC" = x; then
2724 CC=""
2725 else
2726 case $cross_compiling:$ac_tool_warned in
2727yes:)
2728{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2729$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2730ac_tool_warned=yes ;;
2731esac
2732 CC=$ac_ct_CC
2733 fi
2734fi
2735
2736
2737test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2738$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2739as_fn_error $? "no acceptable C compiler found in \$PATH
2740See \`config.log' for more details" "$LINENO" 5; }
2741
2742# Provide some information about the compiler.
2743$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2744set X $ac_compile
2745ac_compiler=$2
2746for ac_option in --version -v -V -qversion; do
2747 { { ac_try="$ac_compiler $ac_option >&5"
2748case "(($ac_try" in
2749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2750 *) ac_try_echo=$ac_try;;
2751esac
2752eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2753$as_echo "$ac_try_echo"; } >&5
2754 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2755 ac_status=$?
2756 if test -s conftest.err; then
2757 sed '10a\
2758... rest of stderr output deleted ...
2759 10q' conftest.err >conftest.er1
2760 cat conftest.er1 >&5
2761 fi
2762 rm -f conftest.er1 conftest.err
2763 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2764 test $ac_status = 0; }
2765done
2766
2767cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2768/* end confdefs.h. */
2769
2770int
2771main ()
2772{
2773
2774 ;
2775 return 0;
2776}
2777_ACEOF
2778ac_clean_files_save=$ac_clean_files
2779ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2780# Try to create an executable without -o first, disregard a.out.
2781# It will help us diagnose broken compilers, and finding out an intuition
2782# of exeext.
2783{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2784$as_echo_n "checking whether the C compiler works... " >&6; }
2785ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2786
2787# The possible output files:
2788ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2789
2790ac_rmfiles=
2791for ac_file in $ac_files
2792do
2793 case $ac_file in
2794 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2795 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2796 esac
2797done
2798rm -f $ac_rmfiles
2799
2800if { { ac_try="$ac_link_default"
2801case "(($ac_try" in
2802 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2803 *) ac_try_echo=$ac_try;;
2804esac
2805eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2806$as_echo "$ac_try_echo"; } >&5
2807 (eval "$ac_link_default") 2>&5
2808 ac_status=$?
2809 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2810 test $ac_status = 0; }; then :
2811 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2812# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2813# in a Makefile. We should not override ac_cv_exeext if it was cached,
2814# so that the user can short-circuit this test for compilers unknown to
2815# Autoconf.
2816for ac_file in $ac_files ''
2817do
2818 test -f "$ac_file" || continue
2819 case $ac_file in
2820 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2821 ;;
2822 [ab].out )
2823 # We found the default executable, but exeext='' is most
2824 # certainly right.
2825 break;;
2826 *.* )
2827 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2828 then :; else
2829 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2830 fi
2831 # We set ac_cv_exeext here because the later test for it is not
2832 # safe: cross compilers may not add the suffix if given an `-o'
2833 # argument, so we may need to know it at that point already.
2834 # Even if this section looks crufty: it has the advantage of
2835 # actually working.
2836 break;;
2837 * )
2838 break;;
2839 esac
2840done
2841test "$ac_cv_exeext" = no && ac_cv_exeext=
2842
2843else
2844 ac_file=''
2845fi
2846if test -z "$ac_file"; then :
2847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2848$as_echo "no" >&6; }
2849$as_echo "$as_me: failed program was:" >&5
2850sed 's/^/| /' conftest.$ac_ext >&5
2851
2852{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2853$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2854as_fn_error 77 "C compiler cannot create executables
2855See \`config.log' for more details" "$LINENO" 5; }
2856else
2857 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2858$as_echo "yes" >&6; }
2859fi
2860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2861$as_echo_n "checking for C compiler default output file name... " >&6; }
2862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2863$as_echo "$ac_file" >&6; }
2864ac_exeext=$ac_cv_exeext
2865
2866rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2867ac_clean_files=$ac_clean_files_save
2868{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2869$as_echo_n "checking for suffix of executables... " >&6; }
2870if { { ac_try="$ac_link"
2871case "(($ac_try" in
2872 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2873 *) ac_try_echo=$ac_try;;
2874esac
2875eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2876$as_echo "$ac_try_echo"; } >&5
2877 (eval "$ac_link") 2>&5
2878 ac_status=$?
2879 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2880 test $ac_status = 0; }; then :
2881 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2882# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2883# work properly (i.e., refer to `conftest.exe'), while it won't with
2884# `rm'.
2885for ac_file in conftest.exe conftest conftest.*; do
2886 test -f "$ac_file" || continue
2887 case $ac_file in
2888 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2889 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2890 break;;
2891 * ) break;;
2892 esac
2893done
2894else
2895 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2896$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2897as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2898See \`config.log' for more details" "$LINENO" 5; }
2899fi
2900rm -f conftest conftest$ac_cv_exeext
2901{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
2902$as_echo "$ac_cv_exeext" >&6; }
2903
2904rm -f conftest.$ac_ext
2905EXEEXT=$ac_cv_exeext
2906ac_exeext=$EXEEXT
2907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2908/* end confdefs.h. */
2909#include <stdio.h>
2910int
2911main ()
2912{
2913FILE *f = fopen ("conftest.out", "w");
2914 return ferror (f) || fclose (f) != 0;
2915
2916 ;
2917 return 0;
2918}
2919_ACEOF
2920ac_clean_files="$ac_clean_files conftest.out"
2921# Check that the compiler produces executables we can run. If not, either
2922# the compiler is broken, or we cross compile.
2923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
2924$as_echo_n "checking whether we are cross compiling... " >&6; }
2925if test "$cross_compiling" != yes; then
2926 { { ac_try="$ac_link"
2927case "(($ac_try" in
2928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2929 *) ac_try_echo=$ac_try;;
2930esac
2931eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2932$as_echo "$ac_try_echo"; } >&5
2933 (eval "$ac_link") 2>&5
2934 ac_status=$?
2935 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2936 test $ac_status = 0; }
2937 if { ac_try='./conftest$ac_cv_exeext'
2938 { { case "(($ac_try" in
2939 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2940 *) ac_try_echo=$ac_try;;
2941esac
2942eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2943$as_echo "$ac_try_echo"; } >&5
2944 (eval "$ac_try") 2>&5
2945 ac_status=$?
2946 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2947 test $ac_status = 0; }; }; then
2948 cross_compiling=no
2949 else
2950 if test "$cross_compiling" = maybe; then
2951 cross_compiling=yes
2952 else
2953 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2954$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2955as_fn_error $? "cannot run C compiled programs.
2956If you meant to cross compile, use \`--host'.
2957See \`config.log' for more details" "$LINENO" 5; }
2958 fi
2959 fi
2960fi
2961{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
2962$as_echo "$cross_compiling" >&6; }
2963
2964rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
2965ac_clean_files=$ac_clean_files_save
2966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
2967$as_echo_n "checking for suffix of object files... " >&6; }
2968if ${ac_cv_objext+:} false; then :
2969 $as_echo_n "(cached) " >&6
2970else
2971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2972/* end confdefs.h. */
2973
2974int
2975main ()
2976{
2977
2978 ;
2979 return 0;
2980}
2981_ACEOF
2982rm -f conftest.o conftest.obj
2983if { { ac_try="$ac_compile"
2984case "(($ac_try" in
2985 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2986 *) ac_try_echo=$ac_try;;
2987esac
2988eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2989$as_echo "$ac_try_echo"; } >&5
2990 (eval "$ac_compile") 2>&5
2991 ac_status=$?
2992 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2993 test $ac_status = 0; }; then :
2994 for ac_file in conftest.o conftest.obj conftest.*; do
2995 test -f "$ac_file" || continue;
2996 case $ac_file in
2997 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
2998 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2999 break;;
3000 esac
3001done
3002else
3003 $as_echo "$as_me: failed program was:" >&5
3004sed 's/^/| /' conftest.$ac_ext >&5
3005
3006{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3007$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3008as_fn_error $? "cannot compute suffix of object files: cannot compile
3009See \`config.log' for more details" "$LINENO" 5; }
3010fi
3011rm -f conftest.$ac_cv_objext conftest.$ac_ext
3012fi
3013{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3014$as_echo "$ac_cv_objext" >&6; }
3015OBJEXT=$ac_cv_objext
3016ac_objext=$OBJEXT
3017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3018$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3019if ${ac_cv_c_compiler_gnu+:} false; then :
3020 $as_echo_n "(cached) " >&6
3021else
3022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3023/* end confdefs.h. */
3024
3025int
3026main ()
3027{
3028#ifndef __GNUC__
3029 choke me
3030#endif
3031
3032 ;
3033 return 0;
3034}
3035_ACEOF
3036if ac_fn_c_try_compile "$LINENO"; then :
3037 ac_compiler_gnu=yes
3038else
3039 ac_compiler_gnu=no
3040fi
3041rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3042ac_cv_c_compiler_gnu=$ac_compiler_gnu
3043
3044fi
3045{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3046$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3047if test $ac_compiler_gnu = yes; then
3048 GCC=yes
3049else
3050 GCC=
3051fi
3052ac_test_CFLAGS=${CFLAGS+set}
3053ac_save_CFLAGS=$CFLAGS
3054{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3055$as_echo_n "checking whether $CC accepts -g... " >&6; }
3056if ${ac_cv_prog_cc_g+:} false; then :
3057 $as_echo_n "(cached) " >&6
3058else
3059 ac_save_c_werror_flag=$ac_c_werror_flag
3060 ac_c_werror_flag=yes
3061 ac_cv_prog_cc_g=no
3062 CFLAGS="-g"
3063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3064/* end confdefs.h. */
3065
3066int
3067main ()
3068{
3069
3070 ;
3071 return 0;
3072}
3073_ACEOF
3074if ac_fn_c_try_compile "$LINENO"; then :
3075 ac_cv_prog_cc_g=yes
3076else
3077 CFLAGS=""
3078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3079/* end confdefs.h. */
3080
3081int
3082main ()
3083{
3084
3085 ;
3086 return 0;
3087}
3088_ACEOF
3089if ac_fn_c_try_compile "$LINENO"; then :
3090
3091else
3092 ac_c_werror_flag=$ac_save_c_werror_flag
3093 CFLAGS="-g"
3094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3095/* end confdefs.h. */
3096
3097int
3098main ()
3099{
3100
3101 ;
3102 return 0;
3103}
3104_ACEOF
3105if ac_fn_c_try_compile "$LINENO"; then :
3106 ac_cv_prog_cc_g=yes
3107fi
3108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3109fi
3110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3111fi
3112rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3113 ac_c_werror_flag=$ac_save_c_werror_flag
3114fi
3115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3116$as_echo "$ac_cv_prog_cc_g" >&6; }
3117if test "$ac_test_CFLAGS" = set; then
3118 CFLAGS=$ac_save_CFLAGS
3119elif test $ac_cv_prog_cc_g = yes; then
3120 if test "$GCC" = yes; then
3121 CFLAGS="-g -O2"
3122 else
3123 CFLAGS="-g"
3124 fi
3125else
3126 if test "$GCC" = yes; then
3127 CFLAGS="-O2"
3128 else
3129 CFLAGS=
3130 fi
3131fi
3132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3133$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3134if ${ac_cv_prog_cc_c89+:} false; then :
3135 $as_echo_n "(cached) " >&6
3136else
3137 ac_cv_prog_cc_c89=no
3138ac_save_CC=$CC
3139cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3140/* end confdefs.h. */
3141#include <stdarg.h>
3142#include <stdio.h>
3143struct stat;
3144/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3145struct buf { int x; };
3146FILE * (*rcsopen) (struct buf *, struct stat *, int);
3147static char *e (p, i)
3148 char **p;
3149 int i;
3150{
3151 return p[i];
3152}
3153static char *f (char * (*g) (char **, int), char **p, ...)
3154{
3155 char *s;
3156 va_list v;
3157 va_start (v,p);
3158 s = g (p, va_arg (v,int));
3159 va_end (v);
3160 return s;
3161}
3162
3163/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3164 function prototypes and stuff, but not '\xHH' hex character constants.
3165 These don't provoke an error unfortunately, instead are silently treated
3166 as 'x'. The following induces an error, until -std is added to get
3167 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3168 array size at least. It's necessary to write '\x00'==0 to get something
3169 that's true only with -std. */
3170int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3171
3172/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3173 inside strings and character constants. */
3174#define FOO(x) 'x'
3175int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3176
3177int test (int i, double x);
3178struct s1 {int (*f) (int a);};
3179struct s2 {int (*f) (double a);};
3180int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3181int argc;
3182char **argv;
3183int
3184main ()
3185{
3186return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3187 ;
3188 return 0;
3189}
3190_ACEOF
3191for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3192 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3193do
3194 CC="$ac_save_CC $ac_arg"
3195 if ac_fn_c_try_compile "$LINENO"; then :
3196 ac_cv_prog_cc_c89=$ac_arg
3197fi
3198rm -f core conftest.err conftest.$ac_objext
3199 test "x$ac_cv_prog_cc_c89" != "xno" && break
3200done
3201rm -f conftest.$ac_ext
3202CC=$ac_save_CC
3203
3204fi
3205# AC_CACHE_VAL
3206case "x$ac_cv_prog_cc_c89" in
3207 x)
3208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3209$as_echo "none needed" >&6; } ;;
3210 xno)
3211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3212$as_echo "unsupported" >&6; } ;;
3213 *)
3214 CC="$CC $ac_cv_prog_cc_c89"
3215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3216$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3217esac
3218if test "x$ac_cv_prog_cc_c89" != xno; then :
3219
3220fi
3221
3222ac_ext=c
3223ac_cpp='$CPP $CPPFLAGS'
3224ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3225ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3226ac_compiler_gnu=$ac_cv_c_compiler_gnu
3227
3228ac_aux_dir=
3229for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3230 if test -f "$ac_dir/install-sh"; then
3231 ac_aux_dir=$ac_dir
3232 ac_install_sh="$ac_aux_dir/install-sh -c"
3233 break
3234 elif test -f "$ac_dir/install.sh"; then
3235 ac_aux_dir=$ac_dir
3236 ac_install_sh="$ac_aux_dir/install.sh -c"
3237 break
3238 elif test -f "$ac_dir/shtool"; then
3239 ac_aux_dir=$ac_dir
3240 ac_install_sh="$ac_aux_dir/shtool install -c"
3241 break
3242 fi
3243done
3244if test -z "$ac_aux_dir"; then
3245 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3246fi
3247
3248# These three variables are undocumented and unsupported,
3249# and are intended to be withdrawn in a future Autoconf release.
3250# They can cause serious problems if a builder's source tree is in a directory
3251# whose full name contains unusual characters.
3252ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3253ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3254ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3255
3256
3257# Make sure we can run config.sub.
3258$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3259 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3260
3261{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3262$as_echo_n "checking build system type... " >&6; }
3263if ${ac_cv_build+:} false; then :
3264 $as_echo_n "(cached) " >&6
3265else
3266 ac_build_alias=$build_alias
3267test "x$ac_build_alias" = x &&
3268 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3269test "x$ac_build_alias" = x &&
3270 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3271ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3272 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3273
3274fi
3275{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3276$as_echo "$ac_cv_build" >&6; }
3277case $ac_cv_build in
3278*-*-*) ;;
3279*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3280esac
3281build=$ac_cv_build
3282ac_save_IFS=$IFS; IFS='-'
3283set x $ac_cv_build
3284shift
3285build_cpu=$1
3286build_vendor=$2
3287shift; shift
3288# Remember, the first character of IFS is used to create $*,
3289# except with old shells:
3290build_os=$*
3291IFS=$ac_save_IFS
3292case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3293
3294
3295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3296$as_echo_n "checking host system type... " >&6; }
3297if ${ac_cv_host+:} false; then :
3298 $as_echo_n "(cached) " >&6
3299else
3300 if test "x$host_alias" = x; then
3301 ac_cv_host=$ac_cv_build
3302else
3303 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3304 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3305fi
3306
3307fi
3308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3309$as_echo "$ac_cv_host" >&6; }
3310case $ac_cv_host in
3311*-*-*) ;;
3312*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3313esac
3314host=$ac_cv_host
3315ac_save_IFS=$IFS; IFS='-'
3316set x $ac_cv_host
3317shift
3318host_cpu=$1
3319host_vendor=$2
3320shift; shift
3321# Remember, the first character of IFS is used to create $*,
3322# except with old shells:
3323host_os=$*
3324IFS=$ac_save_IFS
3325case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3326
3327
3328
3329ac_ext=c
3330ac_cpp='$CPP $CPPFLAGS'
3331ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3332ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3333ac_compiler_gnu=$ac_cv_c_compiler_gnu
3334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3335$as_echo_n "checking how to run the C preprocessor... " >&6; }
3336# On Suns, sometimes $CPP names a directory.
3337if test -n "$CPP" && test -d "$CPP"; then
3338 CPP=
3339fi
3340if test -z "$CPP"; then
3341 if ${ac_cv_prog_CPP+:} false; then :
3342 $as_echo_n "(cached) " >&6
3343else
3344 # Double quotes because CPP needs to be expanded
3345 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3346 do
3347 ac_preproc_ok=false
3348for ac_c_preproc_warn_flag in '' yes
3349do
3350 # Use a header file that comes with gcc, so configuring glibc
3351 # with a fresh cross-compiler works.
3352 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3353 # <limits.h> exists even on freestanding compilers.
3354 # On the NeXT, cc -E runs the code through the compiler's parser,
3355 # not just through cpp. "Syntax error" is here to catch this case.
3356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3357/* end confdefs.h. */
3358#ifdef __STDC__
3359# include <limits.h>
3360#else
3361# include <assert.h>
3362#endif
3363 Syntax error
3364_ACEOF
3365if ac_fn_c_try_cpp "$LINENO"; then :
3366
3367else
3368 # Broken: fails on valid input.
3369continue
3370fi
3371rm -f conftest.err conftest.i conftest.$ac_ext
3372
3373 # OK, works on sane cases. Now check whether nonexistent headers
3374 # can be detected and how.
3375 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3376/* end confdefs.h. */
3377#include <ac_nonexistent.h>
3378_ACEOF
3379if ac_fn_c_try_cpp "$LINENO"; then :
3380 # Broken: success on invalid input.
3381continue
3382else
3383 # Passes both tests.
3384ac_preproc_ok=:
3385break
3386fi
3387rm -f conftest.err conftest.i conftest.$ac_ext
3388
3389done
3390# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3391rm -f conftest.i conftest.err conftest.$ac_ext
3392if $ac_preproc_ok; then :
3393 break
3394fi
3395
3396 done
3397 ac_cv_prog_CPP=$CPP
3398
3399fi
3400 CPP=$ac_cv_prog_CPP
3401else
3402 ac_cv_prog_CPP=$CPP
3403fi
3404{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3405$as_echo "$CPP" >&6; }
3406ac_preproc_ok=false
3407for ac_c_preproc_warn_flag in '' yes
3408do
3409 # Use a header file that comes with gcc, so configuring glibc
3410 # with a fresh cross-compiler works.
3411 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3412 # <limits.h> exists even on freestanding compilers.
3413 # On the NeXT, cc -E runs the code through the compiler's parser,
3414 # not just through cpp. "Syntax error" is here to catch this case.
3415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3416/* end confdefs.h. */
3417#ifdef __STDC__
3418# include <limits.h>
3419#else
3420# include <assert.h>
3421#endif
3422 Syntax error
3423_ACEOF
3424if ac_fn_c_try_cpp "$LINENO"; then :
3425
3426else
3427 # Broken: fails on valid input.
3428continue
3429fi
3430rm -f conftest.err conftest.i conftest.$ac_ext
3431
3432 # OK, works on sane cases. Now check whether nonexistent headers
3433 # can be detected and how.
3434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3435/* end confdefs.h. */
3436#include <ac_nonexistent.h>
3437_ACEOF
3438if ac_fn_c_try_cpp "$LINENO"; then :
3439 # Broken: success on invalid input.
3440continue
3441else
3442 # Passes both tests.
3443ac_preproc_ok=:
3444break
3445fi
3446rm -f conftest.err conftest.i conftest.$ac_ext
3447
3448done
3449# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3450rm -f conftest.i conftest.err conftest.$ac_ext
3451if $ac_preproc_ok; then :
3452
3453else
3454 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3455$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3456as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3457See \`config.log' for more details" "$LINENO" 5; }
3458fi
3459
3460ac_ext=c
3461ac_cpp='$CPP $CPPFLAGS'
3462ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3463ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3464ac_compiler_gnu=$ac_cv_c_compiler_gnu
3465
3466
3467{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3468$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3469if ${ac_cv_path_GREP+:} false; then :
3470 $as_echo_n "(cached) " >&6
3471else
3472 if test -z "$GREP"; then
3473 ac_path_GREP_found=false
3474 # Loop through the user's path and test for each of PROGNAME-LIST
3475 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3476for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3477do
3478 IFS=$as_save_IFS
3479 test -z "$as_dir" && as_dir=.
3480 for ac_prog in grep ggrep; do
3481 for ac_exec_ext in '' $ac_executable_extensions; do
3482 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3483 as_fn_executable_p "$ac_path_GREP" || continue
3484# Check for GNU ac_path_GREP and select it if it is found.
3485 # Check for GNU $ac_path_GREP
3486case `"$ac_path_GREP" --version 2>&1` in
3487*GNU*)
3488 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3489*)
3490 ac_count=0
3491 $as_echo_n 0123456789 >"conftest.in"
3492 while :
3493 do
3494 cat "conftest.in" "conftest.in" >"conftest.tmp"
3495 mv "conftest.tmp" "conftest.in"
3496 cp "conftest.in" "conftest.nl"
3497 $as_echo 'GREP' >> "conftest.nl"
3498 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3499 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3500 as_fn_arith $ac_count + 1 && ac_count=$as_val
3501 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3502 # Best one so far, save it but keep looking for a better one
3503 ac_cv_path_GREP="$ac_path_GREP"
3504 ac_path_GREP_max=$ac_count
3505 fi
3506 # 10*(2^10) chars as input seems more than enough
3507 test $ac_count -gt 10 && break
3508 done
3509 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3510esac
3511
3512 $ac_path_GREP_found && break 3
3513 done
3514 done
3515 done
3516IFS=$as_save_IFS
3517 if test -z "$ac_cv_path_GREP"; then
3518 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3519 fi
3520else
3521 ac_cv_path_GREP=$GREP
3522fi
3523
3524fi
3525{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3526$as_echo "$ac_cv_path_GREP" >&6; }
3527 GREP="$ac_cv_path_GREP"
3528
3529
3530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3531$as_echo_n "checking for egrep... " >&6; }
3532if ${ac_cv_path_EGREP+:} false; then :
3533 $as_echo_n "(cached) " >&6
3534else
3535 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3536 then ac_cv_path_EGREP="$GREP -E"
3537 else
3538 if test -z "$EGREP"; then
3539 ac_path_EGREP_found=false
3540 # Loop through the user's path and test for each of PROGNAME-LIST
3541 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3542for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3543do
3544 IFS=$as_save_IFS
3545 test -z "$as_dir" && as_dir=.
3546 for ac_prog in egrep; do
3547 for ac_exec_ext in '' $ac_executable_extensions; do
3548 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3549 as_fn_executable_p "$ac_path_EGREP" || continue
3550# Check for GNU ac_path_EGREP and select it if it is found.
3551 # Check for GNU $ac_path_EGREP
3552case `"$ac_path_EGREP" --version 2>&1` in
3553*GNU*)
3554 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3555*)
3556 ac_count=0
3557 $as_echo_n 0123456789 >"conftest.in"
3558 while :
3559 do
3560 cat "conftest.in" "conftest.in" >"conftest.tmp"
3561 mv "conftest.tmp" "conftest.in"
3562 cp "conftest.in" "conftest.nl"
3563 $as_echo 'EGREP' >> "conftest.nl"
3564 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3565 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3566 as_fn_arith $ac_count + 1 && ac_count=$as_val
3567 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3568 # Best one so far, save it but keep looking for a better one
3569 ac_cv_path_EGREP="$ac_path_EGREP"
3570 ac_path_EGREP_max=$ac_count
3571 fi
3572 # 10*(2^10) chars as input seems more than enough
3573 test $ac_count -gt 10 && break
3574 done
3575 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3576esac
3577
3578 $ac_path_EGREP_found && break 3
3579 done
3580 done
3581 done
3582IFS=$as_save_IFS
3583 if test -z "$ac_cv_path_EGREP"; then
3584 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3585 fi
3586else
3587 ac_cv_path_EGREP=$EGREP
3588fi
3589
3590 fi
3591fi
3592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3593$as_echo "$ac_cv_path_EGREP" >&6; }
3594 EGREP="$ac_cv_path_EGREP"
3595
3596
3597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3598$as_echo_n "checking for ANSI C header files... " >&6; }
3599if ${ac_cv_header_stdc+:} false; then :
3600 $as_echo_n "(cached) " >&6
3601else
3602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3603/* end confdefs.h. */
3604#include <stdlib.h>
3605#include <stdarg.h>
3606#include <string.h>
3607#include <float.h>
3608
3609int
3610main ()
3611{
3612
3613 ;
3614 return 0;
3615}
3616_ACEOF
3617if ac_fn_c_try_compile "$LINENO"; then :
3618 ac_cv_header_stdc=yes
3619else
3620 ac_cv_header_stdc=no
3621fi
3622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3623
3624if test $ac_cv_header_stdc = yes; then
3625 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3627/* end confdefs.h. */
3628#include <string.h>
3629
3630_ACEOF
3631if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3632 $EGREP "memchr" >/dev/null 2>&1; then :
3633
3634else
3635 ac_cv_header_stdc=no
3636fi
3637rm -f conftest*
3638
3639fi
3640
3641if test $ac_cv_header_stdc = yes; then
3642 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3644/* end confdefs.h. */
3645#include <stdlib.h>
3646
3647_ACEOF
3648if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3649 $EGREP "free" >/dev/null 2>&1; then :
3650
3651else
3652 ac_cv_header_stdc=no
3653fi
3654rm -f conftest*
3655
3656fi
3657
3658if test $ac_cv_header_stdc = yes; then
3659 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3660 if test "$cross_compiling" = yes; then :
3661 :
3662else
3663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3664/* end confdefs.h. */
3665#include <ctype.h>
3666#include <stdlib.h>
3667#if ((' ' & 0x0FF) == 0x020)
3668# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3669# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3670#else
3671# define ISLOWER(c) \
3672 (('a' <= (c) && (c) <= 'i') \
3673 || ('j' <= (c) && (c) <= 'r') \
3674 || ('s' <= (c) && (c) <= 'z'))
3675# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3676#endif
3677
3678#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3679int
3680main ()
3681{
3682 int i;
3683 for (i = 0; i < 256; i++)
3684 if (XOR (islower (i), ISLOWER (i))
3685 || toupper (i) != TOUPPER (i))
3686 return 2;
3687 return 0;
3688}
3689_ACEOF
3690if ac_fn_c_try_run "$LINENO"; then :
3691
3692else
3693 ac_cv_header_stdc=no
3694fi
3695rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3696 conftest.$ac_objext conftest.beam conftest.$ac_ext
3697fi
3698
3699fi
3700fi
3701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3702$as_echo "$ac_cv_header_stdc" >&6; }
3703if test $ac_cv_header_stdc = yes; then
3704
3705$as_echo "#define STDC_HEADERS 1" >>confdefs.h
3706
3707fi
3708
3709# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3710for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3711 inttypes.h stdint.h unistd.h
3712do :
3713 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3714ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3715"
3716if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3717 cat >>confdefs.h <<_ACEOF
3718#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3719_ACEOF
3720
3721fi
3722
3723done
3724
3725
3726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
3727$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
3728if ${ac_cv_c_bigendian+:} false; then :
3729 $as_echo_n "(cached) " >&6
3730else
3731 ac_cv_c_bigendian=unknown
3732 # See if we're dealing with a universal compiler.
3733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3734/* end confdefs.h. */
3735#ifndef __APPLE_CC__
3736 not a universal capable compiler
3737 #endif
3738 typedef int dummy;
3739
3740_ACEOF
3741if ac_fn_c_try_compile "$LINENO"; then :
3742
3743 # Check for potential -arch flags. It is not universal unless
3744 # there are at least two -arch flags with different values.
3745 ac_arch=
3746 ac_prev=
3747 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
3748 if test -n "$ac_prev"; then
3749 case $ac_word in
3750 i?86 | x86_64 | ppc | ppc64)
3751 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
3752 ac_arch=$ac_word
3753 else
3754 ac_cv_c_bigendian=universal
3755 break
3756 fi
3757 ;;
3758 esac
3759 ac_prev=
3760 elif test "x$ac_word" = "x-arch"; then
3761 ac_prev=arch
3762 fi
3763 done
3764fi
3765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3766 if test $ac_cv_c_bigendian = unknown; then
3767 # See if sys/param.h defines the BYTE_ORDER macro.
3768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3769/* end confdefs.h. */
3770#include <sys/types.h>
3771 #include <sys/param.h>
3772
3773int
3774main ()
3775{
3776#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
3777 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
3778 && LITTLE_ENDIAN)
3779 bogus endian macros
3780 #endif
3781
3782 ;
3783 return 0;
3784}
3785_ACEOF
3786if ac_fn_c_try_compile "$LINENO"; then :
3787 # It does; now see whether it defined to BIG_ENDIAN or not.
3788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3789/* end confdefs.h. */
3790#include <sys/types.h>
3791 #include <sys/param.h>
3792
3793int
3794main ()
3795{
3796#if BYTE_ORDER != BIG_ENDIAN
3797 not big endian
3798 #endif
3799
3800 ;
3801 return 0;
3802}
3803_ACEOF
3804if ac_fn_c_try_compile "$LINENO"; then :
3805 ac_cv_c_bigendian=yes
3806else
3807 ac_cv_c_bigendian=no
3808fi
3809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3810fi
3811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3812 fi
3813 if test $ac_cv_c_bigendian = unknown; then
3814 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
3815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3816/* end confdefs.h. */
3817#include <limits.h>
3818
3819int
3820main ()
3821{
3822#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
3823 bogus endian macros
3824 #endif
3825
3826 ;
3827 return 0;
3828}
3829_ACEOF
3830if ac_fn_c_try_compile "$LINENO"; then :
3831 # It does; now see whether it defined to _BIG_ENDIAN or not.
3832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3833/* end confdefs.h. */
3834#include <limits.h>
3835
3836int
3837main ()
3838{
3839#ifndef _BIG_ENDIAN
3840 not big endian
3841 #endif
3842
3843 ;
3844 return 0;
3845}
3846_ACEOF
3847if ac_fn_c_try_compile "$LINENO"; then :
3848 ac_cv_c_bigendian=yes
3849else
3850 ac_cv_c_bigendian=no
3851fi
3852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3853fi
3854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3855 fi
3856 if test $ac_cv_c_bigendian = unknown; then
3857 # Compile a test program.
3858 if test "$cross_compiling" = yes; then :
3859 # Try to guess by grepping values from an object file.
3860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3861/* end confdefs.h. */
3862short int ascii_mm[] =
3863 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3864 short int ascii_ii[] =
3865 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3866 int use_ascii (int i) {
3867 return ascii_mm[i] + ascii_ii[i];
3868 }
3869 short int ebcdic_ii[] =
3870 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3871 short int ebcdic_mm[] =
3872 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3873 int use_ebcdic (int i) {
3874 return ebcdic_mm[i] + ebcdic_ii[i];
3875 }
3876 extern int foo;
3877
3878int
3879main ()
3880{
3881return use_ascii (foo) == use_ebcdic (foo);
3882 ;
3883 return 0;
3884}
3885_ACEOF
3886if ac_fn_c_try_compile "$LINENO"; then :
3887 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
3888 ac_cv_c_bigendian=yes
3889 fi
3890 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
3891 if test "$ac_cv_c_bigendian" = unknown; then
3892 ac_cv_c_bigendian=no
3893 else
3894 # finding both strings is unlikely to happen, but who knows?
3895 ac_cv_c_bigendian=unknown
3896 fi
3897 fi
3898fi
3899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3900else
3901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3902/* end confdefs.h. */
3903$ac_includes_default
3904int
3905main ()
3906{
3907
3908 /* Are we little or big endian? From Harbison&Steele. */
3909 union
3910 {
3911 long int l;
3912 char c[sizeof (long int)];
3913 } u;
3914 u.l = 1;
3915 return u.c[sizeof (long int) - 1] == 1;
3916
3917 ;
3918 return 0;
3919}
3920_ACEOF
3921if ac_fn_c_try_run "$LINENO"; then :
3922 ac_cv_c_bigendian=no
3923else
3924 ac_cv_c_bigendian=yes
3925fi
3926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3927 conftest.$ac_objext conftest.beam conftest.$ac_ext
3928fi
3929
3930 fi
3931fi
3932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
3933$as_echo "$ac_cv_c_bigendian" >&6; }
3934 case $ac_cv_c_bigendian in #(
3935 yes)
3936 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
3937;; #(
3938 no)
3939 ;; #(
3940 universal)
3941
3942$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
3943
3944 ;; #(
3945 *)
3946 as_fn_error $? "unknown endianness
3947 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
3948 esac
3949
3950
3951# Checks for programs.
3952for ac_prog in gawk mawk nawk awk
3953do
3954 # Extract the first word of "$ac_prog", so it can be a program name with args.
3955set dummy $ac_prog; ac_word=$2
3956{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3957$as_echo_n "checking for $ac_word... " >&6; }
3958if ${ac_cv_prog_AWK+:} false; then :
3959 $as_echo_n "(cached) " >&6
3960else
3961 if test -n "$AWK"; then
3962 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3963else
3964as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3965for as_dir in $PATH
3966do
3967 IFS=$as_save_IFS
3968 test -z "$as_dir" && as_dir=.
3969 for ac_exec_ext in '' $ac_executable_extensions; do
3970 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3971 ac_cv_prog_AWK="$ac_prog"
3972 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3973 break 2
3974 fi
3975done
3976 done
3977IFS=$as_save_IFS
3978
3979fi
3980fi
3981AWK=$ac_cv_prog_AWK
3982if test -n "$AWK"; then
3983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3984$as_echo "$AWK" >&6; }
3985else
3986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3987$as_echo "no" >&6; }
3988fi
3989
3990
3991 test -n "$AWK" && break
3992done
3993
3994ac_ext=c
3995ac_cpp='$CPP $CPPFLAGS'
3996ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3997ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3998ac_compiler_gnu=$ac_cv_c_compiler_gnu
3999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4000$as_echo_n "checking how to run the C preprocessor... " >&6; }
4001# On Suns, sometimes $CPP names a directory.
4002if test -n "$CPP" && test -d "$CPP"; then
4003 CPP=
4004fi
4005if test -z "$CPP"; then
4006 if ${ac_cv_prog_CPP+:} false; then :
4007 $as_echo_n "(cached) " >&6
4008else
4009 # Double quotes because CPP needs to be expanded
4010 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4011 do
4012 ac_preproc_ok=false
4013for ac_c_preproc_warn_flag in '' yes
4014do
4015 # Use a header file that comes with gcc, so configuring glibc
4016 # with a fresh cross-compiler works.
4017 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4018 # <limits.h> exists even on freestanding compilers.
4019 # On the NeXT, cc -E runs the code through the compiler's parser,
4020 # not just through cpp. "Syntax error" is here to catch this case.
4021 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4022/* end confdefs.h. */
4023#ifdef __STDC__
4024# include <limits.h>
4025#else
4026# include <assert.h>
4027#endif
4028 Syntax error
4029_ACEOF
4030if ac_fn_c_try_cpp "$LINENO"; then :
4031
4032else
4033 # Broken: fails on valid input.
4034continue
4035fi
4036rm -f conftest.err conftest.i conftest.$ac_ext
4037
4038 # OK, works on sane cases. Now check whether nonexistent headers
4039 # can be detected and how.
4040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4041/* end confdefs.h. */
4042#include <ac_nonexistent.h>
4043_ACEOF
4044if ac_fn_c_try_cpp "$LINENO"; then :
4045 # Broken: success on invalid input.
4046continue
4047else
4048 # Passes both tests.
4049ac_preproc_ok=:
4050break
4051fi
4052rm -f conftest.err conftest.i conftest.$ac_ext
4053
4054done
4055# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4056rm -f conftest.i conftest.err conftest.$ac_ext
4057if $ac_preproc_ok; then :
4058 break
4059fi
4060
4061 done
4062 ac_cv_prog_CPP=$CPP
4063
4064fi
4065 CPP=$ac_cv_prog_CPP
4066else
4067 ac_cv_prog_CPP=$CPP
4068fi
4069{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4070$as_echo "$CPP" >&6; }
4071ac_preproc_ok=false
4072for ac_c_preproc_warn_flag in '' yes
4073do
4074 # Use a header file that comes with gcc, so configuring glibc
4075 # with a fresh cross-compiler works.
4076 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4077 # <limits.h> exists even on freestanding compilers.
4078 # On the NeXT, cc -E runs the code through the compiler's parser,
4079 # not just through cpp. "Syntax error" is here to catch this case.
4080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4081/* end confdefs.h. */
4082#ifdef __STDC__
4083# include <limits.h>
4084#else
4085# include <assert.h>
4086#endif
4087 Syntax error
4088_ACEOF
4089if ac_fn_c_try_cpp "$LINENO"; then :
4090
4091else
4092 # Broken: fails on valid input.
4093continue
4094fi
4095rm -f conftest.err conftest.i conftest.$ac_ext
4096
4097 # OK, works on sane cases. Now check whether nonexistent headers
4098 # can be detected and how.
4099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4100/* end confdefs.h. */
4101#include <ac_nonexistent.h>
4102_ACEOF
4103if ac_fn_c_try_cpp "$LINENO"; then :
4104 # Broken: success on invalid input.
4105continue
4106else
4107 # Passes both tests.
4108ac_preproc_ok=:
4109break
4110fi
4111rm -f conftest.err conftest.i conftest.$ac_ext
4112
4113done
4114# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4115rm -f conftest.i conftest.err conftest.$ac_ext
4116if $ac_preproc_ok; then :
4117
4118else
4119 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4120$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4121as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4122See \`config.log' for more details" "$LINENO" 5; }
4123fi
4124
4125ac_ext=c
4126ac_cpp='$CPP $CPPFLAGS'
4127ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4128ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4129ac_compiler_gnu=$ac_cv_c_compiler_gnu
4130
4131if test -n "$ac_tool_prefix"; then
4132 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4133set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4134{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4135$as_echo_n "checking for $ac_word... " >&6; }
4136if ${ac_cv_prog_RANLIB+:} false; then :
4137 $as_echo_n "(cached) " >&6
4138else
4139 if test -n "$RANLIB"; then
4140 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4141else
4142as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4143for as_dir in $PATH
4144do
4145 IFS=$as_save_IFS
4146 test -z "$as_dir" && as_dir=.
4147 for ac_exec_ext in '' $ac_executable_extensions; do
4148 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4149 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4150 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4151 break 2
4152 fi
4153done
4154 done
4155IFS=$as_save_IFS
4156
4157fi
4158fi
4159RANLIB=$ac_cv_prog_RANLIB
4160if test -n "$RANLIB"; then
4161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4162$as_echo "$RANLIB" >&6; }
4163else
4164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4165$as_echo "no" >&6; }
4166fi
4167
4168
4169fi
4170if test -z "$ac_cv_prog_RANLIB"; then
4171 ac_ct_RANLIB=$RANLIB
4172 # Extract the first word of "ranlib", so it can be a program name with args.
4173set dummy ranlib; ac_word=$2
4174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4175$as_echo_n "checking for $ac_word... " >&6; }
4176if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4177 $as_echo_n "(cached) " >&6
4178else
4179 if test -n "$ac_ct_RANLIB"; then
4180 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4181else
4182as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4183for as_dir in $PATH
4184do
4185 IFS=$as_save_IFS
4186 test -z "$as_dir" && as_dir=.
4187 for ac_exec_ext in '' $ac_executable_extensions; do
4188 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4189 ac_cv_prog_ac_ct_RANLIB="ranlib"
4190 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4191 break 2
4192 fi
4193done
4194 done
4195IFS=$as_save_IFS
4196
4197fi
4198fi
4199ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4200if test -n "$ac_ct_RANLIB"; then
4201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4202$as_echo "$ac_ct_RANLIB" >&6; }
4203else
4204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4205$as_echo "no" >&6; }
4206fi
4207
4208 if test "x$ac_ct_RANLIB" = x; then
4209 RANLIB=":"
4210 else
4211 case $cross_compiling:$ac_tool_warned in
4212yes:)
4213{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4214$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4215ac_tool_warned=yes ;;
4216esac
4217 RANLIB=$ac_ct_RANLIB
4218 fi
4219else
4220 RANLIB="$ac_cv_prog_RANLIB"
4221fi
4222
4223# Find a good install program. We prefer a C program (faster),
4224# so one script is as good as another. But avoid the broken or
4225# incompatible versions:
4226# SysV /etc/install, /usr/sbin/install
4227# SunOS /usr/etc/install
4228# IRIX /sbin/install
4229# AIX /bin/install
4230# AmigaOS /C/install, which installs bootblocks on floppy discs
4231# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4232# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4233# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4234# OS/2's system install, which has a completely different semantic
4235# ./install, which can be erroneously created by make from ./install.sh.
4236# Reject install programs that cannot install multiple files.
4237{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4238$as_echo_n "checking for a BSD-compatible install... " >&6; }
4239if test -z "$INSTALL"; then
4240if ${ac_cv_path_install+:} false; then :
4241 $as_echo_n "(cached) " >&6
4242else
4243 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4244for as_dir in $PATH
4245do
4246 IFS=$as_save_IFS
4247 test -z "$as_dir" && as_dir=.
4248 # Account for people who put trailing slashes in PATH elements.
4249case $as_dir/ in #((
4250 ./ | .// | /[cC]/* | \
4251 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4252 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4253 /usr/ucb/* ) ;;
4254 *)
4255 # OSF1 and SCO ODT 3.0 have their own names for install.
4256 # Don't use installbsd from OSF since it installs stuff as root
4257 # by default.
4258 for ac_prog in ginstall scoinst install; do
4259 for ac_exec_ext in '' $ac_executable_extensions; do
4260 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4261 if test $ac_prog = install &&
4262 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4263 # AIX install. It has an incompatible calling convention.
4264 :
4265 elif test $ac_prog = install &&
4266 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4267 # program-specific install script used by HP pwplus--don't use.
4268 :
4269 else
4270 rm -rf conftest.one conftest.two conftest.dir
4271 echo one > conftest.one
4272 echo two > conftest.two
4273 mkdir conftest.dir
4274 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4275 test -s conftest.one && test -s conftest.two &&
4276 test -s conftest.dir/conftest.one &&
4277 test -s conftest.dir/conftest.two
4278 then
4279 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4280 break 3
4281 fi
4282 fi
4283 fi
4284 done
4285 done
4286 ;;
4287esac
4288
4289 done
4290IFS=$as_save_IFS
4291
4292rm -rf conftest.one conftest.two conftest.dir
4293
4294fi
4295 if test "${ac_cv_path_install+set}" = set; then
4296 INSTALL=$ac_cv_path_install
4297 else
4298 # As a last resort, use the slow shell script. Don't cache a
4299 # value for INSTALL within a source directory, because that will
4300 # break other packages using the cache if that directory is
4301 # removed, or if the value is a relative name.
4302 INSTALL=$ac_install_sh
4303 fi
4304fi
4305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4306$as_echo "$INSTALL" >&6; }
4307
4308# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4309# It thinks the first close brace ends the variable substitution.
4310test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4311
4312test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4313
4314test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4315
4316{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4317$as_echo_n "checking for egrep... " >&6; }
4318if ${ac_cv_path_EGREP+:} false; then :
4319 $as_echo_n "(cached) " >&6
4320else
4321 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4322 then ac_cv_path_EGREP="$GREP -E"
4323 else
4324 if test -z "$EGREP"; then
4325 ac_path_EGREP_found=false
4326 # Loop through the user's path and test for each of PROGNAME-LIST
4327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4328for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4329do
4330 IFS=$as_save_IFS
4331 test -z "$as_dir" && as_dir=.
4332 for ac_prog in egrep; do
4333 for ac_exec_ext in '' $ac_executable_extensions; do
4334 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4335 as_fn_executable_p "$ac_path_EGREP" || continue
4336# Check for GNU ac_path_EGREP and select it if it is found.
4337 # Check for GNU $ac_path_EGREP
4338case `"$ac_path_EGREP" --version 2>&1` in
4339*GNU*)
4340 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4341*)
4342 ac_count=0
4343 $as_echo_n 0123456789 >"conftest.in"
4344 while :
4345 do
4346 cat "conftest.in" "conftest.in" >"conftest.tmp"
4347 mv "conftest.tmp" "conftest.in"
4348 cp "conftest.in" "conftest.nl"
4349 $as_echo 'EGREP' >> "conftest.nl"
4350 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4351 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4352 as_fn_arith $ac_count + 1 && ac_count=$as_val
4353 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4354 # Best one so far, save it but keep looking for a better one
4355 ac_cv_path_EGREP="$ac_path_EGREP"
4356 ac_path_EGREP_max=$ac_count
4357 fi
4358 # 10*(2^10) chars as input seems more than enough
4359 test $ac_count -gt 10 && break
4360 done
4361 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4362esac
4363
4364 $ac_path_EGREP_found && break 3
4365 done
4366 done
4367 done
4368IFS=$as_save_IFS
4369 if test -z "$ac_cv_path_EGREP"; then
4370 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4371 fi
4372else
4373 ac_cv_path_EGREP=$EGREP
4374fi
4375
4376 fi
4377fi
4378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4379$as_echo "$ac_cv_path_EGREP" >&6; }
4380 EGREP="$ac_cv_path_EGREP"
4381
4382
4383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
4384$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
4385if test -z "$MKDIR_P"; then
4386 if ${ac_cv_path_mkdir+:} false; then :
4387 $as_echo_n "(cached) " >&6
4388else
4389 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4390for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4391do
4392 IFS=$as_save_IFS
4393 test -z "$as_dir" && as_dir=.
4394 for ac_prog in mkdir gmkdir; do
4395 for ac_exec_ext in '' $ac_executable_extensions; do
4396 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
4397 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
4398 'mkdir (GNU coreutils) '* | \
4399 'mkdir (coreutils) '* | \
4400 'mkdir (fileutils) '4.1*)
4401 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
4402 break 3;;
4403 esac
4404 done
4405 done
4406 done
4407IFS=$as_save_IFS
4408
4409fi
4410
4411 test -d ./--version && rmdir ./--version
4412 if test "${ac_cv_path_mkdir+set}" = set; then
4413 MKDIR_P="$ac_cv_path_mkdir -p"
4414 else
4415 # As a last resort, use the slow shell script. Don't cache a
4416 # value for MKDIR_P within a source directory, because that will
4417 # break other packages using the cache if that directory is
4418 # removed, or if the value is a relative name.
4419 MKDIR_P="$ac_install_sh -d"
4420 fi
4421fi
4422{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4423$as_echo "$MKDIR_P" >&6; }
4424
4425if test -n "$ac_tool_prefix"; then
4426 for ac_prog in ar
4427 do
4428 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4429set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4430{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4431$as_echo_n "checking for $ac_word... " >&6; }
4432if ${ac_cv_prog_AR+:} false; then :
4433 $as_echo_n "(cached) " >&6
4434else
4435 if test -n "$AR"; then
4436 ac_cv_prog_AR="$AR" # Let the user override the test.
4437else
4438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4439for as_dir in $PATH
4440do
4441 IFS=$as_save_IFS
4442 test -z "$as_dir" && as_dir=.
4443 for ac_exec_ext in '' $ac_executable_extensions; do
4444 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4445 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
4446 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4447 break 2
4448 fi
4449done
4450 done
4451IFS=$as_save_IFS
4452
4453fi
4454fi
4455AR=$ac_cv_prog_AR
4456if test -n "$AR"; then
4457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4458$as_echo "$AR" >&6; }
4459else
4460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4461$as_echo "no" >&6; }
4462fi
4463
4464
4465 test -n "$AR" && break
4466 done
4467fi
4468if test -z "$AR"; then
4469 ac_ct_AR=$AR
4470 for ac_prog in ar
4471do
4472 # Extract the first word of "$ac_prog", so it can be a program name with args.
4473set dummy $ac_prog; ac_word=$2
4474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4475$as_echo_n "checking for $ac_word... " >&6; }
4476if ${ac_cv_prog_ac_ct_AR+:} false; then :
4477 $as_echo_n "(cached) " >&6
4478else
4479 if test -n "$ac_ct_AR"; then
4480 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4481else
4482as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4483for as_dir in $PATH
4484do
4485 IFS=$as_save_IFS
4486 test -z "$as_dir" && as_dir=.
4487 for ac_exec_ext in '' $ac_executable_extensions; do
4488 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4489 ac_cv_prog_ac_ct_AR="$ac_prog"
4490 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4491 break 2
4492 fi
4493done
4494 done
4495IFS=$as_save_IFS
4496
4497fi
4498fi
4499ac_ct_AR=$ac_cv_prog_ac_ct_AR
4500if test -n "$ac_ct_AR"; then
4501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4502$as_echo "$ac_ct_AR" >&6; }
4503else
4504 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4505$as_echo "no" >&6; }
4506fi
4507
4508
4509 test -n "$ac_ct_AR" && break
4510done
4511
4512 if test "x$ac_ct_AR" = x; then
4513 AR=""
4514 else
4515 case $cross_compiling:$ac_tool_warned in
4516yes:)
4517{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4518$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4519ac_tool_warned=yes ;;
4520esac
4521 AR=$ac_ct_AR
4522 fi
4523fi
4524
4525# Extract the first word of "cat", so it can be a program name with args.
4526set dummy cat; ac_word=$2
4527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4528$as_echo_n "checking for $ac_word... " >&6; }
4529if ${ac_cv_path_CAT+:} false; then :
4530 $as_echo_n "(cached) " >&6
4531else
4532 case $CAT in
4533 [\\/]* | ?:[\\/]*)
4534 ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4535 ;;
4536 *)
4537 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4538for as_dir in $PATH
4539do
4540 IFS=$as_save_IFS
4541 test -z "$as_dir" && as_dir=.
4542 for ac_exec_ext in '' $ac_executable_extensions; do
4543 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4544 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4545 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4546 break 2
4547 fi
4548done
4549 done
4550IFS=$as_save_IFS
4551
4552 ;;
4553esac
4554fi
4555CAT=$ac_cv_path_CAT
4556if test -n "$CAT"; then
4557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4558$as_echo "$CAT" >&6; }
4559else
4560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4561$as_echo "no" >&6; }
4562fi
4563
4564
4565# Extract the first word of "kill", so it can be a program name with args.
4566set dummy kill; ac_word=$2
4567{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4568$as_echo_n "checking for $ac_word... " >&6; }
4569if ${ac_cv_path_KILL+:} false; then :
4570 $as_echo_n "(cached) " >&6
4571else
4572 case $KILL in
4573 [\\/]* | ?:[\\/]*)
4574 ac_cv_path_KILL="$KILL" # Let the user override the test with a path.
4575 ;;
4576 *)
4577 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4578for as_dir in $PATH
4579do
4580 IFS=$as_save_IFS
4581 test -z "$as_dir" && as_dir=.
4582 for ac_exec_ext in '' $ac_executable_extensions; do
4583 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4584 ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext"
4585 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4586 break 2
4587 fi
4588done
4589 done
4590IFS=$as_save_IFS
4591
4592 ;;
4593esac
4594fi
4595KILL=$ac_cv_path_KILL
4596if test -n "$KILL"; then
4597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KILL" >&5
4598$as_echo "$KILL" >&6; }
4599else
4600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4601$as_echo "no" >&6; }
4602fi
4603
4604
4605# Extract the first word of "sed", so it can be a program name with args.
4606set dummy sed; ac_word=$2
4607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4608$as_echo_n "checking for $ac_word... " >&6; }
4609if ${ac_cv_path_SED+:} false; then :
4610 $as_echo_n "(cached) " >&6
4611else
4612 case $SED in
4613 [\\/]* | ?:[\\/]*)
4614 ac_cv_path_SED="$SED" # Let the user override the test with a path.
4615 ;;
4616 *)
4617 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4618for as_dir in $PATH
4619do
4620 IFS=$as_save_IFS
4621 test -z "$as_dir" && as_dir=.
4622 for ac_exec_ext in '' $ac_executable_extensions; do
4623 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4624 ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
4625 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4626 break 2
4627 fi
4628done
4629 done
4630IFS=$as_save_IFS
4631
4632 ;;
4633esac
4634fi
4635SED=$ac_cv_path_SED
4636if test -n "$SED"; then
4637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
4638$as_echo "$SED" >&6; }
4639else
4640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4641$as_echo "no" >&6; }
4642fi
4643
4644
4645# Extract the first word of "ent", so it can be a program name with args.
4646set dummy ent; ac_word=$2
4647{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4648$as_echo_n "checking for $ac_word... " >&6; }
4649if ${ac_cv_path_ENT+:} false; then :
4650 $as_echo_n "(cached) " >&6
4651else
4652 case $ENT in
4653 [\\/]* | ?:[\\/]*)
4654 ac_cv_path_ENT="$ENT" # Let the user override the test with a path.
4655 ;;
4656 *)
4657 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4658for as_dir in $PATH
4659do
4660 IFS=$as_save_IFS
4661 test -z "$as_dir" && as_dir=.
4662 for ac_exec_ext in '' $ac_executable_extensions; do
4663 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4664 ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext"
4665 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4666 break 2
4667 fi
4668done
4669 done
4670IFS=$as_save_IFS
4671
4672 ;;
4673esac
4674fi
4675ENT=$ac_cv_path_ENT
4676if test -n "$ENT"; then
4677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENT" >&5
4678$as_echo "$ENT" >&6; }
4679else
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4681$as_echo "no" >&6; }
4682fi
4683
4684
4685
4686# Extract the first word of "bash", so it can be a program name with args.
4687set dummy bash; ac_word=$2
4688{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4689$as_echo_n "checking for $ac_word... " >&6; }
4690if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4691 $as_echo_n "(cached) " >&6
4692else
4693 case $TEST_MINUS_S_SH in
4694 [\\/]* | ?:[\\/]*)
4695 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4696 ;;
4697 *)
4698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4699for as_dir in $PATH
4700do
4701 IFS=$as_save_IFS
4702 test -z "$as_dir" && as_dir=.
4703 for ac_exec_ext in '' $ac_executable_extensions; do
4704 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4705 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4706 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4707 break 2
4708 fi
4709done
4710 done
4711IFS=$as_save_IFS
4712
4713 ;;
4714esac
4715fi
4716TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4717if test -n "$TEST_MINUS_S_SH"; then
4718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4719$as_echo "$TEST_MINUS_S_SH" >&6; }
4720else
4721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4722$as_echo "no" >&6; }
4723fi
4724
4725
4726# Extract the first word of "ksh", so it can be a program name with args.
4727set dummy ksh; ac_word=$2
4728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4729$as_echo_n "checking for $ac_word... " >&6; }
4730if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4731 $as_echo_n "(cached) " >&6
4732else
4733 case $TEST_MINUS_S_SH in
4734 [\\/]* | ?:[\\/]*)
4735 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4736 ;;
4737 *)
4738 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4739for as_dir in $PATH
4740do
4741 IFS=$as_save_IFS
4742 test -z "$as_dir" && as_dir=.
4743 for ac_exec_ext in '' $ac_executable_extensions; do
4744 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4745 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4746 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4747 break 2
4748 fi
4749done
4750 done
4751IFS=$as_save_IFS
4752
4753 ;;
4754esac
4755fi
4756TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4757if test -n "$TEST_MINUS_S_SH"; then
4758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4759$as_echo "$TEST_MINUS_S_SH" >&6; }
4760else
4761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4762$as_echo "no" >&6; }
4763fi
4764
4765
4766# Extract the first word of "sh", so it can be a program name with args.
4767set dummy sh; ac_word=$2
4768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4769$as_echo_n "checking for $ac_word... " >&6; }
4770if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4771 $as_echo_n "(cached) " >&6
4772else
4773 case $TEST_MINUS_S_SH in
4774 [\\/]* | ?:[\\/]*)
4775 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4776 ;;
4777 *)
4778 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4779for as_dir in $PATH
4780do
4781 IFS=$as_save_IFS
4782 test -z "$as_dir" && as_dir=.
4783 for ac_exec_ext in '' $ac_executable_extensions; do
4784 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4785 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4786 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4787 break 2
4788 fi
4789done
4790 done
4791IFS=$as_save_IFS
4792
4793 ;;
4794esac
4795fi
4796TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4797if test -n "$TEST_MINUS_S_SH"; then
4798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4799$as_echo "$TEST_MINUS_S_SH" >&6; }
4800else
4801 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4802$as_echo "no" >&6; }
4803fi
4804
4805
4806# Extract the first word of "sh", so it can be a program name with args.
4807set dummy sh; ac_word=$2
4808{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4809$as_echo_n "checking for $ac_word... " >&6; }
4810if ${ac_cv_path_SH+:} false; then :
4811 $as_echo_n "(cached) " >&6
4812else
4813 case $SH in
4814 [\\/]* | ?:[\\/]*)
4815 ac_cv_path_SH="$SH" # Let the user override the test with a path.
4816 ;;
4817 *)
4818 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4819for as_dir in $PATH
4820do
4821 IFS=$as_save_IFS
4822 test -z "$as_dir" && as_dir=.
4823 for ac_exec_ext in '' $ac_executable_extensions; do
4824 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4825 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
4826 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4827 break 2
4828 fi
4829done
4830 done
4831IFS=$as_save_IFS
4832
4833 ;;
4834esac
4835fi
4836SH=$ac_cv_path_SH
4837if test -n "$SH"; then
4838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
4839$as_echo "$SH" >&6; }
4840else
4841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4842$as_echo "no" >&6; }
4843fi
4844
4845
4846# Extract the first word of "groff", so it can be a program name with args.
4847set dummy groff; ac_word=$2
4848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4849$as_echo_n "checking for $ac_word... " >&6; }
4850if ${ac_cv_path_GROFF+:} false; then :
4851 $as_echo_n "(cached) " >&6
4852else
4853 case $GROFF in
4854 [\\/]* | ?:[\\/]*)
4855 ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path.
4856 ;;
4857 *)
4858 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4859for as_dir in $PATH
4860do
4861 IFS=$as_save_IFS
4862 test -z "$as_dir" && as_dir=.
4863 for ac_exec_ext in '' $ac_executable_extensions; do
4864 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4865 ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext"
4866 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4867 break 2
4868 fi
4869done
4870 done
4871IFS=$as_save_IFS
4872
4873 ;;
4874esac
4875fi
4876GROFF=$ac_cv_path_GROFF
4877if test -n "$GROFF"; then
4878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5
4879$as_echo "$GROFF" >&6; }
4880else
4881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4882$as_echo "no" >&6; }
4883fi
4884
4885
4886# Extract the first word of "nroff awf", so it can be a program name with args.
4887set dummy nroff awf; ac_word=$2
4888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4889$as_echo_n "checking for $ac_word... " >&6; }
4890if ${ac_cv_path_NROFF+:} false; then :
4891 $as_echo_n "(cached) " >&6
4892else
4893 case $NROFF in
4894 [\\/]* | ?:[\\/]*)
4895 ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
4896 ;;
4897 *)
4898 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4899for as_dir in $PATH
4900do
4901 IFS=$as_save_IFS
4902 test -z "$as_dir" && as_dir=.
4903 for ac_exec_ext in '' $ac_executable_extensions; do
4904 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4905 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
4906 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4907 break 2
4908 fi
4909done
4910 done
4911IFS=$as_save_IFS
4912
4913 ;;
4914esac
4915fi
4916NROFF=$ac_cv_path_NROFF
4917if test -n "$NROFF"; then
4918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
4919$as_echo "$NROFF" >&6; }
4920else
4921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4922$as_echo "no" >&6; }
4923fi
4924
4925
4926# Extract the first word of "mandoc", so it can be a program name with args.
4927set dummy mandoc; ac_word=$2
4928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4929$as_echo_n "checking for $ac_word... " >&6; }
4930if ${ac_cv_path_MANDOC+:} false; then :
4931 $as_echo_n "(cached) " >&6
4932else
4933 case $MANDOC in
4934 [\\/]* | ?:[\\/]*)
4935 ac_cv_path_MANDOC="$MANDOC" # Let the user override the test with a path.
4936 ;;
4937 *)
4938 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4939for as_dir in $PATH
4940do
4941 IFS=$as_save_IFS
4942 test -z "$as_dir" && as_dir=.
4943 for ac_exec_ext in '' $ac_executable_extensions; do
4944 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4945 ac_cv_path_MANDOC="$as_dir/$ac_word$ac_exec_ext"
4946 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4947 break 2
4948 fi
4949done
4950 done
4951IFS=$as_save_IFS
4952
4953 ;;
4954esac
4955fi
4956MANDOC=$ac_cv_path_MANDOC
4957if test -n "$MANDOC"; then
4958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANDOC" >&5
4959$as_echo "$MANDOC" >&6; }
4960else
4961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4962$as_echo "no" >&6; }
4963fi
4964
4965
4966TEST_SHELL=sh
4967
4968
4969if test "x$MANDOC" != "x" ; then
4970 MANFMT="$MANDOC"
4971elif test "x$NROFF" != "x" ; then
4972 MANFMT="$NROFF -mandoc"
4973elif test "x$GROFF" != "x" ; then
4974 MANFMT="$GROFF -mandoc -Tascii"
4975else
4976 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no manpage formatter found" >&5
4977$as_echo "$as_me: WARNING: no manpage formatter found" >&2;}
4978 MANFMT="false"
4979fi
4980
4981
4982# Extract the first word of "groupadd", so it can be a program name with args.
4983set dummy groupadd; ac_word=$2
4984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4985$as_echo_n "checking for $ac_word... " >&6; }
4986if ${ac_cv_path_PATH_GROUPADD_PROG+:} false; then :
4987 $as_echo_n "(cached) " >&6
4988else
4989 case $PATH_GROUPADD_PROG in
4990 [\\/]* | ?:[\\/]*)
4991 ac_cv_path_PATH_GROUPADD_PROG="$PATH_GROUPADD_PROG" # Let the user override the test with a path.
4992 ;;
4993 *)
4994 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4995for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
4996do
4997 IFS=$as_save_IFS
4998 test -z "$as_dir" && as_dir=.
4999 for ac_exec_ext in '' $ac_executable_extensions; do
5000 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5001 ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext"
5002 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5003 break 2
5004 fi
5005done
5006 done
5007IFS=$as_save_IFS
5008
5009 test -z "$ac_cv_path_PATH_GROUPADD_PROG" && ac_cv_path_PATH_GROUPADD_PROG="groupadd"
5010 ;;
5011esac
5012fi
5013PATH_GROUPADD_PROG=$ac_cv_path_PATH_GROUPADD_PROG
5014if test -n "$PATH_GROUPADD_PROG"; then
5015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_GROUPADD_PROG" >&5
5016$as_echo "$PATH_GROUPADD_PROG" >&6; }
5017else
5018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5019$as_echo "no" >&6; }
5020fi
5021
5022
5023# Extract the first word of "useradd", so it can be a program name with args.
5024set dummy useradd; ac_word=$2
5025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5026$as_echo_n "checking for $ac_word... " >&6; }
5027if ${ac_cv_path_PATH_USERADD_PROG+:} false; then :
5028 $as_echo_n "(cached) " >&6
5029else
5030 case $PATH_USERADD_PROG in
5031 [\\/]* | ?:[\\/]*)
5032 ac_cv_path_PATH_USERADD_PROG="$PATH_USERADD_PROG" # Let the user override the test with a path.
5033 ;;
5034 *)
5035 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5036for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
5037do
5038 IFS=$as_save_IFS
5039 test -z "$as_dir" && as_dir=.
5040 for ac_exec_ext in '' $ac_executable_extensions; do
5041 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5042 ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext"
5043 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5044 break 2
5045 fi
5046done
5047 done
5048IFS=$as_save_IFS
5049
5050 test -z "$ac_cv_path_PATH_USERADD_PROG" && ac_cv_path_PATH_USERADD_PROG="useradd"
5051 ;;
5052esac
5053fi
5054PATH_USERADD_PROG=$ac_cv_path_PATH_USERADD_PROG
5055if test -n "$PATH_USERADD_PROG"; then
5056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_USERADD_PROG" >&5
5057$as_echo "$PATH_USERADD_PROG" >&6; }
5058else
5059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5060$as_echo "no" >&6; }
5061fi
5062
5063
5064# Extract the first word of "pkgmk", so it can be a program name with args.
5065set dummy pkgmk; ac_word=$2
5066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5067$as_echo_n "checking for $ac_word... " >&6; }
5068if ${ac_cv_prog_MAKE_PACKAGE_SUPPORTED+:} false; then :
5069 $as_echo_n "(cached) " >&6
5070else
5071 if test -n "$MAKE_PACKAGE_SUPPORTED"; then
5072 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="$MAKE_PACKAGE_SUPPORTED" # Let the user override the test.
5073else
5074as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5075for as_dir in $PATH
5076do
5077 IFS=$as_save_IFS
5078 test -z "$as_dir" && as_dir=.
5079 for ac_exec_ext in '' $ac_executable_extensions; do
5080 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5081 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes"
5082 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5083 break 2
5084 fi
5085done
5086 done
5087IFS=$as_save_IFS
5088
5089 test -z "$ac_cv_prog_MAKE_PACKAGE_SUPPORTED" && ac_cv_prog_MAKE_PACKAGE_SUPPORTED="no"
5090fi
5091fi
5092MAKE_PACKAGE_SUPPORTED=$ac_cv_prog_MAKE_PACKAGE_SUPPORTED
5093if test -n "$MAKE_PACKAGE_SUPPORTED"; then
5094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE_PACKAGE_SUPPORTED" >&5
5095$as_echo "$MAKE_PACKAGE_SUPPORTED" >&6; }
5096else
5097 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5098$as_echo "no" >&6; }
5099fi
5100
5101
5102if test -x /sbin/sh; then
5103 STARTUP_SCRIPT_SHELL=/sbin/sh
5104
5105else
5106 STARTUP_SCRIPT_SHELL=/bin/sh
5107
5108fi
5109
5110# System features
5111# Check whether --enable-largefile was given.
5112if test "${enable_largefile+set}" = set; then :
5113 enableval=$enable_largefile;
5114fi
5115
5116if test "$enable_largefile" != no; then
5117
5118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5119$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5120if ${ac_cv_sys_largefile_CC+:} false; then :
5121 $as_echo_n "(cached) " >&6
5122else
5123 ac_cv_sys_largefile_CC=no
5124 if test "$GCC" != yes; then
5125 ac_save_CC=$CC
5126 while :; do
5127 # IRIX 6.2 and later do not support large files by default,
5128 # so use the C compiler's -n32 option if that helps.
5129 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5130/* end confdefs.h. */
5131#include <sys/types.h>
5132 /* Check that off_t can represent 2**63 - 1 correctly.
5133 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5134 since some C++ compilers masquerading as C compilers
5135 incorrectly reject 9223372036854775807. */
5136#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5137 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5138 && LARGE_OFF_T % 2147483647 == 1)
5139 ? 1 : -1];
5140int
5141main ()
5142{
5143
5144 ;
5145 return 0;
5146}
5147_ACEOF
5148 if ac_fn_c_try_compile "$LINENO"; then :
5149 break
5150fi
5151rm -f core conftest.err conftest.$ac_objext
5152 CC="$CC -n32"
5153 if ac_fn_c_try_compile "$LINENO"; then :
5154 ac_cv_sys_largefile_CC=' -n32'; break
5155fi
5156rm -f core conftest.err conftest.$ac_objext
5157 break
5158 done
5159 CC=$ac_save_CC
5160 rm -f conftest.$ac_ext
5161 fi
5162fi
5163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5164$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5165 if test "$ac_cv_sys_largefile_CC" != no; then
5166 CC=$CC$ac_cv_sys_largefile_CC
5167 fi
5168
5169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5170$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5171if ${ac_cv_sys_file_offset_bits+:} false; then :
5172 $as_echo_n "(cached) " >&6
5173else
5174 while :; do
5175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5176/* end confdefs.h. */
5177#include <sys/types.h>
5178 /* Check that off_t can represent 2**63 - 1 correctly.
5179 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5180 since some C++ compilers masquerading as C compilers
5181 incorrectly reject 9223372036854775807. */
5182#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5183 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5184 && LARGE_OFF_T % 2147483647 == 1)
5185 ? 1 : -1];
5186int
5187main ()
5188{
5189
5190 ;
5191 return 0;
5192}
5193_ACEOF
5194if ac_fn_c_try_compile "$LINENO"; then :
5195 ac_cv_sys_file_offset_bits=no; break
5196fi
5197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5199/* end confdefs.h. */
5200#define _FILE_OFFSET_BITS 64
5201#include <sys/types.h>
5202 /* Check that off_t can represent 2**63 - 1 correctly.
5203 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5204 since some C++ compilers masquerading as C compilers
5205 incorrectly reject 9223372036854775807. */
5206#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5207 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5208 && LARGE_OFF_T % 2147483647 == 1)
5209 ? 1 : -1];
5210int
5211main ()
5212{
5213
5214 ;
5215 return 0;
5216}
5217_ACEOF
5218if ac_fn_c_try_compile "$LINENO"; then :
5219 ac_cv_sys_file_offset_bits=64; break
5220fi
5221rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5222 ac_cv_sys_file_offset_bits=unknown
5223 break
5224done
5225fi
5226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5227$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5228case $ac_cv_sys_file_offset_bits in #(
5229 no | unknown) ;;
5230 *)
5231cat >>confdefs.h <<_ACEOF
5232#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5233_ACEOF
5234;;
5235esac
5236rm -rf conftest*
5237 if test $ac_cv_sys_file_offset_bits = unknown; then
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5239$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5240if ${ac_cv_sys_large_files+:} false; then :
5241 $as_echo_n "(cached) " >&6
5242else
5243 while :; do
5244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5245/* end confdefs.h. */
5246#include <sys/types.h>
5247 /* Check that off_t can represent 2**63 - 1 correctly.
5248 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5249 since some C++ compilers masquerading as C compilers
5250 incorrectly reject 9223372036854775807. */
5251#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5252 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5253 && LARGE_OFF_T % 2147483647 == 1)
5254 ? 1 : -1];
5255int
5256main ()
5257{
5258
5259 ;
5260 return 0;
5261}
5262_ACEOF
5263if ac_fn_c_try_compile "$LINENO"; then :
5264 ac_cv_sys_large_files=no; break
5265fi
5266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5268/* end confdefs.h. */
5269#define _LARGE_FILES 1
5270#include <sys/types.h>
5271 /* Check that off_t can represent 2**63 - 1 correctly.
5272 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5273 since some C++ compilers masquerading as C compilers
5274 incorrectly reject 9223372036854775807. */
5275#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5276 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5277 && LARGE_OFF_T % 2147483647 == 1)
5278 ? 1 : -1];
5279int
5280main ()
5281{
5282
5283 ;
5284 return 0;
5285}
5286_ACEOF
5287if ac_fn_c_try_compile "$LINENO"; then :
5288 ac_cv_sys_large_files=1; break
5289fi
5290rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5291 ac_cv_sys_large_files=unknown
5292 break
5293done
5294fi
5295{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5296$as_echo "$ac_cv_sys_large_files" >&6; }
5297case $ac_cv_sys_large_files in #(
5298 no | unknown) ;;
5299 *)
5300cat >>confdefs.h <<_ACEOF
5301#define _LARGE_FILES $ac_cv_sys_large_files
5302_ACEOF
5303;;
5304esac
5305rm -rf conftest*
5306 fi
5307
5308
5309fi
5310
5311
5312if test -z "$AR" ; then
5313 as_fn_error $? "*** 'ar' missing, please install or fix your \$PATH ***" "$LINENO" 5
5314fi
5315
5316# Extract the first word of "passwd", so it can be a program name with args.
5317set dummy passwd; ac_word=$2
5318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5319$as_echo_n "checking for $ac_word... " >&6; }
5320if ${ac_cv_path_PATH_PASSWD_PROG+:} false; then :
5321 $as_echo_n "(cached) " >&6
5322else
5323 case $PATH_PASSWD_PROG in
5324 [\\/]* | ?:[\\/]*)
5325 ac_cv_path_PATH_PASSWD_PROG="$PATH_PASSWD_PROG" # Let the user override the test with a path.
5326 ;;
5327 *)
5328 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5329for as_dir in $PATH
5330do
5331 IFS=$as_save_IFS
5332 test -z "$as_dir" && as_dir=.
5333 for ac_exec_ext in '' $ac_executable_extensions; do
5334 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5335 ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext"
5336 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5337 break 2
5338 fi
5339done
5340 done
5341IFS=$as_save_IFS
5342
5343 ;;
5344esac
5345fi
5346PATH_PASSWD_PROG=$ac_cv_path_PATH_PASSWD_PROG
5347if test -n "$PATH_PASSWD_PROG"; then
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_PASSWD_PROG" >&5
5349$as_echo "$PATH_PASSWD_PROG" >&6; }
5350else
5351 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5352$as_echo "no" >&6; }
5353fi
5354
5355
5356if test ! -z "$PATH_PASSWD_PROG" ; then
5357
5358cat >>confdefs.h <<_ACEOF
5359#define _PATH_PASSWD_PROG "$PATH_PASSWD_PROG"
5360_ACEOF
5361
5362fi
5363
5364LD="$CC"
5365
5366
5367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5368$as_echo_n "checking for inline... " >&6; }
5369if ${ac_cv_c_inline+:} false; then :
5370 $as_echo_n "(cached) " >&6
5371else
5372 ac_cv_c_inline=no
5373for ac_kw in inline __inline__ __inline; do
5374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5375/* end confdefs.h. */
5376#ifndef __cplusplus
5377typedef int foo_t;
5378static $ac_kw foo_t static_foo () {return 0; }
5379$ac_kw foo_t foo () {return 0; }
5380#endif
5381
5382_ACEOF
5383if ac_fn_c_try_compile "$LINENO"; then :
5384 ac_cv_c_inline=$ac_kw
5385fi
5386rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5387 test "$ac_cv_c_inline" != no && break
5388done
5389
5390fi
5391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5392$as_echo "$ac_cv_c_inline" >&6; }
5393
5394case $ac_cv_c_inline in
5395 inline | yes) ;;
5396 *)
5397 case $ac_cv_c_inline in
5398 no) ac_val=;;
5399 *) ac_val=$ac_cv_c_inline;;
5400 esac
5401 cat >>confdefs.h <<_ACEOF
5402#ifndef __cplusplus
5403#define inline $ac_val
5404#endif
5405_ACEOF
5406 ;;
5407esac
5408
5409
5410ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
5411"
5412if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
5413 have_llong_max=1
5414fi
5415
5416ac_fn_c_check_decl "$LINENO" "LONG_LONG_MAX" "ac_cv_have_decl_LONG_LONG_MAX" "#include <limits.h>
5417"
5418if test "x$ac_cv_have_decl_LONG_LONG_MAX" = xyes; then :
5419 have_long_long_max=1
5420fi
5421
5422ac_fn_c_check_decl "$LINENO" "SYSTR_POLICY_KILL" "ac_cv_have_decl_SYSTR_POLICY_KILL" "
5423 #include <sys/types.h>
5424 #include <sys/param.h>
5425 #include <dev/systrace.h>
5426
5427"
5428if test "x$ac_cv_have_decl_SYSTR_POLICY_KILL" = xyes; then :
5429 have_systr_policy_kill=1
5430fi
5431
5432ac_fn_c_check_decl "$LINENO" "RLIMIT_NPROC" "ac_cv_have_decl_RLIMIT_NPROC" "
5433 #include <sys/types.h>
5434 #include <sys/resource.h>
5435
5436"
5437if test "x$ac_cv_have_decl_RLIMIT_NPROC" = xyes; then :
5438
5439$as_echo "#define HAVE_RLIMIT_NPROC /**/" >>confdefs.h
5440
5441fi
5442
5443ac_fn_c_check_decl "$LINENO" "PR_SET_NO_NEW_PRIVS" "ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" "
5444 #include <sys/types.h>
5445 #include <linux/prctl.h>
5446
5447"
5448if test "x$ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" = xyes; then :
5449 have_linux_no_new_privs=1
5450fi
5451
5452
5453openssl=yes
5454
5455# Check whether --with-openssl was given.
5456if test "${with_openssl+set}" = set; then :
5457 withval=$with_openssl; if test "x$withval" = "xno" ; then
5458 openssl=no
5459 fi
5460
5461
5462fi
5463
5464{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL will be used for cryptography" >&5
5465$as_echo_n "checking whether OpenSSL will be used for cryptography... " >&6; }
5466if test "x$openssl" = "xyes" ; then
5467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5468$as_echo "yes" >&6; }
5469
5470cat >>confdefs.h <<_ACEOF
5471#define WITH_OPENSSL 1
5472_ACEOF
5473
5474else
5475 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5476$as_echo "no" >&6; }
5477fi
5478
5479use_stack_protector=1
5480use_toolchain_hardening=1
5481
5482# Check whether --with-stackprotect was given.
5483if test "${with_stackprotect+set}" = set; then :
5484 withval=$with_stackprotect;
5485 if test "x$withval" = "xno"; then
5486 use_stack_protector=0
5487 fi
5488fi
5489
5490
5491# Check whether --with-hardening was given.
5492if test "${with_hardening+set}" = set; then :
5493 withval=$with_hardening;
5494 if test "x$withval" = "xno"; then
5495 use_toolchain_hardening=0
5496 fi
5497fi
5498
5499
5500# We use -Werror for the tests only so that we catch warnings like "this is
5501# on by default" for things like -fPIE.
5502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5
5503$as_echo_n "checking if $CC supports -Werror... " >&6; }
5504saved_CFLAGS="$CFLAGS"
5505CFLAGS="$CFLAGS -Werror"
5506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5507/* end confdefs.h. */
5508int main(void) { return 0; }
5509_ACEOF
5510if ac_fn_c_try_compile "$LINENO"; then :
5511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5512$as_echo "yes" >&6; }
5513 WERROR="-Werror"
5514else
5515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5516$as_echo "no" >&6; }
5517 WERROR=""
5518
5519fi
5520rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5521CFLAGS="$saved_CFLAGS"
5522
5523if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
5524 {
5525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -pipe" >&5
5526$as_echo_n "checking if $CC supports compile flag -pipe... " >&6; }
5527 saved_CFLAGS="$CFLAGS"
5528 CFLAGS="$CFLAGS $WERROR -pipe"
5529 _define_flag=""
5530 test "x$_define_flag" = "x" && _define_flag="-pipe"
5531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5532/* end confdefs.h. */
5533
5534#include <stdlib.h>
5535#include <stdio.h>
5536int main(int argc, char **argv) {
5537 /* Some math to catch -ftrapv problems in the toolchain */
5538 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5539 float l = i * 2.1;
5540 double m = l / 0.5;
5541 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5542 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5543 exit(0);
5544}
5545
5546_ACEOF
5547if ac_fn_c_try_compile "$LINENO"; then :
5548
5549if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5550then
5551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5552$as_echo "no" >&6; }
5553 CFLAGS="$saved_CFLAGS"
5554else
5555 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5556$as_echo "yes" >&6; }
5557 CFLAGS="$saved_CFLAGS $_define_flag"
5558fi
5559else
5560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5561$as_echo "no" >&6; }
5562 CFLAGS="$saved_CFLAGS"
5563
5564fi
5565rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5566}
5567 {
5568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wunknown-warning-option" >&5
5569$as_echo_n "checking if $CC supports compile flag -Wunknown-warning-option... " >&6; }
5570 saved_CFLAGS="$CFLAGS"
5571 CFLAGS="$CFLAGS $WERROR -Wunknown-warning-option"
5572 _define_flag=""
5573 test "x$_define_flag" = "x" && _define_flag="-Wunknown-warning-option"
5574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5575/* end confdefs.h. */
5576
5577#include <stdlib.h>
5578#include <stdio.h>
5579int main(int argc, char **argv) {
5580 /* Some math to catch -ftrapv problems in the toolchain */
5581 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5582 float l = i * 2.1;
5583 double m = l / 0.5;
5584 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5585 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5586 exit(0);
5587}
5588
5589_ACEOF
5590if ac_fn_c_try_compile "$LINENO"; then :
5591
5592if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5593then
5594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5595$as_echo "no" >&6; }
5596 CFLAGS="$saved_CFLAGS"
5597else
5598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5599$as_echo "yes" >&6; }
5600 CFLAGS="$saved_CFLAGS $_define_flag"
5601fi
5602else
5603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5604$as_echo "no" >&6; }
5605 CFLAGS="$saved_CFLAGS"
5606
5607fi
5608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5609}
5610 {
5611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wno-error=format-truncation" >&5
5612$as_echo_n "checking if $CC supports compile flag -Wno-error=format-truncation... " >&6; }
5613 saved_CFLAGS="$CFLAGS"
5614 CFLAGS="$CFLAGS $WERROR -Wno-error=format-truncation"
5615 _define_flag=""
5616 test "x$_define_flag" = "x" && _define_flag="-Wno-error=format-truncation"
5617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5618/* end confdefs.h. */
5619
5620#include <stdlib.h>
5621#include <stdio.h>
5622int main(int argc, char **argv) {
5623 /* Some math to catch -ftrapv problems in the toolchain */
5624 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5625 float l = i * 2.1;
5626 double m = l / 0.5;
5627 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5628 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5629 exit(0);
5630}
5631
5632_ACEOF
5633if ac_fn_c_try_compile "$LINENO"; then :
5634
5635if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5636then
5637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5638$as_echo "no" >&6; }
5639 CFLAGS="$saved_CFLAGS"
5640else
5641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5642$as_echo "yes" >&6; }
5643 CFLAGS="$saved_CFLAGS $_define_flag"
5644fi
5645else
5646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5647$as_echo "no" >&6; }
5648 CFLAGS="$saved_CFLAGS"
5649
5650fi
5651rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5652}
5653 {
5654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Qunused-arguments" >&5
5655$as_echo_n "checking if $CC supports compile flag -Qunused-arguments... " >&6; }
5656 saved_CFLAGS="$CFLAGS"
5657 CFLAGS="$CFLAGS $WERROR -Qunused-arguments"
5658 _define_flag=""
5659 test "x$_define_flag" = "x" && _define_flag="-Qunused-arguments"
5660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5661/* end confdefs.h. */
5662
5663#include <stdlib.h>
5664#include <stdio.h>
5665int main(int argc, char **argv) {
5666 /* Some math to catch -ftrapv problems in the toolchain */
5667 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5668 float l = i * 2.1;
5669 double m = l / 0.5;
5670 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5671 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5672 exit(0);
5673}
5674
5675_ACEOF
5676if ac_fn_c_try_compile "$LINENO"; then :
5677
5678if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5679then
5680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5681$as_echo "no" >&6; }
5682 CFLAGS="$saved_CFLAGS"
5683else
5684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5685$as_echo "yes" >&6; }
5686 CFLAGS="$saved_CFLAGS $_define_flag"
5687fi
5688else
5689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5690$as_echo "no" >&6; }
5691 CFLAGS="$saved_CFLAGS"
5692
5693fi
5694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5695}
5696 {
5697 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wall" >&5
5698$as_echo_n "checking if $CC supports compile flag -Wall... " >&6; }
5699 saved_CFLAGS="$CFLAGS"
5700 CFLAGS="$CFLAGS $WERROR -Wall"
5701 _define_flag=""
5702 test "x$_define_flag" = "x" && _define_flag="-Wall"
5703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5704/* end confdefs.h. */
5705
5706#include <stdlib.h>
5707#include <stdio.h>
5708int main(int argc, char **argv) {
5709 /* Some math to catch -ftrapv problems in the toolchain */
5710 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5711 float l = i * 2.1;
5712 double m = l / 0.5;
5713 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5714 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5715 exit(0);
5716}
5717
5718_ACEOF
5719if ac_fn_c_try_compile "$LINENO"; then :
5720
5721if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5722then
5723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5724$as_echo "no" >&6; }
5725 CFLAGS="$saved_CFLAGS"
5726else
5727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5728$as_echo "yes" >&6; }
5729 CFLAGS="$saved_CFLAGS $_define_flag"
5730fi
5731else
5732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5733$as_echo "no" >&6; }
5734 CFLAGS="$saved_CFLAGS"
5735
5736fi
5737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5738}
5739 {
5740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wextra" >&5
5741$as_echo_n "checking if $CC supports compile flag -Wextra... " >&6; }
5742 saved_CFLAGS="$CFLAGS"
5743 CFLAGS="$CFLAGS $WERROR -Wextra"
5744 _define_flag=""
5745 test "x$_define_flag" = "x" && _define_flag="-Wextra"
5746 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5747/* end confdefs.h. */
5748
5749#include <stdlib.h>
5750#include <stdio.h>
5751int main(int argc, char **argv) {
5752 /* Some math to catch -ftrapv problems in the toolchain */
5753 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5754 float l = i * 2.1;
5755 double m = l / 0.5;
5756 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5757 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5758 exit(0);
5759}
5760
5761_ACEOF
5762if ac_fn_c_try_compile "$LINENO"; then :
5763
5764if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5765then
5766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5767$as_echo "no" >&6; }
5768 CFLAGS="$saved_CFLAGS"
5769else
5770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5771$as_echo "yes" >&6; }
5772 CFLAGS="$saved_CFLAGS $_define_flag"
5773fi
5774else
5775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5776$as_echo "no" >&6; }
5777 CFLAGS="$saved_CFLAGS"
5778
5779fi
5780rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5781}
5782 {
5783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wpointer-arith" >&5
5784$as_echo_n "checking if $CC supports compile flag -Wpointer-arith... " >&6; }
5785 saved_CFLAGS="$CFLAGS"
5786 CFLAGS="$CFLAGS $WERROR -Wpointer-arith"
5787 _define_flag=""
5788 test "x$_define_flag" = "x" && _define_flag="-Wpointer-arith"
5789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5790/* end confdefs.h. */
5791
5792#include <stdlib.h>
5793#include <stdio.h>
5794int main(int argc, char **argv) {
5795 /* Some math to catch -ftrapv problems in the toolchain */
5796 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5797 float l = i * 2.1;
5798 double m = l / 0.5;
5799 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5800 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5801 exit(0);
5802}
5803
5804_ACEOF
5805if ac_fn_c_try_compile "$LINENO"; then :
5806
5807if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5808then
5809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5810$as_echo "no" >&6; }
5811 CFLAGS="$saved_CFLAGS"
5812else
5813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5814$as_echo "yes" >&6; }
5815 CFLAGS="$saved_CFLAGS $_define_flag"
5816fi
5817else
5818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5819$as_echo "no" >&6; }
5820 CFLAGS="$saved_CFLAGS"
5821
5822fi
5823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5824}
5825 {
5826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wuninitialized" >&5
5827$as_echo_n "checking if $CC supports compile flag -Wuninitialized... " >&6; }
5828 saved_CFLAGS="$CFLAGS"
5829 CFLAGS="$CFLAGS $WERROR -Wuninitialized"
5830 _define_flag=""
5831 test "x$_define_flag" = "x" && _define_flag="-Wuninitialized"
5832 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5833/* end confdefs.h. */
5834
5835#include <stdlib.h>
5836#include <stdio.h>
5837int main(int argc, char **argv) {
5838 /* Some math to catch -ftrapv problems in the toolchain */
5839 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5840 float l = i * 2.1;
5841 double m = l / 0.5;
5842 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5843 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5844 exit(0);
5845}
5846
5847_ACEOF
5848if ac_fn_c_try_compile "$LINENO"; then :
5849
5850if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5851then
5852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5853$as_echo "no" >&6; }
5854 CFLAGS="$saved_CFLAGS"
5855else
5856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5857$as_echo "yes" >&6; }
5858 CFLAGS="$saved_CFLAGS $_define_flag"
5859fi
5860else
5861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5862$as_echo "no" >&6; }
5863 CFLAGS="$saved_CFLAGS"
5864
5865fi
5866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5867}
5868 {
5869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wsign-compare" >&5
5870$as_echo_n "checking if $CC supports compile flag -Wsign-compare... " >&6; }
5871 saved_CFLAGS="$CFLAGS"
5872 CFLAGS="$CFLAGS $WERROR -Wsign-compare"
5873 _define_flag=""
5874 test "x$_define_flag" = "x" && _define_flag="-Wsign-compare"
5875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5876/* end confdefs.h. */
5877
5878#include <stdlib.h>
5879#include <stdio.h>
5880int main(int argc, char **argv) {
5881 /* Some math to catch -ftrapv problems in the toolchain */
5882 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5883 float l = i * 2.1;
5884 double m = l / 0.5;
5885 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5886 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5887 exit(0);
5888}
5889
5890_ACEOF
5891if ac_fn_c_try_compile "$LINENO"; then :
5892
5893if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5894then
5895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5896$as_echo "no" >&6; }
5897 CFLAGS="$saved_CFLAGS"
5898else
5899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5900$as_echo "yes" >&6; }
5901 CFLAGS="$saved_CFLAGS $_define_flag"
5902fi
5903else
5904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5905$as_echo "no" >&6; }
5906 CFLAGS="$saved_CFLAGS"
5907
5908fi
5909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5910}
5911 {
5912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wformat-security" >&5
5913$as_echo_n "checking if $CC supports compile flag -Wformat-security... " >&6; }
5914 saved_CFLAGS="$CFLAGS"
5915 CFLAGS="$CFLAGS $WERROR -Wformat-security"
5916 _define_flag=""
5917 test "x$_define_flag" = "x" && _define_flag="-Wformat-security"
5918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5919/* end confdefs.h. */
5920
5921#include <stdlib.h>
5922#include <stdio.h>
5923int main(int argc, char **argv) {
5924 /* Some math to catch -ftrapv problems in the toolchain */
5925 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5926 float l = i * 2.1;
5927 double m = l / 0.5;
5928 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5929 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5930 exit(0);
5931}
5932
5933_ACEOF
5934if ac_fn_c_try_compile "$LINENO"; then :
5935
5936if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5937then
5938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5939$as_echo "no" >&6; }
5940 CFLAGS="$saved_CFLAGS"
5941else
5942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5943$as_echo "yes" >&6; }
5944 CFLAGS="$saved_CFLAGS $_define_flag"
5945fi
5946else
5947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5948$as_echo "no" >&6; }
5949 CFLAGS="$saved_CFLAGS"
5950
5951fi
5952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5953}
5954 {
5955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wsizeof-pointer-memaccess" >&5
5956$as_echo_n "checking if $CC supports compile flag -Wsizeof-pointer-memaccess... " >&6; }
5957 saved_CFLAGS="$CFLAGS"
5958 CFLAGS="$CFLAGS $WERROR -Wsizeof-pointer-memaccess"
5959 _define_flag=""
5960 test "x$_define_flag" = "x" && _define_flag="-Wsizeof-pointer-memaccess"
5961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5962/* end confdefs.h. */
5963
5964#include <stdlib.h>
5965#include <stdio.h>
5966int main(int argc, char **argv) {
5967 /* Some math to catch -ftrapv problems in the toolchain */
5968 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5969 float l = i * 2.1;
5970 double m = l / 0.5;
5971 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5972 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5973 exit(0);
5974}
5975
5976_ACEOF
5977if ac_fn_c_try_compile "$LINENO"; then :
5978
5979if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5980then
5981 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5982$as_echo "no" >&6; }
5983 CFLAGS="$saved_CFLAGS"
5984else
5985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5986$as_echo "yes" >&6; }
5987 CFLAGS="$saved_CFLAGS $_define_flag"
5988fi
5989else
5990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5991$as_echo "no" >&6; }
5992 CFLAGS="$saved_CFLAGS"
5993
5994fi
5995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5996}
5997 {
5998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wpointer-sign" >&5
5999$as_echo_n "checking if $CC supports compile flag -Wpointer-sign... " >&6; }
6000 saved_CFLAGS="$CFLAGS"
6001 CFLAGS="$CFLAGS $WERROR -Wpointer-sign"
6002 _define_flag="-Wno-pointer-sign"
6003 test "x$_define_flag" = "x" && _define_flag="-Wpointer-sign"
6004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6005/* end confdefs.h. */
6006
6007#include <stdlib.h>
6008#include <stdio.h>
6009int main(int argc, char **argv) {
6010 /* Some math to catch -ftrapv problems in the toolchain */
6011 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6012 float l = i * 2.1;
6013 double m = l / 0.5;
6014 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6015 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6016 exit(0);
6017}
6018
6019_ACEOF
6020if ac_fn_c_try_compile "$LINENO"; then :
6021
6022if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6023then
6024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6025$as_echo "no" >&6; }
6026 CFLAGS="$saved_CFLAGS"
6027else
6028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6029$as_echo "yes" >&6; }
6030 CFLAGS="$saved_CFLAGS $_define_flag"
6031fi
6032else
6033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6034$as_echo "no" >&6; }
6035 CFLAGS="$saved_CFLAGS"
6036
6037fi
6038rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6039}
6040 {
6041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wunused-result" >&5
6042$as_echo_n "checking if $CC supports compile flag -Wunused-result... " >&6; }
6043 saved_CFLAGS="$CFLAGS"
6044 CFLAGS="$CFLAGS $WERROR -Wunused-result"
6045 _define_flag="-Wno-unused-result"
6046 test "x$_define_flag" = "x" && _define_flag="-Wunused-result"
6047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6048/* end confdefs.h. */
6049
6050#include <stdlib.h>
6051#include <stdio.h>
6052int main(int argc, char **argv) {
6053 /* Some math to catch -ftrapv problems in the toolchain */
6054 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6055 float l = i * 2.1;
6056 double m = l / 0.5;
6057 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6058 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6059 exit(0);
6060}
6061
6062_ACEOF
6063if ac_fn_c_try_compile "$LINENO"; then :
6064
6065if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6066then
6067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6068$as_echo "no" >&6; }
6069 CFLAGS="$saved_CFLAGS"
6070else
6071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6072$as_echo "yes" >&6; }
6073 CFLAGS="$saved_CFLAGS $_define_flag"
6074fi
6075else
6076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6077$as_echo "no" >&6; }
6078 CFLAGS="$saved_CFLAGS"
6079
6080fi
6081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6082}
6083 {
6084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wimplicit-fallthrough" >&5
6085$as_echo_n "checking if $CC supports compile flag -Wimplicit-fallthrough... " >&6; }
6086 saved_CFLAGS="$CFLAGS"
6087 CFLAGS="$CFLAGS $WERROR -Wimplicit-fallthrough"
6088 _define_flag=""
6089 test "x$_define_flag" = "x" && _define_flag="-Wimplicit-fallthrough"
6090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6091/* end confdefs.h. */
6092
6093#include <stdlib.h>
6094#include <stdio.h>
6095int main(int argc, char **argv) {
6096 /* Some math to catch -ftrapv problems in the toolchain */
6097 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6098 float l = i * 2.1;
6099 double m = l / 0.5;
6100 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6101 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6102 exit(0);
6103}
6104
6105_ACEOF
6106if ac_fn_c_try_compile "$LINENO"; then :
6107
6108if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6109then
6110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6111$as_echo "no" >&6; }
6112 CFLAGS="$saved_CFLAGS"
6113else
6114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6115$as_echo "yes" >&6; }
6116 CFLAGS="$saved_CFLAGS $_define_flag"
6117fi
6118else
6119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6120$as_echo "no" >&6; }
6121 CFLAGS="$saved_CFLAGS"
6122
6123fi
6124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6125}
6126 {
6127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -fno-strict-aliasing" >&5
6128$as_echo_n "checking if $CC supports compile flag -fno-strict-aliasing... " >&6; }
6129 saved_CFLAGS="$CFLAGS"
6130 CFLAGS="$CFLAGS $WERROR -fno-strict-aliasing"
6131 _define_flag=""
6132 test "x$_define_flag" = "x" && _define_flag="-fno-strict-aliasing"
6133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6134/* end confdefs.h. */
6135
6136#include <stdlib.h>
6137#include <stdio.h>
6138int main(int argc, char **argv) {
6139 /* Some math to catch -ftrapv problems in the toolchain */
6140 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6141 float l = i * 2.1;
6142 double m = l / 0.5;
6143 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6144 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6145 exit(0);
6146}
6147
6148_ACEOF
6149if ac_fn_c_try_compile "$LINENO"; then :
6150
6151if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6152then
6153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6154$as_echo "no" >&6; }
6155 CFLAGS="$saved_CFLAGS"
6156else
6157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6158$as_echo "yes" >&6; }
6159 CFLAGS="$saved_CFLAGS $_define_flag"
6160fi
6161else
6162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6163$as_echo "no" >&6; }
6164 CFLAGS="$saved_CFLAGS"
6165
6166fi
6167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6168}
6169 if test "x$use_toolchain_hardening" = "x1"; then
6170 {
6171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -mretpoline" >&5
6172$as_echo_n "checking if $CC supports compile flag -mretpoline... " >&6; }
6173 saved_CFLAGS="$CFLAGS"
6174 CFLAGS="$CFLAGS $WERROR -mretpoline"
6175 _define_flag=""
6176 test "x$_define_flag" = "x" && _define_flag="-mretpoline"
6177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6178/* end confdefs.h. */
6179
6180#include <stdlib.h>
6181#include <stdio.h>
6182int main(int argc, char **argv) {
6183 /* Some math to catch -ftrapv problems in the toolchain */
6184 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6185 float l = i * 2.1;
6186 double m = l / 0.5;
6187 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6188 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6189 exit(0);
6190}
6191
6192_ACEOF
6193if ac_fn_c_try_compile "$LINENO"; then :
6194
6195if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6196then
6197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6198$as_echo "no" >&6; }
6199 CFLAGS="$saved_CFLAGS"
6200else
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6202$as_echo "yes" >&6; }
6203 CFLAGS="$saved_CFLAGS $_define_flag"
6204fi
6205else
6206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6207$as_echo "no" >&6; }
6208 CFLAGS="$saved_CFLAGS"
6209
6210fi
6211rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6212} # clang
6213 {
6214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,retpolineplt" >&5
6215$as_echo_n "checking if $LD supports link flag -Wl,-z,retpolineplt... " >&6; }
6216 saved_LDFLAGS="$LDFLAGS"
6217 LDFLAGS="$LDFLAGS $WERROR -Wl,-z,retpolineplt"
6218 _define_flag=""
6219 test "x$_define_flag" = "x" && _define_flag="-Wl,-z,retpolineplt"
6220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6221/* end confdefs.h. */
6222
6223#include <stdlib.h>
6224#include <stdio.h>
6225int main(int argc, char **argv) {
6226 /* Some math to catch -ftrapv problems in the toolchain */
6227 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6228 float l = i * 2.1;
6229 double m = l / 0.5;
6230 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6231 long long p = n * o;
6232 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
6233 exit(0);
6234}
6235
6236_ACEOF
6237if ac_fn_c_try_link "$LINENO"; then :
6238
6239if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6240then
6241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6242$as_echo "no" >&6; }
6243 LDFLAGS="$saved_LDFLAGS"
6244else
6245 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6246$as_echo "yes" >&6; }
6247 LDFLAGS="$saved_LDFLAGS $_define_flag"
6248fi
6249else
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6251$as_echo "no" >&6; }
6252 LDFLAGS="$saved_LDFLAGS"
6253
6254fi
6255rm -f core conftest.err conftest.$ac_objext \
6256 conftest$ac_exeext conftest.$ac_ext
6257}
6258 {
6259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -D_FORTIFY_SOURCE=2" >&5
6260$as_echo_n "checking if $CC supports compile flag -D_FORTIFY_SOURCE=2... " >&6; }
6261 saved_CFLAGS="$CFLAGS"
6262 CFLAGS="$CFLAGS $WERROR -D_FORTIFY_SOURCE=2"
6263 _define_flag=""
6264 test "x$_define_flag" = "x" && _define_flag="-D_FORTIFY_SOURCE=2"
6265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6266/* end confdefs.h. */
6267
6268#include <stdlib.h>
6269#include <stdio.h>
6270int main(int argc, char **argv) {
6271 /* Some math to catch -ftrapv problems in the toolchain */
6272 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6273 float l = i * 2.1;
6274 double m = l / 0.5;
6275 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6276 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6277 exit(0);
6278}
6279
6280_ACEOF
6281if ac_fn_c_try_compile "$LINENO"; then :
6282
6283if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6284then
6285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6286$as_echo "no" >&6; }
6287 CFLAGS="$saved_CFLAGS"
6288else
6289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6290$as_echo "yes" >&6; }
6291 CFLAGS="$saved_CFLAGS $_define_flag"
6292fi
6293else
6294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6295$as_echo "no" >&6; }
6296 CFLAGS="$saved_CFLAGS"
6297
6298fi
6299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6300}
6301 {
6302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,relro" >&5
6303$as_echo_n "checking if $LD supports link flag -Wl,-z,relro... " >&6; }
6304 saved_LDFLAGS="$LDFLAGS"
6305 LDFLAGS="$LDFLAGS $WERROR -Wl,-z,relro"
6306 _define_flag=""
6307 test "x$_define_flag" = "x" && _define_flag="-Wl,-z,relro"
6308 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6309/* end confdefs.h. */
6310
6311#include <stdlib.h>
6312#include <stdio.h>
6313int main(int argc, char **argv) {
6314 /* Some math to catch -ftrapv problems in the toolchain */
6315 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6316 float l = i * 2.1;
6317 double m = l / 0.5;
6318 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6319 long long p = n * o;
6320 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
6321 exit(0);
6322}
6323
6324_ACEOF
6325if ac_fn_c_try_link "$LINENO"; then :
6326
6327if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6328then
6329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6330$as_echo "no" >&6; }
6331 LDFLAGS="$saved_LDFLAGS"
6332else
6333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6334$as_echo "yes" >&6; }
6335 LDFLAGS="$saved_LDFLAGS $_define_flag"
6336fi
6337else
6338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6339$as_echo "no" >&6; }
6340 LDFLAGS="$saved_LDFLAGS"
6341
6342fi
6343rm -f core conftest.err conftest.$ac_objext \
6344 conftest$ac_exeext conftest.$ac_ext
6345}
6346 {
6347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,now" >&5
6348$as_echo_n "checking if $LD supports link flag -Wl,-z,now... " >&6; }
6349 saved_LDFLAGS="$LDFLAGS"
6350 LDFLAGS="$LDFLAGS $WERROR -Wl,-z,now"
6351 _define_flag=""
6352 test "x$_define_flag" = "x" && _define_flag="-Wl,-z,now"
6353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6354/* end confdefs.h. */
6355
6356#include <stdlib.h>
6357#include <stdio.h>
6358int main(int argc, char **argv) {
6359 /* Some math to catch -ftrapv problems in the toolchain */
6360 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6361 float l = i * 2.1;
6362 double m = l / 0.5;
6363 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6364 long long p = n * o;
6365 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
6366 exit(0);
6367}
6368
6369_ACEOF
6370if ac_fn_c_try_link "$LINENO"; then :
6371
6372if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6373then
6374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6375$as_echo "no" >&6; }
6376 LDFLAGS="$saved_LDFLAGS"
6377else
6378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6379$as_echo "yes" >&6; }
6380 LDFLAGS="$saved_LDFLAGS $_define_flag"
6381fi
6382else
6383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6384$as_echo "no" >&6; }
6385 LDFLAGS="$saved_LDFLAGS"
6386
6387fi
6388rm -f core conftest.err conftest.$ac_objext \
6389 conftest$ac_exeext conftest.$ac_ext
6390}
6391 {
6392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,noexecstack" >&5
6393$as_echo_n "checking if $LD supports link flag -Wl,-z,noexecstack... " >&6; }
6394 saved_LDFLAGS="$LDFLAGS"
6395 LDFLAGS="$LDFLAGS $WERROR -Wl,-z,noexecstack"
6396 _define_flag=""
6397 test "x$_define_flag" = "x" && _define_flag="-Wl,-z,noexecstack"
6398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6399/* end confdefs.h. */
6400
6401#include <stdlib.h>
6402#include <stdio.h>
6403int main(int argc, char **argv) {
6404 /* Some math to catch -ftrapv problems in the toolchain */
6405 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6406 float l = i * 2.1;
6407 double m = l / 0.5;
6408 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6409 long long p = n * o;
6410 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
6411 exit(0);
6412}
6413
6414_ACEOF
6415if ac_fn_c_try_link "$LINENO"; then :
6416
6417if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6418then
6419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6420$as_echo "no" >&6; }
6421 LDFLAGS="$saved_LDFLAGS"
6422else
6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6424$as_echo "yes" >&6; }
6425 LDFLAGS="$saved_LDFLAGS $_define_flag"
6426fi
6427else
6428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6429$as_echo "no" >&6; }
6430 LDFLAGS="$saved_LDFLAGS"
6431
6432fi
6433rm -f core conftest.err conftest.$ac_objext \
6434 conftest$ac_exeext conftest.$ac_ext
6435}
6436 # NB. -ftrapv expects certain support functions to be present in
6437 # the compiler library (libgcc or similar) to detect integer operations
6438 # that can overflow. We must check that the result of enabling it
6439 # actually links. The test program compiled/linked includes a number
6440 # of integer operations that should exercise this.
6441 {
6442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -ftrapv and linking succeeds" >&5
6443$as_echo_n "checking if $CC supports compile flag -ftrapv and linking succeeds... " >&6; }
6444 saved_CFLAGS="$CFLAGS"
6445 CFLAGS="$CFLAGS $WERROR -ftrapv"
6446 _define_flag=""
6447 test "x$_define_flag" = "x" && _define_flag="-ftrapv"
6448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6449/* end confdefs.h. */
6450
6451#include <stdlib.h>
6452#include <stdio.h>
6453int main(int argc, char **argv) {
6454 /* Some math to catch -ftrapv problems in the toolchain */
6455 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6456 float l = i * 2.1;
6457 double m = l / 0.5;
6458 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6459 long long int p = n * o;
6460 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
6461 exit(0);
6462}
6463
6464_ACEOF
6465if ac_fn_c_try_link "$LINENO"; then :
6466
6467if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6468then
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6470$as_echo "no" >&6; }
6471 CFLAGS="$saved_CFLAGS"
6472else
6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6474$as_echo "yes" >&6; }
6475 CFLAGS="$saved_CFLAGS $_define_flag"
6476fi
6477else
6478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6479$as_echo "no" >&6; }
6480 CFLAGS="$saved_CFLAGS"
6481
6482fi
6483rm -f core conftest.err conftest.$ac_objext \
6484 conftest$ac_exeext conftest.$ac_ext
6485}
6486 fi
6487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc version" >&5
6488$as_echo_n "checking gcc version... " >&6; }
6489 GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`
6490 case $GCC_VER in
6491 1.*) no_attrib_nonnull=1 ;;
6492 2.8* | 2.9*)
6493 no_attrib_nonnull=1
6494 ;;
6495 2.*) no_attrib_nonnull=1 ;;
6496 *) ;;
6497 esac
6498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC_VER" >&5
6499$as_echo "$GCC_VER" >&6; }
6500
6501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-builtin-memset" >&5
6502$as_echo_n "checking if $CC accepts -fno-builtin-memset... " >&6; }
6503 saved_CFLAGS="$CFLAGS"
6504 CFLAGS="$CFLAGS -fno-builtin-memset"
6505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6506/* end confdefs.h. */
6507 #include <string.h>
6508int
6509main ()
6510{
6511 char b[10]; memset(b, 0, sizeof(b));
6512 ;
6513 return 0;
6514}
6515_ACEOF
6516if ac_fn_c_try_link "$LINENO"; then :
6517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6518$as_echo "yes" >&6; }
6519else
6520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6521$as_echo "no" >&6; }
6522 CFLAGS="$saved_CFLAGS"
6523
6524fi
6525rm -f core conftest.err conftest.$ac_objext \
6526 conftest$ac_exeext conftest.$ac_ext
6527
6528 # -fstack-protector-all doesn't always work for some GCC versions
6529 # and/or platforms, so we test if we can. If it's not supported
6530 # on a given platform gcc will emit a warning so we use -Werror.
6531 if test "x$use_stack_protector" = "x1"; then
6532 for t in -fstack-protector-strong -fstack-protector-all \
6533 -fstack-protector; do
6534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports $t" >&5
6535$as_echo_n "checking if $CC supports $t... " >&6; }
6536 saved_CFLAGS="$CFLAGS"
6537 saved_LDFLAGS="$LDFLAGS"
6538 CFLAGS="$CFLAGS $t -Werror"
6539 LDFLAGS="$LDFLAGS $t -Werror"
6540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6541/* end confdefs.h. */
6542
6543 #include <stdio.h>
6544 int func (int t) {char b[100]; snprintf(b,sizeof b,"%d",t); return t;}
6545
6546int
6547main ()
6548{
6549
6550 char x[256];
6551 snprintf(x, sizeof(x), "XXX%d", func(1));
6552
6553 ;
6554 return 0;
6555}
6556_ACEOF
6557if ac_fn_c_try_link "$LINENO"; then :
6558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6559$as_echo "yes" >&6; }
6560 CFLAGS="$saved_CFLAGS $t"
6561 LDFLAGS="$saved_LDFLAGS $t"
6562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $t works" >&5
6563$as_echo_n "checking if $t works... " >&6; }
6564 if test "$cross_compiling" = yes; then :
6565 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: cannot test" >&5
6566$as_echo "$as_me: WARNING: cross compiling: cannot test" >&2;}
6567 break
6568
6569else
6570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6571/* end confdefs.h. */
6572
6573 #include <stdio.h>
6574 int func (int t) {char b[100]; snprintf(b,sizeof b,"%d",t); return t;}
6575
6576int
6577main ()
6578{
6579
6580 char x[256];
6581 snprintf(x, sizeof(x), "XXX%d", func(1));
6582
6583 ;
6584 return 0;
6585}
6586_ACEOF
6587if ac_fn_c_try_run "$LINENO"; then :
6588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6589$as_echo "yes" >&6; }
6590 break
6591else
6592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6593$as_echo "no" >&6; }
6594fi
6595rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6596 conftest.$ac_objext conftest.beam conftest.$ac_ext
6597fi
6598
6599
6600else
6601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6602$as_echo "no" >&6; }
6603
6604fi
6605rm -f core conftest.err conftest.$ac_objext \
6606 conftest$ac_exeext conftest.$ac_ext
6607 CFLAGS="$saved_CFLAGS"
6608 LDFLAGS="$saved_LDFLAGS"
6609 done
6610 fi
6611
6612 if test -z "$have_llong_max"; then
6613 # retry LLONG_MAX with -std=gnu99, needed on some Linuxes
6614 unset ac_cv_have_decl_LLONG_MAX
6615 saved_CFLAGS="$CFLAGS"
6616 CFLAGS="$CFLAGS -std=gnu99"
6617 ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
6618
6619"
6620if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
6621 have_llong_max=1
6622else
6623 CFLAGS="$saved_CFLAGS"
6624fi
6625
6626 fi
6627fi
6628
6629{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows __attribute__ on return types" >&5
6630$as_echo_n "checking if compiler allows __attribute__ on return types... " >&6; }
6631cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6632/* end confdefs.h. */
6633
6634#include <stdlib.h>
6635__attribute__((__unused__)) static void foo(void){return;}
6636int
6637main ()
6638{
6639 exit(0);
6640 ;
6641 return 0;
6642}
6643_ACEOF
6644if ac_fn_c_try_compile "$LINENO"; then :
6645 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6646$as_echo "yes" >&6; }
6647else
6648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6649$as_echo "no" >&6; }
6650
6651$as_echo "#define NO_ATTRIBUTE_ON_RETURN_TYPE 1" >>confdefs.h
6652
6653
6654fi
6655rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6656
6657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows __attribute__ prototype args" >&5
6658$as_echo_n "checking if compiler allows __attribute__ prototype args... " >&6; }
6659cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6660/* end confdefs.h. */
6661
6662#include <stdlib.h>
6663typedef void foo(const char *, ...) __attribute__((format(printf, 1, 2)));
6664int
6665main ()
6666{
6667 exit(0);
6668 ;
6669 return 0;
6670}
6671_ACEOF
6672if ac_fn_c_try_compile "$LINENO"; then :
6673 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6674$as_echo "yes" >&6; }
6675else
6676 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6677$as_echo "no" >&6; }
6678
6679$as_echo "#define NO_ATTRIBUTE_ON_PROTOTYPE_ARGS 1" >>confdefs.h
6680
6681
6682fi
6683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6684
6685if test "x$no_attrib_nonnull" != "x1" ; then
6686
6687$as_echo "#define HAVE_ATTRIBUTE__NONNULL__ 1" >>confdefs.h
6688
6689fi
6690
6691
6692# Check whether --with-rpath was given.
6693if test "${with_rpath+set}" = set; then :
6694 withval=$with_rpath;
6695 if test "x$withval" = "xno" ; then
6696 rpath_opt=""
6697 elif test "x$withval" = "xyes" ; then
6698 rpath_opt="-R"
6699 else
6700 rpath_opt="$withval"
6701 fi
6702
6703
6704fi
6705
6706
6707# Allow user to specify flags
6708
6709# Check whether --with-cflags was given.
6710if test "${with_cflags+set}" = set; then :
6711 withval=$with_cflags;
6712 if test -n "$withval" && test "x$withval" != "xno" && \
6713 test "x${withval}" != "xyes"; then
6714 CFLAGS="$CFLAGS $withval"
6715 fi
6716
6717
6718fi
6719
6720
6721
6722# Check whether --with-cflags-after was given.
6723if test "${with_cflags_after+set}" = set; then :
6724 withval=$with_cflags_after;
6725 if test -n "$withval" && test "x$withval" != "xno" && \
6726 test "x${withval}" != "xyes"; then
6727 CFLAGS_AFTER="$withval"
6728 fi
6729
6730
6731fi
6732
6733
6734# Check whether --with-cppflags was given.
6735if test "${with_cppflags+set}" = set; then :
6736 withval=$with_cppflags;
6737 if test -n "$withval" && test "x$withval" != "xno" && \
6738 test "x${withval}" != "xyes"; then
6739 CPPFLAGS="$CPPFLAGS $withval"
6740 fi
6741
6742
6743fi
6744
6745
6746# Check whether --with-ldflags was given.
6747if test "${with_ldflags+set}" = set; then :
6748 withval=$with_ldflags;
6749 if test -n "$withval" && test "x$withval" != "xno" && \
6750 test "x${withval}" != "xyes"; then
6751 LDFLAGS="$LDFLAGS $withval"
6752 fi
6753
6754
6755fi
6756
6757
6758# Check whether --with-ldflags-after was given.
6759if test "${with_ldflags_after+set}" = set; then :
6760 withval=$with_ldflags_after;
6761 if test -n "$withval" && test "x$withval" != "xno" && \
6762 test "x${withval}" != "xyes"; then
6763 LDFLAGS_AFTER="$withval"
6764 fi
6765
6766
6767fi
6768
6769
6770# Check whether --with-libs was given.
6771if test "${with_libs+set}" = set; then :
6772 withval=$with_libs;
6773 if test -n "$withval" && test "x$withval" != "xno" && \
6774 test "x${withval}" != "xyes"; then
6775 LIBS="$LIBS $withval"
6776 fi
6777
6778
6779fi
6780
6781
6782# Check whether --with-Werror was given.
6783if test "${with_Werror+set}" = set; then :
6784 withval=$with_Werror;
6785 if test -n "$withval" && test "x$withval" != "xno"; then
6786 werror_flags="-Werror"
6787 if test "x${withval}" != "xyes"; then
6788 werror_flags="$withval"
6789 fi
6790 fi
6791
6792
6793fi
6794
6795
6796for ac_header in \
6797 blf.h \
6798 bstring.h \
6799 crypt.h \
6800 crypto/sha2.h \
6801 dirent.h \
6802 endian.h \
6803 elf.h \
6804 err.h \
6805 features.h \
6806 fcntl.h \
6807 floatingpoint.h \
6808 fnmatch.h \
6809 getopt.h \
6810 glob.h \
6811 ia.h \
6812 iaf.h \
6813 ifaddrs.h \
6814 inttypes.h \
6815 langinfo.h \
6816 limits.h \
6817 locale.h \
6818 login.h \
6819 maillock.h \
6820 ndir.h \
6821 net/if_tun.h \
6822 netdb.h \
6823 netgroup.h \
6824 pam/pam_appl.h \
6825 paths.h \
6826 poll.h \
6827 pty.h \
6828 readpassphrase.h \
6829 rpc/types.h \
6830 security/pam_appl.h \
6831 sha2.h \
6832 shadow.h \
6833 stddef.h \
6834 stdint.h \
6835 string.h \
6836 strings.h \
6837 sys/bitypes.h \
6838 sys/byteorder.h \
6839 sys/bsdtty.h \
6840 sys/cdefs.h \
6841 sys/dir.h \
6842 sys/file.h \
6843 sys/mman.h \
6844 sys/label.h \
6845 sys/ndir.h \
6846 sys/poll.h \
6847 sys/prctl.h \
6848 sys/pstat.h \
6849 sys/ptrace.h \
6850 sys/random.h \
6851 sys/select.h \
6852 sys/stat.h \
6853 sys/stream.h \
6854 sys/stropts.h \
6855 sys/strtio.h \
6856 sys/statvfs.h \
6857 sys/sysmacros.h \
6858 sys/time.h \
6859 sys/timers.h \
6860 sys/vfs.h \
6861 time.h \
6862 tmpdir.h \
6863 ttyent.h \
6864 ucred.h \
6865 unistd.h \
6866 usersec.h \
6867 util.h \
6868 utime.h \
6869 utmp.h \
6870 utmpx.h \
6871 vis.h \
6872 wchar.h \
6873
6874do :
6875 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6876ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6877if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6878 cat >>confdefs.h <<_ACEOF
6879#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6880_ACEOF
6881
6882fi
6883
6884done
6885
6886
6887# On some platforms (eg SunOS4) sys/audit.h requires sys/[time|types|label.h]
6888# to be included first.
6889for ac_header in sys/audit.h
6890do :
6891 ac_fn_c_check_header_compile "$LINENO" "sys/audit.h" "ac_cv_header_sys_audit_h" "
6892#ifdef HAVE_SYS_TIME_H
6893# include <sys/time.h>
6894#endif
6895#ifdef HAVE_SYS_TYPES_H
6896# include <sys/types.h>
6897#endif
6898#ifdef HAVE_SYS_LABEL_H
6899# include <sys/label.h>
6900#endif
6901
6902"
6903if test "x$ac_cv_header_sys_audit_h" = xyes; then :
6904 cat >>confdefs.h <<_ACEOF
6905#define HAVE_SYS_AUDIT_H 1
6906_ACEOF
6907
6908fi
6909
6910done
6911
6912
6913# sys/capsicum.h requires sys/types.h
6914for ac_header in sys/capsicum.h
6915do :
6916 ac_fn_c_check_header_compile "$LINENO" "sys/capsicum.h" "ac_cv_header_sys_capsicum_h" "
6917#ifdef HAVE_SYS_TYPES_H
6918# include <sys/types.h>
6919#endif
6920
6921"
6922if test "x$ac_cv_header_sys_capsicum_h" = xyes; then :
6923 cat >>confdefs.h <<_ACEOF
6924#define HAVE_SYS_CAPSICUM_H 1
6925_ACEOF
6926
6927fi
6928
6929done
6930
6931
6932# net/route.h requires sys/socket.h and sys/types.h.
6933# sys/sysctl.h also requires sys/param.h
6934for ac_header in net/route.h sys/sysctl.h
6935do :
6936 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6937ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
6938#ifdef HAVE_SYS_TYPES_H
6939# include <sys/types.h>
6940#endif
6941#include <sys/param.h>
6942#include <sys/socket.h>
6943
6944"
6945if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6946 cat >>confdefs.h <<_ACEOF
6947#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6948_ACEOF
6949
6950fi
6951
6952done
6953
6954
6955# lastlog.h requires sys/time.h to be included first on Solaris
6956for ac_header in lastlog.h
6957do :
6958 ac_fn_c_check_header_compile "$LINENO" "lastlog.h" "ac_cv_header_lastlog_h" "
6959#ifdef HAVE_SYS_TIME_H
6960# include <sys/time.h>
6961#endif
6962
6963"
6964if test "x$ac_cv_header_lastlog_h" = xyes; then :
6965 cat >>confdefs.h <<_ACEOF
6966#define HAVE_LASTLOG_H 1
6967_ACEOF
6968
6969fi
6970
6971done
6972
6973
6974# sys/ptms.h requires sys/stream.h to be included first on Solaris
6975for ac_header in sys/ptms.h
6976do :
6977 ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "
6978#ifdef HAVE_SYS_STREAM_H
6979# include <sys/stream.h>
6980#endif
6981
6982"
6983if test "x$ac_cv_header_sys_ptms_h" = xyes; then :
6984 cat >>confdefs.h <<_ACEOF
6985#define HAVE_SYS_PTMS_H 1
6986_ACEOF
6987
6988fi
6989
6990done
6991
6992
6993# login_cap.h requires sys/types.h on NetBSD
6994for ac_header in login_cap.h
6995do :
6996 ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "
6997#include <sys/types.h>
6998
6999"
7000if test "x$ac_cv_header_login_cap_h" = xyes; then :
7001 cat >>confdefs.h <<_ACEOF
7002#define HAVE_LOGIN_CAP_H 1
7003_ACEOF
7004
7005fi
7006
7007done
7008
7009
7010# older BSDs need sys/param.h before sys/mount.h
7011for ac_header in sys/mount.h
7012do :
7013 ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "
7014#include <sys/param.h>
7015
7016"
7017if test "x$ac_cv_header_sys_mount_h" = xyes; then :
7018 cat >>confdefs.h <<_ACEOF
7019#define HAVE_SYS_MOUNT_H 1
7020_ACEOF
7021
7022fi
7023
7024done
7025
7026
7027# Android requires sys/socket.h to be included before sys/un.h
7028for ac_header in sys/un.h
7029do :
7030 ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "
7031#include <sys/types.h>
7032#include <sys/socket.h>
7033
7034"
7035if test "x$ac_cv_header_sys_un_h" = xyes; then :
7036 cat >>confdefs.h <<_ACEOF
7037#define HAVE_SYS_UN_H 1
7038_ACEOF
7039
7040fi
7041
7042done
7043
7044
7045# Messages for features tested for in target-specific section
7046SIA_MSG="no"
7047SPC_MSG="no"
7048SP_MSG="no"
7049SPP_MSG="no"
7050
7051# Support for Solaris/Illumos privileges (this test is used by both
7052# the --with-solaris-privs option and --with-sandbox=solaris).
7053SOLARIS_PRIVS="no"
7054
7055# Check for some target-specific stuff
7056case "$host" in
7057*-*-aix*)
7058 # Some versions of VAC won't allow macro redefinitions at
7059 # -qlanglevel=ansi, and autoconf 2.60 sometimes insists on using that
7060 # particularly with older versions of vac or xlc.
7061 # It also throws errors about null macro arguments, but these are
7062 # not fatal.
7063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows macro redefinitions" >&5
7064$as_echo_n "checking if compiler allows macro redefinitions... " >&6; }
7065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7066/* end confdefs.h. */
7067
7068#define testmacro foo
7069#define testmacro bar
7070int
7071main ()
7072{
7073 exit(0);
7074 ;
7075 return 0;
7076}
7077_ACEOF
7078if ac_fn_c_try_compile "$LINENO"; then :
7079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7080$as_echo "yes" >&6; }
7081else
7082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7083$as_echo "no" >&6; }
7084 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
7085 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
7086 CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`"
7087
7088
7089fi
7090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7091
7092 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to specify blibpath for linker ($LD)" >&5
7093$as_echo_n "checking how to specify blibpath for linker ($LD)... " >&6; }
7094 if (test -z "$blibpath"); then
7095 blibpath="/usr/lib:/lib"
7096 fi
7097 saved_LDFLAGS="$LDFLAGS"
7098 if test "$GCC" = "yes"; then
7099 flags="-Wl,-blibpath: -Wl,-rpath, -blibpath:"
7100 else
7101 flags="-blibpath: -Wl,-blibpath: -Wl,-rpath,"
7102 fi
7103 for tryflags in $flags ;do
7104 if (test -z "$blibflags"); then
7105 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
7106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7107/* end confdefs.h. */
7108
7109int
7110main ()
7111{
7112
7113 ;
7114 return 0;
7115}
7116_ACEOF
7117if ac_fn_c_try_link "$LINENO"; then :
7118 blibflags=$tryflags
7119fi
7120rm -f core conftest.err conftest.$ac_objext \
7121 conftest$ac_exeext conftest.$ac_ext
7122 fi
7123 done
7124 if (test -z "$blibflags"); then
7125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7126$as_echo "not found" >&6; }
7127 as_fn_error $? "*** must be able to specify blibpath on AIX - check config.log" "$LINENO" 5
7128 else
7129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $blibflags" >&5
7130$as_echo "$blibflags" >&6; }
7131 fi
7132 LDFLAGS="$saved_LDFLAGS"
7133 ac_fn_c_check_func "$LINENO" "authenticate" "ac_cv_func_authenticate"
7134if test "x$ac_cv_func_authenticate" = xyes; then :
7135
7136$as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
7137
7138else
7139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for authenticate in -ls" >&5
7140$as_echo_n "checking for authenticate in -ls... " >&6; }
7141if ${ac_cv_lib_s_authenticate+:} false; then :
7142 $as_echo_n "(cached) " >&6
7143else
7144 ac_check_lib_save_LIBS=$LIBS
7145LIBS="-ls $LIBS"
7146cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7147/* end confdefs.h. */
7148
7149/* Override any GCC internal prototype to avoid an error.
7150 Use char because int might match the return type of a GCC
7151 builtin and then its argument prototype would still apply. */
7152#ifdef __cplusplus
7153extern "C"
7154#endif
7155char authenticate ();
7156int
7157main ()
7158{
7159return authenticate ();
7160 ;
7161 return 0;
7162}
7163_ACEOF
7164if ac_fn_c_try_link "$LINENO"; then :
7165 ac_cv_lib_s_authenticate=yes
7166else
7167 ac_cv_lib_s_authenticate=no
7168fi
7169rm -f core conftest.err conftest.$ac_objext \
7170 conftest$ac_exeext conftest.$ac_ext
7171LIBS=$ac_check_lib_save_LIBS
7172fi
7173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_s_authenticate" >&5
7174$as_echo "$ac_cv_lib_s_authenticate" >&6; }
7175if test "x$ac_cv_lib_s_authenticate" = xyes; then :
7176 $as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
7177
7178 LIBS="$LIBS -ls"
7179
7180fi
7181
7182
7183fi
7184
7185 ac_fn_c_check_decl "$LINENO" "authenticate" "ac_cv_have_decl_authenticate" "#include <usersec.h>
7186"
7187if test "x$ac_cv_have_decl_authenticate" = xyes; then :
7188 ac_have_decl=1
7189else
7190 ac_have_decl=0
7191fi
7192
7193cat >>confdefs.h <<_ACEOF
7194#define HAVE_DECL_AUTHENTICATE $ac_have_decl
7195_ACEOF
7196ac_fn_c_check_decl "$LINENO" "loginrestrictions" "ac_cv_have_decl_loginrestrictions" "#include <usersec.h>
7197"
7198if test "x$ac_cv_have_decl_loginrestrictions" = xyes; then :
7199 ac_have_decl=1
7200else
7201 ac_have_decl=0
7202fi
7203
7204cat >>confdefs.h <<_ACEOF
7205#define HAVE_DECL_LOGINRESTRICTIONS $ac_have_decl
7206_ACEOF
7207ac_fn_c_check_decl "$LINENO" "loginsuccess" "ac_cv_have_decl_loginsuccess" "#include <usersec.h>
7208"
7209if test "x$ac_cv_have_decl_loginsuccess" = xyes; then :
7210 ac_have_decl=1
7211else
7212 ac_have_decl=0
7213fi
7214
7215cat >>confdefs.h <<_ACEOF
7216#define HAVE_DECL_LOGINSUCCESS $ac_have_decl
7217_ACEOF
7218ac_fn_c_check_decl "$LINENO" "passwdexpired" "ac_cv_have_decl_passwdexpired" "#include <usersec.h>
7219"
7220if test "x$ac_cv_have_decl_passwdexpired" = xyes; then :
7221 ac_have_decl=1
7222else
7223 ac_have_decl=0
7224fi
7225
7226cat >>confdefs.h <<_ACEOF
7227#define HAVE_DECL_PASSWDEXPIRED $ac_have_decl
7228_ACEOF
7229ac_fn_c_check_decl "$LINENO" "setauthdb" "ac_cv_have_decl_setauthdb" "#include <usersec.h>
7230"
7231if test "x$ac_cv_have_decl_setauthdb" = xyes; then :
7232 ac_have_decl=1
7233else
7234 ac_have_decl=0
7235fi
7236
7237cat >>confdefs.h <<_ACEOF
7238#define HAVE_DECL_SETAUTHDB $ac_have_decl
7239_ACEOF
7240
7241 ac_fn_c_check_decl "$LINENO" "loginfailed" "ac_cv_have_decl_loginfailed" "#include <usersec.h>
7242
7243"
7244if test "x$ac_cv_have_decl_loginfailed" = xyes; then :
7245 ac_have_decl=1
7246else
7247 ac_have_decl=0
7248fi
7249
7250cat >>confdefs.h <<_ACEOF
7251#define HAVE_DECL_LOGINFAILED $ac_have_decl
7252_ACEOF
7253if test $ac_have_decl = 1; then :
7254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if loginfailed takes 4 arguments" >&5
7255$as_echo_n "checking if loginfailed takes 4 arguments... " >&6; }
7256 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7257/* end confdefs.h. */
7258 #include <usersec.h>
7259int
7260main ()
7261{
7262 (void)loginfailed("user","host","tty",0);
7263 ;
7264 return 0;
7265}
7266_ACEOF
7267if ac_fn_c_try_compile "$LINENO"; then :
7268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7269$as_echo "yes" >&6; }
7270
7271$as_echo "#define AIX_LOGINFAILED_4ARG 1" >>confdefs.h
7272
7273else
7274 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7275$as_echo "no" >&6; }
7276
7277fi
7278rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7279fi
7280
7281 for ac_func in getgrset setauthdb
7282do :
7283 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7284ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7285if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7286 cat >>confdefs.h <<_ACEOF
7287#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7288_ACEOF
7289
7290fi
7291done
7292
7293 ac_fn_c_check_decl "$LINENO" "F_CLOSEM" "ac_cv_have_decl_F_CLOSEM" " #include <limits.h>
7294 #include <fcntl.h>
7295
7296"
7297if test "x$ac_cv_have_decl_F_CLOSEM" = xyes; then :
7298
7299$as_echo "#define HAVE_FCNTL_CLOSEM 1" >>confdefs.h
7300
7301fi
7302
7303 check_for_aix_broken_getaddrinfo=1
7304
7305$as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7306
7307
7308$as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7309
7310
7311$as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7312
7313
7314$as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
7315
7316
7317$as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
7318
7319
7320$as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7321
7322
7323$as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
7324
7325
7326$as_echo "#define PTY_ZEROREAD 1" >>confdefs.h
7327
7328
7329$as_echo "#define PLATFORM_SYS_DIR_UID 2" >>confdefs.h
7330
7331
7332$as_echo "#define BROKEN_STRNDUP 1" >>confdefs.h
7333
7334
7335$as_echo "#define BROKEN_STRNLEN 1" >>confdefs.h
7336
7337 ;;
7338*-*-android*)
7339
7340$as_echo "#define DISABLE_UTMP 1" >>confdefs.h
7341
7342
7343$as_echo "#define DISABLE_WTMP 1" >>confdefs.h
7344
7345 ;;
7346*-*-cygwin*)
7347 check_for_libcrypt_later=1
7348 LIBS="$LIBS /usr/lib/textreadmode.o"
7349
7350$as_echo "#define HAVE_CYGWIN 1" >>confdefs.h
7351
7352
7353$as_echo "#define USE_PIPES 1" >>confdefs.h
7354
7355
7356$as_echo "#define NO_UID_RESTORATION_TEST 1" >>confdefs.h
7357
7358
7359$as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
7360
7361
7362$as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
7363
7364
7365$as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7366
7367
7368$as_echo "#define SSH_IOBUFSZ 65535" >>confdefs.h
7369
7370
7371$as_echo "#define FILESYSTEM_NO_BACKSLASH 1" >>confdefs.h
7372
7373 # Cygwin defines optargs, optargs as declspec(dllimport) for historical
7374 # reasons which cause compile warnings, so we disable those warnings.
7375 {
7376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wno-attributes" >&5
7377$as_echo_n "checking if $CC supports compile flag -Wno-attributes... " >&6; }
7378 saved_CFLAGS="$CFLAGS"
7379 CFLAGS="$CFLAGS $WERROR -Wno-attributes"
7380 _define_flag=""
7381 test "x$_define_flag" = "x" && _define_flag="-Wno-attributes"
7382 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7383/* end confdefs.h. */
7384
7385#include <stdlib.h>
7386#include <stdio.h>
7387int main(int argc, char **argv) {
7388 /* Some math to catch -ftrapv problems in the toolchain */
7389 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
7390 float l = i * 2.1;
7391 double m = l / 0.5;
7392 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
7393 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
7394 exit(0);
7395}
7396
7397_ACEOF
7398if ac_fn_c_try_compile "$LINENO"; then :
7399
7400if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
7401then
7402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7403$as_echo "no" >&6; }
7404 CFLAGS="$saved_CFLAGS"
7405else
7406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7407$as_echo "yes" >&6; }
7408 CFLAGS="$saved_CFLAGS $_define_flag"
7409fi
7410else
7411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7412$as_echo "no" >&6; }
7413 CFLAGS="$saved_CFLAGS"
7414
7415fi
7416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7417}
7418 ;;
7419*-*-dgux*)
7420
7421$as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
7422
7423 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7424
7425 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7426
7427 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7428
7429 ;;
7430*-*-darwin*)
7431 use_pie=auto
7432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have working getaddrinfo" >&5
7433$as_echo_n "checking if we have working getaddrinfo... " >&6; }
7434 if test "$cross_compiling" = yes; then :
7435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assume it is working" >&5
7436$as_echo "assume it is working" >&6; }
7437else
7438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7439/* end confdefs.h. */
7440 #include <mach-o/dyld.h>
7441main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
7442 exit(0);
7443 else
7444 exit(1);
7445}
7446
7447_ACEOF
7448if ac_fn_c_try_run "$LINENO"; then :
7449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: working" >&5
7450$as_echo "working" >&6; }
7451else
7452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5
7453$as_echo "buggy" >&6; }
7454
7455$as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
7456
7457
7458fi
7459rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7460 conftest.$ac_objext conftest.beam conftest.$ac_ext
7461fi
7462
7463 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7464
7465 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7466
7467 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7468
7469
7470$as_echo "#define BROKEN_GLOB 1" >>confdefs.h
7471
7472
7473cat >>confdefs.h <<_ACEOF
7474#define BIND_8_COMPAT 1
7475_ACEOF
7476
7477
7478$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
7479
7480
7481$as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
7482
7483
7484$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
7485
7486
7487 ac_fn_c_check_decl "$LINENO" "AU_IPv4" "ac_cv_have_decl_AU_IPv4" "$ac_includes_default"
7488if test "x$ac_cv_have_decl_AU_IPv4" = xyes; then :
7489
7490else
7491
7492$as_echo "#define AU_IPv4 0" >>confdefs.h
7493
7494 #include <bsm/audit.h>
7495
7496$as_echo "#define LASTLOG_WRITE_PUTUTXLINE 1" >>confdefs.h
7497
7498
7499fi
7500
7501
7502$as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7503
7504 for ac_func in sandbox_init
7505do :
7506 ac_fn_c_check_func "$LINENO" "sandbox_init" "ac_cv_func_sandbox_init"
7507if test "x$ac_cv_func_sandbox_init" = xyes; then :
7508 cat >>confdefs.h <<_ACEOF
7509#define HAVE_SANDBOX_INIT 1
7510_ACEOF
7511
7512fi
7513done
7514
7515 for ac_header in sandbox.h
7516do :
7517 ac_fn_c_check_header_mongrel "$LINENO" "sandbox.h" "ac_cv_header_sandbox_h" "$ac_includes_default"
7518if test "x$ac_cv_header_sandbox_h" = xyes; then :
7519 cat >>confdefs.h <<_ACEOF
7520#define HAVE_SANDBOX_H 1
7521_ACEOF
7522
7523fi
7524
7525done
7526
7527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sandbox_apply in -lsandbox" >&5
7528$as_echo_n "checking for sandbox_apply in -lsandbox... " >&6; }
7529if ${ac_cv_lib_sandbox_sandbox_apply+:} false; then :
7530 $as_echo_n "(cached) " >&6
7531else
7532 ac_check_lib_save_LIBS=$LIBS
7533LIBS="-lsandbox $LIBS"
7534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7535/* end confdefs.h. */
7536
7537/* Override any GCC internal prototype to avoid an error.
7538 Use char because int might match the return type of a GCC
7539 builtin and then its argument prototype would still apply. */
7540#ifdef __cplusplus
7541extern "C"
7542#endif
7543char sandbox_apply ();
7544int
7545main ()
7546{
7547return sandbox_apply ();
7548 ;
7549 return 0;
7550}
7551_ACEOF
7552if ac_fn_c_try_link "$LINENO"; then :
7553 ac_cv_lib_sandbox_sandbox_apply=yes
7554else
7555 ac_cv_lib_sandbox_sandbox_apply=no
7556fi
7557rm -f core conftest.err conftest.$ac_objext \
7558 conftest$ac_exeext conftest.$ac_ext
7559LIBS=$ac_check_lib_save_LIBS
7560fi
7561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sandbox_sandbox_apply" >&5
7562$as_echo "$ac_cv_lib_sandbox_sandbox_apply" >&6; }
7563if test "x$ac_cv_lib_sandbox_sandbox_apply" = xyes; then :
7564
7565 SSHDLIBS="$SSHDLIBS -lsandbox"
7566
7567fi
7568
7569 # proc_pidinfo()-based closefrom() replacement.
7570 for ac_header in libproc.h
7571do :
7572 ac_fn_c_check_header_mongrel "$LINENO" "libproc.h" "ac_cv_header_libproc_h" "$ac_includes_default"
7573if test "x$ac_cv_header_libproc_h" = xyes; then :
7574 cat >>confdefs.h <<_ACEOF
7575#define HAVE_LIBPROC_H 1
7576_ACEOF
7577
7578fi
7579
7580done
7581
7582 for ac_func in proc_pidinfo
7583do :
7584 ac_fn_c_check_func "$LINENO" "proc_pidinfo" "ac_cv_func_proc_pidinfo"
7585if test "x$ac_cv_func_proc_pidinfo" = xyes; then :
7586 cat >>confdefs.h <<_ACEOF
7587#define HAVE_PROC_PIDINFO 1
7588_ACEOF
7589
7590fi
7591done
7592
7593 ;;
7594*-*-dragonfly*)
7595 SSHDLIBS="$SSHDLIBS -lcrypt"
7596 TEST_MALLOC_OPTIONS="AFGJPRX"
7597 ;;
7598*-*-haiku*)
7599 LIBS="$LIBS -lbsd "
7600 CFLAGS="$CFLAGS -D_BSD_SOURCE"
7601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
7602$as_echo_n "checking for socket in -lnetwork... " >&6; }
7603if ${ac_cv_lib_network_socket+:} false; then :
7604 $as_echo_n "(cached) " >&6
7605else
7606 ac_check_lib_save_LIBS=$LIBS
7607LIBS="-lnetwork $LIBS"
7608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7609/* end confdefs.h. */
7610
7611/* Override any GCC internal prototype to avoid an error.
7612 Use char because int might match the return type of a GCC
7613 builtin and then its argument prototype would still apply. */
7614#ifdef __cplusplus
7615extern "C"
7616#endif
7617char socket ();
7618int
7619main ()
7620{
7621return socket ();
7622 ;
7623 return 0;
7624}
7625_ACEOF
7626if ac_fn_c_try_link "$LINENO"; then :
7627 ac_cv_lib_network_socket=yes
7628else
7629 ac_cv_lib_network_socket=no
7630fi
7631rm -f core conftest.err conftest.$ac_objext \
7632 conftest$ac_exeext conftest.$ac_ext
7633LIBS=$ac_check_lib_save_LIBS
7634fi
7635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
7636$as_echo "$ac_cv_lib_network_socket" >&6; }
7637if test "x$ac_cv_lib_network_socket" = xyes; then :
7638 cat >>confdefs.h <<_ACEOF
7639#define HAVE_LIBNETWORK 1
7640_ACEOF
7641
7642 LIBS="-lnetwork $LIBS"
7643
7644fi
7645
7646 $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
7647
7648
7649$as_echo "#define DISABLE_UTMPX 1" >>confdefs.h
7650
7651 MANTYPE=man
7652 ;;
7653*-*-hpux*)
7654 # first we define all of the options common to all HP-UX releases
7655 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
7656 IPADDR_IN_DISPLAY=yes
7657 $as_echo "#define USE_PIPES 1" >>confdefs.h
7658
7659 $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
7660
7661
7662$as_echo "#define LOCKED_PASSWD_STRING \"*\"" >>confdefs.h
7663
7664 $as_echo "#define SPT_TYPE SPT_PSTAT" >>confdefs.h
7665
7666
7667$as_echo "#define PLATFORM_SYS_DIR_UID 2" >>confdefs.h
7668
7669 maildir="/var/mail"
7670 LIBS="$LIBS -lsec"
7671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_error in -lxnet" >&5
7672$as_echo_n "checking for t_error in -lxnet... " >&6; }
7673if ${ac_cv_lib_xnet_t_error+:} false; then :
7674 $as_echo_n "(cached) " >&6
7675else
7676 ac_check_lib_save_LIBS=$LIBS
7677LIBS="-lxnet $LIBS"
7678cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7679/* end confdefs.h. */
7680
7681/* Override any GCC internal prototype to avoid an error.
7682 Use char because int might match the return type of a GCC
7683 builtin and then its argument prototype would still apply. */
7684#ifdef __cplusplus
7685extern "C"
7686#endif
7687char t_error ();
7688int
7689main ()
7690{
7691return t_error ();
7692 ;
7693 return 0;
7694}
7695_ACEOF
7696if ac_fn_c_try_link "$LINENO"; then :
7697 ac_cv_lib_xnet_t_error=yes
7698else
7699 ac_cv_lib_xnet_t_error=no
7700fi
7701rm -f core conftest.err conftest.$ac_objext \
7702 conftest$ac_exeext conftest.$ac_ext
7703LIBS=$ac_check_lib_save_LIBS
7704fi
7705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_t_error" >&5
7706$as_echo "$ac_cv_lib_xnet_t_error" >&6; }
7707if test "x$ac_cv_lib_xnet_t_error" = xyes; then :
7708 cat >>confdefs.h <<_ACEOF
7709#define HAVE_LIBXNET 1
7710_ACEOF
7711
7712 LIBS="-lxnet $LIBS"
7713
7714else
7715 as_fn_error $? "*** -lxnet needed on HP-UX - check config.log ***" "$LINENO" 5
7716fi
7717
7718
7719 # next, we define all of the options specific to major releases
7720 case "$host" in
7721 *-*-hpux10*)
7722 if test -z "$GCC"; then
7723 CFLAGS="$CFLAGS -Ae"
7724 fi
7725 ;;
7726 *-*-hpux11*)
7727
7728$as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
7729
7730
7731$as_echo "#define DISABLE_UTMP 1" >>confdefs.h
7732
7733
7734$as_echo "#define USE_BTMP 1" >>confdefs.h
7735
7736 check_for_hpux_broken_getaddrinfo=1
7737 check_for_conflicting_getspnam=1
7738 ;;
7739 esac
7740
7741 # lastly, we define options specific to minor releases
7742 case "$host" in
7743 *-*-hpux10.26)
7744
7745$as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
7746
7747 disable_ptmx_check=yes
7748 LIBS="$LIBS -lsecpw"
7749 ;;
7750 esac
7751 ;;
7752*-*-irix5*)
7753 PATH="$PATH:/usr/etc"
7754
7755$as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
7756
7757 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7758
7759 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7760
7761 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7762
7763
7764$as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
7765
7766 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7767
7768 ;;
7769*-*-irix6*)
7770 PATH="$PATH:/usr/etc"
7771
7772$as_echo "#define WITH_IRIX_ARRAY 1" >>confdefs.h
7773
7774
7775$as_echo "#define WITH_IRIX_PROJECT 1" >>confdefs.h
7776
7777
7778$as_echo "#define WITH_IRIX_AUDIT 1" >>confdefs.h
7779
7780 ac_fn_c_check_func "$LINENO" "jlimit_startjob" "ac_cv_func_jlimit_startjob"
7781if test "x$ac_cv_func_jlimit_startjob" = xyes; then :
7782
7783$as_echo "#define WITH_IRIX_JOBS 1" >>confdefs.h
7784
7785fi
7786
7787 $as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
7788
7789 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7790
7791 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7792
7793 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7794
7795
7796$as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
7797
7798 $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
7799
7800 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7801
7802 ;;
7803*-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
7804 check_for_libcrypt_later=1
7805 $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
7806
7807 $as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
7808
7809 $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7810
7811
7812$as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
7813
7814
7815$as_echo "#define USE_BTMP 1" >>confdefs.h
7816
7817 ;;
7818*-*-linux*)
7819 no_dev_ptmx=1
7820 use_pie=auto
7821 check_for_libcrypt_later=1
7822 check_for_openpty_ctty_bug=1
7823 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE"
7824
7825$as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
7826
7827
7828$as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
7829
7830 $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7831
7832
7833$as_echo "#define LINK_OPNOTSUPP_ERRNO EPERM" >>confdefs.h
7834
7835
7836$as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
7837
7838 $as_echo "#define USE_BTMP 1" >>confdefs.h
7839
7840
7841$as_echo "#define LINUX_OOM_ADJUST 1" >>confdefs.h
7842
7843 inet6_default_4in6=yes
7844 case `uname -r` in
7845 1.*|2.0.*)
7846
7847$as_echo "#define BROKEN_CMSG_TYPE 1" >>confdefs.h
7848
7849 ;;
7850 esac
7851 # tun(4) forwarding compat code
7852 for ac_header in linux/if_tun.h
7853do :
7854 ac_fn_c_check_header_mongrel "$LINENO" "linux/if_tun.h" "ac_cv_header_linux_if_tun_h" "$ac_includes_default"
7855if test "x$ac_cv_header_linux_if_tun_h" = xyes; then :
7856 cat >>confdefs.h <<_ACEOF
7857#define HAVE_LINUX_IF_TUN_H 1
7858_ACEOF
7859
7860fi
7861
7862done
7863
7864 if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then
7865
7866$as_echo "#define SSH_TUN_LINUX 1" >>confdefs.h
7867
7868
7869$as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
7870
7871
7872$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
7873
7874 fi
7875 ac_fn_c_check_header_compile "$LINENO" "linux/if.h" "ac_cv_header_linux_if_h" "
7876#ifdef HAVE_SYS_TYPES_H
7877# include <sys/types.h>
7878#endif
7879
7880"
7881if test "x$ac_cv_header_linux_if_h" = xyes; then :
7882
7883$as_echo "#define SYS_RDOMAIN_LINUX 1" >>confdefs.h
7884
7885fi
7886
7887
7888 for ac_header in linux/seccomp.h linux/filter.h linux/audit.h
7889do :
7890 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7891ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <linux/types.h>
7892"
7893if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7894 cat >>confdefs.h <<_ACEOF
7895#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7896_ACEOF
7897
7898fi
7899
7900done
7901
7902 # Obtain MIPS ABI
7903 case "$host" in
7904 mips*)
7905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7906/* end confdefs.h. */
7907
7908#if _MIPS_SIM != _ABIO32
7909#error
7910#endif
7911
7912int
7913main ()
7914{
7915
7916 ;
7917 return 0;
7918}
7919_ACEOF
7920if ac_fn_c_try_compile "$LINENO"; then :
7921 mips_abi="o32"
7922else
7923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7924/* end confdefs.h. */
7925
7926#if _MIPS_SIM != _ABIN32
7927#error
7928#endif
7929
7930int
7931main ()
7932{
7933
7934 ;
7935 return 0;
7936}
7937_ACEOF
7938if ac_fn_c_try_compile "$LINENO"; then :
7939 mips_abi="n32"
7940else
7941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7942/* end confdefs.h. */
7943
7944#if _MIPS_SIM != _ABI64
7945#error
7946#endif
7947
7948int
7949main ()
7950{
7951
7952 ;
7953 return 0;
7954}
7955_ACEOF
7956if ac_fn_c_try_compile "$LINENO"; then :
7957 mips_abi="n64"
7958else
7959 as_fn_error $? "unknown MIPS ABI" "$LINENO" 5
7960
7961fi
7962rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7963
7964fi
7965rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7966
7967fi
7968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7969 ;;
7970 esac
7971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for seccomp architecture" >&5
7972$as_echo_n "checking for seccomp architecture... " >&6; }
7973 seccomp_audit_arch=
7974 case "$host" in
7975 x86_64-*)
7976 seccomp_audit_arch=AUDIT_ARCH_X86_64
7977 ;;
7978 i*86-*)
7979 seccomp_audit_arch=AUDIT_ARCH_I386
7980 ;;
7981 arm*-*)
7982 seccomp_audit_arch=AUDIT_ARCH_ARM
7983 ;;
7984 aarch64*-*)
7985 seccomp_audit_arch=AUDIT_ARCH_AARCH64
7986 ;;
7987 s390x-*)
7988 seccomp_audit_arch=AUDIT_ARCH_S390X
7989 ;;
7990 s390-*)
7991 seccomp_audit_arch=AUDIT_ARCH_S390
7992 ;;
7993 powerpc64-*)
7994 seccomp_audit_arch=AUDIT_ARCH_PPC64
7995 ;;
7996 powerpc64le-*)
7997 seccomp_audit_arch=AUDIT_ARCH_PPC64LE
7998 ;;
7999 mips-*)
8000 seccomp_audit_arch=AUDIT_ARCH_MIPS
8001 ;;
8002 mipsel-*)
8003 seccomp_audit_arch=AUDIT_ARCH_MIPSEL
8004 ;;
8005 mips64-*)
8006 case "$mips_abi" in
8007 "n32")
8008 seccomp_audit_arch=AUDIT_ARCH_MIPS64N32
8009 ;;
8010 "n64")
8011 seccomp_audit_arch=AUDIT_ARCH_MIPS64
8012 ;;
8013 esac
8014 ;;
8015 mips64el-*)
8016 case "$mips_abi" in
8017 "n32")
8018 seccomp_audit_arch=AUDIT_ARCH_MIPSEL64N32
8019 ;;
8020 "n64")
8021 seccomp_audit_arch=AUDIT_ARCH_MIPSEL64
8022 ;;
8023 esac
8024 ;;
8025 esac
8026 if test "x$seccomp_audit_arch" != "x" ; then
8027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$seccomp_audit_arch\"" >&5
8028$as_echo "\"$seccomp_audit_arch\"" >&6; }
8029
8030cat >>confdefs.h <<_ACEOF
8031#define SECCOMP_AUDIT_ARCH $seccomp_audit_arch
8032_ACEOF
8033
8034 else
8035 { $as_echo "$as_me:${as_lineno-$LINENO}: result: architecture not supported" >&5
8036$as_echo "architecture not supported" >&6; }
8037 fi
8038 ;;
8039mips-sony-bsd|mips-sony-newsos4)
8040
8041$as_echo "#define NEED_SETPGRP 1" >>confdefs.h
8042
8043 SONY=1
8044 ;;
8045*-*-netbsd*)
8046 check_for_libcrypt_before=1
8047 if test "x$withval" != "xno" ; then
8048 rpath_opt="-R"
8049 fi
8050 CPPFLAGS="$CPPFLAGS -D_OPENBSD_SOURCE"
8051
8052$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
8053
8054 ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
8055if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
8056
8057else
8058
8059$as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
8060
8061fi
8062
8063
8064
8065$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
8066
8067 TEST_MALLOC_OPTIONS="AJRX"
8068
8069$as_echo "#define BROKEN_READ_COMPARISON 1" >>confdefs.h
8070
8071 ;;
8072*-*-freebsd*)
8073 check_for_libcrypt_later=1
8074
8075$as_echo "#define LOCKED_PASSWD_PREFIX \"*LOCKED*\"" >>confdefs.h
8076
8077
8078$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
8079
8080 ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
8081if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
8082
8083else
8084
8085$as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
8086
8087fi
8088
8089
8090
8091$as_echo "#define BROKEN_GLOB 1" >>confdefs.h
8092
8093 TEST_MALLOC_OPTIONS="AJRX"
8094 # Preauth crypto occasionally uses file descriptors for crypto offload
8095 # and will crash if they cannot be opened.
8096
8097$as_echo "#define SANDBOX_SKIP_RLIMIT_NOFILE 1" >>confdefs.h
8098
8099 ;;
8100*-*-bsdi*)
8101 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8102
8103 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8104
8105 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8106
8107 ;;
8108*-next-*)
8109 conf_lastlog_location="/usr/adm/lastlog"
8110 conf_utmp_location=/etc/utmp
8111 conf_wtmp_location=/usr/adm/wtmp
8112 maildir=/usr/spool/mail
8113
8114$as_echo "#define HAVE_NEXT 1" >>confdefs.h
8115
8116 $as_echo "#define USE_PIPES 1" >>confdefs.h
8117
8118
8119$as_echo "#define BROKEN_SAVED_UIDS 1" >>confdefs.h
8120
8121 ;;
8122*-*-openbsd*)
8123 use_pie=auto
8124
8125$as_echo "#define HAVE_ATTRIBUTE__SENTINEL__ 1" >>confdefs.h
8126
8127
8128$as_echo "#define HAVE_ATTRIBUTE__BOUNDED__ 1" >>confdefs.h
8129
8130
8131$as_echo "#define SSH_TUN_OPENBSD 1" >>confdefs.h
8132
8133
8134$as_echo "#define SYSLOG_R_SAFE_IN_SIGHAND 1" >>confdefs.h
8135
8136 TEST_MALLOC_OPTIONS="AFGJPRX"
8137 ;;
8138*-*-solaris*)
8139 if test "x$withval" != "xno" ; then
8140 rpath_opt="-R"
8141 fi
8142 $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
8143
8144 $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
8145
8146 $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
8147
8148
8149$as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
8150
8151 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
8152
8153 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
8154
8155$as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
8156
8157
8158$as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
8159
8160
8161$as_echo "#define BROKEN_TCGETATTR_ICANON 1" >>confdefs.h
8162
8163 external_path_file=/etc/default/login
8164 # hardwire lastlog location (can't detect it on some versions)
8165 conf_lastlog_location="/var/adm/lastlog"
8166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obsolete utmp and wtmp in solaris2.x" >&5
8167$as_echo_n "checking for obsolete utmp and wtmp in solaris2.x... " >&6; }
8168 sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
8169 if test "$sol2ver" -ge 8; then
8170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8171$as_echo "yes" >&6; }
8172 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
8173
8174
8175$as_echo "#define DISABLE_WTMP 1" >>confdefs.h
8176
8177 else
8178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8179$as_echo "no" >&6; }
8180 fi
8181 for ac_func in setpflags
8182do :
8183 ac_fn_c_check_func "$LINENO" "setpflags" "ac_cv_func_setpflags"
8184if test "x$ac_cv_func_setpflags" = xyes; then :
8185 cat >>confdefs.h <<_ACEOF
8186#define HAVE_SETPFLAGS 1
8187_ACEOF
8188
8189fi
8190done
8191
8192 for ac_func in setppriv
8193do :
8194 ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
8195if test "x$ac_cv_func_setppriv" = xyes; then :
8196 cat >>confdefs.h <<_ACEOF
8197#define HAVE_SETPPRIV 1
8198_ACEOF
8199
8200fi
8201done
8202
8203 for ac_func in priv_basicset
8204do :
8205 ac_fn_c_check_func "$LINENO" "priv_basicset" "ac_cv_func_priv_basicset"
8206if test "x$ac_cv_func_priv_basicset" = xyes; then :
8207 cat >>confdefs.h <<_ACEOF
8208#define HAVE_PRIV_BASICSET 1
8209_ACEOF
8210
8211fi
8212done
8213
8214 for ac_header in priv.h
8215do :
8216 ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
8217if test "x$ac_cv_header_priv_h" = xyes; then :
8218 cat >>confdefs.h <<_ACEOF
8219#define HAVE_PRIV_H 1
8220_ACEOF
8221
8222fi
8223
8224done
8225
8226
8227# Check whether --with-solaris-contracts was given.
8228if test "${with_solaris_contracts+set}" = set; then :
8229 withval=$with_solaris_contracts;
8230 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ct_tmpl_activate in -lcontract" >&5
8231$as_echo_n "checking for ct_tmpl_activate in -lcontract... " >&6; }
8232if ${ac_cv_lib_contract_ct_tmpl_activate+:} false; then :
8233 $as_echo_n "(cached) " >&6
8234else
8235 ac_check_lib_save_LIBS=$LIBS
8236LIBS="-lcontract $LIBS"
8237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8238/* end confdefs.h. */
8239
8240/* Override any GCC internal prototype to avoid an error.
8241 Use char because int might match the return type of a GCC
8242 builtin and then its argument prototype would still apply. */
8243#ifdef __cplusplus
8244extern "C"
8245#endif
8246char ct_tmpl_activate ();
8247int
8248main ()
8249{
8250return ct_tmpl_activate ();
8251 ;
8252 return 0;
8253}
8254_ACEOF
8255if ac_fn_c_try_link "$LINENO"; then :
8256 ac_cv_lib_contract_ct_tmpl_activate=yes
8257else
8258 ac_cv_lib_contract_ct_tmpl_activate=no
8259fi
8260rm -f core conftest.err conftest.$ac_objext \
8261 conftest$ac_exeext conftest.$ac_ext
8262LIBS=$ac_check_lib_save_LIBS
8263fi
8264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_contract_ct_tmpl_activate" >&5
8265$as_echo "$ac_cv_lib_contract_ct_tmpl_activate" >&6; }
8266if test "x$ac_cv_lib_contract_ct_tmpl_activate" = xyes; then :
8267
8268$as_echo "#define USE_SOLARIS_PROCESS_CONTRACTS 1" >>confdefs.h
8269
8270 LIBS="$LIBS -lcontract"
8271 SPC_MSG="yes"
8272fi
8273
8274
8275fi
8276
8277
8278# Check whether --with-solaris-projects was given.
8279if test "${with_solaris_projects+set}" = set; then :
8280 withval=$with_solaris_projects;
8281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproject in -lproject" >&5
8282$as_echo_n "checking for setproject in -lproject... " >&6; }
8283if ${ac_cv_lib_project_setproject+:} false; then :
8284 $as_echo_n "(cached) " >&6
8285else
8286 ac_check_lib_save_LIBS=$LIBS
8287LIBS="-lproject $LIBS"
8288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8289/* end confdefs.h. */
8290
8291/* Override any GCC internal prototype to avoid an error.
8292 Use char because int might match the return type of a GCC
8293 builtin and then its argument prototype would still apply. */
8294#ifdef __cplusplus
8295extern "C"
8296#endif
8297char setproject ();
8298int
8299main ()
8300{
8301return setproject ();
8302 ;
8303 return 0;
8304}
8305_ACEOF
8306if ac_fn_c_try_link "$LINENO"; then :
8307 ac_cv_lib_project_setproject=yes
8308else
8309 ac_cv_lib_project_setproject=no
8310fi
8311rm -f core conftest.err conftest.$ac_objext \
8312 conftest$ac_exeext conftest.$ac_ext
8313LIBS=$ac_check_lib_save_LIBS
8314fi
8315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_project_setproject" >&5
8316$as_echo "$ac_cv_lib_project_setproject" >&6; }
8317if test "x$ac_cv_lib_project_setproject" = xyes; then :
8318
8319$as_echo "#define USE_SOLARIS_PROJECTS 1" >>confdefs.h
8320
8321 LIBS="$LIBS -lproject"
8322 SP_MSG="yes"
8323fi
8324
8325
8326fi
8327
8328
8329# Check whether --with-solaris-privs was given.
8330if test "${with_solaris_privs+set}" = set; then :
8331 withval=$with_solaris_privs;
8332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/Illumos privilege support" >&5
8333$as_echo_n "checking for Solaris/Illumos privilege support... " >&6; }
8334 if test "x$ac_cv_func_setppriv" = "xyes" -a \
8335 "x$ac_cv_header_priv_h" = "xyes" ; then
8336 SOLARIS_PRIVS=yes
8337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
8338$as_echo "found" >&6; }
8339
8340$as_echo "#define NO_UID_RESTORATION_TEST 1" >>confdefs.h
8341
8342
8343$as_echo "#define USE_SOLARIS_PRIVS 1" >>confdefs.h
8344
8345 SPP_MSG="yes"
8346 else
8347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8348$as_echo "not found" >&6; }
8349 as_fn_error $? "*** must have support for Solaris privileges to use --with-solaris-privs" "$LINENO" 5
8350 fi
8351
8352fi
8353
8354 TEST_SHELL=$SHELL # let configure find us a capable shell
8355 ;;
8356*-*-sunos4*)
8357 CPPFLAGS="$CPPFLAGS -DSUNOS4"
8358 for ac_func in getpwanam
8359do :
8360 ac_fn_c_check_func "$LINENO" "getpwanam" "ac_cv_func_getpwanam"
8361if test "x$ac_cv_func_getpwanam" = xyes; then :
8362 cat >>confdefs.h <<_ACEOF
8363#define HAVE_GETPWANAM 1
8364_ACEOF
8365
8366fi
8367done
8368
8369 $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
8370
8371 conf_utmp_location=/etc/utmp
8372 conf_wtmp_location=/var/adm/wtmp
8373 conf_lastlog_location=/var/adm/lastlog
8374 $as_echo "#define USE_PIPES 1" >>confdefs.h
8375
8376
8377$as_echo "#define DISABLE_UTMPX 1" >>confdefs.h
8378
8379 ;;
8380*-ncr-sysv*)
8381 LIBS="$LIBS -lc89"
8382 $as_echo "#define USE_PIPES 1" >>confdefs.h
8383
8384 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
8385
8386 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8387
8388 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8389
8390 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8391
8392 ;;
8393*-sni-sysv*)
8394 # /usr/ucblib MUST NOT be searched on ReliantUNIX
8395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
8396$as_echo_n "checking for dlsym in -ldl... " >&6; }
8397if ${ac_cv_lib_dl_dlsym+:} false; then :
8398 $as_echo_n "(cached) " >&6
8399else
8400 ac_check_lib_save_LIBS=$LIBS
8401LIBS="-ldl $LIBS"
8402cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8403/* end confdefs.h. */
8404
8405/* Override any GCC internal prototype to avoid an error.
8406 Use char because int might match the return type of a GCC
8407 builtin and then its argument prototype would still apply. */
8408#ifdef __cplusplus
8409extern "C"
8410#endif
8411char dlsym ();
8412int
8413main ()
8414{
8415return dlsym ();
8416 ;
8417 return 0;
8418}
8419_ACEOF
8420if ac_fn_c_try_link "$LINENO"; then :
8421 ac_cv_lib_dl_dlsym=yes
8422else
8423 ac_cv_lib_dl_dlsym=no
8424fi
8425rm -f core conftest.err conftest.$ac_objext \
8426 conftest$ac_exeext conftest.$ac_ext
8427LIBS=$ac_check_lib_save_LIBS
8428fi
8429{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
8430$as_echo "$ac_cv_lib_dl_dlsym" >&6; }
8431if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
8432 cat >>confdefs.h <<_ACEOF
8433#define HAVE_LIBDL 1
8434_ACEOF
8435
8436 LIBS="-ldl $LIBS"
8437
8438fi
8439
8440 # -lresolv needs to be at the end of LIBS or DNS lookups break
8441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
8442$as_echo_n "checking for res_query in -lresolv... " >&6; }
8443if ${ac_cv_lib_resolv_res_query+:} false; then :
8444 $as_echo_n "(cached) " >&6
8445else
8446 ac_check_lib_save_LIBS=$LIBS
8447LIBS="-lresolv $LIBS"
8448cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8449/* end confdefs.h. */
8450
8451/* Override any GCC internal prototype to avoid an error.
8452 Use char because int might match the return type of a GCC
8453 builtin and then its argument prototype would still apply. */
8454#ifdef __cplusplus
8455extern "C"
8456#endif
8457char res_query ();
8458int
8459main ()
8460{
8461return res_query ();
8462 ;
8463 return 0;
8464}
8465_ACEOF
8466if ac_fn_c_try_link "$LINENO"; then :
8467 ac_cv_lib_resolv_res_query=yes
8468else
8469 ac_cv_lib_resolv_res_query=no
8470fi
8471rm -f core conftest.err conftest.$ac_objext \
8472 conftest$ac_exeext conftest.$ac_ext
8473LIBS=$ac_check_lib_save_LIBS
8474fi
8475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_query" >&5
8476$as_echo "$ac_cv_lib_resolv_res_query" >&6; }
8477if test "x$ac_cv_lib_resolv_res_query" = xyes; then :
8478 LIBS="$LIBS -lresolv"
8479fi
8480
8481 IPADDR_IN_DISPLAY=yes
8482 $as_echo "#define USE_PIPES 1" >>confdefs.h
8483
8484 $as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
8485
8486 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8487
8488 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8489
8490 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8491
8492 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
8493
8494 external_path_file=/etc/default/login
8495 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
8496 # Attention: always take care to bind libsocket and libnsl before libc,
8497 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
8498 ;;
8499# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel.
8500*-*-sysv4.2*)
8501 $as_echo "#define USE_PIPES 1" >>confdefs.h
8502
8503 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8504
8505 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8506
8507 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8508
8509
8510$as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
8511
8512 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
8513
8514 TEST_SHELL=$SHELL # let configure find us a capable shell
8515 ;;
8516# UnixWare 7.x, OpenUNIX 8
8517*-*-sysv5*)
8518 CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf"
8519
8520$as_echo "#define UNIXWARE_LONG_PASSWORDS 1" >>confdefs.h
8521
8522 $as_echo "#define USE_PIPES 1" >>confdefs.h
8523
8524 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8525
8526 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
8527
8528 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8529
8530 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8531
8532 $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
8533
8534 $as_echo "#define BROKEN_TCGETATTR_ICANON 1" >>confdefs.h
8535
8536 TEST_SHELL=$SHELL # let configure find us a capable shell
8537 check_for_libcrypt_later=1
8538 case "$host" in
8539 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x
8540 maildir=/var/spool/mail
8541 $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
8542
8543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getluid in -lprot" >&5
8544$as_echo_n "checking for getluid in -lprot... " >&6; }
8545if ${ac_cv_lib_prot_getluid+:} false; then :
8546 $as_echo_n "(cached) " >&6
8547else
8548 ac_check_lib_save_LIBS=$LIBS
8549LIBS="-lprot $LIBS"
8550cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8551/* end confdefs.h. */
8552
8553/* Override any GCC internal prototype to avoid an error.
8554 Use char because int might match the return type of a GCC
8555 builtin and then its argument prototype would still apply. */
8556#ifdef __cplusplus
8557extern "C"
8558#endif
8559char getluid ();
8560int
8561main ()
8562{
8563return getluid ();
8564 ;
8565 return 0;
8566}
8567_ACEOF
8568if ac_fn_c_try_link "$LINENO"; then :
8569 ac_cv_lib_prot_getluid=yes
8570else
8571 ac_cv_lib_prot_getluid=no
8572fi
8573rm -f core conftest.err conftest.$ac_objext \
8574 conftest$ac_exeext conftest.$ac_ext
8575LIBS=$ac_check_lib_save_LIBS
8576fi
8577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getluid" >&5
8578$as_echo "$ac_cv_lib_prot_getluid" >&6; }
8579if test "x$ac_cv_lib_prot_getluid" = xyes; then :
8580 LIBS="$LIBS -lprot"
8581 for ac_func in getluid setluid
8582do :
8583 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8584ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8585if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8586 cat >>confdefs.h <<_ACEOF
8587#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8588_ACEOF
8589
8590fi
8591done
8592
8593
8594fi
8595
8596 ;;
8597 *) $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
8598
8599 ;;
8600 esac
8601 ;;
8602*-*-sysv*)
8603 ;;
8604# SCO UNIX and OEM versions of SCO UNIX
8605*-*-sco3.2v4*)
8606 as_fn_error $? "\"This Platform is no longer supported.\"" "$LINENO" 5
8607 ;;
8608# SCO OpenServer 5.x
8609*-*-sco3.2v5*)
8610 if test -z "$GCC"; then
8611 CFLAGS="$CFLAGS -belf"
8612 fi
8613 LIBS="$LIBS -lprot -lx -ltinfo -lm"
8614 no_dev_ptmx=1
8615 $as_echo "#define USE_PIPES 1" >>confdefs.h
8616
8617 $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
8618
8619 $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
8620
8621 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8622
8623 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8624
8625 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
8626
8627 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8628
8629 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8630
8631 $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
8632
8633 $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
8634
8635 $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
8636
8637 for ac_func in getluid setluid
8638do :
8639 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8640ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8641if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8642 cat >>confdefs.h <<_ACEOF
8643#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8644_ACEOF
8645
8646fi
8647done
8648
8649 MANTYPE=man
8650 TEST_SHELL=$SHELL # let configure find us a capable shell
8651 SKIP_DISABLE_LASTLOG_DEFINE=yes
8652 ;;
8653*-dec-osf*)
8654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Digital Unix SIA" >&5
8655$as_echo_n "checking for Digital Unix SIA... " >&6; }
8656 no_osfsia=""
8657
8658# Check whether --with-osfsia was given.
8659if test "${with_osfsia+set}" = set; then :
8660 withval=$with_osfsia;
8661 if test "x$withval" = "xno" ; then
8662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8663$as_echo "disabled" >&6; }
8664 no_osfsia=1
8665 fi
8666
8667fi
8668
8669 if test -z "$no_osfsia" ; then
8670 if test -f /etc/sia/matrix.conf; then
8671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8672$as_echo "yes" >&6; }
8673
8674$as_echo "#define HAVE_OSF_SIA 1" >>confdefs.h
8675
8676
8677$as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
8678
8679 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8680
8681 LIBS="$LIBS -lsecurity -ldb -lm -laud"
8682 SIA_MSG="yes"
8683 else
8684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8685$as_echo "no" >&6; }
8686
8687$as_echo "#define LOCKED_PASSWD_SUBSTR \"Nologin\"" >>confdefs.h
8688
8689 fi
8690 fi
8691 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
8692
8693 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8694
8695 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8696
8697 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8698
8699
8700$as_echo "#define BROKEN_READV_COMPARISON 1" >>confdefs.h
8701
8702 ;;
8703
8704*-*-nto-qnx*)
8705 $as_echo "#define USE_PIPES 1" >>confdefs.h
8706
8707 $as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
8708
8709 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
8710
8711 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
8712
8713
8714$as_echo "#define BROKEN_SHADOW_EXPIRE 1" >>confdefs.h
8715
8716 enable_etc_default_login=no # has incompatible /etc/default/login
8717 case "$host" in
8718 *-*-nto-qnx6*)
8719 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8720
8721 ;;
8722 esac
8723 ;;
8724
8725*-*-ultrix*)
8726
8727$as_echo "#define BROKEN_GETGROUPS 1" >>confdefs.h
8728
8729
8730$as_echo "#define NEED_SETPGRP 1" >>confdefs.h
8731
8732
8733$as_echo "#define HAVE_SYS_SYSLOG_H 1" >>confdefs.h
8734
8735
8736$as_echo "#define DISABLE_UTMPX 1" >>confdefs.h
8737
8738 # DISABLE_FD_PASSING so that we call setpgrp as root, otherwise we
8739 # don't get a controlling tty.
8740
8741$as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8742
8743 # On Ultrix some headers are not protected against multiple includes,
8744 # so we create wrappers and put it where the compiler will find it.
8745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: creating compat wrappers for headers" >&5
8746$as_echo "$as_me: WARNING: creating compat wrappers for headers" >&2;}
8747 mkdir -p netinet
8748 for header in netinet/ip.h netdb.h resolv.h; do
8749 name=`echo $header | tr 'a-z/.' 'A-Z__'`
8750 cat >$header <<EOD
8751#ifndef _SSH_COMPAT_${name}
8752#define _SSH_COMPAT_${name}
8753#include "/usr/include/${header}"
8754#endif
8755EOD
8756 done
8757 ;;
8758
8759*-*-lynxos)
8760 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
8761
8762$as_echo "#define BROKEN_SETVBUF 1" >>confdefs.h
8763
8764 ;;
8765esac
8766
8767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler and flags for sanity" >&5
8768$as_echo_n "checking compiler and flags for sanity... " >&6; }
8769if test "$cross_compiling" = yes; then :
8770 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking compiler sanity" >&5
8771$as_echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;}
8772
8773else
8774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8775/* end confdefs.h. */
8776 #include <stdio.h>
8777int
8778main ()
8779{
8780 exit(0);
8781 ;
8782 return 0;
8783}
8784_ACEOF
8785if ac_fn_c_try_run "$LINENO"; then :
8786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8787$as_echo "yes" >&6; }
8788else
8789
8790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8791$as_echo "no" >&6; }
8792 as_fn_error $? "*** compiler cannot create working executables, check config.log ***" "$LINENO" 5
8793
8794fi
8795rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8796 conftest.$ac_objext conftest.beam conftest.$ac_ext
8797fi
8798
8799
8800# Checks for libraries.
8801ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt"
8802if test "x$ac_cv_func_setsockopt" = xyes; then :
8803
8804else
8805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5
8806$as_echo_n "checking for setsockopt in -lsocket... " >&6; }
8807if ${ac_cv_lib_socket_setsockopt+:} false; then :
8808 $as_echo_n "(cached) " >&6
8809else
8810 ac_check_lib_save_LIBS=$LIBS
8811LIBS="-lsocket $LIBS"
8812cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8813/* end confdefs.h. */
8814
8815/* Override any GCC internal prototype to avoid an error.
8816 Use char because int might match the return type of a GCC
8817 builtin and then its argument prototype would still apply. */
8818#ifdef __cplusplus
8819extern "C"
8820#endif
8821char setsockopt ();
8822int
8823main ()
8824{
8825return setsockopt ();
8826 ;
8827 return 0;
8828}
8829_ACEOF
8830if ac_fn_c_try_link "$LINENO"; then :
8831 ac_cv_lib_socket_setsockopt=yes
8832else
8833 ac_cv_lib_socket_setsockopt=no
8834fi
8835rm -f core conftest.err conftest.$ac_objext \
8836 conftest$ac_exeext conftest.$ac_ext
8837LIBS=$ac_check_lib_save_LIBS
8838fi
8839{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5
8840$as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
8841if test "x$ac_cv_lib_socket_setsockopt" = xyes; then :
8842 cat >>confdefs.h <<_ACEOF
8843#define HAVE_LIBSOCKET 1
8844_ACEOF
8845
8846 LIBS="-lsocket $LIBS"
8847
8848fi
8849
8850fi
8851
8852
8853for ac_func in dirname
8854do :
8855 ac_fn_c_check_func "$LINENO" "dirname" "ac_cv_func_dirname"
8856if test "x$ac_cv_func_dirname" = xyes; then :
8857 cat >>confdefs.h <<_ACEOF
8858#define HAVE_DIRNAME 1
8859_ACEOF
8860 for ac_header in libgen.h
8861do :
8862 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
8863if test "x$ac_cv_header_libgen_h" = xyes; then :
8864 cat >>confdefs.h <<_ACEOF
8865#define HAVE_LIBGEN_H 1
8866_ACEOF
8867
8868fi
8869
8870done
8871
8872else
8873
8874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirname in -lgen" >&5
8875$as_echo_n "checking for dirname in -lgen... " >&6; }
8876if ${ac_cv_lib_gen_dirname+:} false; then :
8877 $as_echo_n "(cached) " >&6
8878else
8879 ac_check_lib_save_LIBS=$LIBS
8880LIBS="-lgen $LIBS"
8881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8882/* end confdefs.h. */
8883
8884/* Override any GCC internal prototype to avoid an error.
8885 Use char because int might match the return type of a GCC
8886 builtin and then its argument prototype would still apply. */
8887#ifdef __cplusplus
8888extern "C"
8889#endif
8890char dirname ();
8891int
8892main ()
8893{
8894return dirname ();
8895 ;
8896 return 0;
8897}
8898_ACEOF
8899if ac_fn_c_try_link "$LINENO"; then :
8900 ac_cv_lib_gen_dirname=yes
8901else
8902 ac_cv_lib_gen_dirname=no
8903fi
8904rm -f core conftest.err conftest.$ac_objext \
8905 conftest$ac_exeext conftest.$ac_ext
8906LIBS=$ac_check_lib_save_LIBS
8907fi
8908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_dirname" >&5
8909$as_echo "$ac_cv_lib_gen_dirname" >&6; }
8910if test "x$ac_cv_lib_gen_dirname" = xyes; then :
8911
8912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken dirname" >&5
8913$as_echo_n "checking for broken dirname... " >&6; }
8914if ${ac_cv_have_broken_dirname+:} false; then :
8915 $as_echo_n "(cached) " >&6
8916else
8917
8918 save_LIBS="$LIBS"
8919 LIBS="$LIBS -lgen"
8920 if test "$cross_compiling" = yes; then :
8921 ac_cv_have_broken_dirname="no"
8922else
8923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8924/* end confdefs.h. */
8925
8926#include <libgen.h>
8927#include <string.h>
8928
8929int main(int argc, char **argv) {
8930 char *s, buf[32];
8931
8932 strncpy(buf,"/etc", 32);
8933 s = dirname(buf);
8934 if (!s || strncmp(s, "/", 32) != 0) {
8935 exit(1);
8936 } else {
8937 exit(0);
8938 }
8939}
8940
8941_ACEOF
8942if ac_fn_c_try_run "$LINENO"; then :
8943 ac_cv_have_broken_dirname="no"
8944else
8945 ac_cv_have_broken_dirname="yes"
8946fi
8947rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8948 conftest.$ac_objext conftest.beam conftest.$ac_ext
8949fi
8950
8951 LIBS="$save_LIBS"
8952
8953fi
8954{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_broken_dirname" >&5
8955$as_echo "$ac_cv_have_broken_dirname" >&6; }
8956 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
8957 LIBS="$LIBS -lgen"
8958 $as_echo "#define HAVE_DIRNAME 1" >>confdefs.h
8959
8960 for ac_header in libgen.h
8961do :
8962 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
8963if test "x$ac_cv_header_libgen_h" = xyes; then :
8964 cat >>confdefs.h <<_ACEOF
8965#define HAVE_LIBGEN_H 1
8966_ACEOF
8967
8968fi
8969
8970done
8971
8972 fi
8973
8974fi
8975
8976
8977fi
8978done
8979
8980
8981ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
8982if test "x$ac_cv_func_getspnam" = xyes; then :
8983
8984else
8985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
8986$as_echo_n "checking for getspnam in -lgen... " >&6; }
8987if ${ac_cv_lib_gen_getspnam+:} false; then :
8988 $as_echo_n "(cached) " >&6
8989else
8990 ac_check_lib_save_LIBS=$LIBS
8991LIBS="-lgen $LIBS"
8992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8993/* end confdefs.h. */
8994
8995/* Override any GCC internal prototype to avoid an error.
8996 Use char because int might match the return type of a GCC
8997 builtin and then its argument prototype would still apply. */
8998#ifdef __cplusplus
8999extern "C"
9000#endif
9001char getspnam ();
9002int
9003main ()
9004{
9005return getspnam ();
9006 ;
9007 return 0;
9008}
9009_ACEOF
9010if ac_fn_c_try_link "$LINENO"; then :
9011 ac_cv_lib_gen_getspnam=yes
9012else
9013 ac_cv_lib_gen_getspnam=no
9014fi
9015rm -f core conftest.err conftest.$ac_objext \
9016 conftest$ac_exeext conftest.$ac_ext
9017LIBS=$ac_check_lib_save_LIBS
9018fi
9019{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
9020$as_echo "$ac_cv_lib_gen_getspnam" >&6; }
9021if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
9022 LIBS="$LIBS -lgen"
9023fi
9024
9025fi
9026
9027{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing basename" >&5
9028$as_echo_n "checking for library containing basename... " >&6; }
9029if ${ac_cv_search_basename+:} false; then :
9030 $as_echo_n "(cached) " >&6
9031else
9032 ac_func_search_save_LIBS=$LIBS
9033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9034/* end confdefs.h. */
9035
9036/* Override any GCC internal prototype to avoid an error.
9037 Use char because int might match the return type of a GCC
9038 builtin and then its argument prototype would still apply. */
9039#ifdef __cplusplus
9040extern "C"
9041#endif
9042char basename ();
9043int
9044main ()
9045{
9046return basename ();
9047 ;
9048 return 0;
9049}
9050_ACEOF
9051for ac_lib in '' gen; do
9052 if test -z "$ac_lib"; then
9053 ac_res="none required"
9054 else
9055 ac_res=-l$ac_lib
9056 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9057 fi
9058 if ac_fn_c_try_link "$LINENO"; then :
9059 ac_cv_search_basename=$ac_res
9060fi
9061rm -f core conftest.err conftest.$ac_objext \
9062 conftest$ac_exeext
9063 if ${ac_cv_search_basename+:} false; then :
9064 break
9065fi
9066done
9067if ${ac_cv_search_basename+:} false; then :
9068
9069else
9070 ac_cv_search_basename=no
9071fi
9072rm conftest.$ac_ext
9073LIBS=$ac_func_search_save_LIBS
9074fi
9075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_basename" >&5
9076$as_echo "$ac_cv_search_basename" >&6; }
9077ac_res=$ac_cv_search_basename
9078if test "$ac_res" != no; then :
9079 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9080
9081$as_echo "#define HAVE_BASENAME 1" >>confdefs.h
9082
9083fi
9084
9085
9086zlib=yes
9087
9088# Check whether --with-zlib was given.
9089if test "${with_zlib+set}" = set; then :
9090 withval=$with_zlib; if test "x$withval" = "xno" ; then
9091 zlib=no
9092 elif test "x$withval" != "xyes"; then
9093 if test -d "$withval/lib"; then
9094 if test -n "${rpath_opt}"; then
9095 LDFLAGS="-L${withval}/lib ${rpath_opt}${withval}/lib ${LDFLAGS}"
9096 else
9097 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
9098 fi
9099 else
9100 if test -n "${rpath_opt}"; then
9101 LDFLAGS="-L${withval} ${rpath_opt}${withval} ${LDFLAGS}"
9102 else
9103 LDFLAGS="-L${withval} ${LDFLAGS}"
9104 fi
9105 fi
9106 if test -d "$withval/include"; then
9107 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
9108 else
9109 CPPFLAGS="-I${withval} ${CPPFLAGS}"
9110 fi
9111 fi
9112
9113fi
9114
9115
9116{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5
9117$as_echo_n "checking for zlib... " >&6; }
9118if test "x${zlib}" = "xno"; then
9119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9120$as_echo "no" >&6; }
9121else
9122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9123$as_echo "yes" >&6; }
9124
9125$as_echo "#define WITH_ZLIB 1" >>confdefs.h
9126
9127 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9128if test "x$ac_cv_header_zlib_h" = xyes; then :
9129
9130else
9131 as_fn_error $? "*** zlib.h missing - please install first or check config.log ***" "$LINENO" 5
9132fi
9133
9134
9135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
9136$as_echo_n "checking for deflate in -lz... " >&6; }
9137if ${ac_cv_lib_z_deflate+:} false; then :
9138 $as_echo_n "(cached) " >&6
9139else
9140 ac_check_lib_save_LIBS=$LIBS
9141LIBS="-lz $LIBS"
9142cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9143/* end confdefs.h. */
9144
9145/* Override any GCC internal prototype to avoid an error.
9146 Use char because int might match the return type of a GCC
9147 builtin and then its argument prototype would still apply. */
9148#ifdef __cplusplus
9149extern "C"
9150#endif
9151char deflate ();
9152int
9153main ()
9154{
9155return deflate ();
9156 ;
9157 return 0;
9158}
9159_ACEOF
9160if ac_fn_c_try_link "$LINENO"; then :
9161 ac_cv_lib_z_deflate=yes
9162else
9163 ac_cv_lib_z_deflate=no
9164fi
9165rm -f core conftest.err conftest.$ac_objext \
9166 conftest$ac_exeext conftest.$ac_ext
9167LIBS=$ac_check_lib_save_LIBS
9168fi
9169{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
9170$as_echo "$ac_cv_lib_z_deflate" >&6; }
9171if test "x$ac_cv_lib_z_deflate" = xyes; then :
9172 cat >>confdefs.h <<_ACEOF
9173#define HAVE_LIBZ 1
9174_ACEOF
9175
9176 LIBS="-lz $LIBS"
9177
9178else
9179
9180 saved_CPPFLAGS="$CPPFLAGS"
9181 saved_LDFLAGS="$LDFLAGS"
9182 save_LIBS="$LIBS"
9183 if test -n "${rpath_opt}"; then
9184 LDFLAGS="-L/usr/local/lib ${rpath_opt}/usr/local/lib ${saved_LDFLAGS}"
9185 else
9186 LDFLAGS="-L/usr/local/lib ${saved_LDFLAGS}"
9187 fi
9188 CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}"
9189 LIBS="$LIBS -lz"
9190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9191/* end confdefs.h. */
9192
9193/* Override any GCC internal prototype to avoid an error.
9194 Use char because int might match the return type of a GCC
9195 builtin and then its argument prototype would still apply. */
9196#ifdef __cplusplus
9197extern "C"
9198#endif
9199char deflate ();
9200int
9201main ()
9202{
9203return deflate ();
9204 ;
9205 return 0;
9206}
9207_ACEOF
9208if ac_fn_c_try_link "$LINENO"; then :
9209 $as_echo "#define HAVE_LIBZ 1" >>confdefs.h
9210
9211else
9212
9213 as_fn_error $? "*** zlib missing - please install first or check config.log ***" "$LINENO" 5
9214
9215
9216fi
9217rm -f core conftest.err conftest.$ac_objext \
9218 conftest$ac_exeext conftest.$ac_ext
9219
9220
9221fi
9222
9223
9224
9225# Check whether --with-zlib-version-check was given.
9226if test "${with_zlib_version_check+set}" = set; then :
9227 withval=$with_zlib_version_check; if test "x$withval" = "xno" ; then
9228 zlib_check_nonfatal=1
9229 fi
9230
9231
9232fi
9233
9234
9235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for possibly buggy zlib" >&5
9236$as_echo_n "checking for possibly buggy zlib... " >&6; }
9237 if test "$cross_compiling" = yes; then :
9238 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking zlib version" >&5
9239$as_echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;}
9240
9241else
9242 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9243/* end confdefs.h. */
9244
9245#include <stdio.h>
9246#include <stdlib.h>
9247#include <zlib.h>
9248
9249int
9250main ()
9251{
9252
9253 int a=0, b=0, c=0, d=0, n, v;
9254 n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
9255 if (n != 3 && n != 4)
9256 exit(1);
9257 v = a*1000000 + b*10000 + c*100 + d;
9258 fprintf(stderr, "found zlib version %s (%d)\n", ZLIB_VERSION, v);
9259
9260 /* 1.1.4 is OK */
9261 if (a == 1 && b == 1 && c >= 4)
9262 exit(0);
9263
9264 /* 1.2.3 and up are OK */
9265 if (v >= 1020300)
9266 exit(0);
9267
9268 exit(2);
9269
9270 ;
9271 return 0;
9272}
9273_ACEOF
9274if ac_fn_c_try_run "$LINENO"; then :
9275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9276$as_echo "no" >&6; }
9277else
9278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9279$as_echo "yes" >&6; }
9280 if test -z "$zlib_check_nonfatal" ; then
9281 as_fn_error $? "*** zlib too old - check config.log ***
9282Your reported zlib version has known security problems. It's possible your
9283vendor has fixed these problems without changing the version number. If you
9284are sure this is the case, you can disable the check by running
9285\"./configure --without-zlib-version-check\".
9286If you are in doubt, upgrade zlib to version 1.2.3 or greater.
9287See http://www.gzip.org/zlib/ for details." "$LINENO" 5
9288 else
9289 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib version may have security problems" >&5
9290$as_echo "$as_me: WARNING: zlib version may have security problems" >&2;}
9291 fi
9292
9293fi
9294rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9295 conftest.$ac_objext conftest.beam conftest.$ac_ext
9296fi
9297
9298fi
9299
9300ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
9301if test "x$ac_cv_func_strcasecmp" = xyes; then :
9302
9303else
9304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp in -lresolv" >&5
9305$as_echo_n "checking for strcasecmp in -lresolv... " >&6; }
9306if ${ac_cv_lib_resolv_strcasecmp+:} false; then :
9307 $as_echo_n "(cached) " >&6
9308else
9309 ac_check_lib_save_LIBS=$LIBS
9310LIBS="-lresolv $LIBS"
9311cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9312/* end confdefs.h. */
9313
9314/* Override any GCC internal prototype to avoid an error.
9315 Use char because int might match the return type of a GCC
9316 builtin and then its argument prototype would still apply. */
9317#ifdef __cplusplus
9318extern "C"
9319#endif
9320char strcasecmp ();
9321int
9322main ()
9323{
9324return strcasecmp ();
9325 ;
9326 return 0;
9327}
9328_ACEOF
9329if ac_fn_c_try_link "$LINENO"; then :
9330 ac_cv_lib_resolv_strcasecmp=yes
9331else
9332 ac_cv_lib_resolv_strcasecmp=no
9333fi
9334rm -f core conftest.err conftest.$ac_objext \
9335 conftest$ac_exeext conftest.$ac_ext
9336LIBS=$ac_check_lib_save_LIBS
9337fi
9338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_strcasecmp" >&5
9339$as_echo "$ac_cv_lib_resolv_strcasecmp" >&6; }
9340if test "x$ac_cv_lib_resolv_strcasecmp" = xyes; then :
9341 LIBS="$LIBS -lresolv"
9342fi
9343
9344
9345fi
9346
9347for ac_func in utimes
9348do :
9349 ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
9350if test "x$ac_cv_func_utimes" = xyes; then :
9351 cat >>confdefs.h <<_ACEOF
9352#define HAVE_UTIMES 1
9353_ACEOF
9354
9355else
9356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimes in -lc89" >&5
9357$as_echo_n "checking for utimes in -lc89... " >&6; }
9358if ${ac_cv_lib_c89_utimes+:} false; then :
9359 $as_echo_n "(cached) " >&6
9360else
9361 ac_check_lib_save_LIBS=$LIBS
9362LIBS="-lc89 $LIBS"
9363cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9364/* end confdefs.h. */
9365
9366/* Override any GCC internal prototype to avoid an error.
9367 Use char because int might match the return type of a GCC
9368 builtin and then its argument prototype would still apply. */
9369#ifdef __cplusplus
9370extern "C"
9371#endif
9372char utimes ();
9373int
9374main ()
9375{
9376return utimes ();
9377 ;
9378 return 0;
9379}
9380_ACEOF
9381if ac_fn_c_try_link "$LINENO"; then :
9382 ac_cv_lib_c89_utimes=yes
9383else
9384 ac_cv_lib_c89_utimes=no
9385fi
9386rm -f core conftest.err conftest.$ac_objext \
9387 conftest$ac_exeext conftest.$ac_ext
9388LIBS=$ac_check_lib_save_LIBS
9389fi
9390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c89_utimes" >&5
9391$as_echo "$ac_cv_lib_c89_utimes" >&6; }
9392if test "x$ac_cv_lib_c89_utimes" = xyes; then :
9393 $as_echo "#define HAVE_UTIMES 1" >>confdefs.h
9394
9395 LIBS="$LIBS -lc89"
9396fi
9397
9398
9399fi
9400done
9401
9402
9403for ac_header in bsd/libutil.h libutil.h
9404do :
9405 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9406ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9407if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9408 cat >>confdefs.h <<_ACEOF
9409#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9410_ACEOF
9411
9412fi
9413
9414done
9415
9416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fmt_scaled" >&5
9417$as_echo_n "checking for library containing fmt_scaled... " >&6; }
9418if ${ac_cv_search_fmt_scaled+:} false; then :
9419 $as_echo_n "(cached) " >&6
9420else
9421 ac_func_search_save_LIBS=$LIBS
9422cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9423/* end confdefs.h. */
9424
9425/* Override any GCC internal prototype to avoid an error.
9426 Use char because int might match the return type of a GCC
9427 builtin and then its argument prototype would still apply. */
9428#ifdef __cplusplus
9429extern "C"
9430#endif
9431char fmt_scaled ();
9432int
9433main ()
9434{
9435return fmt_scaled ();
9436 ;
9437 return 0;
9438}
9439_ACEOF
9440for ac_lib in '' util bsd; do
9441 if test -z "$ac_lib"; then
9442 ac_res="none required"
9443 else
9444 ac_res=-l$ac_lib
9445 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9446 fi
9447 if ac_fn_c_try_link "$LINENO"; then :
9448 ac_cv_search_fmt_scaled=$ac_res
9449fi
9450rm -f core conftest.err conftest.$ac_objext \
9451 conftest$ac_exeext
9452 if ${ac_cv_search_fmt_scaled+:} false; then :
9453 break
9454fi
9455done
9456if ${ac_cv_search_fmt_scaled+:} false; then :
9457
9458else
9459 ac_cv_search_fmt_scaled=no
9460fi
9461rm conftest.$ac_ext
9462LIBS=$ac_func_search_save_LIBS
9463fi
9464{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fmt_scaled" >&5
9465$as_echo "$ac_cv_search_fmt_scaled" >&6; }
9466ac_res=$ac_cv_search_fmt_scaled
9467if test "$ac_res" != no; then :
9468 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9469
9470fi
9471
9472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing scan_scaled" >&5
9473$as_echo_n "checking for library containing scan_scaled... " >&6; }
9474if ${ac_cv_search_scan_scaled+:} false; then :
9475 $as_echo_n "(cached) " >&6
9476else
9477 ac_func_search_save_LIBS=$LIBS
9478cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9479/* end confdefs.h. */
9480
9481/* Override any GCC internal prototype to avoid an error.
9482 Use char because int might match the return type of a GCC
9483 builtin and then its argument prototype would still apply. */
9484#ifdef __cplusplus
9485extern "C"
9486#endif
9487char scan_scaled ();
9488int
9489main ()
9490{
9491return scan_scaled ();
9492 ;
9493 return 0;
9494}
9495_ACEOF
9496for ac_lib in '' util bsd; do
9497 if test -z "$ac_lib"; then
9498 ac_res="none required"
9499 else
9500 ac_res=-l$ac_lib
9501 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9502 fi
9503 if ac_fn_c_try_link "$LINENO"; then :
9504 ac_cv_search_scan_scaled=$ac_res
9505fi
9506rm -f core conftest.err conftest.$ac_objext \
9507 conftest$ac_exeext
9508 if ${ac_cv_search_scan_scaled+:} false; then :
9509 break
9510fi
9511done
9512if ${ac_cv_search_scan_scaled+:} false; then :
9513
9514else
9515 ac_cv_search_scan_scaled=no
9516fi
9517rm conftest.$ac_ext
9518LIBS=$ac_func_search_save_LIBS
9519fi
9520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_scan_scaled" >&5
9521$as_echo "$ac_cv_search_scan_scaled" >&6; }
9522ac_res=$ac_cv_search_scan_scaled
9523if test "$ac_res" != no; then :
9524 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9525
9526fi
9527
9528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing login" >&5
9529$as_echo_n "checking for library containing login... " >&6; }
9530if ${ac_cv_search_login+:} false; then :
9531 $as_echo_n "(cached) " >&6
9532else
9533 ac_func_search_save_LIBS=$LIBS
9534cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9535/* end confdefs.h. */
9536
9537/* Override any GCC internal prototype to avoid an error.
9538 Use char because int might match the return type of a GCC
9539 builtin and then its argument prototype would still apply. */
9540#ifdef __cplusplus
9541extern "C"
9542#endif
9543char login ();
9544int
9545main ()
9546{
9547return login ();
9548 ;
9549 return 0;
9550}
9551_ACEOF
9552for ac_lib in '' util bsd; do
9553 if test -z "$ac_lib"; then
9554 ac_res="none required"
9555 else
9556 ac_res=-l$ac_lib
9557 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9558 fi
9559 if ac_fn_c_try_link "$LINENO"; then :
9560 ac_cv_search_login=$ac_res
9561fi
9562rm -f core conftest.err conftest.$ac_objext \
9563 conftest$ac_exeext
9564 if ${ac_cv_search_login+:} false; then :
9565 break
9566fi
9567done
9568if ${ac_cv_search_login+:} false; then :
9569
9570else
9571 ac_cv_search_login=no
9572fi
9573rm conftest.$ac_ext
9574LIBS=$ac_func_search_save_LIBS
9575fi
9576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_login" >&5
9577$as_echo "$ac_cv_search_login" >&6; }
9578ac_res=$ac_cv_search_login
9579if test "$ac_res" != no; then :
9580 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9581
9582fi
9583
9584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing logout" >&5
9585$as_echo_n "checking for library containing logout... " >&6; }
9586if ${ac_cv_search_logout+:} false; then :
9587 $as_echo_n "(cached) " >&6
9588else
9589 ac_func_search_save_LIBS=$LIBS
9590cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9591/* end confdefs.h. */
9592
9593/* Override any GCC internal prototype to avoid an error.
9594 Use char because int might match the return type of a GCC
9595 builtin and then its argument prototype would still apply. */
9596#ifdef __cplusplus
9597extern "C"
9598#endif
9599char logout ();
9600int
9601main ()
9602{
9603return logout ();
9604 ;
9605 return 0;
9606}
9607_ACEOF
9608for ac_lib in '' util bsd; do
9609 if test -z "$ac_lib"; then
9610 ac_res="none required"
9611 else
9612 ac_res=-l$ac_lib
9613 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9614 fi
9615 if ac_fn_c_try_link "$LINENO"; then :
9616 ac_cv_search_logout=$ac_res
9617fi
9618rm -f core conftest.err conftest.$ac_objext \
9619 conftest$ac_exeext
9620 if ${ac_cv_search_logout+:} false; then :
9621 break
9622fi
9623done
9624if ${ac_cv_search_logout+:} false; then :
9625
9626else
9627 ac_cv_search_logout=no
9628fi
9629rm conftest.$ac_ext
9630LIBS=$ac_func_search_save_LIBS
9631fi
9632{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_logout" >&5
9633$as_echo "$ac_cv_search_logout" >&6; }
9634ac_res=$ac_cv_search_logout
9635if test "$ac_res" != no; then :
9636 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9637
9638fi
9639
9640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing logwtmp" >&5
9641$as_echo_n "checking for library containing logwtmp... " >&6; }
9642if ${ac_cv_search_logwtmp+:} false; then :
9643 $as_echo_n "(cached) " >&6
9644else
9645 ac_func_search_save_LIBS=$LIBS
9646cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9647/* end confdefs.h. */
9648
9649/* Override any GCC internal prototype to avoid an error.
9650 Use char because int might match the return type of a GCC
9651 builtin and then its argument prototype would still apply. */
9652#ifdef __cplusplus
9653extern "C"
9654#endif
9655char logwtmp ();
9656int
9657main ()
9658{
9659return logwtmp ();
9660 ;
9661 return 0;
9662}
9663_ACEOF
9664for ac_lib in '' util bsd; do
9665 if test -z "$ac_lib"; then
9666 ac_res="none required"
9667 else
9668 ac_res=-l$ac_lib
9669 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9670 fi
9671 if ac_fn_c_try_link "$LINENO"; then :
9672 ac_cv_search_logwtmp=$ac_res
9673fi
9674rm -f core conftest.err conftest.$ac_objext \
9675 conftest$ac_exeext
9676 if ${ac_cv_search_logwtmp+:} false; then :
9677 break
9678fi
9679done
9680if ${ac_cv_search_logwtmp+:} false; then :
9681
9682else
9683 ac_cv_search_logwtmp=no
9684fi
9685rm conftest.$ac_ext
9686LIBS=$ac_func_search_save_LIBS
9687fi
9688{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_logwtmp" >&5
9689$as_echo "$ac_cv_search_logwtmp" >&6; }
9690ac_res=$ac_cv_search_logwtmp
9691if test "$ac_res" != no; then :
9692 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9693
9694fi
9695
9696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openpty" >&5
9697$as_echo_n "checking for library containing openpty... " >&6; }
9698if ${ac_cv_search_openpty+:} false; then :
9699 $as_echo_n "(cached) " >&6
9700else
9701 ac_func_search_save_LIBS=$LIBS
9702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9703/* end confdefs.h. */
9704
9705/* Override any GCC internal prototype to avoid an error.
9706 Use char because int might match the return type of a GCC
9707 builtin and then its argument prototype would still apply. */
9708#ifdef __cplusplus
9709extern "C"
9710#endif
9711char openpty ();
9712int
9713main ()
9714{
9715return openpty ();
9716 ;
9717 return 0;
9718}
9719_ACEOF
9720for ac_lib in '' util bsd; do
9721 if test -z "$ac_lib"; then
9722 ac_res="none required"
9723 else
9724 ac_res=-l$ac_lib
9725 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9726 fi
9727 if ac_fn_c_try_link "$LINENO"; then :
9728 ac_cv_search_openpty=$ac_res
9729fi
9730rm -f core conftest.err conftest.$ac_objext \
9731 conftest$ac_exeext
9732 if ${ac_cv_search_openpty+:} false; then :
9733 break
9734fi
9735done
9736if ${ac_cv_search_openpty+:} false; then :
9737
9738else
9739 ac_cv_search_openpty=no
9740fi
9741rm conftest.$ac_ext
9742LIBS=$ac_func_search_save_LIBS
9743fi
9744{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openpty" >&5
9745$as_echo "$ac_cv_search_openpty" >&6; }
9746ac_res=$ac_cv_search_openpty
9747if test "$ac_res" != no; then :
9748 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9749
9750fi
9751
9752{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing updwtmp" >&5
9753$as_echo_n "checking for library containing updwtmp... " >&6; }
9754if ${ac_cv_search_updwtmp+:} false; then :
9755 $as_echo_n "(cached) " >&6
9756else
9757 ac_func_search_save_LIBS=$LIBS
9758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9759/* end confdefs.h. */
9760
9761/* Override any GCC internal prototype to avoid an error.
9762 Use char because int might match the return type of a GCC
9763 builtin and then its argument prototype would still apply. */
9764#ifdef __cplusplus
9765extern "C"
9766#endif
9767char updwtmp ();
9768int
9769main ()
9770{
9771return updwtmp ();
9772 ;
9773 return 0;
9774}
9775_ACEOF
9776for ac_lib in '' util bsd; do
9777 if test -z "$ac_lib"; then
9778 ac_res="none required"
9779 else
9780 ac_res=-l$ac_lib
9781 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9782 fi
9783 if ac_fn_c_try_link "$LINENO"; then :
9784 ac_cv_search_updwtmp=$ac_res
9785fi
9786rm -f core conftest.err conftest.$ac_objext \
9787 conftest$ac_exeext
9788 if ${ac_cv_search_updwtmp+:} false; then :
9789 break
9790fi
9791done
9792if ${ac_cv_search_updwtmp+:} false; then :
9793
9794else
9795 ac_cv_search_updwtmp=no
9796fi
9797rm conftest.$ac_ext
9798LIBS=$ac_func_search_save_LIBS
9799fi
9800{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_updwtmp" >&5
9801$as_echo "$ac_cv_search_updwtmp" >&6; }
9802ac_res=$ac_cv_search_updwtmp
9803if test "$ac_res" != no; then :
9804 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9805
9806fi
9807
9808for ac_func in fmt_scaled scan_scaled login logout openpty updwtmp logwtmp
9809do :
9810 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9811ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9812if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9813 cat >>confdefs.h <<_ACEOF
9814#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9815_ACEOF
9816
9817fi
9818done
9819
9820
9821# On some platforms, inet_ntop and gethostbyname may be found in libresolv
9822# or libnsl.
9823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
9824$as_echo_n "checking for library containing inet_ntop... " >&6; }
9825if ${ac_cv_search_inet_ntop+:} false; then :
9826 $as_echo_n "(cached) " >&6
9827else
9828 ac_func_search_save_LIBS=$LIBS
9829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9830/* end confdefs.h. */
9831
9832/* Override any GCC internal prototype to avoid an error.
9833 Use char because int might match the return type of a GCC
9834 builtin and then its argument prototype would still apply. */
9835#ifdef __cplusplus
9836extern "C"
9837#endif
9838char inet_ntop ();
9839int
9840main ()
9841{
9842return inet_ntop ();
9843 ;
9844 return 0;
9845}
9846_ACEOF
9847for ac_lib in '' resolv nsl; do
9848 if test -z "$ac_lib"; then
9849 ac_res="none required"
9850 else
9851 ac_res=-l$ac_lib
9852 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9853 fi
9854 if ac_fn_c_try_link "$LINENO"; then :
9855 ac_cv_search_inet_ntop=$ac_res
9856fi
9857rm -f core conftest.err conftest.$ac_objext \
9858 conftest$ac_exeext
9859 if ${ac_cv_search_inet_ntop+:} false; then :
9860 break
9861fi
9862done
9863if ${ac_cv_search_inet_ntop+:} false; then :
9864
9865else
9866 ac_cv_search_inet_ntop=no
9867fi
9868rm conftest.$ac_ext
9869LIBS=$ac_func_search_save_LIBS
9870fi
9871{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
9872$as_echo "$ac_cv_search_inet_ntop" >&6; }
9873ac_res=$ac_cv_search_inet_ntop
9874if test "$ac_res" != no; then :
9875 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9876
9877fi
9878
9879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
9880$as_echo_n "checking for library containing gethostbyname... " >&6; }
9881if ${ac_cv_search_gethostbyname+:} false; then :
9882 $as_echo_n "(cached) " >&6
9883else
9884 ac_func_search_save_LIBS=$LIBS
9885cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9886/* end confdefs.h. */
9887
9888/* Override any GCC internal prototype to avoid an error.
9889 Use char because int might match the return type of a GCC
9890 builtin and then its argument prototype would still apply. */
9891#ifdef __cplusplus
9892extern "C"
9893#endif
9894char gethostbyname ();
9895int
9896main ()
9897{
9898return gethostbyname ();
9899 ;
9900 return 0;
9901}
9902_ACEOF
9903for ac_lib in '' resolv nsl; do
9904 if test -z "$ac_lib"; then
9905 ac_res="none required"
9906 else
9907 ac_res=-l$ac_lib
9908 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9909 fi
9910 if ac_fn_c_try_link "$LINENO"; then :
9911 ac_cv_search_gethostbyname=$ac_res
9912fi
9913rm -f core conftest.err conftest.$ac_objext \
9914 conftest$ac_exeext
9915 if ${ac_cv_search_gethostbyname+:} false; then :
9916 break
9917fi
9918done
9919if ${ac_cv_search_gethostbyname+:} false; then :
9920
9921else
9922 ac_cv_search_gethostbyname=no
9923fi
9924rm conftest.$ac_ext
9925LIBS=$ac_func_search_save_LIBS
9926fi
9927{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
9928$as_echo "$ac_cv_search_gethostbyname" >&6; }
9929ac_res=$ac_cv_search_gethostbyname
9930if test "$ac_res" != no; then :
9931 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9932
9933fi
9934
9935
9936# "Particular Function Checks"
9937# see https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Functions.html
9938for ac_func in strftime
9939do :
9940 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
9941if test "x$ac_cv_func_strftime" = xyes; then :
9942 cat >>confdefs.h <<_ACEOF
9943#define HAVE_STRFTIME 1
9944_ACEOF
9945
9946else
9947 # strftime is in -lintl on SCO UNIX.
9948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
9949$as_echo_n "checking for strftime in -lintl... " >&6; }
9950if ${ac_cv_lib_intl_strftime+:} false; then :
9951 $as_echo_n "(cached) " >&6
9952else
9953 ac_check_lib_save_LIBS=$LIBS
9954LIBS="-lintl $LIBS"
9955cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9956/* end confdefs.h. */
9957
9958/* Override any GCC internal prototype to avoid an error.
9959 Use char because int might match the return type of a GCC
9960 builtin and then its argument prototype would still apply. */
9961#ifdef __cplusplus
9962extern "C"
9963#endif
9964char strftime ();
9965int
9966main ()
9967{
9968return strftime ();
9969 ;
9970 return 0;
9971}
9972_ACEOF
9973if ac_fn_c_try_link "$LINENO"; then :
9974 ac_cv_lib_intl_strftime=yes
9975else
9976 ac_cv_lib_intl_strftime=no
9977fi
9978rm -f core conftest.err conftest.$ac_objext \
9979 conftest$ac_exeext conftest.$ac_ext
9980LIBS=$ac_check_lib_save_LIBS
9981fi
9982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
9983$as_echo "$ac_cv_lib_intl_strftime" >&6; }
9984if test "x$ac_cv_lib_intl_strftime" = xyes; then :
9985 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
9986
9987LIBS="-lintl $LIBS"
9988fi
9989
9990fi
9991done
9992
9993for ac_header in stdlib.h
9994do :
9995 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
9996if test "x$ac_cv_header_stdlib_h" = xyes; then :
9997 cat >>confdefs.h <<_ACEOF
9998#define HAVE_STDLIB_H 1
9999_ACEOF
10000
10001fi
10002
10003done
10004
10005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
10006$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
10007if ${ac_cv_func_malloc_0_nonnull+:} false; then :
10008 $as_echo_n "(cached) " >&6
10009else
10010 if test "$cross_compiling" = yes; then :
10011 ac_cv_func_malloc_0_nonnull=no
10012else
10013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10014/* end confdefs.h. */
10015#if defined STDC_HEADERS || defined HAVE_STDLIB_H
10016# include <stdlib.h>
10017#else
10018char *malloc ();
10019#endif
10020
10021int
10022main ()
10023{
10024return ! malloc (0);
10025 ;
10026 return 0;
10027}
10028_ACEOF
10029if ac_fn_c_try_run "$LINENO"; then :
10030 ac_cv_func_malloc_0_nonnull=yes
10031else
10032 ac_cv_func_malloc_0_nonnull=no
10033fi
10034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10035 conftest.$ac_objext conftest.beam conftest.$ac_ext
10036fi
10037
10038fi
10039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
10040$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
10041if test $ac_cv_func_malloc_0_nonnull = yes; then :
10042
10043$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
10044
10045else
10046 $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
10047
10048 case " $LIBOBJS " in
10049 *" malloc.$ac_objext "* ) ;;
10050 *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
10051 ;;
10052esac
10053
10054
10055$as_echo "#define malloc rpl_malloc" >>confdefs.h
10056
10057fi
10058
10059
10060for ac_header in stdlib.h
10061do :
10062 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
10063if test "x$ac_cv_header_stdlib_h" = xyes; then :
10064 cat >>confdefs.h <<_ACEOF
10065#define HAVE_STDLIB_H 1
10066_ACEOF
10067
10068fi
10069
10070done
10071
10072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
10073$as_echo_n "checking for GNU libc compatible realloc... " >&6; }
10074if ${ac_cv_func_realloc_0_nonnull+:} false; then :
10075 $as_echo_n "(cached) " >&6
10076else
10077 if test "$cross_compiling" = yes; then :
10078 ac_cv_func_realloc_0_nonnull=no
10079else
10080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10081/* end confdefs.h. */
10082#if defined STDC_HEADERS || defined HAVE_STDLIB_H
10083# include <stdlib.h>
10084#else
10085char *realloc ();
10086#endif
10087
10088int
10089main ()
10090{
10091return ! realloc (0, 0);
10092 ;
10093 return 0;
10094}
10095_ACEOF
10096if ac_fn_c_try_run "$LINENO"; then :
10097 ac_cv_func_realloc_0_nonnull=yes
10098else
10099 ac_cv_func_realloc_0_nonnull=no
10100fi
10101rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10102 conftest.$ac_objext conftest.beam conftest.$ac_ext
10103fi
10104
10105fi
10106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
10107$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
10108if test $ac_cv_func_realloc_0_nonnull = yes; then :
10109
10110$as_echo "#define HAVE_REALLOC 1" >>confdefs.h
10111
10112else
10113 $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
10114
10115 case " $LIBOBJS " in
10116 *" realloc.$ac_objext "* ) ;;
10117 *) LIBOBJS="$LIBOBJS realloc.$ac_objext"
10118 ;;
10119esac
10120
10121
10122$as_echo "#define realloc rpl_realloc" >>confdefs.h
10123
10124fi
10125
10126
10127# autoconf doesn't have AC_FUNC_CALLOC so fake it if malloc returns NULL;
10128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if calloc(0, N) returns non-null" >&5
10129$as_echo_n "checking if calloc(0, N) returns non-null... " >&6; }
10130if test "$cross_compiling" = yes; then :
10131 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming same as malloc" >&5
10132$as_echo "$as_me: WARNING: cross compiling: assuming same as malloc" >&2;}
10133 func_calloc_0_nonnull="$ac_cv_func_malloc_0_nonnull"
10134
10135else
10136 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10137/* end confdefs.h. */
10138 #include <stdlib.h>
10139int
10140main ()
10141{
10142 void *p = calloc(0, 1); exit(p == NULL);
10143
10144 ;
10145 return 0;
10146}
10147_ACEOF
10148if ac_fn_c_try_run "$LINENO"; then :
10149 func_calloc_0_nonnull=yes
10150else
10151 func_calloc_0_nonnull=no
10152fi
10153rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10154 conftest.$ac_objext conftest.beam conftest.$ac_ext
10155fi
10156
10157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $func_calloc_0_nonnull" >&5
10158$as_echo "$func_calloc_0_nonnull" >&6; }
10159
10160if test "x$func_calloc_0_nonnull" = "xyes"; then
10161
10162$as_echo "#define HAVE_CALLOC 1" >>confdefs.h
10163
10164else
10165
10166$as_echo "#define HAVE_CALLOC 0" >>confdefs.h
10167
10168
10169$as_echo "#define calloc rpl_calloc" >>confdefs.h
10170
10171fi
10172
10173# Check for ALTDIRFUNC glob() extension
10174{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_ALTDIRFUNC support" >&5
10175$as_echo_n "checking for GLOB_ALTDIRFUNC support... " >&6; }
10176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10177/* end confdefs.h. */
10178
10179 #include <glob.h>
10180 #ifdef GLOB_ALTDIRFUNC
10181 FOUNDIT
10182 #endif
10183
10184_ACEOF
10185if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10186 $EGREP "FOUNDIT" >/dev/null 2>&1; then :
10187
10188
10189$as_echo "#define GLOB_HAS_ALTDIRFUNC 1" >>confdefs.h
10190
10191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10192$as_echo "yes" >&6; }
10193
10194else
10195
10196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10197$as_echo "no" >&6; }
10198
10199
10200fi
10201rm -f conftest*
10202
10203
10204# Check for g.gl_matchc glob() extension
10205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_matchc field in glob_t" >&5
10206$as_echo_n "checking for gl_matchc field in glob_t... " >&6; }
10207cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10208/* end confdefs.h. */
10209 #include <glob.h>
10210int
10211main ()
10212{
10213 glob_t g; g.gl_matchc = 1;
10214 ;
10215 return 0;
10216}
10217_ACEOF
10218if ac_fn_c_try_compile "$LINENO"; then :
10219
10220
10221$as_echo "#define GLOB_HAS_GL_MATCHC 1" >>confdefs.h
10222
10223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10224$as_echo "yes" >&6; }
10225
10226else
10227
10228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10229$as_echo "no" >&6; }
10230
10231fi
10232rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10233
10234# Check for g.gl_statv glob() extension
10235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_statv and GLOB_KEEPSTAT extensions for glob" >&5
10236$as_echo_n "checking for gl_statv and GLOB_KEEPSTAT extensions for glob... " >&6; }
10237cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10238/* end confdefs.h. */
10239 #include <glob.h>
10240int
10241main ()
10242{
10243
10244#ifndef GLOB_KEEPSTAT
10245#error "glob does not support GLOB_KEEPSTAT extension"
10246#endif
10247glob_t g;
10248g.gl_statv = NULL;
10249
10250 ;
10251 return 0;
10252}
10253_ACEOF
10254if ac_fn_c_try_compile "$LINENO"; then :
10255
10256
10257$as_echo "#define GLOB_HAS_GL_STATV 1" >>confdefs.h
10258
10259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10260$as_echo "yes" >&6; }
10261
10262else
10263
10264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10265$as_echo "no" >&6; }
10266
10267
10268fi
10269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10270
10271ac_fn_c_check_decl "$LINENO" "GLOB_NOMATCH" "ac_cv_have_decl_GLOB_NOMATCH" "#include <glob.h>
10272"
10273if test "x$ac_cv_have_decl_GLOB_NOMATCH" = xyes; then :
10274 ac_have_decl=1
10275else
10276 ac_have_decl=0
10277fi
10278
10279cat >>confdefs.h <<_ACEOF
10280#define HAVE_DECL_GLOB_NOMATCH $ac_have_decl
10281_ACEOF
10282
10283
10284ac_fn_c_check_decl "$LINENO" "VIS_ALL" "ac_cv_have_decl_VIS_ALL" "#include <vis.h>
10285"
10286if test "x$ac_cv_have_decl_VIS_ALL" = xyes; then :
10287
10288else
10289
10290$as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
10291
10292fi
10293
10294
10295{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct dirent allocates space for d_name" >&5
10296$as_echo_n "checking whether struct dirent allocates space for d_name... " >&6; }
10297if test "$cross_compiling" = yes; then :
10298
10299 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&5
10300$as_echo "$as_me: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&2;}
10301 $as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
10302
10303
10304
10305else
10306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10307/* end confdefs.h. */
10308
10309#include <sys/types.h>
10310#include <dirent.h>
10311int
10312main ()
10313{
10314
10315 struct dirent d;
10316 exit(sizeof(d.d_name)<=sizeof(char));
10317
10318 ;
10319 return 0;
10320}
10321_ACEOF
10322if ac_fn_c_try_run "$LINENO"; then :
10323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10324$as_echo "yes" >&6; }
10325else
10326
10327 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10328$as_echo "no" >&6; }
10329
10330$as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
10331
10332
10333fi
10334rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10335 conftest.$ac_objext conftest.beam conftest.$ac_ext
10336fi
10337
10338
10339{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /proc/pid/fd directory" >&5
10340$as_echo_n "checking for /proc/pid/fd directory... " >&6; }
10341if test -d "/proc/$$/fd" ; then
10342
10343$as_echo "#define HAVE_PROC_PID 1" >>confdefs.h
10344
10345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10346$as_echo "yes" >&6; }
10347else
10348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10349$as_echo "no" >&6; }
10350fi
10351
10352# Check whether user wants to use ldns
10353LDNS_MSG="no"
10354
10355# Check whether --with-ldns was given.
10356if test "${with_ldns+set}" = set; then :
10357 withval=$with_ldns;
10358 ldns=""
10359 if test "x$withval" = "xyes" ; then
10360 if test -n "$ac_tool_prefix"; then
10361 # Extract the first word of "${ac_tool_prefix}ldns-config", so it can be a program name with args.
10362set dummy ${ac_tool_prefix}ldns-config; ac_word=$2
10363{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10364$as_echo_n "checking for $ac_word... " >&6; }
10365if ${ac_cv_path_LDNSCONFIG+:} false; then :
10366 $as_echo_n "(cached) " >&6
10367else
10368 case $LDNSCONFIG in
10369 [\\/]* | ?:[\\/]*)
10370 ac_cv_path_LDNSCONFIG="$LDNSCONFIG" # Let the user override the test with a path.
10371 ;;
10372 *)
10373 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10374for as_dir in $PATH
10375do
10376 IFS=$as_save_IFS
10377 test -z "$as_dir" && as_dir=.
10378 for ac_exec_ext in '' $ac_executable_extensions; do
10379 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10380 ac_cv_path_LDNSCONFIG="$as_dir/$ac_word$ac_exec_ext"
10381 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10382 break 2
10383 fi
10384done
10385 done
10386IFS=$as_save_IFS
10387
10388 ;;
10389esac
10390fi
10391LDNSCONFIG=$ac_cv_path_LDNSCONFIG
10392if test -n "$LDNSCONFIG"; then
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDNSCONFIG" >&5
10394$as_echo "$LDNSCONFIG" >&6; }
10395else
10396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10397$as_echo "no" >&6; }
10398fi
10399
10400
10401fi
10402if test -z "$ac_cv_path_LDNSCONFIG"; then
10403 ac_pt_LDNSCONFIG=$LDNSCONFIG
10404 # Extract the first word of "ldns-config", so it can be a program name with args.
10405set dummy ldns-config; ac_word=$2
10406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10407$as_echo_n "checking for $ac_word... " >&6; }
10408if ${ac_cv_path_ac_pt_LDNSCONFIG+:} false; then :
10409 $as_echo_n "(cached) " >&6
10410else
10411 case $ac_pt_LDNSCONFIG in
10412 [\\/]* | ?:[\\/]*)
10413 ac_cv_path_ac_pt_LDNSCONFIG="$ac_pt_LDNSCONFIG" # Let the user override the test with a path.
10414 ;;
10415 *)
10416 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10417for as_dir in $PATH
10418do
10419 IFS=$as_save_IFS
10420 test -z "$as_dir" && as_dir=.
10421 for ac_exec_ext in '' $ac_executable_extensions; do
10422 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10423 ac_cv_path_ac_pt_LDNSCONFIG="$as_dir/$ac_word$ac_exec_ext"
10424 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10425 break 2
10426 fi
10427done
10428 done
10429IFS=$as_save_IFS
10430
10431 ;;
10432esac
10433fi
10434ac_pt_LDNSCONFIG=$ac_cv_path_ac_pt_LDNSCONFIG
10435if test -n "$ac_pt_LDNSCONFIG"; then
10436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LDNSCONFIG" >&5
10437$as_echo "$ac_pt_LDNSCONFIG" >&6; }
10438else
10439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10440$as_echo "no" >&6; }
10441fi
10442
10443 if test "x$ac_pt_LDNSCONFIG" = x; then
10444 LDNSCONFIG="no"
10445 else
10446 case $cross_compiling:$ac_tool_warned in
10447yes:)
10448{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10449$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10450ac_tool_warned=yes ;;
10451esac
10452 LDNSCONFIG=$ac_pt_LDNSCONFIG
10453 fi
10454else
10455 LDNSCONFIG="$ac_cv_path_LDNSCONFIG"
10456fi
10457
10458 if test "x$LDNSCONFIG" = "xno"; then
10459 LIBS="-lldns $LIBS"
10460 ldns=yes
10461 else
10462 LIBS="$LIBS `$LDNSCONFIG --libs`"
10463 CPPFLAGS="$CPPFLAGS `$LDNSCONFIG --cflags`"
10464 ldns=yes
10465 fi
10466 elif test "x$withval" != "xno" ; then
10467 CPPFLAGS="$CPPFLAGS -I${withval}/include"
10468 LDFLAGS="$LDFLAGS -L${withval}/lib"
10469 LIBS="-lldns $LIBS"
10470 ldns=yes
10471 fi
10472
10473 # Verify that it works.
10474 if test "x$ldns" = "xyes" ; then
10475
10476$as_echo "#define HAVE_LDNS 1" >>confdefs.h
10477
10478 LDNS_MSG="yes"
10479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldns support" >&5
10480$as_echo_n "checking for ldns support... " >&6; }
10481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10482/* end confdefs.h. */
10483
10484#include <stdio.h>
10485#include <stdlib.h>
10486#ifdef HAVE_STDINT_H
10487# include <stdint.h>
10488#endif
10489#include <ldns/ldns.h>
10490int main() { ldns_status status = ldns_verify_trusted(NULL, NULL, NULL, NULL); status=LDNS_STATUS_OK; exit(0); }
10491
10492
10493_ACEOF
10494if ac_fn_c_try_link "$LINENO"; then :
10495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10496$as_echo "yes" >&6; }
10497else
10498
10499 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10500$as_echo "no" >&6; }
10501 as_fn_error $? "** Incomplete or missing ldns libraries." "$LINENO" 5
10502
10503fi
10504rm -f core conftest.err conftest.$ac_objext \
10505 conftest$ac_exeext conftest.$ac_ext
10506 fi
10507
10508fi
10509
10510
10511# Check whether user wants libedit support
10512LIBEDIT_MSG="no"
10513
10514# Check whether --with-libedit was given.
10515if test "${with_libedit+set}" = set; then :
10516 withval=$with_libedit; if test "x$withval" != "xno" ; then
10517 if test "x$withval" = "xyes" ; then
10518 if test -n "$ac_tool_prefix"; then
10519 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10520set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10522$as_echo_n "checking for $ac_word... " >&6; }
10523if ${ac_cv_path_PKGCONFIG+:} false; then :
10524 $as_echo_n "(cached) " >&6
10525else
10526 case $PKGCONFIG in
10527 [\\/]* | ?:[\\/]*)
10528 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
10529 ;;
10530 *)
10531 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10532for as_dir in $PATH
10533do
10534 IFS=$as_save_IFS
10535 test -z "$as_dir" && as_dir=.
10536 for ac_exec_ext in '' $ac_executable_extensions; do
10537 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10538 ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
10539 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10540 break 2
10541 fi
10542done
10543 done
10544IFS=$as_save_IFS
10545
10546 ;;
10547esac
10548fi
10549PKGCONFIG=$ac_cv_path_PKGCONFIG
10550if test -n "$PKGCONFIG"; then
10551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
10552$as_echo "$PKGCONFIG" >&6; }
10553else
10554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10555$as_echo "no" >&6; }
10556fi
10557
10558
10559fi
10560if test -z "$ac_cv_path_PKGCONFIG"; then
10561 ac_pt_PKGCONFIG=$PKGCONFIG
10562 # Extract the first word of "pkg-config", so it can be a program name with args.
10563set dummy pkg-config; ac_word=$2
10564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10565$as_echo_n "checking for $ac_word... " >&6; }
10566if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
10567 $as_echo_n "(cached) " >&6
10568else
10569 case $ac_pt_PKGCONFIG in
10570 [\\/]* | ?:[\\/]*)
10571 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
10572 ;;
10573 *)
10574 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10575for as_dir in $PATH
10576do
10577 IFS=$as_save_IFS
10578 test -z "$as_dir" && as_dir=.
10579 for ac_exec_ext in '' $ac_executable_extensions; do
10580 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10581 ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
10582 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10583 break 2
10584 fi
10585done
10586 done
10587IFS=$as_save_IFS
10588
10589 ;;
10590esac
10591fi
10592ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
10593if test -n "$ac_pt_PKGCONFIG"; then
10594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
10595$as_echo "$ac_pt_PKGCONFIG" >&6; }
10596else
10597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10598$as_echo "no" >&6; }
10599fi
10600
10601 if test "x$ac_pt_PKGCONFIG" = x; then
10602 PKGCONFIG="no"
10603 else
10604 case $cross_compiling:$ac_tool_warned in
10605yes:)
10606{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10607$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10608ac_tool_warned=yes ;;
10609esac
10610 PKGCONFIG=$ac_pt_PKGCONFIG
10611 fi
10612else
10613 PKGCONFIG="$ac_cv_path_PKGCONFIG"
10614fi
10615
10616 if test "x$PKGCONFIG" != "xno"; then
10617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PKGCONFIG knows about libedit" >&5
10618$as_echo_n "checking if $PKGCONFIG knows about libedit... " >&6; }
10619 if "$PKGCONFIG" libedit; then
10620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10621$as_echo "yes" >&6; }
10622 use_pkgconfig_for_libedit=yes
10623 else
10624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10625$as_echo "no" >&6; }
10626 fi
10627 fi
10628 else
10629 CPPFLAGS="$CPPFLAGS -I${withval}/include"
10630 if test -n "${rpath_opt}"; then
10631 LDFLAGS="-L${withval}/lib ${rpath_opt}${withval}/lib ${LDFLAGS}"
10632 else
10633 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
10634 fi
10635 fi
10636 if test "x$use_pkgconfig_for_libedit" = "xyes"; then
10637 LIBEDIT=`$PKGCONFIG --libs libedit`
10638 CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libedit`"
10639 else
10640 LIBEDIT="-ledit -lcurses"
10641 fi
10642 OTHERLIBS=`echo $LIBEDIT | sed 's/-ledit//'`
10643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_init in -ledit" >&5
10644$as_echo_n "checking for el_init in -ledit... " >&6; }
10645if ${ac_cv_lib_edit_el_init+:} false; then :
10646 $as_echo_n "(cached) " >&6
10647else
10648 ac_check_lib_save_LIBS=$LIBS
10649LIBS="-ledit $OTHERLIBS
10650 $LIBS"
10651cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10652/* end confdefs.h. */
10653
10654/* Override any GCC internal prototype to avoid an error.
10655 Use char because int might match the return type of a GCC
10656 builtin and then its argument prototype would still apply. */
10657#ifdef __cplusplus
10658extern "C"
10659#endif
10660char el_init ();
10661int
10662main ()
10663{
10664return el_init ();
10665 ;
10666 return 0;
10667}
10668_ACEOF
10669if ac_fn_c_try_link "$LINENO"; then :
10670 ac_cv_lib_edit_el_init=yes
10671else
10672 ac_cv_lib_edit_el_init=no
10673fi
10674rm -f core conftest.err conftest.$ac_objext \
10675 conftest$ac_exeext conftest.$ac_ext
10676LIBS=$ac_check_lib_save_LIBS
10677fi
10678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_el_init" >&5
10679$as_echo "$ac_cv_lib_edit_el_init" >&6; }
10680if test "x$ac_cv_lib_edit_el_init" = xyes; then :
10681
10682$as_echo "#define USE_LIBEDIT 1" >>confdefs.h
10683
10684 LIBEDIT_MSG="yes"
10685
10686
10687else
10688 as_fn_error $? "libedit not found" "$LINENO" 5
10689fi
10690
10691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libedit version is compatible" >&5
10692$as_echo_n "checking if libedit version is compatible... " >&6; }
10693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10694/* end confdefs.h. */
10695 #include <histedit.h>
10696int
10697main ()
10698{
10699
10700 int i = H_SETSIZE;
10701 el_init("", NULL, NULL, NULL);
10702 exit(0);
10703
10704 ;
10705 return 0;
10706}
10707_ACEOF
10708if ac_fn_c_try_compile "$LINENO"; then :
10709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10710$as_echo "yes" >&6; }
10711else
10712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10713$as_echo "no" >&6; }
10714 as_fn_error $? "libedit version is not compatible" "$LINENO" 5
10715
10716fi
10717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10718 fi
10719
10720fi
10721
10722
10723AUDIT_MODULE=none
10724
10725# Check whether --with-audit was given.
10726if test "${with_audit+set}" = set; then :
10727 withval=$with_audit;
10728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported audit module" >&5
10729$as_echo_n "checking for supported audit module... " >&6; }
10730 case "$withval" in
10731 bsm)
10732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bsm" >&5
10733$as_echo "bsm" >&6; }
10734 AUDIT_MODULE=bsm
10735 for ac_header in bsm/audit.h
10736do :
10737 ac_fn_c_check_header_compile "$LINENO" "bsm/audit.h" "ac_cv_header_bsm_audit_h" "
10738#ifdef HAVE_TIME_H
10739# include <time.h>
10740#endif
10741
10742
10743"
10744if test "x$ac_cv_header_bsm_audit_h" = xyes; then :
10745 cat >>confdefs.h <<_ACEOF
10746#define HAVE_BSM_AUDIT_H 1
10747_ACEOF
10748
10749else
10750 as_fn_error $? "BSM enabled and bsm/audit.h not found" "$LINENO" 5
10751fi
10752
10753done
10754
10755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaudit in -lbsm" >&5
10756$as_echo_n "checking for getaudit in -lbsm... " >&6; }
10757if ${ac_cv_lib_bsm_getaudit+:} false; then :
10758 $as_echo_n "(cached) " >&6
10759else
10760 ac_check_lib_save_LIBS=$LIBS
10761LIBS="-lbsm $LIBS"
10762cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10763/* end confdefs.h. */
10764
10765/* Override any GCC internal prototype to avoid an error.
10766 Use char because int might match the return type of a GCC
10767 builtin and then its argument prototype would still apply. */
10768#ifdef __cplusplus
10769extern "C"
10770#endif
10771char getaudit ();
10772int
10773main ()
10774{
10775return getaudit ();
10776 ;
10777 return 0;
10778}
10779_ACEOF
10780if ac_fn_c_try_link "$LINENO"; then :
10781 ac_cv_lib_bsm_getaudit=yes
10782else
10783 ac_cv_lib_bsm_getaudit=no
10784fi
10785rm -f core conftest.err conftest.$ac_objext \
10786 conftest$ac_exeext conftest.$ac_ext
10787LIBS=$ac_check_lib_save_LIBS
10788fi
10789{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsm_getaudit" >&5
10790$as_echo "$ac_cv_lib_bsm_getaudit" >&6; }
10791if test "x$ac_cv_lib_bsm_getaudit" = xyes; then :
10792 cat >>confdefs.h <<_ACEOF
10793#define HAVE_LIBBSM 1
10794_ACEOF
10795
10796 LIBS="-lbsm $LIBS"
10797
10798else
10799 as_fn_error $? "BSM enabled and required library not found" "$LINENO" 5
10800fi
10801
10802 for ac_func in getaudit
10803do :
10804 ac_fn_c_check_func "$LINENO" "getaudit" "ac_cv_func_getaudit"
10805if test "x$ac_cv_func_getaudit" = xyes; then :
10806 cat >>confdefs.h <<_ACEOF
10807#define HAVE_GETAUDIT 1
10808_ACEOF
10809
10810else
10811 as_fn_error $? "BSM enabled and required function not found" "$LINENO" 5
10812fi
10813done
10814
10815 # These are optional
10816 for ac_func in getaudit_addr aug_get_machine
10817do :
10818 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10819ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10820if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10821 cat >>confdefs.h <<_ACEOF
10822#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10823_ACEOF
10824
10825fi
10826done
10827
10828
10829$as_echo "#define USE_BSM_AUDIT 1" >>confdefs.h
10830
10831 if test "$sol2ver" -ge 11; then
10832 SSHDLIBS="$SSHDLIBS -lscf"
10833
10834$as_echo "#define BROKEN_BSM_API 1" >>confdefs.h
10835
10836 fi
10837 ;;
10838 linux)
10839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux" >&5
10840$as_echo "linux" >&6; }
10841 AUDIT_MODULE=linux
10842 for ac_header in libaudit.h
10843do :
10844 ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
10845if test "x$ac_cv_header_libaudit_h" = xyes; then :
10846 cat >>confdefs.h <<_ACEOF
10847#define HAVE_LIBAUDIT_H 1
10848_ACEOF
10849
10850fi
10851
10852done
10853
10854 SSHDLIBS="$SSHDLIBS -laudit"
10855
10856$as_echo "#define USE_LINUX_AUDIT 1" >>confdefs.h
10857
10858 ;;
10859 debug)
10860 AUDIT_MODULE=debug
10861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: debug" >&5
10862$as_echo "debug" >&6; }
10863
10864$as_echo "#define SSH_AUDIT_EVENTS 1" >>confdefs.h
10865
10866 ;;
10867 no)
10868 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10869$as_echo "no" >&6; }
10870 ;;
10871 *)
10872 as_fn_error $? "Unknown audit module $withval" "$LINENO" 5
10873 ;;
10874 esac
10875
10876fi
10877
10878
10879
10880# Check whether --with-pie was given.
10881if test "${with_pie+set}" = set; then :
10882 withval=$with_pie;
10883 if test "x$withval" = "xno"; then
10884 use_pie=no
10885 fi
10886 if test "x$withval" = "xyes"; then
10887 use_pie=yes
10888 fi
10889
10890
10891fi
10892
10893if test "x$use_pie" = "x"; then
10894 use_pie=no
10895fi
10896if test "x$use_toolchain_hardening" != "x1" && test "x$use_pie" = "xauto"; then
10897 # Turn off automatic PIE when toolchain hardening is off.
10898 use_pie=no
10899fi
10900if test "x$use_pie" = "xauto"; then
10901 # Automatic PIE requires gcc >= 4.x
10902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc >= 4.x" >&5
10903$as_echo_n "checking for gcc >= 4.x... " >&6; }
10904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10905/* end confdefs.h. */
10906
10907#if !defined(__GNUC__) || __GNUC__ < 4
10908#error gcc is too old
10909#endif
10910
10911_ACEOF
10912if ac_fn_c_try_compile "$LINENO"; then :
10913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10914$as_echo "yes" >&6; }
10915else
10916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10917$as_echo "no" >&6; }
10918 use_pie=no
10919
10920fi
10921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10922fi
10923if test "x$use_pie" != "xno"; then
10924 SAVED_CFLAGS="$CFLAGS"
10925 SAVED_LDFLAGS="$LDFLAGS"
10926 {
10927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -fPIE" >&5
10928$as_echo_n "checking if $CC supports compile flag -fPIE... " >&6; }
10929 saved_CFLAGS="$CFLAGS"
10930 CFLAGS="$CFLAGS $WERROR -fPIE"
10931 _define_flag=""
10932 test "x$_define_flag" = "x" && _define_flag="-fPIE"
10933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10934/* end confdefs.h. */
10935
10936#include <stdlib.h>
10937#include <stdio.h>
10938int main(int argc, char **argv) {
10939 /* Some math to catch -ftrapv problems in the toolchain */
10940 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
10941 float l = i * 2.1;
10942 double m = l / 0.5;
10943 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
10944 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
10945 exit(0);
10946}
10947
10948_ACEOF
10949if ac_fn_c_try_compile "$LINENO"; then :
10950
10951if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
10952then
10953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10954$as_echo "no" >&6; }
10955 CFLAGS="$saved_CFLAGS"
10956else
10957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10958$as_echo "yes" >&6; }
10959 CFLAGS="$saved_CFLAGS $_define_flag"
10960fi
10961else
10962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10963$as_echo "no" >&6; }
10964 CFLAGS="$saved_CFLAGS"
10965
10966fi
10967rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10968}
10969 {
10970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -pie" >&5
10971$as_echo_n "checking if $LD supports link flag -pie... " >&6; }
10972 saved_LDFLAGS="$LDFLAGS"
10973 LDFLAGS="$LDFLAGS $WERROR -pie"
10974 _define_flag=""
10975 test "x$_define_flag" = "x" && _define_flag="-pie"
10976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10977/* end confdefs.h. */
10978
10979#include <stdlib.h>
10980#include <stdio.h>
10981int main(int argc, char **argv) {
10982 /* Some math to catch -ftrapv problems in the toolchain */
10983 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
10984 float l = i * 2.1;
10985 double m = l / 0.5;
10986 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
10987 long long p = n * o;
10988 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
10989 exit(0);
10990}
10991
10992_ACEOF
10993if ac_fn_c_try_link "$LINENO"; then :
10994
10995if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
10996then
10997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10998$as_echo "no" >&6; }
10999 LDFLAGS="$saved_LDFLAGS"
11000else
11001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11002$as_echo "yes" >&6; }
11003 LDFLAGS="$saved_LDFLAGS $_define_flag"
11004fi
11005else
11006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11007$as_echo "no" >&6; }
11008 LDFLAGS="$saved_LDFLAGS"
11009
11010fi
11011rm -f core conftest.err conftest.$ac_objext \
11012 conftest$ac_exeext conftest.$ac_ext
11013}
11014 # We use both -fPIE and -pie or neither.
11015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether both -fPIE and -pie are supported" >&5
11016$as_echo_n "checking whether both -fPIE and -pie are supported... " >&6; }
11017 if echo "x $CFLAGS" | grep ' -fPIE' >/dev/null 2>&1 && \
11018 echo "x $LDFLAGS" | grep ' -pie' >/dev/null 2>&1 ; then
11019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11020$as_echo "yes" >&6; }
11021 else
11022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11023$as_echo "no" >&6; }
11024 CFLAGS="$SAVED_CFLAGS"
11025 LDFLAGS="$SAVED_LDFLAGS"
11026 fi
11027fi
11028
11029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fPIC is accepted" >&5
11030$as_echo_n "checking whether -fPIC is accepted... " >&6; }
11031SAVED_CFLAGS="$CFLAGS"
11032CFLAGS="$CFLAGS -fPIC"
11033cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11034/* end confdefs.h. */
11035 #include <stdlib.h>
11036int
11037main ()
11038{
11039 exit(0);
11040 ;
11041 return 0;
11042}
11043_ACEOF
11044if ac_fn_c_try_compile "$LINENO"; then :
11045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11046$as_echo "yes" >&6; }
11047 PICFLAG="-fPIC";
11048else
11049 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11050$as_echo "no" >&6; }
11051 PICFLAG="";
11052fi
11053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11054CFLAGS="$SAVED_CFLAGS"
11055
11056
11057for ac_func in \
11058 Blowfish_initstate \
11059 Blowfish_expandstate \
11060 Blowfish_expand0state \
11061 Blowfish_stream2word \
11062 SHA256Update \
11063 SHA384Update \
11064 SHA512Update \
11065 asprintf \
11066 b64_ntop \
11067 __b64_ntop \
11068 b64_pton \
11069 __b64_pton \
11070 bcopy \
11071 bcrypt_pbkdf \
11072 bindresvport_sa \
11073 blf_enc \
11074 bzero \
11075 cap_rights_limit \
11076 clock \
11077 closefrom \
11078 dirfd \
11079 endgrent \
11080 err \
11081 errx \
11082 explicit_bzero \
11083 fchmod \
11084 fchmodat \
11085 fchown \
11086 fchownat \
11087 flock \
11088 fnmatch \
11089 freeaddrinfo \
11090 freezero \
11091 fstatfs \
11092 fstatvfs \
11093 futimes \
11094 getaddrinfo \
11095 getcwd \
11096 getgrouplist \
11097 getline \
11098 getnameinfo \
11099 getopt \
11100 getpagesize \
11101 getpeereid \
11102 getpeerucred \
11103 getpgid \
11104 _getpty \
11105 getrlimit \
11106 getrandom \
11107 getsid \
11108 getttyent \
11109 glob \
11110 group_from_gid \
11111 inet_aton \
11112 inet_ntoa \
11113 inet_ntop \
11114 innetgr \
11115 llabs \
11116 localtime_r \
11117 login_getcapbool \
11118 md5_crypt \
11119 memmem \
11120 memmove \
11121 memset_s \
11122 mkdtemp \
11123 ngetaddrinfo \
11124 nsleep \
11125 ogetaddrinfo \
11126 openlog_r \
11127 pledge \
11128 poll \
11129 prctl \
11130 pstat \
11131 raise \
11132 readpassphrase \
11133 reallocarray \
11134 realpath \
11135 recvmsg \
11136 recallocarray \
11137 rresvport_af \
11138 sendmsg \
11139 setdtablesize \
11140 setegid \
11141 setenv \
11142 seteuid \
11143 setgroupent \
11144 setgroups \
11145 setlinebuf \
11146 setlogin \
11147 setpassent\
11148 setpcred \
11149 setproctitle \
11150 setregid \
11151 setreuid \
11152 setrlimit \
11153 setsid \
11154 setvbuf \
11155 sigaction \
11156 sigvec \
11157 snprintf \
11158 socketpair \
11159 statfs \
11160 statvfs \
11161 strcasestr \
11162 strdup \
11163 strerror \
11164 strlcat \
11165 strlcpy \
11166 strmode \
11167 strndup \
11168 strnlen \
11169 strnvis \
11170 strptime \
11171 strsignal \
11172 strtonum \
11173 strtoll \
11174 strtoul \
11175 strtoull \
11176 swap32 \
11177 sysconf \
11178 tcgetpgrp \
11179 timingsafe_bcmp \
11180 truncate \
11181 unsetenv \
11182 updwtmpx \
11183 utimensat \
11184 user_from_uid \
11185 usleep \
11186 vasprintf \
11187 vsnprintf \
11188 waitpid \
11189 warn \
11190
11191do :
11192 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11193ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11194if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11195 cat >>confdefs.h <<_ACEOF
11196#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11197_ACEOF
11198
11199fi
11200done
11201
11202
11203ac_fn_c_check_decl "$LINENO" "bzero" "ac_cv_have_decl_bzero" "$ac_includes_default"
11204if test "x$ac_cv_have_decl_bzero" = xyes; then :
11205 ac_have_decl=1
11206else
11207 ac_have_decl=0
11208fi
11209
11210cat >>confdefs.h <<_ACEOF
11211#define HAVE_DECL_BZERO $ac_have_decl
11212_ACEOF
11213ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
11214if test "x$ac_cv_have_decl_memmem" = xyes; then :
11215 ac_have_decl=1
11216else
11217 ac_have_decl=0
11218fi
11219
11220cat >>confdefs.h <<_ACEOF
11221#define HAVE_DECL_MEMMEM $ac_have_decl
11222_ACEOF
11223
11224
11225for ac_func in mblen mbtowc nl_langinfo wcwidth
11226do :
11227 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11228ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11229if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11230 cat >>confdefs.h <<_ACEOF
11231#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11232_ACEOF
11233
11234fi
11235done
11236
11237
11238TEST_SSH_UTF8=${TEST_SSH_UTF8:=yes}
11239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for utf8 locale support" >&5
11240$as_echo_n "checking for utf8 locale support... " >&6; }
11241if test "$cross_compiling" = yes; then :
11242 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
11243$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
11244
11245else
11246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11247/* end confdefs.h. */
11248
11249#include <locale.h>
11250#include <stdlib.h>
11251
11252int
11253main ()
11254{
11255
11256 char *loc = setlocale(LC_CTYPE, "en_US.UTF-8");
11257 if (loc != NULL)
11258 exit(0);
11259 exit(1);
11260
11261 ;
11262 return 0;
11263}
11264_ACEOF
11265if ac_fn_c_try_run "$LINENO"; then :
11266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11267$as_echo "yes" >&6; }
11268else
11269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11270$as_echo "no" >&6; }
11271 TEST_SSH_UTF8=no
11272fi
11273rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11274 conftest.$ac_objext conftest.beam conftest.$ac_ext
11275fi
11276
11277
11278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11279/* end confdefs.h. */
11280 #include <ctype.h>
11281int
11282main ()
11283{
11284 return (isblank('a'));
11285 ;
11286 return 0;
11287}
11288_ACEOF
11289if ac_fn_c_try_link "$LINENO"; then :
11290
11291$as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
11292
11293
11294fi
11295rm -f core conftest.err conftest.$ac_objext \
11296 conftest$ac_exeext conftest.$ac_ext
11297
11298disable_pkcs11=
11299# Check whether --enable-pkcs11 was given.
11300if test "${enable_pkcs11+set}" = set; then :
11301 enableval=$enable_pkcs11;
11302 if test "x$enableval" = "xno" ; then
11303 disable_pkcs11=1
11304 fi
11305
11306
11307fi
11308
11309
11310disable_sk=
11311# Check whether --enable-security-key was given.
11312if test "${enable_security_key+set}" = set; then :
11313 enableval=$enable_security_key;
11314 if test "x$enableval" = "xno" ; then
11315 disable_sk=1
11316 fi
11317
11318
11319fi
11320
11321enable_sk_internal=
11322
11323# Check whether --with-security-key-builtin was given.
11324if test "${with_security_key_builtin+set}" = set; then :
11325 withval=$with_security_key_builtin;
11326 if test "x$withval" != "xno" ; then
11327 enable_sk_internal=yes
11328 fi
11329
11330
11331fi
11332
11333test "x$disable_sk" != "x" && enable_sk_internal=""
11334
11335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11336$as_echo_n "checking for library containing dlopen... " >&6; }
11337if ${ac_cv_search_dlopen+:} false; then :
11338 $as_echo_n "(cached) " >&6
11339else
11340 ac_func_search_save_LIBS=$LIBS
11341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11342/* end confdefs.h. */
11343
11344/* Override any GCC internal prototype to avoid an error.
11345 Use char because int might match the return type of a GCC
11346 builtin and then its argument prototype would still apply. */
11347#ifdef __cplusplus
11348extern "C"
11349#endif
11350char dlopen ();
11351int
11352main ()
11353{
11354return dlopen ();
11355 ;
11356 return 0;
11357}
11358_ACEOF
11359for ac_lib in '' dl; do
11360 if test -z "$ac_lib"; then
11361 ac_res="none required"
11362 else
11363 ac_res=-l$ac_lib
11364 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11365 fi
11366 if ac_fn_c_try_link "$LINENO"; then :
11367 ac_cv_search_dlopen=$ac_res
11368fi
11369rm -f core conftest.err conftest.$ac_objext \
11370 conftest$ac_exeext
11371 if ${ac_cv_search_dlopen+:} false; then :
11372 break
11373fi
11374done
11375if ${ac_cv_search_dlopen+:} false; then :
11376
11377else
11378 ac_cv_search_dlopen=no
11379fi
11380rm conftest.$ac_ext
11381LIBS=$ac_func_search_save_LIBS
11382fi
11383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11384$as_echo "$ac_cv_search_dlopen" >&6; }
11385ac_res=$ac_cv_search_dlopen
11386if test "$ac_res" != no; then :
11387 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11388
11389fi
11390
11391for ac_func in dlopen
11392do :
11393 ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
11394if test "x$ac_cv_func_dlopen" = xyes; then :
11395 cat >>confdefs.h <<_ACEOF
11396#define HAVE_DLOPEN 1
11397_ACEOF
11398
11399fi
11400done
11401
11402ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
11403"
11404if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
11405
11406fi
11407
11408
11409# IRIX has a const char return value for gai_strerror()
11410for ac_func in gai_strerror
11411do :
11412 ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror"
11413if test "x$ac_cv_func_gai_strerror" = xyes; then :
11414 cat >>confdefs.h <<_ACEOF
11415#define HAVE_GAI_STRERROR 1
11416_ACEOF
11417
11418 $as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h
11419
11420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11421/* end confdefs.h. */
11422
11423#include <sys/types.h>
11424#include <sys/socket.h>
11425#include <netdb.h>
11426
11427const char *gai_strerror(int);
11428
11429int
11430main ()
11431{
11432
11433 char *str;
11434 str = gai_strerror(0);
11435
11436 ;
11437 return 0;
11438}
11439_ACEOF
11440if ac_fn_c_try_compile "$LINENO"; then :
11441
11442
11443$as_echo "#define HAVE_CONST_GAI_STRERROR_PROTO 1" >>confdefs.h
11444
11445fi
11446rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11447fi
11448done
11449
11450
11451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
11452$as_echo_n "checking for library containing nanosleep... " >&6; }
11453if ${ac_cv_search_nanosleep+:} false; then :
11454 $as_echo_n "(cached) " >&6
11455else
11456 ac_func_search_save_LIBS=$LIBS
11457cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11458/* end confdefs.h. */
11459
11460/* Override any GCC internal prototype to avoid an error.
11461 Use char because int might match the return type of a GCC
11462 builtin and then its argument prototype would still apply. */
11463#ifdef __cplusplus
11464extern "C"
11465#endif
11466char nanosleep ();
11467int
11468main ()
11469{
11470return nanosleep ();
11471 ;
11472 return 0;
11473}
11474_ACEOF
11475for ac_lib in '' rt posix4; do
11476 if test -z "$ac_lib"; then
11477 ac_res="none required"
11478 else
11479 ac_res=-l$ac_lib
11480 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11481 fi
11482 if ac_fn_c_try_link "$LINENO"; then :
11483 ac_cv_search_nanosleep=$ac_res
11484fi
11485rm -f core conftest.err conftest.$ac_objext \
11486 conftest$ac_exeext
11487 if ${ac_cv_search_nanosleep+:} false; then :
11488 break
11489fi
11490done
11491if ${ac_cv_search_nanosleep+:} false; then :
11492
11493else
11494 ac_cv_search_nanosleep=no
11495fi
11496rm conftest.$ac_ext
11497LIBS=$ac_func_search_save_LIBS
11498fi
11499{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
11500$as_echo "$ac_cv_search_nanosleep" >&6; }
11501ac_res=$ac_cv_search_nanosleep
11502if test "$ac_res" != no; then :
11503 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11504
11505$as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h
11506
11507fi
11508
11509
11510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11511$as_echo_n "checking for library containing clock_gettime... " >&6; }
11512if ${ac_cv_search_clock_gettime+:} false; then :
11513 $as_echo_n "(cached) " >&6
11514else
11515 ac_func_search_save_LIBS=$LIBS
11516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11517/* end confdefs.h. */
11518
11519/* Override any GCC internal prototype to avoid an error.
11520 Use char because int might match the return type of a GCC
11521 builtin and then its argument prototype would still apply. */
11522#ifdef __cplusplus
11523extern "C"
11524#endif
11525char clock_gettime ();
11526int
11527main ()
11528{
11529return clock_gettime ();
11530 ;
11531 return 0;
11532}
11533_ACEOF
11534for ac_lib in '' rt; do
11535 if test -z "$ac_lib"; then
11536 ac_res="none required"
11537 else
11538 ac_res=-l$ac_lib
11539 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11540 fi
11541 if ac_fn_c_try_link "$LINENO"; then :
11542 ac_cv_search_clock_gettime=$ac_res
11543fi
11544rm -f core conftest.err conftest.$ac_objext \
11545 conftest$ac_exeext
11546 if ${ac_cv_search_clock_gettime+:} false; then :
11547 break
11548fi
11549done
11550if ${ac_cv_search_clock_gettime+:} false; then :
11551
11552else
11553 ac_cv_search_clock_gettime=no
11554fi
11555rm conftest.$ac_ext
11556LIBS=$ac_func_search_save_LIBS
11557fi
11558{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11559$as_echo "$ac_cv_search_clock_gettime" >&6; }
11560ac_res=$ac_cv_search_clock_gettime
11561if test "$ac_res" != no; then :
11562 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11563
11564$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11565
11566fi
11567
11568
11569ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" " #include <time.h>
11570
11571"
11572if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
11573
11574else
11575 saved_CPPFLAGS="$CFLAGS"
11576 CPPFLAGS="$CPPFLAGS -D_REENTRANT"
11577 unset ac_cv_have_decl_localtime_r
11578 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" " #include <time.h>
11579
11580"
11581if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
11582
11583else
11584 CPPFLAGS="$saved_CPPFLAGS"
11585fi
11586
11587
11588fi
11589
11590
11591ac_fn_c_check_decl "$LINENO" "strsep" "ac_cv_have_decl_strsep" "
11592#ifdef HAVE_STRING_H
11593# include <string.h>
11594#endif
11595
11596"
11597if test "x$ac_cv_have_decl_strsep" = xyes; then :
11598 for ac_func in strsep
11599do :
11600 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
11601if test "x$ac_cv_func_strsep" = xyes; then :
11602 cat >>confdefs.h <<_ACEOF
11603#define HAVE_STRSEP 1
11604_ACEOF
11605
11606fi
11607done
11608
11609fi
11610
11611
11612ac_fn_c_check_decl "$LINENO" "tcsendbreak" "ac_cv_have_decl_tcsendbreak" "#include <termios.h>
11613
11614"
11615if test "x$ac_cv_have_decl_tcsendbreak" = xyes; then :
11616 $as_echo "#define HAVE_TCSENDBREAK 1" >>confdefs.h
11617
11618else
11619 for ac_func in tcsendbreak
11620do :
11621 ac_fn_c_check_func "$LINENO" "tcsendbreak" "ac_cv_func_tcsendbreak"
11622if test "x$ac_cv_func_tcsendbreak" = xyes; then :
11623 cat >>confdefs.h <<_ACEOF
11624#define HAVE_TCSENDBREAK 1
11625_ACEOF
11626
11627fi
11628done
11629
11630fi
11631
11632
11633ac_fn_c_check_decl "$LINENO" "h_errno" "ac_cv_have_decl_h_errno" "#include <netdb.h>
11634"
11635if test "x$ac_cv_have_decl_h_errno" = xyes; then :
11636 ac_have_decl=1
11637else
11638 ac_have_decl=0
11639fi
11640
11641cat >>confdefs.h <<_ACEOF
11642#define HAVE_DECL_H_ERRNO $ac_have_decl
11643_ACEOF
11644
11645
11646ac_fn_c_check_decl "$LINENO" "SHUT_RD" "ac_cv_have_decl_SHUT_RD" "
11647#include <sys/types.h>
11648#include <sys/socket.h>
11649#include <unistd.h>
11650
11651"
11652if test "x$ac_cv_have_decl_SHUT_RD" = xyes; then :
11653 ac_have_decl=1
11654else
11655 ac_have_decl=0
11656fi
11657
11658cat >>confdefs.h <<_ACEOF
11659#define HAVE_DECL_SHUT_RD $ac_have_decl
11660_ACEOF
11661ac_fn_c_check_decl "$LINENO" "getpeereid" "ac_cv_have_decl_getpeereid" "
11662#include <sys/types.h>
11663#include <sys/socket.h>
11664#include <unistd.h>
11665
11666"
11667if test "x$ac_cv_have_decl_getpeereid" = xyes; then :
11668 ac_have_decl=1
11669else
11670 ac_have_decl=0
11671fi
11672
11673cat >>confdefs.h <<_ACEOF
11674#define HAVE_DECL_GETPEEREID $ac_have_decl
11675_ACEOF
11676
11677
11678ac_fn_c_check_decl "$LINENO" "O_NONBLOCK" "ac_cv_have_decl_O_NONBLOCK" "
11679#include <sys/types.h>
11680#ifdef HAVE_SYS_STAT_H
11681# include <sys/stat.h>
11682#endif
11683#ifdef HAVE_FCNTL_H
11684# include <fcntl.h>
11685#endif
11686
11687"
11688if test "x$ac_cv_have_decl_O_NONBLOCK" = xyes; then :
11689 ac_have_decl=1
11690else
11691 ac_have_decl=0
11692fi
11693
11694cat >>confdefs.h <<_ACEOF
11695#define HAVE_DECL_O_NONBLOCK $ac_have_decl
11696_ACEOF
11697
11698
11699ac_fn_c_check_decl "$LINENO" "readv" "ac_cv_have_decl_readv" "
11700#include <sys/types.h>
11701#include <sys/uio.h>
11702#include <unistd.h>
11703
11704"
11705if test "x$ac_cv_have_decl_readv" = xyes; then :
11706 ac_have_decl=1
11707else
11708 ac_have_decl=0
11709fi
11710
11711cat >>confdefs.h <<_ACEOF
11712#define HAVE_DECL_READV $ac_have_decl
11713_ACEOF
11714ac_fn_c_check_decl "$LINENO" "writev" "ac_cv_have_decl_writev" "
11715#include <sys/types.h>
11716#include <sys/uio.h>
11717#include <unistd.h>
11718
11719"
11720if test "x$ac_cv_have_decl_writev" = xyes; then :
11721 ac_have_decl=1
11722else
11723 ac_have_decl=0
11724fi
11725
11726cat >>confdefs.h <<_ACEOF
11727#define HAVE_DECL_WRITEV $ac_have_decl
11728_ACEOF
11729
11730
11731ac_fn_c_check_decl "$LINENO" "MAXSYMLINKS" "ac_cv_have_decl_MAXSYMLINKS" "
11732#include <sys/param.h>
11733
11734"
11735if test "x$ac_cv_have_decl_MAXSYMLINKS" = xyes; then :
11736 ac_have_decl=1
11737else
11738 ac_have_decl=0
11739fi
11740
11741cat >>confdefs.h <<_ACEOF
11742#define HAVE_DECL_MAXSYMLINKS $ac_have_decl
11743_ACEOF
11744
11745
11746ac_fn_c_check_decl "$LINENO" "offsetof" "ac_cv_have_decl_offsetof" "
11747#include <stddef.h>
11748
11749"
11750if test "x$ac_cv_have_decl_offsetof" = xyes; then :
11751 ac_have_decl=1
11752else
11753 ac_have_decl=0
11754fi
11755
11756cat >>confdefs.h <<_ACEOF
11757#define HAVE_DECL_OFFSETOF $ac_have_decl
11758_ACEOF
11759
11760
11761# extra bits for select(2)
11762ac_fn_c_check_decl "$LINENO" "howmany" "ac_cv_have_decl_howmany" "
11763#include <sys/param.h>
11764#include <sys/types.h>
11765#ifdef HAVE_SYS_SYSMACROS_H
11766#include <sys/sysmacros.h>
11767#endif
11768#ifdef HAVE_SYS_SELECT_H
11769#include <sys/select.h>
11770#endif
11771#ifdef HAVE_SYS_TIME_H
11772#include <sys/time.h>
11773#endif
11774#ifdef HAVE_UNISTD_H
11775#include <unistd.h>
11776#endif
11777
11778"
11779if test "x$ac_cv_have_decl_howmany" = xyes; then :
11780 ac_have_decl=1
11781else
11782 ac_have_decl=0
11783fi
11784
11785cat >>confdefs.h <<_ACEOF
11786#define HAVE_DECL_HOWMANY $ac_have_decl
11787_ACEOF
11788ac_fn_c_check_decl "$LINENO" "NFDBITS" "ac_cv_have_decl_NFDBITS" "
11789#include <sys/param.h>
11790#include <sys/types.h>
11791#ifdef HAVE_SYS_SYSMACROS_H
11792#include <sys/sysmacros.h>
11793#endif
11794#ifdef HAVE_SYS_SELECT_H
11795#include <sys/select.h>
11796#endif
11797#ifdef HAVE_SYS_TIME_H
11798#include <sys/time.h>
11799#endif
11800#ifdef HAVE_UNISTD_H
11801#include <unistd.h>
11802#endif
11803
11804"
11805if test "x$ac_cv_have_decl_NFDBITS" = xyes; then :
11806 ac_have_decl=1
11807else
11808 ac_have_decl=0
11809fi
11810
11811cat >>confdefs.h <<_ACEOF
11812#define HAVE_DECL_NFDBITS $ac_have_decl
11813_ACEOF
11814
11815ac_fn_c_check_type "$LINENO" "fd_mask" "ac_cv_type_fd_mask" "
11816#include <sys/param.h>
11817#include <sys/types.h>
11818#ifdef HAVE_SYS_SELECT_H
11819#include <sys/select.h>
11820#endif
11821#ifdef HAVE_SYS_TIME_H
11822#include <sys/time.h>
11823#endif
11824#ifdef HAVE_UNISTD_H
11825#include <unistd.h>
11826#endif
11827
11828"
11829if test "x$ac_cv_type_fd_mask" = xyes; then :
11830
11831cat >>confdefs.h <<_ACEOF
11832#define HAVE_FD_MASK 1
11833_ACEOF
11834
11835
11836fi
11837
11838
11839for ac_func in setresuid
11840do :
11841 ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
11842if test "x$ac_cv_func_setresuid" = xyes; then :
11843 cat >>confdefs.h <<_ACEOF
11844#define HAVE_SETRESUID 1
11845_ACEOF
11846
11847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresuid seems to work" >&5
11848$as_echo_n "checking if setresuid seems to work... " >&6; }
11849 if test "$cross_compiling" = yes; then :
11850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
11851$as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
11852
11853else
11854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11855/* end confdefs.h. */
11856
11857#include <stdlib.h>
11858#include <errno.h>
11859
11860int
11861main ()
11862{
11863
11864 errno=0;
11865 setresuid(0,0,0);
11866 if (errno==ENOSYS)
11867 exit(1);
11868 else
11869 exit(0);
11870
11871 ;
11872 return 0;
11873}
11874_ACEOF
11875if ac_fn_c_try_run "$LINENO"; then :
11876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11877$as_echo "yes" >&6; }
11878else
11879
11880$as_echo "#define BROKEN_SETRESUID 1" >>confdefs.h
11881
11882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
11883$as_echo "not implemented" >&6; }
11884fi
11885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11886 conftest.$ac_objext conftest.beam conftest.$ac_ext
11887fi
11888
11889
11890fi
11891done
11892
11893
11894for ac_func in setresgid
11895do :
11896 ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
11897if test "x$ac_cv_func_setresgid" = xyes; then :
11898 cat >>confdefs.h <<_ACEOF
11899#define HAVE_SETRESGID 1
11900_ACEOF
11901
11902 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresgid seems to work" >&5
11903$as_echo_n "checking if setresgid seems to work... " >&6; }
11904 if test "$cross_compiling" = yes; then :
11905 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
11906$as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
11907
11908else
11909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11910/* end confdefs.h. */
11911
11912#include <stdlib.h>
11913#include <errno.h>
11914
11915int
11916main ()
11917{
11918
11919 errno=0;
11920 setresgid(0,0,0);
11921 if (errno==ENOSYS)
11922 exit(1);
11923 else
11924 exit(0);
11925
11926 ;
11927 return 0;
11928}
11929_ACEOF
11930if ac_fn_c_try_run "$LINENO"; then :
11931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11932$as_echo "yes" >&6; }
11933else
11934
11935$as_echo "#define BROKEN_SETRESGID 1" >>confdefs.h
11936
11937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
11938$as_echo "not implemented" >&6; }
11939fi
11940rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11941 conftest.$ac_objext conftest.beam conftest.$ac_ext
11942fi
11943
11944
11945fi
11946done
11947
11948
11949{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fflush(NULL)" >&5
11950$as_echo_n "checking for working fflush(NULL)... " >&6; }
11951if test "$cross_compiling" = yes; then :
11952 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming working" >&5
11953$as_echo "$as_me: WARNING: cross compiling: assuming working" >&2;}
11954
11955else
11956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11957/* end confdefs.h. */
11958#include <stdio.h>
11959int
11960main ()
11961{
11962fflush(NULL); exit(0);
11963 ;
11964 return 0;
11965}
11966_ACEOF
11967if ac_fn_c_try_run "$LINENO"; then :
11968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11969$as_echo "yes" >&6; }
11970else
11971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11972$as_echo "no" >&6; }
11973
11974$as_echo "#define FFLUSH_NULL_BUG 1" >>confdefs.h
11975
11976fi
11977rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11978 conftest.$ac_objext conftest.beam conftest.$ac_ext
11979fi
11980
11981
11982for ac_func in gettimeofday time
11983do :
11984 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11985ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11986if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11987 cat >>confdefs.h <<_ACEOF
11988#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11989_ACEOF
11990
11991fi
11992done
11993
11994for ac_func in endutent getutent getutid getutline pututline setutent
11995do :
11996 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11997ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11998if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11999 cat >>confdefs.h <<_ACEOF
12000#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12001_ACEOF
12002
12003fi
12004done
12005
12006for ac_func in utmpname
12007do :
12008 ac_fn_c_check_func "$LINENO" "utmpname" "ac_cv_func_utmpname"
12009if test "x$ac_cv_func_utmpname" = xyes; then :
12010 cat >>confdefs.h <<_ACEOF
12011#define HAVE_UTMPNAME 1
12012_ACEOF
12013
12014fi
12015done
12016
12017for ac_func in endutxent getutxent getutxid getutxline getutxuser pututxline
12018do :
12019 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12020ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12021if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12022 cat >>confdefs.h <<_ACEOF
12023#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12024_ACEOF
12025
12026fi
12027done
12028
12029for ac_func in setutxdb setutxent utmpxname
12030do :
12031 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12032ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12033if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12034 cat >>confdefs.h <<_ACEOF
12035#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12036_ACEOF
12037
12038fi
12039done
12040
12041for ac_func in getlastlogxbyname
12042do :
12043 ac_fn_c_check_func "$LINENO" "getlastlogxbyname" "ac_cv_func_getlastlogxbyname"
12044if test "x$ac_cv_func_getlastlogxbyname" = xyes; then :
12045 cat >>confdefs.h <<_ACEOF
12046#define HAVE_GETLASTLOGXBYNAME 1
12047_ACEOF
12048
12049fi
12050done
12051
12052
12053ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
12054if test "x$ac_cv_func_daemon" = xyes; then :
12055
12056$as_echo "#define HAVE_DAEMON 1" >>confdefs.h
12057
12058else
12059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for daemon in -lbsd" >&5
12060$as_echo_n "checking for daemon in -lbsd... " >&6; }
12061if ${ac_cv_lib_bsd_daemon+:} false; then :
12062 $as_echo_n "(cached) " >&6
12063else
12064 ac_check_lib_save_LIBS=$LIBS
12065LIBS="-lbsd $LIBS"
12066cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12067/* end confdefs.h. */
12068
12069/* Override any GCC internal prototype to avoid an error.
12070 Use char because int might match the return type of a GCC
12071 builtin and then its argument prototype would still apply. */
12072#ifdef __cplusplus
12073extern "C"
12074#endif
12075char daemon ();
12076int
12077main ()
12078{
12079return daemon ();
12080 ;
12081 return 0;
12082}
12083_ACEOF
12084if ac_fn_c_try_link "$LINENO"; then :
12085 ac_cv_lib_bsd_daemon=yes
12086else
12087 ac_cv_lib_bsd_daemon=no
12088fi
12089rm -f core conftest.err conftest.$ac_objext \
12090 conftest$ac_exeext conftest.$ac_ext
12091LIBS=$ac_check_lib_save_LIBS
12092fi
12093{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_daemon" >&5
12094$as_echo "$ac_cv_lib_bsd_daemon" >&6; }
12095if test "x$ac_cv_lib_bsd_daemon" = xyes; then :
12096 LIBS="$LIBS -lbsd"; $as_echo "#define HAVE_DAEMON 1" >>confdefs.h
12097
12098fi
12099
12100
12101fi
12102
12103
12104ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12105if test "x$ac_cv_func_getpagesize" = xyes; then :
12106
12107$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
12108
12109else
12110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize in -lucb" >&5
12111$as_echo_n "checking for getpagesize in -lucb... " >&6; }
12112if ${ac_cv_lib_ucb_getpagesize+:} false; then :
12113 $as_echo_n "(cached) " >&6
12114else
12115 ac_check_lib_save_LIBS=$LIBS
12116LIBS="-lucb $LIBS"
12117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12118/* end confdefs.h. */
12119
12120/* Override any GCC internal prototype to avoid an error.
12121 Use char because int might match the return type of a GCC
12122 builtin and then its argument prototype would still apply. */
12123#ifdef __cplusplus
12124extern "C"
12125#endif
12126char getpagesize ();
12127int
12128main ()
12129{
12130return getpagesize ();
12131 ;
12132 return 0;
12133}
12134_ACEOF
12135if ac_fn_c_try_link "$LINENO"; then :
12136 ac_cv_lib_ucb_getpagesize=yes
12137else
12138 ac_cv_lib_ucb_getpagesize=no
12139fi
12140rm -f core conftest.err conftest.$ac_objext \
12141 conftest$ac_exeext conftest.$ac_ext
12142LIBS=$ac_check_lib_save_LIBS
12143fi
12144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ucb_getpagesize" >&5
12145$as_echo "$ac_cv_lib_ucb_getpagesize" >&6; }
12146if test "x$ac_cv_lib_ucb_getpagesize" = xyes; then :
12147 LIBS="$LIBS -lucb"; $as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
12148
12149fi
12150
12151
12152fi
12153
12154
12155# Check for broken snprintf
12156if test "x$ac_cv_func_snprintf" = "xyes" ; then
12157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf correctly terminates long strings" >&5
12158$as_echo_n "checking whether snprintf correctly terminates long strings... " >&6; }
12159 if test "$cross_compiling" = yes; then :
12160 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
12161$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
12162
12163else
12164 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12165/* end confdefs.h. */
12166 #include <stdio.h>
12167int
12168main ()
12169{
12170
12171 char b[5];
12172 snprintf(b,5,"123456789");
12173 exit(b[4]!='\0');
12174
12175 ;
12176 return 0;
12177}
12178_ACEOF
12179if ac_fn_c_try_run "$LINENO"; then :
12180 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12181$as_echo "yes" >&6; }
12182else
12183
12184 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12185$as_echo "no" >&6; }
12186
12187$as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
12188
12189 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
12190$as_echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
12191
12192fi
12193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12194 conftest.$ac_objext conftest.beam conftest.$ac_ext
12195fi
12196
12197fi
12198
12199if test "x$ac_cv_func_snprintf" = "xyes" ; then
12200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf understands %zu" >&5
12201$as_echo_n "checking whether snprintf understands %zu... " >&6; }
12202 if test "$cross_compiling" = yes; then :
12203 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
12204$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
12205
12206else
12207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12208/* end confdefs.h. */
12209
12210#include <sys/types.h>
12211#include <stdio.h>
12212
12213int
12214main ()
12215{
12216
12217 size_t a = 1, b = 2;
12218 char z[128];
12219 snprintf(z, sizeof z, "%zu%zu", a, b);
12220 exit(strcmp(z, "12"));
12221
12222 ;
12223 return 0;
12224}
12225_ACEOF
12226if ac_fn_c_try_run "$LINENO"; then :
12227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12228$as_echo "yes" >&6; }
12229else
12230
12231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12232$as_echo "no" >&6; }
12233
12234$as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
12235
12236
12237fi
12238rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12239 conftest.$ac_objext conftest.beam conftest.$ac_ext
12240fi
12241
12242fi
12243
12244# We depend on vsnprintf returning the right thing on overflow: the
12245# number of characters it tried to create (as per SUSv3)
12246if test "x$ac_cv_func_vsnprintf" = "xyes" ; then
12247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf returns correct values on overflow" >&5
12248$as_echo_n "checking whether vsnprintf returns correct values on overflow... " >&6; }
12249 if test "$cross_compiling" = yes; then :
12250 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working vsnprintf()" >&5
12251$as_echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;}
12252
12253else
12254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12255/* end confdefs.h. */
12256
12257#include <sys/types.h>
12258#include <stdio.h>
12259#include <stdarg.h>
12260
12261int x_snprintf(char *str, size_t count, const char *fmt, ...)
12262{
12263 size_t ret;
12264 va_list ap;
12265
12266 va_start(ap, fmt);
12267 ret = vsnprintf(str, count, fmt, ap);
12268 va_end(ap);
12269 return ret;
12270}
12271
12272int
12273main ()
12274{
12275
12276char x[1];
12277if (x_snprintf(x, 1, "%s %d", "hello", 12345) != 11)
12278 return 1;
12279if (x_snprintf(NULL, 0, "%s %d", "hello", 12345) != 11)
12280 return 1;
12281return 0;
12282
12283 ;
12284 return 0;
12285}
12286_ACEOF
12287if ac_fn_c_try_run "$LINENO"; then :
12288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12289$as_echo "yes" >&6; }
12290else
12291
12292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12293$as_echo "no" >&6; }
12294
12295$as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
12296
12297 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&5
12298$as_echo "$as_me: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&2;}
12299
12300fi
12301rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12302 conftest.$ac_objext conftest.beam conftest.$ac_ext
12303fi
12304
12305fi
12306
12307# On systems where [v]snprintf is broken, but is declared in stdio,
12308# check that the fmt argument is const char * or just char *.
12309# This is only useful for when BROKEN_SNPRINTF
12310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf can declare const char *fmt" >&5
12311$as_echo_n "checking whether snprintf can declare const char *fmt... " >&6; }
12312cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12313/* end confdefs.h. */
12314
12315#include <stdio.h>
12316int snprintf(char *a, size_t b, const char *c, ...) { return 0; }
12317
12318int
12319main ()
12320{
12321
12322 snprintf(0, 0, 0);
12323
12324 ;
12325 return 0;
12326}
12327_ACEOF
12328if ac_fn_c_try_compile "$LINENO"; then :
12329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12330$as_echo "yes" >&6; }
12331
12332$as_echo "#define SNPRINTF_CONST const" >>confdefs.h
12333
12334else
12335 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12336$as_echo "no" >&6; }
12337 $as_echo "#define SNPRINTF_CONST /* not const */" >>confdefs.h
12338
12339fi
12340rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12341
12342# Check for missing getpeereid (or equiv) support
12343NO_PEERCHECK=""
12344if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then
12345 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports SO_PEERCRED getsockopt" >&5
12346$as_echo_n "checking whether system supports SO_PEERCRED getsockopt... " >&6; }
12347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12348/* end confdefs.h. */
12349
12350#include <sys/types.h>
12351#include <sys/socket.h>
12352int
12353main ()
12354{
12355int i = SO_PEERCRED;
12356 ;
12357 return 0;
12358}
12359_ACEOF
12360if ac_fn_c_try_compile "$LINENO"; then :
12361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12362$as_echo "yes" >&6; }
12363
12364$as_echo "#define HAVE_SO_PEERCRED 1" >>confdefs.h
12365
12366
12367else
12368 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12369$as_echo "no" >&6; }
12370 NO_PEERCHECK=1
12371
12372fi
12373rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12374fi
12375
12376if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
12377{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for (overly) strict mkstemp" >&5
12378$as_echo_n "checking for (overly) strict mkstemp... " >&6; }
12379if test "$cross_compiling" = yes; then :
12380
12381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12382$as_echo "yes" >&6; }
12383 $as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
12384
12385
12386
12387else
12388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12389/* end confdefs.h. */
12390
12391#include <stdlib.h>
12392
12393int
12394main ()
12395{
12396
12397 char template[]="conftest.mkstemp-test";
12398 if (mkstemp(template) == -1)
12399 exit(1);
12400 unlink(template);
12401 exit(0);
12402
12403 ;
12404 return 0;
12405}
12406_ACEOF
12407if ac_fn_c_try_run "$LINENO"; then :
12408
12409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12410$as_echo "no" >&6; }
12411
12412else
12413
12414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12415$as_echo "yes" >&6; }
12416
12417$as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
12418
12419
12420fi
12421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12422 conftest.$ac_objext conftest.beam conftest.$ac_ext
12423fi
12424
12425fi
12426
12427if test ! -z "$check_for_openpty_ctty_bug"; then
12428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openpty correctly handles controlling tty" >&5
12429$as_echo_n "checking if openpty correctly handles controlling tty... " >&6; }
12430 if test "$cross_compiling" = yes; then :
12431
12432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
12433$as_echo "cross-compiling, assuming yes" >&6; }
12434
12435
12436else
12437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12438/* end confdefs.h. */
12439
12440#include <stdio.h>
12441#include <sys/fcntl.h>
12442#include <sys/types.h>
12443#include <sys/wait.h>
12444
12445int
12446main ()
12447{
12448
12449 pid_t pid;
12450 int fd, ptyfd, ttyfd, status;
12451
12452 pid = fork();
12453 if (pid < 0) { /* failed */
12454 exit(1);
12455 } else if (pid > 0) { /* parent */
12456 waitpid(pid, &status, 0);
12457 if (WIFEXITED(status))
12458 exit(WEXITSTATUS(status));
12459 else
12460 exit(2);
12461 } else { /* child */
12462 close(0); close(1); close(2);
12463 setsid();
12464 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
12465 fd = open("/dev/tty", O_RDWR | O_NOCTTY);
12466 if (fd >= 0)
12467 exit(3); /* Acquired ctty: broken */
12468 else
12469 exit(0); /* Did not acquire ctty: OK */
12470 }
12471
12472 ;
12473 return 0;
12474}
12475_ACEOF
12476if ac_fn_c_try_run "$LINENO"; then :
12477
12478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12479$as_echo "yes" >&6; }
12480
12481else
12482
12483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12484$as_echo "no" >&6; }
12485 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
12486
12487
12488fi
12489rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12490 conftest.$ac_objext conftest.beam conftest.$ac_ext
12491fi
12492
12493fi
12494
12495if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
12496 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
12497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
12498$as_echo_n "checking if getaddrinfo seems to work... " >&6; }
12499 if test "$cross_compiling" = yes; then :
12500
12501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
12502$as_echo "cross-compiling, assuming yes" >&6; }
12503
12504
12505else
12506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12507/* end confdefs.h. */
12508
12509#include <stdio.h>
12510#include <sys/socket.h>
12511#include <netdb.h>
12512#include <errno.h>
12513#include <netinet/in.h>
12514
12515#define TEST_PORT "2222"
12516
12517int
12518main ()
12519{
12520
12521 int err, sock;
12522 struct addrinfo *gai_ai, *ai, hints;
12523 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
12524
12525 memset(&hints, 0, sizeof(hints));
12526 hints.ai_family = PF_UNSPEC;
12527 hints.ai_socktype = SOCK_STREAM;
12528 hints.ai_flags = AI_PASSIVE;
12529
12530 err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
12531 if (err != 0) {
12532 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
12533 exit(1);
12534 }
12535
12536 for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
12537 if (ai->ai_family != AF_INET6)
12538 continue;
12539
12540 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
12541 sizeof(ntop), strport, sizeof(strport),
12542 NI_NUMERICHOST|NI_NUMERICSERV);
12543
12544 if (err != 0) {
12545 if (err == EAI_SYSTEM)
12546 perror("getnameinfo EAI_SYSTEM");
12547 else
12548 fprintf(stderr, "getnameinfo failed: %s\n",
12549 gai_strerror(err));
12550 exit(2);
12551 }
12552
12553 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
12554 if (sock < 0)
12555 perror("socket");
12556 if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
12557 if (errno == EBADF)
12558 exit(3);
12559 }
12560 }
12561 exit(0);
12562
12563 ;
12564 return 0;
12565}
12566_ACEOF
12567if ac_fn_c_try_run "$LINENO"; then :
12568
12569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12570$as_echo "yes" >&6; }
12571
12572else
12573
12574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12575$as_echo "no" >&6; }
12576 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
12577
12578
12579fi
12580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12581 conftest.$ac_objext conftest.beam conftest.$ac_ext
12582fi
12583
12584fi
12585
12586if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
12587 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
12588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
12589$as_echo_n "checking if getaddrinfo seems to work... " >&6; }
12590 if test "$cross_compiling" = yes; then :
12591
12592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming no" >&5
12593$as_echo "cross-compiling, assuming no" >&6; }
12594
12595
12596else
12597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12598/* end confdefs.h. */
12599
12600#include <stdio.h>
12601#include <sys/socket.h>
12602#include <netdb.h>
12603#include <errno.h>
12604#include <netinet/in.h>
12605
12606#define TEST_PORT "2222"
12607
12608int
12609main ()
12610{
12611
12612 int err, sock;
12613 struct addrinfo *gai_ai, *ai, hints;
12614 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
12615
12616 memset(&hints, 0, sizeof(hints));
12617 hints.ai_family = PF_UNSPEC;
12618 hints.ai_socktype = SOCK_STREAM;
12619 hints.ai_flags = AI_PASSIVE;
12620
12621 err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
12622 if (err != 0) {
12623 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
12624 exit(1);
12625 }
12626
12627 for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
12628 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
12629 continue;
12630
12631 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
12632 sizeof(ntop), strport, sizeof(strport),
12633 NI_NUMERICHOST|NI_NUMERICSERV);
12634
12635 if (ai->ai_family == AF_INET && err != 0) {
12636 perror("getnameinfo");
12637 exit(2);
12638 }
12639 }
12640 exit(0);
12641
12642 ;
12643 return 0;
12644}
12645_ACEOF
12646if ac_fn_c_try_run "$LINENO"; then :
12647
12648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12649$as_echo "yes" >&6; }
12650
12651$as_echo "#define AIX_GETNAMEINFO_HACK 1" >>confdefs.h
12652
12653
12654else
12655
12656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12657$as_echo "no" >&6; }
12658 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
12659
12660
12661fi
12662rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12663 conftest.$ac_objext conftest.beam conftest.$ac_ext
12664fi
12665
12666fi
12667
12668if test "x$ac_cv_func_getaddrinfo" = "xyes"; then
12669 ac_fn_c_check_decl "$LINENO" "AI_NUMERICSERV" "ac_cv_have_decl_AI_NUMERICSERV" "#include <sys/types.h>
12670 #include <sys/socket.h>
12671 #include <netdb.h>
12672"
12673if test "x$ac_cv_have_decl_AI_NUMERICSERV" = xyes; then :
12674 ac_have_decl=1
12675else
12676 ac_have_decl=0
12677fi
12678
12679cat >>confdefs.h <<_ACEOF
12680#define HAVE_DECL_AI_NUMERICSERV $ac_have_decl
12681_ACEOF
12682
12683fi
12684
12685if test "x$check_for_conflicting_getspnam" = "x1"; then
12686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for conflicting getspnam in shadow.h" >&5
12687$as_echo_n "checking for conflicting getspnam in shadow.h... " >&6; }
12688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12689/* end confdefs.h. */
12690 #include <shadow.h>
12691int
12692main ()
12693{
12694 exit(0);
12695 ;
12696 return 0;
12697}
12698_ACEOF
12699if ac_fn_c_try_compile "$LINENO"; then :
12700
12701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12702$as_echo "no" >&6; }
12703
12704else
12705
12706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12707$as_echo "yes" >&6; }
12708
12709$as_echo "#define GETSPNAM_CONFLICTING_DEFS 1" >>confdefs.h
12710
12711
12712
12713fi
12714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12715fi
12716
12717if test "x$ac_cv_func_strnvis" = "xyes"; then
12718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnvis" >&5
12719$as_echo_n "checking for working strnvis... " >&6; }
12720 if test "$cross_compiling" = yes; then :
12721 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming broken" >&5
12722$as_echo "$as_me: WARNING: cross compiling: assuming broken" >&2;}
12723
12724$as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
12725
12726
12727else
12728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12729/* end confdefs.h. */
12730
12731#include <signal.h>
12732#include <stdlib.h>
12733#include <string.h>
12734#include <vis.h>
12735static void sighandler(int sig) { _exit(1); }
12736
12737int
12738main ()
12739{
12740
12741 char dst[16];
12742
12743 signal(SIGSEGV, sighandler);
12744 if (strnvis(dst, "src", 4, 0) && strcmp(dst, "src") == 0)
12745 exit(0);
12746 exit(1)
12747
12748 ;
12749 return 0;
12750}
12751_ACEOF
12752if ac_fn_c_try_run "$LINENO"; then :
12753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12754$as_echo "yes" >&6; }
12755else
12756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12757$as_echo "no" >&6; }
12758
12759$as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
12760
12761fi
12762rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12763 conftest.$ac_objext conftest.beam conftest.$ac_ext
12764fi
12765
12766fi
12767
12768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if SA_RESTARTed signals interrupt select()" >&5
12769$as_echo_n "checking if SA_RESTARTed signals interrupt select()... " >&6; }
12770if test "$cross_compiling" = yes; then :
12771 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
12772$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
12773
12774else
12775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12776/* end confdefs.h. */
12777
12778#ifdef HAVE_SYS_SELECT
12779# include <sys/select.h>
12780#endif
12781#include <sys/types.h>
12782#include <sys/time.h>
12783#include <stdlib.h>
12784#include <signal.h>
12785static void sighandler(int sig) { }
12786
12787int
12788main ()
12789{
12790
12791 int r;
12792 pid_t pid;
12793 struct sigaction sa;
12794
12795 sa.sa_handler = sighandler;
12796 sa.sa_flags = SA_RESTART;
12797 (void)sigaction(SIGTERM, &sa, NULL);
12798 if ((pid = fork()) == 0) { /* child */
12799 pid = getppid();
12800 sleep(1);
12801 kill(pid, SIGTERM);
12802 sleep(1);
12803 if (getppid() == pid) /* if parent did not exit, shoot it */
12804 kill(pid, SIGKILL);
12805 exit(0);
12806 } else { /* parent */
12807 r = select(0, NULL, NULL, NULL, NULL);
12808 }
12809 exit(r == -1 ? 0 : 1);
12810
12811 ;
12812 return 0;
12813}
12814_ACEOF
12815if ac_fn_c_try_run "$LINENO"; then :
12816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12817$as_echo "yes" >&6; }
12818else
12819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12820$as_echo "no" >&6; }
12821
12822$as_echo "#define NO_SA_RESTART 1" >>confdefs.h
12823
12824fi
12825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12826 conftest.$ac_objext conftest.beam conftest.$ac_ext
12827fi
12828
12829
12830for ac_func in getpgrp
12831do :
12832 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
12833if test "x$ac_cv_func_getpgrp" = xyes; then :
12834 cat >>confdefs.h <<_ACEOF
12835#define HAVE_GETPGRP 1
12836_ACEOF
12837
12838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getpgrp accepts zero args" >&5
12839$as_echo_n "checking if getpgrp accepts zero args... " >&6; }
12840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12841/* end confdefs.h. */
12842$ac_includes_default
12843int
12844main ()
12845{
12846 getpgrp();
12847 ;
12848 return 0;
12849}
12850_ACEOF
12851if ac_fn_c_try_compile "$LINENO"; then :
12852 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12853$as_echo "yes" >&6; }
12854
12855$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
12856
12857else
12858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12859$as_echo "no" >&6; }
12860
12861$as_echo "#define GETPGRP_VOID 0" >>confdefs.h
12862
12863
12864fi
12865rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12866
12867fi
12868done
12869
12870
12871# Search for OpenSSL
12872saved_CPPFLAGS="$CPPFLAGS"
12873saved_LDFLAGS="$LDFLAGS"
12874
12875# Check whether --with-ssl-dir was given.
12876if test "${with_ssl_dir+set}" = set; then :
12877 withval=$with_ssl_dir;
12878 if test "x$openssl" = "xno" ; then
12879 as_fn_error $? "cannot use --with-ssl-dir when OpenSSL disabled" "$LINENO" 5
12880 fi
12881 if test "x$withval" != "xno" ; then
12882 case "$withval" in
12883 # Relative paths
12884 ./*|../*) withval="`pwd`/$withval"
12885 esac
12886 if test -d "$withval/lib"; then
12887 if test -n "${rpath_opt}"; then
12888 LDFLAGS="-L${withval}/lib ${rpath_opt}${withval}/lib ${LDFLAGS}"
12889 else
12890 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
12891 fi
12892 elif test -d "$withval/lib64"; then
12893 if test -n "${rpath_opt}"; then
12894 LDFLAGS="-L${withval}/lib64 ${rpath_opt}${withval}/lib64 ${LDFLAGS}"
12895 else
12896 LDFLAGS="-L${withval}/lib64 ${LDFLAGS}"
12897 fi
12898 else
12899 if test -n "${rpath_opt}"; then
12900 LDFLAGS="-L${withval} ${rpath_opt}${withval} ${LDFLAGS}"
12901 else
12902 LDFLAGS="-L${withval} ${LDFLAGS}"
12903 fi
12904 fi
12905 if test -d "$withval/include"; then
12906 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
12907 else
12908 CPPFLAGS="-I${withval} ${CPPFLAGS}"
12909 fi
12910 fi
12911
12912
12913fi
12914
12915
12916
12917# Check whether --with-openssl-header-check was given.
12918if test "${with_openssl_header_check+set}" = set; then :
12919 withval=$with_openssl_header_check;
12920 if test "x$withval" = "xno" ; then
12921 openssl_check_nonfatal=1
12922 fi
12923
12924
12925fi
12926
12927
12928openssl_engine=no
12929
12930# Check whether --with-ssl-engine was given.
12931if test "${with_ssl_engine+set}" = set; then :
12932 withval=$with_ssl_engine;
12933 if test "x$withval" != "xno" ; then
12934 if test "x$openssl" = "xno" ; then
12935 as_fn_error $? "cannot use --with-ssl-engine when OpenSSL disabled" "$LINENO" 5
12936 fi
12937 openssl_engine=yes
12938 fi
12939
12940
12941fi
12942
12943
12944if test "x$openssl" = "xyes" ; then
12945 LIBS="-lcrypto $LIBS"
12946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12947/* end confdefs.h. */
12948
12949/* Override any GCC internal prototype to avoid an error.
12950 Use char because int might match the return type of a GCC
12951 builtin and then its argument prototype would still apply. */
12952#ifdef __cplusplus
12953extern "C"
12954#endif
12955char RAND_add ();
12956int
12957main ()
12958{
12959return RAND_add ();
12960 ;
12961 return 0;
12962}
12963_ACEOF
12964if ac_fn_c_try_link "$LINENO"; then :
12965
12966else
12967 as_fn_error $? "*** working libcrypto not found, check config.log" "$LINENO" 5
12968fi
12969rm -f core conftest.err conftest.$ac_objext \
12970 conftest$ac_exeext conftest.$ac_ext
12971 ac_fn_c_check_header_mongrel "$LINENO" "openssl/opensslv.h" "ac_cv_header_openssl_opensslv_h" "$ac_includes_default"
12972if test "x$ac_cv_header_openssl_opensslv_h" = xyes; then :
12973
12974else
12975 as_fn_error $? "*** OpenSSL headers missing - please install first or check config.log ***" "$LINENO" 5
12976fi
12977
12978
12979
12980 # Determine OpenSSL header version
12981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL header version" >&5
12982$as_echo_n "checking OpenSSL header version... " >&6; }
12983 if test "$cross_compiling" = yes; then :
12984
12985 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
12986$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
12987
12988
12989else
12990 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12991/* end confdefs.h. */
12992
12993 #include <stdlib.h>
12994 #include <stdio.h>
12995 #include <string.h>
12996 #include <openssl/opensslv.h>
12997 #define DATA "conftest.sslincver"
12998
12999int
13000main ()
13001{
13002
13003 FILE *fd;
13004 int rc;
13005
13006 fd = fopen(DATA,"w");
13007 if(fd == NULL)
13008 exit(1);
13009
13010 if ((rc = fprintf(fd, "%08lx (%s)\n",
13011 (unsigned long)OPENSSL_VERSION_NUMBER,
13012 OPENSSL_VERSION_TEXT)) < 0)
13013 exit(1);
13014
13015 exit(0);
13016
13017 ;
13018 return 0;
13019}
13020_ACEOF
13021if ac_fn_c_try_run "$LINENO"; then :
13022
13023 ssl_header_ver=`cat conftest.sslincver`
13024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_header_ver" >&5
13025$as_echo "$ssl_header_ver" >&6; }
13026
13027else
13028
13029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13030$as_echo "not found" >&6; }
13031 as_fn_error $? "OpenSSL version header not found." "$LINENO" 5
13032
13033fi
13034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13035 conftest.$ac_objext conftest.beam conftest.$ac_ext
13036fi
13037
13038
13039 # Determining OpenSSL library version is version dependent.
13040 for ac_func in OpenSSL_version OpenSSL_version_num
13041do :
13042 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13043ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13044if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13045 cat >>confdefs.h <<_ACEOF
13046#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13047_ACEOF
13048
13049fi
13050done
13051
13052
13053 # Determine OpenSSL library version
13054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version" >&5
13055$as_echo_n "checking OpenSSL library version... " >&6; }
13056 if test "$cross_compiling" = yes; then :
13057
13058 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
13059$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
13060
13061
13062else
13063 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13064/* end confdefs.h. */
13065
13066 #include <stdio.h>
13067 #include <string.h>
13068 #include <openssl/opensslv.h>
13069 #include <openssl/crypto.h>
13070 #define DATA "conftest.ssllibver"
13071
13072int
13073main ()
13074{
13075
13076 FILE *fd;
13077 int rc;
13078
13079 fd = fopen(DATA,"w");
13080 if(fd == NULL)
13081 exit(1);
13082#ifndef OPENSSL_VERSION
13083# define OPENSSL_VERSION SSLEAY_VERSION
13084#endif
13085#ifndef HAVE_OPENSSL_VERSION
13086# define OpenSSL_version SSLeay_version
13087#endif
13088#ifndef HAVE_OPENSSL_VERSION_NUM
13089# define OpenSSL_version_num SSLeay
13090#endif
13091 if ((rc = fprintf(fd, "%08lx (%s)\n",
13092 (unsigned long)OpenSSL_version_num(),
13093 OpenSSL_version(OPENSSL_VERSION))) < 0)
13094 exit(1);
13095
13096 exit(0);
13097
13098 ;
13099 return 0;
13100}
13101_ACEOF
13102if ac_fn_c_try_run "$LINENO"; then :
13103
13104 ssl_library_ver=`cat conftest.ssllibver`
13105 # Check version is supported.
13106 case "$ssl_library_ver" in
13107 10000*|0*)
13108 as_fn_error $? "OpenSSL >= 1.0.1 required (have \"$ssl_library_ver\")" "$LINENO" 5
13109 ;;
13110 100*) ;; # 1.0.x
13111 101000[0123456]*)
13112 # https://github.com/openssl/openssl/pull/4613
13113 as_fn_error $? "OpenSSL 1.1.x versions prior to 1.1.0g have a bug that breaks their use with OpenSSH (have \"$ssl_library_ver\")" "$LINENO" 5
13114 ;;
13115 101*) ;; # 1.1.x
13116 200*) ;; # LibreSSL
13117 300*) ;; # OpenSSL development branch.
13118 *)
13119 as_fn_error $? "Unknown/unsupported OpenSSL version (\"$ssl_library_ver\")" "$LINENO" 5
13120 ;;
13121 esac
13122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_library_ver" >&5
13123$as_echo "$ssl_library_ver" >&6; }
13124
13125else
13126
13127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13128$as_echo "not found" >&6; }
13129 as_fn_error $? "OpenSSL library not found." "$LINENO" 5
13130
13131fi
13132rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13133 conftest.$ac_objext conftest.beam conftest.$ac_ext
13134fi
13135
13136
13137 # Sanity check OpenSSL headers
13138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's headers match the library" >&5
13139$as_echo_n "checking whether OpenSSL's headers match the library... " >&6; }
13140 if test "$cross_compiling" = yes; then :
13141
13142 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
13143$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
13144
13145
13146else
13147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13148/* end confdefs.h. */
13149
13150 #include <string.h>
13151 #include <openssl/opensslv.h>
13152 #include <openssl/crypto.h>
13153
13154int
13155main ()
13156{
13157
13158#ifndef HAVE_OPENSSL_VERSION_NUM
13159# define OpenSSL_version_num SSLeay
13160#endif
13161 exit(OpenSSL_version_num() == OPENSSL_VERSION_NUMBER ? 0 : 1);
13162
13163 ;
13164 return 0;
13165}
13166_ACEOF
13167if ac_fn_c_try_run "$LINENO"; then :
13168
13169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13170$as_echo "yes" >&6; }
13171
13172else
13173
13174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13175$as_echo "no" >&6; }
13176 if test "x$openssl_check_nonfatal" = "x"; then
13177 as_fn_error $? "Your OpenSSL headers do not match your
13178 library. Check config.log for details.
13179 If you are sure your installation is consistent, you can disable the check
13180 by running \"./configure --without-openssl-header-check\".
13181 Also see contrib/findssl.sh for help identifying header/library mismatches.
13182 " "$LINENO" 5
13183 else
13184 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your OpenSSL headers do not match your
13185 library. Check config.log for details.
13186 Also see contrib/findssl.sh for help identifying header/library mismatches." >&5
13187$as_echo "$as_me: WARNING: Your OpenSSL headers do not match your
13188 library. Check config.log for details.
13189 Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;}
13190 fi
13191
13192fi
13193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13194 conftest.$ac_objext conftest.beam conftest.$ac_ext
13195fi
13196
13197
13198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL functions will link" >&5
13199$as_echo_n "checking if programs using OpenSSL functions will link... " >&6; }
13200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13201/* end confdefs.h. */
13202 #include <openssl/err.h>
13203int
13204main ()
13205{
13206 ERR_load_crypto_strings();
13207 ;
13208 return 0;
13209}
13210_ACEOF
13211if ac_fn_c_try_link "$LINENO"; then :
13212
13213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13214$as_echo "yes" >&6; }
13215
13216else
13217
13218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13219$as_echo "no" >&6; }
13220 saved_LIBS="$LIBS"
13221 LIBS="$LIBS -ldl"
13222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL need -ldl" >&5
13223$as_echo_n "checking if programs using OpenSSL need -ldl... " >&6; }
13224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13225/* end confdefs.h. */
13226 #include <openssl/err.h>
13227int
13228main ()
13229{
13230 ERR_load_crypto_strings();
13231 ;
13232 return 0;
13233}
13234_ACEOF
13235if ac_fn_c_try_link "$LINENO"; then :
13236
13237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13238$as_echo "yes" >&6; }
13239
13240else
13241
13242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13243$as_echo "no" >&6; }
13244 LIBS="$saved_LIBS"
13245
13246
13247fi
13248rm -f core conftest.err conftest.$ac_objext \
13249 conftest$ac_exeext conftest.$ac_ext
13250
13251
13252fi
13253rm -f core conftest.err conftest.$ac_objext \
13254 conftest$ac_exeext conftest.$ac_ext
13255
13256 for ac_func in \
13257 BN_is_prime_ex \
13258 DSA_generate_parameters_ex \
13259 EVP_CIPHER_CTX_ctrl \
13260 EVP_DigestFinal_ex \
13261 EVP_DigestInit_ex \
13262 EVP_MD_CTX_cleanup \
13263 EVP_MD_CTX_copy_ex \
13264 EVP_MD_CTX_init \
13265 HMAC_CTX_init \
13266 RSA_generate_key_ex \
13267 RSA_get_default_method \
13268
13269do :
13270 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13271ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13272if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13273 cat >>confdefs.h <<_ACEOF
13274#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13275_ACEOF
13276
13277fi
13278done
13279
13280
13281 # OpenSSL_add_all_algorithms may be a macro.
13282 ac_fn_c_check_func "$LINENO" "OpenSSL_add_all_algorithms" "ac_cv_func_OpenSSL_add_all_algorithms"
13283if test "x$ac_cv_func_OpenSSL_add_all_algorithms" = xyes; then :
13284
13285$as_echo "#define HAVE_OPENSSL_ADD_ALL_ALGORITHMS 1" >>confdefs.h
13286
13287else
13288 ac_fn_c_check_decl "$LINENO" "OpenSSL_add_all_algorithms" "ac_cv_have_decl_OpenSSL_add_all_algorithms" "#include <openssl/evp.h>
13289
13290"
13291if test "x$ac_cv_have_decl_OpenSSL_add_all_algorithms" = xyes; then :
13292
13293$as_echo "#define HAVE_OPENSSL_ADD_ALL_ALGORITHMS 1" >>confdefs.h
13294
13295fi
13296
13297
13298fi
13299
13300
13301 # LibreSSL/OpenSSL 1.1x API
13302 for ac_func in \
13303 OPENSSL_init_crypto \
13304 DH_get0_key \
13305 DH_get0_pqg \
13306 DH_set0_key \
13307 DH_set_length \
13308 DH_set0_pqg \
13309 DSA_get0_key \
13310 DSA_get0_pqg \
13311 DSA_set0_key \
13312 DSA_set0_pqg \
13313 DSA_SIG_get0 \
13314 DSA_SIG_set0 \
13315 ECDSA_SIG_get0 \
13316 ECDSA_SIG_set0 \
13317 EVP_CIPHER_CTX_iv \
13318 EVP_CIPHER_CTX_iv_noconst \
13319 EVP_CIPHER_CTX_get_iv \
13320 EVP_CIPHER_CTX_set_iv \
13321 RSA_get0_crt_params \
13322 RSA_get0_factors \
13323 RSA_get0_key \
13324 RSA_set0_crt_params \
13325 RSA_set0_factors \
13326 RSA_set0_key \
13327 RSA_meth_free \
13328 RSA_meth_dup \
13329 RSA_meth_set1_name \
13330 RSA_meth_get_finish \
13331 RSA_meth_set_priv_enc \
13332 RSA_meth_set_priv_dec \
13333 RSA_meth_set_finish \
13334 EVP_PKEY_get0_RSA \
13335 EVP_MD_CTX_new \
13336 EVP_MD_CTX_free \
13337 EVP_chacha20 \
13338
13339do :
13340 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13341ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13342if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13343 cat >>confdefs.h <<_ACEOF
13344#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13345_ACEOF
13346
13347fi
13348done
13349
13350
13351 if test "x$openssl_engine" = "xyes" ; then
13352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL ENGINE support" >&5
13353$as_echo_n "checking for OpenSSL ENGINE support... " >&6; }
13354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13355/* end confdefs.h. */
13356
13357 #include <openssl/engine.h>
13358
13359int
13360main ()
13361{
13362
13363 ENGINE_load_builtin_engines();
13364 ENGINE_register_all_complete();
13365
13366 ;
13367 return 0;
13368}
13369_ACEOF
13370if ac_fn_c_try_compile "$LINENO"; then :
13371 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13372$as_echo "yes" >&6; }
13373
13374$as_echo "#define USE_OPENSSL_ENGINE 1" >>confdefs.h
13375
13376
13377else
13378 as_fn_error $? "OpenSSL ENGINE support not found" "$LINENO" 5
13379
13380fi
13381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13382 fi
13383
13384 # Check for OpenSSL without EVP_aes_{192,256}_cbc
13385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has crippled AES support" >&5
13386$as_echo_n "checking whether OpenSSL has crippled AES support... " >&6; }
13387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13388/* end confdefs.h. */
13389
13390 #include <string.h>
13391 #include <openssl/evp.h>
13392
13393int
13394main ()
13395{
13396
13397 exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);
13398
13399 ;
13400 return 0;
13401}
13402_ACEOF
13403if ac_fn_c_try_link "$LINENO"; then :
13404
13405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13406$as_echo "no" >&6; }
13407
13408else
13409
13410 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13411$as_echo "yes" >&6; }
13412
13413$as_echo "#define OPENSSL_LOBOTOMISED_AES 1" >>confdefs.h
13414
13415
13416
13417fi
13418rm -f core conftest.err conftest.$ac_objext \
13419 conftest$ac_exeext conftest.$ac_ext
13420
13421 # Check for OpenSSL with EVP_aes_*ctr
13422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has AES CTR via EVP" >&5
13423$as_echo_n "checking whether OpenSSL has AES CTR via EVP... " >&6; }
13424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13425/* end confdefs.h. */
13426
13427 #include <string.h>
13428 #include <openssl/evp.h>
13429
13430int
13431main ()
13432{
13433
13434 exit(EVP_aes_128_ctr() == NULL ||
13435 EVP_aes_192_cbc() == NULL ||
13436 EVP_aes_256_cbc() == NULL);
13437
13438 ;
13439 return 0;
13440}
13441_ACEOF
13442if ac_fn_c_try_link "$LINENO"; then :
13443
13444 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13445$as_echo "yes" >&6; }
13446
13447$as_echo "#define OPENSSL_HAVE_EVPCTR 1" >>confdefs.h
13448
13449
13450else
13451
13452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13453$as_echo "no" >&6; }
13454
13455
13456fi
13457rm -f core conftest.err conftest.$ac_objext \
13458 conftest$ac_exeext conftest.$ac_ext
13459
13460 # Check for OpenSSL with EVP_aes_*gcm
13461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has AES GCM via EVP" >&5
13462$as_echo_n "checking whether OpenSSL has AES GCM via EVP... " >&6; }
13463 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13464/* end confdefs.h. */
13465
13466 #include <string.h>
13467 #include <openssl/evp.h>
13468
13469int
13470main ()
13471{
13472
13473 exit(EVP_aes_128_gcm() == NULL ||
13474 EVP_aes_256_gcm() == NULL ||
13475 EVP_CTRL_GCM_SET_IV_FIXED == 0 ||
13476 EVP_CTRL_GCM_IV_GEN == 0 ||
13477 EVP_CTRL_GCM_SET_TAG == 0 ||
13478 EVP_CTRL_GCM_GET_TAG == 0 ||
13479 EVP_CIPHER_CTX_ctrl(NULL, 0, 0, NULL) == 0);
13480
13481 ;
13482 return 0;
13483}
13484_ACEOF
13485if ac_fn_c_try_link "$LINENO"; then :
13486
13487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13488$as_echo "yes" >&6; }
13489
13490$as_echo "#define OPENSSL_HAVE_EVPGCM 1" >>confdefs.h
13491
13492
13493else
13494
13495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13496$as_echo "no" >&6; }
13497 unsupported_algorithms="$unsupported_cipers \
13498 aes128-gcm@openssh.com \
13499 aes256-gcm@openssh.com"
13500
13501
13502fi
13503rm -f core conftest.err conftest.$ac_objext \
13504 conftest$ac_exeext conftest.$ac_ext
13505
13506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if EVP_DigestUpdate returns an int" >&5
13507$as_echo_n "checking if EVP_DigestUpdate returns an int... " >&6; }
13508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13509/* end confdefs.h. */
13510
13511 #include <string.h>
13512 #include <openssl/evp.h>
13513
13514int
13515main ()
13516{
13517
13518 if(EVP_DigestUpdate(NULL, NULL,0))
13519 exit(0);
13520
13521 ;
13522 return 0;
13523}
13524_ACEOF
13525if ac_fn_c_try_link "$LINENO"; then :
13526
13527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13528$as_echo "yes" >&6; }
13529
13530else
13531
13532 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13533$as_echo "no" >&6; }
13534
13535$as_echo "#define OPENSSL_EVP_DIGESTUPDATE_VOID 1" >>confdefs.h
13536
13537
13538
13539fi
13540rm -f core conftest.err conftest.$ac_objext \
13541 conftest$ac_exeext conftest.$ac_ext
13542
13543 # Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
13544 # because the system crypt() is more featureful.
13545 if test "x$check_for_libcrypt_before" = "x1"; then
13546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
13547$as_echo_n "checking for crypt in -lcrypt... " >&6; }
13548if ${ac_cv_lib_crypt_crypt+:} false; then :
13549 $as_echo_n "(cached) " >&6
13550else
13551 ac_check_lib_save_LIBS=$LIBS
13552LIBS="-lcrypt $LIBS"
13553cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13554/* end confdefs.h. */
13555
13556/* Override any GCC internal prototype to avoid an error.
13557 Use char because int might match the return type of a GCC
13558 builtin and then its argument prototype would still apply. */
13559#ifdef __cplusplus
13560extern "C"
13561#endif
13562char crypt ();
13563int
13564main ()
13565{
13566return crypt ();
13567 ;
13568 return 0;
13569}
13570_ACEOF
13571if ac_fn_c_try_link "$LINENO"; then :
13572 ac_cv_lib_crypt_crypt=yes
13573else
13574 ac_cv_lib_crypt_crypt=no
13575fi
13576rm -f core conftest.err conftest.$ac_objext \
13577 conftest$ac_exeext conftest.$ac_ext
13578LIBS=$ac_check_lib_save_LIBS
13579fi
13580{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
13581$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
13582if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
13583 cat >>confdefs.h <<_ACEOF
13584#define HAVE_LIBCRYPT 1
13585_ACEOF
13586
13587 LIBS="-lcrypt $LIBS"
13588
13589fi
13590
13591 fi
13592
13593 # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
13594 # version in OpenSSL.
13595 if test "x$check_for_libcrypt_later" = "x1"; then
13596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
13597$as_echo_n "checking for crypt in -lcrypt... " >&6; }
13598if ${ac_cv_lib_crypt_crypt+:} false; then :
13599 $as_echo_n "(cached) " >&6
13600else
13601 ac_check_lib_save_LIBS=$LIBS
13602LIBS="-lcrypt $LIBS"
13603cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13604/* end confdefs.h. */
13605
13606/* Override any GCC internal prototype to avoid an error.
13607 Use char because int might match the return type of a GCC
13608 builtin and then its argument prototype would still apply. */
13609#ifdef __cplusplus
13610extern "C"
13611#endif
13612char crypt ();
13613int
13614main ()
13615{
13616return crypt ();
13617 ;
13618 return 0;
13619}
13620_ACEOF
13621if ac_fn_c_try_link "$LINENO"; then :
13622 ac_cv_lib_crypt_crypt=yes
13623else
13624 ac_cv_lib_crypt_crypt=no
13625fi
13626rm -f core conftest.err conftest.$ac_objext \
13627 conftest$ac_exeext conftest.$ac_ext
13628LIBS=$ac_check_lib_save_LIBS
13629fi
13630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
13631$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
13632if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
13633 LIBS="$LIBS -lcrypt"
13634fi
13635
13636 fi
13637 for ac_func in crypt DES_crypt
13638do :
13639 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13640ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13641if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13642 cat >>confdefs.h <<_ACEOF
13643#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13644_ACEOF
13645
13646fi
13647done
13648
13649
13650 # Check for SHA256, SHA384 and SHA512 support in OpenSSL
13651 for ac_func in EVP_sha256 EVP_sha384 EVP_sha512
13652do :
13653 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13654ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13655if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13656 cat >>confdefs.h <<_ACEOF
13657#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13658_ACEOF
13659
13660fi
13661done
13662
13663
13664 # Check complete ECC support in OpenSSL
13665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_X9_62_prime256v1" >&5
13666$as_echo_n "checking whether OpenSSL has NID_X9_62_prime256v1... " >&6; }
13667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13668/* end confdefs.h. */
13669
13670 #include <openssl/ec.h>
13671 #include <openssl/ecdh.h>
13672 #include <openssl/ecdsa.h>
13673 #include <openssl/evp.h>
13674 #include <openssl/objects.h>
13675 #include <openssl/opensslv.h>
13676
13677int
13678main ()
13679{
13680
13681 EC_KEY *e = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
13682 const EVP_MD *m = EVP_sha256(); /* We need this too */
13683
13684 ;
13685 return 0;
13686}
13687_ACEOF
13688if ac_fn_c_try_link "$LINENO"; then :
13689 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13690$as_echo "yes" >&6; }
13691 enable_nistp256=1
13692else
13693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13694$as_echo "no" >&6; }
13695
13696fi
13697rm -f core conftest.err conftest.$ac_objext \
13698 conftest$ac_exeext conftest.$ac_ext
13699
13700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_secp384r1" >&5
13701$as_echo_n "checking whether OpenSSL has NID_secp384r1... " >&6; }
13702 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13703/* end confdefs.h. */
13704
13705 #include <openssl/ec.h>
13706 #include <openssl/ecdh.h>
13707 #include <openssl/ecdsa.h>
13708 #include <openssl/evp.h>
13709 #include <openssl/objects.h>
13710 #include <openssl/opensslv.h>
13711
13712int
13713main ()
13714{
13715
13716 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp384r1);
13717 const EVP_MD *m = EVP_sha384(); /* We need this too */
13718
13719 ;
13720 return 0;
13721}
13722_ACEOF
13723if ac_fn_c_try_link "$LINENO"; then :
13724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13725$as_echo "yes" >&6; }
13726 enable_nistp384=1
13727else
13728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13729$as_echo "no" >&6; }
13730
13731fi
13732rm -f core conftest.err conftest.$ac_objext \
13733 conftest$ac_exeext conftest.$ac_ext
13734
13735 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_secp521r1" >&5
13736$as_echo_n "checking whether OpenSSL has NID_secp521r1... " >&6; }
13737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13738/* end confdefs.h. */
13739
13740 #include <openssl/ec.h>
13741 #include <openssl/ecdh.h>
13742 #include <openssl/ecdsa.h>
13743 #include <openssl/evp.h>
13744 #include <openssl/objects.h>
13745 #include <openssl/opensslv.h>
13746
13747int
13748main ()
13749{
13750
13751 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
13752 const EVP_MD *m = EVP_sha512(); /* We need this too */
13753
13754 ;
13755 return 0;
13756}
13757_ACEOF
13758if ac_fn_c_try_link "$LINENO"; then :
13759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13760$as_echo "yes" >&6; }
13761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenSSL's NID_secp521r1 is functional" >&5
13762$as_echo_n "checking if OpenSSL's NID_secp521r1 is functional... " >&6; }
13763 if test "$cross_compiling" = yes; then :
13764 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: assuming yes" >&5
13765$as_echo "$as_me: WARNING: cross-compiling: assuming yes" >&2;}
13766 enable_nistp521=1
13767
13768else
13769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13770/* end confdefs.h. */
13771
13772 #include <openssl/ec.h>
13773 #include <openssl/ecdh.h>
13774 #include <openssl/ecdsa.h>
13775 #include <openssl/evp.h>
13776 #include <openssl/objects.h>
13777 #include <openssl/opensslv.h>
13778
13779int
13780main ()
13781{
13782
13783 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
13784 const EVP_MD *m = EVP_sha512(); /* We need this too */
13785 exit(e == NULL || m == NULL);
13786
13787 ;
13788 return 0;
13789}
13790_ACEOF
13791if ac_fn_c_try_run "$LINENO"; then :
13792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13793$as_echo "yes" >&6; }
13794 enable_nistp521=1
13795else
13796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13797$as_echo "no" >&6; }
13798fi
13799rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13800 conftest.$ac_objext conftest.beam conftest.$ac_ext
13801fi
13802
13803else
13804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13805$as_echo "no" >&6; }
13806
13807fi
13808rm -f core conftest.err conftest.$ac_objext \
13809 conftest$ac_exeext conftest.$ac_ext
13810
13811 COMMENT_OUT_ECC="#no ecc#"
13812 TEST_SSH_ECC=no
13813
13814 if test x$enable_nistp256 = x1 || test x$enable_nistp384 = x1 || \
13815 test x$enable_nistp521 = x1; then
13816
13817$as_echo "#define OPENSSL_HAS_ECC 1" >>confdefs.h
13818
13819 for ac_func in EC_KEY_METHOD_new
13820do :
13821 ac_fn_c_check_func "$LINENO" "EC_KEY_METHOD_new" "ac_cv_func_EC_KEY_METHOD_new"
13822if test "x$ac_cv_func_EC_KEY_METHOD_new" = xyes; then :
13823 cat >>confdefs.h <<_ACEOF
13824#define HAVE_EC_KEY_METHOD_NEW 1
13825_ACEOF
13826
13827fi
13828done
13829
13830 openssl_ecc=yes
13831 else
13832 openssl_ecc=no
13833 fi
13834 if test x$enable_nistp256 = x1; then
13835
13836$as_echo "#define OPENSSL_HAS_NISTP256 1" >>confdefs.h
13837
13838 TEST_SSH_ECC=yes
13839 COMMENT_OUT_ECC=""
13840 else
13841 unsupported_algorithms="$unsupported_algorithms \
13842 ecdsa-sha2-nistp256 \
13843 ecdh-sha2-nistp256 \
13844 ecdsa-sha2-nistp256-cert-v01@openssh.com"
13845 fi
13846 if test x$enable_nistp384 = x1; then
13847
13848$as_echo "#define OPENSSL_HAS_NISTP384 1" >>confdefs.h
13849
13850 TEST_SSH_ECC=yes
13851 COMMENT_OUT_ECC=""
13852 else
13853 unsupported_algorithms="$unsupported_algorithms \
13854 ecdsa-sha2-nistp384 \
13855 ecdh-sha2-nistp384 \
13856 ecdsa-sha2-nistp384-cert-v01@openssh.com"
13857 fi
13858 if test x$enable_nistp521 = x1; then
13859
13860$as_echo "#define OPENSSL_HAS_NISTP521 1" >>confdefs.h
13861
13862 TEST_SSH_ECC=yes
13863 COMMENT_OUT_ECC=""
13864 else
13865 unsupported_algorithms="$unsupported_algorithms \
13866 ecdh-sha2-nistp521 \
13867 ecdsa-sha2-nistp521 \
13868 ecdsa-sha2-nistp521-cert-v01@openssh.com"
13869 fi
13870
13871
13872
13873else
13874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
13875$as_echo_n "checking for crypt in -lcrypt... " >&6; }
13876if ${ac_cv_lib_crypt_crypt+:} false; then :
13877 $as_echo_n "(cached) " >&6
13878else
13879 ac_check_lib_save_LIBS=$LIBS
13880LIBS="-lcrypt $LIBS"
13881cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13882/* end confdefs.h. */
13883
13884/* Override any GCC internal prototype to avoid an error.
13885 Use char because int might match the return type of a GCC
13886 builtin and then its argument prototype would still apply. */
13887#ifdef __cplusplus
13888extern "C"
13889#endif
13890char crypt ();
13891int
13892main ()
13893{
13894return crypt ();
13895 ;
13896 return 0;
13897}
13898_ACEOF
13899if ac_fn_c_try_link "$LINENO"; then :
13900 ac_cv_lib_crypt_crypt=yes
13901else
13902 ac_cv_lib_crypt_crypt=no
13903fi
13904rm -f core conftest.err conftest.$ac_objext \
13905 conftest$ac_exeext conftest.$ac_ext
13906LIBS=$ac_check_lib_save_LIBS
13907fi
13908{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
13909$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
13910if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
13911 LIBS="$LIBS -lcrypt"
13912fi
13913
13914 for ac_func in crypt
13915do :
13916 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
13917if test "x$ac_cv_func_crypt" = xyes; then :
13918 cat >>confdefs.h <<_ACEOF
13919#define HAVE_CRYPT 1
13920_ACEOF
13921
13922fi
13923done
13924
13925fi
13926
13927# PKCS11/U2F depend on OpenSSL and dlopen().
13928enable_pkcs11=yes
13929enable_sk=yes
13930if test "x$openssl" != "xyes" ; then
13931 enable_pkcs11="disabled; missing libcrypto"
13932 enable_sk="disabled; missing libcrypto"
13933fi
13934if test "x$openssl_ecc" != "xyes" ; then
13935 enable_sk="disabled; OpenSSL has no ECC support"
13936fi
13937if test "x$ac_cv_func_dlopen" != "xyes" ; then
13938 enable_pkcs11="disabled; missing dlopen(3)"
13939 enable_sk="disabled; missing dlopen(3)"
13940fi
13941if test "x$ac_cv_have_decl_RTLD_NOW" != "xyes" ; then
13942 enable_pkcs11="disabled; missing RTLD_NOW"
13943 enable_sk="disabled; missing RTLD_NOW"
13944fi
13945if test ! -z "$disable_pkcs11" ; then
13946 enable_pkcs11="disabled by user"
13947fi
13948if test ! -z "$disable_sk" ; then
13949 enable_sk="disabled by user"
13950fi
13951
13952{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable PKCS11" >&5
13953$as_echo_n "checking whether to enable PKCS11... " >&6; }
13954if test "x$enable_pkcs11" = "xyes" ; then
13955
13956$as_echo "#define ENABLE_PKCS11 /**/" >>confdefs.h
13957
13958fi
13959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_pkcs11" >&5
13960$as_echo "$enable_pkcs11" >&6; }
13961
13962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable U2F" >&5
13963$as_echo_n "checking whether to enable U2F... " >&6; }
13964if test "x$enable_sk" = "xyes" ; then
13965
13966$as_echo "#define ENABLE_SK /**/" >>confdefs.h
13967
13968 SK_DUMMY_LIBRARY=regress/misc/sk-dummy/sk-dummy.so
13969
13970else
13971 # Do not try to build sk-dummy library.
13972 SK_DUMMY_LIBRARY=""
13973
13974fi
13975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_sk" >&5
13976$as_echo "$enable_sk" >&6; }
13977
13978# Now check for built-in security key support.
13979if test "x$enable_sk" = "xyes" -a "x$enable_sk_internal" = "xyes" ; then
13980 if test -n "$ac_tool_prefix"; then
13981 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
13982set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
13983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13984$as_echo_n "checking for $ac_word... " >&6; }
13985if ${ac_cv_path_PKGCONFIG+:} false; then :
13986 $as_echo_n "(cached) " >&6
13987else
13988 case $PKGCONFIG in
13989 [\\/]* | ?:[\\/]*)
13990 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
13991 ;;
13992 *)
13993 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13994for as_dir in $PATH
13995do
13996 IFS=$as_save_IFS
13997 test -z "$as_dir" && as_dir=.
13998 for ac_exec_ext in '' $ac_executable_extensions; do
13999 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14000 ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
14001 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14002 break 2
14003 fi
14004done
14005 done
14006IFS=$as_save_IFS
14007
14008 ;;
14009esac
14010fi
14011PKGCONFIG=$ac_cv_path_PKGCONFIG
14012if test -n "$PKGCONFIG"; then
14013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
14014$as_echo "$PKGCONFIG" >&6; }
14015else
14016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14017$as_echo "no" >&6; }
14018fi
14019
14020
14021fi
14022if test -z "$ac_cv_path_PKGCONFIG"; then
14023 ac_pt_PKGCONFIG=$PKGCONFIG
14024 # Extract the first word of "pkg-config", so it can be a program name with args.
14025set dummy pkg-config; ac_word=$2
14026{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14027$as_echo_n "checking for $ac_word... " >&6; }
14028if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
14029 $as_echo_n "(cached) " >&6
14030else
14031 case $ac_pt_PKGCONFIG in
14032 [\\/]* | ?:[\\/]*)
14033 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
14034 ;;
14035 *)
14036 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14037for as_dir in $PATH
14038do
14039 IFS=$as_save_IFS
14040 test -z "$as_dir" && as_dir=.
14041 for ac_exec_ext in '' $ac_executable_extensions; do
14042 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14043 ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
14044 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14045 break 2
14046 fi
14047done
14048 done
14049IFS=$as_save_IFS
14050
14051 ;;
14052esac
14053fi
14054ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
14055if test -n "$ac_pt_PKGCONFIG"; then
14056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
14057$as_echo "$ac_pt_PKGCONFIG" >&6; }
14058else
14059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14060$as_echo "no" >&6; }
14061fi
14062
14063 if test "x$ac_pt_PKGCONFIG" = x; then
14064 PKGCONFIG="no"
14065 else
14066 case $cross_compiling:$ac_tool_warned in
14067yes:)
14068{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
14069$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
14070ac_tool_warned=yes ;;
14071esac
14072 PKGCONFIG=$ac_pt_PKGCONFIG
14073 fi
14074else
14075 PKGCONFIG="$ac_cv_path_PKGCONFIG"
14076fi
14077
14078 use_pkgconfig_for_libfido2=
14079 if test "x$PKGCONFIG" != "xno"; then
14080 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PKGCONFIG knows about libfido2" >&5
14081$as_echo_n "checking if $PKGCONFIG knows about libfido2... " >&6; }
14082 if "$PKGCONFIG" libfido2; then
14083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14084$as_echo "yes" >&6; }
14085 use_pkgconfig_for_libfido2=yes
14086 else
14087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14088$as_echo "no" >&6; }
14089 fi
14090 fi
14091 if test "x$use_pkgconfig_for_libfido2" = "xyes"; then
14092 LIBFIDO2=`$PKGCONFIG --libs libfido2`
14093 CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libfido2`"
14094 else
14095 LIBFIDO2="-lfido2 -lcbor"
14096 fi
14097 OTHERLIBS=`echo $LIBFIDO2 | sed 's/-lfido2//'`
14098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fido_init in -lfido2" >&5
14099$as_echo_n "checking for fido_init in -lfido2... " >&6; }
14100if ${ac_cv_lib_fido2_fido_init+:} false; then :
14101 $as_echo_n "(cached) " >&6
14102else
14103 ac_check_lib_save_LIBS=$LIBS
14104LIBS="-lfido2 $OTHERLIBS
14105 $LIBS"
14106cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14107/* end confdefs.h. */
14108
14109/* Override any GCC internal prototype to avoid an error.
14110 Use char because int might match the return type of a GCC
14111 builtin and then its argument prototype would still apply. */
14112#ifdef __cplusplus
14113extern "C"
14114#endif
14115char fido_init ();
14116int
14117main ()
14118{
14119return fido_init ();
14120 ;
14121 return 0;
14122}
14123_ACEOF
14124if ac_fn_c_try_link "$LINENO"; then :
14125 ac_cv_lib_fido2_fido_init=yes
14126else
14127 ac_cv_lib_fido2_fido_init=no
14128fi
14129rm -f core conftest.err conftest.$ac_objext \
14130 conftest$ac_exeext conftest.$ac_ext
14131LIBS=$ac_check_lib_save_LIBS
14132fi
14133{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_fido2_fido_init" >&5
14134$as_echo "$ac_cv_lib_fido2_fido_init" >&6; }
14135if test "x$ac_cv_lib_fido2_fido_init" = xyes; then :
14136
14137
14138
14139$as_echo "#define ENABLE_SK_INTERNAL /**/" >>confdefs.h
14140
14141 enable_sk="built-in"
14142
14143else
14144 as_fn_error $? "no usable libfido2 found" "$LINENO" 5
14145fi
14146
14147 ac_fn_c_check_header_mongrel "$LINENO" "fido.h" "ac_cv_header_fido_h" "$ac_includes_default"
14148if test "x$ac_cv_header_fido_h" = xyes; then :
14149
14150else
14151 as_fn_error $? "missing fido.h from libfido2" "$LINENO" 5
14152fi
14153
14154
14155 ac_fn_c_check_header_compile "$LINENO" "fido/credman.h" "ac_cv_header_fido_credman_h" "#include <fido.h>
14156
14157"
14158if test "x$ac_cv_header_fido_credman_h" = xyes; then :
14159
14160else
14161 as_fn_error $? "missing fido/credman.h from libfido2" "$LINENO" 5
14162fi
14163
14164
14165fi
14166
14167for ac_func in \
14168 arc4random \
14169 arc4random_buf \
14170 arc4random_stir \
14171 arc4random_uniform \
14172
14173do :
14174 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14175ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14176if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
14177 cat >>confdefs.h <<_ACEOF
14178#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
14179_ACEOF
14180
14181fi
14182done
14183
14184
14185saved_LIBS="$LIBS"
14186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ia_openinfo in -liaf" >&5
14187$as_echo_n "checking for ia_openinfo in -liaf... " >&6; }
14188if ${ac_cv_lib_iaf_ia_openinfo+:} false; then :
14189 $as_echo_n "(cached) " >&6
14190else
14191 ac_check_lib_save_LIBS=$LIBS
14192LIBS="-liaf $LIBS"
14193cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14194/* end confdefs.h. */
14195
14196/* Override any GCC internal prototype to avoid an error.
14197 Use char because int might match the return type of a GCC
14198 builtin and then its argument prototype would still apply. */
14199#ifdef __cplusplus
14200extern "C"
14201#endif
14202char ia_openinfo ();
14203int
14204main ()
14205{
14206return ia_openinfo ();
14207 ;
14208 return 0;
14209}
14210_ACEOF
14211if ac_fn_c_try_link "$LINENO"; then :
14212 ac_cv_lib_iaf_ia_openinfo=yes
14213else
14214 ac_cv_lib_iaf_ia_openinfo=no
14215fi
14216rm -f core conftest.err conftest.$ac_objext \
14217 conftest$ac_exeext conftest.$ac_ext
14218LIBS=$ac_check_lib_save_LIBS
14219fi
14220{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iaf_ia_openinfo" >&5
14221$as_echo "$ac_cv_lib_iaf_ia_openinfo" >&6; }
14222if test "x$ac_cv_lib_iaf_ia_openinfo" = xyes; then :
14223
14224 LIBS="$LIBS -liaf"
14225 for ac_func in set_id
14226do :
14227 ac_fn_c_check_func "$LINENO" "set_id" "ac_cv_func_set_id"
14228if test "x$ac_cv_func_set_id" = xyes; then :
14229 cat >>confdefs.h <<_ACEOF
14230#define HAVE_SET_ID 1
14231_ACEOF
14232 SSHDLIBS="$SSHDLIBS -liaf"
14233
14234$as_echo "#define HAVE_LIBIAF 1" >>confdefs.h
14235
14236
14237fi
14238done
14239
14240
14241fi
14242
14243LIBS="$saved_LIBS"
14244
14245### Configure cryptographic random number support
14246
14247# Check whether OpenSSL seeds itself
14248if test "x$openssl" = "xyes" ; then
14249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's PRNG is internally seeded" >&5
14250$as_echo_n "checking whether OpenSSL's PRNG is internally seeded... " >&6; }
14251 if test "$cross_compiling" = yes; then :
14252
14253 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
14254$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
14255 # This is safe, since we will fatal() at runtime if
14256 # OpenSSL is not seeded correctly.
14257 OPENSSL_SEEDS_ITSELF=yes
14258
14259
14260else
14261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14262/* end confdefs.h. */
14263
14264 #include <string.h>
14265 #include <openssl/rand.h>
14266
14267int
14268main ()
14269{
14270
14271 exit(RAND_status() == 1 ? 0 : 1);
14272
14273 ;
14274 return 0;
14275}
14276_ACEOF
14277if ac_fn_c_try_run "$LINENO"; then :
14278
14279 OPENSSL_SEEDS_ITSELF=yes
14280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14281$as_echo "yes" >&6; }
14282
14283else
14284
14285 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14286$as_echo "no" >&6; }
14287
14288fi
14289rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14290 conftest.$ac_objext conftest.beam conftest.$ac_ext
14291fi
14292
14293fi
14294
14295# PRNGD TCP socket
14296
14297# Check whether --with-prngd-port was given.
14298if test "${with_prngd_port+set}" = set; then :
14299 withval=$with_prngd_port;
14300 case "$withval" in
14301 no)
14302 withval=""
14303 ;;
14304 [0-9]*)
14305 ;;
14306 *)
14307 as_fn_error $? "You must specify a numeric port number for --with-prngd-port" "$LINENO" 5
14308 ;;
14309 esac
14310 if test ! -z "$withval" ; then
14311 PRNGD_PORT="$withval"
14312
14313cat >>confdefs.h <<_ACEOF
14314#define PRNGD_PORT $PRNGD_PORT
14315_ACEOF
14316
14317 fi
14318
14319
14320fi
14321
14322
14323# PRNGD Unix domain socket
14324
14325# Check whether --with-prngd-socket was given.
14326if test "${with_prngd_socket+set}" = set; then :
14327 withval=$with_prngd_socket;
14328 case "$withval" in
14329 yes)
14330 withval="/var/run/egd-pool"
14331 ;;
14332 no)
14333 withval=""
14334 ;;
14335 /*)
14336 ;;
14337 *)
14338 as_fn_error $? "You must specify an absolute path to the entropy socket" "$LINENO" 5
14339 ;;
14340 esac
14341
14342 if test ! -z "$withval" ; then
14343 if test ! -z "$PRNGD_PORT" ; then
14344 as_fn_error $? "You may not specify both a PRNGD/EGD port and socket" "$LINENO" 5
14345 fi
14346 if test ! -r "$withval" ; then
14347 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Entropy socket is not readable" >&5
14348$as_echo "$as_me: WARNING: Entropy socket is not readable" >&2;}
14349 fi
14350 PRNGD_SOCKET="$withval"
14351
14352cat >>confdefs.h <<_ACEOF
14353#define PRNGD_SOCKET "$PRNGD_SOCKET"
14354_ACEOF
14355
14356 fi
14357
14358else
14359
14360 # Check for existing socket only if we don't have a random device already
14361 if test "x$OPENSSL_SEEDS_ITSELF" != "xyes" ; then
14362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRNGD/EGD socket" >&5
14363$as_echo_n "checking for PRNGD/EGD socket... " >&6; }
14364 # Insert other locations here
14365 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
14366 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
14367 PRNGD_SOCKET="$sock"
14368 cat >>confdefs.h <<_ACEOF
14369#define PRNGD_SOCKET "$PRNGD_SOCKET"
14370_ACEOF
14371
14372 break;
14373 fi
14374 done
14375 if test ! -z "$PRNGD_SOCKET" ; then
14376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRNGD_SOCKET" >&5
14377$as_echo "$PRNGD_SOCKET" >&6; }
14378 else
14379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14380$as_echo "not found" >&6; }
14381 fi
14382 fi
14383
14384
14385fi
14386
14387
14388# Which randomness source do we use?
14389if test ! -z "$PRNGD_PORT" ; then
14390 RAND_MSG="PRNGd port $PRNGD_PORT"
14391elif test ! -z "$PRNGD_SOCKET" ; then
14392 RAND_MSG="PRNGd socket $PRNGD_SOCKET"
14393elif test ! -z "$OPENSSL_SEEDS_ITSELF" ; then
14394
14395$as_echo "#define OPENSSL_PRNG_ONLY 1" >>confdefs.h
14396
14397 RAND_MSG="OpenSSL internal ONLY"
14398elif test "x$openssl" = "xno" ; then
14399 { $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
14400$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;}
14401else
14402 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
14403fi
14404
14405# Check for PAM libs
14406PAM_MSG="no"
14407
14408# Check whether --with-pam was given.
14409if test "${with_pam+set}" = set; then :
14410 withval=$with_pam;
14411 if test "x$withval" != "xno" ; then
14412 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
14413 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
14414 as_fn_error $? "PAM headers not found" "$LINENO" 5
14415 fi
14416
14417 saved_LIBS="$LIBS"
14418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14419$as_echo_n "checking for dlopen in -ldl... " >&6; }
14420if ${ac_cv_lib_dl_dlopen+:} false; then :
14421 $as_echo_n "(cached) " >&6
14422else
14423 ac_check_lib_save_LIBS=$LIBS
14424LIBS="-ldl $LIBS"
14425cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14426/* end confdefs.h. */
14427
14428/* Override any GCC internal prototype to avoid an error.
14429 Use char because int might match the return type of a GCC
14430 builtin and then its argument prototype would still apply. */
14431#ifdef __cplusplus
14432extern "C"
14433#endif
14434char dlopen ();
14435int
14436main ()
14437{
14438return dlopen ();
14439 ;
14440 return 0;
14441}
14442_ACEOF
14443if ac_fn_c_try_link "$LINENO"; then :
14444 ac_cv_lib_dl_dlopen=yes
14445else
14446 ac_cv_lib_dl_dlopen=no
14447fi
14448rm -f core conftest.err conftest.$ac_objext \
14449 conftest$ac_exeext conftest.$ac_ext
14450LIBS=$ac_check_lib_save_LIBS
14451fi
14452{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14453$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14454if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14455 cat >>confdefs.h <<_ACEOF
14456#define HAVE_LIBDL 1
14457_ACEOF
14458
14459 LIBS="-ldl $LIBS"
14460
14461fi
14462
14463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_set_item in -lpam" >&5
14464$as_echo_n "checking for pam_set_item in -lpam... " >&6; }
14465if ${ac_cv_lib_pam_pam_set_item+:} false; then :
14466 $as_echo_n "(cached) " >&6
14467else
14468 ac_check_lib_save_LIBS=$LIBS
14469LIBS="-lpam $LIBS"
14470cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14471/* end confdefs.h. */
14472
14473/* Override any GCC internal prototype to avoid an error.
14474 Use char because int might match the return type of a GCC
14475 builtin and then its argument prototype would still apply. */
14476#ifdef __cplusplus
14477extern "C"
14478#endif
14479char pam_set_item ();
14480int
14481main ()
14482{
14483return pam_set_item ();
14484 ;
14485 return 0;
14486}
14487_ACEOF
14488if ac_fn_c_try_link "$LINENO"; then :
14489 ac_cv_lib_pam_pam_set_item=yes
14490else
14491 ac_cv_lib_pam_pam_set_item=no
14492fi
14493rm -f core conftest.err conftest.$ac_objext \
14494 conftest$ac_exeext conftest.$ac_ext
14495LIBS=$ac_check_lib_save_LIBS
14496fi
14497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_set_item" >&5
14498$as_echo "$ac_cv_lib_pam_pam_set_item" >&6; }
14499if test "x$ac_cv_lib_pam_pam_set_item" = xyes; then :
14500 cat >>confdefs.h <<_ACEOF
14501#define HAVE_LIBPAM 1
14502_ACEOF
14503
14504 LIBS="-lpam $LIBS"
14505
14506else
14507 as_fn_error $? "*** libpam missing" "$LINENO" 5
14508fi
14509
14510 for ac_func in pam_getenvlist
14511do :
14512 ac_fn_c_check_func "$LINENO" "pam_getenvlist" "ac_cv_func_pam_getenvlist"
14513if test "x$ac_cv_func_pam_getenvlist" = xyes; then :
14514 cat >>confdefs.h <<_ACEOF
14515#define HAVE_PAM_GETENVLIST 1
14516_ACEOF
14517
14518fi
14519done
14520
14521 for ac_func in pam_putenv
14522do :
14523 ac_fn_c_check_func "$LINENO" "pam_putenv" "ac_cv_func_pam_putenv"
14524if test "x$ac_cv_func_pam_putenv" = xyes; then :
14525 cat >>confdefs.h <<_ACEOF
14526#define HAVE_PAM_PUTENV 1
14527_ACEOF
14528
14529fi
14530done
14531
14532 LIBS="$saved_LIBS"
14533
14534 PAM_MSG="yes"
14535
14536 SSHDLIBS="$SSHDLIBS -lpam"
14537
14538$as_echo "#define USE_PAM 1" >>confdefs.h
14539
14540
14541 if test $ac_cv_lib_dl_dlopen = yes; then
14542 case "$LIBS" in
14543 *-ldl*)
14544 # libdl already in LIBS
14545 ;;
14546 *)
14547 SSHDLIBS="$SSHDLIBS -ldl"
14548 ;;
14549 esac
14550 fi
14551 fi
14552
14553
14554fi
14555
14556
14557
14558# Check whether --with-pam-service was given.
14559if test "${with_pam_service+set}" = set; then :
14560 withval=$with_pam_service;
14561 if test "x$withval" != "xno" && \
14562 test "x$withval" != "xyes" ; then
14563
14564cat >>confdefs.h <<_ACEOF
14565#define SSHD_PAM_SERVICE "$withval"
14566_ACEOF
14567
14568 fi
14569
14570
14571fi
14572
14573
14574# Check for older PAM
14575if test "x$PAM_MSG" = "xyes" ; then
14576 # Check PAM strerror arguments (old PAM)
14577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pam_strerror takes only one argument" >&5
14578$as_echo_n "checking whether pam_strerror takes only one argument... " >&6; }
14579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14580/* end confdefs.h. */
14581
14582#include <stdlib.h>
14583#if defined(HAVE_SECURITY_PAM_APPL_H)
14584#include <security/pam_appl.h>
14585#elif defined (HAVE_PAM_PAM_APPL_H)
14586#include <pam/pam_appl.h>
14587#endif
14588
14589int
14590main ()
14591{
14592
14593(void)pam_strerror((pam_handle_t *)NULL, -1);
14594
14595 ;
14596 return 0;
14597}
14598_ACEOF
14599if ac_fn_c_try_compile "$LINENO"; then :
14600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14601$as_echo "no" >&6; }
14602else
14603
14604
14605$as_echo "#define HAVE_OLD_PAM 1" >>confdefs.h
14606
14607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14608$as_echo "yes" >&6; }
14609 PAM_MSG="yes (old library)"
14610
14611
14612fi
14613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14614fi
14615
14616case "$host" in
14617*-*-cygwin*)
14618 SSH_PRIVSEP_USER=CYGWIN_SSH_PRIVSEP_USER
14619 ;;
14620*)
14621 SSH_PRIVSEP_USER=sshd
14622 ;;
14623esac
14624
14625# Check whether --with-privsep-user was given.
14626if test "${with_privsep_user+set}" = set; then :
14627 withval=$with_privsep_user;
14628 if test -n "$withval" && test "x$withval" != "xno" && \
14629 test "x${withval}" != "xyes"; then
14630 SSH_PRIVSEP_USER=$withval
14631 fi
14632
14633
14634fi
14635
14636if test "x$SSH_PRIVSEP_USER" = "xCYGWIN_SSH_PRIVSEP_USER" ; then
14637
14638cat >>confdefs.h <<_ACEOF
14639#define SSH_PRIVSEP_USER CYGWIN_SSH_PRIVSEP_USER
14640_ACEOF
14641
14642else
14643
14644cat >>confdefs.h <<_ACEOF
14645#define SSH_PRIVSEP_USER "$SSH_PRIVSEP_USER"
14646_ACEOF
14647
14648fi
14649
14650
14651if test "x$have_linux_no_new_privs" = "x1" ; then
14652ac_fn_c_check_decl "$LINENO" "SECCOMP_MODE_FILTER" "ac_cv_have_decl_SECCOMP_MODE_FILTER" "
14653 #include <sys/types.h>
14654 #include <linux/seccomp.h>
14655
14656"
14657if test "x$ac_cv_have_decl_SECCOMP_MODE_FILTER" = xyes; then :
14658 have_seccomp_filter=1
14659fi
14660
14661fi
14662if test "x$have_seccomp_filter" = "x1" ; then
14663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel for seccomp_filter support" >&5
14664$as_echo_n "checking kernel for seccomp_filter support... " >&6; }
14665cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14666/* end confdefs.h. */
14667
14668 #include <errno.h>
14669 #include <elf.h>
14670 #include <linux/audit.h>
14671 #include <linux/seccomp.h>
14672 #include <stdlib.h>
14673 #include <sys/prctl.h>
14674
14675int
14676main ()
14677{
14678 int i = $seccomp_audit_arch;
14679 errno = 0;
14680 prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0);
14681 exit(errno == EFAULT ? 0 : 1);
14682 ;
14683 return 0;
14684}
14685_ACEOF
14686if ac_fn_c_try_link "$LINENO"; then :
14687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14688$as_echo "yes" >&6; }
14689else
14690
14691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14692$as_echo "no" >&6; }
14693 # Disable seccomp filter as a target
14694 have_seccomp_filter=0
14695
14696
14697fi
14698rm -f core conftest.err conftest.$ac_objext \
14699 conftest$ac_exeext conftest.$ac_ext
14700fi
14701
14702# Decide which sandbox style to use
14703sandbox_arg=""
14704
14705# Check whether --with-sandbox was given.
14706if test "${with_sandbox+set}" = set; then :
14707 withval=$with_sandbox;
14708 if test "x$withval" = "xyes" ; then
14709 sandbox_arg=""
14710 else
14711 sandbox_arg="$withval"
14712 fi
14713
14714
14715fi
14716
14717
14718# Some platforms (seems to be the ones that have a kernel poll(2)-type
14719# function with which they implement select(2)) use an extra file descriptor
14720# when calling select(2), which means we can't use the rlimit sandbox.
14721{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if select works with descriptor rlimit" >&5
14722$as_echo_n "checking if select works with descriptor rlimit... " >&6; }
14723if test "$cross_compiling" = yes; then :
14724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
14725$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
14726 select_works_with_rlimit=yes
14727
14728else
14729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14730/* end confdefs.h. */
14731
14732#include <sys/types.h>
14733#ifdef HAVE_SYS_TIME_H
14734# include <sys/time.h>
14735#endif
14736#include <sys/resource.h>
14737#ifdef HAVE_SYS_SELECT_H
14738# include <sys/select.h>
14739#endif
14740#include <errno.h>
14741#include <fcntl.h>
14742#include <stdlib.h>
14743
14744int
14745main ()
14746{
14747
14748 struct rlimit rl_zero;
14749 int fd, r;
14750 fd_set fds;
14751 struct timeval tv;
14752
14753 fd = open("/dev/null", O_RDONLY);
14754 FD_ZERO(&fds);
14755 FD_SET(fd, &fds);
14756 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
14757 setrlimit(RLIMIT_FSIZE, &rl_zero);
14758 setrlimit(RLIMIT_NOFILE, &rl_zero);
14759 tv.tv_sec = 1;
14760 tv.tv_usec = 0;
14761 r = select(fd+1, &fds, NULL, NULL, &tv);
14762 exit (r == -1 ? 1 : 0);
14763
14764 ;
14765 return 0;
14766}
14767_ACEOF
14768if ac_fn_c_try_run "$LINENO"; then :
14769 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14770$as_echo "yes" >&6; }
14771 select_works_with_rlimit=yes
14772else
14773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14774$as_echo "no" >&6; }
14775 select_works_with_rlimit=no
14776fi
14777rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14778 conftest.$ac_objext conftest.beam conftest.$ac_ext
14779fi
14780
14781
14782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if setrlimit(RLIMIT_NOFILE,{0,0}) works" >&5
14783$as_echo_n "checking if setrlimit(RLIMIT_NOFILE,{0,0}) works... " >&6; }
14784if test "$cross_compiling" = yes; then :
14785 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
14786$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
14787 rlimit_nofile_zero_works=yes
14788
14789else
14790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14791/* end confdefs.h. */
14792
14793#include <sys/types.h>
14794#ifdef HAVE_SYS_TIME_H
14795# include <sys/time.h>
14796#endif
14797#include <sys/resource.h>
14798#include <errno.h>
14799#include <stdlib.h>
14800
14801int
14802main ()
14803{
14804
14805 struct rlimit rl_zero;
14806 int r;
14807
14808 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
14809 r = setrlimit(RLIMIT_NOFILE, &rl_zero);
14810 exit (r == -1 ? 1 : 0);
14811
14812 ;
14813 return 0;
14814}
14815_ACEOF
14816if ac_fn_c_try_run "$LINENO"; then :
14817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14818$as_echo "yes" >&6; }
14819 rlimit_nofile_zero_works=yes
14820else
14821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14822$as_echo "no" >&6; }
14823 rlimit_nofile_zero_works=no
14824fi
14825rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14826 conftest.$ac_objext conftest.beam conftest.$ac_ext
14827fi
14828
14829
14830{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if setrlimit RLIMIT_FSIZE works" >&5
14831$as_echo_n "checking if setrlimit RLIMIT_FSIZE works... " >&6; }
14832if test "$cross_compiling" = yes; then :
14833 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
14834$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
14835
14836else
14837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14838/* end confdefs.h. */
14839
14840#include <sys/types.h>
14841#include <sys/resource.h>
14842#include <stdlib.h>
14843
14844int
14845main ()
14846{
14847
14848 struct rlimit rl_zero;
14849
14850 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
14851 exit(setrlimit(RLIMIT_FSIZE, &rl_zero) != 0);
14852
14853 ;
14854 return 0;
14855}
14856_ACEOF
14857if ac_fn_c_try_run "$LINENO"; then :
14858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14859$as_echo "yes" >&6; }
14860else
14861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14862$as_echo "no" >&6; }
14863
14864$as_echo "#define SANDBOX_SKIP_RLIMIT_FSIZE 1" >>confdefs.h
14865
14866fi
14867rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14868 conftest.$ac_objext conftest.beam conftest.$ac_ext
14869fi
14870
14871
14872if test "x$sandbox_arg" = "xpledge" || \
14873 ( test -z "$sandbox_arg" && test "x$ac_cv_func_pledge" = "xyes" ) ; then
14874 test "x$ac_cv_func_pledge" != "xyes" && \
14875 as_fn_error $? "pledge sandbox requires pledge(2) support" "$LINENO" 5
14876 SANDBOX_STYLE="pledge"
14877
14878$as_echo "#define SANDBOX_PLEDGE 1" >>confdefs.h
14879
14880elif test "x$sandbox_arg" = "xsystrace" || \
14881 ( test -z "$sandbox_arg" && test "x$have_systr_policy_kill" = "x1" ) ; then
14882 test "x$have_systr_policy_kill" != "x1" && \
14883 as_fn_error $? "systrace sandbox requires systrace headers and SYSTR_POLICY_KILL support" "$LINENO" 5
14884 SANDBOX_STYLE="systrace"
14885
14886$as_echo "#define SANDBOX_SYSTRACE 1" >>confdefs.h
14887
14888elif test "x$sandbox_arg" = "xdarwin" || \
14889 ( test -z "$sandbox_arg" && test "x$ac_cv_func_sandbox_init" = "xyes" && \
14890 test "x$ac_cv_header_sandbox_h" = "xyes") ; then
14891 test "x$ac_cv_func_sandbox_init" != "xyes" -o \
14892 "x$ac_cv_header_sandbox_h" != "xyes" && \
14893 as_fn_error $? "Darwin seatbelt sandbox requires sandbox.h and sandbox_init function" "$LINENO" 5
14894 SANDBOX_STYLE="darwin"
14895
14896$as_echo "#define SANDBOX_DARWIN 1" >>confdefs.h
14897
14898elif test "x$sandbox_arg" = "xseccomp_filter" || \
14899 ( test -z "$sandbox_arg" && \
14900 test "x$have_seccomp_filter" = "x1" && \
14901 test "x$ac_cv_header_elf_h" = "xyes" && \
14902 test "x$ac_cv_header_linux_audit_h" = "xyes" && \
14903 test "x$ac_cv_header_linux_filter_h" = "xyes" && \
14904 test "x$seccomp_audit_arch" != "x" && \
14905 test "x$have_linux_no_new_privs" = "x1" && \
14906 test "x$ac_cv_func_prctl" = "xyes" ) ; then
14907 test "x$seccomp_audit_arch" = "x" && \
14908 as_fn_error $? "seccomp_filter sandbox not supported on $host" "$LINENO" 5
14909 test "x$have_linux_no_new_privs" != "x1" && \
14910 as_fn_error $? "seccomp_filter sandbox requires PR_SET_NO_NEW_PRIVS" "$LINENO" 5
14911 test "x$have_seccomp_filter" != "x1" && \
14912 as_fn_error $? "seccomp_filter sandbox requires seccomp headers" "$LINENO" 5
14913 test "x$ac_cv_func_prctl" != "xyes" && \
14914 as_fn_error $? "seccomp_filter sandbox requires prctl function" "$LINENO" 5
14915 SANDBOX_STYLE="seccomp_filter"
14916
14917$as_echo "#define SANDBOX_SECCOMP_FILTER 1" >>confdefs.h
14918
14919elif test "x$sandbox_arg" = "xcapsicum" || \
14920 ( test -z "$sandbox_arg" && \
14921 test "x$ac_cv_header_sys_capsicum_h" = "xyes" && \
14922 test "x$ac_cv_func_cap_rights_limit" = "xyes") ; then
14923 test "x$ac_cv_header_sys_capsicum_h" != "xyes" && \
14924 as_fn_error $? "capsicum sandbox requires sys/capsicum.h header" "$LINENO" 5
14925 test "x$ac_cv_func_cap_rights_limit" != "xyes" && \
14926 as_fn_error $? "capsicum sandbox requires cap_rights_limit function" "$LINENO" 5
14927 SANDBOX_STYLE="capsicum"
14928
14929$as_echo "#define SANDBOX_CAPSICUM 1" >>confdefs.h
14930
14931elif test "x$sandbox_arg" = "xrlimit" || \
14932 ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" && \
14933 test "x$select_works_with_rlimit" = "xyes" && \
14934 test "x$rlimit_nofile_zero_works" = "xyes" ) ; then
14935 test "x$ac_cv_func_setrlimit" != "xyes" && \
14936 as_fn_error $? "rlimit sandbox requires setrlimit function" "$LINENO" 5
14937 test "x$select_works_with_rlimit" != "xyes" && \
14938 as_fn_error $? "rlimit sandbox requires select to work with rlimit" "$LINENO" 5
14939 SANDBOX_STYLE="rlimit"
14940
14941$as_echo "#define SANDBOX_RLIMIT 1" >>confdefs.h
14942
14943elif test "x$sandbox_arg" = "xsolaris" || \
14944 ( test -z "$sandbox_arg" && test "x$SOLARIS_PRIVS" = "xyes" ) ; then
14945 SANDBOX_STYLE="solaris"
14946
14947$as_echo "#define SANDBOX_SOLARIS 1" >>confdefs.h
14948
14949elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \
14950 test "x$sandbox_arg" = "xnone" || test "x$sandbox_arg" = "xnull" ; then
14951 SANDBOX_STYLE="none"
14952
14953$as_echo "#define SANDBOX_NULL 1" >>confdefs.h
14954
14955else
14956 as_fn_error $? "unsupported --with-sandbox" "$LINENO" 5
14957fi
14958
14959# Cheap hack to ensure NEWS-OS libraries are arranged right.
14960if test ! -z "$SONY" ; then
14961 LIBS="$LIBS -liberty";
14962fi
14963
14964# Check for long long datatypes
14965ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
14966if test "x$ac_cv_type_long_long" = xyes; then :
14967
14968cat >>confdefs.h <<_ACEOF
14969#define HAVE_LONG_LONG 1
14970_ACEOF
14971
14972
14973fi
14974ac_fn_c_check_type "$LINENO" "unsigned long long" "ac_cv_type_unsigned_long_long" "$ac_includes_default"
14975if test "x$ac_cv_type_unsigned_long_long" = xyes; then :
14976
14977cat >>confdefs.h <<_ACEOF
14978#define HAVE_UNSIGNED_LONG_LONG 1
14979_ACEOF
14980
14981
14982fi
14983ac_fn_c_check_type "$LINENO" "long double" "ac_cv_type_long_double" "$ac_includes_default"
14984if test "x$ac_cv_type_long_double" = xyes; then :
14985
14986cat >>confdefs.h <<_ACEOF
14987#define HAVE_LONG_DOUBLE 1
14988_ACEOF
14989
14990
14991fi
14992
14993
14994# Check datatype sizes
14995# The cast to long int works around a bug in the HP C Compiler
14996# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14997# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14998# This bug is HP SR number 8606223364.
14999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short int" >&5
15000$as_echo_n "checking size of short int... " >&6; }
15001if ${ac_cv_sizeof_short_int+:} false; then :
15002 $as_echo_n "(cached) " >&6
15003else
15004 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short int))" "ac_cv_sizeof_short_int" "$ac_includes_default"; then :
15005
15006else
15007 if test "$ac_cv_type_short_int" = yes; then
15008 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15009$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15010as_fn_error 77 "cannot compute sizeof (short int)
15011See \`config.log' for more details" "$LINENO" 5; }
15012 else
15013 ac_cv_sizeof_short_int=0
15014 fi
15015fi
15016
15017fi
15018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short_int" >&5
15019$as_echo "$ac_cv_sizeof_short_int" >&6; }
15020
15021
15022
15023cat >>confdefs.h <<_ACEOF
15024#define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
15025_ACEOF
15026
15027
15028# The cast to long int works around a bug in the HP C Compiler
15029# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15030# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15031# This bug is HP SR number 8606223364.
15032{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
15033$as_echo_n "checking size of int... " >&6; }
15034if ${ac_cv_sizeof_int+:} false; then :
15035 $as_echo_n "(cached) " >&6
15036else
15037 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
15038
15039else
15040 if test "$ac_cv_type_int" = yes; then
15041 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15042$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15043as_fn_error 77 "cannot compute sizeof (int)
15044See \`config.log' for more details" "$LINENO" 5; }
15045 else
15046 ac_cv_sizeof_int=0
15047 fi
15048fi
15049
15050fi
15051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
15052$as_echo "$ac_cv_sizeof_int" >&6; }
15053
15054
15055
15056cat >>confdefs.h <<_ACEOF
15057#define SIZEOF_INT $ac_cv_sizeof_int
15058_ACEOF
15059
15060
15061# The cast to long int works around a bug in the HP C Compiler
15062# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15063# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15064# This bug is HP SR number 8606223364.
15065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5
15066$as_echo_n "checking size of long int... " >&6; }
15067if ${ac_cv_sizeof_long_int+:} false; then :
15068 $as_echo_n "(cached) " >&6
15069else
15070 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default"; then :
15071
15072else
15073 if test "$ac_cv_type_long_int" = yes; then
15074 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15075$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15076as_fn_error 77 "cannot compute sizeof (long int)
15077See \`config.log' for more details" "$LINENO" 5; }
15078 else
15079 ac_cv_sizeof_long_int=0
15080 fi
15081fi
15082
15083fi
15084{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_int" >&5
15085$as_echo "$ac_cv_sizeof_long_int" >&6; }
15086
15087
15088
15089cat >>confdefs.h <<_ACEOF
15090#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
15091_ACEOF
15092
15093
15094# The cast to long int works around a bug in the HP C Compiler
15095# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
15096# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
15097# This bug is HP SR number 8606223364.
15098{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5
15099$as_echo_n "checking size of long long int... " >&6; }
15100if ${ac_cv_sizeof_long_long_int+:} false; then :
15101 $as_echo_n "(cached) " >&6
15102else
15103 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then :
15104
15105else
15106 if test "$ac_cv_type_long_long_int" = yes; then
15107 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
15108$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
15109as_fn_error 77 "cannot compute sizeof (long long int)
15110See \`config.log' for more details" "$LINENO" 5; }
15111 else
15112 ac_cv_sizeof_long_long_int=0
15113 fi
15114fi
15115
15116fi
15117{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long_int" >&5
15118$as_echo "$ac_cv_sizeof_long_long_int" >&6; }
15119
15120
15121
15122cat >>confdefs.h <<_ACEOF
15123#define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
15124_ACEOF
15125
15126
15127
15128# Sanity check long long for some platforms (AIX)
15129if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
15130 ac_cv_sizeof_long_long_int=0
15131fi
15132
15133# compute LLONG_MIN and LLONG_MAX if we don't know them.
15134if test -z "$have_llong_max" && test -z "$have_long_long_max"; then
15135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for max value of long long" >&5
15136$as_echo_n "checking for max value of long long... " >&6; }
15137 if test "$cross_compiling" = yes; then :
15138
15139 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
15140$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
15141
15142
15143else
15144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15145/* end confdefs.h. */
15146
15147#include <stdio.h>
15148/* Why is this so damn hard? */
15149#ifdef __GNUC__
15150# undef __GNUC__
15151#endif
15152#define __USE_ISOC99
15153#include <limits.h>
15154#define DATA "conftest.llminmax"
15155#define my_abs(a) ((a) < 0 ? ((a) * -1) : (a))
15156
15157/*
15158 * printf in libc on some platforms (eg old Tru64) does not understand %lld so
15159 * we do this the hard way.
15160 */
15161static int
15162fprint_ll(FILE *f, long long n)
15163{
15164 unsigned int i;
15165 int l[sizeof(long long) * 8];
15166
15167 if (n < 0)
15168 if (fprintf(f, "-") < 0)
15169 return -1;
15170 for (i = 0; n != 0; i++) {
15171 l[i] = my_abs(n % 10);
15172 n /= 10;
15173 }
15174 do {
15175 if (fprintf(f, "%d", l[--i]) < 0)
15176 return -1;
15177 } while (i != 0);
15178 if (fprintf(f, " ") < 0)
15179 return -1;
15180 return 0;
15181}
15182
15183int
15184main ()
15185{
15186
15187 FILE *f;
15188 long long i, llmin, llmax = 0;
15189
15190 if((f = fopen(DATA,"w")) == NULL)
15191 exit(1);
15192
15193#if defined(LLONG_MIN) && defined(LLONG_MAX)
15194 fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n");
15195 llmin = LLONG_MIN;
15196 llmax = LLONG_MAX;
15197#else
15198 fprintf(stderr, "Calculating LLONG_MIN and LLONG_MAX\n");
15199 /* This will work on one's complement and two's complement */
15200 for (i = 1; i > llmax; i <<= 1, i++)
15201 llmax = i;
15202 llmin = llmax + 1LL; /* wrap */
15203#endif
15204
15205 /* Sanity check */
15206 if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
15207 || llmax - 1 > llmax || llmin == llmax || llmin == 0
15208 || llmax == 0 || llmax < LONG_MAX || llmin > LONG_MIN) {
15209 fprintf(f, "unknown unknown\n");
15210 exit(2);
15211 }
15212
15213 if (fprint_ll(f, llmin) < 0)
15214 exit(3);
15215 if (fprint_ll(f, llmax) < 0)
15216 exit(4);
15217 if (fclose(f) < 0)
15218 exit(5);
15219 exit(0);
15220
15221 ;
15222 return 0;
15223}
15224_ACEOF
15225if ac_fn_c_try_run "$LINENO"; then :
15226
15227 llong_min=`$AWK '{print $1}' conftest.llminmax`
15228 llong_max=`$AWK '{print $2}' conftest.llminmax`
15229
15230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_max" >&5
15231$as_echo "$llong_max" >&6; }
15232
15233cat >>confdefs.h <<_ACEOF
15234#define LLONG_MAX ${llong_max}LL
15235_ACEOF
15236
15237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for min value of long long" >&5
15238$as_echo_n "checking for min value of long long... " >&6; }
15239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_min" >&5
15240$as_echo "$llong_min" >&6; }
15241
15242cat >>confdefs.h <<_ACEOF
15243#define LLONG_MIN ${llong_min}LL
15244_ACEOF
15245
15246
15247else
15248
15249 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15250$as_echo "not found" >&6; }
15251
15252fi
15253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15254 conftest.$ac_objext conftest.beam conftest.$ac_ext
15255fi
15256
15257fi
15258
15259ac_fn_c_check_decl "$LINENO" "UINT32_MAX" "ac_cv_have_decl_UINT32_MAX" "
15260#ifdef HAVE_SYS_LIMITS_H
15261# include <sys/limits.h>
15262#endif
15263#ifdef HAVE_LIMITS_H
15264# include <limits.h>
15265#endif
15266#ifdef HAVE_STDINT_H
15267# include <stdint.h>
15268#endif
15269
15270"
15271if test "x$ac_cv_have_decl_UINT32_MAX" = xyes; then :
15272 ac_have_decl=1
15273else
15274 ac_have_decl=0
15275fi
15276
15277cat >>confdefs.h <<_ACEOF
15278#define HAVE_DECL_UINT32_MAX $ac_have_decl
15279_ACEOF
15280
15281
15282# More checks for data types
15283{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int type" >&5
15284$as_echo_n "checking for u_int type... " >&6; }
15285if ${ac_cv_have_u_int+:} false; then :
15286 $as_echo_n "(cached) " >&6
15287else
15288
15289 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15290/* end confdefs.h. */
15291 #include <sys/types.h>
15292int
15293main ()
15294{
15295 u_int a; a = 1;
15296 ;
15297 return 0;
15298}
15299_ACEOF
15300if ac_fn_c_try_compile "$LINENO"; then :
15301 ac_cv_have_u_int="yes"
15302else
15303 ac_cv_have_u_int="no"
15304
15305fi
15306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15307
15308fi
15309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int" >&5
15310$as_echo "$ac_cv_have_u_int" >&6; }
15311if test "x$ac_cv_have_u_int" = "xyes" ; then
15312
15313$as_echo "#define HAVE_U_INT 1" >>confdefs.h
15314
15315 have_u_int=1
15316fi
15317
15318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types" >&5
15319$as_echo_n "checking for intXX_t types... " >&6; }
15320if ${ac_cv_have_intxx_t+:} false; then :
15321 $as_echo_n "(cached) " >&6
15322else
15323
15324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15325/* end confdefs.h. */
15326 #include <sys/types.h>
15327int
15328main ()
15329{
15330 int8_t a; int16_t b; int32_t c; a = b = c = 1;
15331 ;
15332 return 0;
15333}
15334_ACEOF
15335if ac_fn_c_try_compile "$LINENO"; then :
15336 ac_cv_have_intxx_t="yes"
15337else
15338 ac_cv_have_intxx_t="no"
15339
15340fi
15341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15342
15343fi
15344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_intxx_t" >&5
15345$as_echo "$ac_cv_have_intxx_t" >&6; }
15346if test "x$ac_cv_have_intxx_t" = "xyes" ; then
15347
15348$as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
15349
15350 have_intxx_t=1
15351fi
15352
15353if (test -z "$have_intxx_t" && \
15354 test "x$ac_cv_header_stdint_h" = "xyes")
15355then
15356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types in stdint.h" >&5
15357$as_echo_n "checking for intXX_t types in stdint.h... " >&6; }
15358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15359/* end confdefs.h. */
15360 #include <stdint.h>
15361int
15362main ()
15363{
15364 int8_t a; int16_t b; int32_t c; a = b = c = 1;
15365 ;
15366 return 0;
15367}
15368_ACEOF
15369if ac_fn_c_try_compile "$LINENO"; then :
15370
15371 $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
15372
15373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15374$as_echo "yes" >&6; }
15375
15376else
15377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15378$as_echo "no" >&6; }
15379
15380fi
15381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15382fi
15383
15384{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int64_t type" >&5
15385$as_echo_n "checking for int64_t type... " >&6; }
15386if ${ac_cv_have_int64_t+:} false; then :
15387 $as_echo_n "(cached) " >&6
15388else
15389
15390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15391/* end confdefs.h. */
15392
15393#include <sys/types.h>
15394#ifdef HAVE_STDINT_H
15395# include <stdint.h>
15396#endif
15397#include <sys/socket.h>
15398#ifdef HAVE_SYS_BITYPES_H
15399# include <sys/bitypes.h>
15400#endif
15401
15402int
15403main ()
15404{
15405
15406int64_t a; a = 1;
15407
15408 ;
15409 return 0;
15410}
15411_ACEOF
15412if ac_fn_c_try_compile "$LINENO"; then :
15413 ac_cv_have_int64_t="yes"
15414else
15415 ac_cv_have_int64_t="no"
15416
15417fi
15418rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15419
15420fi
15421{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_int64_t" >&5
15422$as_echo "$ac_cv_have_int64_t" >&6; }
15423if test "x$ac_cv_have_int64_t" = "xyes" ; then
15424
15425$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
15426
15427fi
15428
15429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types" >&5
15430$as_echo_n "checking for u_intXX_t types... " >&6; }
15431if ${ac_cv_have_u_intxx_t+:} false; then :
15432 $as_echo_n "(cached) " >&6
15433else
15434
15435 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15436/* end confdefs.h. */
15437 #include <sys/types.h>
15438int
15439main ()
15440{
15441 u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
15442 ;
15443 return 0;
15444}
15445_ACEOF
15446if ac_fn_c_try_compile "$LINENO"; then :
15447 ac_cv_have_u_intxx_t="yes"
15448else
15449 ac_cv_have_u_intxx_t="no"
15450
15451fi
15452rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15453
15454fi
15455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_intxx_t" >&5
15456$as_echo "$ac_cv_have_u_intxx_t" >&6; }
15457if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
15458
15459$as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
15460
15461 have_u_intxx_t=1
15462fi
15463
15464if test -z "$have_u_intxx_t" ; then
15465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types in sys/socket.h" >&5
15466$as_echo_n "checking for u_intXX_t types in sys/socket.h... " >&6; }
15467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15468/* end confdefs.h. */
15469 #include <sys/socket.h>
15470int
15471main ()
15472{
15473 u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
15474 ;
15475 return 0;
15476}
15477_ACEOF
15478if ac_fn_c_try_compile "$LINENO"; then :
15479
15480 $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
15481
15482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15483$as_echo "yes" >&6; }
15484
15485else
15486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15487$as_echo "no" >&6; }
15488
15489fi
15490rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15491fi
15492
15493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t types" >&5
15494$as_echo_n "checking for u_int64_t types... " >&6; }
15495if ${ac_cv_have_u_int64_t+:} false; then :
15496 $as_echo_n "(cached) " >&6
15497else
15498
15499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15500/* end confdefs.h. */
15501 #include <sys/types.h>
15502int
15503main ()
15504{
15505 u_int64_t a; a = 1;
15506 ;
15507 return 0;
15508}
15509_ACEOF
15510if ac_fn_c_try_compile "$LINENO"; then :
15511 ac_cv_have_u_int64_t="yes"
15512else
15513 ac_cv_have_u_int64_t="no"
15514
15515fi
15516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15517
15518fi
15519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int64_t" >&5
15520$as_echo "$ac_cv_have_u_int64_t" >&6; }
15521if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
15522
15523$as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
15524
15525 have_u_int64_t=1
15526fi
15527
15528if (test -z "$have_u_int64_t" && \
15529 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
15530then
15531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t type in sys/bitypes.h" >&5
15532$as_echo_n "checking for u_int64_t type in sys/bitypes.h... " >&6; }
15533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15534/* end confdefs.h. */
15535 #include <sys/bitypes.h>
15536int
15537main ()
15538{
15539 u_int64_t a; a = 1
15540 ;
15541 return 0;
15542}
15543_ACEOF
15544if ac_fn_c_try_compile "$LINENO"; then :
15545
15546 $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
15547
15548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15549$as_echo "yes" >&6; }
15550
15551else
15552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15553$as_echo "no" >&6; }
15554
15555fi
15556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15557fi
15558
15559if test -z "$have_u_intxx_t" ; then
15560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types" >&5
15561$as_echo_n "checking for uintXX_t types... " >&6; }
15562if ${ac_cv_have_uintxx_t+:} false; then :
15563 $as_echo_n "(cached) " >&6
15564else
15565
15566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15567/* end confdefs.h. */
15568
15569#include <sys/types.h>
15570
15571int
15572main ()
15573{
15574
15575 uint8_t a;
15576 uint16_t b;
15577 uint32_t c;
15578 a = b = c = 1;
15579
15580 ;
15581 return 0;
15582}
15583_ACEOF
15584if ac_fn_c_try_compile "$LINENO"; then :
15585 ac_cv_have_uintxx_t="yes"
15586else
15587 ac_cv_have_uintxx_t="no"
15588
15589fi
15590rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15591
15592fi
15593{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_uintxx_t" >&5
15594$as_echo "$ac_cv_have_uintxx_t" >&6; }
15595 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
15596
15597$as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
15598
15599 fi
15600fi
15601
15602if (test -z "$have_uintxx_t" && \
15603 test "x$ac_cv_header_stdint_h" = "xyes")
15604then
15605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in stdint.h" >&5
15606$as_echo_n "checking for uintXX_t types in stdint.h... " >&6; }
15607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15608/* end confdefs.h. */
15609 #include <stdint.h>
15610int
15611main ()
15612{
15613 uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
15614 ;
15615 return 0;
15616}
15617_ACEOF
15618if ac_fn_c_try_compile "$LINENO"; then :
15619
15620 $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
15621
15622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15623$as_echo "yes" >&6; }
15624
15625else
15626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15627$as_echo "no" >&6; }
15628
15629fi
15630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15631fi
15632
15633if (test -z "$have_uintxx_t" && \
15634 test "x$ac_cv_header_inttypes_h" = "xyes")
15635then
15636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in inttypes.h" >&5
15637$as_echo_n "checking for uintXX_t types in inttypes.h... " >&6; }
15638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15639/* end confdefs.h. */
15640 #include <inttypes.h>
15641int
15642main ()
15643{
15644 uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
15645 ;
15646 return 0;
15647}
15648_ACEOF
15649if ac_fn_c_try_compile "$LINENO"; then :
15650
15651 $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
15652
15653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15654$as_echo "yes" >&6; }
15655
15656else
15657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15658$as_echo "no" >&6; }
15659
15660fi
15661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15662fi
15663
15664if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
15665 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
15666then
15667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
15668$as_echo_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h... " >&6; }
15669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15670/* end confdefs.h. */
15671
15672#include <sys/bitypes.h>
15673
15674int
15675main ()
15676{
15677
15678 int8_t a; int16_t b; int32_t c;
15679 u_int8_t e; u_int16_t f; u_int32_t g;
15680 a = b = c = e = f = g = 1;
15681
15682 ;
15683 return 0;
15684}
15685_ACEOF
15686if ac_fn_c_try_compile "$LINENO"; then :
15687
15688 $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
15689
15690 $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
15691
15692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15693$as_echo "yes" >&6; }
15694
15695else
15696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15697$as_echo "no" >&6; }
15698
15699fi
15700rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15701fi
15702
15703
15704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_char" >&5
15705$as_echo_n "checking for u_char... " >&6; }
15706if ${ac_cv_have_u_char+:} false; then :
15707 $as_echo_n "(cached) " >&6
15708else
15709
15710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15711/* end confdefs.h. */
15712 #include <sys/types.h>
15713int
15714main ()
15715{
15716 u_char foo; foo = 125;
15717 ;
15718 return 0;
15719}
15720_ACEOF
15721if ac_fn_c_try_compile "$LINENO"; then :
15722 ac_cv_have_u_char="yes"
15723else
15724 ac_cv_have_u_char="no"
15725
15726fi
15727rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15728
15729fi
15730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_char" >&5
15731$as_echo "$ac_cv_have_u_char" >&6; }
15732if test "x$ac_cv_have_u_char" = "xyes" ; then
15733
15734$as_echo "#define HAVE_U_CHAR 1" >>confdefs.h
15735
15736fi
15737
15738ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "
15739#include <sys/types.h>
15740#ifdef HAVE_STDINT_H
15741# include <stdint.h>
15742#endif
15743
15744"
15745if test "x$ac_cv_type_intmax_t" = xyes; then :
15746
15747cat >>confdefs.h <<_ACEOF
15748#define HAVE_INTMAX_T 1
15749_ACEOF
15750
15751
15752fi
15753ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "
15754#include <sys/types.h>
15755#ifdef HAVE_STDINT_H
15756# include <stdint.h>
15757#endif
15758
15759"
15760if test "x$ac_cv_type_uintmax_t" = xyes; then :
15761
15762cat >>confdefs.h <<_ACEOF
15763#define HAVE_UINTMAX_T 1
15764_ACEOF
15765
15766
15767fi
15768
15769
15770
15771 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
15772#include <sys/socket.h>
15773"
15774if test "x$ac_cv_type_socklen_t" = xyes; then :
15775
15776else
15777
15778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
15779$as_echo_n "checking for socklen_t equivalent... " >&6; }
15780 if ${curl_cv_socklen_t_equiv+:} false; then :
15781 $as_echo_n "(cached) " >&6
15782else
15783
15784 # Systems have either "struct sockaddr *" or
15785 # "void *" as the second argument to getpeername
15786 curl_cv_socklen_t_equiv=
15787 for arg2 in "struct sockaddr" void; do
15788 for t in int size_t unsigned long "unsigned long"; do
15789 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15790/* end confdefs.h. */
15791
15792 #include <sys/types.h>
15793 #include <sys/socket.h>
15794
15795 int getpeername (int, $arg2 *, $t *);
15796
15797int
15798main ()
15799{
15800
15801 $t len;
15802 getpeername(0,0,&len);
15803
15804 ;
15805 return 0;
15806}
15807_ACEOF
15808if ac_fn_c_try_compile "$LINENO"; then :
15809
15810 curl_cv_socklen_t_equiv="$t"
15811 break
15812
15813fi
15814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15815 done
15816 done
15817
15818 if test "x$curl_cv_socklen_t_equiv" = x; then
15819 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
15820 fi
15821
15822fi
15823
15824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_socklen_t_equiv" >&5
15825$as_echo "$curl_cv_socklen_t_equiv" >&6; }
15826
15827cat >>confdefs.h <<_ACEOF
15828#define socklen_t $curl_cv_socklen_t_equiv
15829_ACEOF
15830
15831fi
15832
15833
15834
15835ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
15836"
15837if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
15838
15839cat >>confdefs.h <<_ACEOF
15840#define HAVE_SIG_ATOMIC_T 1
15841_ACEOF
15842
15843
15844fi
15845
15846ac_fn_c_check_type "$LINENO" "fsblkcnt_t" "ac_cv_type_fsblkcnt_t" "
15847#include <sys/types.h>
15848#ifdef HAVE_SYS_BITYPES_H
15849#include <sys/bitypes.h>
15850#endif
15851#ifdef HAVE_SYS_STATFS_H
15852#include <sys/statfs.h>
15853#endif
15854#ifdef HAVE_SYS_STATVFS_H
15855#include <sys/statvfs.h>
15856#endif
15857
15858"
15859if test "x$ac_cv_type_fsblkcnt_t" = xyes; then :
15860
15861cat >>confdefs.h <<_ACEOF
15862#define HAVE_FSBLKCNT_T 1
15863_ACEOF
15864
15865
15866fi
15867ac_fn_c_check_type "$LINENO" "fsfilcnt_t" "ac_cv_type_fsfilcnt_t" "
15868#include <sys/types.h>
15869#ifdef HAVE_SYS_BITYPES_H
15870#include <sys/bitypes.h>
15871#endif
15872#ifdef HAVE_SYS_STATFS_H
15873#include <sys/statfs.h>
15874#endif
15875#ifdef HAVE_SYS_STATVFS_H
15876#include <sys/statvfs.h>
15877#endif
15878
15879"
15880if test "x$ac_cv_type_fsfilcnt_t" = xyes; then :
15881
15882cat >>confdefs.h <<_ACEOF
15883#define HAVE_FSFILCNT_T 1
15884_ACEOF
15885
15886
15887fi
15888
15889
15890ac_fn_c_check_member "$LINENO" "struct statfs" "f_files" "ac_cv_member_struct_statfs_f_files" "
15891#include <sys/param.h>
15892#include <sys/types.h>
15893#ifdef HAVE_SYS_BITYPES_H
15894#include <sys/bitypes.h>
15895#endif
15896#ifdef HAVE_SYS_STATFS_H
15897#include <sys/statfs.h>
15898#endif
15899#ifdef HAVE_SYS_STATVFS_H
15900#include <sys/statvfs.h>
15901#endif
15902#ifdef HAVE_SYS_VFS_H
15903#include <sys/vfs.h>
15904#endif
15905#ifdef HAVE_SYS_MOUNT_H
15906#include <sys/mount.h>
15907#endif
15908
15909"
15910if test "x$ac_cv_member_struct_statfs_f_files" = xyes; then :
15911
15912cat >>confdefs.h <<_ACEOF
15913#define HAVE_STRUCT_STATFS_F_FILES 1
15914_ACEOF
15915
15916
15917fi
15918ac_fn_c_check_member "$LINENO" "struct statfs" "f_flags" "ac_cv_member_struct_statfs_f_flags" "
15919#include <sys/param.h>
15920#include <sys/types.h>
15921#ifdef HAVE_SYS_BITYPES_H
15922#include <sys/bitypes.h>
15923#endif
15924#ifdef HAVE_SYS_STATFS_H
15925#include <sys/statfs.h>
15926#endif
15927#ifdef HAVE_SYS_STATVFS_H
15928#include <sys/statvfs.h>
15929#endif
15930#ifdef HAVE_SYS_VFS_H
15931#include <sys/vfs.h>
15932#endif
15933#ifdef HAVE_SYS_MOUNT_H
15934#include <sys/mount.h>
15935#endif
15936
15937"
15938if test "x$ac_cv_member_struct_statfs_f_flags" = xyes; then :
15939
15940cat >>confdefs.h <<_ACEOF
15941#define HAVE_STRUCT_STATFS_F_FLAGS 1
15942_ACEOF
15943
15944
15945fi
15946
15947
15948
15949ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "#include <sys/types.h>
15950#include <netinet/in.h>
15951"
15952if test "x$ac_cv_type_in_addr_t" = xyes; then :
15953
15954cat >>confdefs.h <<_ACEOF
15955#define HAVE_IN_ADDR_T 1
15956_ACEOF
15957
15958
15959fi
15960ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "#include <sys/types.h>
15961#include <netinet/in.h>
15962"
15963if test "x$ac_cv_type_in_port_t" = xyes; then :
15964
15965cat >>confdefs.h <<_ACEOF
15966#define HAVE_IN_PORT_T 1
15967_ACEOF
15968
15969
15970fi
15971
15972
15973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size_t" >&5
15974$as_echo_n "checking for size_t... " >&6; }
15975if ${ac_cv_have_size_t+:} false; then :
15976 $as_echo_n "(cached) " >&6
15977else
15978
15979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15980/* end confdefs.h. */
15981 #include <sys/types.h>
15982int
15983main ()
15984{
15985 size_t foo; foo = 1235;
15986 ;
15987 return 0;
15988}
15989_ACEOF
15990if ac_fn_c_try_compile "$LINENO"; then :
15991 ac_cv_have_size_t="yes"
15992else
15993 ac_cv_have_size_t="no"
15994
15995fi
15996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15997
15998fi
15999{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t" >&5
16000$as_echo "$ac_cv_have_size_t" >&6; }
16001if test "x$ac_cv_have_size_t" = "xyes" ; then
16002
16003$as_echo "#define HAVE_SIZE_T 1" >>confdefs.h
16004
16005fi
16006
16007{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
16008$as_echo_n "checking for ssize_t... " >&6; }
16009if ${ac_cv_have_ssize_t+:} false; then :
16010 $as_echo_n "(cached) " >&6
16011else
16012
16013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16014/* end confdefs.h. */
16015 #include <sys/types.h>
16016int
16017main ()
16018{
16019 ssize_t foo; foo = 1235;
16020 ;
16021 return 0;
16022}
16023_ACEOF
16024if ac_fn_c_try_compile "$LINENO"; then :
16025 ac_cv_have_ssize_t="yes"
16026else
16027 ac_cv_have_ssize_t="no"
16028
16029fi
16030rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16031
16032fi
16033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ssize_t" >&5
16034$as_echo "$ac_cv_have_ssize_t" >&6; }
16035if test "x$ac_cv_have_ssize_t" = "xyes" ; then
16036
16037$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
16038
16039fi
16040
16041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
16042$as_echo_n "checking for clock_t... " >&6; }
16043if ${ac_cv_have_clock_t+:} false; then :
16044 $as_echo_n "(cached) " >&6
16045else
16046
16047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16048/* end confdefs.h. */
16049 #include <time.h>
16050int
16051main ()
16052{
16053 clock_t foo; foo = 1235;
16054 ;
16055 return 0;
16056}
16057_ACEOF
16058if ac_fn_c_try_compile "$LINENO"; then :
16059 ac_cv_have_clock_t="yes"
16060else
16061 ac_cv_have_clock_t="no"
16062
16063fi
16064rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16065
16066fi
16067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_clock_t" >&5
16068$as_echo "$ac_cv_have_clock_t" >&6; }
16069if test "x$ac_cv_have_clock_t" = "xyes" ; then
16070
16071$as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h
16072
16073fi
16074
16075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_family_t" >&5
16076$as_echo_n "checking for sa_family_t... " >&6; }
16077if ${ac_cv_have_sa_family_t+:} false; then :
16078 $as_echo_n "(cached) " >&6
16079else
16080
16081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16082/* end confdefs.h. */
16083
16084#include <sys/types.h>
16085#include <sys/socket.h>
16086
16087int
16088main ()
16089{
16090 sa_family_t foo; foo = 1235;
16091 ;
16092 return 0;
16093}
16094_ACEOF
16095if ac_fn_c_try_compile "$LINENO"; then :
16096 ac_cv_have_sa_family_t="yes"
16097else
16098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16099/* end confdefs.h. */
16100
16101#include <sys/types.h>
16102#include <sys/socket.h>
16103#include <netinet/in.h>
16104
16105int
16106main ()
16107{
16108 sa_family_t foo; foo = 1235;
16109 ;
16110 return 0;
16111}
16112_ACEOF
16113if ac_fn_c_try_compile "$LINENO"; then :
16114 ac_cv_have_sa_family_t="yes"
16115else
16116 ac_cv_have_sa_family_t="no"
16117
16118fi
16119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16120
16121fi
16122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16123
16124fi
16125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sa_family_t" >&5
16126$as_echo "$ac_cv_have_sa_family_t" >&6; }
16127if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
16128
16129$as_echo "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
16130
16131fi
16132
16133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pid_t" >&5
16134$as_echo_n "checking for pid_t... " >&6; }
16135if ${ac_cv_have_pid_t+:} false; then :
16136 $as_echo_n "(cached) " >&6
16137else
16138
16139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16140/* end confdefs.h. */
16141 #include <sys/types.h>
16142int
16143main ()
16144{
16145 pid_t foo; foo = 1235;
16146 ;
16147 return 0;
16148}
16149_ACEOF
16150if ac_fn_c_try_compile "$LINENO"; then :
16151 ac_cv_have_pid_t="yes"
16152else
16153 ac_cv_have_pid_t="no"
16154
16155fi
16156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16157
16158fi
16159{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pid_t" >&5
16160$as_echo "$ac_cv_have_pid_t" >&6; }
16161if test "x$ac_cv_have_pid_t" = "xyes" ; then
16162
16163$as_echo "#define HAVE_PID_T 1" >>confdefs.h
16164
16165fi
16166
16167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mode_t" >&5
16168$as_echo_n "checking for mode_t... " >&6; }
16169if ${ac_cv_have_mode_t+:} false; then :
16170 $as_echo_n "(cached) " >&6
16171else
16172
16173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16174/* end confdefs.h. */
16175 #include <sys/types.h>
16176int
16177main ()
16178{
16179 mode_t foo; foo = 1235;
16180 ;
16181 return 0;
16182}
16183_ACEOF
16184if ac_fn_c_try_compile "$LINENO"; then :
16185 ac_cv_have_mode_t="yes"
16186else
16187 ac_cv_have_mode_t="no"
16188
16189fi
16190rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16191
16192fi
16193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_mode_t" >&5
16194$as_echo "$ac_cv_have_mode_t" >&6; }
16195if test "x$ac_cv_have_mode_t" = "xyes" ; then
16196
16197$as_echo "#define HAVE_MODE_T 1" >>confdefs.h
16198
16199fi
16200
16201
16202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
16203$as_echo_n "checking for struct sockaddr_storage... " >&6; }
16204if ${ac_cv_have_struct_sockaddr_storage+:} false; then :
16205 $as_echo_n "(cached) " >&6
16206else
16207
16208 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16209/* end confdefs.h. */
16210
16211#include <sys/types.h>
16212#include <sys/socket.h>
16213
16214int
16215main ()
16216{
16217 struct sockaddr_storage s;
16218 ;
16219 return 0;
16220}
16221_ACEOF
16222if ac_fn_c_try_compile "$LINENO"; then :
16223 ac_cv_have_struct_sockaddr_storage="yes"
16224else
16225 ac_cv_have_struct_sockaddr_storage="no"
16226
16227fi
16228rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16229
16230fi
16231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_storage" >&5
16232$as_echo "$ac_cv_have_struct_sockaddr_storage" >&6; }
16233if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
16234
16235$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
16236
16237fi
16238
16239{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6" >&5
16240$as_echo_n "checking for struct sockaddr_in6... " >&6; }
16241if ${ac_cv_have_struct_sockaddr_in6+:} false; then :
16242 $as_echo_n "(cached) " >&6
16243else
16244
16245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16246/* end confdefs.h. */
16247
16248#include <sys/types.h>
16249#include <netinet/in.h>
16250
16251int
16252main ()
16253{
16254 struct sockaddr_in6 s; s.sin6_family = 0;
16255 ;
16256 return 0;
16257}
16258_ACEOF
16259if ac_fn_c_try_compile "$LINENO"; then :
16260 ac_cv_have_struct_sockaddr_in6="yes"
16261else
16262 ac_cv_have_struct_sockaddr_in6="no"
16263
16264fi
16265rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16266
16267fi
16268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_in6" >&5
16269$as_echo "$ac_cv_have_struct_sockaddr_in6" >&6; }
16270if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
16271
16272$as_echo "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h
16273
16274fi
16275
16276{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct in6_addr" >&5
16277$as_echo_n "checking for struct in6_addr... " >&6; }
16278if ${ac_cv_have_struct_in6_addr+:} false; then :
16279 $as_echo_n "(cached) " >&6
16280else
16281
16282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16283/* end confdefs.h. */
16284
16285#include <sys/types.h>
16286#include <netinet/in.h>
16287
16288int
16289main ()
16290{
16291 struct in6_addr s; s.s6_addr[0] = 0;
16292 ;
16293 return 0;
16294}
16295_ACEOF
16296if ac_fn_c_try_compile "$LINENO"; then :
16297 ac_cv_have_struct_in6_addr="yes"
16298else
16299 ac_cv_have_struct_in6_addr="no"
16300
16301fi
16302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16303
16304fi
16305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_in6_addr" >&5
16306$as_echo "$ac_cv_have_struct_in6_addr" >&6; }
16307if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
16308
16309$as_echo "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h
16310
16311
16312 ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "
16313#ifdef HAVE_SYS_TYPES_H
16314#include <sys/types.h>
16315#endif
16316#include <netinet/in.h>
16317
16318"
16319if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes; then :
16320
16321cat >>confdefs.h <<_ACEOF
16322#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
16323_ACEOF
16324
16325
16326fi
16327
16328fi
16329
16330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct addrinfo" >&5
16331$as_echo_n "checking for struct addrinfo... " >&6; }
16332if ${ac_cv_have_struct_addrinfo+:} false; then :
16333 $as_echo_n "(cached) " >&6
16334else
16335
16336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16337/* end confdefs.h. */
16338
16339#include <sys/types.h>
16340#include <sys/socket.h>
16341#include <netdb.h>
16342
16343int
16344main ()
16345{
16346 struct addrinfo s; s.ai_flags = AI_PASSIVE;
16347 ;
16348 return 0;
16349}
16350_ACEOF
16351if ac_fn_c_try_compile "$LINENO"; then :
16352 ac_cv_have_struct_addrinfo="yes"
16353else
16354 ac_cv_have_struct_addrinfo="no"
16355
16356fi
16357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16358
16359fi
16360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_addrinfo" >&5
16361$as_echo "$ac_cv_have_struct_addrinfo" >&6; }
16362if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
16363
16364$as_echo "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
16365
16366fi
16367
16368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
16369$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
16370if ${ac_cv_header_time+:} false; then :
16371 $as_echo_n "(cached) " >&6
16372else
16373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16374/* end confdefs.h. */
16375#include <sys/types.h>
16376#include <sys/time.h>
16377#include <time.h>
16378
16379int
16380main ()
16381{
16382if ((struct tm *) 0)
16383return 0;
16384 ;
16385 return 0;
16386}
16387_ACEOF
16388if ac_fn_c_try_compile "$LINENO"; then :
16389 ac_cv_header_time=yes
16390else
16391 ac_cv_header_time=no
16392fi
16393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16394fi
16395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
16396$as_echo "$ac_cv_header_time" >&6; }
16397if test $ac_cv_header_time = yes; then
16398
16399$as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
16400
16401fi
16402
16403
16404{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
16405$as_echo_n "checking for struct timeval... " >&6; }
16406if ${ac_cv_have_struct_timeval+:} false; then :
16407 $as_echo_n "(cached) " >&6
16408else
16409
16410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16411/* end confdefs.h. */
16412 #include <sys/time.h>
16413int
16414main ()
16415{
16416 struct timeval tv; tv.tv_sec = 1;
16417 ;
16418 return 0;
16419}
16420_ACEOF
16421if ac_fn_c_try_compile "$LINENO"; then :
16422 ac_cv_have_struct_timeval="yes"
16423else
16424 ac_cv_have_struct_timeval="no"
16425
16426fi
16427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16428
16429fi
16430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_timeval" >&5
16431$as_echo "$ac_cv_have_struct_timeval" >&6; }
16432if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
16433
16434$as_echo "#define HAVE_STRUCT_TIMEVAL 1" >>confdefs.h
16435
16436 have_struct_timeval=1
16437fi
16438
16439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec" >&5
16440$as_echo_n "checking for struct timespec... " >&6; }
16441if ${ac_cv_have_struct_timespec+:} false; then :
16442 $as_echo_n "(cached) " >&6
16443else
16444
16445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16446/* end confdefs.h. */
16447
16448 #ifdef TIME_WITH_SYS_TIME
16449 # include <sys/time.h>
16450 # include <time.h>
16451 #else
16452 # ifdef HAVE_SYS_TIME_H
16453 # include <sys/time.h>
16454 # else
16455 # include <time.h>
16456 # endif
16457 #endif
16458
16459int
16460main ()
16461{
16462 struct timespec ts; ts.tv_sec = 1;
16463 ;
16464 return 0;
16465}
16466_ACEOF
16467if ac_fn_c_try_compile "$LINENO"; then :
16468 ac_cv_have_struct_timespec="yes"
16469else
16470 ac_cv_have_struct_timespec="no"
16471
16472fi
16473rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16474
16475fi
16476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_timespec" >&5
16477$as_echo "$ac_cv_have_struct_timespec" >&6; }
16478if test "x$ac_cv_have_struct_timespec" = "xyes" ; then
16479
16480$as_echo "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h
16481
16482 have_struct_timespec=1
16483fi
16484
16485# We need int64_t or else certain parts of the compile will fail.
16486if test "x$ac_cv_have_int64_t" = "xno" && \
16487 test "x$ac_cv_sizeof_long_int" != "x8" && \
16488 test "x$ac_cv_sizeof_long_long_int" = "x0" ; then
16489 echo "OpenSSH requires int64_t support. Contact your vendor or install"
16490 echo "an alternative compiler (I.E., GCC) before continuing."
16491 echo ""
16492 exit 1;
16493else
16494 if test "$cross_compiling" = yes; then :
16495 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
16496$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
16497
16498else
16499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16500/* end confdefs.h. */
16501
16502#include <stdio.h>
16503#include <string.h>
16504#ifdef HAVE_SNPRINTF
16505main()
16506{
16507 char buf[50];
16508 char expected_out[50];
16509 int mazsize = 50 ;
16510#if (SIZEOF_LONG_INT == 8)
16511 long int num = 0x7fffffffffffffff;
16512#else
16513 long long num = 0x7fffffffffffffffll;
16514#endif
16515 strcpy(expected_out, "9223372036854775807");
16516 snprintf(buf, mazsize, "%lld", num);
16517 if(strcmp(buf, expected_out) != 0)
16518 exit(1);
16519 exit(0);
16520}
16521#else
16522main() { exit(0); }
16523#endif
16524
16525_ACEOF
16526if ac_fn_c_try_run "$LINENO"; then :
16527 true
16528else
16529 $as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
16530
16531fi
16532rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16533 conftest.$ac_objext conftest.beam conftest.$ac_ext
16534fi
16535
16536fi
16537
16538
16539# look for field 'ut_host' in header 'utmp.h'
16540 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16541 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
16542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmp.h" >&5
16543$as_echo_n "checking for ut_host field in utmp.h... " >&6; }
16544 if eval \${$ossh_varname+:} false; then :
16545 $as_echo_n "(cached) " >&6
16546else
16547
16548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16549/* end confdefs.h. */
16550#include <utmp.h>
16551
16552_ACEOF
16553if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16554 $EGREP "ut_host" >/dev/null 2>&1; then :
16555 eval "$ossh_varname=yes"
16556else
16557 eval "$ossh_varname=no"
16558fi
16559rm -f conftest*
16560
16561fi
16562
16563 ossh_result=`eval 'echo $'"$ossh_varname"`
16564 if test -n "`echo $ossh_varname`"; then
16565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16566$as_echo "$ossh_result" >&6; }
16567 if test "x$ossh_result" = "xyes"; then
16568
16569$as_echo "#define HAVE_HOST_IN_UTMP 1" >>confdefs.h
16570
16571 fi
16572 else
16573 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16574$as_echo "no" >&6; }
16575 fi
16576
16577
16578# look for field 'ut_host' in header 'utmpx.h'
16579 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16580 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
16581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmpx.h" >&5
16582$as_echo_n "checking for ut_host field in utmpx.h... " >&6; }
16583 if eval \${$ossh_varname+:} false; then :
16584 $as_echo_n "(cached) " >&6
16585else
16586
16587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16588/* end confdefs.h. */
16589#include <utmpx.h>
16590
16591_ACEOF
16592if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16593 $EGREP "ut_host" >/dev/null 2>&1; then :
16594 eval "$ossh_varname=yes"
16595else
16596 eval "$ossh_varname=no"
16597fi
16598rm -f conftest*
16599
16600fi
16601
16602 ossh_result=`eval 'echo $'"$ossh_varname"`
16603 if test -n "`echo $ossh_varname`"; then
16604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16605$as_echo "$ossh_result" >&6; }
16606 if test "x$ossh_result" = "xyes"; then
16607
16608$as_echo "#define HAVE_HOST_IN_UTMPX 1" >>confdefs.h
16609
16610 fi
16611 else
16612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16613$as_echo "no" >&6; }
16614 fi
16615
16616
16617# look for field 'syslen' in header 'utmpx.h'
16618 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16619 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
16620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for syslen field in utmpx.h" >&5
16621$as_echo_n "checking for syslen field in utmpx.h... " >&6; }
16622 if eval \${$ossh_varname+:} false; then :
16623 $as_echo_n "(cached) " >&6
16624else
16625
16626 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16627/* end confdefs.h. */
16628#include <utmpx.h>
16629
16630_ACEOF
16631if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16632 $EGREP "syslen" >/dev/null 2>&1; then :
16633 eval "$ossh_varname=yes"
16634else
16635 eval "$ossh_varname=no"
16636fi
16637rm -f conftest*
16638
16639fi
16640
16641 ossh_result=`eval 'echo $'"$ossh_varname"`
16642 if test -n "`echo $ossh_varname`"; then
16643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16644$as_echo "$ossh_result" >&6; }
16645 if test "x$ossh_result" = "xyes"; then
16646
16647$as_echo "#define HAVE_SYSLEN_IN_UTMPX 1" >>confdefs.h
16648
16649 fi
16650 else
16651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16652$as_echo "no" >&6; }
16653 fi
16654
16655
16656# look for field 'ut_pid' in header 'utmp.h'
16657 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16658 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
16659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_pid field in utmp.h" >&5
16660$as_echo_n "checking for ut_pid field in utmp.h... " >&6; }
16661 if eval \${$ossh_varname+:} false; then :
16662 $as_echo_n "(cached) " >&6
16663else
16664
16665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16666/* end confdefs.h. */
16667#include <utmp.h>
16668
16669_ACEOF
16670if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16671 $EGREP "ut_pid" >/dev/null 2>&1; then :
16672 eval "$ossh_varname=yes"
16673else
16674 eval "$ossh_varname=no"
16675fi
16676rm -f conftest*
16677
16678fi
16679
16680 ossh_result=`eval 'echo $'"$ossh_varname"`
16681 if test -n "`echo $ossh_varname`"; then
16682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16683$as_echo "$ossh_result" >&6; }
16684 if test "x$ossh_result" = "xyes"; then
16685
16686$as_echo "#define HAVE_PID_IN_UTMP 1" >>confdefs.h
16687
16688 fi
16689 else
16690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16691$as_echo "no" >&6; }
16692 fi
16693
16694
16695# look for field 'ut_type' in header 'utmp.h'
16696 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16697 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
16698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmp.h" >&5
16699$as_echo_n "checking for ut_type field in utmp.h... " >&6; }
16700 if eval \${$ossh_varname+:} false; then :
16701 $as_echo_n "(cached) " >&6
16702else
16703
16704 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16705/* end confdefs.h. */
16706#include <utmp.h>
16707
16708_ACEOF
16709if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16710 $EGREP "ut_type" >/dev/null 2>&1; then :
16711 eval "$ossh_varname=yes"
16712else
16713 eval "$ossh_varname=no"
16714fi
16715rm -f conftest*
16716
16717fi
16718
16719 ossh_result=`eval 'echo $'"$ossh_varname"`
16720 if test -n "`echo $ossh_varname`"; then
16721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16722$as_echo "$ossh_result" >&6; }
16723 if test "x$ossh_result" = "xyes"; then
16724
16725$as_echo "#define HAVE_TYPE_IN_UTMP 1" >>confdefs.h
16726
16727 fi
16728 else
16729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16730$as_echo "no" >&6; }
16731 fi
16732
16733
16734# look for field 'ut_type' in header 'utmpx.h'
16735 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16736 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
16737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmpx.h" >&5
16738$as_echo_n "checking for ut_type field in utmpx.h... " >&6; }
16739 if eval \${$ossh_varname+:} false; then :
16740 $as_echo_n "(cached) " >&6
16741else
16742
16743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16744/* end confdefs.h. */
16745#include <utmpx.h>
16746
16747_ACEOF
16748if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16749 $EGREP "ut_type" >/dev/null 2>&1; then :
16750 eval "$ossh_varname=yes"
16751else
16752 eval "$ossh_varname=no"
16753fi
16754rm -f conftest*
16755
16756fi
16757
16758 ossh_result=`eval 'echo $'"$ossh_varname"`
16759 if test -n "`echo $ossh_varname`"; then
16760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16761$as_echo "$ossh_result" >&6; }
16762 if test "x$ossh_result" = "xyes"; then
16763
16764$as_echo "#define HAVE_TYPE_IN_UTMPX 1" >>confdefs.h
16765
16766 fi
16767 else
16768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16769$as_echo "no" >&6; }
16770 fi
16771
16772
16773# look for field 'ut_tv' in header 'utmp.h'
16774 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16775 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
16776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmp.h" >&5
16777$as_echo_n "checking for ut_tv field in utmp.h... " >&6; }
16778 if eval \${$ossh_varname+:} false; then :
16779 $as_echo_n "(cached) " >&6
16780else
16781
16782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16783/* end confdefs.h. */
16784#include <utmp.h>
16785
16786_ACEOF
16787if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16788 $EGREP "ut_tv" >/dev/null 2>&1; then :
16789 eval "$ossh_varname=yes"
16790else
16791 eval "$ossh_varname=no"
16792fi
16793rm -f conftest*
16794
16795fi
16796
16797 ossh_result=`eval 'echo $'"$ossh_varname"`
16798 if test -n "`echo $ossh_varname`"; then
16799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16800$as_echo "$ossh_result" >&6; }
16801 if test "x$ossh_result" = "xyes"; then
16802
16803$as_echo "#define HAVE_TV_IN_UTMP 1" >>confdefs.h
16804
16805 fi
16806 else
16807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16808$as_echo "no" >&6; }
16809 fi
16810
16811
16812# look for field 'ut_id' in header 'utmp.h'
16813 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16814 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
16815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmp.h" >&5
16816$as_echo_n "checking for ut_id field in utmp.h... " >&6; }
16817 if eval \${$ossh_varname+:} false; then :
16818 $as_echo_n "(cached) " >&6
16819else
16820
16821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16822/* end confdefs.h. */
16823#include <utmp.h>
16824
16825_ACEOF
16826if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16827 $EGREP "ut_id" >/dev/null 2>&1; then :
16828 eval "$ossh_varname=yes"
16829else
16830 eval "$ossh_varname=no"
16831fi
16832rm -f conftest*
16833
16834fi
16835
16836 ossh_result=`eval 'echo $'"$ossh_varname"`
16837 if test -n "`echo $ossh_varname`"; then
16838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16839$as_echo "$ossh_result" >&6; }
16840 if test "x$ossh_result" = "xyes"; then
16841
16842$as_echo "#define HAVE_ID_IN_UTMP 1" >>confdefs.h
16843
16844 fi
16845 else
16846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16847$as_echo "no" >&6; }
16848 fi
16849
16850
16851# look for field 'ut_id' in header 'utmpx.h'
16852 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16853 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
16854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmpx.h" >&5
16855$as_echo_n "checking for ut_id field in utmpx.h... " >&6; }
16856 if eval \${$ossh_varname+:} false; then :
16857 $as_echo_n "(cached) " >&6
16858else
16859
16860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16861/* end confdefs.h. */
16862#include <utmpx.h>
16863
16864_ACEOF
16865if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16866 $EGREP "ut_id" >/dev/null 2>&1; then :
16867 eval "$ossh_varname=yes"
16868else
16869 eval "$ossh_varname=no"
16870fi
16871rm -f conftest*
16872
16873fi
16874
16875 ossh_result=`eval 'echo $'"$ossh_varname"`
16876 if test -n "`echo $ossh_varname`"; then
16877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16878$as_echo "$ossh_result" >&6; }
16879 if test "x$ossh_result" = "xyes"; then
16880
16881$as_echo "#define HAVE_ID_IN_UTMPX 1" >>confdefs.h
16882
16883 fi
16884 else
16885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16886$as_echo "no" >&6; }
16887 fi
16888
16889
16890# look for field 'ut_addr' in header 'utmp.h'
16891 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16892 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
16893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmp.h" >&5
16894$as_echo_n "checking for ut_addr field in utmp.h... " >&6; }
16895 if eval \${$ossh_varname+:} false; then :
16896 $as_echo_n "(cached) " >&6
16897else
16898
16899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16900/* end confdefs.h. */
16901#include <utmp.h>
16902
16903_ACEOF
16904if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16905 $EGREP "ut_addr" >/dev/null 2>&1; then :
16906 eval "$ossh_varname=yes"
16907else
16908 eval "$ossh_varname=no"
16909fi
16910rm -f conftest*
16911
16912fi
16913
16914 ossh_result=`eval 'echo $'"$ossh_varname"`
16915 if test -n "`echo $ossh_varname`"; then
16916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16917$as_echo "$ossh_result" >&6; }
16918 if test "x$ossh_result" = "xyes"; then
16919
16920$as_echo "#define HAVE_ADDR_IN_UTMP 1" >>confdefs.h
16921
16922 fi
16923 else
16924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16925$as_echo "no" >&6; }
16926 fi
16927
16928
16929# look for field 'ut_addr' in header 'utmpx.h'
16930 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16931 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
16932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmpx.h" >&5
16933$as_echo_n "checking for ut_addr field in utmpx.h... " >&6; }
16934 if eval \${$ossh_varname+:} false; then :
16935 $as_echo_n "(cached) " >&6
16936else
16937
16938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16939/* end confdefs.h. */
16940#include <utmpx.h>
16941
16942_ACEOF
16943if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16944 $EGREP "ut_addr" >/dev/null 2>&1; then :
16945 eval "$ossh_varname=yes"
16946else
16947 eval "$ossh_varname=no"
16948fi
16949rm -f conftest*
16950
16951fi
16952
16953 ossh_result=`eval 'echo $'"$ossh_varname"`
16954 if test -n "`echo $ossh_varname`"; then
16955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16956$as_echo "$ossh_result" >&6; }
16957 if test "x$ossh_result" = "xyes"; then
16958
16959$as_echo "#define HAVE_ADDR_IN_UTMPX 1" >>confdefs.h
16960
16961 fi
16962 else
16963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16964$as_echo "no" >&6; }
16965 fi
16966
16967
16968# look for field 'ut_addr_v6' in header 'utmp.h'
16969 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16970 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
16971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmp.h" >&5
16972$as_echo_n "checking for ut_addr_v6 field in utmp.h... " >&6; }
16973 if eval \${$ossh_varname+:} false; then :
16974 $as_echo_n "(cached) " >&6
16975else
16976
16977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16978/* end confdefs.h. */
16979#include <utmp.h>
16980
16981_ACEOF
16982if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16983 $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
16984 eval "$ossh_varname=yes"
16985else
16986 eval "$ossh_varname=no"
16987fi
16988rm -f conftest*
16989
16990fi
16991
16992 ossh_result=`eval 'echo $'"$ossh_varname"`
16993 if test -n "`echo $ossh_varname`"; then
16994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16995$as_echo "$ossh_result" >&6; }
16996 if test "x$ossh_result" = "xyes"; then
16997
16998$as_echo "#define HAVE_ADDR_V6_IN_UTMP 1" >>confdefs.h
16999
17000 fi
17001 else
17002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17003$as_echo "no" >&6; }
17004 fi
17005
17006
17007# look for field 'ut_addr_v6' in header 'utmpx.h'
17008 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
17009 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
17010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmpx.h" >&5
17011$as_echo_n "checking for ut_addr_v6 field in utmpx.h... " >&6; }
17012 if eval \${$ossh_varname+:} false; then :
17013 $as_echo_n "(cached) " >&6
17014else
17015
17016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17017/* end confdefs.h. */
17018#include <utmpx.h>
17019
17020_ACEOF
17021if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17022 $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
17023 eval "$ossh_varname=yes"
17024else
17025 eval "$ossh_varname=no"
17026fi
17027rm -f conftest*
17028
17029fi
17030
17031 ossh_result=`eval 'echo $'"$ossh_varname"`
17032 if test -n "`echo $ossh_varname`"; then
17033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
17034$as_echo "$ossh_result" >&6; }
17035 if test "x$ossh_result" = "xyes"; then
17036
17037$as_echo "#define HAVE_ADDR_V6_IN_UTMPX 1" >>confdefs.h
17038
17039 fi
17040 else
17041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17042$as_echo "no" >&6; }
17043 fi
17044
17045
17046# look for field 'ut_exit' in header 'utmp.h'
17047 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
17048 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
17049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_exit field in utmp.h" >&5
17050$as_echo_n "checking for ut_exit field in utmp.h... " >&6; }
17051 if eval \${$ossh_varname+:} false; then :
17052 $as_echo_n "(cached) " >&6
17053else
17054
17055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17056/* end confdefs.h. */
17057#include <utmp.h>
17058
17059_ACEOF
17060if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17061 $EGREP "ut_exit" >/dev/null 2>&1; then :
17062 eval "$ossh_varname=yes"
17063else
17064 eval "$ossh_varname=no"
17065fi
17066rm -f conftest*
17067
17068fi
17069
17070 ossh_result=`eval 'echo $'"$ossh_varname"`
17071 if test -n "`echo $ossh_varname`"; then
17072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
17073$as_echo "$ossh_result" >&6; }
17074 if test "x$ossh_result" = "xyes"; then
17075
17076$as_echo "#define HAVE_EXIT_IN_UTMP 1" >>confdefs.h
17077
17078 fi
17079 else
17080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17081$as_echo "no" >&6; }
17082 fi
17083
17084
17085# look for field 'ut_time' in header 'utmp.h'
17086 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
17087 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
17088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmp.h" >&5
17089$as_echo_n "checking for ut_time field in utmp.h... " >&6; }
17090 if eval \${$ossh_varname+:} false; then :
17091 $as_echo_n "(cached) " >&6
17092else
17093
17094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17095/* end confdefs.h. */
17096#include <utmp.h>
17097
17098_ACEOF
17099if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17100 $EGREP "ut_time" >/dev/null 2>&1; then :
17101 eval "$ossh_varname=yes"
17102else
17103 eval "$ossh_varname=no"
17104fi
17105rm -f conftest*
17106
17107fi
17108
17109 ossh_result=`eval 'echo $'"$ossh_varname"`
17110 if test -n "`echo $ossh_varname`"; then
17111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
17112$as_echo "$ossh_result" >&6; }
17113 if test "x$ossh_result" = "xyes"; then
17114
17115$as_echo "#define HAVE_TIME_IN_UTMP 1" >>confdefs.h
17116
17117 fi
17118 else
17119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17120$as_echo "no" >&6; }
17121 fi
17122
17123
17124# look for field 'ut_time' in header 'utmpx.h'
17125 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
17126 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
17127 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmpx.h" >&5
17128$as_echo_n "checking for ut_time field in utmpx.h... " >&6; }
17129 if eval \${$ossh_varname+:} false; then :
17130 $as_echo_n "(cached) " >&6
17131else
17132
17133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17134/* end confdefs.h. */
17135#include <utmpx.h>
17136
17137_ACEOF
17138if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17139 $EGREP "ut_time" >/dev/null 2>&1; then :
17140 eval "$ossh_varname=yes"
17141else
17142 eval "$ossh_varname=no"
17143fi
17144rm -f conftest*
17145
17146fi
17147
17148 ossh_result=`eval 'echo $'"$ossh_varname"`
17149 if test -n "`echo $ossh_varname`"; then
17150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
17151$as_echo "$ossh_result" >&6; }
17152 if test "x$ossh_result" = "xyes"; then
17153
17154$as_echo "#define HAVE_TIME_IN_UTMPX 1" >>confdefs.h
17155
17156 fi
17157 else
17158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17159$as_echo "no" >&6; }
17160 fi
17161
17162
17163# look for field 'ut_tv' in header 'utmpx.h'
17164 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
17165 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
17166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmpx.h" >&5
17167$as_echo_n "checking for ut_tv field in utmpx.h... " >&6; }
17168 if eval \${$ossh_varname+:} false; then :
17169 $as_echo_n "(cached) " >&6
17170else
17171
17172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17173/* end confdefs.h. */
17174#include <utmpx.h>
17175
17176_ACEOF
17177if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17178 $EGREP "ut_tv" >/dev/null 2>&1; then :
17179 eval "$ossh_varname=yes"
17180else
17181 eval "$ossh_varname=no"
17182fi
17183rm -f conftest*
17184
17185fi
17186
17187 ossh_result=`eval 'echo $'"$ossh_varname"`
17188 if test -n "`echo $ossh_varname`"; then
17189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
17190$as_echo "$ossh_result" >&6; }
17191 if test "x$ossh_result" = "xyes"; then
17192
17193$as_echo "#define HAVE_TV_IN_UTMPX 1" >>confdefs.h
17194
17195 fi
17196 else
17197 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17198$as_echo "no" >&6; }
17199 fi
17200
17201
17202ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
17203if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
17204
17205cat >>confdefs.h <<_ACEOF
17206#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
17207_ACEOF
17208
17209
17210fi
17211
17212ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim" "ac_cv_member_struct_stat_st_mtim" "$ac_includes_default"
17213if test "x$ac_cv_member_struct_stat_st_mtim" = xyes; then :
17214
17215cat >>confdefs.h <<_ACEOF
17216#define HAVE_STRUCT_STAT_ST_MTIM 1
17217_ACEOF
17218
17219
17220fi
17221
17222ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime" "ac_cv_member_struct_stat_st_mtime" "$ac_includes_default"
17223if test "x$ac_cv_member_struct_stat_st_mtime" = xyes; then :
17224
17225cat >>confdefs.h <<_ACEOF
17226#define HAVE_STRUCT_STAT_ST_MTIME 1
17227_ACEOF
17228
17229
17230fi
17231
17232ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
17233#include <sys/types.h>
17234#include <pwd.h>
17235
17236"
17237if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
17238
17239cat >>confdefs.h <<_ACEOF
17240#define HAVE_STRUCT_PASSWD_PW_GECOS 1
17241_ACEOF
17242
17243
17244fi
17245ac_fn_c_check_member "$LINENO" "struct passwd" "pw_class" "ac_cv_member_struct_passwd_pw_class" "
17246#include <sys/types.h>
17247#include <pwd.h>
17248
17249"
17250if test "x$ac_cv_member_struct_passwd_pw_class" = xyes; then :
17251
17252cat >>confdefs.h <<_ACEOF
17253#define HAVE_STRUCT_PASSWD_PW_CLASS 1
17254_ACEOF
17255
17256
17257fi
17258ac_fn_c_check_member "$LINENO" "struct passwd" "pw_change" "ac_cv_member_struct_passwd_pw_change" "
17259#include <sys/types.h>
17260#include <pwd.h>
17261
17262"
17263if test "x$ac_cv_member_struct_passwd_pw_change" = xyes; then :
17264
17265cat >>confdefs.h <<_ACEOF
17266#define HAVE_STRUCT_PASSWD_PW_CHANGE 1
17267_ACEOF
17268
17269
17270fi
17271ac_fn_c_check_member "$LINENO" "struct passwd" "pw_expire" "ac_cv_member_struct_passwd_pw_expire" "
17272#include <sys/types.h>
17273#include <pwd.h>
17274
17275"
17276if test "x$ac_cv_member_struct_passwd_pw_expire" = xyes; then :
17277
17278cat >>confdefs.h <<_ACEOF
17279#define HAVE_STRUCT_PASSWD_PW_EXPIRE 1
17280_ACEOF
17281
17282
17283fi
17284
17285
17286ac_fn_c_check_member "$LINENO" "struct __res_state" "retrans" "ac_cv_member_struct___res_state_retrans" "
17287#include <stdio.h>
17288#if HAVE_SYS_TYPES_H
17289# include <sys/types.h>
17290#endif
17291#include <netinet/in.h>
17292#include <arpa/nameser.h>
17293#include <resolv.h>
17294
17295"
17296if test "x$ac_cv_member_struct___res_state_retrans" = xyes; then :
17297
17298else
17299
17300$as_echo "#define __res_state state" >>confdefs.h
17301
17302fi
17303
17304
17305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ss_family field in struct sockaddr_storage" >&5
17306$as_echo_n "checking for ss_family field in struct sockaddr_storage... " >&6; }
17307if ${ac_cv_have_ss_family_in_struct_ss+:} false; then :
17308 $as_echo_n "(cached) " >&6
17309else
17310
17311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17312/* end confdefs.h. */
17313
17314#include <sys/types.h>
17315#include <sys/socket.h>
17316
17317int
17318main ()
17319{
17320 struct sockaddr_storage s; s.ss_family = 1;
17321 ;
17322 return 0;
17323}
17324_ACEOF
17325if ac_fn_c_try_compile "$LINENO"; then :
17326 ac_cv_have_ss_family_in_struct_ss="yes"
17327else
17328 ac_cv_have_ss_family_in_struct_ss="no"
17329fi
17330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17331
17332fi
17333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ss_family_in_struct_ss" >&5
17334$as_echo "$ac_cv_have_ss_family_in_struct_ss" >&6; }
17335if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
17336
17337$as_echo "#define HAVE_SS_FAMILY_IN_SS 1" >>confdefs.h
17338
17339fi
17340
17341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __ss_family field in struct sockaddr_storage" >&5
17342$as_echo_n "checking for __ss_family field in struct sockaddr_storage... " >&6; }
17343if ${ac_cv_have___ss_family_in_struct_ss+:} false; then :
17344 $as_echo_n "(cached) " >&6
17345else
17346
17347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17348/* end confdefs.h. */
17349
17350#include <sys/types.h>
17351#include <sys/socket.h>
17352
17353int
17354main ()
17355{
17356 struct sockaddr_storage s; s.__ss_family = 1;
17357 ;
17358 return 0;
17359}
17360_ACEOF
17361if ac_fn_c_try_compile "$LINENO"; then :
17362 ac_cv_have___ss_family_in_struct_ss="yes"
17363else
17364 ac_cv_have___ss_family_in_struct_ss="no"
17365
17366fi
17367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17368
17369fi
17370{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___ss_family_in_struct_ss" >&5
17371$as_echo "$ac_cv_have___ss_family_in_struct_ss" >&6; }
17372if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
17373
17374$as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
17375
17376fi
17377
17378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_accrights field in struct msghdr" >&5
17379$as_echo_n "checking for msg_accrights field in struct msghdr... " >&6; }
17380if ${ac_cv_have_accrights_in_msghdr+:} false; then :
17381 $as_echo_n "(cached) " >&6
17382else
17383
17384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17385/* end confdefs.h. */
17386
17387#include <sys/types.h>
17388#include <sys/socket.h>
17389#include <sys/uio.h>
17390
17391int
17392main ()
17393{
17394
17395#ifdef msg_accrights
17396#error "msg_accrights is a macro"
17397exit(1);
17398#endif
17399struct msghdr m;
17400m.msg_accrights = 0;
17401exit(0);
17402
17403 ;
17404 return 0;
17405}
17406_ACEOF
17407if ac_fn_c_try_compile "$LINENO"; then :
17408 ac_cv_have_accrights_in_msghdr="yes"
17409else
17410 ac_cv_have_accrights_in_msghdr="no"
17411
17412fi
17413rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17414
17415fi
17416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_accrights_in_msghdr" >&5
17417$as_echo "$ac_cv_have_accrights_in_msghdr" >&6; }
17418if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
17419
17420$as_echo "#define HAVE_ACCRIGHTS_IN_MSGHDR 1" >>confdefs.h
17421
17422fi
17423
17424{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct statvfs.f_fsid is integral type" >&5
17425$as_echo_n "checking if struct statvfs.f_fsid is integral type... " >&6; }
17426cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17427/* end confdefs.h. */
17428
17429#include <sys/param.h>
17430#include <sys/stat.h>
17431#ifdef HAVE_SYS_TIME_H
17432# include <sys/time.h>
17433#endif
17434#ifdef HAVE_SYS_MOUNT_H
17435#include <sys/mount.h>
17436#endif
17437#ifdef HAVE_SYS_STATVFS_H
17438#include <sys/statvfs.h>
17439#endif
17440
17441int
17442main ()
17443{
17444 struct statvfs s; s.f_fsid = 0;
17445 ;
17446 return 0;
17447}
17448_ACEOF
17449if ac_fn_c_try_compile "$LINENO"; then :
17450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17451$as_echo "yes" >&6; }
17452else
17453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17454$as_echo "no" >&6; }
17455
17456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fsid_t has member val" >&5
17457$as_echo_n "checking if fsid_t has member val... " >&6; }
17458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17459/* end confdefs.h. */
17460
17461#include <sys/types.h>
17462#include <sys/statvfs.h>
17463
17464int
17465main ()
17466{
17467 fsid_t t; t.val[0] = 0;
17468 ;
17469 return 0;
17470}
17471_ACEOF
17472if ac_fn_c_try_compile "$LINENO"; then :
17473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17474$as_echo "yes" >&6; }
17475
17476$as_echo "#define FSID_HAS_VAL 1" >>confdefs.h
17477
17478else
17479 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17480$as_echo "no" >&6; }
17481fi
17482rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17483
17484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if f_fsid has member __val" >&5
17485$as_echo_n "checking if f_fsid has member __val... " >&6; }
17486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17487/* end confdefs.h. */
17488
17489#include <sys/types.h>
17490#include <sys/statvfs.h>
17491
17492int
17493main ()
17494{
17495 fsid_t t; t.__val[0] = 0;
17496 ;
17497 return 0;
17498}
17499_ACEOF
17500if ac_fn_c_try_compile "$LINENO"; then :
17501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17502$as_echo "yes" >&6; }
17503
17504$as_echo "#define FSID_HAS___VAL 1" >>confdefs.h
17505
17506else
17507 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17508$as_echo "no" >&6; }
17509fi
17510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17511
17512fi
17513rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17514
17515{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_control field in struct msghdr" >&5
17516$as_echo_n "checking for msg_control field in struct msghdr... " >&6; }
17517if ${ac_cv_have_control_in_msghdr+:} false; then :
17518 $as_echo_n "(cached) " >&6
17519else
17520
17521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17522/* end confdefs.h. */
17523
17524#include <sys/types.h>
17525#include <sys/socket.h>
17526#include <sys/uio.h>
17527
17528int
17529main ()
17530{
17531
17532#ifdef msg_control
17533#error "msg_control is a macro"
17534exit(1);
17535#endif
17536struct msghdr m;
17537m.msg_control = 0;
17538exit(0);
17539
17540 ;
17541 return 0;
17542}
17543_ACEOF
17544if ac_fn_c_try_compile "$LINENO"; then :
17545 ac_cv_have_control_in_msghdr="yes"
17546else
17547 ac_cv_have_control_in_msghdr="no"
17548
17549fi
17550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17551
17552fi
17553{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_control_in_msghdr" >&5
17554$as_echo "$ac_cv_have_control_in_msghdr" >&6; }
17555if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
17556
17557$as_echo "#define HAVE_CONTROL_IN_MSGHDR 1" >>confdefs.h
17558
17559fi
17560
17561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines __progname" >&5
17562$as_echo_n "checking if libc defines __progname... " >&6; }
17563if ${ac_cv_libc_defines___progname+:} false; then :
17564 $as_echo_n "(cached) " >&6
17565else
17566
17567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17568/* end confdefs.h. */
17569
17570int
17571main ()
17572{
17573 extern char *__progname; printf("%s", __progname);
17574 ;
17575 return 0;
17576}
17577_ACEOF
17578if ac_fn_c_try_link "$LINENO"; then :
17579 ac_cv_libc_defines___progname="yes"
17580else
17581 ac_cv_libc_defines___progname="no"
17582
17583fi
17584rm -f core conftest.err conftest.$ac_objext \
17585 conftest$ac_exeext conftest.$ac_ext
17586
17587fi
17588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines___progname" >&5
17589$as_echo "$ac_cv_libc_defines___progname" >&6; }
17590if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
17591
17592$as_echo "#define HAVE___PROGNAME 1" >>confdefs.h
17593
17594fi
17595
17596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __FUNCTION__" >&5
17597$as_echo_n "checking whether $CC implements __FUNCTION__... " >&6; }
17598if ${ac_cv_cc_implements___FUNCTION__+:} false; then :
17599 $as_echo_n "(cached) " >&6
17600else
17601
17602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17603/* end confdefs.h. */
17604 #include <stdio.h>
17605int
17606main ()
17607{
17608 printf("%s", __FUNCTION__);
17609 ;
17610 return 0;
17611}
17612_ACEOF
17613if ac_fn_c_try_link "$LINENO"; then :
17614 ac_cv_cc_implements___FUNCTION__="yes"
17615else
17616 ac_cv_cc_implements___FUNCTION__="no"
17617
17618fi
17619rm -f core conftest.err conftest.$ac_objext \
17620 conftest$ac_exeext conftest.$ac_ext
17621
17622fi
17623{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___FUNCTION__" >&5
17624$as_echo "$ac_cv_cc_implements___FUNCTION__" >&6; }
17625if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
17626
17627$as_echo "#define HAVE___FUNCTION__ 1" >>confdefs.h
17628
17629fi
17630
17631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __func__" >&5
17632$as_echo_n "checking whether $CC implements __func__... " >&6; }
17633if ${ac_cv_cc_implements___func__+:} false; then :
17634 $as_echo_n "(cached) " >&6
17635else
17636
17637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17638/* end confdefs.h. */
17639 #include <stdio.h>
17640int
17641main ()
17642{
17643 printf("%s", __func__);
17644 ;
17645 return 0;
17646}
17647_ACEOF
17648if ac_fn_c_try_link "$LINENO"; then :
17649 ac_cv_cc_implements___func__="yes"
17650else
17651 ac_cv_cc_implements___func__="no"
17652
17653fi
17654rm -f core conftest.err conftest.$ac_objext \
17655 conftest$ac_exeext conftest.$ac_ext
17656
17657fi
17658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___func__" >&5
17659$as_echo "$ac_cv_cc_implements___func__" >&6; }
17660if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
17661
17662$as_echo "#define HAVE___func__ 1" >>confdefs.h
17663
17664fi
17665
17666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_copy exists" >&5
17667$as_echo_n "checking whether va_copy exists... " >&6; }
17668if ${ac_cv_have_va_copy+:} false; then :
17669 $as_echo_n "(cached) " >&6
17670else
17671
17672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17673/* end confdefs.h. */
17674
17675#include <stdarg.h>
17676va_list x,y;
17677
17678int
17679main ()
17680{
17681 va_copy(x,y);
17682 ;
17683 return 0;
17684}
17685_ACEOF
17686if ac_fn_c_try_link "$LINENO"; then :
17687 ac_cv_have_va_copy="yes"
17688else
17689 ac_cv_have_va_copy="no"
17690
17691fi
17692rm -f core conftest.err conftest.$ac_objext \
17693 conftest$ac_exeext conftest.$ac_ext
17694
17695fi
17696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_va_copy" >&5
17697$as_echo "$ac_cv_have_va_copy" >&6; }
17698if test "x$ac_cv_have_va_copy" = "xyes" ; then
17699
17700$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
17701
17702fi
17703
17704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __va_copy exists" >&5
17705$as_echo_n "checking whether __va_copy exists... " >&6; }
17706if ${ac_cv_have___va_copy+:} false; then :
17707 $as_echo_n "(cached) " >&6
17708else
17709
17710 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17711/* end confdefs.h. */
17712
17713#include <stdarg.h>
17714va_list x,y;
17715
17716int
17717main ()
17718{
17719 __va_copy(x,y);
17720 ;
17721 return 0;
17722}
17723_ACEOF
17724if ac_fn_c_try_link "$LINENO"; then :
17725 ac_cv_have___va_copy="yes"
17726else
17727 ac_cv_have___va_copy="no"
17728
17729fi
17730rm -f core conftest.err conftest.$ac_objext \
17731 conftest$ac_exeext conftest.$ac_ext
17732
17733fi
17734{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___va_copy" >&5
17735$as_echo "$ac_cv_have___va_copy" >&6; }
17736if test "x$ac_cv_have___va_copy" = "xyes" ; then
17737
17738$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
17739
17740fi
17741
17742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt has optreset support" >&5
17743$as_echo_n "checking whether getopt has optreset support... " >&6; }
17744if ${ac_cv_have_getopt_optreset+:} false; then :
17745 $as_echo_n "(cached) " >&6
17746else
17747
17748 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17749/* end confdefs.h. */
17750 #include <getopt.h>
17751int
17752main ()
17753{
17754 extern int optreset; optreset = 0;
17755 ;
17756 return 0;
17757}
17758_ACEOF
17759if ac_fn_c_try_link "$LINENO"; then :
17760 ac_cv_have_getopt_optreset="yes"
17761else
17762 ac_cv_have_getopt_optreset="no"
17763
17764fi
17765rm -f core conftest.err conftest.$ac_objext \
17766 conftest$ac_exeext conftest.$ac_ext
17767
17768fi
17769{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getopt_optreset" >&5
17770$as_echo "$ac_cv_have_getopt_optreset" >&6; }
17771if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
17772
17773$as_echo "#define HAVE_GETOPT_OPTRESET 1" >>confdefs.h
17774
17775fi
17776
17777{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_errlist" >&5
17778$as_echo_n "checking if libc defines sys_errlist... " >&6; }
17779if ${ac_cv_libc_defines_sys_errlist+:} false; then :
17780 $as_echo_n "(cached) " >&6
17781else
17782
17783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17784/* end confdefs.h. */
17785
17786int
17787main ()
17788{
17789 extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);
17790 ;
17791 return 0;
17792}
17793_ACEOF
17794if ac_fn_c_try_link "$LINENO"; then :
17795 ac_cv_libc_defines_sys_errlist="yes"
17796else
17797 ac_cv_libc_defines_sys_errlist="no"
17798
17799fi
17800rm -f core conftest.err conftest.$ac_objext \
17801 conftest$ac_exeext conftest.$ac_ext
17802
17803fi
17804{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_errlist" >&5
17805$as_echo "$ac_cv_libc_defines_sys_errlist" >&6; }
17806if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
17807
17808$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
17809
17810fi
17811
17812
17813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_nerr" >&5
17814$as_echo_n "checking if libc defines sys_nerr... " >&6; }
17815if ${ac_cv_libc_defines_sys_nerr+:} false; then :
17816 $as_echo_n "(cached) " >&6
17817else
17818
17819 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17820/* end confdefs.h. */
17821
17822int
17823main ()
17824{
17825 extern int sys_nerr; printf("%i", sys_nerr);
17826 ;
17827 return 0;
17828}
17829_ACEOF
17830if ac_fn_c_try_link "$LINENO"; then :
17831 ac_cv_libc_defines_sys_nerr="yes"
17832else
17833 ac_cv_libc_defines_sys_nerr="no"
17834
17835fi
17836rm -f core conftest.err conftest.$ac_objext \
17837 conftest$ac_exeext conftest.$ac_ext
17838
17839fi
17840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_nerr" >&5
17841$as_echo "$ac_cv_libc_defines_sys_nerr" >&6; }
17842if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
17843
17844$as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h
17845
17846fi
17847
17848# Check libraries needed by DNS fingerprint support
17849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getrrsetbyname" >&5
17850$as_echo_n "checking for library containing getrrsetbyname... " >&6; }
17851if ${ac_cv_search_getrrsetbyname+:} false; then :
17852 $as_echo_n "(cached) " >&6
17853else
17854 ac_func_search_save_LIBS=$LIBS
17855cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17856/* end confdefs.h. */
17857
17858/* Override any GCC internal prototype to avoid an error.
17859 Use char because int might match the return type of a GCC
17860 builtin and then its argument prototype would still apply. */
17861#ifdef __cplusplus
17862extern "C"
17863#endif
17864char getrrsetbyname ();
17865int
17866main ()
17867{
17868return getrrsetbyname ();
17869 ;
17870 return 0;
17871}
17872_ACEOF
17873for ac_lib in '' resolv; do
17874 if test -z "$ac_lib"; then
17875 ac_res="none required"
17876 else
17877 ac_res=-l$ac_lib
17878 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17879 fi
17880 if ac_fn_c_try_link "$LINENO"; then :
17881 ac_cv_search_getrrsetbyname=$ac_res
17882fi
17883rm -f core conftest.err conftest.$ac_objext \
17884 conftest$ac_exeext
17885 if ${ac_cv_search_getrrsetbyname+:} false; then :
17886 break
17887fi
17888done
17889if ${ac_cv_search_getrrsetbyname+:} false; then :
17890
17891else
17892 ac_cv_search_getrrsetbyname=no
17893fi
17894rm conftest.$ac_ext
17895LIBS=$ac_func_search_save_LIBS
17896fi
17897{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getrrsetbyname" >&5
17898$as_echo "$ac_cv_search_getrrsetbyname" >&6; }
17899ac_res=$ac_cv_search_getrrsetbyname
17900if test "$ac_res" != no; then :
17901 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17902
17903$as_echo "#define HAVE_GETRRSETBYNAME 1" >>confdefs.h
17904
17905else
17906
17907 # Needed by our getrrsetbyname()
17908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_query" >&5
17909$as_echo_n "checking for library containing res_query... " >&6; }
17910if ${ac_cv_search_res_query+:} false; then :
17911 $as_echo_n "(cached) " >&6
17912else
17913 ac_func_search_save_LIBS=$LIBS
17914cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17915/* end confdefs.h. */
17916
17917/* Override any GCC internal prototype to avoid an error.
17918 Use char because int might match the return type of a GCC
17919 builtin and then its argument prototype would still apply. */
17920#ifdef __cplusplus
17921extern "C"
17922#endif
17923char res_query ();
17924int
17925main ()
17926{
17927return res_query ();
17928 ;
17929 return 0;
17930}
17931_ACEOF
17932for ac_lib in '' resolv; do
17933 if test -z "$ac_lib"; then
17934 ac_res="none required"
17935 else
17936 ac_res=-l$ac_lib
17937 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17938 fi
17939 if ac_fn_c_try_link "$LINENO"; then :
17940 ac_cv_search_res_query=$ac_res
17941fi
17942rm -f core conftest.err conftest.$ac_objext \
17943 conftest$ac_exeext
17944 if ${ac_cv_search_res_query+:} false; then :
17945 break
17946fi
17947done
17948if ${ac_cv_search_res_query+:} false; then :
17949
17950else
17951 ac_cv_search_res_query=no
17952fi
17953rm conftest.$ac_ext
17954LIBS=$ac_func_search_save_LIBS
17955fi
17956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_query" >&5
17957$as_echo "$ac_cv_search_res_query" >&6; }
17958ac_res=$ac_cv_search_res_query
17959if test "$ac_res" != no; then :
17960 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17961
17962fi
17963
17964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
17965$as_echo_n "checking for library containing dn_expand... " >&6; }
17966if ${ac_cv_search_dn_expand+:} false; then :
17967 $as_echo_n "(cached) " >&6
17968else
17969 ac_func_search_save_LIBS=$LIBS
17970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17971/* end confdefs.h. */
17972
17973/* Override any GCC internal prototype to avoid an error.
17974 Use char because int might match the return type of a GCC
17975 builtin and then its argument prototype would still apply. */
17976#ifdef __cplusplus
17977extern "C"
17978#endif
17979char dn_expand ();
17980int
17981main ()
17982{
17983return dn_expand ();
17984 ;
17985 return 0;
17986}
17987_ACEOF
17988for ac_lib in '' resolv; do
17989 if test -z "$ac_lib"; then
17990 ac_res="none required"
17991 else
17992 ac_res=-l$ac_lib
17993 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17994 fi
17995 if ac_fn_c_try_link "$LINENO"; then :
17996 ac_cv_search_dn_expand=$ac_res
17997fi
17998rm -f core conftest.err conftest.$ac_objext \
17999 conftest$ac_exeext
18000 if ${ac_cv_search_dn_expand+:} false; then :
18001 break
18002fi
18003done
18004if ${ac_cv_search_dn_expand+:} false; then :
18005
18006else
18007 ac_cv_search_dn_expand=no
18008fi
18009rm conftest.$ac_ext
18010LIBS=$ac_func_search_save_LIBS
18011fi
18012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
18013$as_echo "$ac_cv_search_dn_expand" >&6; }
18014ac_res=$ac_cv_search_dn_expand
18015if test "$ac_res" != no; then :
18016 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18017
18018fi
18019
18020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if res_query will link" >&5
18021$as_echo_n "checking if res_query will link... " >&6; }
18022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18023/* end confdefs.h. */
18024
18025#include <sys/types.h>
18026#include <netinet/in.h>
18027#include <arpa/nameser.h>
18028#include <netdb.h>
18029#include <resolv.h>
18030
18031int
18032main ()
18033{
18034
18035 res_query (0, 0, 0, 0, 0);
18036
18037 ;
18038 return 0;
18039}
18040_ACEOF
18041if ac_fn_c_try_link "$LINENO"; then :
18042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18043$as_echo "yes" >&6; }
18044else
18045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18046$as_echo "no" >&6; }
18047 saved_LIBS="$LIBS"
18048 LIBS="$LIBS -lresolv"
18049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
18050$as_echo_n "checking for res_query in -lresolv... " >&6; }
18051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18052/* end confdefs.h. */
18053
18054#include <sys/types.h>
18055#include <netinet/in.h>
18056#include <arpa/nameser.h>
18057#include <netdb.h>
18058#include <resolv.h>
18059
18060int
18061main ()
18062{
18063
18064 res_query (0, 0, 0, 0, 0);
18065
18066 ;
18067 return 0;
18068}
18069_ACEOF
18070if ac_fn_c_try_link "$LINENO"; then :
18071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18072$as_echo "yes" >&6; }
18073else
18074 LIBS="$saved_LIBS"
18075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18076$as_echo "no" >&6; }
18077fi
18078rm -f core conftest.err conftest.$ac_objext \
18079 conftest$ac_exeext conftest.$ac_ext
18080
18081fi
18082rm -f core conftest.err conftest.$ac_objext \
18083 conftest$ac_exeext conftest.$ac_ext
18084 for ac_func in _getshort _getlong
18085do :
18086 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18087ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18088if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18089 cat >>confdefs.h <<_ACEOF
18090#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18091_ACEOF
18092
18093fi
18094done
18095
18096 ac_fn_c_check_decl "$LINENO" "_getshort" "ac_cv_have_decl__getshort" "#include <sys/types.h>
18097 #include <arpa/nameser.h>
18098"
18099if test "x$ac_cv_have_decl__getshort" = xyes; then :
18100 ac_have_decl=1
18101else
18102 ac_have_decl=0
18103fi
18104
18105cat >>confdefs.h <<_ACEOF
18106#define HAVE_DECL__GETSHORT $ac_have_decl
18107_ACEOF
18108ac_fn_c_check_decl "$LINENO" "_getlong" "ac_cv_have_decl__getlong" "#include <sys/types.h>
18109 #include <arpa/nameser.h>
18110"
18111if test "x$ac_cv_have_decl__getlong" = xyes; then :
18112 ac_have_decl=1
18113else
18114 ac_have_decl=0
18115fi
18116
18117cat >>confdefs.h <<_ACEOF
18118#define HAVE_DECL__GETLONG $ac_have_decl
18119_ACEOF
18120
18121 ac_fn_c_check_member "$LINENO" "HEADER" "ad" "ac_cv_member_HEADER_ad" "#include <arpa/nameser.h>
18122"
18123if test "x$ac_cv_member_HEADER_ad" = xyes; then :
18124
18125$as_echo "#define HAVE_HEADER_AD 1" >>confdefs.h
18126
18127fi
18128
18129
18130fi
18131
18132
18133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct __res_state _res is an extern" >&5
18134$as_echo_n "checking if struct __res_state _res is an extern... " >&6; }
18135cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18136/* end confdefs.h. */
18137
18138#include <stdio.h>
18139#if HAVE_SYS_TYPES_H
18140# include <sys/types.h>
18141#endif
18142#include <netinet/in.h>
18143#include <arpa/nameser.h>
18144#include <resolv.h>
18145extern struct __res_state _res;
18146
18147int
18148main ()
18149{
18150
18151struct __res_state *volatile p = &_res; /* force resolution of _res */
18152return 0;
18153
18154 ;
18155 return 0;
18156}
18157_ACEOF
18158if ac_fn_c_try_link "$LINENO"; then :
18159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18160$as_echo "yes" >&6; }
18161
18162$as_echo "#define HAVE__RES_EXTERN 1" >>confdefs.h
18163
18164
18165else
18166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18167$as_echo "no" >&6; }
18168
18169fi
18170rm -f core conftest.err conftest.$ac_objext \
18171 conftest$ac_exeext conftest.$ac_ext
18172
18173# Check whether user wants SELinux support
18174SELINUX_MSG="no"
18175LIBSELINUX=""
18176
18177# Check whether --with-selinux was given.
18178if test "${with_selinux+set}" = set; then :
18179 withval=$with_selinux; if test "x$withval" != "xno" ; then
18180 save_LIBS="$LIBS"
18181
18182$as_echo "#define WITH_SELINUX 1" >>confdefs.h
18183
18184 SELINUX_MSG="yes"
18185 ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
18186if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
18187
18188else
18189 as_fn_error $? "SELinux support requires selinux.h header" "$LINENO" 5
18190fi
18191
18192
18193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setexeccon in -lselinux" >&5
18194$as_echo_n "checking for setexeccon in -lselinux... " >&6; }
18195if ${ac_cv_lib_selinux_setexeccon+:} false; then :
18196 $as_echo_n "(cached) " >&6
18197else
18198 ac_check_lib_save_LIBS=$LIBS
18199LIBS="-lselinux $LIBS"
18200cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18201/* end confdefs.h. */
18202
18203/* Override any GCC internal prototype to avoid an error.
18204 Use char because int might match the return type of a GCC
18205 builtin and then its argument prototype would still apply. */
18206#ifdef __cplusplus
18207extern "C"
18208#endif
18209char setexeccon ();
18210int
18211main ()
18212{
18213return setexeccon ();
18214 ;
18215 return 0;
18216}
18217_ACEOF
18218if ac_fn_c_try_link "$LINENO"; then :
18219 ac_cv_lib_selinux_setexeccon=yes
18220else
18221 ac_cv_lib_selinux_setexeccon=no
18222fi
18223rm -f core conftest.err conftest.$ac_objext \
18224 conftest$ac_exeext conftest.$ac_ext
18225LIBS=$ac_check_lib_save_LIBS
18226fi
18227{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_setexeccon" >&5
18228$as_echo "$ac_cv_lib_selinux_setexeccon" >&6; }
18229if test "x$ac_cv_lib_selinux_setexeccon" = xyes; then :
18230 LIBSELINUX="-lselinux"
18231 LIBS="$LIBS -lselinux"
18232
18233else
18234 as_fn_error $? "SELinux support requires libselinux library" "$LINENO" 5
18235fi
18236
18237 SSHLIBS="$SSHLIBS $LIBSELINUX"
18238 SSHDLIBS="$SSHDLIBS $LIBSELINUX"
18239 for ac_func in getseuserbyname get_default_context_with_level
18240do :
18241 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18242ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18243if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18244 cat >>confdefs.h <<_ACEOF
18245#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18246_ACEOF
18247
18248fi
18249done
18250
18251 LIBS="$save_LIBS"
18252 fi
18253
18254fi
18255
18256
18257
18258
18259# Check whether user wants Kerberos 5 support
18260KRB5_MSG="no"
18261
18262# Check whether --with-kerberos5 was given.
18263if test "${with_kerberos5+set}" = set; then :
18264 withval=$with_kerberos5; if test "x$withval" != "xno" ; then
18265 if test "x$withval" = "xyes" ; then
18266 KRB5ROOT="/usr/local"
18267 else
18268 KRB5ROOT=${withval}
18269 fi
18270
18271
18272$as_echo "#define KRB5 1" >>confdefs.h
18273
18274 KRB5_MSG="yes"
18275
18276 if test -n "$ac_tool_prefix"; then
18277 # Extract the first word of "${ac_tool_prefix}krb5-config", so it can be a program name with args.
18278set dummy ${ac_tool_prefix}krb5-config; ac_word=$2
18279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18280$as_echo_n "checking for $ac_word... " >&6; }
18281if ${ac_cv_path_KRB5CONF+:} false; then :
18282 $as_echo_n "(cached) " >&6
18283else
18284 case $KRB5CONF in
18285 [\\/]* | ?:[\\/]*)
18286 ac_cv_path_KRB5CONF="$KRB5CONF" # Let the user override the test with a path.
18287 ;;
18288 *)
18289 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18290as_dummy="$KRB5ROOT/bin:$PATH"
18291for as_dir in $as_dummy
18292do
18293 IFS=$as_save_IFS
18294 test -z "$as_dir" && as_dir=.
18295 for ac_exec_ext in '' $ac_executable_extensions; do
18296 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18297 ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
18298 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18299 break 2
18300 fi
18301done
18302 done
18303IFS=$as_save_IFS
18304
18305 ;;
18306esac
18307fi
18308KRB5CONF=$ac_cv_path_KRB5CONF
18309if test -n "$KRB5CONF"; then
18310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5CONF" >&5
18311$as_echo "$KRB5CONF" >&6; }
18312else
18313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18314$as_echo "no" >&6; }
18315fi
18316
18317
18318fi
18319if test -z "$ac_cv_path_KRB5CONF"; then
18320 ac_pt_KRB5CONF=$KRB5CONF
18321 # Extract the first word of "krb5-config", so it can be a program name with args.
18322set dummy krb5-config; ac_word=$2
18323{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18324$as_echo_n "checking for $ac_word... " >&6; }
18325if ${ac_cv_path_ac_pt_KRB5CONF+:} false; then :
18326 $as_echo_n "(cached) " >&6
18327else
18328 case $ac_pt_KRB5CONF in
18329 [\\/]* | ?:[\\/]*)
18330 ac_cv_path_ac_pt_KRB5CONF="$ac_pt_KRB5CONF" # Let the user override the test with a path.
18331 ;;
18332 *)
18333 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18334as_dummy="$KRB5ROOT/bin:$PATH"
18335for as_dir in $as_dummy
18336do
18337 IFS=$as_save_IFS
18338 test -z "$as_dir" && as_dir=.
18339 for ac_exec_ext in '' $ac_executable_extensions; do
18340 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18341 ac_cv_path_ac_pt_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
18342 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18343 break 2
18344 fi
18345done
18346 done
18347IFS=$as_save_IFS
18348
18349 ;;
18350esac
18351fi
18352ac_pt_KRB5CONF=$ac_cv_path_ac_pt_KRB5CONF
18353if test -n "$ac_pt_KRB5CONF"; then
18354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_KRB5CONF" >&5
18355$as_echo "$ac_pt_KRB5CONF" >&6; }
18356else
18357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18358$as_echo "no" >&6; }
18359fi
18360
18361 if test "x$ac_pt_KRB5CONF" = x; then
18362 KRB5CONF="$KRB5ROOT/bin/krb5-config"
18363 else
18364 case $cross_compiling:$ac_tool_warned in
18365yes:)
18366{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
18367$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
18368ac_tool_warned=yes ;;
18369esac
18370 KRB5CONF=$ac_pt_KRB5CONF
18371 fi
18372else
18373 KRB5CONF="$ac_cv_path_KRB5CONF"
18374fi
18375
18376 if test -x $KRB5CONF ; then
18377 K5CFLAGS="`$KRB5CONF --cflags`"
18378 K5LIBS="`$KRB5CONF --libs`"
18379 CPPFLAGS="$CPPFLAGS $K5CFLAGS"
18380
18381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gssapi support" >&5
18382$as_echo_n "checking for gssapi support... " >&6; }
18383 if $KRB5CONF | grep gssapi >/dev/null ; then
18384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18385$as_echo "yes" >&6; }
18386
18387$as_echo "#define GSSAPI 1" >>confdefs.h
18388
18389 GSSCFLAGS="`$KRB5CONF --cflags gssapi`"
18390 GSSLIBS="`$KRB5CONF --libs gssapi`"
18391 CPPFLAGS="$CPPFLAGS $GSSCFLAGS"
18392 else
18393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18394$as_echo "no" >&6; }
18395 fi
18396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
18397$as_echo_n "checking whether we are using Heimdal... " >&6; }
18398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18399/* end confdefs.h. */
18400 #include <krb5.h>
18401
18402int
18403main ()
18404{
18405 char *tmp = heimdal_version;
18406 ;
18407 return 0;
18408}
18409_ACEOF
18410if ac_fn_c_try_compile "$LINENO"; then :
18411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18412$as_echo "yes" >&6; }
18413
18414$as_echo "#define HEIMDAL 1" >>confdefs.h
18415
18416else
18417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18418$as_echo "no" >&6; }
18419
18420fi
18421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18422 else
18423 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
18424 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
18425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
18426$as_echo_n "checking whether we are using Heimdal... " >&6; }
18427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18428/* end confdefs.h. */
18429 #include <krb5.h>
18430
18431int
18432main ()
18433{
18434 char *tmp = heimdal_version;
18435 ;
18436 return 0;
18437}
18438_ACEOF
18439if ac_fn_c_try_compile "$LINENO"; then :
18440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18441$as_echo "yes" >&6; }
18442 $as_echo "#define HEIMDAL 1" >>confdefs.h
18443
18444 K5LIBS="-lkrb5"
18445 K5LIBS="$K5LIBS -lcom_err -lasn1"
18446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for net_write in -lroken" >&5
18447$as_echo_n "checking for net_write in -lroken... " >&6; }
18448if ${ac_cv_lib_roken_net_write+:} false; then :
18449 $as_echo_n "(cached) " >&6
18450else
18451 ac_check_lib_save_LIBS=$LIBS
18452LIBS="-lroken $LIBS"
18453cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18454/* end confdefs.h. */
18455
18456/* Override any GCC internal prototype to avoid an error.
18457 Use char because int might match the return type of a GCC
18458 builtin and then its argument prototype would still apply. */
18459#ifdef __cplusplus
18460extern "C"
18461#endif
18462char net_write ();
18463int
18464main ()
18465{
18466return net_write ();
18467 ;
18468 return 0;
18469}
18470_ACEOF
18471if ac_fn_c_try_link "$LINENO"; then :
18472 ac_cv_lib_roken_net_write=yes
18473else
18474 ac_cv_lib_roken_net_write=no
18475fi
18476rm -f core conftest.err conftest.$ac_objext \
18477 conftest$ac_exeext conftest.$ac_ext
18478LIBS=$ac_check_lib_save_LIBS
18479fi
18480{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_roken_net_write" >&5
18481$as_echo "$ac_cv_lib_roken_net_write" >&6; }
18482if test "x$ac_cv_lib_roken_net_write" = xyes; then :
18483 K5LIBS="$K5LIBS -lroken"
18484fi
18485
18486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
18487$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
18488if ${ac_cv_lib_des_des_cbc_encrypt+:} false; then :
18489 $as_echo_n "(cached) " >&6
18490else
18491 ac_check_lib_save_LIBS=$LIBS
18492LIBS="-ldes $LIBS"
18493cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18494/* end confdefs.h. */
18495
18496/* Override any GCC internal prototype to avoid an error.
18497 Use char because int might match the return type of a GCC
18498 builtin and then its argument prototype would still apply. */
18499#ifdef __cplusplus
18500extern "C"
18501#endif
18502char des_cbc_encrypt ();
18503int
18504main ()
18505{
18506return des_cbc_encrypt ();
18507 ;
18508 return 0;
18509}
18510_ACEOF
18511if ac_fn_c_try_link "$LINENO"; then :
18512 ac_cv_lib_des_des_cbc_encrypt=yes
18513else
18514 ac_cv_lib_des_des_cbc_encrypt=no
18515fi
18516rm -f core conftest.err conftest.$ac_objext \
18517 conftest$ac_exeext conftest.$ac_ext
18518LIBS=$ac_check_lib_save_LIBS
18519fi
18520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
18521$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
18522if test "x$ac_cv_lib_des_des_cbc_encrypt" = xyes; then :
18523 K5LIBS="$K5LIBS -ldes"
18524fi
18525
18526
18527else
18528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18529$as_echo "no" >&6; }
18530 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
18531
18532fi
18533rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
18535$as_echo_n "checking for library containing dn_expand... " >&6; }
18536if ${ac_cv_search_dn_expand+:} false; then :
18537 $as_echo_n "(cached) " >&6
18538else
18539 ac_func_search_save_LIBS=$LIBS
18540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18541/* end confdefs.h. */
18542
18543/* Override any GCC internal prototype to avoid an error.
18544 Use char because int might match the return type of a GCC
18545 builtin and then its argument prototype would still apply. */
18546#ifdef __cplusplus
18547extern "C"
18548#endif
18549char dn_expand ();
18550int
18551main ()
18552{
18553return dn_expand ();
18554 ;
18555 return 0;
18556}
18557_ACEOF
18558for ac_lib in '' resolv; do
18559 if test -z "$ac_lib"; then
18560 ac_res="none required"
18561 else
18562 ac_res=-l$ac_lib
18563 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18564 fi
18565 if ac_fn_c_try_link "$LINENO"; then :
18566 ac_cv_search_dn_expand=$ac_res
18567fi
18568rm -f core conftest.err conftest.$ac_objext \
18569 conftest$ac_exeext
18570 if ${ac_cv_search_dn_expand+:} false; then :
18571 break
18572fi
18573done
18574if ${ac_cv_search_dn_expand+:} false; then :
18575
18576else
18577 ac_cv_search_dn_expand=no
18578fi
18579rm conftest.$ac_ext
18580LIBS=$ac_func_search_save_LIBS
18581fi
18582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
18583$as_echo "$ac_cv_search_dn_expand" >&6; }
18584ac_res=$ac_cv_search_dn_expand
18585if test "$ac_res" != no; then :
18586 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18587
18588fi
18589
18590
18591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi_krb5" >&5
18592$as_echo_n "checking for gss_init_sec_context in -lgssapi_krb5... " >&6; }
18593if ${ac_cv_lib_gssapi_krb5_gss_init_sec_context+:} false; then :
18594 $as_echo_n "(cached) " >&6
18595else
18596 ac_check_lib_save_LIBS=$LIBS
18597LIBS="-lgssapi_krb5 $LIBS"
18598cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18599/* end confdefs.h. */
18600
18601/* Override any GCC internal prototype to avoid an error.
18602 Use char because int might match the return type of a GCC
18603 builtin and then its argument prototype would still apply. */
18604#ifdef __cplusplus
18605extern "C"
18606#endif
18607char gss_init_sec_context ();
18608int
18609main ()
18610{
18611return gss_init_sec_context ();
18612 ;
18613 return 0;
18614}
18615_ACEOF
18616if ac_fn_c_try_link "$LINENO"; then :
18617 ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes
18618else
18619 ac_cv_lib_gssapi_krb5_gss_init_sec_context=no
18620fi
18621rm -f core conftest.err conftest.$ac_objext \
18622 conftest$ac_exeext conftest.$ac_ext
18623LIBS=$ac_check_lib_save_LIBS
18624fi
18625{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5
18626$as_echo "$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6; }
18627if test "x$ac_cv_lib_gssapi_krb5_gss_init_sec_context" = xyes; then :
18628 $as_echo "#define GSSAPI 1" >>confdefs.h
18629
18630 GSSLIBS="-lgssapi_krb5"
18631else
18632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi" >&5
18633$as_echo_n "checking for gss_init_sec_context in -lgssapi... " >&6; }
18634if ${ac_cv_lib_gssapi_gss_init_sec_context+:} false; then :
18635 $as_echo_n "(cached) " >&6
18636else
18637 ac_check_lib_save_LIBS=$LIBS
18638LIBS="-lgssapi $LIBS"
18639cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18640/* end confdefs.h. */
18641
18642/* Override any GCC internal prototype to avoid an error.
18643 Use char because int might match the return type of a GCC
18644 builtin and then its argument prototype would still apply. */
18645#ifdef __cplusplus
18646extern "C"
18647#endif
18648char gss_init_sec_context ();
18649int
18650main ()
18651{
18652return gss_init_sec_context ();
18653 ;
18654 return 0;
18655}
18656_ACEOF
18657if ac_fn_c_try_link "$LINENO"; then :
18658 ac_cv_lib_gssapi_gss_init_sec_context=yes
18659else
18660 ac_cv_lib_gssapi_gss_init_sec_context=no
18661fi
18662rm -f core conftest.err conftest.$ac_objext \
18663 conftest$ac_exeext conftest.$ac_ext
18664LIBS=$ac_check_lib_save_LIBS
18665fi
18666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5
18667$as_echo "$ac_cv_lib_gssapi_gss_init_sec_context" >&6; }
18668if test "x$ac_cv_lib_gssapi_gss_init_sec_context" = xyes; then :
18669 $as_echo "#define GSSAPI 1" >>confdefs.h
18670
18671 GSSLIBS="-lgssapi"
18672else
18673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgss" >&5
18674$as_echo_n "checking for gss_init_sec_context in -lgss... " >&6; }
18675if ${ac_cv_lib_gss_gss_init_sec_context+:} false; then :
18676 $as_echo_n "(cached) " >&6
18677else
18678 ac_check_lib_save_LIBS=$LIBS
18679LIBS="-lgss $LIBS"
18680cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18681/* end confdefs.h. */
18682
18683/* Override any GCC internal prototype to avoid an error.
18684 Use char because int might match the return type of a GCC
18685 builtin and then its argument prototype would still apply. */
18686#ifdef __cplusplus
18687extern "C"
18688#endif
18689char gss_init_sec_context ();
18690int
18691main ()
18692{
18693return gss_init_sec_context ();
18694 ;
18695 return 0;
18696}
18697_ACEOF
18698if ac_fn_c_try_link "$LINENO"; then :
18699 ac_cv_lib_gss_gss_init_sec_context=yes
18700else
18701 ac_cv_lib_gss_gss_init_sec_context=no
18702fi
18703rm -f core conftest.err conftest.$ac_objext \
18704 conftest$ac_exeext conftest.$ac_ext
18705LIBS=$ac_check_lib_save_LIBS
18706fi
18707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_init_sec_context" >&5
18708$as_echo "$ac_cv_lib_gss_gss_init_sec_context" >&6; }
18709if test "x$ac_cv_lib_gss_gss_init_sec_context" = xyes; then :
18710 $as_echo "#define GSSAPI 1" >>confdefs.h
18711
18712 GSSLIBS="-lgss"
18713else
18714 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api library - build may fail" >&5
18715$as_echo "$as_me: WARNING: Cannot find any suitable gss-api library - build may fail" >&2;}
18716fi
18717
18718
18719fi
18720
18721
18722fi
18723
18724
18725 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
18726if test "x$ac_cv_header_gssapi_h" = xyes; then :
18727
18728else
18729 unset ac_cv_header_gssapi_h
18730 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
18731 for ac_header in gssapi.h
18732do :
18733 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
18734if test "x$ac_cv_header_gssapi_h" = xyes; then :
18735 cat >>confdefs.h <<_ACEOF
18736#define HAVE_GSSAPI_H 1
18737_ACEOF
18738
18739else
18740 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api header - build may fail" >&5
18741$as_echo "$as_me: WARNING: Cannot find any suitable gss-api header - build may fail" >&2;}
18742
18743fi
18744
18745done
18746
18747
18748
18749fi
18750
18751
18752
18753 oldCPP="$CPPFLAGS"
18754 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
18755 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_krb5.h" "ac_cv_header_gssapi_krb5_h" "$ac_includes_default"
18756if test "x$ac_cv_header_gssapi_krb5_h" = xyes; then :
18757
18758else
18759 CPPFLAGS="$oldCPP"
18760fi
18761
18762
18763
18764 fi
18765 if test -n "${rpath_opt}" ; then
18766 LDFLAGS="$LDFLAGS ${rpath_opt}${KRB5ROOT}/lib"
18767 fi
18768 if test ! -z "$blibpath" ; then
18769 blibpath="$blibpath:${KRB5ROOT}/lib"
18770 fi
18771
18772 for ac_header in gssapi.h gssapi/gssapi.h
18773do :
18774 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18775ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18776if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18777 cat >>confdefs.h <<_ACEOF
18778#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18779_ACEOF
18780
18781fi
18782
18783done
18784
18785 for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h
18786do :
18787 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18788ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18789if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18790 cat >>confdefs.h <<_ACEOF
18791#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18792_ACEOF
18793
18794fi
18795
18796done
18797
18798 for ac_header in gssapi_generic.h gssapi/gssapi_generic.h
18799do :
18800 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18801ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18802if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18803 cat >>confdefs.h <<_ACEOF
18804#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18805_ACEOF
18806
18807fi
18808
18809done
18810
18811
18812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing k_hasafs" >&5
18813$as_echo_n "checking for library containing k_hasafs... " >&6; }
18814if ${ac_cv_search_k_hasafs+:} false; then :
18815 $as_echo_n "(cached) " >&6
18816else
18817 ac_func_search_save_LIBS=$LIBS
18818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18819/* end confdefs.h. */
18820
18821/* Override any GCC internal prototype to avoid an error.
18822 Use char because int might match the return type of a GCC
18823 builtin and then its argument prototype would still apply. */
18824#ifdef __cplusplus
18825extern "C"
18826#endif
18827char k_hasafs ();
18828int
18829main ()
18830{
18831return k_hasafs ();
18832 ;
18833 return 0;
18834}
18835_ACEOF
18836for ac_lib in '' kafs; do
18837 if test -z "$ac_lib"; then
18838 ac_res="none required"
18839 else
18840 ac_res=-l$ac_lib
18841 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18842 fi
18843 if ac_fn_c_try_link "$LINENO"; then :
18844 ac_cv_search_k_hasafs=$ac_res
18845fi
18846rm -f core conftest.err conftest.$ac_objext \
18847 conftest$ac_exeext
18848 if ${ac_cv_search_k_hasafs+:} false; then :
18849 break
18850fi
18851done
18852if ${ac_cv_search_k_hasafs+:} false; then :
18853
18854else
18855 ac_cv_search_k_hasafs=no
18856fi
18857rm conftest.$ac_ext
18858LIBS=$ac_func_search_save_LIBS
18859fi
18860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_k_hasafs" >&5
18861$as_echo "$ac_cv_search_k_hasafs" >&6; }
18862ac_res=$ac_cv_search_k_hasafs
18863if test "$ac_res" != no; then :
18864 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18865
18866$as_echo "#define USE_AFS 1" >>confdefs.h
18867
18868fi
18869
18870
18871 ac_fn_c_check_decl "$LINENO" "GSS_C_NT_HOSTBASED_SERVICE" "ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" "
18872#ifdef HAVE_GSSAPI_H
18873# include <gssapi.h>
18874#elif defined(HAVE_GSSAPI_GSSAPI_H)
18875# include <gssapi/gssapi.h>
18876#endif
18877
18878#ifdef HAVE_GSSAPI_GENERIC_H
18879# include <gssapi_generic.h>
18880#elif defined(HAVE_GSSAPI_GSSAPI_GENERIC_H)
18881# include <gssapi/gssapi_generic.h>
18882#endif
18883
18884"
18885if test "x$ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" = xyes; then :
18886 ac_have_decl=1
18887else
18888 ac_have_decl=0
18889fi
18890
18891cat >>confdefs.h <<_ACEOF
18892#define HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE $ac_have_decl
18893_ACEOF
18894
18895 saved_LIBS="$LIBS"
18896 LIBS="$LIBS $K5LIBS"
18897 for ac_func in krb5_cc_new_unique krb5_get_error_message krb5_free_error_message
18898do :
18899 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18900ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18901if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18902 cat >>confdefs.h <<_ACEOF
18903#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18904_ACEOF
18905
18906fi
18907done
18908
18909 LIBS="$saved_LIBS"
18910
18911 fi
18912
18913
18914fi
18915
18916
18917
18918
18919# Looking for programs, paths and files
18920
18921PRIVSEP_PATH=/var/empty
18922
18923# Check whether --with-privsep-path was given.
18924if test "${with_privsep_path+set}" = set; then :
18925 withval=$with_privsep_path;
18926 if test -n "$withval" && test "x$withval" != "xno" && \
18927 test "x${withval}" != "xyes"; then
18928 PRIVSEP_PATH=$withval
18929 fi
18930
18931
18932fi
18933
18934
18935
18936
18937# Check whether --with-xauth was given.
18938if test "${with_xauth+set}" = set; then :
18939 withval=$with_xauth;
18940 if test -n "$withval" && test "x$withval" != "xno" && \
18941 test "x${withval}" != "xyes"; then
18942 xauth_path=$withval
18943 fi
18944
18945else
18946
18947 TestPath="$PATH"
18948 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X/bin"
18949 TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11"
18950 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin"
18951 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
18952 # Extract the first word of "xauth", so it can be a program name with args.
18953set dummy xauth; ac_word=$2
18954{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18955$as_echo_n "checking for $ac_word... " >&6; }
18956if ${ac_cv_path_xauth_path+:} false; then :
18957 $as_echo_n "(cached) " >&6
18958else
18959 case $xauth_path in
18960 [\\/]* | ?:[\\/]*)
18961 ac_cv_path_xauth_path="$xauth_path" # Let the user override the test with a path.
18962 ;;
18963 *)
18964 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18965for as_dir in $TestPath
18966do
18967 IFS=$as_save_IFS
18968 test -z "$as_dir" && as_dir=.
18969 for ac_exec_ext in '' $ac_executable_extensions; do
18970 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18971 ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext"
18972 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18973 break 2
18974 fi
18975done
18976 done
18977IFS=$as_save_IFS
18978
18979 ;;
18980esac
18981fi
18982xauth_path=$ac_cv_path_xauth_path
18983if test -n "$xauth_path"; then
18984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xauth_path" >&5
18985$as_echo "$xauth_path" >&6; }
18986else
18987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18988$as_echo "no" >&6; }
18989fi
18990
18991
18992 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
18993 xauth_path="/usr/openwin/bin/xauth"
18994 fi
18995
18996
18997fi
18998
18999
19000STRIP_OPT=-s
19001# Check whether --enable-strip was given.
19002if test "${enable_strip+set}" = set; then :
19003 enableval=$enable_strip;
19004 if test "x$enableval" = "xno" ; then
19005 STRIP_OPT=
19006 fi
19007
19008
19009fi
19010
19011
19012
19013if test -z "$xauth_path" ; then
19014 XAUTH_PATH="undefined"
19015
19016else
19017
19018cat >>confdefs.h <<_ACEOF
19019#define XAUTH_PATH "$xauth_path"
19020_ACEOF
19021
19022 XAUTH_PATH=$xauth_path
19023
19024fi
19025
19026# Check for mail directory
19027
19028# Check whether --with-maildir was given.
19029if test "${with_maildir+set}" = set; then :
19030 withval=$with_maildir;
19031 if test "X$withval" != X && test "x$withval" != xno && \
19032 test "x${withval}" != xyes; then
19033
19034cat >>confdefs.h <<_ACEOF
19035#define MAIL_DIRECTORY "$withval"
19036_ACEOF
19037
19038 fi
19039
19040else
19041
19042 if test "X$maildir" != "X"; then
19043 cat >>confdefs.h <<_ACEOF
19044#define MAIL_DIRECTORY "$maildir"
19045_ACEOF
19046
19047 else
19048 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Discovering system mail directory" >&5
19049$as_echo_n "checking Discovering system mail directory... " >&6; }
19050 if test "$cross_compiling" = yes; then :
19051
19052 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&5
19053$as_echo "$as_me: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&2;}
19054
19055
19056else
19057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19058/* end confdefs.h. */
19059
19060#include <stdio.h>
19061#include <string.h>
19062#ifdef HAVE_PATHS_H
19063#include <paths.h>
19064#endif
19065#ifdef HAVE_MAILLOCK_H
19066#include <maillock.h>
19067#endif
19068#define DATA "conftest.maildir"
19069
19070int
19071main ()
19072{
19073
19074 FILE *fd;
19075 int rc;
19076
19077 fd = fopen(DATA,"w");
19078 if(fd == NULL)
19079 exit(1);
19080
19081#if defined (_PATH_MAILDIR)
19082 if ((rc = fprintf(fd ,"_PATH_MAILDIR:%s\n", _PATH_MAILDIR)) <0)
19083 exit(1);
19084#elif defined (MAILDIR)
19085 if ((rc = fprintf(fd ,"MAILDIR:%s\n", MAILDIR)) <0)
19086 exit(1);
19087#elif defined (_PATH_MAIL)
19088 if ((rc = fprintf(fd ,"_PATH_MAIL:%s\n", _PATH_MAIL)) <0)
19089 exit(1);
19090#else
19091 exit (2);
19092#endif
19093
19094 exit(0);
19095
19096 ;
19097 return 0;
19098}
19099_ACEOF
19100if ac_fn_c_try_run "$LINENO"; then :
19101
19102 maildir_what=`awk -F: '{print $1}' conftest.maildir`
19103 maildir=`awk -F: '{print $2}' conftest.maildir \
19104 | sed 's|/$||'`
19105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: $maildir from $maildir_what" >&5
19106$as_echo "Using: $maildir from $maildir_what" >&6; }
19107 if test "x$maildir_what" != "x_PATH_MAILDIR"; then
19108 cat >>confdefs.h <<_ACEOF
19109#define MAIL_DIRECTORY "$maildir"
19110_ACEOF
19111
19112 fi
19113
19114else
19115
19116 if test "X$ac_status" = "X2";then
19117# our test program didn't find it. Default to /var/spool/mail
19118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: default value of /var/spool/mail" >&5
19119$as_echo "Using: default value of /var/spool/mail" >&6; }
19120 cat >>confdefs.h <<_ACEOF
19121#define MAIL_DIRECTORY "/var/spool/mail"
19122_ACEOF
19123
19124 else
19125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** not found ***" >&5
19126$as_echo "*** not found ***" >&6; }
19127 fi
19128
19129fi
19130rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19131 conftest.$ac_objext conftest.beam conftest.$ac_ext
19132fi
19133
19134 fi
19135
19136
19137fi
19138 # maildir
19139
19140if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
19141 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptmx test" >&5
19142$as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptmx test" >&2;}
19143 disable_ptmx_check=yes
19144fi
19145if test -z "$no_dev_ptmx" ; then
19146 if test "x$disable_ptmx_check" != "xyes" ; then
19147 as_ac_File=`$as_echo "ac_cv_file_"/dev/ptmx"" | $as_tr_sh`
19148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptmx\"" >&5
19149$as_echo_n "checking for \"/dev/ptmx\"... " >&6; }
19150if eval \${$as_ac_File+:} false; then :
19151 $as_echo_n "(cached) " >&6
19152else
19153 test "$cross_compiling" = yes &&
19154 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
19155if test -r ""/dev/ptmx""; then
19156 eval "$as_ac_File=yes"
19157else
19158 eval "$as_ac_File=no"
19159fi
19160fi
19161eval ac_res=\$$as_ac_File
19162 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19163$as_echo "$ac_res" >&6; }
19164if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
19165
19166
19167cat >>confdefs.h <<_ACEOF
19168#define HAVE_DEV_PTMX 1
19169_ACEOF
19170
19171 have_dev_ptmx=1
19172
19173
19174fi
19175
19176 fi
19177fi
19178
19179if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
19180 as_ac_File=`$as_echo "ac_cv_file_"/dev/ptc"" | $as_tr_sh`
19181{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptc\"" >&5
19182$as_echo_n "checking for \"/dev/ptc\"... " >&6; }
19183if eval \${$as_ac_File+:} false; then :
19184 $as_echo_n "(cached) " >&6
19185else
19186 test "$cross_compiling" = yes &&
19187 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
19188if test -r ""/dev/ptc""; then
19189 eval "$as_ac_File=yes"
19190else
19191 eval "$as_ac_File=no"
19192fi
19193fi
19194eval ac_res=\$$as_ac_File
19195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19196$as_echo "$ac_res" >&6; }
19197if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
19198
19199
19200cat >>confdefs.h <<_ACEOF
19201#define HAVE_DEV_PTS_AND_PTC 1
19202_ACEOF
19203
19204 have_dev_ptc=1
19205
19206
19207fi
19208
19209else
19210 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptc test" >&5
19211$as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptc test" >&2;}
19212fi
19213
19214# Options from here on. Some of these are preset by platform above
19215
19216# Check whether --with-mantype was given.
19217if test "${with_mantype+set}" = set; then :
19218 withval=$with_mantype;
19219 case "$withval" in
19220 man|cat|doc)
19221 MANTYPE=$withval
19222 ;;
19223 *)
19224 as_fn_error $? "invalid man type: $withval" "$LINENO" 5
19225 ;;
19226 esac
19227
19228
19229fi
19230
19231if test -z "$MANTYPE"; then
19232 if ${MANDOC} ${srcdir}/ssh.1 >/dev/null 2>&1; then
19233 MANTYPE=doc
19234 elif ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
19235 MANTYPE=doc
19236 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
19237 MANTYPE=man
19238 else
19239 MANTYPE=cat
19240 fi
19241fi
19242
19243if test "$MANTYPE" = "doc"; then
19244 mansubdir=man;
19245else
19246 mansubdir=$MANTYPE;
19247fi
19248
19249
19250# Check whether to enable MD5 passwords
19251MD5_MSG="no"
19252
19253# Check whether --with-md5-passwords was given.
19254if test "${with_md5_passwords+set}" = set; then :
19255 withval=$with_md5_passwords;
19256 if test "x$withval" != "xno" ; then
19257
19258$as_echo "#define HAVE_MD5_PASSWORDS 1" >>confdefs.h
19259
19260 MD5_MSG="yes"
19261 fi
19262
19263
19264fi
19265
19266
19267# Whether to disable shadow password support
19268
19269# Check whether --with-shadow was given.
19270if test "${with_shadow+set}" = set; then :
19271 withval=$with_shadow;
19272 if test "x$withval" = "xno" ; then
19273 $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
19274
19275 disable_shadow=yes
19276 fi
19277
19278
19279fi
19280
19281
19282if test -z "$disable_shadow" ; then
19283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the systems has expire shadow information" >&5
19284$as_echo_n "checking if the systems has expire shadow information... " >&6; }
19285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19286/* end confdefs.h. */
19287
19288#include <sys/types.h>
19289#include <shadow.h>
19290struct spwd sp;
19291
19292int
19293main ()
19294{
19295 sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0;
19296 ;
19297 return 0;
19298}
19299_ACEOF
19300if ac_fn_c_try_compile "$LINENO"; then :
19301 sp_expire_available=yes
19302fi
19303rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19304
19305 if test "x$sp_expire_available" = "xyes" ; then
19306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19307$as_echo "yes" >&6; }
19308
19309$as_echo "#define HAS_SHADOW_EXPIRE 1" >>confdefs.h
19310
19311 else
19312 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19313$as_echo "no" >&6; }
19314 fi
19315fi
19316
19317# Use ip address instead of hostname in $DISPLAY
19318if test ! -z "$IPADDR_IN_DISPLAY" ; then
19319 DISPLAY_HACK_MSG="yes"
19320
19321$as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
19322
19323else
19324 DISPLAY_HACK_MSG="no"
19325
19326# Check whether --with-ipaddr-display was given.
19327if test "${with_ipaddr_display+set}" = set; then :
19328 withval=$with_ipaddr_display;
19329 if test "x$withval" != "xno" ; then
19330 $as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
19331
19332 DISPLAY_HACK_MSG="yes"
19333 fi
19334
19335
19336fi
19337
19338fi
19339
19340# check for /etc/default/login and use it if present.
19341# Check whether --enable-etc-default-login was given.
19342if test "${enable_etc_default_login+set}" = set; then :
19343 enableval=$enable_etc_default_login; if test "x$enableval" = "xno"; then
19344 { $as_echo "$as_me:${as_lineno-$LINENO}: /etc/default/login handling disabled" >&5
19345$as_echo "$as_me: /etc/default/login handling disabled" >&6;}
19346 etc_default_login=no
19347 else
19348 etc_default_login=yes
19349 fi
19350else
19351 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
19352 then
19353 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking /etc/default/login" >&5
19354$as_echo "$as_me: WARNING: cross compiling: not checking /etc/default/login" >&2;}
19355 etc_default_login=no
19356 else
19357 etc_default_login=yes
19358 fi
19359
19360fi
19361
19362
19363if test "x$etc_default_login" != "xno"; then
19364 as_ac_File=`$as_echo "ac_cv_file_"/etc/default/login"" | $as_tr_sh`
19365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/etc/default/login\"" >&5
19366$as_echo_n "checking for \"/etc/default/login\"... " >&6; }
19367if eval \${$as_ac_File+:} false; then :
19368 $as_echo_n "(cached) " >&6
19369else
19370 test "$cross_compiling" = yes &&
19371 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
19372if test -r ""/etc/default/login""; then
19373 eval "$as_ac_File=yes"
19374else
19375 eval "$as_ac_File=no"
19376fi
19377fi
19378eval ac_res=\$$as_ac_File
19379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19380$as_echo "$ac_res" >&6; }
19381if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
19382 external_path_file=/etc/default/login
19383fi
19384
19385 if test "x$external_path_file" = "x/etc/default/login"; then
19386
19387$as_echo "#define HAVE_ETC_DEFAULT_LOGIN 1" >>confdefs.h
19388
19389 fi
19390fi
19391
19392if test $ac_cv_func_login_getcapbool = "yes" && \
19393 test $ac_cv_header_login_cap_h = "yes" ; then
19394 external_path_file=/etc/login.conf
19395fi
19396
19397# Whether to mess with the default path
19398SERVER_PATH_MSG="(default)"
19399
19400# Check whether --with-default-path was given.
19401if test "${with_default_path+set}" = set; then :
19402 withval=$with_default_path;
19403 if test "x$external_path_file" = "x/etc/login.conf" ; then
19404 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
19405--with-default-path=PATH has no effect on this system.
19406Edit /etc/login.conf instead." >&5
19407$as_echo "$as_me: WARNING:
19408--with-default-path=PATH has no effect on this system.
19409Edit /etc/login.conf instead." >&2;}
19410 elif test "x$withval" != "xno" ; then
19411 if test ! -z "$external_path_file" ; then
19412 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
19413--with-default-path=PATH will only be used if PATH is not defined in
19414$external_path_file ." >&5
19415$as_echo "$as_me: WARNING:
19416--with-default-path=PATH will only be used if PATH is not defined in
19417$external_path_file ." >&2;}
19418 fi
19419 user_path="$withval"
19420 SERVER_PATH_MSG="$withval"
19421 fi
19422
19423else
19424 if test "x$external_path_file" = "x/etc/login.conf" ; then
19425 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Make sure the path to scp is in /etc/login.conf" >&5
19426$as_echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;}
19427 else
19428 if test ! -z "$external_path_file" ; then
19429 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
19430If PATH is defined in $external_path_file, ensure the path to scp is included,
19431otherwise scp will not work." >&5
19432$as_echo "$as_me: WARNING:
19433If PATH is defined in $external_path_file, ensure the path to scp is included,
19434otherwise scp will not work." >&2;}
19435 fi
19436 if test "$cross_compiling" = yes; then :
19437 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
19438
19439else
19440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19441/* end confdefs.h. */
19442
19443/* find out what STDPATH is */
19444#include <stdio.h>
19445#ifdef HAVE_PATHS_H
19446# include <paths.h>
19447#endif
19448#ifndef _PATH_STDPATH
19449# ifdef _PATH_USERPATH /* Irix */
19450# define _PATH_STDPATH _PATH_USERPATH
19451# else
19452# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
19453# endif
19454#endif
19455#include <sys/types.h>
19456#include <sys/stat.h>
19457#include <fcntl.h>
19458#define DATA "conftest.stdpath"
19459
19460int
19461main ()
19462{
19463
19464 FILE *fd;
19465 int rc;
19466
19467 fd = fopen(DATA,"w");
19468 if(fd == NULL)
19469 exit(1);
19470
19471 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
19472 exit(1);
19473
19474 exit(0);
19475
19476 ;
19477 return 0;
19478}
19479_ACEOF
19480if ac_fn_c_try_run "$LINENO"; then :
19481 user_path=`cat conftest.stdpath`
19482else
19483 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
19484fi
19485rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19486 conftest.$ac_objext conftest.beam conftest.$ac_ext
19487fi
19488
19489# make sure $bindir is in USER_PATH so scp will work
19490 t_bindir="${bindir}"
19491 while echo "${t_bindir}" | egrep '\$\{|NONE/' >/dev/null 2>&1; do
19492 t_bindir=`eval echo ${t_bindir}`
19493 case $t_bindir in
19494 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
19495 esac
19496 case $t_bindir in
19497 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
19498 esac
19499 done
19500 echo $user_path | grep ":$t_bindir" > /dev/null 2>&1
19501 if test $? -ne 0 ; then
19502 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
19503 if test $? -ne 0 ; then
19504 user_path=$user_path:$t_bindir
19505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Adding $t_bindir to USER_PATH so scp will work" >&5
19506$as_echo "Adding $t_bindir to USER_PATH so scp will work" >&6; }
19507 fi
19508 fi
19509 fi
19510
19511fi
19512
19513if test "x$external_path_file" != "x/etc/login.conf" ; then
19514
19515cat >>confdefs.h <<_ACEOF
19516#define USER_PATH "$user_path"
19517_ACEOF
19518
19519
19520fi
19521
19522# Set superuser path separately to user path
19523
19524# Check whether --with-superuser-path was given.
19525if test "${with_superuser_path+set}" = set; then :
19526 withval=$with_superuser_path;
19527 if test -n "$withval" && test "x$withval" != "xno" && \
19528 test "x${withval}" != "xyes"; then
19529
19530cat >>confdefs.h <<_ACEOF
19531#define SUPERUSER_PATH "$withval"
19532_ACEOF
19533
19534 superuser_path=$withval
19535 fi
19536
19537
19538fi
19539
19540
19541
19542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
19543$as_echo_n "checking if we need to convert IPv4 in IPv6-mapped addresses... " >&6; }
19544IPV4_IN6_HACK_MSG="no"
19545
19546# Check whether --with-4in6 was given.
19547if test "${with_4in6+set}" = set; then :
19548 withval=$with_4in6;
19549 if test "x$withval" != "xno" ; then
19550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19551$as_echo "yes" >&6; }
19552
19553$as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
19554
19555 IPV4_IN6_HACK_MSG="yes"
19556 else
19557 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19558$as_echo "no" >&6; }
19559 fi
19560
19561else
19562
19563 if test "x$inet6_default_4in6" = "xyes"; then
19564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
19565$as_echo "yes (default)" >&6; }
19566 $as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
19567
19568 IPV4_IN6_HACK_MSG="yes"
19569 else
19570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5
19571$as_echo "no (default)" >&6; }
19572 fi
19573
19574
19575fi
19576
19577
19578# Whether to enable BSD auth support
19579BSD_AUTH_MSG=no
19580
19581# Check whether --with-bsd-auth was given.
19582if test "${with_bsd_auth+set}" = set; then :
19583 withval=$with_bsd_auth;
19584 if test "x$withval" != "xno" ; then
19585
19586$as_echo "#define BSD_AUTH 1" >>confdefs.h
19587
19588 BSD_AUTH_MSG=yes
19589 fi
19590
19591
19592fi
19593
19594
19595# Where to place sshd.pid
19596piddir=/var/run
19597# make sure the directory exists
19598if test ! -d $piddir ; then
19599 piddir=`eval echo ${sysconfdir}`
19600 case $piddir in
19601 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
19602 esac
19603fi
19604
19605
19606# Check whether --with-pid-dir was given.
19607if test "${with_pid_dir+set}" = set; then :
19608 withval=$with_pid_dir;
19609 if test -n "$withval" && test "x$withval" != "xno" && \
19610 test "x${withval}" != "xyes"; then
19611 piddir=$withval
19612 if test ! -d $piddir ; then
19613 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** no $piddir directory on this system **" >&5
19614$as_echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;}
19615 fi
19616 fi
19617
19618
19619fi
19620
19621
19622
19623cat >>confdefs.h <<_ACEOF
19624#define _PATH_SSH_PIDDIR "$piddir"
19625_ACEOF
19626
19627
19628
19629# Check whether --enable-lastlog was given.
19630if test "${enable_lastlog+set}" = set; then :
19631 enableval=$enable_lastlog;
19632 if test "x$enableval" = "xno" ; then
19633 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
19634
19635 fi
19636
19637
19638fi
19639
19640# Check whether --enable-utmp was given.
19641if test "${enable_utmp+set}" = set; then :
19642 enableval=$enable_utmp;
19643 if test "x$enableval" = "xno" ; then
19644 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
19645
19646 fi
19647
19648
19649fi
19650
19651# Check whether --enable-utmpx was given.
19652if test "${enable_utmpx+set}" = set; then :
19653 enableval=$enable_utmpx;
19654 if test "x$enableval" = "xno" ; then
19655
19656$as_echo "#define DISABLE_UTMPX 1" >>confdefs.h
19657
19658 fi
19659
19660
19661fi
19662
19663# Check whether --enable-wtmp was given.
19664if test "${enable_wtmp+set}" = set; then :
19665 enableval=$enable_wtmp;
19666 if test "x$enableval" = "xno" ; then
19667 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
19668
19669 fi
19670
19671
19672fi
19673
19674# Check whether --enable-wtmpx was given.
19675if test "${enable_wtmpx+set}" = set; then :
19676 enableval=$enable_wtmpx;
19677 if test "x$enableval" = "xno" ; then
19678
19679$as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
19680
19681 fi
19682
19683
19684fi
19685
19686# Check whether --enable-libutil was given.
19687if test "${enable_libutil+set}" = set; then :
19688 enableval=$enable_libutil;
19689 if test "x$enableval" = "xno" ; then
19690 $as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
19691
19692 fi
19693
19694
19695fi
19696
19697# Check whether --enable-pututline was given.
19698if test "${enable_pututline+set}" = set; then :
19699 enableval=$enable_pututline;
19700 if test "x$enableval" = "xno" ; then
19701
19702$as_echo "#define DISABLE_PUTUTLINE 1" >>confdefs.h
19703
19704 fi
19705
19706
19707fi
19708
19709# Check whether --enable-pututxline was given.
19710if test "${enable_pututxline+set}" = set; then :
19711 enableval=$enable_pututxline;
19712 if test "x$enableval" = "xno" ; then
19713
19714$as_echo "#define DISABLE_PUTUTXLINE 1" >>confdefs.h
19715
19716 fi
19717
19718
19719fi
19720
19721
19722# Check whether --with-lastlog was given.
19723if test "${with_lastlog+set}" = set; then :
19724 withval=$with_lastlog;
19725 if test "x$withval" = "xno" ; then
19726 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
19727
19728 elif test -n "$withval" && test "x${withval}" != "xyes"; then
19729 conf_lastlog_location=$withval
19730 fi
19731
19732
19733fi
19734
19735
19736
19737{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines LASTLOG_FILE" >&5
19738$as_echo_n "checking if your system defines LASTLOG_FILE... " >&6; }
19739cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19740/* end confdefs.h. */
19741
19742#include <sys/types.h>
19743#include <utmp.h>
19744#ifdef HAVE_LASTLOG_H
19745# include <lastlog.h>
19746#endif
19747#ifdef HAVE_PATHS_H
19748# include <paths.h>
19749#endif
19750#ifdef HAVE_LOGIN_H
19751# include <login.h>
19752#endif
19753
19754int
19755main ()
19756{
19757 char *lastlog = LASTLOG_FILE;
19758 ;
19759 return 0;
19760}
19761_ACEOF
19762if ac_fn_c_try_compile "$LINENO"; then :
19763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19764$as_echo "yes" >&6; }
19765else
19766
19767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19768$as_echo "no" >&6; }
19769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines _PATH_LASTLOG" >&5
19770$as_echo_n "checking if your system defines _PATH_LASTLOG... " >&6; }
19771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19772/* end confdefs.h. */
19773
19774#include <sys/types.h>
19775#include <utmp.h>
19776#ifdef HAVE_LASTLOG_H
19777# include <lastlog.h>
19778#endif
19779#ifdef HAVE_PATHS_H
19780# include <paths.h>
19781#endif
19782
19783int
19784main ()
19785{
19786 char *lastlog = _PATH_LASTLOG;
19787 ;
19788 return 0;
19789}
19790_ACEOF
19791if ac_fn_c_try_compile "$LINENO"; then :
19792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19793$as_echo "yes" >&6; }
19794else
19795
19796 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19797$as_echo "no" >&6; }
19798 system_lastlog_path=no
19799
19800fi
19801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19802
19803fi
19804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19805
19806if test -z "$conf_lastlog_location"; then
19807 if test x"$system_lastlog_path" = x"no" ; then
19808 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
19809 if (test -d "$f" || test -f "$f") ; then
19810 conf_lastlog_location=$f
19811 fi
19812 done
19813 if test -z "$conf_lastlog_location"; then
19814 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** Cannot find lastlog **" >&5
19815$as_echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;}
19816 fi
19817 fi
19818fi
19819
19820if test -n "$conf_lastlog_location"; then
19821
19822cat >>confdefs.h <<_ACEOF
19823#define CONF_LASTLOG_FILE "$conf_lastlog_location"
19824_ACEOF
19825
19826fi
19827
19828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines UTMP_FILE" >&5
19829$as_echo_n "checking if your system defines UTMP_FILE... " >&6; }
19830cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19831/* end confdefs.h. */
19832
19833#include <sys/types.h>
19834#include <utmp.h>
19835#ifdef HAVE_PATHS_H
19836# include <paths.h>
19837#endif
19838
19839int
19840main ()
19841{
19842 char *utmp = UTMP_FILE;
19843 ;
19844 return 0;
19845}
19846_ACEOF
19847if ac_fn_c_try_compile "$LINENO"; then :
19848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19849$as_echo "yes" >&6; }
19850else
19851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19852$as_echo "no" >&6; }
19853 system_utmp_path=no
19854
19855fi
19856rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19857if test -z "$conf_utmp_location"; then
19858 if test x"$system_utmp_path" = x"no" ; then
19859 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
19860 if test -f $f ; then
19861 conf_utmp_location=$f
19862 fi
19863 done
19864 if test -z "$conf_utmp_location"; then
19865 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
19866
19867 fi
19868 fi
19869fi
19870if test -n "$conf_utmp_location"; then
19871
19872cat >>confdefs.h <<_ACEOF
19873#define CONF_UTMP_FILE "$conf_utmp_location"
19874_ACEOF
19875
19876fi
19877
19878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMP_FILE" >&5
19879$as_echo_n "checking if your system defines WTMP_FILE... " >&6; }
19880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19881/* end confdefs.h. */
19882
19883#include <sys/types.h>
19884#include <utmp.h>
19885#ifdef HAVE_PATHS_H
19886# include <paths.h>
19887#endif
19888
19889int
19890main ()
19891{
19892 char *wtmp = WTMP_FILE;
19893 ;
19894 return 0;
19895}
19896_ACEOF
19897if ac_fn_c_try_compile "$LINENO"; then :
19898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19899$as_echo "yes" >&6; }
19900else
19901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19902$as_echo "no" >&6; }
19903 system_wtmp_path=no
19904
19905fi
19906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19907if test -z "$conf_wtmp_location"; then
19908 if test x"$system_wtmp_path" = x"no" ; then
19909 for f in /usr/adm/wtmp /var/log/wtmp; do
19910 if test -f $f ; then
19911 conf_wtmp_location=$f
19912 fi
19913 done
19914 if test -z "$conf_wtmp_location"; then
19915 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
19916
19917 fi
19918 fi
19919fi
19920if test -n "$conf_wtmp_location"; then
19921
19922cat >>confdefs.h <<_ACEOF
19923#define CONF_WTMP_FILE "$conf_wtmp_location"
19924_ACEOF
19925
19926fi
19927
19928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMPX_FILE" >&5
19929$as_echo_n "checking if your system defines WTMPX_FILE... " >&6; }
19930cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19931/* end confdefs.h. */
19932
19933#include <sys/types.h>
19934#include <utmp.h>
19935#ifdef HAVE_UTMPX_H
19936#include <utmpx.h>
19937#endif
19938#ifdef HAVE_PATHS_H
19939# include <paths.h>
19940#endif
19941
19942int
19943main ()
19944{
19945 char *wtmpx = WTMPX_FILE;
19946 ;
19947 return 0;
19948}
19949_ACEOF
19950if ac_fn_c_try_compile "$LINENO"; then :
19951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19952$as_echo "yes" >&6; }
19953else
19954 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19955$as_echo "no" >&6; }
19956 system_wtmpx_path=no
19957
19958fi
19959rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19960if test -z "$conf_wtmpx_location"; then
19961 if test x"$system_wtmpx_path" = x"no" ; then
19962 $as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
19963
19964 fi
19965else
19966
19967cat >>confdefs.h <<_ACEOF
19968#define CONF_WTMPX_FILE "$conf_wtmpx_location"
19969_ACEOF
19970
19971fi
19972
19973
19974if test ! -z "$blibpath" ; then
19975 LDFLAGS="$LDFLAGS $blibflags$blibpath"
19976 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&5
19977$as_echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;}
19978fi
19979
19980ac_fn_c_check_member "$LINENO" "struct lastlog" "ll_line" "ac_cv_member_struct_lastlog_ll_line" "
19981#ifdef HAVE_SYS_TYPES_H
19982#include <sys/types.h>
19983#endif
19984#ifdef HAVE_UTMP_H
19985#include <utmp.h>
19986#endif
19987#ifdef HAVE_UTMPX_H
19988#include <utmpx.h>
19989#endif
19990#ifdef HAVE_LASTLOG_H
19991#include <lastlog.h>
19992#endif
19993
19994"
19995if test "x$ac_cv_member_struct_lastlog_ll_line" = xyes; then :
19996
19997else
19998
19999 if test x$SKIP_DISABLE_LASTLOG_DEFINE != "xyes" ; then
20000 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
20001
20002 fi
20003
20004fi
20005
20006
20007ac_fn_c_check_member "$LINENO" "struct utmp" "ut_line" "ac_cv_member_struct_utmp_ut_line" "
20008#ifdef HAVE_SYS_TYPES_H
20009#include <sys/types.h>
20010#endif
20011#ifdef HAVE_UTMP_H
20012#include <utmp.h>
20013#endif
20014#ifdef HAVE_UTMPX_H
20015#include <utmpx.h>
20016#endif
20017#ifdef HAVE_LASTLOG_H
20018#include <lastlog.h>
20019#endif
20020
20021"
20022if test "x$ac_cv_member_struct_utmp_ut_line" = xyes; then :
20023
20024else
20025
20026 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
20027
20028 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
20029
20030
20031fi
20032
20033
20034CFLAGS="$CFLAGS $werror_flags"
20035
20036if test "x$ac_cv_func_getaddrinfo" != "xyes" ; then
20037 TEST_SSH_IPV6=no
20038else
20039 TEST_SSH_IPV6=yes
20040fi
20041ac_fn_c_check_decl "$LINENO" "BROKEN_GETADDRINFO" "ac_cv_have_decl_BROKEN_GETADDRINFO" "$ac_includes_default"
20042if test "x$ac_cv_have_decl_BROKEN_GETADDRINFO" = xyes; then :
20043 TEST_SSH_IPV6=no
20044fi
20045
20046TEST_SSH_IPV6=$TEST_SSH_IPV6
20047
20048TEST_SSH_UTF8=$TEST_SSH_UTF8
20049
20050TEST_MALLOC_OPTIONS=$TEST_MALLOC_OPTIONS
20051
20052UNSUPPORTED_ALGORITHMS=$unsupported_algorithms
20053
20054DEPEND=$(cat $srcdir/.depend)
20055
20056
20057CFLAGS="${CFLAGS} ${CFLAGS_AFTER}"
20058LDFLAGS="${LDFLAGS} ${LDFLAGS_AFTER}"
20059
20060# Make a copy of CFLAGS/LDFLAGS without PIE options.
20061LDFLAGS_NOPIE=`echo "$LDFLAGS" | sed 's/ -pie//'`
20062CFLAGS_NOPIE=`echo "$CFLAGS" | sed 's/ -fPIE//'`
20063
20064
20065
20066
20067ac_config_files="$ac_config_files Makefile buildpkg.sh opensshd.init openssh.xml openbsd-compat/Makefile openbsd-compat/regress/Makefile survey.sh"
20068
20069cat >confcache <<\_ACEOF
20070# This file is a shell script that caches the results of configure
20071# tests run on this system so they can be shared between configure
20072# scripts and configure runs, see configure's option --config-cache.
20073# It is not useful on other systems. If it contains results you don't
20074# want to keep, you may remove or edit it.
20075#
20076# config.status only pays attention to the cache file if you give it
20077# the --recheck option to rerun configure.
20078#
20079# `ac_cv_env_foo' variables (set or unset) will be overridden when
20080# loading this file, other *unset* `ac_cv_foo' will be assigned the
20081# following values.
20082
20083_ACEOF
20084
20085# The following way of writing the cache mishandles newlines in values,
20086# but we know of no workaround that is simple, portable, and efficient.
20087# So, we kill variables containing newlines.
20088# Ultrix sh set writes to stderr and can't be redirected directly,
20089# and sets the high bit in the cache file unless we assign to the vars.
20090(
20091 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
20092 eval ac_val=\$$ac_var
20093 case $ac_val in #(
20094 *${as_nl}*)
20095 case $ac_var in #(
20096 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
20097$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
20098 esac
20099 case $ac_var in #(
20100 _ | IFS | as_nl) ;; #(
20101 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
20102 *) { eval $ac_var=; unset $ac_var;} ;;
20103 esac ;;
20104 esac
20105 done
20106
20107 (set) 2>&1 |
20108 case $as_nl`(ac_space=' '; set) 2>&1` in #(
20109 *${as_nl}ac_space=\ *)
20110 # `set' does not quote correctly, so add quotes: double-quote
20111 # substitution turns \\\\ into \\, and sed turns \\ into \.
20112 sed -n \
20113 "s/'/'\\\\''/g;
20114 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
20115 ;; #(
20116 *)
20117 # `set' quotes correctly as required by POSIX, so do not add quotes.
20118 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
20119 ;;
20120 esac |
20121 sort
20122) |
20123 sed '
20124 /^ac_cv_env_/b end
20125 t clear
20126 :clear
20127 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
20128 t end
20129 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
20130 :end' >>confcache
20131if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
20132 if test -w "$cache_file"; then
20133 if test "x$cache_file" != "x/dev/null"; then
20134 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
20135$as_echo "$as_me: updating cache $cache_file" >&6;}
20136 if test ! -f "$cache_file" || test -h "$cache_file"; then
20137 cat confcache >"$cache_file"
20138 else
20139 case $cache_file in #(
20140 */* | ?:*)
20141 mv -f confcache "$cache_file"$$ &&
20142 mv -f "$cache_file"$$ "$cache_file" ;; #(
20143 *)
20144 mv -f confcache "$cache_file" ;;
20145 esac
20146 fi
20147 fi
20148 else
20149 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
20150$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
20151 fi
20152fi
20153rm -f confcache
20154
20155test "x$prefix" = xNONE && prefix=$ac_default_prefix
20156# Let make expand exec_prefix.
20157test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
20158
20159DEFS=-DHAVE_CONFIG_H
20160
20161ac_libobjs=
20162ac_ltlibobjs=
20163U=
20164for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
20165 # 1. Remove the extension, and $U if already installed.
20166 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
20167 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
20168 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
20169 # will be set to the directory where LIBOBJS objects are built.
20170 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
20171 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
20172done
20173LIBOBJS=$ac_libobjs
20174
20175LTLIBOBJS=$ac_ltlibobjs
20176
20177
20178
20179
20180: "${CONFIG_STATUS=./config.status}"
20181ac_write_fail=0
20182ac_clean_files_save=$ac_clean_files
20183ac_clean_files="$ac_clean_files $CONFIG_STATUS"
20184{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
20185$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
20186as_write_fail=0
20187cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
20188#! $SHELL
20189# Generated by $as_me.
20190# Run this file to recreate the current configuration.
20191# Compiler output produced by configure, useful for debugging
20192# configure, is in config.log if it exists.
20193
20194debug=false
20195ac_cs_recheck=false
20196ac_cs_silent=false
20197
20198SHELL=\${CONFIG_SHELL-$SHELL}
20199export SHELL
20200_ASEOF
20201cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
20202## -------------------- ##
20203## M4sh Initialization. ##
20204## -------------------- ##
20205
20206# Be more Bourne compatible
20207DUALCASE=1; export DUALCASE # for MKS sh
20208if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
20209 emulate sh
20210 NULLCMD=:
20211 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
20212 # is contrary to our usage. Disable this feature.
20213 alias -g '${1+"$@"}'='"$@"'
20214 setopt NO_GLOB_SUBST
20215else
20216 case `(set -o) 2>/dev/null` in #(
20217 *posix*) :
20218 set -o posix ;; #(
20219 *) :
20220 ;;
20221esac
20222fi
20223
20224
20225as_nl='
20226'
20227export as_nl
20228# Printing a long string crashes Solaris 7 /usr/bin/printf.
20229as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
20230as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
20231as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
20232# Prefer a ksh shell builtin over an external printf program on Solaris,
20233# but without wasting forks for bash or zsh.
20234if test -z "$BASH_VERSION$ZSH_VERSION" \
20235 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
20236 as_echo='print -r --'
20237 as_echo_n='print -rn --'
20238elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
20239 as_echo='printf %s\n'
20240 as_echo_n='printf %s'
20241else
20242 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
20243 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
20244 as_echo_n='/usr/ucb/echo -n'
20245 else
20246 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
20247 as_echo_n_body='eval
20248 arg=$1;
20249 case $arg in #(
20250 *"$as_nl"*)
20251 expr "X$arg" : "X\\(.*\\)$as_nl";
20252 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
20253 esac;
20254 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
20255 '
20256 export as_echo_n_body
20257 as_echo_n='sh -c $as_echo_n_body as_echo'
20258 fi
20259 export as_echo_body
20260 as_echo='sh -c $as_echo_body as_echo'
20261fi
20262
20263# The user is always right.
20264if test "${PATH_SEPARATOR+set}" != set; then
20265 PATH_SEPARATOR=:
20266 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
20267 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
20268 PATH_SEPARATOR=';'
20269 }
20270fi
20271
20272
20273# IFS
20274# We need space, tab and new line, in precisely that order. Quoting is
20275# there to prevent editors from complaining about space-tab.
20276# (If _AS_PATH_WALK were called with IFS unset, it would disable word
20277# splitting by setting IFS to empty value.)
20278IFS=" "" $as_nl"
20279
20280# Find who we are. Look in the path if we contain no directory separator.
20281as_myself=
20282case $0 in #((
20283 *[\\/]* ) as_myself=$0 ;;
20284 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20285for as_dir in $PATH
20286do
20287 IFS=$as_save_IFS
20288 test -z "$as_dir" && as_dir=.
20289 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
20290 done
20291IFS=$as_save_IFS
20292
20293 ;;
20294esac
20295# We did not find ourselves, most probably we were run as `sh COMMAND'
20296# in which case we are not to be found in the path.
20297if test "x$as_myself" = x; then
20298 as_myself=$0
20299fi
20300if test ! -f "$as_myself"; then
20301 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
20302 exit 1
20303fi
20304
20305# Unset variables that we do not need and which cause bugs (e.g. in
20306# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
20307# suppresses any "Segmentation fault" message there. '((' could
20308# trigger a bug in pdksh 5.2.14.
20309for as_var in BASH_ENV ENV MAIL MAILPATH
20310do eval test x\${$as_var+set} = xset \
20311 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
20312done
20313PS1='$ '
20314PS2='> '
20315PS4='+ '
20316
20317# NLS nuisances.
20318LC_ALL=C
20319export LC_ALL
20320LANGUAGE=C
20321export LANGUAGE
20322
20323# CDPATH.
20324(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
20325
20326
20327# as_fn_error STATUS ERROR [LINENO LOG_FD]
20328# ----------------------------------------
20329# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
20330# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
20331# script with STATUS, using 1 if that was 0.
20332as_fn_error ()
20333{
20334 as_status=$1; test $as_status -eq 0 && as_status=1
20335 if test "$4"; then
20336 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
20337 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
20338 fi
20339 $as_echo "$as_me: error: $2" >&2
20340 as_fn_exit $as_status
20341} # as_fn_error
20342
20343
20344# as_fn_set_status STATUS
20345# -----------------------
20346# Set $? to STATUS, without forking.
20347as_fn_set_status ()
20348{
20349 return $1
20350} # as_fn_set_status
20351
20352# as_fn_exit STATUS
20353# -----------------
20354# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
20355as_fn_exit ()
20356{
20357 set +e
20358 as_fn_set_status $1
20359 exit $1
20360} # as_fn_exit
20361
20362# as_fn_unset VAR
20363# ---------------
20364# Portably unset VAR.
20365as_fn_unset ()
20366{
20367 { eval $1=; unset $1;}
20368}
20369as_unset=as_fn_unset
20370# as_fn_append VAR VALUE
20371# ----------------------
20372# Append the text in VALUE to the end of the definition contained in VAR. Take
20373# advantage of any shell optimizations that allow amortized linear growth over
20374# repeated appends, instead of the typical quadratic growth present in naive
20375# implementations.
20376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20377 eval 'as_fn_append ()
20378 {
20379 eval $1+=\$2
20380 }'
20381else
20382 as_fn_append ()
20383 {
20384 eval $1=\$$1\$2
20385 }
20386fi # as_fn_append
20387
20388# as_fn_arith ARG...
20389# ------------------
20390# Perform arithmetic evaluation on the ARGs, and store the result in the
20391# global $as_val. Take advantage of shells that can avoid forks. The arguments
20392# must be portable across $(()) and expr.
20393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20394 eval 'as_fn_arith ()
20395 {
20396 as_val=$(( $* ))
20397 }'
20398else
20399 as_fn_arith ()
20400 {
20401 as_val=`expr "$@" || test $? -eq 1`
20402 }
20403fi # as_fn_arith
20404
20405
20406if expr a : '\(a\)' >/dev/null 2>&1 &&
20407 test "X`expr 00001 : '.*\(...\)'`" = X001; then
20408 as_expr=expr
20409else
20410 as_expr=false
20411fi
20412
20413if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20414 as_basename=basename
20415else
20416 as_basename=false
20417fi
20418
20419if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20420 as_dirname=dirname
20421else
20422 as_dirname=false
20423fi
20424
20425as_me=`$as_basename -- "$0" ||
20426$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20427 X"$0" : 'X\(//\)$' \| \
20428 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20429$as_echo X/"$0" |
20430 sed '/^.*\/\([^/][^/]*\)\/*$/{
20431 s//\1/
20432 q
20433 }
20434 /^X\/\(\/\/\)$/{
20435 s//\1/
20436 q
20437 }
20438 /^X\/\(\/\).*/{
20439 s//\1/
20440 q
20441 }
20442 s/.*/./; q'`
20443
20444# Avoid depending upon Character Ranges.
20445as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20446as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20447as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20448as_cr_digits='0123456789'
20449as_cr_alnum=$as_cr_Letters$as_cr_digits
20450
20451ECHO_C= ECHO_N= ECHO_T=
20452case `echo -n x` in #(((((
20453-n*)
20454 case `echo 'xy\c'` in
20455 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
20456 xy) ECHO_C='\c';;
20457 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
20458 ECHO_T=' ';;
20459 esac;;
20460*)
20461 ECHO_N='-n';;
20462esac
20463
20464rm -f conf$$ conf$$.exe conf$$.file
20465if test -d conf$$.dir; then
20466 rm -f conf$$.dir/conf$$.file
20467else
20468 rm -f conf$$.dir
20469 mkdir conf$$.dir 2>/dev/null
20470fi
20471if (echo >conf$$.file) 2>/dev/null; then
20472 if ln -s conf$$.file conf$$ 2>/dev/null; then
20473 as_ln_s='ln -s'
20474 # ... but there are two gotchas:
20475 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20476 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20477 # In both cases, we have to default to `cp -pR'.
20478 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20479 as_ln_s='cp -pR'
20480 elif ln conf$$.file conf$$ 2>/dev/null; then
20481 as_ln_s=ln
20482 else
20483 as_ln_s='cp -pR'
20484 fi
20485else
20486 as_ln_s='cp -pR'
20487fi
20488rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20489rmdir conf$$.dir 2>/dev/null
20490
20491
20492# as_fn_mkdir_p
20493# -------------
20494# Create "$as_dir" as a directory, including parents if necessary.
20495as_fn_mkdir_p ()
20496{
20497
20498 case $as_dir in #(
20499 -*) as_dir=./$as_dir;;
20500 esac
20501 test -d "$as_dir" || eval $as_mkdir_p || {
20502 as_dirs=
20503 while :; do
20504 case $as_dir in #(
20505 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20506 *) as_qdir=$as_dir;;
20507 esac
20508 as_dirs="'$as_qdir' $as_dirs"
20509 as_dir=`$as_dirname -- "$as_dir" ||
20510$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20511 X"$as_dir" : 'X\(//\)[^/]' \| \
20512 X"$as_dir" : 'X\(//\)$' \| \
20513 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20514$as_echo X"$as_dir" |
20515 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20516 s//\1/
20517 q
20518 }
20519 /^X\(\/\/\)[^/].*/{
20520 s//\1/
20521 q
20522 }
20523 /^X\(\/\/\)$/{
20524 s//\1/
20525 q
20526 }
20527 /^X\(\/\).*/{
20528 s//\1/
20529 q
20530 }
20531 s/.*/./; q'`
20532 test -d "$as_dir" && break
20533 done
20534 test -z "$as_dirs" || eval "mkdir $as_dirs"
20535 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20536
20537
20538} # as_fn_mkdir_p
20539if mkdir -p . 2>/dev/null; then
20540 as_mkdir_p='mkdir -p "$as_dir"'
20541else
20542 test -d ./-p && rmdir ./-p
20543 as_mkdir_p=false
20544fi
20545
20546
20547# as_fn_executable_p FILE
20548# -----------------------
20549# Test if FILE is an executable regular file.
20550as_fn_executable_p ()
20551{
20552 test -f "$1" && test -x "$1"
20553} # as_fn_executable_p
20554as_test_x='test -x'
20555as_executable_p=as_fn_executable_p
20556
20557# Sed expression to map a string onto a valid CPP name.
20558as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20559
20560# Sed expression to map a string onto a valid variable name.
20561as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20562
20563
20564exec 6>&1
20565## ----------------------------------- ##
20566## Main body of $CONFIG_STATUS script. ##
20567## ----------------------------------- ##
20568_ASEOF
20569test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20570
20571cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20572# Save the log message, to keep $0 and so on meaningful, and to
20573# report actual input values of CONFIG_FILES etc. instead of their
20574# values after options handling.
20575ac_log="
20576This file was extended by OpenSSH $as_me Portable, which was
20577generated by GNU Autoconf 2.69. Invocation command line was
20578
20579 CONFIG_FILES = $CONFIG_FILES
20580 CONFIG_HEADERS = $CONFIG_HEADERS
20581 CONFIG_LINKS = $CONFIG_LINKS
20582 CONFIG_COMMANDS = $CONFIG_COMMANDS
20583 $ $0 $@
20584
20585on `(hostname || uname -n) 2>/dev/null | sed 1q`
20586"
20587
20588_ACEOF
20589
20590case $ac_config_files in *"
20591"*) set x $ac_config_files; shift; ac_config_files=$*;;
20592esac
20593
20594case $ac_config_headers in *"
20595"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20596esac
20597
20598
20599cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20600# Files that config.status was made for.
20601config_files="$ac_config_files"
20602config_headers="$ac_config_headers"
20603
20604_ACEOF
20605
20606cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20607ac_cs_usage="\
20608\`$as_me' instantiates files and other configuration actions
20609from templates according to the current configuration. Unless the files
20610and actions are specified as TAGs, all are instantiated by default.
20611
20612Usage: $0 [OPTION]... [TAG]...
20613
20614 -h, --help print this help, then exit
20615 -V, --version print version number and configuration settings, then exit
20616 --config print configuration, then exit
20617 -q, --quiet, --silent
20618 do not print progress messages
20619 -d, --debug don't remove temporary files
20620 --recheck update $as_me by reconfiguring in the same conditions
20621 --file=FILE[:TEMPLATE]
20622 instantiate the configuration file FILE
20623 --header=FILE[:TEMPLATE]
20624 instantiate the configuration header FILE
20625
20626Configuration files:
20627$config_files
20628
20629Configuration headers:
20630$config_headers
20631
20632Report bugs to <openssh-unix-dev@mindrot.org>."
20633
20634_ACEOF
20635cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20636ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20637ac_cs_version="\\
20638OpenSSH config.status Portable
20639configured by $0, generated by GNU Autoconf 2.69,
20640 with options \\"\$ac_cs_config\\"
20641
20642Copyright (C) 2012 Free Software Foundation, Inc.
20643This config.status script is free software; the Free Software Foundation
20644gives unlimited permission to copy, distribute and modify it."
20645
20646ac_pwd='$ac_pwd'
20647srcdir='$srcdir'
20648INSTALL='$INSTALL'
20649MKDIR_P='$MKDIR_P'
20650AWK='$AWK'
20651test -n "\$AWK" || AWK=awk
20652_ACEOF
20653
20654cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20655# The default lists apply if the user does not specify any file.
20656ac_need_defaults=:
20657while test $# != 0
20658do
20659 case $1 in
20660 --*=?*)
20661 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20662 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20663 ac_shift=:
20664 ;;
20665 --*=)
20666 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20667 ac_optarg=
20668 ac_shift=:
20669 ;;
20670 *)
20671 ac_option=$1
20672 ac_optarg=$2
20673 ac_shift=shift
20674 ;;
20675 esac
20676
20677 case $ac_option in
20678 # Handling of the options.
20679 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20680 ac_cs_recheck=: ;;
20681 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20682 $as_echo "$ac_cs_version"; exit ;;
20683 --config | --confi | --conf | --con | --co | --c )
20684 $as_echo "$ac_cs_config"; exit ;;
20685 --debug | --debu | --deb | --de | --d | -d )
20686 debug=: ;;
20687 --file | --fil | --fi | --f )
20688 $ac_shift
20689 case $ac_optarg in
20690 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20691 '') as_fn_error $? "missing file argument" ;;
20692 esac
20693 as_fn_append CONFIG_FILES " '$ac_optarg'"
20694 ac_need_defaults=false;;
20695 --header | --heade | --head | --hea )
20696 $ac_shift
20697 case $ac_optarg in
20698 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20699 esac
20700 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20701 ac_need_defaults=false;;
20702 --he | --h)
20703 # Conflict between --help and --header
20704 as_fn_error $? "ambiguous option: \`$1'
20705Try \`$0 --help' for more information.";;
20706 --help | --hel | -h )
20707 $as_echo "$ac_cs_usage"; exit ;;
20708 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20709 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20710 ac_cs_silent=: ;;
20711
20712 # This is an error.
20713 -*) as_fn_error $? "unrecognized option: \`$1'
20714Try \`$0 --help' for more information." ;;
20715
20716 *) as_fn_append ac_config_targets " $1"
20717 ac_need_defaults=false ;;
20718
20719 esac
20720 shift
20721done
20722
20723ac_configure_extra_args=
20724
20725if $ac_cs_silent; then
20726 exec 6>/dev/null
20727 ac_configure_extra_args="$ac_configure_extra_args --silent"
20728fi
20729
20730_ACEOF
20731cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20732if \$ac_cs_recheck; then
20733 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20734 shift
20735 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20736 CONFIG_SHELL='$SHELL'
20737 export CONFIG_SHELL
20738 exec "\$@"
20739fi
20740
20741_ACEOF
20742cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20743exec 5>>config.log
20744{
20745 echo
20746 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20747## Running $as_me. ##
20748_ASBOX
20749 $as_echo "$ac_log"
20750} >&5
20751
20752_ACEOF
20753cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20754_ACEOF
20755
20756cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20757
20758# Handling of arguments.
20759for ac_config_target in $ac_config_targets
20760do
20761 case $ac_config_target in
20762 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
20763 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20764 "buildpkg.sh") CONFIG_FILES="$CONFIG_FILES buildpkg.sh" ;;
20765 "opensshd.init") CONFIG_FILES="$CONFIG_FILES opensshd.init" ;;
20766 "openssh.xml") CONFIG_FILES="$CONFIG_FILES openssh.xml" ;;
20767 "openbsd-compat/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;;
20768 "openbsd-compat/regress/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/regress/Makefile" ;;
20769 "survey.sh") CONFIG_FILES="$CONFIG_FILES survey.sh" ;;
20770
20771 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20772 esac
20773done
20774
20775
20776# If the user did not use the arguments to specify the items to instantiate,
20777# then the envvar interface is used. Set only those that are not.
20778# We use the long form for the default assignment because of an extremely
20779# bizarre bug on SunOS 4.1.3.
20780if $ac_need_defaults; then
20781 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20782 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20783fi
20784
20785# Have a temporary directory for convenience. Make it in the build tree
20786# simply because there is no reason against having it here, and in addition,
20787# creating and moving files from /tmp can sometimes cause problems.
20788# Hook for its removal unless debugging.
20789# Note that there is a small window in which the directory will not be cleaned:
20790# after its creation but before its name has been assigned to `$tmp'.
20791$debug ||
20792{
20793 tmp= ac_tmp=
20794 trap 'exit_status=$?
20795 : "${ac_tmp:=$tmp}"
20796 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20797' 0
20798 trap 'as_fn_exit 1' 1 2 13 15
20799}
20800# Create a (secure) tmp directory for tmp files.
20801
20802{
20803 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20804 test -d "$tmp"
20805} ||
20806{
20807 tmp=./conf$$-$RANDOM
20808 (umask 077 && mkdir "$tmp")
20809} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20810ac_tmp=$tmp
20811
20812# Set up the scripts for CONFIG_FILES section.
20813# No need to generate them if there are no CONFIG_FILES.
20814# This happens for instance with `./config.status config.h'.
20815if test -n "$CONFIG_FILES"; then
20816
20817
20818ac_cr=`echo X | tr X '\015'`
20819# On cygwin, bash can eat \r inside `` if the user requested igncr.
20820# But we know of no other shell where ac_cr would be empty at this
20821# point, so we can use a bashism as a fallback.
20822if test "x$ac_cr" = x; then
20823 eval ac_cr=\$\'\\r\'
20824fi
20825ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20826if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20827 ac_cs_awk_cr='\\r'
20828else
20829 ac_cs_awk_cr=$ac_cr
20830fi
20831
20832echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20833_ACEOF
20834
20835
20836{
20837 echo "cat >conf$$subs.awk <<_ACEOF" &&
20838 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20839 echo "_ACEOF"
20840} >conf$$subs.sh ||
20841 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20842ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20843ac_delim='%!_!# '
20844for ac_last_try in false false false false false :; do
20845 . ./conf$$subs.sh ||
20846 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20847
20848 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20849 if test $ac_delim_n = $ac_delim_num; then
20850 break
20851 elif $ac_last_try; then
20852 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20853 else
20854 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20855 fi
20856done
20857rm -f conf$$subs.sh
20858
20859cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20860cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20861_ACEOF
20862sed -n '
20863h
20864s/^/S["/; s/!.*/"]=/
20865p
20866g
20867s/^[^!]*!//
20868:repl
20869t repl
20870s/'"$ac_delim"'$//
20871t delim
20872:nl
20873h
20874s/\(.\{148\}\)..*/\1/
20875t more1
20876s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20877p
20878n
20879b repl
20880:more1
20881s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20882p
20883g
20884s/.\{148\}//
20885t nl
20886:delim
20887h
20888s/\(.\{148\}\)..*/\1/
20889t more2
20890s/["\\]/\\&/g; s/^/"/; s/$/"/
20891p
20892b
20893:more2
20894s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20895p
20896g
20897s/.\{148\}//
20898t delim
20899' <conf$$subs.awk | sed '
20900/^[^""]/{
20901 N
20902 s/\n//
20903}
20904' >>$CONFIG_STATUS || ac_write_fail=1
20905rm -f conf$$subs.awk
20906cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20907_ACAWK
20908cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20909 for (key in S) S_is_set[key] = 1
20910 FS = ""
20911
20912}
20913{
20914 line = $ 0
20915 nfields = split(line, field, "@")
20916 substed = 0
20917 len = length(field[1])
20918 for (i = 2; i < nfields; i++) {
20919 key = field[i]
20920 keylen = length(key)
20921 if (S_is_set[key]) {
20922 value = S[key]
20923 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20924 len += length(value) + length(field[++i])
20925 substed = 1
20926 } else
20927 len += 1 + keylen
20928 }
20929
20930 print line
20931}
20932
20933_ACAWK
20934_ACEOF
20935cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20936if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20937 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20938else
20939 cat
20940fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20941 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20942_ACEOF
20943
20944# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20945# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20946# trailing colons and then remove the whole line if VPATH becomes empty
20947# (actually we leave an empty line to preserve line numbers).
20948if test "x$srcdir" = x.; then
20949 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20950h
20951s///
20952s/^/:/
20953s/[ ]*$/:/
20954s/:\$(srcdir):/:/g
20955s/:\${srcdir}:/:/g
20956s/:@srcdir@:/:/g
20957s/^:*//
20958s/:*$//
20959x
20960s/\(=[ ]*\).*/\1/
20961G
20962s/\n//
20963s/^[^=]*=[ ]*$//
20964}'
20965fi
20966
20967cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20968fi # test -n "$CONFIG_FILES"
20969
20970# Set up the scripts for CONFIG_HEADERS section.
20971# No need to generate them if there are no CONFIG_HEADERS.
20972# This happens for instance with `./config.status Makefile'.
20973if test -n "$CONFIG_HEADERS"; then
20974cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20975BEGIN {
20976_ACEOF
20977
20978# Transform confdefs.h into an awk script `defines.awk', embedded as
20979# here-document in config.status, that substitutes the proper values into
20980# config.h.in to produce config.h.
20981
20982# Create a delimiter string that does not exist in confdefs.h, to ease
20983# handling of long lines.
20984ac_delim='%!_!# '
20985for ac_last_try in false false :; do
20986 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20987 if test -z "$ac_tt"; then
20988 break
20989 elif $ac_last_try; then
20990 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20991 else
20992 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20993 fi
20994done
20995
20996# For the awk script, D is an array of macro values keyed by name,
20997# likewise P contains macro parameters if any. Preserve backslash
20998# newline sequences.
20999
21000ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
21001sed -n '
21002s/.\{148\}/&'"$ac_delim"'/g
21003t rset
21004:rset
21005s/^[ ]*#[ ]*define[ ][ ]*/ /
21006t def
21007d
21008:def
21009s/\\$//
21010t bsnl
21011s/["\\]/\\&/g
21012s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21013D["\1"]=" \3"/p
21014s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
21015d
21016:bsnl
21017s/["\\]/\\&/g
21018s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
21019D["\1"]=" \3\\\\\\n"\\/p
21020t cont
21021s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
21022t cont
21023d
21024:cont
21025n
21026s/.\{148\}/&'"$ac_delim"'/g
21027t clear
21028:clear
21029s/\\$//
21030t bsnlc
21031s/["\\]/\\&/g; s/^/"/; s/$/"/p
21032d
21033:bsnlc
21034s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
21035b cont
21036' <confdefs.h | sed '
21037s/'"$ac_delim"'/"\\\
21038"/g' >>$CONFIG_STATUS || ac_write_fail=1
21039
21040cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21041 for (key in D) D_is_set[key] = 1
21042 FS = ""
21043}
21044/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
21045 line = \$ 0
21046 split(line, arg, " ")
21047 if (arg[1] == "#") {
21048 defundef = arg[2]
21049 mac1 = arg[3]
21050 } else {
21051 defundef = substr(arg[1], 2)
21052 mac1 = arg[2]
21053 }
21054 split(mac1, mac2, "(") #)
21055 macro = mac2[1]
21056 prefix = substr(line, 1, index(line, defundef) - 1)
21057 if (D_is_set[macro]) {
21058 # Preserve the white space surrounding the "#".
21059 print prefix "define", macro P[macro] D[macro]
21060 next
21061 } else {
21062 # Replace #undef with comments. This is necessary, for example,
21063 # in the case of _POSIX_SOURCE, which is predefined and required
21064 # on some systems where configure will not decide to define it.
21065 if (defundef == "undef") {
21066 print "/*", prefix defundef, macro, "*/"
21067 next
21068 }
21069 }
21070}
21071{ print }
21072_ACAWK
21073_ACEOF
21074cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21075 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
21076fi # test -n "$CONFIG_HEADERS"
21077
21078
21079eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
21080shift
21081for ac_tag
21082do
21083 case $ac_tag in
21084 :[FHLC]) ac_mode=$ac_tag; continue;;
21085 esac
21086 case $ac_mode$ac_tag in
21087 :[FHL]*:*);;
21088 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
21089 :[FH]-) ac_tag=-:-;;
21090 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
21091 esac
21092 ac_save_IFS=$IFS
21093 IFS=:
21094 set x $ac_tag
21095 IFS=$ac_save_IFS
21096 shift
21097 ac_file=$1
21098 shift
21099
21100 case $ac_mode in
21101 :L) ac_source=$1;;
21102 :[FH])
21103 ac_file_inputs=
21104 for ac_f
21105 do
21106 case $ac_f in
21107 -) ac_f="$ac_tmp/stdin";;
21108 *) # Look for the file first in the build tree, then in the source tree
21109 # (if the path is not absolute). The absolute path cannot be DOS-style,
21110 # because $ac_f cannot contain `:'.
21111 test -f "$ac_f" ||
21112 case $ac_f in
21113 [\\/$]*) false;;
21114 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
21115 esac ||
21116 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
21117 esac
21118 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
21119 as_fn_append ac_file_inputs " '$ac_f'"
21120 done
21121
21122 # Let's still pretend it is `configure' which instantiates (i.e., don't
21123 # use $as_me), people would be surprised to read:
21124 # /* config.h. Generated by config.status. */
21125 configure_input='Generated from '`
21126 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
21127 `' by configure.'
21128 if test x"$ac_file" != x-; then
21129 configure_input="$ac_file. $configure_input"
21130 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
21131$as_echo "$as_me: creating $ac_file" >&6;}
21132 fi
21133 # Neutralize special characters interpreted by sed in replacement strings.
21134 case $configure_input in #(
21135 *\&* | *\|* | *\\* )
21136 ac_sed_conf_input=`$as_echo "$configure_input" |
21137 sed 's/[\\\\&|]/\\\\&/g'`;; #(
21138 *) ac_sed_conf_input=$configure_input;;
21139 esac
21140
21141 case $ac_tag in
21142 *:-:* | *:-) cat >"$ac_tmp/stdin" \
21143 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
21144 esac
21145 ;;
21146 esac
21147
21148 ac_dir=`$as_dirname -- "$ac_file" ||
21149$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21150 X"$ac_file" : 'X\(//\)[^/]' \| \
21151 X"$ac_file" : 'X\(//\)$' \| \
21152 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
21153$as_echo X"$ac_file" |
21154 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21155 s//\1/
21156 q
21157 }
21158 /^X\(\/\/\)[^/].*/{
21159 s//\1/
21160 q
21161 }
21162 /^X\(\/\/\)$/{
21163 s//\1/
21164 q
21165 }
21166 /^X\(\/\).*/{
21167 s//\1/
21168 q
21169 }
21170 s/.*/./; q'`
21171 as_dir="$ac_dir"; as_fn_mkdir_p
21172 ac_builddir=.
21173
21174case "$ac_dir" in
21175.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
21176*)
21177 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
21178 # A ".." for each directory in $ac_dir_suffix.
21179 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
21180 case $ac_top_builddir_sub in
21181 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
21182 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
21183 esac ;;
21184esac
21185ac_abs_top_builddir=$ac_pwd
21186ac_abs_builddir=$ac_pwd$ac_dir_suffix
21187# for backward compatibility:
21188ac_top_builddir=$ac_top_build_prefix
21189
21190case $srcdir in
21191 .) # We are building in place.
21192 ac_srcdir=.
21193 ac_top_srcdir=$ac_top_builddir_sub
21194 ac_abs_top_srcdir=$ac_pwd ;;
21195 [\\/]* | ?:[\\/]* ) # Absolute name.
21196 ac_srcdir=$srcdir$ac_dir_suffix;
21197 ac_top_srcdir=$srcdir
21198 ac_abs_top_srcdir=$srcdir ;;
21199 *) # Relative name.
21200 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
21201 ac_top_srcdir=$ac_top_build_prefix$srcdir
21202 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
21203esac
21204ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
21205
21206
21207 case $ac_mode in
21208 :F)
21209 #
21210 # CONFIG_FILE
21211 #
21212
21213 case $INSTALL in
21214 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21215 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
21216 esac
21217 ac_MKDIR_P=$MKDIR_P
21218 case $MKDIR_P in
21219 [\\/$]* | ?:[\\/]* ) ;;
21220 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
21221 esac
21222_ACEOF
21223
21224cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21225# If the template does not know about datarootdir, expand it.
21226# FIXME: This hack should be removed a few years after 2.60.
21227ac_datarootdir_hack=; ac_datarootdir_seen=
21228ac_sed_dataroot='
21229/datarootdir/ {
21230 p
21231 q
21232}
21233/@datadir@/p
21234/@docdir@/p
21235/@infodir@/p
21236/@localedir@/p
21237/@mandir@/p'
21238case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
21239*datarootdir*) ac_datarootdir_seen=yes;;
21240*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
21241 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
21242$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
21243_ACEOF
21244cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21245 ac_datarootdir_hack='
21246 s&@datadir@&$datadir&g
21247 s&@docdir@&$docdir&g
21248 s&@infodir@&$infodir&g
21249 s&@localedir@&$localedir&g
21250 s&@mandir@&$mandir&g
21251 s&\\\${datarootdir}&$datarootdir&g' ;;
21252esac
21253_ACEOF
21254
21255# Neutralize VPATH when `$srcdir' = `.'.
21256# Shell code in configure.ac might set extrasub.
21257# FIXME: do we really want to maintain this feature?
21258cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21259ac_sed_extra="$ac_vpsub
21260$extrasub
21261_ACEOF
21262cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21263:t
21264/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21265s|@configure_input@|$ac_sed_conf_input|;t t
21266s&@top_builddir@&$ac_top_builddir_sub&;t t
21267s&@top_build_prefix@&$ac_top_build_prefix&;t t
21268s&@srcdir@&$ac_srcdir&;t t
21269s&@abs_srcdir@&$ac_abs_srcdir&;t t
21270s&@top_srcdir@&$ac_top_srcdir&;t t
21271s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
21272s&@builddir@&$ac_builddir&;t t
21273s&@abs_builddir@&$ac_abs_builddir&;t t
21274s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
21275s&@INSTALL@&$ac_INSTALL&;t t
21276s&@MKDIR_P@&$ac_MKDIR_P&;t t
21277$ac_datarootdir_hack
21278"
21279eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
21280 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21281
21282test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
21283 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
21284 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
21285 "$ac_tmp/out"`; test -z "$ac_out"; } &&
21286 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21287which seems to be undefined. Please make sure it is defined" >&5
21288$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
21289which seems to be undefined. Please make sure it is defined" >&2;}
21290
21291 rm -f "$ac_tmp/stdin"
21292 case $ac_file in
21293 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
21294 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
21295 esac \
21296 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21297 ;;
21298 :H)
21299 #
21300 # CONFIG_HEADER
21301 #
21302 if test x"$ac_file" != x-; then
21303 {
21304 $as_echo "/* $configure_input */" \
21305 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
21306 } >"$ac_tmp/config.h" \
21307 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21308 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
21309 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
21310$as_echo "$as_me: $ac_file is unchanged" >&6;}
21311 else
21312 rm -f "$ac_file"
21313 mv "$ac_tmp/config.h" "$ac_file" \
21314 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
21315 fi
21316 else
21317 $as_echo "/* $configure_input */" \
21318 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
21319 || as_fn_error $? "could not create -" "$LINENO" 5
21320 fi
21321 ;;
21322
21323
21324 esac
21325
21326done # for ac_tag
21327
21328
21329as_fn_exit 0
21330_ACEOF
21331ac_clean_files=$ac_clean_files_save
21332
21333test $ac_write_fail = 0 ||
21334 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
21335
21336
21337# configure is writing to config.log, and then calls config.status.
21338# config.status does its own redirection, appending to config.log.
21339# Unfortunately, on DOS this fails, as config.log is still kept open
21340# by configure, so config.status won't be able to write to it; its
21341# output is simply discarded. So we exec the FD to /dev/null,
21342# effectively closing config.log, so it can be properly (re)opened and
21343# appended to by config.status. When coming back to configure, we
21344# need to make the FD available again.
21345if test "$no_create" != yes; then
21346 ac_cs_success=:
21347 ac_config_status_args=
21348 test "$silent" = yes &&
21349 ac_config_status_args="$ac_config_status_args --quiet"
21350 exec 5>/dev/null
21351 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
21352 exec 5>>config.log
21353 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
21354 # would make configure fail if this is the last instruction.
21355 $ac_cs_success || as_fn_exit 1
21356fi
21357if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
21358 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
21359$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
21360fi
21361
21362
21363# Print summary of options
21364
21365# Someone please show me a better way :)
21366A=`eval echo ${prefix}` ; A=`eval echo ${A}`
21367B=`eval echo ${bindir}` ; B=`eval echo ${B}`
21368C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
21369D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
21370E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
21371F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
21372G=`eval echo ${piddir}` ; G=`eval echo ${G}`
21373H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}`
21374I=`eval echo ${user_path}` ; I=`eval echo ${I}`
21375J=`eval echo ${superuser_path}` ; J=`eval echo ${J}`
21376
21377echo ""
21378echo "OpenSSH has been configured with the following options:"
21379echo " User binaries: $B"
21380echo " System binaries: $C"
21381echo " Configuration files: $D"
21382echo " Askpass program: $E"
21383echo " Manual pages: $F"
21384echo " PID file: $G"
21385echo " Privilege separation chroot path: $H"
21386if test "x$external_path_file" = "x/etc/login.conf" ; then
21387echo " At runtime, sshd will use the path defined in $external_path_file"
21388echo " Make sure the path to scp is present, otherwise scp will not work"
21389else
21390echo " sshd default user PATH: $I"
21391 if test ! -z "$external_path_file"; then
21392echo " (If PATH is set in $external_path_file it will be used instead. If"
21393echo " used, ensure the path to scp is present, otherwise scp will not work.)"
21394 fi
21395fi
21396if test ! -z "$superuser_path" ; then
21397echo " sshd superuser user PATH: $J"
21398fi
21399echo " Manpage format: $MANTYPE"
21400echo " PAM support: $PAM_MSG"
21401echo " OSF SIA support: $SIA_MSG"
21402echo " KerberosV support: $KRB5_MSG"
21403echo " SELinux support: $SELINUX_MSG"
21404echo " MD5 password support: $MD5_MSG"
21405echo " libedit support: $LIBEDIT_MSG"
21406echo " libldns support: $LDNS_MSG"
21407echo " Solaris process contract support: $SPC_MSG"
21408echo " Solaris project support: $SP_MSG"
21409echo " Solaris privilege support: $SPP_MSG"
21410echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
21411echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
21412echo " BSD Auth support: $BSD_AUTH_MSG"
21413echo " Random number source: $RAND_MSG"
21414echo " Privsep sandbox style: $SANDBOX_STYLE"
21415echo " PKCS#11 support: $enable_pkcs11"
21416echo " U2F/FIDO support: $enable_sk"
21417
21418echo ""
21419
21420echo " Host: ${host}"
21421echo " Compiler: ${CC}"
21422echo " Compiler flags: ${CFLAGS}"
21423echo "Preprocessor flags: ${CPPFLAGS}"
21424echo " Linker flags: ${LDFLAGS}"
21425echo " Libraries: ${LIBS}"
21426if test ! -z "${SSHDLIBS}"; then
21427echo " +for sshd: ${SSHDLIBS}"
21428fi
21429if test ! -z "${SSHLIBS}"; then
21430echo " +for ssh: ${SSHLIBS}"
21431fi
21432
21433echo ""
21434
21435if test "x$MAKE_PACKAGE_SUPPORTED" = "xyes" ; then
21436 echo "SVR4 style packages are supported with \"make package\""
21437 echo ""
21438fi
21439
21440if test "x$PAM_MSG" = "xyes" ; then
21441 echo "PAM is enabled. You may need to install a PAM control file "
21442 echo "for sshd, otherwise password authentication may fail. "
21443 echo "Example PAM control files can be found in the contrib/ "
21444 echo "subdirectory"
21445 echo ""
21446fi
21447
21448if test ! -z "$NO_PEERCHECK" ; then
21449 echo "WARNING: the operating system that you are using does not"
21450 echo "appear to support getpeereid(), getpeerucred() or the"
21451 echo "SO_PEERCRED getsockopt() option. These facilities are used to"
21452 echo "enforce security checks to prevent unauthorised connections to"
21453 echo "ssh-agent. Their absence increases the risk that a malicious"
21454 echo "user can connect to your agent."
21455 echo ""
21456fi
21457
21458if test "$AUDIT_MODULE" = "bsm" ; then
21459 echo "WARNING: BSM audit support is currently considered EXPERIMENTAL."
21460 echo "See the Solaris section in README.platform for details."
21461fi