summaryrefslogtreecommitdiff
path: root/configure
diff options
context:
space:
mode:
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure20824
1 files changed, 20824 insertions, 0 deletions
diff --git a/configure b/configure
new file mode 100755
index 000000000..1e67db268
--- /dev/null
+++ b/configure
@@ -0,0 +1,20824 @@
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
627DEPEND
628UNSUPPORTED_ALGORITHMS
629TEST_MALLOC_OPTIONS
630TEST_SSH_UTF8
631TEST_SSH_IPV6
632piddir
633user_path
634mansubdir
635MANTYPE
636XAUTH_PATH
637STRIP_OPT
638xauth_path
639PRIVSEP_PATH
640K5LIBS
641GSSLIBS
642KRB5CONF
643SSHDLIBS
644SSHLIBS
645SSH_PRIVSEP_USER
646COMMENT_OUT_ECC
647TEST_SSH_ECC
648LIBEDIT
649PKGCONFIG
650LDNSCONFIG
651LIBOBJS
652LD
653PATH_PASSWD_PROG
654STARTUP_SCRIPT_SHELL
655MAKE_PACKAGE_SUPPORTED
656PATH_USERADD_PROG
657PATH_GROUPADD_PROG
658MANFMT
659TEST_SHELL
660MANDOC
661NROFF
662GROFF
663SH
664TEST_MINUS_S_SH
665ENT
666SED
667KILL
668CAT
669ac_ct_AR
670AR
671MKDIR_P
672INSTALL_DATA
673INSTALL_SCRIPT
674INSTALL_PROGRAM
675RANLIB
676AWK
677EGREP
678GREP
679CPP
680host_os
681host_vendor
682host_cpu
683host
684build_os
685build_vendor
686build_cpu
687build
688OBJEXT
689EXEEXT
690ac_ct_CC
691CPPFLAGS
692LDFLAGS
693CFLAGS
694CC
695target_alias
696host_alias
697build_alias
698LIBS
699ECHO_T
700ECHO_N
701ECHO_C
702DEFS
703mandir
704localedir
705libdir
706psdir
707pdfdir
708dvidir
709htmldir
710infodir
711docdir
712oldincludedir
713includedir
714localstatedir
715sharedstatedir
716sysconfdir
717datadir
718datarootdir
719libexecdir
720sbindir
721bindir
722program_transform_name
723prefix
724exec_prefix
725PACKAGE_URL
726PACKAGE_BUGREPORT
727PACKAGE_STRING
728PACKAGE_VERSION
729PACKAGE_TARNAME
730PACKAGE_NAME
731PATH_SEPARATOR
732SHELL'
733ac_subst_files=''
734ac_user_opts='
735enable_option_checking
736enable_largefile
737with_openssl
738with_stackprotect
739with_hardening
740with_rpath
741with_cflags
742with_cflags_after
743with_cppflags
744with_ldflags
745with_ldflags_after
746with_libs
747with_Werror
748with_solaris_contracts
749with_solaris_projects
750with_solaris_privs
751with_osfsia
752with_zlib
753with_zlib_version_check
754with_ldns
755with_libedit
756with_audit
757with_pie
758enable_pkcs11
759with_ssl_dir
760with_openssl_header_check
761with_ssl_engine
762with_prngd_port
763with_prngd_socket
764with_pam
765with_pam_service
766with_privsep_user
767with_sandbox
768with_selinux
769with_kerberos5
770with_privsep_path
771with_xauth
772enable_strip
773with_maildir
774with_mantype
775with_md5_passwords
776with_shadow
777with_ipaddr_display
778enable_etc_default_login
779with_default_path
780with_superuser_path
781with_4in6
782with_bsd_auth
783with_pid_dir
784enable_lastlog
785enable_utmp
786enable_utmpx
787enable_wtmp
788enable_wtmpx
789enable_libutil
790enable_pututline
791enable_pututxline
792with_lastlog
793'
794 ac_precious_vars='build_alias
795host_alias
796target_alias
797CC
798CFLAGS
799LDFLAGS
800LIBS
801CPPFLAGS
802CPP'
803
804
805# Initialize some variables set by options.
806ac_init_help=
807ac_init_version=false
808ac_unrecognized_opts=
809ac_unrecognized_sep=
810# The variables have the same names as the options, with
811# dashes changed to underlines.
812cache_file=/dev/null
813exec_prefix=NONE
814no_create=
815no_recursion=
816prefix=NONE
817program_prefix=NONE
818program_suffix=NONE
819program_transform_name=s,x,x,
820silent=
821site=
822srcdir=
823verbose=
824x_includes=NONE
825x_libraries=NONE
826
827# Installation directory options.
828# These are left unexpanded so users can "make install exec_prefix=/foo"
829# and all the variables that are supposed to be based on exec_prefix
830# by default will actually change.
831# Use braces instead of parens because sh, perl, etc. also accept them.
832# (The list follows the same order as the GNU Coding Standards.)
833bindir='${exec_prefix}/bin'
834sbindir='${exec_prefix}/sbin'
835libexecdir='${exec_prefix}/libexec'
836datarootdir='${prefix}/share'
837datadir='${datarootdir}'
838sysconfdir='${prefix}/etc'
839sharedstatedir='${prefix}/com'
840localstatedir='${prefix}/var'
841includedir='${prefix}/include'
842oldincludedir='/usr/include'
843docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
844infodir='${datarootdir}/info'
845htmldir='${docdir}'
846dvidir='${docdir}'
847pdfdir='${docdir}'
848psdir='${docdir}'
849libdir='${exec_prefix}/lib'
850localedir='${datarootdir}/locale'
851mandir='${datarootdir}/man'
852
853ac_prev=
854ac_dashdash=
855for ac_option
856do
857 # If the previous option needs an argument, assign it.
858 if test -n "$ac_prev"; then
859 eval $ac_prev=\$ac_option
860 ac_prev=
861 continue
862 fi
863
864 case $ac_option in
865 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
866 *=) ac_optarg= ;;
867 *) ac_optarg=yes ;;
868 esac
869
870 # Accept the important Cygnus configure options, so we can diagnose typos.
871
872 case $ac_dashdash$ac_option in
873 --)
874 ac_dashdash=yes ;;
875
876 -bindir | --bindir | --bindi | --bind | --bin | --bi)
877 ac_prev=bindir ;;
878 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
879 bindir=$ac_optarg ;;
880
881 -build | --build | --buil | --bui | --bu)
882 ac_prev=build_alias ;;
883 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
884 build_alias=$ac_optarg ;;
885
886 -cache-file | --cache-file | --cache-fil | --cache-fi \
887 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
888 ac_prev=cache_file ;;
889 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
890 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
891 cache_file=$ac_optarg ;;
892
893 --config-cache | -C)
894 cache_file=config.cache ;;
895
896 -datadir | --datadir | --datadi | --datad)
897 ac_prev=datadir ;;
898 -datadir=* | --datadir=* | --datadi=* | --datad=*)
899 datadir=$ac_optarg ;;
900
901 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
902 | --dataroo | --dataro | --datar)
903 ac_prev=datarootdir ;;
904 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
905 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
906 datarootdir=$ac_optarg ;;
907
908 -disable-* | --disable-*)
909 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
910 # Reject names that are not valid shell variable names.
911 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
912 as_fn_error $? "invalid feature name: $ac_useropt"
913 ac_useropt_orig=$ac_useropt
914 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
915 case $ac_user_opts in
916 *"
917"enable_$ac_useropt"
918"*) ;;
919 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
920 ac_unrecognized_sep=', ';;
921 esac
922 eval enable_$ac_useropt=no ;;
923
924 -docdir | --docdir | --docdi | --doc | --do)
925 ac_prev=docdir ;;
926 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
927 docdir=$ac_optarg ;;
928
929 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
930 ac_prev=dvidir ;;
931 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
932 dvidir=$ac_optarg ;;
933
934 -enable-* | --enable-*)
935 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
936 # Reject names that are not valid shell variable names.
937 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
938 as_fn_error $? "invalid feature name: $ac_useropt"
939 ac_useropt_orig=$ac_useropt
940 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
941 case $ac_user_opts in
942 *"
943"enable_$ac_useropt"
944"*) ;;
945 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
946 ac_unrecognized_sep=', ';;
947 esac
948 eval enable_$ac_useropt=\$ac_optarg ;;
949
950 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
951 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
952 | --exec | --exe | --ex)
953 ac_prev=exec_prefix ;;
954 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
955 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
956 | --exec=* | --exe=* | --ex=*)
957 exec_prefix=$ac_optarg ;;
958
959 -gas | --gas | --ga | --g)
960 # Obsolete; use --with-gas.
961 with_gas=yes ;;
962
963 -help | --help | --hel | --he | -h)
964 ac_init_help=long ;;
965 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
966 ac_init_help=recursive ;;
967 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
968 ac_init_help=short ;;
969
970 -host | --host | --hos | --ho)
971 ac_prev=host_alias ;;
972 -host=* | --host=* | --hos=* | --ho=*)
973 host_alias=$ac_optarg ;;
974
975 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
976 ac_prev=htmldir ;;
977 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
978 | --ht=*)
979 htmldir=$ac_optarg ;;
980
981 -includedir | --includedir | --includedi | --included | --include \
982 | --includ | --inclu | --incl | --inc)
983 ac_prev=includedir ;;
984 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
985 | --includ=* | --inclu=* | --incl=* | --inc=*)
986 includedir=$ac_optarg ;;
987
988 -infodir | --infodir | --infodi | --infod | --info | --inf)
989 ac_prev=infodir ;;
990 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
991 infodir=$ac_optarg ;;
992
993 -libdir | --libdir | --libdi | --libd)
994 ac_prev=libdir ;;
995 -libdir=* | --libdir=* | --libdi=* | --libd=*)
996 libdir=$ac_optarg ;;
997
998 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
999 | --libexe | --libex | --libe)
1000 ac_prev=libexecdir ;;
1001 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1002 | --libexe=* | --libex=* | --libe=*)
1003 libexecdir=$ac_optarg ;;
1004
1005 -localedir | --localedir | --localedi | --localed | --locale)
1006 ac_prev=localedir ;;
1007 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1008 localedir=$ac_optarg ;;
1009
1010 -localstatedir | --localstatedir | --localstatedi | --localstated \
1011 | --localstate | --localstat | --localsta | --localst | --locals)
1012 ac_prev=localstatedir ;;
1013 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1014 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1015 localstatedir=$ac_optarg ;;
1016
1017 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1018 ac_prev=mandir ;;
1019 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1020 mandir=$ac_optarg ;;
1021
1022 -nfp | --nfp | --nf)
1023 # Obsolete; use --without-fp.
1024 with_fp=no ;;
1025
1026 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1027 | --no-cr | --no-c | -n)
1028 no_create=yes ;;
1029
1030 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1031 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1032 no_recursion=yes ;;
1033
1034 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1035 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1036 | --oldin | --oldi | --old | --ol | --o)
1037 ac_prev=oldincludedir ;;
1038 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1039 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1040 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1041 oldincludedir=$ac_optarg ;;
1042
1043 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1044 ac_prev=prefix ;;
1045 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1046 prefix=$ac_optarg ;;
1047
1048 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1049 | --program-pre | --program-pr | --program-p)
1050 ac_prev=program_prefix ;;
1051 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1052 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1053 program_prefix=$ac_optarg ;;
1054
1055 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1056 | --program-suf | --program-su | --program-s)
1057 ac_prev=program_suffix ;;
1058 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1059 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1060 program_suffix=$ac_optarg ;;
1061
1062 -program-transform-name | --program-transform-name \
1063 | --program-transform-nam | --program-transform-na \
1064 | --program-transform-n | --program-transform- \
1065 | --program-transform | --program-transfor \
1066 | --program-transfo | --program-transf \
1067 | --program-trans | --program-tran \
1068 | --progr-tra | --program-tr | --program-t)
1069 ac_prev=program_transform_name ;;
1070 -program-transform-name=* | --program-transform-name=* \
1071 | --program-transform-nam=* | --program-transform-na=* \
1072 | --program-transform-n=* | --program-transform-=* \
1073 | --program-transform=* | --program-transfor=* \
1074 | --program-transfo=* | --program-transf=* \
1075 | --program-trans=* | --program-tran=* \
1076 | --progr-tra=* | --program-tr=* | --program-t=*)
1077 program_transform_name=$ac_optarg ;;
1078
1079 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1080 ac_prev=pdfdir ;;
1081 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1082 pdfdir=$ac_optarg ;;
1083
1084 -psdir | --psdir | --psdi | --psd | --ps)
1085 ac_prev=psdir ;;
1086 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1087 psdir=$ac_optarg ;;
1088
1089 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1090 | -silent | --silent | --silen | --sile | --sil)
1091 silent=yes ;;
1092
1093 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1094 ac_prev=sbindir ;;
1095 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1096 | --sbi=* | --sb=*)
1097 sbindir=$ac_optarg ;;
1098
1099 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1100 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1101 | --sharedst | --shareds | --shared | --share | --shar \
1102 | --sha | --sh)
1103 ac_prev=sharedstatedir ;;
1104 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1105 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1106 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1107 | --sha=* | --sh=*)
1108 sharedstatedir=$ac_optarg ;;
1109
1110 -site | --site | --sit)
1111 ac_prev=site ;;
1112 -site=* | --site=* | --sit=*)
1113 site=$ac_optarg ;;
1114
1115 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1116 ac_prev=srcdir ;;
1117 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1118 srcdir=$ac_optarg ;;
1119
1120 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1121 | --syscon | --sysco | --sysc | --sys | --sy)
1122 ac_prev=sysconfdir ;;
1123 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1124 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1125 sysconfdir=$ac_optarg ;;
1126
1127 -target | --target | --targe | --targ | --tar | --ta | --t)
1128 ac_prev=target_alias ;;
1129 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1130 target_alias=$ac_optarg ;;
1131
1132 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1133 verbose=yes ;;
1134
1135 -version | --version | --versio | --versi | --vers | -V)
1136 ac_init_version=: ;;
1137
1138 -with-* | --with-*)
1139 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1140 # Reject names that are not valid shell variable names.
1141 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1142 as_fn_error $? "invalid package name: $ac_useropt"
1143 ac_useropt_orig=$ac_useropt
1144 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1145 case $ac_user_opts in
1146 *"
1147"with_$ac_useropt"
1148"*) ;;
1149 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1150 ac_unrecognized_sep=', ';;
1151 esac
1152 eval with_$ac_useropt=\$ac_optarg ;;
1153
1154 -without-* | --without-*)
1155 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1156 # Reject names that are not valid shell variable names.
1157 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1158 as_fn_error $? "invalid package name: $ac_useropt"
1159 ac_useropt_orig=$ac_useropt
1160 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1161 case $ac_user_opts in
1162 *"
1163"with_$ac_useropt"
1164"*) ;;
1165 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1166 ac_unrecognized_sep=', ';;
1167 esac
1168 eval with_$ac_useropt=no ;;
1169
1170 --x)
1171 # Obsolete; use --with-x.
1172 with_x=yes ;;
1173
1174 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1175 | --x-incl | --x-inc | --x-in | --x-i)
1176 ac_prev=x_includes ;;
1177 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1178 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1179 x_includes=$ac_optarg ;;
1180
1181 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1182 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1183 ac_prev=x_libraries ;;
1184 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1185 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1186 x_libraries=$ac_optarg ;;
1187
1188 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1189Try \`$0 --help' for more information"
1190 ;;
1191
1192 *=*)
1193 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1194 # Reject names that are not valid shell variable names.
1195 case $ac_envvar in #(
1196 '' | [0-9]* | *[!_$as_cr_alnum]* )
1197 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1198 esac
1199 eval $ac_envvar=\$ac_optarg
1200 export $ac_envvar ;;
1201
1202 *)
1203 # FIXME: should be removed in autoconf 3.0.
1204 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1205 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1206 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1207 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1208 ;;
1209
1210 esac
1211done
1212
1213if test -n "$ac_prev"; then
1214 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1215 as_fn_error $? "missing argument to $ac_option"
1216fi
1217
1218if test -n "$ac_unrecognized_opts"; then
1219 case $enable_option_checking in
1220 no) ;;
1221 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1222 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1223 esac
1224fi
1225
1226# Check all directory arguments for consistency.
1227for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1228 datadir sysconfdir sharedstatedir localstatedir includedir \
1229 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1230 libdir localedir mandir
1231do
1232 eval ac_val=\$$ac_var
1233 # Remove trailing slashes.
1234 case $ac_val in
1235 */ )
1236 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1237 eval $ac_var=\$ac_val;;
1238 esac
1239 # Be sure to have absolute directory names.
1240 case $ac_val in
1241 [\\/$]* | ?:[\\/]* ) continue;;
1242 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1243 esac
1244 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1245done
1246
1247# There might be people who depend on the old broken behavior: `$host'
1248# used to hold the argument of --host etc.
1249# FIXME: To remove some day.
1250build=$build_alias
1251host=$host_alias
1252target=$target_alias
1253
1254# FIXME: To remove some day.
1255if test "x$host_alias" != x; then
1256 if test "x$build_alias" = x; then
1257 cross_compiling=maybe
1258 elif test "x$build_alias" != "x$host_alias"; then
1259 cross_compiling=yes
1260 fi
1261fi
1262
1263ac_tool_prefix=
1264test -n "$host_alias" && ac_tool_prefix=$host_alias-
1265
1266test "$silent" = yes && exec 6>/dev/null
1267
1268
1269ac_pwd=`pwd` && test -n "$ac_pwd" &&
1270ac_ls_di=`ls -di .` &&
1271ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1272 as_fn_error $? "working directory cannot be determined"
1273test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1274 as_fn_error $? "pwd does not report name of working directory"
1275
1276
1277# Find the source files, if location was not specified.
1278if test -z "$srcdir"; then
1279 ac_srcdir_defaulted=yes
1280 # Try the directory containing this script, then the parent directory.
1281 ac_confdir=`$as_dirname -- "$as_myself" ||
1282$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1283 X"$as_myself" : 'X\(//\)[^/]' \| \
1284 X"$as_myself" : 'X\(//\)$' \| \
1285 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1286$as_echo X"$as_myself" |
1287 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1288 s//\1/
1289 q
1290 }
1291 /^X\(\/\/\)[^/].*/{
1292 s//\1/
1293 q
1294 }
1295 /^X\(\/\/\)$/{
1296 s//\1/
1297 q
1298 }
1299 /^X\(\/\).*/{
1300 s//\1/
1301 q
1302 }
1303 s/.*/./; q'`
1304 srcdir=$ac_confdir
1305 if test ! -r "$srcdir/$ac_unique_file"; then
1306 srcdir=..
1307 fi
1308else
1309 ac_srcdir_defaulted=no
1310fi
1311if test ! -r "$srcdir/$ac_unique_file"; then
1312 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1313 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1314fi
1315ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1316ac_abs_confdir=`(
1317 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1318 pwd)`
1319# When building in place, set srcdir=.
1320if test "$ac_abs_confdir" = "$ac_pwd"; then
1321 srcdir=.
1322fi
1323# Remove unnecessary trailing slashes from srcdir.
1324# Double slashes in file names in object file debugging info
1325# mess up M-x gdb in Emacs.
1326case $srcdir in
1327*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1328esac
1329for ac_var in $ac_precious_vars; do
1330 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1331 eval ac_env_${ac_var}_value=\$${ac_var}
1332 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1333 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1334done
1335
1336#
1337# Report the --help message.
1338#
1339if test "$ac_init_help" = "long"; then
1340 # Omit some internal or obsolete options to make the list less imposing.
1341 # This message is too long to be a string in the A/UX 3.1 sh.
1342 cat <<_ACEOF
1343\`configure' configures OpenSSH Portable to adapt to many kinds of systems.
1344
1345Usage: $0 [OPTION]... [VAR=VALUE]...
1346
1347To assign environment variables (e.g., CC, CFLAGS...), specify them as
1348VAR=VALUE. See below for descriptions of some of the useful variables.
1349
1350Defaults for the options are specified in brackets.
1351
1352Configuration:
1353 -h, --help display this help and exit
1354 --help=short display options specific to this package
1355 --help=recursive display the short help of all the included packages
1356 -V, --version display version information and exit
1357 -q, --quiet, --silent do not print \`checking ...' messages
1358 --cache-file=FILE cache test results in FILE [disabled]
1359 -C, --config-cache alias for \`--cache-file=config.cache'
1360 -n, --no-create do not create output files
1361 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1362
1363Installation directories:
1364 --prefix=PREFIX install architecture-independent files in PREFIX
1365 [$ac_default_prefix]
1366 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1367 [PREFIX]
1368
1369By default, \`make install' will install all the files in
1370\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1371an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1372for instance \`--prefix=\$HOME'.
1373
1374For better control, use the options below.
1375
1376Fine tuning of the installation directories:
1377 --bindir=DIR user executables [EPREFIX/bin]
1378 --sbindir=DIR system admin executables [EPREFIX/sbin]
1379 --libexecdir=DIR program executables [EPREFIX/libexec]
1380 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1381 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1382 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1383 --libdir=DIR object code libraries [EPREFIX/lib]
1384 --includedir=DIR C header files [PREFIX/include]
1385 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1386 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1387 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1388 --infodir=DIR info documentation [DATAROOTDIR/info]
1389 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1390 --mandir=DIR man documentation [DATAROOTDIR/man]
1391 --docdir=DIR documentation root [DATAROOTDIR/doc/openssh]
1392 --htmldir=DIR html documentation [DOCDIR]
1393 --dvidir=DIR dvi documentation [DOCDIR]
1394 --pdfdir=DIR pdf documentation [DOCDIR]
1395 --psdir=DIR ps documentation [DOCDIR]
1396_ACEOF
1397
1398 cat <<\_ACEOF
1399
1400System types:
1401 --build=BUILD configure for building on BUILD [guessed]
1402 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1403_ACEOF
1404fi
1405
1406if test -n "$ac_init_help"; then
1407 case $ac_init_help in
1408 short | recursive ) echo "Configuration of OpenSSH Portable:";;
1409 esac
1410 cat <<\_ACEOF
1411
1412Optional Features:
1413 --disable-option-checking ignore unrecognized --enable/--with options
1414 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1415 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1416 --disable-largefile omit support for large files
1417 --disable-pkcs11 disable PKCS#11 support code [no]
1418 --disable-strip Disable calling strip(1) on install
1419 --disable-etc-default-login Disable using PATH from /etc/default/login no
1420 --disable-lastlog disable use of lastlog even if detected no
1421 --disable-utmp disable use of utmp even if detected no
1422 --disable-utmpx disable use of utmpx even if detected no
1423 --disable-wtmp disable use of wtmp even if detected no
1424 --disable-wtmpx disable use of wtmpx even if detected no
1425 --disable-libutil disable use of libutil (login() etc.) no
1426 --disable-pututline disable use of pututline() etc. (uwtmp) no
1427 --disable-pututxline disable use of pututxline() etc. (uwtmpx) no
1428
1429Optional Packages:
1430 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1431 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1432 --without-openssl Disable use of OpenSSL; use only limited internal crypto **EXPERIMENTAL**
1433 --without-stackprotect Don't use compiler's stack protection
1434 --without-hardening Don't use toolchain hardening flags
1435 --without-rpath Disable auto-added -R linker paths
1436 --with-cflags Specify additional flags to pass to compiler
1437 --with-cflags-after Specify additional flags to pass to compiler after configure
1438 --with-cppflags Specify additional flags to pass to preprocessor
1439 --with-ldflags Specify additional flags to pass to linker
1440 --with-ldflags-after Specify additional flags to pass to linker after configure
1441 --with-libs Specify additional libraries to link with
1442 --with-Werror Build main code with -Werror
1443 --with-solaris-contracts Enable Solaris process contracts (experimental)
1444 --with-solaris-projects Enable Solaris projects (experimental)
1445 --with-solaris-privs Enable Solaris/Illumos privileges (experimental)
1446 --with-osfsia Enable Digital Unix SIA
1447 --with-zlib=PATH Use zlib in PATH
1448 --without-zlib-version-check Disable zlib version check
1449 --with-ldns[=PATH] Use ldns for DNSSEC support (optionally in PATH)
1450 --with-libedit[=PATH] Enable libedit support for sftp
1451 --with-audit=module Enable audit support (modules=debug,bsm,linux)
1452 --with-pie Build Position Independent Executables if possible
1453 --with-ssl-dir=PATH Specify path to OpenSSL installation
1454 --without-openssl-header-check Disable OpenSSL version consistency check
1455 --with-ssl-engine Enable OpenSSL (hardware) ENGINE support
1456 --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT
1457 --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)
1458 --with-pam Enable PAM support
1459 --with-pam-service=name Specify PAM service name
1460 --with-privsep-user=user Specify non-privileged user for privilege separation
1461 --with-sandbox=style Specify privilege separation sandbox (no, capsicum, darwin, rlimit, seccomp_filter, systrace, pledge)
1462 --with-selinux Enable SELinux support
1463 --with-kerberos5=PATH Enable Kerberos 5 support
1464 --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)
1465 --with-xauth=PATH Specify path to xauth program
1466 --with-maildir=/path/to/mail Specify your system mail directory
1467 --with-mantype=man|cat|doc Set man page type
1468 --with-md5-passwords Enable use of MD5 passwords
1469 --without-shadow Disable shadow password support
1470 --with-ipaddr-display Use ip address instead of hostname in $DISPLAY
1471 --with-default-path= Specify default $PATH environment for server
1472 --with-superuser-path= Specify different path for super-user
1473 --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses
1474 --with-bsd-auth Enable BSD auth support
1475 --with-pid-dir=PATH Specify location of sshd.pid file
1476 --with-lastlog=FILE|DIR specify lastlog location common locations
1477
1478Some influential environment variables:
1479 CC C compiler command
1480 CFLAGS C compiler flags
1481 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1482 nonstandard directory <lib dir>
1483 LIBS libraries to pass to the linker, e.g. -l<library>
1484 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1485 you have headers in a nonstandard directory <include dir>
1486 CPP C preprocessor
1487
1488Use these variables to override the choices made by `configure' or to help
1489it to find libraries and programs with nonstandard names/locations.
1490
1491Report bugs to <openssh-unix-dev@mindrot.org>.
1492_ACEOF
1493ac_status=$?
1494fi
1495
1496if test "$ac_init_help" = "recursive"; then
1497 # If there are subdirs, report their specific --help.
1498 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1499 test -d "$ac_dir" ||
1500 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1501 continue
1502 ac_builddir=.
1503
1504case "$ac_dir" in
1505.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1506*)
1507 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1508 # A ".." for each directory in $ac_dir_suffix.
1509 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1510 case $ac_top_builddir_sub in
1511 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1512 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1513 esac ;;
1514esac
1515ac_abs_top_builddir=$ac_pwd
1516ac_abs_builddir=$ac_pwd$ac_dir_suffix
1517# for backward compatibility:
1518ac_top_builddir=$ac_top_build_prefix
1519
1520case $srcdir in
1521 .) # We are building in place.
1522 ac_srcdir=.
1523 ac_top_srcdir=$ac_top_builddir_sub
1524 ac_abs_top_srcdir=$ac_pwd ;;
1525 [\\/]* | ?:[\\/]* ) # Absolute name.
1526 ac_srcdir=$srcdir$ac_dir_suffix;
1527 ac_top_srcdir=$srcdir
1528 ac_abs_top_srcdir=$srcdir ;;
1529 *) # Relative name.
1530 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1531 ac_top_srcdir=$ac_top_build_prefix$srcdir
1532 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1533esac
1534ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1535
1536 cd "$ac_dir" || { ac_status=$?; continue; }
1537 # Check for guested configure.
1538 if test -f "$ac_srcdir/configure.gnu"; then
1539 echo &&
1540 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1541 elif test -f "$ac_srcdir/configure"; then
1542 echo &&
1543 $SHELL "$ac_srcdir/configure" --help=recursive
1544 else
1545 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1546 fi || ac_status=$?
1547 cd "$ac_pwd" || { ac_status=$?; break; }
1548 done
1549fi
1550
1551test -n "$ac_init_help" && exit $ac_status
1552if $ac_init_version; then
1553 cat <<\_ACEOF
1554OpenSSH configure Portable
1555generated by GNU Autoconf 2.69
1556
1557Copyright (C) 2012 Free Software Foundation, Inc.
1558This configure script is free software; the Free Software Foundation
1559gives unlimited permission to copy, distribute and modify it.
1560_ACEOF
1561 exit
1562fi
1563
1564## ------------------------ ##
1565## Autoconf initialization. ##
1566## ------------------------ ##
1567
1568# ac_fn_c_try_compile LINENO
1569# --------------------------
1570# Try to compile conftest.$ac_ext, and return whether this succeeded.
1571ac_fn_c_try_compile ()
1572{
1573 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1574 rm -f conftest.$ac_objext
1575 if { { ac_try="$ac_compile"
1576case "(($ac_try" in
1577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1578 *) ac_try_echo=$ac_try;;
1579esac
1580eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1581$as_echo "$ac_try_echo"; } >&5
1582 (eval "$ac_compile") 2>conftest.err
1583 ac_status=$?
1584 if test -s conftest.err; then
1585 grep -v '^ *+' conftest.err >conftest.er1
1586 cat conftest.er1 >&5
1587 mv -f conftest.er1 conftest.err
1588 fi
1589 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1590 test $ac_status = 0; } && {
1591 test -z "$ac_c_werror_flag" ||
1592 test ! -s conftest.err
1593 } && test -s conftest.$ac_objext; then :
1594 ac_retval=0
1595else
1596 $as_echo "$as_me: failed program was:" >&5
1597sed 's/^/| /' conftest.$ac_ext >&5
1598
1599 ac_retval=1
1600fi
1601 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1602 as_fn_set_status $ac_retval
1603
1604} # ac_fn_c_try_compile
1605
1606# ac_fn_c_try_run LINENO
1607# ----------------------
1608# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1609# that executables *can* be run.
1610ac_fn_c_try_run ()
1611{
1612 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1613 if { { ac_try="$ac_link"
1614case "(($ac_try" in
1615 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1616 *) ac_try_echo=$ac_try;;
1617esac
1618eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1619$as_echo "$ac_try_echo"; } >&5
1620 (eval "$ac_link") 2>&5
1621 ac_status=$?
1622 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1623 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1624 { { case "(($ac_try" in
1625 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1626 *) ac_try_echo=$ac_try;;
1627esac
1628eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1629$as_echo "$ac_try_echo"; } >&5
1630 (eval "$ac_try") 2>&5
1631 ac_status=$?
1632 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1633 test $ac_status = 0; }; }; then :
1634 ac_retval=0
1635else
1636 $as_echo "$as_me: program exited with status $ac_status" >&5
1637 $as_echo "$as_me: failed program was:" >&5
1638sed 's/^/| /' conftest.$ac_ext >&5
1639
1640 ac_retval=$ac_status
1641fi
1642 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1643 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1644 as_fn_set_status $ac_retval
1645
1646} # ac_fn_c_try_run
1647
1648# ac_fn_c_try_cpp LINENO
1649# ----------------------
1650# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1651ac_fn_c_try_cpp ()
1652{
1653 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1654 if { { ac_try="$ac_cpp conftest.$ac_ext"
1655case "(($ac_try" in
1656 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1657 *) ac_try_echo=$ac_try;;
1658esac
1659eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1660$as_echo "$ac_try_echo"; } >&5
1661 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1662 ac_status=$?
1663 if test -s conftest.err; then
1664 grep -v '^ *+' conftest.err >conftest.er1
1665 cat conftest.er1 >&5
1666 mv -f conftest.er1 conftest.err
1667 fi
1668 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1669 test $ac_status = 0; } > conftest.i && {
1670 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1671 test ! -s conftest.err
1672 }; then :
1673 ac_retval=0
1674else
1675 $as_echo "$as_me: failed program was:" >&5
1676sed 's/^/| /' conftest.$ac_ext >&5
1677
1678 ac_retval=1
1679fi
1680 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1681 as_fn_set_status $ac_retval
1682
1683} # ac_fn_c_try_cpp
1684
1685# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1686# -------------------------------------------------------
1687# Tests whether HEADER exists and can be compiled using the include files in
1688# INCLUDES, setting the cache variable VAR accordingly.
1689ac_fn_c_check_header_compile ()
1690{
1691 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1693$as_echo_n "checking for $2... " >&6; }
1694if eval \${$3+:} false; then :
1695 $as_echo_n "(cached) " >&6
1696else
1697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1698/* end confdefs.h. */
1699$4
1700#include <$2>
1701_ACEOF
1702if ac_fn_c_try_compile "$LINENO"; then :
1703 eval "$3=yes"
1704else
1705 eval "$3=no"
1706fi
1707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1708fi
1709eval ac_res=\$$3
1710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1711$as_echo "$ac_res" >&6; }
1712 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1713
1714} # ac_fn_c_check_header_compile
1715
1716# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1717# ---------------------------------------------
1718# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1719# accordingly.
1720ac_fn_c_check_decl ()
1721{
1722 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1723 as_decl_name=`echo $2|sed 's/ *(.*//'`
1724 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1726$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1727if eval \${$3+:} false; then :
1728 $as_echo_n "(cached) " >&6
1729else
1730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1731/* end confdefs.h. */
1732$4
1733int
1734main ()
1735{
1736#ifndef $as_decl_name
1737#ifdef __cplusplus
1738 (void) $as_decl_use;
1739#else
1740 (void) $as_decl_name;
1741#endif
1742#endif
1743
1744 ;
1745 return 0;
1746}
1747_ACEOF
1748if ac_fn_c_try_compile "$LINENO"; then :
1749 eval "$3=yes"
1750else
1751 eval "$3=no"
1752fi
1753rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1754fi
1755eval ac_res=\$$3
1756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1757$as_echo "$ac_res" >&6; }
1758 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1759
1760} # ac_fn_c_check_decl
1761
1762# ac_fn_c_try_link LINENO
1763# -----------------------
1764# Try to link conftest.$ac_ext, and return whether this succeeded.
1765ac_fn_c_try_link ()
1766{
1767 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1768 rm -f conftest.$ac_objext conftest$ac_exeext
1769 if { { ac_try="$ac_link"
1770case "(($ac_try" in
1771 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1772 *) ac_try_echo=$ac_try;;
1773esac
1774eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1775$as_echo "$ac_try_echo"; } >&5
1776 (eval "$ac_link") 2>conftest.err
1777 ac_status=$?
1778 if test -s conftest.err; then
1779 grep -v '^ *+' conftest.err >conftest.er1
1780 cat conftest.er1 >&5
1781 mv -f conftest.er1 conftest.err
1782 fi
1783 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1784 test $ac_status = 0; } && {
1785 test -z "$ac_c_werror_flag" ||
1786 test ! -s conftest.err
1787 } && test -s conftest$ac_exeext && {
1788 test "$cross_compiling" = yes ||
1789 test -x conftest$ac_exeext
1790 }; then :
1791 ac_retval=0
1792else
1793 $as_echo "$as_me: failed program was:" >&5
1794sed 's/^/| /' conftest.$ac_ext >&5
1795
1796 ac_retval=1
1797fi
1798 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1799 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1800 # interfere with the next link command; also delete a directory that is
1801 # left behind by Apple's compiler. We do this before executing the actions.
1802 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1803 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1804 as_fn_set_status $ac_retval
1805
1806} # ac_fn_c_try_link
1807
1808# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1809# -------------------------------------------------------
1810# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1811# the include files in INCLUDES and setting the cache variable VAR
1812# accordingly.
1813ac_fn_c_check_header_mongrel ()
1814{
1815 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1816 if eval \${$3+:} false; then :
1817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1818$as_echo_n "checking for $2... " >&6; }
1819if eval \${$3+:} false; then :
1820 $as_echo_n "(cached) " >&6
1821fi
1822eval ac_res=\$$3
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1824$as_echo "$ac_res" >&6; }
1825else
1826 # Is the header compilable?
1827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1828$as_echo_n "checking $2 usability... " >&6; }
1829cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1830/* end confdefs.h. */
1831$4
1832#include <$2>
1833_ACEOF
1834if ac_fn_c_try_compile "$LINENO"; then :
1835 ac_header_compiler=yes
1836else
1837 ac_header_compiler=no
1838fi
1839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1841$as_echo "$ac_header_compiler" >&6; }
1842
1843# Is the header present?
1844{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1845$as_echo_n "checking $2 presence... " >&6; }
1846cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1847/* end confdefs.h. */
1848#include <$2>
1849_ACEOF
1850if ac_fn_c_try_cpp "$LINENO"; then :
1851 ac_header_preproc=yes
1852else
1853 ac_header_preproc=no
1854fi
1855rm -f conftest.err conftest.i conftest.$ac_ext
1856{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1857$as_echo "$ac_header_preproc" >&6; }
1858
1859# So? What about this header?
1860case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1861 yes:no: )
1862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1863$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1864 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1865$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1866 ;;
1867 no:yes:* )
1868 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1869$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1871$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1872 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1873$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1874 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1875$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1877$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1878( $as_echo "## ------------------------------------------- ##
1879## Report this to openssh-unix-dev@mindrot.org ##
1880## ------------------------------------------- ##"
1881 ) | sed "s/^/$as_me: WARNING: /" >&2
1882 ;;
1883esac
1884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1885$as_echo_n "checking for $2... " >&6; }
1886if eval \${$3+:} false; then :
1887 $as_echo_n "(cached) " >&6
1888else
1889 eval "$3=\$ac_header_compiler"
1890fi
1891eval ac_res=\$$3
1892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1893$as_echo "$ac_res" >&6; }
1894fi
1895 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1896
1897} # ac_fn_c_check_header_mongrel
1898
1899# ac_fn_c_check_func LINENO FUNC VAR
1900# ----------------------------------
1901# Tests whether FUNC exists, setting the cache variable VAR accordingly
1902ac_fn_c_check_func ()
1903{
1904 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1906$as_echo_n "checking for $2... " >&6; }
1907if eval \${$3+:} false; then :
1908 $as_echo_n "(cached) " >&6
1909else
1910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1911/* end confdefs.h. */
1912/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1913 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1914#define $2 innocuous_$2
1915
1916/* System header to define __stub macros and hopefully few prototypes,
1917 which can conflict with char $2 (); below.
1918 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1919 <limits.h> exists even on freestanding compilers. */
1920
1921#ifdef __STDC__
1922# include <limits.h>
1923#else
1924# include <assert.h>
1925#endif
1926
1927#undef $2
1928
1929/* Override any GCC internal prototype to avoid an error.
1930 Use char because int might match the return type of a GCC
1931 builtin and then its argument prototype would still apply. */
1932#ifdef __cplusplus
1933extern "C"
1934#endif
1935char $2 ();
1936/* The GNU C library defines this for functions which it implements
1937 to always fail with ENOSYS. Some functions are actually named
1938 something starting with __ and the normal name is an alias. */
1939#if defined __stub_$2 || defined __stub___$2
1940choke me
1941#endif
1942
1943int
1944main ()
1945{
1946return $2 ();
1947 ;
1948 return 0;
1949}
1950_ACEOF
1951if ac_fn_c_try_link "$LINENO"; then :
1952 eval "$3=yes"
1953else
1954 eval "$3=no"
1955fi
1956rm -f core conftest.err conftest.$ac_objext \
1957 conftest$ac_exeext conftest.$ac_ext
1958fi
1959eval ac_res=\$$3
1960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1961$as_echo "$ac_res" >&6; }
1962 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1963
1964} # ac_fn_c_check_func
1965
1966# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1967# -------------------------------------------
1968# Tests whether TYPE exists after having included INCLUDES, setting cache
1969# variable VAR accordingly.
1970ac_fn_c_check_type ()
1971{
1972 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1973 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1974$as_echo_n "checking for $2... " >&6; }
1975if eval \${$3+:} false; then :
1976 $as_echo_n "(cached) " >&6
1977else
1978 eval "$3=no"
1979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1980/* end confdefs.h. */
1981$4
1982int
1983main ()
1984{
1985if (sizeof ($2))
1986 return 0;
1987 ;
1988 return 0;
1989}
1990_ACEOF
1991if ac_fn_c_try_compile "$LINENO"; then :
1992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$4
1995int
1996main ()
1997{
1998if (sizeof (($2)))
1999 return 0;
2000 ;
2001 return 0;
2002}
2003_ACEOF
2004if ac_fn_c_try_compile "$LINENO"; then :
2005
2006else
2007 eval "$3=yes"
2008fi
2009rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2010fi
2011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2012fi
2013eval ac_res=\$$3
2014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2015$as_echo "$ac_res" >&6; }
2016 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2017
2018} # ac_fn_c_check_type
2019
2020# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2021# --------------------------------------------
2022# Tries to find the compile-time value of EXPR in a program that includes
2023# INCLUDES, setting VAR accordingly. Returns whether the value could be
2024# computed
2025ac_fn_c_compute_int ()
2026{
2027 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2028 if test "$cross_compiling" = yes; then
2029 # Depending upon the size, compute the lo and hi bounds.
2030cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2031/* end confdefs.h. */
2032$4
2033int
2034main ()
2035{
2036static int test_array [1 - 2 * !(($2) >= 0)];
2037test_array [0] = 0;
2038return test_array [0];
2039
2040 ;
2041 return 0;
2042}
2043_ACEOF
2044if ac_fn_c_try_compile "$LINENO"; then :
2045 ac_lo=0 ac_mid=0
2046 while :; do
2047 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2048/* end confdefs.h. */
2049$4
2050int
2051main ()
2052{
2053static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2054test_array [0] = 0;
2055return test_array [0];
2056
2057 ;
2058 return 0;
2059}
2060_ACEOF
2061if ac_fn_c_try_compile "$LINENO"; then :
2062 ac_hi=$ac_mid; break
2063else
2064 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2065 if test $ac_lo -le $ac_mid; then
2066 ac_lo= ac_hi=
2067 break
2068 fi
2069 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2070fi
2071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2072 done
2073else
2074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2075/* end confdefs.h. */
2076$4
2077int
2078main ()
2079{
2080static int test_array [1 - 2 * !(($2) < 0)];
2081test_array [0] = 0;
2082return test_array [0];
2083
2084 ;
2085 return 0;
2086}
2087_ACEOF
2088if ac_fn_c_try_compile "$LINENO"; then :
2089 ac_hi=-1 ac_mid=-1
2090 while :; do
2091 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2092/* end confdefs.h. */
2093$4
2094int
2095main ()
2096{
2097static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2098test_array [0] = 0;
2099return test_array [0];
2100
2101 ;
2102 return 0;
2103}
2104_ACEOF
2105if ac_fn_c_try_compile "$LINENO"; then :
2106 ac_lo=$ac_mid; break
2107else
2108 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2109 if test $ac_mid -le $ac_hi; then
2110 ac_lo= ac_hi=
2111 break
2112 fi
2113 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2114fi
2115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2116 done
2117else
2118 ac_lo= ac_hi=
2119fi
2120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2121fi
2122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123# Binary search between lo and hi bounds.
2124while test "x$ac_lo" != "x$ac_hi"; do
2125 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2127/* end confdefs.h. */
2128$4
2129int
2130main ()
2131{
2132static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2133test_array [0] = 0;
2134return test_array [0];
2135
2136 ;
2137 return 0;
2138}
2139_ACEOF
2140if ac_fn_c_try_compile "$LINENO"; then :
2141 ac_hi=$ac_mid
2142else
2143 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2144fi
2145rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2146done
2147case $ac_lo in #((
2148?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2149'') ac_retval=1 ;;
2150esac
2151 else
2152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2153/* end confdefs.h. */
2154$4
2155static long int longval () { return $2; }
2156static unsigned long int ulongval () { return $2; }
2157#include <stdio.h>
2158#include <stdlib.h>
2159int
2160main ()
2161{
2162
2163 FILE *f = fopen ("conftest.val", "w");
2164 if (! f)
2165 return 1;
2166 if (($2) < 0)
2167 {
2168 long int i = longval ();
2169 if (i != ($2))
2170 return 1;
2171 fprintf (f, "%ld", i);
2172 }
2173 else
2174 {
2175 unsigned long int i = ulongval ();
2176 if (i != ($2))
2177 return 1;
2178 fprintf (f, "%lu", i);
2179 }
2180 /* Do not output a trailing newline, as this causes \r\n confusion
2181 on some platforms. */
2182 return ferror (f) || fclose (f) != 0;
2183
2184 ;
2185 return 0;
2186}
2187_ACEOF
2188if ac_fn_c_try_run "$LINENO"; then :
2189 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2190else
2191 ac_retval=1
2192fi
2193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2194 conftest.$ac_objext conftest.beam conftest.$ac_ext
2195rm -f conftest.val
2196
2197 fi
2198 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2199 as_fn_set_status $ac_retval
2200
2201} # ac_fn_c_compute_int
2202
2203# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2204# ----------------------------------------------------
2205# Tries to find if the field MEMBER exists in type AGGR, after including
2206# INCLUDES, setting cache variable VAR accordingly.
2207ac_fn_c_check_member ()
2208{
2209 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2211$as_echo_n "checking for $2.$3... " >&6; }
2212if eval \${$4+:} false; then :
2213 $as_echo_n "(cached) " >&6
2214else
2215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2216/* end confdefs.h. */
2217$5
2218int
2219main ()
2220{
2221static $2 ac_aggr;
2222if (ac_aggr.$3)
2223return 0;
2224 ;
2225 return 0;
2226}
2227_ACEOF
2228if ac_fn_c_try_compile "$LINENO"; then :
2229 eval "$4=yes"
2230else
2231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2232/* end confdefs.h. */
2233$5
2234int
2235main ()
2236{
2237static $2 ac_aggr;
2238if (sizeof ac_aggr.$3)
2239return 0;
2240 ;
2241 return 0;
2242}
2243_ACEOF
2244if ac_fn_c_try_compile "$LINENO"; then :
2245 eval "$4=yes"
2246else
2247 eval "$4=no"
2248fi
2249rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2250fi
2251rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2252fi
2253eval ac_res=\$$4
2254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2255$as_echo "$ac_res" >&6; }
2256 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2257
2258} # ac_fn_c_check_member
2259cat >config.log <<_ACEOF
2260This file contains any messages produced by compilers while
2261running configure, to aid debugging if configure makes a mistake.
2262
2263It was created by OpenSSH $as_me Portable, which was
2264generated by GNU Autoconf 2.69. Invocation command line was
2265
2266 $ $0 $@
2267
2268_ACEOF
2269exec 5>>config.log
2270{
2271cat <<_ASUNAME
2272## --------- ##
2273## Platform. ##
2274## --------- ##
2275
2276hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2277uname -m = `(uname -m) 2>/dev/null || echo unknown`
2278uname -r = `(uname -r) 2>/dev/null || echo unknown`
2279uname -s = `(uname -s) 2>/dev/null || echo unknown`
2280uname -v = `(uname -v) 2>/dev/null || echo unknown`
2281
2282/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2283/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2284
2285/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2286/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2287/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2288/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2289/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2290/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2291/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2292
2293_ASUNAME
2294
2295as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2296for as_dir in $PATH
2297do
2298 IFS=$as_save_IFS
2299 test -z "$as_dir" && as_dir=.
2300 $as_echo "PATH: $as_dir"
2301 done
2302IFS=$as_save_IFS
2303
2304} >&5
2305
2306cat >&5 <<_ACEOF
2307
2308
2309## ----------- ##
2310## Core tests. ##
2311## ----------- ##
2312
2313_ACEOF
2314
2315
2316# Keep a trace of the command line.
2317# Strip out --no-create and --no-recursion so they do not pile up.
2318# Strip out --silent because we don't want to record it for future runs.
2319# Also quote any args containing shell meta-characters.
2320# Make two passes to allow for proper duplicate-argument suppression.
2321ac_configure_args=
2322ac_configure_args0=
2323ac_configure_args1=
2324ac_must_keep_next=false
2325for ac_pass in 1 2
2326do
2327 for ac_arg
2328 do
2329 case $ac_arg in
2330 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2331 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2332 | -silent | --silent | --silen | --sile | --sil)
2333 continue ;;
2334 *\'*)
2335 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2336 esac
2337 case $ac_pass in
2338 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2339 2)
2340 as_fn_append ac_configure_args1 " '$ac_arg'"
2341 if test $ac_must_keep_next = true; then
2342 ac_must_keep_next=false # Got value, back to normal.
2343 else
2344 case $ac_arg in
2345 *=* | --config-cache | -C | -disable-* | --disable-* \
2346 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2347 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2348 | -with-* | --with-* | -without-* | --without-* | --x)
2349 case "$ac_configure_args0 " in
2350 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2351 esac
2352 ;;
2353 -* ) ac_must_keep_next=true ;;
2354 esac
2355 fi
2356 as_fn_append ac_configure_args " '$ac_arg'"
2357 ;;
2358 esac
2359 done
2360done
2361{ ac_configure_args0=; unset ac_configure_args0;}
2362{ ac_configure_args1=; unset ac_configure_args1;}
2363
2364# When interrupted or exit'd, cleanup temporary files, and complete
2365# config.log. We remove comments because anyway the quotes in there
2366# would cause problems or look ugly.
2367# WARNING: Use '\'' to represent an apostrophe within the trap.
2368# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2369trap 'exit_status=$?
2370 # Save into config.log some information that might help in debugging.
2371 {
2372 echo
2373
2374 $as_echo "## ---------------- ##
2375## Cache variables. ##
2376## ---------------- ##"
2377 echo
2378 # The following way of writing the cache mishandles newlines in values,
2379(
2380 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2381 eval ac_val=\$$ac_var
2382 case $ac_val in #(
2383 *${as_nl}*)
2384 case $ac_var in #(
2385 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2386$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2387 esac
2388 case $ac_var in #(
2389 _ | IFS | as_nl) ;; #(
2390 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2391 *) { eval $ac_var=; unset $ac_var;} ;;
2392 esac ;;
2393 esac
2394 done
2395 (set) 2>&1 |
2396 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2397 *${as_nl}ac_space=\ *)
2398 sed -n \
2399 "s/'\''/'\''\\\\'\'''\''/g;
2400 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2401 ;; #(
2402 *)
2403 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2404 ;;
2405 esac |
2406 sort
2407)
2408 echo
2409
2410 $as_echo "## ----------------- ##
2411## Output variables. ##
2412## ----------------- ##"
2413 echo
2414 for ac_var in $ac_subst_vars
2415 do
2416 eval ac_val=\$$ac_var
2417 case $ac_val in
2418 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2419 esac
2420 $as_echo "$ac_var='\''$ac_val'\''"
2421 done | sort
2422 echo
2423
2424 if test -n "$ac_subst_files"; then
2425 $as_echo "## ------------------- ##
2426## File substitutions. ##
2427## ------------------- ##"
2428 echo
2429 for ac_var in $ac_subst_files
2430 do
2431 eval ac_val=\$$ac_var
2432 case $ac_val in
2433 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2434 esac
2435 $as_echo "$ac_var='\''$ac_val'\''"
2436 done | sort
2437 echo
2438 fi
2439
2440 if test -s confdefs.h; then
2441 $as_echo "## ----------- ##
2442## confdefs.h. ##
2443## ----------- ##"
2444 echo
2445 cat confdefs.h
2446 echo
2447 fi
2448 test "$ac_signal" != 0 &&
2449 $as_echo "$as_me: caught signal $ac_signal"
2450 $as_echo "$as_me: exit $exit_status"
2451 } >&5
2452 rm -f core *.core core.conftest.* &&
2453 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2454 exit $exit_status
2455' 0
2456for ac_signal in 1 2 13 15; do
2457 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2458done
2459ac_signal=0
2460
2461# confdefs.h avoids OS command line length limits that DEFS can exceed.
2462rm -f -r conftest* confdefs.h
2463
2464$as_echo "/* confdefs.h */" > confdefs.h
2465
2466# Predefined preprocessor variables.
2467
2468cat >>confdefs.h <<_ACEOF
2469#define PACKAGE_NAME "$PACKAGE_NAME"
2470_ACEOF
2471
2472cat >>confdefs.h <<_ACEOF
2473#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2474_ACEOF
2475
2476cat >>confdefs.h <<_ACEOF
2477#define PACKAGE_VERSION "$PACKAGE_VERSION"
2478_ACEOF
2479
2480cat >>confdefs.h <<_ACEOF
2481#define PACKAGE_STRING "$PACKAGE_STRING"
2482_ACEOF
2483
2484cat >>confdefs.h <<_ACEOF
2485#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2486_ACEOF
2487
2488cat >>confdefs.h <<_ACEOF
2489#define PACKAGE_URL "$PACKAGE_URL"
2490_ACEOF
2491
2492
2493# Let the site file select an alternate cache file if it wants to.
2494# Prefer an explicitly selected file to automatically selected ones.
2495ac_site_file1=NONE
2496ac_site_file2=NONE
2497if test -n "$CONFIG_SITE"; then
2498 # We do not want a PATH search for config.site.
2499 case $CONFIG_SITE in #((
2500 -*) ac_site_file1=./$CONFIG_SITE;;
2501 */*) ac_site_file1=$CONFIG_SITE;;
2502 *) ac_site_file1=./$CONFIG_SITE;;
2503 esac
2504elif test "x$prefix" != xNONE; then
2505 ac_site_file1=$prefix/share/config.site
2506 ac_site_file2=$prefix/etc/config.site
2507else
2508 ac_site_file1=$ac_default_prefix/share/config.site
2509 ac_site_file2=$ac_default_prefix/etc/config.site
2510fi
2511for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2512do
2513 test "x$ac_site_file" = xNONE && continue
2514 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2515 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2516$as_echo "$as_me: loading site script $ac_site_file" >&6;}
2517 sed 's/^/| /' "$ac_site_file" >&5
2518 . "$ac_site_file" \
2519 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2520$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2521as_fn_error $? "failed to load site script $ac_site_file
2522See \`config.log' for more details" "$LINENO" 5; }
2523 fi
2524done
2525
2526if test -r "$cache_file"; then
2527 # Some versions of bash will fail to source /dev/null (special files
2528 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2529 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2530 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2531$as_echo "$as_me: loading cache $cache_file" >&6;}
2532 case $cache_file in
2533 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2534 *) . "./$cache_file";;
2535 esac
2536 fi
2537else
2538 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2539$as_echo "$as_me: creating cache $cache_file" >&6;}
2540 >$cache_file
2541fi
2542
2543# Check that the precious variables saved in the cache have kept the same
2544# value.
2545ac_cache_corrupted=false
2546for ac_var in $ac_precious_vars; do
2547 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2548 eval ac_new_set=\$ac_env_${ac_var}_set
2549 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2550 eval ac_new_val=\$ac_env_${ac_var}_value
2551 case $ac_old_set,$ac_new_set in
2552 set,)
2553 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2554$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2555 ac_cache_corrupted=: ;;
2556 ,set)
2557 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2558$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2559 ac_cache_corrupted=: ;;
2560 ,);;
2561 *)
2562 if test "x$ac_old_val" != "x$ac_new_val"; then
2563 # differences in whitespace do not lead to failure.
2564 ac_old_val_w=`echo x $ac_old_val`
2565 ac_new_val_w=`echo x $ac_new_val`
2566 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2567 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2568$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2569 ac_cache_corrupted=:
2570 else
2571 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2572$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2573 eval $ac_var=\$ac_old_val
2574 fi
2575 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2576$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2577 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2578$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2579 fi;;
2580 esac
2581 # Pass precious variables to config.status.
2582 if test "$ac_new_set" = set; then
2583 case $ac_new_val in
2584 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2585 *) ac_arg=$ac_var=$ac_new_val ;;
2586 esac
2587 case " $ac_configure_args " in
2588 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2589 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2590 esac
2591 fi
2592done
2593if $ac_cache_corrupted; then
2594 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2595$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2596 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2597$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2598 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2599fi
2600## -------------------- ##
2601## Main body of script. ##
2602## -------------------- ##
2603
2604ac_ext=c
2605ac_cpp='$CPP $CPPFLAGS'
2606ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2607ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2608ac_compiler_gnu=$ac_cv_c_compiler_gnu
2609
2610
2611
2612
2613ac_ext=c
2614ac_cpp='$CPP $CPPFLAGS'
2615ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2616ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2617ac_compiler_gnu=$ac_cv_c_compiler_gnu
2618
2619
2620ac_config_headers="$ac_config_headers config.h"
2621
2622ac_ext=c
2623ac_cpp='$CPP $CPPFLAGS'
2624ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2625ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2626ac_compiler_gnu=$ac_cv_c_compiler_gnu
2627if test -n "$ac_tool_prefix"; then
2628 for ac_prog in cc gcc
2629 do
2630 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2631set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2632{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2633$as_echo_n "checking for $ac_word... " >&6; }
2634if ${ac_cv_prog_CC+:} false; then :
2635 $as_echo_n "(cached) " >&6
2636else
2637 if test -n "$CC"; then
2638 ac_cv_prog_CC="$CC" # Let the user override the test.
2639else
2640as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2641for as_dir in $PATH
2642do
2643 IFS=$as_save_IFS
2644 test -z "$as_dir" && as_dir=.
2645 for ac_exec_ext in '' $ac_executable_extensions; do
2646 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2647 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2648 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2649 break 2
2650 fi
2651done
2652 done
2653IFS=$as_save_IFS
2654
2655fi
2656fi
2657CC=$ac_cv_prog_CC
2658if test -n "$CC"; then
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2660$as_echo "$CC" >&6; }
2661else
2662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2663$as_echo "no" >&6; }
2664fi
2665
2666
2667 test -n "$CC" && break
2668 done
2669fi
2670if test -z "$CC"; then
2671 ac_ct_CC=$CC
2672 for ac_prog in cc gcc
2673do
2674 # Extract the first word of "$ac_prog", so it can be a program name with args.
2675set dummy $ac_prog; ac_word=$2
2676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2677$as_echo_n "checking for $ac_word... " >&6; }
2678if ${ac_cv_prog_ac_ct_CC+:} false; then :
2679 $as_echo_n "(cached) " >&6
2680else
2681 if test -n "$ac_ct_CC"; then
2682 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2683else
2684as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2685for as_dir in $PATH
2686do
2687 IFS=$as_save_IFS
2688 test -z "$as_dir" && as_dir=.
2689 for ac_exec_ext in '' $ac_executable_extensions; do
2690 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2691 ac_cv_prog_ac_ct_CC="$ac_prog"
2692 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2693 break 2
2694 fi
2695done
2696 done
2697IFS=$as_save_IFS
2698
2699fi
2700fi
2701ac_ct_CC=$ac_cv_prog_ac_ct_CC
2702if test -n "$ac_ct_CC"; then
2703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2704$as_echo "$ac_ct_CC" >&6; }
2705else
2706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2707$as_echo "no" >&6; }
2708fi
2709
2710
2711 test -n "$ac_ct_CC" && break
2712done
2713
2714 if test "x$ac_ct_CC" = x; then
2715 CC=""
2716 else
2717 case $cross_compiling:$ac_tool_warned in
2718yes:)
2719{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2720$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2721ac_tool_warned=yes ;;
2722esac
2723 CC=$ac_ct_CC
2724 fi
2725fi
2726
2727
2728test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2729$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2730as_fn_error $? "no acceptable C compiler found in \$PATH
2731See \`config.log' for more details" "$LINENO" 5; }
2732
2733# Provide some information about the compiler.
2734$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2735set X $ac_compile
2736ac_compiler=$2
2737for ac_option in --version -v -V -qversion; do
2738 { { ac_try="$ac_compiler $ac_option >&5"
2739case "(($ac_try" in
2740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2741 *) ac_try_echo=$ac_try;;
2742esac
2743eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2744$as_echo "$ac_try_echo"; } >&5
2745 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2746 ac_status=$?
2747 if test -s conftest.err; then
2748 sed '10a\
2749... rest of stderr output deleted ...
2750 10q' conftest.err >conftest.er1
2751 cat conftest.er1 >&5
2752 fi
2753 rm -f conftest.er1 conftest.err
2754 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2755 test $ac_status = 0; }
2756done
2757
2758cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2759/* end confdefs.h. */
2760
2761int
2762main ()
2763{
2764
2765 ;
2766 return 0;
2767}
2768_ACEOF
2769ac_clean_files_save=$ac_clean_files
2770ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2771# Try to create an executable without -o first, disregard a.out.
2772# It will help us diagnose broken compilers, and finding out an intuition
2773# of exeext.
2774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2775$as_echo_n "checking whether the C compiler works... " >&6; }
2776ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2777
2778# The possible output files:
2779ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2780
2781ac_rmfiles=
2782for ac_file in $ac_files
2783do
2784 case $ac_file in
2785 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2786 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2787 esac
2788done
2789rm -f $ac_rmfiles
2790
2791if { { ac_try="$ac_link_default"
2792case "(($ac_try" in
2793 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2794 *) ac_try_echo=$ac_try;;
2795esac
2796eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2797$as_echo "$ac_try_echo"; } >&5
2798 (eval "$ac_link_default") 2>&5
2799 ac_status=$?
2800 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2801 test $ac_status = 0; }; then :
2802 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2803# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2804# in a Makefile. We should not override ac_cv_exeext if it was cached,
2805# so that the user can short-circuit this test for compilers unknown to
2806# Autoconf.
2807for ac_file in $ac_files ''
2808do
2809 test -f "$ac_file" || continue
2810 case $ac_file in
2811 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2812 ;;
2813 [ab].out )
2814 # We found the default executable, but exeext='' is most
2815 # certainly right.
2816 break;;
2817 *.* )
2818 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2819 then :; else
2820 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2821 fi
2822 # We set ac_cv_exeext here because the later test for it is not
2823 # safe: cross compilers may not add the suffix if given an `-o'
2824 # argument, so we may need to know it at that point already.
2825 # Even if this section looks crufty: it has the advantage of
2826 # actually working.
2827 break;;
2828 * )
2829 break;;
2830 esac
2831done
2832test "$ac_cv_exeext" = no && ac_cv_exeext=
2833
2834else
2835 ac_file=''
2836fi
2837if test -z "$ac_file"; then :
2838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2839$as_echo "no" >&6; }
2840$as_echo "$as_me: failed program was:" >&5
2841sed 's/^/| /' conftest.$ac_ext >&5
2842
2843{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2844$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2845as_fn_error 77 "C compiler cannot create executables
2846See \`config.log' for more details" "$LINENO" 5; }
2847else
2848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2849$as_echo "yes" >&6; }
2850fi
2851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
2852$as_echo_n "checking for C compiler default output file name... " >&6; }
2853{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
2854$as_echo "$ac_file" >&6; }
2855ac_exeext=$ac_cv_exeext
2856
2857rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2858ac_clean_files=$ac_clean_files_save
2859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2860$as_echo_n "checking for suffix of executables... " >&6; }
2861if { { ac_try="$ac_link"
2862case "(($ac_try" in
2863 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2864 *) ac_try_echo=$ac_try;;
2865esac
2866eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2867$as_echo "$ac_try_echo"; } >&5
2868 (eval "$ac_link") 2>&5
2869 ac_status=$?
2870 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2871 test $ac_status = 0; }; then :
2872 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2873# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2874# work properly (i.e., refer to `conftest.exe'), while it won't with
2875# `rm'.
2876for ac_file in conftest.exe conftest conftest.*; do
2877 test -f "$ac_file" || continue
2878 case $ac_file in
2879 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2880 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2881 break;;
2882 * ) break;;
2883 esac
2884done
2885else
2886 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2887$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2888as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2889See \`config.log' for more details" "$LINENO" 5; }
2890fi
2891rm -f conftest conftest$ac_cv_exeext
2892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
2893$as_echo "$ac_cv_exeext" >&6; }
2894
2895rm -f conftest.$ac_ext
2896EXEEXT=$ac_cv_exeext
2897ac_exeext=$EXEEXT
2898cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2899/* end confdefs.h. */
2900#include <stdio.h>
2901int
2902main ()
2903{
2904FILE *f = fopen ("conftest.out", "w");
2905 return ferror (f) || fclose (f) != 0;
2906
2907 ;
2908 return 0;
2909}
2910_ACEOF
2911ac_clean_files="$ac_clean_files conftest.out"
2912# Check that the compiler produces executables we can run. If not, either
2913# the compiler is broken, or we cross compile.
2914{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
2915$as_echo_n "checking whether we are cross compiling... " >&6; }
2916if test "$cross_compiling" != yes; then
2917 { { ac_try="$ac_link"
2918case "(($ac_try" in
2919 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2920 *) ac_try_echo=$ac_try;;
2921esac
2922eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2923$as_echo "$ac_try_echo"; } >&5
2924 (eval "$ac_link") 2>&5
2925 ac_status=$?
2926 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2927 test $ac_status = 0; }
2928 if { ac_try='./conftest$ac_cv_exeext'
2929 { { case "(($ac_try" in
2930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2931 *) ac_try_echo=$ac_try;;
2932esac
2933eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2934$as_echo "$ac_try_echo"; } >&5
2935 (eval "$ac_try") 2>&5
2936 ac_status=$?
2937 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2938 test $ac_status = 0; }; }; then
2939 cross_compiling=no
2940 else
2941 if test "$cross_compiling" = maybe; then
2942 cross_compiling=yes
2943 else
2944 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2945$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2946as_fn_error $? "cannot run C compiled programs.
2947If you meant to cross compile, use \`--host'.
2948See \`config.log' for more details" "$LINENO" 5; }
2949 fi
2950 fi
2951fi
2952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
2953$as_echo "$cross_compiling" >&6; }
2954
2955rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
2956ac_clean_files=$ac_clean_files_save
2957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
2958$as_echo_n "checking for suffix of object files... " >&6; }
2959if ${ac_cv_objext+:} false; then :
2960 $as_echo_n "(cached) " >&6
2961else
2962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2963/* end confdefs.h. */
2964
2965int
2966main ()
2967{
2968
2969 ;
2970 return 0;
2971}
2972_ACEOF
2973rm -f conftest.o conftest.obj
2974if { { ac_try="$ac_compile"
2975case "(($ac_try" in
2976 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2977 *) ac_try_echo=$ac_try;;
2978esac
2979eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2980$as_echo "$ac_try_echo"; } >&5
2981 (eval "$ac_compile") 2>&5
2982 ac_status=$?
2983 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2984 test $ac_status = 0; }; then :
2985 for ac_file in conftest.o conftest.obj conftest.*; do
2986 test -f "$ac_file" || continue;
2987 case $ac_file in
2988 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
2989 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2990 break;;
2991 esac
2992done
2993else
2994 $as_echo "$as_me: failed program was:" >&5
2995sed 's/^/| /' conftest.$ac_ext >&5
2996
2997{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2998$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2999as_fn_error $? "cannot compute suffix of object files: cannot compile
3000See \`config.log' for more details" "$LINENO" 5; }
3001fi
3002rm -f conftest.$ac_cv_objext conftest.$ac_ext
3003fi
3004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3005$as_echo "$ac_cv_objext" >&6; }
3006OBJEXT=$ac_cv_objext
3007ac_objext=$OBJEXT
3008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3009$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3010if ${ac_cv_c_compiler_gnu+:} false; then :
3011 $as_echo_n "(cached) " >&6
3012else
3013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3014/* end confdefs.h. */
3015
3016int
3017main ()
3018{
3019#ifndef __GNUC__
3020 choke me
3021#endif
3022
3023 ;
3024 return 0;
3025}
3026_ACEOF
3027if ac_fn_c_try_compile "$LINENO"; then :
3028 ac_compiler_gnu=yes
3029else
3030 ac_compiler_gnu=no
3031fi
3032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3033ac_cv_c_compiler_gnu=$ac_compiler_gnu
3034
3035fi
3036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3037$as_echo "$ac_cv_c_compiler_gnu" >&6; }
3038if test $ac_compiler_gnu = yes; then
3039 GCC=yes
3040else
3041 GCC=
3042fi
3043ac_test_CFLAGS=${CFLAGS+set}
3044ac_save_CFLAGS=$CFLAGS
3045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3046$as_echo_n "checking whether $CC accepts -g... " >&6; }
3047if ${ac_cv_prog_cc_g+:} false; then :
3048 $as_echo_n "(cached) " >&6
3049else
3050 ac_save_c_werror_flag=$ac_c_werror_flag
3051 ac_c_werror_flag=yes
3052 ac_cv_prog_cc_g=no
3053 CFLAGS="-g"
3054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3055/* end confdefs.h. */
3056
3057int
3058main ()
3059{
3060
3061 ;
3062 return 0;
3063}
3064_ACEOF
3065if ac_fn_c_try_compile "$LINENO"; then :
3066 ac_cv_prog_cc_g=yes
3067else
3068 CFLAGS=""
3069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3070/* end confdefs.h. */
3071
3072int
3073main ()
3074{
3075
3076 ;
3077 return 0;
3078}
3079_ACEOF
3080if ac_fn_c_try_compile "$LINENO"; then :
3081
3082else
3083 ac_c_werror_flag=$ac_save_c_werror_flag
3084 CFLAGS="-g"
3085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3086/* end confdefs.h. */
3087
3088int
3089main ()
3090{
3091
3092 ;
3093 return 0;
3094}
3095_ACEOF
3096if ac_fn_c_try_compile "$LINENO"; then :
3097 ac_cv_prog_cc_g=yes
3098fi
3099rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3100fi
3101rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3102fi
3103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3104 ac_c_werror_flag=$ac_save_c_werror_flag
3105fi
3106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3107$as_echo "$ac_cv_prog_cc_g" >&6; }
3108if test "$ac_test_CFLAGS" = set; then
3109 CFLAGS=$ac_save_CFLAGS
3110elif test $ac_cv_prog_cc_g = yes; then
3111 if test "$GCC" = yes; then
3112 CFLAGS="-g -O2"
3113 else
3114 CFLAGS="-g"
3115 fi
3116else
3117 if test "$GCC" = yes; then
3118 CFLAGS="-O2"
3119 else
3120 CFLAGS=
3121 fi
3122fi
3123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3124$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3125if ${ac_cv_prog_cc_c89+:} false; then :
3126 $as_echo_n "(cached) " >&6
3127else
3128 ac_cv_prog_cc_c89=no
3129ac_save_CC=$CC
3130cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3131/* end confdefs.h. */
3132#include <stdarg.h>
3133#include <stdio.h>
3134struct stat;
3135/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3136struct buf { int x; };
3137FILE * (*rcsopen) (struct buf *, struct stat *, int);
3138static char *e (p, i)
3139 char **p;
3140 int i;
3141{
3142 return p[i];
3143}
3144static char *f (char * (*g) (char **, int), char **p, ...)
3145{
3146 char *s;
3147 va_list v;
3148 va_start (v,p);
3149 s = g (p, va_arg (v,int));
3150 va_end (v);
3151 return s;
3152}
3153
3154/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3155 function prototypes and stuff, but not '\xHH' hex character constants.
3156 These don't provoke an error unfortunately, instead are silently treated
3157 as 'x'. The following induces an error, until -std is added to get
3158 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3159 array size at least. It's necessary to write '\x00'==0 to get something
3160 that's true only with -std. */
3161int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3162
3163/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3164 inside strings and character constants. */
3165#define FOO(x) 'x'
3166int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3167
3168int test (int i, double x);
3169struct s1 {int (*f) (int a);};
3170struct s2 {int (*f) (double a);};
3171int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3172int argc;
3173char **argv;
3174int
3175main ()
3176{
3177return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3178 ;
3179 return 0;
3180}
3181_ACEOF
3182for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3183 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3184do
3185 CC="$ac_save_CC $ac_arg"
3186 if ac_fn_c_try_compile "$LINENO"; then :
3187 ac_cv_prog_cc_c89=$ac_arg
3188fi
3189rm -f core conftest.err conftest.$ac_objext
3190 test "x$ac_cv_prog_cc_c89" != "xno" && break
3191done
3192rm -f conftest.$ac_ext
3193CC=$ac_save_CC
3194
3195fi
3196# AC_CACHE_VAL
3197case "x$ac_cv_prog_cc_c89" in
3198 x)
3199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3200$as_echo "none needed" >&6; } ;;
3201 xno)
3202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3203$as_echo "unsupported" >&6; } ;;
3204 *)
3205 CC="$CC $ac_cv_prog_cc_c89"
3206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3207$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3208esac
3209if test "x$ac_cv_prog_cc_c89" != xno; then :
3210
3211fi
3212
3213ac_ext=c
3214ac_cpp='$CPP $CPPFLAGS'
3215ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3216ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3217ac_compiler_gnu=$ac_cv_c_compiler_gnu
3218
3219ac_aux_dir=
3220for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3221 if test -f "$ac_dir/install-sh"; then
3222 ac_aux_dir=$ac_dir
3223 ac_install_sh="$ac_aux_dir/install-sh -c"
3224 break
3225 elif test -f "$ac_dir/install.sh"; then
3226 ac_aux_dir=$ac_dir
3227 ac_install_sh="$ac_aux_dir/install.sh -c"
3228 break
3229 elif test -f "$ac_dir/shtool"; then
3230 ac_aux_dir=$ac_dir
3231 ac_install_sh="$ac_aux_dir/shtool install -c"
3232 break
3233 fi
3234done
3235if test -z "$ac_aux_dir"; then
3236 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3237fi
3238
3239# These three variables are undocumented and unsupported,
3240# and are intended to be withdrawn in a future Autoconf release.
3241# They can cause serious problems if a builder's source tree is in a directory
3242# whose full name contains unusual characters.
3243ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3244ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3245ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3246
3247
3248# Make sure we can run config.sub.
3249$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3250 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3251
3252{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3253$as_echo_n "checking build system type... " >&6; }
3254if ${ac_cv_build+:} false; then :
3255 $as_echo_n "(cached) " >&6
3256else
3257 ac_build_alias=$build_alias
3258test "x$ac_build_alias" = x &&
3259 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3260test "x$ac_build_alias" = x &&
3261 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3262ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3263 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3264
3265fi
3266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3267$as_echo "$ac_cv_build" >&6; }
3268case $ac_cv_build in
3269*-*-*) ;;
3270*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3271esac
3272build=$ac_cv_build
3273ac_save_IFS=$IFS; IFS='-'
3274set x $ac_cv_build
3275shift
3276build_cpu=$1
3277build_vendor=$2
3278shift; shift
3279# Remember, the first character of IFS is used to create $*,
3280# except with old shells:
3281build_os=$*
3282IFS=$ac_save_IFS
3283case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3284
3285
3286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3287$as_echo_n "checking host system type... " >&6; }
3288if ${ac_cv_host+:} false; then :
3289 $as_echo_n "(cached) " >&6
3290else
3291 if test "x$host_alias" = x; then
3292 ac_cv_host=$ac_cv_build
3293else
3294 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3295 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3296fi
3297
3298fi
3299{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3300$as_echo "$ac_cv_host" >&6; }
3301case $ac_cv_host in
3302*-*-*) ;;
3303*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3304esac
3305host=$ac_cv_host
3306ac_save_IFS=$IFS; IFS='-'
3307set x $ac_cv_host
3308shift
3309host_cpu=$1
3310host_vendor=$2
3311shift; shift
3312# Remember, the first character of IFS is used to create $*,
3313# except with old shells:
3314host_os=$*
3315IFS=$ac_save_IFS
3316case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3317
3318
3319
3320ac_ext=c
3321ac_cpp='$CPP $CPPFLAGS'
3322ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3323ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3324ac_compiler_gnu=$ac_cv_c_compiler_gnu
3325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3326$as_echo_n "checking how to run the C preprocessor... " >&6; }
3327# On Suns, sometimes $CPP names a directory.
3328if test -n "$CPP" && test -d "$CPP"; then
3329 CPP=
3330fi
3331if test -z "$CPP"; then
3332 if ${ac_cv_prog_CPP+:} false; then :
3333 $as_echo_n "(cached) " >&6
3334else
3335 # Double quotes because CPP needs to be expanded
3336 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3337 do
3338 ac_preproc_ok=false
3339for ac_c_preproc_warn_flag in '' yes
3340do
3341 # Use a header file that comes with gcc, so configuring glibc
3342 # with a fresh cross-compiler works.
3343 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3344 # <limits.h> exists even on freestanding compilers.
3345 # On the NeXT, cc -E runs the code through the compiler's parser,
3346 # not just through cpp. "Syntax error" is here to catch this case.
3347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3348/* end confdefs.h. */
3349#ifdef __STDC__
3350# include <limits.h>
3351#else
3352# include <assert.h>
3353#endif
3354 Syntax error
3355_ACEOF
3356if ac_fn_c_try_cpp "$LINENO"; then :
3357
3358else
3359 # Broken: fails on valid input.
3360continue
3361fi
3362rm -f conftest.err conftest.i conftest.$ac_ext
3363
3364 # OK, works on sane cases. Now check whether nonexistent headers
3365 # can be detected and how.
3366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3367/* end confdefs.h. */
3368#include <ac_nonexistent.h>
3369_ACEOF
3370if ac_fn_c_try_cpp "$LINENO"; then :
3371 # Broken: success on invalid input.
3372continue
3373else
3374 # Passes both tests.
3375ac_preproc_ok=:
3376break
3377fi
3378rm -f conftest.err conftest.i conftest.$ac_ext
3379
3380done
3381# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3382rm -f conftest.i conftest.err conftest.$ac_ext
3383if $ac_preproc_ok; then :
3384 break
3385fi
3386
3387 done
3388 ac_cv_prog_CPP=$CPP
3389
3390fi
3391 CPP=$ac_cv_prog_CPP
3392else
3393 ac_cv_prog_CPP=$CPP
3394fi
3395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3396$as_echo "$CPP" >&6; }
3397ac_preproc_ok=false
3398for ac_c_preproc_warn_flag in '' yes
3399do
3400 # Use a header file that comes with gcc, so configuring glibc
3401 # with a fresh cross-compiler works.
3402 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3403 # <limits.h> exists even on freestanding compilers.
3404 # On the NeXT, cc -E runs the code through the compiler's parser,
3405 # not just through cpp. "Syntax error" is here to catch this case.
3406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3407/* end confdefs.h. */
3408#ifdef __STDC__
3409# include <limits.h>
3410#else
3411# include <assert.h>
3412#endif
3413 Syntax error
3414_ACEOF
3415if ac_fn_c_try_cpp "$LINENO"; then :
3416
3417else
3418 # Broken: fails on valid input.
3419continue
3420fi
3421rm -f conftest.err conftest.i conftest.$ac_ext
3422
3423 # OK, works on sane cases. Now check whether nonexistent headers
3424 # can be detected and how.
3425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3426/* end confdefs.h. */
3427#include <ac_nonexistent.h>
3428_ACEOF
3429if ac_fn_c_try_cpp "$LINENO"; then :
3430 # Broken: success on invalid input.
3431continue
3432else
3433 # Passes both tests.
3434ac_preproc_ok=:
3435break
3436fi
3437rm -f conftest.err conftest.i conftest.$ac_ext
3438
3439done
3440# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3441rm -f conftest.i conftest.err conftest.$ac_ext
3442if $ac_preproc_ok; then :
3443
3444else
3445 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3446$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3447as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3448See \`config.log' for more details" "$LINENO" 5; }
3449fi
3450
3451ac_ext=c
3452ac_cpp='$CPP $CPPFLAGS'
3453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3455ac_compiler_gnu=$ac_cv_c_compiler_gnu
3456
3457
3458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3459$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3460if ${ac_cv_path_GREP+:} false; then :
3461 $as_echo_n "(cached) " >&6
3462else
3463 if test -z "$GREP"; then
3464 ac_path_GREP_found=false
3465 # Loop through the user's path and test for each of PROGNAME-LIST
3466 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3467for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3468do
3469 IFS=$as_save_IFS
3470 test -z "$as_dir" && as_dir=.
3471 for ac_prog in grep ggrep; do
3472 for ac_exec_ext in '' $ac_executable_extensions; do
3473 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3474 as_fn_executable_p "$ac_path_GREP" || continue
3475# Check for GNU ac_path_GREP and select it if it is found.
3476 # Check for GNU $ac_path_GREP
3477case `"$ac_path_GREP" --version 2>&1` in
3478*GNU*)
3479 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3480*)
3481 ac_count=0
3482 $as_echo_n 0123456789 >"conftest.in"
3483 while :
3484 do
3485 cat "conftest.in" "conftest.in" >"conftest.tmp"
3486 mv "conftest.tmp" "conftest.in"
3487 cp "conftest.in" "conftest.nl"
3488 $as_echo 'GREP' >> "conftest.nl"
3489 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3490 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3491 as_fn_arith $ac_count + 1 && ac_count=$as_val
3492 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3493 # Best one so far, save it but keep looking for a better one
3494 ac_cv_path_GREP="$ac_path_GREP"
3495 ac_path_GREP_max=$ac_count
3496 fi
3497 # 10*(2^10) chars as input seems more than enough
3498 test $ac_count -gt 10 && break
3499 done
3500 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3501esac
3502
3503 $ac_path_GREP_found && break 3
3504 done
3505 done
3506 done
3507IFS=$as_save_IFS
3508 if test -z "$ac_cv_path_GREP"; then
3509 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3510 fi
3511else
3512 ac_cv_path_GREP=$GREP
3513fi
3514
3515fi
3516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3517$as_echo "$ac_cv_path_GREP" >&6; }
3518 GREP="$ac_cv_path_GREP"
3519
3520
3521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3522$as_echo_n "checking for egrep... " >&6; }
3523if ${ac_cv_path_EGREP+:} false; then :
3524 $as_echo_n "(cached) " >&6
3525else
3526 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3527 then ac_cv_path_EGREP="$GREP -E"
3528 else
3529 if test -z "$EGREP"; then
3530 ac_path_EGREP_found=false
3531 # Loop through the user's path and test for each of PROGNAME-LIST
3532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3533for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3534do
3535 IFS=$as_save_IFS
3536 test -z "$as_dir" && as_dir=.
3537 for ac_prog in egrep; do
3538 for ac_exec_ext in '' $ac_executable_extensions; do
3539 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3540 as_fn_executable_p "$ac_path_EGREP" || continue
3541# Check for GNU ac_path_EGREP and select it if it is found.
3542 # Check for GNU $ac_path_EGREP
3543case `"$ac_path_EGREP" --version 2>&1` in
3544*GNU*)
3545 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3546*)
3547 ac_count=0
3548 $as_echo_n 0123456789 >"conftest.in"
3549 while :
3550 do
3551 cat "conftest.in" "conftest.in" >"conftest.tmp"
3552 mv "conftest.tmp" "conftest.in"
3553 cp "conftest.in" "conftest.nl"
3554 $as_echo 'EGREP' >> "conftest.nl"
3555 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3556 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3557 as_fn_arith $ac_count + 1 && ac_count=$as_val
3558 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3559 # Best one so far, save it but keep looking for a better one
3560 ac_cv_path_EGREP="$ac_path_EGREP"
3561 ac_path_EGREP_max=$ac_count
3562 fi
3563 # 10*(2^10) chars as input seems more than enough
3564 test $ac_count -gt 10 && break
3565 done
3566 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3567esac
3568
3569 $ac_path_EGREP_found && break 3
3570 done
3571 done
3572 done
3573IFS=$as_save_IFS
3574 if test -z "$ac_cv_path_EGREP"; then
3575 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3576 fi
3577else
3578 ac_cv_path_EGREP=$EGREP
3579fi
3580
3581 fi
3582fi
3583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3584$as_echo "$ac_cv_path_EGREP" >&6; }
3585 EGREP="$ac_cv_path_EGREP"
3586
3587
3588{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3589$as_echo_n "checking for ANSI C header files... " >&6; }
3590if ${ac_cv_header_stdc+:} false; then :
3591 $as_echo_n "(cached) " >&6
3592else
3593 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3594/* end confdefs.h. */
3595#include <stdlib.h>
3596#include <stdarg.h>
3597#include <string.h>
3598#include <float.h>
3599
3600int
3601main ()
3602{
3603
3604 ;
3605 return 0;
3606}
3607_ACEOF
3608if ac_fn_c_try_compile "$LINENO"; then :
3609 ac_cv_header_stdc=yes
3610else
3611 ac_cv_header_stdc=no
3612fi
3613rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3614
3615if test $ac_cv_header_stdc = yes; then
3616 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3618/* end confdefs.h. */
3619#include <string.h>
3620
3621_ACEOF
3622if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3623 $EGREP "memchr" >/dev/null 2>&1; then :
3624
3625else
3626 ac_cv_header_stdc=no
3627fi
3628rm -f conftest*
3629
3630fi
3631
3632if test $ac_cv_header_stdc = yes; then
3633 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3635/* end confdefs.h. */
3636#include <stdlib.h>
3637
3638_ACEOF
3639if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3640 $EGREP "free" >/dev/null 2>&1; then :
3641
3642else
3643 ac_cv_header_stdc=no
3644fi
3645rm -f conftest*
3646
3647fi
3648
3649if test $ac_cv_header_stdc = yes; then
3650 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3651 if test "$cross_compiling" = yes; then :
3652 :
3653else
3654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3655/* end confdefs.h. */
3656#include <ctype.h>
3657#include <stdlib.h>
3658#if ((' ' & 0x0FF) == 0x020)
3659# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3660# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3661#else
3662# define ISLOWER(c) \
3663 (('a' <= (c) && (c) <= 'i') \
3664 || ('j' <= (c) && (c) <= 'r') \
3665 || ('s' <= (c) && (c) <= 'z'))
3666# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3667#endif
3668
3669#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3670int
3671main ()
3672{
3673 int i;
3674 for (i = 0; i < 256; i++)
3675 if (XOR (islower (i), ISLOWER (i))
3676 || toupper (i) != TOUPPER (i))
3677 return 2;
3678 return 0;
3679}
3680_ACEOF
3681if ac_fn_c_try_run "$LINENO"; then :
3682
3683else
3684 ac_cv_header_stdc=no
3685fi
3686rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3687 conftest.$ac_objext conftest.beam conftest.$ac_ext
3688fi
3689
3690fi
3691fi
3692{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3693$as_echo "$ac_cv_header_stdc" >&6; }
3694if test $ac_cv_header_stdc = yes; then
3695
3696$as_echo "#define STDC_HEADERS 1" >>confdefs.h
3697
3698fi
3699
3700# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3701for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3702 inttypes.h stdint.h unistd.h
3703do :
3704 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3705ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3706"
3707if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3708 cat >>confdefs.h <<_ACEOF
3709#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3710_ACEOF
3711
3712fi
3713
3714done
3715
3716
3717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
3718$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
3719if ${ac_cv_c_bigendian+:} false; then :
3720 $as_echo_n "(cached) " >&6
3721else
3722 ac_cv_c_bigendian=unknown
3723 # See if we're dealing with a universal compiler.
3724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3725/* end confdefs.h. */
3726#ifndef __APPLE_CC__
3727 not a universal capable compiler
3728 #endif
3729 typedef int dummy;
3730
3731_ACEOF
3732if ac_fn_c_try_compile "$LINENO"; then :
3733
3734 # Check for potential -arch flags. It is not universal unless
3735 # there are at least two -arch flags with different values.
3736 ac_arch=
3737 ac_prev=
3738 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
3739 if test -n "$ac_prev"; then
3740 case $ac_word in
3741 i?86 | x86_64 | ppc | ppc64)
3742 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
3743 ac_arch=$ac_word
3744 else
3745 ac_cv_c_bigendian=universal
3746 break
3747 fi
3748 ;;
3749 esac
3750 ac_prev=
3751 elif test "x$ac_word" = "x-arch"; then
3752 ac_prev=arch
3753 fi
3754 done
3755fi
3756rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3757 if test $ac_cv_c_bigendian = unknown; then
3758 # See if sys/param.h defines the BYTE_ORDER macro.
3759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3760/* end confdefs.h. */
3761#include <sys/types.h>
3762 #include <sys/param.h>
3763
3764int
3765main ()
3766{
3767#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
3768 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
3769 && LITTLE_ENDIAN)
3770 bogus endian macros
3771 #endif
3772
3773 ;
3774 return 0;
3775}
3776_ACEOF
3777if ac_fn_c_try_compile "$LINENO"; then :
3778 # It does; now see whether it defined to BIG_ENDIAN or not.
3779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3780/* end confdefs.h. */
3781#include <sys/types.h>
3782 #include <sys/param.h>
3783
3784int
3785main ()
3786{
3787#if BYTE_ORDER != BIG_ENDIAN
3788 not big endian
3789 #endif
3790
3791 ;
3792 return 0;
3793}
3794_ACEOF
3795if ac_fn_c_try_compile "$LINENO"; then :
3796 ac_cv_c_bigendian=yes
3797else
3798 ac_cv_c_bigendian=no
3799fi
3800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3801fi
3802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3803 fi
3804 if test $ac_cv_c_bigendian = unknown; then
3805 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
3806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3807/* end confdefs.h. */
3808#include <limits.h>
3809
3810int
3811main ()
3812{
3813#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
3814 bogus endian macros
3815 #endif
3816
3817 ;
3818 return 0;
3819}
3820_ACEOF
3821if ac_fn_c_try_compile "$LINENO"; then :
3822 # It does; now see whether it defined to _BIG_ENDIAN or not.
3823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3824/* end confdefs.h. */
3825#include <limits.h>
3826
3827int
3828main ()
3829{
3830#ifndef _BIG_ENDIAN
3831 not big endian
3832 #endif
3833
3834 ;
3835 return 0;
3836}
3837_ACEOF
3838if ac_fn_c_try_compile "$LINENO"; then :
3839 ac_cv_c_bigendian=yes
3840else
3841 ac_cv_c_bigendian=no
3842fi
3843rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3844fi
3845rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3846 fi
3847 if test $ac_cv_c_bigendian = unknown; then
3848 # Compile a test program.
3849 if test "$cross_compiling" = yes; then :
3850 # Try to guess by grepping values from an object file.
3851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3852/* end confdefs.h. */
3853short int ascii_mm[] =
3854 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
3855 short int ascii_ii[] =
3856 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
3857 int use_ascii (int i) {
3858 return ascii_mm[i] + ascii_ii[i];
3859 }
3860 short int ebcdic_ii[] =
3861 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3862 short int ebcdic_mm[] =
3863 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3864 int use_ebcdic (int i) {
3865 return ebcdic_mm[i] + ebcdic_ii[i];
3866 }
3867 extern int foo;
3868
3869int
3870main ()
3871{
3872return use_ascii (foo) == use_ebcdic (foo);
3873 ;
3874 return 0;
3875}
3876_ACEOF
3877if ac_fn_c_try_compile "$LINENO"; then :
3878 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
3879 ac_cv_c_bigendian=yes
3880 fi
3881 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
3882 if test "$ac_cv_c_bigendian" = unknown; then
3883 ac_cv_c_bigendian=no
3884 else
3885 # finding both strings is unlikely to happen, but who knows?
3886 ac_cv_c_bigendian=unknown
3887 fi
3888 fi
3889fi
3890rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3891else
3892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3893/* end confdefs.h. */
3894$ac_includes_default
3895int
3896main ()
3897{
3898
3899 /* Are we little or big endian? From Harbison&Steele. */
3900 union
3901 {
3902 long int l;
3903 char c[sizeof (long int)];
3904 } u;
3905 u.l = 1;
3906 return u.c[sizeof (long int) - 1] == 1;
3907
3908 ;
3909 return 0;
3910}
3911_ACEOF
3912if ac_fn_c_try_run "$LINENO"; then :
3913 ac_cv_c_bigendian=no
3914else
3915 ac_cv_c_bigendian=yes
3916fi
3917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3918 conftest.$ac_objext conftest.beam conftest.$ac_ext
3919fi
3920
3921 fi
3922fi
3923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
3924$as_echo "$ac_cv_c_bigendian" >&6; }
3925 case $ac_cv_c_bigendian in #(
3926 yes)
3927 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
3928;; #(
3929 no)
3930 ;; #(
3931 universal)
3932
3933$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
3934
3935 ;; #(
3936 *)
3937 as_fn_error $? "unknown endianness
3938 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
3939 esac
3940
3941
3942# Checks for programs.
3943for ac_prog in gawk mawk nawk awk
3944do
3945 # Extract the first word of "$ac_prog", so it can be a program name with args.
3946set dummy $ac_prog; ac_word=$2
3947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3948$as_echo_n "checking for $ac_word... " >&6; }
3949if ${ac_cv_prog_AWK+:} false; then :
3950 $as_echo_n "(cached) " >&6
3951else
3952 if test -n "$AWK"; then
3953 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3954else
3955as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3956for as_dir in $PATH
3957do
3958 IFS=$as_save_IFS
3959 test -z "$as_dir" && as_dir=.
3960 for ac_exec_ext in '' $ac_executable_extensions; do
3961 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3962 ac_cv_prog_AWK="$ac_prog"
3963 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3964 break 2
3965 fi
3966done
3967 done
3968IFS=$as_save_IFS
3969
3970fi
3971fi
3972AWK=$ac_cv_prog_AWK
3973if test -n "$AWK"; then
3974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3975$as_echo "$AWK" >&6; }
3976else
3977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3978$as_echo "no" >&6; }
3979fi
3980
3981
3982 test -n "$AWK" && break
3983done
3984
3985ac_ext=c
3986ac_cpp='$CPP $CPPFLAGS'
3987ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3988ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3989ac_compiler_gnu=$ac_cv_c_compiler_gnu
3990{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3991$as_echo_n "checking how to run the C preprocessor... " >&6; }
3992# On Suns, sometimes $CPP names a directory.
3993if test -n "$CPP" && test -d "$CPP"; then
3994 CPP=
3995fi
3996if test -z "$CPP"; then
3997 if ${ac_cv_prog_CPP+:} false; then :
3998 $as_echo_n "(cached) " >&6
3999else
4000 # Double quotes because CPP needs to be expanded
4001 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4002 do
4003 ac_preproc_ok=false
4004for ac_c_preproc_warn_flag in '' yes
4005do
4006 # Use a header file that comes with gcc, so configuring glibc
4007 # with a fresh cross-compiler works.
4008 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4009 # <limits.h> exists even on freestanding compilers.
4010 # On the NeXT, cc -E runs the code through the compiler's parser,
4011 # not just through cpp. "Syntax error" is here to catch this case.
4012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4013/* end confdefs.h. */
4014#ifdef __STDC__
4015# include <limits.h>
4016#else
4017# include <assert.h>
4018#endif
4019 Syntax error
4020_ACEOF
4021if ac_fn_c_try_cpp "$LINENO"; then :
4022
4023else
4024 # Broken: fails on valid input.
4025continue
4026fi
4027rm -f conftest.err conftest.i conftest.$ac_ext
4028
4029 # OK, works on sane cases. Now check whether nonexistent headers
4030 # can be detected and how.
4031 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4032/* end confdefs.h. */
4033#include <ac_nonexistent.h>
4034_ACEOF
4035if ac_fn_c_try_cpp "$LINENO"; then :
4036 # Broken: success on invalid input.
4037continue
4038else
4039 # Passes both tests.
4040ac_preproc_ok=:
4041break
4042fi
4043rm -f conftest.err conftest.i conftest.$ac_ext
4044
4045done
4046# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4047rm -f conftest.i conftest.err conftest.$ac_ext
4048if $ac_preproc_ok; then :
4049 break
4050fi
4051
4052 done
4053 ac_cv_prog_CPP=$CPP
4054
4055fi
4056 CPP=$ac_cv_prog_CPP
4057else
4058 ac_cv_prog_CPP=$CPP
4059fi
4060{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4061$as_echo "$CPP" >&6; }
4062ac_preproc_ok=false
4063for ac_c_preproc_warn_flag in '' yes
4064do
4065 # Use a header file that comes with gcc, so configuring glibc
4066 # with a fresh cross-compiler works.
4067 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4068 # <limits.h> exists even on freestanding compilers.
4069 # On the NeXT, cc -E runs the code through the compiler's parser,
4070 # not just through cpp. "Syntax error" is here to catch this case.
4071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4072/* end confdefs.h. */
4073#ifdef __STDC__
4074# include <limits.h>
4075#else
4076# include <assert.h>
4077#endif
4078 Syntax error
4079_ACEOF
4080if ac_fn_c_try_cpp "$LINENO"; then :
4081
4082else
4083 # Broken: fails on valid input.
4084continue
4085fi
4086rm -f conftest.err conftest.i conftest.$ac_ext
4087
4088 # OK, works on sane cases. Now check whether nonexistent headers
4089 # can be detected and how.
4090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4091/* end confdefs.h. */
4092#include <ac_nonexistent.h>
4093_ACEOF
4094if ac_fn_c_try_cpp "$LINENO"; then :
4095 # Broken: success on invalid input.
4096continue
4097else
4098 # Passes both tests.
4099ac_preproc_ok=:
4100break
4101fi
4102rm -f conftest.err conftest.i conftest.$ac_ext
4103
4104done
4105# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4106rm -f conftest.i conftest.err conftest.$ac_ext
4107if $ac_preproc_ok; then :
4108
4109else
4110 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4111$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4112as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4113See \`config.log' for more details" "$LINENO" 5; }
4114fi
4115
4116ac_ext=c
4117ac_cpp='$CPP $CPPFLAGS'
4118ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4119ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4120ac_compiler_gnu=$ac_cv_c_compiler_gnu
4121
4122if test -n "$ac_tool_prefix"; then
4123 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4124set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4125{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4126$as_echo_n "checking for $ac_word... " >&6; }
4127if ${ac_cv_prog_RANLIB+:} false; then :
4128 $as_echo_n "(cached) " >&6
4129else
4130 if test -n "$RANLIB"; then
4131 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4132else
4133as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4134for as_dir in $PATH
4135do
4136 IFS=$as_save_IFS
4137 test -z "$as_dir" && as_dir=.
4138 for ac_exec_ext in '' $ac_executable_extensions; do
4139 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4140 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4141 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4142 break 2
4143 fi
4144done
4145 done
4146IFS=$as_save_IFS
4147
4148fi
4149fi
4150RANLIB=$ac_cv_prog_RANLIB
4151if test -n "$RANLIB"; then
4152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4153$as_echo "$RANLIB" >&6; }
4154else
4155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4156$as_echo "no" >&6; }
4157fi
4158
4159
4160fi
4161if test -z "$ac_cv_prog_RANLIB"; then
4162 ac_ct_RANLIB=$RANLIB
4163 # Extract the first word of "ranlib", so it can be a program name with args.
4164set dummy ranlib; ac_word=$2
4165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4166$as_echo_n "checking for $ac_word... " >&6; }
4167if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4168 $as_echo_n "(cached) " >&6
4169else
4170 if test -n "$ac_ct_RANLIB"; then
4171 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4172else
4173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4174for as_dir in $PATH
4175do
4176 IFS=$as_save_IFS
4177 test -z "$as_dir" && as_dir=.
4178 for ac_exec_ext in '' $ac_executable_extensions; do
4179 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4180 ac_cv_prog_ac_ct_RANLIB="ranlib"
4181 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4182 break 2
4183 fi
4184done
4185 done
4186IFS=$as_save_IFS
4187
4188fi
4189fi
4190ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4191if test -n "$ac_ct_RANLIB"; then
4192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4193$as_echo "$ac_ct_RANLIB" >&6; }
4194else
4195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4196$as_echo "no" >&6; }
4197fi
4198
4199 if test "x$ac_ct_RANLIB" = x; then
4200 RANLIB=":"
4201 else
4202 case $cross_compiling:$ac_tool_warned in
4203yes:)
4204{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4205$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4206ac_tool_warned=yes ;;
4207esac
4208 RANLIB=$ac_ct_RANLIB
4209 fi
4210else
4211 RANLIB="$ac_cv_prog_RANLIB"
4212fi
4213
4214# Find a good install program. We prefer a C program (faster),
4215# so one script is as good as another. But avoid the broken or
4216# incompatible versions:
4217# SysV /etc/install, /usr/sbin/install
4218# SunOS /usr/etc/install
4219# IRIX /sbin/install
4220# AIX /bin/install
4221# AmigaOS /C/install, which installs bootblocks on floppy discs
4222# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4223# AFS /usr/afsws/bin/install, which mishandles nonexistent args
4224# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4225# OS/2's system install, which has a completely different semantic
4226# ./install, which can be erroneously created by make from ./install.sh.
4227# Reject install programs that cannot install multiple files.
4228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4229$as_echo_n "checking for a BSD-compatible install... " >&6; }
4230if test -z "$INSTALL"; then
4231if ${ac_cv_path_install+:} false; then :
4232 $as_echo_n "(cached) " >&6
4233else
4234 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4235for as_dir in $PATH
4236do
4237 IFS=$as_save_IFS
4238 test -z "$as_dir" && as_dir=.
4239 # Account for people who put trailing slashes in PATH elements.
4240case $as_dir/ in #((
4241 ./ | .// | /[cC]/* | \
4242 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4243 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4244 /usr/ucb/* ) ;;
4245 *)
4246 # OSF1 and SCO ODT 3.0 have their own names for install.
4247 # Don't use installbsd from OSF since it installs stuff as root
4248 # by default.
4249 for ac_prog in ginstall scoinst install; do
4250 for ac_exec_ext in '' $ac_executable_extensions; do
4251 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4252 if test $ac_prog = install &&
4253 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4254 # AIX install. It has an incompatible calling convention.
4255 :
4256 elif test $ac_prog = install &&
4257 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4258 # program-specific install script used by HP pwplus--don't use.
4259 :
4260 else
4261 rm -rf conftest.one conftest.two conftest.dir
4262 echo one > conftest.one
4263 echo two > conftest.two
4264 mkdir conftest.dir
4265 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4266 test -s conftest.one && test -s conftest.two &&
4267 test -s conftest.dir/conftest.one &&
4268 test -s conftest.dir/conftest.two
4269 then
4270 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4271 break 3
4272 fi
4273 fi
4274 fi
4275 done
4276 done
4277 ;;
4278esac
4279
4280 done
4281IFS=$as_save_IFS
4282
4283rm -rf conftest.one conftest.two conftest.dir
4284
4285fi
4286 if test "${ac_cv_path_install+set}" = set; then
4287 INSTALL=$ac_cv_path_install
4288 else
4289 # As a last resort, use the slow shell script. Don't cache a
4290 # value for INSTALL within a source directory, because that will
4291 # break other packages using the cache if that directory is
4292 # removed, or if the value is a relative name.
4293 INSTALL=$ac_install_sh
4294 fi
4295fi
4296{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4297$as_echo "$INSTALL" >&6; }
4298
4299# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4300# It thinks the first close brace ends the variable substitution.
4301test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4302
4303test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4304
4305test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4306
4307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4308$as_echo_n "checking for egrep... " >&6; }
4309if ${ac_cv_path_EGREP+:} false; then :
4310 $as_echo_n "(cached) " >&6
4311else
4312 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4313 then ac_cv_path_EGREP="$GREP -E"
4314 else
4315 if test -z "$EGREP"; then
4316 ac_path_EGREP_found=false
4317 # Loop through the user's path and test for each of PROGNAME-LIST
4318 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4319for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4320do
4321 IFS=$as_save_IFS
4322 test -z "$as_dir" && as_dir=.
4323 for ac_prog in egrep; do
4324 for ac_exec_ext in '' $ac_executable_extensions; do
4325 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4326 as_fn_executable_p "$ac_path_EGREP" || continue
4327# Check for GNU ac_path_EGREP and select it if it is found.
4328 # Check for GNU $ac_path_EGREP
4329case `"$ac_path_EGREP" --version 2>&1` in
4330*GNU*)
4331 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4332*)
4333 ac_count=0
4334 $as_echo_n 0123456789 >"conftest.in"
4335 while :
4336 do
4337 cat "conftest.in" "conftest.in" >"conftest.tmp"
4338 mv "conftest.tmp" "conftest.in"
4339 cp "conftest.in" "conftest.nl"
4340 $as_echo 'EGREP' >> "conftest.nl"
4341 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4342 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4343 as_fn_arith $ac_count + 1 && ac_count=$as_val
4344 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4345 # Best one so far, save it but keep looking for a better one
4346 ac_cv_path_EGREP="$ac_path_EGREP"
4347 ac_path_EGREP_max=$ac_count
4348 fi
4349 # 10*(2^10) chars as input seems more than enough
4350 test $ac_count -gt 10 && break
4351 done
4352 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4353esac
4354
4355 $ac_path_EGREP_found && break 3
4356 done
4357 done
4358 done
4359IFS=$as_save_IFS
4360 if test -z "$ac_cv_path_EGREP"; then
4361 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4362 fi
4363else
4364 ac_cv_path_EGREP=$EGREP
4365fi
4366
4367 fi
4368fi
4369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4370$as_echo "$ac_cv_path_EGREP" >&6; }
4371 EGREP="$ac_cv_path_EGREP"
4372
4373
4374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
4375$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
4376if test -z "$MKDIR_P"; then
4377 if ${ac_cv_path_mkdir+:} false; then :
4378 $as_echo_n "(cached) " >&6
4379else
4380 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4381for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4382do
4383 IFS=$as_save_IFS
4384 test -z "$as_dir" && as_dir=.
4385 for ac_prog in mkdir gmkdir; do
4386 for ac_exec_ext in '' $ac_executable_extensions; do
4387 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
4388 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
4389 'mkdir (GNU coreutils) '* | \
4390 'mkdir (coreutils) '* | \
4391 'mkdir (fileutils) '4.1*)
4392 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
4393 break 3;;
4394 esac
4395 done
4396 done
4397 done
4398IFS=$as_save_IFS
4399
4400fi
4401
4402 test -d ./--version && rmdir ./--version
4403 if test "${ac_cv_path_mkdir+set}" = set; then
4404 MKDIR_P="$ac_cv_path_mkdir -p"
4405 else
4406 # As a last resort, use the slow shell script. Don't cache a
4407 # value for MKDIR_P within a source directory, because that will
4408 # break other packages using the cache if that directory is
4409 # removed, or if the value is a relative name.
4410 MKDIR_P="$ac_install_sh -d"
4411 fi
4412fi
4413{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4414$as_echo "$MKDIR_P" >&6; }
4415
4416if test -n "$ac_tool_prefix"; then
4417 for ac_prog in ar
4418 do
4419 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4420set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4421{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4422$as_echo_n "checking for $ac_word... " >&6; }
4423if ${ac_cv_prog_AR+:} false; then :
4424 $as_echo_n "(cached) " >&6
4425else
4426 if test -n "$AR"; then
4427 ac_cv_prog_AR="$AR" # Let the user override the test.
4428else
4429as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4430for as_dir in $PATH
4431do
4432 IFS=$as_save_IFS
4433 test -z "$as_dir" && as_dir=.
4434 for ac_exec_ext in '' $ac_executable_extensions; do
4435 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4436 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
4437 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4438 break 2
4439 fi
4440done
4441 done
4442IFS=$as_save_IFS
4443
4444fi
4445fi
4446AR=$ac_cv_prog_AR
4447if test -n "$AR"; then
4448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4449$as_echo "$AR" >&6; }
4450else
4451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4452$as_echo "no" >&6; }
4453fi
4454
4455
4456 test -n "$AR" && break
4457 done
4458fi
4459if test -z "$AR"; then
4460 ac_ct_AR=$AR
4461 for ac_prog in ar
4462do
4463 # Extract the first word of "$ac_prog", so it can be a program name with args.
4464set dummy $ac_prog; ac_word=$2
4465{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4466$as_echo_n "checking for $ac_word... " >&6; }
4467if ${ac_cv_prog_ac_ct_AR+:} false; then :
4468 $as_echo_n "(cached) " >&6
4469else
4470 if test -n "$ac_ct_AR"; then
4471 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4472else
4473as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4474for as_dir in $PATH
4475do
4476 IFS=$as_save_IFS
4477 test -z "$as_dir" && as_dir=.
4478 for ac_exec_ext in '' $ac_executable_extensions; do
4479 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4480 ac_cv_prog_ac_ct_AR="$ac_prog"
4481 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4482 break 2
4483 fi
4484done
4485 done
4486IFS=$as_save_IFS
4487
4488fi
4489fi
4490ac_ct_AR=$ac_cv_prog_ac_ct_AR
4491if test -n "$ac_ct_AR"; then
4492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4493$as_echo "$ac_ct_AR" >&6; }
4494else
4495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4496$as_echo "no" >&6; }
4497fi
4498
4499
4500 test -n "$ac_ct_AR" && break
4501done
4502
4503 if test "x$ac_ct_AR" = x; then
4504 AR=""
4505 else
4506 case $cross_compiling:$ac_tool_warned in
4507yes:)
4508{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4509$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4510ac_tool_warned=yes ;;
4511esac
4512 AR=$ac_ct_AR
4513 fi
4514fi
4515
4516# Extract the first word of "cat", so it can be a program name with args.
4517set dummy cat; ac_word=$2
4518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4519$as_echo_n "checking for $ac_word... " >&6; }
4520if ${ac_cv_path_CAT+:} false; then :
4521 $as_echo_n "(cached) " >&6
4522else
4523 case $CAT in
4524 [\\/]* | ?:[\\/]*)
4525 ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4526 ;;
4527 *)
4528 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4529for as_dir in $PATH
4530do
4531 IFS=$as_save_IFS
4532 test -z "$as_dir" && as_dir=.
4533 for ac_exec_ext in '' $ac_executable_extensions; do
4534 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4535 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4536 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4537 break 2
4538 fi
4539done
4540 done
4541IFS=$as_save_IFS
4542
4543 ;;
4544esac
4545fi
4546CAT=$ac_cv_path_CAT
4547if test -n "$CAT"; then
4548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4549$as_echo "$CAT" >&6; }
4550else
4551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4552$as_echo "no" >&6; }
4553fi
4554
4555
4556# Extract the first word of "kill", so it can be a program name with args.
4557set dummy kill; ac_word=$2
4558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4559$as_echo_n "checking for $ac_word... " >&6; }
4560if ${ac_cv_path_KILL+:} false; then :
4561 $as_echo_n "(cached) " >&6
4562else
4563 case $KILL in
4564 [\\/]* | ?:[\\/]*)
4565 ac_cv_path_KILL="$KILL" # Let the user override the test with a path.
4566 ;;
4567 *)
4568 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4569for as_dir in $PATH
4570do
4571 IFS=$as_save_IFS
4572 test -z "$as_dir" && as_dir=.
4573 for ac_exec_ext in '' $ac_executable_extensions; do
4574 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4575 ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext"
4576 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4577 break 2
4578 fi
4579done
4580 done
4581IFS=$as_save_IFS
4582
4583 ;;
4584esac
4585fi
4586KILL=$ac_cv_path_KILL
4587if test -n "$KILL"; then
4588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KILL" >&5
4589$as_echo "$KILL" >&6; }
4590else
4591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4592$as_echo "no" >&6; }
4593fi
4594
4595
4596# Extract the first word of "sed", so it can be a program name with args.
4597set dummy sed; ac_word=$2
4598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4599$as_echo_n "checking for $ac_word... " >&6; }
4600if ${ac_cv_path_SED+:} false; then :
4601 $as_echo_n "(cached) " >&6
4602else
4603 case $SED in
4604 [\\/]* | ?:[\\/]*)
4605 ac_cv_path_SED="$SED" # Let the user override the test with a path.
4606 ;;
4607 *)
4608 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4609for as_dir in $PATH
4610do
4611 IFS=$as_save_IFS
4612 test -z "$as_dir" && as_dir=.
4613 for ac_exec_ext in '' $ac_executable_extensions; do
4614 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4615 ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
4616 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4617 break 2
4618 fi
4619done
4620 done
4621IFS=$as_save_IFS
4622
4623 ;;
4624esac
4625fi
4626SED=$ac_cv_path_SED
4627if test -n "$SED"; then
4628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
4629$as_echo "$SED" >&6; }
4630else
4631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4632$as_echo "no" >&6; }
4633fi
4634
4635
4636# Extract the first word of "ent", so it can be a program name with args.
4637set dummy ent; ac_word=$2
4638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4639$as_echo_n "checking for $ac_word... " >&6; }
4640if ${ac_cv_path_ENT+:} false; then :
4641 $as_echo_n "(cached) " >&6
4642else
4643 case $ENT in
4644 [\\/]* | ?:[\\/]*)
4645 ac_cv_path_ENT="$ENT" # Let the user override the test with a path.
4646 ;;
4647 *)
4648 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4649for as_dir in $PATH
4650do
4651 IFS=$as_save_IFS
4652 test -z "$as_dir" && as_dir=.
4653 for ac_exec_ext in '' $ac_executable_extensions; do
4654 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4655 ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext"
4656 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4657 break 2
4658 fi
4659done
4660 done
4661IFS=$as_save_IFS
4662
4663 ;;
4664esac
4665fi
4666ENT=$ac_cv_path_ENT
4667if test -n "$ENT"; then
4668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENT" >&5
4669$as_echo "$ENT" >&6; }
4670else
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4672$as_echo "no" >&6; }
4673fi
4674
4675
4676
4677# Extract the first word of "bash", so it can be a program name with args.
4678set dummy bash; ac_word=$2
4679{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4680$as_echo_n "checking for $ac_word... " >&6; }
4681if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4682 $as_echo_n "(cached) " >&6
4683else
4684 case $TEST_MINUS_S_SH in
4685 [\\/]* | ?:[\\/]*)
4686 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4687 ;;
4688 *)
4689 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4690for as_dir in $PATH
4691do
4692 IFS=$as_save_IFS
4693 test -z "$as_dir" && as_dir=.
4694 for ac_exec_ext in '' $ac_executable_extensions; do
4695 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4696 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4697 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4698 break 2
4699 fi
4700done
4701 done
4702IFS=$as_save_IFS
4703
4704 ;;
4705esac
4706fi
4707TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4708if test -n "$TEST_MINUS_S_SH"; then
4709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4710$as_echo "$TEST_MINUS_S_SH" >&6; }
4711else
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4713$as_echo "no" >&6; }
4714fi
4715
4716
4717# Extract the first word of "ksh", so it can be a program name with args.
4718set dummy ksh; ac_word=$2
4719{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4720$as_echo_n "checking for $ac_word... " >&6; }
4721if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4722 $as_echo_n "(cached) " >&6
4723else
4724 case $TEST_MINUS_S_SH in
4725 [\\/]* | ?:[\\/]*)
4726 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4727 ;;
4728 *)
4729 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4730for as_dir in $PATH
4731do
4732 IFS=$as_save_IFS
4733 test -z "$as_dir" && as_dir=.
4734 for ac_exec_ext in '' $ac_executable_extensions; do
4735 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4736 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4737 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4738 break 2
4739 fi
4740done
4741 done
4742IFS=$as_save_IFS
4743
4744 ;;
4745esac
4746fi
4747TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4748if test -n "$TEST_MINUS_S_SH"; then
4749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4750$as_echo "$TEST_MINUS_S_SH" >&6; }
4751else
4752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4753$as_echo "no" >&6; }
4754fi
4755
4756
4757# Extract the first word of "sh", so it can be a program name with args.
4758set dummy sh; ac_word=$2
4759{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4760$as_echo_n "checking for $ac_word... " >&6; }
4761if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4762 $as_echo_n "(cached) " >&6
4763else
4764 case $TEST_MINUS_S_SH in
4765 [\\/]* | ?:[\\/]*)
4766 ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4767 ;;
4768 *)
4769 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4770for as_dir in $PATH
4771do
4772 IFS=$as_save_IFS
4773 test -z "$as_dir" && as_dir=.
4774 for ac_exec_ext in '' $ac_executable_extensions; do
4775 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4776 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4777 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4778 break 2
4779 fi
4780done
4781 done
4782IFS=$as_save_IFS
4783
4784 ;;
4785esac
4786fi
4787TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4788if test -n "$TEST_MINUS_S_SH"; then
4789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4790$as_echo "$TEST_MINUS_S_SH" >&6; }
4791else
4792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4793$as_echo "no" >&6; }
4794fi
4795
4796
4797# Extract the first word of "sh", so it can be a program name with args.
4798set dummy sh; ac_word=$2
4799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4800$as_echo_n "checking for $ac_word... " >&6; }
4801if ${ac_cv_path_SH+:} false; then :
4802 $as_echo_n "(cached) " >&6
4803else
4804 case $SH in
4805 [\\/]* | ?:[\\/]*)
4806 ac_cv_path_SH="$SH" # Let the user override the test with a path.
4807 ;;
4808 *)
4809 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4810for as_dir in $PATH
4811do
4812 IFS=$as_save_IFS
4813 test -z "$as_dir" && as_dir=.
4814 for ac_exec_ext in '' $ac_executable_extensions; do
4815 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4816 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
4817 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4818 break 2
4819 fi
4820done
4821 done
4822IFS=$as_save_IFS
4823
4824 ;;
4825esac
4826fi
4827SH=$ac_cv_path_SH
4828if test -n "$SH"; then
4829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
4830$as_echo "$SH" >&6; }
4831else
4832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4833$as_echo "no" >&6; }
4834fi
4835
4836
4837# Extract the first word of "groff", so it can be a program name with args.
4838set dummy groff; ac_word=$2
4839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4840$as_echo_n "checking for $ac_word... " >&6; }
4841if ${ac_cv_path_GROFF+:} false; then :
4842 $as_echo_n "(cached) " >&6
4843else
4844 case $GROFF in
4845 [\\/]* | ?:[\\/]*)
4846 ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path.
4847 ;;
4848 *)
4849 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4850for as_dir in $PATH
4851do
4852 IFS=$as_save_IFS
4853 test -z "$as_dir" && as_dir=.
4854 for ac_exec_ext in '' $ac_executable_extensions; do
4855 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4856 ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext"
4857 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4858 break 2
4859 fi
4860done
4861 done
4862IFS=$as_save_IFS
4863
4864 ;;
4865esac
4866fi
4867GROFF=$ac_cv_path_GROFF
4868if test -n "$GROFF"; then
4869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5
4870$as_echo "$GROFF" >&6; }
4871else
4872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4873$as_echo "no" >&6; }
4874fi
4875
4876
4877# Extract the first word of "nroff awf", so it can be a program name with args.
4878set dummy nroff awf; ac_word=$2
4879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4880$as_echo_n "checking for $ac_word... " >&6; }
4881if ${ac_cv_path_NROFF+:} false; then :
4882 $as_echo_n "(cached) " >&6
4883else
4884 case $NROFF in
4885 [\\/]* | ?:[\\/]*)
4886 ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
4887 ;;
4888 *)
4889 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4890for as_dir in $PATH
4891do
4892 IFS=$as_save_IFS
4893 test -z "$as_dir" && as_dir=.
4894 for ac_exec_ext in '' $ac_executable_extensions; do
4895 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4896 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
4897 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4898 break 2
4899 fi
4900done
4901 done
4902IFS=$as_save_IFS
4903
4904 ;;
4905esac
4906fi
4907NROFF=$ac_cv_path_NROFF
4908if test -n "$NROFF"; then
4909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
4910$as_echo "$NROFF" >&6; }
4911else
4912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4913$as_echo "no" >&6; }
4914fi
4915
4916
4917# Extract the first word of "mandoc", so it can be a program name with args.
4918set dummy mandoc; ac_word=$2
4919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4920$as_echo_n "checking for $ac_word... " >&6; }
4921if ${ac_cv_path_MANDOC+:} false; then :
4922 $as_echo_n "(cached) " >&6
4923else
4924 case $MANDOC in
4925 [\\/]* | ?:[\\/]*)
4926 ac_cv_path_MANDOC="$MANDOC" # Let the user override the test with a path.
4927 ;;
4928 *)
4929 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4930for as_dir in $PATH
4931do
4932 IFS=$as_save_IFS
4933 test -z "$as_dir" && as_dir=.
4934 for ac_exec_ext in '' $ac_executable_extensions; do
4935 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4936 ac_cv_path_MANDOC="$as_dir/$ac_word$ac_exec_ext"
4937 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4938 break 2
4939 fi
4940done
4941 done
4942IFS=$as_save_IFS
4943
4944 ;;
4945esac
4946fi
4947MANDOC=$ac_cv_path_MANDOC
4948if test -n "$MANDOC"; then
4949 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANDOC" >&5
4950$as_echo "$MANDOC" >&6; }
4951else
4952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4953$as_echo "no" >&6; }
4954fi
4955
4956
4957TEST_SHELL=sh
4958
4959
4960if test "x$MANDOC" != "x" ; then
4961 MANFMT="$MANDOC"
4962elif test "x$NROFF" != "x" ; then
4963 MANFMT="$NROFF -mandoc"
4964elif test "x$GROFF" != "x" ; then
4965 MANFMT="$GROFF -mandoc -Tascii"
4966else
4967 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no manpage formatter found" >&5
4968$as_echo "$as_me: WARNING: no manpage formatter found" >&2;}
4969 MANFMT="false"
4970fi
4971
4972
4973# Extract the first word of "groupadd", so it can be a program name with args.
4974set dummy groupadd; ac_word=$2
4975{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4976$as_echo_n "checking for $ac_word... " >&6; }
4977if ${ac_cv_path_PATH_GROUPADD_PROG+:} false; then :
4978 $as_echo_n "(cached) " >&6
4979else
4980 case $PATH_GROUPADD_PROG in
4981 [\\/]* | ?:[\\/]*)
4982 ac_cv_path_PATH_GROUPADD_PROG="$PATH_GROUPADD_PROG" # Let the user override the test with a path.
4983 ;;
4984 *)
4985 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4986for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
4987do
4988 IFS=$as_save_IFS
4989 test -z "$as_dir" && as_dir=.
4990 for ac_exec_ext in '' $ac_executable_extensions; do
4991 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4992 ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext"
4993 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4994 break 2
4995 fi
4996done
4997 done
4998IFS=$as_save_IFS
4999
5000 test -z "$ac_cv_path_PATH_GROUPADD_PROG" && ac_cv_path_PATH_GROUPADD_PROG="groupadd"
5001 ;;
5002esac
5003fi
5004PATH_GROUPADD_PROG=$ac_cv_path_PATH_GROUPADD_PROG
5005if test -n "$PATH_GROUPADD_PROG"; then
5006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_GROUPADD_PROG" >&5
5007$as_echo "$PATH_GROUPADD_PROG" >&6; }
5008else
5009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5010$as_echo "no" >&6; }
5011fi
5012
5013
5014# Extract the first word of "useradd", so it can be a program name with args.
5015set dummy useradd; ac_word=$2
5016{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5017$as_echo_n "checking for $ac_word... " >&6; }
5018if ${ac_cv_path_PATH_USERADD_PROG+:} false; then :
5019 $as_echo_n "(cached) " >&6
5020else
5021 case $PATH_USERADD_PROG in
5022 [\\/]* | ?:[\\/]*)
5023 ac_cv_path_PATH_USERADD_PROG="$PATH_USERADD_PROG" # Let the user override the test with a path.
5024 ;;
5025 *)
5026 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5027for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
5028do
5029 IFS=$as_save_IFS
5030 test -z "$as_dir" && as_dir=.
5031 for ac_exec_ext in '' $ac_executable_extensions; do
5032 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5033 ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext"
5034 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5035 break 2
5036 fi
5037done
5038 done
5039IFS=$as_save_IFS
5040
5041 test -z "$ac_cv_path_PATH_USERADD_PROG" && ac_cv_path_PATH_USERADD_PROG="useradd"
5042 ;;
5043esac
5044fi
5045PATH_USERADD_PROG=$ac_cv_path_PATH_USERADD_PROG
5046if test -n "$PATH_USERADD_PROG"; then
5047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_USERADD_PROG" >&5
5048$as_echo "$PATH_USERADD_PROG" >&6; }
5049else
5050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5051$as_echo "no" >&6; }
5052fi
5053
5054
5055# Extract the first word of "pkgmk", so it can be a program name with args.
5056set dummy pkgmk; ac_word=$2
5057{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5058$as_echo_n "checking for $ac_word... " >&6; }
5059if ${ac_cv_prog_MAKE_PACKAGE_SUPPORTED+:} false; then :
5060 $as_echo_n "(cached) " >&6
5061else
5062 if test -n "$MAKE_PACKAGE_SUPPORTED"; then
5063 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="$MAKE_PACKAGE_SUPPORTED" # Let the user override the test.
5064else
5065as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5066for as_dir in $PATH
5067do
5068 IFS=$as_save_IFS
5069 test -z "$as_dir" && as_dir=.
5070 for ac_exec_ext in '' $ac_executable_extensions; do
5071 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5072 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes"
5073 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5074 break 2
5075 fi
5076done
5077 done
5078IFS=$as_save_IFS
5079
5080 test -z "$ac_cv_prog_MAKE_PACKAGE_SUPPORTED" && ac_cv_prog_MAKE_PACKAGE_SUPPORTED="no"
5081fi
5082fi
5083MAKE_PACKAGE_SUPPORTED=$ac_cv_prog_MAKE_PACKAGE_SUPPORTED
5084if test -n "$MAKE_PACKAGE_SUPPORTED"; then
5085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE_PACKAGE_SUPPORTED" >&5
5086$as_echo "$MAKE_PACKAGE_SUPPORTED" >&6; }
5087else
5088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5089$as_echo "no" >&6; }
5090fi
5091
5092
5093if test -x /sbin/sh; then
5094 STARTUP_SCRIPT_SHELL=/sbin/sh
5095
5096else
5097 STARTUP_SCRIPT_SHELL=/bin/sh
5098
5099fi
5100
5101# System features
5102# Check whether --enable-largefile was given.
5103if test "${enable_largefile+set}" = set; then :
5104 enableval=$enable_largefile;
5105fi
5106
5107if test "$enable_largefile" != no; then
5108
5109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5110$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5111if ${ac_cv_sys_largefile_CC+:} false; then :
5112 $as_echo_n "(cached) " >&6
5113else
5114 ac_cv_sys_largefile_CC=no
5115 if test "$GCC" != yes; then
5116 ac_save_CC=$CC
5117 while :; do
5118 # IRIX 6.2 and later do not support large files by default,
5119 # so use the C compiler's -n32 option if that helps.
5120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5121/* end confdefs.h. */
5122#include <sys/types.h>
5123 /* Check that off_t can represent 2**63 - 1 correctly.
5124 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5125 since some C++ compilers masquerading as C compilers
5126 incorrectly reject 9223372036854775807. */
5127#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5128 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5129 && LARGE_OFF_T % 2147483647 == 1)
5130 ? 1 : -1];
5131int
5132main ()
5133{
5134
5135 ;
5136 return 0;
5137}
5138_ACEOF
5139 if ac_fn_c_try_compile "$LINENO"; then :
5140 break
5141fi
5142rm -f core conftest.err conftest.$ac_objext
5143 CC="$CC -n32"
5144 if ac_fn_c_try_compile "$LINENO"; then :
5145 ac_cv_sys_largefile_CC=' -n32'; break
5146fi
5147rm -f core conftest.err conftest.$ac_objext
5148 break
5149 done
5150 CC=$ac_save_CC
5151 rm -f conftest.$ac_ext
5152 fi
5153fi
5154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5155$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5156 if test "$ac_cv_sys_largefile_CC" != no; then
5157 CC=$CC$ac_cv_sys_largefile_CC
5158 fi
5159
5160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5161$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5162if ${ac_cv_sys_file_offset_bits+:} false; then :
5163 $as_echo_n "(cached) " >&6
5164else
5165 while :; do
5166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5167/* end confdefs.h. */
5168#include <sys/types.h>
5169 /* Check that off_t can represent 2**63 - 1 correctly.
5170 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5171 since some C++ compilers masquerading as C compilers
5172 incorrectly reject 9223372036854775807. */
5173#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5174 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5175 && LARGE_OFF_T % 2147483647 == 1)
5176 ? 1 : -1];
5177int
5178main ()
5179{
5180
5181 ;
5182 return 0;
5183}
5184_ACEOF
5185if ac_fn_c_try_compile "$LINENO"; then :
5186 ac_cv_sys_file_offset_bits=no; break
5187fi
5188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5190/* end confdefs.h. */
5191#define _FILE_OFFSET_BITS 64
5192#include <sys/types.h>
5193 /* Check that off_t can represent 2**63 - 1 correctly.
5194 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5195 since some C++ compilers masquerading as C compilers
5196 incorrectly reject 9223372036854775807. */
5197#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5198 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5199 && LARGE_OFF_T % 2147483647 == 1)
5200 ? 1 : -1];
5201int
5202main ()
5203{
5204
5205 ;
5206 return 0;
5207}
5208_ACEOF
5209if ac_fn_c_try_compile "$LINENO"; then :
5210 ac_cv_sys_file_offset_bits=64; break
5211fi
5212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5213 ac_cv_sys_file_offset_bits=unknown
5214 break
5215done
5216fi
5217{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5218$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5219case $ac_cv_sys_file_offset_bits in #(
5220 no | unknown) ;;
5221 *)
5222cat >>confdefs.h <<_ACEOF
5223#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5224_ACEOF
5225;;
5226esac
5227rm -rf conftest*
5228 if test $ac_cv_sys_file_offset_bits = unknown; then
5229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5230$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5231if ${ac_cv_sys_large_files+:} false; then :
5232 $as_echo_n "(cached) " >&6
5233else
5234 while :; do
5235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5236/* end confdefs.h. */
5237#include <sys/types.h>
5238 /* Check that off_t can represent 2**63 - 1 correctly.
5239 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5240 since some C++ compilers masquerading as C compilers
5241 incorrectly reject 9223372036854775807. */
5242#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5243 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5244 && LARGE_OFF_T % 2147483647 == 1)
5245 ? 1 : -1];
5246int
5247main ()
5248{
5249
5250 ;
5251 return 0;
5252}
5253_ACEOF
5254if ac_fn_c_try_compile "$LINENO"; then :
5255 ac_cv_sys_large_files=no; break
5256fi
5257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5258 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5259/* end confdefs.h. */
5260#define _LARGE_FILES 1
5261#include <sys/types.h>
5262 /* Check that off_t can represent 2**63 - 1 correctly.
5263 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5264 since some C++ compilers masquerading as C compilers
5265 incorrectly reject 9223372036854775807. */
5266#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5267 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5268 && LARGE_OFF_T % 2147483647 == 1)
5269 ? 1 : -1];
5270int
5271main ()
5272{
5273
5274 ;
5275 return 0;
5276}
5277_ACEOF
5278if ac_fn_c_try_compile "$LINENO"; then :
5279 ac_cv_sys_large_files=1; break
5280fi
5281rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5282 ac_cv_sys_large_files=unknown
5283 break
5284done
5285fi
5286{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5287$as_echo "$ac_cv_sys_large_files" >&6; }
5288case $ac_cv_sys_large_files in #(
5289 no | unknown) ;;
5290 *)
5291cat >>confdefs.h <<_ACEOF
5292#define _LARGE_FILES $ac_cv_sys_large_files
5293_ACEOF
5294;;
5295esac
5296rm -rf conftest*
5297 fi
5298
5299
5300fi
5301
5302
5303if test -z "$AR" ; then
5304 as_fn_error $? "*** 'ar' missing, please install or fix your \$PATH ***" "$LINENO" 5
5305fi
5306
5307# Extract the first word of "passwd", so it can be a program name with args.
5308set dummy passwd; ac_word=$2
5309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5310$as_echo_n "checking for $ac_word... " >&6; }
5311if ${ac_cv_path_PATH_PASSWD_PROG+:} false; then :
5312 $as_echo_n "(cached) " >&6
5313else
5314 case $PATH_PASSWD_PROG in
5315 [\\/]* | ?:[\\/]*)
5316 ac_cv_path_PATH_PASSWD_PROG="$PATH_PASSWD_PROG" # Let the user override the test with a path.
5317 ;;
5318 *)
5319 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5320for as_dir in $PATH
5321do
5322 IFS=$as_save_IFS
5323 test -z "$as_dir" && as_dir=.
5324 for ac_exec_ext in '' $ac_executable_extensions; do
5325 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5326 ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext"
5327 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5328 break 2
5329 fi
5330done
5331 done
5332IFS=$as_save_IFS
5333
5334 ;;
5335esac
5336fi
5337PATH_PASSWD_PROG=$ac_cv_path_PATH_PASSWD_PROG
5338if test -n "$PATH_PASSWD_PROG"; then
5339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_PASSWD_PROG" >&5
5340$as_echo "$PATH_PASSWD_PROG" >&6; }
5341else
5342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5343$as_echo "no" >&6; }
5344fi
5345
5346
5347if test ! -z "$PATH_PASSWD_PROG" ; then
5348
5349cat >>confdefs.h <<_ACEOF
5350#define _PATH_PASSWD_PROG "$PATH_PASSWD_PROG"
5351_ACEOF
5352
5353fi
5354
5355LD="$CC"
5356
5357
5358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5359$as_echo_n "checking for inline... " >&6; }
5360if ${ac_cv_c_inline+:} false; then :
5361 $as_echo_n "(cached) " >&6
5362else
5363 ac_cv_c_inline=no
5364for ac_kw in inline __inline__ __inline; do
5365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5366/* end confdefs.h. */
5367#ifndef __cplusplus
5368typedef int foo_t;
5369static $ac_kw foo_t static_foo () {return 0; }
5370$ac_kw foo_t foo () {return 0; }
5371#endif
5372
5373_ACEOF
5374if ac_fn_c_try_compile "$LINENO"; then :
5375 ac_cv_c_inline=$ac_kw
5376fi
5377rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5378 test "$ac_cv_c_inline" != no && break
5379done
5380
5381fi
5382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5383$as_echo "$ac_cv_c_inline" >&6; }
5384
5385case $ac_cv_c_inline in
5386 inline | yes) ;;
5387 *)
5388 case $ac_cv_c_inline in
5389 no) ac_val=;;
5390 *) ac_val=$ac_cv_c_inline;;
5391 esac
5392 cat >>confdefs.h <<_ACEOF
5393#ifndef __cplusplus
5394#define inline $ac_val
5395#endif
5396_ACEOF
5397 ;;
5398esac
5399
5400
5401ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
5402"
5403if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
5404 have_llong_max=1
5405fi
5406
5407ac_fn_c_check_decl "$LINENO" "SYSTR_POLICY_KILL" "ac_cv_have_decl_SYSTR_POLICY_KILL" "
5408 #include <sys/types.h>
5409 #include <sys/param.h>
5410 #include <dev/systrace.h>
5411
5412"
5413if test "x$ac_cv_have_decl_SYSTR_POLICY_KILL" = xyes; then :
5414 have_systr_policy_kill=1
5415fi
5416
5417ac_fn_c_check_decl "$LINENO" "RLIMIT_NPROC" "ac_cv_have_decl_RLIMIT_NPROC" "
5418 #include <sys/types.h>
5419 #include <sys/resource.h>
5420
5421"
5422if test "x$ac_cv_have_decl_RLIMIT_NPROC" = xyes; then :
5423
5424$as_echo "#define HAVE_RLIMIT_NPROC /**/" >>confdefs.h
5425
5426fi
5427
5428ac_fn_c_check_decl "$LINENO" "PR_SET_NO_NEW_PRIVS" "ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" "
5429 #include <sys/types.h>
5430 #include <linux/prctl.h>
5431
5432"
5433if test "x$ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" = xyes; then :
5434 have_linux_no_new_privs=1
5435fi
5436
5437
5438openssl=yes
5439
5440# Check whether --with-openssl was given.
5441if test "${with_openssl+set}" = set; then :
5442 withval=$with_openssl; if test "x$withval" = "xno" ; then
5443 openssl=no
5444 fi
5445
5446
5447fi
5448
5449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL will be used for cryptography" >&5
5450$as_echo_n "checking whether OpenSSL will be used for cryptography... " >&6; }
5451if test "x$openssl" = "xyes" ; then
5452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5453$as_echo "yes" >&6; }
5454
5455cat >>confdefs.h <<_ACEOF
5456#define WITH_OPENSSL 1
5457_ACEOF
5458
5459else
5460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5461$as_echo "no" >&6; }
5462fi
5463
5464use_stack_protector=1
5465use_toolchain_hardening=1
5466
5467# Check whether --with-stackprotect was given.
5468if test "${with_stackprotect+set}" = set; then :
5469 withval=$with_stackprotect;
5470 if test "x$withval" = "xno"; then
5471 use_stack_protector=0
5472 fi
5473fi
5474
5475
5476# Check whether --with-hardening was given.
5477if test "${with_hardening+set}" = set; then :
5478 withval=$with_hardening;
5479 if test "x$withval" = "xno"; then
5480 use_toolchain_hardening=0
5481 fi
5482fi
5483
5484
5485# We use -Werror for the tests only so that we catch warnings like "this is
5486# on by default" for things like -fPIE.
5487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5
5488$as_echo_n "checking if $CC supports -Werror... " >&6; }
5489saved_CFLAGS="$CFLAGS"
5490CFLAGS="$CFLAGS -Werror"
5491cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5492/* end confdefs.h. */
5493int main(void) { return 0; }
5494_ACEOF
5495if ac_fn_c_try_compile "$LINENO"; then :
5496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5497$as_echo "yes" >&6; }
5498 WERROR="-Werror"
5499else
5500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5501$as_echo "no" >&6; }
5502 WERROR=""
5503
5504fi
5505rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5506CFLAGS="$saved_CFLAGS"
5507
5508if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
5509 {
5510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -pipe" >&5
5511$as_echo_n "checking if $CC supports compile flag -pipe... " >&6; }
5512 saved_CFLAGS="$CFLAGS"
5513 CFLAGS="$CFLAGS $WERROR -pipe"
5514 _define_flag=""
5515 test "x$_define_flag" = "x" && _define_flag="-pipe"
5516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5517/* end confdefs.h. */
5518
5519#include <stdlib.h>
5520#include <stdio.h>
5521int main(int argc, char **argv) {
5522 /* Some math to catch -ftrapv problems in the toolchain */
5523 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5524 float l = i * 2.1;
5525 double m = l / 0.5;
5526 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5527 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5528 exit(0);
5529}
5530
5531_ACEOF
5532if ac_fn_c_try_compile "$LINENO"; then :
5533
5534if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5535then
5536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5537$as_echo "no" >&6; }
5538 CFLAGS="$saved_CFLAGS"
5539else
5540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5541$as_echo "yes" >&6; }
5542 CFLAGS="$saved_CFLAGS $_define_flag"
5543fi
5544else
5545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5546$as_echo "no" >&6; }
5547 CFLAGS="$saved_CFLAGS"
5548
5549fi
5550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5551}
5552 {
5553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wunknown-warning-option" >&5
5554$as_echo_n "checking if $CC supports compile flag -Wunknown-warning-option... " >&6; }
5555 saved_CFLAGS="$CFLAGS"
5556 CFLAGS="$CFLAGS $WERROR -Wunknown-warning-option"
5557 _define_flag=""
5558 test "x$_define_flag" = "x" && _define_flag="-Wunknown-warning-option"
5559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5560/* end confdefs.h. */
5561
5562#include <stdlib.h>
5563#include <stdio.h>
5564int main(int argc, char **argv) {
5565 /* Some math to catch -ftrapv problems in the toolchain */
5566 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5567 float l = i * 2.1;
5568 double m = l / 0.5;
5569 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5570 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5571 exit(0);
5572}
5573
5574_ACEOF
5575if ac_fn_c_try_compile "$LINENO"; then :
5576
5577if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5578then
5579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5580$as_echo "no" >&6; }
5581 CFLAGS="$saved_CFLAGS"
5582else
5583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5584$as_echo "yes" >&6; }
5585 CFLAGS="$saved_CFLAGS $_define_flag"
5586fi
5587else
5588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5589$as_echo "no" >&6; }
5590 CFLAGS="$saved_CFLAGS"
5591
5592fi
5593rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5594}
5595 {
5596 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wno-error=format-truncation" >&5
5597$as_echo_n "checking if $CC supports compile flag -Wno-error=format-truncation... " >&6; }
5598 saved_CFLAGS="$CFLAGS"
5599 CFLAGS="$CFLAGS $WERROR -Wno-error=format-truncation"
5600 _define_flag=""
5601 test "x$_define_flag" = "x" && _define_flag="-Wno-error=format-truncation"
5602 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5603/* end confdefs.h. */
5604
5605#include <stdlib.h>
5606#include <stdio.h>
5607int main(int argc, char **argv) {
5608 /* Some math to catch -ftrapv problems in the toolchain */
5609 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5610 float l = i * 2.1;
5611 double m = l / 0.5;
5612 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5613 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5614 exit(0);
5615}
5616
5617_ACEOF
5618if ac_fn_c_try_compile "$LINENO"; then :
5619
5620if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5621then
5622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5623$as_echo "no" >&6; }
5624 CFLAGS="$saved_CFLAGS"
5625else
5626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5627$as_echo "yes" >&6; }
5628 CFLAGS="$saved_CFLAGS $_define_flag"
5629fi
5630else
5631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5632$as_echo "no" >&6; }
5633 CFLAGS="$saved_CFLAGS"
5634
5635fi
5636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5637}
5638 {
5639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Qunused-arguments" >&5
5640$as_echo_n "checking if $CC supports compile flag -Qunused-arguments... " >&6; }
5641 saved_CFLAGS="$CFLAGS"
5642 CFLAGS="$CFLAGS $WERROR -Qunused-arguments"
5643 _define_flag=""
5644 test "x$_define_flag" = "x" && _define_flag="-Qunused-arguments"
5645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5646/* end confdefs.h. */
5647
5648#include <stdlib.h>
5649#include <stdio.h>
5650int main(int argc, char **argv) {
5651 /* Some math to catch -ftrapv problems in the toolchain */
5652 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5653 float l = i * 2.1;
5654 double m = l / 0.5;
5655 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5656 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5657 exit(0);
5658}
5659
5660_ACEOF
5661if ac_fn_c_try_compile "$LINENO"; then :
5662
5663if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5664then
5665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5666$as_echo "no" >&6; }
5667 CFLAGS="$saved_CFLAGS"
5668else
5669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5670$as_echo "yes" >&6; }
5671 CFLAGS="$saved_CFLAGS $_define_flag"
5672fi
5673else
5674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5675$as_echo "no" >&6; }
5676 CFLAGS="$saved_CFLAGS"
5677
5678fi
5679rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5680}
5681 {
5682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wall" >&5
5683$as_echo_n "checking if $CC supports compile flag -Wall... " >&6; }
5684 saved_CFLAGS="$CFLAGS"
5685 CFLAGS="$CFLAGS $WERROR -Wall"
5686 _define_flag=""
5687 test "x$_define_flag" = "x" && _define_flag="-Wall"
5688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5689/* end confdefs.h. */
5690
5691#include <stdlib.h>
5692#include <stdio.h>
5693int main(int argc, char **argv) {
5694 /* Some math to catch -ftrapv problems in the toolchain */
5695 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5696 float l = i * 2.1;
5697 double m = l / 0.5;
5698 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5699 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5700 exit(0);
5701}
5702
5703_ACEOF
5704if ac_fn_c_try_compile "$LINENO"; then :
5705
5706if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5707then
5708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5709$as_echo "no" >&6; }
5710 CFLAGS="$saved_CFLAGS"
5711else
5712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5713$as_echo "yes" >&6; }
5714 CFLAGS="$saved_CFLAGS $_define_flag"
5715fi
5716else
5717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5718$as_echo "no" >&6; }
5719 CFLAGS="$saved_CFLAGS"
5720
5721fi
5722rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5723}
5724 {
5725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wextra" >&5
5726$as_echo_n "checking if $CC supports compile flag -Wextra... " >&6; }
5727 saved_CFLAGS="$CFLAGS"
5728 CFLAGS="$CFLAGS $WERROR -Wextra"
5729 _define_flag=""
5730 test "x$_define_flag" = "x" && _define_flag="-Wextra"
5731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5732/* end confdefs.h. */
5733
5734#include <stdlib.h>
5735#include <stdio.h>
5736int main(int argc, char **argv) {
5737 /* Some math to catch -ftrapv problems in the toolchain */
5738 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5739 float l = i * 2.1;
5740 double m = l / 0.5;
5741 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5742 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5743 exit(0);
5744}
5745
5746_ACEOF
5747if ac_fn_c_try_compile "$LINENO"; then :
5748
5749if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5750then
5751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5752$as_echo "no" >&6; }
5753 CFLAGS="$saved_CFLAGS"
5754else
5755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5756$as_echo "yes" >&6; }
5757 CFLAGS="$saved_CFLAGS $_define_flag"
5758fi
5759else
5760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5761$as_echo "no" >&6; }
5762 CFLAGS="$saved_CFLAGS"
5763
5764fi
5765rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5766}
5767 {
5768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wpointer-arith" >&5
5769$as_echo_n "checking if $CC supports compile flag -Wpointer-arith... " >&6; }
5770 saved_CFLAGS="$CFLAGS"
5771 CFLAGS="$CFLAGS $WERROR -Wpointer-arith"
5772 _define_flag=""
5773 test "x$_define_flag" = "x" && _define_flag="-Wpointer-arith"
5774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5775/* end confdefs.h. */
5776
5777#include <stdlib.h>
5778#include <stdio.h>
5779int main(int argc, char **argv) {
5780 /* Some math to catch -ftrapv problems in the toolchain */
5781 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5782 float l = i * 2.1;
5783 double m = l / 0.5;
5784 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5785 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5786 exit(0);
5787}
5788
5789_ACEOF
5790if ac_fn_c_try_compile "$LINENO"; then :
5791
5792if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5793then
5794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5795$as_echo "no" >&6; }
5796 CFLAGS="$saved_CFLAGS"
5797else
5798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5799$as_echo "yes" >&6; }
5800 CFLAGS="$saved_CFLAGS $_define_flag"
5801fi
5802else
5803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5804$as_echo "no" >&6; }
5805 CFLAGS="$saved_CFLAGS"
5806
5807fi
5808rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5809}
5810 {
5811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wuninitialized" >&5
5812$as_echo_n "checking if $CC supports compile flag -Wuninitialized... " >&6; }
5813 saved_CFLAGS="$CFLAGS"
5814 CFLAGS="$CFLAGS $WERROR -Wuninitialized"
5815 _define_flag=""
5816 test "x$_define_flag" = "x" && _define_flag="-Wuninitialized"
5817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5818/* end confdefs.h. */
5819
5820#include <stdlib.h>
5821#include <stdio.h>
5822int main(int argc, char **argv) {
5823 /* Some math to catch -ftrapv problems in the toolchain */
5824 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5825 float l = i * 2.1;
5826 double m = l / 0.5;
5827 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5828 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5829 exit(0);
5830}
5831
5832_ACEOF
5833if ac_fn_c_try_compile "$LINENO"; then :
5834
5835if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5836then
5837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5838$as_echo "no" >&6; }
5839 CFLAGS="$saved_CFLAGS"
5840else
5841 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5842$as_echo "yes" >&6; }
5843 CFLAGS="$saved_CFLAGS $_define_flag"
5844fi
5845else
5846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5847$as_echo "no" >&6; }
5848 CFLAGS="$saved_CFLAGS"
5849
5850fi
5851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5852}
5853 {
5854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wsign-compare" >&5
5855$as_echo_n "checking if $CC supports compile flag -Wsign-compare... " >&6; }
5856 saved_CFLAGS="$CFLAGS"
5857 CFLAGS="$CFLAGS $WERROR -Wsign-compare"
5858 _define_flag=""
5859 test "x$_define_flag" = "x" && _define_flag="-Wsign-compare"
5860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5861/* end confdefs.h. */
5862
5863#include <stdlib.h>
5864#include <stdio.h>
5865int main(int argc, char **argv) {
5866 /* Some math to catch -ftrapv problems in the toolchain */
5867 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5868 float l = i * 2.1;
5869 double m = l / 0.5;
5870 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5871 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5872 exit(0);
5873}
5874
5875_ACEOF
5876if ac_fn_c_try_compile "$LINENO"; then :
5877
5878if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5879then
5880 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5881$as_echo "no" >&6; }
5882 CFLAGS="$saved_CFLAGS"
5883else
5884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5885$as_echo "yes" >&6; }
5886 CFLAGS="$saved_CFLAGS $_define_flag"
5887fi
5888else
5889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5890$as_echo "no" >&6; }
5891 CFLAGS="$saved_CFLAGS"
5892
5893fi
5894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5895}
5896 {
5897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wformat-security" >&5
5898$as_echo_n "checking if $CC supports compile flag -Wformat-security... " >&6; }
5899 saved_CFLAGS="$CFLAGS"
5900 CFLAGS="$CFLAGS $WERROR -Wformat-security"
5901 _define_flag=""
5902 test "x$_define_flag" = "x" && _define_flag="-Wformat-security"
5903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5904/* end confdefs.h. */
5905
5906#include <stdlib.h>
5907#include <stdio.h>
5908int main(int argc, char **argv) {
5909 /* Some math to catch -ftrapv problems in the toolchain */
5910 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5911 float l = i * 2.1;
5912 double m = l / 0.5;
5913 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5914 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5915 exit(0);
5916}
5917
5918_ACEOF
5919if ac_fn_c_try_compile "$LINENO"; then :
5920
5921if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5922then
5923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5924$as_echo "no" >&6; }
5925 CFLAGS="$saved_CFLAGS"
5926else
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5928$as_echo "yes" >&6; }
5929 CFLAGS="$saved_CFLAGS $_define_flag"
5930fi
5931else
5932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5933$as_echo "no" >&6; }
5934 CFLAGS="$saved_CFLAGS"
5935
5936fi
5937rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5938}
5939 {
5940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wsizeof-pointer-memaccess" >&5
5941$as_echo_n "checking if $CC supports compile flag -Wsizeof-pointer-memaccess... " >&6; }
5942 saved_CFLAGS="$CFLAGS"
5943 CFLAGS="$CFLAGS $WERROR -Wsizeof-pointer-memaccess"
5944 _define_flag=""
5945 test "x$_define_flag" = "x" && _define_flag="-Wsizeof-pointer-memaccess"
5946 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5947/* end confdefs.h. */
5948
5949#include <stdlib.h>
5950#include <stdio.h>
5951int main(int argc, char **argv) {
5952 /* Some math to catch -ftrapv problems in the toolchain */
5953 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5954 float l = i * 2.1;
5955 double m = l / 0.5;
5956 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5957 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5958 exit(0);
5959}
5960
5961_ACEOF
5962if ac_fn_c_try_compile "$LINENO"; then :
5963
5964if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
5965then
5966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5967$as_echo "no" >&6; }
5968 CFLAGS="$saved_CFLAGS"
5969else
5970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5971$as_echo "yes" >&6; }
5972 CFLAGS="$saved_CFLAGS $_define_flag"
5973fi
5974else
5975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5976$as_echo "no" >&6; }
5977 CFLAGS="$saved_CFLAGS"
5978
5979fi
5980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5981}
5982 {
5983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wpointer-sign" >&5
5984$as_echo_n "checking if $CC supports compile flag -Wpointer-sign... " >&6; }
5985 saved_CFLAGS="$CFLAGS"
5986 CFLAGS="$CFLAGS $WERROR -Wpointer-sign"
5987 _define_flag="-Wno-pointer-sign"
5988 test "x$_define_flag" = "x" && _define_flag="-Wpointer-sign"
5989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5990/* end confdefs.h. */
5991
5992#include <stdlib.h>
5993#include <stdio.h>
5994int main(int argc, char **argv) {
5995 /* Some math to catch -ftrapv problems in the toolchain */
5996 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5997 float l = i * 2.1;
5998 double m = l / 0.5;
5999 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6000 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6001 exit(0);
6002}
6003
6004_ACEOF
6005if ac_fn_c_try_compile "$LINENO"; then :
6006
6007if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6008then
6009 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6010$as_echo "no" >&6; }
6011 CFLAGS="$saved_CFLAGS"
6012else
6013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6014$as_echo "yes" >&6; }
6015 CFLAGS="$saved_CFLAGS $_define_flag"
6016fi
6017else
6018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6019$as_echo "no" >&6; }
6020 CFLAGS="$saved_CFLAGS"
6021
6022fi
6023rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6024}
6025 {
6026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wunused-result" >&5
6027$as_echo_n "checking if $CC supports compile flag -Wunused-result... " >&6; }
6028 saved_CFLAGS="$CFLAGS"
6029 CFLAGS="$CFLAGS $WERROR -Wunused-result"
6030 _define_flag="-Wno-unused-result"
6031 test "x$_define_flag" = "x" && _define_flag="-Wunused-result"
6032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6033/* end confdefs.h. */
6034
6035#include <stdlib.h>
6036#include <stdio.h>
6037int main(int argc, char **argv) {
6038 /* Some math to catch -ftrapv problems in the toolchain */
6039 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6040 float l = i * 2.1;
6041 double m = l / 0.5;
6042 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6043 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6044 exit(0);
6045}
6046
6047_ACEOF
6048if ac_fn_c_try_compile "$LINENO"; then :
6049
6050if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6051then
6052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6053$as_echo "no" >&6; }
6054 CFLAGS="$saved_CFLAGS"
6055else
6056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6057$as_echo "yes" >&6; }
6058 CFLAGS="$saved_CFLAGS $_define_flag"
6059fi
6060else
6061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6062$as_echo "no" >&6; }
6063 CFLAGS="$saved_CFLAGS"
6064
6065fi
6066rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6067}
6068 {
6069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -fno-strict-aliasing" >&5
6070$as_echo_n "checking if $CC supports compile flag -fno-strict-aliasing... " >&6; }
6071 saved_CFLAGS="$CFLAGS"
6072 CFLAGS="$CFLAGS $WERROR -fno-strict-aliasing"
6073 _define_flag=""
6074 test "x$_define_flag" = "x" && _define_flag="-fno-strict-aliasing"
6075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6076/* end confdefs.h. */
6077
6078#include <stdlib.h>
6079#include <stdio.h>
6080int main(int argc, char **argv) {
6081 /* Some math to catch -ftrapv problems in the toolchain */
6082 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6083 float l = i * 2.1;
6084 double m = l / 0.5;
6085 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6086 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6087 exit(0);
6088}
6089
6090_ACEOF
6091if ac_fn_c_try_compile "$LINENO"; then :
6092
6093if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6094then
6095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6096$as_echo "no" >&6; }
6097 CFLAGS="$saved_CFLAGS"
6098else
6099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6100$as_echo "yes" >&6; }
6101 CFLAGS="$saved_CFLAGS $_define_flag"
6102fi
6103else
6104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6105$as_echo "no" >&6; }
6106 CFLAGS="$saved_CFLAGS"
6107
6108fi
6109rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6110}
6111 if test "x$use_toolchain_hardening" = "x1"; then
6112 {
6113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -mretpoline" >&5
6114$as_echo_n "checking if $CC supports compile flag -mretpoline... " >&6; }
6115 saved_CFLAGS="$CFLAGS"
6116 CFLAGS="$CFLAGS $WERROR -mretpoline"
6117 _define_flag=""
6118 test "x$_define_flag" = "x" && _define_flag="-mretpoline"
6119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6120/* end confdefs.h. */
6121
6122#include <stdlib.h>
6123#include <stdio.h>
6124int main(int argc, char **argv) {
6125 /* Some math to catch -ftrapv problems in the toolchain */
6126 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6127 float l = i * 2.1;
6128 double m = l / 0.5;
6129 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6130 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6131 exit(0);
6132}
6133
6134_ACEOF
6135if ac_fn_c_try_compile "$LINENO"; then :
6136
6137if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6138then
6139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6140$as_echo "no" >&6; }
6141 CFLAGS="$saved_CFLAGS"
6142else
6143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6144$as_echo "yes" >&6; }
6145 CFLAGS="$saved_CFLAGS $_define_flag"
6146fi
6147else
6148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6149$as_echo "no" >&6; }
6150 CFLAGS="$saved_CFLAGS"
6151
6152fi
6153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6154} # clang
6155 {
6156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,retpolineplt" >&5
6157$as_echo_n "checking if $LD supports link flag -Wl,-z,retpolineplt... " >&6; }
6158 saved_LDFLAGS="$LDFLAGS"
6159 LDFLAGS="$LDFLAGS $WERROR -Wl,-z,retpolineplt"
6160 _define_flag=""
6161 test "x$_define_flag" = "x" && _define_flag="-Wl,-z,retpolineplt"
6162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6163/* end confdefs.h. */
6164
6165#include <stdlib.h>
6166#include <stdio.h>
6167int main(int argc, char **argv) {
6168 /* Some math to catch -ftrapv problems in the toolchain */
6169 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6170 float l = i * 2.1;
6171 double m = l / 0.5;
6172 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6173 long long p = n * o;
6174 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
6175 exit(0);
6176}
6177
6178_ACEOF
6179if ac_fn_c_try_link "$LINENO"; then :
6180
6181if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6182then
6183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6184$as_echo "no" >&6; }
6185 LDFLAGS="$saved_LDFLAGS"
6186else
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6188$as_echo "yes" >&6; }
6189 LDFLAGS="$saved_LDFLAGS $_define_flag"
6190fi
6191else
6192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6193$as_echo "no" >&6; }
6194 LDFLAGS="$saved_LDFLAGS"
6195
6196fi
6197rm -f core conftest.err conftest.$ac_objext \
6198 conftest$ac_exeext conftest.$ac_ext
6199}
6200 {
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -D_FORTIFY_SOURCE=2" >&5
6202$as_echo_n "checking if $CC supports compile flag -D_FORTIFY_SOURCE=2... " >&6; }
6203 saved_CFLAGS="$CFLAGS"
6204 CFLAGS="$CFLAGS $WERROR -D_FORTIFY_SOURCE=2"
6205 _define_flag=""
6206 test "x$_define_flag" = "x" && _define_flag="-D_FORTIFY_SOURCE=2"
6207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6208/* end confdefs.h. */
6209
6210#include <stdlib.h>
6211#include <stdio.h>
6212int main(int argc, char **argv) {
6213 /* Some math to catch -ftrapv problems in the toolchain */
6214 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6215 float l = i * 2.1;
6216 double m = l / 0.5;
6217 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6218 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6219 exit(0);
6220}
6221
6222_ACEOF
6223if ac_fn_c_try_compile "$LINENO"; then :
6224
6225if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6226then
6227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6228$as_echo "no" >&6; }
6229 CFLAGS="$saved_CFLAGS"
6230else
6231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6232$as_echo "yes" >&6; }
6233 CFLAGS="$saved_CFLAGS $_define_flag"
6234fi
6235else
6236 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6237$as_echo "no" >&6; }
6238 CFLAGS="$saved_CFLAGS"
6239
6240fi
6241rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6242}
6243 {
6244 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,relro" >&5
6245$as_echo_n "checking if $LD supports link flag -Wl,-z,relro... " >&6; }
6246 saved_LDFLAGS="$LDFLAGS"
6247 LDFLAGS="$LDFLAGS $WERROR -Wl,-z,relro"
6248 _define_flag=""
6249 test "x$_define_flag" = "x" && _define_flag="-Wl,-z,relro"
6250 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6251/* end confdefs.h. */
6252
6253#include <stdlib.h>
6254#include <stdio.h>
6255int main(int argc, char **argv) {
6256 /* Some math to catch -ftrapv problems in the toolchain */
6257 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6258 float l = i * 2.1;
6259 double m = l / 0.5;
6260 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6261 long long p = n * o;
6262 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
6263 exit(0);
6264}
6265
6266_ACEOF
6267if ac_fn_c_try_link "$LINENO"; then :
6268
6269if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6270then
6271 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6272$as_echo "no" >&6; }
6273 LDFLAGS="$saved_LDFLAGS"
6274else
6275 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6276$as_echo "yes" >&6; }
6277 LDFLAGS="$saved_LDFLAGS $_define_flag"
6278fi
6279else
6280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6281$as_echo "no" >&6; }
6282 LDFLAGS="$saved_LDFLAGS"
6283
6284fi
6285rm -f core conftest.err conftest.$ac_objext \
6286 conftest$ac_exeext conftest.$ac_ext
6287}
6288 {
6289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,now" >&5
6290$as_echo_n "checking if $LD supports link flag -Wl,-z,now... " >&6; }
6291 saved_LDFLAGS="$LDFLAGS"
6292 LDFLAGS="$LDFLAGS $WERROR -Wl,-z,now"
6293 _define_flag=""
6294 test "x$_define_flag" = "x" && _define_flag="-Wl,-z,now"
6295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6296/* end confdefs.h. */
6297
6298#include <stdlib.h>
6299#include <stdio.h>
6300int main(int argc, char **argv) {
6301 /* Some math to catch -ftrapv problems in the toolchain */
6302 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6303 float l = i * 2.1;
6304 double m = l / 0.5;
6305 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6306 long long p = n * o;
6307 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
6308 exit(0);
6309}
6310
6311_ACEOF
6312if ac_fn_c_try_link "$LINENO"; then :
6313
6314if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6315then
6316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6317$as_echo "no" >&6; }
6318 LDFLAGS="$saved_LDFLAGS"
6319else
6320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6321$as_echo "yes" >&6; }
6322 LDFLAGS="$saved_LDFLAGS $_define_flag"
6323fi
6324else
6325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6326$as_echo "no" >&6; }
6327 LDFLAGS="$saved_LDFLAGS"
6328
6329fi
6330rm -f core conftest.err conftest.$ac_objext \
6331 conftest$ac_exeext conftest.$ac_ext
6332}
6333 {
6334 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,noexecstack" >&5
6335$as_echo_n "checking if $LD supports link flag -Wl,-z,noexecstack... " >&6; }
6336 saved_LDFLAGS="$LDFLAGS"
6337 LDFLAGS="$LDFLAGS $WERROR -Wl,-z,noexecstack"
6338 _define_flag=""
6339 test "x$_define_flag" = "x" && _define_flag="-Wl,-z,noexecstack"
6340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6341/* end confdefs.h. */
6342
6343#include <stdlib.h>
6344#include <stdio.h>
6345int main(int argc, char **argv) {
6346 /* Some math to catch -ftrapv problems in the toolchain */
6347 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6348 float l = i * 2.1;
6349 double m = l / 0.5;
6350 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6351 long long p = n * o;
6352 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
6353 exit(0);
6354}
6355
6356_ACEOF
6357if ac_fn_c_try_link "$LINENO"; then :
6358
6359if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6360then
6361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6362$as_echo "no" >&6; }
6363 LDFLAGS="$saved_LDFLAGS"
6364else
6365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6366$as_echo "yes" >&6; }
6367 LDFLAGS="$saved_LDFLAGS $_define_flag"
6368fi
6369else
6370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6371$as_echo "no" >&6; }
6372 LDFLAGS="$saved_LDFLAGS"
6373
6374fi
6375rm -f core conftest.err conftest.$ac_objext \
6376 conftest$ac_exeext conftest.$ac_ext
6377}
6378 # NB. -ftrapv expects certain support functions to be present in
6379 # the compiler library (libgcc or similar) to detect integer operations
6380 # that can overflow. We must check that the result of enabling it
6381 # actually links. The test program compiled/linked includes a number
6382 # of integer operations that should exercise this.
6383 {
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -ftrapv and linking succeeds" >&5
6385$as_echo_n "checking if $CC supports compile flag -ftrapv and linking succeeds... " >&6; }
6386 saved_CFLAGS="$CFLAGS"
6387 CFLAGS="$CFLAGS $WERROR -ftrapv"
6388 _define_flag=""
6389 test "x$_define_flag" = "x" && _define_flag="-ftrapv"
6390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6391/* end confdefs.h. */
6392
6393#include <stdlib.h>
6394#include <stdio.h>
6395int main(int argc, char **argv) {
6396 /* Some math to catch -ftrapv problems in the toolchain */
6397 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6398 float l = i * 2.1;
6399 double m = l / 0.5;
6400 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6401 long long int p = n * o;
6402 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
6403 exit(0);
6404}
6405
6406_ACEOF
6407if ac_fn_c_try_link "$LINENO"; then :
6408
6409if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
6410then
6411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6412$as_echo "no" >&6; }
6413 CFLAGS="$saved_CFLAGS"
6414else
6415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6416$as_echo "yes" >&6; }
6417 CFLAGS="$saved_CFLAGS $_define_flag"
6418fi
6419else
6420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6421$as_echo "no" >&6; }
6422 CFLAGS="$saved_CFLAGS"
6423
6424fi
6425rm -f core conftest.err conftest.$ac_objext \
6426 conftest$ac_exeext conftest.$ac_ext
6427}
6428 fi
6429 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc version" >&5
6430$as_echo_n "checking gcc version... " >&6; }
6431 GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`
6432 case $GCC_VER in
6433 1.*) no_attrib_nonnull=1 ;;
6434 2.8* | 2.9*)
6435 no_attrib_nonnull=1
6436 ;;
6437 2.*) no_attrib_nonnull=1 ;;
6438 *) ;;
6439 esac
6440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC_VER" >&5
6441$as_echo "$GCC_VER" >&6; }
6442
6443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-builtin-memset" >&5
6444$as_echo_n "checking if $CC accepts -fno-builtin-memset... " >&6; }
6445 saved_CFLAGS="$CFLAGS"
6446 CFLAGS="$CFLAGS -fno-builtin-memset"
6447 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6448/* end confdefs.h. */
6449 #include <string.h>
6450int
6451main ()
6452{
6453 char b[10]; memset(b, 0, sizeof(b));
6454 ;
6455 return 0;
6456}
6457_ACEOF
6458if ac_fn_c_try_link "$LINENO"; then :
6459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6460$as_echo "yes" >&6; }
6461else
6462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6463$as_echo "no" >&6; }
6464 CFLAGS="$saved_CFLAGS"
6465
6466fi
6467rm -f core conftest.err conftest.$ac_objext \
6468 conftest$ac_exeext conftest.$ac_ext
6469
6470 # -fstack-protector-all doesn't always work for some GCC versions
6471 # and/or platforms, so we test if we can. If it's not supported
6472 # on a given platform gcc will emit a warning so we use -Werror.
6473 if test "x$use_stack_protector" = "x1"; then
6474 for t in -fstack-protector-strong -fstack-protector-all \
6475 -fstack-protector; do
6476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports $t" >&5
6477$as_echo_n "checking if $CC supports $t... " >&6; }
6478 saved_CFLAGS="$CFLAGS"
6479 saved_LDFLAGS="$LDFLAGS"
6480 CFLAGS="$CFLAGS $t -Werror"
6481 LDFLAGS="$LDFLAGS $t -Werror"
6482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6483/* end confdefs.h. */
6484 #include <stdio.h>
6485int
6486main ()
6487{
6488
6489 char x[256];
6490 snprintf(x, sizeof(x), "XXX");
6491
6492 ;
6493 return 0;
6494}
6495_ACEOF
6496if ac_fn_c_try_link "$LINENO"; then :
6497 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6498$as_echo "yes" >&6; }
6499 CFLAGS="$saved_CFLAGS $t"
6500 LDFLAGS="$saved_LDFLAGS $t"
6501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $t works" >&5
6502$as_echo_n "checking if $t works... " >&6; }
6503 if test "$cross_compiling" = yes; then :
6504 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: cannot test" >&5
6505$as_echo "$as_me: WARNING: cross compiling: cannot test" >&2;}
6506 break
6507
6508else
6509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6510/* end confdefs.h. */
6511 #include <stdio.h>
6512int
6513main ()
6514{
6515
6516 char x[256];
6517 snprintf(x, sizeof(x), "XXX");
6518
6519 ;
6520 return 0;
6521}
6522_ACEOF
6523if ac_fn_c_try_run "$LINENO"; then :
6524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6525$as_echo "yes" >&6; }
6526 break
6527else
6528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6529$as_echo "no" >&6; }
6530fi
6531rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6532 conftest.$ac_objext conftest.beam conftest.$ac_ext
6533fi
6534
6535
6536else
6537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6538$as_echo "no" >&6; }
6539
6540fi
6541rm -f core conftest.err conftest.$ac_objext \
6542 conftest$ac_exeext conftest.$ac_ext
6543 CFLAGS="$saved_CFLAGS"
6544 LDFLAGS="$saved_LDFLAGS"
6545 done
6546 fi
6547
6548 if test -z "$have_llong_max"; then
6549 # retry LLONG_MAX with -std=gnu99, needed on some Linuxes
6550 unset ac_cv_have_decl_LLONG_MAX
6551 saved_CFLAGS="$CFLAGS"
6552 CFLAGS="$CFLAGS -std=gnu99"
6553 ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
6554
6555"
6556if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
6557 have_llong_max=1
6558else
6559 CFLAGS="$saved_CFLAGS"
6560fi
6561
6562 fi
6563fi
6564
6565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows __attribute__ on return types" >&5
6566$as_echo_n "checking if compiler allows __attribute__ on return types... " >&6; }
6567cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6568/* end confdefs.h. */
6569
6570#include <stdlib.h>
6571__attribute__((__unused__)) static void foo(void){return;}
6572int
6573main ()
6574{
6575 exit(0);
6576 ;
6577 return 0;
6578}
6579_ACEOF
6580if ac_fn_c_try_compile "$LINENO"; then :
6581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6582$as_echo "yes" >&6; }
6583else
6584 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6585$as_echo "no" >&6; }
6586
6587$as_echo "#define NO_ATTRIBUTE_ON_RETURN_TYPE 1" >>confdefs.h
6588
6589
6590fi
6591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6592
6593{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows __attribute__ prototype args" >&5
6594$as_echo_n "checking if compiler allows __attribute__ prototype args... " >&6; }
6595cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6596/* end confdefs.h. */
6597
6598#include <stdlib.h>
6599typedef void foo(const char *, ...) __attribute__((format(printf, 1, 2)));
6600int
6601main ()
6602{
6603 exit(0);
6604 ;
6605 return 0;
6606}
6607_ACEOF
6608if ac_fn_c_try_compile "$LINENO"; then :
6609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6610$as_echo "yes" >&6; }
6611else
6612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6613$as_echo "no" >&6; }
6614
6615$as_echo "#define NO_ATTRIBUTE_ON_PROTOTYPE_ARGS 1" >>confdefs.h
6616
6617
6618fi
6619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6620
6621if test "x$no_attrib_nonnull" != "x1" ; then
6622
6623$as_echo "#define HAVE_ATTRIBUTE__NONNULL__ 1" >>confdefs.h
6624
6625fi
6626
6627
6628# Check whether --with-rpath was given.
6629if test "${with_rpath+set}" = set; then :
6630 withval=$with_rpath;
6631 if test "x$withval" = "xno" ; then
6632 rpath_opt=""
6633 elif test "x$withval" = "xyes" ; then
6634 rpath_opt="-R"
6635 else
6636 rpath_opt="$withval"
6637 fi
6638
6639
6640fi
6641
6642
6643# Allow user to specify flags
6644
6645# Check whether --with-cflags was given.
6646if test "${with_cflags+set}" = set; then :
6647 withval=$with_cflags;
6648 if test -n "$withval" && test "x$withval" != "xno" && \
6649 test "x${withval}" != "xyes"; then
6650 CFLAGS="$CFLAGS $withval"
6651 fi
6652
6653
6654fi
6655
6656
6657
6658# Check whether --with-cflags-after was given.
6659if test "${with_cflags_after+set}" = set; then :
6660 withval=$with_cflags_after;
6661 if test -n "$withval" && test "x$withval" != "xno" && \
6662 test "x${withval}" != "xyes"; then
6663 CFLAGS_AFTER="$withval"
6664 fi
6665
6666
6667fi
6668
6669
6670# Check whether --with-cppflags was given.
6671if test "${with_cppflags+set}" = set; then :
6672 withval=$with_cppflags;
6673 if test -n "$withval" && test "x$withval" != "xno" && \
6674 test "x${withval}" != "xyes"; then
6675 CPPFLAGS="$CPPFLAGS $withval"
6676 fi
6677
6678
6679fi
6680
6681
6682# Check whether --with-ldflags was given.
6683if test "${with_ldflags+set}" = set; then :
6684 withval=$with_ldflags;
6685 if test -n "$withval" && test "x$withval" != "xno" && \
6686 test "x${withval}" != "xyes"; then
6687 LDFLAGS="$LDFLAGS $withval"
6688 fi
6689
6690
6691fi
6692
6693
6694# Check whether --with-ldflags-after was given.
6695if test "${with_ldflags_after+set}" = set; then :
6696 withval=$with_ldflags_after;
6697 if test -n "$withval" && test "x$withval" != "xno" && \
6698 test "x${withval}" != "xyes"; then
6699 LDFLAGS_AFTER="$withval"
6700 fi
6701
6702
6703fi
6704
6705
6706# Check whether --with-libs was given.
6707if test "${with_libs+set}" = set; then :
6708 withval=$with_libs;
6709 if test -n "$withval" && test "x$withval" != "xno" && \
6710 test "x${withval}" != "xyes"; then
6711 LIBS="$LIBS $withval"
6712 fi
6713
6714
6715fi
6716
6717
6718# Check whether --with-Werror was given.
6719if test "${with_Werror+set}" = set; then :
6720 withval=$with_Werror;
6721 if test -n "$withval" && test "x$withval" != "xno"; then
6722 werror_flags="-Werror"
6723 if test "x${withval}" != "xyes"; then
6724 werror_flags="$withval"
6725 fi
6726 fi
6727
6728
6729fi
6730
6731
6732for ac_header in \
6733 blf.h \
6734 bstring.h \
6735 crypt.h \
6736 crypto/sha2.h \
6737 dirent.h \
6738 endian.h \
6739 elf.h \
6740 err.h \
6741 features.h \
6742 fcntl.h \
6743 floatingpoint.h \
6744 getopt.h \
6745 glob.h \
6746 ia.h \
6747 iaf.h \
6748 ifaddrs.h \
6749 inttypes.h \
6750 langinfo.h \
6751 limits.h \
6752 locale.h \
6753 login.h \
6754 maillock.h \
6755 ndir.h \
6756 net/if_tun.h \
6757 netdb.h \
6758 netgroup.h \
6759 pam/pam_appl.h \
6760 paths.h \
6761 poll.h \
6762 pty.h \
6763 readpassphrase.h \
6764 rpc/types.h \
6765 security/pam_appl.h \
6766 sha2.h \
6767 shadow.h \
6768 stddef.h \
6769 stdint.h \
6770 string.h \
6771 strings.h \
6772 sys/bitypes.h \
6773 sys/bsdtty.h \
6774 sys/cdefs.h \
6775 sys/dir.h \
6776 sys/file.h \
6777 sys/mman.h \
6778 sys/label.h \
6779 sys/ndir.h \
6780 sys/poll.h \
6781 sys/prctl.h \
6782 sys/pstat.h \
6783 sys/ptrace.h \
6784 sys/random.h \
6785 sys/select.h \
6786 sys/stat.h \
6787 sys/stream.h \
6788 sys/stropts.h \
6789 sys/strtio.h \
6790 sys/statvfs.h \
6791 sys/sysmacros.h \
6792 sys/time.h \
6793 sys/timers.h \
6794 sys/vfs.h \
6795 time.h \
6796 tmpdir.h \
6797 ttyent.h \
6798 ucred.h \
6799 unistd.h \
6800 usersec.h \
6801 util.h \
6802 utime.h \
6803 utmp.h \
6804 utmpx.h \
6805 vis.h \
6806 wchar.h \
6807
6808do :
6809 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6810ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6811if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6812 cat >>confdefs.h <<_ACEOF
6813#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6814_ACEOF
6815
6816fi
6817
6818done
6819
6820
6821# On some platforms (eg SunOS4) sys/audit.h requires sys/[time|types|label.h]
6822# to be included first.
6823for ac_header in sys/audit.h
6824do :
6825 ac_fn_c_check_header_compile "$LINENO" "sys/audit.h" "ac_cv_header_sys_audit_h" "
6826#ifdef HAVE_SYS_TIME_H
6827# include <sys/time.h>
6828#endif
6829#ifdef HAVE_SYS_TYPES_H
6830# include <sys/types.h>
6831#endif
6832#ifdef HAVE_SYS_LABEL_H
6833# include <sys/label.h>
6834#endif
6835
6836"
6837if test "x$ac_cv_header_sys_audit_h" = xyes; then :
6838 cat >>confdefs.h <<_ACEOF
6839#define HAVE_SYS_AUDIT_H 1
6840_ACEOF
6841
6842fi
6843
6844done
6845
6846
6847# sys/capsicum.h requires sys/types.h
6848for ac_header in sys/capsicum.h
6849do :
6850 ac_fn_c_check_header_compile "$LINENO" "sys/capsicum.h" "ac_cv_header_sys_capsicum_h" "
6851#ifdef HAVE_SYS_TYPES_H
6852# include <sys/types.h>
6853#endif
6854
6855"
6856if test "x$ac_cv_header_sys_capsicum_h" = xyes; then :
6857 cat >>confdefs.h <<_ACEOF
6858#define HAVE_SYS_CAPSICUM_H 1
6859_ACEOF
6860
6861fi
6862
6863done
6864
6865
6866# net/route.h requires sys/socket.h and sys/types.h.
6867# sys/sysctl.h also requires sys/param.h
6868for ac_header in net/route.h sys/sysctl.h
6869do :
6870 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6871ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
6872#ifdef HAVE_SYS_TYPES_H
6873# include <sys/types.h>
6874#endif
6875#include <sys/param.h>
6876#include <sys/socket.h>
6877
6878"
6879if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6880 cat >>confdefs.h <<_ACEOF
6881#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6882_ACEOF
6883
6884fi
6885
6886done
6887
6888
6889# lastlog.h requires sys/time.h to be included first on Solaris
6890for ac_header in lastlog.h
6891do :
6892 ac_fn_c_check_header_compile "$LINENO" "lastlog.h" "ac_cv_header_lastlog_h" "
6893#ifdef HAVE_SYS_TIME_H
6894# include <sys/time.h>
6895#endif
6896
6897"
6898if test "x$ac_cv_header_lastlog_h" = xyes; then :
6899 cat >>confdefs.h <<_ACEOF
6900#define HAVE_LASTLOG_H 1
6901_ACEOF
6902
6903fi
6904
6905done
6906
6907
6908# sys/ptms.h requires sys/stream.h to be included first on Solaris
6909for ac_header in sys/ptms.h
6910do :
6911 ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "
6912#ifdef HAVE_SYS_STREAM_H
6913# include <sys/stream.h>
6914#endif
6915
6916"
6917if test "x$ac_cv_header_sys_ptms_h" = xyes; then :
6918 cat >>confdefs.h <<_ACEOF
6919#define HAVE_SYS_PTMS_H 1
6920_ACEOF
6921
6922fi
6923
6924done
6925
6926
6927# login_cap.h requires sys/types.h on NetBSD
6928for ac_header in login_cap.h
6929do :
6930 ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "
6931#include <sys/types.h>
6932
6933"
6934if test "x$ac_cv_header_login_cap_h" = xyes; then :
6935 cat >>confdefs.h <<_ACEOF
6936#define HAVE_LOGIN_CAP_H 1
6937_ACEOF
6938
6939fi
6940
6941done
6942
6943
6944# older BSDs need sys/param.h before sys/mount.h
6945for ac_header in sys/mount.h
6946do :
6947 ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "
6948#include <sys/param.h>
6949
6950"
6951if test "x$ac_cv_header_sys_mount_h" = xyes; then :
6952 cat >>confdefs.h <<_ACEOF
6953#define HAVE_SYS_MOUNT_H 1
6954_ACEOF
6955
6956fi
6957
6958done
6959
6960
6961# Android requires sys/socket.h to be included before sys/un.h
6962for ac_header in sys/un.h
6963do :
6964 ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "
6965#include <sys/types.h>
6966#include <sys/socket.h>
6967
6968"
6969if test "x$ac_cv_header_sys_un_h" = xyes; then :
6970 cat >>confdefs.h <<_ACEOF
6971#define HAVE_SYS_UN_H 1
6972_ACEOF
6973
6974fi
6975
6976done
6977
6978
6979# Messages for features tested for in target-specific section
6980SIA_MSG="no"
6981SPC_MSG="no"
6982SP_MSG="no"
6983SPP_MSG="no"
6984
6985# Support for Solaris/Illumos privileges (this test is used by both
6986# the --with-solaris-privs option and --with-sandbox=solaris).
6987SOLARIS_PRIVS="no"
6988
6989# Check for some target-specific stuff
6990case "$host" in
6991*-*-aix*)
6992 # Some versions of VAC won't allow macro redefinitions at
6993 # -qlanglevel=ansi, and autoconf 2.60 sometimes insists on using that
6994 # particularly with older versions of vac or xlc.
6995 # It also throws errors about null macro arguments, but these are
6996 # not fatal.
6997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows macro redefinitions" >&5
6998$as_echo_n "checking if compiler allows macro redefinitions... " >&6; }
6999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7000/* end confdefs.h. */
7001
7002#define testmacro foo
7003#define testmacro bar
7004int
7005main ()
7006{
7007 exit(0);
7008 ;
7009 return 0;
7010}
7011_ACEOF
7012if ac_fn_c_try_compile "$LINENO"; then :
7013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7014$as_echo "yes" >&6; }
7015else
7016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7017$as_echo "no" >&6; }
7018 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
7019 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
7020 CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`"
7021
7022
7023fi
7024rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7025
7026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to specify blibpath for linker ($LD)" >&5
7027$as_echo_n "checking how to specify blibpath for linker ($LD)... " >&6; }
7028 if (test -z "$blibpath"); then
7029 blibpath="/usr/lib:/lib"
7030 fi
7031 saved_LDFLAGS="$LDFLAGS"
7032 if test "$GCC" = "yes"; then
7033 flags="-Wl,-blibpath: -Wl,-rpath, -blibpath:"
7034 else
7035 flags="-blibpath: -Wl,-blibpath: -Wl,-rpath,"
7036 fi
7037 for tryflags in $flags ;do
7038 if (test -z "$blibflags"); then
7039 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
7040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7041/* end confdefs.h. */
7042
7043int
7044main ()
7045{
7046
7047 ;
7048 return 0;
7049}
7050_ACEOF
7051if ac_fn_c_try_link "$LINENO"; then :
7052 blibflags=$tryflags
7053fi
7054rm -f core conftest.err conftest.$ac_objext \
7055 conftest$ac_exeext conftest.$ac_ext
7056 fi
7057 done
7058 if (test -z "$blibflags"); then
7059 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7060$as_echo "not found" >&6; }
7061 as_fn_error $? "*** must be able to specify blibpath on AIX - check config.log" "$LINENO" 5
7062 else
7063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $blibflags" >&5
7064$as_echo "$blibflags" >&6; }
7065 fi
7066 LDFLAGS="$saved_LDFLAGS"
7067 ac_fn_c_check_func "$LINENO" "authenticate" "ac_cv_func_authenticate"
7068if test "x$ac_cv_func_authenticate" = xyes; then :
7069
7070$as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
7071
7072else
7073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for authenticate in -ls" >&5
7074$as_echo_n "checking for authenticate in -ls... " >&6; }
7075if ${ac_cv_lib_s_authenticate+:} false; then :
7076 $as_echo_n "(cached) " >&6
7077else
7078 ac_check_lib_save_LIBS=$LIBS
7079LIBS="-ls $LIBS"
7080cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7081/* end confdefs.h. */
7082
7083/* Override any GCC internal prototype to avoid an error.
7084 Use char because int might match the return type of a GCC
7085 builtin and then its argument prototype would still apply. */
7086#ifdef __cplusplus
7087extern "C"
7088#endif
7089char authenticate ();
7090int
7091main ()
7092{
7093return authenticate ();
7094 ;
7095 return 0;
7096}
7097_ACEOF
7098if ac_fn_c_try_link "$LINENO"; then :
7099 ac_cv_lib_s_authenticate=yes
7100else
7101 ac_cv_lib_s_authenticate=no
7102fi
7103rm -f core conftest.err conftest.$ac_objext \
7104 conftest$ac_exeext conftest.$ac_ext
7105LIBS=$ac_check_lib_save_LIBS
7106fi
7107{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_s_authenticate" >&5
7108$as_echo "$ac_cv_lib_s_authenticate" >&6; }
7109if test "x$ac_cv_lib_s_authenticate" = xyes; then :
7110 $as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
7111
7112 LIBS="$LIBS -ls"
7113
7114fi
7115
7116
7117fi
7118
7119 ac_fn_c_check_decl "$LINENO" "authenticate" "ac_cv_have_decl_authenticate" "#include <usersec.h>
7120"
7121if test "x$ac_cv_have_decl_authenticate" = xyes; then :
7122 ac_have_decl=1
7123else
7124 ac_have_decl=0
7125fi
7126
7127cat >>confdefs.h <<_ACEOF
7128#define HAVE_DECL_AUTHENTICATE $ac_have_decl
7129_ACEOF
7130ac_fn_c_check_decl "$LINENO" "loginrestrictions" "ac_cv_have_decl_loginrestrictions" "#include <usersec.h>
7131"
7132if test "x$ac_cv_have_decl_loginrestrictions" = xyes; then :
7133 ac_have_decl=1
7134else
7135 ac_have_decl=0
7136fi
7137
7138cat >>confdefs.h <<_ACEOF
7139#define HAVE_DECL_LOGINRESTRICTIONS $ac_have_decl
7140_ACEOF
7141ac_fn_c_check_decl "$LINENO" "loginsuccess" "ac_cv_have_decl_loginsuccess" "#include <usersec.h>
7142"
7143if test "x$ac_cv_have_decl_loginsuccess" = xyes; then :
7144 ac_have_decl=1
7145else
7146 ac_have_decl=0
7147fi
7148
7149cat >>confdefs.h <<_ACEOF
7150#define HAVE_DECL_LOGINSUCCESS $ac_have_decl
7151_ACEOF
7152ac_fn_c_check_decl "$LINENO" "passwdexpired" "ac_cv_have_decl_passwdexpired" "#include <usersec.h>
7153"
7154if test "x$ac_cv_have_decl_passwdexpired" = xyes; then :
7155 ac_have_decl=1
7156else
7157 ac_have_decl=0
7158fi
7159
7160cat >>confdefs.h <<_ACEOF
7161#define HAVE_DECL_PASSWDEXPIRED $ac_have_decl
7162_ACEOF
7163ac_fn_c_check_decl "$LINENO" "setauthdb" "ac_cv_have_decl_setauthdb" "#include <usersec.h>
7164"
7165if test "x$ac_cv_have_decl_setauthdb" = xyes; then :
7166 ac_have_decl=1
7167else
7168 ac_have_decl=0
7169fi
7170
7171cat >>confdefs.h <<_ACEOF
7172#define HAVE_DECL_SETAUTHDB $ac_have_decl
7173_ACEOF
7174
7175 ac_fn_c_check_decl "$LINENO" "loginfailed" "ac_cv_have_decl_loginfailed" "#include <usersec.h>
7176
7177"
7178if test "x$ac_cv_have_decl_loginfailed" = xyes; then :
7179 ac_have_decl=1
7180else
7181 ac_have_decl=0
7182fi
7183
7184cat >>confdefs.h <<_ACEOF
7185#define HAVE_DECL_LOGINFAILED $ac_have_decl
7186_ACEOF
7187if test $ac_have_decl = 1; then :
7188 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if loginfailed takes 4 arguments" >&5
7189$as_echo_n "checking if loginfailed takes 4 arguments... " >&6; }
7190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7191/* end confdefs.h. */
7192 #include <usersec.h>
7193int
7194main ()
7195{
7196 (void)loginfailed("user","host","tty",0);
7197 ;
7198 return 0;
7199}
7200_ACEOF
7201if ac_fn_c_try_compile "$LINENO"; then :
7202 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7203$as_echo "yes" >&6; }
7204
7205$as_echo "#define AIX_LOGINFAILED_4ARG 1" >>confdefs.h
7206
7207else
7208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7209$as_echo "no" >&6; }
7210
7211fi
7212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7213fi
7214
7215 for ac_func in getgrset setauthdb
7216do :
7217 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7218ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7219if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7220 cat >>confdefs.h <<_ACEOF
7221#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7222_ACEOF
7223
7224fi
7225done
7226
7227 ac_fn_c_check_decl "$LINENO" "F_CLOSEM" "ac_cv_have_decl_F_CLOSEM" " #include <limits.h>
7228 #include <fcntl.h>
7229
7230"
7231if test "x$ac_cv_have_decl_F_CLOSEM" = xyes; then :
7232
7233$as_echo "#define HAVE_FCNTL_CLOSEM 1" >>confdefs.h
7234
7235fi
7236
7237 check_for_aix_broken_getaddrinfo=1
7238
7239$as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7240
7241
7242$as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7243
7244
7245$as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7246
7247
7248$as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
7249
7250
7251$as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
7252
7253
7254$as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7255
7256
7257$as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
7258
7259
7260$as_echo "#define PTY_ZEROREAD 1" >>confdefs.h
7261
7262
7263$as_echo "#define PLATFORM_SYS_DIR_UID 2" >>confdefs.h
7264
7265
7266$as_echo "#define BROKEN_STRNDUP 1" >>confdefs.h
7267
7268
7269$as_echo "#define BROKEN_STRNLEN 1" >>confdefs.h
7270
7271 ;;
7272*-*-android*)
7273
7274$as_echo "#define DISABLE_UTMP 1" >>confdefs.h
7275
7276
7277$as_echo "#define DISABLE_WTMP 1" >>confdefs.h
7278
7279 ;;
7280*-*-cygwin*)
7281 check_for_libcrypt_later=1
7282 LIBS="$LIBS /usr/lib/textreadmode.o"
7283
7284$as_echo "#define HAVE_CYGWIN 1" >>confdefs.h
7285
7286
7287$as_echo "#define USE_PIPES 1" >>confdefs.h
7288
7289
7290$as_echo "#define NO_UID_RESTORATION_TEST 1" >>confdefs.h
7291
7292
7293$as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
7294
7295
7296$as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
7297
7298
7299$as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7300
7301
7302$as_echo "#define SSH_IOBUFSZ 65535" >>confdefs.h
7303
7304
7305$as_echo "#define FILESYSTEM_NO_BACKSLASH 1" >>confdefs.h
7306
7307 # Cygwin defines optargs, optargs as declspec(dllimport) for historical
7308 # reasons which cause compile warnings, so we disable those warnings.
7309 {
7310 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wno-attributes" >&5
7311$as_echo_n "checking if $CC supports compile flag -Wno-attributes... " >&6; }
7312 saved_CFLAGS="$CFLAGS"
7313 CFLAGS="$CFLAGS $WERROR -Wno-attributes"
7314 _define_flag=""
7315 test "x$_define_flag" = "x" && _define_flag="-Wno-attributes"
7316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7317/* end confdefs.h. */
7318
7319#include <stdlib.h>
7320#include <stdio.h>
7321int main(int argc, char **argv) {
7322 /* Some math to catch -ftrapv problems in the toolchain */
7323 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
7324 float l = i * 2.1;
7325 double m = l / 0.5;
7326 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
7327 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
7328 exit(0);
7329}
7330
7331_ACEOF
7332if ac_fn_c_try_compile "$LINENO"; then :
7333
7334if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
7335then
7336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7337$as_echo "no" >&6; }
7338 CFLAGS="$saved_CFLAGS"
7339else
7340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7341$as_echo "yes" >&6; }
7342 CFLAGS="$saved_CFLAGS $_define_flag"
7343fi
7344else
7345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7346$as_echo "no" >&6; }
7347 CFLAGS="$saved_CFLAGS"
7348
7349fi
7350rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7351}
7352 ;;
7353*-*-dgux*)
7354
7355$as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
7356
7357 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7358
7359 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7360
7361 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7362
7363 ;;
7364*-*-darwin*)
7365 use_pie=auto
7366 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have working getaddrinfo" >&5
7367$as_echo_n "checking if we have working getaddrinfo... " >&6; }
7368 if test "$cross_compiling" = yes; then :
7369 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assume it is working" >&5
7370$as_echo "assume it is working" >&6; }
7371else
7372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7373/* end confdefs.h. */
7374 #include <mach-o/dyld.h>
7375main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
7376 exit(0);
7377 else
7378 exit(1);
7379}
7380
7381_ACEOF
7382if ac_fn_c_try_run "$LINENO"; then :
7383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: working" >&5
7384$as_echo "working" >&6; }
7385else
7386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5
7387$as_echo "buggy" >&6; }
7388
7389$as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
7390
7391
7392fi
7393rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7394 conftest.$ac_objext conftest.beam conftest.$ac_ext
7395fi
7396
7397 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7398
7399 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7400
7401 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7402
7403
7404$as_echo "#define BROKEN_GLOB 1" >>confdefs.h
7405
7406
7407cat >>confdefs.h <<_ACEOF
7408#define BIND_8_COMPAT 1
7409_ACEOF
7410
7411
7412$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
7413
7414
7415$as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
7416
7417
7418$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
7419
7420
7421 ac_fn_c_check_decl "$LINENO" "AU_IPv4" "ac_cv_have_decl_AU_IPv4" "$ac_includes_default"
7422if test "x$ac_cv_have_decl_AU_IPv4" = xyes; then :
7423
7424else
7425
7426$as_echo "#define AU_IPv4 0" >>confdefs.h
7427
7428 #include <bsm/audit.h>
7429
7430$as_echo "#define LASTLOG_WRITE_PUTUTXLINE 1" >>confdefs.h
7431
7432
7433fi
7434
7435
7436$as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7437
7438 for ac_func in sandbox_init
7439do :
7440 ac_fn_c_check_func "$LINENO" "sandbox_init" "ac_cv_func_sandbox_init"
7441if test "x$ac_cv_func_sandbox_init" = xyes; then :
7442 cat >>confdefs.h <<_ACEOF
7443#define HAVE_SANDBOX_INIT 1
7444_ACEOF
7445
7446fi
7447done
7448
7449 for ac_header in sandbox.h
7450do :
7451 ac_fn_c_check_header_mongrel "$LINENO" "sandbox.h" "ac_cv_header_sandbox_h" "$ac_includes_default"
7452if test "x$ac_cv_header_sandbox_h" = xyes; then :
7453 cat >>confdefs.h <<_ACEOF
7454#define HAVE_SANDBOX_H 1
7455_ACEOF
7456
7457fi
7458
7459done
7460
7461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sandbox_apply in -lsandbox" >&5
7462$as_echo_n "checking for sandbox_apply in -lsandbox... " >&6; }
7463if ${ac_cv_lib_sandbox_sandbox_apply+:} false; then :
7464 $as_echo_n "(cached) " >&6
7465else
7466 ac_check_lib_save_LIBS=$LIBS
7467LIBS="-lsandbox $LIBS"
7468cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7469/* end confdefs.h. */
7470
7471/* Override any GCC internal prototype to avoid an error.
7472 Use char because int might match the return type of a GCC
7473 builtin and then its argument prototype would still apply. */
7474#ifdef __cplusplus
7475extern "C"
7476#endif
7477char sandbox_apply ();
7478int
7479main ()
7480{
7481return sandbox_apply ();
7482 ;
7483 return 0;
7484}
7485_ACEOF
7486if ac_fn_c_try_link "$LINENO"; then :
7487 ac_cv_lib_sandbox_sandbox_apply=yes
7488else
7489 ac_cv_lib_sandbox_sandbox_apply=no
7490fi
7491rm -f core conftest.err conftest.$ac_objext \
7492 conftest$ac_exeext conftest.$ac_ext
7493LIBS=$ac_check_lib_save_LIBS
7494fi
7495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sandbox_sandbox_apply" >&5
7496$as_echo "$ac_cv_lib_sandbox_sandbox_apply" >&6; }
7497if test "x$ac_cv_lib_sandbox_sandbox_apply" = xyes; then :
7498
7499 SSHDLIBS="$SSHDLIBS -lsandbox"
7500
7501fi
7502
7503 # proc_pidinfo()-based closefrom() replacement.
7504 for ac_header in libproc.h
7505do :
7506 ac_fn_c_check_header_mongrel "$LINENO" "libproc.h" "ac_cv_header_libproc_h" "$ac_includes_default"
7507if test "x$ac_cv_header_libproc_h" = xyes; then :
7508 cat >>confdefs.h <<_ACEOF
7509#define HAVE_LIBPROC_H 1
7510_ACEOF
7511
7512fi
7513
7514done
7515
7516 for ac_func in proc_pidinfo
7517do :
7518 ac_fn_c_check_func "$LINENO" "proc_pidinfo" "ac_cv_func_proc_pidinfo"
7519if test "x$ac_cv_func_proc_pidinfo" = xyes; then :
7520 cat >>confdefs.h <<_ACEOF
7521#define HAVE_PROC_PIDINFO 1
7522_ACEOF
7523
7524fi
7525done
7526
7527 ;;
7528*-*-dragonfly*)
7529 SSHDLIBS="$SSHDLIBS -lcrypt"
7530 TEST_MALLOC_OPTIONS="AFGJPRX"
7531 ;;
7532*-*-haiku*)
7533 LIBS="$LIBS -lbsd "
7534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
7535$as_echo_n "checking for socket in -lnetwork... " >&6; }
7536if ${ac_cv_lib_network_socket+:} false; then :
7537 $as_echo_n "(cached) " >&6
7538else
7539 ac_check_lib_save_LIBS=$LIBS
7540LIBS="-lnetwork $LIBS"
7541cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7542/* end confdefs.h. */
7543
7544/* Override any GCC internal prototype to avoid an error.
7545 Use char because int might match the return type of a GCC
7546 builtin and then its argument prototype would still apply. */
7547#ifdef __cplusplus
7548extern "C"
7549#endif
7550char socket ();
7551int
7552main ()
7553{
7554return socket ();
7555 ;
7556 return 0;
7557}
7558_ACEOF
7559if ac_fn_c_try_link "$LINENO"; then :
7560 ac_cv_lib_network_socket=yes
7561else
7562 ac_cv_lib_network_socket=no
7563fi
7564rm -f core conftest.err conftest.$ac_objext \
7565 conftest$ac_exeext conftest.$ac_ext
7566LIBS=$ac_check_lib_save_LIBS
7567fi
7568{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
7569$as_echo "$ac_cv_lib_network_socket" >&6; }
7570if test "x$ac_cv_lib_network_socket" = xyes; then :
7571 cat >>confdefs.h <<_ACEOF
7572#define HAVE_LIBNETWORK 1
7573_ACEOF
7574
7575 LIBS="-lnetwork $LIBS"
7576
7577fi
7578
7579 $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
7580
7581 MANTYPE=man
7582 ;;
7583*-*-hpux*)
7584 # first we define all of the options common to all HP-UX releases
7585 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
7586 IPADDR_IN_DISPLAY=yes
7587 $as_echo "#define USE_PIPES 1" >>confdefs.h
7588
7589 $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
7590
7591
7592$as_echo "#define LOCKED_PASSWD_STRING \"*\"" >>confdefs.h
7593
7594 $as_echo "#define SPT_TYPE SPT_PSTAT" >>confdefs.h
7595
7596
7597$as_echo "#define PLATFORM_SYS_DIR_UID 2" >>confdefs.h
7598
7599 maildir="/var/mail"
7600 LIBS="$LIBS -lsec"
7601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_error in -lxnet" >&5
7602$as_echo_n "checking for t_error in -lxnet... " >&6; }
7603if ${ac_cv_lib_xnet_t_error+:} false; then :
7604 $as_echo_n "(cached) " >&6
7605else
7606 ac_check_lib_save_LIBS=$LIBS
7607LIBS="-lxnet $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 t_error ();
7618int
7619main ()
7620{
7621return t_error ();
7622 ;
7623 return 0;
7624}
7625_ACEOF
7626if ac_fn_c_try_link "$LINENO"; then :
7627 ac_cv_lib_xnet_t_error=yes
7628else
7629 ac_cv_lib_xnet_t_error=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_xnet_t_error" >&5
7636$as_echo "$ac_cv_lib_xnet_t_error" >&6; }
7637if test "x$ac_cv_lib_xnet_t_error" = xyes; then :
7638 cat >>confdefs.h <<_ACEOF
7639#define HAVE_LIBXNET 1
7640_ACEOF
7641
7642 LIBS="-lxnet $LIBS"
7643
7644else
7645 as_fn_error $? "*** -lxnet needed on HP-UX - check config.log ***" "$LINENO" 5
7646fi
7647
7648
7649 # next, we define all of the options specific to major releases
7650 case "$host" in
7651 *-*-hpux10*)
7652 if test -z "$GCC"; then
7653 CFLAGS="$CFLAGS -Ae"
7654 fi
7655 ;;
7656 *-*-hpux11*)
7657
7658$as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
7659
7660
7661$as_echo "#define DISABLE_UTMP 1" >>confdefs.h
7662
7663
7664$as_echo "#define USE_BTMP 1" >>confdefs.h
7665
7666 check_for_hpux_broken_getaddrinfo=1
7667 check_for_conflicting_getspnam=1
7668 ;;
7669 esac
7670
7671 # lastly, we define options specific to minor releases
7672 case "$host" in
7673 *-*-hpux10.26)
7674
7675$as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
7676
7677 disable_ptmx_check=yes
7678 LIBS="$LIBS -lsecpw"
7679 ;;
7680 esac
7681 ;;
7682*-*-irix5*)
7683 PATH="$PATH:/usr/etc"
7684
7685$as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
7686
7687 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7688
7689 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7690
7691 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7692
7693
7694$as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
7695
7696 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7697
7698 ;;
7699*-*-irix6*)
7700 PATH="$PATH:/usr/etc"
7701
7702$as_echo "#define WITH_IRIX_ARRAY 1" >>confdefs.h
7703
7704
7705$as_echo "#define WITH_IRIX_PROJECT 1" >>confdefs.h
7706
7707
7708$as_echo "#define WITH_IRIX_AUDIT 1" >>confdefs.h
7709
7710 ac_fn_c_check_func "$LINENO" "jlimit_startjob" "ac_cv_func_jlimit_startjob"
7711if test "x$ac_cv_func_jlimit_startjob" = xyes; then :
7712
7713$as_echo "#define WITH_IRIX_JOBS 1" >>confdefs.h
7714
7715fi
7716
7717 $as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
7718
7719 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7720
7721 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7722
7723 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7724
7725
7726$as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
7727
7728 $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
7729
7730 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7731
7732 ;;
7733*-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
7734 check_for_libcrypt_later=1
7735 $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
7736
7737 $as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
7738
7739 $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7740
7741
7742$as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
7743
7744
7745$as_echo "#define USE_BTMP 1" >>confdefs.h
7746
7747 ;;
7748*-*-linux*)
7749 no_dev_ptmx=1
7750 use_pie=auto
7751 check_for_libcrypt_later=1
7752 check_for_openpty_ctty_bug=1
7753 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE"
7754
7755$as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
7756
7757
7758$as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
7759
7760 $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7761
7762
7763$as_echo "#define LINK_OPNOTSUPP_ERRNO EPERM" >>confdefs.h
7764
7765
7766$as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
7767
7768 $as_echo "#define USE_BTMP 1" >>confdefs.h
7769
7770
7771$as_echo "#define LINUX_OOM_ADJUST 1" >>confdefs.h
7772
7773 inet6_default_4in6=yes
7774 case `uname -r` in
7775 1.*|2.0.*)
7776
7777$as_echo "#define BROKEN_CMSG_TYPE 1" >>confdefs.h
7778
7779 ;;
7780 esac
7781 # tun(4) forwarding compat code
7782 for ac_header in linux/if_tun.h
7783do :
7784 ac_fn_c_check_header_mongrel "$LINENO" "linux/if_tun.h" "ac_cv_header_linux_if_tun_h" "$ac_includes_default"
7785if test "x$ac_cv_header_linux_if_tun_h" = xyes; then :
7786 cat >>confdefs.h <<_ACEOF
7787#define HAVE_LINUX_IF_TUN_H 1
7788_ACEOF
7789
7790fi
7791
7792done
7793
7794 if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then
7795
7796$as_echo "#define SSH_TUN_LINUX 1" >>confdefs.h
7797
7798
7799$as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
7800
7801
7802$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
7803
7804 fi
7805 ac_fn_c_check_header_compile "$LINENO" "linux/if.h" "ac_cv_header_linux_if_h" "
7806#ifdef HAVE_SYS_TYPES_H
7807# include <sys/types.h>
7808#endif
7809
7810"
7811if test "x$ac_cv_header_linux_if_h" = xyes; then :
7812
7813$as_echo "#define SYS_RDOMAIN_LINUX 1" >>confdefs.h
7814
7815fi
7816
7817
7818 for ac_header in linux/seccomp.h linux/filter.h linux/audit.h
7819do :
7820 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7821ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <linux/types.h>
7822"
7823if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7824 cat >>confdefs.h <<_ACEOF
7825#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7826_ACEOF
7827
7828fi
7829
7830done
7831
7832 # Obtain MIPS ABI
7833 case "$host" in
7834 mips*)
7835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7836/* end confdefs.h. */
7837
7838#if _MIPS_SIM != _ABIO32
7839#error
7840#endif
7841
7842int
7843main ()
7844{
7845
7846 ;
7847 return 0;
7848}
7849_ACEOF
7850if ac_fn_c_try_compile "$LINENO"; then :
7851 mips_abi="o32"
7852else
7853 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7854/* end confdefs.h. */
7855
7856#if _MIPS_SIM != _ABIN32
7857#error
7858#endif
7859
7860int
7861main ()
7862{
7863
7864 ;
7865 return 0;
7866}
7867_ACEOF
7868if ac_fn_c_try_compile "$LINENO"; then :
7869 mips_abi="n32"
7870else
7871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7872/* end confdefs.h. */
7873
7874#if _MIPS_SIM != _ABI64
7875#error
7876#endif
7877
7878int
7879main ()
7880{
7881
7882 ;
7883 return 0;
7884}
7885_ACEOF
7886if ac_fn_c_try_compile "$LINENO"; then :
7887 mips_abi="n64"
7888else
7889 as_fn_error $? "unknown MIPS ABI" "$LINENO" 5
7890
7891fi
7892rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7893
7894fi
7895rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7896
7897fi
7898rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7899 ;;
7900 esac
7901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for seccomp architecture" >&5
7902$as_echo_n "checking for seccomp architecture... " >&6; }
7903 seccomp_audit_arch=
7904 case "$host" in
7905 x86_64-*)
7906 seccomp_audit_arch=AUDIT_ARCH_X86_64
7907 ;;
7908 i*86-*)
7909 seccomp_audit_arch=AUDIT_ARCH_I386
7910 ;;
7911 arm*-*)
7912 seccomp_audit_arch=AUDIT_ARCH_ARM
7913 ;;
7914 aarch64*-*)
7915 seccomp_audit_arch=AUDIT_ARCH_AARCH64
7916 ;;
7917 s390x-*)
7918 seccomp_audit_arch=AUDIT_ARCH_S390X
7919 ;;
7920 s390-*)
7921 seccomp_audit_arch=AUDIT_ARCH_S390
7922 ;;
7923 powerpc64-*)
7924 seccomp_audit_arch=AUDIT_ARCH_PPC64
7925 ;;
7926 powerpc64le-*)
7927 seccomp_audit_arch=AUDIT_ARCH_PPC64LE
7928 ;;
7929 mips-*)
7930 seccomp_audit_arch=AUDIT_ARCH_MIPS
7931 ;;
7932 mipsel-*)
7933 seccomp_audit_arch=AUDIT_ARCH_MIPSEL
7934 ;;
7935 mips64-*)
7936 case "$mips_abi" in
7937 "n32")
7938 seccomp_audit_arch=AUDIT_ARCH_MIPS64N32
7939 ;;
7940 "n64")
7941 seccomp_audit_arch=AUDIT_ARCH_MIPS64
7942 ;;
7943 esac
7944 ;;
7945 mips64el-*)
7946 case "$mips_abi" in
7947 "n32")
7948 seccomp_audit_arch=AUDIT_ARCH_MIPSEL64N32
7949 ;;
7950 "n64")
7951 seccomp_audit_arch=AUDIT_ARCH_MIPSEL64
7952 ;;
7953 esac
7954 ;;
7955 esac
7956 if test "x$seccomp_audit_arch" != "x" ; then
7957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$seccomp_audit_arch\"" >&5
7958$as_echo "\"$seccomp_audit_arch\"" >&6; }
7959
7960cat >>confdefs.h <<_ACEOF
7961#define SECCOMP_AUDIT_ARCH $seccomp_audit_arch
7962_ACEOF
7963
7964 else
7965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: architecture not supported" >&5
7966$as_echo "architecture not supported" >&6; }
7967 fi
7968 ;;
7969mips-sony-bsd|mips-sony-newsos4)
7970
7971$as_echo "#define NEED_SETPGRP 1" >>confdefs.h
7972
7973 SONY=1
7974 ;;
7975*-*-netbsd*)
7976 check_for_libcrypt_before=1
7977 if test "x$withval" != "xno" ; then
7978 rpath_opt="-R"
7979 fi
7980 CPPFLAGS="$CPPFLAGS -D_OPENBSD_SOURCE"
7981
7982$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
7983
7984 ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
7985if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
7986
7987else
7988
7989$as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
7990
7991fi
7992
7993
7994
7995$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
7996
7997 TEST_MALLOC_OPTIONS="AJRX"
7998
7999$as_echo "#define BROKEN_READ_COMPARISON 1" >>confdefs.h
8000
8001 ;;
8002*-*-freebsd*)
8003 check_for_libcrypt_later=1
8004
8005$as_echo "#define LOCKED_PASSWD_PREFIX \"*LOCKED*\"" >>confdefs.h
8006
8007
8008$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
8009
8010 ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
8011if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
8012
8013else
8014
8015$as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
8016
8017fi
8018
8019
8020
8021$as_echo "#define BROKEN_GLOB 1" >>confdefs.h
8022
8023 TEST_MALLOC_OPTIONS="AJRX"
8024 # Preauth crypto occasionally uses file descriptors for crypto offload
8025 # and will crash if they cannot be opened.
8026
8027$as_echo "#define SANDBOX_SKIP_RLIMIT_NOFILE 1" >>confdefs.h
8028
8029 ;;
8030*-*-bsdi*)
8031 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8032
8033 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8034
8035 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8036
8037 ;;
8038*-next-*)
8039 conf_lastlog_location="/usr/adm/lastlog"
8040 conf_utmp_location=/etc/utmp
8041 conf_wtmp_location=/usr/adm/wtmp
8042 maildir=/usr/spool/mail
8043
8044$as_echo "#define HAVE_NEXT 1" >>confdefs.h
8045
8046 $as_echo "#define USE_PIPES 1" >>confdefs.h
8047
8048
8049$as_echo "#define BROKEN_SAVED_UIDS 1" >>confdefs.h
8050
8051 ;;
8052*-*-openbsd*)
8053 use_pie=auto
8054
8055$as_echo "#define HAVE_ATTRIBUTE__SENTINEL__ 1" >>confdefs.h
8056
8057
8058$as_echo "#define HAVE_ATTRIBUTE__BOUNDED__ 1" >>confdefs.h
8059
8060
8061$as_echo "#define SSH_TUN_OPENBSD 1" >>confdefs.h
8062
8063
8064$as_echo "#define SYSLOG_R_SAFE_IN_SIGHAND 1" >>confdefs.h
8065
8066 TEST_MALLOC_OPTIONS="AFGJPRX"
8067 ;;
8068*-*-solaris*)
8069 if test "x$withval" != "xno" ; then
8070 rpath_opt="-R"
8071 fi
8072 $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
8073
8074 $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
8075
8076 $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
8077
8078
8079$as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
8080
8081 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
8082
8083 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
8084
8085$as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
8086
8087
8088$as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
8089
8090
8091$as_echo "#define BROKEN_TCGETATTR_ICANON 1" >>confdefs.h
8092
8093 external_path_file=/etc/default/login
8094 # hardwire lastlog location (can't detect it on some versions)
8095 conf_lastlog_location="/var/adm/lastlog"
8096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obsolete utmp and wtmp in solaris2.x" >&5
8097$as_echo_n "checking for obsolete utmp and wtmp in solaris2.x... " >&6; }
8098 sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
8099 if test "$sol2ver" -ge 8; then
8100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8101$as_echo "yes" >&6; }
8102 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
8103
8104
8105$as_echo "#define DISABLE_WTMP 1" >>confdefs.h
8106
8107 else
8108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8109$as_echo "no" >&6; }
8110 fi
8111 for ac_func in setpflags
8112do :
8113 ac_fn_c_check_func "$LINENO" "setpflags" "ac_cv_func_setpflags"
8114if test "x$ac_cv_func_setpflags" = xyes; then :
8115 cat >>confdefs.h <<_ACEOF
8116#define HAVE_SETPFLAGS 1
8117_ACEOF
8118
8119fi
8120done
8121
8122 for ac_func in setppriv
8123do :
8124 ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
8125if test "x$ac_cv_func_setppriv" = xyes; then :
8126 cat >>confdefs.h <<_ACEOF
8127#define HAVE_SETPPRIV 1
8128_ACEOF
8129
8130fi
8131done
8132
8133 for ac_func in priv_basicset
8134do :
8135 ac_fn_c_check_func "$LINENO" "priv_basicset" "ac_cv_func_priv_basicset"
8136if test "x$ac_cv_func_priv_basicset" = xyes; then :
8137 cat >>confdefs.h <<_ACEOF
8138#define HAVE_PRIV_BASICSET 1
8139_ACEOF
8140
8141fi
8142done
8143
8144 for ac_header in priv.h
8145do :
8146 ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
8147if test "x$ac_cv_header_priv_h" = xyes; then :
8148 cat >>confdefs.h <<_ACEOF
8149#define HAVE_PRIV_H 1
8150_ACEOF
8151
8152fi
8153
8154done
8155
8156
8157# Check whether --with-solaris-contracts was given.
8158if test "${with_solaris_contracts+set}" = set; then :
8159 withval=$with_solaris_contracts;
8160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ct_tmpl_activate in -lcontract" >&5
8161$as_echo_n "checking for ct_tmpl_activate in -lcontract... " >&6; }
8162if ${ac_cv_lib_contract_ct_tmpl_activate+:} false; then :
8163 $as_echo_n "(cached) " >&6
8164else
8165 ac_check_lib_save_LIBS=$LIBS
8166LIBS="-lcontract $LIBS"
8167cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8168/* end confdefs.h. */
8169
8170/* Override any GCC internal prototype to avoid an error.
8171 Use char because int might match the return type of a GCC
8172 builtin and then its argument prototype would still apply. */
8173#ifdef __cplusplus
8174extern "C"
8175#endif
8176char ct_tmpl_activate ();
8177int
8178main ()
8179{
8180return ct_tmpl_activate ();
8181 ;
8182 return 0;
8183}
8184_ACEOF
8185if ac_fn_c_try_link "$LINENO"; then :
8186 ac_cv_lib_contract_ct_tmpl_activate=yes
8187else
8188 ac_cv_lib_contract_ct_tmpl_activate=no
8189fi
8190rm -f core conftest.err conftest.$ac_objext \
8191 conftest$ac_exeext conftest.$ac_ext
8192LIBS=$ac_check_lib_save_LIBS
8193fi
8194{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_contract_ct_tmpl_activate" >&5
8195$as_echo "$ac_cv_lib_contract_ct_tmpl_activate" >&6; }
8196if test "x$ac_cv_lib_contract_ct_tmpl_activate" = xyes; then :
8197
8198$as_echo "#define USE_SOLARIS_PROCESS_CONTRACTS 1" >>confdefs.h
8199
8200 LIBS="$LIBS -lcontract"
8201 SPC_MSG="yes"
8202fi
8203
8204
8205fi
8206
8207
8208# Check whether --with-solaris-projects was given.
8209if test "${with_solaris_projects+set}" = set; then :
8210 withval=$with_solaris_projects;
8211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproject in -lproject" >&5
8212$as_echo_n "checking for setproject in -lproject... " >&6; }
8213if ${ac_cv_lib_project_setproject+:} false; then :
8214 $as_echo_n "(cached) " >&6
8215else
8216 ac_check_lib_save_LIBS=$LIBS
8217LIBS="-lproject $LIBS"
8218cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8219/* end confdefs.h. */
8220
8221/* Override any GCC internal prototype to avoid an error.
8222 Use char because int might match the return type of a GCC
8223 builtin and then its argument prototype would still apply. */
8224#ifdef __cplusplus
8225extern "C"
8226#endif
8227char setproject ();
8228int
8229main ()
8230{
8231return setproject ();
8232 ;
8233 return 0;
8234}
8235_ACEOF
8236if ac_fn_c_try_link "$LINENO"; then :
8237 ac_cv_lib_project_setproject=yes
8238else
8239 ac_cv_lib_project_setproject=no
8240fi
8241rm -f core conftest.err conftest.$ac_objext \
8242 conftest$ac_exeext conftest.$ac_ext
8243LIBS=$ac_check_lib_save_LIBS
8244fi
8245{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_project_setproject" >&5
8246$as_echo "$ac_cv_lib_project_setproject" >&6; }
8247if test "x$ac_cv_lib_project_setproject" = xyes; then :
8248
8249$as_echo "#define USE_SOLARIS_PROJECTS 1" >>confdefs.h
8250
8251 LIBS="$LIBS -lproject"
8252 SP_MSG="yes"
8253fi
8254
8255
8256fi
8257
8258
8259# Check whether --with-solaris-privs was given.
8260if test "${with_solaris_privs+set}" = set; then :
8261 withval=$with_solaris_privs;
8262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/Illumos privilege support" >&5
8263$as_echo_n "checking for Solaris/Illumos privilege support... " >&6; }
8264 if test "x$ac_cv_func_setppriv" = "xyes" -a \
8265 "x$ac_cv_header_priv_h" = "xyes" ; then
8266 SOLARIS_PRIVS=yes
8267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
8268$as_echo "found" >&6; }
8269
8270$as_echo "#define NO_UID_RESTORATION_TEST 1" >>confdefs.h
8271
8272
8273$as_echo "#define USE_SOLARIS_PRIVS 1" >>confdefs.h
8274
8275 SPP_MSG="yes"
8276 else
8277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8278$as_echo "not found" >&6; }
8279 as_fn_error $? "*** must have support for Solaris privileges to use --with-solaris-privs" "$LINENO" 5
8280 fi
8281
8282fi
8283
8284 TEST_SHELL=$SHELL # let configure find us a capable shell
8285 ;;
8286*-*-sunos4*)
8287 CPPFLAGS="$CPPFLAGS -DSUNOS4"
8288 for ac_func in getpwanam
8289do :
8290 ac_fn_c_check_func "$LINENO" "getpwanam" "ac_cv_func_getpwanam"
8291if test "x$ac_cv_func_getpwanam" = xyes; then :
8292 cat >>confdefs.h <<_ACEOF
8293#define HAVE_GETPWANAM 1
8294_ACEOF
8295
8296fi
8297done
8298
8299 $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
8300
8301 conf_utmp_location=/etc/utmp
8302 conf_wtmp_location=/var/adm/wtmp
8303 conf_lastlog_location=/var/adm/lastlog
8304 $as_echo "#define USE_PIPES 1" >>confdefs.h
8305
8306
8307$as_echo "#define DISABLE_UTMPX 1" >>confdefs.h
8308
8309 ;;
8310*-ncr-sysv*)
8311 LIBS="$LIBS -lc89"
8312 $as_echo "#define USE_PIPES 1" >>confdefs.h
8313
8314 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
8315
8316 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8317
8318 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8319
8320 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8321
8322 ;;
8323*-sni-sysv*)
8324 # /usr/ucblib MUST NOT be searched on ReliantUNIX
8325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
8326$as_echo_n "checking for dlsym in -ldl... " >&6; }
8327if ${ac_cv_lib_dl_dlsym+:} false; then :
8328 $as_echo_n "(cached) " >&6
8329else
8330 ac_check_lib_save_LIBS=$LIBS
8331LIBS="-ldl $LIBS"
8332cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8333/* end confdefs.h. */
8334
8335/* Override any GCC internal prototype to avoid an error.
8336 Use char because int might match the return type of a GCC
8337 builtin and then its argument prototype would still apply. */
8338#ifdef __cplusplus
8339extern "C"
8340#endif
8341char dlsym ();
8342int
8343main ()
8344{
8345return dlsym ();
8346 ;
8347 return 0;
8348}
8349_ACEOF
8350if ac_fn_c_try_link "$LINENO"; then :
8351 ac_cv_lib_dl_dlsym=yes
8352else
8353 ac_cv_lib_dl_dlsym=no
8354fi
8355rm -f core conftest.err conftest.$ac_objext \
8356 conftest$ac_exeext conftest.$ac_ext
8357LIBS=$ac_check_lib_save_LIBS
8358fi
8359{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
8360$as_echo "$ac_cv_lib_dl_dlsym" >&6; }
8361if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
8362 cat >>confdefs.h <<_ACEOF
8363#define HAVE_LIBDL 1
8364_ACEOF
8365
8366 LIBS="-ldl $LIBS"
8367
8368fi
8369
8370 # -lresolv needs to be at the end of LIBS or DNS lookups break
8371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
8372$as_echo_n "checking for res_query in -lresolv... " >&6; }
8373if ${ac_cv_lib_resolv_res_query+:} false; then :
8374 $as_echo_n "(cached) " >&6
8375else
8376 ac_check_lib_save_LIBS=$LIBS
8377LIBS="-lresolv $LIBS"
8378cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8379/* end confdefs.h. */
8380
8381/* Override any GCC internal prototype to avoid an error.
8382 Use char because int might match the return type of a GCC
8383 builtin and then its argument prototype would still apply. */
8384#ifdef __cplusplus
8385extern "C"
8386#endif
8387char res_query ();
8388int
8389main ()
8390{
8391return res_query ();
8392 ;
8393 return 0;
8394}
8395_ACEOF
8396if ac_fn_c_try_link "$LINENO"; then :
8397 ac_cv_lib_resolv_res_query=yes
8398else
8399 ac_cv_lib_resolv_res_query=no
8400fi
8401rm -f core conftest.err conftest.$ac_objext \
8402 conftest$ac_exeext conftest.$ac_ext
8403LIBS=$ac_check_lib_save_LIBS
8404fi
8405{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_query" >&5
8406$as_echo "$ac_cv_lib_resolv_res_query" >&6; }
8407if test "x$ac_cv_lib_resolv_res_query" = xyes; then :
8408 LIBS="$LIBS -lresolv"
8409fi
8410
8411 IPADDR_IN_DISPLAY=yes
8412 $as_echo "#define USE_PIPES 1" >>confdefs.h
8413
8414 $as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
8415
8416 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8417
8418 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8419
8420 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8421
8422 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
8423
8424 external_path_file=/etc/default/login
8425 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
8426 # Attention: always take care to bind libsocket and libnsl before libc,
8427 # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
8428 ;;
8429# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel.
8430*-*-sysv4.2*)
8431 $as_echo "#define USE_PIPES 1" >>confdefs.h
8432
8433 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8434
8435 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8436
8437 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8438
8439
8440$as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
8441
8442 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
8443
8444 TEST_SHELL=$SHELL # let configure find us a capable shell
8445 ;;
8446# UnixWare 7.x, OpenUNIX 8
8447*-*-sysv5*)
8448 CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf"
8449
8450$as_echo "#define UNIXWARE_LONG_PASSWORDS 1" >>confdefs.h
8451
8452 $as_echo "#define USE_PIPES 1" >>confdefs.h
8453
8454 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8455
8456 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
8457
8458 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8459
8460 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8461
8462 $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
8463
8464 $as_echo "#define BROKEN_TCGETATTR_ICANON 1" >>confdefs.h
8465
8466 TEST_SHELL=$SHELL # let configure find us a capable shell
8467 check_for_libcrypt_later=1
8468 case "$host" in
8469 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x
8470 maildir=/var/spool/mail
8471 $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
8472
8473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getluid in -lprot" >&5
8474$as_echo_n "checking for getluid in -lprot... " >&6; }
8475if ${ac_cv_lib_prot_getluid+:} false; then :
8476 $as_echo_n "(cached) " >&6
8477else
8478 ac_check_lib_save_LIBS=$LIBS
8479LIBS="-lprot $LIBS"
8480cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8481/* end confdefs.h. */
8482
8483/* Override any GCC internal prototype to avoid an error.
8484 Use char because int might match the return type of a GCC
8485 builtin and then its argument prototype would still apply. */
8486#ifdef __cplusplus
8487extern "C"
8488#endif
8489char getluid ();
8490int
8491main ()
8492{
8493return getluid ();
8494 ;
8495 return 0;
8496}
8497_ACEOF
8498if ac_fn_c_try_link "$LINENO"; then :
8499 ac_cv_lib_prot_getluid=yes
8500else
8501 ac_cv_lib_prot_getluid=no
8502fi
8503rm -f core conftest.err conftest.$ac_objext \
8504 conftest$ac_exeext conftest.$ac_ext
8505LIBS=$ac_check_lib_save_LIBS
8506fi
8507{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getluid" >&5
8508$as_echo "$ac_cv_lib_prot_getluid" >&6; }
8509if test "x$ac_cv_lib_prot_getluid" = xyes; then :
8510 LIBS="$LIBS -lprot"
8511 for ac_func in getluid setluid
8512do :
8513 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8514ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8515if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8516 cat >>confdefs.h <<_ACEOF
8517#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8518_ACEOF
8519
8520fi
8521done
8522
8523
8524fi
8525
8526 ;;
8527 *) $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
8528
8529 ;;
8530 esac
8531 ;;
8532*-*-sysv*)
8533 ;;
8534# SCO UNIX and OEM versions of SCO UNIX
8535*-*-sco3.2v4*)
8536 as_fn_error $? "\"This Platform is no longer supported.\"" "$LINENO" 5
8537 ;;
8538# SCO OpenServer 5.x
8539*-*-sco3.2v5*)
8540 if test -z "$GCC"; then
8541 CFLAGS="$CFLAGS -belf"
8542 fi
8543 LIBS="$LIBS -lprot -lx -ltinfo -lm"
8544 no_dev_ptmx=1
8545 $as_echo "#define USE_PIPES 1" >>confdefs.h
8546
8547 $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
8548
8549 $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
8550
8551 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8552
8553 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8554
8555 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
8556
8557 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8558
8559 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8560
8561 $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
8562
8563 $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
8564
8565 $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
8566
8567 for ac_func in getluid setluid
8568do :
8569 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8570ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8571if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8572 cat >>confdefs.h <<_ACEOF
8573#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8574_ACEOF
8575
8576fi
8577done
8578
8579 MANTYPE=man
8580 TEST_SHELL=$SHELL # let configure find us a capable shell
8581 SKIP_DISABLE_LASTLOG_DEFINE=yes
8582 ;;
8583*-dec-osf*)
8584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Digital Unix SIA" >&5
8585$as_echo_n "checking for Digital Unix SIA... " >&6; }
8586 no_osfsia=""
8587
8588# Check whether --with-osfsia was given.
8589if test "${with_osfsia+set}" = set; then :
8590 withval=$with_osfsia;
8591 if test "x$withval" = "xno" ; then
8592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8593$as_echo "disabled" >&6; }
8594 no_osfsia=1
8595 fi
8596
8597fi
8598
8599 if test -z "$no_osfsia" ; then
8600 if test -f /etc/sia/matrix.conf; then
8601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8602$as_echo "yes" >&6; }
8603
8604$as_echo "#define HAVE_OSF_SIA 1" >>confdefs.h
8605
8606
8607$as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
8608
8609 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8610
8611 LIBS="$LIBS -lsecurity -ldb -lm -laud"
8612 SIA_MSG="yes"
8613 else
8614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8615$as_echo "no" >&6; }
8616
8617$as_echo "#define LOCKED_PASSWD_SUBSTR \"Nologin\"" >>confdefs.h
8618
8619 fi
8620 fi
8621 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
8622
8623 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8624
8625 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8626
8627 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8628
8629
8630$as_echo "#define BROKEN_READV_COMPARISON 1" >>confdefs.h
8631
8632 ;;
8633
8634*-*-nto-qnx*)
8635 $as_echo "#define USE_PIPES 1" >>confdefs.h
8636
8637 $as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
8638
8639 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
8640
8641 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
8642
8643
8644$as_echo "#define BROKEN_SHADOW_EXPIRE 1" >>confdefs.h
8645
8646 enable_etc_default_login=no # has incompatible /etc/default/login
8647 case "$host" in
8648 *-*-nto-qnx6*)
8649 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8650
8651 ;;
8652 esac
8653 ;;
8654
8655*-*-ultrix*)
8656
8657$as_echo "#define BROKEN_GETGROUPS 1" >>confdefs.h
8658
8659 $as_echo "#define NEED_SETPGRP 1" >>confdefs.h
8660
8661
8662$as_echo "#define HAVE_SYS_SYSLOG_H 1" >>confdefs.h
8663
8664 ;;
8665
8666*-*-lynxos)
8667 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
8668
8669$as_echo "#define BROKEN_SETVBUF 1" >>confdefs.h
8670
8671 ;;
8672esac
8673
8674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler and flags for sanity" >&5
8675$as_echo_n "checking compiler and flags for sanity... " >&6; }
8676if test "$cross_compiling" = yes; then :
8677 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking compiler sanity" >&5
8678$as_echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;}
8679
8680else
8681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8682/* end confdefs.h. */
8683 #include <stdio.h>
8684int
8685main ()
8686{
8687 exit(0);
8688 ;
8689 return 0;
8690}
8691_ACEOF
8692if ac_fn_c_try_run "$LINENO"; then :
8693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8694$as_echo "yes" >&6; }
8695else
8696
8697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8698$as_echo "no" >&6; }
8699 as_fn_error $? "*** compiler cannot create working executables, check config.log ***" "$LINENO" 5
8700
8701fi
8702rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8703 conftest.$ac_objext conftest.beam conftest.$ac_ext
8704fi
8705
8706
8707# Checks for libraries.
8708ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt"
8709if test "x$ac_cv_func_setsockopt" = xyes; then :
8710
8711else
8712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5
8713$as_echo_n "checking for setsockopt in -lsocket... " >&6; }
8714if ${ac_cv_lib_socket_setsockopt+:} false; then :
8715 $as_echo_n "(cached) " >&6
8716else
8717 ac_check_lib_save_LIBS=$LIBS
8718LIBS="-lsocket $LIBS"
8719cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8720/* end confdefs.h. */
8721
8722/* Override any GCC internal prototype to avoid an error.
8723 Use char because int might match the return type of a GCC
8724 builtin and then its argument prototype would still apply. */
8725#ifdef __cplusplus
8726extern "C"
8727#endif
8728char setsockopt ();
8729int
8730main ()
8731{
8732return setsockopt ();
8733 ;
8734 return 0;
8735}
8736_ACEOF
8737if ac_fn_c_try_link "$LINENO"; then :
8738 ac_cv_lib_socket_setsockopt=yes
8739else
8740 ac_cv_lib_socket_setsockopt=no
8741fi
8742rm -f core conftest.err conftest.$ac_objext \
8743 conftest$ac_exeext conftest.$ac_ext
8744LIBS=$ac_check_lib_save_LIBS
8745fi
8746{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5
8747$as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
8748if test "x$ac_cv_lib_socket_setsockopt" = xyes; then :
8749 cat >>confdefs.h <<_ACEOF
8750#define HAVE_LIBSOCKET 1
8751_ACEOF
8752
8753 LIBS="-lsocket $LIBS"
8754
8755fi
8756
8757fi
8758
8759
8760for ac_func in dirname
8761do :
8762 ac_fn_c_check_func "$LINENO" "dirname" "ac_cv_func_dirname"
8763if test "x$ac_cv_func_dirname" = xyes; then :
8764 cat >>confdefs.h <<_ACEOF
8765#define HAVE_DIRNAME 1
8766_ACEOF
8767 for ac_header in libgen.h
8768do :
8769 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
8770if test "x$ac_cv_header_libgen_h" = xyes; then :
8771 cat >>confdefs.h <<_ACEOF
8772#define HAVE_LIBGEN_H 1
8773_ACEOF
8774
8775fi
8776
8777done
8778
8779else
8780
8781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirname in -lgen" >&5
8782$as_echo_n "checking for dirname in -lgen... " >&6; }
8783if ${ac_cv_lib_gen_dirname+:} false; then :
8784 $as_echo_n "(cached) " >&6
8785else
8786 ac_check_lib_save_LIBS=$LIBS
8787LIBS="-lgen $LIBS"
8788cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8789/* end confdefs.h. */
8790
8791/* Override any GCC internal prototype to avoid an error.
8792 Use char because int might match the return type of a GCC
8793 builtin and then its argument prototype would still apply. */
8794#ifdef __cplusplus
8795extern "C"
8796#endif
8797char dirname ();
8798int
8799main ()
8800{
8801return dirname ();
8802 ;
8803 return 0;
8804}
8805_ACEOF
8806if ac_fn_c_try_link "$LINENO"; then :
8807 ac_cv_lib_gen_dirname=yes
8808else
8809 ac_cv_lib_gen_dirname=no
8810fi
8811rm -f core conftest.err conftest.$ac_objext \
8812 conftest$ac_exeext conftest.$ac_ext
8813LIBS=$ac_check_lib_save_LIBS
8814fi
8815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_dirname" >&5
8816$as_echo "$ac_cv_lib_gen_dirname" >&6; }
8817if test "x$ac_cv_lib_gen_dirname" = xyes; then :
8818
8819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken dirname" >&5
8820$as_echo_n "checking for broken dirname... " >&6; }
8821if ${ac_cv_have_broken_dirname+:} false; then :
8822 $as_echo_n "(cached) " >&6
8823else
8824
8825 save_LIBS="$LIBS"
8826 LIBS="$LIBS -lgen"
8827 if test "$cross_compiling" = yes; then :
8828 ac_cv_have_broken_dirname="no"
8829else
8830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8831/* end confdefs.h. */
8832
8833#include <libgen.h>
8834#include <string.h>
8835
8836int main(int argc, char **argv) {
8837 char *s, buf[32];
8838
8839 strncpy(buf,"/etc", 32);
8840 s = dirname(buf);
8841 if (!s || strncmp(s, "/", 32) != 0) {
8842 exit(1);
8843 } else {
8844 exit(0);
8845 }
8846}
8847
8848_ACEOF
8849if ac_fn_c_try_run "$LINENO"; then :
8850 ac_cv_have_broken_dirname="no"
8851else
8852 ac_cv_have_broken_dirname="yes"
8853fi
8854rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8855 conftest.$ac_objext conftest.beam conftest.$ac_ext
8856fi
8857
8858 LIBS="$save_LIBS"
8859
8860fi
8861{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_broken_dirname" >&5
8862$as_echo "$ac_cv_have_broken_dirname" >&6; }
8863 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
8864 LIBS="$LIBS -lgen"
8865 $as_echo "#define HAVE_DIRNAME 1" >>confdefs.h
8866
8867 for ac_header in libgen.h
8868do :
8869 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
8870if test "x$ac_cv_header_libgen_h" = xyes; then :
8871 cat >>confdefs.h <<_ACEOF
8872#define HAVE_LIBGEN_H 1
8873_ACEOF
8874
8875fi
8876
8877done
8878
8879 fi
8880
8881fi
8882
8883
8884fi
8885done
8886
8887
8888ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
8889if test "x$ac_cv_func_getspnam" = xyes; then :
8890
8891else
8892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
8893$as_echo_n "checking for getspnam in -lgen... " >&6; }
8894if ${ac_cv_lib_gen_getspnam+:} false; then :
8895 $as_echo_n "(cached) " >&6
8896else
8897 ac_check_lib_save_LIBS=$LIBS
8898LIBS="-lgen $LIBS"
8899cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8900/* end confdefs.h. */
8901
8902/* Override any GCC internal prototype to avoid an error.
8903 Use char because int might match the return type of a GCC
8904 builtin and then its argument prototype would still apply. */
8905#ifdef __cplusplus
8906extern "C"
8907#endif
8908char getspnam ();
8909int
8910main ()
8911{
8912return getspnam ();
8913 ;
8914 return 0;
8915}
8916_ACEOF
8917if ac_fn_c_try_link "$LINENO"; then :
8918 ac_cv_lib_gen_getspnam=yes
8919else
8920 ac_cv_lib_gen_getspnam=no
8921fi
8922rm -f core conftest.err conftest.$ac_objext \
8923 conftest$ac_exeext conftest.$ac_ext
8924LIBS=$ac_check_lib_save_LIBS
8925fi
8926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
8927$as_echo "$ac_cv_lib_gen_getspnam" >&6; }
8928if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
8929 LIBS="$LIBS -lgen"
8930fi
8931
8932fi
8933
8934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing basename" >&5
8935$as_echo_n "checking for library containing basename... " >&6; }
8936if ${ac_cv_search_basename+:} false; then :
8937 $as_echo_n "(cached) " >&6
8938else
8939 ac_func_search_save_LIBS=$LIBS
8940cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8941/* end confdefs.h. */
8942
8943/* Override any GCC internal prototype to avoid an error.
8944 Use char because int might match the return type of a GCC
8945 builtin and then its argument prototype would still apply. */
8946#ifdef __cplusplus
8947extern "C"
8948#endif
8949char basename ();
8950int
8951main ()
8952{
8953return basename ();
8954 ;
8955 return 0;
8956}
8957_ACEOF
8958for ac_lib in '' gen; do
8959 if test -z "$ac_lib"; then
8960 ac_res="none required"
8961 else
8962 ac_res=-l$ac_lib
8963 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8964 fi
8965 if ac_fn_c_try_link "$LINENO"; then :
8966 ac_cv_search_basename=$ac_res
8967fi
8968rm -f core conftest.err conftest.$ac_objext \
8969 conftest$ac_exeext
8970 if ${ac_cv_search_basename+:} false; then :
8971 break
8972fi
8973done
8974if ${ac_cv_search_basename+:} false; then :
8975
8976else
8977 ac_cv_search_basename=no
8978fi
8979rm conftest.$ac_ext
8980LIBS=$ac_func_search_save_LIBS
8981fi
8982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_basename" >&5
8983$as_echo "$ac_cv_search_basename" >&6; }
8984ac_res=$ac_cv_search_basename
8985if test "$ac_res" != no; then :
8986 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8987
8988$as_echo "#define HAVE_BASENAME 1" >>confdefs.h
8989
8990fi
8991
8992
8993
8994# Check whether --with-zlib was given.
8995if test "${with_zlib+set}" = set; then :
8996 withval=$with_zlib; if test "x$withval" = "xno" ; then
8997 as_fn_error $? "*** zlib is required ***" "$LINENO" 5
8998 elif test "x$withval" != "xyes"; then
8999 if test -d "$withval/lib"; then
9000 if test -n "${rpath_opt}"; then
9001 LDFLAGS="-L${withval}/lib ${rpath_opt}${withval}/lib ${LDFLAGS}"
9002 else
9003 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
9004 fi
9005 else
9006 if test -n "${rpath_opt}"; then
9007 LDFLAGS="-L${withval} ${rpath_opt}${withval} ${LDFLAGS}"
9008 else
9009 LDFLAGS="-L${withval} ${LDFLAGS}"
9010 fi
9011 fi
9012 if test -d "$withval/include"; then
9013 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
9014 else
9015 CPPFLAGS="-I${withval} ${CPPFLAGS}"
9016 fi
9017 fi
9018
9019fi
9020
9021
9022ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9023if test "x$ac_cv_header_zlib_h" = xyes; then :
9024
9025else
9026 as_fn_error $? "*** zlib.h missing - please install first or check config.log ***" "$LINENO" 5
9027fi
9028
9029
9030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
9031$as_echo_n "checking for deflate in -lz... " >&6; }
9032if ${ac_cv_lib_z_deflate+:} false; then :
9033 $as_echo_n "(cached) " >&6
9034else
9035 ac_check_lib_save_LIBS=$LIBS
9036LIBS="-lz $LIBS"
9037cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9038/* end confdefs.h. */
9039
9040/* Override any GCC internal prototype to avoid an error.
9041 Use char because int might match the return type of a GCC
9042 builtin and then its argument prototype would still apply. */
9043#ifdef __cplusplus
9044extern "C"
9045#endif
9046char deflate ();
9047int
9048main ()
9049{
9050return deflate ();
9051 ;
9052 return 0;
9053}
9054_ACEOF
9055if ac_fn_c_try_link "$LINENO"; then :
9056 ac_cv_lib_z_deflate=yes
9057else
9058 ac_cv_lib_z_deflate=no
9059fi
9060rm -f core conftest.err conftest.$ac_objext \
9061 conftest$ac_exeext conftest.$ac_ext
9062LIBS=$ac_check_lib_save_LIBS
9063fi
9064{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
9065$as_echo "$ac_cv_lib_z_deflate" >&6; }
9066if test "x$ac_cv_lib_z_deflate" = xyes; then :
9067 cat >>confdefs.h <<_ACEOF
9068#define HAVE_LIBZ 1
9069_ACEOF
9070
9071 LIBS="-lz $LIBS"
9072
9073else
9074
9075 saved_CPPFLAGS="$CPPFLAGS"
9076 saved_LDFLAGS="$LDFLAGS"
9077 save_LIBS="$LIBS"
9078 if test -n "${rpath_opt}"; then
9079 LDFLAGS="-L/usr/local/lib ${rpath_opt}/usr/local/lib ${saved_LDFLAGS}"
9080 else
9081 LDFLAGS="-L/usr/local/lib ${saved_LDFLAGS}"
9082 fi
9083 CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}"
9084 LIBS="$LIBS -lz"
9085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9086/* end confdefs.h. */
9087
9088/* Override any GCC internal prototype to avoid an error.
9089 Use char because int might match the return type of a GCC
9090 builtin and then its argument prototype would still apply. */
9091#ifdef __cplusplus
9092extern "C"
9093#endif
9094char deflate ();
9095int
9096main ()
9097{
9098return deflate ();
9099 ;
9100 return 0;
9101}
9102_ACEOF
9103if ac_fn_c_try_link "$LINENO"; then :
9104 $as_echo "#define HAVE_LIBZ 1" >>confdefs.h
9105
9106else
9107
9108 as_fn_error $? "*** zlib missing - please install first or check config.log ***" "$LINENO" 5
9109
9110
9111fi
9112rm -f core conftest.err conftest.$ac_objext \
9113 conftest$ac_exeext conftest.$ac_ext
9114
9115
9116fi
9117
9118
9119
9120# Check whether --with-zlib-version-check was given.
9121if test "${with_zlib_version_check+set}" = set; then :
9122 withval=$with_zlib_version_check; if test "x$withval" = "xno" ; then
9123 zlib_check_nonfatal=1
9124 fi
9125
9126
9127fi
9128
9129
9130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for possibly buggy zlib" >&5
9131$as_echo_n "checking for possibly buggy zlib... " >&6; }
9132if test "$cross_compiling" = yes; then :
9133 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking zlib version" >&5
9134$as_echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;}
9135
9136else
9137 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9138/* end confdefs.h. */
9139
9140#include <stdio.h>
9141#include <stdlib.h>
9142#include <zlib.h>
9143
9144int
9145main ()
9146{
9147
9148 int a=0, b=0, c=0, d=0, n, v;
9149 n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
9150 if (n != 3 && n != 4)
9151 exit(1);
9152 v = a*1000000 + b*10000 + c*100 + d;
9153 fprintf(stderr, "found zlib version %s (%d)\n", ZLIB_VERSION, v);
9154
9155 /* 1.1.4 is OK */
9156 if (a == 1 && b == 1 && c >= 4)
9157 exit(0);
9158
9159 /* 1.2.3 and up are OK */
9160 if (v >= 1020300)
9161 exit(0);
9162
9163 exit(2);
9164
9165 ;
9166 return 0;
9167}
9168_ACEOF
9169if ac_fn_c_try_run "$LINENO"; then :
9170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9171$as_echo "no" >&6; }
9172else
9173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9174$as_echo "yes" >&6; }
9175 if test -z "$zlib_check_nonfatal" ; then
9176 as_fn_error $? "*** zlib too old - check config.log ***
9177Your reported zlib version has known security problems. It's possible your
9178vendor has fixed these problems without changing the version number. If you
9179are sure this is the case, you can disable the check by running
9180\"./configure --without-zlib-version-check\".
9181If you are in doubt, upgrade zlib to version 1.2.3 or greater.
9182See http://www.gzip.org/zlib/ for details." "$LINENO" 5
9183 else
9184 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib version may have security problems" >&5
9185$as_echo "$as_me: WARNING: zlib version may have security problems" >&2;}
9186 fi
9187
9188fi
9189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9190 conftest.$ac_objext conftest.beam conftest.$ac_ext
9191fi
9192
9193
9194ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
9195if test "x$ac_cv_func_strcasecmp" = xyes; then :
9196
9197else
9198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp in -lresolv" >&5
9199$as_echo_n "checking for strcasecmp in -lresolv... " >&6; }
9200if ${ac_cv_lib_resolv_strcasecmp+:} false; then :
9201 $as_echo_n "(cached) " >&6
9202else
9203 ac_check_lib_save_LIBS=$LIBS
9204LIBS="-lresolv $LIBS"
9205cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9206/* end confdefs.h. */
9207
9208/* Override any GCC internal prototype to avoid an error.
9209 Use char because int might match the return type of a GCC
9210 builtin and then its argument prototype would still apply. */
9211#ifdef __cplusplus
9212extern "C"
9213#endif
9214char strcasecmp ();
9215int
9216main ()
9217{
9218return strcasecmp ();
9219 ;
9220 return 0;
9221}
9222_ACEOF
9223if ac_fn_c_try_link "$LINENO"; then :
9224 ac_cv_lib_resolv_strcasecmp=yes
9225else
9226 ac_cv_lib_resolv_strcasecmp=no
9227fi
9228rm -f core conftest.err conftest.$ac_objext \
9229 conftest$ac_exeext conftest.$ac_ext
9230LIBS=$ac_check_lib_save_LIBS
9231fi
9232{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_strcasecmp" >&5
9233$as_echo "$ac_cv_lib_resolv_strcasecmp" >&6; }
9234if test "x$ac_cv_lib_resolv_strcasecmp" = xyes; then :
9235 LIBS="$LIBS -lresolv"
9236fi
9237
9238
9239fi
9240
9241for ac_func in utimes
9242do :
9243 ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
9244if test "x$ac_cv_func_utimes" = xyes; then :
9245 cat >>confdefs.h <<_ACEOF
9246#define HAVE_UTIMES 1
9247_ACEOF
9248
9249else
9250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimes in -lc89" >&5
9251$as_echo_n "checking for utimes in -lc89... " >&6; }
9252if ${ac_cv_lib_c89_utimes+:} false; then :
9253 $as_echo_n "(cached) " >&6
9254else
9255 ac_check_lib_save_LIBS=$LIBS
9256LIBS="-lc89 $LIBS"
9257cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9258/* end confdefs.h. */
9259
9260/* Override any GCC internal prototype to avoid an error.
9261 Use char because int might match the return type of a GCC
9262 builtin and then its argument prototype would still apply. */
9263#ifdef __cplusplus
9264extern "C"
9265#endif
9266char utimes ();
9267int
9268main ()
9269{
9270return utimes ();
9271 ;
9272 return 0;
9273}
9274_ACEOF
9275if ac_fn_c_try_link "$LINENO"; then :
9276 ac_cv_lib_c89_utimes=yes
9277else
9278 ac_cv_lib_c89_utimes=no
9279fi
9280rm -f core conftest.err conftest.$ac_objext \
9281 conftest$ac_exeext conftest.$ac_ext
9282LIBS=$ac_check_lib_save_LIBS
9283fi
9284{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c89_utimes" >&5
9285$as_echo "$ac_cv_lib_c89_utimes" >&6; }
9286if test "x$ac_cv_lib_c89_utimes" = xyes; then :
9287 $as_echo "#define HAVE_UTIMES 1" >>confdefs.h
9288
9289 LIBS="$LIBS -lc89"
9290fi
9291
9292
9293fi
9294done
9295
9296
9297for ac_header in bsd/libutil.h libutil.h
9298do :
9299 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9300ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9301if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9302 cat >>confdefs.h <<_ACEOF
9303#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9304_ACEOF
9305
9306fi
9307
9308done
9309
9310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fmt_scaled" >&5
9311$as_echo_n "checking for library containing fmt_scaled... " >&6; }
9312if ${ac_cv_search_fmt_scaled+:} false; then :
9313 $as_echo_n "(cached) " >&6
9314else
9315 ac_func_search_save_LIBS=$LIBS
9316cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9317/* end confdefs.h. */
9318
9319/* Override any GCC internal prototype to avoid an error.
9320 Use char because int might match the return type of a GCC
9321 builtin and then its argument prototype would still apply. */
9322#ifdef __cplusplus
9323extern "C"
9324#endif
9325char fmt_scaled ();
9326int
9327main ()
9328{
9329return fmt_scaled ();
9330 ;
9331 return 0;
9332}
9333_ACEOF
9334for ac_lib in '' util bsd; do
9335 if test -z "$ac_lib"; then
9336 ac_res="none required"
9337 else
9338 ac_res=-l$ac_lib
9339 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9340 fi
9341 if ac_fn_c_try_link "$LINENO"; then :
9342 ac_cv_search_fmt_scaled=$ac_res
9343fi
9344rm -f core conftest.err conftest.$ac_objext \
9345 conftest$ac_exeext
9346 if ${ac_cv_search_fmt_scaled+:} false; then :
9347 break
9348fi
9349done
9350if ${ac_cv_search_fmt_scaled+:} false; then :
9351
9352else
9353 ac_cv_search_fmt_scaled=no
9354fi
9355rm conftest.$ac_ext
9356LIBS=$ac_func_search_save_LIBS
9357fi
9358{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fmt_scaled" >&5
9359$as_echo "$ac_cv_search_fmt_scaled" >&6; }
9360ac_res=$ac_cv_search_fmt_scaled
9361if test "$ac_res" != no; then :
9362 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9363
9364fi
9365
9366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing scan_scaled" >&5
9367$as_echo_n "checking for library containing scan_scaled... " >&6; }
9368if ${ac_cv_search_scan_scaled+:} false; then :
9369 $as_echo_n "(cached) " >&6
9370else
9371 ac_func_search_save_LIBS=$LIBS
9372cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9373/* end confdefs.h. */
9374
9375/* Override any GCC internal prototype to avoid an error.
9376 Use char because int might match the return type of a GCC
9377 builtin and then its argument prototype would still apply. */
9378#ifdef __cplusplus
9379extern "C"
9380#endif
9381char scan_scaled ();
9382int
9383main ()
9384{
9385return scan_scaled ();
9386 ;
9387 return 0;
9388}
9389_ACEOF
9390for ac_lib in '' util bsd; do
9391 if test -z "$ac_lib"; then
9392 ac_res="none required"
9393 else
9394 ac_res=-l$ac_lib
9395 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9396 fi
9397 if ac_fn_c_try_link "$LINENO"; then :
9398 ac_cv_search_scan_scaled=$ac_res
9399fi
9400rm -f core conftest.err conftest.$ac_objext \
9401 conftest$ac_exeext
9402 if ${ac_cv_search_scan_scaled+:} false; then :
9403 break
9404fi
9405done
9406if ${ac_cv_search_scan_scaled+:} false; then :
9407
9408else
9409 ac_cv_search_scan_scaled=no
9410fi
9411rm conftest.$ac_ext
9412LIBS=$ac_func_search_save_LIBS
9413fi
9414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_scan_scaled" >&5
9415$as_echo "$ac_cv_search_scan_scaled" >&6; }
9416ac_res=$ac_cv_search_scan_scaled
9417if test "$ac_res" != no; then :
9418 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9419
9420fi
9421
9422{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing login" >&5
9423$as_echo_n "checking for library containing login... " >&6; }
9424if ${ac_cv_search_login+:} false; then :
9425 $as_echo_n "(cached) " >&6
9426else
9427 ac_func_search_save_LIBS=$LIBS
9428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9429/* end confdefs.h. */
9430
9431/* Override any GCC internal prototype to avoid an error.
9432 Use char because int might match the return type of a GCC
9433 builtin and then its argument prototype would still apply. */
9434#ifdef __cplusplus
9435extern "C"
9436#endif
9437char login ();
9438int
9439main ()
9440{
9441return login ();
9442 ;
9443 return 0;
9444}
9445_ACEOF
9446for ac_lib in '' util bsd; do
9447 if test -z "$ac_lib"; then
9448 ac_res="none required"
9449 else
9450 ac_res=-l$ac_lib
9451 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9452 fi
9453 if ac_fn_c_try_link "$LINENO"; then :
9454 ac_cv_search_login=$ac_res
9455fi
9456rm -f core conftest.err conftest.$ac_objext \
9457 conftest$ac_exeext
9458 if ${ac_cv_search_login+:} false; then :
9459 break
9460fi
9461done
9462if ${ac_cv_search_login+:} false; then :
9463
9464else
9465 ac_cv_search_login=no
9466fi
9467rm conftest.$ac_ext
9468LIBS=$ac_func_search_save_LIBS
9469fi
9470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_login" >&5
9471$as_echo "$ac_cv_search_login" >&6; }
9472ac_res=$ac_cv_search_login
9473if test "$ac_res" != no; then :
9474 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9475
9476fi
9477
9478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing logout" >&5
9479$as_echo_n "checking for library containing logout... " >&6; }
9480if ${ac_cv_search_logout+:} false; then :
9481 $as_echo_n "(cached) " >&6
9482else
9483 ac_func_search_save_LIBS=$LIBS
9484cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9485/* end confdefs.h. */
9486
9487/* Override any GCC internal prototype to avoid an error.
9488 Use char because int might match the return type of a GCC
9489 builtin and then its argument prototype would still apply. */
9490#ifdef __cplusplus
9491extern "C"
9492#endif
9493char logout ();
9494int
9495main ()
9496{
9497return logout ();
9498 ;
9499 return 0;
9500}
9501_ACEOF
9502for ac_lib in '' util bsd; do
9503 if test -z "$ac_lib"; then
9504 ac_res="none required"
9505 else
9506 ac_res=-l$ac_lib
9507 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9508 fi
9509 if ac_fn_c_try_link "$LINENO"; then :
9510 ac_cv_search_logout=$ac_res
9511fi
9512rm -f core conftest.err conftest.$ac_objext \
9513 conftest$ac_exeext
9514 if ${ac_cv_search_logout+:} false; then :
9515 break
9516fi
9517done
9518if ${ac_cv_search_logout+:} false; then :
9519
9520else
9521 ac_cv_search_logout=no
9522fi
9523rm conftest.$ac_ext
9524LIBS=$ac_func_search_save_LIBS
9525fi
9526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_logout" >&5
9527$as_echo "$ac_cv_search_logout" >&6; }
9528ac_res=$ac_cv_search_logout
9529if test "$ac_res" != no; then :
9530 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9531
9532fi
9533
9534{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing logwtmp" >&5
9535$as_echo_n "checking for library containing logwtmp... " >&6; }
9536if ${ac_cv_search_logwtmp+:} false; then :
9537 $as_echo_n "(cached) " >&6
9538else
9539 ac_func_search_save_LIBS=$LIBS
9540cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9541/* end confdefs.h. */
9542
9543/* Override any GCC internal prototype to avoid an error.
9544 Use char because int might match the return type of a GCC
9545 builtin and then its argument prototype would still apply. */
9546#ifdef __cplusplus
9547extern "C"
9548#endif
9549char logwtmp ();
9550int
9551main ()
9552{
9553return logwtmp ();
9554 ;
9555 return 0;
9556}
9557_ACEOF
9558for ac_lib in '' util bsd; do
9559 if test -z "$ac_lib"; then
9560 ac_res="none required"
9561 else
9562 ac_res=-l$ac_lib
9563 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9564 fi
9565 if ac_fn_c_try_link "$LINENO"; then :
9566 ac_cv_search_logwtmp=$ac_res
9567fi
9568rm -f core conftest.err conftest.$ac_objext \
9569 conftest$ac_exeext
9570 if ${ac_cv_search_logwtmp+:} false; then :
9571 break
9572fi
9573done
9574if ${ac_cv_search_logwtmp+:} false; then :
9575
9576else
9577 ac_cv_search_logwtmp=no
9578fi
9579rm conftest.$ac_ext
9580LIBS=$ac_func_search_save_LIBS
9581fi
9582{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_logwtmp" >&5
9583$as_echo "$ac_cv_search_logwtmp" >&6; }
9584ac_res=$ac_cv_search_logwtmp
9585if test "$ac_res" != no; then :
9586 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9587
9588fi
9589
9590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openpty" >&5
9591$as_echo_n "checking for library containing openpty... " >&6; }
9592if ${ac_cv_search_openpty+:} false; then :
9593 $as_echo_n "(cached) " >&6
9594else
9595 ac_func_search_save_LIBS=$LIBS
9596cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9597/* end confdefs.h. */
9598
9599/* Override any GCC internal prototype to avoid an error.
9600 Use char because int might match the return type of a GCC
9601 builtin and then its argument prototype would still apply. */
9602#ifdef __cplusplus
9603extern "C"
9604#endif
9605char openpty ();
9606int
9607main ()
9608{
9609return openpty ();
9610 ;
9611 return 0;
9612}
9613_ACEOF
9614for ac_lib in '' util bsd; do
9615 if test -z "$ac_lib"; then
9616 ac_res="none required"
9617 else
9618 ac_res=-l$ac_lib
9619 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9620 fi
9621 if ac_fn_c_try_link "$LINENO"; then :
9622 ac_cv_search_openpty=$ac_res
9623fi
9624rm -f core conftest.err conftest.$ac_objext \
9625 conftest$ac_exeext
9626 if ${ac_cv_search_openpty+:} false; then :
9627 break
9628fi
9629done
9630if ${ac_cv_search_openpty+:} false; then :
9631
9632else
9633 ac_cv_search_openpty=no
9634fi
9635rm conftest.$ac_ext
9636LIBS=$ac_func_search_save_LIBS
9637fi
9638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openpty" >&5
9639$as_echo "$ac_cv_search_openpty" >&6; }
9640ac_res=$ac_cv_search_openpty
9641if test "$ac_res" != no; then :
9642 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9643
9644fi
9645
9646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing updwtmp" >&5
9647$as_echo_n "checking for library containing updwtmp... " >&6; }
9648if ${ac_cv_search_updwtmp+:} false; then :
9649 $as_echo_n "(cached) " >&6
9650else
9651 ac_func_search_save_LIBS=$LIBS
9652cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9653/* end confdefs.h. */
9654
9655/* Override any GCC internal prototype to avoid an error.
9656 Use char because int might match the return type of a GCC
9657 builtin and then its argument prototype would still apply. */
9658#ifdef __cplusplus
9659extern "C"
9660#endif
9661char updwtmp ();
9662int
9663main ()
9664{
9665return updwtmp ();
9666 ;
9667 return 0;
9668}
9669_ACEOF
9670for ac_lib in '' util bsd; do
9671 if test -z "$ac_lib"; then
9672 ac_res="none required"
9673 else
9674 ac_res=-l$ac_lib
9675 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9676 fi
9677 if ac_fn_c_try_link "$LINENO"; then :
9678 ac_cv_search_updwtmp=$ac_res
9679fi
9680rm -f core conftest.err conftest.$ac_objext \
9681 conftest$ac_exeext
9682 if ${ac_cv_search_updwtmp+:} false; then :
9683 break
9684fi
9685done
9686if ${ac_cv_search_updwtmp+:} false; then :
9687
9688else
9689 ac_cv_search_updwtmp=no
9690fi
9691rm conftest.$ac_ext
9692LIBS=$ac_func_search_save_LIBS
9693fi
9694{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_updwtmp" >&5
9695$as_echo "$ac_cv_search_updwtmp" >&6; }
9696ac_res=$ac_cv_search_updwtmp
9697if test "$ac_res" != no; then :
9698 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9699
9700fi
9701
9702for ac_func in fmt_scaled scan_scaled login logout openpty updwtmp logwtmp
9703do :
9704 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9705ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9706if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9707 cat >>confdefs.h <<_ACEOF
9708#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9709_ACEOF
9710
9711fi
9712done
9713
9714
9715# On some platforms, inet_ntop and gethostbyname may be found in libresolv
9716# or libnsl.
9717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
9718$as_echo_n "checking for library containing inet_ntop... " >&6; }
9719if ${ac_cv_search_inet_ntop+:} false; then :
9720 $as_echo_n "(cached) " >&6
9721else
9722 ac_func_search_save_LIBS=$LIBS
9723cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9724/* end confdefs.h. */
9725
9726/* Override any GCC internal prototype to avoid an error.
9727 Use char because int might match the return type of a GCC
9728 builtin and then its argument prototype would still apply. */
9729#ifdef __cplusplus
9730extern "C"
9731#endif
9732char inet_ntop ();
9733int
9734main ()
9735{
9736return inet_ntop ();
9737 ;
9738 return 0;
9739}
9740_ACEOF
9741for ac_lib in '' resolv nsl; do
9742 if test -z "$ac_lib"; then
9743 ac_res="none required"
9744 else
9745 ac_res=-l$ac_lib
9746 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9747 fi
9748 if ac_fn_c_try_link "$LINENO"; then :
9749 ac_cv_search_inet_ntop=$ac_res
9750fi
9751rm -f core conftest.err conftest.$ac_objext \
9752 conftest$ac_exeext
9753 if ${ac_cv_search_inet_ntop+:} false; then :
9754 break
9755fi
9756done
9757if ${ac_cv_search_inet_ntop+:} false; then :
9758
9759else
9760 ac_cv_search_inet_ntop=no
9761fi
9762rm conftest.$ac_ext
9763LIBS=$ac_func_search_save_LIBS
9764fi
9765{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
9766$as_echo "$ac_cv_search_inet_ntop" >&6; }
9767ac_res=$ac_cv_search_inet_ntop
9768if test "$ac_res" != no; then :
9769 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9770
9771fi
9772
9773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
9774$as_echo_n "checking for library containing gethostbyname... " >&6; }
9775if ${ac_cv_search_gethostbyname+:} false; then :
9776 $as_echo_n "(cached) " >&6
9777else
9778 ac_func_search_save_LIBS=$LIBS
9779cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9780/* end confdefs.h. */
9781
9782/* Override any GCC internal prototype to avoid an error.
9783 Use char because int might match the return type of a GCC
9784 builtin and then its argument prototype would still apply. */
9785#ifdef __cplusplus
9786extern "C"
9787#endif
9788char gethostbyname ();
9789int
9790main ()
9791{
9792return gethostbyname ();
9793 ;
9794 return 0;
9795}
9796_ACEOF
9797for ac_lib in '' resolv nsl; do
9798 if test -z "$ac_lib"; then
9799 ac_res="none required"
9800 else
9801 ac_res=-l$ac_lib
9802 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9803 fi
9804 if ac_fn_c_try_link "$LINENO"; then :
9805 ac_cv_search_gethostbyname=$ac_res
9806fi
9807rm -f core conftest.err conftest.$ac_objext \
9808 conftest$ac_exeext
9809 if ${ac_cv_search_gethostbyname+:} false; then :
9810 break
9811fi
9812done
9813if ${ac_cv_search_gethostbyname+:} false; then :
9814
9815else
9816 ac_cv_search_gethostbyname=no
9817fi
9818rm conftest.$ac_ext
9819LIBS=$ac_func_search_save_LIBS
9820fi
9821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
9822$as_echo "$ac_cv_search_gethostbyname" >&6; }
9823ac_res=$ac_cv_search_gethostbyname
9824if test "$ac_res" != no; then :
9825 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9826
9827fi
9828
9829
9830# "Particular Function Checks"
9831# see https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Functions.html
9832for ac_func in strftime
9833do :
9834 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
9835if test "x$ac_cv_func_strftime" = xyes; then :
9836 cat >>confdefs.h <<_ACEOF
9837#define HAVE_STRFTIME 1
9838_ACEOF
9839
9840else
9841 # strftime is in -lintl on SCO UNIX.
9842{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
9843$as_echo_n "checking for strftime in -lintl... " >&6; }
9844if ${ac_cv_lib_intl_strftime+:} false; then :
9845 $as_echo_n "(cached) " >&6
9846else
9847 ac_check_lib_save_LIBS=$LIBS
9848LIBS="-lintl $LIBS"
9849cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9850/* end confdefs.h. */
9851
9852/* Override any GCC internal prototype to avoid an error.
9853 Use char because int might match the return type of a GCC
9854 builtin and then its argument prototype would still apply. */
9855#ifdef __cplusplus
9856extern "C"
9857#endif
9858char strftime ();
9859int
9860main ()
9861{
9862return strftime ();
9863 ;
9864 return 0;
9865}
9866_ACEOF
9867if ac_fn_c_try_link "$LINENO"; then :
9868 ac_cv_lib_intl_strftime=yes
9869else
9870 ac_cv_lib_intl_strftime=no
9871fi
9872rm -f core conftest.err conftest.$ac_objext \
9873 conftest$ac_exeext conftest.$ac_ext
9874LIBS=$ac_check_lib_save_LIBS
9875fi
9876{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
9877$as_echo "$ac_cv_lib_intl_strftime" >&6; }
9878if test "x$ac_cv_lib_intl_strftime" = xyes; then :
9879 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
9880
9881LIBS="-lintl $LIBS"
9882fi
9883
9884fi
9885done
9886
9887for ac_header in stdlib.h
9888do :
9889 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
9890if test "x$ac_cv_header_stdlib_h" = xyes; then :
9891 cat >>confdefs.h <<_ACEOF
9892#define HAVE_STDLIB_H 1
9893_ACEOF
9894
9895fi
9896
9897done
9898
9899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
9900$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
9901if ${ac_cv_func_malloc_0_nonnull+:} false; then :
9902 $as_echo_n "(cached) " >&6
9903else
9904 if test "$cross_compiling" = yes; then :
9905 ac_cv_func_malloc_0_nonnull=no
9906else
9907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9908/* end confdefs.h. */
9909#if defined STDC_HEADERS || defined HAVE_STDLIB_H
9910# include <stdlib.h>
9911#else
9912char *malloc ();
9913#endif
9914
9915int
9916main ()
9917{
9918return ! malloc (0);
9919 ;
9920 return 0;
9921}
9922_ACEOF
9923if ac_fn_c_try_run "$LINENO"; then :
9924 ac_cv_func_malloc_0_nonnull=yes
9925else
9926 ac_cv_func_malloc_0_nonnull=no
9927fi
9928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9929 conftest.$ac_objext conftest.beam conftest.$ac_ext
9930fi
9931
9932fi
9933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
9934$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
9935if test $ac_cv_func_malloc_0_nonnull = yes; then :
9936
9937$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
9938
9939else
9940 $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
9941
9942 case " $LIBOBJS " in
9943 *" malloc.$ac_objext "* ) ;;
9944 *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
9945 ;;
9946esac
9947
9948
9949$as_echo "#define malloc rpl_malloc" >>confdefs.h
9950
9951fi
9952
9953
9954for ac_header in stdlib.h
9955do :
9956 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
9957if test "x$ac_cv_header_stdlib_h" = xyes; then :
9958 cat >>confdefs.h <<_ACEOF
9959#define HAVE_STDLIB_H 1
9960_ACEOF
9961
9962fi
9963
9964done
9965
9966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
9967$as_echo_n "checking for GNU libc compatible realloc... " >&6; }
9968if ${ac_cv_func_realloc_0_nonnull+:} false; then :
9969 $as_echo_n "(cached) " >&6
9970else
9971 if test "$cross_compiling" = yes; then :
9972 ac_cv_func_realloc_0_nonnull=no
9973else
9974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9975/* end confdefs.h. */
9976#if defined STDC_HEADERS || defined HAVE_STDLIB_H
9977# include <stdlib.h>
9978#else
9979char *realloc ();
9980#endif
9981
9982int
9983main ()
9984{
9985return ! realloc (0, 0);
9986 ;
9987 return 0;
9988}
9989_ACEOF
9990if ac_fn_c_try_run "$LINENO"; then :
9991 ac_cv_func_realloc_0_nonnull=yes
9992else
9993 ac_cv_func_realloc_0_nonnull=no
9994fi
9995rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9996 conftest.$ac_objext conftest.beam conftest.$ac_ext
9997fi
9998
9999fi
10000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
10001$as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
10002if test $ac_cv_func_realloc_0_nonnull = yes; then :
10003
10004$as_echo "#define HAVE_REALLOC 1" >>confdefs.h
10005
10006else
10007 $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
10008
10009 case " $LIBOBJS " in
10010 *" realloc.$ac_objext "* ) ;;
10011 *) LIBOBJS="$LIBOBJS realloc.$ac_objext"
10012 ;;
10013esac
10014
10015
10016$as_echo "#define realloc rpl_realloc" >>confdefs.h
10017
10018fi
10019
10020
10021# autoconf doesn't have AC_FUNC_CALLOC so fake it if malloc returns NULL;
10022{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if calloc(0, N) returns non-null" >&5
10023$as_echo_n "checking if calloc(0, N) returns non-null... " >&6; }
10024if test "$cross_compiling" = yes; then :
10025 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming same as malloc" >&5
10026$as_echo "$as_me: WARNING: cross compiling: assuming same as malloc" >&2;}
10027 func_calloc_0_nonnull="$ac_cv_func_malloc_0_nonnull"
10028
10029else
10030 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10031/* end confdefs.h. */
10032 #include <stdlib.h>
10033int
10034main ()
10035{
10036 void *p = calloc(0, 1); exit(p == NULL);
10037
10038 ;
10039 return 0;
10040}
10041_ACEOF
10042if ac_fn_c_try_run "$LINENO"; then :
10043 func_calloc_0_nonnull=yes
10044else
10045 func_calloc_0_nonnull=no
10046fi
10047rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10048 conftest.$ac_objext conftest.beam conftest.$ac_ext
10049fi
10050
10051{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $func_calloc_0_nonnull" >&5
10052$as_echo "$func_calloc_0_nonnull" >&6; }
10053
10054if test "x$func_calloc_0_nonnull" = "xyes"; then
10055
10056$as_echo "#define HAVE_CALLOC 1" >>confdefs.h
10057
10058else
10059
10060$as_echo "#define HAVE_CALLOC 0" >>confdefs.h
10061
10062
10063$as_echo "#define calloc rpl_calloc" >>confdefs.h
10064
10065fi
10066
10067# Check for ALTDIRFUNC glob() extension
10068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_ALTDIRFUNC support" >&5
10069$as_echo_n "checking for GLOB_ALTDIRFUNC support... " >&6; }
10070cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10071/* end confdefs.h. */
10072
10073 #include <glob.h>
10074 #ifdef GLOB_ALTDIRFUNC
10075 FOUNDIT
10076 #endif
10077
10078_ACEOF
10079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10080 $EGREP "FOUNDIT" >/dev/null 2>&1; then :
10081
10082
10083$as_echo "#define GLOB_HAS_ALTDIRFUNC 1" >>confdefs.h
10084
10085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10086$as_echo "yes" >&6; }
10087
10088else
10089
10090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10091$as_echo "no" >&6; }
10092
10093
10094fi
10095rm -f conftest*
10096
10097
10098# Check for g.gl_matchc glob() extension
10099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_matchc field in glob_t" >&5
10100$as_echo_n "checking for gl_matchc field in glob_t... " >&6; }
10101cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10102/* end confdefs.h. */
10103 #include <glob.h>
10104int
10105main ()
10106{
10107 glob_t g; g.gl_matchc = 1;
10108 ;
10109 return 0;
10110}
10111_ACEOF
10112if ac_fn_c_try_compile "$LINENO"; then :
10113
10114
10115$as_echo "#define GLOB_HAS_GL_MATCHC 1" >>confdefs.h
10116
10117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10118$as_echo "yes" >&6; }
10119
10120else
10121
10122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10123$as_echo "no" >&6; }
10124
10125fi
10126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10127
10128# Check for g.gl_statv glob() extension
10129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_statv and GLOB_KEEPSTAT extensions for glob" >&5
10130$as_echo_n "checking for gl_statv and GLOB_KEEPSTAT extensions for glob... " >&6; }
10131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10132/* end confdefs.h. */
10133 #include <glob.h>
10134int
10135main ()
10136{
10137
10138#ifndef GLOB_KEEPSTAT
10139#error "glob does not support GLOB_KEEPSTAT extension"
10140#endif
10141glob_t g;
10142g.gl_statv = NULL;
10143
10144 ;
10145 return 0;
10146}
10147_ACEOF
10148if ac_fn_c_try_compile "$LINENO"; then :
10149
10150
10151$as_echo "#define GLOB_HAS_GL_STATV 1" >>confdefs.h
10152
10153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10154$as_echo "yes" >&6; }
10155
10156else
10157
10158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10159$as_echo "no" >&6; }
10160
10161
10162fi
10163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10164
10165ac_fn_c_check_decl "$LINENO" "GLOB_NOMATCH" "ac_cv_have_decl_GLOB_NOMATCH" "#include <glob.h>
10166"
10167if test "x$ac_cv_have_decl_GLOB_NOMATCH" = xyes; then :
10168 ac_have_decl=1
10169else
10170 ac_have_decl=0
10171fi
10172
10173cat >>confdefs.h <<_ACEOF
10174#define HAVE_DECL_GLOB_NOMATCH $ac_have_decl
10175_ACEOF
10176
10177
10178ac_fn_c_check_decl "$LINENO" "VIS_ALL" "ac_cv_have_decl_VIS_ALL" "#include <vis.h>
10179"
10180if test "x$ac_cv_have_decl_VIS_ALL" = xyes; then :
10181
10182else
10183
10184$as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
10185
10186fi
10187
10188
10189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct dirent allocates space for d_name" >&5
10190$as_echo_n "checking whether struct dirent allocates space for d_name... " >&6; }
10191if test "$cross_compiling" = yes; then :
10192
10193 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&5
10194$as_echo "$as_me: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&2;}
10195 $as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
10196
10197
10198
10199else
10200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10201/* end confdefs.h. */
10202
10203#include <sys/types.h>
10204#include <dirent.h>
10205int
10206main ()
10207{
10208
10209 struct dirent d;
10210 exit(sizeof(d.d_name)<=sizeof(char));
10211
10212 ;
10213 return 0;
10214}
10215_ACEOF
10216if ac_fn_c_try_run "$LINENO"; then :
10217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10218$as_echo "yes" >&6; }
10219else
10220
10221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10222$as_echo "no" >&6; }
10223
10224$as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
10225
10226
10227fi
10228rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10229 conftest.$ac_objext conftest.beam conftest.$ac_ext
10230fi
10231
10232
10233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /proc/pid/fd directory" >&5
10234$as_echo_n "checking for /proc/pid/fd directory... " >&6; }
10235if test -d "/proc/$$/fd" ; then
10236
10237$as_echo "#define HAVE_PROC_PID 1" >>confdefs.h
10238
10239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10240$as_echo "yes" >&6; }
10241else
10242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10243$as_echo "no" >&6; }
10244fi
10245
10246# Check whether user wants to use ldns
10247LDNS_MSG="no"
10248
10249# Check whether --with-ldns was given.
10250if test "${with_ldns+set}" = set; then :
10251 withval=$with_ldns;
10252 ldns=""
10253 if test "x$withval" = "xyes" ; then
10254 if test -n "$ac_tool_prefix"; then
10255 # Extract the first word of "${ac_tool_prefix}ldns-config", so it can be a program name with args.
10256set dummy ${ac_tool_prefix}ldns-config; ac_word=$2
10257{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10258$as_echo_n "checking for $ac_word... " >&6; }
10259if ${ac_cv_path_LDNSCONFIG+:} false; then :
10260 $as_echo_n "(cached) " >&6
10261else
10262 case $LDNSCONFIG in
10263 [\\/]* | ?:[\\/]*)
10264 ac_cv_path_LDNSCONFIG="$LDNSCONFIG" # Let the user override the test with a path.
10265 ;;
10266 *)
10267 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10268for as_dir in $PATH
10269do
10270 IFS=$as_save_IFS
10271 test -z "$as_dir" && as_dir=.
10272 for ac_exec_ext in '' $ac_executable_extensions; do
10273 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10274 ac_cv_path_LDNSCONFIG="$as_dir/$ac_word$ac_exec_ext"
10275 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10276 break 2
10277 fi
10278done
10279 done
10280IFS=$as_save_IFS
10281
10282 ;;
10283esac
10284fi
10285LDNSCONFIG=$ac_cv_path_LDNSCONFIG
10286if test -n "$LDNSCONFIG"; then
10287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDNSCONFIG" >&5
10288$as_echo "$LDNSCONFIG" >&6; }
10289else
10290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10291$as_echo "no" >&6; }
10292fi
10293
10294
10295fi
10296if test -z "$ac_cv_path_LDNSCONFIG"; then
10297 ac_pt_LDNSCONFIG=$LDNSCONFIG
10298 # Extract the first word of "ldns-config", so it can be a program name with args.
10299set dummy ldns-config; ac_word=$2
10300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10301$as_echo_n "checking for $ac_word... " >&6; }
10302if ${ac_cv_path_ac_pt_LDNSCONFIG+:} false; then :
10303 $as_echo_n "(cached) " >&6
10304else
10305 case $ac_pt_LDNSCONFIG in
10306 [\\/]* | ?:[\\/]*)
10307 ac_cv_path_ac_pt_LDNSCONFIG="$ac_pt_LDNSCONFIG" # Let the user override the test with a path.
10308 ;;
10309 *)
10310 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10311for as_dir in $PATH
10312do
10313 IFS=$as_save_IFS
10314 test -z "$as_dir" && as_dir=.
10315 for ac_exec_ext in '' $ac_executable_extensions; do
10316 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10317 ac_cv_path_ac_pt_LDNSCONFIG="$as_dir/$ac_word$ac_exec_ext"
10318 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10319 break 2
10320 fi
10321done
10322 done
10323IFS=$as_save_IFS
10324
10325 ;;
10326esac
10327fi
10328ac_pt_LDNSCONFIG=$ac_cv_path_ac_pt_LDNSCONFIG
10329if test -n "$ac_pt_LDNSCONFIG"; then
10330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LDNSCONFIG" >&5
10331$as_echo "$ac_pt_LDNSCONFIG" >&6; }
10332else
10333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10334$as_echo "no" >&6; }
10335fi
10336
10337 if test "x$ac_pt_LDNSCONFIG" = x; then
10338 LDNSCONFIG="no"
10339 else
10340 case $cross_compiling:$ac_tool_warned in
10341yes:)
10342{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10343$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10344ac_tool_warned=yes ;;
10345esac
10346 LDNSCONFIG=$ac_pt_LDNSCONFIG
10347 fi
10348else
10349 LDNSCONFIG="$ac_cv_path_LDNSCONFIG"
10350fi
10351
10352 if test "x$LDNSCONFIG" = "xno"; then
10353 CPPFLAGS="$CPPFLAGS -I${withval}/include"
10354 LDFLAGS="$LDFLAGS -L${withval}/lib"
10355 LIBS="-lldns $LIBS"
10356 ldns=yes
10357 else
10358 LIBS="$LIBS `$LDNSCONFIG --libs`"
10359 CPPFLAGS="$CPPFLAGS `$LDNSCONFIG --cflags`"
10360 ldns=yes
10361 fi
10362 elif test "x$withval" != "xno" ; then
10363 CPPFLAGS="$CPPFLAGS -I${withval}/include"
10364 LDFLAGS="$LDFLAGS -L${withval}/lib"
10365 LIBS="-lldns $LIBS"
10366 ldns=yes
10367 fi
10368
10369 # Verify that it works.
10370 if test "x$ldns" = "xyes" ; then
10371
10372$as_echo "#define HAVE_LDNS 1" >>confdefs.h
10373
10374 LDNS_MSG="yes"
10375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldns support" >&5
10376$as_echo_n "checking for ldns support... " >&6; }
10377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10378/* end confdefs.h. */
10379
10380#include <stdio.h>
10381#include <stdlib.h>
10382#include <stdint.h>
10383#include <ldns/ldns.h>
10384int main() { ldns_status status = ldns_verify_trusted(NULL, NULL, NULL, NULL); status=LDNS_STATUS_OK; exit(0); }
10385
10386
10387_ACEOF
10388if ac_fn_c_try_link "$LINENO"; then :
10389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10390$as_echo "yes" >&6; }
10391else
10392
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10394$as_echo "no" >&6; }
10395 as_fn_error $? "** Incomplete or missing ldns libraries." "$LINENO" 5
10396
10397fi
10398rm -f core conftest.err conftest.$ac_objext \
10399 conftest$ac_exeext conftest.$ac_ext
10400 fi
10401
10402fi
10403
10404
10405# Check whether user wants libedit support
10406LIBEDIT_MSG="no"
10407
10408# Check whether --with-libedit was given.
10409if test "${with_libedit+set}" = set; then :
10410 withval=$with_libedit; if test "x$withval" != "xno" ; then
10411 if test "x$withval" = "xyes" ; then
10412 if test -n "$ac_tool_prefix"; then
10413 # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10414set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10416$as_echo_n "checking for $ac_word... " >&6; }
10417if ${ac_cv_path_PKGCONFIG+:} false; then :
10418 $as_echo_n "(cached) " >&6
10419else
10420 case $PKGCONFIG in
10421 [\\/]* | ?:[\\/]*)
10422 ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
10423 ;;
10424 *)
10425 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10426for as_dir in $PATH
10427do
10428 IFS=$as_save_IFS
10429 test -z "$as_dir" && as_dir=.
10430 for ac_exec_ext in '' $ac_executable_extensions; do
10431 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10432 ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
10433 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10434 break 2
10435 fi
10436done
10437 done
10438IFS=$as_save_IFS
10439
10440 ;;
10441esac
10442fi
10443PKGCONFIG=$ac_cv_path_PKGCONFIG
10444if test -n "$PKGCONFIG"; then
10445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
10446$as_echo "$PKGCONFIG" >&6; }
10447else
10448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10449$as_echo "no" >&6; }
10450fi
10451
10452
10453fi
10454if test -z "$ac_cv_path_PKGCONFIG"; then
10455 ac_pt_PKGCONFIG=$PKGCONFIG
10456 # Extract the first word of "pkg-config", so it can be a program name with args.
10457set dummy pkg-config; ac_word=$2
10458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10459$as_echo_n "checking for $ac_word... " >&6; }
10460if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
10461 $as_echo_n "(cached) " >&6
10462else
10463 case $ac_pt_PKGCONFIG in
10464 [\\/]* | ?:[\\/]*)
10465 ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
10466 ;;
10467 *)
10468 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10469for as_dir in $PATH
10470do
10471 IFS=$as_save_IFS
10472 test -z "$as_dir" && as_dir=.
10473 for ac_exec_ext in '' $ac_executable_extensions; do
10474 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10475 ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
10476 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10477 break 2
10478 fi
10479done
10480 done
10481IFS=$as_save_IFS
10482
10483 ;;
10484esac
10485fi
10486ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
10487if test -n "$ac_pt_PKGCONFIG"; then
10488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
10489$as_echo "$ac_pt_PKGCONFIG" >&6; }
10490else
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10492$as_echo "no" >&6; }
10493fi
10494
10495 if test "x$ac_pt_PKGCONFIG" = x; then
10496 PKGCONFIG="no"
10497 else
10498 case $cross_compiling:$ac_tool_warned in
10499yes:)
10500{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10501$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10502ac_tool_warned=yes ;;
10503esac
10504 PKGCONFIG=$ac_pt_PKGCONFIG
10505 fi
10506else
10507 PKGCONFIG="$ac_cv_path_PKGCONFIG"
10508fi
10509
10510 if test "x$PKGCONFIG" != "xno"; then
10511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PKGCONFIG knows about libedit" >&5
10512$as_echo_n "checking if $PKGCONFIG knows about libedit... " >&6; }
10513 if "$PKGCONFIG" libedit; then
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10515$as_echo "yes" >&6; }
10516 use_pkgconfig_for_libedit=yes
10517 else
10518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10519$as_echo "no" >&6; }
10520 fi
10521 fi
10522 else
10523 CPPFLAGS="$CPPFLAGS -I${withval}/include"
10524 if test -n "${rpath_opt}"; then
10525 LDFLAGS="-L${withval}/lib ${rpath_opt}${withval}/lib ${LDFLAGS}"
10526 else
10527 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
10528 fi
10529 fi
10530 if test "x$use_pkgconfig_for_libedit" = "xyes"; then
10531 LIBEDIT=`$PKGCONFIG --libs libedit`
10532 CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libedit`"
10533 else
10534 LIBEDIT="-ledit -lcurses"
10535 fi
10536 OTHERLIBS=`echo $LIBEDIT | sed 's/-ledit//'`
10537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_init in -ledit" >&5
10538$as_echo_n "checking for el_init in -ledit... " >&6; }
10539if ${ac_cv_lib_edit_el_init+:} false; then :
10540 $as_echo_n "(cached) " >&6
10541else
10542 ac_check_lib_save_LIBS=$LIBS
10543LIBS="-ledit $OTHERLIBS
10544 $LIBS"
10545cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10546/* end confdefs.h. */
10547
10548/* Override any GCC internal prototype to avoid an error.
10549 Use char because int might match the return type of a GCC
10550 builtin and then its argument prototype would still apply. */
10551#ifdef __cplusplus
10552extern "C"
10553#endif
10554char el_init ();
10555int
10556main ()
10557{
10558return el_init ();
10559 ;
10560 return 0;
10561}
10562_ACEOF
10563if ac_fn_c_try_link "$LINENO"; then :
10564 ac_cv_lib_edit_el_init=yes
10565else
10566 ac_cv_lib_edit_el_init=no
10567fi
10568rm -f core conftest.err conftest.$ac_objext \
10569 conftest$ac_exeext conftest.$ac_ext
10570LIBS=$ac_check_lib_save_LIBS
10571fi
10572{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_el_init" >&5
10573$as_echo "$ac_cv_lib_edit_el_init" >&6; }
10574if test "x$ac_cv_lib_edit_el_init" = xyes; then :
10575
10576$as_echo "#define USE_LIBEDIT 1" >>confdefs.h
10577
10578 LIBEDIT_MSG="yes"
10579
10580
10581else
10582 as_fn_error $? "libedit not found" "$LINENO" 5
10583fi
10584
10585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libedit version is compatible" >&5
10586$as_echo_n "checking if libedit version is compatible... " >&6; }
10587 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10588/* end confdefs.h. */
10589 #include <histedit.h>
10590int
10591main ()
10592{
10593
10594 int i = H_SETSIZE;
10595 el_init("", NULL, NULL, NULL);
10596 exit(0);
10597
10598 ;
10599 return 0;
10600}
10601_ACEOF
10602if ac_fn_c_try_compile "$LINENO"; then :
10603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10604$as_echo "yes" >&6; }
10605else
10606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10607$as_echo "no" >&6; }
10608 as_fn_error $? "libedit version is not compatible" "$LINENO" 5
10609
10610fi
10611rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10612 fi
10613
10614fi
10615
10616
10617AUDIT_MODULE=none
10618
10619# Check whether --with-audit was given.
10620if test "${with_audit+set}" = set; then :
10621 withval=$with_audit;
10622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported audit module" >&5
10623$as_echo_n "checking for supported audit module... " >&6; }
10624 case "$withval" in
10625 bsm)
10626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bsm" >&5
10627$as_echo "bsm" >&6; }
10628 AUDIT_MODULE=bsm
10629 for ac_header in bsm/audit.h
10630do :
10631 ac_fn_c_check_header_compile "$LINENO" "bsm/audit.h" "ac_cv_header_bsm_audit_h" "
10632#ifdef HAVE_TIME_H
10633# include <time.h>
10634#endif
10635
10636
10637"
10638if test "x$ac_cv_header_bsm_audit_h" = xyes; then :
10639 cat >>confdefs.h <<_ACEOF
10640#define HAVE_BSM_AUDIT_H 1
10641_ACEOF
10642
10643else
10644 as_fn_error $? "BSM enabled and bsm/audit.h not found" "$LINENO" 5
10645fi
10646
10647done
10648
10649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaudit in -lbsm" >&5
10650$as_echo_n "checking for getaudit in -lbsm... " >&6; }
10651if ${ac_cv_lib_bsm_getaudit+:} false; then :
10652 $as_echo_n "(cached) " >&6
10653else
10654 ac_check_lib_save_LIBS=$LIBS
10655LIBS="-lbsm $LIBS"
10656cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10657/* end confdefs.h. */
10658
10659/* Override any GCC internal prototype to avoid an error.
10660 Use char because int might match the return type of a GCC
10661 builtin and then its argument prototype would still apply. */
10662#ifdef __cplusplus
10663extern "C"
10664#endif
10665char getaudit ();
10666int
10667main ()
10668{
10669return getaudit ();
10670 ;
10671 return 0;
10672}
10673_ACEOF
10674if ac_fn_c_try_link "$LINENO"; then :
10675 ac_cv_lib_bsm_getaudit=yes
10676else
10677 ac_cv_lib_bsm_getaudit=no
10678fi
10679rm -f core conftest.err conftest.$ac_objext \
10680 conftest$ac_exeext conftest.$ac_ext
10681LIBS=$ac_check_lib_save_LIBS
10682fi
10683{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsm_getaudit" >&5
10684$as_echo "$ac_cv_lib_bsm_getaudit" >&6; }
10685if test "x$ac_cv_lib_bsm_getaudit" = xyes; then :
10686 cat >>confdefs.h <<_ACEOF
10687#define HAVE_LIBBSM 1
10688_ACEOF
10689
10690 LIBS="-lbsm $LIBS"
10691
10692else
10693 as_fn_error $? "BSM enabled and required library not found" "$LINENO" 5
10694fi
10695
10696 for ac_func in getaudit
10697do :
10698 ac_fn_c_check_func "$LINENO" "getaudit" "ac_cv_func_getaudit"
10699if test "x$ac_cv_func_getaudit" = xyes; then :
10700 cat >>confdefs.h <<_ACEOF
10701#define HAVE_GETAUDIT 1
10702_ACEOF
10703
10704else
10705 as_fn_error $? "BSM enabled and required function not found" "$LINENO" 5
10706fi
10707done
10708
10709 # These are optional
10710 for ac_func in getaudit_addr aug_get_machine
10711do :
10712 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10713ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10714if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10715 cat >>confdefs.h <<_ACEOF
10716#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10717_ACEOF
10718
10719fi
10720done
10721
10722
10723$as_echo "#define USE_BSM_AUDIT 1" >>confdefs.h
10724
10725 if test "$sol2ver" -ge 11; then
10726 SSHDLIBS="$SSHDLIBS -lscf"
10727
10728$as_echo "#define BROKEN_BSM_API 1" >>confdefs.h
10729
10730 fi
10731 ;;
10732 linux)
10733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux" >&5
10734$as_echo "linux" >&6; }
10735 AUDIT_MODULE=linux
10736 for ac_header in libaudit.h
10737do :
10738 ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
10739if test "x$ac_cv_header_libaudit_h" = xyes; then :
10740 cat >>confdefs.h <<_ACEOF
10741#define HAVE_LIBAUDIT_H 1
10742_ACEOF
10743
10744fi
10745
10746done
10747
10748 SSHDLIBS="$SSHDLIBS -laudit"
10749
10750$as_echo "#define USE_LINUX_AUDIT 1" >>confdefs.h
10751
10752 ;;
10753 debug)
10754 AUDIT_MODULE=debug
10755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: debug" >&5
10756$as_echo "debug" >&6; }
10757
10758$as_echo "#define SSH_AUDIT_EVENTS 1" >>confdefs.h
10759
10760 ;;
10761 no)
10762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10763$as_echo "no" >&6; }
10764 ;;
10765 *)
10766 as_fn_error $? "Unknown audit module $withval" "$LINENO" 5
10767 ;;
10768 esac
10769
10770fi
10771
10772
10773
10774# Check whether --with-pie was given.
10775if test "${with_pie+set}" = set; then :
10776 withval=$with_pie;
10777 if test "x$withval" = "xno"; then
10778 use_pie=no
10779 fi
10780 if test "x$withval" = "xyes"; then
10781 use_pie=yes
10782 fi
10783
10784
10785fi
10786
10787if test "x$use_pie" = "x"; then
10788 use_pie=no
10789fi
10790if test "x$use_toolchain_hardening" != "x1" && test "x$use_pie" = "xauto"; then
10791 # Turn off automatic PIE when toolchain hardening is off.
10792 use_pie=no
10793fi
10794if test "x$use_pie" = "xauto"; then
10795 # Automatic PIE requires gcc >= 4.x
10796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc >= 4.x" >&5
10797$as_echo_n "checking for gcc >= 4.x... " >&6; }
10798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10799/* end confdefs.h. */
10800
10801#if !defined(__GNUC__) || __GNUC__ < 4
10802#error gcc is too old
10803#endif
10804
10805_ACEOF
10806if ac_fn_c_try_compile "$LINENO"; then :
10807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10808$as_echo "yes" >&6; }
10809else
10810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10811$as_echo "no" >&6; }
10812 use_pie=no
10813
10814fi
10815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10816fi
10817if test "x$use_pie" != "xno"; then
10818 SAVED_CFLAGS="$CFLAGS"
10819 SAVED_LDFLAGS="$LDFLAGS"
10820 {
10821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -fPIE" >&5
10822$as_echo_n "checking if $CC supports compile flag -fPIE... " >&6; }
10823 saved_CFLAGS="$CFLAGS"
10824 CFLAGS="$CFLAGS $WERROR -fPIE"
10825 _define_flag=""
10826 test "x$_define_flag" = "x" && _define_flag="-fPIE"
10827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10828/* end confdefs.h. */
10829
10830#include <stdlib.h>
10831#include <stdio.h>
10832int main(int argc, char **argv) {
10833 /* Some math to catch -ftrapv problems in the toolchain */
10834 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
10835 float l = i * 2.1;
10836 double m = l / 0.5;
10837 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
10838 printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
10839 exit(0);
10840}
10841
10842_ACEOF
10843if ac_fn_c_try_compile "$LINENO"; then :
10844
10845if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
10846then
10847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10848$as_echo "no" >&6; }
10849 CFLAGS="$saved_CFLAGS"
10850else
10851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10852$as_echo "yes" >&6; }
10853 CFLAGS="$saved_CFLAGS $_define_flag"
10854fi
10855else
10856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10857$as_echo "no" >&6; }
10858 CFLAGS="$saved_CFLAGS"
10859
10860fi
10861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10862}
10863 {
10864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -pie" >&5
10865$as_echo_n "checking if $LD supports link flag -pie... " >&6; }
10866 saved_LDFLAGS="$LDFLAGS"
10867 LDFLAGS="$LDFLAGS $WERROR -pie"
10868 _define_flag=""
10869 test "x$_define_flag" = "x" && _define_flag="-pie"
10870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10871/* end confdefs.h. */
10872
10873#include <stdlib.h>
10874#include <stdio.h>
10875int main(int argc, char **argv) {
10876 /* Some math to catch -ftrapv problems in the toolchain */
10877 int i = 123 * argc, j = 456 + argc, k = 789 - argc;
10878 float l = i * 2.1;
10879 double m = l / 0.5;
10880 long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
10881 long long p = n * o;
10882 printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
10883 exit(0);
10884}
10885
10886_ACEOF
10887if ac_fn_c_try_link "$LINENO"; then :
10888
10889if $ac_cv_path_EGREP -i "unrecognized option|warning.*ignored" conftest.err >/dev/null
10890then
10891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10892$as_echo "no" >&6; }
10893 LDFLAGS="$saved_LDFLAGS"
10894else
10895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10896$as_echo "yes" >&6; }
10897 LDFLAGS="$saved_LDFLAGS $_define_flag"
10898fi
10899else
10900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10901$as_echo "no" >&6; }
10902 LDFLAGS="$saved_LDFLAGS"
10903
10904fi
10905rm -f core conftest.err conftest.$ac_objext \
10906 conftest$ac_exeext conftest.$ac_ext
10907}
10908 # We use both -fPIE and -pie or neither.
10909 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether both -fPIE and -pie are supported" >&5
10910$as_echo_n "checking whether both -fPIE and -pie are supported... " >&6; }
10911 if echo "x $CFLAGS" | grep ' -fPIE' >/dev/null 2>&1 && \
10912 echo "x $LDFLAGS" | grep ' -pie' >/dev/null 2>&1 ; then
10913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10914$as_echo "yes" >&6; }
10915 else
10916 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10917$as_echo "no" >&6; }
10918 CFLAGS="$SAVED_CFLAGS"
10919 LDFLAGS="$SAVED_LDFLAGS"
10920 fi
10921fi
10922
10923for ac_func in \
10924 Blowfish_initstate \
10925 Blowfish_expandstate \
10926 Blowfish_expand0state \
10927 Blowfish_stream2word \
10928 SHA256Update \
10929 SHA384Update \
10930 SHA512Update \
10931 asprintf \
10932 b64_ntop \
10933 __b64_ntop \
10934 b64_pton \
10935 __b64_pton \
10936 bcopy \
10937 bcrypt_pbkdf \
10938 bindresvport_sa \
10939 blf_enc \
10940 bzero \
10941 cap_rights_limit \
10942 clock \
10943 closefrom \
10944 dirfd \
10945 endgrent \
10946 err \
10947 errx \
10948 explicit_bzero \
10949 fchmod \
10950 fchmodat \
10951 fchown \
10952 fchownat \
10953 flock \
10954 freeaddrinfo \
10955 freezero \
10956 fstatfs \
10957 fstatvfs \
10958 futimes \
10959 getaddrinfo \
10960 getcwd \
10961 getgrouplist \
10962 getline \
10963 getnameinfo \
10964 getopt \
10965 getpagesize \
10966 getpeereid \
10967 getpeerucred \
10968 getpgid \
10969 _getpty \
10970 getrlimit \
10971 getrandom \
10972 getsid \
10973 getttyent \
10974 glob \
10975 group_from_gid \
10976 inet_aton \
10977 inet_ntoa \
10978 inet_ntop \
10979 innetgr \
10980 llabs \
10981 login_getcapbool \
10982 md5_crypt \
10983 memmem \
10984 memmove \
10985 memset_s \
10986 mkdtemp \
10987 ngetaddrinfo \
10988 nsleep \
10989 ogetaddrinfo \
10990 openlog_r \
10991 pledge \
10992 poll \
10993 prctl \
10994 pstat \
10995 raise \
10996 readpassphrase \
10997 reallocarray \
10998 recvmsg \
10999 recallocarray \
11000 rresvport_af \
11001 sendmsg \
11002 setdtablesize \
11003 setegid \
11004 setenv \
11005 seteuid \
11006 setgroupent \
11007 setgroups \
11008 setlinebuf \
11009 setlogin \
11010 setpassent\
11011 setpcred \
11012 setproctitle \
11013 setregid \
11014 setreuid \
11015 setrlimit \
11016 setsid \
11017 setvbuf \
11018 sigaction \
11019 sigvec \
11020 snprintf \
11021 socketpair \
11022 statfs \
11023 statvfs \
11024 strcasestr \
11025 strdup \
11026 strerror \
11027 strlcat \
11028 strlcpy \
11029 strmode \
11030 strndup \
11031 strnlen \
11032 strnvis \
11033 strptime \
11034 strsignal \
11035 strtonum \
11036 strtoll \
11037 strtoul \
11038 strtoull \
11039 swap32 \
11040 sysconf \
11041 tcgetpgrp \
11042 timingsafe_bcmp \
11043 truncate \
11044 unsetenv \
11045 updwtmpx \
11046 utimensat \
11047 user_from_uid \
11048 usleep \
11049 vasprintf \
11050 vsnprintf \
11051 waitpid \
11052 warn \
11053
11054do :
11055 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11056ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11057if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11058 cat >>confdefs.h <<_ACEOF
11059#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11060_ACEOF
11061
11062fi
11063done
11064
11065
11066ac_fn_c_check_decl "$LINENO" "bzero" "ac_cv_have_decl_bzero" "$ac_includes_default"
11067if test "x$ac_cv_have_decl_bzero" = xyes; then :
11068 ac_have_decl=1
11069else
11070 ac_have_decl=0
11071fi
11072
11073cat >>confdefs.h <<_ACEOF
11074#define HAVE_DECL_BZERO $ac_have_decl
11075_ACEOF
11076
11077
11078for ac_func in mblen mbtowc nl_langinfo wcwidth
11079do :
11080 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11081ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11082if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11083 cat >>confdefs.h <<_ACEOF
11084#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11085_ACEOF
11086
11087fi
11088done
11089
11090
11091TEST_SSH_UTF8=${TEST_SSH_UTF8:=yes}
11092{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for utf8 locale support" >&5
11093$as_echo_n "checking for utf8 locale support... " >&6; }
11094if test "$cross_compiling" = yes; then :
11095 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
11096$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
11097
11098else
11099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11100/* end confdefs.h. */
11101
11102#include <locale.h>
11103#include <stdlib.h>
11104
11105int
11106main ()
11107{
11108
11109 char *loc = setlocale(LC_CTYPE, "en_US.UTF-8");
11110 if (loc != NULL)
11111 exit(0);
11112 exit(1);
11113
11114 ;
11115 return 0;
11116}
11117_ACEOF
11118if ac_fn_c_try_run "$LINENO"; then :
11119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11120$as_echo "yes" >&6; }
11121else
11122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11123$as_echo "no" >&6; }
11124 TEST_SSH_UTF8=no
11125fi
11126rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11127 conftest.$ac_objext conftest.beam conftest.$ac_ext
11128fi
11129
11130
11131cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11132/* end confdefs.h. */
11133 #include <ctype.h>
11134int
11135main ()
11136{
11137 return (isblank('a'));
11138 ;
11139 return 0;
11140}
11141_ACEOF
11142if ac_fn_c_try_link "$LINENO"; then :
11143
11144$as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
11145
11146
11147fi
11148rm -f core conftest.err conftest.$ac_objext \
11149 conftest$ac_exeext conftest.$ac_ext
11150
11151disable_pkcs11=
11152# Check whether --enable-pkcs11 was given.
11153if test "${enable_pkcs11+set}" = set; then :
11154 enableval=$enable_pkcs11;
11155 if test "x$enableval" = "xno" ; then
11156 disable_pkcs11=1
11157 fi
11158
11159
11160fi
11161
11162
11163# PKCS11 depends on OpenSSL.
11164if test "x$openssl" = "xyes" && test "x$disable_pkcs11" = "x"; then
11165 # PKCS#11 support requires dlopen() and co
11166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11167$as_echo_n "checking for library containing dlopen... " >&6; }
11168if ${ac_cv_search_dlopen+:} false; then :
11169 $as_echo_n "(cached) " >&6
11170else
11171 ac_func_search_save_LIBS=$LIBS
11172cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11173/* end confdefs.h. */
11174
11175/* Override any GCC internal prototype to avoid an error.
11176 Use char because int might match the return type of a GCC
11177 builtin and then its argument prototype would still apply. */
11178#ifdef __cplusplus
11179extern "C"
11180#endif
11181char dlopen ();
11182int
11183main ()
11184{
11185return dlopen ();
11186 ;
11187 return 0;
11188}
11189_ACEOF
11190for ac_lib in '' dl; do
11191 if test -z "$ac_lib"; then
11192 ac_res="none required"
11193 else
11194 ac_res=-l$ac_lib
11195 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11196 fi
11197 if ac_fn_c_try_link "$LINENO"; then :
11198 ac_cv_search_dlopen=$ac_res
11199fi
11200rm -f core conftest.err conftest.$ac_objext \
11201 conftest$ac_exeext
11202 if ${ac_cv_search_dlopen+:} false; then :
11203 break
11204fi
11205done
11206if ${ac_cv_search_dlopen+:} false; then :
11207
11208else
11209 ac_cv_search_dlopen=no
11210fi
11211rm conftest.$ac_ext
11212LIBS=$ac_func_search_save_LIBS
11213fi
11214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11215$as_echo "$ac_cv_search_dlopen" >&6; }
11216ac_res=$ac_cv_search_dlopen
11217if test "$ac_res" != no; then :
11218 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11219 ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
11220
11221"
11222if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
11223
11224$as_echo "#define ENABLE_PKCS11 /**/" >>confdefs.h
11225
11226fi
11227
11228
11229fi
11230
11231fi
11232
11233# IRIX has a const char return value for gai_strerror()
11234for ac_func in gai_strerror
11235do :
11236 ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror"
11237if test "x$ac_cv_func_gai_strerror" = xyes; then :
11238 cat >>confdefs.h <<_ACEOF
11239#define HAVE_GAI_STRERROR 1
11240_ACEOF
11241
11242 $as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h
11243
11244 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11245/* end confdefs.h. */
11246
11247#include <sys/types.h>
11248#include <sys/socket.h>
11249#include <netdb.h>
11250
11251const char *gai_strerror(int);
11252
11253int
11254main ()
11255{
11256
11257 char *str;
11258 str = gai_strerror(0);
11259
11260 ;
11261 return 0;
11262}
11263_ACEOF
11264if ac_fn_c_try_compile "$LINENO"; then :
11265
11266
11267$as_echo "#define HAVE_CONST_GAI_STRERROR_PROTO 1" >>confdefs.h
11268
11269fi
11270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11271fi
11272done
11273
11274
11275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
11276$as_echo_n "checking for library containing nanosleep... " >&6; }
11277if ${ac_cv_search_nanosleep+:} false; then :
11278 $as_echo_n "(cached) " >&6
11279else
11280 ac_func_search_save_LIBS=$LIBS
11281cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11282/* end confdefs.h. */
11283
11284/* Override any GCC internal prototype to avoid an error.
11285 Use char because int might match the return type of a GCC
11286 builtin and then its argument prototype would still apply. */
11287#ifdef __cplusplus
11288extern "C"
11289#endif
11290char nanosleep ();
11291int
11292main ()
11293{
11294return nanosleep ();
11295 ;
11296 return 0;
11297}
11298_ACEOF
11299for ac_lib in '' rt posix4; do
11300 if test -z "$ac_lib"; then
11301 ac_res="none required"
11302 else
11303 ac_res=-l$ac_lib
11304 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11305 fi
11306 if ac_fn_c_try_link "$LINENO"; then :
11307 ac_cv_search_nanosleep=$ac_res
11308fi
11309rm -f core conftest.err conftest.$ac_objext \
11310 conftest$ac_exeext
11311 if ${ac_cv_search_nanosleep+:} false; then :
11312 break
11313fi
11314done
11315if ${ac_cv_search_nanosleep+:} false; then :
11316
11317else
11318 ac_cv_search_nanosleep=no
11319fi
11320rm conftest.$ac_ext
11321LIBS=$ac_func_search_save_LIBS
11322fi
11323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
11324$as_echo "$ac_cv_search_nanosleep" >&6; }
11325ac_res=$ac_cv_search_nanosleep
11326if test "$ac_res" != no; then :
11327 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11328
11329$as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h
11330
11331fi
11332
11333
11334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11335$as_echo_n "checking for library containing clock_gettime... " >&6; }
11336if ${ac_cv_search_clock_gettime+:} false; then :
11337 $as_echo_n "(cached) " >&6
11338else
11339 ac_func_search_save_LIBS=$LIBS
11340cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11341/* end confdefs.h. */
11342
11343/* Override any GCC internal prototype to avoid an error.
11344 Use char because int might match the return type of a GCC
11345 builtin and then its argument prototype would still apply. */
11346#ifdef __cplusplus
11347extern "C"
11348#endif
11349char clock_gettime ();
11350int
11351main ()
11352{
11353return clock_gettime ();
11354 ;
11355 return 0;
11356}
11357_ACEOF
11358for ac_lib in '' rt; do
11359 if test -z "$ac_lib"; then
11360 ac_res="none required"
11361 else
11362 ac_res=-l$ac_lib
11363 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11364 fi
11365 if ac_fn_c_try_link "$LINENO"; then :
11366 ac_cv_search_clock_gettime=$ac_res
11367fi
11368rm -f core conftest.err conftest.$ac_objext \
11369 conftest$ac_exeext
11370 if ${ac_cv_search_clock_gettime+:} false; then :
11371 break
11372fi
11373done
11374if ${ac_cv_search_clock_gettime+:} false; then :
11375
11376else
11377 ac_cv_search_clock_gettime=no
11378fi
11379rm conftest.$ac_ext
11380LIBS=$ac_func_search_save_LIBS
11381fi
11382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11383$as_echo "$ac_cv_search_clock_gettime" >&6; }
11384ac_res=$ac_cv_search_clock_gettime
11385if test "$ac_res" != no; then :
11386 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11387
11388$as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11389
11390fi
11391
11392
11393ac_fn_c_check_decl "$LINENO" "strsep" "ac_cv_have_decl_strsep" "
11394#ifdef HAVE_STRING_H
11395# include <string.h>
11396#endif
11397
11398"
11399if test "x$ac_cv_have_decl_strsep" = xyes; then :
11400 for ac_func in strsep
11401do :
11402 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
11403if test "x$ac_cv_func_strsep" = xyes; then :
11404 cat >>confdefs.h <<_ACEOF
11405#define HAVE_STRSEP 1
11406_ACEOF
11407
11408fi
11409done
11410
11411fi
11412
11413
11414ac_fn_c_check_decl "$LINENO" "tcsendbreak" "ac_cv_have_decl_tcsendbreak" "#include <termios.h>
11415
11416"
11417if test "x$ac_cv_have_decl_tcsendbreak" = xyes; then :
11418 $as_echo "#define HAVE_TCSENDBREAK 1" >>confdefs.h
11419
11420else
11421 for ac_func in tcsendbreak
11422do :
11423 ac_fn_c_check_func "$LINENO" "tcsendbreak" "ac_cv_func_tcsendbreak"
11424if test "x$ac_cv_func_tcsendbreak" = xyes; then :
11425 cat >>confdefs.h <<_ACEOF
11426#define HAVE_TCSENDBREAK 1
11427_ACEOF
11428
11429fi
11430done
11431
11432fi
11433
11434
11435ac_fn_c_check_decl "$LINENO" "h_errno" "ac_cv_have_decl_h_errno" "#include <netdb.h>
11436"
11437if test "x$ac_cv_have_decl_h_errno" = xyes; then :
11438 ac_have_decl=1
11439else
11440 ac_have_decl=0
11441fi
11442
11443cat >>confdefs.h <<_ACEOF
11444#define HAVE_DECL_H_ERRNO $ac_have_decl
11445_ACEOF
11446
11447
11448ac_fn_c_check_decl "$LINENO" "SHUT_RD" "ac_cv_have_decl_SHUT_RD" "
11449#include <sys/types.h>
11450#include <sys/socket.h>
11451
11452"
11453if test "x$ac_cv_have_decl_SHUT_RD" = xyes; then :
11454 ac_have_decl=1
11455else
11456 ac_have_decl=0
11457fi
11458
11459cat >>confdefs.h <<_ACEOF
11460#define HAVE_DECL_SHUT_RD $ac_have_decl
11461_ACEOF
11462
11463
11464ac_fn_c_check_decl "$LINENO" "O_NONBLOCK" "ac_cv_have_decl_O_NONBLOCK" "
11465#include <sys/types.h>
11466#ifdef HAVE_SYS_STAT_H
11467# include <sys/stat.h>
11468#endif
11469#ifdef HAVE_FCNTL_H
11470# include <fcntl.h>
11471#endif
11472
11473"
11474if test "x$ac_cv_have_decl_O_NONBLOCK" = xyes; then :
11475 ac_have_decl=1
11476else
11477 ac_have_decl=0
11478fi
11479
11480cat >>confdefs.h <<_ACEOF
11481#define HAVE_DECL_O_NONBLOCK $ac_have_decl
11482_ACEOF
11483
11484
11485ac_fn_c_check_decl "$LINENO" "readv" "ac_cv_have_decl_readv" "
11486#include <sys/types.h>
11487#include <sys/uio.h>
11488#include <unistd.h>
11489
11490"
11491if test "x$ac_cv_have_decl_readv" = xyes; then :
11492 ac_have_decl=1
11493else
11494 ac_have_decl=0
11495fi
11496
11497cat >>confdefs.h <<_ACEOF
11498#define HAVE_DECL_READV $ac_have_decl
11499_ACEOF
11500ac_fn_c_check_decl "$LINENO" "writev" "ac_cv_have_decl_writev" "
11501#include <sys/types.h>
11502#include <sys/uio.h>
11503#include <unistd.h>
11504
11505"
11506if test "x$ac_cv_have_decl_writev" = xyes; then :
11507 ac_have_decl=1
11508else
11509 ac_have_decl=0
11510fi
11511
11512cat >>confdefs.h <<_ACEOF
11513#define HAVE_DECL_WRITEV $ac_have_decl
11514_ACEOF
11515
11516
11517ac_fn_c_check_decl "$LINENO" "MAXSYMLINKS" "ac_cv_have_decl_MAXSYMLINKS" "
11518#include <sys/param.h>
11519
11520"
11521if test "x$ac_cv_have_decl_MAXSYMLINKS" = xyes; then :
11522 ac_have_decl=1
11523else
11524 ac_have_decl=0
11525fi
11526
11527cat >>confdefs.h <<_ACEOF
11528#define HAVE_DECL_MAXSYMLINKS $ac_have_decl
11529_ACEOF
11530
11531
11532ac_fn_c_check_decl "$LINENO" "offsetof" "ac_cv_have_decl_offsetof" "
11533#include <stddef.h>
11534
11535"
11536if test "x$ac_cv_have_decl_offsetof" = xyes; then :
11537 ac_have_decl=1
11538else
11539 ac_have_decl=0
11540fi
11541
11542cat >>confdefs.h <<_ACEOF
11543#define HAVE_DECL_OFFSETOF $ac_have_decl
11544_ACEOF
11545
11546
11547# extra bits for select(2)
11548ac_fn_c_check_decl "$LINENO" "howmany" "ac_cv_have_decl_howmany" "
11549#include <sys/param.h>
11550#include <sys/types.h>
11551#ifdef HAVE_SYS_SYSMACROS_H
11552#include <sys/sysmacros.h>
11553#endif
11554#ifdef HAVE_SYS_SELECT_H
11555#include <sys/select.h>
11556#endif
11557#ifdef HAVE_SYS_TIME_H
11558#include <sys/time.h>
11559#endif
11560#ifdef HAVE_UNISTD_H
11561#include <unistd.h>
11562#endif
11563
11564"
11565if test "x$ac_cv_have_decl_howmany" = xyes; then :
11566 ac_have_decl=1
11567else
11568 ac_have_decl=0
11569fi
11570
11571cat >>confdefs.h <<_ACEOF
11572#define HAVE_DECL_HOWMANY $ac_have_decl
11573_ACEOF
11574ac_fn_c_check_decl "$LINENO" "NFDBITS" "ac_cv_have_decl_NFDBITS" "
11575#include <sys/param.h>
11576#include <sys/types.h>
11577#ifdef HAVE_SYS_SYSMACROS_H
11578#include <sys/sysmacros.h>
11579#endif
11580#ifdef HAVE_SYS_SELECT_H
11581#include <sys/select.h>
11582#endif
11583#ifdef HAVE_SYS_TIME_H
11584#include <sys/time.h>
11585#endif
11586#ifdef HAVE_UNISTD_H
11587#include <unistd.h>
11588#endif
11589
11590"
11591if test "x$ac_cv_have_decl_NFDBITS" = xyes; then :
11592 ac_have_decl=1
11593else
11594 ac_have_decl=0
11595fi
11596
11597cat >>confdefs.h <<_ACEOF
11598#define HAVE_DECL_NFDBITS $ac_have_decl
11599_ACEOF
11600
11601ac_fn_c_check_type "$LINENO" "fd_mask" "ac_cv_type_fd_mask" "
11602#include <sys/param.h>
11603#include <sys/types.h>
11604#ifdef HAVE_SYS_SELECT_H
11605#include <sys/select.h>
11606#endif
11607#ifdef HAVE_SYS_TIME_H
11608#include <sys/time.h>
11609#endif
11610#ifdef HAVE_UNISTD_H
11611#include <unistd.h>
11612#endif
11613
11614"
11615if test "x$ac_cv_type_fd_mask" = xyes; then :
11616
11617cat >>confdefs.h <<_ACEOF
11618#define HAVE_FD_MASK 1
11619_ACEOF
11620
11621
11622fi
11623
11624
11625for ac_func in setresuid
11626do :
11627 ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
11628if test "x$ac_cv_func_setresuid" = xyes; then :
11629 cat >>confdefs.h <<_ACEOF
11630#define HAVE_SETRESUID 1
11631_ACEOF
11632
11633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresuid seems to work" >&5
11634$as_echo_n "checking if setresuid seems to work... " >&6; }
11635 if test "$cross_compiling" = yes; then :
11636 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
11637$as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
11638
11639else
11640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11641/* end confdefs.h. */
11642
11643#include <stdlib.h>
11644#include <errno.h>
11645
11646int
11647main ()
11648{
11649
11650 errno=0;
11651 setresuid(0,0,0);
11652 if (errno==ENOSYS)
11653 exit(1);
11654 else
11655 exit(0);
11656
11657 ;
11658 return 0;
11659}
11660_ACEOF
11661if ac_fn_c_try_run "$LINENO"; then :
11662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11663$as_echo "yes" >&6; }
11664else
11665
11666$as_echo "#define BROKEN_SETRESUID 1" >>confdefs.h
11667
11668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
11669$as_echo "not implemented" >&6; }
11670fi
11671rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11672 conftest.$ac_objext conftest.beam conftest.$ac_ext
11673fi
11674
11675
11676fi
11677done
11678
11679
11680for ac_func in setresgid
11681do :
11682 ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
11683if test "x$ac_cv_func_setresgid" = xyes; then :
11684 cat >>confdefs.h <<_ACEOF
11685#define HAVE_SETRESGID 1
11686_ACEOF
11687
11688 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresgid seems to work" >&5
11689$as_echo_n "checking if setresgid seems to work... " >&6; }
11690 if test "$cross_compiling" = yes; then :
11691 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
11692$as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
11693
11694else
11695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11696/* end confdefs.h. */
11697
11698#include <stdlib.h>
11699#include <errno.h>
11700
11701int
11702main ()
11703{
11704
11705 errno=0;
11706 setresgid(0,0,0);
11707 if (errno==ENOSYS)
11708 exit(1);
11709 else
11710 exit(0);
11711
11712 ;
11713 return 0;
11714}
11715_ACEOF
11716if ac_fn_c_try_run "$LINENO"; then :
11717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11718$as_echo "yes" >&6; }
11719else
11720
11721$as_echo "#define BROKEN_SETRESGID 1" >>confdefs.h
11722
11723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
11724$as_echo "not implemented" >&6; }
11725fi
11726rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11727 conftest.$ac_objext conftest.beam conftest.$ac_ext
11728fi
11729
11730
11731fi
11732done
11733
11734
11735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fflush(NULL)" >&5
11736$as_echo_n "checking for working fflush(NULL)... " >&6; }
11737if test "$cross_compiling" = yes; then :
11738 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming working" >&5
11739$as_echo "$as_me: WARNING: cross compiling: assuming working" >&2;}
11740
11741else
11742 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11743/* end confdefs.h. */
11744#include <stdio.h>
11745int
11746main ()
11747{
11748fflush(NULL); exit(0);
11749 ;
11750 return 0;
11751}
11752_ACEOF
11753if ac_fn_c_try_run "$LINENO"; then :
11754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11755$as_echo "yes" >&6; }
11756else
11757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11758$as_echo "no" >&6; }
11759
11760$as_echo "#define FFLUSH_NULL_BUG 1" >>confdefs.h
11761
11762fi
11763rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11764 conftest.$ac_objext conftest.beam conftest.$ac_ext
11765fi
11766
11767
11768for ac_func in gettimeofday time
11769do :
11770 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11771ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11772if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11773 cat >>confdefs.h <<_ACEOF
11774#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11775_ACEOF
11776
11777fi
11778done
11779
11780for ac_func in endutent getutent getutid getutline pututline setutent
11781do :
11782 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11783ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11784if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11785 cat >>confdefs.h <<_ACEOF
11786#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11787_ACEOF
11788
11789fi
11790done
11791
11792for ac_func in utmpname
11793do :
11794 ac_fn_c_check_func "$LINENO" "utmpname" "ac_cv_func_utmpname"
11795if test "x$ac_cv_func_utmpname" = xyes; then :
11796 cat >>confdefs.h <<_ACEOF
11797#define HAVE_UTMPNAME 1
11798_ACEOF
11799
11800fi
11801done
11802
11803for ac_func in endutxent getutxent getutxid getutxline getutxuser pututxline
11804do :
11805 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11806ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11807if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11808 cat >>confdefs.h <<_ACEOF
11809#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11810_ACEOF
11811
11812fi
11813done
11814
11815for ac_func in setutxdb setutxent utmpxname
11816do :
11817 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11818ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11819if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11820 cat >>confdefs.h <<_ACEOF
11821#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11822_ACEOF
11823
11824fi
11825done
11826
11827for ac_func in getlastlogxbyname
11828do :
11829 ac_fn_c_check_func "$LINENO" "getlastlogxbyname" "ac_cv_func_getlastlogxbyname"
11830if test "x$ac_cv_func_getlastlogxbyname" = xyes; then :
11831 cat >>confdefs.h <<_ACEOF
11832#define HAVE_GETLASTLOGXBYNAME 1
11833_ACEOF
11834
11835fi
11836done
11837
11838
11839ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
11840if test "x$ac_cv_func_daemon" = xyes; then :
11841
11842$as_echo "#define HAVE_DAEMON 1" >>confdefs.h
11843
11844else
11845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for daemon in -lbsd" >&5
11846$as_echo_n "checking for daemon in -lbsd... " >&6; }
11847if ${ac_cv_lib_bsd_daemon+:} false; then :
11848 $as_echo_n "(cached) " >&6
11849else
11850 ac_check_lib_save_LIBS=$LIBS
11851LIBS="-lbsd $LIBS"
11852cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11853/* end confdefs.h. */
11854
11855/* Override any GCC internal prototype to avoid an error.
11856 Use char because int might match the return type of a GCC
11857 builtin and then its argument prototype would still apply. */
11858#ifdef __cplusplus
11859extern "C"
11860#endif
11861char daemon ();
11862int
11863main ()
11864{
11865return daemon ();
11866 ;
11867 return 0;
11868}
11869_ACEOF
11870if ac_fn_c_try_link "$LINENO"; then :
11871 ac_cv_lib_bsd_daemon=yes
11872else
11873 ac_cv_lib_bsd_daemon=no
11874fi
11875rm -f core conftest.err conftest.$ac_objext \
11876 conftest$ac_exeext conftest.$ac_ext
11877LIBS=$ac_check_lib_save_LIBS
11878fi
11879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_daemon" >&5
11880$as_echo "$ac_cv_lib_bsd_daemon" >&6; }
11881if test "x$ac_cv_lib_bsd_daemon" = xyes; then :
11882 LIBS="$LIBS -lbsd"; $as_echo "#define HAVE_DAEMON 1" >>confdefs.h
11883
11884fi
11885
11886
11887fi
11888
11889
11890ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
11891if test "x$ac_cv_func_getpagesize" = xyes; then :
11892
11893$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
11894
11895else
11896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize in -lucb" >&5
11897$as_echo_n "checking for getpagesize in -lucb... " >&6; }
11898if ${ac_cv_lib_ucb_getpagesize+:} false; then :
11899 $as_echo_n "(cached) " >&6
11900else
11901 ac_check_lib_save_LIBS=$LIBS
11902LIBS="-lucb $LIBS"
11903cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11904/* end confdefs.h. */
11905
11906/* Override any GCC internal prototype to avoid an error.
11907 Use char because int might match the return type of a GCC
11908 builtin and then its argument prototype would still apply. */
11909#ifdef __cplusplus
11910extern "C"
11911#endif
11912char getpagesize ();
11913int
11914main ()
11915{
11916return getpagesize ();
11917 ;
11918 return 0;
11919}
11920_ACEOF
11921if ac_fn_c_try_link "$LINENO"; then :
11922 ac_cv_lib_ucb_getpagesize=yes
11923else
11924 ac_cv_lib_ucb_getpagesize=no
11925fi
11926rm -f core conftest.err conftest.$ac_objext \
11927 conftest$ac_exeext conftest.$ac_ext
11928LIBS=$ac_check_lib_save_LIBS
11929fi
11930{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ucb_getpagesize" >&5
11931$as_echo "$ac_cv_lib_ucb_getpagesize" >&6; }
11932if test "x$ac_cv_lib_ucb_getpagesize" = xyes; then :
11933 LIBS="$LIBS -lucb"; $as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
11934
11935fi
11936
11937
11938fi
11939
11940
11941# Check for broken snprintf
11942if test "x$ac_cv_func_snprintf" = "xyes" ; then
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf correctly terminates long strings" >&5
11944$as_echo_n "checking whether snprintf correctly terminates long strings... " >&6; }
11945 if test "$cross_compiling" = yes; then :
11946 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
11947$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
11948
11949else
11950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11951/* end confdefs.h. */
11952 #include <stdio.h>
11953int
11954main ()
11955{
11956
11957 char b[5];
11958 snprintf(b,5,"123456789");
11959 exit(b[4]!='\0');
11960
11961 ;
11962 return 0;
11963}
11964_ACEOF
11965if ac_fn_c_try_run "$LINENO"; then :
11966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11967$as_echo "yes" >&6; }
11968else
11969
11970 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11971$as_echo "no" >&6; }
11972
11973$as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
11974
11975 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
11976$as_echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
11977
11978fi
11979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11980 conftest.$ac_objext conftest.beam conftest.$ac_ext
11981fi
11982
11983fi
11984
11985if test "x$ac_cv_func_snprintf" = "xyes" ; then
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf understands %zu" >&5
11987$as_echo_n "checking whether snprintf understands %zu... " >&6; }
11988 if test "$cross_compiling" = yes; then :
11989 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
11990$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
11991
11992else
11993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11994/* end confdefs.h. */
11995
11996#include <sys/types.h>
11997#include <stdio.h>
11998
11999int
12000main ()
12001{
12002
12003 size_t a = 1, b = 2;
12004 char z[128];
12005 snprintf(z, sizeof z, "%zu%zu", a, b);
12006 exit(strcmp(z, "12"));
12007
12008 ;
12009 return 0;
12010}
12011_ACEOF
12012if ac_fn_c_try_run "$LINENO"; then :
12013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12014$as_echo "yes" >&6; }
12015else
12016
12017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12018$as_echo "no" >&6; }
12019
12020$as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
12021
12022
12023fi
12024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12025 conftest.$ac_objext conftest.beam conftest.$ac_ext
12026fi
12027
12028fi
12029
12030# We depend on vsnprintf returning the right thing on overflow: the
12031# number of characters it tried to create (as per SUSv3)
12032if test "x$ac_cv_func_vsnprintf" = "xyes" ; then
12033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf returns correct values on overflow" >&5
12034$as_echo_n "checking whether vsnprintf returns correct values on overflow... " >&6; }
12035 if test "$cross_compiling" = yes; then :
12036 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working vsnprintf()" >&5
12037$as_echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;}
12038
12039else
12040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12041/* end confdefs.h. */
12042
12043#include <sys/types.h>
12044#include <stdio.h>
12045#include <stdarg.h>
12046
12047int x_snprintf(char *str, size_t count, const char *fmt, ...)
12048{
12049 size_t ret;
12050 va_list ap;
12051
12052 va_start(ap, fmt);
12053 ret = vsnprintf(str, count, fmt, ap);
12054 va_end(ap);
12055 return ret;
12056}
12057
12058int
12059main ()
12060{
12061
12062char x[1];
12063if (x_snprintf(x, 1, "%s %d", "hello", 12345) != 11)
12064 return 1;
12065if (x_snprintf(NULL, 0, "%s %d", "hello", 12345) != 11)
12066 return 1;
12067return 0;
12068
12069 ;
12070 return 0;
12071}
12072_ACEOF
12073if ac_fn_c_try_run "$LINENO"; then :
12074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12075$as_echo "yes" >&6; }
12076else
12077
12078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12079$as_echo "no" >&6; }
12080
12081$as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
12082
12083 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&5
12084$as_echo "$as_me: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&2;}
12085
12086fi
12087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12088 conftest.$ac_objext conftest.beam conftest.$ac_ext
12089fi
12090
12091fi
12092
12093# On systems where [v]snprintf is broken, but is declared in stdio,
12094# check that the fmt argument is const char * or just char *.
12095# This is only useful for when BROKEN_SNPRINTF
12096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf can declare const char *fmt" >&5
12097$as_echo_n "checking whether snprintf can declare const char *fmt... " >&6; }
12098cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12099/* end confdefs.h. */
12100
12101#include <stdio.h>
12102int snprintf(char *a, size_t b, const char *c, ...) { return 0; }
12103
12104int
12105main ()
12106{
12107
12108 snprintf(0, 0, 0);
12109
12110 ;
12111 return 0;
12112}
12113_ACEOF
12114if ac_fn_c_try_compile "$LINENO"; then :
12115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12116$as_echo "yes" >&6; }
12117
12118$as_echo "#define SNPRINTF_CONST const" >>confdefs.h
12119
12120else
12121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12122$as_echo "no" >&6; }
12123 $as_echo "#define SNPRINTF_CONST /* not const */" >>confdefs.h
12124
12125fi
12126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12127
12128# Check for missing getpeereid (or equiv) support
12129NO_PEERCHECK=""
12130if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then
12131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports SO_PEERCRED getsockopt" >&5
12132$as_echo_n "checking whether system supports SO_PEERCRED getsockopt... " >&6; }
12133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12134/* end confdefs.h. */
12135
12136#include <sys/types.h>
12137#include <sys/socket.h>
12138int
12139main ()
12140{
12141int i = SO_PEERCRED;
12142 ;
12143 return 0;
12144}
12145_ACEOF
12146if ac_fn_c_try_compile "$LINENO"; then :
12147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12148$as_echo "yes" >&6; }
12149
12150$as_echo "#define HAVE_SO_PEERCRED 1" >>confdefs.h
12151
12152
12153else
12154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12155$as_echo "no" >&6; }
12156 NO_PEERCHECK=1
12157
12158fi
12159rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12160fi
12161
12162if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
12163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for (overly) strict mkstemp" >&5
12164$as_echo_n "checking for (overly) strict mkstemp... " >&6; }
12165if test "$cross_compiling" = yes; then :
12166
12167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12168$as_echo "yes" >&6; }
12169 $as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
12170
12171
12172
12173else
12174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12175/* end confdefs.h. */
12176
12177#include <stdlib.h>
12178
12179int
12180main ()
12181{
12182
12183 char template[]="conftest.mkstemp-test";
12184 if (mkstemp(template) == -1)
12185 exit(1);
12186 unlink(template);
12187 exit(0);
12188
12189 ;
12190 return 0;
12191}
12192_ACEOF
12193if ac_fn_c_try_run "$LINENO"; then :
12194
12195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12196$as_echo "no" >&6; }
12197
12198else
12199
12200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12201$as_echo "yes" >&6; }
12202
12203$as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
12204
12205
12206fi
12207rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12208 conftest.$ac_objext conftest.beam conftest.$ac_ext
12209fi
12210
12211fi
12212
12213if test ! -z "$check_for_openpty_ctty_bug"; then
12214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openpty correctly handles controlling tty" >&5
12215$as_echo_n "checking if openpty correctly handles controlling tty... " >&6; }
12216 if test "$cross_compiling" = yes; then :
12217
12218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
12219$as_echo "cross-compiling, assuming yes" >&6; }
12220
12221
12222else
12223 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12224/* end confdefs.h. */
12225
12226#include <stdio.h>
12227#include <sys/fcntl.h>
12228#include <sys/types.h>
12229#include <sys/wait.h>
12230
12231int
12232main ()
12233{
12234
12235 pid_t pid;
12236 int fd, ptyfd, ttyfd, status;
12237
12238 pid = fork();
12239 if (pid < 0) { /* failed */
12240 exit(1);
12241 } else if (pid > 0) { /* parent */
12242 waitpid(pid, &status, 0);
12243 if (WIFEXITED(status))
12244 exit(WEXITSTATUS(status));
12245 else
12246 exit(2);
12247 } else { /* child */
12248 close(0); close(1); close(2);
12249 setsid();
12250 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
12251 fd = open("/dev/tty", O_RDWR | O_NOCTTY);
12252 if (fd >= 0)
12253 exit(3); /* Acquired ctty: broken */
12254 else
12255 exit(0); /* Did not acquire ctty: OK */
12256 }
12257
12258 ;
12259 return 0;
12260}
12261_ACEOF
12262if ac_fn_c_try_run "$LINENO"; then :
12263
12264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12265$as_echo "yes" >&6; }
12266
12267else
12268
12269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12270$as_echo "no" >&6; }
12271 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
12272
12273
12274fi
12275rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12276 conftest.$ac_objext conftest.beam conftest.$ac_ext
12277fi
12278
12279fi
12280
12281if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
12282 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
12283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
12284$as_echo_n "checking if getaddrinfo seems to work... " >&6; }
12285 if test "$cross_compiling" = yes; then :
12286
12287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
12288$as_echo "cross-compiling, assuming yes" >&6; }
12289
12290
12291else
12292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12293/* end confdefs.h. */
12294
12295#include <stdio.h>
12296#include <sys/socket.h>
12297#include <netdb.h>
12298#include <errno.h>
12299#include <netinet/in.h>
12300
12301#define TEST_PORT "2222"
12302
12303int
12304main ()
12305{
12306
12307 int err, sock;
12308 struct addrinfo *gai_ai, *ai, hints;
12309 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
12310
12311 memset(&hints, 0, sizeof(hints));
12312 hints.ai_family = PF_UNSPEC;
12313 hints.ai_socktype = SOCK_STREAM;
12314 hints.ai_flags = AI_PASSIVE;
12315
12316 err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
12317 if (err != 0) {
12318 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
12319 exit(1);
12320 }
12321
12322 for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
12323 if (ai->ai_family != AF_INET6)
12324 continue;
12325
12326 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
12327 sizeof(ntop), strport, sizeof(strport),
12328 NI_NUMERICHOST|NI_NUMERICSERV);
12329
12330 if (err != 0) {
12331 if (err == EAI_SYSTEM)
12332 perror("getnameinfo EAI_SYSTEM");
12333 else
12334 fprintf(stderr, "getnameinfo failed: %s\n",
12335 gai_strerror(err));
12336 exit(2);
12337 }
12338
12339 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
12340 if (sock < 0)
12341 perror("socket");
12342 if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
12343 if (errno == EBADF)
12344 exit(3);
12345 }
12346 }
12347 exit(0);
12348
12349 ;
12350 return 0;
12351}
12352_ACEOF
12353if ac_fn_c_try_run "$LINENO"; then :
12354
12355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12356$as_echo "yes" >&6; }
12357
12358else
12359
12360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12361$as_echo "no" >&6; }
12362 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
12363
12364
12365fi
12366rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12367 conftest.$ac_objext conftest.beam conftest.$ac_ext
12368fi
12369
12370fi
12371
12372if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
12373 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
12374 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
12375$as_echo_n "checking if getaddrinfo seems to work... " >&6; }
12376 if test "$cross_compiling" = yes; then :
12377
12378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming no" >&5
12379$as_echo "cross-compiling, assuming no" >&6; }
12380
12381
12382else
12383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12384/* end confdefs.h. */
12385
12386#include <stdio.h>
12387#include <sys/socket.h>
12388#include <netdb.h>
12389#include <errno.h>
12390#include <netinet/in.h>
12391
12392#define TEST_PORT "2222"
12393
12394int
12395main ()
12396{
12397
12398 int err, sock;
12399 struct addrinfo *gai_ai, *ai, hints;
12400 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
12401
12402 memset(&hints, 0, sizeof(hints));
12403 hints.ai_family = PF_UNSPEC;
12404 hints.ai_socktype = SOCK_STREAM;
12405 hints.ai_flags = AI_PASSIVE;
12406
12407 err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
12408 if (err != 0) {
12409 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
12410 exit(1);
12411 }
12412
12413 for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
12414 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
12415 continue;
12416
12417 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
12418 sizeof(ntop), strport, sizeof(strport),
12419 NI_NUMERICHOST|NI_NUMERICSERV);
12420
12421 if (ai->ai_family == AF_INET && err != 0) {
12422 perror("getnameinfo");
12423 exit(2);
12424 }
12425 }
12426 exit(0);
12427
12428 ;
12429 return 0;
12430}
12431_ACEOF
12432if ac_fn_c_try_run "$LINENO"; then :
12433
12434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12435$as_echo "yes" >&6; }
12436
12437$as_echo "#define AIX_GETNAMEINFO_HACK 1" >>confdefs.h
12438
12439
12440else
12441
12442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12443$as_echo "no" >&6; }
12444 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
12445
12446
12447fi
12448rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12449 conftest.$ac_objext conftest.beam conftest.$ac_ext
12450fi
12451
12452fi
12453
12454if test "x$ac_cv_func_getaddrinfo" = "xyes"; then
12455 ac_fn_c_check_decl "$LINENO" "AI_NUMERICSERV" "ac_cv_have_decl_AI_NUMERICSERV" "#include <sys/types.h>
12456 #include <sys/socket.h>
12457 #include <netdb.h>
12458"
12459if test "x$ac_cv_have_decl_AI_NUMERICSERV" = xyes; then :
12460 ac_have_decl=1
12461else
12462 ac_have_decl=0
12463fi
12464
12465cat >>confdefs.h <<_ACEOF
12466#define HAVE_DECL_AI_NUMERICSERV $ac_have_decl
12467_ACEOF
12468
12469fi
12470
12471if test "x$check_for_conflicting_getspnam" = "x1"; then
12472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for conflicting getspnam in shadow.h" >&5
12473$as_echo_n "checking for conflicting getspnam in shadow.h... " >&6; }
12474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12475/* end confdefs.h. */
12476 #include <shadow.h>
12477int
12478main ()
12479{
12480 exit(0);
12481 ;
12482 return 0;
12483}
12484_ACEOF
12485if ac_fn_c_try_compile "$LINENO"; then :
12486
12487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12488$as_echo "no" >&6; }
12489
12490else
12491
12492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12493$as_echo "yes" >&6; }
12494
12495$as_echo "#define GETSPNAM_CONFLICTING_DEFS 1" >>confdefs.h
12496
12497
12498
12499fi
12500rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12501fi
12502
12503if test "x$ac_cv_func_strnvis" = "xyes"; then
12504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnvis" >&5
12505$as_echo_n "checking for working strnvis... " >&6; }
12506 if test "$cross_compiling" = yes; then :
12507 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming broken" >&5
12508$as_echo "$as_me: WARNING: cross compiling: assuming broken" >&2;}
12509
12510$as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
12511
12512
12513else
12514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12515/* end confdefs.h. */
12516
12517#include <signal.h>
12518#include <stdlib.h>
12519#include <string.h>
12520#include <vis.h>
12521static void sighandler(int sig) { _exit(1); }
12522
12523int
12524main ()
12525{
12526
12527 char dst[16];
12528
12529 signal(SIGSEGV, sighandler);
12530 if (strnvis(dst, "src", 4, 0) && strcmp(dst, "src") == 0)
12531 exit(0);
12532 exit(1)
12533
12534 ;
12535 return 0;
12536}
12537_ACEOF
12538if ac_fn_c_try_run "$LINENO"; then :
12539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12540$as_echo "yes" >&6; }
12541else
12542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12543$as_echo "no" >&6; }
12544
12545$as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
12546
12547fi
12548rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12549 conftest.$ac_objext conftest.beam conftest.$ac_ext
12550fi
12551
12552fi
12553
12554for ac_func in getpgrp
12555do :
12556 ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
12557if test "x$ac_cv_func_getpgrp" = xyes; then :
12558 cat >>confdefs.h <<_ACEOF
12559#define HAVE_GETPGRP 1
12560_ACEOF
12561
12562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getpgrp accepts zero args" >&5
12563$as_echo_n "checking if getpgrp accepts zero args... " >&6; }
12564 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12565/* end confdefs.h. */
12566$ac_includes_default
12567int
12568main ()
12569{
12570 getpgrp();
12571 ;
12572 return 0;
12573}
12574_ACEOF
12575if ac_fn_c_try_compile "$LINENO"; then :
12576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12577$as_echo "yes" >&6; }
12578
12579$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
12580
12581else
12582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12583$as_echo "no" >&6; }
12584
12585$as_echo "#define GETPGRP_VOID 0" >>confdefs.h
12586
12587
12588fi
12589rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12590
12591fi
12592done
12593
12594
12595# Search for OpenSSL
12596saved_CPPFLAGS="$CPPFLAGS"
12597saved_LDFLAGS="$LDFLAGS"
12598
12599# Check whether --with-ssl-dir was given.
12600if test "${with_ssl_dir+set}" = set; then :
12601 withval=$with_ssl_dir;
12602 if test "x$openssl" = "xno" ; then
12603 as_fn_error $? "cannot use --with-ssl-dir when OpenSSL disabled" "$LINENO" 5
12604 fi
12605 if test "x$withval" != "xno" ; then
12606 case "$withval" in
12607 # Relative paths
12608 ./*|../*) withval="`pwd`/$withval"
12609 esac
12610 if test -d "$withval/lib"; then
12611 if test -n "${rpath_opt}"; then
12612 LDFLAGS="-L${withval}/lib ${rpath_opt}${withval}/lib ${LDFLAGS}"
12613 else
12614 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
12615 fi
12616 elif test -d "$withval/lib64"; then
12617 if test -n "${rpath_opt}"; then
12618 LDFLAGS="-L${withval}/lib64 ${rpath_opt}${withval}/lib64 ${LDFLAGS}"
12619 else
12620 LDFLAGS="-L${withval}/lib64 ${LDFLAGS}"
12621 fi
12622 else
12623 if test -n "${rpath_opt}"; then
12624 LDFLAGS="-L${withval} ${rpath_opt}${withval} ${LDFLAGS}"
12625 else
12626 LDFLAGS="-L${withval} ${LDFLAGS}"
12627 fi
12628 fi
12629 if test -d "$withval/include"; then
12630 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
12631 else
12632 CPPFLAGS="-I${withval} ${CPPFLAGS}"
12633 fi
12634 fi
12635
12636
12637fi
12638
12639
12640
12641# Check whether --with-openssl-header-check was given.
12642if test "${with_openssl_header_check+set}" = set; then :
12643 withval=$with_openssl_header_check;
12644 if test "x$withval" = "xno" ; then
12645 openssl_check_nonfatal=1
12646 fi
12647
12648
12649fi
12650
12651
12652openssl_engine=no
12653
12654# Check whether --with-ssl-engine was given.
12655if test "${with_ssl_engine+set}" = set; then :
12656 withval=$with_ssl_engine;
12657 if test "x$withval" != "xno" ; then
12658 if test "x$openssl" = "xno" ; then
12659 as_fn_error $? "cannot use --with-ssl-engine when OpenSSL disabled" "$LINENO" 5
12660 fi
12661 openssl_engine=yes
12662 fi
12663
12664
12665fi
12666
12667
12668if test "x$openssl" = "xyes" ; then
12669 LIBS="-lcrypto $LIBS"
12670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12671/* end confdefs.h. */
12672
12673/* Override any GCC internal prototype to avoid an error.
12674 Use char because int might match the return type of a GCC
12675 builtin and then its argument prototype would still apply. */
12676#ifdef __cplusplus
12677extern "C"
12678#endif
12679char RAND_add ();
12680int
12681main ()
12682{
12683return RAND_add ();
12684 ;
12685 return 0;
12686}
12687_ACEOF
12688if ac_fn_c_try_link "$LINENO"; then :
12689
12690else
12691 as_fn_error $? "*** working libcrypto not found, check config.log" "$LINENO" 5
12692fi
12693rm -f core conftest.err conftest.$ac_objext \
12694 conftest$ac_exeext conftest.$ac_ext
12695 ac_fn_c_check_header_mongrel "$LINENO" "openssl/opensslv.h" "ac_cv_header_openssl_opensslv_h" "$ac_includes_default"
12696if test "x$ac_cv_header_openssl_opensslv_h" = xyes; then :
12697
12698else
12699 as_fn_error $? "*** OpenSSL headers missing - please install first or check config.log ***" "$LINENO" 5
12700fi
12701
12702
12703
12704 # Determine OpenSSL header version
12705 { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL header version" >&5
12706$as_echo_n "checking OpenSSL header version... " >&6; }
12707 if test "$cross_compiling" = yes; then :
12708
12709 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
12710$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
12711
12712
12713else
12714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12715/* end confdefs.h. */
12716
12717 #include <stdlib.h>
12718 #include <stdio.h>
12719 #include <string.h>
12720 #include <openssl/opensslv.h>
12721 #define DATA "conftest.sslincver"
12722
12723int
12724main ()
12725{
12726
12727 FILE *fd;
12728 int rc;
12729
12730 fd = fopen(DATA,"w");
12731 if(fd == NULL)
12732 exit(1);
12733
12734 if ((rc = fprintf(fd, "%08lx (%s)\n",
12735 (unsigned long)OPENSSL_VERSION_NUMBER,
12736 OPENSSL_VERSION_TEXT)) < 0)
12737 exit(1);
12738
12739 exit(0);
12740
12741 ;
12742 return 0;
12743}
12744_ACEOF
12745if ac_fn_c_try_run "$LINENO"; then :
12746
12747 ssl_header_ver=`cat conftest.sslincver`
12748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_header_ver" >&5
12749$as_echo "$ssl_header_ver" >&6; }
12750
12751else
12752
12753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12754$as_echo "not found" >&6; }
12755 as_fn_error $? "OpenSSL version header not found." "$LINENO" 5
12756
12757fi
12758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12759 conftest.$ac_objext conftest.beam conftest.$ac_ext
12760fi
12761
12762
12763 # Determining OpenSSL library version is version dependent.
12764 for ac_func in OpenSSL_version OpenSSL_version_num
12765do :
12766 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12767ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12768if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12769 cat >>confdefs.h <<_ACEOF
12770#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12771_ACEOF
12772
12773fi
12774done
12775
12776
12777 # Determine OpenSSL library version
12778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version" >&5
12779$as_echo_n "checking OpenSSL library version... " >&6; }
12780 if test "$cross_compiling" = yes; then :
12781
12782 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
12783$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
12784
12785
12786else
12787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12788/* end confdefs.h. */
12789
12790 #include <stdio.h>
12791 #include <string.h>
12792 #include <openssl/opensslv.h>
12793 #include <openssl/crypto.h>
12794 #define DATA "conftest.ssllibver"
12795
12796int
12797main ()
12798{
12799
12800 FILE *fd;
12801 int rc;
12802
12803 fd = fopen(DATA,"w");
12804 if(fd == NULL)
12805 exit(1);
12806#ifndef OPENSSL_VERSION
12807# define OPENSSL_VERSION SSLEAY_VERSION
12808#endif
12809#ifndef HAVE_OPENSSL_VERSION
12810# define OpenSSL_version SSLeay_version
12811#endif
12812#ifndef HAVE_OPENSSL_VERSION_NUM
12813# define OpenSSL_version_num SSLeay
12814#endif
12815 if ((rc = fprintf(fd, "%08lx (%s)\n",
12816 (unsigned long)OpenSSL_version_num(),
12817 OpenSSL_version(OPENSSL_VERSION))) < 0)
12818 exit(1);
12819
12820 exit(0);
12821
12822 ;
12823 return 0;
12824}
12825_ACEOF
12826if ac_fn_c_try_run "$LINENO"; then :
12827
12828 ssl_library_ver=`cat conftest.ssllibver`
12829 # Check version is supported.
12830 case "$ssl_library_ver" in
12831 10000*|0*)
12832 as_fn_error $? "OpenSSL >= 1.0.1 required (have \"$ssl_library_ver\")" "$LINENO" 5
12833 ;;
12834 100*) ;; # 1.0.x
12835 101000[0123456]*)
12836 # https://github.com/openssl/openssl/pull/4613
12837 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
12838 ;;
12839 101*) ;; # 1.1.x
12840 200*) ;; # LibreSSL
12841 300*) ;; # OpenSSL development branch.
12842 *)
12843 as_fn_error $? "Unknown/unsupported OpenSSL version (\"$ssl_library_ver\")" "$LINENO" 5
12844 ;;
12845 esac
12846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_library_ver" >&5
12847$as_echo "$ssl_library_ver" >&6; }
12848
12849else
12850
12851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12852$as_echo "not found" >&6; }
12853 as_fn_error $? "OpenSSL library not found." "$LINENO" 5
12854
12855fi
12856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12857 conftest.$ac_objext conftest.beam conftest.$ac_ext
12858fi
12859
12860
12861 # Sanity check OpenSSL headers
12862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's headers match the library" >&5
12863$as_echo_n "checking whether OpenSSL's headers match the library... " >&6; }
12864 if test "$cross_compiling" = yes; then :
12865
12866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
12867$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
12868
12869
12870else
12871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12872/* end confdefs.h. */
12873
12874 #include <string.h>
12875 #include <openssl/opensslv.h>
12876 #include <openssl/crypto.h>
12877
12878int
12879main ()
12880{
12881
12882#ifndef HAVE_OPENSSL_VERSION_NUM
12883# define OpenSSL_version_num SSLeay
12884#endif
12885 exit(OpenSSL_version_num() == OPENSSL_VERSION_NUMBER ? 0 : 1);
12886
12887 ;
12888 return 0;
12889}
12890_ACEOF
12891if ac_fn_c_try_run "$LINENO"; then :
12892
12893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12894$as_echo "yes" >&6; }
12895
12896else
12897
12898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12899$as_echo "no" >&6; }
12900 if test "x$openssl_check_nonfatal" = "x"; then
12901 as_fn_error $? "Your OpenSSL headers do not match your
12902 library. Check config.log for details.
12903 If you are sure your installation is consistent, you can disable the check
12904 by running \"./configure --without-openssl-header-check\".
12905 Also see contrib/findssl.sh for help identifying header/library mismatches.
12906 " "$LINENO" 5
12907 else
12908 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your OpenSSL headers do not match your
12909 library. Check config.log for details.
12910 Also see contrib/findssl.sh for help identifying header/library mismatches." >&5
12911$as_echo "$as_me: WARNING: Your OpenSSL headers do not match your
12912 library. Check config.log for details.
12913 Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;}
12914 fi
12915
12916fi
12917rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12918 conftest.$ac_objext conftest.beam conftest.$ac_ext
12919fi
12920
12921
12922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL functions will link" >&5
12923$as_echo_n "checking if programs using OpenSSL functions will link... " >&6; }
12924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12925/* end confdefs.h. */
12926 #include <openssl/err.h>
12927int
12928main ()
12929{
12930 ERR_load_crypto_strings();
12931 ;
12932 return 0;
12933}
12934_ACEOF
12935if ac_fn_c_try_link "$LINENO"; then :
12936
12937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12938$as_echo "yes" >&6; }
12939
12940else
12941
12942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12943$as_echo "no" >&6; }
12944 saved_LIBS="$LIBS"
12945 LIBS="$LIBS -ldl"
12946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL need -ldl" >&5
12947$as_echo_n "checking if programs using OpenSSL need -ldl... " >&6; }
12948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12949/* end confdefs.h. */
12950 #include <openssl/err.h>
12951int
12952main ()
12953{
12954 ERR_load_crypto_strings();
12955 ;
12956 return 0;
12957}
12958_ACEOF
12959if ac_fn_c_try_link "$LINENO"; then :
12960
12961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12962$as_echo "yes" >&6; }
12963
12964else
12965
12966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12967$as_echo "no" >&6; }
12968 LIBS="$saved_LIBS"
12969
12970
12971fi
12972rm -f core conftest.err conftest.$ac_objext \
12973 conftest$ac_exeext conftest.$ac_ext
12974
12975
12976fi
12977rm -f core conftest.err conftest.$ac_objext \
12978 conftest$ac_exeext conftest.$ac_ext
12979
12980 for ac_func in \
12981 BN_is_prime_ex \
12982 DSA_generate_parameters_ex \
12983 EVP_CIPHER_CTX_ctrl \
12984 EVP_DigestFinal_ex \
12985 EVP_DigestInit_ex \
12986 EVP_MD_CTX_cleanup \
12987 EVP_MD_CTX_copy_ex \
12988 EVP_MD_CTX_init \
12989 HMAC_CTX_init \
12990 RSA_generate_key_ex \
12991 RSA_get_default_method \
12992
12993do :
12994 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12995ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12996if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12997 cat >>confdefs.h <<_ACEOF
12998#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12999_ACEOF
13000
13001fi
13002done
13003
13004
13005 # OpenSSL_add_all_algorithms may be a macro.
13006 ac_fn_c_check_func "$LINENO" "OpenSSL_add_all_algorithms" "ac_cv_func_OpenSSL_add_all_algorithms"
13007if test "x$ac_cv_func_OpenSSL_add_all_algorithms" = xyes; then :
13008
13009$as_echo "#define HAVE_OPENSSL_ADD_ALL_ALGORITHMS 1" >>confdefs.h
13010
13011else
13012 ac_fn_c_check_decl "$LINENO" "OpenSSL_add_all_algorithms" "ac_cv_have_decl_OpenSSL_add_all_algorithms" "#include <openssl/evp.h>
13013
13014"
13015if test "x$ac_cv_have_decl_OpenSSL_add_all_algorithms" = xyes; then :
13016
13017$as_echo "#define HAVE_OPENSSL_ADD_ALL_ALGORITHMS 1" >>confdefs.h
13018
13019fi
13020
13021
13022fi
13023
13024
13025 # LibreSSL/OpenSSL 1.1x API
13026 for ac_func in \
13027 OPENSSL_init_crypto \
13028 DH_get0_key \
13029 DH_get0_pqg \
13030 DH_set0_key \
13031 DH_set_length \
13032 DH_set0_pqg \
13033 DSA_get0_key \
13034 DSA_get0_pqg \
13035 DSA_set0_key \
13036 DSA_set0_pqg \
13037 DSA_SIG_get0 \
13038 DSA_SIG_set0 \
13039 ECDSA_SIG_get0 \
13040 ECDSA_SIG_set0 \
13041 EVP_CIPHER_CTX_iv \
13042 EVP_CIPHER_CTX_iv_noconst \
13043 EVP_CIPHER_CTX_get_iv \
13044 EVP_CIPHER_CTX_set_iv \
13045 RSA_get0_crt_params \
13046 RSA_get0_factors \
13047 RSA_get0_key \
13048 RSA_set0_crt_params \
13049 RSA_set0_factors \
13050 RSA_set0_key \
13051 RSA_meth_free \
13052 RSA_meth_dup \
13053 RSA_meth_set1_name \
13054 RSA_meth_get_finish \
13055 RSA_meth_set_priv_enc \
13056 RSA_meth_set_priv_dec \
13057 RSA_meth_set_finish \
13058 EVP_PKEY_get0_RSA \
13059 EVP_MD_CTX_new \
13060 EVP_MD_CTX_free \
13061
13062do :
13063 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13064ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13065if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13066 cat >>confdefs.h <<_ACEOF
13067#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13068_ACEOF
13069
13070fi
13071done
13072
13073
13074 if test "x$openssl_engine" = "xyes" ; then
13075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL ENGINE support" >&5
13076$as_echo_n "checking for OpenSSL ENGINE support... " >&6; }
13077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13078/* end confdefs.h. */
13079
13080 #include <openssl/engine.h>
13081
13082int
13083main ()
13084{
13085
13086 ENGINE_load_builtin_engines();
13087 ENGINE_register_all_complete();
13088
13089 ;
13090 return 0;
13091}
13092_ACEOF
13093if ac_fn_c_try_compile "$LINENO"; then :
13094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13095$as_echo "yes" >&6; }
13096
13097$as_echo "#define USE_OPENSSL_ENGINE 1" >>confdefs.h
13098
13099
13100else
13101 as_fn_error $? "OpenSSL ENGINE support not found" "$LINENO" 5
13102
13103fi
13104rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13105 fi
13106
13107 # Check for OpenSSL without EVP_aes_{192,256}_cbc
13108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has crippled AES support" >&5
13109$as_echo_n "checking whether OpenSSL has crippled AES support... " >&6; }
13110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13111/* end confdefs.h. */
13112
13113 #include <string.h>
13114 #include <openssl/evp.h>
13115
13116int
13117main ()
13118{
13119
13120 exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);
13121
13122 ;
13123 return 0;
13124}
13125_ACEOF
13126if ac_fn_c_try_link "$LINENO"; then :
13127
13128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13129$as_echo "no" >&6; }
13130
13131else
13132
13133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13134$as_echo "yes" >&6; }
13135
13136$as_echo "#define OPENSSL_LOBOTOMISED_AES 1" >>confdefs.h
13137
13138
13139
13140fi
13141rm -f core conftest.err conftest.$ac_objext \
13142 conftest$ac_exeext conftest.$ac_ext
13143
13144 # Check for OpenSSL with EVP_aes_*ctr
13145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has AES CTR via EVP" >&5
13146$as_echo_n "checking whether OpenSSL has AES CTR via EVP... " >&6; }
13147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13148/* end confdefs.h. */
13149
13150 #include <string.h>
13151 #include <openssl/evp.h>
13152
13153int
13154main ()
13155{
13156
13157 exit(EVP_aes_128_ctr() == NULL ||
13158 EVP_aes_192_cbc() == NULL ||
13159 EVP_aes_256_cbc() == NULL);
13160
13161 ;
13162 return 0;
13163}
13164_ACEOF
13165if ac_fn_c_try_link "$LINENO"; then :
13166
13167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13168$as_echo "yes" >&6; }
13169
13170$as_echo "#define OPENSSL_HAVE_EVPCTR 1" >>confdefs.h
13171
13172
13173else
13174
13175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13176$as_echo "no" >&6; }
13177
13178
13179fi
13180rm -f core conftest.err conftest.$ac_objext \
13181 conftest$ac_exeext conftest.$ac_ext
13182
13183 # Check for OpenSSL with EVP_aes_*gcm
13184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has AES GCM via EVP" >&5
13185$as_echo_n "checking whether OpenSSL has AES GCM via EVP... " >&6; }
13186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13187/* end confdefs.h. */
13188
13189 #include <string.h>
13190 #include <openssl/evp.h>
13191
13192int
13193main ()
13194{
13195
13196 exit(EVP_aes_128_gcm() == NULL ||
13197 EVP_aes_256_gcm() == NULL ||
13198 EVP_CTRL_GCM_SET_IV_FIXED == 0 ||
13199 EVP_CTRL_GCM_IV_GEN == 0 ||
13200 EVP_CTRL_GCM_SET_TAG == 0 ||
13201 EVP_CTRL_GCM_GET_TAG == 0 ||
13202 EVP_CIPHER_CTX_ctrl(NULL, 0, 0, NULL) == 0);
13203
13204 ;
13205 return 0;
13206}
13207_ACEOF
13208if ac_fn_c_try_link "$LINENO"; then :
13209
13210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13211$as_echo "yes" >&6; }
13212
13213$as_echo "#define OPENSSL_HAVE_EVPGCM 1" >>confdefs.h
13214
13215
13216else
13217
13218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13219$as_echo "no" >&6; }
13220 unsupported_algorithms="$unsupported_cipers \
13221 aes128-gcm@openssh.com \
13222 aes256-gcm@openssh.com"
13223
13224
13225fi
13226rm -f core conftest.err conftest.$ac_objext \
13227 conftest$ac_exeext conftest.$ac_ext
13228
13229 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if EVP_DigestUpdate returns an int" >&5
13230$as_echo_n "checking if EVP_DigestUpdate returns an int... " >&6; }
13231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13232/* end confdefs.h. */
13233
13234 #include <string.h>
13235 #include <openssl/evp.h>
13236
13237int
13238main ()
13239{
13240
13241 if(EVP_DigestUpdate(NULL, NULL,0))
13242 exit(0);
13243
13244 ;
13245 return 0;
13246}
13247_ACEOF
13248if ac_fn_c_try_link "$LINENO"; then :
13249
13250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13251$as_echo "yes" >&6; }
13252
13253else
13254
13255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13256$as_echo "no" >&6; }
13257
13258$as_echo "#define OPENSSL_EVP_DIGESTUPDATE_VOID 1" >>confdefs.h
13259
13260
13261
13262fi
13263rm -f core conftest.err conftest.$ac_objext \
13264 conftest$ac_exeext conftest.$ac_ext
13265
13266 # Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
13267 # because the system crypt() is more featureful.
13268 if test "x$check_for_libcrypt_before" = "x1"; then
13269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
13270$as_echo_n "checking for crypt in -lcrypt... " >&6; }
13271if ${ac_cv_lib_crypt_crypt+:} false; then :
13272 $as_echo_n "(cached) " >&6
13273else
13274 ac_check_lib_save_LIBS=$LIBS
13275LIBS="-lcrypt $LIBS"
13276cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13277/* end confdefs.h. */
13278
13279/* Override any GCC internal prototype to avoid an error.
13280 Use char because int might match the return type of a GCC
13281 builtin and then its argument prototype would still apply. */
13282#ifdef __cplusplus
13283extern "C"
13284#endif
13285char crypt ();
13286int
13287main ()
13288{
13289return crypt ();
13290 ;
13291 return 0;
13292}
13293_ACEOF
13294if ac_fn_c_try_link "$LINENO"; then :
13295 ac_cv_lib_crypt_crypt=yes
13296else
13297 ac_cv_lib_crypt_crypt=no
13298fi
13299rm -f core conftest.err conftest.$ac_objext \
13300 conftest$ac_exeext conftest.$ac_ext
13301LIBS=$ac_check_lib_save_LIBS
13302fi
13303{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
13304$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
13305if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
13306 cat >>confdefs.h <<_ACEOF
13307#define HAVE_LIBCRYPT 1
13308_ACEOF
13309
13310 LIBS="-lcrypt $LIBS"
13311
13312fi
13313
13314 fi
13315
13316 # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
13317 # version in OpenSSL.
13318 if test "x$check_for_libcrypt_later" = "x1"; then
13319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
13320$as_echo_n "checking for crypt in -lcrypt... " >&6; }
13321if ${ac_cv_lib_crypt_crypt+:} false; then :
13322 $as_echo_n "(cached) " >&6
13323else
13324 ac_check_lib_save_LIBS=$LIBS
13325LIBS="-lcrypt $LIBS"
13326cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13327/* end confdefs.h. */
13328
13329/* Override any GCC internal prototype to avoid an error.
13330 Use char because int might match the return type of a GCC
13331 builtin and then its argument prototype would still apply. */
13332#ifdef __cplusplus
13333extern "C"
13334#endif
13335char crypt ();
13336int
13337main ()
13338{
13339return crypt ();
13340 ;
13341 return 0;
13342}
13343_ACEOF
13344if ac_fn_c_try_link "$LINENO"; then :
13345 ac_cv_lib_crypt_crypt=yes
13346else
13347 ac_cv_lib_crypt_crypt=no
13348fi
13349rm -f core conftest.err conftest.$ac_objext \
13350 conftest$ac_exeext conftest.$ac_ext
13351LIBS=$ac_check_lib_save_LIBS
13352fi
13353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
13354$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
13355if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
13356 LIBS="$LIBS -lcrypt"
13357fi
13358
13359 fi
13360 for ac_func in crypt DES_crypt
13361do :
13362 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13363ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13364if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13365 cat >>confdefs.h <<_ACEOF
13366#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13367_ACEOF
13368
13369fi
13370done
13371
13372
13373 # Check for SHA256, SHA384 and SHA512 support in OpenSSL
13374 for ac_func in EVP_sha256 EVP_sha384 EVP_sha512
13375do :
13376 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13377ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13378if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13379 cat >>confdefs.h <<_ACEOF
13380#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13381_ACEOF
13382
13383fi
13384done
13385
13386
13387 # Search for RIPE-MD support in OpenSSL
13388 for ac_func in EVP_ripemd160
13389do :
13390 ac_fn_c_check_func "$LINENO" "EVP_ripemd160" "ac_cv_func_EVP_ripemd160"
13391if test "x$ac_cv_func_EVP_ripemd160" = xyes; then :
13392 cat >>confdefs.h <<_ACEOF
13393#define HAVE_EVP_RIPEMD160 1
13394_ACEOF
13395
13396else
13397 unsupported_algorithms="$unsupported_algorithms \
13398 hmac-ripemd160 \
13399 hmac-ripemd160@openssh.com \
13400 hmac-ripemd160-etm@openssh.com"
13401
13402
13403fi
13404done
13405
13406
13407 # Check complete ECC support in OpenSSL
13408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_X9_62_prime256v1" >&5
13409$as_echo_n "checking whether OpenSSL has NID_X9_62_prime256v1... " >&6; }
13410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13411/* end confdefs.h. */
13412
13413 #include <openssl/ec.h>
13414 #include <openssl/ecdh.h>
13415 #include <openssl/ecdsa.h>
13416 #include <openssl/evp.h>
13417 #include <openssl/objects.h>
13418 #include <openssl/opensslv.h>
13419
13420int
13421main ()
13422{
13423
13424 EC_KEY *e = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
13425 const EVP_MD *m = EVP_sha256(); /* We need this too */
13426
13427 ;
13428 return 0;
13429}
13430_ACEOF
13431if ac_fn_c_try_link "$LINENO"; then :
13432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13433$as_echo "yes" >&6; }
13434 enable_nistp256=1
13435else
13436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13437$as_echo "no" >&6; }
13438
13439fi
13440rm -f core conftest.err conftest.$ac_objext \
13441 conftest$ac_exeext conftest.$ac_ext
13442
13443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_secp384r1" >&5
13444$as_echo_n "checking whether OpenSSL has NID_secp384r1... " >&6; }
13445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13446/* end confdefs.h. */
13447
13448 #include <openssl/ec.h>
13449 #include <openssl/ecdh.h>
13450 #include <openssl/ecdsa.h>
13451 #include <openssl/evp.h>
13452 #include <openssl/objects.h>
13453 #include <openssl/opensslv.h>
13454
13455int
13456main ()
13457{
13458
13459 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp384r1);
13460 const EVP_MD *m = EVP_sha384(); /* We need this too */
13461
13462 ;
13463 return 0;
13464}
13465_ACEOF
13466if ac_fn_c_try_link "$LINENO"; then :
13467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13468$as_echo "yes" >&6; }
13469 enable_nistp384=1
13470else
13471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13472$as_echo "no" >&6; }
13473
13474fi
13475rm -f core conftest.err conftest.$ac_objext \
13476 conftest$ac_exeext conftest.$ac_ext
13477
13478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_secp521r1" >&5
13479$as_echo_n "checking whether OpenSSL has NID_secp521r1... " >&6; }
13480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13481/* end confdefs.h. */
13482
13483 #include <openssl/ec.h>
13484 #include <openssl/ecdh.h>
13485 #include <openssl/ecdsa.h>
13486 #include <openssl/evp.h>
13487 #include <openssl/objects.h>
13488 #include <openssl/opensslv.h>
13489
13490int
13491main ()
13492{
13493
13494 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
13495 const EVP_MD *m = EVP_sha512(); /* We need this too */
13496
13497 ;
13498 return 0;
13499}
13500_ACEOF
13501if ac_fn_c_try_link "$LINENO"; then :
13502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13503$as_echo "yes" >&6; }
13504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenSSL's NID_secp521r1 is functional" >&5
13505$as_echo_n "checking if OpenSSL's NID_secp521r1 is functional... " >&6; }
13506 if test "$cross_compiling" = yes; then :
13507 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: assuming yes" >&5
13508$as_echo "$as_me: WARNING: cross-compiling: assuming yes" >&2;}
13509 enable_nistp521=1
13510
13511else
13512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13513/* end confdefs.h. */
13514
13515 #include <openssl/ec.h>
13516 #include <openssl/ecdh.h>
13517 #include <openssl/ecdsa.h>
13518 #include <openssl/evp.h>
13519 #include <openssl/objects.h>
13520 #include <openssl/opensslv.h>
13521
13522int
13523main ()
13524{
13525
13526 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
13527 const EVP_MD *m = EVP_sha512(); /* We need this too */
13528 exit(e == NULL || m == NULL);
13529
13530 ;
13531 return 0;
13532}
13533_ACEOF
13534if ac_fn_c_try_run "$LINENO"; then :
13535 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13536$as_echo "yes" >&6; }
13537 enable_nistp521=1
13538else
13539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13540$as_echo "no" >&6; }
13541fi
13542rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13543 conftest.$ac_objext conftest.beam conftest.$ac_ext
13544fi
13545
13546else
13547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13548$as_echo "no" >&6; }
13549
13550fi
13551rm -f core conftest.err conftest.$ac_objext \
13552 conftest$ac_exeext conftest.$ac_ext
13553
13554 COMMENT_OUT_ECC="#no ecc#"
13555 TEST_SSH_ECC=no
13556
13557 if test x$enable_nistp256 = x1 || test x$enable_nistp384 = x1 || \
13558 test x$enable_nistp521 = x1; then
13559
13560$as_echo "#define OPENSSL_HAS_ECC 1" >>confdefs.h
13561
13562 for ac_func in EC_KEY_METHOD_new
13563do :
13564 ac_fn_c_check_func "$LINENO" "EC_KEY_METHOD_new" "ac_cv_func_EC_KEY_METHOD_new"
13565if test "x$ac_cv_func_EC_KEY_METHOD_new" = xyes; then :
13566 cat >>confdefs.h <<_ACEOF
13567#define HAVE_EC_KEY_METHOD_NEW 1
13568_ACEOF
13569
13570fi
13571done
13572
13573 fi
13574 if test x$enable_nistp256 = x1; then
13575
13576$as_echo "#define OPENSSL_HAS_NISTP256 1" >>confdefs.h
13577
13578 TEST_SSH_ECC=yes
13579 COMMENT_OUT_ECC=""
13580 else
13581 unsupported_algorithms="$unsupported_algorithms \
13582 ecdsa-sha2-nistp256 \
13583 ecdh-sha2-nistp256 \
13584 ecdsa-sha2-nistp256-cert-v01@openssh.com"
13585 fi
13586 if test x$enable_nistp384 = x1; then
13587
13588$as_echo "#define OPENSSL_HAS_NISTP384 1" >>confdefs.h
13589
13590 TEST_SSH_ECC=yes
13591 COMMENT_OUT_ECC=""
13592 else
13593 unsupported_algorithms="$unsupported_algorithms \
13594 ecdsa-sha2-nistp384 \
13595 ecdh-sha2-nistp384 \
13596 ecdsa-sha2-nistp384-cert-v01@openssh.com"
13597 fi
13598 if test x$enable_nistp521 = x1; then
13599
13600$as_echo "#define OPENSSL_HAS_NISTP521 1" >>confdefs.h
13601
13602 TEST_SSH_ECC=yes
13603 COMMENT_OUT_ECC=""
13604 else
13605 unsupported_algorithms="$unsupported_algorithms \
13606 ecdh-sha2-nistp521 \
13607 ecdsa-sha2-nistp521 \
13608 ecdsa-sha2-nistp521-cert-v01@openssh.com"
13609 fi
13610
13611
13612
13613else
13614 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
13615$as_echo_n "checking for crypt in -lcrypt... " >&6; }
13616if ${ac_cv_lib_crypt_crypt+:} false; then :
13617 $as_echo_n "(cached) " >&6
13618else
13619 ac_check_lib_save_LIBS=$LIBS
13620LIBS="-lcrypt $LIBS"
13621cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13622/* end confdefs.h. */
13623
13624/* Override any GCC internal prototype to avoid an error.
13625 Use char because int might match the return type of a GCC
13626 builtin and then its argument prototype would still apply. */
13627#ifdef __cplusplus
13628extern "C"
13629#endif
13630char crypt ();
13631int
13632main ()
13633{
13634return crypt ();
13635 ;
13636 return 0;
13637}
13638_ACEOF
13639if ac_fn_c_try_link "$LINENO"; then :
13640 ac_cv_lib_crypt_crypt=yes
13641else
13642 ac_cv_lib_crypt_crypt=no
13643fi
13644rm -f core conftest.err conftest.$ac_objext \
13645 conftest$ac_exeext conftest.$ac_ext
13646LIBS=$ac_check_lib_save_LIBS
13647fi
13648{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
13649$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
13650if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
13651 LIBS="$LIBS -lcrypt"
13652fi
13653
13654 for ac_func in crypt
13655do :
13656 ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
13657if test "x$ac_cv_func_crypt" = xyes; then :
13658 cat >>confdefs.h <<_ACEOF
13659#define HAVE_CRYPT 1
13660_ACEOF
13661
13662fi
13663done
13664
13665fi
13666
13667for ac_func in \
13668 arc4random \
13669 arc4random_buf \
13670 arc4random_stir \
13671 arc4random_uniform \
13672
13673do :
13674 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13675ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13676if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13677 cat >>confdefs.h <<_ACEOF
13678#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13679_ACEOF
13680
13681fi
13682done
13683
13684
13685saved_LIBS="$LIBS"
13686{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ia_openinfo in -liaf" >&5
13687$as_echo_n "checking for ia_openinfo in -liaf... " >&6; }
13688if ${ac_cv_lib_iaf_ia_openinfo+:} false; then :
13689 $as_echo_n "(cached) " >&6
13690else
13691 ac_check_lib_save_LIBS=$LIBS
13692LIBS="-liaf $LIBS"
13693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13694/* end confdefs.h. */
13695
13696/* Override any GCC internal prototype to avoid an error.
13697 Use char because int might match the return type of a GCC
13698 builtin and then its argument prototype would still apply. */
13699#ifdef __cplusplus
13700extern "C"
13701#endif
13702char ia_openinfo ();
13703int
13704main ()
13705{
13706return ia_openinfo ();
13707 ;
13708 return 0;
13709}
13710_ACEOF
13711if ac_fn_c_try_link "$LINENO"; then :
13712 ac_cv_lib_iaf_ia_openinfo=yes
13713else
13714 ac_cv_lib_iaf_ia_openinfo=no
13715fi
13716rm -f core conftest.err conftest.$ac_objext \
13717 conftest$ac_exeext conftest.$ac_ext
13718LIBS=$ac_check_lib_save_LIBS
13719fi
13720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iaf_ia_openinfo" >&5
13721$as_echo "$ac_cv_lib_iaf_ia_openinfo" >&6; }
13722if test "x$ac_cv_lib_iaf_ia_openinfo" = xyes; then :
13723
13724 LIBS="$LIBS -liaf"
13725 for ac_func in set_id
13726do :
13727 ac_fn_c_check_func "$LINENO" "set_id" "ac_cv_func_set_id"
13728if test "x$ac_cv_func_set_id" = xyes; then :
13729 cat >>confdefs.h <<_ACEOF
13730#define HAVE_SET_ID 1
13731_ACEOF
13732 SSHDLIBS="$SSHDLIBS -liaf"
13733
13734$as_echo "#define HAVE_LIBIAF 1" >>confdefs.h
13735
13736
13737fi
13738done
13739
13740
13741fi
13742
13743LIBS="$saved_LIBS"
13744
13745### Configure cryptographic random number support
13746
13747# Check whether OpenSSL seeds itself
13748if test "x$openssl" = "xyes" ; then
13749 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's PRNG is internally seeded" >&5
13750$as_echo_n "checking whether OpenSSL's PRNG is internally seeded... " >&6; }
13751 if test "$cross_compiling" = yes; then :
13752
13753 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
13754$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
13755 # This is safe, since we will fatal() at runtime if
13756 # OpenSSL is not seeded correctly.
13757 OPENSSL_SEEDS_ITSELF=yes
13758
13759
13760else
13761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13762/* end confdefs.h. */
13763
13764 #include <string.h>
13765 #include <openssl/rand.h>
13766
13767int
13768main ()
13769{
13770
13771 exit(RAND_status() == 1 ? 0 : 1);
13772
13773 ;
13774 return 0;
13775}
13776_ACEOF
13777if ac_fn_c_try_run "$LINENO"; then :
13778
13779 OPENSSL_SEEDS_ITSELF=yes
13780 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13781$as_echo "yes" >&6; }
13782
13783else
13784
13785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13786$as_echo "no" >&6; }
13787
13788fi
13789rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13790 conftest.$ac_objext conftest.beam conftest.$ac_ext
13791fi
13792
13793fi
13794
13795# PRNGD TCP socket
13796
13797# Check whether --with-prngd-port was given.
13798if test "${with_prngd_port+set}" = set; then :
13799 withval=$with_prngd_port;
13800 case "$withval" in
13801 no)
13802 withval=""
13803 ;;
13804 [0-9]*)
13805 ;;
13806 *)
13807 as_fn_error $? "You must specify a numeric port number for --with-prngd-port" "$LINENO" 5
13808 ;;
13809 esac
13810 if test ! -z "$withval" ; then
13811 PRNGD_PORT="$withval"
13812
13813cat >>confdefs.h <<_ACEOF
13814#define PRNGD_PORT $PRNGD_PORT
13815_ACEOF
13816
13817 fi
13818
13819
13820fi
13821
13822
13823# PRNGD Unix domain socket
13824
13825# Check whether --with-prngd-socket was given.
13826if test "${with_prngd_socket+set}" = set; then :
13827 withval=$with_prngd_socket;
13828 case "$withval" in
13829 yes)
13830 withval="/var/run/egd-pool"
13831 ;;
13832 no)
13833 withval=""
13834 ;;
13835 /*)
13836 ;;
13837 *)
13838 as_fn_error $? "You must specify an absolute path to the entropy socket" "$LINENO" 5
13839 ;;
13840 esac
13841
13842 if test ! -z "$withval" ; then
13843 if test ! -z "$PRNGD_PORT" ; then
13844 as_fn_error $? "You may not specify both a PRNGD/EGD port and socket" "$LINENO" 5
13845 fi
13846 if test ! -r "$withval" ; then
13847 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Entropy socket is not readable" >&5
13848$as_echo "$as_me: WARNING: Entropy socket is not readable" >&2;}
13849 fi
13850 PRNGD_SOCKET="$withval"
13851
13852cat >>confdefs.h <<_ACEOF
13853#define PRNGD_SOCKET "$PRNGD_SOCKET"
13854_ACEOF
13855
13856 fi
13857
13858else
13859
13860 # Check for existing socket only if we don't have a random device already
13861 if test "x$OPENSSL_SEEDS_ITSELF" != "xyes" ; then
13862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRNGD/EGD socket" >&5
13863$as_echo_n "checking for PRNGD/EGD socket... " >&6; }
13864 # Insert other locations here
13865 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
13866 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
13867 PRNGD_SOCKET="$sock"
13868 cat >>confdefs.h <<_ACEOF
13869#define PRNGD_SOCKET "$PRNGD_SOCKET"
13870_ACEOF
13871
13872 break;
13873 fi
13874 done
13875 if test ! -z "$PRNGD_SOCKET" ; then
13876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRNGD_SOCKET" >&5
13877$as_echo "$PRNGD_SOCKET" >&6; }
13878 else
13879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13880$as_echo "not found" >&6; }
13881 fi
13882 fi
13883
13884
13885fi
13886
13887
13888# Which randomness source do we use?
13889if test ! -z "$PRNGD_PORT" ; then
13890 RAND_MSG="PRNGd port $PRNGD_PORT"
13891elif test ! -z "$PRNGD_SOCKET" ; then
13892 RAND_MSG="PRNGd socket $PRNGD_SOCKET"
13893elif test ! -z "$OPENSSL_SEEDS_ITSELF" ; then
13894
13895$as_echo "#define OPENSSL_PRNG_ONLY 1" >>confdefs.h
13896
13897 RAND_MSG="OpenSSL internal ONLY"
13898elif test "x$openssl" = "xno" ; then
13899 { $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
13900$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;}
13901else
13902 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
13903fi
13904
13905# Check for PAM libs
13906PAM_MSG="no"
13907
13908# Check whether --with-pam was given.
13909if test "${with_pam+set}" = set; then :
13910 withval=$with_pam;
13911 if test "x$withval" != "xno" ; then
13912 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
13913 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
13914 as_fn_error $? "PAM headers not found" "$LINENO" 5
13915 fi
13916
13917 saved_LIBS="$LIBS"
13918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13919$as_echo_n "checking for dlopen in -ldl... " >&6; }
13920if ${ac_cv_lib_dl_dlopen+:} false; then :
13921 $as_echo_n "(cached) " >&6
13922else
13923 ac_check_lib_save_LIBS=$LIBS
13924LIBS="-ldl $LIBS"
13925cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13926/* end confdefs.h. */
13927
13928/* Override any GCC internal prototype to avoid an error.
13929 Use char because int might match the return type of a GCC
13930 builtin and then its argument prototype would still apply. */
13931#ifdef __cplusplus
13932extern "C"
13933#endif
13934char dlopen ();
13935int
13936main ()
13937{
13938return dlopen ();
13939 ;
13940 return 0;
13941}
13942_ACEOF
13943if ac_fn_c_try_link "$LINENO"; then :
13944 ac_cv_lib_dl_dlopen=yes
13945else
13946 ac_cv_lib_dl_dlopen=no
13947fi
13948rm -f core conftest.err conftest.$ac_objext \
13949 conftest$ac_exeext conftest.$ac_ext
13950LIBS=$ac_check_lib_save_LIBS
13951fi
13952{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13953$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13954if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13955 cat >>confdefs.h <<_ACEOF
13956#define HAVE_LIBDL 1
13957_ACEOF
13958
13959 LIBS="-ldl $LIBS"
13960
13961fi
13962
13963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_set_item in -lpam" >&5
13964$as_echo_n "checking for pam_set_item in -lpam... " >&6; }
13965if ${ac_cv_lib_pam_pam_set_item+:} false; then :
13966 $as_echo_n "(cached) " >&6
13967else
13968 ac_check_lib_save_LIBS=$LIBS
13969LIBS="-lpam $LIBS"
13970cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13971/* end confdefs.h. */
13972
13973/* Override any GCC internal prototype to avoid an error.
13974 Use char because int might match the return type of a GCC
13975 builtin and then its argument prototype would still apply. */
13976#ifdef __cplusplus
13977extern "C"
13978#endif
13979char pam_set_item ();
13980int
13981main ()
13982{
13983return pam_set_item ();
13984 ;
13985 return 0;
13986}
13987_ACEOF
13988if ac_fn_c_try_link "$LINENO"; then :
13989 ac_cv_lib_pam_pam_set_item=yes
13990else
13991 ac_cv_lib_pam_pam_set_item=no
13992fi
13993rm -f core conftest.err conftest.$ac_objext \
13994 conftest$ac_exeext conftest.$ac_ext
13995LIBS=$ac_check_lib_save_LIBS
13996fi
13997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_set_item" >&5
13998$as_echo "$ac_cv_lib_pam_pam_set_item" >&6; }
13999if test "x$ac_cv_lib_pam_pam_set_item" = xyes; then :
14000 cat >>confdefs.h <<_ACEOF
14001#define HAVE_LIBPAM 1
14002_ACEOF
14003
14004 LIBS="-lpam $LIBS"
14005
14006else
14007 as_fn_error $? "*** libpam missing" "$LINENO" 5
14008fi
14009
14010 for ac_func in pam_getenvlist
14011do :
14012 ac_fn_c_check_func "$LINENO" "pam_getenvlist" "ac_cv_func_pam_getenvlist"
14013if test "x$ac_cv_func_pam_getenvlist" = xyes; then :
14014 cat >>confdefs.h <<_ACEOF
14015#define HAVE_PAM_GETENVLIST 1
14016_ACEOF
14017
14018fi
14019done
14020
14021 for ac_func in pam_putenv
14022do :
14023 ac_fn_c_check_func "$LINENO" "pam_putenv" "ac_cv_func_pam_putenv"
14024if test "x$ac_cv_func_pam_putenv" = xyes; then :
14025 cat >>confdefs.h <<_ACEOF
14026#define HAVE_PAM_PUTENV 1
14027_ACEOF
14028
14029fi
14030done
14031
14032 LIBS="$saved_LIBS"
14033
14034 PAM_MSG="yes"
14035
14036 SSHDLIBS="$SSHDLIBS -lpam"
14037
14038$as_echo "#define USE_PAM 1" >>confdefs.h
14039
14040
14041 if test $ac_cv_lib_dl_dlopen = yes; then
14042 case "$LIBS" in
14043 *-ldl*)
14044 # libdl already in LIBS
14045 ;;
14046 *)
14047 SSHDLIBS="$SSHDLIBS -ldl"
14048 ;;
14049 esac
14050 fi
14051 fi
14052
14053
14054fi
14055
14056
14057
14058# Check whether --with-pam-service was given.
14059if test "${with_pam_service+set}" = set; then :
14060 withval=$with_pam_service;
14061 if test "x$withval" != "xno" && \
14062 test "x$withval" != "xyes" ; then
14063
14064cat >>confdefs.h <<_ACEOF
14065#define SSHD_PAM_SERVICE "$withval"
14066_ACEOF
14067
14068 fi
14069
14070
14071fi
14072
14073
14074# Check for older PAM
14075if test "x$PAM_MSG" = "xyes" ; then
14076 # Check PAM strerror arguments (old PAM)
14077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pam_strerror takes only one argument" >&5
14078$as_echo_n "checking whether pam_strerror takes only one argument... " >&6; }
14079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14080/* end confdefs.h. */
14081
14082#include <stdlib.h>
14083#if defined(HAVE_SECURITY_PAM_APPL_H)
14084#include <security/pam_appl.h>
14085#elif defined (HAVE_PAM_PAM_APPL_H)
14086#include <pam/pam_appl.h>
14087#endif
14088
14089int
14090main ()
14091{
14092
14093(void)pam_strerror((pam_handle_t *)NULL, -1);
14094
14095 ;
14096 return 0;
14097}
14098_ACEOF
14099if ac_fn_c_try_compile "$LINENO"; then :
14100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14101$as_echo "no" >&6; }
14102else
14103
14104
14105$as_echo "#define HAVE_OLD_PAM 1" >>confdefs.h
14106
14107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14108$as_echo "yes" >&6; }
14109 PAM_MSG="yes (old library)"
14110
14111
14112fi
14113rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14114fi
14115
14116case "$host" in
14117*-*-cygwin*)
14118 SSH_PRIVSEP_USER=CYGWIN_SSH_PRIVSEP_USER
14119 ;;
14120*)
14121 SSH_PRIVSEP_USER=sshd
14122 ;;
14123esac
14124
14125# Check whether --with-privsep-user was given.
14126if test "${with_privsep_user+set}" = set; then :
14127 withval=$with_privsep_user;
14128 if test -n "$withval" && test "x$withval" != "xno" && \
14129 test "x${withval}" != "xyes"; then
14130 SSH_PRIVSEP_USER=$withval
14131 fi
14132
14133
14134fi
14135
14136if test "x$SSH_PRIVSEP_USER" = "xCYGWIN_SSH_PRIVSEP_USER" ; then
14137
14138cat >>confdefs.h <<_ACEOF
14139#define SSH_PRIVSEP_USER CYGWIN_SSH_PRIVSEP_USER
14140_ACEOF
14141
14142else
14143
14144cat >>confdefs.h <<_ACEOF
14145#define SSH_PRIVSEP_USER "$SSH_PRIVSEP_USER"
14146_ACEOF
14147
14148fi
14149
14150
14151if test "x$have_linux_no_new_privs" = "x1" ; then
14152ac_fn_c_check_decl "$LINENO" "SECCOMP_MODE_FILTER" "ac_cv_have_decl_SECCOMP_MODE_FILTER" "
14153 #include <sys/types.h>
14154 #include <linux/seccomp.h>
14155
14156"
14157if test "x$ac_cv_have_decl_SECCOMP_MODE_FILTER" = xyes; then :
14158 have_seccomp_filter=1
14159fi
14160
14161fi
14162if test "x$have_seccomp_filter" = "x1" ; then
14163{ $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel for seccomp_filter support" >&5
14164$as_echo_n "checking kernel for seccomp_filter support... " >&6; }
14165cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14166/* end confdefs.h. */
14167
14168 #include <errno.h>
14169 #include <elf.h>
14170 #include <linux/audit.h>
14171 #include <linux/seccomp.h>
14172 #include <stdlib.h>
14173 #include <sys/prctl.h>
14174
14175int
14176main ()
14177{
14178 int i = $seccomp_audit_arch;
14179 errno = 0;
14180 prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0);
14181 exit(errno == EFAULT ? 0 : 1);
14182 ;
14183 return 0;
14184}
14185_ACEOF
14186if ac_fn_c_try_link "$LINENO"; then :
14187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14188$as_echo "yes" >&6; }
14189else
14190
14191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14192$as_echo "no" >&6; }
14193 # Disable seccomp filter as a target
14194 have_seccomp_filter=0
14195
14196
14197fi
14198rm -f core conftest.err conftest.$ac_objext \
14199 conftest$ac_exeext conftest.$ac_ext
14200fi
14201
14202# Decide which sandbox style to use
14203sandbox_arg=""
14204
14205# Check whether --with-sandbox was given.
14206if test "${with_sandbox+set}" = set; then :
14207 withval=$with_sandbox;
14208 if test "x$withval" = "xyes" ; then
14209 sandbox_arg=""
14210 else
14211 sandbox_arg="$withval"
14212 fi
14213
14214
14215fi
14216
14217
14218# Some platforms (seems to be the ones that have a kernel poll(2)-type
14219# function with which they implement select(2)) use an extra file descriptor
14220# when calling select(2), which means we can't use the rlimit sandbox.
14221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if select works with descriptor rlimit" >&5
14222$as_echo_n "checking if select works with descriptor rlimit... " >&6; }
14223if test "$cross_compiling" = yes; then :
14224 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
14225$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
14226 select_works_with_rlimit=yes
14227
14228else
14229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14230/* end confdefs.h. */
14231
14232#include <sys/types.h>
14233#ifdef HAVE_SYS_TIME_H
14234# include <sys/time.h>
14235#endif
14236#include <sys/resource.h>
14237#ifdef HAVE_SYS_SELECT_H
14238# include <sys/select.h>
14239#endif
14240#include <errno.h>
14241#include <fcntl.h>
14242#include <stdlib.h>
14243
14244int
14245main ()
14246{
14247
14248 struct rlimit rl_zero;
14249 int fd, r;
14250 fd_set fds;
14251 struct timeval tv;
14252
14253 fd = open("/dev/null", O_RDONLY);
14254 FD_ZERO(&fds);
14255 FD_SET(fd, &fds);
14256 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
14257 setrlimit(RLIMIT_FSIZE, &rl_zero);
14258 setrlimit(RLIMIT_NOFILE, &rl_zero);
14259 tv.tv_sec = 1;
14260 tv.tv_usec = 0;
14261 r = select(fd+1, &fds, NULL, NULL, &tv);
14262 exit (r == -1 ? 1 : 0);
14263
14264 ;
14265 return 0;
14266}
14267_ACEOF
14268if ac_fn_c_try_run "$LINENO"; then :
14269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14270$as_echo "yes" >&6; }
14271 select_works_with_rlimit=yes
14272else
14273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14274$as_echo "no" >&6; }
14275 select_works_with_rlimit=no
14276fi
14277rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14278 conftest.$ac_objext conftest.beam conftest.$ac_ext
14279fi
14280
14281
14282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if setrlimit(RLIMIT_NOFILE,{0,0}) works" >&5
14283$as_echo_n "checking if setrlimit(RLIMIT_NOFILE,{0,0}) works... " >&6; }
14284if test "$cross_compiling" = yes; then :
14285 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
14286$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
14287 rlimit_nofile_zero_works=yes
14288
14289else
14290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14291/* end confdefs.h. */
14292
14293#include <sys/types.h>
14294#ifdef HAVE_SYS_TIME_H
14295# include <sys/time.h>
14296#endif
14297#include <sys/resource.h>
14298#include <errno.h>
14299#include <stdlib.h>
14300
14301int
14302main ()
14303{
14304
14305 struct rlimit rl_zero;
14306 int r;
14307
14308 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
14309 r = setrlimit(RLIMIT_NOFILE, &rl_zero);
14310 exit (r == -1 ? 1 : 0);
14311
14312 ;
14313 return 0;
14314}
14315_ACEOF
14316if ac_fn_c_try_run "$LINENO"; then :
14317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14318$as_echo "yes" >&6; }
14319 rlimit_nofile_zero_works=yes
14320else
14321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14322$as_echo "no" >&6; }
14323 rlimit_nofile_zero_works=no
14324fi
14325rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14326 conftest.$ac_objext conftest.beam conftest.$ac_ext
14327fi
14328
14329
14330{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if setrlimit RLIMIT_FSIZE works" >&5
14331$as_echo_n "checking if setrlimit RLIMIT_FSIZE works... " >&6; }
14332if test "$cross_compiling" = yes; then :
14333 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
14334$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
14335
14336else
14337 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14338/* end confdefs.h. */
14339
14340#include <sys/types.h>
14341#include <sys/resource.h>
14342#include <stdlib.h>
14343
14344int
14345main ()
14346{
14347
14348 struct rlimit rl_zero;
14349
14350 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
14351 exit(setrlimit(RLIMIT_FSIZE, &rl_zero) != 0);
14352
14353 ;
14354 return 0;
14355}
14356_ACEOF
14357if ac_fn_c_try_run "$LINENO"; then :
14358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14359$as_echo "yes" >&6; }
14360else
14361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14362$as_echo "no" >&6; }
14363
14364$as_echo "#define SANDBOX_SKIP_RLIMIT_FSIZE 1" >>confdefs.h
14365
14366fi
14367rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14368 conftest.$ac_objext conftest.beam conftest.$ac_ext
14369fi
14370
14371
14372if test "x$sandbox_arg" = "xpledge" || \
14373 ( test -z "$sandbox_arg" && test "x$ac_cv_func_pledge" = "xyes" ) ; then
14374 test "x$ac_cv_func_pledge" != "xyes" && \
14375 as_fn_error $? "pledge sandbox requires pledge(2) support" "$LINENO" 5
14376 SANDBOX_STYLE="pledge"
14377
14378$as_echo "#define SANDBOX_PLEDGE 1" >>confdefs.h
14379
14380elif test "x$sandbox_arg" = "xsystrace" || \
14381 ( test -z "$sandbox_arg" && test "x$have_systr_policy_kill" = "x1" ) ; then
14382 test "x$have_systr_policy_kill" != "x1" && \
14383 as_fn_error $? "systrace sandbox requires systrace headers and SYSTR_POLICY_KILL support" "$LINENO" 5
14384 SANDBOX_STYLE="systrace"
14385
14386$as_echo "#define SANDBOX_SYSTRACE 1" >>confdefs.h
14387
14388elif test "x$sandbox_arg" = "xdarwin" || \
14389 ( test -z "$sandbox_arg" && test "x$ac_cv_func_sandbox_init" = "xyes" && \
14390 test "x$ac_cv_header_sandbox_h" = "xyes") ; then
14391 test "x$ac_cv_func_sandbox_init" != "xyes" -o \
14392 "x$ac_cv_header_sandbox_h" != "xyes" && \
14393 as_fn_error $? "Darwin seatbelt sandbox requires sandbox.h and sandbox_init function" "$LINENO" 5
14394 SANDBOX_STYLE="darwin"
14395
14396$as_echo "#define SANDBOX_DARWIN 1" >>confdefs.h
14397
14398elif test "x$sandbox_arg" = "xseccomp_filter" || \
14399 ( test -z "$sandbox_arg" && \
14400 test "x$have_seccomp_filter" = "x1" && \
14401 test "x$ac_cv_header_elf_h" = "xyes" && \
14402 test "x$ac_cv_header_linux_audit_h" = "xyes" && \
14403 test "x$ac_cv_header_linux_filter_h" = "xyes" && \
14404 test "x$seccomp_audit_arch" != "x" && \
14405 test "x$have_linux_no_new_privs" = "x1" && \
14406 test "x$ac_cv_func_prctl" = "xyes" ) ; then
14407 test "x$seccomp_audit_arch" = "x" && \
14408 as_fn_error $? "seccomp_filter sandbox not supported on $host" "$LINENO" 5
14409 test "x$have_linux_no_new_privs" != "x1" && \
14410 as_fn_error $? "seccomp_filter sandbox requires PR_SET_NO_NEW_PRIVS" "$LINENO" 5
14411 test "x$have_seccomp_filter" != "x1" && \
14412 as_fn_error $? "seccomp_filter sandbox requires seccomp headers" "$LINENO" 5
14413 test "x$ac_cv_func_prctl" != "xyes" && \
14414 as_fn_error $? "seccomp_filter sandbox requires prctl function" "$LINENO" 5
14415 SANDBOX_STYLE="seccomp_filter"
14416
14417$as_echo "#define SANDBOX_SECCOMP_FILTER 1" >>confdefs.h
14418
14419elif test "x$sandbox_arg" = "xcapsicum" || \
14420 ( test -z "$sandbox_arg" && \
14421 test "x$ac_cv_header_sys_capsicum_h" = "xyes" && \
14422 test "x$ac_cv_func_cap_rights_limit" = "xyes") ; then
14423 test "x$ac_cv_header_sys_capsicum_h" != "xyes" && \
14424 as_fn_error $? "capsicum sandbox requires sys/capsicum.h header" "$LINENO" 5
14425 test "x$ac_cv_func_cap_rights_limit" != "xyes" && \
14426 as_fn_error $? "capsicum sandbox requires cap_rights_limit function" "$LINENO" 5
14427 SANDBOX_STYLE="capsicum"
14428
14429$as_echo "#define SANDBOX_CAPSICUM 1" >>confdefs.h
14430
14431elif test "x$sandbox_arg" = "xrlimit" || \
14432 ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" && \
14433 test "x$select_works_with_rlimit" = "xyes" && \
14434 test "x$rlimit_nofile_zero_works" = "xyes" ) ; then
14435 test "x$ac_cv_func_setrlimit" != "xyes" && \
14436 as_fn_error $? "rlimit sandbox requires setrlimit function" "$LINENO" 5
14437 test "x$select_works_with_rlimit" != "xyes" && \
14438 as_fn_error $? "rlimit sandbox requires select to work with rlimit" "$LINENO" 5
14439 SANDBOX_STYLE="rlimit"
14440
14441$as_echo "#define SANDBOX_RLIMIT 1" >>confdefs.h
14442
14443elif test "x$sandbox_arg" = "xsolaris" || \
14444 ( test -z "$sandbox_arg" && test "x$SOLARIS_PRIVS" = "xyes" ) ; then
14445 SANDBOX_STYLE="solaris"
14446
14447$as_echo "#define SANDBOX_SOLARIS 1" >>confdefs.h
14448
14449elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \
14450 test "x$sandbox_arg" = "xnone" || test "x$sandbox_arg" = "xnull" ; then
14451 SANDBOX_STYLE="none"
14452
14453$as_echo "#define SANDBOX_NULL 1" >>confdefs.h
14454
14455else
14456 as_fn_error $? "unsupported --with-sandbox" "$LINENO" 5
14457fi
14458
14459# Cheap hack to ensure NEWS-OS libraries are arranged right.
14460if test ! -z "$SONY" ; then
14461 LIBS="$LIBS -liberty";
14462fi
14463
14464# Check for long long datatypes
14465ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
14466if test "x$ac_cv_type_long_long" = xyes; then :
14467
14468cat >>confdefs.h <<_ACEOF
14469#define HAVE_LONG_LONG 1
14470_ACEOF
14471
14472
14473fi
14474ac_fn_c_check_type "$LINENO" "unsigned long long" "ac_cv_type_unsigned_long_long" "$ac_includes_default"
14475if test "x$ac_cv_type_unsigned_long_long" = xyes; then :
14476
14477cat >>confdefs.h <<_ACEOF
14478#define HAVE_UNSIGNED_LONG_LONG 1
14479_ACEOF
14480
14481
14482fi
14483ac_fn_c_check_type "$LINENO" "long double" "ac_cv_type_long_double" "$ac_includes_default"
14484if test "x$ac_cv_type_long_double" = xyes; then :
14485
14486cat >>confdefs.h <<_ACEOF
14487#define HAVE_LONG_DOUBLE 1
14488_ACEOF
14489
14490
14491fi
14492
14493
14494# Check datatype sizes
14495# The cast to long int works around a bug in the HP C Compiler
14496# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14497# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14498# This bug is HP SR number 8606223364.
14499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short int" >&5
14500$as_echo_n "checking size of short int... " >&6; }
14501if ${ac_cv_sizeof_short_int+:} false; then :
14502 $as_echo_n "(cached) " >&6
14503else
14504 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short int))" "ac_cv_sizeof_short_int" "$ac_includes_default"; then :
14505
14506else
14507 if test "$ac_cv_type_short_int" = yes; then
14508 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14509$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14510as_fn_error 77 "cannot compute sizeof (short int)
14511See \`config.log' for more details" "$LINENO" 5; }
14512 else
14513 ac_cv_sizeof_short_int=0
14514 fi
14515fi
14516
14517fi
14518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short_int" >&5
14519$as_echo "$ac_cv_sizeof_short_int" >&6; }
14520
14521
14522
14523cat >>confdefs.h <<_ACEOF
14524#define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
14525_ACEOF
14526
14527
14528# The cast to long int works around a bug in the HP C Compiler
14529# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14530# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14531# This bug is HP SR number 8606223364.
14532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
14533$as_echo_n "checking size of int... " >&6; }
14534if ${ac_cv_sizeof_int+:} false; then :
14535 $as_echo_n "(cached) " >&6
14536else
14537 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
14538
14539else
14540 if test "$ac_cv_type_int" = yes; then
14541 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14542$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14543as_fn_error 77 "cannot compute sizeof (int)
14544See \`config.log' for more details" "$LINENO" 5; }
14545 else
14546 ac_cv_sizeof_int=0
14547 fi
14548fi
14549
14550fi
14551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
14552$as_echo "$ac_cv_sizeof_int" >&6; }
14553
14554
14555
14556cat >>confdefs.h <<_ACEOF
14557#define SIZEOF_INT $ac_cv_sizeof_int
14558_ACEOF
14559
14560
14561# The cast to long int works around a bug in the HP C Compiler
14562# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14563# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14564# This bug is HP SR number 8606223364.
14565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5
14566$as_echo_n "checking size of long int... " >&6; }
14567if ${ac_cv_sizeof_long_int+:} false; then :
14568 $as_echo_n "(cached) " >&6
14569else
14570 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default"; then :
14571
14572else
14573 if test "$ac_cv_type_long_int" = yes; then
14574 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14575$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14576as_fn_error 77 "cannot compute sizeof (long int)
14577See \`config.log' for more details" "$LINENO" 5; }
14578 else
14579 ac_cv_sizeof_long_int=0
14580 fi
14581fi
14582
14583fi
14584{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_int" >&5
14585$as_echo "$ac_cv_sizeof_long_int" >&6; }
14586
14587
14588
14589cat >>confdefs.h <<_ACEOF
14590#define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
14591_ACEOF
14592
14593
14594# The cast to long int works around a bug in the HP C Compiler
14595# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14596# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14597# This bug is HP SR number 8606223364.
14598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5
14599$as_echo_n "checking size of long long int... " >&6; }
14600if ${ac_cv_sizeof_long_long_int+:} false; then :
14601 $as_echo_n "(cached) " >&6
14602else
14603 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then :
14604
14605else
14606 if test "$ac_cv_type_long_long_int" = yes; then
14607 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14608$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14609as_fn_error 77 "cannot compute sizeof (long long int)
14610See \`config.log' for more details" "$LINENO" 5; }
14611 else
14612 ac_cv_sizeof_long_long_int=0
14613 fi
14614fi
14615
14616fi
14617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long_int" >&5
14618$as_echo "$ac_cv_sizeof_long_long_int" >&6; }
14619
14620
14621
14622cat >>confdefs.h <<_ACEOF
14623#define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
14624_ACEOF
14625
14626
14627
14628# Sanity check long long for some platforms (AIX)
14629if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
14630 ac_cv_sizeof_long_long_int=0
14631fi
14632
14633# compute LLONG_MIN and LLONG_MAX if we don't know them.
14634if test -z "$have_llong_max"; then
14635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for max value of long long" >&5
14636$as_echo_n "checking for max value of long long... " >&6; }
14637 if test "$cross_compiling" = yes; then :
14638
14639 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
14640$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
14641
14642
14643else
14644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14645/* end confdefs.h. */
14646
14647#include <stdio.h>
14648/* Why is this so damn hard? */
14649#ifdef __GNUC__
14650# undef __GNUC__
14651#endif
14652#define __USE_ISOC99
14653#include <limits.h>
14654#define DATA "conftest.llminmax"
14655#define my_abs(a) ((a) < 0 ? ((a) * -1) : (a))
14656
14657/*
14658 * printf in libc on some platforms (eg old Tru64) does not understand %lld so
14659 * we do this the hard way.
14660 */
14661static int
14662fprint_ll(FILE *f, long long n)
14663{
14664 unsigned int i;
14665 int l[sizeof(long long) * 8];
14666
14667 if (n < 0)
14668 if (fprintf(f, "-") < 0)
14669 return -1;
14670 for (i = 0; n != 0; i++) {
14671 l[i] = my_abs(n % 10);
14672 n /= 10;
14673 }
14674 do {
14675 if (fprintf(f, "%d", l[--i]) < 0)
14676 return -1;
14677 } while (i != 0);
14678 if (fprintf(f, " ") < 0)
14679 return -1;
14680 return 0;
14681}
14682
14683int
14684main ()
14685{
14686
14687 FILE *f;
14688 long long i, llmin, llmax = 0;
14689
14690 if((f = fopen(DATA,"w")) == NULL)
14691 exit(1);
14692
14693#if defined(LLONG_MIN) && defined(LLONG_MAX)
14694 fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n");
14695 llmin = LLONG_MIN;
14696 llmax = LLONG_MAX;
14697#else
14698 fprintf(stderr, "Calculating LLONG_MIN and LLONG_MAX\n");
14699 /* This will work on one's complement and two's complement */
14700 for (i = 1; i > llmax; i <<= 1, i++)
14701 llmax = i;
14702 llmin = llmax + 1LL; /* wrap */
14703#endif
14704
14705 /* Sanity check */
14706 if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
14707 || llmax - 1 > llmax || llmin == llmax || llmin == 0
14708 || llmax == 0 || llmax < LONG_MAX || llmin > LONG_MIN) {
14709 fprintf(f, "unknown unknown\n");
14710 exit(2);
14711 }
14712
14713 if (fprint_ll(f, llmin) < 0)
14714 exit(3);
14715 if (fprint_ll(f, llmax) < 0)
14716 exit(4);
14717 if (fclose(f) < 0)
14718 exit(5);
14719 exit(0);
14720
14721 ;
14722 return 0;
14723}
14724_ACEOF
14725if ac_fn_c_try_run "$LINENO"; then :
14726
14727 llong_min=`$AWK '{print $1}' conftest.llminmax`
14728 llong_max=`$AWK '{print $2}' conftest.llminmax`
14729
14730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_max" >&5
14731$as_echo "$llong_max" >&6; }
14732
14733cat >>confdefs.h <<_ACEOF
14734#define LLONG_MAX ${llong_max}LL
14735_ACEOF
14736
14737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for min value of long long" >&5
14738$as_echo_n "checking for min value of long long... " >&6; }
14739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_min" >&5
14740$as_echo "$llong_min" >&6; }
14741
14742cat >>confdefs.h <<_ACEOF
14743#define LLONG_MIN ${llong_min}LL
14744_ACEOF
14745
14746
14747else
14748
14749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14750$as_echo "not found" >&6; }
14751
14752fi
14753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14754 conftest.$ac_objext conftest.beam conftest.$ac_ext
14755fi
14756
14757fi
14758
14759
14760# More checks for data types
14761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int type" >&5
14762$as_echo_n "checking for u_int type... " >&6; }
14763if ${ac_cv_have_u_int+:} false; then :
14764 $as_echo_n "(cached) " >&6
14765else
14766
14767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14768/* end confdefs.h. */
14769 #include <sys/types.h>
14770int
14771main ()
14772{
14773 u_int a; a = 1;
14774 ;
14775 return 0;
14776}
14777_ACEOF
14778if ac_fn_c_try_compile "$LINENO"; then :
14779 ac_cv_have_u_int="yes"
14780else
14781 ac_cv_have_u_int="no"
14782
14783fi
14784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14785
14786fi
14787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int" >&5
14788$as_echo "$ac_cv_have_u_int" >&6; }
14789if test "x$ac_cv_have_u_int" = "xyes" ; then
14790
14791$as_echo "#define HAVE_U_INT 1" >>confdefs.h
14792
14793 have_u_int=1
14794fi
14795
14796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types" >&5
14797$as_echo_n "checking for intXX_t types... " >&6; }
14798if ${ac_cv_have_intxx_t+:} false; then :
14799 $as_echo_n "(cached) " >&6
14800else
14801
14802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14803/* end confdefs.h. */
14804 #include <sys/types.h>
14805int
14806main ()
14807{
14808 int8_t a; int16_t b; int32_t c; a = b = c = 1;
14809 ;
14810 return 0;
14811}
14812_ACEOF
14813if ac_fn_c_try_compile "$LINENO"; then :
14814 ac_cv_have_intxx_t="yes"
14815else
14816 ac_cv_have_intxx_t="no"
14817
14818fi
14819rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14820
14821fi
14822{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_intxx_t" >&5
14823$as_echo "$ac_cv_have_intxx_t" >&6; }
14824if test "x$ac_cv_have_intxx_t" = "xyes" ; then
14825
14826$as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
14827
14828 have_intxx_t=1
14829fi
14830
14831if (test -z "$have_intxx_t" && \
14832 test "x$ac_cv_header_stdint_h" = "xyes")
14833then
14834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types in stdint.h" >&5
14835$as_echo_n "checking for intXX_t types in stdint.h... " >&6; }
14836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14837/* end confdefs.h. */
14838 #include <stdint.h>
14839int
14840main ()
14841{
14842 int8_t a; int16_t b; int32_t c; a = b = c = 1;
14843 ;
14844 return 0;
14845}
14846_ACEOF
14847if ac_fn_c_try_compile "$LINENO"; then :
14848
14849 $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
14850
14851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14852$as_echo "yes" >&6; }
14853
14854else
14855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14856$as_echo "no" >&6; }
14857
14858fi
14859rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14860fi
14861
14862{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int64_t type" >&5
14863$as_echo_n "checking for int64_t type... " >&6; }
14864if ${ac_cv_have_int64_t+:} false; then :
14865 $as_echo_n "(cached) " >&6
14866else
14867
14868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14869/* end confdefs.h. */
14870
14871#include <sys/types.h>
14872#ifdef HAVE_STDINT_H
14873# include <stdint.h>
14874#endif
14875#include <sys/socket.h>
14876#ifdef HAVE_SYS_BITYPES_H
14877# include <sys/bitypes.h>
14878#endif
14879
14880int
14881main ()
14882{
14883
14884int64_t a; a = 1;
14885
14886 ;
14887 return 0;
14888}
14889_ACEOF
14890if ac_fn_c_try_compile "$LINENO"; then :
14891 ac_cv_have_int64_t="yes"
14892else
14893 ac_cv_have_int64_t="no"
14894
14895fi
14896rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14897
14898fi
14899{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_int64_t" >&5
14900$as_echo "$ac_cv_have_int64_t" >&6; }
14901if test "x$ac_cv_have_int64_t" = "xyes" ; then
14902
14903$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
14904
14905fi
14906
14907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types" >&5
14908$as_echo_n "checking for u_intXX_t types... " >&6; }
14909if ${ac_cv_have_u_intxx_t+:} false; then :
14910 $as_echo_n "(cached) " >&6
14911else
14912
14913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14914/* end confdefs.h. */
14915 #include <sys/types.h>
14916int
14917main ()
14918{
14919 u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
14920 ;
14921 return 0;
14922}
14923_ACEOF
14924if ac_fn_c_try_compile "$LINENO"; then :
14925 ac_cv_have_u_intxx_t="yes"
14926else
14927 ac_cv_have_u_intxx_t="no"
14928
14929fi
14930rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14931
14932fi
14933{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_intxx_t" >&5
14934$as_echo "$ac_cv_have_u_intxx_t" >&6; }
14935if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
14936
14937$as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
14938
14939 have_u_intxx_t=1
14940fi
14941
14942if test -z "$have_u_intxx_t" ; then
14943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types in sys/socket.h" >&5
14944$as_echo_n "checking for u_intXX_t types in sys/socket.h... " >&6; }
14945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14946/* end confdefs.h. */
14947 #include <sys/socket.h>
14948int
14949main ()
14950{
14951 u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
14952 ;
14953 return 0;
14954}
14955_ACEOF
14956if ac_fn_c_try_compile "$LINENO"; then :
14957
14958 $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
14959
14960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14961$as_echo "yes" >&6; }
14962
14963else
14964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14965$as_echo "no" >&6; }
14966
14967fi
14968rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14969fi
14970
14971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t types" >&5
14972$as_echo_n "checking for u_int64_t types... " >&6; }
14973if ${ac_cv_have_u_int64_t+:} false; then :
14974 $as_echo_n "(cached) " >&6
14975else
14976
14977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14978/* end confdefs.h. */
14979 #include <sys/types.h>
14980int
14981main ()
14982{
14983 u_int64_t a; a = 1;
14984 ;
14985 return 0;
14986}
14987_ACEOF
14988if ac_fn_c_try_compile "$LINENO"; then :
14989 ac_cv_have_u_int64_t="yes"
14990else
14991 ac_cv_have_u_int64_t="no"
14992
14993fi
14994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14995
14996fi
14997{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int64_t" >&5
14998$as_echo "$ac_cv_have_u_int64_t" >&6; }
14999if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
15000
15001$as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
15002
15003 have_u_int64_t=1
15004fi
15005
15006if (test -z "$have_u_int64_t" && \
15007 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
15008then
15009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t type in sys/bitypes.h" >&5
15010$as_echo_n "checking for u_int64_t type in sys/bitypes.h... " >&6; }
15011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15012/* end confdefs.h. */
15013 #include <sys/bitypes.h>
15014int
15015main ()
15016{
15017 u_int64_t a; a = 1
15018 ;
15019 return 0;
15020}
15021_ACEOF
15022if ac_fn_c_try_compile "$LINENO"; then :
15023
15024 $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
15025
15026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15027$as_echo "yes" >&6; }
15028
15029else
15030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15031$as_echo "no" >&6; }
15032
15033fi
15034rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15035fi
15036
15037if test -z "$have_u_intxx_t" ; then
15038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types" >&5
15039$as_echo_n "checking for uintXX_t types... " >&6; }
15040if ${ac_cv_have_uintxx_t+:} false; then :
15041 $as_echo_n "(cached) " >&6
15042else
15043
15044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15045/* end confdefs.h. */
15046
15047#include <sys/types.h>
15048
15049int
15050main ()
15051{
15052
15053 uint8_t a;
15054 uint16_t b;
15055 uint32_t c;
15056 a = b = c = 1;
15057
15058 ;
15059 return 0;
15060}
15061_ACEOF
15062if ac_fn_c_try_compile "$LINENO"; then :
15063 ac_cv_have_uintxx_t="yes"
15064else
15065 ac_cv_have_uintxx_t="no"
15066
15067fi
15068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15069
15070fi
15071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_uintxx_t" >&5
15072$as_echo "$ac_cv_have_uintxx_t" >&6; }
15073 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
15074
15075$as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
15076
15077 fi
15078fi
15079
15080if (test -z "$have_uintxx_t" && \
15081 test "x$ac_cv_header_stdint_h" = "xyes")
15082then
15083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in stdint.h" >&5
15084$as_echo_n "checking for uintXX_t types in stdint.h... " >&6; }
15085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15086/* end confdefs.h. */
15087 #include <stdint.h>
15088int
15089main ()
15090{
15091 uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
15092 ;
15093 return 0;
15094}
15095_ACEOF
15096if ac_fn_c_try_compile "$LINENO"; then :
15097
15098 $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
15099
15100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15101$as_echo "yes" >&6; }
15102
15103else
15104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15105$as_echo "no" >&6; }
15106
15107fi
15108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15109fi
15110
15111if (test -z "$have_uintxx_t" && \
15112 test "x$ac_cv_header_inttypes_h" = "xyes")
15113then
15114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in inttypes.h" >&5
15115$as_echo_n "checking for uintXX_t types in inttypes.h... " >&6; }
15116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15117/* end confdefs.h. */
15118 #include <inttypes.h>
15119int
15120main ()
15121{
15122 uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
15123 ;
15124 return 0;
15125}
15126_ACEOF
15127if ac_fn_c_try_compile "$LINENO"; then :
15128
15129 $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
15130
15131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15132$as_echo "yes" >&6; }
15133
15134else
15135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15136$as_echo "no" >&6; }
15137
15138fi
15139rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15140fi
15141
15142if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
15143 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
15144then
15145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
15146$as_echo_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h... " >&6; }
15147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15148/* end confdefs.h. */
15149
15150#include <sys/bitypes.h>
15151
15152int
15153main ()
15154{
15155
15156 int8_t a; int16_t b; int32_t c;
15157 u_int8_t e; u_int16_t f; u_int32_t g;
15158 a = b = c = e = f = g = 1;
15159
15160 ;
15161 return 0;
15162}
15163_ACEOF
15164if ac_fn_c_try_compile "$LINENO"; then :
15165
15166 $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
15167
15168 $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
15169
15170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15171$as_echo "yes" >&6; }
15172
15173else
15174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15175$as_echo "no" >&6; }
15176
15177fi
15178rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15179fi
15180
15181
15182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_char" >&5
15183$as_echo_n "checking for u_char... " >&6; }
15184if ${ac_cv_have_u_char+:} false; then :
15185 $as_echo_n "(cached) " >&6
15186else
15187
15188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15189/* end confdefs.h. */
15190 #include <sys/types.h>
15191int
15192main ()
15193{
15194 u_char foo; foo = 125;
15195 ;
15196 return 0;
15197}
15198_ACEOF
15199if ac_fn_c_try_compile "$LINENO"; then :
15200 ac_cv_have_u_char="yes"
15201else
15202 ac_cv_have_u_char="no"
15203
15204fi
15205rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15206
15207fi
15208{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_char" >&5
15209$as_echo "$ac_cv_have_u_char" >&6; }
15210if test "x$ac_cv_have_u_char" = "xyes" ; then
15211
15212$as_echo "#define HAVE_U_CHAR 1" >>confdefs.h
15213
15214fi
15215
15216ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "
15217#include <sys/types.h>
15218#include <stdint.h>
15219
15220"
15221if test "x$ac_cv_type_intmax_t" = xyes; then :
15222
15223cat >>confdefs.h <<_ACEOF
15224#define HAVE_INTMAX_T 1
15225_ACEOF
15226
15227
15228fi
15229ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "
15230#include <sys/types.h>
15231#include <stdint.h>
15232
15233"
15234if test "x$ac_cv_type_uintmax_t" = xyes; then :
15235
15236cat >>confdefs.h <<_ACEOF
15237#define HAVE_UINTMAX_T 1
15238_ACEOF
15239
15240
15241fi
15242
15243
15244
15245 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
15246#include <sys/socket.h>
15247"
15248if test "x$ac_cv_type_socklen_t" = xyes; then :
15249
15250else
15251
15252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
15253$as_echo_n "checking for socklen_t equivalent... " >&6; }
15254 if ${curl_cv_socklen_t_equiv+:} false; then :
15255 $as_echo_n "(cached) " >&6
15256else
15257
15258 # Systems have either "struct sockaddr *" or
15259 # "void *" as the second argument to getpeername
15260 curl_cv_socklen_t_equiv=
15261 for arg2 in "struct sockaddr" void; do
15262 for t in int size_t unsigned long "unsigned long"; do
15263 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15264/* end confdefs.h. */
15265
15266 #include <sys/types.h>
15267 #include <sys/socket.h>
15268
15269 int getpeername (int, $arg2 *, $t *);
15270
15271int
15272main ()
15273{
15274
15275 $t len;
15276 getpeername(0,0,&len);
15277
15278 ;
15279 return 0;
15280}
15281_ACEOF
15282if ac_fn_c_try_compile "$LINENO"; then :
15283
15284 curl_cv_socklen_t_equiv="$t"
15285 break
15286
15287fi
15288rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15289 done
15290 done
15291
15292 if test "x$curl_cv_socklen_t_equiv" = x; then
15293 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
15294 fi
15295
15296fi
15297
15298 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_socklen_t_equiv" >&5
15299$as_echo "$curl_cv_socklen_t_equiv" >&6; }
15300
15301cat >>confdefs.h <<_ACEOF
15302#define socklen_t $curl_cv_socklen_t_equiv
15303_ACEOF
15304
15305fi
15306
15307
15308
15309ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
15310"
15311if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
15312
15313cat >>confdefs.h <<_ACEOF
15314#define HAVE_SIG_ATOMIC_T 1
15315_ACEOF
15316
15317
15318fi
15319
15320ac_fn_c_check_type "$LINENO" "fsblkcnt_t" "ac_cv_type_fsblkcnt_t" "
15321#include <sys/types.h>
15322#ifdef HAVE_SYS_BITYPES_H
15323#include <sys/bitypes.h>
15324#endif
15325#ifdef HAVE_SYS_STATFS_H
15326#include <sys/statfs.h>
15327#endif
15328#ifdef HAVE_SYS_STATVFS_H
15329#include <sys/statvfs.h>
15330#endif
15331
15332"
15333if test "x$ac_cv_type_fsblkcnt_t" = xyes; then :
15334
15335cat >>confdefs.h <<_ACEOF
15336#define HAVE_FSBLKCNT_T 1
15337_ACEOF
15338
15339
15340fi
15341ac_fn_c_check_type "$LINENO" "fsfilcnt_t" "ac_cv_type_fsfilcnt_t" "
15342#include <sys/types.h>
15343#ifdef HAVE_SYS_BITYPES_H
15344#include <sys/bitypes.h>
15345#endif
15346#ifdef HAVE_SYS_STATFS_H
15347#include <sys/statfs.h>
15348#endif
15349#ifdef HAVE_SYS_STATVFS_H
15350#include <sys/statvfs.h>
15351#endif
15352
15353"
15354if test "x$ac_cv_type_fsfilcnt_t" = xyes; then :
15355
15356cat >>confdefs.h <<_ACEOF
15357#define HAVE_FSFILCNT_T 1
15358_ACEOF
15359
15360
15361fi
15362
15363
15364ac_fn_c_check_member "$LINENO" "struct statfs" "f_flags" "ac_cv_member_struct_statfs_f_flags" "
15365#include <sys/types.h>
15366#ifdef HAVE_SYS_BITYPES_H
15367#include <sys/bitypes.h>
15368#endif
15369#ifdef HAVE_SYS_STATFS_H
15370#include <sys/statfs.h>
15371#endif
15372#ifdef HAVE_SYS_STATVFS_H
15373#include <sys/statvfs.h>
15374#endif
15375#ifdef HAVE_SYS_VFS_H
15376#include <sys/vfs.h>
15377#endif
15378
15379"
15380if test "x$ac_cv_member_struct_statfs_f_flags" = xyes; then :
15381
15382cat >>confdefs.h <<_ACEOF
15383#define HAVE_STRUCT_STATFS_F_FLAGS 1
15384_ACEOF
15385
15386
15387fi
15388
15389
15390
15391ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "#include <sys/types.h>
15392#include <netinet/in.h>
15393"
15394if test "x$ac_cv_type_in_addr_t" = xyes; then :
15395
15396cat >>confdefs.h <<_ACEOF
15397#define HAVE_IN_ADDR_T 1
15398_ACEOF
15399
15400
15401fi
15402ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "#include <sys/types.h>
15403#include <netinet/in.h>
15404"
15405if test "x$ac_cv_type_in_port_t" = xyes; then :
15406
15407cat >>confdefs.h <<_ACEOF
15408#define HAVE_IN_PORT_T 1
15409_ACEOF
15410
15411
15412fi
15413
15414
15415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size_t" >&5
15416$as_echo_n "checking for size_t... " >&6; }
15417if ${ac_cv_have_size_t+:} false; then :
15418 $as_echo_n "(cached) " >&6
15419else
15420
15421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15422/* end confdefs.h. */
15423 #include <sys/types.h>
15424int
15425main ()
15426{
15427 size_t foo; foo = 1235;
15428 ;
15429 return 0;
15430}
15431_ACEOF
15432if ac_fn_c_try_compile "$LINENO"; then :
15433 ac_cv_have_size_t="yes"
15434else
15435 ac_cv_have_size_t="no"
15436
15437fi
15438rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15439
15440fi
15441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t" >&5
15442$as_echo "$ac_cv_have_size_t" >&6; }
15443if test "x$ac_cv_have_size_t" = "xyes" ; then
15444
15445$as_echo "#define HAVE_SIZE_T 1" >>confdefs.h
15446
15447fi
15448
15449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
15450$as_echo_n "checking for ssize_t... " >&6; }
15451if ${ac_cv_have_ssize_t+:} false; then :
15452 $as_echo_n "(cached) " >&6
15453else
15454
15455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15456/* end confdefs.h. */
15457 #include <sys/types.h>
15458int
15459main ()
15460{
15461 ssize_t foo; foo = 1235;
15462 ;
15463 return 0;
15464}
15465_ACEOF
15466if ac_fn_c_try_compile "$LINENO"; then :
15467 ac_cv_have_ssize_t="yes"
15468else
15469 ac_cv_have_ssize_t="no"
15470
15471fi
15472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15473
15474fi
15475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ssize_t" >&5
15476$as_echo "$ac_cv_have_ssize_t" >&6; }
15477if test "x$ac_cv_have_ssize_t" = "xyes" ; then
15478
15479$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
15480
15481fi
15482
15483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
15484$as_echo_n "checking for clock_t... " >&6; }
15485if ${ac_cv_have_clock_t+:} false; then :
15486 $as_echo_n "(cached) " >&6
15487else
15488
15489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15490/* end confdefs.h. */
15491 #include <time.h>
15492int
15493main ()
15494{
15495 clock_t foo; foo = 1235;
15496 ;
15497 return 0;
15498}
15499_ACEOF
15500if ac_fn_c_try_compile "$LINENO"; then :
15501 ac_cv_have_clock_t="yes"
15502else
15503 ac_cv_have_clock_t="no"
15504
15505fi
15506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15507
15508fi
15509{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_clock_t" >&5
15510$as_echo "$ac_cv_have_clock_t" >&6; }
15511if test "x$ac_cv_have_clock_t" = "xyes" ; then
15512
15513$as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h
15514
15515fi
15516
15517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_family_t" >&5
15518$as_echo_n "checking for sa_family_t... " >&6; }
15519if ${ac_cv_have_sa_family_t+:} false; then :
15520 $as_echo_n "(cached) " >&6
15521else
15522
15523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15524/* end confdefs.h. */
15525
15526#include <sys/types.h>
15527#include <sys/socket.h>
15528
15529int
15530main ()
15531{
15532 sa_family_t foo; foo = 1235;
15533 ;
15534 return 0;
15535}
15536_ACEOF
15537if ac_fn_c_try_compile "$LINENO"; then :
15538 ac_cv_have_sa_family_t="yes"
15539else
15540 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15541/* end confdefs.h. */
15542
15543#include <sys/types.h>
15544#include <sys/socket.h>
15545#include <netinet/in.h>
15546
15547int
15548main ()
15549{
15550 sa_family_t foo; foo = 1235;
15551 ;
15552 return 0;
15553}
15554_ACEOF
15555if ac_fn_c_try_compile "$LINENO"; then :
15556 ac_cv_have_sa_family_t="yes"
15557else
15558 ac_cv_have_sa_family_t="no"
15559
15560fi
15561rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15562
15563fi
15564rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15565
15566fi
15567{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sa_family_t" >&5
15568$as_echo "$ac_cv_have_sa_family_t" >&6; }
15569if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
15570
15571$as_echo "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
15572
15573fi
15574
15575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pid_t" >&5
15576$as_echo_n "checking for pid_t... " >&6; }
15577if ${ac_cv_have_pid_t+:} false; then :
15578 $as_echo_n "(cached) " >&6
15579else
15580
15581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15582/* end confdefs.h. */
15583 #include <sys/types.h>
15584int
15585main ()
15586{
15587 pid_t foo; foo = 1235;
15588 ;
15589 return 0;
15590}
15591_ACEOF
15592if ac_fn_c_try_compile "$LINENO"; then :
15593 ac_cv_have_pid_t="yes"
15594else
15595 ac_cv_have_pid_t="no"
15596
15597fi
15598rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15599
15600fi
15601{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pid_t" >&5
15602$as_echo "$ac_cv_have_pid_t" >&6; }
15603if test "x$ac_cv_have_pid_t" = "xyes" ; then
15604
15605$as_echo "#define HAVE_PID_T 1" >>confdefs.h
15606
15607fi
15608
15609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mode_t" >&5
15610$as_echo_n "checking for mode_t... " >&6; }
15611if ${ac_cv_have_mode_t+:} false; then :
15612 $as_echo_n "(cached) " >&6
15613else
15614
15615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15616/* end confdefs.h. */
15617 #include <sys/types.h>
15618int
15619main ()
15620{
15621 mode_t foo; foo = 1235;
15622 ;
15623 return 0;
15624}
15625_ACEOF
15626if ac_fn_c_try_compile "$LINENO"; then :
15627 ac_cv_have_mode_t="yes"
15628else
15629 ac_cv_have_mode_t="no"
15630
15631fi
15632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15633
15634fi
15635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_mode_t" >&5
15636$as_echo "$ac_cv_have_mode_t" >&6; }
15637if test "x$ac_cv_have_mode_t" = "xyes" ; then
15638
15639$as_echo "#define HAVE_MODE_T 1" >>confdefs.h
15640
15641fi
15642
15643
15644{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
15645$as_echo_n "checking for struct sockaddr_storage... " >&6; }
15646if ${ac_cv_have_struct_sockaddr_storage+:} false; then :
15647 $as_echo_n "(cached) " >&6
15648else
15649
15650 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15651/* end confdefs.h. */
15652
15653#include <sys/types.h>
15654#include <sys/socket.h>
15655
15656int
15657main ()
15658{
15659 struct sockaddr_storage s;
15660 ;
15661 return 0;
15662}
15663_ACEOF
15664if ac_fn_c_try_compile "$LINENO"; then :
15665 ac_cv_have_struct_sockaddr_storage="yes"
15666else
15667 ac_cv_have_struct_sockaddr_storage="no"
15668
15669fi
15670rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15671
15672fi
15673{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_storage" >&5
15674$as_echo "$ac_cv_have_struct_sockaddr_storage" >&6; }
15675if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
15676
15677$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
15678
15679fi
15680
15681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6" >&5
15682$as_echo_n "checking for struct sockaddr_in6... " >&6; }
15683if ${ac_cv_have_struct_sockaddr_in6+:} false; then :
15684 $as_echo_n "(cached) " >&6
15685else
15686
15687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15688/* end confdefs.h. */
15689
15690#include <sys/types.h>
15691#include <netinet/in.h>
15692
15693int
15694main ()
15695{
15696 struct sockaddr_in6 s; s.sin6_family = 0;
15697 ;
15698 return 0;
15699}
15700_ACEOF
15701if ac_fn_c_try_compile "$LINENO"; then :
15702 ac_cv_have_struct_sockaddr_in6="yes"
15703else
15704 ac_cv_have_struct_sockaddr_in6="no"
15705
15706fi
15707rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15708
15709fi
15710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_in6" >&5
15711$as_echo "$ac_cv_have_struct_sockaddr_in6" >&6; }
15712if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
15713
15714$as_echo "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h
15715
15716fi
15717
15718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct in6_addr" >&5
15719$as_echo_n "checking for struct in6_addr... " >&6; }
15720if ${ac_cv_have_struct_in6_addr+:} false; then :
15721 $as_echo_n "(cached) " >&6
15722else
15723
15724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15725/* end confdefs.h. */
15726
15727#include <sys/types.h>
15728#include <netinet/in.h>
15729
15730int
15731main ()
15732{
15733 struct in6_addr s; s.s6_addr[0] = 0;
15734 ;
15735 return 0;
15736}
15737_ACEOF
15738if ac_fn_c_try_compile "$LINENO"; then :
15739 ac_cv_have_struct_in6_addr="yes"
15740else
15741 ac_cv_have_struct_in6_addr="no"
15742
15743fi
15744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15745
15746fi
15747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_in6_addr" >&5
15748$as_echo "$ac_cv_have_struct_in6_addr" >&6; }
15749if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
15750
15751$as_echo "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h
15752
15753
15754 ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "
15755#ifdef HAVE_SYS_TYPES_H
15756#include <sys/types.h>
15757#endif
15758#include <netinet/in.h>
15759
15760"
15761if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes; then :
15762
15763cat >>confdefs.h <<_ACEOF
15764#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
15765_ACEOF
15766
15767
15768fi
15769
15770fi
15771
15772{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct addrinfo" >&5
15773$as_echo_n "checking for struct addrinfo... " >&6; }
15774if ${ac_cv_have_struct_addrinfo+:} false; then :
15775 $as_echo_n "(cached) " >&6
15776else
15777
15778 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15779/* end confdefs.h. */
15780
15781#include <sys/types.h>
15782#include <sys/socket.h>
15783#include <netdb.h>
15784
15785int
15786main ()
15787{
15788 struct addrinfo s; s.ai_flags = AI_PASSIVE;
15789 ;
15790 return 0;
15791}
15792_ACEOF
15793if ac_fn_c_try_compile "$LINENO"; then :
15794 ac_cv_have_struct_addrinfo="yes"
15795else
15796 ac_cv_have_struct_addrinfo="no"
15797
15798fi
15799rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15800
15801fi
15802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_addrinfo" >&5
15803$as_echo "$ac_cv_have_struct_addrinfo" >&6; }
15804if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
15805
15806$as_echo "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
15807
15808fi
15809
15810{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
15811$as_echo_n "checking for struct timeval... " >&6; }
15812if ${ac_cv_have_struct_timeval+:} false; then :
15813 $as_echo_n "(cached) " >&6
15814else
15815
15816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15817/* end confdefs.h. */
15818 #include <sys/time.h>
15819int
15820main ()
15821{
15822 struct timeval tv; tv.tv_sec = 1;
15823 ;
15824 return 0;
15825}
15826_ACEOF
15827if ac_fn_c_try_compile "$LINENO"; then :
15828 ac_cv_have_struct_timeval="yes"
15829else
15830 ac_cv_have_struct_timeval="no"
15831
15832fi
15833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15834
15835fi
15836{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_timeval" >&5
15837$as_echo "$ac_cv_have_struct_timeval" >&6; }
15838if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
15839
15840$as_echo "#define HAVE_STRUCT_TIMEVAL 1" >>confdefs.h
15841
15842 have_struct_timeval=1
15843fi
15844
15845ac_fn_c_check_type "$LINENO" "struct timespec" "ac_cv_type_struct_timespec" "$ac_includes_default"
15846if test "x$ac_cv_type_struct_timespec" = xyes; then :
15847
15848cat >>confdefs.h <<_ACEOF
15849#define HAVE_STRUCT_TIMESPEC 1
15850_ACEOF
15851
15852
15853fi
15854
15855
15856# We need int64_t or else certain parts of the compile will fail.
15857if test "x$ac_cv_have_int64_t" = "xno" && \
15858 test "x$ac_cv_sizeof_long_int" != "x8" && \
15859 test "x$ac_cv_sizeof_long_long_int" = "x0" ; then
15860 echo "OpenSSH requires int64_t support. Contact your vendor or install"
15861 echo "an alternative compiler (I.E., GCC) before continuing."
15862 echo ""
15863 exit 1;
15864else
15865 if test "$cross_compiling" = yes; then :
15866 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
15867$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
15868
15869else
15870 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15871/* end confdefs.h. */
15872
15873#include <stdio.h>
15874#include <string.h>
15875#ifdef HAVE_SNPRINTF
15876main()
15877{
15878 char buf[50];
15879 char expected_out[50];
15880 int mazsize = 50 ;
15881#if (SIZEOF_LONG_INT == 8)
15882 long int num = 0x7fffffffffffffff;
15883#else
15884 long long num = 0x7fffffffffffffffll;
15885#endif
15886 strcpy(expected_out, "9223372036854775807");
15887 snprintf(buf, mazsize, "%lld", num);
15888 if(strcmp(buf, expected_out) != 0)
15889 exit(1);
15890 exit(0);
15891}
15892#else
15893main() { exit(0); }
15894#endif
15895
15896_ACEOF
15897if ac_fn_c_try_run "$LINENO"; then :
15898 true
15899else
15900 $as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
15901
15902fi
15903rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15904 conftest.$ac_objext conftest.beam conftest.$ac_ext
15905fi
15906
15907fi
15908
15909
15910# look for field 'ut_host' in header 'utmp.h'
15911 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
15912 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
15913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmp.h" >&5
15914$as_echo_n "checking for ut_host field in utmp.h... " >&6; }
15915 if eval \${$ossh_varname+:} false; then :
15916 $as_echo_n "(cached) " >&6
15917else
15918
15919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15920/* end confdefs.h. */
15921#include <utmp.h>
15922
15923_ACEOF
15924if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15925 $EGREP "ut_host" >/dev/null 2>&1; then :
15926 eval "$ossh_varname=yes"
15927else
15928 eval "$ossh_varname=no"
15929fi
15930rm -f conftest*
15931
15932fi
15933
15934 ossh_result=`eval 'echo $'"$ossh_varname"`
15935 if test -n "`echo $ossh_varname`"; then
15936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15937$as_echo "$ossh_result" >&6; }
15938 if test "x$ossh_result" = "xyes"; then
15939
15940$as_echo "#define HAVE_HOST_IN_UTMP 1" >>confdefs.h
15941
15942 fi
15943 else
15944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15945$as_echo "no" >&6; }
15946 fi
15947
15948
15949# look for field 'ut_host' in header 'utmpx.h'
15950 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
15951 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
15952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmpx.h" >&5
15953$as_echo_n "checking for ut_host field in utmpx.h... " >&6; }
15954 if eval \${$ossh_varname+:} false; then :
15955 $as_echo_n "(cached) " >&6
15956else
15957
15958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15959/* end confdefs.h. */
15960#include <utmpx.h>
15961
15962_ACEOF
15963if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15964 $EGREP "ut_host" >/dev/null 2>&1; then :
15965 eval "$ossh_varname=yes"
15966else
15967 eval "$ossh_varname=no"
15968fi
15969rm -f conftest*
15970
15971fi
15972
15973 ossh_result=`eval 'echo $'"$ossh_varname"`
15974 if test -n "`echo $ossh_varname`"; then
15975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15976$as_echo "$ossh_result" >&6; }
15977 if test "x$ossh_result" = "xyes"; then
15978
15979$as_echo "#define HAVE_HOST_IN_UTMPX 1" >>confdefs.h
15980
15981 fi
15982 else
15983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15984$as_echo "no" >&6; }
15985 fi
15986
15987
15988# look for field 'syslen' in header 'utmpx.h'
15989 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
15990 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
15991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for syslen field in utmpx.h" >&5
15992$as_echo_n "checking for syslen field in utmpx.h... " >&6; }
15993 if eval \${$ossh_varname+:} false; then :
15994 $as_echo_n "(cached) " >&6
15995else
15996
15997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15998/* end confdefs.h. */
15999#include <utmpx.h>
16000
16001_ACEOF
16002if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16003 $EGREP "syslen" >/dev/null 2>&1; then :
16004 eval "$ossh_varname=yes"
16005else
16006 eval "$ossh_varname=no"
16007fi
16008rm -f conftest*
16009
16010fi
16011
16012 ossh_result=`eval 'echo $'"$ossh_varname"`
16013 if test -n "`echo $ossh_varname`"; then
16014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16015$as_echo "$ossh_result" >&6; }
16016 if test "x$ossh_result" = "xyes"; then
16017
16018$as_echo "#define HAVE_SYSLEN_IN_UTMPX 1" >>confdefs.h
16019
16020 fi
16021 else
16022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16023$as_echo "no" >&6; }
16024 fi
16025
16026
16027# look for field 'ut_pid' in header 'utmp.h'
16028 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16029 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
16030 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_pid field in utmp.h" >&5
16031$as_echo_n "checking for ut_pid field in utmp.h... " >&6; }
16032 if eval \${$ossh_varname+:} false; then :
16033 $as_echo_n "(cached) " >&6
16034else
16035
16036 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16037/* end confdefs.h. */
16038#include <utmp.h>
16039
16040_ACEOF
16041if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16042 $EGREP "ut_pid" >/dev/null 2>&1; then :
16043 eval "$ossh_varname=yes"
16044else
16045 eval "$ossh_varname=no"
16046fi
16047rm -f conftest*
16048
16049fi
16050
16051 ossh_result=`eval 'echo $'"$ossh_varname"`
16052 if test -n "`echo $ossh_varname`"; then
16053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16054$as_echo "$ossh_result" >&6; }
16055 if test "x$ossh_result" = "xyes"; then
16056
16057$as_echo "#define HAVE_PID_IN_UTMP 1" >>confdefs.h
16058
16059 fi
16060 else
16061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16062$as_echo "no" >&6; }
16063 fi
16064
16065
16066# look for field 'ut_type' in header 'utmp.h'
16067 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16068 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
16069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmp.h" >&5
16070$as_echo_n "checking for ut_type field in utmp.h... " >&6; }
16071 if eval \${$ossh_varname+:} false; then :
16072 $as_echo_n "(cached) " >&6
16073else
16074
16075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16076/* end confdefs.h. */
16077#include <utmp.h>
16078
16079_ACEOF
16080if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16081 $EGREP "ut_type" >/dev/null 2>&1; then :
16082 eval "$ossh_varname=yes"
16083else
16084 eval "$ossh_varname=no"
16085fi
16086rm -f conftest*
16087
16088fi
16089
16090 ossh_result=`eval 'echo $'"$ossh_varname"`
16091 if test -n "`echo $ossh_varname`"; then
16092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16093$as_echo "$ossh_result" >&6; }
16094 if test "x$ossh_result" = "xyes"; then
16095
16096$as_echo "#define HAVE_TYPE_IN_UTMP 1" >>confdefs.h
16097
16098 fi
16099 else
16100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16101$as_echo "no" >&6; }
16102 fi
16103
16104
16105# look for field 'ut_type' in header 'utmpx.h'
16106 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16107 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
16108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmpx.h" >&5
16109$as_echo_n "checking for ut_type field in utmpx.h... " >&6; }
16110 if eval \${$ossh_varname+:} false; then :
16111 $as_echo_n "(cached) " >&6
16112else
16113
16114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16115/* end confdefs.h. */
16116#include <utmpx.h>
16117
16118_ACEOF
16119if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16120 $EGREP "ut_type" >/dev/null 2>&1; then :
16121 eval "$ossh_varname=yes"
16122else
16123 eval "$ossh_varname=no"
16124fi
16125rm -f conftest*
16126
16127fi
16128
16129 ossh_result=`eval 'echo $'"$ossh_varname"`
16130 if test -n "`echo $ossh_varname`"; then
16131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16132$as_echo "$ossh_result" >&6; }
16133 if test "x$ossh_result" = "xyes"; then
16134
16135$as_echo "#define HAVE_TYPE_IN_UTMPX 1" >>confdefs.h
16136
16137 fi
16138 else
16139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16140$as_echo "no" >&6; }
16141 fi
16142
16143
16144# look for field 'ut_tv' in header 'utmp.h'
16145 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16146 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
16147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmp.h" >&5
16148$as_echo_n "checking for ut_tv field in utmp.h... " >&6; }
16149 if eval \${$ossh_varname+:} false; then :
16150 $as_echo_n "(cached) " >&6
16151else
16152
16153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16154/* end confdefs.h. */
16155#include <utmp.h>
16156
16157_ACEOF
16158if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16159 $EGREP "ut_tv" >/dev/null 2>&1; then :
16160 eval "$ossh_varname=yes"
16161else
16162 eval "$ossh_varname=no"
16163fi
16164rm -f conftest*
16165
16166fi
16167
16168 ossh_result=`eval 'echo $'"$ossh_varname"`
16169 if test -n "`echo $ossh_varname`"; then
16170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16171$as_echo "$ossh_result" >&6; }
16172 if test "x$ossh_result" = "xyes"; then
16173
16174$as_echo "#define HAVE_TV_IN_UTMP 1" >>confdefs.h
16175
16176 fi
16177 else
16178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16179$as_echo "no" >&6; }
16180 fi
16181
16182
16183# look for field 'ut_id' in header 'utmp.h'
16184 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16185 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
16186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmp.h" >&5
16187$as_echo_n "checking for ut_id field in utmp.h... " >&6; }
16188 if eval \${$ossh_varname+:} false; then :
16189 $as_echo_n "(cached) " >&6
16190else
16191
16192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16193/* end confdefs.h. */
16194#include <utmp.h>
16195
16196_ACEOF
16197if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16198 $EGREP "ut_id" >/dev/null 2>&1; then :
16199 eval "$ossh_varname=yes"
16200else
16201 eval "$ossh_varname=no"
16202fi
16203rm -f conftest*
16204
16205fi
16206
16207 ossh_result=`eval 'echo $'"$ossh_varname"`
16208 if test -n "`echo $ossh_varname`"; then
16209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16210$as_echo "$ossh_result" >&6; }
16211 if test "x$ossh_result" = "xyes"; then
16212
16213$as_echo "#define HAVE_ID_IN_UTMP 1" >>confdefs.h
16214
16215 fi
16216 else
16217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16218$as_echo "no" >&6; }
16219 fi
16220
16221
16222# look for field 'ut_id' in header 'utmpx.h'
16223 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16224 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
16225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmpx.h" >&5
16226$as_echo_n "checking for ut_id field in utmpx.h... " >&6; }
16227 if eval \${$ossh_varname+:} false; then :
16228 $as_echo_n "(cached) " >&6
16229else
16230
16231 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16232/* end confdefs.h. */
16233#include <utmpx.h>
16234
16235_ACEOF
16236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16237 $EGREP "ut_id" >/dev/null 2>&1; then :
16238 eval "$ossh_varname=yes"
16239else
16240 eval "$ossh_varname=no"
16241fi
16242rm -f conftest*
16243
16244fi
16245
16246 ossh_result=`eval 'echo $'"$ossh_varname"`
16247 if test -n "`echo $ossh_varname`"; then
16248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16249$as_echo "$ossh_result" >&6; }
16250 if test "x$ossh_result" = "xyes"; then
16251
16252$as_echo "#define HAVE_ID_IN_UTMPX 1" >>confdefs.h
16253
16254 fi
16255 else
16256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16257$as_echo "no" >&6; }
16258 fi
16259
16260
16261# look for field 'ut_addr' in header 'utmp.h'
16262 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16263 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
16264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmp.h" >&5
16265$as_echo_n "checking for ut_addr field in utmp.h... " >&6; }
16266 if eval \${$ossh_varname+:} false; then :
16267 $as_echo_n "(cached) " >&6
16268else
16269
16270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16271/* end confdefs.h. */
16272#include <utmp.h>
16273
16274_ACEOF
16275if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16276 $EGREP "ut_addr" >/dev/null 2>&1; then :
16277 eval "$ossh_varname=yes"
16278else
16279 eval "$ossh_varname=no"
16280fi
16281rm -f conftest*
16282
16283fi
16284
16285 ossh_result=`eval 'echo $'"$ossh_varname"`
16286 if test -n "`echo $ossh_varname`"; then
16287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16288$as_echo "$ossh_result" >&6; }
16289 if test "x$ossh_result" = "xyes"; then
16290
16291$as_echo "#define HAVE_ADDR_IN_UTMP 1" >>confdefs.h
16292
16293 fi
16294 else
16295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16296$as_echo "no" >&6; }
16297 fi
16298
16299
16300# look for field 'ut_addr' in header 'utmpx.h'
16301 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16302 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
16303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmpx.h" >&5
16304$as_echo_n "checking for ut_addr field in utmpx.h... " >&6; }
16305 if eval \${$ossh_varname+:} false; then :
16306 $as_echo_n "(cached) " >&6
16307else
16308
16309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16310/* end confdefs.h. */
16311#include <utmpx.h>
16312
16313_ACEOF
16314if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16315 $EGREP "ut_addr" >/dev/null 2>&1; then :
16316 eval "$ossh_varname=yes"
16317else
16318 eval "$ossh_varname=no"
16319fi
16320rm -f conftest*
16321
16322fi
16323
16324 ossh_result=`eval 'echo $'"$ossh_varname"`
16325 if test -n "`echo $ossh_varname`"; then
16326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16327$as_echo "$ossh_result" >&6; }
16328 if test "x$ossh_result" = "xyes"; then
16329
16330$as_echo "#define HAVE_ADDR_IN_UTMPX 1" >>confdefs.h
16331
16332 fi
16333 else
16334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16335$as_echo "no" >&6; }
16336 fi
16337
16338
16339# look for field 'ut_addr_v6' in header 'utmp.h'
16340 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16341 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
16342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmp.h" >&5
16343$as_echo_n "checking for ut_addr_v6 field in utmp.h... " >&6; }
16344 if eval \${$ossh_varname+:} false; then :
16345 $as_echo_n "(cached) " >&6
16346else
16347
16348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16349/* end confdefs.h. */
16350#include <utmp.h>
16351
16352_ACEOF
16353if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16354 $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
16355 eval "$ossh_varname=yes"
16356else
16357 eval "$ossh_varname=no"
16358fi
16359rm -f conftest*
16360
16361fi
16362
16363 ossh_result=`eval 'echo $'"$ossh_varname"`
16364 if test -n "`echo $ossh_varname`"; then
16365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16366$as_echo "$ossh_result" >&6; }
16367 if test "x$ossh_result" = "xyes"; then
16368
16369$as_echo "#define HAVE_ADDR_V6_IN_UTMP 1" >>confdefs.h
16370
16371 fi
16372 else
16373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16374$as_echo "no" >&6; }
16375 fi
16376
16377
16378# look for field 'ut_addr_v6' in header 'utmpx.h'
16379 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16380 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
16381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmpx.h" >&5
16382$as_echo_n "checking for ut_addr_v6 field in utmpx.h... " >&6; }
16383 if eval \${$ossh_varname+:} false; then :
16384 $as_echo_n "(cached) " >&6
16385else
16386
16387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16388/* end confdefs.h. */
16389#include <utmpx.h>
16390
16391_ACEOF
16392if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16393 $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
16394 eval "$ossh_varname=yes"
16395else
16396 eval "$ossh_varname=no"
16397fi
16398rm -f conftest*
16399
16400fi
16401
16402 ossh_result=`eval 'echo $'"$ossh_varname"`
16403 if test -n "`echo $ossh_varname`"; then
16404 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16405$as_echo "$ossh_result" >&6; }
16406 if test "x$ossh_result" = "xyes"; then
16407
16408$as_echo "#define HAVE_ADDR_V6_IN_UTMPX 1" >>confdefs.h
16409
16410 fi
16411 else
16412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16413$as_echo "no" >&6; }
16414 fi
16415
16416
16417# look for field 'ut_exit' in header 'utmp.h'
16418 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16419 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_exit field in utmp.h" >&5
16421$as_echo_n "checking for ut_exit field in utmp.h... " >&6; }
16422 if eval \${$ossh_varname+:} false; then :
16423 $as_echo_n "(cached) " >&6
16424else
16425
16426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16427/* end confdefs.h. */
16428#include <utmp.h>
16429
16430_ACEOF
16431if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16432 $EGREP "ut_exit" >/dev/null 2>&1; then :
16433 eval "$ossh_varname=yes"
16434else
16435 eval "$ossh_varname=no"
16436fi
16437rm -f conftest*
16438
16439fi
16440
16441 ossh_result=`eval 'echo $'"$ossh_varname"`
16442 if test -n "`echo $ossh_varname`"; then
16443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16444$as_echo "$ossh_result" >&6; }
16445 if test "x$ossh_result" = "xyes"; then
16446
16447$as_echo "#define HAVE_EXIT_IN_UTMP 1" >>confdefs.h
16448
16449 fi
16450 else
16451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16452$as_echo "no" >&6; }
16453 fi
16454
16455
16456# look for field 'ut_time' in header 'utmp.h'
16457 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16458 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
16459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmp.h" >&5
16460$as_echo_n "checking for ut_time field in utmp.h... " >&6; }
16461 if eval \${$ossh_varname+:} false; then :
16462 $as_echo_n "(cached) " >&6
16463else
16464
16465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16466/* end confdefs.h. */
16467#include <utmp.h>
16468
16469_ACEOF
16470if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16471 $EGREP "ut_time" >/dev/null 2>&1; then :
16472 eval "$ossh_varname=yes"
16473else
16474 eval "$ossh_varname=no"
16475fi
16476rm -f conftest*
16477
16478fi
16479
16480 ossh_result=`eval 'echo $'"$ossh_varname"`
16481 if test -n "`echo $ossh_varname`"; then
16482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16483$as_echo "$ossh_result" >&6; }
16484 if test "x$ossh_result" = "xyes"; then
16485
16486$as_echo "#define HAVE_TIME_IN_UTMP 1" >>confdefs.h
16487
16488 fi
16489 else
16490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16491$as_echo "no" >&6; }
16492 fi
16493
16494
16495# look for field 'ut_time' in header 'utmpx.h'
16496 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16497 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
16498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmpx.h" >&5
16499$as_echo_n "checking for ut_time field in utmpx.h... " >&6; }
16500 if eval \${$ossh_varname+:} false; then :
16501 $as_echo_n "(cached) " >&6
16502else
16503
16504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16505/* end confdefs.h. */
16506#include <utmpx.h>
16507
16508_ACEOF
16509if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16510 $EGREP "ut_time" >/dev/null 2>&1; then :
16511 eval "$ossh_varname=yes"
16512else
16513 eval "$ossh_varname=no"
16514fi
16515rm -f conftest*
16516
16517fi
16518
16519 ossh_result=`eval 'echo $'"$ossh_varname"`
16520 if test -n "`echo $ossh_varname`"; then
16521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16522$as_echo "$ossh_result" >&6; }
16523 if test "x$ossh_result" = "xyes"; then
16524
16525$as_echo "#define HAVE_TIME_IN_UTMPX 1" >>confdefs.h
16526
16527 fi
16528 else
16529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16530$as_echo "no" >&6; }
16531 fi
16532
16533
16534# look for field 'ut_tv' in header 'utmpx.h'
16535 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16536 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
16537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmpx.h" >&5
16538$as_echo_n "checking for ut_tv field in utmpx.h... " >&6; }
16539 if eval \${$ossh_varname+:} false; then :
16540 $as_echo_n "(cached) " >&6
16541else
16542
16543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16544/* end confdefs.h. */
16545#include <utmpx.h>
16546
16547_ACEOF
16548if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16549 $EGREP "ut_tv" >/dev/null 2>&1; then :
16550 eval "$ossh_varname=yes"
16551else
16552 eval "$ossh_varname=no"
16553fi
16554rm -f conftest*
16555
16556fi
16557
16558 ossh_result=`eval 'echo $'"$ossh_varname"`
16559 if test -n "`echo $ossh_varname`"; then
16560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16561$as_echo "$ossh_result" >&6; }
16562 if test "x$ossh_result" = "xyes"; then
16563
16564$as_echo "#define HAVE_TV_IN_UTMPX 1" >>confdefs.h
16565
16566 fi
16567 else
16568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16569$as_echo "no" >&6; }
16570 fi
16571
16572
16573ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
16574if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
16575
16576cat >>confdefs.h <<_ACEOF
16577#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
16578_ACEOF
16579
16580
16581fi
16582
16583ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim" "ac_cv_member_struct_stat_st_mtim" "$ac_includes_default"
16584if test "x$ac_cv_member_struct_stat_st_mtim" = xyes; then :
16585
16586cat >>confdefs.h <<_ACEOF
16587#define HAVE_STRUCT_STAT_ST_MTIM 1
16588_ACEOF
16589
16590
16591fi
16592
16593ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime" "ac_cv_member_struct_stat_st_mtime" "$ac_includes_default"
16594if test "x$ac_cv_member_struct_stat_st_mtime" = xyes; then :
16595
16596cat >>confdefs.h <<_ACEOF
16597#define HAVE_STRUCT_STAT_ST_MTIME 1
16598_ACEOF
16599
16600
16601fi
16602
16603ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
16604#include <sys/types.h>
16605#include <pwd.h>
16606
16607"
16608if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
16609
16610cat >>confdefs.h <<_ACEOF
16611#define HAVE_STRUCT_PASSWD_PW_GECOS 1
16612_ACEOF
16613
16614
16615fi
16616ac_fn_c_check_member "$LINENO" "struct passwd" "pw_class" "ac_cv_member_struct_passwd_pw_class" "
16617#include <sys/types.h>
16618#include <pwd.h>
16619
16620"
16621if test "x$ac_cv_member_struct_passwd_pw_class" = xyes; then :
16622
16623cat >>confdefs.h <<_ACEOF
16624#define HAVE_STRUCT_PASSWD_PW_CLASS 1
16625_ACEOF
16626
16627
16628fi
16629ac_fn_c_check_member "$LINENO" "struct passwd" "pw_change" "ac_cv_member_struct_passwd_pw_change" "
16630#include <sys/types.h>
16631#include <pwd.h>
16632
16633"
16634if test "x$ac_cv_member_struct_passwd_pw_change" = xyes; then :
16635
16636cat >>confdefs.h <<_ACEOF
16637#define HAVE_STRUCT_PASSWD_PW_CHANGE 1
16638_ACEOF
16639
16640
16641fi
16642ac_fn_c_check_member "$LINENO" "struct passwd" "pw_expire" "ac_cv_member_struct_passwd_pw_expire" "
16643#include <sys/types.h>
16644#include <pwd.h>
16645
16646"
16647if test "x$ac_cv_member_struct_passwd_pw_expire" = xyes; then :
16648
16649cat >>confdefs.h <<_ACEOF
16650#define HAVE_STRUCT_PASSWD_PW_EXPIRE 1
16651_ACEOF
16652
16653
16654fi
16655
16656
16657ac_fn_c_check_member "$LINENO" "struct __res_state" "retrans" "ac_cv_member_struct___res_state_retrans" "
16658#include <stdio.h>
16659#if HAVE_SYS_TYPES_H
16660# include <sys/types.h>
16661#endif
16662#include <netinet/in.h>
16663#include <arpa/nameser.h>
16664#include <resolv.h>
16665
16666"
16667if test "x$ac_cv_member_struct___res_state_retrans" = xyes; then :
16668
16669else
16670
16671$as_echo "#define __res_state state" >>confdefs.h
16672
16673fi
16674
16675
16676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ss_family field in struct sockaddr_storage" >&5
16677$as_echo_n "checking for ss_family field in struct sockaddr_storage... " >&6; }
16678if ${ac_cv_have_ss_family_in_struct_ss+:} false; then :
16679 $as_echo_n "(cached) " >&6
16680else
16681
16682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16683/* end confdefs.h. */
16684
16685#include <sys/types.h>
16686#include <sys/socket.h>
16687
16688int
16689main ()
16690{
16691 struct sockaddr_storage s; s.ss_family = 1;
16692 ;
16693 return 0;
16694}
16695_ACEOF
16696if ac_fn_c_try_compile "$LINENO"; then :
16697 ac_cv_have_ss_family_in_struct_ss="yes"
16698else
16699 ac_cv_have_ss_family_in_struct_ss="no"
16700fi
16701rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16702
16703fi
16704{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ss_family_in_struct_ss" >&5
16705$as_echo "$ac_cv_have_ss_family_in_struct_ss" >&6; }
16706if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
16707
16708$as_echo "#define HAVE_SS_FAMILY_IN_SS 1" >>confdefs.h
16709
16710fi
16711
16712{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __ss_family field in struct sockaddr_storage" >&5
16713$as_echo_n "checking for __ss_family field in struct sockaddr_storage... " >&6; }
16714if ${ac_cv_have___ss_family_in_struct_ss+:} false; then :
16715 $as_echo_n "(cached) " >&6
16716else
16717
16718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16719/* end confdefs.h. */
16720
16721#include <sys/types.h>
16722#include <sys/socket.h>
16723
16724int
16725main ()
16726{
16727 struct sockaddr_storage s; s.__ss_family = 1;
16728 ;
16729 return 0;
16730}
16731_ACEOF
16732if ac_fn_c_try_compile "$LINENO"; then :
16733 ac_cv_have___ss_family_in_struct_ss="yes"
16734else
16735 ac_cv_have___ss_family_in_struct_ss="no"
16736
16737fi
16738rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16739
16740fi
16741{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___ss_family_in_struct_ss" >&5
16742$as_echo "$ac_cv_have___ss_family_in_struct_ss" >&6; }
16743if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
16744
16745$as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
16746
16747fi
16748
16749{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_accrights field in struct msghdr" >&5
16750$as_echo_n "checking for msg_accrights field in struct msghdr... " >&6; }
16751if ${ac_cv_have_accrights_in_msghdr+:} false; then :
16752 $as_echo_n "(cached) " >&6
16753else
16754
16755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16756/* end confdefs.h. */
16757
16758#include <sys/types.h>
16759#include <sys/socket.h>
16760#include <sys/uio.h>
16761
16762int
16763main ()
16764{
16765
16766#ifdef msg_accrights
16767#error "msg_accrights is a macro"
16768exit(1);
16769#endif
16770struct msghdr m;
16771m.msg_accrights = 0;
16772exit(0);
16773
16774 ;
16775 return 0;
16776}
16777_ACEOF
16778if ac_fn_c_try_compile "$LINENO"; then :
16779 ac_cv_have_accrights_in_msghdr="yes"
16780else
16781 ac_cv_have_accrights_in_msghdr="no"
16782
16783fi
16784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16785
16786fi
16787{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_accrights_in_msghdr" >&5
16788$as_echo "$ac_cv_have_accrights_in_msghdr" >&6; }
16789if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
16790
16791$as_echo "#define HAVE_ACCRIGHTS_IN_MSGHDR 1" >>confdefs.h
16792
16793fi
16794
16795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct statvfs.f_fsid is integral type" >&5
16796$as_echo_n "checking if struct statvfs.f_fsid is integral type... " >&6; }
16797cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16798/* end confdefs.h. */
16799
16800#include <sys/param.h>
16801#include <sys/stat.h>
16802#ifdef HAVE_SYS_TIME_H
16803# include <sys/time.h>
16804#endif
16805#ifdef HAVE_SYS_MOUNT_H
16806#include <sys/mount.h>
16807#endif
16808#ifdef HAVE_SYS_STATVFS_H
16809#include <sys/statvfs.h>
16810#endif
16811
16812int
16813main ()
16814{
16815 struct statvfs s; s.f_fsid = 0;
16816 ;
16817 return 0;
16818}
16819_ACEOF
16820if ac_fn_c_try_compile "$LINENO"; then :
16821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16822$as_echo "yes" >&6; }
16823else
16824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16825$as_echo "no" >&6; }
16826
16827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fsid_t has member val" >&5
16828$as_echo_n "checking if fsid_t has member val... " >&6; }
16829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16830/* end confdefs.h. */
16831
16832#include <sys/types.h>
16833#include <sys/statvfs.h>
16834
16835int
16836main ()
16837{
16838 fsid_t t; t.val[0] = 0;
16839 ;
16840 return 0;
16841}
16842_ACEOF
16843if ac_fn_c_try_compile "$LINENO"; then :
16844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16845$as_echo "yes" >&6; }
16846
16847$as_echo "#define FSID_HAS_VAL 1" >>confdefs.h
16848
16849else
16850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16851$as_echo "no" >&6; }
16852fi
16853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16854
16855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if f_fsid has member __val" >&5
16856$as_echo_n "checking if f_fsid has member __val... " >&6; }
16857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16858/* end confdefs.h. */
16859
16860#include <sys/types.h>
16861#include <sys/statvfs.h>
16862
16863int
16864main ()
16865{
16866 fsid_t t; t.__val[0] = 0;
16867 ;
16868 return 0;
16869}
16870_ACEOF
16871if ac_fn_c_try_compile "$LINENO"; then :
16872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16873$as_echo "yes" >&6; }
16874
16875$as_echo "#define FSID_HAS___VAL 1" >>confdefs.h
16876
16877else
16878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16879$as_echo "no" >&6; }
16880fi
16881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16882
16883fi
16884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16885
16886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_control field in struct msghdr" >&5
16887$as_echo_n "checking for msg_control field in struct msghdr... " >&6; }
16888if ${ac_cv_have_control_in_msghdr+:} false; then :
16889 $as_echo_n "(cached) " >&6
16890else
16891
16892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16893/* end confdefs.h. */
16894
16895#include <sys/types.h>
16896#include <sys/socket.h>
16897#include <sys/uio.h>
16898
16899int
16900main ()
16901{
16902
16903#ifdef msg_control
16904#error "msg_control is a macro"
16905exit(1);
16906#endif
16907struct msghdr m;
16908m.msg_control = 0;
16909exit(0);
16910
16911 ;
16912 return 0;
16913}
16914_ACEOF
16915if ac_fn_c_try_compile "$LINENO"; then :
16916 ac_cv_have_control_in_msghdr="yes"
16917else
16918 ac_cv_have_control_in_msghdr="no"
16919
16920fi
16921rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16922
16923fi
16924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_control_in_msghdr" >&5
16925$as_echo "$ac_cv_have_control_in_msghdr" >&6; }
16926if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
16927
16928$as_echo "#define HAVE_CONTROL_IN_MSGHDR 1" >>confdefs.h
16929
16930fi
16931
16932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines __progname" >&5
16933$as_echo_n "checking if libc defines __progname... " >&6; }
16934if ${ac_cv_libc_defines___progname+:} false; then :
16935 $as_echo_n "(cached) " >&6
16936else
16937
16938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16939/* end confdefs.h. */
16940
16941int
16942main ()
16943{
16944 extern char *__progname; printf("%s", __progname);
16945 ;
16946 return 0;
16947}
16948_ACEOF
16949if ac_fn_c_try_link "$LINENO"; then :
16950 ac_cv_libc_defines___progname="yes"
16951else
16952 ac_cv_libc_defines___progname="no"
16953
16954fi
16955rm -f core conftest.err conftest.$ac_objext \
16956 conftest$ac_exeext conftest.$ac_ext
16957
16958fi
16959{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines___progname" >&5
16960$as_echo "$ac_cv_libc_defines___progname" >&6; }
16961if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
16962
16963$as_echo "#define HAVE___PROGNAME 1" >>confdefs.h
16964
16965fi
16966
16967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __FUNCTION__" >&5
16968$as_echo_n "checking whether $CC implements __FUNCTION__... " >&6; }
16969if ${ac_cv_cc_implements___FUNCTION__+:} false; then :
16970 $as_echo_n "(cached) " >&6
16971else
16972
16973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16974/* end confdefs.h. */
16975 #include <stdio.h>
16976int
16977main ()
16978{
16979 printf("%s", __FUNCTION__);
16980 ;
16981 return 0;
16982}
16983_ACEOF
16984if ac_fn_c_try_link "$LINENO"; then :
16985 ac_cv_cc_implements___FUNCTION__="yes"
16986else
16987 ac_cv_cc_implements___FUNCTION__="no"
16988
16989fi
16990rm -f core conftest.err conftest.$ac_objext \
16991 conftest$ac_exeext conftest.$ac_ext
16992
16993fi
16994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___FUNCTION__" >&5
16995$as_echo "$ac_cv_cc_implements___FUNCTION__" >&6; }
16996if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
16997
16998$as_echo "#define HAVE___FUNCTION__ 1" >>confdefs.h
16999
17000fi
17001
17002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __func__" >&5
17003$as_echo_n "checking whether $CC implements __func__... " >&6; }
17004if ${ac_cv_cc_implements___func__+:} false; then :
17005 $as_echo_n "(cached) " >&6
17006else
17007
17008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17009/* end confdefs.h. */
17010 #include <stdio.h>
17011int
17012main ()
17013{
17014 printf("%s", __func__);
17015 ;
17016 return 0;
17017}
17018_ACEOF
17019if ac_fn_c_try_link "$LINENO"; then :
17020 ac_cv_cc_implements___func__="yes"
17021else
17022 ac_cv_cc_implements___func__="no"
17023
17024fi
17025rm -f core conftest.err conftest.$ac_objext \
17026 conftest$ac_exeext conftest.$ac_ext
17027
17028fi
17029{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___func__" >&5
17030$as_echo "$ac_cv_cc_implements___func__" >&6; }
17031if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
17032
17033$as_echo "#define HAVE___func__ 1" >>confdefs.h
17034
17035fi
17036
17037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_copy exists" >&5
17038$as_echo_n "checking whether va_copy exists... " >&6; }
17039if ${ac_cv_have_va_copy+:} false; then :
17040 $as_echo_n "(cached) " >&6
17041else
17042
17043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17044/* end confdefs.h. */
17045
17046#include <stdarg.h>
17047va_list x,y;
17048
17049int
17050main ()
17051{
17052 va_copy(x,y);
17053 ;
17054 return 0;
17055}
17056_ACEOF
17057if ac_fn_c_try_link "$LINENO"; then :
17058 ac_cv_have_va_copy="yes"
17059else
17060 ac_cv_have_va_copy="no"
17061
17062fi
17063rm -f core conftest.err conftest.$ac_objext \
17064 conftest$ac_exeext conftest.$ac_ext
17065
17066fi
17067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_va_copy" >&5
17068$as_echo "$ac_cv_have_va_copy" >&6; }
17069if test "x$ac_cv_have_va_copy" = "xyes" ; then
17070
17071$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
17072
17073fi
17074
17075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __va_copy exists" >&5
17076$as_echo_n "checking whether __va_copy exists... " >&6; }
17077if ${ac_cv_have___va_copy+:} false; then :
17078 $as_echo_n "(cached) " >&6
17079else
17080
17081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17082/* end confdefs.h. */
17083
17084#include <stdarg.h>
17085va_list x,y;
17086
17087int
17088main ()
17089{
17090 __va_copy(x,y);
17091 ;
17092 return 0;
17093}
17094_ACEOF
17095if ac_fn_c_try_link "$LINENO"; then :
17096 ac_cv_have___va_copy="yes"
17097else
17098 ac_cv_have___va_copy="no"
17099
17100fi
17101rm -f core conftest.err conftest.$ac_objext \
17102 conftest$ac_exeext conftest.$ac_ext
17103
17104fi
17105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___va_copy" >&5
17106$as_echo "$ac_cv_have___va_copy" >&6; }
17107if test "x$ac_cv_have___va_copy" = "xyes" ; then
17108
17109$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
17110
17111fi
17112
17113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt has optreset support" >&5
17114$as_echo_n "checking whether getopt has optreset support... " >&6; }
17115if ${ac_cv_have_getopt_optreset+:} false; then :
17116 $as_echo_n "(cached) " >&6
17117else
17118
17119 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17120/* end confdefs.h. */
17121 #include <getopt.h>
17122int
17123main ()
17124{
17125 extern int optreset; optreset = 0;
17126 ;
17127 return 0;
17128}
17129_ACEOF
17130if ac_fn_c_try_link "$LINENO"; then :
17131 ac_cv_have_getopt_optreset="yes"
17132else
17133 ac_cv_have_getopt_optreset="no"
17134
17135fi
17136rm -f core conftest.err conftest.$ac_objext \
17137 conftest$ac_exeext conftest.$ac_ext
17138
17139fi
17140{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getopt_optreset" >&5
17141$as_echo "$ac_cv_have_getopt_optreset" >&6; }
17142if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
17143
17144$as_echo "#define HAVE_GETOPT_OPTRESET 1" >>confdefs.h
17145
17146fi
17147
17148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_errlist" >&5
17149$as_echo_n "checking if libc defines sys_errlist... " >&6; }
17150if ${ac_cv_libc_defines_sys_errlist+:} false; then :
17151 $as_echo_n "(cached) " >&6
17152else
17153
17154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17155/* end confdefs.h. */
17156
17157int
17158main ()
17159{
17160 extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);
17161 ;
17162 return 0;
17163}
17164_ACEOF
17165if ac_fn_c_try_link "$LINENO"; then :
17166 ac_cv_libc_defines_sys_errlist="yes"
17167else
17168 ac_cv_libc_defines_sys_errlist="no"
17169
17170fi
17171rm -f core conftest.err conftest.$ac_objext \
17172 conftest$ac_exeext conftest.$ac_ext
17173
17174fi
17175{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_errlist" >&5
17176$as_echo "$ac_cv_libc_defines_sys_errlist" >&6; }
17177if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
17178
17179$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
17180
17181fi
17182
17183
17184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_nerr" >&5
17185$as_echo_n "checking if libc defines sys_nerr... " >&6; }
17186if ${ac_cv_libc_defines_sys_nerr+:} false; then :
17187 $as_echo_n "(cached) " >&6
17188else
17189
17190 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17191/* end confdefs.h. */
17192
17193int
17194main ()
17195{
17196 extern int sys_nerr; printf("%i", sys_nerr);
17197 ;
17198 return 0;
17199}
17200_ACEOF
17201if ac_fn_c_try_link "$LINENO"; then :
17202 ac_cv_libc_defines_sys_nerr="yes"
17203else
17204 ac_cv_libc_defines_sys_nerr="no"
17205
17206fi
17207rm -f core conftest.err conftest.$ac_objext \
17208 conftest$ac_exeext conftest.$ac_ext
17209
17210fi
17211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_nerr" >&5
17212$as_echo "$ac_cv_libc_defines_sys_nerr" >&6; }
17213if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
17214
17215$as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h
17216
17217fi
17218
17219# Check libraries needed by DNS fingerprint support
17220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getrrsetbyname" >&5
17221$as_echo_n "checking for library containing getrrsetbyname... " >&6; }
17222if ${ac_cv_search_getrrsetbyname+:} false; then :
17223 $as_echo_n "(cached) " >&6
17224else
17225 ac_func_search_save_LIBS=$LIBS
17226cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17227/* end confdefs.h. */
17228
17229/* Override any GCC internal prototype to avoid an error.
17230 Use char because int might match the return type of a GCC
17231 builtin and then its argument prototype would still apply. */
17232#ifdef __cplusplus
17233extern "C"
17234#endif
17235char getrrsetbyname ();
17236int
17237main ()
17238{
17239return getrrsetbyname ();
17240 ;
17241 return 0;
17242}
17243_ACEOF
17244for ac_lib in '' resolv; do
17245 if test -z "$ac_lib"; then
17246 ac_res="none required"
17247 else
17248 ac_res=-l$ac_lib
17249 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17250 fi
17251 if ac_fn_c_try_link "$LINENO"; then :
17252 ac_cv_search_getrrsetbyname=$ac_res
17253fi
17254rm -f core conftest.err conftest.$ac_objext \
17255 conftest$ac_exeext
17256 if ${ac_cv_search_getrrsetbyname+:} false; then :
17257 break
17258fi
17259done
17260if ${ac_cv_search_getrrsetbyname+:} false; then :
17261
17262else
17263 ac_cv_search_getrrsetbyname=no
17264fi
17265rm conftest.$ac_ext
17266LIBS=$ac_func_search_save_LIBS
17267fi
17268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getrrsetbyname" >&5
17269$as_echo "$ac_cv_search_getrrsetbyname" >&6; }
17270ac_res=$ac_cv_search_getrrsetbyname
17271if test "$ac_res" != no; then :
17272 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17273
17274$as_echo "#define HAVE_GETRRSETBYNAME 1" >>confdefs.h
17275
17276else
17277
17278 # Needed by our getrrsetbyname()
17279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_query" >&5
17280$as_echo_n "checking for library containing res_query... " >&6; }
17281if ${ac_cv_search_res_query+:} false; then :
17282 $as_echo_n "(cached) " >&6
17283else
17284 ac_func_search_save_LIBS=$LIBS
17285cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17286/* end confdefs.h. */
17287
17288/* Override any GCC internal prototype to avoid an error.
17289 Use char because int might match the return type of a GCC
17290 builtin and then its argument prototype would still apply. */
17291#ifdef __cplusplus
17292extern "C"
17293#endif
17294char res_query ();
17295int
17296main ()
17297{
17298return res_query ();
17299 ;
17300 return 0;
17301}
17302_ACEOF
17303for ac_lib in '' resolv; do
17304 if test -z "$ac_lib"; then
17305 ac_res="none required"
17306 else
17307 ac_res=-l$ac_lib
17308 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17309 fi
17310 if ac_fn_c_try_link "$LINENO"; then :
17311 ac_cv_search_res_query=$ac_res
17312fi
17313rm -f core conftest.err conftest.$ac_objext \
17314 conftest$ac_exeext
17315 if ${ac_cv_search_res_query+:} false; then :
17316 break
17317fi
17318done
17319if ${ac_cv_search_res_query+:} false; then :
17320
17321else
17322 ac_cv_search_res_query=no
17323fi
17324rm conftest.$ac_ext
17325LIBS=$ac_func_search_save_LIBS
17326fi
17327{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_query" >&5
17328$as_echo "$ac_cv_search_res_query" >&6; }
17329ac_res=$ac_cv_search_res_query
17330if test "$ac_res" != no; then :
17331 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17332
17333fi
17334
17335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
17336$as_echo_n "checking for library containing dn_expand... " >&6; }
17337if ${ac_cv_search_dn_expand+:} false; then :
17338 $as_echo_n "(cached) " >&6
17339else
17340 ac_func_search_save_LIBS=$LIBS
17341cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17342/* end confdefs.h. */
17343
17344/* Override any GCC internal prototype to avoid an error.
17345 Use char because int might match the return type of a GCC
17346 builtin and then its argument prototype would still apply. */
17347#ifdef __cplusplus
17348extern "C"
17349#endif
17350char dn_expand ();
17351int
17352main ()
17353{
17354return dn_expand ();
17355 ;
17356 return 0;
17357}
17358_ACEOF
17359for ac_lib in '' resolv; do
17360 if test -z "$ac_lib"; then
17361 ac_res="none required"
17362 else
17363 ac_res=-l$ac_lib
17364 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17365 fi
17366 if ac_fn_c_try_link "$LINENO"; then :
17367 ac_cv_search_dn_expand=$ac_res
17368fi
17369rm -f core conftest.err conftest.$ac_objext \
17370 conftest$ac_exeext
17371 if ${ac_cv_search_dn_expand+:} false; then :
17372 break
17373fi
17374done
17375if ${ac_cv_search_dn_expand+:} false; then :
17376
17377else
17378 ac_cv_search_dn_expand=no
17379fi
17380rm conftest.$ac_ext
17381LIBS=$ac_func_search_save_LIBS
17382fi
17383{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
17384$as_echo "$ac_cv_search_dn_expand" >&6; }
17385ac_res=$ac_cv_search_dn_expand
17386if test "$ac_res" != no; then :
17387 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17388
17389fi
17390
17391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if res_query will link" >&5
17392$as_echo_n "checking if res_query will link... " >&6; }
17393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17394/* end confdefs.h. */
17395
17396#include <sys/types.h>
17397#include <netinet/in.h>
17398#include <arpa/nameser.h>
17399#include <netdb.h>
17400#include <resolv.h>
17401
17402int
17403main ()
17404{
17405
17406 res_query (0, 0, 0, 0, 0);
17407
17408 ;
17409 return 0;
17410}
17411_ACEOF
17412if ac_fn_c_try_link "$LINENO"; then :
17413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17414$as_echo "yes" >&6; }
17415else
17416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17417$as_echo "no" >&6; }
17418 saved_LIBS="$LIBS"
17419 LIBS="$LIBS -lresolv"
17420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
17421$as_echo_n "checking for res_query in -lresolv... " >&6; }
17422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17423/* end confdefs.h. */
17424
17425#include <sys/types.h>
17426#include <netinet/in.h>
17427#include <arpa/nameser.h>
17428#include <netdb.h>
17429#include <resolv.h>
17430
17431int
17432main ()
17433{
17434
17435 res_query (0, 0, 0, 0, 0);
17436
17437 ;
17438 return 0;
17439}
17440_ACEOF
17441if ac_fn_c_try_link "$LINENO"; then :
17442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17443$as_echo "yes" >&6; }
17444else
17445 LIBS="$saved_LIBS"
17446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17447$as_echo "no" >&6; }
17448fi
17449rm -f core conftest.err conftest.$ac_objext \
17450 conftest$ac_exeext conftest.$ac_ext
17451
17452fi
17453rm -f core conftest.err conftest.$ac_objext \
17454 conftest$ac_exeext conftest.$ac_ext
17455 for ac_func in _getshort _getlong
17456do :
17457 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17458ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17459if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17460 cat >>confdefs.h <<_ACEOF
17461#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17462_ACEOF
17463
17464fi
17465done
17466
17467 ac_fn_c_check_decl "$LINENO" "_getshort" "ac_cv_have_decl__getshort" "#include <sys/types.h>
17468 #include <arpa/nameser.h>
17469"
17470if test "x$ac_cv_have_decl__getshort" = xyes; then :
17471 ac_have_decl=1
17472else
17473 ac_have_decl=0
17474fi
17475
17476cat >>confdefs.h <<_ACEOF
17477#define HAVE_DECL__GETSHORT $ac_have_decl
17478_ACEOF
17479ac_fn_c_check_decl "$LINENO" "_getlong" "ac_cv_have_decl__getlong" "#include <sys/types.h>
17480 #include <arpa/nameser.h>
17481"
17482if test "x$ac_cv_have_decl__getlong" = xyes; then :
17483 ac_have_decl=1
17484else
17485 ac_have_decl=0
17486fi
17487
17488cat >>confdefs.h <<_ACEOF
17489#define HAVE_DECL__GETLONG $ac_have_decl
17490_ACEOF
17491
17492 ac_fn_c_check_member "$LINENO" "HEADER" "ad" "ac_cv_member_HEADER_ad" "#include <arpa/nameser.h>
17493"
17494if test "x$ac_cv_member_HEADER_ad" = xyes; then :
17495
17496$as_echo "#define HAVE_HEADER_AD 1" >>confdefs.h
17497
17498fi
17499
17500
17501fi
17502
17503
17504{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct __res_state _res is an extern" >&5
17505$as_echo_n "checking if struct __res_state _res is an extern... " >&6; }
17506cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17507/* end confdefs.h. */
17508
17509#include <stdio.h>
17510#if HAVE_SYS_TYPES_H
17511# include <sys/types.h>
17512#endif
17513#include <netinet/in.h>
17514#include <arpa/nameser.h>
17515#include <resolv.h>
17516extern struct __res_state _res;
17517
17518int
17519main ()
17520{
17521
17522struct __res_state *volatile p = &_res; /* force resolution of _res */
17523return 0;
17524
17525 ;
17526 return 0;
17527}
17528_ACEOF
17529if ac_fn_c_try_link "$LINENO"; then :
17530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17531$as_echo "yes" >&6; }
17532
17533$as_echo "#define HAVE__RES_EXTERN 1" >>confdefs.h
17534
17535
17536else
17537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17538$as_echo "no" >&6; }
17539
17540fi
17541rm -f core conftest.err conftest.$ac_objext \
17542 conftest$ac_exeext conftest.$ac_ext
17543
17544# Check whether user wants SELinux support
17545SELINUX_MSG="no"
17546LIBSELINUX=""
17547
17548# Check whether --with-selinux was given.
17549if test "${with_selinux+set}" = set; then :
17550 withval=$with_selinux; if test "x$withval" != "xno" ; then
17551 save_LIBS="$LIBS"
17552
17553$as_echo "#define WITH_SELINUX 1" >>confdefs.h
17554
17555 SELINUX_MSG="yes"
17556 ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
17557if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
17558
17559else
17560 as_fn_error $? "SELinux support requires selinux.h header" "$LINENO" 5
17561fi
17562
17563
17564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setexeccon in -lselinux" >&5
17565$as_echo_n "checking for setexeccon in -lselinux... " >&6; }
17566if ${ac_cv_lib_selinux_setexeccon+:} false; then :
17567 $as_echo_n "(cached) " >&6
17568else
17569 ac_check_lib_save_LIBS=$LIBS
17570LIBS="-lselinux $LIBS"
17571cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17572/* end confdefs.h. */
17573
17574/* Override any GCC internal prototype to avoid an error.
17575 Use char because int might match the return type of a GCC
17576 builtin and then its argument prototype would still apply. */
17577#ifdef __cplusplus
17578extern "C"
17579#endif
17580char setexeccon ();
17581int
17582main ()
17583{
17584return setexeccon ();
17585 ;
17586 return 0;
17587}
17588_ACEOF
17589if ac_fn_c_try_link "$LINENO"; then :
17590 ac_cv_lib_selinux_setexeccon=yes
17591else
17592 ac_cv_lib_selinux_setexeccon=no
17593fi
17594rm -f core conftest.err conftest.$ac_objext \
17595 conftest$ac_exeext conftest.$ac_ext
17596LIBS=$ac_check_lib_save_LIBS
17597fi
17598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_setexeccon" >&5
17599$as_echo "$ac_cv_lib_selinux_setexeccon" >&6; }
17600if test "x$ac_cv_lib_selinux_setexeccon" = xyes; then :
17601 LIBSELINUX="-lselinux"
17602 LIBS="$LIBS -lselinux"
17603
17604else
17605 as_fn_error $? "SELinux support requires libselinux library" "$LINENO" 5
17606fi
17607
17608 SSHLIBS="$SSHLIBS $LIBSELINUX"
17609 SSHDLIBS="$SSHDLIBS $LIBSELINUX"
17610 for ac_func in getseuserbyname get_default_context_with_level
17611do :
17612 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17613ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17614if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17615 cat >>confdefs.h <<_ACEOF
17616#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17617_ACEOF
17618
17619fi
17620done
17621
17622 LIBS="$save_LIBS"
17623 fi
17624
17625fi
17626
17627
17628
17629
17630# Check whether user wants Kerberos 5 support
17631KRB5_MSG="no"
17632
17633# Check whether --with-kerberos5 was given.
17634if test "${with_kerberos5+set}" = set; then :
17635 withval=$with_kerberos5; if test "x$withval" != "xno" ; then
17636 if test "x$withval" = "xyes" ; then
17637 KRB5ROOT="/usr/local"
17638 else
17639 KRB5ROOT=${withval}
17640 fi
17641
17642
17643$as_echo "#define KRB5 1" >>confdefs.h
17644
17645 KRB5_MSG="yes"
17646
17647 if test -n "$ac_tool_prefix"; then
17648 # Extract the first word of "${ac_tool_prefix}krb5-config", so it can be a program name with args.
17649set dummy ${ac_tool_prefix}krb5-config; ac_word=$2
17650{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17651$as_echo_n "checking for $ac_word... " >&6; }
17652if ${ac_cv_path_KRB5CONF+:} false; then :
17653 $as_echo_n "(cached) " >&6
17654else
17655 case $KRB5CONF in
17656 [\\/]* | ?:[\\/]*)
17657 ac_cv_path_KRB5CONF="$KRB5CONF" # Let the user override the test with a path.
17658 ;;
17659 *)
17660 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17661as_dummy="$KRB5ROOT/bin:$PATH"
17662for as_dir in $as_dummy
17663do
17664 IFS=$as_save_IFS
17665 test -z "$as_dir" && as_dir=.
17666 for ac_exec_ext in '' $ac_executable_extensions; do
17667 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17668 ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
17669 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17670 break 2
17671 fi
17672done
17673 done
17674IFS=$as_save_IFS
17675
17676 ;;
17677esac
17678fi
17679KRB5CONF=$ac_cv_path_KRB5CONF
17680if test -n "$KRB5CONF"; then
17681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5CONF" >&5
17682$as_echo "$KRB5CONF" >&6; }
17683else
17684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17685$as_echo "no" >&6; }
17686fi
17687
17688
17689fi
17690if test -z "$ac_cv_path_KRB5CONF"; then
17691 ac_pt_KRB5CONF=$KRB5CONF
17692 # Extract the first word of "krb5-config", so it can be a program name with args.
17693set dummy krb5-config; ac_word=$2
17694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17695$as_echo_n "checking for $ac_word... " >&6; }
17696if ${ac_cv_path_ac_pt_KRB5CONF+:} false; then :
17697 $as_echo_n "(cached) " >&6
17698else
17699 case $ac_pt_KRB5CONF in
17700 [\\/]* | ?:[\\/]*)
17701 ac_cv_path_ac_pt_KRB5CONF="$ac_pt_KRB5CONF" # Let the user override the test with a path.
17702 ;;
17703 *)
17704 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17705as_dummy="$KRB5ROOT/bin:$PATH"
17706for as_dir in $as_dummy
17707do
17708 IFS=$as_save_IFS
17709 test -z "$as_dir" && as_dir=.
17710 for ac_exec_ext in '' $ac_executable_extensions; do
17711 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17712 ac_cv_path_ac_pt_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
17713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17714 break 2
17715 fi
17716done
17717 done
17718IFS=$as_save_IFS
17719
17720 ;;
17721esac
17722fi
17723ac_pt_KRB5CONF=$ac_cv_path_ac_pt_KRB5CONF
17724if test -n "$ac_pt_KRB5CONF"; then
17725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_KRB5CONF" >&5
17726$as_echo "$ac_pt_KRB5CONF" >&6; }
17727else
17728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17729$as_echo "no" >&6; }
17730fi
17731
17732 if test "x$ac_pt_KRB5CONF" = x; then
17733 KRB5CONF="$KRB5ROOT/bin/krb5-config"
17734 else
17735 case $cross_compiling:$ac_tool_warned in
17736yes:)
17737{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17738$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17739ac_tool_warned=yes ;;
17740esac
17741 KRB5CONF=$ac_pt_KRB5CONF
17742 fi
17743else
17744 KRB5CONF="$ac_cv_path_KRB5CONF"
17745fi
17746
17747 if test -x $KRB5CONF ; then
17748 K5CFLAGS="`$KRB5CONF --cflags`"
17749 K5LIBS="`$KRB5CONF --libs`"
17750 CPPFLAGS="$CPPFLAGS $K5CFLAGS"
17751
17752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gssapi support" >&5
17753$as_echo_n "checking for gssapi support... " >&6; }
17754 if $KRB5CONF | grep gssapi >/dev/null ; then
17755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17756$as_echo "yes" >&6; }
17757
17758$as_echo "#define GSSAPI 1" >>confdefs.h
17759
17760 GSSCFLAGS="`$KRB5CONF --cflags gssapi`"
17761 GSSLIBS="`$KRB5CONF --libs gssapi`"
17762 CPPFLAGS="$CPPFLAGS $GSSCFLAGS"
17763 else
17764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17765$as_echo "no" >&6; }
17766 fi
17767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
17768$as_echo_n "checking whether we are using Heimdal... " >&6; }
17769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17770/* end confdefs.h. */
17771 #include <krb5.h>
17772
17773int
17774main ()
17775{
17776 char *tmp = heimdal_version;
17777 ;
17778 return 0;
17779}
17780_ACEOF
17781if ac_fn_c_try_compile "$LINENO"; then :
17782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17783$as_echo "yes" >&6; }
17784
17785$as_echo "#define HEIMDAL 1" >>confdefs.h
17786
17787else
17788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17789$as_echo "no" >&6; }
17790
17791fi
17792rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17793 else
17794 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
17795 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
17796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
17797$as_echo_n "checking whether we are using Heimdal... " >&6; }
17798 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17799/* end confdefs.h. */
17800 #include <krb5.h>
17801
17802int
17803main ()
17804{
17805 char *tmp = heimdal_version;
17806 ;
17807 return 0;
17808}
17809_ACEOF
17810if ac_fn_c_try_compile "$LINENO"; then :
17811 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17812$as_echo "yes" >&6; }
17813 $as_echo "#define HEIMDAL 1" >>confdefs.h
17814
17815 K5LIBS="-lkrb5"
17816 K5LIBS="$K5LIBS -lcom_err -lasn1"
17817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for net_write in -lroken" >&5
17818$as_echo_n "checking for net_write in -lroken... " >&6; }
17819if ${ac_cv_lib_roken_net_write+:} false; then :
17820 $as_echo_n "(cached) " >&6
17821else
17822 ac_check_lib_save_LIBS=$LIBS
17823LIBS="-lroken $LIBS"
17824cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17825/* end confdefs.h. */
17826
17827/* Override any GCC internal prototype to avoid an error.
17828 Use char because int might match the return type of a GCC
17829 builtin and then its argument prototype would still apply. */
17830#ifdef __cplusplus
17831extern "C"
17832#endif
17833char net_write ();
17834int
17835main ()
17836{
17837return net_write ();
17838 ;
17839 return 0;
17840}
17841_ACEOF
17842if ac_fn_c_try_link "$LINENO"; then :
17843 ac_cv_lib_roken_net_write=yes
17844else
17845 ac_cv_lib_roken_net_write=no
17846fi
17847rm -f core conftest.err conftest.$ac_objext \
17848 conftest$ac_exeext conftest.$ac_ext
17849LIBS=$ac_check_lib_save_LIBS
17850fi
17851{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_roken_net_write" >&5
17852$as_echo "$ac_cv_lib_roken_net_write" >&6; }
17853if test "x$ac_cv_lib_roken_net_write" = xyes; then :
17854 K5LIBS="$K5LIBS -lroken"
17855fi
17856
17857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
17858$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
17859if ${ac_cv_lib_des_des_cbc_encrypt+:} false; then :
17860 $as_echo_n "(cached) " >&6
17861else
17862 ac_check_lib_save_LIBS=$LIBS
17863LIBS="-ldes $LIBS"
17864cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17865/* end confdefs.h. */
17866
17867/* Override any GCC internal prototype to avoid an error.
17868 Use char because int might match the return type of a GCC
17869 builtin and then its argument prototype would still apply. */
17870#ifdef __cplusplus
17871extern "C"
17872#endif
17873char des_cbc_encrypt ();
17874int
17875main ()
17876{
17877return des_cbc_encrypt ();
17878 ;
17879 return 0;
17880}
17881_ACEOF
17882if ac_fn_c_try_link "$LINENO"; then :
17883 ac_cv_lib_des_des_cbc_encrypt=yes
17884else
17885 ac_cv_lib_des_des_cbc_encrypt=no
17886fi
17887rm -f core conftest.err conftest.$ac_objext \
17888 conftest$ac_exeext conftest.$ac_ext
17889LIBS=$ac_check_lib_save_LIBS
17890fi
17891{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
17892$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
17893if test "x$ac_cv_lib_des_des_cbc_encrypt" = xyes; then :
17894 K5LIBS="$K5LIBS -ldes"
17895fi
17896
17897
17898else
17899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17900$as_echo "no" >&6; }
17901 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
17902
17903fi
17904rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
17906$as_echo_n "checking for library containing dn_expand... " >&6; }
17907if ${ac_cv_search_dn_expand+:} false; then :
17908 $as_echo_n "(cached) " >&6
17909else
17910 ac_func_search_save_LIBS=$LIBS
17911cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17912/* end confdefs.h. */
17913
17914/* Override any GCC internal prototype to avoid an error.
17915 Use char because int might match the return type of a GCC
17916 builtin and then its argument prototype would still apply. */
17917#ifdef __cplusplus
17918extern "C"
17919#endif
17920char dn_expand ();
17921int
17922main ()
17923{
17924return dn_expand ();
17925 ;
17926 return 0;
17927}
17928_ACEOF
17929for ac_lib in '' resolv; do
17930 if test -z "$ac_lib"; then
17931 ac_res="none required"
17932 else
17933 ac_res=-l$ac_lib
17934 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17935 fi
17936 if ac_fn_c_try_link "$LINENO"; then :
17937 ac_cv_search_dn_expand=$ac_res
17938fi
17939rm -f core conftest.err conftest.$ac_objext \
17940 conftest$ac_exeext
17941 if ${ac_cv_search_dn_expand+:} false; then :
17942 break
17943fi
17944done
17945if ${ac_cv_search_dn_expand+:} false; then :
17946
17947else
17948 ac_cv_search_dn_expand=no
17949fi
17950rm conftest.$ac_ext
17951LIBS=$ac_func_search_save_LIBS
17952fi
17953{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
17954$as_echo "$ac_cv_search_dn_expand" >&6; }
17955ac_res=$ac_cv_search_dn_expand
17956if test "$ac_res" != no; then :
17957 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17958
17959fi
17960
17961
17962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi_krb5" >&5
17963$as_echo_n "checking for gss_init_sec_context in -lgssapi_krb5... " >&6; }
17964if ${ac_cv_lib_gssapi_krb5_gss_init_sec_context+:} false; then :
17965 $as_echo_n "(cached) " >&6
17966else
17967 ac_check_lib_save_LIBS=$LIBS
17968LIBS="-lgssapi_krb5 $LIBS"
17969cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17970/* end confdefs.h. */
17971
17972/* Override any GCC internal prototype to avoid an error.
17973 Use char because int might match the return type of a GCC
17974 builtin and then its argument prototype would still apply. */
17975#ifdef __cplusplus
17976extern "C"
17977#endif
17978char gss_init_sec_context ();
17979int
17980main ()
17981{
17982return gss_init_sec_context ();
17983 ;
17984 return 0;
17985}
17986_ACEOF
17987if ac_fn_c_try_link "$LINENO"; then :
17988 ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes
17989else
17990 ac_cv_lib_gssapi_krb5_gss_init_sec_context=no
17991fi
17992rm -f core conftest.err conftest.$ac_objext \
17993 conftest$ac_exeext conftest.$ac_ext
17994LIBS=$ac_check_lib_save_LIBS
17995fi
17996{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5
17997$as_echo "$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6; }
17998if test "x$ac_cv_lib_gssapi_krb5_gss_init_sec_context" = xyes; then :
17999 $as_echo "#define GSSAPI 1" >>confdefs.h
18000
18001 GSSLIBS="-lgssapi_krb5"
18002else
18003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi" >&5
18004$as_echo_n "checking for gss_init_sec_context in -lgssapi... " >&6; }
18005if ${ac_cv_lib_gssapi_gss_init_sec_context+:} false; then :
18006 $as_echo_n "(cached) " >&6
18007else
18008 ac_check_lib_save_LIBS=$LIBS
18009LIBS="-lgssapi $LIBS"
18010cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18011/* end confdefs.h. */
18012
18013/* Override any GCC internal prototype to avoid an error.
18014 Use char because int might match the return type of a GCC
18015 builtin and then its argument prototype would still apply. */
18016#ifdef __cplusplus
18017extern "C"
18018#endif
18019char gss_init_sec_context ();
18020int
18021main ()
18022{
18023return gss_init_sec_context ();
18024 ;
18025 return 0;
18026}
18027_ACEOF
18028if ac_fn_c_try_link "$LINENO"; then :
18029 ac_cv_lib_gssapi_gss_init_sec_context=yes
18030else
18031 ac_cv_lib_gssapi_gss_init_sec_context=no
18032fi
18033rm -f core conftest.err conftest.$ac_objext \
18034 conftest$ac_exeext conftest.$ac_ext
18035LIBS=$ac_check_lib_save_LIBS
18036fi
18037{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5
18038$as_echo "$ac_cv_lib_gssapi_gss_init_sec_context" >&6; }
18039if test "x$ac_cv_lib_gssapi_gss_init_sec_context" = xyes; then :
18040 $as_echo "#define GSSAPI 1" >>confdefs.h
18041
18042 GSSLIBS="-lgssapi"
18043else
18044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgss" >&5
18045$as_echo_n "checking for gss_init_sec_context in -lgss... " >&6; }
18046if ${ac_cv_lib_gss_gss_init_sec_context+:} false; then :
18047 $as_echo_n "(cached) " >&6
18048else
18049 ac_check_lib_save_LIBS=$LIBS
18050LIBS="-lgss $LIBS"
18051cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18052/* end confdefs.h. */
18053
18054/* Override any GCC internal prototype to avoid an error.
18055 Use char because int might match the return type of a GCC
18056 builtin and then its argument prototype would still apply. */
18057#ifdef __cplusplus
18058extern "C"
18059#endif
18060char gss_init_sec_context ();
18061int
18062main ()
18063{
18064return gss_init_sec_context ();
18065 ;
18066 return 0;
18067}
18068_ACEOF
18069if ac_fn_c_try_link "$LINENO"; then :
18070 ac_cv_lib_gss_gss_init_sec_context=yes
18071else
18072 ac_cv_lib_gss_gss_init_sec_context=no
18073fi
18074rm -f core conftest.err conftest.$ac_objext \
18075 conftest$ac_exeext conftest.$ac_ext
18076LIBS=$ac_check_lib_save_LIBS
18077fi
18078{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_init_sec_context" >&5
18079$as_echo "$ac_cv_lib_gss_gss_init_sec_context" >&6; }
18080if test "x$ac_cv_lib_gss_gss_init_sec_context" = xyes; then :
18081 $as_echo "#define GSSAPI 1" >>confdefs.h
18082
18083 GSSLIBS="-lgss"
18084else
18085 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api library - build may fail" >&5
18086$as_echo "$as_me: WARNING: Cannot find any suitable gss-api library - build may fail" >&2;}
18087fi
18088
18089
18090fi
18091
18092
18093fi
18094
18095
18096 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
18097if test "x$ac_cv_header_gssapi_h" = xyes; then :
18098
18099else
18100 unset ac_cv_header_gssapi_h
18101 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
18102 for ac_header in gssapi.h
18103do :
18104 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
18105if test "x$ac_cv_header_gssapi_h" = xyes; then :
18106 cat >>confdefs.h <<_ACEOF
18107#define HAVE_GSSAPI_H 1
18108_ACEOF
18109
18110else
18111 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api header - build may fail" >&5
18112$as_echo "$as_me: WARNING: Cannot find any suitable gss-api header - build may fail" >&2;}
18113
18114fi
18115
18116done
18117
18118
18119
18120fi
18121
18122
18123
18124 oldCPP="$CPPFLAGS"
18125 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
18126 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_krb5.h" "ac_cv_header_gssapi_krb5_h" "$ac_includes_default"
18127if test "x$ac_cv_header_gssapi_krb5_h" = xyes; then :
18128
18129else
18130 CPPFLAGS="$oldCPP"
18131fi
18132
18133
18134
18135 fi
18136 if test -n "${rpath_opt}" ; then
18137 LDFLAGS="$LDFLAGS ${rpath_opt}${KRB5ROOT}/lib"
18138 fi
18139 if test ! -z "$blibpath" ; then
18140 blibpath="$blibpath:${KRB5ROOT}/lib"
18141 fi
18142
18143 for ac_header in gssapi.h gssapi/gssapi.h
18144do :
18145 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18146ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18147if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18148 cat >>confdefs.h <<_ACEOF
18149#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18150_ACEOF
18151
18152fi
18153
18154done
18155
18156 for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h
18157do :
18158 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18159ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18160if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18161 cat >>confdefs.h <<_ACEOF
18162#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18163_ACEOF
18164
18165fi
18166
18167done
18168
18169 for ac_header in gssapi_generic.h gssapi/gssapi_generic.h
18170do :
18171 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18172ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18173if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18174 cat >>confdefs.h <<_ACEOF
18175#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18176_ACEOF
18177
18178fi
18179
18180done
18181
18182
18183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing k_hasafs" >&5
18184$as_echo_n "checking for library containing k_hasafs... " >&6; }
18185if ${ac_cv_search_k_hasafs+:} false; then :
18186 $as_echo_n "(cached) " >&6
18187else
18188 ac_func_search_save_LIBS=$LIBS
18189cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18190/* end confdefs.h. */
18191
18192/* Override any GCC internal prototype to avoid an error.
18193 Use char because int might match the return type of a GCC
18194 builtin and then its argument prototype would still apply. */
18195#ifdef __cplusplus
18196extern "C"
18197#endif
18198char k_hasafs ();
18199int
18200main ()
18201{
18202return k_hasafs ();
18203 ;
18204 return 0;
18205}
18206_ACEOF
18207for ac_lib in '' kafs; do
18208 if test -z "$ac_lib"; then
18209 ac_res="none required"
18210 else
18211 ac_res=-l$ac_lib
18212 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
18213 fi
18214 if ac_fn_c_try_link "$LINENO"; then :
18215 ac_cv_search_k_hasafs=$ac_res
18216fi
18217rm -f core conftest.err conftest.$ac_objext \
18218 conftest$ac_exeext
18219 if ${ac_cv_search_k_hasafs+:} false; then :
18220 break
18221fi
18222done
18223if ${ac_cv_search_k_hasafs+:} false; then :
18224
18225else
18226 ac_cv_search_k_hasafs=no
18227fi
18228rm conftest.$ac_ext
18229LIBS=$ac_func_search_save_LIBS
18230fi
18231{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_k_hasafs" >&5
18232$as_echo "$ac_cv_search_k_hasafs" >&6; }
18233ac_res=$ac_cv_search_k_hasafs
18234if test "$ac_res" != no; then :
18235 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18236
18237$as_echo "#define USE_AFS 1" >>confdefs.h
18238
18239fi
18240
18241
18242 ac_fn_c_check_decl "$LINENO" "GSS_C_NT_HOSTBASED_SERVICE" "ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" "
18243#ifdef HAVE_GSSAPI_H
18244# include <gssapi.h>
18245#elif defined(HAVE_GSSAPI_GSSAPI_H)
18246# include <gssapi/gssapi.h>
18247#endif
18248
18249#ifdef HAVE_GSSAPI_GENERIC_H
18250# include <gssapi_generic.h>
18251#elif defined(HAVE_GSSAPI_GSSAPI_GENERIC_H)
18252# include <gssapi/gssapi_generic.h>
18253#endif
18254
18255"
18256if test "x$ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" = xyes; then :
18257 ac_have_decl=1
18258else
18259 ac_have_decl=0
18260fi
18261
18262cat >>confdefs.h <<_ACEOF
18263#define HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE $ac_have_decl
18264_ACEOF
18265
18266 saved_LIBS="$LIBS"
18267 LIBS="$LIBS $K5LIBS"
18268 for ac_func in krb5_cc_new_unique krb5_get_error_message krb5_free_error_message
18269do :
18270 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18271ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18272if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18273 cat >>confdefs.h <<_ACEOF
18274#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18275_ACEOF
18276
18277fi
18278done
18279
18280 LIBS="$saved_LIBS"
18281
18282 fi
18283
18284
18285fi
18286
18287
18288
18289
18290# Looking for programs, paths and files
18291
18292PRIVSEP_PATH=/var/empty
18293
18294# Check whether --with-privsep-path was given.
18295if test "${with_privsep_path+set}" = set; then :
18296 withval=$with_privsep_path;
18297 if test -n "$withval" && test "x$withval" != "xno" && \
18298 test "x${withval}" != "xyes"; then
18299 PRIVSEP_PATH=$withval
18300 fi
18301
18302
18303fi
18304
18305
18306
18307
18308# Check whether --with-xauth was given.
18309if test "${with_xauth+set}" = set; then :
18310 withval=$with_xauth;
18311 if test -n "$withval" && test "x$withval" != "xno" && \
18312 test "x${withval}" != "xyes"; then
18313 xauth_path=$withval
18314 fi
18315
18316else
18317
18318 TestPath="$PATH"
18319 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X/bin"
18320 TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11"
18321 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin"
18322 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
18323 # Extract the first word of "xauth", so it can be a program name with args.
18324set dummy xauth; ac_word=$2
18325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18326$as_echo_n "checking for $ac_word... " >&6; }
18327if ${ac_cv_path_xauth_path+:} false; then :
18328 $as_echo_n "(cached) " >&6
18329else
18330 case $xauth_path in
18331 [\\/]* | ?:[\\/]*)
18332 ac_cv_path_xauth_path="$xauth_path" # Let the user override the test with a path.
18333 ;;
18334 *)
18335 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18336for as_dir in $TestPath
18337do
18338 IFS=$as_save_IFS
18339 test -z "$as_dir" && as_dir=.
18340 for ac_exec_ext in '' $ac_executable_extensions; do
18341 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18342 ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext"
18343 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18344 break 2
18345 fi
18346done
18347 done
18348IFS=$as_save_IFS
18349
18350 ;;
18351esac
18352fi
18353xauth_path=$ac_cv_path_xauth_path
18354if test -n "$xauth_path"; then
18355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xauth_path" >&5
18356$as_echo "$xauth_path" >&6; }
18357else
18358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18359$as_echo "no" >&6; }
18360fi
18361
18362
18363 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
18364 xauth_path="/usr/openwin/bin/xauth"
18365 fi
18366
18367
18368fi
18369
18370
18371STRIP_OPT=-s
18372# Check whether --enable-strip was given.
18373if test "${enable_strip+set}" = set; then :
18374 enableval=$enable_strip;
18375 if test "x$enableval" = "xno" ; then
18376 STRIP_OPT=
18377 fi
18378
18379
18380fi
18381
18382
18383
18384if test -z "$xauth_path" ; then
18385 XAUTH_PATH="undefined"
18386
18387else
18388
18389cat >>confdefs.h <<_ACEOF
18390#define XAUTH_PATH "$xauth_path"
18391_ACEOF
18392
18393 XAUTH_PATH=$xauth_path
18394
18395fi
18396
18397# Check for mail directory
18398
18399# Check whether --with-maildir was given.
18400if test "${with_maildir+set}" = set; then :
18401 withval=$with_maildir;
18402 if test "X$withval" != X && test "x$withval" != xno && \
18403 test "x${withval}" != xyes; then
18404
18405cat >>confdefs.h <<_ACEOF
18406#define MAIL_DIRECTORY "$withval"
18407_ACEOF
18408
18409 fi
18410
18411else
18412
18413 if test "X$maildir" != "X"; then
18414 cat >>confdefs.h <<_ACEOF
18415#define MAIL_DIRECTORY "$maildir"
18416_ACEOF
18417
18418 else
18419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Discovering system mail directory" >&5
18420$as_echo_n "checking Discovering system mail directory... " >&6; }
18421 if test "$cross_compiling" = yes; then :
18422
18423 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&5
18424$as_echo "$as_me: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&2;}
18425
18426
18427else
18428 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18429/* end confdefs.h. */
18430
18431#include <stdio.h>
18432#include <string.h>
18433#ifdef HAVE_PATHS_H
18434#include <paths.h>
18435#endif
18436#ifdef HAVE_MAILLOCK_H
18437#include <maillock.h>
18438#endif
18439#define DATA "conftest.maildir"
18440
18441int
18442main ()
18443{
18444
18445 FILE *fd;
18446 int rc;
18447
18448 fd = fopen(DATA,"w");
18449 if(fd == NULL)
18450 exit(1);
18451
18452#if defined (_PATH_MAILDIR)
18453 if ((rc = fprintf(fd ,"_PATH_MAILDIR:%s\n", _PATH_MAILDIR)) <0)
18454 exit(1);
18455#elif defined (MAILDIR)
18456 if ((rc = fprintf(fd ,"MAILDIR:%s\n", MAILDIR)) <0)
18457 exit(1);
18458#elif defined (_PATH_MAIL)
18459 if ((rc = fprintf(fd ,"_PATH_MAIL:%s\n", _PATH_MAIL)) <0)
18460 exit(1);
18461#else
18462 exit (2);
18463#endif
18464
18465 exit(0);
18466
18467 ;
18468 return 0;
18469}
18470_ACEOF
18471if ac_fn_c_try_run "$LINENO"; then :
18472
18473 maildir_what=`awk -F: '{print $1}' conftest.maildir`
18474 maildir=`awk -F: '{print $2}' conftest.maildir \
18475 | sed 's|/$||'`
18476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: $maildir from $maildir_what" >&5
18477$as_echo "Using: $maildir from $maildir_what" >&6; }
18478 if test "x$maildir_what" != "x_PATH_MAILDIR"; then
18479 cat >>confdefs.h <<_ACEOF
18480#define MAIL_DIRECTORY "$maildir"
18481_ACEOF
18482
18483 fi
18484
18485else
18486
18487 if test "X$ac_status" = "X2";then
18488# our test program didn't find it. Default to /var/spool/mail
18489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: default value of /var/spool/mail" >&5
18490$as_echo "Using: default value of /var/spool/mail" >&6; }
18491 cat >>confdefs.h <<_ACEOF
18492#define MAIL_DIRECTORY "/var/spool/mail"
18493_ACEOF
18494
18495 else
18496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** not found ***" >&5
18497$as_echo "*** not found ***" >&6; }
18498 fi
18499
18500fi
18501rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18502 conftest.$ac_objext conftest.beam conftest.$ac_ext
18503fi
18504
18505 fi
18506
18507
18508fi
18509 # maildir
18510
18511if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
18512 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptmx test" >&5
18513$as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptmx test" >&2;}
18514 disable_ptmx_check=yes
18515fi
18516if test -z "$no_dev_ptmx" ; then
18517 if test "x$disable_ptmx_check" != "xyes" ; then
18518 as_ac_File=`$as_echo "ac_cv_file_"/dev/ptmx"" | $as_tr_sh`
18519{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptmx\"" >&5
18520$as_echo_n "checking for \"/dev/ptmx\"... " >&6; }
18521if eval \${$as_ac_File+:} false; then :
18522 $as_echo_n "(cached) " >&6
18523else
18524 test "$cross_compiling" = yes &&
18525 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18526if test -r ""/dev/ptmx""; then
18527 eval "$as_ac_File=yes"
18528else
18529 eval "$as_ac_File=no"
18530fi
18531fi
18532eval ac_res=\$$as_ac_File
18533 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18534$as_echo "$ac_res" >&6; }
18535if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
18536
18537
18538cat >>confdefs.h <<_ACEOF
18539#define HAVE_DEV_PTMX 1
18540_ACEOF
18541
18542 have_dev_ptmx=1
18543
18544
18545fi
18546
18547 fi
18548fi
18549
18550if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
18551 as_ac_File=`$as_echo "ac_cv_file_"/dev/ptc"" | $as_tr_sh`
18552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptc\"" >&5
18553$as_echo_n "checking for \"/dev/ptc\"... " >&6; }
18554if eval \${$as_ac_File+:} false; then :
18555 $as_echo_n "(cached) " >&6
18556else
18557 test "$cross_compiling" = yes &&
18558 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18559if test -r ""/dev/ptc""; then
18560 eval "$as_ac_File=yes"
18561else
18562 eval "$as_ac_File=no"
18563fi
18564fi
18565eval ac_res=\$$as_ac_File
18566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18567$as_echo "$ac_res" >&6; }
18568if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
18569
18570
18571cat >>confdefs.h <<_ACEOF
18572#define HAVE_DEV_PTS_AND_PTC 1
18573_ACEOF
18574
18575 have_dev_ptc=1
18576
18577
18578fi
18579
18580else
18581 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptc test" >&5
18582$as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptc test" >&2;}
18583fi
18584
18585# Options from here on. Some of these are preset by platform above
18586
18587# Check whether --with-mantype was given.
18588if test "${with_mantype+set}" = set; then :
18589 withval=$with_mantype;
18590 case "$withval" in
18591 man|cat|doc)
18592 MANTYPE=$withval
18593 ;;
18594 *)
18595 as_fn_error $? "invalid man type: $withval" "$LINENO" 5
18596 ;;
18597 esac
18598
18599
18600fi
18601
18602if test -z "$MANTYPE"; then
18603 if ${MANDOC} ${srcdir}/ssh.1 >/dev/null 2>&1; then
18604 MANTYPE=doc
18605 elif ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
18606 MANTYPE=doc
18607 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
18608 MANTYPE=man
18609 else
18610 MANTYPE=cat
18611 fi
18612fi
18613
18614if test "$MANTYPE" = "doc"; then
18615 mansubdir=man;
18616else
18617 mansubdir=$MANTYPE;
18618fi
18619
18620
18621# Check whether to enable MD5 passwords
18622MD5_MSG="no"
18623
18624# Check whether --with-md5-passwords was given.
18625if test "${with_md5_passwords+set}" = set; then :
18626 withval=$with_md5_passwords;
18627 if test "x$withval" != "xno" ; then
18628
18629$as_echo "#define HAVE_MD5_PASSWORDS 1" >>confdefs.h
18630
18631 MD5_MSG="yes"
18632 fi
18633
18634
18635fi
18636
18637
18638# Whether to disable shadow password support
18639
18640# Check whether --with-shadow was given.
18641if test "${with_shadow+set}" = set; then :
18642 withval=$with_shadow;
18643 if test "x$withval" = "xno" ; then
18644 $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
18645
18646 disable_shadow=yes
18647 fi
18648
18649
18650fi
18651
18652
18653if test -z "$disable_shadow" ; then
18654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the systems has expire shadow information" >&5
18655$as_echo_n "checking if the systems has expire shadow information... " >&6; }
18656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18657/* end confdefs.h. */
18658
18659#include <sys/types.h>
18660#include <shadow.h>
18661struct spwd sp;
18662
18663int
18664main ()
18665{
18666 sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0;
18667 ;
18668 return 0;
18669}
18670_ACEOF
18671if ac_fn_c_try_compile "$LINENO"; then :
18672 sp_expire_available=yes
18673fi
18674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18675
18676 if test "x$sp_expire_available" = "xyes" ; then
18677 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18678$as_echo "yes" >&6; }
18679
18680$as_echo "#define HAS_SHADOW_EXPIRE 1" >>confdefs.h
18681
18682 else
18683 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18684$as_echo "no" >&6; }
18685 fi
18686fi
18687
18688# Use ip address instead of hostname in $DISPLAY
18689if test ! -z "$IPADDR_IN_DISPLAY" ; then
18690 DISPLAY_HACK_MSG="yes"
18691
18692$as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
18693
18694else
18695 DISPLAY_HACK_MSG="no"
18696
18697# Check whether --with-ipaddr-display was given.
18698if test "${with_ipaddr_display+set}" = set; then :
18699 withval=$with_ipaddr_display;
18700 if test "x$withval" != "xno" ; then
18701 $as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
18702
18703 DISPLAY_HACK_MSG="yes"
18704 fi
18705
18706
18707fi
18708
18709fi
18710
18711# check for /etc/default/login and use it if present.
18712# Check whether --enable-etc-default-login was given.
18713if test "${enable_etc_default_login+set}" = set; then :
18714 enableval=$enable_etc_default_login; if test "x$enableval" = "xno"; then
18715 { $as_echo "$as_me:${as_lineno-$LINENO}: /etc/default/login handling disabled" >&5
18716$as_echo "$as_me: /etc/default/login handling disabled" >&6;}
18717 etc_default_login=no
18718 else
18719 etc_default_login=yes
18720 fi
18721else
18722 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
18723 then
18724 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking /etc/default/login" >&5
18725$as_echo "$as_me: WARNING: cross compiling: not checking /etc/default/login" >&2;}
18726 etc_default_login=no
18727 else
18728 etc_default_login=yes
18729 fi
18730
18731fi
18732
18733
18734if test "x$etc_default_login" != "xno"; then
18735 as_ac_File=`$as_echo "ac_cv_file_"/etc/default/login"" | $as_tr_sh`
18736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/etc/default/login\"" >&5
18737$as_echo_n "checking for \"/etc/default/login\"... " >&6; }
18738if eval \${$as_ac_File+:} false; then :
18739 $as_echo_n "(cached) " >&6
18740else
18741 test "$cross_compiling" = yes &&
18742 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18743if test -r ""/etc/default/login""; then
18744 eval "$as_ac_File=yes"
18745else
18746 eval "$as_ac_File=no"
18747fi
18748fi
18749eval ac_res=\$$as_ac_File
18750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18751$as_echo "$ac_res" >&6; }
18752if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
18753 external_path_file=/etc/default/login
18754fi
18755
18756 if test "x$external_path_file" = "x/etc/default/login"; then
18757
18758$as_echo "#define HAVE_ETC_DEFAULT_LOGIN 1" >>confdefs.h
18759
18760 fi
18761fi
18762
18763if test $ac_cv_func_login_getcapbool = "yes" && \
18764 test $ac_cv_header_login_cap_h = "yes" ; then
18765 external_path_file=/etc/login.conf
18766fi
18767
18768# Whether to mess with the default path
18769SERVER_PATH_MSG="(default)"
18770
18771# Check whether --with-default-path was given.
18772if test "${with_default_path+set}" = set; then :
18773 withval=$with_default_path;
18774 if test "x$external_path_file" = "x/etc/login.conf" ; then
18775 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18776--with-default-path=PATH has no effect on this system.
18777Edit /etc/login.conf instead." >&5
18778$as_echo "$as_me: WARNING:
18779--with-default-path=PATH has no effect on this system.
18780Edit /etc/login.conf instead." >&2;}
18781 elif test "x$withval" != "xno" ; then
18782 if test ! -z "$external_path_file" ; then
18783 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18784--with-default-path=PATH will only be used if PATH is not defined in
18785$external_path_file ." >&5
18786$as_echo "$as_me: WARNING:
18787--with-default-path=PATH will only be used if PATH is not defined in
18788$external_path_file ." >&2;}
18789 fi
18790 user_path="$withval"
18791 SERVER_PATH_MSG="$withval"
18792 fi
18793
18794else
18795 if test "x$external_path_file" = "x/etc/login.conf" ; then
18796 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Make sure the path to scp is in /etc/login.conf" >&5
18797$as_echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;}
18798 else
18799 if test ! -z "$external_path_file" ; then
18800 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
18801If PATH is defined in $external_path_file, ensure the path to scp is included,
18802otherwise scp will not work." >&5
18803$as_echo "$as_me: WARNING:
18804If PATH is defined in $external_path_file, ensure the path to scp is included,
18805otherwise scp will not work." >&2;}
18806 fi
18807 if test "$cross_compiling" = yes; then :
18808 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
18809
18810else
18811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18812/* end confdefs.h. */
18813
18814/* find out what STDPATH is */
18815#include <stdio.h>
18816#ifdef HAVE_PATHS_H
18817# include <paths.h>
18818#endif
18819#ifndef _PATH_STDPATH
18820# ifdef _PATH_USERPATH /* Irix */
18821# define _PATH_STDPATH _PATH_USERPATH
18822# else
18823# define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
18824# endif
18825#endif
18826#include <sys/types.h>
18827#include <sys/stat.h>
18828#include <fcntl.h>
18829#define DATA "conftest.stdpath"
18830
18831int
18832main ()
18833{
18834
18835 FILE *fd;
18836 int rc;
18837
18838 fd = fopen(DATA,"w");
18839 if(fd == NULL)
18840 exit(1);
18841
18842 if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
18843 exit(1);
18844
18845 exit(0);
18846
18847 ;
18848 return 0;
18849}
18850_ACEOF
18851if ac_fn_c_try_run "$LINENO"; then :
18852 user_path=`cat conftest.stdpath`
18853else
18854 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
18855fi
18856rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18857 conftest.$ac_objext conftest.beam conftest.$ac_ext
18858fi
18859
18860# make sure $bindir is in USER_PATH so scp will work
18861 t_bindir="${bindir}"
18862 while echo "${t_bindir}" | egrep '\$\{|NONE/' >/dev/null 2>&1; do
18863 t_bindir=`eval echo ${t_bindir}`
18864 case $t_bindir in
18865 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
18866 esac
18867 case $t_bindir in
18868 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
18869 esac
18870 done
18871 echo $user_path | grep ":$t_bindir" > /dev/null 2>&1
18872 if test $? -ne 0 ; then
18873 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
18874 if test $? -ne 0 ; then
18875 user_path=$user_path:$t_bindir
18876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Adding $t_bindir to USER_PATH so scp will work" >&5
18877$as_echo "Adding $t_bindir to USER_PATH so scp will work" >&6; }
18878 fi
18879 fi
18880 fi
18881
18882fi
18883
18884if test "x$external_path_file" != "x/etc/login.conf" ; then
18885
18886cat >>confdefs.h <<_ACEOF
18887#define USER_PATH "$user_path"
18888_ACEOF
18889
18890
18891fi
18892
18893# Set superuser path separately to user path
18894
18895# Check whether --with-superuser-path was given.
18896if test "${with_superuser_path+set}" = set; then :
18897 withval=$with_superuser_path;
18898 if test -n "$withval" && test "x$withval" != "xno" && \
18899 test "x${withval}" != "xyes"; then
18900
18901cat >>confdefs.h <<_ACEOF
18902#define SUPERUSER_PATH "$withval"
18903_ACEOF
18904
18905 superuser_path=$withval
18906 fi
18907
18908
18909fi
18910
18911
18912
18913{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
18914$as_echo_n "checking if we need to convert IPv4 in IPv6-mapped addresses... " >&6; }
18915IPV4_IN6_HACK_MSG="no"
18916
18917# Check whether --with-4in6 was given.
18918if test "${with_4in6+set}" = set; then :
18919 withval=$with_4in6;
18920 if test "x$withval" != "xno" ; then
18921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18922$as_echo "yes" >&6; }
18923
18924$as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
18925
18926 IPV4_IN6_HACK_MSG="yes"
18927 else
18928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18929$as_echo "no" >&6; }
18930 fi
18931
18932else
18933
18934 if test "x$inet6_default_4in6" = "xyes"; then
18935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
18936$as_echo "yes (default)" >&6; }
18937 $as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
18938
18939 IPV4_IN6_HACK_MSG="yes"
18940 else
18941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5
18942$as_echo "no (default)" >&6; }
18943 fi
18944
18945
18946fi
18947
18948
18949# Whether to enable BSD auth support
18950BSD_AUTH_MSG=no
18951
18952# Check whether --with-bsd-auth was given.
18953if test "${with_bsd_auth+set}" = set; then :
18954 withval=$with_bsd_auth;
18955 if test "x$withval" != "xno" ; then
18956
18957$as_echo "#define BSD_AUTH 1" >>confdefs.h
18958
18959 BSD_AUTH_MSG=yes
18960 fi
18961
18962
18963fi
18964
18965
18966# Where to place sshd.pid
18967piddir=/var/run
18968# make sure the directory exists
18969if test ! -d $piddir ; then
18970 piddir=`eval echo ${sysconfdir}`
18971 case $piddir in
18972 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
18973 esac
18974fi
18975
18976
18977# Check whether --with-pid-dir was given.
18978if test "${with_pid_dir+set}" = set; then :
18979 withval=$with_pid_dir;
18980 if test -n "$withval" && test "x$withval" != "xno" && \
18981 test "x${withval}" != "xyes"; then
18982 piddir=$withval
18983 if test ! -d $piddir ; then
18984 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** no $piddir directory on this system **" >&5
18985$as_echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;}
18986 fi
18987 fi
18988
18989
18990fi
18991
18992
18993
18994cat >>confdefs.h <<_ACEOF
18995#define _PATH_SSH_PIDDIR "$piddir"
18996_ACEOF
18997
18998
18999
19000# Check whether --enable-lastlog was given.
19001if test "${enable_lastlog+set}" = set; then :
19002 enableval=$enable_lastlog;
19003 if test "x$enableval" = "xno" ; then
19004 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
19005
19006 fi
19007
19008
19009fi
19010
19011# Check whether --enable-utmp was given.
19012if test "${enable_utmp+set}" = set; then :
19013 enableval=$enable_utmp;
19014 if test "x$enableval" = "xno" ; then
19015 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
19016
19017 fi
19018
19019
19020fi
19021
19022# Check whether --enable-utmpx was given.
19023if test "${enable_utmpx+set}" = set; then :
19024 enableval=$enable_utmpx;
19025 if test "x$enableval" = "xno" ; then
19026
19027$as_echo "#define DISABLE_UTMPX 1" >>confdefs.h
19028
19029 fi
19030
19031
19032fi
19033
19034# Check whether --enable-wtmp was given.
19035if test "${enable_wtmp+set}" = set; then :
19036 enableval=$enable_wtmp;
19037 if test "x$enableval" = "xno" ; then
19038 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
19039
19040 fi
19041
19042
19043fi
19044
19045# Check whether --enable-wtmpx was given.
19046if test "${enable_wtmpx+set}" = set; then :
19047 enableval=$enable_wtmpx;
19048 if test "x$enableval" = "xno" ; then
19049
19050$as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
19051
19052 fi
19053
19054
19055fi
19056
19057# Check whether --enable-libutil was given.
19058if test "${enable_libutil+set}" = set; then :
19059 enableval=$enable_libutil;
19060 if test "x$enableval" = "xno" ; then
19061 $as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
19062
19063 fi
19064
19065
19066fi
19067
19068# Check whether --enable-pututline was given.
19069if test "${enable_pututline+set}" = set; then :
19070 enableval=$enable_pututline;
19071 if test "x$enableval" = "xno" ; then
19072
19073$as_echo "#define DISABLE_PUTUTLINE 1" >>confdefs.h
19074
19075 fi
19076
19077
19078fi
19079
19080# Check whether --enable-pututxline was given.
19081if test "${enable_pututxline+set}" = set; then :
19082 enableval=$enable_pututxline;
19083 if test "x$enableval" = "xno" ; then
19084
19085$as_echo "#define DISABLE_PUTUTXLINE 1" >>confdefs.h
19086
19087 fi
19088
19089
19090fi
19091
19092
19093# Check whether --with-lastlog was given.
19094if test "${with_lastlog+set}" = set; then :
19095 withval=$with_lastlog;
19096 if test "x$withval" = "xno" ; then
19097 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
19098
19099 elif test -n "$withval" && test "x${withval}" != "xyes"; then
19100 conf_lastlog_location=$withval
19101 fi
19102
19103
19104fi
19105
19106
19107
19108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines LASTLOG_FILE" >&5
19109$as_echo_n "checking if your system defines LASTLOG_FILE... " >&6; }
19110cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19111/* end confdefs.h. */
19112
19113#include <sys/types.h>
19114#include <utmp.h>
19115#ifdef HAVE_LASTLOG_H
19116# include <lastlog.h>
19117#endif
19118#ifdef HAVE_PATHS_H
19119# include <paths.h>
19120#endif
19121#ifdef HAVE_LOGIN_H
19122# include <login.h>
19123#endif
19124
19125int
19126main ()
19127{
19128 char *lastlog = LASTLOG_FILE;
19129 ;
19130 return 0;
19131}
19132_ACEOF
19133if ac_fn_c_try_compile "$LINENO"; then :
19134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19135$as_echo "yes" >&6; }
19136else
19137
19138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19139$as_echo "no" >&6; }
19140 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines _PATH_LASTLOG" >&5
19141$as_echo_n "checking if your system defines _PATH_LASTLOG... " >&6; }
19142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19143/* end confdefs.h. */
19144
19145#include <sys/types.h>
19146#include <utmp.h>
19147#ifdef HAVE_LASTLOG_H
19148# include <lastlog.h>
19149#endif
19150#ifdef HAVE_PATHS_H
19151# include <paths.h>
19152#endif
19153
19154int
19155main ()
19156{
19157 char *lastlog = _PATH_LASTLOG;
19158 ;
19159 return 0;
19160}
19161_ACEOF
19162if ac_fn_c_try_compile "$LINENO"; then :
19163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19164$as_echo "yes" >&6; }
19165else
19166
19167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19168$as_echo "no" >&6; }
19169 system_lastlog_path=no
19170
19171fi
19172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19173
19174fi
19175rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19176
19177if test -z "$conf_lastlog_location"; then
19178 if test x"$system_lastlog_path" = x"no" ; then
19179 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
19180 if (test -d "$f" || test -f "$f") ; then
19181 conf_lastlog_location=$f
19182 fi
19183 done
19184 if test -z "$conf_lastlog_location"; then
19185 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** Cannot find lastlog **" >&5
19186$as_echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;}
19187 fi
19188 fi
19189fi
19190
19191if test -n "$conf_lastlog_location"; then
19192
19193cat >>confdefs.h <<_ACEOF
19194#define CONF_LASTLOG_FILE "$conf_lastlog_location"
19195_ACEOF
19196
19197fi
19198
19199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines UTMP_FILE" >&5
19200$as_echo_n "checking if your system defines UTMP_FILE... " >&6; }
19201cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19202/* end confdefs.h. */
19203
19204#include <sys/types.h>
19205#include <utmp.h>
19206#ifdef HAVE_PATHS_H
19207# include <paths.h>
19208#endif
19209
19210int
19211main ()
19212{
19213 char *utmp = UTMP_FILE;
19214 ;
19215 return 0;
19216}
19217_ACEOF
19218if ac_fn_c_try_compile "$LINENO"; then :
19219 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19220$as_echo "yes" >&6; }
19221else
19222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19223$as_echo "no" >&6; }
19224 system_utmp_path=no
19225
19226fi
19227rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19228if test -z "$conf_utmp_location"; then
19229 if test x"$system_utmp_path" = x"no" ; then
19230 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
19231 if test -f $f ; then
19232 conf_utmp_location=$f
19233 fi
19234 done
19235 if test -z "$conf_utmp_location"; then
19236 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
19237
19238 fi
19239 fi
19240fi
19241if test -n "$conf_utmp_location"; then
19242
19243cat >>confdefs.h <<_ACEOF
19244#define CONF_UTMP_FILE "$conf_utmp_location"
19245_ACEOF
19246
19247fi
19248
19249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMP_FILE" >&5
19250$as_echo_n "checking if your system defines WTMP_FILE... " >&6; }
19251cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19252/* end confdefs.h. */
19253
19254#include <sys/types.h>
19255#include <utmp.h>
19256#ifdef HAVE_PATHS_H
19257# include <paths.h>
19258#endif
19259
19260int
19261main ()
19262{
19263 char *wtmp = WTMP_FILE;
19264 ;
19265 return 0;
19266}
19267_ACEOF
19268if ac_fn_c_try_compile "$LINENO"; then :
19269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19270$as_echo "yes" >&6; }
19271else
19272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19273$as_echo "no" >&6; }
19274 system_wtmp_path=no
19275
19276fi
19277rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19278if test -z "$conf_wtmp_location"; then
19279 if test x"$system_wtmp_path" = x"no" ; then
19280 for f in /usr/adm/wtmp /var/log/wtmp; do
19281 if test -f $f ; then
19282 conf_wtmp_location=$f
19283 fi
19284 done
19285 if test -z "$conf_wtmp_location"; then
19286 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
19287
19288 fi
19289 fi
19290fi
19291if test -n "$conf_wtmp_location"; then
19292
19293cat >>confdefs.h <<_ACEOF
19294#define CONF_WTMP_FILE "$conf_wtmp_location"
19295_ACEOF
19296
19297fi
19298
19299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMPX_FILE" >&5
19300$as_echo_n "checking if your system defines WTMPX_FILE... " >&6; }
19301cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19302/* end confdefs.h. */
19303
19304#include <sys/types.h>
19305#include <utmp.h>
19306#ifdef HAVE_UTMPX_H
19307#include <utmpx.h>
19308#endif
19309#ifdef HAVE_PATHS_H
19310# include <paths.h>
19311#endif
19312
19313int
19314main ()
19315{
19316 char *wtmpx = WTMPX_FILE;
19317 ;
19318 return 0;
19319}
19320_ACEOF
19321if ac_fn_c_try_compile "$LINENO"; then :
19322 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19323$as_echo "yes" >&6; }
19324else
19325 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19326$as_echo "no" >&6; }
19327 system_wtmpx_path=no
19328
19329fi
19330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19331if test -z "$conf_wtmpx_location"; then
19332 if test x"$system_wtmpx_path" = x"no" ; then
19333 $as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
19334
19335 fi
19336else
19337
19338cat >>confdefs.h <<_ACEOF
19339#define CONF_WTMPX_FILE "$conf_wtmpx_location"
19340_ACEOF
19341
19342fi
19343
19344
19345if test ! -z "$blibpath" ; then
19346 LDFLAGS="$LDFLAGS $blibflags$blibpath"
19347 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&5
19348$as_echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;}
19349fi
19350
19351ac_fn_c_check_member "$LINENO" "struct lastlog" "ll_line" "ac_cv_member_struct_lastlog_ll_line" "
19352#ifdef HAVE_SYS_TYPES_H
19353#include <sys/types.h>
19354#endif
19355#ifdef HAVE_UTMP_H
19356#include <utmp.h>
19357#endif
19358#ifdef HAVE_UTMPX_H
19359#include <utmpx.h>
19360#endif
19361#ifdef HAVE_LASTLOG_H
19362#include <lastlog.h>
19363#endif
19364
19365"
19366if test "x$ac_cv_member_struct_lastlog_ll_line" = xyes; then :
19367
19368else
19369
19370 if test x$SKIP_DISABLE_LASTLOG_DEFINE != "xyes" ; then
19371 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
19372
19373 fi
19374
19375fi
19376
19377
19378ac_fn_c_check_member "$LINENO" "struct utmp" "ut_line" "ac_cv_member_struct_utmp_ut_line" "
19379#ifdef HAVE_SYS_TYPES_H
19380#include <sys/types.h>
19381#endif
19382#ifdef HAVE_UTMP_H
19383#include <utmp.h>
19384#endif
19385#ifdef HAVE_UTMPX_H
19386#include <utmpx.h>
19387#endif
19388#ifdef HAVE_LASTLOG_H
19389#include <lastlog.h>
19390#endif
19391
19392"
19393if test "x$ac_cv_member_struct_utmp_ut_line" = xyes; then :
19394
19395else
19396
19397 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
19398
19399 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
19400
19401
19402fi
19403
19404
19405CFLAGS="$CFLAGS $werror_flags"
19406
19407if test "x$ac_cv_func_getaddrinfo" != "xyes" ; then
19408 TEST_SSH_IPV6=no
19409else
19410 TEST_SSH_IPV6=yes
19411fi
19412ac_fn_c_check_decl "$LINENO" "BROKEN_GETADDRINFO" "ac_cv_have_decl_BROKEN_GETADDRINFO" "$ac_includes_default"
19413if test "x$ac_cv_have_decl_BROKEN_GETADDRINFO" = xyes; then :
19414 TEST_SSH_IPV6=no
19415fi
19416
19417TEST_SSH_IPV6=$TEST_SSH_IPV6
19418
19419TEST_SSH_UTF8=$TEST_SSH_UTF8
19420
19421TEST_MALLOC_OPTIONS=$TEST_MALLOC_OPTIONS
19422
19423UNSUPPORTED_ALGORITHMS=$unsupported_algorithms
19424
19425DEPEND=$(cat $srcdir/.depend)
19426
19427
19428CFLAGS="${CFLAGS} ${CFLAGS_AFTER}"
19429LDFLAGS="${LDFLAGS} ${LDFLAGS_AFTER}"
19430
19431
19432ac_config_files="$ac_config_files Makefile buildpkg.sh opensshd.init openssh.xml openbsd-compat/Makefile openbsd-compat/regress/Makefile survey.sh"
19433
19434cat >confcache <<\_ACEOF
19435# This file is a shell script that caches the results of configure
19436# tests run on this system so they can be shared between configure
19437# scripts and configure runs, see configure's option --config-cache.
19438# It is not useful on other systems. If it contains results you don't
19439# want to keep, you may remove or edit it.
19440#
19441# config.status only pays attention to the cache file if you give it
19442# the --recheck option to rerun configure.
19443#
19444# `ac_cv_env_foo' variables (set or unset) will be overridden when
19445# loading this file, other *unset* `ac_cv_foo' will be assigned the
19446# following values.
19447
19448_ACEOF
19449
19450# The following way of writing the cache mishandles newlines in values,
19451# but we know of no workaround that is simple, portable, and efficient.
19452# So, we kill variables containing newlines.
19453# Ultrix sh set writes to stderr and can't be redirected directly,
19454# and sets the high bit in the cache file unless we assign to the vars.
19455(
19456 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19457 eval ac_val=\$$ac_var
19458 case $ac_val in #(
19459 *${as_nl}*)
19460 case $ac_var in #(
19461 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19462$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19463 esac
19464 case $ac_var in #(
19465 _ | IFS | as_nl) ;; #(
19466 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19467 *) { eval $ac_var=; unset $ac_var;} ;;
19468 esac ;;
19469 esac
19470 done
19471
19472 (set) 2>&1 |
19473 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19474 *${as_nl}ac_space=\ *)
19475 # `set' does not quote correctly, so add quotes: double-quote
19476 # substitution turns \\\\ into \\, and sed turns \\ into \.
19477 sed -n \
19478 "s/'/'\\\\''/g;
19479 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19480 ;; #(
19481 *)
19482 # `set' quotes correctly as required by POSIX, so do not add quotes.
19483 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19484 ;;
19485 esac |
19486 sort
19487) |
19488 sed '
19489 /^ac_cv_env_/b end
19490 t clear
19491 :clear
19492 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19493 t end
19494 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19495 :end' >>confcache
19496if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19497 if test -w "$cache_file"; then
19498 if test "x$cache_file" != "x/dev/null"; then
19499 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19500$as_echo "$as_me: updating cache $cache_file" >&6;}
19501 if test ! -f "$cache_file" || test -h "$cache_file"; then
19502 cat confcache >"$cache_file"
19503 else
19504 case $cache_file in #(
19505 */* | ?:*)
19506 mv -f confcache "$cache_file"$$ &&
19507 mv -f "$cache_file"$$ "$cache_file" ;; #(
19508 *)
19509 mv -f confcache "$cache_file" ;;
19510 esac
19511 fi
19512 fi
19513 else
19514 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19515$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19516 fi
19517fi
19518rm -f confcache
19519
19520test "x$prefix" = xNONE && prefix=$ac_default_prefix
19521# Let make expand exec_prefix.
19522test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19523
19524DEFS=-DHAVE_CONFIG_H
19525
19526ac_libobjs=
19527ac_ltlibobjs=
19528U=
19529for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19530 # 1. Remove the extension, and $U if already installed.
19531 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19532 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19533 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19534 # will be set to the directory where LIBOBJS objects are built.
19535 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19536 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19537done
19538LIBOBJS=$ac_libobjs
19539
19540LTLIBOBJS=$ac_ltlibobjs
19541
19542
19543
19544
19545: "${CONFIG_STATUS=./config.status}"
19546ac_write_fail=0
19547ac_clean_files_save=$ac_clean_files
19548ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19549{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19550$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19551as_write_fail=0
19552cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19553#! $SHELL
19554# Generated by $as_me.
19555# Run this file to recreate the current configuration.
19556# Compiler output produced by configure, useful for debugging
19557# configure, is in config.log if it exists.
19558
19559debug=false
19560ac_cs_recheck=false
19561ac_cs_silent=false
19562
19563SHELL=\${CONFIG_SHELL-$SHELL}
19564export SHELL
19565_ASEOF
19566cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19567## -------------------- ##
19568## M4sh Initialization. ##
19569## -------------------- ##
19570
19571# Be more Bourne compatible
19572DUALCASE=1; export DUALCASE # for MKS sh
19573if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19574 emulate sh
19575 NULLCMD=:
19576 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19577 # is contrary to our usage. Disable this feature.
19578 alias -g '${1+"$@"}'='"$@"'
19579 setopt NO_GLOB_SUBST
19580else
19581 case `(set -o) 2>/dev/null` in #(
19582 *posix*) :
19583 set -o posix ;; #(
19584 *) :
19585 ;;
19586esac
19587fi
19588
19589
19590as_nl='
19591'
19592export as_nl
19593# Printing a long string crashes Solaris 7 /usr/bin/printf.
19594as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19595as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19596as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19597# Prefer a ksh shell builtin over an external printf program on Solaris,
19598# but without wasting forks for bash or zsh.
19599if test -z "$BASH_VERSION$ZSH_VERSION" \
19600 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19601 as_echo='print -r --'
19602 as_echo_n='print -rn --'
19603elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19604 as_echo='printf %s\n'
19605 as_echo_n='printf %s'
19606else
19607 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19608 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19609 as_echo_n='/usr/ucb/echo -n'
19610 else
19611 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19612 as_echo_n_body='eval
19613 arg=$1;
19614 case $arg in #(
19615 *"$as_nl"*)
19616 expr "X$arg" : "X\\(.*\\)$as_nl";
19617 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19618 esac;
19619 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19620 '
19621 export as_echo_n_body
19622 as_echo_n='sh -c $as_echo_n_body as_echo'
19623 fi
19624 export as_echo_body
19625 as_echo='sh -c $as_echo_body as_echo'
19626fi
19627
19628# The user is always right.
19629if test "${PATH_SEPARATOR+set}" != set; then
19630 PATH_SEPARATOR=:
19631 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19632 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19633 PATH_SEPARATOR=';'
19634 }
19635fi
19636
19637
19638# IFS
19639# We need space, tab and new line, in precisely that order. Quoting is
19640# there to prevent editors from complaining about space-tab.
19641# (If _AS_PATH_WALK were called with IFS unset, it would disable word
19642# splitting by setting IFS to empty value.)
19643IFS=" "" $as_nl"
19644
19645# Find who we are. Look in the path if we contain no directory separator.
19646as_myself=
19647case $0 in #((
19648 *[\\/]* ) as_myself=$0 ;;
19649 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19650for as_dir in $PATH
19651do
19652 IFS=$as_save_IFS
19653 test -z "$as_dir" && as_dir=.
19654 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19655 done
19656IFS=$as_save_IFS
19657
19658 ;;
19659esac
19660# We did not find ourselves, most probably we were run as `sh COMMAND'
19661# in which case we are not to be found in the path.
19662if test "x$as_myself" = x; then
19663 as_myself=$0
19664fi
19665if test ! -f "$as_myself"; then
19666 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19667 exit 1
19668fi
19669
19670# Unset variables that we do not need and which cause bugs (e.g. in
19671# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19672# suppresses any "Segmentation fault" message there. '((' could
19673# trigger a bug in pdksh 5.2.14.
19674for as_var in BASH_ENV ENV MAIL MAILPATH
19675do eval test x\${$as_var+set} = xset \
19676 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19677done
19678PS1='$ '
19679PS2='> '
19680PS4='+ '
19681
19682# NLS nuisances.
19683LC_ALL=C
19684export LC_ALL
19685LANGUAGE=C
19686export LANGUAGE
19687
19688# CDPATH.
19689(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19690
19691
19692# as_fn_error STATUS ERROR [LINENO LOG_FD]
19693# ----------------------------------------
19694# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19695# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19696# script with STATUS, using 1 if that was 0.
19697as_fn_error ()
19698{
19699 as_status=$1; test $as_status -eq 0 && as_status=1
19700 if test "$4"; then
19701 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19702 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19703 fi
19704 $as_echo "$as_me: error: $2" >&2
19705 as_fn_exit $as_status
19706} # as_fn_error
19707
19708
19709# as_fn_set_status STATUS
19710# -----------------------
19711# Set $? to STATUS, without forking.
19712as_fn_set_status ()
19713{
19714 return $1
19715} # as_fn_set_status
19716
19717# as_fn_exit STATUS
19718# -----------------
19719# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19720as_fn_exit ()
19721{
19722 set +e
19723 as_fn_set_status $1
19724 exit $1
19725} # as_fn_exit
19726
19727# as_fn_unset VAR
19728# ---------------
19729# Portably unset VAR.
19730as_fn_unset ()
19731{
19732 { eval $1=; unset $1;}
19733}
19734as_unset=as_fn_unset
19735# as_fn_append VAR VALUE
19736# ----------------------
19737# Append the text in VALUE to the end of the definition contained in VAR. Take
19738# advantage of any shell optimizations that allow amortized linear growth over
19739# repeated appends, instead of the typical quadratic growth present in naive
19740# implementations.
19741if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19742 eval 'as_fn_append ()
19743 {
19744 eval $1+=\$2
19745 }'
19746else
19747 as_fn_append ()
19748 {
19749 eval $1=\$$1\$2
19750 }
19751fi # as_fn_append
19752
19753# as_fn_arith ARG...
19754# ------------------
19755# Perform arithmetic evaluation on the ARGs, and store the result in the
19756# global $as_val. Take advantage of shells that can avoid forks. The arguments
19757# must be portable across $(()) and expr.
19758if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19759 eval 'as_fn_arith ()
19760 {
19761 as_val=$(( $* ))
19762 }'
19763else
19764 as_fn_arith ()
19765 {
19766 as_val=`expr "$@" || test $? -eq 1`
19767 }
19768fi # as_fn_arith
19769
19770
19771if expr a : '\(a\)' >/dev/null 2>&1 &&
19772 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19773 as_expr=expr
19774else
19775 as_expr=false
19776fi
19777
19778if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19779 as_basename=basename
19780else
19781 as_basename=false
19782fi
19783
19784if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19785 as_dirname=dirname
19786else
19787 as_dirname=false
19788fi
19789
19790as_me=`$as_basename -- "$0" ||
19791$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19792 X"$0" : 'X\(//\)$' \| \
19793 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19794$as_echo X/"$0" |
19795 sed '/^.*\/\([^/][^/]*\)\/*$/{
19796 s//\1/
19797 q
19798 }
19799 /^X\/\(\/\/\)$/{
19800 s//\1/
19801 q
19802 }
19803 /^X\/\(\/\).*/{
19804 s//\1/
19805 q
19806 }
19807 s/.*/./; q'`
19808
19809# Avoid depending upon Character Ranges.
19810as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19811as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19812as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19813as_cr_digits='0123456789'
19814as_cr_alnum=$as_cr_Letters$as_cr_digits
19815
19816ECHO_C= ECHO_N= ECHO_T=
19817case `echo -n x` in #(((((
19818-n*)
19819 case `echo 'xy\c'` in
19820 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19821 xy) ECHO_C='\c';;
19822 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19823 ECHO_T=' ';;
19824 esac;;
19825*)
19826 ECHO_N='-n';;
19827esac
19828
19829rm -f conf$$ conf$$.exe conf$$.file
19830if test -d conf$$.dir; then
19831 rm -f conf$$.dir/conf$$.file
19832else
19833 rm -f conf$$.dir
19834 mkdir conf$$.dir 2>/dev/null
19835fi
19836if (echo >conf$$.file) 2>/dev/null; then
19837 if ln -s conf$$.file conf$$ 2>/dev/null; then
19838 as_ln_s='ln -s'
19839 # ... but there are two gotchas:
19840 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19841 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19842 # In both cases, we have to default to `cp -pR'.
19843 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19844 as_ln_s='cp -pR'
19845 elif ln conf$$.file conf$$ 2>/dev/null; then
19846 as_ln_s=ln
19847 else
19848 as_ln_s='cp -pR'
19849 fi
19850else
19851 as_ln_s='cp -pR'
19852fi
19853rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19854rmdir conf$$.dir 2>/dev/null
19855
19856
19857# as_fn_mkdir_p
19858# -------------
19859# Create "$as_dir" as a directory, including parents if necessary.
19860as_fn_mkdir_p ()
19861{
19862
19863 case $as_dir in #(
19864 -*) as_dir=./$as_dir;;
19865 esac
19866 test -d "$as_dir" || eval $as_mkdir_p || {
19867 as_dirs=
19868 while :; do
19869 case $as_dir in #(
19870 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19871 *) as_qdir=$as_dir;;
19872 esac
19873 as_dirs="'$as_qdir' $as_dirs"
19874 as_dir=`$as_dirname -- "$as_dir" ||
19875$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19876 X"$as_dir" : 'X\(//\)[^/]' \| \
19877 X"$as_dir" : 'X\(//\)$' \| \
19878 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19879$as_echo X"$as_dir" |
19880 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19881 s//\1/
19882 q
19883 }
19884 /^X\(\/\/\)[^/].*/{
19885 s//\1/
19886 q
19887 }
19888 /^X\(\/\/\)$/{
19889 s//\1/
19890 q
19891 }
19892 /^X\(\/\).*/{
19893 s//\1/
19894 q
19895 }
19896 s/.*/./; q'`
19897 test -d "$as_dir" && break
19898 done
19899 test -z "$as_dirs" || eval "mkdir $as_dirs"
19900 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19901
19902
19903} # as_fn_mkdir_p
19904if mkdir -p . 2>/dev/null; then
19905 as_mkdir_p='mkdir -p "$as_dir"'
19906else
19907 test -d ./-p && rmdir ./-p
19908 as_mkdir_p=false
19909fi
19910
19911
19912# as_fn_executable_p FILE
19913# -----------------------
19914# Test if FILE is an executable regular file.
19915as_fn_executable_p ()
19916{
19917 test -f "$1" && test -x "$1"
19918} # as_fn_executable_p
19919as_test_x='test -x'
19920as_executable_p=as_fn_executable_p
19921
19922# Sed expression to map a string onto a valid CPP name.
19923as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19924
19925# Sed expression to map a string onto a valid variable name.
19926as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19927
19928
19929exec 6>&1
19930## ----------------------------------- ##
19931## Main body of $CONFIG_STATUS script. ##
19932## ----------------------------------- ##
19933_ASEOF
19934test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19935
19936cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19937# Save the log message, to keep $0 and so on meaningful, and to
19938# report actual input values of CONFIG_FILES etc. instead of their
19939# values after options handling.
19940ac_log="
19941This file was extended by OpenSSH $as_me Portable, which was
19942generated by GNU Autoconf 2.69. Invocation command line was
19943
19944 CONFIG_FILES = $CONFIG_FILES
19945 CONFIG_HEADERS = $CONFIG_HEADERS
19946 CONFIG_LINKS = $CONFIG_LINKS
19947 CONFIG_COMMANDS = $CONFIG_COMMANDS
19948 $ $0 $@
19949
19950on `(hostname || uname -n) 2>/dev/null | sed 1q`
19951"
19952
19953_ACEOF
19954
19955case $ac_config_files in *"
19956"*) set x $ac_config_files; shift; ac_config_files=$*;;
19957esac
19958
19959case $ac_config_headers in *"
19960"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19961esac
19962
19963
19964cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19965# Files that config.status was made for.
19966config_files="$ac_config_files"
19967config_headers="$ac_config_headers"
19968
19969_ACEOF
19970
19971cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19972ac_cs_usage="\
19973\`$as_me' instantiates files and other configuration actions
19974from templates according to the current configuration. Unless the files
19975and actions are specified as TAGs, all are instantiated by default.
19976
19977Usage: $0 [OPTION]... [TAG]...
19978
19979 -h, --help print this help, then exit
19980 -V, --version print version number and configuration settings, then exit
19981 --config print configuration, then exit
19982 -q, --quiet, --silent
19983 do not print progress messages
19984 -d, --debug don't remove temporary files
19985 --recheck update $as_me by reconfiguring in the same conditions
19986 --file=FILE[:TEMPLATE]
19987 instantiate the configuration file FILE
19988 --header=FILE[:TEMPLATE]
19989 instantiate the configuration header FILE
19990
19991Configuration files:
19992$config_files
19993
19994Configuration headers:
19995$config_headers
19996
19997Report bugs to <openssh-unix-dev@mindrot.org>."
19998
19999_ACEOF
20000cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20001ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20002ac_cs_version="\\
20003OpenSSH config.status Portable
20004configured by $0, generated by GNU Autoconf 2.69,
20005 with options \\"\$ac_cs_config\\"
20006
20007Copyright (C) 2012 Free Software Foundation, Inc.
20008This config.status script is free software; the Free Software Foundation
20009gives unlimited permission to copy, distribute and modify it."
20010
20011ac_pwd='$ac_pwd'
20012srcdir='$srcdir'
20013INSTALL='$INSTALL'
20014MKDIR_P='$MKDIR_P'
20015AWK='$AWK'
20016test -n "\$AWK" || AWK=awk
20017_ACEOF
20018
20019cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20020# The default lists apply if the user does not specify any file.
20021ac_need_defaults=:
20022while test $# != 0
20023do
20024 case $1 in
20025 --*=?*)
20026 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20027 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20028 ac_shift=:
20029 ;;
20030 --*=)
20031 ac_option=`expr "X$1" : 'X\([^=]*\)='`
20032 ac_optarg=
20033 ac_shift=:
20034 ;;
20035 *)
20036 ac_option=$1
20037 ac_optarg=$2
20038 ac_shift=shift
20039 ;;
20040 esac
20041
20042 case $ac_option in
20043 # Handling of the options.
20044 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20045 ac_cs_recheck=: ;;
20046 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20047 $as_echo "$ac_cs_version"; exit ;;
20048 --config | --confi | --conf | --con | --co | --c )
20049 $as_echo "$ac_cs_config"; exit ;;
20050 --debug | --debu | --deb | --de | --d | -d )
20051 debug=: ;;
20052 --file | --fil | --fi | --f )
20053 $ac_shift
20054 case $ac_optarg in
20055 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20056 '') as_fn_error $? "missing file argument" ;;
20057 esac
20058 as_fn_append CONFIG_FILES " '$ac_optarg'"
20059 ac_need_defaults=false;;
20060 --header | --heade | --head | --hea )
20061 $ac_shift
20062 case $ac_optarg in
20063 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20064 esac
20065 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20066 ac_need_defaults=false;;
20067 --he | --h)
20068 # Conflict between --help and --header
20069 as_fn_error $? "ambiguous option: \`$1'
20070Try \`$0 --help' for more information.";;
20071 --help | --hel | -h )
20072 $as_echo "$ac_cs_usage"; exit ;;
20073 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20074 | -silent | --silent | --silen | --sile | --sil | --si | --s)
20075 ac_cs_silent=: ;;
20076
20077 # This is an error.
20078 -*) as_fn_error $? "unrecognized option: \`$1'
20079Try \`$0 --help' for more information." ;;
20080
20081 *) as_fn_append ac_config_targets " $1"
20082 ac_need_defaults=false ;;
20083
20084 esac
20085 shift
20086done
20087
20088ac_configure_extra_args=
20089
20090if $ac_cs_silent; then
20091 exec 6>/dev/null
20092 ac_configure_extra_args="$ac_configure_extra_args --silent"
20093fi
20094
20095_ACEOF
20096cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20097if \$ac_cs_recheck; then
20098 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20099 shift
20100 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20101 CONFIG_SHELL='$SHELL'
20102 export CONFIG_SHELL
20103 exec "\$@"
20104fi
20105
20106_ACEOF
20107cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20108exec 5>>config.log
20109{
20110 echo
20111 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20112## Running $as_me. ##
20113_ASBOX
20114 $as_echo "$ac_log"
20115} >&5
20116
20117_ACEOF
20118cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20119_ACEOF
20120
20121cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20122
20123# Handling of arguments.
20124for ac_config_target in $ac_config_targets
20125do
20126 case $ac_config_target in
20127 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
20128 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20129 "buildpkg.sh") CONFIG_FILES="$CONFIG_FILES buildpkg.sh" ;;
20130 "opensshd.init") CONFIG_FILES="$CONFIG_FILES opensshd.init" ;;
20131 "openssh.xml") CONFIG_FILES="$CONFIG_FILES openssh.xml" ;;
20132 "openbsd-compat/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;;
20133 "openbsd-compat/regress/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/regress/Makefile" ;;
20134 "survey.sh") CONFIG_FILES="$CONFIG_FILES survey.sh" ;;
20135
20136 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20137 esac
20138done
20139
20140
20141# If the user did not use the arguments to specify the items to instantiate,
20142# then the envvar interface is used. Set only those that are not.
20143# We use the long form for the default assignment because of an extremely
20144# bizarre bug on SunOS 4.1.3.
20145if $ac_need_defaults; then
20146 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20147 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20148fi
20149
20150# Have a temporary directory for convenience. Make it in the build tree
20151# simply because there is no reason against having it here, and in addition,
20152# creating and moving files from /tmp can sometimes cause problems.
20153# Hook for its removal unless debugging.
20154# Note that there is a small window in which the directory will not be cleaned:
20155# after its creation but before its name has been assigned to `$tmp'.
20156$debug ||
20157{
20158 tmp= ac_tmp=
20159 trap 'exit_status=$?
20160 : "${ac_tmp:=$tmp}"
20161 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20162' 0
20163 trap 'as_fn_exit 1' 1 2 13 15
20164}
20165# Create a (secure) tmp directory for tmp files.
20166
20167{
20168 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20169 test -d "$tmp"
20170} ||
20171{
20172 tmp=./conf$$-$RANDOM
20173 (umask 077 && mkdir "$tmp")
20174} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20175ac_tmp=$tmp
20176
20177# Set up the scripts for CONFIG_FILES section.
20178# No need to generate them if there are no CONFIG_FILES.
20179# This happens for instance with `./config.status config.h'.
20180if test -n "$CONFIG_FILES"; then
20181
20182
20183ac_cr=`echo X | tr X '\015'`
20184# On cygwin, bash can eat \r inside `` if the user requested igncr.
20185# But we know of no other shell where ac_cr would be empty at this
20186# point, so we can use a bashism as a fallback.
20187if test "x$ac_cr" = x; then
20188 eval ac_cr=\$\'\\r\'
20189fi
20190ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20191if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20192 ac_cs_awk_cr='\\r'
20193else
20194 ac_cs_awk_cr=$ac_cr
20195fi
20196
20197echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20198_ACEOF
20199
20200
20201{
20202 echo "cat >conf$$subs.awk <<_ACEOF" &&
20203 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20204 echo "_ACEOF"
20205} >conf$$subs.sh ||
20206 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20207ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20208ac_delim='%!_!# '
20209for ac_last_try in false false false false false :; do
20210 . ./conf$$subs.sh ||
20211 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20212
20213 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20214 if test $ac_delim_n = $ac_delim_num; then
20215 break
20216 elif $ac_last_try; then
20217 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20218 else
20219 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20220 fi
20221done
20222rm -f conf$$subs.sh
20223
20224cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20225cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20226_ACEOF
20227sed -n '
20228h
20229s/^/S["/; s/!.*/"]=/
20230p
20231g
20232s/^[^!]*!//
20233:repl
20234t repl
20235s/'"$ac_delim"'$//
20236t delim
20237:nl
20238h
20239s/\(.\{148\}\)..*/\1/
20240t more1
20241s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20242p
20243n
20244b repl
20245:more1
20246s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20247p
20248g
20249s/.\{148\}//
20250t nl
20251:delim
20252h
20253s/\(.\{148\}\)..*/\1/
20254t more2
20255s/["\\]/\\&/g; s/^/"/; s/$/"/
20256p
20257b
20258:more2
20259s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20260p
20261g
20262s/.\{148\}//
20263t delim
20264' <conf$$subs.awk | sed '
20265/^[^""]/{
20266 N
20267 s/\n//
20268}
20269' >>$CONFIG_STATUS || ac_write_fail=1
20270rm -f conf$$subs.awk
20271cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20272_ACAWK
20273cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20274 for (key in S) S_is_set[key] = 1
20275 FS = ""
20276
20277}
20278{
20279 line = $ 0
20280 nfields = split(line, field, "@")
20281 substed = 0
20282 len = length(field[1])
20283 for (i = 2; i < nfields; i++) {
20284 key = field[i]
20285 keylen = length(key)
20286 if (S_is_set[key]) {
20287 value = S[key]
20288 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20289 len += length(value) + length(field[++i])
20290 substed = 1
20291 } else
20292 len += 1 + keylen
20293 }
20294
20295 print line
20296}
20297
20298_ACAWK
20299_ACEOF
20300cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20301if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20302 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20303else
20304 cat
20305fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20306 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20307_ACEOF
20308
20309# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20310# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20311# trailing colons and then remove the whole line if VPATH becomes empty
20312# (actually we leave an empty line to preserve line numbers).
20313if test "x$srcdir" = x.; then
20314 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
20315h
20316s///
20317s/^/:/
20318s/[ ]*$/:/
20319s/:\$(srcdir):/:/g
20320s/:\${srcdir}:/:/g
20321s/:@srcdir@:/:/g
20322s/^:*//
20323s/:*$//
20324x
20325s/\(=[ ]*\).*/\1/
20326G
20327s/\n//
20328s/^[^=]*=[ ]*$//
20329}'
20330fi
20331
20332cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20333fi # test -n "$CONFIG_FILES"
20334
20335# Set up the scripts for CONFIG_HEADERS section.
20336# No need to generate them if there are no CONFIG_HEADERS.
20337# This happens for instance with `./config.status Makefile'.
20338if test -n "$CONFIG_HEADERS"; then
20339cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20340BEGIN {
20341_ACEOF
20342
20343# Transform confdefs.h into an awk script `defines.awk', embedded as
20344# here-document in config.status, that substitutes the proper values into
20345# config.h.in to produce config.h.
20346
20347# Create a delimiter string that does not exist in confdefs.h, to ease
20348# handling of long lines.
20349ac_delim='%!_!# '
20350for ac_last_try in false false :; do
20351 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20352 if test -z "$ac_tt"; then
20353 break
20354 elif $ac_last_try; then
20355 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20356 else
20357 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20358 fi
20359done
20360
20361# For the awk script, D is an array of macro values keyed by name,
20362# likewise P contains macro parameters if any. Preserve backslash
20363# newline sequences.
20364
20365ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20366sed -n '
20367s/.\{148\}/&'"$ac_delim"'/g
20368t rset
20369:rset
20370s/^[ ]*#[ ]*define[ ][ ]*/ /
20371t def
20372d
20373:def
20374s/\\$//
20375t bsnl
20376s/["\\]/\\&/g
20377s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20378D["\1"]=" \3"/p
20379s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
20380d
20381:bsnl
20382s/["\\]/\\&/g
20383s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
20384D["\1"]=" \3\\\\\\n"\\/p
20385t cont
20386s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20387t cont
20388d
20389:cont
20390n
20391s/.\{148\}/&'"$ac_delim"'/g
20392t clear
20393:clear
20394s/\\$//
20395t bsnlc
20396s/["\\]/\\&/g; s/^/"/; s/$/"/p
20397d
20398:bsnlc
20399s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20400b cont
20401' <confdefs.h | sed '
20402s/'"$ac_delim"'/"\\\
20403"/g' >>$CONFIG_STATUS || ac_write_fail=1
20404
20405cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20406 for (key in D) D_is_set[key] = 1
20407 FS = ""
20408}
20409/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20410 line = \$ 0
20411 split(line, arg, " ")
20412 if (arg[1] == "#") {
20413 defundef = arg[2]
20414 mac1 = arg[3]
20415 } else {
20416 defundef = substr(arg[1], 2)
20417 mac1 = arg[2]
20418 }
20419 split(mac1, mac2, "(") #)
20420 macro = mac2[1]
20421 prefix = substr(line, 1, index(line, defundef) - 1)
20422 if (D_is_set[macro]) {
20423 # Preserve the white space surrounding the "#".
20424 print prefix "define", macro P[macro] D[macro]
20425 next
20426 } else {
20427 # Replace #undef with comments. This is necessary, for example,
20428 # in the case of _POSIX_SOURCE, which is predefined and required
20429 # on some systems where configure will not decide to define it.
20430 if (defundef == "undef") {
20431 print "/*", prefix defundef, macro, "*/"
20432 next
20433 }
20434 }
20435}
20436{ print }
20437_ACAWK
20438_ACEOF
20439cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20440 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20441fi # test -n "$CONFIG_HEADERS"
20442
20443
20444eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
20445shift
20446for ac_tag
20447do
20448 case $ac_tag in
20449 :[FHLC]) ac_mode=$ac_tag; continue;;
20450 esac
20451 case $ac_mode$ac_tag in
20452 :[FHL]*:*);;
20453 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20454 :[FH]-) ac_tag=-:-;;
20455 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20456 esac
20457 ac_save_IFS=$IFS
20458 IFS=:
20459 set x $ac_tag
20460 IFS=$ac_save_IFS
20461 shift
20462 ac_file=$1
20463 shift
20464
20465 case $ac_mode in
20466 :L) ac_source=$1;;
20467 :[FH])
20468 ac_file_inputs=
20469 for ac_f
20470 do
20471 case $ac_f in
20472 -) ac_f="$ac_tmp/stdin";;
20473 *) # Look for the file first in the build tree, then in the source tree
20474 # (if the path is not absolute). The absolute path cannot be DOS-style,
20475 # because $ac_f cannot contain `:'.
20476 test -f "$ac_f" ||
20477 case $ac_f in
20478 [\\/$]*) false;;
20479 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20480 esac ||
20481 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20482 esac
20483 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20484 as_fn_append ac_file_inputs " '$ac_f'"
20485 done
20486
20487 # Let's still pretend it is `configure' which instantiates (i.e., don't
20488 # use $as_me), people would be surprised to read:
20489 # /* config.h. Generated by config.status. */
20490 configure_input='Generated from '`
20491 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20492 `' by configure.'
20493 if test x"$ac_file" != x-; then
20494 configure_input="$ac_file. $configure_input"
20495 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20496$as_echo "$as_me: creating $ac_file" >&6;}
20497 fi
20498 # Neutralize special characters interpreted by sed in replacement strings.
20499 case $configure_input in #(
20500 *\&* | *\|* | *\\* )
20501 ac_sed_conf_input=`$as_echo "$configure_input" |
20502 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20503 *) ac_sed_conf_input=$configure_input;;
20504 esac
20505
20506 case $ac_tag in
20507 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20508 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20509 esac
20510 ;;
20511 esac
20512
20513 ac_dir=`$as_dirname -- "$ac_file" ||
20514$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20515 X"$ac_file" : 'X\(//\)[^/]' \| \
20516 X"$ac_file" : 'X\(//\)$' \| \
20517 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20518$as_echo X"$ac_file" |
20519 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20520 s//\1/
20521 q
20522 }
20523 /^X\(\/\/\)[^/].*/{
20524 s//\1/
20525 q
20526 }
20527 /^X\(\/\/\)$/{
20528 s//\1/
20529 q
20530 }
20531 /^X\(\/\).*/{
20532 s//\1/
20533 q
20534 }
20535 s/.*/./; q'`
20536 as_dir="$ac_dir"; as_fn_mkdir_p
20537 ac_builddir=.
20538
20539case "$ac_dir" in
20540.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20541*)
20542 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20543 # A ".." for each directory in $ac_dir_suffix.
20544 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20545 case $ac_top_builddir_sub in
20546 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20547 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20548 esac ;;
20549esac
20550ac_abs_top_builddir=$ac_pwd
20551ac_abs_builddir=$ac_pwd$ac_dir_suffix
20552# for backward compatibility:
20553ac_top_builddir=$ac_top_build_prefix
20554
20555case $srcdir in
20556 .) # We are building in place.
20557 ac_srcdir=.
20558 ac_top_srcdir=$ac_top_builddir_sub
20559 ac_abs_top_srcdir=$ac_pwd ;;
20560 [\\/]* | ?:[\\/]* ) # Absolute name.
20561 ac_srcdir=$srcdir$ac_dir_suffix;
20562 ac_top_srcdir=$srcdir
20563 ac_abs_top_srcdir=$srcdir ;;
20564 *) # Relative name.
20565 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20566 ac_top_srcdir=$ac_top_build_prefix$srcdir
20567 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20568esac
20569ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20570
20571
20572 case $ac_mode in
20573 :F)
20574 #
20575 # CONFIG_FILE
20576 #
20577
20578 case $INSTALL in
20579 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20580 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20581 esac
20582 ac_MKDIR_P=$MKDIR_P
20583 case $MKDIR_P in
20584 [\\/$]* | ?:[\\/]* ) ;;
20585 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20586 esac
20587_ACEOF
20588
20589cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20590# If the template does not know about datarootdir, expand it.
20591# FIXME: This hack should be removed a few years after 2.60.
20592ac_datarootdir_hack=; ac_datarootdir_seen=
20593ac_sed_dataroot='
20594/datarootdir/ {
20595 p
20596 q
20597}
20598/@datadir@/p
20599/@docdir@/p
20600/@infodir@/p
20601/@localedir@/p
20602/@mandir@/p'
20603case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20604*datarootdir*) ac_datarootdir_seen=yes;;
20605*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20606 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20607$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20608_ACEOF
20609cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20610 ac_datarootdir_hack='
20611 s&@datadir@&$datadir&g
20612 s&@docdir@&$docdir&g
20613 s&@infodir@&$infodir&g
20614 s&@localedir@&$localedir&g
20615 s&@mandir@&$mandir&g
20616 s&\\\${datarootdir}&$datarootdir&g' ;;
20617esac
20618_ACEOF
20619
20620# Neutralize VPATH when `$srcdir' = `.'.
20621# Shell code in configure.ac might set extrasub.
20622# FIXME: do we really want to maintain this feature?
20623cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20624ac_sed_extra="$ac_vpsub
20625$extrasub
20626_ACEOF
20627cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20628:t
20629/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20630s|@configure_input@|$ac_sed_conf_input|;t t
20631s&@top_builddir@&$ac_top_builddir_sub&;t t
20632s&@top_build_prefix@&$ac_top_build_prefix&;t t
20633s&@srcdir@&$ac_srcdir&;t t
20634s&@abs_srcdir@&$ac_abs_srcdir&;t t
20635s&@top_srcdir@&$ac_top_srcdir&;t t
20636s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20637s&@builddir@&$ac_builddir&;t t
20638s&@abs_builddir@&$ac_abs_builddir&;t t
20639s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20640s&@INSTALL@&$ac_INSTALL&;t t
20641s&@MKDIR_P@&$ac_MKDIR_P&;t t
20642$ac_datarootdir_hack
20643"
20644eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20645 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20646
20647test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20648 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20649 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20650 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20651 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20652which seems to be undefined. Please make sure it is defined" >&5
20653$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20654which seems to be undefined. Please make sure it is defined" >&2;}
20655
20656 rm -f "$ac_tmp/stdin"
20657 case $ac_file in
20658 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20659 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20660 esac \
20661 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20662 ;;
20663 :H)
20664 #
20665 # CONFIG_HEADER
20666 #
20667 if test x"$ac_file" != x-; then
20668 {
20669 $as_echo "/* $configure_input */" \
20670 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20671 } >"$ac_tmp/config.h" \
20672 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20673 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20674 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20675$as_echo "$as_me: $ac_file is unchanged" >&6;}
20676 else
20677 rm -f "$ac_file"
20678 mv "$ac_tmp/config.h" "$ac_file" \
20679 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20680 fi
20681 else
20682 $as_echo "/* $configure_input */" \
20683 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20684 || as_fn_error $? "could not create -" "$LINENO" 5
20685 fi
20686 ;;
20687
20688
20689 esac
20690
20691done # for ac_tag
20692
20693
20694as_fn_exit 0
20695_ACEOF
20696ac_clean_files=$ac_clean_files_save
20697
20698test $ac_write_fail = 0 ||
20699 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20700
20701
20702# configure is writing to config.log, and then calls config.status.
20703# config.status does its own redirection, appending to config.log.
20704# Unfortunately, on DOS this fails, as config.log is still kept open
20705# by configure, so config.status won't be able to write to it; its
20706# output is simply discarded. So we exec the FD to /dev/null,
20707# effectively closing config.log, so it can be properly (re)opened and
20708# appended to by config.status. When coming back to configure, we
20709# need to make the FD available again.
20710if test "$no_create" != yes; then
20711 ac_cs_success=:
20712 ac_config_status_args=
20713 test "$silent" = yes &&
20714 ac_config_status_args="$ac_config_status_args --quiet"
20715 exec 5>/dev/null
20716 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20717 exec 5>>config.log
20718 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20719 # would make configure fail if this is the last instruction.
20720 $ac_cs_success || as_fn_exit 1
20721fi
20722if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20723 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20724$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20725fi
20726
20727
20728# Print summary of options
20729
20730# Someone please show me a better way :)
20731A=`eval echo ${prefix}` ; A=`eval echo ${A}`
20732B=`eval echo ${bindir}` ; B=`eval echo ${B}`
20733C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
20734D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
20735E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
20736F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
20737G=`eval echo ${piddir}` ; G=`eval echo ${G}`
20738H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}`
20739I=`eval echo ${user_path}` ; I=`eval echo ${I}`
20740J=`eval echo ${superuser_path}` ; J=`eval echo ${J}`
20741
20742echo ""
20743echo "OpenSSH has been configured with the following options:"
20744echo " User binaries: $B"
20745echo " System binaries: $C"
20746echo " Configuration files: $D"
20747echo " Askpass program: $E"
20748echo " Manual pages: $F"
20749echo " PID file: $G"
20750echo " Privilege separation chroot path: $H"
20751if test "x$external_path_file" = "x/etc/login.conf" ; then
20752echo " At runtime, sshd will use the path defined in $external_path_file"
20753echo " Make sure the path to scp is present, otherwise scp will not work"
20754else
20755echo " sshd default user PATH: $I"
20756 if test ! -z "$external_path_file"; then
20757echo " (If PATH is set in $external_path_file it will be used instead. If"
20758echo " used, ensure the path to scp is present, otherwise scp will not work.)"
20759 fi
20760fi
20761if test ! -z "$superuser_path" ; then
20762echo " sshd superuser user PATH: $J"
20763fi
20764echo " Manpage format: $MANTYPE"
20765echo " PAM support: $PAM_MSG"
20766echo " OSF SIA support: $SIA_MSG"
20767echo " KerberosV support: $KRB5_MSG"
20768echo " SELinux support: $SELINUX_MSG"
20769echo " MD5 password support: $MD5_MSG"
20770echo " libedit support: $LIBEDIT_MSG"
20771echo " libldns support: $LDNS_MSG"
20772echo " Solaris process contract support: $SPC_MSG"
20773echo " Solaris project support: $SP_MSG"
20774echo " Solaris privilege support: $SPP_MSG"
20775echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
20776echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
20777echo " BSD Auth support: $BSD_AUTH_MSG"
20778echo " Random number source: $RAND_MSG"
20779echo " Privsep sandbox style: $SANDBOX_STYLE"
20780
20781echo ""
20782
20783echo " Host: ${host}"
20784echo " Compiler: ${CC}"
20785echo " Compiler flags: ${CFLAGS}"
20786echo "Preprocessor flags: ${CPPFLAGS}"
20787echo " Linker flags: ${LDFLAGS}"
20788echo " Libraries: ${LIBS}"
20789if test ! -z "${SSHDLIBS}"; then
20790echo " +for sshd: ${SSHDLIBS}"
20791fi
20792if test ! -z "${SSHLIBS}"; then
20793echo " +for ssh: ${SSHLIBS}"
20794fi
20795
20796echo ""
20797
20798if test "x$MAKE_PACKAGE_SUPPORTED" = "xyes" ; then
20799 echo "SVR4 style packages are supported with \"make package\""
20800 echo ""
20801fi
20802
20803if test "x$PAM_MSG" = "xyes" ; then
20804 echo "PAM is enabled. You may need to install a PAM control file "
20805 echo "for sshd, otherwise password authentication may fail. "
20806 echo "Example PAM control files can be found in the contrib/ "
20807 echo "subdirectory"
20808 echo ""
20809fi
20810
20811if test ! -z "$NO_PEERCHECK" ; then
20812 echo "WARNING: the operating system that you are using does not"
20813 echo "appear to support getpeereid(), getpeerucred() or the"
20814 echo "SO_PEERCRED getsockopt() option. These facilities are used to"
20815 echo "enforce security checks to prevent unauthorised connections to"
20816 echo "ssh-agent. Their absence increases the risk that a malicious"
20817 echo "user can connect to your agent."
20818 echo ""
20819fi
20820
20821if test "$AUDIT_MODULE" = "bsm" ; then
20822 echo "WARNING: BSM audit support is currently considered EXPERIMENTAL."
20823 echo "See the Solaris section in README.platform for details."
20824fi