]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - configure
Vendor import of OpenSSH 7.7p1.
[FreeBSD/FreeBSD.git] / configure
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
19 DUALCASE=1; export DUALCASE # for MKS sh
20 if 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
27 else
28   case `(set -o) 2>/dev/null` in #(
29   *posix*) :
30     set -o posix ;; #(
31   *) :
32      ;;
33 esac
34 fi
35
36
37 as_nl='
38 '
39 export as_nl
40 # Printing a long string crashes Solaris 7 /usr/bin/printf.
41 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
42 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
43 as_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.
46 if 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 --'
50 elif (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'
53 else
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'
73 fi
74
75 # The user is always right.
76 if 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   }
82 fi
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.)
90 IFS=" ""        $as_nl"
91
92 # Find who we are.  Look in the path if we contain no directory separator.
93 as_myself=
94 case $0 in #((
95   *[\\/]* ) as_myself=$0 ;;
96   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97 for as_dir in $PATH
98 do
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
103 IFS=$as_save_IFS
104
105      ;;
106 esac
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.
109 if test "x$as_myself" = x; then
110   as_myself=$0
111 fi
112 if test ! -f "$as_myself"; then
113   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114   exit 1
115 fi
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.
121 for as_var in BASH_ENV ENV MAIL MAILPATH
122 do eval test x\${$as_var+set} = xset \
123   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
124 done
125 PS1='$ '
126 PS2='> '
127 PS4='+ '
128
129 # NLS nuisances.
130 LC_ALL=C
131 export LC_ALL
132 LANGUAGE=C
133 export 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.
146 BASH_ENV=/dev/null
147 ENV=/dev/null
148 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
149 case $- in # ((((
150   *v*x* | *x*v* ) as_opts=-vx ;;
151   *v* ) as_opts=-v ;;
152   *x* ) as_opts=-x ;;
153   * ) as_opts= ;;
154 esac
155 exec $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
159 as_fn_exit 255
160   fi
161   # We don't want this to propagate to other subprocesses.
162           { _as_can_reexec=; unset _as_can_reexec;}
163 if 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
171 else
172   case \`(set -o) 2>/dev/null\` in #(
173   *posix*) :
174     set -o posix ;; #(
175   *) :
176      ;;
177 esac
178 fi
179 "
180   as_required="as_fn_return () { (exit \$1); }
181 as_fn_success () { as_fn_return 0; }
182 as_fn_failure () { as_fn_return 1; }
183 as_fn_ret_success () { return 0; }
184 as_fn_ret_failure () { return 1; }
185
186 exitcode=0
187 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
188 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
189 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
190 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
191 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
192
193 else
194   exitcode=1; echo positional parameters were not saved.
195 fi
196 test x\$exitcode = x0 || exit 1
197 test -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
202 test \$(( 1 + 1 )) = 2 || exit 1"
203   if (eval "$as_required") 2>/dev/null; then :
204   as_have_required=yes
205 else
206   as_have_required=no
207 fi
208   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
209
210 else
211   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
212 as_found=false
213 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
214 do
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
228 fi
229 fi
230            done;;
231        esac
232   as_found=false
233 done
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
237 fi; }
238 IFS=$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.
247 BASH_ENV=/dev/null
248 ENV=/dev/null
249 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
250 case $- in # ((((
251   *v*x* | *x*v* ) as_opts=-vx ;;
252   *v* ) as_opts=-v ;;
253   *x* ) as_opts=-x ;;
254   * ) as_opts= ;;
255 esac
256 exec $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
260 exit 255
261 fi
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
277 fi
278 fi
279 fi
280 SHELL=${CONFIG_SHELL-/bin/sh}
281 export SHELL
282 # Unset more variables known to interfere with behavior of common tools.
283 CLICOLOR_FORCE= GREP_OPTIONS=
284 unset CLICOLOR_FORCE GREP_OPTIONS
285
286 ## --------------------- ##
287 ## M4sh Shell Functions. ##
288 ## --------------------- ##
289 # as_fn_unset VAR
290 # ---------------
291 # Portably unset VAR.
292 as_fn_unset ()
293 {
294   { eval $1=; unset $1;}
295 }
296 as_unset=as_fn_unset
297
298 # as_fn_set_status STATUS
299 # -----------------------
300 # Set $? to STATUS, without forking.
301 as_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.
309 as_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.
319 as_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.
367 as_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.
377 if (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   }'
382 else
383   as_fn_append ()
384   {
385     eval $1=\$$1\$2
386   }
387 fi # 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.
394 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
395   eval 'as_fn_arith ()
396   {
397     as_val=$(( $* ))
398   }'
399 else
400   as_fn_arith ()
401   {
402     as_val=`expr "$@" || test $? -eq 1`
403   }
404 fi # 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.
412 as_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
423 if expr a : '\(a\)' >/dev/null 2>&1 &&
424    test "X`expr 00001 : '.*\(...\)'`" = X001; then
425   as_expr=expr
426 else
427   as_expr=false
428 fi
429
430 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
431   as_basename=basename
432 else
433   as_basename=false
434 fi
435
436 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
437   as_dirname=dirname
438 else
439   as_dirname=false
440 fi
441
442 as_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.
462 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
463 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
464 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
465 as_cr_digits='0123456789'
466 as_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
504 ECHO_C= ECHO_N= ECHO_T=
505 case `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';;
515 esac
516
517 rm -f conf$$ conf$$.exe conf$$.file
518 if test -d conf$$.dir; then
519   rm -f conf$$.dir/conf$$.file
520 else
521   rm -f conf$$.dir
522   mkdir conf$$.dir 2>/dev/null
523 fi
524 if (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
538 else
539   as_ln_s='cp -pR'
540 fi
541 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
542 rmdir conf$$.dir 2>/dev/null
543
544 if mkdir -p . 2>/dev/null; then
545   as_mkdir_p='mkdir -p "$as_dir"'
546 else
547   test -d ./-p && rmdir ./-p
548   as_mkdir_p=false
549 fi
550
551 as_test_x='test -x'
552 as_executable_p=as_fn_executable_p
553
554 # Sed expression to map a string onto a valid CPP name.
555 as_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.
558 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
559
560
561 test -n "$DJDIR" || exec 7<&0 </dev/null
562 exec 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.
567 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
568
569 #
570 # Initializations.
571 #
572 ac_default_prefix=/usr/local
573 ac_clean_files=
574 ac_config_libobj_dir=.
575 LIBOBJS=
576 cross_compiling=no
577 subdirs=
578 MFLAGS=
579 MAKEFLAGS=
580
581 # Identity of this package.
582 PACKAGE_NAME='OpenSSH'
583 PACKAGE_TARNAME='openssh'
584 PACKAGE_VERSION='Portable'
585 PACKAGE_STRING='OpenSSH Portable'
586 PACKAGE_BUGREPORT='openssh-unix-dev@mindrot.org'
587 PACKAGE_URL=''
588
589 ac_unique_file="ssh.c"
590 # Factoring default headers for most tests.
591 ac_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
626 ac_subst_vars='LTLIBOBJS
627 DEPEND
628 UNSUPPORTED_ALGORITHMS
629 TEST_MALLOC_OPTIONS
630 TEST_SSH_UTF8
631 TEST_SSH_IPV6
632 piddir
633 user_path
634 mansubdir
635 MANTYPE
636 XAUTH_PATH
637 STRIP_OPT
638 xauth_path
639 PRIVSEP_PATH
640 K5LIBS
641 GSSLIBS
642 KRB5CONF
643 SSHDLIBS
644 SSHLIBS
645 SSH_PRIVSEP_USER
646 COMMENT_OUT_ECC
647 TEST_SSH_ECC
648 LIBEDIT
649 PKGCONFIG
650 LDNSCONFIG
651 LIBOBJS
652 LD
653 PATH_PASSWD_PROG
654 STARTUP_SCRIPT_SHELL
655 MAKE_PACKAGE_SUPPORTED
656 PATH_USERADD_PROG
657 PATH_GROUPADD_PROG
658 MANFMT
659 TEST_SHELL
660 MANDOC
661 NROFF
662 GROFF
663 SH
664 TEST_MINUS_S_SH
665 ENT
666 SED
667 KILL
668 CAT
669 ac_ct_AR
670 AR
671 MKDIR_P
672 INSTALL_DATA
673 INSTALL_SCRIPT
674 INSTALL_PROGRAM
675 RANLIB
676 AWK
677 EGREP
678 GREP
679 CPP
680 host_os
681 host_vendor
682 host_cpu
683 host
684 build_os
685 build_vendor
686 build_cpu
687 build
688 OBJEXT
689 EXEEXT
690 ac_ct_CC
691 CPPFLAGS
692 LDFLAGS
693 CFLAGS
694 CC
695 target_alias
696 host_alias
697 build_alias
698 LIBS
699 ECHO_T
700 ECHO_N
701 ECHO_C
702 DEFS
703 mandir
704 localedir
705 libdir
706 psdir
707 pdfdir
708 dvidir
709 htmldir
710 infodir
711 docdir
712 oldincludedir
713 includedir
714 localstatedir
715 sharedstatedir
716 sysconfdir
717 datadir
718 datarootdir
719 libexecdir
720 sbindir
721 bindir
722 program_transform_name
723 prefix
724 exec_prefix
725 PACKAGE_URL
726 PACKAGE_BUGREPORT
727 PACKAGE_STRING
728 PACKAGE_VERSION
729 PACKAGE_TARNAME
730 PACKAGE_NAME
731 PATH_SEPARATOR
732 SHELL'
733 ac_subst_files=''
734 ac_user_opts='
735 enable_option_checking
736 enable_largefile
737 with_openssl
738 with_stackprotect
739 with_hardening
740 with_rpath
741 with_cflags
742 with_cflags_after
743 with_cppflags
744 with_ldflags
745 with_ldflags_after
746 with_libs
747 with_Werror
748 with_solaris_contracts
749 with_solaris_projects
750 with_solaris_privs
751 with_osfsia
752 with_zlib
753 with_zlib_version_check
754 with_skey
755 with_ldns
756 with_libedit
757 with_audit
758 with_pie
759 enable_pkcs11
760 with_ssl_dir
761 with_openssl_header_check
762 with_ssl_engine
763 with_prngd_port
764 with_prngd_socket
765 with_pam
766 with_pam_service
767 with_privsep_user
768 with_sandbox
769 with_selinux
770 with_kerberos5
771 with_privsep_path
772 with_xauth
773 enable_strip
774 with_maildir
775 with_mantype
776 with_md5_passwords
777 with_shadow
778 with_ipaddr_display
779 enable_etc_default_login
780 with_default_path
781 with_superuser_path
782 with_4in6
783 with_bsd_auth
784 with_pid_dir
785 enable_lastlog
786 enable_utmp
787 enable_utmpx
788 enable_wtmp
789 enable_wtmpx
790 enable_libutil
791 enable_pututline
792 enable_pututxline
793 with_lastlog
794 '
795       ac_precious_vars='build_alias
796 host_alias
797 target_alias
798 CC
799 CFLAGS
800 LDFLAGS
801 LIBS
802 CPPFLAGS
803 CPP'
804
805
806 # Initialize some variables set by options.
807 ac_init_help=
808 ac_init_version=false
809 ac_unrecognized_opts=
810 ac_unrecognized_sep=
811 # The variables have the same names as the options, with
812 # dashes changed to underlines.
813 cache_file=/dev/null
814 exec_prefix=NONE
815 no_create=
816 no_recursion=
817 prefix=NONE
818 program_prefix=NONE
819 program_suffix=NONE
820 program_transform_name=s,x,x,
821 silent=
822 site=
823 srcdir=
824 verbose=
825 x_includes=NONE
826 x_libraries=NONE
827
828 # Installation directory options.
829 # These are left unexpanded so users can "make install exec_prefix=/foo"
830 # and all the variables that are supposed to be based on exec_prefix
831 # by default will actually change.
832 # Use braces instead of parens because sh, perl, etc. also accept them.
833 # (The list follows the same order as the GNU Coding Standards.)
834 bindir='${exec_prefix}/bin'
835 sbindir='${exec_prefix}/sbin'
836 libexecdir='${exec_prefix}/libexec'
837 datarootdir='${prefix}/share'
838 datadir='${datarootdir}'
839 sysconfdir='${prefix}/etc'
840 sharedstatedir='${prefix}/com'
841 localstatedir='${prefix}/var'
842 includedir='${prefix}/include'
843 oldincludedir='/usr/include'
844 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
845 infodir='${datarootdir}/info'
846 htmldir='${docdir}'
847 dvidir='${docdir}'
848 pdfdir='${docdir}'
849 psdir='${docdir}'
850 libdir='${exec_prefix}/lib'
851 localedir='${datarootdir}/locale'
852 mandir='${datarootdir}/man'
853
854 ac_prev=
855 ac_dashdash=
856 for ac_option
857 do
858   # If the previous option needs an argument, assign it.
859   if test -n "$ac_prev"; then
860     eval $ac_prev=\$ac_option
861     ac_prev=
862     continue
863   fi
864
865   case $ac_option in
866   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
867   *=)   ac_optarg= ;;
868   *)    ac_optarg=yes ;;
869   esac
870
871   # Accept the important Cygnus configure options, so we can diagnose typos.
872
873   case $ac_dashdash$ac_option in
874   --)
875     ac_dashdash=yes ;;
876
877   -bindir | --bindir | --bindi | --bind | --bin | --bi)
878     ac_prev=bindir ;;
879   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
880     bindir=$ac_optarg ;;
881
882   -build | --build | --buil | --bui | --bu)
883     ac_prev=build_alias ;;
884   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
885     build_alias=$ac_optarg ;;
886
887   -cache-file | --cache-file | --cache-fil | --cache-fi \
888   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
889     ac_prev=cache_file ;;
890   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
891   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
892     cache_file=$ac_optarg ;;
893
894   --config-cache | -C)
895     cache_file=config.cache ;;
896
897   -datadir | --datadir | --datadi | --datad)
898     ac_prev=datadir ;;
899   -datadir=* | --datadir=* | --datadi=* | --datad=*)
900     datadir=$ac_optarg ;;
901
902   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
903   | --dataroo | --dataro | --datar)
904     ac_prev=datarootdir ;;
905   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
906   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
907     datarootdir=$ac_optarg ;;
908
909   -disable-* | --disable-*)
910     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
911     # Reject names that are not valid shell variable names.
912     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
913       as_fn_error $? "invalid feature name: $ac_useropt"
914     ac_useropt_orig=$ac_useropt
915     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
916     case $ac_user_opts in
917       *"
918 "enable_$ac_useropt"
919 "*) ;;
920       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
921          ac_unrecognized_sep=', ';;
922     esac
923     eval enable_$ac_useropt=no ;;
924
925   -docdir | --docdir | --docdi | --doc | --do)
926     ac_prev=docdir ;;
927   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
928     docdir=$ac_optarg ;;
929
930   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
931     ac_prev=dvidir ;;
932   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
933     dvidir=$ac_optarg ;;
934
935   -enable-* | --enable-*)
936     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
937     # Reject names that are not valid shell variable names.
938     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
939       as_fn_error $? "invalid feature name: $ac_useropt"
940     ac_useropt_orig=$ac_useropt
941     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
942     case $ac_user_opts in
943       *"
944 "enable_$ac_useropt"
945 "*) ;;
946       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
947          ac_unrecognized_sep=', ';;
948     esac
949     eval enable_$ac_useropt=\$ac_optarg ;;
950
951   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
952   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
953   | --exec | --exe | --ex)
954     ac_prev=exec_prefix ;;
955   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
956   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
957   | --exec=* | --exe=* | --ex=*)
958     exec_prefix=$ac_optarg ;;
959
960   -gas | --gas | --ga | --g)
961     # Obsolete; use --with-gas.
962     with_gas=yes ;;
963
964   -help | --help | --hel | --he | -h)
965     ac_init_help=long ;;
966   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
967     ac_init_help=recursive ;;
968   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
969     ac_init_help=short ;;
970
971   -host | --host | --hos | --ho)
972     ac_prev=host_alias ;;
973   -host=* | --host=* | --hos=* | --ho=*)
974     host_alias=$ac_optarg ;;
975
976   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
977     ac_prev=htmldir ;;
978   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
979   | --ht=*)
980     htmldir=$ac_optarg ;;
981
982   -includedir | --includedir | --includedi | --included | --include \
983   | --includ | --inclu | --incl | --inc)
984     ac_prev=includedir ;;
985   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
986   | --includ=* | --inclu=* | --incl=* | --inc=*)
987     includedir=$ac_optarg ;;
988
989   -infodir | --infodir | --infodi | --infod | --info | --inf)
990     ac_prev=infodir ;;
991   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
992     infodir=$ac_optarg ;;
993
994   -libdir | --libdir | --libdi | --libd)
995     ac_prev=libdir ;;
996   -libdir=* | --libdir=* | --libdi=* | --libd=*)
997     libdir=$ac_optarg ;;
998
999   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1000   | --libexe | --libex | --libe)
1001     ac_prev=libexecdir ;;
1002   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1003   | --libexe=* | --libex=* | --libe=*)
1004     libexecdir=$ac_optarg ;;
1005
1006   -localedir | --localedir | --localedi | --localed | --locale)
1007     ac_prev=localedir ;;
1008   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1009     localedir=$ac_optarg ;;
1010
1011   -localstatedir | --localstatedir | --localstatedi | --localstated \
1012   | --localstate | --localstat | --localsta | --localst | --locals)
1013     ac_prev=localstatedir ;;
1014   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1015   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1016     localstatedir=$ac_optarg ;;
1017
1018   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1019     ac_prev=mandir ;;
1020   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1021     mandir=$ac_optarg ;;
1022
1023   -nfp | --nfp | --nf)
1024     # Obsolete; use --without-fp.
1025     with_fp=no ;;
1026
1027   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1028   | --no-cr | --no-c | -n)
1029     no_create=yes ;;
1030
1031   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1032   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1033     no_recursion=yes ;;
1034
1035   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1036   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1037   | --oldin | --oldi | --old | --ol | --o)
1038     ac_prev=oldincludedir ;;
1039   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1040   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1041   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1042     oldincludedir=$ac_optarg ;;
1043
1044   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1045     ac_prev=prefix ;;
1046   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1047     prefix=$ac_optarg ;;
1048
1049   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1050   | --program-pre | --program-pr | --program-p)
1051     ac_prev=program_prefix ;;
1052   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1053   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1054     program_prefix=$ac_optarg ;;
1055
1056   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1057   | --program-suf | --program-su | --program-s)
1058     ac_prev=program_suffix ;;
1059   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1060   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1061     program_suffix=$ac_optarg ;;
1062
1063   -program-transform-name | --program-transform-name \
1064   | --program-transform-nam | --program-transform-na \
1065   | --program-transform-n | --program-transform- \
1066   | --program-transform | --program-transfor \
1067   | --program-transfo | --program-transf \
1068   | --program-trans | --program-tran \
1069   | --progr-tra | --program-tr | --program-t)
1070     ac_prev=program_transform_name ;;
1071   -program-transform-name=* | --program-transform-name=* \
1072   | --program-transform-nam=* | --program-transform-na=* \
1073   | --program-transform-n=* | --program-transform-=* \
1074   | --program-transform=* | --program-transfor=* \
1075   | --program-transfo=* | --program-transf=* \
1076   | --program-trans=* | --program-tran=* \
1077   | --progr-tra=* | --program-tr=* | --program-t=*)
1078     program_transform_name=$ac_optarg ;;
1079
1080   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1081     ac_prev=pdfdir ;;
1082   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1083     pdfdir=$ac_optarg ;;
1084
1085   -psdir | --psdir | --psdi | --psd | --ps)
1086     ac_prev=psdir ;;
1087   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1088     psdir=$ac_optarg ;;
1089
1090   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1091   | -silent | --silent | --silen | --sile | --sil)
1092     silent=yes ;;
1093
1094   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1095     ac_prev=sbindir ;;
1096   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1097   | --sbi=* | --sb=*)
1098     sbindir=$ac_optarg ;;
1099
1100   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1101   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1102   | --sharedst | --shareds | --shared | --share | --shar \
1103   | --sha | --sh)
1104     ac_prev=sharedstatedir ;;
1105   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1106   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1107   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1108   | --sha=* | --sh=*)
1109     sharedstatedir=$ac_optarg ;;
1110
1111   -site | --site | --sit)
1112     ac_prev=site ;;
1113   -site=* | --site=* | --sit=*)
1114     site=$ac_optarg ;;
1115
1116   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1117     ac_prev=srcdir ;;
1118   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1119     srcdir=$ac_optarg ;;
1120
1121   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1122   | --syscon | --sysco | --sysc | --sys | --sy)
1123     ac_prev=sysconfdir ;;
1124   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1125   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1126     sysconfdir=$ac_optarg ;;
1127
1128   -target | --target | --targe | --targ | --tar | --ta | --t)
1129     ac_prev=target_alias ;;
1130   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1131     target_alias=$ac_optarg ;;
1132
1133   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1134     verbose=yes ;;
1135
1136   -version | --version | --versio | --versi | --vers | -V)
1137     ac_init_version=: ;;
1138
1139   -with-* | --with-*)
1140     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1141     # Reject names that are not valid shell variable names.
1142     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1143       as_fn_error $? "invalid package name: $ac_useropt"
1144     ac_useropt_orig=$ac_useropt
1145     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1146     case $ac_user_opts in
1147       *"
1148 "with_$ac_useropt"
1149 "*) ;;
1150       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1151          ac_unrecognized_sep=', ';;
1152     esac
1153     eval with_$ac_useropt=\$ac_optarg ;;
1154
1155   -without-* | --without-*)
1156     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1157     # Reject names that are not valid shell variable names.
1158     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1159       as_fn_error $? "invalid package name: $ac_useropt"
1160     ac_useropt_orig=$ac_useropt
1161     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1162     case $ac_user_opts in
1163       *"
1164 "with_$ac_useropt"
1165 "*) ;;
1166       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1167          ac_unrecognized_sep=', ';;
1168     esac
1169     eval with_$ac_useropt=no ;;
1170
1171   --x)
1172     # Obsolete; use --with-x.
1173     with_x=yes ;;
1174
1175   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1176   | --x-incl | --x-inc | --x-in | --x-i)
1177     ac_prev=x_includes ;;
1178   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1179   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1180     x_includes=$ac_optarg ;;
1181
1182   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1183   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1184     ac_prev=x_libraries ;;
1185   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1186   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1187     x_libraries=$ac_optarg ;;
1188
1189   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1190 Try \`$0 --help' for more information"
1191     ;;
1192
1193   *=*)
1194     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1195     # Reject names that are not valid shell variable names.
1196     case $ac_envvar in #(
1197       '' | [0-9]* | *[!_$as_cr_alnum]* )
1198       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1199     esac
1200     eval $ac_envvar=\$ac_optarg
1201     export $ac_envvar ;;
1202
1203   *)
1204     # FIXME: should be removed in autoconf 3.0.
1205     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1206     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1207       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1208     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1209     ;;
1210
1211   esac
1212 done
1213
1214 if test -n "$ac_prev"; then
1215   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1216   as_fn_error $? "missing argument to $ac_option"
1217 fi
1218
1219 if test -n "$ac_unrecognized_opts"; then
1220   case $enable_option_checking in
1221     no) ;;
1222     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1223     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1224   esac
1225 fi
1226
1227 # Check all directory arguments for consistency.
1228 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1229                 datadir sysconfdir sharedstatedir localstatedir includedir \
1230                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1231                 libdir localedir mandir
1232 do
1233   eval ac_val=\$$ac_var
1234   # Remove trailing slashes.
1235   case $ac_val in
1236     */ )
1237       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1238       eval $ac_var=\$ac_val;;
1239   esac
1240   # Be sure to have absolute directory names.
1241   case $ac_val in
1242     [\\/$]* | ?:[\\/]* )  continue;;
1243     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1244   esac
1245   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1246 done
1247
1248 # There might be people who depend on the old broken behavior: `$host'
1249 # used to hold the argument of --host etc.
1250 # FIXME: To remove some day.
1251 build=$build_alias
1252 host=$host_alias
1253 target=$target_alias
1254
1255 # FIXME: To remove some day.
1256 if test "x$host_alias" != x; then
1257   if test "x$build_alias" = x; then
1258     cross_compiling=maybe
1259   elif test "x$build_alias" != "x$host_alias"; then
1260     cross_compiling=yes
1261   fi
1262 fi
1263
1264 ac_tool_prefix=
1265 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1266
1267 test "$silent" = yes && exec 6>/dev/null
1268
1269
1270 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1271 ac_ls_di=`ls -di .` &&
1272 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1273   as_fn_error $? "working directory cannot be determined"
1274 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1275   as_fn_error $? "pwd does not report name of working directory"
1276
1277
1278 # Find the source files, if location was not specified.
1279 if test -z "$srcdir"; then
1280   ac_srcdir_defaulted=yes
1281   # Try the directory containing this script, then the parent directory.
1282   ac_confdir=`$as_dirname -- "$as_myself" ||
1283 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1284          X"$as_myself" : 'X\(//\)[^/]' \| \
1285          X"$as_myself" : 'X\(//\)$' \| \
1286          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1287 $as_echo X"$as_myself" |
1288     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1289             s//\1/
1290             q
1291           }
1292           /^X\(\/\/\)[^/].*/{
1293             s//\1/
1294             q
1295           }
1296           /^X\(\/\/\)$/{
1297             s//\1/
1298             q
1299           }
1300           /^X\(\/\).*/{
1301             s//\1/
1302             q
1303           }
1304           s/.*/./; q'`
1305   srcdir=$ac_confdir
1306   if test ! -r "$srcdir/$ac_unique_file"; then
1307     srcdir=..
1308   fi
1309 else
1310   ac_srcdir_defaulted=no
1311 fi
1312 if test ! -r "$srcdir/$ac_unique_file"; then
1313   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1314   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1315 fi
1316 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1317 ac_abs_confdir=`(
1318         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1319         pwd)`
1320 # When building in place, set srcdir=.
1321 if test "$ac_abs_confdir" = "$ac_pwd"; then
1322   srcdir=.
1323 fi
1324 # Remove unnecessary trailing slashes from srcdir.
1325 # Double slashes in file names in object file debugging info
1326 # mess up M-x gdb in Emacs.
1327 case $srcdir in
1328 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1329 esac
1330 for ac_var in $ac_precious_vars; do
1331   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1332   eval ac_env_${ac_var}_value=\$${ac_var}
1333   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1334   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1335 done
1336
1337 #
1338 # Report the --help message.
1339 #
1340 if test "$ac_init_help" = "long"; then
1341   # Omit some internal or obsolete options to make the list less imposing.
1342   # This message is too long to be a string in the A/UX 3.1 sh.
1343   cat <<_ACEOF
1344 \`configure' configures OpenSSH Portable to adapt to many kinds of systems.
1345
1346 Usage: $0 [OPTION]... [VAR=VALUE]...
1347
1348 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1349 VAR=VALUE.  See below for descriptions of some of the useful variables.
1350
1351 Defaults for the options are specified in brackets.
1352
1353 Configuration:
1354   -h, --help              display this help and exit
1355       --help=short        display options specific to this package
1356       --help=recursive    display the short help of all the included packages
1357   -V, --version           display version information and exit
1358   -q, --quiet, --silent   do not print \`checking ...' messages
1359       --cache-file=FILE   cache test results in FILE [disabled]
1360   -C, --config-cache      alias for \`--cache-file=config.cache'
1361   -n, --no-create         do not create output files
1362       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1363
1364 Installation directories:
1365   --prefix=PREFIX         install architecture-independent files in PREFIX
1366                           [$ac_default_prefix]
1367   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1368                           [PREFIX]
1369
1370 By default, \`make install' will install all the files in
1371 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1372 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1373 for instance \`--prefix=\$HOME'.
1374
1375 For better control, use the options below.
1376
1377 Fine tuning of the installation directories:
1378   --bindir=DIR            user executables [EPREFIX/bin]
1379   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1380   --libexecdir=DIR        program executables [EPREFIX/libexec]
1381   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1382   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1383   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1384   --libdir=DIR            object code libraries [EPREFIX/lib]
1385   --includedir=DIR        C header files [PREFIX/include]
1386   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1387   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1388   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1389   --infodir=DIR           info documentation [DATAROOTDIR/info]
1390   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1391   --mandir=DIR            man documentation [DATAROOTDIR/man]
1392   --docdir=DIR            documentation root [DATAROOTDIR/doc/openssh]
1393   --htmldir=DIR           html documentation [DOCDIR]
1394   --dvidir=DIR            dvi documentation [DOCDIR]
1395   --pdfdir=DIR            pdf documentation [DOCDIR]
1396   --psdir=DIR             ps documentation [DOCDIR]
1397 _ACEOF
1398
1399   cat <<\_ACEOF
1400
1401 System types:
1402   --build=BUILD     configure for building on BUILD [guessed]
1403   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1404 _ACEOF
1405 fi
1406
1407 if test -n "$ac_init_help"; then
1408   case $ac_init_help in
1409      short | recursive ) echo "Configuration of OpenSSH Portable:";;
1410    esac
1411   cat <<\_ACEOF
1412
1413 Optional Features:
1414   --disable-option-checking  ignore unrecognized --enable/--with options
1415   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1416   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1417   --disable-largefile     omit support for large files
1418   --disable-pkcs11        disable PKCS#11 support code [no]
1419   --disable-strip         Disable calling strip(1) on install
1420   --disable-etc-default-login Disable using PATH from /etc/default/login no
1421   --disable-lastlog       disable use of lastlog even if detected no
1422   --disable-utmp          disable use of utmp even if detected no
1423   --disable-utmpx         disable use of utmpx even if detected no
1424   --disable-wtmp          disable use of wtmp even if detected no
1425   --disable-wtmpx         disable use of wtmpx even if detected no
1426   --disable-libutil       disable use of libutil (login() etc.) no
1427   --disable-pututline     disable use of pututline() etc. (uwtmp) no
1428   --disable-pututxline    disable use of pututxline() etc. (uwtmpx) no
1429
1430 Optional Packages:
1431   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1432   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1433   --without-openssl       Disable use of OpenSSL; use only limited internal crypto **EXPERIMENTAL**
1434   --without-stackprotect  Don't use compiler's stack protection
1435   --without-hardening     Don't use toolchain hardening flags
1436   --without-rpath         Disable auto-added -R linker paths
1437   --with-cflags           Specify additional flags to pass to compiler
1438   --with-cflags-after     Specify additional flags to pass to compiler after configure
1439   --with-cppflags         Specify additional flags to pass to preprocessor
1440   --with-ldflags          Specify additional flags to pass to linker
1441   --with-ldflags-after    Specify additional flags to pass to linker after configure
1442   --with-libs             Specify additional libraries to link with
1443   --with-Werror           Build main code with -Werror
1444   --with-solaris-contracts Enable Solaris process contracts (experimental)
1445   --with-solaris-projects Enable Solaris projects (experimental)
1446   --with-solaris-privs    Enable Solaris/Illumos privileges (experimental)
1447   --with-osfsia           Enable Digital Unix SIA
1448   --with-zlib=PATH        Use zlib in PATH
1449   --without-zlib-version-check Disable zlib version check
1450   --with-skey[=PATH]      Enable S/Key support (optionally in PATH)
1451   --with-ldns[=PATH]      Use ldns for DNSSEC support (optionally in PATH)
1452   --with-libedit[=PATH]   Enable libedit support for sftp
1453   --with-audit=module     Enable audit support (modules=debug,bsm,linux)
1454   --with-pie              Build Position Independent Executables if possible
1455   --with-ssl-dir=PATH     Specify path to OpenSSL installation
1456   --without-openssl-header-check Disable OpenSSL version consistency check
1457   --with-ssl-engine       Enable OpenSSL (hardware) ENGINE support
1458   --with-prngd-port=PORT  read entropy from PRNGD/EGD TCP localhost:PORT
1459   --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)
1460   --with-pam              Enable PAM support
1461   --with-pam-service=name Specify PAM service name
1462   --with-privsep-user=user Specify non-privileged user for privilege separation
1463   --with-sandbox=style    Specify privilege separation sandbox (no, capsicum, darwin, rlimit, seccomp_filter, systrace, pledge)
1464   --with-selinux          Enable SELinux support
1465   --with-kerberos5=PATH   Enable Kerberos 5 support
1466   --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)
1467   --with-xauth=PATH       Specify path to xauth program
1468   --with-maildir=/path/to/mail    Specify your system mail directory
1469   --with-mantype=man|cat|doc  Set man page type
1470   --with-md5-passwords    Enable use of MD5 passwords
1471   --without-shadow        Disable shadow password support
1472   --with-ipaddr-display   Use ip address instead of hostname in $DISPLAY
1473   --with-default-path=    Specify default $PATH environment for server
1474   --with-superuser-path=  Specify different path for super-user
1475   --with-4in6             Check for and convert IPv4 in IPv6 mapped addresses
1476   --with-bsd-auth         Enable BSD auth support
1477   --with-pid-dir=PATH     Specify location of sshd.pid file
1478   --with-lastlog=FILE|DIR specify lastlog location common locations
1479
1480 Some influential environment variables:
1481   CC          C compiler command
1482   CFLAGS      C compiler flags
1483   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1484               nonstandard directory <lib dir>
1485   LIBS        libraries to pass to the linker, e.g. -l<library>
1486   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1487               you have headers in a nonstandard directory <include dir>
1488   CPP         C preprocessor
1489
1490 Use these variables to override the choices made by `configure' or to help
1491 it to find libraries and programs with nonstandard names/locations.
1492
1493 Report bugs to <openssh-unix-dev@mindrot.org>.
1494 _ACEOF
1495 ac_status=$?
1496 fi
1497
1498 if test "$ac_init_help" = "recursive"; then
1499   # If there are subdirs, report their specific --help.
1500   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1501     test -d "$ac_dir" ||
1502       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1503       continue
1504     ac_builddir=.
1505
1506 case "$ac_dir" in
1507 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1508 *)
1509   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1510   # A ".." for each directory in $ac_dir_suffix.
1511   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1512   case $ac_top_builddir_sub in
1513   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1514   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1515   esac ;;
1516 esac
1517 ac_abs_top_builddir=$ac_pwd
1518 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1519 # for backward compatibility:
1520 ac_top_builddir=$ac_top_build_prefix
1521
1522 case $srcdir in
1523   .)  # We are building in place.
1524     ac_srcdir=.
1525     ac_top_srcdir=$ac_top_builddir_sub
1526     ac_abs_top_srcdir=$ac_pwd ;;
1527   [\\/]* | ?:[\\/]* )  # Absolute name.
1528     ac_srcdir=$srcdir$ac_dir_suffix;
1529     ac_top_srcdir=$srcdir
1530     ac_abs_top_srcdir=$srcdir ;;
1531   *) # Relative name.
1532     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1533     ac_top_srcdir=$ac_top_build_prefix$srcdir
1534     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1535 esac
1536 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1537
1538     cd "$ac_dir" || { ac_status=$?; continue; }
1539     # Check for guested configure.
1540     if test -f "$ac_srcdir/configure.gnu"; then
1541       echo &&
1542       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1543     elif test -f "$ac_srcdir/configure"; then
1544       echo &&
1545       $SHELL "$ac_srcdir/configure" --help=recursive
1546     else
1547       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1548     fi || ac_status=$?
1549     cd "$ac_pwd" || { ac_status=$?; break; }
1550   done
1551 fi
1552
1553 test -n "$ac_init_help" && exit $ac_status
1554 if $ac_init_version; then
1555   cat <<\_ACEOF
1556 OpenSSH configure Portable
1557 generated by GNU Autoconf 2.69
1558
1559 Copyright (C) 2012 Free Software Foundation, Inc.
1560 This configure script is free software; the Free Software Foundation
1561 gives unlimited permission to copy, distribute and modify it.
1562 _ACEOF
1563   exit
1564 fi
1565
1566 ## ------------------------ ##
1567 ## Autoconf initialization. ##
1568 ## ------------------------ ##
1569
1570 # ac_fn_c_try_compile LINENO
1571 # --------------------------
1572 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1573 ac_fn_c_try_compile ()
1574 {
1575   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1576   rm -f conftest.$ac_objext
1577   if { { ac_try="$ac_compile"
1578 case "(($ac_try" in
1579   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1580   *) ac_try_echo=$ac_try;;
1581 esac
1582 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1583 $as_echo "$ac_try_echo"; } >&5
1584   (eval "$ac_compile") 2>conftest.err
1585   ac_status=$?
1586   if test -s conftest.err; then
1587     grep -v '^ *+' conftest.err >conftest.er1
1588     cat conftest.er1 >&5
1589     mv -f conftest.er1 conftest.err
1590   fi
1591   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1592   test $ac_status = 0; } && {
1593          test -z "$ac_c_werror_flag" ||
1594          test ! -s conftest.err
1595        } && test -s conftest.$ac_objext; then :
1596   ac_retval=0
1597 else
1598   $as_echo "$as_me: failed program was:" >&5
1599 sed 's/^/| /' conftest.$ac_ext >&5
1600
1601         ac_retval=1
1602 fi
1603   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1604   as_fn_set_status $ac_retval
1605
1606 } # ac_fn_c_try_compile
1607
1608 # ac_fn_c_try_run LINENO
1609 # ----------------------
1610 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1611 # that executables *can* be run.
1612 ac_fn_c_try_run ()
1613 {
1614   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1615   if { { ac_try="$ac_link"
1616 case "(($ac_try" in
1617   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1618   *) ac_try_echo=$ac_try;;
1619 esac
1620 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1621 $as_echo "$ac_try_echo"; } >&5
1622   (eval "$ac_link") 2>&5
1623   ac_status=$?
1624   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1625   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1626   { { case "(($ac_try" in
1627   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1628   *) ac_try_echo=$ac_try;;
1629 esac
1630 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1631 $as_echo "$ac_try_echo"; } >&5
1632   (eval "$ac_try") 2>&5
1633   ac_status=$?
1634   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1635   test $ac_status = 0; }; }; then :
1636   ac_retval=0
1637 else
1638   $as_echo "$as_me: program exited with status $ac_status" >&5
1639        $as_echo "$as_me: failed program was:" >&5
1640 sed 's/^/| /' conftest.$ac_ext >&5
1641
1642        ac_retval=$ac_status
1643 fi
1644   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1645   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1646   as_fn_set_status $ac_retval
1647
1648 } # ac_fn_c_try_run
1649
1650 # ac_fn_c_try_cpp LINENO
1651 # ----------------------
1652 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1653 ac_fn_c_try_cpp ()
1654 {
1655   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1656   if { { ac_try="$ac_cpp conftest.$ac_ext"
1657 case "(($ac_try" in
1658   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1659   *) ac_try_echo=$ac_try;;
1660 esac
1661 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1662 $as_echo "$ac_try_echo"; } >&5
1663   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1664   ac_status=$?
1665   if test -s conftest.err; then
1666     grep -v '^ *+' conftest.err >conftest.er1
1667     cat conftest.er1 >&5
1668     mv -f conftest.er1 conftest.err
1669   fi
1670   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1671   test $ac_status = 0; } > conftest.i && {
1672          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1673          test ! -s conftest.err
1674        }; then :
1675   ac_retval=0
1676 else
1677   $as_echo "$as_me: failed program was:" >&5
1678 sed 's/^/| /' conftest.$ac_ext >&5
1679
1680     ac_retval=1
1681 fi
1682   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1683   as_fn_set_status $ac_retval
1684
1685 } # ac_fn_c_try_cpp
1686
1687 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1688 # -------------------------------------------------------
1689 # Tests whether HEADER exists and can be compiled using the include files in
1690 # INCLUDES, setting the cache variable VAR accordingly.
1691 ac_fn_c_check_header_compile ()
1692 {
1693   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1694   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1695 $as_echo_n "checking for $2... " >&6; }
1696 if eval \${$3+:} false; then :
1697   $as_echo_n "(cached) " >&6
1698 else
1699   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1700 /* end confdefs.h.  */
1701 $4
1702 #include <$2>
1703 _ACEOF
1704 if ac_fn_c_try_compile "$LINENO"; then :
1705   eval "$3=yes"
1706 else
1707   eval "$3=no"
1708 fi
1709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1710 fi
1711 eval ac_res=\$$3
1712                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1713 $as_echo "$ac_res" >&6; }
1714   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1715
1716 } # ac_fn_c_check_header_compile
1717
1718 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1719 # ---------------------------------------------
1720 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1721 # accordingly.
1722 ac_fn_c_check_decl ()
1723 {
1724   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1725   as_decl_name=`echo $2|sed 's/ *(.*//'`
1726   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1727   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1728 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1729 if eval \${$3+:} false; then :
1730   $as_echo_n "(cached) " >&6
1731 else
1732   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1733 /* end confdefs.h.  */
1734 $4
1735 int
1736 main ()
1737 {
1738 #ifndef $as_decl_name
1739 #ifdef __cplusplus
1740   (void) $as_decl_use;
1741 #else
1742   (void) $as_decl_name;
1743 #endif
1744 #endif
1745
1746   ;
1747   return 0;
1748 }
1749 _ACEOF
1750 if ac_fn_c_try_compile "$LINENO"; then :
1751   eval "$3=yes"
1752 else
1753   eval "$3=no"
1754 fi
1755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1756 fi
1757 eval ac_res=\$$3
1758                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1759 $as_echo "$ac_res" >&6; }
1760   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1761
1762 } # ac_fn_c_check_decl
1763
1764 # ac_fn_c_try_link LINENO
1765 # -----------------------
1766 # Try to link conftest.$ac_ext, and return whether this succeeded.
1767 ac_fn_c_try_link ()
1768 {
1769   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1770   rm -f conftest.$ac_objext conftest$ac_exeext
1771   if { { ac_try="$ac_link"
1772 case "(($ac_try" in
1773   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1774   *) ac_try_echo=$ac_try;;
1775 esac
1776 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1777 $as_echo "$ac_try_echo"; } >&5
1778   (eval "$ac_link") 2>conftest.err
1779   ac_status=$?
1780   if test -s conftest.err; then
1781     grep -v '^ *+' conftest.err >conftest.er1
1782     cat conftest.er1 >&5
1783     mv -f conftest.er1 conftest.err
1784   fi
1785   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1786   test $ac_status = 0; } && {
1787          test -z "$ac_c_werror_flag" ||
1788          test ! -s conftest.err
1789        } && test -s conftest$ac_exeext && {
1790          test "$cross_compiling" = yes ||
1791          test -x conftest$ac_exeext
1792        }; then :
1793   ac_retval=0
1794 else
1795   $as_echo "$as_me: failed program was:" >&5
1796 sed 's/^/| /' conftest.$ac_ext >&5
1797
1798         ac_retval=1
1799 fi
1800   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1801   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1802   # interfere with the next link command; also delete a directory that is
1803   # left behind by Apple's compiler.  We do this before executing the actions.
1804   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1805   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1806   as_fn_set_status $ac_retval
1807
1808 } # ac_fn_c_try_link
1809
1810 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1811 # -------------------------------------------------------
1812 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1813 # the include files in INCLUDES and setting the cache variable VAR
1814 # accordingly.
1815 ac_fn_c_check_header_mongrel ()
1816 {
1817   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1818   if eval \${$3+:} false; then :
1819   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1820 $as_echo_n "checking for $2... " >&6; }
1821 if eval \${$3+:} false; then :
1822   $as_echo_n "(cached) " >&6
1823 fi
1824 eval ac_res=\$$3
1825                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1826 $as_echo "$ac_res" >&6; }
1827 else
1828   # Is the header compilable?
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1830 $as_echo_n "checking $2 usability... " >&6; }
1831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1832 /* end confdefs.h.  */
1833 $4
1834 #include <$2>
1835 _ACEOF
1836 if ac_fn_c_try_compile "$LINENO"; then :
1837   ac_header_compiler=yes
1838 else
1839   ac_header_compiler=no
1840 fi
1841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1843 $as_echo "$ac_header_compiler" >&6; }
1844
1845 # Is the header present?
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1847 $as_echo_n "checking $2 presence... " >&6; }
1848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1849 /* end confdefs.h.  */
1850 #include <$2>
1851 _ACEOF
1852 if ac_fn_c_try_cpp "$LINENO"; then :
1853   ac_header_preproc=yes
1854 else
1855   ac_header_preproc=no
1856 fi
1857 rm -f conftest.err conftest.i conftest.$ac_ext
1858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1859 $as_echo "$ac_header_preproc" >&6; }
1860
1861 # So?  What about this header?
1862 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1863   yes:no: )
1864     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1865 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1866     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1867 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1868     ;;
1869   no:yes:* )
1870     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1871 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1872     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1873 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1874     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1875 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1876     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1877 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1878     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1879 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1880 ( $as_echo "## ------------------------------------------- ##
1881 ## Report this to openssh-unix-dev@mindrot.org ##
1882 ## ------------------------------------------- ##"
1883      ) | sed "s/^/$as_me: WARNING:     /" >&2
1884     ;;
1885 esac
1886   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1887 $as_echo_n "checking for $2... " >&6; }
1888 if eval \${$3+:} false; then :
1889   $as_echo_n "(cached) " >&6
1890 else
1891   eval "$3=\$ac_header_compiler"
1892 fi
1893 eval ac_res=\$$3
1894                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1895 $as_echo "$ac_res" >&6; }
1896 fi
1897   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1898
1899 } # ac_fn_c_check_header_mongrel
1900
1901 # ac_fn_c_check_func LINENO FUNC VAR
1902 # ----------------------------------
1903 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1904 ac_fn_c_check_func ()
1905 {
1906   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1907   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1908 $as_echo_n "checking for $2... " >&6; }
1909 if eval \${$3+:} false; then :
1910   $as_echo_n "(cached) " >&6
1911 else
1912   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1913 /* end confdefs.h.  */
1914 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1915    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1916 #define $2 innocuous_$2
1917
1918 /* System header to define __stub macros and hopefully few prototypes,
1919     which can conflict with char $2 (); below.
1920     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1921     <limits.h> exists even on freestanding compilers.  */
1922
1923 #ifdef __STDC__
1924 # include <limits.h>
1925 #else
1926 # include <assert.h>
1927 #endif
1928
1929 #undef $2
1930
1931 /* Override any GCC internal prototype to avoid an error.
1932    Use char because int might match the return type of a GCC
1933    builtin and then its argument prototype would still apply.  */
1934 #ifdef __cplusplus
1935 extern "C"
1936 #endif
1937 char $2 ();
1938 /* The GNU C library defines this for functions which it implements
1939     to always fail with ENOSYS.  Some functions are actually named
1940     something starting with __ and the normal name is an alias.  */
1941 #if defined __stub_$2 || defined __stub___$2
1942 choke me
1943 #endif
1944
1945 int
1946 main ()
1947 {
1948 return $2 ();
1949   ;
1950   return 0;
1951 }
1952 _ACEOF
1953 if ac_fn_c_try_link "$LINENO"; then :
1954   eval "$3=yes"
1955 else
1956   eval "$3=no"
1957 fi
1958 rm -f core conftest.err conftest.$ac_objext \
1959     conftest$ac_exeext conftest.$ac_ext
1960 fi
1961 eval ac_res=\$$3
1962                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1963 $as_echo "$ac_res" >&6; }
1964   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1965
1966 } # ac_fn_c_check_func
1967
1968 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1969 # -------------------------------------------
1970 # Tests whether TYPE exists after having included INCLUDES, setting cache
1971 # variable VAR accordingly.
1972 ac_fn_c_check_type ()
1973 {
1974   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1975   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1976 $as_echo_n "checking for $2... " >&6; }
1977 if eval \${$3+:} false; then :
1978   $as_echo_n "(cached) " >&6
1979 else
1980   eval "$3=no"
1981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1982 /* end confdefs.h.  */
1983 $4
1984 int
1985 main ()
1986 {
1987 if (sizeof ($2))
1988          return 0;
1989   ;
1990   return 0;
1991 }
1992 _ACEOF
1993 if ac_fn_c_try_compile "$LINENO"; then :
1994   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1995 /* end confdefs.h.  */
1996 $4
1997 int
1998 main ()
1999 {
2000 if (sizeof (($2)))
2001             return 0;
2002   ;
2003   return 0;
2004 }
2005 _ACEOF
2006 if ac_fn_c_try_compile "$LINENO"; then :
2007
2008 else
2009   eval "$3=yes"
2010 fi
2011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2012 fi
2013 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2014 fi
2015 eval ac_res=\$$3
2016                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2017 $as_echo "$ac_res" >&6; }
2018   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2019
2020 } # ac_fn_c_check_type
2021
2022 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2023 # --------------------------------------------
2024 # Tries to find the compile-time value of EXPR in a program that includes
2025 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2026 # computed
2027 ac_fn_c_compute_int ()
2028 {
2029   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2030   if test "$cross_compiling" = yes; then
2031     # Depending upon the size, compute the lo and hi bounds.
2032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2033 /* end confdefs.h.  */
2034 $4
2035 int
2036 main ()
2037 {
2038 static int test_array [1 - 2 * !(($2) >= 0)];
2039 test_array [0] = 0;
2040 return test_array [0];
2041
2042   ;
2043   return 0;
2044 }
2045 _ACEOF
2046 if ac_fn_c_try_compile "$LINENO"; then :
2047   ac_lo=0 ac_mid=0
2048   while :; do
2049     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2050 /* end confdefs.h.  */
2051 $4
2052 int
2053 main ()
2054 {
2055 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2056 test_array [0] = 0;
2057 return test_array [0];
2058
2059   ;
2060   return 0;
2061 }
2062 _ACEOF
2063 if ac_fn_c_try_compile "$LINENO"; then :
2064   ac_hi=$ac_mid; break
2065 else
2066   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2067                         if test $ac_lo -le $ac_mid; then
2068                           ac_lo= ac_hi=
2069                           break
2070                         fi
2071                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2072 fi
2073 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2074   done
2075 else
2076   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2077 /* end confdefs.h.  */
2078 $4
2079 int
2080 main ()
2081 {
2082 static int test_array [1 - 2 * !(($2) < 0)];
2083 test_array [0] = 0;
2084 return test_array [0];
2085
2086   ;
2087   return 0;
2088 }
2089 _ACEOF
2090 if ac_fn_c_try_compile "$LINENO"; then :
2091   ac_hi=-1 ac_mid=-1
2092   while :; do
2093     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2094 /* end confdefs.h.  */
2095 $4
2096 int
2097 main ()
2098 {
2099 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2100 test_array [0] = 0;
2101 return test_array [0];
2102
2103   ;
2104   return 0;
2105 }
2106 _ACEOF
2107 if ac_fn_c_try_compile "$LINENO"; then :
2108   ac_lo=$ac_mid; break
2109 else
2110   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2111                         if test $ac_mid -le $ac_hi; then
2112                           ac_lo= ac_hi=
2113                           break
2114                         fi
2115                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2116 fi
2117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2118   done
2119 else
2120   ac_lo= ac_hi=
2121 fi
2122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2123 fi
2124 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2125 # Binary search between lo and hi bounds.
2126 while test "x$ac_lo" != "x$ac_hi"; do
2127   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2128   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2129 /* end confdefs.h.  */
2130 $4
2131 int
2132 main ()
2133 {
2134 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2135 test_array [0] = 0;
2136 return test_array [0];
2137
2138   ;
2139   return 0;
2140 }
2141 _ACEOF
2142 if ac_fn_c_try_compile "$LINENO"; then :
2143   ac_hi=$ac_mid
2144 else
2145   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2146 fi
2147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2148 done
2149 case $ac_lo in #((
2150 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2151 '') ac_retval=1 ;;
2152 esac
2153   else
2154     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2155 /* end confdefs.h.  */
2156 $4
2157 static long int longval () { return $2; }
2158 static unsigned long int ulongval () { return $2; }
2159 #include <stdio.h>
2160 #include <stdlib.h>
2161 int
2162 main ()
2163 {
2164
2165   FILE *f = fopen ("conftest.val", "w");
2166   if (! f)
2167     return 1;
2168   if (($2) < 0)
2169     {
2170       long int i = longval ();
2171       if (i != ($2))
2172         return 1;
2173       fprintf (f, "%ld", i);
2174     }
2175   else
2176     {
2177       unsigned long int i = ulongval ();
2178       if (i != ($2))
2179         return 1;
2180       fprintf (f, "%lu", i);
2181     }
2182   /* Do not output a trailing newline, as this causes \r\n confusion
2183      on some platforms.  */
2184   return ferror (f) || fclose (f) != 0;
2185
2186   ;
2187   return 0;
2188 }
2189 _ACEOF
2190 if ac_fn_c_try_run "$LINENO"; then :
2191   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2192 else
2193   ac_retval=1
2194 fi
2195 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2196   conftest.$ac_objext conftest.beam conftest.$ac_ext
2197 rm -f conftest.val
2198
2199   fi
2200   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2201   as_fn_set_status $ac_retval
2202
2203 } # ac_fn_c_compute_int
2204
2205 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2206 # ----------------------------------------------------
2207 # Tries to find if the field MEMBER exists in type AGGR, after including
2208 # INCLUDES, setting cache variable VAR accordingly.
2209 ac_fn_c_check_member ()
2210 {
2211   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2212   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2213 $as_echo_n "checking for $2.$3... " >&6; }
2214 if eval \${$4+:} false; then :
2215   $as_echo_n "(cached) " >&6
2216 else
2217   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2218 /* end confdefs.h.  */
2219 $5
2220 int
2221 main ()
2222 {
2223 static $2 ac_aggr;
2224 if (ac_aggr.$3)
2225 return 0;
2226   ;
2227   return 0;
2228 }
2229 _ACEOF
2230 if ac_fn_c_try_compile "$LINENO"; then :
2231   eval "$4=yes"
2232 else
2233   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2234 /* end confdefs.h.  */
2235 $5
2236 int
2237 main ()
2238 {
2239 static $2 ac_aggr;
2240 if (sizeof ac_aggr.$3)
2241 return 0;
2242   ;
2243   return 0;
2244 }
2245 _ACEOF
2246 if ac_fn_c_try_compile "$LINENO"; then :
2247   eval "$4=yes"
2248 else
2249   eval "$4=no"
2250 fi
2251 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2252 fi
2253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2254 fi
2255 eval ac_res=\$$4
2256                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2257 $as_echo "$ac_res" >&6; }
2258   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2259
2260 } # ac_fn_c_check_member
2261 cat >config.log <<_ACEOF
2262 This file contains any messages produced by compilers while
2263 running configure, to aid debugging if configure makes a mistake.
2264
2265 It was created by OpenSSH $as_me Portable, which was
2266 generated by GNU Autoconf 2.69.  Invocation command line was
2267
2268   $ $0 $@
2269
2270 _ACEOF
2271 exec 5>>config.log
2272 {
2273 cat <<_ASUNAME
2274 ## --------- ##
2275 ## Platform. ##
2276 ## --------- ##
2277
2278 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2279 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2280 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2281 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2282 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2283
2284 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2285 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2286
2287 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2288 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2289 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2290 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2291 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2292 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2293 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2294
2295 _ASUNAME
2296
2297 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2298 for as_dir in $PATH
2299 do
2300   IFS=$as_save_IFS
2301   test -z "$as_dir" && as_dir=.
2302     $as_echo "PATH: $as_dir"
2303   done
2304 IFS=$as_save_IFS
2305
2306 } >&5
2307
2308 cat >&5 <<_ACEOF
2309
2310
2311 ## ----------- ##
2312 ## Core tests. ##
2313 ## ----------- ##
2314
2315 _ACEOF
2316
2317
2318 # Keep a trace of the command line.
2319 # Strip out --no-create and --no-recursion so they do not pile up.
2320 # Strip out --silent because we don't want to record it for future runs.
2321 # Also quote any args containing shell meta-characters.
2322 # Make two passes to allow for proper duplicate-argument suppression.
2323 ac_configure_args=
2324 ac_configure_args0=
2325 ac_configure_args1=
2326 ac_must_keep_next=false
2327 for ac_pass in 1 2
2328 do
2329   for ac_arg
2330   do
2331     case $ac_arg in
2332     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2333     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2334     | -silent | --silent | --silen | --sile | --sil)
2335       continue ;;
2336     *\'*)
2337       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2338     esac
2339     case $ac_pass in
2340     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2341     2)
2342       as_fn_append ac_configure_args1 " '$ac_arg'"
2343       if test $ac_must_keep_next = true; then
2344         ac_must_keep_next=false # Got value, back to normal.
2345       else
2346         case $ac_arg in
2347           *=* | --config-cache | -C | -disable-* | --disable-* \
2348           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2349           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2350           | -with-* | --with-* | -without-* | --without-* | --x)
2351             case "$ac_configure_args0 " in
2352               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2353             esac
2354             ;;
2355           -* ) ac_must_keep_next=true ;;
2356         esac
2357       fi
2358       as_fn_append ac_configure_args " '$ac_arg'"
2359       ;;
2360     esac
2361   done
2362 done
2363 { ac_configure_args0=; unset ac_configure_args0;}
2364 { ac_configure_args1=; unset ac_configure_args1;}
2365
2366 # When interrupted or exit'd, cleanup temporary files, and complete
2367 # config.log.  We remove comments because anyway the quotes in there
2368 # would cause problems or look ugly.
2369 # WARNING: Use '\'' to represent an apostrophe within the trap.
2370 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2371 trap 'exit_status=$?
2372   # Save into config.log some information that might help in debugging.
2373   {
2374     echo
2375
2376     $as_echo "## ---------------- ##
2377 ## Cache variables. ##
2378 ## ---------------- ##"
2379     echo
2380     # The following way of writing the cache mishandles newlines in values,
2381 (
2382   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2383     eval ac_val=\$$ac_var
2384     case $ac_val in #(
2385     *${as_nl}*)
2386       case $ac_var in #(
2387       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2388 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2389       esac
2390       case $ac_var in #(
2391       _ | IFS | as_nl) ;; #(
2392       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2393       *) { eval $ac_var=; unset $ac_var;} ;;
2394       esac ;;
2395     esac
2396   done
2397   (set) 2>&1 |
2398     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2399     *${as_nl}ac_space=\ *)
2400       sed -n \
2401         "s/'\''/'\''\\\\'\'''\''/g;
2402           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2403       ;; #(
2404     *)
2405       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2406       ;;
2407     esac |
2408     sort
2409 )
2410     echo
2411
2412     $as_echo "## ----------------- ##
2413 ## Output variables. ##
2414 ## ----------------- ##"
2415     echo
2416     for ac_var in $ac_subst_vars
2417     do
2418       eval ac_val=\$$ac_var
2419       case $ac_val in
2420       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2421       esac
2422       $as_echo "$ac_var='\''$ac_val'\''"
2423     done | sort
2424     echo
2425
2426     if test -n "$ac_subst_files"; then
2427       $as_echo "## ------------------- ##
2428 ## File substitutions. ##
2429 ## ------------------- ##"
2430       echo
2431       for ac_var in $ac_subst_files
2432       do
2433         eval ac_val=\$$ac_var
2434         case $ac_val in
2435         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2436         esac
2437         $as_echo "$ac_var='\''$ac_val'\''"
2438       done | sort
2439       echo
2440     fi
2441
2442     if test -s confdefs.h; then
2443       $as_echo "## ----------- ##
2444 ## confdefs.h. ##
2445 ## ----------- ##"
2446       echo
2447       cat confdefs.h
2448       echo
2449     fi
2450     test "$ac_signal" != 0 &&
2451       $as_echo "$as_me: caught signal $ac_signal"
2452     $as_echo "$as_me: exit $exit_status"
2453   } >&5
2454   rm -f core *.core core.conftest.* &&
2455     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2456     exit $exit_status
2457 ' 0
2458 for ac_signal in 1 2 13 15; do
2459   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2460 done
2461 ac_signal=0
2462
2463 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2464 rm -f -r conftest* confdefs.h
2465
2466 $as_echo "/* confdefs.h */" > confdefs.h
2467
2468 # Predefined preprocessor variables.
2469
2470 cat >>confdefs.h <<_ACEOF
2471 #define PACKAGE_NAME "$PACKAGE_NAME"
2472 _ACEOF
2473
2474 cat >>confdefs.h <<_ACEOF
2475 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2476 _ACEOF
2477
2478 cat >>confdefs.h <<_ACEOF
2479 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2480 _ACEOF
2481
2482 cat >>confdefs.h <<_ACEOF
2483 #define PACKAGE_STRING "$PACKAGE_STRING"
2484 _ACEOF
2485
2486 cat >>confdefs.h <<_ACEOF
2487 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2488 _ACEOF
2489
2490 cat >>confdefs.h <<_ACEOF
2491 #define PACKAGE_URL "$PACKAGE_URL"
2492 _ACEOF
2493
2494
2495 # Let the site file select an alternate cache file if it wants to.
2496 # Prefer an explicitly selected file to automatically selected ones.
2497 ac_site_file1=NONE
2498 ac_site_file2=NONE
2499 if test -n "$CONFIG_SITE"; then
2500   # We do not want a PATH search for config.site.
2501   case $CONFIG_SITE in #((
2502     -*)  ac_site_file1=./$CONFIG_SITE;;
2503     */*) ac_site_file1=$CONFIG_SITE;;
2504     *)   ac_site_file1=./$CONFIG_SITE;;
2505   esac
2506 elif test "x$prefix" != xNONE; then
2507   ac_site_file1=$prefix/share/config.site
2508   ac_site_file2=$prefix/etc/config.site
2509 else
2510   ac_site_file1=$ac_default_prefix/share/config.site
2511   ac_site_file2=$ac_default_prefix/etc/config.site
2512 fi
2513 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2514 do
2515   test "x$ac_site_file" = xNONE && continue
2516   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2517     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2518 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2519     sed 's/^/| /' "$ac_site_file" >&5
2520     . "$ac_site_file" \
2521       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2522 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2523 as_fn_error $? "failed to load site script $ac_site_file
2524 See \`config.log' for more details" "$LINENO" 5; }
2525   fi
2526 done
2527
2528 if test -r "$cache_file"; then
2529   # Some versions of bash will fail to source /dev/null (special files
2530   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2531   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2532     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2533 $as_echo "$as_me: loading cache $cache_file" >&6;}
2534     case $cache_file in
2535       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2536       *)                      . "./$cache_file";;
2537     esac
2538   fi
2539 else
2540   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2541 $as_echo "$as_me: creating cache $cache_file" >&6;}
2542   >$cache_file
2543 fi
2544
2545 # Check that the precious variables saved in the cache have kept the same
2546 # value.
2547 ac_cache_corrupted=false
2548 for ac_var in $ac_precious_vars; do
2549   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2550   eval ac_new_set=\$ac_env_${ac_var}_set
2551   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2552   eval ac_new_val=\$ac_env_${ac_var}_value
2553   case $ac_old_set,$ac_new_set in
2554     set,)
2555       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2556 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2557       ac_cache_corrupted=: ;;
2558     ,set)
2559       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2560 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2561       ac_cache_corrupted=: ;;
2562     ,);;
2563     *)
2564       if test "x$ac_old_val" != "x$ac_new_val"; then
2565         # differences in whitespace do not lead to failure.
2566         ac_old_val_w=`echo x $ac_old_val`
2567         ac_new_val_w=`echo x $ac_new_val`
2568         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2569           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2570 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2571           ac_cache_corrupted=:
2572         else
2573           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2574 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2575           eval $ac_var=\$ac_old_val
2576         fi
2577         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2578 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2579         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2580 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2581       fi;;
2582   esac
2583   # Pass precious variables to config.status.
2584   if test "$ac_new_set" = set; then
2585     case $ac_new_val in
2586     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2587     *) ac_arg=$ac_var=$ac_new_val ;;
2588     esac
2589     case " $ac_configure_args " in
2590       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2591       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2592     esac
2593   fi
2594 done
2595 if $ac_cache_corrupted; then
2596   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2597 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2598   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2599 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2600   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2601 fi
2602 ## -------------------- ##
2603 ## Main body of script. ##
2604 ## -------------------- ##
2605
2606 ac_ext=c
2607 ac_cpp='$CPP $CPPFLAGS'
2608 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2609 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2610 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2611
2612
2613
2614
2615 ac_ext=c
2616 ac_cpp='$CPP $CPPFLAGS'
2617 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2618 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2619 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2620
2621
2622 ac_config_headers="$ac_config_headers config.h"
2623
2624 ac_ext=c
2625 ac_cpp='$CPP $CPPFLAGS'
2626 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2627 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2628 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2629 if test -n "$ac_tool_prefix"; then
2630   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2631 set dummy ${ac_tool_prefix}gcc; 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; }
2634 if ${ac_cv_prog_CC+:} false; then :
2635   $as_echo_n "(cached) " >&6
2636 else
2637   if test -n "$CC"; then
2638   ac_cv_prog_CC="$CC" # Let the user override the test.
2639 else
2640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2641 for as_dir in $PATH
2642 do
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}gcc"
2648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2649     break 2
2650   fi
2651 done
2652   done
2653 IFS=$as_save_IFS
2654
2655 fi
2656 fi
2657 CC=$ac_cv_prog_CC
2658 if test -n "$CC"; then
2659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2660 $as_echo "$CC" >&6; }
2661 else
2662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2663 $as_echo "no" >&6; }
2664 fi
2665
2666
2667 fi
2668 if test -z "$ac_cv_prog_CC"; then
2669   ac_ct_CC=$CC
2670   # Extract the first word of "gcc", so it can be a program name with args.
2671 set dummy gcc; ac_word=$2
2672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2673 $as_echo_n "checking for $ac_word... " >&6; }
2674 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2675   $as_echo_n "(cached) " >&6
2676 else
2677   if test -n "$ac_ct_CC"; then
2678   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2679 else
2680 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2681 for as_dir in $PATH
2682 do
2683   IFS=$as_save_IFS
2684   test -z "$as_dir" && as_dir=.
2685     for ac_exec_ext in '' $ac_executable_extensions; do
2686   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2687     ac_cv_prog_ac_ct_CC="gcc"
2688     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2689     break 2
2690   fi
2691 done
2692   done
2693 IFS=$as_save_IFS
2694
2695 fi
2696 fi
2697 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2698 if test -n "$ac_ct_CC"; then
2699   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2700 $as_echo "$ac_ct_CC" >&6; }
2701 else
2702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2703 $as_echo "no" >&6; }
2704 fi
2705
2706   if test "x$ac_ct_CC" = x; then
2707     CC=""
2708   else
2709     case $cross_compiling:$ac_tool_warned in
2710 yes:)
2711 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2712 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2713 ac_tool_warned=yes ;;
2714 esac
2715     CC=$ac_ct_CC
2716   fi
2717 else
2718   CC="$ac_cv_prog_CC"
2719 fi
2720
2721 if test -z "$CC"; then
2722           if test -n "$ac_tool_prefix"; then
2723     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2724 set dummy ${ac_tool_prefix}cc; ac_word=$2
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2726 $as_echo_n "checking for $ac_word... " >&6; }
2727 if ${ac_cv_prog_CC+:} false; then :
2728   $as_echo_n "(cached) " >&6
2729 else
2730   if test -n "$CC"; then
2731   ac_cv_prog_CC="$CC" # Let the user override the test.
2732 else
2733 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2734 for as_dir in $PATH
2735 do
2736   IFS=$as_save_IFS
2737   test -z "$as_dir" && as_dir=.
2738     for ac_exec_ext in '' $ac_executable_extensions; do
2739   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2740     ac_cv_prog_CC="${ac_tool_prefix}cc"
2741     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2742     break 2
2743   fi
2744 done
2745   done
2746 IFS=$as_save_IFS
2747
2748 fi
2749 fi
2750 CC=$ac_cv_prog_CC
2751 if test -n "$CC"; then
2752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2753 $as_echo "$CC" >&6; }
2754 else
2755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2756 $as_echo "no" >&6; }
2757 fi
2758
2759
2760   fi
2761 fi
2762 if test -z "$CC"; then
2763   # Extract the first word of "cc", so it can be a program name with args.
2764 set dummy cc; ac_word=$2
2765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2766 $as_echo_n "checking for $ac_word... " >&6; }
2767 if ${ac_cv_prog_CC+:} false; then :
2768   $as_echo_n "(cached) " >&6
2769 else
2770   if test -n "$CC"; then
2771   ac_cv_prog_CC="$CC" # Let the user override the test.
2772 else
2773   ac_prog_rejected=no
2774 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2775 for as_dir in $PATH
2776 do
2777   IFS=$as_save_IFS
2778   test -z "$as_dir" && as_dir=.
2779     for ac_exec_ext in '' $ac_executable_extensions; do
2780   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2781     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2782        ac_prog_rejected=yes
2783        continue
2784      fi
2785     ac_cv_prog_CC="cc"
2786     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2787     break 2
2788   fi
2789 done
2790   done
2791 IFS=$as_save_IFS
2792
2793 if test $ac_prog_rejected = yes; then
2794   # We found a bogon in the path, so make sure we never use it.
2795   set dummy $ac_cv_prog_CC
2796   shift
2797   if test $# != 0; then
2798     # We chose a different compiler from the bogus one.
2799     # However, it has the same basename, so the bogon will be chosen
2800     # first if we set CC to just the basename; use the full file name.
2801     shift
2802     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2803   fi
2804 fi
2805 fi
2806 fi
2807 CC=$ac_cv_prog_CC
2808 if test -n "$CC"; then
2809   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2810 $as_echo "$CC" >&6; }
2811 else
2812   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2813 $as_echo "no" >&6; }
2814 fi
2815
2816
2817 fi
2818 if test -z "$CC"; then
2819   if test -n "$ac_tool_prefix"; then
2820   for ac_prog in cl.exe
2821   do
2822     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2823 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2824 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2825 $as_echo_n "checking for $ac_word... " >&6; }
2826 if ${ac_cv_prog_CC+:} false; then :
2827   $as_echo_n "(cached) " >&6
2828 else
2829   if test -n "$CC"; then
2830   ac_cv_prog_CC="$CC" # Let the user override the test.
2831 else
2832 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2833 for as_dir in $PATH
2834 do
2835   IFS=$as_save_IFS
2836   test -z "$as_dir" && as_dir=.
2837     for ac_exec_ext in '' $ac_executable_extensions; do
2838   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2839     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2840     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2841     break 2
2842   fi
2843 done
2844   done
2845 IFS=$as_save_IFS
2846
2847 fi
2848 fi
2849 CC=$ac_cv_prog_CC
2850 if test -n "$CC"; then
2851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2852 $as_echo "$CC" >&6; }
2853 else
2854   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2855 $as_echo "no" >&6; }
2856 fi
2857
2858
2859     test -n "$CC" && break
2860   done
2861 fi
2862 if test -z "$CC"; then
2863   ac_ct_CC=$CC
2864   for ac_prog in cl.exe
2865 do
2866   # Extract the first word of "$ac_prog", so it can be a program name with args.
2867 set dummy $ac_prog; ac_word=$2
2868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2869 $as_echo_n "checking for $ac_word... " >&6; }
2870 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2871   $as_echo_n "(cached) " >&6
2872 else
2873   if test -n "$ac_ct_CC"; then
2874   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2875 else
2876 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2877 for as_dir in $PATH
2878 do
2879   IFS=$as_save_IFS
2880   test -z "$as_dir" && as_dir=.
2881     for ac_exec_ext in '' $ac_executable_extensions; do
2882   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2883     ac_cv_prog_ac_ct_CC="$ac_prog"
2884     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2885     break 2
2886   fi
2887 done
2888   done
2889 IFS=$as_save_IFS
2890
2891 fi
2892 fi
2893 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2894 if test -n "$ac_ct_CC"; then
2895   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2896 $as_echo "$ac_ct_CC" >&6; }
2897 else
2898   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2899 $as_echo "no" >&6; }
2900 fi
2901
2902
2903   test -n "$ac_ct_CC" && break
2904 done
2905
2906   if test "x$ac_ct_CC" = x; then
2907     CC=""
2908   else
2909     case $cross_compiling:$ac_tool_warned in
2910 yes:)
2911 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2912 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2913 ac_tool_warned=yes ;;
2914 esac
2915     CC=$ac_ct_CC
2916   fi
2917 fi
2918
2919 fi
2920
2921
2922 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2923 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2924 as_fn_error $? "no acceptable C compiler found in \$PATH
2925 See \`config.log' for more details" "$LINENO" 5; }
2926
2927 # Provide some information about the compiler.
2928 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2929 set X $ac_compile
2930 ac_compiler=$2
2931 for ac_option in --version -v -V -qversion; do
2932   { { ac_try="$ac_compiler $ac_option >&5"
2933 case "(($ac_try" in
2934   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2935   *) ac_try_echo=$ac_try;;
2936 esac
2937 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2938 $as_echo "$ac_try_echo"; } >&5
2939   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2940   ac_status=$?
2941   if test -s conftest.err; then
2942     sed '10a\
2943 ... rest of stderr output deleted ...
2944          10q' conftest.err >conftest.er1
2945     cat conftest.er1 >&5
2946   fi
2947   rm -f conftest.er1 conftest.err
2948   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2949   test $ac_status = 0; }
2950 done
2951
2952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2953 /* end confdefs.h.  */
2954
2955 int
2956 main ()
2957 {
2958
2959   ;
2960   return 0;
2961 }
2962 _ACEOF
2963 ac_clean_files_save=$ac_clean_files
2964 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2965 # Try to create an executable without -o first, disregard a.out.
2966 # It will help us diagnose broken compilers, and finding out an intuition
2967 # of exeext.
2968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2969 $as_echo_n "checking whether the C compiler works... " >&6; }
2970 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2971
2972 # The possible output files:
2973 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2974
2975 ac_rmfiles=
2976 for ac_file in $ac_files
2977 do
2978   case $ac_file in
2979     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2980     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2981   esac
2982 done
2983 rm -f $ac_rmfiles
2984
2985 if { { ac_try="$ac_link_default"
2986 case "(($ac_try" in
2987   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2988   *) ac_try_echo=$ac_try;;
2989 esac
2990 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2991 $as_echo "$ac_try_echo"; } >&5
2992   (eval "$ac_link_default") 2>&5
2993   ac_status=$?
2994   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2995   test $ac_status = 0; }; then :
2996   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2997 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2998 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2999 # so that the user can short-circuit this test for compilers unknown to
3000 # Autoconf.
3001 for ac_file in $ac_files ''
3002 do
3003   test -f "$ac_file" || continue
3004   case $ac_file in
3005     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3006         ;;
3007     [ab].out )
3008         # We found the default executable, but exeext='' is most
3009         # certainly right.
3010         break;;
3011     *.* )
3012         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3013         then :; else
3014            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3015         fi
3016         # We set ac_cv_exeext here because the later test for it is not
3017         # safe: cross compilers may not add the suffix if given an `-o'
3018         # argument, so we may need to know it at that point already.
3019         # Even if this section looks crufty: it has the advantage of
3020         # actually working.
3021         break;;
3022     * )
3023         break;;
3024   esac
3025 done
3026 test "$ac_cv_exeext" = no && ac_cv_exeext=
3027
3028 else
3029   ac_file=''
3030 fi
3031 if test -z "$ac_file"; then :
3032   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3033 $as_echo "no" >&6; }
3034 $as_echo "$as_me: failed program was:" >&5
3035 sed 's/^/| /' conftest.$ac_ext >&5
3036
3037 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3038 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3039 as_fn_error 77 "C compiler cannot create executables
3040 See \`config.log' for more details" "$LINENO" 5; }
3041 else
3042   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3043 $as_echo "yes" >&6; }
3044 fi
3045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3046 $as_echo_n "checking for C compiler default output file name... " >&6; }
3047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3048 $as_echo "$ac_file" >&6; }
3049 ac_exeext=$ac_cv_exeext
3050
3051 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3052 ac_clean_files=$ac_clean_files_save
3053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3054 $as_echo_n "checking for suffix of executables... " >&6; }
3055 if { { ac_try="$ac_link"
3056 case "(($ac_try" in
3057   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3058   *) ac_try_echo=$ac_try;;
3059 esac
3060 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3061 $as_echo "$ac_try_echo"; } >&5
3062   (eval "$ac_link") 2>&5
3063   ac_status=$?
3064   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3065   test $ac_status = 0; }; then :
3066   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3067 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3068 # work properly (i.e., refer to `conftest.exe'), while it won't with
3069 # `rm'.
3070 for ac_file in conftest.exe conftest conftest.*; do
3071   test -f "$ac_file" || continue
3072   case $ac_file in
3073     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3074     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3075           break;;
3076     * ) break;;
3077   esac
3078 done
3079 else
3080   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3081 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3082 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3083 See \`config.log' for more details" "$LINENO" 5; }
3084 fi
3085 rm -f conftest conftest$ac_cv_exeext
3086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3087 $as_echo "$ac_cv_exeext" >&6; }
3088
3089 rm -f conftest.$ac_ext
3090 EXEEXT=$ac_cv_exeext
3091 ac_exeext=$EXEEXT
3092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3093 /* end confdefs.h.  */
3094 #include <stdio.h>
3095 int
3096 main ()
3097 {
3098 FILE *f = fopen ("conftest.out", "w");
3099  return ferror (f) || fclose (f) != 0;
3100
3101   ;
3102   return 0;
3103 }
3104 _ACEOF
3105 ac_clean_files="$ac_clean_files conftest.out"
3106 # Check that the compiler produces executables we can run.  If not, either
3107 # the compiler is broken, or we cross compile.
3108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3109 $as_echo_n "checking whether we are cross compiling... " >&6; }
3110 if test "$cross_compiling" != yes; then
3111   { { ac_try="$ac_link"
3112 case "(($ac_try" in
3113   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3114   *) ac_try_echo=$ac_try;;
3115 esac
3116 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3117 $as_echo "$ac_try_echo"; } >&5
3118   (eval "$ac_link") 2>&5
3119   ac_status=$?
3120   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3121   test $ac_status = 0; }
3122   if { ac_try='./conftest$ac_cv_exeext'
3123   { { case "(($ac_try" in
3124   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3125   *) ac_try_echo=$ac_try;;
3126 esac
3127 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3128 $as_echo "$ac_try_echo"; } >&5
3129   (eval "$ac_try") 2>&5
3130   ac_status=$?
3131   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3132   test $ac_status = 0; }; }; then
3133     cross_compiling=no
3134   else
3135     if test "$cross_compiling" = maybe; then
3136         cross_compiling=yes
3137     else
3138         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3139 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3140 as_fn_error $? "cannot run C compiled programs.
3141 If you meant to cross compile, use \`--host'.
3142 See \`config.log' for more details" "$LINENO" 5; }
3143     fi
3144   fi
3145 fi
3146 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3147 $as_echo "$cross_compiling" >&6; }
3148
3149 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3150 ac_clean_files=$ac_clean_files_save
3151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3152 $as_echo_n "checking for suffix of object files... " >&6; }
3153 if ${ac_cv_objext+:} false; then :
3154   $as_echo_n "(cached) " >&6
3155 else
3156   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3157 /* end confdefs.h.  */
3158
3159 int
3160 main ()
3161 {
3162
3163   ;
3164   return 0;
3165 }
3166 _ACEOF
3167 rm -f conftest.o conftest.obj
3168 if { { ac_try="$ac_compile"
3169 case "(($ac_try" in
3170   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3171   *) ac_try_echo=$ac_try;;
3172 esac
3173 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3174 $as_echo "$ac_try_echo"; } >&5
3175   (eval "$ac_compile") 2>&5
3176   ac_status=$?
3177   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3178   test $ac_status = 0; }; then :
3179   for ac_file in conftest.o conftest.obj conftest.*; do
3180   test -f "$ac_file" || continue;
3181   case $ac_file in
3182     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3183     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3184        break;;
3185   esac
3186 done
3187 else
3188   $as_echo "$as_me: failed program was:" >&5
3189 sed 's/^/| /' conftest.$ac_ext >&5
3190
3191 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3192 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3193 as_fn_error $? "cannot compute suffix of object files: cannot compile
3194 See \`config.log' for more details" "$LINENO" 5; }
3195 fi
3196 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3197 fi
3198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3199 $as_echo "$ac_cv_objext" >&6; }
3200 OBJEXT=$ac_cv_objext
3201 ac_objext=$OBJEXT
3202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3203 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3204 if ${ac_cv_c_compiler_gnu+:} false; then :
3205   $as_echo_n "(cached) " >&6
3206 else
3207   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3208 /* end confdefs.h.  */
3209
3210 int
3211 main ()
3212 {
3213 #ifndef __GNUC__
3214        choke me
3215 #endif
3216
3217   ;
3218   return 0;
3219 }
3220 _ACEOF
3221 if ac_fn_c_try_compile "$LINENO"; then :
3222   ac_compiler_gnu=yes
3223 else
3224   ac_compiler_gnu=no
3225 fi
3226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3227 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3228
3229 fi
3230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3231 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3232 if test $ac_compiler_gnu = yes; then
3233   GCC=yes
3234 else
3235   GCC=
3236 fi
3237 ac_test_CFLAGS=${CFLAGS+set}
3238 ac_save_CFLAGS=$CFLAGS
3239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3240 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3241 if ${ac_cv_prog_cc_g+:} false; then :
3242   $as_echo_n "(cached) " >&6
3243 else
3244   ac_save_c_werror_flag=$ac_c_werror_flag
3245    ac_c_werror_flag=yes
3246    ac_cv_prog_cc_g=no
3247    CFLAGS="-g"
3248    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3249 /* end confdefs.h.  */
3250
3251 int
3252 main ()
3253 {
3254
3255   ;
3256   return 0;
3257 }
3258 _ACEOF
3259 if ac_fn_c_try_compile "$LINENO"; then :
3260   ac_cv_prog_cc_g=yes
3261 else
3262   CFLAGS=""
3263       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3264 /* end confdefs.h.  */
3265
3266 int
3267 main ()
3268 {
3269
3270   ;
3271   return 0;
3272 }
3273 _ACEOF
3274 if ac_fn_c_try_compile "$LINENO"; then :
3275
3276 else
3277   ac_c_werror_flag=$ac_save_c_werror_flag
3278          CFLAGS="-g"
3279          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3280 /* end confdefs.h.  */
3281
3282 int
3283 main ()
3284 {
3285
3286   ;
3287   return 0;
3288 }
3289 _ACEOF
3290 if ac_fn_c_try_compile "$LINENO"; then :
3291   ac_cv_prog_cc_g=yes
3292 fi
3293 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3294 fi
3295 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3296 fi
3297 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3298    ac_c_werror_flag=$ac_save_c_werror_flag
3299 fi
3300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3301 $as_echo "$ac_cv_prog_cc_g" >&6; }
3302 if test "$ac_test_CFLAGS" = set; then
3303   CFLAGS=$ac_save_CFLAGS
3304 elif test $ac_cv_prog_cc_g = yes; then
3305   if test "$GCC" = yes; then
3306     CFLAGS="-g -O2"
3307   else
3308     CFLAGS="-g"
3309   fi
3310 else
3311   if test "$GCC" = yes; then
3312     CFLAGS="-O2"
3313   else
3314     CFLAGS=
3315   fi
3316 fi
3317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3318 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3319 if ${ac_cv_prog_cc_c89+:} false; then :
3320   $as_echo_n "(cached) " >&6
3321 else
3322   ac_cv_prog_cc_c89=no
3323 ac_save_CC=$CC
3324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3325 /* end confdefs.h.  */
3326 #include <stdarg.h>
3327 #include <stdio.h>
3328 struct stat;
3329 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3330 struct buf { int x; };
3331 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3332 static char *e (p, i)
3333      char **p;
3334      int i;
3335 {
3336   return p[i];
3337 }
3338 static char *f (char * (*g) (char **, int), char **p, ...)
3339 {
3340   char *s;
3341   va_list v;
3342   va_start (v,p);
3343   s = g (p, va_arg (v,int));
3344   va_end (v);
3345   return s;
3346 }
3347
3348 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3349    function prototypes and stuff, but not '\xHH' hex character constants.
3350    These don't provoke an error unfortunately, instead are silently treated
3351    as 'x'.  The following induces an error, until -std is added to get
3352    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3353    array size at least.  It's necessary to write '\x00'==0 to get something
3354    that's true only with -std.  */
3355 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3356
3357 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3358    inside strings and character constants.  */
3359 #define FOO(x) 'x'
3360 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3361
3362 int test (int i, double x);
3363 struct s1 {int (*f) (int a);};
3364 struct s2 {int (*f) (double a);};
3365 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3366 int argc;
3367 char **argv;
3368 int
3369 main ()
3370 {
3371 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3372   ;
3373   return 0;
3374 }
3375 _ACEOF
3376 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3377         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3378 do
3379   CC="$ac_save_CC $ac_arg"
3380   if ac_fn_c_try_compile "$LINENO"; then :
3381   ac_cv_prog_cc_c89=$ac_arg
3382 fi
3383 rm -f core conftest.err conftest.$ac_objext
3384   test "x$ac_cv_prog_cc_c89" != "xno" && break
3385 done
3386 rm -f conftest.$ac_ext
3387 CC=$ac_save_CC
3388
3389 fi
3390 # AC_CACHE_VAL
3391 case "x$ac_cv_prog_cc_c89" in
3392   x)
3393     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3394 $as_echo "none needed" >&6; } ;;
3395   xno)
3396     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3397 $as_echo "unsupported" >&6; } ;;
3398   *)
3399     CC="$CC $ac_cv_prog_cc_c89"
3400     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3401 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3402 esac
3403 if test "x$ac_cv_prog_cc_c89" != xno; then :
3404
3405 fi
3406
3407 ac_ext=c
3408 ac_cpp='$CPP $CPPFLAGS'
3409 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3410 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3411 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3412
3413 ac_aux_dir=
3414 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3415   if test -f "$ac_dir/install-sh"; then
3416     ac_aux_dir=$ac_dir
3417     ac_install_sh="$ac_aux_dir/install-sh -c"
3418     break
3419   elif test -f "$ac_dir/install.sh"; then
3420     ac_aux_dir=$ac_dir
3421     ac_install_sh="$ac_aux_dir/install.sh -c"
3422     break
3423   elif test -f "$ac_dir/shtool"; then
3424     ac_aux_dir=$ac_dir
3425     ac_install_sh="$ac_aux_dir/shtool install -c"
3426     break
3427   fi
3428 done
3429 if test -z "$ac_aux_dir"; then
3430   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3431 fi
3432
3433 # These three variables are undocumented and unsupported,
3434 # and are intended to be withdrawn in a future Autoconf release.
3435 # They can cause serious problems if a builder's source tree is in a directory
3436 # whose full name contains unusual characters.
3437 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3438 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3439 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3440
3441
3442 # Make sure we can run config.sub.
3443 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3444   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3445
3446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3447 $as_echo_n "checking build system type... " >&6; }
3448 if ${ac_cv_build+:} false; then :
3449   $as_echo_n "(cached) " >&6
3450 else
3451   ac_build_alias=$build_alias
3452 test "x$ac_build_alias" = x &&
3453   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3454 test "x$ac_build_alias" = x &&
3455   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3456 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3457   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3458
3459 fi
3460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3461 $as_echo "$ac_cv_build" >&6; }
3462 case $ac_cv_build in
3463 *-*-*) ;;
3464 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3465 esac
3466 build=$ac_cv_build
3467 ac_save_IFS=$IFS; IFS='-'
3468 set x $ac_cv_build
3469 shift
3470 build_cpu=$1
3471 build_vendor=$2
3472 shift; shift
3473 # Remember, the first character of IFS is used to create $*,
3474 # except with old shells:
3475 build_os=$*
3476 IFS=$ac_save_IFS
3477 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3478
3479
3480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3481 $as_echo_n "checking host system type... " >&6; }
3482 if ${ac_cv_host+:} false; then :
3483   $as_echo_n "(cached) " >&6
3484 else
3485   if test "x$host_alias" = x; then
3486   ac_cv_host=$ac_cv_build
3487 else
3488   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3489     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3490 fi
3491
3492 fi
3493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3494 $as_echo "$ac_cv_host" >&6; }
3495 case $ac_cv_host in
3496 *-*-*) ;;
3497 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3498 esac
3499 host=$ac_cv_host
3500 ac_save_IFS=$IFS; IFS='-'
3501 set x $ac_cv_host
3502 shift
3503 host_cpu=$1
3504 host_vendor=$2
3505 shift; shift
3506 # Remember, the first character of IFS is used to create $*,
3507 # except with old shells:
3508 host_os=$*
3509 IFS=$ac_save_IFS
3510 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3511
3512
3513
3514 ac_ext=c
3515 ac_cpp='$CPP $CPPFLAGS'
3516 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3517 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3518 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3520 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3521 # On Suns, sometimes $CPP names a directory.
3522 if test -n "$CPP" && test -d "$CPP"; then
3523   CPP=
3524 fi
3525 if test -z "$CPP"; then
3526   if ${ac_cv_prog_CPP+:} false; then :
3527   $as_echo_n "(cached) " >&6
3528 else
3529       # Double quotes because CPP needs to be expanded
3530     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3531     do
3532       ac_preproc_ok=false
3533 for ac_c_preproc_warn_flag in '' yes
3534 do
3535   # Use a header file that comes with gcc, so configuring glibc
3536   # with a fresh cross-compiler works.
3537   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3538   # <limits.h> exists even on freestanding compilers.
3539   # On the NeXT, cc -E runs the code through the compiler's parser,
3540   # not just through cpp. "Syntax error" is here to catch this case.
3541   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3542 /* end confdefs.h.  */
3543 #ifdef __STDC__
3544 # include <limits.h>
3545 #else
3546 # include <assert.h>
3547 #endif
3548                      Syntax error
3549 _ACEOF
3550 if ac_fn_c_try_cpp "$LINENO"; then :
3551
3552 else
3553   # Broken: fails on valid input.
3554 continue
3555 fi
3556 rm -f conftest.err conftest.i conftest.$ac_ext
3557
3558   # OK, works on sane cases.  Now check whether nonexistent headers
3559   # can be detected and how.
3560   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3561 /* end confdefs.h.  */
3562 #include <ac_nonexistent.h>
3563 _ACEOF
3564 if ac_fn_c_try_cpp "$LINENO"; then :
3565   # Broken: success on invalid input.
3566 continue
3567 else
3568   # Passes both tests.
3569 ac_preproc_ok=:
3570 break
3571 fi
3572 rm -f conftest.err conftest.i conftest.$ac_ext
3573
3574 done
3575 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3576 rm -f conftest.i conftest.err conftest.$ac_ext
3577 if $ac_preproc_ok; then :
3578   break
3579 fi
3580
3581     done
3582     ac_cv_prog_CPP=$CPP
3583
3584 fi
3585   CPP=$ac_cv_prog_CPP
3586 else
3587   ac_cv_prog_CPP=$CPP
3588 fi
3589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3590 $as_echo "$CPP" >&6; }
3591 ac_preproc_ok=false
3592 for ac_c_preproc_warn_flag in '' yes
3593 do
3594   # Use a header file that comes with gcc, so configuring glibc
3595   # with a fresh cross-compiler works.
3596   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3597   # <limits.h> exists even on freestanding compilers.
3598   # On the NeXT, cc -E runs the code through the compiler's parser,
3599   # not just through cpp. "Syntax error" is here to catch this case.
3600   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3601 /* end confdefs.h.  */
3602 #ifdef __STDC__
3603 # include <limits.h>
3604 #else
3605 # include <assert.h>
3606 #endif
3607                      Syntax error
3608 _ACEOF
3609 if ac_fn_c_try_cpp "$LINENO"; then :
3610
3611 else
3612   # Broken: fails on valid input.
3613 continue
3614 fi
3615 rm -f conftest.err conftest.i conftest.$ac_ext
3616
3617   # OK, works on sane cases.  Now check whether nonexistent headers
3618   # can be detected and how.
3619   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3620 /* end confdefs.h.  */
3621 #include <ac_nonexistent.h>
3622 _ACEOF
3623 if ac_fn_c_try_cpp "$LINENO"; then :
3624   # Broken: success on invalid input.
3625 continue
3626 else
3627   # Passes both tests.
3628 ac_preproc_ok=:
3629 break
3630 fi
3631 rm -f conftest.err conftest.i conftest.$ac_ext
3632
3633 done
3634 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3635 rm -f conftest.i conftest.err conftest.$ac_ext
3636 if $ac_preproc_ok; then :
3637
3638 else
3639   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3640 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3641 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3642 See \`config.log' for more details" "$LINENO" 5; }
3643 fi
3644
3645 ac_ext=c
3646 ac_cpp='$CPP $CPPFLAGS'
3647 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3648 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3649 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3650
3651
3652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3653 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3654 if ${ac_cv_path_GREP+:} false; then :
3655   $as_echo_n "(cached) " >&6
3656 else
3657   if test -z "$GREP"; then
3658   ac_path_GREP_found=false
3659   # Loop through the user's path and test for each of PROGNAME-LIST
3660   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3661 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3662 do
3663   IFS=$as_save_IFS
3664   test -z "$as_dir" && as_dir=.
3665     for ac_prog in grep ggrep; do
3666     for ac_exec_ext in '' $ac_executable_extensions; do
3667       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3668       as_fn_executable_p "$ac_path_GREP" || continue
3669 # Check for GNU ac_path_GREP and select it if it is found.
3670   # Check for GNU $ac_path_GREP
3671 case `"$ac_path_GREP" --version 2>&1` in
3672 *GNU*)
3673   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3674 *)
3675   ac_count=0
3676   $as_echo_n 0123456789 >"conftest.in"
3677   while :
3678   do
3679     cat "conftest.in" "conftest.in" >"conftest.tmp"
3680     mv "conftest.tmp" "conftest.in"
3681     cp "conftest.in" "conftest.nl"
3682     $as_echo 'GREP' >> "conftest.nl"
3683     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3684     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3685     as_fn_arith $ac_count + 1 && ac_count=$as_val
3686     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3687       # Best one so far, save it but keep looking for a better one
3688       ac_cv_path_GREP="$ac_path_GREP"
3689       ac_path_GREP_max=$ac_count
3690     fi
3691     # 10*(2^10) chars as input seems more than enough
3692     test $ac_count -gt 10 && break
3693   done
3694   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3695 esac
3696
3697       $ac_path_GREP_found && break 3
3698     done
3699   done
3700   done
3701 IFS=$as_save_IFS
3702   if test -z "$ac_cv_path_GREP"; then
3703     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3704   fi
3705 else
3706   ac_cv_path_GREP=$GREP
3707 fi
3708
3709 fi
3710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3711 $as_echo "$ac_cv_path_GREP" >&6; }
3712  GREP="$ac_cv_path_GREP"
3713
3714
3715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3716 $as_echo_n "checking for egrep... " >&6; }
3717 if ${ac_cv_path_EGREP+:} false; then :
3718   $as_echo_n "(cached) " >&6
3719 else
3720   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3721    then ac_cv_path_EGREP="$GREP -E"
3722    else
3723      if test -z "$EGREP"; then
3724   ac_path_EGREP_found=false
3725   # Loop through the user's path and test for each of PROGNAME-LIST
3726   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3727 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3728 do
3729   IFS=$as_save_IFS
3730   test -z "$as_dir" && as_dir=.
3731     for ac_prog in egrep; do
3732     for ac_exec_ext in '' $ac_executable_extensions; do
3733       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3734       as_fn_executable_p "$ac_path_EGREP" || continue
3735 # Check for GNU ac_path_EGREP and select it if it is found.
3736   # Check for GNU $ac_path_EGREP
3737 case `"$ac_path_EGREP" --version 2>&1` in
3738 *GNU*)
3739   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3740 *)
3741   ac_count=0
3742   $as_echo_n 0123456789 >"conftest.in"
3743   while :
3744   do
3745     cat "conftest.in" "conftest.in" >"conftest.tmp"
3746     mv "conftest.tmp" "conftest.in"
3747     cp "conftest.in" "conftest.nl"
3748     $as_echo 'EGREP' >> "conftest.nl"
3749     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3750     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3751     as_fn_arith $ac_count + 1 && ac_count=$as_val
3752     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3753       # Best one so far, save it but keep looking for a better one
3754       ac_cv_path_EGREP="$ac_path_EGREP"
3755       ac_path_EGREP_max=$ac_count
3756     fi
3757     # 10*(2^10) chars as input seems more than enough
3758     test $ac_count -gt 10 && break
3759   done
3760   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3761 esac
3762
3763       $ac_path_EGREP_found && break 3
3764     done
3765   done
3766   done
3767 IFS=$as_save_IFS
3768   if test -z "$ac_cv_path_EGREP"; then
3769     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3770   fi
3771 else
3772   ac_cv_path_EGREP=$EGREP
3773 fi
3774
3775    fi
3776 fi
3777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3778 $as_echo "$ac_cv_path_EGREP" >&6; }
3779  EGREP="$ac_cv_path_EGREP"
3780
3781
3782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3783 $as_echo_n "checking for ANSI C header files... " >&6; }
3784 if ${ac_cv_header_stdc+:} false; then :
3785   $as_echo_n "(cached) " >&6
3786 else
3787   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3788 /* end confdefs.h.  */
3789 #include <stdlib.h>
3790 #include <stdarg.h>
3791 #include <string.h>
3792 #include <float.h>
3793
3794 int
3795 main ()
3796 {
3797
3798   ;
3799   return 0;
3800 }
3801 _ACEOF
3802 if ac_fn_c_try_compile "$LINENO"; then :
3803   ac_cv_header_stdc=yes
3804 else
3805   ac_cv_header_stdc=no
3806 fi
3807 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3808
3809 if test $ac_cv_header_stdc = yes; then
3810   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3811   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3812 /* end confdefs.h.  */
3813 #include <string.h>
3814
3815 _ACEOF
3816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3817   $EGREP "memchr" >/dev/null 2>&1; then :
3818
3819 else
3820   ac_cv_header_stdc=no
3821 fi
3822 rm -f conftest*
3823
3824 fi
3825
3826 if test $ac_cv_header_stdc = yes; then
3827   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3828   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3829 /* end confdefs.h.  */
3830 #include <stdlib.h>
3831
3832 _ACEOF
3833 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3834   $EGREP "free" >/dev/null 2>&1; then :
3835
3836 else
3837   ac_cv_header_stdc=no
3838 fi
3839 rm -f conftest*
3840
3841 fi
3842
3843 if test $ac_cv_header_stdc = yes; then
3844   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3845   if test "$cross_compiling" = yes; then :
3846   :
3847 else
3848   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3849 /* end confdefs.h.  */
3850 #include <ctype.h>
3851 #include <stdlib.h>
3852 #if ((' ' & 0x0FF) == 0x020)
3853 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3854 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3855 #else
3856 # define ISLOWER(c) \
3857                    (('a' <= (c) && (c) <= 'i') \
3858                      || ('j' <= (c) && (c) <= 'r') \
3859                      || ('s' <= (c) && (c) <= 'z'))
3860 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3861 #endif
3862
3863 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3864 int
3865 main ()
3866 {
3867   int i;
3868   for (i = 0; i < 256; i++)
3869     if (XOR (islower (i), ISLOWER (i))
3870         || toupper (i) != TOUPPER (i))
3871       return 2;
3872   return 0;
3873 }
3874 _ACEOF
3875 if ac_fn_c_try_run "$LINENO"; then :
3876
3877 else
3878   ac_cv_header_stdc=no
3879 fi
3880 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3881   conftest.$ac_objext conftest.beam conftest.$ac_ext
3882 fi
3883
3884 fi
3885 fi
3886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3887 $as_echo "$ac_cv_header_stdc" >&6; }
3888 if test $ac_cv_header_stdc = yes; then
3889
3890 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
3891
3892 fi
3893
3894 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3895 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3896                   inttypes.h stdint.h unistd.h
3897 do :
3898   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3899 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3900 "
3901 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3902   cat >>confdefs.h <<_ACEOF
3903 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3904 _ACEOF
3905
3906 fi
3907
3908 done
3909
3910
3911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
3912 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
3913 if ${ac_cv_c_bigendian+:} false; then :
3914   $as_echo_n "(cached) " >&6
3915 else
3916   ac_cv_c_bigendian=unknown
3917     # See if we're dealing with a universal compiler.
3918     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3919 /* end confdefs.h.  */
3920 #ifndef __APPLE_CC__
3921                not a universal capable compiler
3922              #endif
3923              typedef int dummy;
3924
3925 _ACEOF
3926 if ac_fn_c_try_compile "$LINENO"; then :
3927
3928         # Check for potential -arch flags.  It is not universal unless
3929         # there are at least two -arch flags with different values.
3930         ac_arch=
3931         ac_prev=
3932         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
3933          if test -n "$ac_prev"; then
3934            case $ac_word in
3935              i?86 | x86_64 | ppc | ppc64)
3936                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
3937                  ac_arch=$ac_word
3938                else
3939                  ac_cv_c_bigendian=universal
3940                  break
3941                fi
3942                ;;
3943            esac
3944            ac_prev=
3945          elif test "x$ac_word" = "x-arch"; then
3946            ac_prev=arch
3947          fi
3948        done
3949 fi
3950 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3951     if test $ac_cv_c_bigendian = unknown; then
3952       # See if sys/param.h defines the BYTE_ORDER macro.
3953       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3954 /* end confdefs.h.  */
3955 #include <sys/types.h>
3956              #include <sys/param.h>
3957
3958 int
3959 main ()
3960 {
3961 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
3962                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
3963                      && LITTLE_ENDIAN)
3964               bogus endian macros
3965              #endif
3966
3967   ;
3968   return 0;
3969 }
3970 _ACEOF
3971 if ac_fn_c_try_compile "$LINENO"; then :
3972   # It does; now see whether it defined to BIG_ENDIAN or not.
3973          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3974 /* end confdefs.h.  */
3975 #include <sys/types.h>
3976                 #include <sys/param.h>
3977
3978 int
3979 main ()
3980 {
3981 #if BYTE_ORDER != BIG_ENDIAN
3982                  not big endian
3983                 #endif
3984
3985   ;
3986   return 0;
3987 }
3988 _ACEOF
3989 if ac_fn_c_try_compile "$LINENO"; then :
3990   ac_cv_c_bigendian=yes
3991 else
3992   ac_cv_c_bigendian=no
3993 fi
3994 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3995 fi
3996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3997     fi
3998     if test $ac_cv_c_bigendian = unknown; then
3999       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
4000       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4001 /* end confdefs.h.  */
4002 #include <limits.h>
4003
4004 int
4005 main ()
4006 {
4007 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
4008               bogus endian macros
4009              #endif
4010
4011   ;
4012   return 0;
4013 }
4014 _ACEOF
4015 if ac_fn_c_try_compile "$LINENO"; then :
4016   # It does; now see whether it defined to _BIG_ENDIAN or not.
4017          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4018 /* end confdefs.h.  */
4019 #include <limits.h>
4020
4021 int
4022 main ()
4023 {
4024 #ifndef _BIG_ENDIAN
4025                  not big endian
4026                 #endif
4027
4028   ;
4029   return 0;
4030 }
4031 _ACEOF
4032 if ac_fn_c_try_compile "$LINENO"; then :
4033   ac_cv_c_bigendian=yes
4034 else
4035   ac_cv_c_bigendian=no
4036 fi
4037 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4038 fi
4039 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4040     fi
4041     if test $ac_cv_c_bigendian = unknown; then
4042       # Compile a test program.
4043       if test "$cross_compiling" = yes; then :
4044   # Try to guess by grepping values from an object file.
4045          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4046 /* end confdefs.h.  */
4047 short int ascii_mm[] =
4048                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4049                 short int ascii_ii[] =
4050                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4051                 int use_ascii (int i) {
4052                   return ascii_mm[i] + ascii_ii[i];
4053                 }
4054                 short int ebcdic_ii[] =
4055                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4056                 short int ebcdic_mm[] =
4057                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4058                 int use_ebcdic (int i) {
4059                   return ebcdic_mm[i] + ebcdic_ii[i];
4060                 }
4061                 extern int foo;
4062
4063 int
4064 main ()
4065 {
4066 return use_ascii (foo) == use_ebcdic (foo);
4067   ;
4068   return 0;
4069 }
4070 _ACEOF
4071 if ac_fn_c_try_compile "$LINENO"; then :
4072   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4073               ac_cv_c_bigendian=yes
4074             fi
4075             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4076               if test "$ac_cv_c_bigendian" = unknown; then
4077                 ac_cv_c_bigendian=no
4078               else
4079                 # finding both strings is unlikely to happen, but who knows?
4080                 ac_cv_c_bigendian=unknown
4081               fi
4082             fi
4083 fi
4084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4085 else
4086   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4087 /* end confdefs.h.  */
4088 $ac_includes_default
4089 int
4090 main ()
4091 {
4092
4093              /* Are we little or big endian?  From Harbison&Steele.  */
4094              union
4095              {
4096                long int l;
4097                char c[sizeof (long int)];
4098              } u;
4099              u.l = 1;
4100              return u.c[sizeof (long int) - 1] == 1;
4101
4102   ;
4103   return 0;
4104 }
4105 _ACEOF
4106 if ac_fn_c_try_run "$LINENO"; then :
4107   ac_cv_c_bigendian=no
4108 else
4109   ac_cv_c_bigendian=yes
4110 fi
4111 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4112   conftest.$ac_objext conftest.beam conftest.$ac_ext
4113 fi
4114
4115     fi
4116 fi
4117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
4118 $as_echo "$ac_cv_c_bigendian" >&6; }
4119  case $ac_cv_c_bigendian in #(
4120    yes)
4121      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
4122 ;; #(
4123    no)
4124       ;; #(
4125    universal)
4126
4127 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
4128
4129      ;; #(
4130    *)
4131      as_fn_error $? "unknown endianness
4132  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
4133  esac
4134
4135
4136 # Checks for programs.
4137 for ac_prog in gawk mawk nawk awk
4138 do
4139   # Extract the first word of "$ac_prog", so it can be a program name with args.
4140 set dummy $ac_prog; ac_word=$2
4141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4142 $as_echo_n "checking for $ac_word... " >&6; }
4143 if ${ac_cv_prog_AWK+:} false; then :
4144   $as_echo_n "(cached) " >&6
4145 else
4146   if test -n "$AWK"; then
4147   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4148 else
4149 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4150 for as_dir in $PATH
4151 do
4152   IFS=$as_save_IFS
4153   test -z "$as_dir" && as_dir=.
4154     for ac_exec_ext in '' $ac_executable_extensions; do
4155   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4156     ac_cv_prog_AWK="$ac_prog"
4157     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4158     break 2
4159   fi
4160 done
4161   done
4162 IFS=$as_save_IFS
4163
4164 fi
4165 fi
4166 AWK=$ac_cv_prog_AWK
4167 if test -n "$AWK"; then
4168   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4169 $as_echo "$AWK" >&6; }
4170 else
4171   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4172 $as_echo "no" >&6; }
4173 fi
4174
4175
4176   test -n "$AWK" && break
4177 done
4178
4179 ac_ext=c
4180 ac_cpp='$CPP $CPPFLAGS'
4181 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4182 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4183 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4185 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4186 # On Suns, sometimes $CPP names a directory.
4187 if test -n "$CPP" && test -d "$CPP"; then
4188   CPP=
4189 fi
4190 if test -z "$CPP"; then
4191   if ${ac_cv_prog_CPP+:} false; then :
4192   $as_echo_n "(cached) " >&6
4193 else
4194       # Double quotes because CPP needs to be expanded
4195     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4196     do
4197       ac_preproc_ok=false
4198 for ac_c_preproc_warn_flag in '' yes
4199 do
4200   # Use a header file that comes with gcc, so configuring glibc
4201   # with a fresh cross-compiler works.
4202   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4203   # <limits.h> exists even on freestanding compilers.
4204   # On the NeXT, cc -E runs the code through the compiler's parser,
4205   # not just through cpp. "Syntax error" is here to catch this case.
4206   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4207 /* end confdefs.h.  */
4208 #ifdef __STDC__
4209 # include <limits.h>
4210 #else
4211 # include <assert.h>
4212 #endif
4213                      Syntax error
4214 _ACEOF
4215 if ac_fn_c_try_cpp "$LINENO"; then :
4216
4217 else
4218   # Broken: fails on valid input.
4219 continue
4220 fi
4221 rm -f conftest.err conftest.i conftest.$ac_ext
4222
4223   # OK, works on sane cases.  Now check whether nonexistent headers
4224   # can be detected and how.
4225   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4226 /* end confdefs.h.  */
4227 #include <ac_nonexistent.h>
4228 _ACEOF
4229 if ac_fn_c_try_cpp "$LINENO"; then :
4230   # Broken: success on invalid input.
4231 continue
4232 else
4233   # Passes both tests.
4234 ac_preproc_ok=:
4235 break
4236 fi
4237 rm -f conftest.err conftest.i conftest.$ac_ext
4238
4239 done
4240 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4241 rm -f conftest.i conftest.err conftest.$ac_ext
4242 if $ac_preproc_ok; then :
4243   break
4244 fi
4245
4246     done
4247     ac_cv_prog_CPP=$CPP
4248
4249 fi
4250   CPP=$ac_cv_prog_CPP
4251 else
4252   ac_cv_prog_CPP=$CPP
4253 fi
4254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4255 $as_echo "$CPP" >&6; }
4256 ac_preproc_ok=false
4257 for ac_c_preproc_warn_flag in '' yes
4258 do
4259   # Use a header file that comes with gcc, so configuring glibc
4260   # with a fresh cross-compiler works.
4261   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4262   # <limits.h> exists even on freestanding compilers.
4263   # On the NeXT, cc -E runs the code through the compiler's parser,
4264   # not just through cpp. "Syntax error" is here to catch this case.
4265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4266 /* end confdefs.h.  */
4267 #ifdef __STDC__
4268 # include <limits.h>
4269 #else
4270 # include <assert.h>
4271 #endif
4272                      Syntax error
4273 _ACEOF
4274 if ac_fn_c_try_cpp "$LINENO"; then :
4275
4276 else
4277   # Broken: fails on valid input.
4278 continue
4279 fi
4280 rm -f conftest.err conftest.i conftest.$ac_ext
4281
4282   # OK, works on sane cases.  Now check whether nonexistent headers
4283   # can be detected and how.
4284   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4285 /* end confdefs.h.  */
4286 #include <ac_nonexistent.h>
4287 _ACEOF
4288 if ac_fn_c_try_cpp "$LINENO"; then :
4289   # Broken: success on invalid input.
4290 continue
4291 else
4292   # Passes both tests.
4293 ac_preproc_ok=:
4294 break
4295 fi
4296 rm -f conftest.err conftest.i conftest.$ac_ext
4297
4298 done
4299 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4300 rm -f conftest.i conftest.err conftest.$ac_ext
4301 if $ac_preproc_ok; then :
4302
4303 else
4304   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4305 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4306 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4307 See \`config.log' for more details" "$LINENO" 5; }
4308 fi
4309
4310 ac_ext=c
4311 ac_cpp='$CPP $CPPFLAGS'
4312 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4313 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4314 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4315
4316 if test -n "$ac_tool_prefix"; then
4317   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4318 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4320 $as_echo_n "checking for $ac_word... " >&6; }
4321 if ${ac_cv_prog_RANLIB+:} false; then :
4322   $as_echo_n "(cached) " >&6
4323 else
4324   if test -n "$RANLIB"; then
4325   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4326 else
4327 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4328 for as_dir in $PATH
4329 do
4330   IFS=$as_save_IFS
4331   test -z "$as_dir" && as_dir=.
4332     for ac_exec_ext in '' $ac_executable_extensions; do
4333   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4334     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4335     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4336     break 2
4337   fi
4338 done
4339   done
4340 IFS=$as_save_IFS
4341
4342 fi
4343 fi
4344 RANLIB=$ac_cv_prog_RANLIB
4345 if test -n "$RANLIB"; then
4346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4347 $as_echo "$RANLIB" >&6; }
4348 else
4349   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4350 $as_echo "no" >&6; }
4351 fi
4352
4353
4354 fi
4355 if test -z "$ac_cv_prog_RANLIB"; then
4356   ac_ct_RANLIB=$RANLIB
4357   # Extract the first word of "ranlib", so it can be a program name with args.
4358 set dummy ranlib; ac_word=$2
4359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4360 $as_echo_n "checking for $ac_word... " >&6; }
4361 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4362   $as_echo_n "(cached) " >&6
4363 else
4364   if test -n "$ac_ct_RANLIB"; then
4365   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4366 else
4367 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4368 for as_dir in $PATH
4369 do
4370   IFS=$as_save_IFS
4371   test -z "$as_dir" && as_dir=.
4372     for ac_exec_ext in '' $ac_executable_extensions; do
4373   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4374     ac_cv_prog_ac_ct_RANLIB="ranlib"
4375     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4376     break 2
4377   fi
4378 done
4379   done
4380 IFS=$as_save_IFS
4381
4382 fi
4383 fi
4384 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4385 if test -n "$ac_ct_RANLIB"; then
4386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4387 $as_echo "$ac_ct_RANLIB" >&6; }
4388 else
4389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4390 $as_echo "no" >&6; }
4391 fi
4392
4393   if test "x$ac_ct_RANLIB" = x; then
4394     RANLIB=":"
4395   else
4396     case $cross_compiling:$ac_tool_warned in
4397 yes:)
4398 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4399 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4400 ac_tool_warned=yes ;;
4401 esac
4402     RANLIB=$ac_ct_RANLIB
4403   fi
4404 else
4405   RANLIB="$ac_cv_prog_RANLIB"
4406 fi
4407
4408 # Find a good install program.  We prefer a C program (faster),
4409 # so one script is as good as another.  But avoid the broken or
4410 # incompatible versions:
4411 # SysV /etc/install, /usr/sbin/install
4412 # SunOS /usr/etc/install
4413 # IRIX /sbin/install
4414 # AIX /bin/install
4415 # AmigaOS /C/install, which installs bootblocks on floppy discs
4416 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4417 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4418 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4419 # OS/2's system install, which has a completely different semantic
4420 # ./install, which can be erroneously created by make from ./install.sh.
4421 # Reject install programs that cannot install multiple files.
4422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4423 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4424 if test -z "$INSTALL"; then
4425 if ${ac_cv_path_install+:} false; then :
4426   $as_echo_n "(cached) " >&6
4427 else
4428   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4429 for as_dir in $PATH
4430 do
4431   IFS=$as_save_IFS
4432   test -z "$as_dir" && as_dir=.
4433     # Account for people who put trailing slashes in PATH elements.
4434 case $as_dir/ in #((
4435   ./ | .// | /[cC]/* | \
4436   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4437   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4438   /usr/ucb/* ) ;;
4439   *)
4440     # OSF1 and SCO ODT 3.0 have their own names for install.
4441     # Don't use installbsd from OSF since it installs stuff as root
4442     # by default.
4443     for ac_prog in ginstall scoinst install; do
4444       for ac_exec_ext in '' $ac_executable_extensions; do
4445         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4446           if test $ac_prog = install &&
4447             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4448             # AIX install.  It has an incompatible calling convention.
4449             :
4450           elif test $ac_prog = install &&
4451             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4452             # program-specific install script used by HP pwplus--don't use.
4453             :
4454           else
4455             rm -rf conftest.one conftest.two conftest.dir
4456             echo one > conftest.one
4457             echo two > conftest.two
4458             mkdir conftest.dir
4459             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4460               test -s conftest.one && test -s conftest.two &&
4461               test -s conftest.dir/conftest.one &&
4462               test -s conftest.dir/conftest.two
4463             then
4464               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4465               break 3
4466             fi
4467           fi
4468         fi
4469       done
4470     done
4471     ;;
4472 esac
4473
4474   done
4475 IFS=$as_save_IFS
4476
4477 rm -rf conftest.one conftest.two conftest.dir
4478
4479 fi
4480   if test "${ac_cv_path_install+set}" = set; then
4481     INSTALL=$ac_cv_path_install
4482   else
4483     # As a last resort, use the slow shell script.  Don't cache a
4484     # value for INSTALL within a source directory, because that will
4485     # break other packages using the cache if that directory is
4486     # removed, or if the value is a relative name.
4487     INSTALL=$ac_install_sh
4488   fi
4489 fi
4490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4491 $as_echo "$INSTALL" >&6; }
4492
4493 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4494 # It thinks the first close brace ends the variable substitution.
4495 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4496
4497 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4498
4499 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4500
4501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4502 $as_echo_n "checking for egrep... " >&6; }
4503 if ${ac_cv_path_EGREP+:} false; then :
4504   $as_echo_n "(cached) " >&6
4505 else
4506   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4507    then ac_cv_path_EGREP="$GREP -E"
4508    else
4509      if test -z "$EGREP"; then
4510   ac_path_EGREP_found=false
4511   # Loop through the user's path and test for each of PROGNAME-LIST
4512   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4513 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4514 do
4515   IFS=$as_save_IFS
4516   test -z "$as_dir" && as_dir=.
4517     for ac_prog in egrep; do
4518     for ac_exec_ext in '' $ac_executable_extensions; do
4519       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4520       as_fn_executable_p "$ac_path_EGREP" || continue
4521 # Check for GNU ac_path_EGREP and select it if it is found.
4522   # Check for GNU $ac_path_EGREP
4523 case `"$ac_path_EGREP" --version 2>&1` in
4524 *GNU*)
4525   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4526 *)
4527   ac_count=0
4528   $as_echo_n 0123456789 >"conftest.in"
4529   while :
4530   do
4531     cat "conftest.in" "conftest.in" >"conftest.tmp"
4532     mv "conftest.tmp" "conftest.in"
4533     cp "conftest.in" "conftest.nl"
4534     $as_echo 'EGREP' >> "conftest.nl"
4535     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4536     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4537     as_fn_arith $ac_count + 1 && ac_count=$as_val
4538     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4539       # Best one so far, save it but keep looking for a better one
4540       ac_cv_path_EGREP="$ac_path_EGREP"
4541       ac_path_EGREP_max=$ac_count
4542     fi
4543     # 10*(2^10) chars as input seems more than enough
4544     test $ac_count -gt 10 && break
4545   done
4546   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4547 esac
4548
4549       $ac_path_EGREP_found && break 3
4550     done
4551   done
4552   done
4553 IFS=$as_save_IFS
4554   if test -z "$ac_cv_path_EGREP"; then
4555     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4556   fi
4557 else
4558   ac_cv_path_EGREP=$EGREP
4559 fi
4560
4561    fi
4562 fi
4563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4564 $as_echo "$ac_cv_path_EGREP" >&6; }
4565  EGREP="$ac_cv_path_EGREP"
4566
4567
4568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
4569 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
4570 if test -z "$MKDIR_P"; then
4571   if ${ac_cv_path_mkdir+:} false; then :
4572   $as_echo_n "(cached) " >&6
4573 else
4574   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4575 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
4576 do
4577   IFS=$as_save_IFS
4578   test -z "$as_dir" && as_dir=.
4579     for ac_prog in mkdir gmkdir; do
4580          for ac_exec_ext in '' $ac_executable_extensions; do
4581            as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
4582            case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
4583              'mkdir (GNU coreutils) '* | \
4584              'mkdir (coreutils) '* | \
4585              'mkdir (fileutils) '4.1*)
4586                ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
4587                break 3;;
4588            esac
4589          done
4590        done
4591   done
4592 IFS=$as_save_IFS
4593
4594 fi
4595
4596   test -d ./--version && rmdir ./--version
4597   if test "${ac_cv_path_mkdir+set}" = set; then
4598     MKDIR_P="$ac_cv_path_mkdir -p"
4599   else
4600     # As a last resort, use the slow shell script.  Don't cache a
4601     # value for MKDIR_P within a source directory, because that will
4602     # break other packages using the cache if that directory is
4603     # removed, or if the value is a relative name.
4604     MKDIR_P="$ac_install_sh -d"
4605   fi
4606 fi
4607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
4608 $as_echo "$MKDIR_P" >&6; }
4609
4610 if test -n "$ac_tool_prefix"; then
4611   for ac_prog in ar
4612   do
4613     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4614 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4616 $as_echo_n "checking for $ac_word... " >&6; }
4617 if ${ac_cv_prog_AR+:} false; then :
4618   $as_echo_n "(cached) " >&6
4619 else
4620   if test -n "$AR"; then
4621   ac_cv_prog_AR="$AR" # Let the user override the test.
4622 else
4623 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4624 for as_dir in $PATH
4625 do
4626   IFS=$as_save_IFS
4627   test -z "$as_dir" && as_dir=.
4628     for ac_exec_ext in '' $ac_executable_extensions; do
4629   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4630     ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
4631     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4632     break 2
4633   fi
4634 done
4635   done
4636 IFS=$as_save_IFS
4637
4638 fi
4639 fi
4640 AR=$ac_cv_prog_AR
4641 if test -n "$AR"; then
4642   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4643 $as_echo "$AR" >&6; }
4644 else
4645   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4646 $as_echo "no" >&6; }
4647 fi
4648
4649
4650     test -n "$AR" && break
4651   done
4652 fi
4653 if test -z "$AR"; then
4654   ac_ct_AR=$AR
4655   for ac_prog in ar
4656 do
4657   # Extract the first word of "$ac_prog", so it can be a program name with args.
4658 set dummy $ac_prog; ac_word=$2
4659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4660 $as_echo_n "checking for $ac_word... " >&6; }
4661 if ${ac_cv_prog_ac_ct_AR+:} false; then :
4662   $as_echo_n "(cached) " >&6
4663 else
4664   if test -n "$ac_ct_AR"; then
4665   ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
4666 else
4667 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4668 for as_dir in $PATH
4669 do
4670   IFS=$as_save_IFS
4671   test -z "$as_dir" && as_dir=.
4672     for ac_exec_ext in '' $ac_executable_extensions; do
4673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4674     ac_cv_prog_ac_ct_AR="$ac_prog"
4675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4676     break 2
4677   fi
4678 done
4679   done
4680 IFS=$as_save_IFS
4681
4682 fi
4683 fi
4684 ac_ct_AR=$ac_cv_prog_ac_ct_AR
4685 if test -n "$ac_ct_AR"; then
4686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
4687 $as_echo "$ac_ct_AR" >&6; }
4688 else
4689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4690 $as_echo "no" >&6; }
4691 fi
4692
4693
4694   test -n "$ac_ct_AR" && break
4695 done
4696
4697   if test "x$ac_ct_AR" = x; then
4698     AR=""
4699   else
4700     case $cross_compiling:$ac_tool_warned in
4701 yes:)
4702 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4703 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4704 ac_tool_warned=yes ;;
4705 esac
4706     AR=$ac_ct_AR
4707   fi
4708 fi
4709
4710 # Extract the first word of "cat", so it can be a program name with args.
4711 set dummy cat; ac_word=$2
4712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4713 $as_echo_n "checking for $ac_word... " >&6; }
4714 if ${ac_cv_path_CAT+:} false; then :
4715   $as_echo_n "(cached) " >&6
4716 else
4717   case $CAT in
4718   [\\/]* | ?:[\\/]*)
4719   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4720   ;;
4721   *)
4722   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4723 for as_dir in $PATH
4724 do
4725   IFS=$as_save_IFS
4726   test -z "$as_dir" && as_dir=.
4727     for ac_exec_ext in '' $ac_executable_extensions; do
4728   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4729     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4730     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4731     break 2
4732   fi
4733 done
4734   done
4735 IFS=$as_save_IFS
4736
4737   ;;
4738 esac
4739 fi
4740 CAT=$ac_cv_path_CAT
4741 if test -n "$CAT"; then
4742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4743 $as_echo "$CAT" >&6; }
4744 else
4745   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4746 $as_echo "no" >&6; }
4747 fi
4748
4749
4750 # Extract the first word of "kill", so it can be a program name with args.
4751 set dummy kill; ac_word=$2
4752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4753 $as_echo_n "checking for $ac_word... " >&6; }
4754 if ${ac_cv_path_KILL+:} false; then :
4755   $as_echo_n "(cached) " >&6
4756 else
4757   case $KILL in
4758   [\\/]* | ?:[\\/]*)
4759   ac_cv_path_KILL="$KILL" # Let the user override the test with a path.
4760   ;;
4761   *)
4762   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4763 for as_dir in $PATH
4764 do
4765   IFS=$as_save_IFS
4766   test -z "$as_dir" && as_dir=.
4767     for ac_exec_ext in '' $ac_executable_extensions; do
4768   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4769     ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext"
4770     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4771     break 2
4772   fi
4773 done
4774   done
4775 IFS=$as_save_IFS
4776
4777   ;;
4778 esac
4779 fi
4780 KILL=$ac_cv_path_KILL
4781 if test -n "$KILL"; then
4782   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KILL" >&5
4783 $as_echo "$KILL" >&6; }
4784 else
4785   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4786 $as_echo "no" >&6; }
4787 fi
4788
4789
4790 # Extract the first word of "sed", so it can be a program name with args.
4791 set dummy sed; ac_word=$2
4792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4793 $as_echo_n "checking for $ac_word... " >&6; }
4794 if ${ac_cv_path_SED+:} false; then :
4795   $as_echo_n "(cached) " >&6
4796 else
4797   case $SED in
4798   [\\/]* | ?:[\\/]*)
4799   ac_cv_path_SED="$SED" # Let the user override the test with a path.
4800   ;;
4801   *)
4802   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4803 for as_dir in $PATH
4804 do
4805   IFS=$as_save_IFS
4806   test -z "$as_dir" && as_dir=.
4807     for ac_exec_ext in '' $ac_executable_extensions; do
4808   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4809     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
4810     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4811     break 2
4812   fi
4813 done
4814   done
4815 IFS=$as_save_IFS
4816
4817   ;;
4818 esac
4819 fi
4820 SED=$ac_cv_path_SED
4821 if test -n "$SED"; then
4822   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
4823 $as_echo "$SED" >&6; }
4824 else
4825   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4826 $as_echo "no" >&6; }
4827 fi
4828
4829
4830 # Extract the first word of "ent", so it can be a program name with args.
4831 set dummy ent; ac_word=$2
4832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4833 $as_echo_n "checking for $ac_word... " >&6; }
4834 if ${ac_cv_path_ENT+:} false; then :
4835   $as_echo_n "(cached) " >&6
4836 else
4837   case $ENT in
4838   [\\/]* | ?:[\\/]*)
4839   ac_cv_path_ENT="$ENT" # Let the user override the test with a path.
4840   ;;
4841   *)
4842   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4843 for as_dir in $PATH
4844 do
4845   IFS=$as_save_IFS
4846   test -z "$as_dir" && as_dir=.
4847     for ac_exec_ext in '' $ac_executable_extensions; do
4848   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4849     ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext"
4850     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4851     break 2
4852   fi
4853 done
4854   done
4855 IFS=$as_save_IFS
4856
4857   ;;
4858 esac
4859 fi
4860 ENT=$ac_cv_path_ENT
4861 if test -n "$ENT"; then
4862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENT" >&5
4863 $as_echo "$ENT" >&6; }
4864 else
4865   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4866 $as_echo "no" >&6; }
4867 fi
4868
4869
4870
4871 # Extract the first word of "bash", so it can be a program name with args.
4872 set dummy bash; ac_word=$2
4873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4874 $as_echo_n "checking for $ac_word... " >&6; }
4875 if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4876   $as_echo_n "(cached) " >&6
4877 else
4878   case $TEST_MINUS_S_SH in
4879   [\\/]* | ?:[\\/]*)
4880   ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4881   ;;
4882   *)
4883   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4884 for as_dir in $PATH
4885 do
4886   IFS=$as_save_IFS
4887   test -z "$as_dir" && as_dir=.
4888     for ac_exec_ext in '' $ac_executable_extensions; do
4889   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4890     ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4891     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4892     break 2
4893   fi
4894 done
4895   done
4896 IFS=$as_save_IFS
4897
4898   ;;
4899 esac
4900 fi
4901 TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4902 if test -n "$TEST_MINUS_S_SH"; then
4903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4904 $as_echo "$TEST_MINUS_S_SH" >&6; }
4905 else
4906   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4907 $as_echo "no" >&6; }
4908 fi
4909
4910
4911 # Extract the first word of "ksh", so it can be a program name with args.
4912 set dummy ksh; ac_word=$2
4913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4914 $as_echo_n "checking for $ac_word... " >&6; }
4915 if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4916   $as_echo_n "(cached) " >&6
4917 else
4918   case $TEST_MINUS_S_SH in
4919   [\\/]* | ?:[\\/]*)
4920   ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4921   ;;
4922   *)
4923   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4924 for as_dir in $PATH
4925 do
4926   IFS=$as_save_IFS
4927   test -z "$as_dir" && as_dir=.
4928     for ac_exec_ext in '' $ac_executable_extensions; do
4929   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4930     ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4931     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4932     break 2
4933   fi
4934 done
4935   done
4936 IFS=$as_save_IFS
4937
4938   ;;
4939 esac
4940 fi
4941 TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4942 if test -n "$TEST_MINUS_S_SH"; then
4943   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4944 $as_echo "$TEST_MINUS_S_SH" >&6; }
4945 else
4946   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4947 $as_echo "no" >&6; }
4948 fi
4949
4950
4951 # Extract the first word of "sh", so it can be a program name with args.
4952 set dummy sh; ac_word=$2
4953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4954 $as_echo_n "checking for $ac_word... " >&6; }
4955 if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4956   $as_echo_n "(cached) " >&6
4957 else
4958   case $TEST_MINUS_S_SH in
4959   [\\/]* | ?:[\\/]*)
4960   ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4961   ;;
4962   *)
4963   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4964 for as_dir in $PATH
4965 do
4966   IFS=$as_save_IFS
4967   test -z "$as_dir" && as_dir=.
4968     for ac_exec_ext in '' $ac_executable_extensions; do
4969   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4970     ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4971     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4972     break 2
4973   fi
4974 done
4975   done
4976 IFS=$as_save_IFS
4977
4978   ;;
4979 esac
4980 fi
4981 TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4982 if test -n "$TEST_MINUS_S_SH"; then
4983   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4984 $as_echo "$TEST_MINUS_S_SH" >&6; }
4985 else
4986   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4987 $as_echo "no" >&6; }
4988 fi
4989
4990
4991 # Extract the first word of "sh", so it can be a program name with args.
4992 set dummy sh; ac_word=$2
4993 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4994 $as_echo_n "checking for $ac_word... " >&6; }
4995 if ${ac_cv_path_SH+:} false; then :
4996   $as_echo_n "(cached) " >&6
4997 else
4998   case $SH in
4999   [\\/]* | ?:[\\/]*)
5000   ac_cv_path_SH="$SH" # Let the user override the test with a path.
5001   ;;
5002   *)
5003   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5004 for as_dir in $PATH
5005 do
5006   IFS=$as_save_IFS
5007   test -z "$as_dir" && as_dir=.
5008     for ac_exec_ext in '' $ac_executable_extensions; do
5009   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5010     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
5011     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5012     break 2
5013   fi
5014 done
5015   done
5016 IFS=$as_save_IFS
5017
5018   ;;
5019 esac
5020 fi
5021 SH=$ac_cv_path_SH
5022 if test -n "$SH"; then
5023   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
5024 $as_echo "$SH" >&6; }
5025 else
5026   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5027 $as_echo "no" >&6; }
5028 fi
5029
5030
5031 # Extract the first word of "groff", so it can be a program name with args.
5032 set dummy groff; ac_word=$2
5033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5034 $as_echo_n "checking for $ac_word... " >&6; }
5035 if ${ac_cv_path_GROFF+:} false; then :
5036   $as_echo_n "(cached) " >&6
5037 else
5038   case $GROFF in
5039   [\\/]* | ?:[\\/]*)
5040   ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path.
5041   ;;
5042   *)
5043   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5044 for as_dir in $PATH
5045 do
5046   IFS=$as_save_IFS
5047   test -z "$as_dir" && as_dir=.
5048     for ac_exec_ext in '' $ac_executable_extensions; do
5049   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5050     ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext"
5051     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5052     break 2
5053   fi
5054 done
5055   done
5056 IFS=$as_save_IFS
5057
5058   ;;
5059 esac
5060 fi
5061 GROFF=$ac_cv_path_GROFF
5062 if test -n "$GROFF"; then
5063   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5
5064 $as_echo "$GROFF" >&6; }
5065 else
5066   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5067 $as_echo "no" >&6; }
5068 fi
5069
5070
5071 # Extract the first word of "nroff", so it can be a program name with args.
5072 set dummy nroff; ac_word=$2
5073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5074 $as_echo_n "checking for $ac_word... " >&6; }
5075 if ${ac_cv_path_NROFF+:} false; then :
5076   $as_echo_n "(cached) " >&6
5077 else
5078   case $NROFF in
5079   [\\/]* | ?:[\\/]*)
5080   ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
5081   ;;
5082   *)
5083   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5084 for as_dir in $PATH
5085 do
5086   IFS=$as_save_IFS
5087   test -z "$as_dir" && as_dir=.
5088     for ac_exec_ext in '' $ac_executable_extensions; do
5089   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5090     ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
5091     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5092     break 2
5093   fi
5094 done
5095   done
5096 IFS=$as_save_IFS
5097
5098   ;;
5099 esac
5100 fi
5101 NROFF=$ac_cv_path_NROFF
5102 if test -n "$NROFF"; then
5103   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
5104 $as_echo "$NROFF" >&6; }
5105 else
5106   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5107 $as_echo "no" >&6; }
5108 fi
5109
5110
5111 # Extract the first word of "mandoc", so it can be a program name with args.
5112 set dummy mandoc; ac_word=$2
5113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5114 $as_echo_n "checking for $ac_word... " >&6; }
5115 if ${ac_cv_path_MANDOC+:} false; then :
5116   $as_echo_n "(cached) " >&6
5117 else
5118   case $MANDOC in
5119   [\\/]* | ?:[\\/]*)
5120   ac_cv_path_MANDOC="$MANDOC" # Let the user override the test with a path.
5121   ;;
5122   *)
5123   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5124 for as_dir in $PATH
5125 do
5126   IFS=$as_save_IFS
5127   test -z "$as_dir" && as_dir=.
5128     for ac_exec_ext in '' $ac_executable_extensions; do
5129   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5130     ac_cv_path_MANDOC="$as_dir/$ac_word$ac_exec_ext"
5131     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5132     break 2
5133   fi
5134 done
5135   done
5136 IFS=$as_save_IFS
5137
5138   ;;
5139 esac
5140 fi
5141 MANDOC=$ac_cv_path_MANDOC
5142 if test -n "$MANDOC"; then
5143   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANDOC" >&5
5144 $as_echo "$MANDOC" >&6; }
5145 else
5146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5147 $as_echo "no" >&6; }
5148 fi
5149
5150
5151 TEST_SHELL=sh
5152
5153
5154 if test "x$MANDOC" != "x" ; then
5155         MANFMT="$MANDOC"
5156 elif test "x$NROFF" != "x" ; then
5157         MANFMT="$NROFF -mandoc"
5158 elif test "x$GROFF" != "x" ; then
5159         MANFMT="$GROFF -mandoc -Tascii"
5160 else
5161         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no manpage formatted found" >&5
5162 $as_echo "$as_me: WARNING: no manpage formatted found" >&2;}
5163         MANFMT="false"
5164 fi
5165
5166
5167 # Extract the first word of "groupadd", so it can be a program name with args.
5168 set dummy groupadd; ac_word=$2
5169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5170 $as_echo_n "checking for $ac_word... " >&6; }
5171 if ${ac_cv_path_PATH_GROUPADD_PROG+:} false; then :
5172   $as_echo_n "(cached) " >&6
5173 else
5174   case $PATH_GROUPADD_PROG in
5175   [\\/]* | ?:[\\/]*)
5176   ac_cv_path_PATH_GROUPADD_PROG="$PATH_GROUPADD_PROG" # Let the user override the test with a path.
5177   ;;
5178   *)
5179   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5180 for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
5181 do
5182   IFS=$as_save_IFS
5183   test -z "$as_dir" && as_dir=.
5184     for ac_exec_ext in '' $ac_executable_extensions; do
5185   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5186     ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext"
5187     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5188     break 2
5189   fi
5190 done
5191   done
5192 IFS=$as_save_IFS
5193
5194   test -z "$ac_cv_path_PATH_GROUPADD_PROG" && ac_cv_path_PATH_GROUPADD_PROG="groupadd"
5195   ;;
5196 esac
5197 fi
5198 PATH_GROUPADD_PROG=$ac_cv_path_PATH_GROUPADD_PROG
5199 if test -n "$PATH_GROUPADD_PROG"; then
5200   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_GROUPADD_PROG" >&5
5201 $as_echo "$PATH_GROUPADD_PROG" >&6; }
5202 else
5203   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5204 $as_echo "no" >&6; }
5205 fi
5206
5207
5208 # Extract the first word of "useradd", so it can be a program name with args.
5209 set dummy useradd; ac_word=$2
5210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5211 $as_echo_n "checking for $ac_word... " >&6; }
5212 if ${ac_cv_path_PATH_USERADD_PROG+:} false; then :
5213   $as_echo_n "(cached) " >&6
5214 else
5215   case $PATH_USERADD_PROG in
5216   [\\/]* | ?:[\\/]*)
5217   ac_cv_path_PATH_USERADD_PROG="$PATH_USERADD_PROG" # Let the user override the test with a path.
5218   ;;
5219   *)
5220   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5221 for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
5222 do
5223   IFS=$as_save_IFS
5224   test -z "$as_dir" && as_dir=.
5225     for ac_exec_ext in '' $ac_executable_extensions; do
5226   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5227     ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext"
5228     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5229     break 2
5230   fi
5231 done
5232   done
5233 IFS=$as_save_IFS
5234
5235   test -z "$ac_cv_path_PATH_USERADD_PROG" && ac_cv_path_PATH_USERADD_PROG="useradd"
5236   ;;
5237 esac
5238 fi
5239 PATH_USERADD_PROG=$ac_cv_path_PATH_USERADD_PROG
5240 if test -n "$PATH_USERADD_PROG"; then
5241   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_USERADD_PROG" >&5
5242 $as_echo "$PATH_USERADD_PROG" >&6; }
5243 else
5244   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5245 $as_echo "no" >&6; }
5246 fi
5247
5248
5249 # Extract the first word of "pkgmk", so it can be a program name with args.
5250 set dummy pkgmk; ac_word=$2
5251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5252 $as_echo_n "checking for $ac_word... " >&6; }
5253 if ${ac_cv_prog_MAKE_PACKAGE_SUPPORTED+:} false; then :
5254   $as_echo_n "(cached) " >&6
5255 else
5256   if test -n "$MAKE_PACKAGE_SUPPORTED"; then
5257   ac_cv_prog_MAKE_PACKAGE_SUPPORTED="$MAKE_PACKAGE_SUPPORTED" # Let the user override the test.
5258 else
5259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5260 for as_dir in $PATH
5261 do
5262   IFS=$as_save_IFS
5263   test -z "$as_dir" && as_dir=.
5264     for ac_exec_ext in '' $ac_executable_extensions; do
5265   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5266     ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes"
5267     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5268     break 2
5269   fi
5270 done
5271   done
5272 IFS=$as_save_IFS
5273
5274   test -z "$ac_cv_prog_MAKE_PACKAGE_SUPPORTED" && ac_cv_prog_MAKE_PACKAGE_SUPPORTED="no"
5275 fi
5276 fi
5277 MAKE_PACKAGE_SUPPORTED=$ac_cv_prog_MAKE_PACKAGE_SUPPORTED
5278 if test -n "$MAKE_PACKAGE_SUPPORTED"; then
5279   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE_PACKAGE_SUPPORTED" >&5
5280 $as_echo "$MAKE_PACKAGE_SUPPORTED" >&6; }
5281 else
5282   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5283 $as_echo "no" >&6; }
5284 fi
5285
5286
5287 if test -x /sbin/sh; then
5288         STARTUP_SCRIPT_SHELL=/sbin/sh
5289
5290 else
5291         STARTUP_SCRIPT_SHELL=/bin/sh
5292
5293 fi
5294
5295 # System features
5296 # Check whether --enable-largefile was given.
5297 if test "${enable_largefile+set}" = set; then :
5298   enableval=$enable_largefile;
5299 fi
5300
5301 if test "$enable_largefile" != no; then
5302
5303   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5304 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5305 if ${ac_cv_sys_largefile_CC+:} false; then :
5306   $as_echo_n "(cached) " >&6
5307 else
5308   ac_cv_sys_largefile_CC=no
5309      if test "$GCC" != yes; then
5310        ac_save_CC=$CC
5311        while :; do
5312          # IRIX 6.2 and later do not support large files by default,
5313          # so use the C compiler's -n32 option if that helps.
5314          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5315 /* end confdefs.h.  */
5316 #include <sys/types.h>
5317  /* Check that off_t can represent 2**63 - 1 correctly.
5318     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5319     since some C++ compilers masquerading as C compilers
5320     incorrectly reject 9223372036854775807.  */
5321 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5322   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5323                        && LARGE_OFF_T % 2147483647 == 1)
5324                       ? 1 : -1];
5325 int
5326 main ()
5327 {
5328
5329   ;
5330   return 0;
5331 }
5332 _ACEOF
5333          if ac_fn_c_try_compile "$LINENO"; then :
5334   break
5335 fi
5336 rm -f core conftest.err conftest.$ac_objext
5337          CC="$CC -n32"
5338          if ac_fn_c_try_compile "$LINENO"; then :
5339   ac_cv_sys_largefile_CC=' -n32'; break
5340 fi
5341 rm -f core conftest.err conftest.$ac_objext
5342          break
5343        done
5344        CC=$ac_save_CC
5345        rm -f conftest.$ac_ext
5346     fi
5347 fi
5348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5349 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5350   if test "$ac_cv_sys_largefile_CC" != no; then
5351     CC=$CC$ac_cv_sys_largefile_CC
5352   fi
5353
5354   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5355 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5356 if ${ac_cv_sys_file_offset_bits+:} false; then :
5357   $as_echo_n "(cached) " >&6
5358 else
5359   while :; do
5360   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5361 /* end confdefs.h.  */
5362 #include <sys/types.h>
5363  /* Check that off_t can represent 2**63 - 1 correctly.
5364     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5365     since some C++ compilers masquerading as C compilers
5366     incorrectly reject 9223372036854775807.  */
5367 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5368   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5369                        && LARGE_OFF_T % 2147483647 == 1)
5370                       ? 1 : -1];
5371 int
5372 main ()
5373 {
5374
5375   ;
5376   return 0;
5377 }
5378 _ACEOF
5379 if ac_fn_c_try_compile "$LINENO"; then :
5380   ac_cv_sys_file_offset_bits=no; break
5381 fi
5382 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5383   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5384 /* end confdefs.h.  */
5385 #define _FILE_OFFSET_BITS 64
5386 #include <sys/types.h>
5387  /* Check that off_t can represent 2**63 - 1 correctly.
5388     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5389     since some C++ compilers masquerading as C compilers
5390     incorrectly reject 9223372036854775807.  */
5391 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5392   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5393                        && LARGE_OFF_T % 2147483647 == 1)
5394                       ? 1 : -1];
5395 int
5396 main ()
5397 {
5398
5399   ;
5400   return 0;
5401 }
5402 _ACEOF
5403 if ac_fn_c_try_compile "$LINENO"; then :
5404   ac_cv_sys_file_offset_bits=64; break
5405 fi
5406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5407   ac_cv_sys_file_offset_bits=unknown
5408   break
5409 done
5410 fi
5411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5412 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5413 case $ac_cv_sys_file_offset_bits in #(
5414   no | unknown) ;;
5415   *)
5416 cat >>confdefs.h <<_ACEOF
5417 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5418 _ACEOF
5419 ;;
5420 esac
5421 rm -rf conftest*
5422   if test $ac_cv_sys_file_offset_bits = unknown; then
5423     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5424 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5425 if ${ac_cv_sys_large_files+:} false; then :
5426   $as_echo_n "(cached) " >&6
5427 else
5428   while :; do
5429   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5430 /* end confdefs.h.  */
5431 #include <sys/types.h>
5432  /* Check that off_t can represent 2**63 - 1 correctly.
5433     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5434     since some C++ compilers masquerading as C compilers
5435     incorrectly reject 9223372036854775807.  */
5436 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5437   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5438                        && LARGE_OFF_T % 2147483647 == 1)
5439                       ? 1 : -1];
5440 int
5441 main ()
5442 {
5443
5444   ;
5445   return 0;
5446 }
5447 _ACEOF
5448 if ac_fn_c_try_compile "$LINENO"; then :
5449   ac_cv_sys_large_files=no; break
5450 fi
5451 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5452   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5453 /* end confdefs.h.  */
5454 #define _LARGE_FILES 1
5455 #include <sys/types.h>
5456  /* Check that off_t can represent 2**63 - 1 correctly.
5457     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5458     since some C++ compilers masquerading as C compilers
5459     incorrectly reject 9223372036854775807.  */
5460 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5461   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5462                        && LARGE_OFF_T % 2147483647 == 1)
5463                       ? 1 : -1];
5464 int
5465 main ()
5466 {
5467
5468   ;
5469   return 0;
5470 }
5471 _ACEOF
5472 if ac_fn_c_try_compile "$LINENO"; then :
5473   ac_cv_sys_large_files=1; break
5474 fi
5475 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5476   ac_cv_sys_large_files=unknown
5477   break
5478 done
5479 fi
5480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5481 $as_echo "$ac_cv_sys_large_files" >&6; }
5482 case $ac_cv_sys_large_files in #(
5483   no | unknown) ;;
5484   *)
5485 cat >>confdefs.h <<_ACEOF
5486 #define _LARGE_FILES $ac_cv_sys_large_files
5487 _ACEOF
5488 ;;
5489 esac
5490 rm -rf conftest*
5491   fi
5492
5493
5494 fi
5495
5496
5497 if test -z "$AR" ; then
5498         as_fn_error $? "*** 'ar' missing, please install or fix your \$PATH ***" "$LINENO" 5
5499 fi
5500
5501 # Extract the first word of "passwd", so it can be a program name with args.
5502 set dummy passwd; ac_word=$2
5503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5504 $as_echo_n "checking for $ac_word... " >&6; }
5505 if ${ac_cv_path_PATH_PASSWD_PROG+:} false; then :
5506   $as_echo_n "(cached) " >&6
5507 else
5508   case $PATH_PASSWD_PROG in
5509   [\\/]* | ?:[\\/]*)
5510   ac_cv_path_PATH_PASSWD_PROG="$PATH_PASSWD_PROG" # Let the user override the test with a path.
5511   ;;
5512   *)
5513   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5514 for as_dir in $PATH
5515 do
5516   IFS=$as_save_IFS
5517   test -z "$as_dir" && as_dir=.
5518     for ac_exec_ext in '' $ac_executable_extensions; do
5519   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5520     ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext"
5521     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5522     break 2
5523   fi
5524 done
5525   done
5526 IFS=$as_save_IFS
5527
5528   ;;
5529 esac
5530 fi
5531 PATH_PASSWD_PROG=$ac_cv_path_PATH_PASSWD_PROG
5532 if test -n "$PATH_PASSWD_PROG"; then
5533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_PASSWD_PROG" >&5
5534 $as_echo "$PATH_PASSWD_PROG" >&6; }
5535 else
5536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5537 $as_echo "no" >&6; }
5538 fi
5539
5540
5541 if test ! -z "$PATH_PASSWD_PROG" ; then
5542
5543 cat >>confdefs.h <<_ACEOF
5544 #define _PATH_PASSWD_PROG "$PATH_PASSWD_PROG"
5545 _ACEOF
5546
5547 fi
5548
5549 if test -z "$LD" ; then
5550         LD=$CC
5551 fi
5552
5553
5554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5555 $as_echo_n "checking for inline... " >&6; }
5556 if ${ac_cv_c_inline+:} false; then :
5557   $as_echo_n "(cached) " >&6
5558 else
5559   ac_cv_c_inline=no
5560 for ac_kw in inline __inline__ __inline; do
5561   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5562 /* end confdefs.h.  */
5563 #ifndef __cplusplus
5564 typedef int foo_t;
5565 static $ac_kw foo_t static_foo () {return 0; }
5566 $ac_kw foo_t foo () {return 0; }
5567 #endif
5568
5569 _ACEOF
5570 if ac_fn_c_try_compile "$LINENO"; then :
5571   ac_cv_c_inline=$ac_kw
5572 fi
5573 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5574   test "$ac_cv_c_inline" != no && break
5575 done
5576
5577 fi
5578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5579 $as_echo "$ac_cv_c_inline" >&6; }
5580
5581 case $ac_cv_c_inline in
5582   inline | yes) ;;
5583   *)
5584     case $ac_cv_c_inline in
5585       no) ac_val=;;
5586       *) ac_val=$ac_cv_c_inline;;
5587     esac
5588     cat >>confdefs.h <<_ACEOF
5589 #ifndef __cplusplus
5590 #define inline $ac_val
5591 #endif
5592 _ACEOF
5593     ;;
5594 esac
5595
5596
5597 ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
5598 "
5599 if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
5600   have_llong_max=1
5601 fi
5602
5603 ac_fn_c_check_decl "$LINENO" "SYSTR_POLICY_KILL" "ac_cv_have_decl_SYSTR_POLICY_KILL" "
5604         #include <sys/types.h>
5605         #include <sys/param.h>
5606         #include <dev/systrace.h>
5607
5608 "
5609 if test "x$ac_cv_have_decl_SYSTR_POLICY_KILL" = xyes; then :
5610   have_systr_policy_kill=1
5611 fi
5612
5613 ac_fn_c_check_decl "$LINENO" "RLIMIT_NPROC" "ac_cv_have_decl_RLIMIT_NPROC" "
5614         #include <sys/types.h>
5615         #include <sys/resource.h>
5616
5617 "
5618 if test "x$ac_cv_have_decl_RLIMIT_NPROC" = xyes; then :
5619
5620 $as_echo "#define HAVE_RLIMIT_NPROC /**/" >>confdefs.h
5621
5622 fi
5623
5624 ac_fn_c_check_decl "$LINENO" "PR_SET_NO_NEW_PRIVS" "ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" "
5625         #include <sys/types.h>
5626         #include <linux/prctl.h>
5627
5628 "
5629 if test "x$ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" = xyes; then :
5630   have_linux_no_new_privs=1
5631 fi
5632
5633
5634 openssl=yes
5635
5636 # Check whether --with-openssl was given.
5637 if test "${with_openssl+set}" = set; then :
5638   withval=$with_openssl;   if test "x$withval" = "xno" ; then
5639                 openssl=no
5640            fi
5641
5642
5643 fi
5644
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL will be used for cryptography" >&5
5646 $as_echo_n "checking whether OpenSSL will be used for cryptography... " >&6; }
5647 if test "x$openssl" = "xyes" ; then
5648         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5649 $as_echo "yes" >&6; }
5650
5651 cat >>confdefs.h <<_ACEOF
5652 #define WITH_OPENSSL 1
5653 _ACEOF
5654
5655 else
5656         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5657 $as_echo "no" >&6; }
5658 fi
5659
5660 use_stack_protector=1
5661 use_toolchain_hardening=1
5662
5663 # Check whether --with-stackprotect was given.
5664 if test "${with_stackprotect+set}" = set; then :
5665   withval=$with_stackprotect;
5666     if test "x$withval" = "xno"; then
5667         use_stack_protector=0
5668     fi
5669 fi
5670
5671
5672 # Check whether --with-hardening was given.
5673 if test "${with_hardening+set}" = set; then :
5674   withval=$with_hardening;
5675     if test "x$withval" = "xno"; then
5676         use_toolchain_hardening=0
5677     fi
5678 fi
5679
5680
5681 # We use -Werror for the tests only so that we catch warnings like "this is
5682 # on by default" for things like -fPIE.
5683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5
5684 $as_echo_n "checking if $CC supports -Werror... " >&6; }
5685 saved_CFLAGS="$CFLAGS"
5686 CFLAGS="$CFLAGS -Werror"
5687 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5688 /* end confdefs.h.  */
5689 int main(void) { return 0; }
5690 _ACEOF
5691 if ac_fn_c_try_compile "$LINENO"; then :
5692    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5693 $as_echo "yes" >&6; }
5694           WERROR="-Werror"
5695 else
5696    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5697 $as_echo "no" >&6; }
5698           WERROR=""
5699
5700 fi
5701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5702 CFLAGS="$saved_CFLAGS"
5703
5704 if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
5705         {
5706         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -pipe" >&5
5707 $as_echo_n "checking if $CC supports compile flag -pipe... " >&6; }
5708         saved_CFLAGS="$CFLAGS"
5709         CFLAGS="$CFLAGS $WERROR -pipe"
5710         _define_flag=""
5711         test "x$_define_flag" = "x" && _define_flag="-pipe"
5712         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5713 /* end confdefs.h.  */
5714
5715 #include <stdlib.h>
5716 #include <stdio.h>
5717 int main(int argc, char **argv) {
5718         /* Some math to catch -ftrapv problems in the toolchain */
5719         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5720         float l = i * 2.1;
5721         double m = l / 0.5;
5722         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5723         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5724         exit(0);
5725 }
5726
5727 _ACEOF
5728 if ac_fn_c_try_compile "$LINENO"; then :
5729
5730 if `grep -i "unrecognized option" conftest.err >/dev/null`
5731 then
5732                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5733 $as_echo "no" >&6; }
5734                 CFLAGS="$saved_CFLAGS"
5735 else
5736                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5737 $as_echo "yes" >&6; }
5738                  CFLAGS="$saved_CFLAGS $_define_flag"
5739 fi
5740 else
5741    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5742 $as_echo "no" >&6; }
5743                   CFLAGS="$saved_CFLAGS"
5744
5745 fi
5746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5747 }
5748         {
5749         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Qunused-arguments" >&5
5750 $as_echo_n "checking if $CC supports compile flag -Qunused-arguments... " >&6; }
5751         saved_CFLAGS="$CFLAGS"
5752         CFLAGS="$CFLAGS $WERROR -Qunused-arguments"
5753         _define_flag=""
5754         test "x$_define_flag" = "x" && _define_flag="-Qunused-arguments"
5755         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5756 /* end confdefs.h.  */
5757
5758 #include <stdlib.h>
5759 #include <stdio.h>
5760 int main(int argc, char **argv) {
5761         /* Some math to catch -ftrapv problems in the toolchain */
5762         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5763         float l = i * 2.1;
5764         double m = l / 0.5;
5765         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5766         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5767         exit(0);
5768 }
5769
5770 _ACEOF
5771 if ac_fn_c_try_compile "$LINENO"; then :
5772
5773 if `grep -i "unrecognized option" conftest.err >/dev/null`
5774 then
5775                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5776 $as_echo "no" >&6; }
5777                 CFLAGS="$saved_CFLAGS"
5778 else
5779                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5780 $as_echo "yes" >&6; }
5781                  CFLAGS="$saved_CFLAGS $_define_flag"
5782 fi
5783 else
5784    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5785 $as_echo "no" >&6; }
5786                   CFLAGS="$saved_CFLAGS"
5787
5788 fi
5789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5790 }
5791         {
5792         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wunknown-warning-option" >&5
5793 $as_echo_n "checking if $CC supports compile flag -Wunknown-warning-option... " >&6; }
5794         saved_CFLAGS="$CFLAGS"
5795         CFLAGS="$CFLAGS $WERROR -Wunknown-warning-option"
5796         _define_flag=""
5797         test "x$_define_flag" = "x" && _define_flag="-Wunknown-warning-option"
5798         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5799 /* end confdefs.h.  */
5800
5801 #include <stdlib.h>
5802 #include <stdio.h>
5803 int main(int argc, char **argv) {
5804         /* Some math to catch -ftrapv problems in the toolchain */
5805         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5806         float l = i * 2.1;
5807         double m = l / 0.5;
5808         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5809         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5810         exit(0);
5811 }
5812
5813 _ACEOF
5814 if ac_fn_c_try_compile "$LINENO"; then :
5815
5816 if `grep -i "unrecognized option" conftest.err >/dev/null`
5817 then
5818                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5819 $as_echo "no" >&6; }
5820                 CFLAGS="$saved_CFLAGS"
5821 else
5822                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5823 $as_echo "yes" >&6; }
5824                  CFLAGS="$saved_CFLAGS $_define_flag"
5825 fi
5826 else
5827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5828 $as_echo "no" >&6; }
5829                   CFLAGS="$saved_CFLAGS"
5830
5831 fi
5832 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5833 }
5834         {
5835         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wall" >&5
5836 $as_echo_n "checking if $CC supports compile flag -Wall... " >&6; }
5837         saved_CFLAGS="$CFLAGS"
5838         CFLAGS="$CFLAGS $WERROR -Wall"
5839         _define_flag=""
5840         test "x$_define_flag" = "x" && _define_flag="-Wall"
5841         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5842 /* end confdefs.h.  */
5843
5844 #include <stdlib.h>
5845 #include <stdio.h>
5846 int main(int argc, char **argv) {
5847         /* Some math to catch -ftrapv problems in the toolchain */
5848         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5849         float l = i * 2.1;
5850         double m = l / 0.5;
5851         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5852         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5853         exit(0);
5854 }
5855
5856 _ACEOF
5857 if ac_fn_c_try_compile "$LINENO"; then :
5858
5859 if `grep -i "unrecognized option" conftest.err >/dev/null`
5860 then
5861                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5862 $as_echo "no" >&6; }
5863                 CFLAGS="$saved_CFLAGS"
5864 else
5865                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5866 $as_echo "yes" >&6; }
5867                  CFLAGS="$saved_CFLAGS $_define_flag"
5868 fi
5869 else
5870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871 $as_echo "no" >&6; }
5872                   CFLAGS="$saved_CFLAGS"
5873
5874 fi
5875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5876 }
5877         {
5878         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wpointer-arith" >&5
5879 $as_echo_n "checking if $CC supports compile flag -Wpointer-arith... " >&6; }
5880         saved_CFLAGS="$CFLAGS"
5881         CFLAGS="$CFLAGS $WERROR -Wpointer-arith"
5882         _define_flag=""
5883         test "x$_define_flag" = "x" && _define_flag="-Wpointer-arith"
5884         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5885 /* end confdefs.h.  */
5886
5887 #include <stdlib.h>
5888 #include <stdio.h>
5889 int main(int argc, char **argv) {
5890         /* Some math to catch -ftrapv problems in the toolchain */
5891         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5892         float l = i * 2.1;
5893         double m = l / 0.5;
5894         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5895         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5896         exit(0);
5897 }
5898
5899 _ACEOF
5900 if ac_fn_c_try_compile "$LINENO"; then :
5901
5902 if `grep -i "unrecognized option" conftest.err >/dev/null`
5903 then
5904                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5905 $as_echo "no" >&6; }
5906                 CFLAGS="$saved_CFLAGS"
5907 else
5908                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5909 $as_echo "yes" >&6; }
5910                  CFLAGS="$saved_CFLAGS $_define_flag"
5911 fi
5912 else
5913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5914 $as_echo "no" >&6; }
5915                   CFLAGS="$saved_CFLAGS"
5916
5917 fi
5918 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5919 }
5920         {
5921         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wuninitialized" >&5
5922 $as_echo_n "checking if $CC supports compile flag -Wuninitialized... " >&6; }
5923         saved_CFLAGS="$CFLAGS"
5924         CFLAGS="$CFLAGS $WERROR -Wuninitialized"
5925         _define_flag=""
5926         test "x$_define_flag" = "x" && _define_flag="-Wuninitialized"
5927         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5928 /* end confdefs.h.  */
5929
5930 #include <stdlib.h>
5931 #include <stdio.h>
5932 int main(int argc, char **argv) {
5933         /* Some math to catch -ftrapv problems in the toolchain */
5934         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5935         float l = i * 2.1;
5936         double m = l / 0.5;
5937         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5938         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5939         exit(0);
5940 }
5941
5942 _ACEOF
5943 if ac_fn_c_try_compile "$LINENO"; then :
5944
5945 if `grep -i "unrecognized option" conftest.err >/dev/null`
5946 then
5947                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5948 $as_echo "no" >&6; }
5949                 CFLAGS="$saved_CFLAGS"
5950 else
5951                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5952 $as_echo "yes" >&6; }
5953                  CFLAGS="$saved_CFLAGS $_define_flag"
5954 fi
5955 else
5956    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5957 $as_echo "no" >&6; }
5958                   CFLAGS="$saved_CFLAGS"
5959
5960 fi
5961 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5962 }
5963         {
5964         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wsign-compare" >&5
5965 $as_echo_n "checking if $CC supports compile flag -Wsign-compare... " >&6; }
5966         saved_CFLAGS="$CFLAGS"
5967         CFLAGS="$CFLAGS $WERROR -Wsign-compare"
5968         _define_flag=""
5969         test "x$_define_flag" = "x" && _define_flag="-Wsign-compare"
5970         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5971 /* end confdefs.h.  */
5972
5973 #include <stdlib.h>
5974 #include <stdio.h>
5975 int main(int argc, char **argv) {
5976         /* Some math to catch -ftrapv problems in the toolchain */
5977         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5978         float l = i * 2.1;
5979         double m = l / 0.5;
5980         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5981         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5982         exit(0);
5983 }
5984
5985 _ACEOF
5986 if ac_fn_c_try_compile "$LINENO"; then :
5987
5988 if `grep -i "unrecognized option" conftest.err >/dev/null`
5989 then
5990                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5991 $as_echo "no" >&6; }
5992                 CFLAGS="$saved_CFLAGS"
5993 else
5994                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5995 $as_echo "yes" >&6; }
5996                  CFLAGS="$saved_CFLAGS $_define_flag"
5997 fi
5998 else
5999    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6000 $as_echo "no" >&6; }
6001                   CFLAGS="$saved_CFLAGS"
6002
6003 fi
6004 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6005 }
6006         {
6007         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wformat-security" >&5
6008 $as_echo_n "checking if $CC supports compile flag -Wformat-security... " >&6; }
6009         saved_CFLAGS="$CFLAGS"
6010         CFLAGS="$CFLAGS $WERROR -Wformat-security"
6011         _define_flag=""
6012         test "x$_define_flag" = "x" && _define_flag="-Wformat-security"
6013         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6014 /* end confdefs.h.  */
6015
6016 #include <stdlib.h>
6017 #include <stdio.h>
6018 int main(int argc, char **argv) {
6019         /* Some math to catch -ftrapv problems in the toolchain */
6020         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6021         float l = i * 2.1;
6022         double m = l / 0.5;
6023         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6024         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6025         exit(0);
6026 }
6027
6028 _ACEOF
6029 if ac_fn_c_try_compile "$LINENO"; then :
6030
6031 if `grep -i "unrecognized option" conftest.err >/dev/null`
6032 then
6033                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6034 $as_echo "no" >&6; }
6035                 CFLAGS="$saved_CFLAGS"
6036 else
6037                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6038 $as_echo "yes" >&6; }
6039                  CFLAGS="$saved_CFLAGS $_define_flag"
6040 fi
6041 else
6042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6043 $as_echo "no" >&6; }
6044                   CFLAGS="$saved_CFLAGS"
6045
6046 fi
6047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6048 }
6049         {
6050         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wsizeof-pointer-memaccess" >&5
6051 $as_echo_n "checking if $CC supports compile flag -Wsizeof-pointer-memaccess... " >&6; }
6052         saved_CFLAGS="$CFLAGS"
6053         CFLAGS="$CFLAGS $WERROR -Wsizeof-pointer-memaccess"
6054         _define_flag=""
6055         test "x$_define_flag" = "x" && _define_flag="-Wsizeof-pointer-memaccess"
6056         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6057 /* end confdefs.h.  */
6058
6059 #include <stdlib.h>
6060 #include <stdio.h>
6061 int main(int argc, char **argv) {
6062         /* Some math to catch -ftrapv problems in the toolchain */
6063         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6064         float l = i * 2.1;
6065         double m = l / 0.5;
6066         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6067         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6068         exit(0);
6069 }
6070
6071 _ACEOF
6072 if ac_fn_c_try_compile "$LINENO"; then :
6073
6074 if `grep -i "unrecognized option" conftest.err >/dev/null`
6075 then
6076                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6077 $as_echo "no" >&6; }
6078                 CFLAGS="$saved_CFLAGS"
6079 else
6080                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6081 $as_echo "yes" >&6; }
6082                  CFLAGS="$saved_CFLAGS $_define_flag"
6083 fi
6084 else
6085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6086 $as_echo "no" >&6; }
6087                   CFLAGS="$saved_CFLAGS"
6088
6089 fi
6090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6091 }
6092         {
6093         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wpointer-sign" >&5
6094 $as_echo_n "checking if $CC supports compile flag -Wpointer-sign... " >&6; }
6095         saved_CFLAGS="$CFLAGS"
6096         CFLAGS="$CFLAGS $WERROR -Wpointer-sign"
6097         _define_flag="-Wno-pointer-sign"
6098         test "x$_define_flag" = "x" && _define_flag="-Wpointer-sign"
6099         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6100 /* end confdefs.h.  */
6101
6102 #include <stdlib.h>
6103 #include <stdio.h>
6104 int main(int argc, char **argv) {
6105         /* Some math to catch -ftrapv problems in the toolchain */
6106         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6107         float l = i * 2.1;
6108         double m = l / 0.5;
6109         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6110         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6111         exit(0);
6112 }
6113
6114 _ACEOF
6115 if ac_fn_c_try_compile "$LINENO"; then :
6116
6117 if `grep -i "unrecognized option" conftest.err >/dev/null`
6118 then
6119                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6120 $as_echo "no" >&6; }
6121                 CFLAGS="$saved_CFLAGS"
6122 else
6123                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6124 $as_echo "yes" >&6; }
6125                  CFLAGS="$saved_CFLAGS $_define_flag"
6126 fi
6127 else
6128    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6129 $as_echo "no" >&6; }
6130                   CFLAGS="$saved_CFLAGS"
6131
6132 fi
6133 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6134 }
6135         {
6136         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wunused-result" >&5
6137 $as_echo_n "checking if $CC supports compile flag -Wunused-result... " >&6; }
6138         saved_CFLAGS="$CFLAGS"
6139         CFLAGS="$CFLAGS $WERROR -Wunused-result"
6140         _define_flag="-Wno-unused-result"
6141         test "x$_define_flag" = "x" && _define_flag="-Wunused-result"
6142         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6143 /* end confdefs.h.  */
6144
6145 #include <stdlib.h>
6146 #include <stdio.h>
6147 int main(int argc, char **argv) {
6148         /* Some math to catch -ftrapv problems in the toolchain */
6149         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6150         float l = i * 2.1;
6151         double m = l / 0.5;
6152         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6153         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6154         exit(0);
6155 }
6156
6157 _ACEOF
6158 if ac_fn_c_try_compile "$LINENO"; then :
6159
6160 if `grep -i "unrecognized option" conftest.err >/dev/null`
6161 then
6162                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6163 $as_echo "no" >&6; }
6164                 CFLAGS="$saved_CFLAGS"
6165 else
6166                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6167 $as_echo "yes" >&6; }
6168                  CFLAGS="$saved_CFLAGS $_define_flag"
6169 fi
6170 else
6171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6172 $as_echo "no" >&6; }
6173                   CFLAGS="$saved_CFLAGS"
6174
6175 fi
6176 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6177 }
6178         {
6179         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -fno-strict-aliasing" >&5
6180 $as_echo_n "checking if $CC supports compile flag -fno-strict-aliasing... " >&6; }
6181         saved_CFLAGS="$CFLAGS"
6182         CFLAGS="$CFLAGS $WERROR -fno-strict-aliasing"
6183         _define_flag=""
6184         test "x$_define_flag" = "x" && _define_flag="-fno-strict-aliasing"
6185         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6186 /* end confdefs.h.  */
6187
6188 #include <stdlib.h>
6189 #include <stdio.h>
6190 int main(int argc, char **argv) {
6191         /* Some math to catch -ftrapv problems in the toolchain */
6192         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6193         float l = i * 2.1;
6194         double m = l / 0.5;
6195         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6196         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6197         exit(0);
6198 }
6199
6200 _ACEOF
6201 if ac_fn_c_try_compile "$LINENO"; then :
6202
6203 if `grep -i "unrecognized option" conftest.err >/dev/null`
6204 then
6205                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6206 $as_echo "no" >&6; }
6207                 CFLAGS="$saved_CFLAGS"
6208 else
6209                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6210 $as_echo "yes" >&6; }
6211                  CFLAGS="$saved_CFLAGS $_define_flag"
6212 fi
6213 else
6214    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6215 $as_echo "no" >&6; }
6216                   CFLAGS="$saved_CFLAGS"
6217
6218 fi
6219 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6220 }
6221     if test "x$use_toolchain_hardening" = "x1"; then
6222         {
6223         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -mfunction-return=thunk" >&5
6224 $as_echo_n "checking if $CC supports compile flag -mfunction-return=thunk... " >&6; }
6225         saved_CFLAGS="$CFLAGS"
6226         CFLAGS="$CFLAGS $WERROR -mfunction-return=thunk"
6227         _define_flag=""
6228         test "x$_define_flag" = "x" && _define_flag="-mfunction-return=thunk"
6229         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6230 /* end confdefs.h.  */
6231
6232 #include <stdlib.h>
6233 #include <stdio.h>
6234 int main(int argc, char **argv) {
6235         /* Some math to catch -ftrapv problems in the toolchain */
6236         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6237         float l = i * 2.1;
6238         double m = l / 0.5;
6239         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6240         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6241         exit(0);
6242 }
6243
6244 _ACEOF
6245 if ac_fn_c_try_compile "$LINENO"; then :
6246
6247 if `grep -i "unrecognized option" conftest.err >/dev/null`
6248 then
6249                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6250 $as_echo "no" >&6; }
6251                 CFLAGS="$saved_CFLAGS"
6252 else
6253                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6254 $as_echo "yes" >&6; }
6255                  CFLAGS="$saved_CFLAGS $_define_flag"
6256 fi
6257 else
6258    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6259 $as_echo "no" >&6; }
6260                   CFLAGS="$saved_CFLAGS"
6261
6262 fi
6263 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6264 } # gcc
6265         {
6266         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -mindirect-branch=thunk" >&5
6267 $as_echo_n "checking if $CC supports compile flag -mindirect-branch=thunk... " >&6; }
6268         saved_CFLAGS="$CFLAGS"
6269         CFLAGS="$CFLAGS $WERROR -mindirect-branch=thunk"
6270         _define_flag=""
6271         test "x$_define_flag" = "x" && _define_flag="-mindirect-branch=thunk"
6272         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6273 /* end confdefs.h.  */
6274
6275 #include <stdlib.h>
6276 #include <stdio.h>
6277 int main(int argc, char **argv) {
6278         /* Some math to catch -ftrapv problems in the toolchain */
6279         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6280         float l = i * 2.1;
6281         double m = l / 0.5;
6282         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6283         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6284         exit(0);
6285 }
6286
6287 _ACEOF
6288 if ac_fn_c_try_compile "$LINENO"; then :
6289
6290 if `grep -i "unrecognized option" conftest.err >/dev/null`
6291 then
6292                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6293 $as_echo "no" >&6; }
6294                 CFLAGS="$saved_CFLAGS"
6295 else
6296                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6297 $as_echo "yes" >&6; }
6298                  CFLAGS="$saved_CFLAGS $_define_flag"
6299 fi
6300 else
6301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6302 $as_echo "no" >&6; }
6303                   CFLAGS="$saved_CFLAGS"
6304
6305 fi
6306 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6307 } # gcc
6308         {
6309         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -mretpoline" >&5
6310 $as_echo_n "checking if $CC supports compile flag -mretpoline... " >&6; }
6311         saved_CFLAGS="$CFLAGS"
6312         CFLAGS="$CFLAGS $WERROR -mretpoline"
6313         _define_flag=""
6314         test "x$_define_flag" = "x" && _define_flag="-mretpoline"
6315         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6316 /* end confdefs.h.  */
6317
6318 #include <stdlib.h>
6319 #include <stdio.h>
6320 int main(int argc, char **argv) {
6321         /* Some math to catch -ftrapv problems in the toolchain */
6322         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6323         float l = i * 2.1;
6324         double m = l / 0.5;
6325         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6326         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6327         exit(0);
6328 }
6329
6330 _ACEOF
6331 if ac_fn_c_try_compile "$LINENO"; then :
6332
6333 if `grep -i "unrecognized option" conftest.err >/dev/null`
6334 then
6335                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6336 $as_echo "no" >&6; }
6337                 CFLAGS="$saved_CFLAGS"
6338 else
6339                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6340 $as_echo "yes" >&6; }
6341                  CFLAGS="$saved_CFLAGS $_define_flag"
6342 fi
6343 else
6344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6345 $as_echo "no" >&6; }
6346                   CFLAGS="$saved_CFLAGS"
6347
6348 fi
6349 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6350 } # clang
6351         {
6352         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,retpolineplt" >&5
6353 $as_echo_n "checking if $LD supports link flag -Wl,-z,retpolineplt... " >&6; }
6354         saved_LDFLAGS="$LDFLAGS"
6355         LDFLAGS="$LDFLAGS $WERROR -Wl,-z,retpolineplt"
6356         _define_flag=""
6357         test "x$_define_flag" = "x" && _define_flag="-Wl,-z,retpolineplt"
6358         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6359 /* end confdefs.h.  */
6360
6361 #include <stdlib.h>
6362 #include <stdio.h>
6363 int main(int argc, char **argv) {
6364         /* Some math to catch -ftrapv problems in the toolchain */
6365         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6366         float l = i * 2.1;
6367         double m = l / 0.5;
6368         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6369         long long p = n * o;
6370         printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
6371         exit(0);
6372 }
6373
6374 _ACEOF
6375 if ac_fn_c_try_link "$LINENO"; then :
6376    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6377 $as_echo "yes" >&6; }
6378                   LDFLAGS="$saved_LDFLAGS $_define_flag"
6379 else
6380    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6381 $as_echo "no" >&6; }
6382                   LDFLAGS="$saved_LDFLAGS"
6383
6384 fi
6385 rm -f core conftest.err conftest.$ac_objext \
6386     conftest$ac_exeext conftest.$ac_ext
6387 }
6388         {
6389         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -D_FORTIFY_SOURCE=2" >&5
6390 $as_echo_n "checking if $CC supports compile flag -D_FORTIFY_SOURCE=2... " >&6; }
6391         saved_CFLAGS="$CFLAGS"
6392         CFLAGS="$CFLAGS $WERROR -D_FORTIFY_SOURCE=2"
6393         _define_flag=""
6394         test "x$_define_flag" = "x" && _define_flag="-D_FORTIFY_SOURCE=2"
6395         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6396 /* end confdefs.h.  */
6397
6398 #include <stdlib.h>
6399 #include <stdio.h>
6400 int main(int argc, char **argv) {
6401         /* Some math to catch -ftrapv problems in the toolchain */
6402         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6403         float l = i * 2.1;
6404         double m = l / 0.5;
6405         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6406         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6407         exit(0);
6408 }
6409
6410 _ACEOF
6411 if ac_fn_c_try_compile "$LINENO"; then :
6412
6413 if `grep -i "unrecognized option" conftest.err >/dev/null`
6414 then
6415                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6416 $as_echo "no" >&6; }
6417                 CFLAGS="$saved_CFLAGS"
6418 else
6419                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6420 $as_echo "yes" >&6; }
6421                  CFLAGS="$saved_CFLAGS $_define_flag"
6422 fi
6423 else
6424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6425 $as_echo "no" >&6; }
6426                   CFLAGS="$saved_CFLAGS"
6427
6428 fi
6429 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6430 }
6431         {
6432         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,relro" >&5
6433 $as_echo_n "checking if $LD supports link flag -Wl,-z,relro... " >&6; }
6434         saved_LDFLAGS="$LDFLAGS"
6435         LDFLAGS="$LDFLAGS $WERROR -Wl,-z,relro"
6436         _define_flag=""
6437         test "x$_define_flag" = "x" && _define_flag="-Wl,-z,relro"
6438         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6439 /* end confdefs.h.  */
6440
6441 #include <stdlib.h>
6442 #include <stdio.h>
6443 int main(int argc, char **argv) {
6444         /* Some math to catch -ftrapv problems in the toolchain */
6445         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6446         float l = i * 2.1;
6447         double m = l / 0.5;
6448         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6449         long long p = n * o;
6450         printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
6451         exit(0);
6452 }
6453
6454 _ACEOF
6455 if ac_fn_c_try_link "$LINENO"; then :
6456    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6457 $as_echo "yes" >&6; }
6458                   LDFLAGS="$saved_LDFLAGS $_define_flag"
6459 else
6460    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6461 $as_echo "no" >&6; }
6462                   LDFLAGS="$saved_LDFLAGS"
6463
6464 fi
6465 rm -f core conftest.err conftest.$ac_objext \
6466     conftest$ac_exeext conftest.$ac_ext
6467 }
6468         {
6469         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,now" >&5
6470 $as_echo_n "checking if $LD supports link flag -Wl,-z,now... " >&6; }
6471         saved_LDFLAGS="$LDFLAGS"
6472         LDFLAGS="$LDFLAGS $WERROR -Wl,-z,now"
6473         _define_flag=""
6474         test "x$_define_flag" = "x" && _define_flag="-Wl,-z,now"
6475         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6476 /* end confdefs.h.  */
6477
6478 #include <stdlib.h>
6479 #include <stdio.h>
6480 int main(int argc, char **argv) {
6481         /* Some math to catch -ftrapv problems in the toolchain */
6482         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6483         float l = i * 2.1;
6484         double m = l / 0.5;
6485         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6486         long long p = n * o;
6487         printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
6488         exit(0);
6489 }
6490
6491 _ACEOF
6492 if ac_fn_c_try_link "$LINENO"; then :
6493    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6494 $as_echo "yes" >&6; }
6495                   LDFLAGS="$saved_LDFLAGS $_define_flag"
6496 else
6497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6498 $as_echo "no" >&6; }
6499                   LDFLAGS="$saved_LDFLAGS"
6500
6501 fi
6502 rm -f core conftest.err conftest.$ac_objext \
6503     conftest$ac_exeext conftest.$ac_ext
6504 }
6505         {
6506         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,noexecstack" >&5
6507 $as_echo_n "checking if $LD supports link flag -Wl,-z,noexecstack... " >&6; }
6508         saved_LDFLAGS="$LDFLAGS"
6509         LDFLAGS="$LDFLAGS $WERROR -Wl,-z,noexecstack"
6510         _define_flag=""
6511         test "x$_define_flag" = "x" && _define_flag="-Wl,-z,noexecstack"
6512         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6513 /* end confdefs.h.  */
6514
6515 #include <stdlib.h>
6516 #include <stdio.h>
6517 int main(int argc, char **argv) {
6518         /* Some math to catch -ftrapv problems in the toolchain */
6519         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6520         float l = i * 2.1;
6521         double m = l / 0.5;
6522         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6523         long long p = n * o;
6524         printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
6525         exit(0);
6526 }
6527
6528 _ACEOF
6529 if ac_fn_c_try_link "$LINENO"; then :
6530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6531 $as_echo "yes" >&6; }
6532                   LDFLAGS="$saved_LDFLAGS $_define_flag"
6533 else
6534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6535 $as_echo "no" >&6; }
6536                   LDFLAGS="$saved_LDFLAGS"
6537
6538 fi
6539 rm -f core conftest.err conftest.$ac_objext \
6540     conftest$ac_exeext conftest.$ac_ext
6541 }
6542         # NB. -ftrapv expects certain support functions to be present in
6543         # the compiler library (libgcc or similar) to detect integer operations
6544         # that can overflow. We must check that the result of enabling it
6545         # actually links. The test program compiled/linked includes a number
6546         # of integer operations that should exercise this.
6547         {
6548         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -ftrapv and linking succeeds" >&5
6549 $as_echo_n "checking if $CC supports compile flag -ftrapv and linking succeeds... " >&6; }
6550         saved_CFLAGS="$CFLAGS"
6551         CFLAGS="$CFLAGS $WERROR -ftrapv"
6552         _define_flag=""
6553         test "x$_define_flag" = "x" && _define_flag="-ftrapv"
6554         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6555 /* end confdefs.h.  */
6556
6557 #include <stdlib.h>
6558 #include <stdio.h>
6559 int main(int argc, char **argv) {
6560         /* Some math to catch -ftrapv problems in the toolchain */
6561         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6562         float l = i * 2.1;
6563         double m = l / 0.5;
6564         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6565         long long int p = n * o;
6566         printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
6567         exit(0);
6568 }
6569
6570 _ACEOF
6571 if ac_fn_c_try_link "$LINENO"; then :
6572
6573 if `grep -i "unrecognized option" conftest.err >/dev/null`
6574 then
6575                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6576 $as_echo "no" >&6; }
6577                 CFLAGS="$saved_CFLAGS"
6578 else
6579                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6580 $as_echo "yes" >&6; }
6581                  CFLAGS="$saved_CFLAGS $_define_flag"
6582 fi
6583 else
6584    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6585 $as_echo "no" >&6; }
6586                   CFLAGS="$saved_CFLAGS"
6587
6588 fi
6589 rm -f core conftest.err conftest.$ac_objext \
6590     conftest$ac_exeext conftest.$ac_ext
6591 }
6592     fi
6593         { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc version" >&5
6594 $as_echo_n "checking gcc version... " >&6; }
6595         GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`
6596         case $GCC_VER in
6597                 1.*) no_attrib_nonnull=1 ;;
6598                 2.8* | 2.9*)
6599                      no_attrib_nonnull=1
6600                      ;;
6601                 2.*) no_attrib_nonnull=1 ;;
6602                 *) ;;
6603         esac
6604         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC_VER" >&5
6605 $as_echo "$GCC_VER" >&6; }
6606
6607         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-builtin-memset" >&5
6608 $as_echo_n "checking if $CC accepts -fno-builtin-memset... " >&6; }
6609         saved_CFLAGS="$CFLAGS"
6610         CFLAGS="$CFLAGS -fno-builtin-memset"
6611         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6612 /* end confdefs.h.  */
6613  #include <string.h>
6614 int
6615 main ()
6616 {
6617  char b[10]; memset(b, 0, sizeof(b));
6618   ;
6619   return 0;
6620 }
6621 _ACEOF
6622 if ac_fn_c_try_link "$LINENO"; then :
6623    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6624 $as_echo "yes" >&6; }
6625 else
6626    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6627 $as_echo "no" >&6; }
6628                   CFLAGS="$saved_CFLAGS"
6629
6630 fi
6631 rm -f core conftest.err conftest.$ac_objext \
6632     conftest$ac_exeext conftest.$ac_ext
6633
6634         # -fstack-protector-all doesn't always work for some GCC versions
6635         # and/or platforms, so we test if we can.  If it's not supported
6636         # on a given platform gcc will emit a warning so we use -Werror.
6637         if test "x$use_stack_protector" = "x1"; then
6638             for t in -fstack-protector-strong -fstack-protector-all \
6639                     -fstack-protector; do
6640                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports $t" >&5
6641 $as_echo_n "checking if $CC supports $t... " >&6; }
6642                 saved_CFLAGS="$CFLAGS"
6643                 saved_LDFLAGS="$LDFLAGS"
6644                 CFLAGS="$CFLAGS $t -Werror"
6645                 LDFLAGS="$LDFLAGS $t -Werror"
6646                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6647 /* end confdefs.h.  */
6648  #include <stdio.h>
6649 int
6650 main ()
6651 {
6652
6653         char x[256];
6654         snprintf(x, sizeof(x), "XXX");
6655
6656   ;
6657   return 0;
6658 }
6659 _ACEOF
6660 if ac_fn_c_try_link "$LINENO"; then :
6661    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6662 $as_echo "yes" >&6; }
6663                       CFLAGS="$saved_CFLAGS $t"
6664                       LDFLAGS="$saved_LDFLAGS $t"
6665                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $t works" >&5
6666 $as_echo_n "checking if $t works... " >&6; }
6667                       if test "$cross_compiling" = yes; then :
6668    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: cannot test" >&5
6669 $as_echo "$as_me: WARNING: cross compiling: cannot test" >&2;}
6670                           break
6671
6672 else
6673   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6674 /* end confdefs.h.  */
6675  #include <stdio.h>
6676 int
6677 main ()
6678 {
6679
6680         char x[256];
6681         snprintf(x, sizeof(x), "XXX");
6682
6683   ;
6684   return 0;
6685 }
6686 _ACEOF
6687 if ac_fn_c_try_run "$LINENO"; then :
6688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6689 $as_echo "yes" >&6; }
6690                           break
6691 else
6692    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6693 $as_echo "no" >&6; }
6694 fi
6695 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6696   conftest.$ac_objext conftest.beam conftest.$ac_ext
6697 fi
6698
6699
6700 else
6701    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6702 $as_echo "no" >&6; }
6703
6704 fi
6705 rm -f core conftest.err conftest.$ac_objext \
6706     conftest$ac_exeext conftest.$ac_ext
6707                 CFLAGS="$saved_CFLAGS"
6708                 LDFLAGS="$saved_LDFLAGS"
6709             done
6710         fi
6711
6712         if test -z "$have_llong_max"; then
6713                 # retry LLONG_MAX with -std=gnu99, needed on some Linuxes
6714                 unset ac_cv_have_decl_LLONG_MAX
6715                 saved_CFLAGS="$CFLAGS"
6716                 CFLAGS="$CFLAGS -std=gnu99"
6717                 ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
6718
6719 "
6720 if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
6721   have_llong_max=1
6722 else
6723   CFLAGS="$saved_CFLAGS"
6724 fi
6725
6726         fi
6727 fi
6728
6729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows __attribute__ on return types" >&5
6730 $as_echo_n "checking if compiler allows __attribute__ on return types... " >&6; }
6731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6732 /* end confdefs.h.  */
6733
6734 #include <stdlib.h>
6735 __attribute__((__unused__)) static void foo(void){return;}
6736 int
6737 main ()
6738 {
6739  exit(0);
6740   ;
6741   return 0;
6742 }
6743 _ACEOF
6744 if ac_fn_c_try_compile "$LINENO"; then :
6745    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6746 $as_echo "yes" >&6; }
6747 else
6748    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6749 $as_echo "no" >&6; }
6750
6751 $as_echo "#define NO_ATTRIBUTE_ON_RETURN_TYPE 1" >>confdefs.h
6752
6753
6754 fi
6755 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6756
6757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows __attribute__ prototype args" >&5
6758 $as_echo_n "checking if compiler allows __attribute__ prototype args... " >&6; }
6759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6760 /* end confdefs.h.  */
6761
6762 #include <stdlib.h>
6763 typedef void foo(const char *, ...) __attribute__((format(printf, 1, 2)));
6764 int
6765 main ()
6766 {
6767  exit(0);
6768   ;
6769   return 0;
6770 }
6771 _ACEOF
6772 if ac_fn_c_try_compile "$LINENO"; then :
6773    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6774 $as_echo "yes" >&6; }
6775 else
6776    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6777 $as_echo "no" >&6; }
6778
6779 $as_echo "#define NO_ATTRIBUTE_ON_PROTOTYPE_ARGS 1" >>confdefs.h
6780
6781
6782 fi
6783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6784
6785 if test "x$no_attrib_nonnull" != "x1" ; then
6786
6787 $as_echo "#define HAVE_ATTRIBUTE__NONNULL__ 1" >>confdefs.h
6788
6789 fi
6790
6791
6792 # Check whether --with-rpath was given.
6793 if test "${with_rpath+set}" = set; then :
6794   withval=$with_rpath;
6795                 if test "x$withval" = "xno" ; then
6796                         need_dash_r=""
6797                 fi
6798                 if test "x$withval" = "xyes" ; then
6799                         need_dash_r=1
6800                 fi
6801
6802
6803 fi
6804
6805
6806 # Allow user to specify flags
6807
6808 # Check whether --with-cflags was given.
6809 if test "${with_cflags+set}" = set; then :
6810   withval=$with_cflags;
6811                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
6812                     test "x${withval}" != "xyes"; then
6813                         CFLAGS="$CFLAGS $withval"
6814                 fi
6815
6816
6817 fi
6818
6819
6820
6821 # Check whether --with-cflags-after was given.
6822 if test "${with_cflags_after+set}" = set; then :
6823   withval=$with_cflags_after;
6824                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
6825                     test "x${withval}" != "xyes"; then
6826                         CFLAGS_AFTER="$withval"
6827                 fi
6828
6829
6830 fi
6831
6832
6833 # Check whether --with-cppflags was given.
6834 if test "${with_cppflags+set}" = set; then :
6835   withval=$with_cppflags;
6836                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
6837                     test "x${withval}" != "xyes"; then
6838                         CPPFLAGS="$CPPFLAGS $withval"
6839                 fi
6840
6841
6842 fi
6843
6844
6845 # Check whether --with-ldflags was given.
6846 if test "${with_ldflags+set}" = set; then :
6847   withval=$with_ldflags;
6848                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
6849                     test "x${withval}" != "xyes"; then
6850                         LDFLAGS="$LDFLAGS $withval"
6851                 fi
6852
6853
6854 fi
6855
6856
6857 # Check whether --with-ldflags-after was given.
6858 if test "${with_ldflags_after+set}" = set; then :
6859   withval=$with_ldflags_after;
6860                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
6861                     test "x${withval}" != "xyes"; then
6862                         LDFLAGS_AFTER="$withval"
6863                 fi
6864
6865
6866 fi
6867
6868
6869 # Check whether --with-libs was given.
6870 if test "${with_libs+set}" = set; then :
6871   withval=$with_libs;
6872                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
6873                     test "x${withval}" != "xyes"; then
6874                         LIBS="$LIBS $withval"
6875                 fi
6876
6877
6878 fi
6879
6880
6881 # Check whether --with-Werror was given.
6882 if test "${with_Werror+set}" = set; then :
6883   withval=$with_Werror;
6884                 if test -n "$withval"  &&  test "x$withval" != "xno"; then
6885                         werror_flags="-Werror"
6886                         if test "x${withval}" != "xyes"; then
6887                                 werror_flags="$withval"
6888                         fi
6889                 fi
6890
6891
6892 fi
6893
6894
6895 for ac_header in  \
6896         blf.h \
6897         bstring.h \
6898         crypt.h \
6899         crypto/sha2.h \
6900         dirent.h \
6901         endian.h \
6902         elf.h \
6903         err.h \
6904         features.h \
6905         fcntl.h \
6906         floatingpoint.h \
6907         getopt.h \
6908         glob.h \
6909         ia.h \
6910         iaf.h \
6911         ifaddrs.h \
6912         inttypes.h \
6913         langinfo.h \
6914         limits.h \
6915         locale.h \
6916         login.h \
6917         maillock.h \
6918         ndir.h \
6919         net/if_tun.h \
6920         netdb.h \
6921         netgroup.h \
6922         pam/pam_appl.h \
6923         paths.h \
6924         poll.h \
6925         pty.h \
6926         readpassphrase.h \
6927         rpc/types.h \
6928         security/pam_appl.h \
6929         sha2.h \
6930         shadow.h \
6931         stddef.h \
6932         stdint.h \
6933         string.h \
6934         strings.h \
6935         sys/bitypes.h \
6936         sys/bsdtty.h \
6937         sys/cdefs.h \
6938         sys/dir.h \
6939         sys/file.h \
6940         sys/mman.h \
6941         sys/label.h \
6942         sys/ndir.h \
6943         sys/poll.h \
6944         sys/prctl.h \
6945         sys/pstat.h \
6946         sys/ptrace.h \
6947         sys/select.h \
6948         sys/stat.h \
6949         sys/stream.h \
6950         sys/stropts.h \
6951         sys/strtio.h \
6952         sys/statvfs.h \
6953         sys/sysmacros.h \
6954         sys/time.h \
6955         sys/timers.h \
6956         sys/vfs.h \
6957         time.h \
6958         tmpdir.h \
6959         ttyent.h \
6960         ucred.h \
6961         unistd.h \
6962         usersec.h \
6963         util.h \
6964         utime.h \
6965         utmp.h \
6966         utmpx.h \
6967         vis.h \
6968         wchar.h \
6969
6970 do :
6971   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6972 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6973 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6974   cat >>confdefs.h <<_ACEOF
6975 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6976 _ACEOF
6977
6978 fi
6979
6980 done
6981
6982
6983 # On some platforms (eg SunOS4) sys/audit.h requires sys/[time|types|label.h]
6984 # to be included first.
6985 for ac_header in sys/audit.h
6986 do :
6987   ac_fn_c_check_header_compile "$LINENO" "sys/audit.h" "ac_cv_header_sys_audit_h" "
6988 #ifdef HAVE_SYS_TIME_H
6989 # include <sys/time.h>
6990 #endif
6991 #ifdef HAVE_SYS_TYPES_H
6992 # include <sys/types.h>
6993 #endif
6994 #ifdef HAVE_SYS_LABEL_H
6995 # include <sys/label.h>
6996 #endif
6997
6998 "
6999 if test "x$ac_cv_header_sys_audit_h" = xyes; then :
7000   cat >>confdefs.h <<_ACEOF
7001 #define HAVE_SYS_AUDIT_H 1
7002 _ACEOF
7003
7004 fi
7005
7006 done
7007
7008
7009 # sys/capsicum.h requires sys/types.h
7010 for ac_header in sys/capsicum.h
7011 do :
7012   ac_fn_c_check_header_compile "$LINENO" "sys/capsicum.h" "ac_cv_header_sys_capsicum_h" "
7013 #ifdef HAVE_SYS_TYPES_H
7014 # include <sys/types.h>
7015 #endif
7016
7017 "
7018 if test "x$ac_cv_header_sys_capsicum_h" = xyes; then :
7019   cat >>confdefs.h <<_ACEOF
7020 #define HAVE_SYS_CAPSICUM_H 1
7021 _ACEOF
7022
7023 fi
7024
7025 done
7026
7027
7028 # net/route.h requires sys/socket.h and sys/types.h.
7029 # sys/sysctl.h also requires sys/param.h
7030 for ac_header in net/route.h sys/sysctl.h
7031 do :
7032   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7033 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
7034 #ifdef HAVE_SYS_TYPES_H
7035 # include <sys/types.h>
7036 #endif
7037 #include <sys/param.h>
7038 #include <sys/socket.h>
7039
7040 "
7041 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7042   cat >>confdefs.h <<_ACEOF
7043 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7044 _ACEOF
7045
7046 fi
7047
7048 done
7049
7050
7051 # lastlog.h requires sys/time.h to be included first on Solaris
7052 for ac_header in lastlog.h
7053 do :
7054   ac_fn_c_check_header_compile "$LINENO" "lastlog.h" "ac_cv_header_lastlog_h" "
7055 #ifdef HAVE_SYS_TIME_H
7056 # include <sys/time.h>
7057 #endif
7058
7059 "
7060 if test "x$ac_cv_header_lastlog_h" = xyes; then :
7061   cat >>confdefs.h <<_ACEOF
7062 #define HAVE_LASTLOG_H 1
7063 _ACEOF
7064
7065 fi
7066
7067 done
7068
7069
7070 # sys/ptms.h requires sys/stream.h to be included first on Solaris
7071 for ac_header in sys/ptms.h
7072 do :
7073   ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "
7074 #ifdef HAVE_SYS_STREAM_H
7075 # include <sys/stream.h>
7076 #endif
7077
7078 "
7079 if test "x$ac_cv_header_sys_ptms_h" = xyes; then :
7080   cat >>confdefs.h <<_ACEOF
7081 #define HAVE_SYS_PTMS_H 1
7082 _ACEOF
7083
7084 fi
7085
7086 done
7087
7088
7089 # login_cap.h requires sys/types.h on NetBSD
7090 for ac_header in login_cap.h
7091 do :
7092   ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "
7093 #include <sys/types.h>
7094
7095 "
7096 if test "x$ac_cv_header_login_cap_h" = xyes; then :
7097   cat >>confdefs.h <<_ACEOF
7098 #define HAVE_LOGIN_CAP_H 1
7099 _ACEOF
7100
7101 fi
7102
7103 done
7104
7105
7106 # older BSDs need sys/param.h before sys/mount.h
7107 for ac_header in sys/mount.h
7108 do :
7109   ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "
7110 #include <sys/param.h>
7111
7112 "
7113 if test "x$ac_cv_header_sys_mount_h" = xyes; then :
7114   cat >>confdefs.h <<_ACEOF
7115 #define HAVE_SYS_MOUNT_H 1
7116 _ACEOF
7117
7118 fi
7119
7120 done
7121
7122
7123 # Android requires sys/socket.h to be included before sys/un.h
7124 for ac_header in sys/un.h
7125 do :
7126   ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "
7127 #include <sys/types.h>
7128 #include <sys/socket.h>
7129
7130 "
7131 if test "x$ac_cv_header_sys_un_h" = xyes; then :
7132   cat >>confdefs.h <<_ACEOF
7133 #define HAVE_SYS_UN_H 1
7134 _ACEOF
7135
7136 fi
7137
7138 done
7139
7140
7141 # Messages for features tested for in target-specific section
7142 SIA_MSG="no"
7143 SPC_MSG="no"
7144 SP_MSG="no"
7145 SPP_MSG="no"
7146
7147 # Support for Solaris/Illumos privileges (this test is used by both
7148 # the --with-solaris-privs option and --with-sandbox=solaris).
7149 SOLARIS_PRIVS="no"
7150
7151 # Check for some target-specific stuff
7152 case "$host" in
7153 *-*-aix*)
7154         # Some versions of VAC won't allow macro redefinitions at
7155         # -qlanglevel=ansi, and autoconf 2.60 sometimes insists on using that
7156         # particularly with older versions of vac or xlc.
7157         # It also throws errors about null macro argments, but these are
7158         # not fatal.
7159         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows macro redefinitions" >&5
7160 $as_echo_n "checking if compiler allows macro redefinitions... " >&6; }
7161         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7162 /* end confdefs.h.  */
7163
7164 #define testmacro foo
7165 #define testmacro bar
7166 int
7167 main ()
7168 {
7169  exit(0);
7170   ;
7171   return 0;
7172 }
7173 _ACEOF
7174 if ac_fn_c_try_compile "$LINENO"; then :
7175    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7176 $as_echo "yes" >&6; }
7177 else
7178    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7179 $as_echo "no" >&6; }
7180               CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
7181               LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`"
7182               CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
7183               CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`"
7184
7185
7186 fi
7187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7188
7189         { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to specify blibpath for linker ($LD)" >&5
7190 $as_echo_n "checking how to specify blibpath for linker ($LD)... " >&6; }
7191         if (test -z "$blibpath"); then
7192                 blibpath="/usr/lib:/lib"
7193         fi
7194         saved_LDFLAGS="$LDFLAGS"
7195         if test "$GCC" = "yes"; then
7196                 flags="-Wl,-blibpath: -Wl,-rpath, -blibpath:"
7197         else
7198                 flags="-blibpath: -Wl,-blibpath: -Wl,-rpath,"
7199         fi
7200         for tryflags in $flags ;do
7201                 if (test -z "$blibflags"); then
7202                         LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
7203                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7204 /* end confdefs.h.  */
7205
7206 int
7207 main ()
7208 {
7209
7210   ;
7211   return 0;
7212 }
7213 _ACEOF
7214 if ac_fn_c_try_link "$LINENO"; then :
7215   blibflags=$tryflags
7216 fi
7217 rm -f core conftest.err conftest.$ac_objext \
7218     conftest$ac_exeext conftest.$ac_ext
7219                 fi
7220         done
7221         if (test -z "$blibflags"); then
7222                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7223 $as_echo "not found" >&6; }
7224                 as_fn_error $? "*** must be able to specify blibpath on AIX - check config.log" "$LINENO" 5
7225         else
7226                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $blibflags" >&5
7227 $as_echo "$blibflags" >&6; }
7228         fi
7229         LDFLAGS="$saved_LDFLAGS"
7230                 ac_fn_c_check_func "$LINENO" "authenticate" "ac_cv_func_authenticate"
7231 if test "x$ac_cv_func_authenticate" = xyes; then :
7232
7233 $as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
7234
7235 else
7236   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for authenticate in -ls" >&5
7237 $as_echo_n "checking for authenticate in -ls... " >&6; }
7238 if ${ac_cv_lib_s_authenticate+:} false; then :
7239   $as_echo_n "(cached) " >&6
7240 else
7241   ac_check_lib_save_LIBS=$LIBS
7242 LIBS="-ls  $LIBS"
7243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7244 /* end confdefs.h.  */
7245
7246 /* Override any GCC internal prototype to avoid an error.
7247    Use char because int might match the return type of a GCC
7248    builtin and then its argument prototype would still apply.  */
7249 #ifdef __cplusplus
7250 extern "C"
7251 #endif
7252 char authenticate ();
7253 int
7254 main ()
7255 {
7256 return authenticate ();
7257   ;
7258   return 0;
7259 }
7260 _ACEOF
7261 if ac_fn_c_try_link "$LINENO"; then :
7262   ac_cv_lib_s_authenticate=yes
7263 else
7264   ac_cv_lib_s_authenticate=no
7265 fi
7266 rm -f core conftest.err conftest.$ac_objext \
7267     conftest$ac_exeext conftest.$ac_ext
7268 LIBS=$ac_check_lib_save_LIBS
7269 fi
7270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_s_authenticate" >&5
7271 $as_echo "$ac_cv_lib_s_authenticate" >&6; }
7272 if test "x$ac_cv_lib_s_authenticate" = xyes; then :
7273    $as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
7274
7275                                 LIBS="$LIBS -ls"
7276
7277 fi
7278
7279
7280 fi
7281
7282                 ac_fn_c_check_decl "$LINENO" "authenticate" "ac_cv_have_decl_authenticate" "#include <usersec.h>
7283 "
7284 if test "x$ac_cv_have_decl_authenticate" = xyes; then :
7285   ac_have_decl=1
7286 else
7287   ac_have_decl=0
7288 fi
7289
7290 cat >>confdefs.h <<_ACEOF
7291 #define HAVE_DECL_AUTHENTICATE $ac_have_decl
7292 _ACEOF
7293 ac_fn_c_check_decl "$LINENO" "loginrestrictions" "ac_cv_have_decl_loginrestrictions" "#include <usersec.h>
7294 "
7295 if test "x$ac_cv_have_decl_loginrestrictions" = xyes; then :
7296   ac_have_decl=1
7297 else
7298   ac_have_decl=0
7299 fi
7300
7301 cat >>confdefs.h <<_ACEOF
7302 #define HAVE_DECL_LOGINRESTRICTIONS $ac_have_decl
7303 _ACEOF
7304 ac_fn_c_check_decl "$LINENO" "loginsuccess" "ac_cv_have_decl_loginsuccess" "#include <usersec.h>
7305 "
7306 if test "x$ac_cv_have_decl_loginsuccess" = xyes; then :
7307   ac_have_decl=1
7308 else
7309   ac_have_decl=0
7310 fi
7311
7312 cat >>confdefs.h <<_ACEOF
7313 #define HAVE_DECL_LOGINSUCCESS $ac_have_decl
7314 _ACEOF
7315 ac_fn_c_check_decl "$LINENO" "passwdexpired" "ac_cv_have_decl_passwdexpired" "#include <usersec.h>
7316 "
7317 if test "x$ac_cv_have_decl_passwdexpired" = xyes; then :
7318   ac_have_decl=1
7319 else
7320   ac_have_decl=0
7321 fi
7322
7323 cat >>confdefs.h <<_ACEOF
7324 #define HAVE_DECL_PASSWDEXPIRED $ac_have_decl
7325 _ACEOF
7326 ac_fn_c_check_decl "$LINENO" "setauthdb" "ac_cv_have_decl_setauthdb" "#include <usersec.h>
7327 "
7328 if test "x$ac_cv_have_decl_setauthdb" = xyes; then :
7329   ac_have_decl=1
7330 else
7331   ac_have_decl=0
7332 fi
7333
7334 cat >>confdefs.h <<_ACEOF
7335 #define HAVE_DECL_SETAUTHDB $ac_have_decl
7336 _ACEOF
7337
7338                 ac_fn_c_check_decl "$LINENO" "loginfailed" "ac_cv_have_decl_loginfailed" "#include <usersec.h>
7339
7340 "
7341 if test "x$ac_cv_have_decl_loginfailed" = xyes; then :
7342   ac_have_decl=1
7343 else
7344   ac_have_decl=0
7345 fi
7346
7347 cat >>confdefs.h <<_ACEOF
7348 #define HAVE_DECL_LOGINFAILED $ac_have_decl
7349 _ACEOF
7350 if test $ac_have_decl = 1; then :
7351   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if loginfailed takes 4 arguments" >&5
7352 $as_echo_n "checking if loginfailed takes 4 arguments... " >&6; }
7353             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7354 /* end confdefs.h.  */
7355  #include <usersec.h>
7356 int
7357 main ()
7358 {
7359  (void)loginfailed("user","host","tty",0);
7360   ;
7361   return 0;
7362 }
7363 _ACEOF
7364 if ac_fn_c_try_compile "$LINENO"; then :
7365   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7366 $as_echo "yes" >&6; }
7367
7368 $as_echo "#define AIX_LOGINFAILED_4ARG 1" >>confdefs.h
7369
7370 else
7371   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7372 $as_echo "no" >&6; }
7373
7374 fi
7375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7376 fi
7377
7378         for ac_func in getgrset setauthdb
7379 do :
7380   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7381 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7382 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7383   cat >>confdefs.h <<_ACEOF
7384 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7385 _ACEOF
7386
7387 fi
7388 done
7389
7390         ac_fn_c_check_decl "$LINENO" "F_CLOSEM" "ac_cv_have_decl_F_CLOSEM" " #include <limits.h>
7391               #include <fcntl.h>
7392
7393 "
7394 if test "x$ac_cv_have_decl_F_CLOSEM" = xyes; then :
7395
7396 $as_echo "#define HAVE_FCNTL_CLOSEM 1" >>confdefs.h
7397
7398 fi
7399
7400         check_for_aix_broken_getaddrinfo=1
7401
7402 $as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
7403
7404
7405 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7406
7407
7408 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7409
7410
7411 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7412
7413
7414 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
7415
7416
7417 $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
7418
7419
7420 $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7421
7422
7423 $as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
7424
7425
7426 $as_echo "#define PTY_ZEROREAD 1" >>confdefs.h
7427
7428
7429 $as_echo "#define PLATFORM_SYS_DIR_UID 2" >>confdefs.h
7430
7431
7432 $as_echo "#define BROKEN_STRNDUP 1" >>confdefs.h
7433
7434
7435 $as_echo "#define BROKEN_STRNLEN 1" >>confdefs.h
7436
7437         ;;
7438 *-*-android*)
7439
7440 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
7441
7442
7443 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
7444
7445         ;;
7446 *-*-cygwin*)
7447         check_for_libcrypt_later=1
7448         LIBS="$LIBS /usr/lib/textreadmode.o"
7449
7450 $as_echo "#define HAVE_CYGWIN 1" >>confdefs.h
7451
7452
7453 $as_echo "#define USE_PIPES 1" >>confdefs.h
7454
7455
7456 $as_echo "#define NO_UID_RESTORATION_TEST 1" >>confdefs.h
7457
7458
7459 $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
7460
7461
7462 $as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
7463
7464
7465 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7466
7467
7468 $as_echo "#define SSH_IOBUFSZ 65535" >>confdefs.h
7469
7470
7471 $as_echo "#define FILESYSTEM_NO_BACKSLASH 1" >>confdefs.h
7472
7473         # Cygwin defines optargs, optargs as declspec(dllimport) for historical
7474         # reasons which cause compile warnings, so we disable those warnings.
7475         {
7476         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wno-attributes" >&5
7477 $as_echo_n "checking if $CC supports compile flag -Wno-attributes... " >&6; }
7478         saved_CFLAGS="$CFLAGS"
7479         CFLAGS="$CFLAGS $WERROR -Wno-attributes"
7480         _define_flag=""
7481         test "x$_define_flag" = "x" && _define_flag="-Wno-attributes"
7482         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7483 /* end confdefs.h.  */
7484
7485 #include <stdlib.h>
7486 #include <stdio.h>
7487 int main(int argc, char **argv) {
7488         /* Some math to catch -ftrapv problems in the toolchain */
7489         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
7490         float l = i * 2.1;
7491         double m = l / 0.5;
7492         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
7493         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
7494         exit(0);
7495 }
7496
7497 _ACEOF
7498 if ac_fn_c_try_compile "$LINENO"; then :
7499
7500 if `grep -i "unrecognized option" conftest.err >/dev/null`
7501 then
7502                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7503 $as_echo "no" >&6; }
7504                 CFLAGS="$saved_CFLAGS"
7505 else
7506                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7507 $as_echo "yes" >&6; }
7508                  CFLAGS="$saved_CFLAGS $_define_flag"
7509 fi
7510 else
7511    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7512 $as_echo "no" >&6; }
7513                   CFLAGS="$saved_CFLAGS"
7514
7515 fi
7516 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7517 }
7518         ;;
7519 *-*-dgux*)
7520
7521 $as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
7522
7523         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7524
7525         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7526
7527         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7528
7529         ;;
7530 *-*-darwin*)
7531         use_pie=auto
7532         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have working getaddrinfo" >&5
7533 $as_echo_n "checking if we have working getaddrinfo... " >&6; }
7534         if test "$cross_compiling" = yes; then :
7535   { $as_echo "$as_me:${as_lineno-$LINENO}: result: assume it is working" >&5
7536 $as_echo "assume it is working" >&6; }
7537 else
7538   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7539 /* end confdefs.h.  */
7540  #include <mach-o/dyld.h>
7541 main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
7542                 exit(0);
7543         else
7544                 exit(1);
7545 }
7546
7547 _ACEOF
7548 if ac_fn_c_try_run "$LINENO"; then :
7549   { $as_echo "$as_me:${as_lineno-$LINENO}: result: working" >&5
7550 $as_echo "working" >&6; }
7551 else
7552   { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5
7553 $as_echo "buggy" >&6; }
7554
7555 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
7556
7557
7558 fi
7559 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7560   conftest.$ac_objext conftest.beam conftest.$ac_ext
7561 fi
7562
7563         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7564
7565         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7566
7567         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7568
7569
7570 $as_echo "#define BROKEN_GLOB 1" >>confdefs.h
7571
7572
7573 cat >>confdefs.h <<_ACEOF
7574 #define BIND_8_COMPAT 1
7575 _ACEOF
7576
7577
7578 $as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
7579
7580
7581 $as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
7582
7583
7584 $as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
7585
7586
7587         ac_fn_c_check_decl "$LINENO" "AU_IPv4" "ac_cv_have_decl_AU_IPv4" "$ac_includes_default"
7588 if test "x$ac_cv_have_decl_AU_IPv4" = xyes; then :
7589
7590 else
7591
7592 $as_echo "#define AU_IPv4 0" >>confdefs.h
7593
7594             #include <bsm/audit.h>
7595
7596 $as_echo "#define LASTLOG_WRITE_PUTUTXLINE 1" >>confdefs.h
7597
7598
7599 fi
7600
7601
7602 $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7603
7604         for ac_func in sandbox_init
7605 do :
7606   ac_fn_c_check_func "$LINENO" "sandbox_init" "ac_cv_func_sandbox_init"
7607 if test "x$ac_cv_func_sandbox_init" = xyes; then :
7608   cat >>confdefs.h <<_ACEOF
7609 #define HAVE_SANDBOX_INIT 1
7610 _ACEOF
7611
7612 fi
7613 done
7614
7615         for ac_header in sandbox.h
7616 do :
7617   ac_fn_c_check_header_mongrel "$LINENO" "sandbox.h" "ac_cv_header_sandbox_h" "$ac_includes_default"
7618 if test "x$ac_cv_header_sandbox_h" = xyes; then :
7619   cat >>confdefs.h <<_ACEOF
7620 #define HAVE_SANDBOX_H 1
7621 _ACEOF
7622
7623 fi
7624
7625 done
7626
7627         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sandbox_apply in -lsandbox" >&5
7628 $as_echo_n "checking for sandbox_apply in -lsandbox... " >&6; }
7629 if ${ac_cv_lib_sandbox_sandbox_apply+:} false; then :
7630   $as_echo_n "(cached) " >&6
7631 else
7632   ac_check_lib_save_LIBS=$LIBS
7633 LIBS="-lsandbox  $LIBS"
7634 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7635 /* end confdefs.h.  */
7636
7637 /* Override any GCC internal prototype to avoid an error.
7638    Use char because int might match the return type of a GCC
7639    builtin and then its argument prototype would still apply.  */
7640 #ifdef __cplusplus
7641 extern "C"
7642 #endif
7643 char sandbox_apply ();
7644 int
7645 main ()
7646 {
7647 return sandbox_apply ();
7648   ;
7649   return 0;
7650 }
7651 _ACEOF
7652 if ac_fn_c_try_link "$LINENO"; then :
7653   ac_cv_lib_sandbox_sandbox_apply=yes
7654 else
7655   ac_cv_lib_sandbox_sandbox_apply=no
7656 fi
7657 rm -f core conftest.err conftest.$ac_objext \
7658     conftest$ac_exeext conftest.$ac_ext
7659 LIBS=$ac_check_lib_save_LIBS
7660 fi
7661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sandbox_sandbox_apply" >&5
7662 $as_echo "$ac_cv_lib_sandbox_sandbox_apply" >&6; }
7663 if test "x$ac_cv_lib_sandbox_sandbox_apply" = xyes; then :
7664
7665             SSHDLIBS="$SSHDLIBS -lsandbox"
7666
7667 fi
7668
7669         ;;
7670 *-*-dragonfly*)
7671         SSHDLIBS="$SSHDLIBS -lcrypt"
7672         TEST_MALLOC_OPTIONS="AFGJPRX"
7673         ;;
7674 *-*-haiku*)
7675         LIBS="$LIBS -lbsd "
7676         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
7677 $as_echo_n "checking for socket in -lnetwork... " >&6; }
7678 if ${ac_cv_lib_network_socket+:} false; then :
7679   $as_echo_n "(cached) " >&6
7680 else
7681   ac_check_lib_save_LIBS=$LIBS
7682 LIBS="-lnetwork  $LIBS"
7683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7684 /* end confdefs.h.  */
7685
7686 /* Override any GCC internal prototype to avoid an error.
7687    Use char because int might match the return type of a GCC
7688    builtin and then its argument prototype would still apply.  */
7689 #ifdef __cplusplus
7690 extern "C"
7691 #endif
7692 char socket ();
7693 int
7694 main ()
7695 {
7696 return socket ();
7697   ;
7698   return 0;
7699 }
7700 _ACEOF
7701 if ac_fn_c_try_link "$LINENO"; then :
7702   ac_cv_lib_network_socket=yes
7703 else
7704   ac_cv_lib_network_socket=no
7705 fi
7706 rm -f core conftest.err conftest.$ac_objext \
7707     conftest$ac_exeext conftest.$ac_ext
7708 LIBS=$ac_check_lib_save_LIBS
7709 fi
7710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
7711 $as_echo "$ac_cv_lib_network_socket" >&6; }
7712 if test "x$ac_cv_lib_network_socket" = xyes; then :
7713   cat >>confdefs.h <<_ACEOF
7714 #define HAVE_LIBNETWORK 1
7715 _ACEOF
7716
7717   LIBS="-lnetwork $LIBS"
7718
7719 fi
7720
7721         $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
7722
7723         MANTYPE=man
7724         ;;
7725 *-*-hpux*)
7726         # first we define all of the options common to all HP-UX releases
7727         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
7728         IPADDR_IN_DISPLAY=yes
7729         $as_echo "#define USE_PIPES 1" >>confdefs.h
7730
7731         $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
7732
7733
7734 $as_echo "#define LOCKED_PASSWD_STRING \"*\"" >>confdefs.h
7735
7736         $as_echo "#define SPT_TYPE SPT_PSTAT" >>confdefs.h
7737
7738
7739 $as_echo "#define PLATFORM_SYS_DIR_UID 2" >>confdefs.h
7740
7741         maildir="/var/mail"
7742         LIBS="$LIBS -lsec"
7743         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_error in -lxnet" >&5
7744 $as_echo_n "checking for t_error in -lxnet... " >&6; }
7745 if ${ac_cv_lib_xnet_t_error+:} false; then :
7746   $as_echo_n "(cached) " >&6
7747 else
7748   ac_check_lib_save_LIBS=$LIBS
7749 LIBS="-lxnet  $LIBS"
7750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7751 /* end confdefs.h.  */
7752
7753 /* Override any GCC internal prototype to avoid an error.
7754    Use char because int might match the return type of a GCC
7755    builtin and then its argument prototype would still apply.  */
7756 #ifdef __cplusplus
7757 extern "C"
7758 #endif
7759 char t_error ();
7760 int
7761 main ()
7762 {
7763 return t_error ();
7764   ;
7765   return 0;
7766 }
7767 _ACEOF
7768 if ac_fn_c_try_link "$LINENO"; then :
7769   ac_cv_lib_xnet_t_error=yes
7770 else
7771   ac_cv_lib_xnet_t_error=no
7772 fi
7773 rm -f core conftest.err conftest.$ac_objext \
7774     conftest$ac_exeext conftest.$ac_ext
7775 LIBS=$ac_check_lib_save_LIBS
7776 fi
7777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_t_error" >&5
7778 $as_echo "$ac_cv_lib_xnet_t_error" >&6; }
7779 if test "x$ac_cv_lib_xnet_t_error" = xyes; then :
7780   cat >>confdefs.h <<_ACEOF
7781 #define HAVE_LIBXNET 1
7782 _ACEOF
7783
7784   LIBS="-lxnet $LIBS"
7785
7786 else
7787   as_fn_error $? "*** -lxnet needed on HP-UX - check config.log ***" "$LINENO" 5
7788 fi
7789
7790
7791         # next, we define all of the options specific to major releases
7792         case "$host" in
7793         *-*-hpux10*)
7794                 if test -z "$GCC"; then
7795                         CFLAGS="$CFLAGS -Ae"
7796                 fi
7797                 ;;
7798         *-*-hpux11*)
7799
7800 $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
7801
7802
7803 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
7804
7805
7806 $as_echo "#define USE_BTMP 1" >>confdefs.h
7807
7808                 check_for_hpux_broken_getaddrinfo=1
7809                 check_for_conflicting_getspnam=1
7810                 ;;
7811         esac
7812
7813         # lastly, we define options specific to minor releases
7814         case "$host" in
7815         *-*-hpux10.26)
7816
7817 $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
7818
7819                 disable_ptmx_check=yes
7820                 LIBS="$LIBS -lsecpw"
7821                 ;;
7822         esac
7823         ;;
7824 *-*-irix5*)
7825         PATH="$PATH:/usr/etc"
7826
7827 $as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
7828
7829         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7830
7831         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7832
7833         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7834
7835
7836 $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
7837
7838         $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7839
7840         ;;
7841 *-*-irix6*)
7842         PATH="$PATH:/usr/etc"
7843
7844 $as_echo "#define WITH_IRIX_ARRAY 1" >>confdefs.h
7845
7846
7847 $as_echo "#define WITH_IRIX_PROJECT 1" >>confdefs.h
7848
7849
7850 $as_echo "#define WITH_IRIX_AUDIT 1" >>confdefs.h
7851
7852         ac_fn_c_check_func "$LINENO" "jlimit_startjob" "ac_cv_func_jlimit_startjob"
7853 if test "x$ac_cv_func_jlimit_startjob" = xyes; then :
7854
7855 $as_echo "#define WITH_IRIX_JOBS 1" >>confdefs.h
7856
7857 fi
7858
7859         $as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
7860
7861         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7862
7863         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7864
7865         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7866
7867
7868 $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
7869
7870         $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
7871
7872         $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7873
7874         ;;
7875 *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
7876         check_for_libcrypt_later=1
7877         $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
7878
7879         $as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
7880
7881         $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7882
7883
7884 $as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
7885
7886
7887 $as_echo "#define USE_BTMP 1" >>confdefs.h
7888
7889         ;;
7890 *-*-linux*)
7891         no_dev_ptmx=1
7892         use_pie=auto
7893         check_for_libcrypt_later=1
7894         check_for_openpty_ctty_bug=1
7895                         CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -D_DEFAULT_SOURCE"
7896
7897 $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
7898
7899
7900 $as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
7901
7902         $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7903
7904
7905 $as_echo "#define LINK_OPNOTSUPP_ERRNO EPERM" >>confdefs.h
7906
7907
7908 $as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
7909
7910         $as_echo "#define USE_BTMP 1" >>confdefs.h
7911
7912
7913 $as_echo "#define LINUX_OOM_ADJUST 1" >>confdefs.h
7914
7915         inet6_default_4in6=yes
7916         case `uname -r` in
7917         1.*|2.0.*)
7918
7919 $as_echo "#define BROKEN_CMSG_TYPE 1" >>confdefs.h
7920
7921                 ;;
7922         esac
7923         # tun(4) forwarding compat code
7924         for ac_header in linux/if_tun.h
7925 do :
7926   ac_fn_c_check_header_mongrel "$LINENO" "linux/if_tun.h" "ac_cv_header_linux_if_tun_h" "$ac_includes_default"
7927 if test "x$ac_cv_header_linux_if_tun_h" = xyes; then :
7928   cat >>confdefs.h <<_ACEOF
7929 #define HAVE_LINUX_IF_TUN_H 1
7930 _ACEOF
7931
7932 fi
7933
7934 done
7935
7936         if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then
7937
7938 $as_echo "#define SSH_TUN_LINUX 1" >>confdefs.h
7939
7940
7941 $as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
7942
7943
7944 $as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
7945
7946         fi
7947         ac_fn_c_check_header_compile "$LINENO" "linux/if.h" "ac_cv_header_linux_if_h" "
7948 #ifdef HAVE_SYS_TYPES_H
7949 # include <sys/types.H>
7950 #endif
7951
7952 "
7953 if test "x$ac_cv_header_linux_if_h" = xyes; then :
7954
7955 $as_echo "#define SYS_RDOMAIN_LINUX 1" >>confdefs.h
7956
7957 fi
7958
7959
7960         for ac_header in linux/seccomp.h linux/filter.h linux/audit.h
7961 do :
7962   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7963 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <linux/types.h>
7964 "
7965 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7966   cat >>confdefs.h <<_ACEOF
7967 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7968 _ACEOF
7969
7970 fi
7971
7972 done
7973
7974         # Obtain MIPS ABI
7975         case "$host" in
7976         mips*)
7977                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7978 /* end confdefs.h.  */
7979
7980 #if _MIPS_SIM != _ABIO32
7981 #error
7982 #endif
7983
7984 int
7985 main ()
7986 {
7987
7988   ;
7989   return 0;
7990 }
7991 _ACEOF
7992 if ac_fn_c_try_compile "$LINENO"; then :
7993   mips_abi="o32"
7994 else
7995   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7996 /* end confdefs.h.  */
7997
7998 #if _MIPS_SIM != _ABIN32
7999 #error
8000 #endif
8001
8002 int
8003 main ()
8004 {
8005
8006   ;
8007   return 0;
8008 }
8009 _ACEOF
8010 if ac_fn_c_try_compile "$LINENO"; then :
8011   mips_abi="n32"
8012 else
8013   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8014 /* end confdefs.h.  */
8015
8016 #if _MIPS_SIM != _ABI64
8017 #error
8018 #endif
8019
8020 int
8021 main ()
8022 {
8023
8024   ;
8025   return 0;
8026 }
8027 _ACEOF
8028 if ac_fn_c_try_compile "$LINENO"; then :
8029   mips_abi="n64"
8030 else
8031   as_fn_error $? "unknown MIPS ABI" "$LINENO" 5
8032
8033 fi
8034 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8035
8036 fi
8037 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8038
8039 fi
8040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8041                 ;;
8042         esac
8043         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for seccomp architecture" >&5
8044 $as_echo_n "checking for seccomp architecture... " >&6; }
8045         seccomp_audit_arch=
8046         case "$host" in
8047         x86_64-*)
8048                 seccomp_audit_arch=AUDIT_ARCH_X86_64
8049                 ;;
8050         i*86-*)
8051                 seccomp_audit_arch=AUDIT_ARCH_I386
8052                 ;;
8053         arm*-*)
8054                 seccomp_audit_arch=AUDIT_ARCH_ARM
8055                 ;;
8056         aarch64*-*)
8057                 seccomp_audit_arch=AUDIT_ARCH_AARCH64
8058                 ;;
8059         s390x-*)
8060                 seccomp_audit_arch=AUDIT_ARCH_S390X
8061                 ;;
8062         s390-*)
8063                 seccomp_audit_arch=AUDIT_ARCH_S390
8064                 ;;
8065         powerpc64-*)
8066                 seccomp_audit_arch=AUDIT_ARCH_PPC64
8067                 ;;
8068         powerpc64le-*)
8069                 seccomp_audit_arch=AUDIT_ARCH_PPC64LE
8070                 ;;
8071         mips-*)
8072                 seccomp_audit_arch=AUDIT_ARCH_MIPS
8073                 ;;
8074         mipsel-*)
8075                 seccomp_audit_arch=AUDIT_ARCH_MIPSEL
8076                 ;;
8077         mips64-*)
8078                 case "$mips_abi" in
8079                 "n32")
8080                         seccomp_audit_arch=AUDIT_ARCH_MIPS64N32
8081                         ;;
8082                 "n64")
8083                         seccomp_audit_arch=AUDIT_ARCH_MIPS64
8084                         ;;
8085                 esac
8086                 ;;
8087         mips64el-*)
8088                 case "$mips_abi" in
8089                 "n32")
8090                         seccomp_audit_arch=AUDIT_ARCH_MIPSEL64N32
8091                         ;;
8092                 "n64")
8093                         seccomp_audit_arch=AUDIT_ARCH_MIPSEL64
8094                         ;;
8095                 esac
8096                 ;;
8097         esac
8098         if test "x$seccomp_audit_arch" != "x" ; then
8099                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$seccomp_audit_arch\"" >&5
8100 $as_echo "\"$seccomp_audit_arch\"" >&6; }
8101
8102 cat >>confdefs.h <<_ACEOF
8103 #define SECCOMP_AUDIT_ARCH $seccomp_audit_arch
8104 _ACEOF
8105
8106         else
8107                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: architecture not supported" >&5
8108 $as_echo "architecture not supported" >&6; }
8109         fi
8110         ;;
8111 mips-sony-bsd|mips-sony-newsos4)
8112
8113 $as_echo "#define NEED_SETPGRP 1" >>confdefs.h
8114
8115         SONY=1
8116         ;;
8117 *-*-netbsd*)
8118         check_for_libcrypt_before=1
8119         if test "x$withval" != "xno" ; then
8120                 need_dash_r=1
8121         fi
8122         CPPFLAGS="$CPPFLAGS -D_OPENBSD_SOURCE"
8123
8124 $as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
8125
8126         ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
8127 if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
8128
8129 else
8130
8131 $as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
8132
8133 fi
8134
8135
8136
8137 $as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
8138
8139         TEST_MALLOC_OPTIONS="AJRX"
8140
8141 $as_echo "#define BROKEN_READ_COMPARISON 1" >>confdefs.h
8142
8143         ;;
8144 *-*-freebsd*)
8145         check_for_libcrypt_later=1
8146
8147 $as_echo "#define LOCKED_PASSWD_PREFIX \"*LOCKED*\"" >>confdefs.h
8148
8149
8150 $as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
8151
8152         ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
8153 if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
8154
8155 else
8156
8157 $as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
8158
8159 fi
8160
8161
8162
8163 $as_echo "#define BROKEN_GLOB 1" >>confdefs.h
8164
8165         TEST_MALLOC_OPTIONS="AJRX"
8166         # Preauth crypto occasionally uses file descriptors for crypto offload
8167         # and will crash if they cannot be opened.
8168
8169 $as_echo "#define SANDBOX_SKIP_RLIMIT_NOFILE 1" >>confdefs.h
8170
8171         ;;
8172 *-*-bsdi*)
8173         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8174
8175         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8176
8177         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8178
8179         ;;
8180 *-next-*)
8181         conf_lastlog_location="/usr/adm/lastlog"
8182         conf_utmp_location=/etc/utmp
8183         conf_wtmp_location=/usr/adm/wtmp
8184         maildir=/usr/spool/mail
8185
8186 $as_echo "#define HAVE_NEXT 1" >>confdefs.h
8187
8188         $as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
8189
8190         $as_echo "#define USE_PIPES 1" >>confdefs.h
8191
8192
8193 $as_echo "#define BROKEN_SAVED_UIDS 1" >>confdefs.h
8194
8195         ;;
8196 *-*-openbsd*)
8197         use_pie=auto
8198
8199 $as_echo "#define HAVE_ATTRIBUTE__SENTINEL__ 1" >>confdefs.h
8200
8201
8202 $as_echo "#define HAVE_ATTRIBUTE__BOUNDED__ 1" >>confdefs.h
8203
8204
8205 $as_echo "#define SSH_TUN_OPENBSD 1" >>confdefs.h
8206
8207
8208 $as_echo "#define SYSLOG_R_SAFE_IN_SIGHAND 1" >>confdefs.h
8209
8210         TEST_MALLOC_OPTIONS="AFGJPRX"
8211         ;;
8212 *-*-solaris*)
8213         if test "x$withval" != "xno" ; then
8214                 need_dash_r=1
8215         fi
8216         $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
8217
8218         $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
8219
8220         $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
8221
8222
8223 $as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
8224
8225         $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
8226
8227         # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
8228
8229 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
8230
8231
8232 $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
8233
8234
8235 $as_echo "#define BROKEN_TCGETATTR_ICANON 1" >>confdefs.h
8236
8237         external_path_file=/etc/default/login
8238         # hardwire lastlog location (can't detect it on some versions)
8239         conf_lastlog_location="/var/adm/lastlog"
8240         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obsolete utmp and wtmp in solaris2.x" >&5
8241 $as_echo_n "checking for obsolete utmp and wtmp in solaris2.x... " >&6; }
8242         sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
8243         if test "$sol2ver" -ge 8; then
8244                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8245 $as_echo "yes" >&6; }
8246                 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
8247
8248
8249 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
8250
8251         else
8252                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8253 $as_echo "no" >&6; }
8254         fi
8255         for ac_func in setpflags
8256 do :
8257   ac_fn_c_check_func "$LINENO" "setpflags" "ac_cv_func_setpflags"
8258 if test "x$ac_cv_func_setpflags" = xyes; then :
8259   cat >>confdefs.h <<_ACEOF
8260 #define HAVE_SETPFLAGS 1
8261 _ACEOF
8262
8263 fi
8264 done
8265
8266         for ac_func in setppriv
8267 do :
8268   ac_fn_c_check_func "$LINENO" "setppriv" "ac_cv_func_setppriv"
8269 if test "x$ac_cv_func_setppriv" = xyes; then :
8270   cat >>confdefs.h <<_ACEOF
8271 #define HAVE_SETPPRIV 1
8272 _ACEOF
8273
8274 fi
8275 done
8276
8277         for ac_func in priv_basicset
8278 do :
8279   ac_fn_c_check_func "$LINENO" "priv_basicset" "ac_cv_func_priv_basicset"
8280 if test "x$ac_cv_func_priv_basicset" = xyes; then :
8281   cat >>confdefs.h <<_ACEOF
8282 #define HAVE_PRIV_BASICSET 1
8283 _ACEOF
8284
8285 fi
8286 done
8287
8288         for ac_header in priv.h
8289 do :
8290   ac_fn_c_check_header_mongrel "$LINENO" "priv.h" "ac_cv_header_priv_h" "$ac_includes_default"
8291 if test "x$ac_cv_header_priv_h" = xyes; then :
8292   cat >>confdefs.h <<_ACEOF
8293 #define HAVE_PRIV_H 1
8294 _ACEOF
8295
8296 fi
8297
8298 done
8299
8300
8301 # Check whether --with-solaris-contracts was given.
8302 if test "${with_solaris_contracts+set}" = set; then :
8303   withval=$with_solaris_contracts;
8304                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ct_tmpl_activate in -lcontract" >&5
8305 $as_echo_n "checking for ct_tmpl_activate in -lcontract... " >&6; }
8306 if ${ac_cv_lib_contract_ct_tmpl_activate+:} false; then :
8307   $as_echo_n "(cached) " >&6
8308 else
8309   ac_check_lib_save_LIBS=$LIBS
8310 LIBS="-lcontract  $LIBS"
8311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8312 /* end confdefs.h.  */
8313
8314 /* Override any GCC internal prototype to avoid an error.
8315    Use char because int might match the return type of a GCC
8316    builtin and then its argument prototype would still apply.  */
8317 #ifdef __cplusplus
8318 extern "C"
8319 #endif
8320 char ct_tmpl_activate ();
8321 int
8322 main ()
8323 {
8324 return ct_tmpl_activate ();
8325   ;
8326   return 0;
8327 }
8328 _ACEOF
8329 if ac_fn_c_try_link "$LINENO"; then :
8330   ac_cv_lib_contract_ct_tmpl_activate=yes
8331 else
8332   ac_cv_lib_contract_ct_tmpl_activate=no
8333 fi
8334 rm -f core conftest.err conftest.$ac_objext \
8335     conftest$ac_exeext conftest.$ac_ext
8336 LIBS=$ac_check_lib_save_LIBS
8337 fi
8338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_contract_ct_tmpl_activate" >&5
8339 $as_echo "$ac_cv_lib_contract_ct_tmpl_activate" >&6; }
8340 if test "x$ac_cv_lib_contract_ct_tmpl_activate" = xyes; then :
8341
8342 $as_echo "#define USE_SOLARIS_PROCESS_CONTRACTS 1" >>confdefs.h
8343
8344                           LIBS="$LIBS -lcontract"
8345                           SPC_MSG="yes"
8346 fi
8347
8348
8349 fi
8350
8351
8352 # Check whether --with-solaris-projects was given.
8353 if test "${with_solaris_projects+set}" = set; then :
8354   withval=$with_solaris_projects;
8355                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproject in -lproject" >&5
8356 $as_echo_n "checking for setproject in -lproject... " >&6; }
8357 if ${ac_cv_lib_project_setproject+:} false; then :
8358   $as_echo_n "(cached) " >&6
8359 else
8360   ac_check_lib_save_LIBS=$LIBS
8361 LIBS="-lproject  $LIBS"
8362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8363 /* end confdefs.h.  */
8364
8365 /* Override any GCC internal prototype to avoid an error.
8366    Use char because int might match the return type of a GCC
8367    builtin and then its argument prototype would still apply.  */
8368 #ifdef __cplusplus
8369 extern "C"
8370 #endif
8371 char setproject ();
8372 int
8373 main ()
8374 {
8375 return setproject ();
8376   ;
8377   return 0;
8378 }
8379 _ACEOF
8380 if ac_fn_c_try_link "$LINENO"; then :
8381   ac_cv_lib_project_setproject=yes
8382 else
8383   ac_cv_lib_project_setproject=no
8384 fi
8385 rm -f core conftest.err conftest.$ac_objext \
8386     conftest$ac_exeext conftest.$ac_ext
8387 LIBS=$ac_check_lib_save_LIBS
8388 fi
8389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_project_setproject" >&5
8390 $as_echo "$ac_cv_lib_project_setproject" >&6; }
8391 if test "x$ac_cv_lib_project_setproject" = xyes; then :
8392
8393 $as_echo "#define USE_SOLARIS_PROJECTS 1" >>confdefs.h
8394
8395                         LIBS="$LIBS -lproject"
8396                         SP_MSG="yes"
8397 fi
8398
8399
8400 fi
8401
8402
8403 # Check whether --with-solaris-privs was given.
8404 if test "${with_solaris_privs+set}" = set; then :
8405   withval=$with_solaris_privs;
8406                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Solaris/Illumos privilege support" >&5
8407 $as_echo_n "checking for Solaris/Illumos privilege support... " >&6; }
8408                 if test "x$ac_cv_func_setppriv" = "xyes" -a \
8409                         "x$ac_cv_header_priv_h" = "xyes" ; then
8410                         SOLARIS_PRIVS=yes
8411                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
8412 $as_echo "found" >&6; }
8413
8414 $as_echo "#define NO_UID_RESTORATION_TEST 1" >>confdefs.h
8415
8416
8417 $as_echo "#define USE_SOLARIS_PRIVS 1" >>confdefs.h
8418
8419                         SPP_MSG="yes"
8420                 else
8421                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8422 $as_echo "not found" >&6; }
8423                         as_fn_error $? "*** must have support for Solaris privileges to use --with-solaris-privs" "$LINENO" 5
8424                 fi
8425
8426 fi
8427
8428         TEST_SHELL=$SHELL       # let configure find us a capable shell
8429         ;;
8430 *-*-sunos4*)
8431         CPPFLAGS="$CPPFLAGS -DSUNOS4"
8432         for ac_func in getpwanam
8433 do :
8434   ac_fn_c_check_func "$LINENO" "getpwanam" "ac_cv_func_getpwanam"
8435 if test "x$ac_cv_func_getpwanam" = xyes; then :
8436   cat >>confdefs.h <<_ACEOF
8437 #define HAVE_GETPWANAM 1
8438 _ACEOF
8439
8440 fi
8441 done
8442
8443         $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
8444
8445         conf_utmp_location=/etc/utmp
8446         conf_wtmp_location=/var/adm/wtmp
8447         conf_lastlog_location=/var/adm/lastlog
8448         $as_echo "#define USE_PIPES 1" >>confdefs.h
8449
8450
8451 $as_echo "#define DISABLE_UTMPX 1" >>confdefs.h
8452
8453         ;;
8454 *-ncr-sysv*)
8455         LIBS="$LIBS -lc89"
8456         $as_echo "#define USE_PIPES 1" >>confdefs.h
8457
8458         $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
8459
8460         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8461
8462         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8463
8464         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8465
8466         ;;
8467 *-sni-sysv*)
8468         # /usr/ucblib MUST NOT be searched on ReliantUNIX
8469         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
8470 $as_echo_n "checking for dlsym in -ldl... " >&6; }
8471 if ${ac_cv_lib_dl_dlsym+:} false; then :
8472   $as_echo_n "(cached) " >&6
8473 else
8474   ac_check_lib_save_LIBS=$LIBS
8475 LIBS="-ldl  $LIBS"
8476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8477 /* end confdefs.h.  */
8478
8479 /* Override any GCC internal prototype to avoid an error.
8480    Use char because int might match the return type of a GCC
8481    builtin and then its argument prototype would still apply.  */
8482 #ifdef __cplusplus
8483 extern "C"
8484 #endif
8485 char dlsym ();
8486 int
8487 main ()
8488 {
8489 return dlsym ();
8490   ;
8491   return 0;
8492 }
8493 _ACEOF
8494 if ac_fn_c_try_link "$LINENO"; then :
8495   ac_cv_lib_dl_dlsym=yes
8496 else
8497   ac_cv_lib_dl_dlsym=no
8498 fi
8499 rm -f core conftest.err conftest.$ac_objext \
8500     conftest$ac_exeext conftest.$ac_ext
8501 LIBS=$ac_check_lib_save_LIBS
8502 fi
8503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
8504 $as_echo "$ac_cv_lib_dl_dlsym" >&6; }
8505 if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
8506   cat >>confdefs.h <<_ACEOF
8507 #define HAVE_LIBDL 1
8508 _ACEOF
8509
8510   LIBS="-ldl $LIBS"
8511
8512 fi
8513
8514         # -lresolv needs to be at the end of LIBS or DNS lookups break
8515         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
8516 $as_echo_n "checking for res_query in -lresolv... " >&6; }
8517 if ${ac_cv_lib_resolv_res_query+:} false; then :
8518   $as_echo_n "(cached) " >&6
8519 else
8520   ac_check_lib_save_LIBS=$LIBS
8521 LIBS="-lresolv  $LIBS"
8522 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8523 /* end confdefs.h.  */
8524
8525 /* Override any GCC internal prototype to avoid an error.
8526    Use char because int might match the return type of a GCC
8527    builtin and then its argument prototype would still apply.  */
8528 #ifdef __cplusplus
8529 extern "C"
8530 #endif
8531 char res_query ();
8532 int
8533 main ()
8534 {
8535 return res_query ();
8536   ;
8537   return 0;
8538 }
8539 _ACEOF
8540 if ac_fn_c_try_link "$LINENO"; then :
8541   ac_cv_lib_resolv_res_query=yes
8542 else
8543   ac_cv_lib_resolv_res_query=no
8544 fi
8545 rm -f core conftest.err conftest.$ac_objext \
8546     conftest$ac_exeext conftest.$ac_ext
8547 LIBS=$ac_check_lib_save_LIBS
8548 fi
8549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_query" >&5
8550 $as_echo "$ac_cv_lib_resolv_res_query" >&6; }
8551 if test "x$ac_cv_lib_resolv_res_query" = xyes; then :
8552    LIBS="$LIBS -lresolv"
8553 fi
8554
8555         IPADDR_IN_DISPLAY=yes
8556         $as_echo "#define USE_PIPES 1" >>confdefs.h
8557
8558         $as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
8559
8560         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8561
8562         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8563
8564         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8565
8566         $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
8567
8568         external_path_file=/etc/default/login
8569         # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
8570         # Attention: always take care to bind libsocket and libnsl before libc,
8571         # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
8572         ;;
8573 # UnixWare 1.x, UnixWare 2.x, and others based on code from Univel.
8574 *-*-sysv4.2*)
8575         $as_echo "#define USE_PIPES 1" >>confdefs.h
8576
8577         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8578
8579         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8580
8581         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8582
8583
8584 $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
8585
8586         $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
8587
8588         TEST_SHELL=$SHELL       # let configure find us a capable shell
8589         ;;
8590 # UnixWare 7.x, OpenUNIX 8
8591 *-*-sysv5*)
8592         CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf"
8593
8594 $as_echo "#define UNIXWARE_LONG_PASSWORDS 1" >>confdefs.h
8595
8596         $as_echo "#define USE_PIPES 1" >>confdefs.h
8597
8598         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8599
8600         $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
8601
8602         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8603
8604         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8605
8606         $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
8607
8608         $as_echo "#define BROKEN_TCGETATTR_ICANON 1" >>confdefs.h
8609
8610         TEST_SHELL=$SHELL       # let configure find us a capable shell
8611         check_for_libcrypt_later=1
8612         case "$host" in
8613         *-*-sysv5SCO_SV*)       # SCO OpenServer 6.x
8614                 maildir=/var/spool/mail
8615                 $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
8616
8617                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getluid in -lprot" >&5
8618 $as_echo_n "checking for getluid in -lprot... " >&6; }
8619 if ${ac_cv_lib_prot_getluid+:} false; then :
8620   $as_echo_n "(cached) " >&6
8621 else
8622   ac_check_lib_save_LIBS=$LIBS
8623 LIBS="-lprot  $LIBS"
8624 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8625 /* end confdefs.h.  */
8626
8627 /* Override any GCC internal prototype to avoid an error.
8628    Use char because int might match the return type of a GCC
8629    builtin and then its argument prototype would still apply.  */
8630 #ifdef __cplusplus
8631 extern "C"
8632 #endif
8633 char getluid ();
8634 int
8635 main ()
8636 {
8637 return getluid ();
8638   ;
8639   return 0;
8640 }
8641 _ACEOF
8642 if ac_fn_c_try_link "$LINENO"; then :
8643   ac_cv_lib_prot_getluid=yes
8644 else
8645   ac_cv_lib_prot_getluid=no
8646 fi
8647 rm -f core conftest.err conftest.$ac_objext \
8648     conftest$ac_exeext conftest.$ac_ext
8649 LIBS=$ac_check_lib_save_LIBS
8650 fi
8651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getluid" >&5
8652 $as_echo "$ac_cv_lib_prot_getluid" >&6; }
8653 if test "x$ac_cv_lib_prot_getluid" = xyes; then :
8654    LIBS="$LIBS -lprot"
8655                         for ac_func in getluid setluid
8656 do :
8657   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8658 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8659 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8660   cat >>confdefs.h <<_ACEOF
8661 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8662 _ACEOF
8663
8664 fi
8665 done
8666
8667
8668 fi
8669
8670                 ;;
8671         *)      $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
8672
8673                 ;;
8674         esac
8675         ;;
8676 *-*-sysv*)
8677         ;;
8678 # SCO UNIX and OEM versions of SCO UNIX
8679 *-*-sco3.2v4*)
8680         as_fn_error $? "\"This Platform is no longer supported.\"" "$LINENO" 5
8681         ;;
8682 # SCO OpenServer 5.x
8683 *-*-sco3.2v5*)
8684         if test -z "$GCC"; then
8685                 CFLAGS="$CFLAGS -belf"
8686         fi
8687         LIBS="$LIBS -lprot -lx -ltinfo -lm"
8688         no_dev_ptmx=1
8689         $as_echo "#define USE_PIPES 1" >>confdefs.h
8690
8691         $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
8692
8693         $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
8694
8695         $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8696
8697         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8698
8699         $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
8700
8701         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8702
8703         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8704
8705         $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
8706
8707         $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
8708
8709         $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
8710
8711         for ac_func in getluid setluid
8712 do :
8713   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8714 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8715 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8716   cat >>confdefs.h <<_ACEOF
8717 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8718 _ACEOF
8719
8720 fi
8721 done
8722
8723         MANTYPE=man
8724         TEST_SHELL=$SHELL       # let configure find us a capable shell
8725         SKIP_DISABLE_LASTLOG_DEFINE=yes
8726         ;;
8727 *-dec-osf*)
8728         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Digital Unix SIA" >&5
8729 $as_echo_n "checking for Digital Unix SIA... " >&6; }
8730         no_osfsia=""
8731
8732 # Check whether --with-osfsia was given.
8733 if test "${with_osfsia+set}" = set; then :
8734   withval=$with_osfsia;
8735                         if test "x$withval" = "xno" ; then
8736                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8737 $as_echo "disabled" >&6; }
8738                                 no_osfsia=1
8739                         fi
8740
8741 fi
8742
8743         if test -z "$no_osfsia" ; then
8744                 if test -f /etc/sia/matrix.conf; then
8745                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8746 $as_echo "yes" >&6; }
8747
8748 $as_echo "#define HAVE_OSF_SIA 1" >>confdefs.h
8749
8750
8751 $as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
8752
8753                         $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8754
8755                         LIBS="$LIBS -lsecurity -ldb -lm -laud"
8756                         SIA_MSG="yes"
8757                 else
8758                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8759 $as_echo "no" >&6; }
8760
8761 $as_echo "#define LOCKED_PASSWD_SUBSTR \"Nologin\"" >>confdefs.h
8762
8763                 fi
8764         fi
8765         $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
8766
8767         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8768
8769         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8770
8771         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8772
8773
8774 $as_echo "#define BROKEN_READV_COMPARISON 1" >>confdefs.h
8775
8776         ;;
8777
8778 *-*-nto-qnx*)
8779         $as_echo "#define USE_PIPES 1" >>confdefs.h
8780
8781         $as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
8782
8783         $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
8784
8785         $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
8786
8787
8788 $as_echo "#define BROKEN_SHADOW_EXPIRE 1" >>confdefs.h
8789
8790         enable_etc_default_login=no     # has incompatible /etc/default/login
8791         case "$host" in
8792         *-*-nto-qnx6*)
8793                 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8794
8795                 ;;
8796         esac
8797         ;;
8798
8799 *-*-ultrix*)
8800
8801 $as_echo "#define BROKEN_GETGROUPS 1" >>confdefs.h
8802
8803         $as_echo "#define NEED_SETPGRP 1" >>confdefs.h
8804
8805
8806 $as_echo "#define HAVE_SYS_SYSLOG_H 1" >>confdefs.h
8807
8808         ;;
8809
8810 *-*-lynxos)
8811         CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
8812
8813 $as_echo "#define BROKEN_SETVBUF 1" >>confdefs.h
8814
8815         ;;
8816 esac
8817
8818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler and flags for sanity" >&5
8819 $as_echo_n "checking compiler and flags for sanity... " >&6; }
8820 if test "$cross_compiling" = yes; then :
8821         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking compiler sanity" >&5
8822 $as_echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;}
8823
8824 else
8825   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8826 /* end confdefs.h.  */
8827  #include <stdio.h>
8828 int
8829 main ()
8830 {
8831  exit(0);
8832   ;
8833   return 0;
8834 }
8835 _ACEOF
8836 if ac_fn_c_try_run "$LINENO"; then :
8837         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8838 $as_echo "yes" >&6; }
8839 else
8840
8841                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8842 $as_echo "no" >&6; }
8843                 as_fn_error $? "*** compiler cannot create working executables, check config.log ***" "$LINENO" 5
8844
8845 fi
8846 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8847   conftest.$ac_objext conftest.beam conftest.$ac_ext
8848 fi
8849
8850
8851 # Checks for libraries.
8852 ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt"
8853 if test "x$ac_cv_func_setsockopt" = xyes; then :
8854
8855 else
8856   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5
8857 $as_echo_n "checking for setsockopt in -lsocket... " >&6; }
8858 if ${ac_cv_lib_socket_setsockopt+:} false; then :
8859   $as_echo_n "(cached) " >&6
8860 else
8861   ac_check_lib_save_LIBS=$LIBS
8862 LIBS="-lsocket  $LIBS"
8863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8864 /* end confdefs.h.  */
8865
8866 /* Override any GCC internal prototype to avoid an error.
8867    Use char because int might match the return type of a GCC
8868    builtin and then its argument prototype would still apply.  */
8869 #ifdef __cplusplus
8870 extern "C"
8871 #endif
8872 char setsockopt ();
8873 int
8874 main ()
8875 {
8876 return setsockopt ();
8877   ;
8878   return 0;
8879 }
8880 _ACEOF
8881 if ac_fn_c_try_link "$LINENO"; then :
8882   ac_cv_lib_socket_setsockopt=yes
8883 else
8884   ac_cv_lib_socket_setsockopt=no
8885 fi
8886 rm -f core conftest.err conftest.$ac_objext \
8887     conftest$ac_exeext conftest.$ac_ext
8888 LIBS=$ac_check_lib_save_LIBS
8889 fi
8890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5
8891 $as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
8892 if test "x$ac_cv_lib_socket_setsockopt" = xyes; then :
8893   cat >>confdefs.h <<_ACEOF
8894 #define HAVE_LIBSOCKET 1
8895 _ACEOF
8896
8897   LIBS="-lsocket $LIBS"
8898
8899 fi
8900
8901 fi
8902
8903
8904 for ac_func in dirname
8905 do :
8906   ac_fn_c_check_func "$LINENO" "dirname" "ac_cv_func_dirname"
8907 if test "x$ac_cv_func_dirname" = xyes; then :
8908   cat >>confdefs.h <<_ACEOF
8909 #define HAVE_DIRNAME 1
8910 _ACEOF
8911  for ac_header in libgen.h
8912 do :
8913   ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
8914 if test "x$ac_cv_header_libgen_h" = xyes; then :
8915   cat >>confdefs.h <<_ACEOF
8916 #define HAVE_LIBGEN_H 1
8917 _ACEOF
8918
8919 fi
8920
8921 done
8922
8923 else
8924
8925         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirname in -lgen" >&5
8926 $as_echo_n "checking for dirname in -lgen... " >&6; }
8927 if ${ac_cv_lib_gen_dirname+:} false; then :
8928   $as_echo_n "(cached) " >&6
8929 else
8930   ac_check_lib_save_LIBS=$LIBS
8931 LIBS="-lgen  $LIBS"
8932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8933 /* end confdefs.h.  */
8934
8935 /* Override any GCC internal prototype to avoid an error.
8936    Use char because int might match the return type of a GCC
8937    builtin and then its argument prototype would still apply.  */
8938 #ifdef __cplusplus
8939 extern "C"
8940 #endif
8941 char dirname ();
8942 int
8943 main ()
8944 {
8945 return dirname ();
8946   ;
8947   return 0;
8948 }
8949 _ACEOF
8950 if ac_fn_c_try_link "$LINENO"; then :
8951   ac_cv_lib_gen_dirname=yes
8952 else
8953   ac_cv_lib_gen_dirname=no
8954 fi
8955 rm -f core conftest.err conftest.$ac_objext \
8956     conftest$ac_exeext conftest.$ac_ext
8957 LIBS=$ac_check_lib_save_LIBS
8958 fi
8959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_dirname" >&5
8960 $as_echo "$ac_cv_lib_gen_dirname" >&6; }
8961 if test "x$ac_cv_lib_gen_dirname" = xyes; then :
8962
8963                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken dirname" >&5
8964 $as_echo_n "checking for broken dirname... " >&6; }
8965 if ${ac_cv_have_broken_dirname+:} false; then :
8966   $as_echo_n "(cached) " >&6
8967 else
8968
8969                         save_LIBS="$LIBS"
8970                         LIBS="$LIBS -lgen"
8971                         if test "$cross_compiling" = yes; then :
8972    ac_cv_have_broken_dirname="no"
8973 else
8974   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8975 /* end confdefs.h.  */
8976
8977 #include <libgen.h>
8978 #include <string.h>
8979
8980 int main(int argc, char **argv) {
8981     char *s, buf[32];
8982
8983     strncpy(buf,"/etc", 32);
8984     s = dirname(buf);
8985     if (!s || strncmp(s, "/", 32) != 0) {
8986         exit(1);
8987     } else {
8988         exit(0);
8989     }
8990 }
8991
8992 _ACEOF
8993 if ac_fn_c_try_run "$LINENO"; then :
8994    ac_cv_have_broken_dirname="no"
8995 else
8996    ac_cv_have_broken_dirname="yes"
8997 fi
8998 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8999   conftest.$ac_objext conftest.beam conftest.$ac_ext
9000 fi
9001
9002                         LIBS="$save_LIBS"
9003
9004 fi
9005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_broken_dirname" >&5
9006 $as_echo "$ac_cv_have_broken_dirname" >&6; }
9007                 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
9008                         LIBS="$LIBS -lgen"
9009                         $as_echo "#define HAVE_DIRNAME 1" >>confdefs.h
9010
9011                         for ac_header in libgen.h
9012 do :
9013   ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
9014 if test "x$ac_cv_header_libgen_h" = xyes; then :
9015   cat >>confdefs.h <<_ACEOF
9016 #define HAVE_LIBGEN_H 1
9017 _ACEOF
9018
9019 fi
9020
9021 done
9022
9023                 fi
9024
9025 fi
9026
9027
9028 fi
9029 done
9030
9031
9032 ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
9033 if test "x$ac_cv_func_getspnam" = xyes; then :
9034
9035 else
9036   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
9037 $as_echo_n "checking for getspnam in -lgen... " >&6; }
9038 if ${ac_cv_lib_gen_getspnam+:} false; then :
9039   $as_echo_n "(cached) " >&6
9040 else
9041   ac_check_lib_save_LIBS=$LIBS
9042 LIBS="-lgen  $LIBS"
9043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9044 /* end confdefs.h.  */
9045
9046 /* Override any GCC internal prototype to avoid an error.
9047    Use char because int might match the return type of a GCC
9048    builtin and then its argument prototype would still apply.  */
9049 #ifdef __cplusplus
9050 extern "C"
9051 #endif
9052 char getspnam ();
9053 int
9054 main ()
9055 {
9056 return getspnam ();
9057   ;
9058   return 0;
9059 }
9060 _ACEOF
9061 if ac_fn_c_try_link "$LINENO"; then :
9062   ac_cv_lib_gen_getspnam=yes
9063 else
9064   ac_cv_lib_gen_getspnam=no
9065 fi
9066 rm -f core conftest.err conftest.$ac_objext \
9067     conftest$ac_exeext conftest.$ac_ext
9068 LIBS=$ac_check_lib_save_LIBS
9069 fi
9070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
9071 $as_echo "$ac_cv_lib_gen_getspnam" >&6; }
9072 if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
9073   LIBS="$LIBS -lgen"
9074 fi
9075
9076 fi
9077
9078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing basename" >&5
9079 $as_echo_n "checking for library containing basename... " >&6; }
9080 if ${ac_cv_search_basename+:} false; then :
9081   $as_echo_n "(cached) " >&6
9082 else
9083   ac_func_search_save_LIBS=$LIBS
9084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9085 /* end confdefs.h.  */
9086
9087 /* Override any GCC internal prototype to avoid an error.
9088    Use char because int might match the return type of a GCC
9089    builtin and then its argument prototype would still apply.  */
9090 #ifdef __cplusplus
9091 extern "C"
9092 #endif
9093 char basename ();
9094 int
9095 main ()
9096 {
9097 return basename ();
9098   ;
9099   return 0;
9100 }
9101 _ACEOF
9102 for ac_lib in '' gen; do
9103   if test -z "$ac_lib"; then
9104     ac_res="none required"
9105   else
9106     ac_res=-l$ac_lib
9107     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9108   fi
9109   if ac_fn_c_try_link "$LINENO"; then :
9110   ac_cv_search_basename=$ac_res
9111 fi
9112 rm -f core conftest.err conftest.$ac_objext \
9113     conftest$ac_exeext
9114   if ${ac_cv_search_basename+:} false; then :
9115   break
9116 fi
9117 done
9118 if ${ac_cv_search_basename+:} false; then :
9119
9120 else
9121   ac_cv_search_basename=no
9122 fi
9123 rm conftest.$ac_ext
9124 LIBS=$ac_func_search_save_LIBS
9125 fi
9126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_basename" >&5
9127 $as_echo "$ac_cv_search_basename" >&6; }
9128 ac_res=$ac_cv_search_basename
9129 if test "$ac_res" != no; then :
9130   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9131
9132 $as_echo "#define HAVE_BASENAME 1" >>confdefs.h
9133
9134 fi
9135
9136
9137
9138 # Check whether --with-zlib was given.
9139 if test "${with_zlib+set}" = set; then :
9140   withval=$with_zlib;  if test "x$withval" = "xno" ; then
9141                 as_fn_error $? "*** zlib is required ***" "$LINENO" 5
9142           elif test "x$withval" != "xyes"; then
9143                 if test -d "$withval/lib"; then
9144                         if test -n "${need_dash_r}"; then
9145                                 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
9146                         else
9147                                 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
9148                         fi
9149                 else
9150                         if test -n "${need_dash_r}"; then
9151                                 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
9152                         else
9153                                 LDFLAGS="-L${withval} ${LDFLAGS}"
9154                         fi
9155                 fi
9156                 if test -d "$withval/include"; then
9157                         CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
9158                 else
9159                         CPPFLAGS="-I${withval} ${CPPFLAGS}"
9160                 fi
9161         fi
9162
9163 fi
9164
9165
9166 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
9167 if test "x$ac_cv_header_zlib_h" = xyes; then :
9168
9169 else
9170   as_fn_error $? "*** zlib.h missing - please install first or check config.log ***" "$LINENO" 5
9171 fi
9172
9173
9174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
9175 $as_echo_n "checking for deflate in -lz... " >&6; }
9176 if ${ac_cv_lib_z_deflate+:} false; then :
9177   $as_echo_n "(cached) " >&6
9178 else
9179   ac_check_lib_save_LIBS=$LIBS
9180 LIBS="-lz  $LIBS"
9181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9182 /* end confdefs.h.  */
9183
9184 /* Override any GCC internal prototype to avoid an error.
9185    Use char because int might match the return type of a GCC
9186    builtin and then its argument prototype would still apply.  */
9187 #ifdef __cplusplus
9188 extern "C"
9189 #endif
9190 char deflate ();
9191 int
9192 main ()
9193 {
9194 return deflate ();
9195   ;
9196   return 0;
9197 }
9198 _ACEOF
9199 if ac_fn_c_try_link "$LINENO"; then :
9200   ac_cv_lib_z_deflate=yes
9201 else
9202   ac_cv_lib_z_deflate=no
9203 fi
9204 rm -f core conftest.err conftest.$ac_objext \
9205     conftest$ac_exeext conftest.$ac_ext
9206 LIBS=$ac_check_lib_save_LIBS
9207 fi
9208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
9209 $as_echo "$ac_cv_lib_z_deflate" >&6; }
9210 if test "x$ac_cv_lib_z_deflate" = xyes; then :
9211   cat >>confdefs.h <<_ACEOF
9212 #define HAVE_LIBZ 1
9213 _ACEOF
9214
9215   LIBS="-lz $LIBS"
9216
9217 else
9218
9219                 saved_CPPFLAGS="$CPPFLAGS"
9220                 saved_LDFLAGS="$LDFLAGS"
9221                 save_LIBS="$LIBS"
9222                                 if test -n "${need_dash_r}"; then
9223                         LDFLAGS="-L/usr/local/lib -R/usr/local/lib ${saved_LDFLAGS}"
9224                 else
9225                         LDFLAGS="-L/usr/local/lib ${saved_LDFLAGS}"
9226                 fi
9227                 CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}"
9228                 LIBS="$LIBS -lz"
9229                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9230 /* end confdefs.h.  */
9231
9232 /* Override any GCC internal prototype to avoid an error.
9233    Use char because int might match the return type of a GCC
9234    builtin and then its argument prototype would still apply.  */
9235 #ifdef __cplusplus
9236 extern "C"
9237 #endif
9238 char deflate ();
9239 int
9240 main ()
9241 {
9242 return deflate ();
9243   ;
9244   return 0;
9245 }
9246 _ACEOF
9247 if ac_fn_c_try_link "$LINENO"; then :
9248   $as_echo "#define HAVE_LIBZ 1" >>confdefs.h
9249
9250 else
9251
9252                                 as_fn_error $? "*** zlib missing - please install first or check config.log ***" "$LINENO" 5
9253
9254
9255 fi
9256 rm -f core conftest.err conftest.$ac_objext \
9257     conftest$ac_exeext conftest.$ac_ext
9258
9259
9260 fi
9261
9262
9263
9264 # Check whether --with-zlib-version-check was given.
9265 if test "${with_zlib_version_check+set}" = set; then :
9266   withval=$with_zlib_version_check;   if test "x$withval" = "xno" ; then
9267                 zlib_check_nonfatal=1
9268            fi
9269
9270
9271 fi
9272
9273
9274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for possibly buggy zlib" >&5
9275 $as_echo_n "checking for possibly buggy zlib... " >&6; }
9276 if test "$cross_compiling" = yes; then :
9277         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking zlib version" >&5
9278 $as_echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;}
9279
9280 else
9281   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9282 /* end confdefs.h.  */
9283
9284 #include <stdio.h>
9285 #include <stdlib.h>
9286 #include <zlib.h>
9287
9288 int
9289 main ()
9290 {
9291
9292         int a=0, b=0, c=0, d=0, n, v;
9293         n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
9294         if (n != 3 && n != 4)
9295                 exit(1);
9296         v = a*1000000 + b*10000 + c*100 + d;
9297         fprintf(stderr, "found zlib version %s (%d)\n", ZLIB_VERSION, v);
9298
9299         /* 1.1.4 is OK */
9300         if (a == 1 && b == 1 && c >= 4)
9301                 exit(0);
9302
9303         /* 1.2.3 and up are OK */
9304         if (v >= 1020300)
9305                 exit(0);
9306
9307         exit(2);
9308
9309   ;
9310   return 0;
9311 }
9312 _ACEOF
9313 if ac_fn_c_try_run "$LINENO"; then :
9314   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9315 $as_echo "no" >&6; }
9316 else
9317    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9318 $as_echo "yes" >&6; }
9319           if test -z "$zlib_check_nonfatal" ; then
9320                 as_fn_error $? "*** zlib too old - check config.log ***
9321 Your reported zlib version has known security problems.  It's possible your
9322 vendor has fixed these problems without changing the version number.  If you
9323 are sure this is the case, you can disable the check by running
9324 \"./configure --without-zlib-version-check\".
9325 If you are in doubt, upgrade zlib to version 1.2.3 or greater.
9326 See http://www.gzip.org/zlib/ for details." "$LINENO" 5
9327           else
9328                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib version may have security problems" >&5
9329 $as_echo "$as_me: WARNING: zlib version may have security problems" >&2;}
9330           fi
9331
9332 fi
9333 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9334   conftest.$ac_objext conftest.beam conftest.$ac_ext
9335 fi
9336
9337
9338 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
9339 if test "x$ac_cv_func_strcasecmp" = xyes; then :
9340
9341 else
9342    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp in -lresolv" >&5
9343 $as_echo_n "checking for strcasecmp in -lresolv... " >&6; }
9344 if ${ac_cv_lib_resolv_strcasecmp+:} false; then :
9345   $as_echo_n "(cached) " >&6
9346 else
9347   ac_check_lib_save_LIBS=$LIBS
9348 LIBS="-lresolv  $LIBS"
9349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9350 /* end confdefs.h.  */
9351
9352 /* Override any GCC internal prototype to avoid an error.
9353    Use char because int might match the return type of a GCC
9354    builtin and then its argument prototype would still apply.  */
9355 #ifdef __cplusplus
9356 extern "C"
9357 #endif
9358 char strcasecmp ();
9359 int
9360 main ()
9361 {
9362 return strcasecmp ();
9363   ;
9364   return 0;
9365 }
9366 _ACEOF
9367 if ac_fn_c_try_link "$LINENO"; then :
9368   ac_cv_lib_resolv_strcasecmp=yes
9369 else
9370   ac_cv_lib_resolv_strcasecmp=no
9371 fi
9372 rm -f core conftest.err conftest.$ac_objext \
9373     conftest$ac_exeext conftest.$ac_ext
9374 LIBS=$ac_check_lib_save_LIBS
9375 fi
9376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_strcasecmp" >&5
9377 $as_echo "$ac_cv_lib_resolv_strcasecmp" >&6; }
9378 if test "x$ac_cv_lib_resolv_strcasecmp" = xyes; then :
9379   LIBS="$LIBS -lresolv"
9380 fi
9381
9382
9383 fi
9384
9385 for ac_func in utimes
9386 do :
9387   ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
9388 if test "x$ac_cv_func_utimes" = xyes; then :
9389   cat >>confdefs.h <<_ACEOF
9390 #define HAVE_UTIMES 1
9391 _ACEOF
9392
9393 else
9394    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimes in -lc89" >&5
9395 $as_echo_n "checking for utimes in -lc89... " >&6; }
9396 if ${ac_cv_lib_c89_utimes+:} false; then :
9397   $as_echo_n "(cached) " >&6
9398 else
9399   ac_check_lib_save_LIBS=$LIBS
9400 LIBS="-lc89  $LIBS"
9401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9402 /* end confdefs.h.  */
9403
9404 /* Override any GCC internal prototype to avoid an error.
9405    Use char because int might match the return type of a GCC
9406    builtin and then its argument prototype would still apply.  */
9407 #ifdef __cplusplus
9408 extern "C"
9409 #endif
9410 char utimes ();
9411 int
9412 main ()
9413 {
9414 return utimes ();
9415   ;
9416   return 0;
9417 }
9418 _ACEOF
9419 if ac_fn_c_try_link "$LINENO"; then :
9420   ac_cv_lib_c89_utimes=yes
9421 else
9422   ac_cv_lib_c89_utimes=no
9423 fi
9424 rm -f core conftest.err conftest.$ac_objext \
9425     conftest$ac_exeext conftest.$ac_ext
9426 LIBS=$ac_check_lib_save_LIBS
9427 fi
9428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c89_utimes" >&5
9429 $as_echo "$ac_cv_lib_c89_utimes" >&6; }
9430 if test "x$ac_cv_lib_c89_utimes" = xyes; then :
9431   $as_echo "#define HAVE_UTIMES 1" >>confdefs.h
9432
9433                                         LIBS="$LIBS -lc89"
9434 fi
9435
9436
9437 fi
9438 done
9439
9440
9441 for ac_header in bsd/libutil.h libutil.h
9442 do :
9443   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
9444 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
9445 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
9446   cat >>confdefs.h <<_ACEOF
9447 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
9448 _ACEOF
9449
9450 fi
9451
9452 done
9453
9454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fmt_scaled" >&5
9455 $as_echo_n "checking for library containing fmt_scaled... " >&6; }
9456 if ${ac_cv_search_fmt_scaled+:} false; then :
9457   $as_echo_n "(cached) " >&6
9458 else
9459   ac_func_search_save_LIBS=$LIBS
9460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9461 /* end confdefs.h.  */
9462
9463 /* Override any GCC internal prototype to avoid an error.
9464    Use char because int might match the return type of a GCC
9465    builtin and then its argument prototype would still apply.  */
9466 #ifdef __cplusplus
9467 extern "C"
9468 #endif
9469 char fmt_scaled ();
9470 int
9471 main ()
9472 {
9473 return fmt_scaled ();
9474   ;
9475   return 0;
9476 }
9477 _ACEOF
9478 for ac_lib in '' util bsd; do
9479   if test -z "$ac_lib"; then
9480     ac_res="none required"
9481   else
9482     ac_res=-l$ac_lib
9483     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9484   fi
9485   if ac_fn_c_try_link "$LINENO"; then :
9486   ac_cv_search_fmt_scaled=$ac_res
9487 fi
9488 rm -f core conftest.err conftest.$ac_objext \
9489     conftest$ac_exeext
9490   if ${ac_cv_search_fmt_scaled+:} false; then :
9491   break
9492 fi
9493 done
9494 if ${ac_cv_search_fmt_scaled+:} false; then :
9495
9496 else
9497   ac_cv_search_fmt_scaled=no
9498 fi
9499 rm conftest.$ac_ext
9500 LIBS=$ac_func_search_save_LIBS
9501 fi
9502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fmt_scaled" >&5
9503 $as_echo "$ac_cv_search_fmt_scaled" >&6; }
9504 ac_res=$ac_cv_search_fmt_scaled
9505 if test "$ac_res" != no; then :
9506   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9507
9508 fi
9509
9510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing scan_scaled" >&5
9511 $as_echo_n "checking for library containing scan_scaled... " >&6; }
9512 if ${ac_cv_search_scan_scaled+:} false; then :
9513   $as_echo_n "(cached) " >&6
9514 else
9515   ac_func_search_save_LIBS=$LIBS
9516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9517 /* end confdefs.h.  */
9518
9519 /* Override any GCC internal prototype to avoid an error.
9520    Use char because int might match the return type of a GCC
9521    builtin and then its argument prototype would still apply.  */
9522 #ifdef __cplusplus
9523 extern "C"
9524 #endif
9525 char scan_scaled ();
9526 int
9527 main ()
9528 {
9529 return scan_scaled ();
9530   ;
9531   return 0;
9532 }
9533 _ACEOF
9534 for ac_lib in '' util bsd; do
9535   if test -z "$ac_lib"; then
9536     ac_res="none required"
9537   else
9538     ac_res=-l$ac_lib
9539     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9540   fi
9541   if ac_fn_c_try_link "$LINENO"; then :
9542   ac_cv_search_scan_scaled=$ac_res
9543 fi
9544 rm -f core conftest.err conftest.$ac_objext \
9545     conftest$ac_exeext
9546   if ${ac_cv_search_scan_scaled+:} false; then :
9547   break
9548 fi
9549 done
9550 if ${ac_cv_search_scan_scaled+:} false; then :
9551
9552 else
9553   ac_cv_search_scan_scaled=no
9554 fi
9555 rm conftest.$ac_ext
9556 LIBS=$ac_func_search_save_LIBS
9557 fi
9558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_scan_scaled" >&5
9559 $as_echo "$ac_cv_search_scan_scaled" >&6; }
9560 ac_res=$ac_cv_search_scan_scaled
9561 if test "$ac_res" != no; then :
9562   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9563
9564 fi
9565
9566 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing login" >&5
9567 $as_echo_n "checking for library containing login... " >&6; }
9568 if ${ac_cv_search_login+:} false; then :
9569   $as_echo_n "(cached) " >&6
9570 else
9571   ac_func_search_save_LIBS=$LIBS
9572 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9573 /* end confdefs.h.  */
9574
9575 /* Override any GCC internal prototype to avoid an error.
9576    Use char because int might match the return type of a GCC
9577    builtin and then its argument prototype would still apply.  */
9578 #ifdef __cplusplus
9579 extern "C"
9580 #endif
9581 char login ();
9582 int
9583 main ()
9584 {
9585 return login ();
9586   ;
9587   return 0;
9588 }
9589 _ACEOF
9590 for ac_lib in '' util bsd; do
9591   if test -z "$ac_lib"; then
9592     ac_res="none required"
9593   else
9594     ac_res=-l$ac_lib
9595     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9596   fi
9597   if ac_fn_c_try_link "$LINENO"; then :
9598   ac_cv_search_login=$ac_res
9599 fi
9600 rm -f core conftest.err conftest.$ac_objext \
9601     conftest$ac_exeext
9602   if ${ac_cv_search_login+:} false; then :
9603   break
9604 fi
9605 done
9606 if ${ac_cv_search_login+:} false; then :
9607
9608 else
9609   ac_cv_search_login=no
9610 fi
9611 rm conftest.$ac_ext
9612 LIBS=$ac_func_search_save_LIBS
9613 fi
9614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_login" >&5
9615 $as_echo "$ac_cv_search_login" >&6; }
9616 ac_res=$ac_cv_search_login
9617 if test "$ac_res" != no; then :
9618   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9619
9620 fi
9621
9622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing logout" >&5
9623 $as_echo_n "checking for library containing logout... " >&6; }
9624 if ${ac_cv_search_logout+:} false; then :
9625   $as_echo_n "(cached) " >&6
9626 else
9627   ac_func_search_save_LIBS=$LIBS
9628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9629 /* end confdefs.h.  */
9630
9631 /* Override any GCC internal prototype to avoid an error.
9632    Use char because int might match the return type of a GCC
9633    builtin and then its argument prototype would still apply.  */
9634 #ifdef __cplusplus
9635 extern "C"
9636 #endif
9637 char logout ();
9638 int
9639 main ()
9640 {
9641 return logout ();
9642   ;
9643   return 0;
9644 }
9645 _ACEOF
9646 for ac_lib in '' util bsd; do
9647   if test -z "$ac_lib"; then
9648     ac_res="none required"
9649   else
9650     ac_res=-l$ac_lib
9651     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9652   fi
9653   if ac_fn_c_try_link "$LINENO"; then :
9654   ac_cv_search_logout=$ac_res
9655 fi
9656 rm -f core conftest.err conftest.$ac_objext \
9657     conftest$ac_exeext
9658   if ${ac_cv_search_logout+:} false; then :
9659   break
9660 fi
9661 done
9662 if ${ac_cv_search_logout+:} false; then :
9663
9664 else
9665   ac_cv_search_logout=no
9666 fi
9667 rm conftest.$ac_ext
9668 LIBS=$ac_func_search_save_LIBS
9669 fi
9670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_logout" >&5
9671 $as_echo "$ac_cv_search_logout" >&6; }
9672 ac_res=$ac_cv_search_logout
9673 if test "$ac_res" != no; then :
9674   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9675
9676 fi
9677
9678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing logwtmp" >&5
9679 $as_echo_n "checking for library containing logwtmp... " >&6; }
9680 if ${ac_cv_search_logwtmp+:} false; then :
9681   $as_echo_n "(cached) " >&6
9682 else
9683   ac_func_search_save_LIBS=$LIBS
9684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9685 /* end confdefs.h.  */
9686
9687 /* Override any GCC internal prototype to avoid an error.
9688    Use char because int might match the return type of a GCC
9689    builtin and then its argument prototype would still apply.  */
9690 #ifdef __cplusplus
9691 extern "C"
9692 #endif
9693 char logwtmp ();
9694 int
9695 main ()
9696 {
9697 return logwtmp ();
9698   ;
9699   return 0;
9700 }
9701 _ACEOF
9702 for ac_lib in '' util bsd; do
9703   if test -z "$ac_lib"; then
9704     ac_res="none required"
9705   else
9706     ac_res=-l$ac_lib
9707     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9708   fi
9709   if ac_fn_c_try_link "$LINENO"; then :
9710   ac_cv_search_logwtmp=$ac_res
9711 fi
9712 rm -f core conftest.err conftest.$ac_objext \
9713     conftest$ac_exeext
9714   if ${ac_cv_search_logwtmp+:} false; then :
9715   break
9716 fi
9717 done
9718 if ${ac_cv_search_logwtmp+:} false; then :
9719
9720 else
9721   ac_cv_search_logwtmp=no
9722 fi
9723 rm conftest.$ac_ext
9724 LIBS=$ac_func_search_save_LIBS
9725 fi
9726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_logwtmp" >&5
9727 $as_echo "$ac_cv_search_logwtmp" >&6; }
9728 ac_res=$ac_cv_search_logwtmp
9729 if test "$ac_res" != no; then :
9730   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9731
9732 fi
9733
9734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openpty" >&5
9735 $as_echo_n "checking for library containing openpty... " >&6; }
9736 if ${ac_cv_search_openpty+:} false; then :
9737   $as_echo_n "(cached) " >&6
9738 else
9739   ac_func_search_save_LIBS=$LIBS
9740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9741 /* end confdefs.h.  */
9742
9743 /* Override any GCC internal prototype to avoid an error.
9744    Use char because int might match the return type of a GCC
9745    builtin and then its argument prototype would still apply.  */
9746 #ifdef __cplusplus
9747 extern "C"
9748 #endif
9749 char openpty ();
9750 int
9751 main ()
9752 {
9753 return openpty ();
9754   ;
9755   return 0;
9756 }
9757 _ACEOF
9758 for ac_lib in '' util bsd; do
9759   if test -z "$ac_lib"; then
9760     ac_res="none required"
9761   else
9762     ac_res=-l$ac_lib
9763     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9764   fi
9765   if ac_fn_c_try_link "$LINENO"; then :
9766   ac_cv_search_openpty=$ac_res
9767 fi
9768 rm -f core conftest.err conftest.$ac_objext \
9769     conftest$ac_exeext
9770   if ${ac_cv_search_openpty+:} false; then :
9771   break
9772 fi
9773 done
9774 if ${ac_cv_search_openpty+:} false; then :
9775
9776 else
9777   ac_cv_search_openpty=no
9778 fi
9779 rm conftest.$ac_ext
9780 LIBS=$ac_func_search_save_LIBS
9781 fi
9782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openpty" >&5
9783 $as_echo "$ac_cv_search_openpty" >&6; }
9784 ac_res=$ac_cv_search_openpty
9785 if test "$ac_res" != no; then :
9786   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9787
9788 fi
9789
9790 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing updwtmp" >&5
9791 $as_echo_n "checking for library containing updwtmp... " >&6; }
9792 if ${ac_cv_search_updwtmp+:} false; then :
9793   $as_echo_n "(cached) " >&6
9794 else
9795   ac_func_search_save_LIBS=$LIBS
9796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9797 /* end confdefs.h.  */
9798
9799 /* Override any GCC internal prototype to avoid an error.
9800    Use char because int might match the return type of a GCC
9801    builtin and then its argument prototype would still apply.  */
9802 #ifdef __cplusplus
9803 extern "C"
9804 #endif
9805 char updwtmp ();
9806 int
9807 main ()
9808 {
9809 return updwtmp ();
9810   ;
9811   return 0;
9812 }
9813 _ACEOF
9814 for ac_lib in '' util bsd; do
9815   if test -z "$ac_lib"; then
9816     ac_res="none required"
9817   else
9818     ac_res=-l$ac_lib
9819     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9820   fi
9821   if ac_fn_c_try_link "$LINENO"; then :
9822   ac_cv_search_updwtmp=$ac_res
9823 fi
9824 rm -f core conftest.err conftest.$ac_objext \
9825     conftest$ac_exeext
9826   if ${ac_cv_search_updwtmp+:} false; then :
9827   break
9828 fi
9829 done
9830 if ${ac_cv_search_updwtmp+:} false; then :
9831
9832 else
9833   ac_cv_search_updwtmp=no
9834 fi
9835 rm conftest.$ac_ext
9836 LIBS=$ac_func_search_save_LIBS
9837 fi
9838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_updwtmp" >&5
9839 $as_echo "$ac_cv_search_updwtmp" >&6; }
9840 ac_res=$ac_cv_search_updwtmp
9841 if test "$ac_res" != no; then :
9842   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9843
9844 fi
9845
9846 for ac_func in fmt_scaled scan_scaled login logout openpty updwtmp logwtmp
9847 do :
9848   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9849 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9850 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9851   cat >>confdefs.h <<_ACEOF
9852 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9853 _ACEOF
9854
9855 fi
9856 done
9857
9858
9859 # On some platforms, inet_ntop and gethostbyname may be found in libresolv
9860 # or libnsl.
9861 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
9862 $as_echo_n "checking for library containing inet_ntop... " >&6; }
9863 if ${ac_cv_search_inet_ntop+:} false; then :
9864   $as_echo_n "(cached) " >&6
9865 else
9866   ac_func_search_save_LIBS=$LIBS
9867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9868 /* end confdefs.h.  */
9869
9870 /* Override any GCC internal prototype to avoid an error.
9871    Use char because int might match the return type of a GCC
9872    builtin and then its argument prototype would still apply.  */
9873 #ifdef __cplusplus
9874 extern "C"
9875 #endif
9876 char inet_ntop ();
9877 int
9878 main ()
9879 {
9880 return inet_ntop ();
9881   ;
9882   return 0;
9883 }
9884 _ACEOF
9885 for ac_lib in '' resolv nsl; do
9886   if test -z "$ac_lib"; then
9887     ac_res="none required"
9888   else
9889     ac_res=-l$ac_lib
9890     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9891   fi
9892   if ac_fn_c_try_link "$LINENO"; then :
9893   ac_cv_search_inet_ntop=$ac_res
9894 fi
9895 rm -f core conftest.err conftest.$ac_objext \
9896     conftest$ac_exeext
9897   if ${ac_cv_search_inet_ntop+:} false; then :
9898   break
9899 fi
9900 done
9901 if ${ac_cv_search_inet_ntop+:} false; then :
9902
9903 else
9904   ac_cv_search_inet_ntop=no
9905 fi
9906 rm conftest.$ac_ext
9907 LIBS=$ac_func_search_save_LIBS
9908 fi
9909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
9910 $as_echo "$ac_cv_search_inet_ntop" >&6; }
9911 ac_res=$ac_cv_search_inet_ntop
9912 if test "$ac_res" != no; then :
9913   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9914
9915 fi
9916
9917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
9918 $as_echo_n "checking for library containing gethostbyname... " >&6; }
9919 if ${ac_cv_search_gethostbyname+:} false; then :
9920   $as_echo_n "(cached) " >&6
9921 else
9922   ac_func_search_save_LIBS=$LIBS
9923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9924 /* end confdefs.h.  */
9925
9926 /* Override any GCC internal prototype to avoid an error.
9927    Use char because int might match the return type of a GCC
9928    builtin and then its argument prototype would still apply.  */
9929 #ifdef __cplusplus
9930 extern "C"
9931 #endif
9932 char gethostbyname ();
9933 int
9934 main ()
9935 {
9936 return gethostbyname ();
9937   ;
9938   return 0;
9939 }
9940 _ACEOF
9941 for ac_lib in '' resolv nsl; do
9942   if test -z "$ac_lib"; then
9943     ac_res="none required"
9944   else
9945     ac_res=-l$ac_lib
9946     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9947   fi
9948   if ac_fn_c_try_link "$LINENO"; then :
9949   ac_cv_search_gethostbyname=$ac_res
9950 fi
9951 rm -f core conftest.err conftest.$ac_objext \
9952     conftest$ac_exeext
9953   if ${ac_cv_search_gethostbyname+:} false; then :
9954   break
9955 fi
9956 done
9957 if ${ac_cv_search_gethostbyname+:} false; then :
9958
9959 else
9960   ac_cv_search_gethostbyname=no
9961 fi
9962 rm conftest.$ac_ext
9963 LIBS=$ac_func_search_save_LIBS
9964 fi
9965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
9966 $as_echo "$ac_cv_search_gethostbyname" >&6; }
9967 ac_res=$ac_cv_search_gethostbyname
9968 if test "$ac_res" != no; then :
9969   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9970
9971 fi
9972
9973
9974 # "Particular Function Checks"
9975 # see https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Functions.html
9976 for ac_func in strftime
9977 do :
9978   ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
9979 if test "x$ac_cv_func_strftime" = xyes; then :
9980   cat >>confdefs.h <<_ACEOF
9981 #define HAVE_STRFTIME 1
9982 _ACEOF
9983
9984 else
9985   # strftime is in -lintl on SCO UNIX.
9986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
9987 $as_echo_n "checking for strftime in -lintl... " >&6; }
9988 if ${ac_cv_lib_intl_strftime+:} false; then :
9989   $as_echo_n "(cached) " >&6
9990 else
9991   ac_check_lib_save_LIBS=$LIBS
9992 LIBS="-lintl  $LIBS"
9993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9994 /* end confdefs.h.  */
9995
9996 /* Override any GCC internal prototype to avoid an error.
9997    Use char because int might match the return type of a GCC
9998    builtin and then its argument prototype would still apply.  */
9999 #ifdef __cplusplus
10000 extern "C"
10001 #endif
10002 char strftime ();
10003 int
10004 main ()
10005 {
10006 return strftime ();
10007   ;
10008   return 0;
10009 }
10010 _ACEOF
10011 if ac_fn_c_try_link "$LINENO"; then :
10012   ac_cv_lib_intl_strftime=yes
10013 else
10014   ac_cv_lib_intl_strftime=no
10015 fi
10016 rm -f core conftest.err conftest.$ac_objext \
10017     conftest$ac_exeext conftest.$ac_ext
10018 LIBS=$ac_check_lib_save_LIBS
10019 fi
10020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
10021 $as_echo "$ac_cv_lib_intl_strftime" >&6; }
10022 if test "x$ac_cv_lib_intl_strftime" = xyes; then :
10023   $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
10024
10025 LIBS="-lintl $LIBS"
10026 fi
10027
10028 fi
10029 done
10030
10031 for ac_header in stdlib.h
10032 do :
10033   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
10034 if test "x$ac_cv_header_stdlib_h" = xyes; then :
10035   cat >>confdefs.h <<_ACEOF
10036 #define HAVE_STDLIB_H 1
10037 _ACEOF
10038
10039 fi
10040
10041 done
10042
10043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
10044 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
10045 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
10046   $as_echo_n "(cached) " >&6
10047 else
10048   if test "$cross_compiling" = yes; then :
10049   ac_cv_func_malloc_0_nonnull=no
10050 else
10051   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10052 /* end confdefs.h.  */
10053 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
10054 # include <stdlib.h>
10055 #else
10056 char *malloc ();
10057 #endif
10058
10059 int
10060 main ()
10061 {
10062 return ! malloc (0);
10063   ;
10064   return 0;
10065 }
10066 _ACEOF
10067 if ac_fn_c_try_run "$LINENO"; then :
10068   ac_cv_func_malloc_0_nonnull=yes
10069 else
10070   ac_cv_func_malloc_0_nonnull=no
10071 fi
10072 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10073   conftest.$ac_objext conftest.beam conftest.$ac_ext
10074 fi
10075
10076 fi
10077 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
10078 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
10079 if test $ac_cv_func_malloc_0_nonnull = yes; then :
10080
10081 $as_echo "#define HAVE_MALLOC 1" >>confdefs.h
10082
10083 else
10084   $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
10085
10086    case " $LIBOBJS " in
10087   *" malloc.$ac_objext "* ) ;;
10088   *) LIBOBJS="$LIBOBJS malloc.$ac_objext"
10089  ;;
10090 esac
10091
10092
10093 $as_echo "#define malloc rpl_malloc" >>confdefs.h
10094
10095 fi
10096
10097
10098 for ac_header in stdlib.h
10099 do :
10100   ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
10101 if test "x$ac_cv_header_stdlib_h" = xyes; then :
10102   cat >>confdefs.h <<_ACEOF
10103 #define HAVE_STDLIB_H 1
10104 _ACEOF
10105
10106 fi
10107
10108 done
10109
10110 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
10111 $as_echo_n "checking for GNU libc compatible realloc... " >&6; }
10112 if ${ac_cv_func_realloc_0_nonnull+:} false; then :
10113   $as_echo_n "(cached) " >&6
10114 else
10115   if test "$cross_compiling" = yes; then :
10116   ac_cv_func_realloc_0_nonnull=no
10117 else
10118   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10119 /* end confdefs.h.  */
10120 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
10121 # include <stdlib.h>
10122 #else
10123 char *realloc ();
10124 #endif
10125
10126 int
10127 main ()
10128 {
10129 return ! realloc (0, 0);
10130   ;
10131   return 0;
10132 }
10133 _ACEOF
10134 if ac_fn_c_try_run "$LINENO"; then :
10135   ac_cv_func_realloc_0_nonnull=yes
10136 else
10137   ac_cv_func_realloc_0_nonnull=no
10138 fi
10139 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10140   conftest.$ac_objext conftest.beam conftest.$ac_ext
10141 fi
10142
10143 fi
10144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
10145 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
10146 if test $ac_cv_func_realloc_0_nonnull = yes; then :
10147
10148 $as_echo "#define HAVE_REALLOC 1" >>confdefs.h
10149
10150 else
10151   $as_echo "#define HAVE_REALLOC 0" >>confdefs.h
10152
10153    case " $LIBOBJS " in
10154   *" realloc.$ac_objext "* ) ;;
10155   *) LIBOBJS="$LIBOBJS realloc.$ac_objext"
10156  ;;
10157 esac
10158
10159
10160 $as_echo "#define realloc rpl_realloc" >>confdefs.h
10161
10162 fi
10163
10164
10165 # autoconf doesn't have AC_FUNC_CALLOC so fake it if malloc returns NULL;
10166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if calloc(0, N) returns non-null" >&5
10167 $as_echo_n "checking if calloc(0, N) returns non-null... " >&6; }
10168 if test "$cross_compiling" = yes; then :
10169    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming same as malloc" >&5
10170 $as_echo "$as_me: WARNING: cross compiling: assuming same as malloc" >&2;}
10171           func_calloc_0_nonnull="$ac_cv_func_malloc_0_nonnull"
10172
10173 else
10174   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10175 /* end confdefs.h.  */
10176  #include <stdlib.h>
10177 int
10178 main ()
10179 {
10180  void *p = calloc(0, 1); exit(p == NULL);
10181
10182   ;
10183   return 0;
10184 }
10185 _ACEOF
10186 if ac_fn_c_try_run "$LINENO"; then :
10187    func_calloc_0_nonnull=yes
10188 else
10189    func_calloc_0_nonnull=no
10190 fi
10191 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10192   conftest.$ac_objext conftest.beam conftest.$ac_ext
10193 fi
10194
10195 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $func_calloc_0_nonnull" >&5
10196 $as_echo "$func_calloc_0_nonnull" >&6; }
10197
10198 if test "x$func_calloc_0_nonnull" == "xyes"; then
10199
10200 $as_echo "#define HAVE_CALLOC 1" >>confdefs.h
10201
10202 else
10203
10204 $as_echo "#define HAVE_CALLOC 0" >>confdefs.h
10205
10206
10207 $as_echo "#define calloc rpl_calloc" >>confdefs.h
10208
10209 fi
10210
10211 # Check for ALTDIRFUNC glob() extension
10212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_ALTDIRFUNC support" >&5
10213 $as_echo_n "checking for GLOB_ALTDIRFUNC support... " >&6; }
10214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10215 /* end confdefs.h.  */
10216
10217                 #include <glob.h>
10218                 #ifdef GLOB_ALTDIRFUNC
10219                 FOUNDIT
10220                 #endif
10221
10222 _ACEOF
10223 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10224   $EGREP "FOUNDIT" >/dev/null 2>&1; then :
10225
10226
10227 $as_echo "#define GLOB_HAS_ALTDIRFUNC 1" >>confdefs.h
10228
10229                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10230 $as_echo "yes" >&6; }
10231
10232 else
10233
10234                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10235 $as_echo "no" >&6; }
10236
10237
10238 fi
10239 rm -f conftest*
10240
10241
10242 # Check for g.gl_matchc glob() extension
10243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_matchc field in glob_t" >&5
10244 $as_echo_n "checking for gl_matchc field in glob_t... " >&6; }
10245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10246 /* end confdefs.h.  */
10247  #include <glob.h>
10248 int
10249 main ()
10250 {
10251  glob_t g; g.gl_matchc = 1;
10252   ;
10253   return 0;
10254 }
10255 _ACEOF
10256 if ac_fn_c_try_compile "$LINENO"; then :
10257
10258
10259 $as_echo "#define GLOB_HAS_GL_MATCHC 1" >>confdefs.h
10260
10261                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10262 $as_echo "yes" >&6; }
10263
10264 else
10265
10266                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10267 $as_echo "no" >&6; }
10268
10269 fi
10270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10271
10272 # Check for g.gl_statv glob() extension
10273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_statv and GLOB_KEEPSTAT extensions for glob" >&5
10274 $as_echo_n "checking for gl_statv and GLOB_KEEPSTAT extensions for glob... " >&6; }
10275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10276 /* end confdefs.h.  */
10277  #include <glob.h>
10278 int
10279 main ()
10280 {
10281
10282 #ifndef GLOB_KEEPSTAT
10283 #error "glob does not support GLOB_KEEPSTAT extension"
10284 #endif
10285 glob_t g;
10286 g.gl_statv = NULL;
10287
10288   ;
10289   return 0;
10290 }
10291 _ACEOF
10292 if ac_fn_c_try_compile "$LINENO"; then :
10293
10294
10295 $as_echo "#define GLOB_HAS_GL_STATV 1" >>confdefs.h
10296
10297                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10298 $as_echo "yes" >&6; }
10299
10300 else
10301
10302                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10303 $as_echo "no" >&6; }
10304
10305
10306 fi
10307 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10308
10309 ac_fn_c_check_decl "$LINENO" "GLOB_NOMATCH" "ac_cv_have_decl_GLOB_NOMATCH" "#include <glob.h>
10310 "
10311 if test "x$ac_cv_have_decl_GLOB_NOMATCH" = xyes; then :
10312   ac_have_decl=1
10313 else
10314   ac_have_decl=0
10315 fi
10316
10317 cat >>confdefs.h <<_ACEOF
10318 #define HAVE_DECL_GLOB_NOMATCH $ac_have_decl
10319 _ACEOF
10320
10321
10322 ac_fn_c_check_decl "$LINENO" "VIS_ALL" "ac_cv_have_decl_VIS_ALL" "#include <vis.h>
10323 "
10324 if test "x$ac_cv_have_decl_VIS_ALL" = xyes; then :
10325
10326 else
10327
10328 $as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
10329
10330 fi
10331
10332
10333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct dirent allocates space for d_name" >&5
10334 $as_echo_n "checking whether struct dirent allocates space for d_name... " >&6; }
10335 if test "$cross_compiling" = yes; then :
10336
10337                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&5
10338 $as_echo "$as_me: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&2;}
10339                 $as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
10340
10341
10342
10343 else
10344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10345 /* end confdefs.h.  */
10346
10347 #include <sys/types.h>
10348 #include <dirent.h>
10349 int
10350 main ()
10351 {
10352
10353         struct dirent d;
10354         exit(sizeof(d.d_name)<=sizeof(char));
10355
10356   ;
10357   return 0;
10358 }
10359 _ACEOF
10360 if ac_fn_c_try_run "$LINENO"; then :
10361   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10362 $as_echo "yes" >&6; }
10363 else
10364
10365                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10366 $as_echo "no" >&6; }
10367
10368 $as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
10369
10370
10371 fi
10372 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10373   conftest.$ac_objext conftest.beam conftest.$ac_ext
10374 fi
10375
10376
10377 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /proc/pid/fd directory" >&5
10378 $as_echo_n "checking for /proc/pid/fd directory... " >&6; }
10379 if test -d "/proc/$$/fd" ; then
10380
10381 $as_echo "#define HAVE_PROC_PID 1" >>confdefs.h
10382
10383         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10384 $as_echo "yes" >&6; }
10385 else
10386         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10387 $as_echo "no" >&6; }
10388 fi
10389
10390 # Check whether user wants S/Key support
10391 SKEY_MSG="no"
10392
10393 # Check whether --with-skey was given.
10394 if test "${with_skey+set}" = set; then :
10395   withval=$with_skey;
10396                 if test "x$withval" != "xno" ; then
10397
10398                         if test "x$withval" != "xyes" ; then
10399                                 CPPFLAGS="$CPPFLAGS -I${withval}/include"
10400                                 LDFLAGS="$LDFLAGS -L${withval}/lib"
10401                         fi
10402
10403
10404 $as_echo "#define SKEY 1" >>confdefs.h
10405
10406                         LIBS="-lskey $LIBS"
10407                         SKEY_MSG="yes"
10408
10409                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for s/key support" >&5
10410 $as_echo_n "checking for s/key support... " >&6; }
10411                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10412 /* end confdefs.h.  */
10413
10414 #include <stdio.h>
10415 #include <skey.h>
10416
10417 int
10418 main ()
10419 {
10420
10421         char *ff = skey_keyinfo(""); ff="";
10422         exit(0);
10423
10424   ;
10425   return 0;
10426 }
10427 _ACEOF
10428 if ac_fn_c_try_link "$LINENO"; then :
10429   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10430 $as_echo "yes" >&6; }
10431 else
10432
10433                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10434 $as_echo "no" >&6; }
10435                                         as_fn_error $? "** Incomplete or missing s/key libraries." "$LINENO" 5
10436
10437 fi
10438 rm -f core conftest.err conftest.$ac_objext \
10439     conftest$ac_exeext conftest.$ac_ext
10440                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if skeychallenge takes 4 arguments" >&5
10441 $as_echo_n "checking if skeychallenge takes 4 arguments... " >&6; }
10442                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10443 /* end confdefs.h.  */
10444
10445 #include <stdio.h>
10446 #include <skey.h>
10447
10448 int
10449 main ()
10450 {
10451
10452         (void)skeychallenge(NULL,"name","",0);
10453
10454   ;
10455   return 0;
10456 }
10457 _ACEOF
10458 if ac_fn_c_try_compile "$LINENO"; then :
10459
10460                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10461 $as_echo "yes" >&6; }
10462
10463 $as_echo "#define SKEYCHALLENGE_4ARG 1" >>confdefs.h
10464
10465 else
10466
10467                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10468 $as_echo "no" >&6; }
10469
10470 fi
10471 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10472                 fi
10473
10474
10475 fi
10476
10477
10478 # Check whether user wants to use ldns
10479 LDNS_MSG="no"
10480
10481 # Check whether --with-ldns was given.
10482 if test "${with_ldns+set}" = set; then :
10483   withval=$with_ldns;
10484         ldns=""
10485         if test "x$withval" = "xyes" ; then
10486                 if test -n "$ac_tool_prefix"; then
10487   # Extract the first word of "${ac_tool_prefix}ldns-config", so it can be a program name with args.
10488 set dummy ${ac_tool_prefix}ldns-config; ac_word=$2
10489 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10490 $as_echo_n "checking for $ac_word... " >&6; }
10491 if ${ac_cv_path_LDNSCONFIG+:} false; then :
10492   $as_echo_n "(cached) " >&6
10493 else
10494   case $LDNSCONFIG in
10495   [\\/]* | ?:[\\/]*)
10496   ac_cv_path_LDNSCONFIG="$LDNSCONFIG" # Let the user override the test with a path.
10497   ;;
10498   *)
10499   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10500 for as_dir in $PATH
10501 do
10502   IFS=$as_save_IFS
10503   test -z "$as_dir" && as_dir=.
10504     for ac_exec_ext in '' $ac_executable_extensions; do
10505   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10506     ac_cv_path_LDNSCONFIG="$as_dir/$ac_word$ac_exec_ext"
10507     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10508     break 2
10509   fi
10510 done
10511   done
10512 IFS=$as_save_IFS
10513
10514   ;;
10515 esac
10516 fi
10517 LDNSCONFIG=$ac_cv_path_LDNSCONFIG
10518 if test -n "$LDNSCONFIG"; then
10519   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDNSCONFIG" >&5
10520 $as_echo "$LDNSCONFIG" >&6; }
10521 else
10522   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10523 $as_echo "no" >&6; }
10524 fi
10525
10526
10527 fi
10528 if test -z "$ac_cv_path_LDNSCONFIG"; then
10529   ac_pt_LDNSCONFIG=$LDNSCONFIG
10530   # Extract the first word of "ldns-config", so it can be a program name with args.
10531 set dummy ldns-config; ac_word=$2
10532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10533 $as_echo_n "checking for $ac_word... " >&6; }
10534 if ${ac_cv_path_ac_pt_LDNSCONFIG+:} false; then :
10535   $as_echo_n "(cached) " >&6
10536 else
10537   case $ac_pt_LDNSCONFIG in
10538   [\\/]* | ?:[\\/]*)
10539   ac_cv_path_ac_pt_LDNSCONFIG="$ac_pt_LDNSCONFIG" # Let the user override the test with a path.
10540   ;;
10541   *)
10542   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10543 for as_dir in $PATH
10544 do
10545   IFS=$as_save_IFS
10546   test -z "$as_dir" && as_dir=.
10547     for ac_exec_ext in '' $ac_executable_extensions; do
10548   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10549     ac_cv_path_ac_pt_LDNSCONFIG="$as_dir/$ac_word$ac_exec_ext"
10550     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10551     break 2
10552   fi
10553 done
10554   done
10555 IFS=$as_save_IFS
10556
10557   ;;
10558 esac
10559 fi
10560 ac_pt_LDNSCONFIG=$ac_cv_path_ac_pt_LDNSCONFIG
10561 if test -n "$ac_pt_LDNSCONFIG"; then
10562   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_LDNSCONFIG" >&5
10563 $as_echo "$ac_pt_LDNSCONFIG" >&6; }
10564 else
10565   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10566 $as_echo "no" >&6; }
10567 fi
10568
10569   if test "x$ac_pt_LDNSCONFIG" = x; then
10570     LDNSCONFIG="no"
10571   else
10572     case $cross_compiling:$ac_tool_warned in
10573 yes:)
10574 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10575 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10576 ac_tool_warned=yes ;;
10577 esac
10578     LDNSCONFIG=$ac_pt_LDNSCONFIG
10579   fi
10580 else
10581   LDNSCONFIG="$ac_cv_path_LDNSCONFIG"
10582 fi
10583
10584                 if test "x$LDNSCONFIG" = "xno"; then
10585                         CPPFLAGS="$CPPFLAGS -I${withval}/include"
10586                         LDFLAGS="$LDFLAGS -L${withval}/lib"
10587                         LIBS="-lldns $LIBS"
10588                         ldns=yes
10589                 else
10590                         LIBS="$LIBS `$LDNSCONFIG --libs`"
10591                         CPPFLAGS="$CPPFLAGS `$LDNSCONFIG --cflags`"
10592                         ldns=yes
10593                 fi
10594         elif test "x$withval" != "xno" ; then
10595                         CPPFLAGS="$CPPFLAGS -I${withval}/include"
10596                         LDFLAGS="$LDFLAGS -L${withval}/lib"
10597                         LIBS="-lldns $LIBS"
10598                         ldns=yes
10599         fi
10600
10601         # Verify that it works.
10602         if test "x$ldns" = "xyes" ; then
10603
10604 $as_echo "#define HAVE_LDNS 1" >>confdefs.h
10605
10606                 LDNS_MSG="yes"
10607                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldns support" >&5
10608 $as_echo_n "checking for ldns support... " >&6; }
10609                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10610 /* end confdefs.h.  */
10611
10612 #include <stdio.h>
10613 #include <stdlib.h>
10614 #include <stdint.h>
10615 #include <ldns/ldns.h>
10616 int main() { ldns_status status = ldns_verify_trusted(NULL, NULL, NULL, NULL); status=LDNS_STATUS_OK; exit(0); }
10617
10618
10619 _ACEOF
10620 if ac_fn_c_try_link "$LINENO"; then :
10621   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10622 $as_echo "yes" >&6; }
10623 else
10624
10625                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10626 $as_echo "no" >&6; }
10627                                         as_fn_error $? "** Incomplete or missing ldns libraries." "$LINENO" 5
10628
10629 fi
10630 rm -f core conftest.err conftest.$ac_objext \
10631     conftest$ac_exeext conftest.$ac_ext
10632         fi
10633
10634 fi
10635
10636
10637 # Check whether user wants libedit support
10638 LIBEDIT_MSG="no"
10639
10640 # Check whether --with-libedit was given.
10641 if test "${with_libedit+set}" = set; then :
10642   withval=$with_libedit;  if test "x$withval" != "xno" ; then
10643                 if test "x$withval" = "xyes" ; then
10644                         if test -n "$ac_tool_prefix"; then
10645   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10646 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10648 $as_echo_n "checking for $ac_word... " >&6; }
10649 if ${ac_cv_path_PKGCONFIG+:} false; then :
10650   $as_echo_n "(cached) " >&6
10651 else
10652   case $PKGCONFIG in
10653   [\\/]* | ?:[\\/]*)
10654   ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
10655   ;;
10656   *)
10657   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10658 for as_dir in $PATH
10659 do
10660   IFS=$as_save_IFS
10661   test -z "$as_dir" && as_dir=.
10662     for ac_exec_ext in '' $ac_executable_extensions; do
10663   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10664     ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
10665     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10666     break 2
10667   fi
10668 done
10669   done
10670 IFS=$as_save_IFS
10671
10672   ;;
10673 esac
10674 fi
10675 PKGCONFIG=$ac_cv_path_PKGCONFIG
10676 if test -n "$PKGCONFIG"; then
10677   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
10678 $as_echo "$PKGCONFIG" >&6; }
10679 else
10680   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10681 $as_echo "no" >&6; }
10682 fi
10683
10684
10685 fi
10686 if test -z "$ac_cv_path_PKGCONFIG"; then
10687   ac_pt_PKGCONFIG=$PKGCONFIG
10688   # Extract the first word of "pkg-config", so it can be a program name with args.
10689 set dummy pkg-config; ac_word=$2
10690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10691 $as_echo_n "checking for $ac_word... " >&6; }
10692 if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
10693   $as_echo_n "(cached) " >&6
10694 else
10695   case $ac_pt_PKGCONFIG in
10696   [\\/]* | ?:[\\/]*)
10697   ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
10698   ;;
10699   *)
10700   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10701 for as_dir in $PATH
10702 do
10703   IFS=$as_save_IFS
10704   test -z "$as_dir" && as_dir=.
10705     for ac_exec_ext in '' $ac_executable_extensions; do
10706   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10707     ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
10708     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10709     break 2
10710   fi
10711 done
10712   done
10713 IFS=$as_save_IFS
10714
10715   ;;
10716 esac
10717 fi
10718 ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
10719 if test -n "$ac_pt_PKGCONFIG"; then
10720   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
10721 $as_echo "$ac_pt_PKGCONFIG" >&6; }
10722 else
10723   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10724 $as_echo "no" >&6; }
10725 fi
10726
10727   if test "x$ac_pt_PKGCONFIG" = x; then
10728     PKGCONFIG="no"
10729   else
10730     case $cross_compiling:$ac_tool_warned in
10731 yes:)
10732 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
10733 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
10734 ac_tool_warned=yes ;;
10735 esac
10736     PKGCONFIG=$ac_pt_PKGCONFIG
10737   fi
10738 else
10739   PKGCONFIG="$ac_cv_path_PKGCONFIG"
10740 fi
10741
10742                         if test "x$PKGCONFIG" != "xno"; then
10743                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PKGCONFIG knows about libedit" >&5
10744 $as_echo_n "checking if $PKGCONFIG knows about libedit... " >&6; }
10745                                 if "$PKGCONFIG" libedit; then
10746                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10747 $as_echo "yes" >&6; }
10748                                         use_pkgconfig_for_libedit=yes
10749                                 else
10750                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10751 $as_echo "no" >&6; }
10752                                 fi
10753                         fi
10754                 else
10755                         CPPFLAGS="$CPPFLAGS -I${withval}/include"
10756                         if test -n "${need_dash_r}"; then
10757                                 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
10758                         else
10759                                 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
10760                         fi
10761                 fi
10762                 if test "x$use_pkgconfig_for_libedit" = "xyes"; then
10763                         LIBEDIT=`$PKGCONFIG --libs libedit`
10764                         CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libedit`"
10765                 else
10766                         LIBEDIT="-ledit -lcurses"
10767                 fi
10768                 OTHERLIBS=`echo $LIBEDIT | sed 's/-ledit//'`
10769                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_init in -ledit" >&5
10770 $as_echo_n "checking for el_init in -ledit... " >&6; }
10771 if ${ac_cv_lib_edit_el_init+:} false; then :
10772   $as_echo_n "(cached) " >&6
10773 else
10774   ac_check_lib_save_LIBS=$LIBS
10775 LIBS="-ledit  $OTHERLIBS
10776                  $LIBS"
10777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10778 /* end confdefs.h.  */
10779
10780 /* Override any GCC internal prototype to avoid an error.
10781    Use char because int might match the return type of a GCC
10782    builtin and then its argument prototype would still apply.  */
10783 #ifdef __cplusplus
10784 extern "C"
10785 #endif
10786 char el_init ();
10787 int
10788 main ()
10789 {
10790 return el_init ();
10791   ;
10792   return 0;
10793 }
10794 _ACEOF
10795 if ac_fn_c_try_link "$LINENO"; then :
10796   ac_cv_lib_edit_el_init=yes
10797 else
10798   ac_cv_lib_edit_el_init=no
10799 fi
10800 rm -f core conftest.err conftest.$ac_objext \
10801     conftest$ac_exeext conftest.$ac_ext
10802 LIBS=$ac_check_lib_save_LIBS
10803 fi
10804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_el_init" >&5
10805 $as_echo "$ac_cv_lib_edit_el_init" >&6; }
10806 if test "x$ac_cv_lib_edit_el_init" = xyes; then :
10807
10808 $as_echo "#define USE_LIBEDIT 1" >>confdefs.h
10809
10810                           LIBEDIT_MSG="yes"
10811
10812
10813 else
10814    as_fn_error $? "libedit not found" "$LINENO" 5
10815 fi
10816
10817                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libedit version is compatible" >&5
10818 $as_echo_n "checking if libedit version is compatible... " >&6; }
10819                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10820 /* end confdefs.h.  */
10821  #include <histedit.h>
10822 int
10823 main ()
10824 {
10825
10826         int i = H_SETSIZE;
10827         el_init("", NULL, NULL, NULL);
10828         exit(0);
10829
10830   ;
10831   return 0;
10832 }
10833 _ACEOF
10834 if ac_fn_c_try_compile "$LINENO"; then :
10835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10836 $as_echo "yes" >&6; }
10837 else
10838    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10839 $as_echo "no" >&6; }
10840                       as_fn_error $? "libedit version is not compatible" "$LINENO" 5
10841
10842 fi
10843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10844         fi
10845
10846 fi
10847
10848
10849 AUDIT_MODULE=none
10850
10851 # Check whether --with-audit was given.
10852 if test "${with_audit+set}" = set; then :
10853   withval=$with_audit;
10854           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported audit module" >&5
10855 $as_echo_n "checking for supported audit module... " >&6; }
10856           case "$withval" in
10857           bsm)
10858                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bsm" >&5
10859 $as_echo "bsm" >&6; }
10860                 AUDIT_MODULE=bsm
10861                                 for ac_header in bsm/audit.h
10862 do :
10863   ac_fn_c_check_header_compile "$LINENO" "bsm/audit.h" "ac_cv_header_bsm_audit_h" "
10864 #ifdef HAVE_TIME_H
10865 # include <time.h>
10866 #endif
10867
10868
10869 "
10870 if test "x$ac_cv_header_bsm_audit_h" = xyes; then :
10871   cat >>confdefs.h <<_ACEOF
10872 #define HAVE_BSM_AUDIT_H 1
10873 _ACEOF
10874
10875 else
10876   as_fn_error $? "BSM enabled and bsm/audit.h not found" "$LINENO" 5
10877 fi
10878
10879 done
10880
10881                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaudit in -lbsm" >&5
10882 $as_echo_n "checking for getaudit in -lbsm... " >&6; }
10883 if ${ac_cv_lib_bsm_getaudit+:} false; then :
10884   $as_echo_n "(cached) " >&6
10885 else
10886   ac_check_lib_save_LIBS=$LIBS
10887 LIBS="-lbsm  $LIBS"
10888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10889 /* end confdefs.h.  */
10890
10891 /* Override any GCC internal prototype to avoid an error.
10892    Use char because int might match the return type of a GCC
10893    builtin and then its argument prototype would still apply.  */
10894 #ifdef __cplusplus
10895 extern "C"
10896 #endif
10897 char getaudit ();
10898 int
10899 main ()
10900 {
10901 return getaudit ();
10902   ;
10903   return 0;
10904 }
10905 _ACEOF
10906 if ac_fn_c_try_link "$LINENO"; then :
10907   ac_cv_lib_bsm_getaudit=yes
10908 else
10909   ac_cv_lib_bsm_getaudit=no
10910 fi
10911 rm -f core conftest.err conftest.$ac_objext \
10912     conftest$ac_exeext conftest.$ac_ext
10913 LIBS=$ac_check_lib_save_LIBS
10914 fi
10915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsm_getaudit" >&5
10916 $as_echo "$ac_cv_lib_bsm_getaudit" >&6; }
10917 if test "x$ac_cv_lib_bsm_getaudit" = xyes; then :
10918   cat >>confdefs.h <<_ACEOF
10919 #define HAVE_LIBBSM 1
10920 _ACEOF
10921
10922   LIBS="-lbsm $LIBS"
10923
10924 else
10925   as_fn_error $? "BSM enabled and required library not found" "$LINENO" 5
10926 fi
10927
10928                 for ac_func in getaudit
10929 do :
10930   ac_fn_c_check_func "$LINENO" "getaudit" "ac_cv_func_getaudit"
10931 if test "x$ac_cv_func_getaudit" = xyes; then :
10932   cat >>confdefs.h <<_ACEOF
10933 #define HAVE_GETAUDIT 1
10934 _ACEOF
10935
10936 else
10937   as_fn_error $? "BSM enabled and required function not found" "$LINENO" 5
10938 fi
10939 done
10940
10941                 # These are optional
10942                 for ac_func in getaudit_addr aug_get_machine
10943 do :
10944   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10945 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10946 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10947   cat >>confdefs.h <<_ACEOF
10948 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10949 _ACEOF
10950
10951 fi
10952 done
10953
10954
10955 $as_echo "#define USE_BSM_AUDIT 1" >>confdefs.h
10956
10957                 if test "$sol2ver" -ge 11; then
10958                         SSHDLIBS="$SSHDLIBS -lscf"
10959
10960 $as_echo "#define BROKEN_BSM_API 1" >>confdefs.h
10961
10962                 fi
10963                 ;;
10964           linux)
10965                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux" >&5
10966 $as_echo "linux" >&6; }
10967                 AUDIT_MODULE=linux
10968                                 for ac_header in libaudit.h
10969 do :
10970   ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
10971 if test "x$ac_cv_header_libaudit_h" = xyes; then :
10972   cat >>confdefs.h <<_ACEOF
10973 #define HAVE_LIBAUDIT_H 1
10974 _ACEOF
10975
10976 fi
10977
10978 done
10979
10980                 SSHDLIBS="$SSHDLIBS -laudit"
10981
10982 $as_echo "#define USE_LINUX_AUDIT 1" >>confdefs.h
10983
10984                 ;;
10985           debug)
10986                 AUDIT_MODULE=debug
10987                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: debug" >&5
10988 $as_echo "debug" >&6; }
10989
10990 $as_echo "#define SSH_AUDIT_EVENTS 1" >>confdefs.h
10991
10992                 ;;
10993           no)
10994                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10995 $as_echo "no" >&6; }
10996                 ;;
10997           *)
10998                 as_fn_error $? "Unknown audit module $withval" "$LINENO" 5
10999                 ;;
11000         esac
11001
11002 fi
11003
11004
11005
11006 # Check whether --with-pie was given.
11007 if test "${with_pie+set}" = set; then :
11008   withval=$with_pie;
11009         if test "x$withval" = "xno"; then
11010                 use_pie=no
11011         fi
11012         if test "x$withval" = "xyes"; then
11013                 use_pie=yes
11014         fi
11015
11016
11017 fi
11018
11019 if test "x$use_pie" = "x"; then
11020         use_pie=no
11021 fi
11022 if test "x$use_toolchain_hardening" != "x1" && test "x$use_pie" = "xauto"; then
11023         # Turn off automatic PIE when toolchain hardening is off.
11024         use_pie=no
11025 fi
11026 if test "x$use_pie" = "xauto"; then
11027         # Automatic PIE requires gcc >= 4.x
11028         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc >= 4.x" >&5
11029 $as_echo_n "checking for gcc >= 4.x... " >&6; }
11030         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11031 /* end confdefs.h.  */
11032
11033 #if !defined(__GNUC__) || __GNUC__ < 4
11034 #error gcc is too old
11035 #endif
11036
11037 _ACEOF
11038 if ac_fn_c_try_compile "$LINENO"; then :
11039    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11040 $as_echo "yes" >&6; }
11041 else
11042    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11043 $as_echo "no" >&6; }
11044           use_pie=no
11045
11046 fi
11047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11048 fi
11049 if test "x$use_pie" != "xno"; then
11050         SAVED_CFLAGS="$CFLAGS"
11051         SAVED_LDFLAGS="$LDFLAGS"
11052         {
11053         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -fPIE" >&5
11054 $as_echo_n "checking if $CC supports compile flag -fPIE... " >&6; }
11055         saved_CFLAGS="$CFLAGS"
11056         CFLAGS="$CFLAGS $WERROR -fPIE"
11057         _define_flag=""
11058         test "x$_define_flag" = "x" && _define_flag="-fPIE"
11059         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11060 /* end confdefs.h.  */
11061
11062 #include <stdlib.h>
11063 #include <stdio.h>
11064 int main(int argc, char **argv) {
11065         /* Some math to catch -ftrapv problems in the toolchain */
11066         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
11067         float l = i * 2.1;
11068         double m = l / 0.5;
11069         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
11070         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
11071         exit(0);
11072 }
11073
11074 _ACEOF
11075 if ac_fn_c_try_compile "$LINENO"; then :
11076
11077 if `grep -i "unrecognized option" conftest.err >/dev/null`
11078 then
11079                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11080 $as_echo "no" >&6; }
11081                 CFLAGS="$saved_CFLAGS"
11082 else
11083                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11084 $as_echo "yes" >&6; }
11085                  CFLAGS="$saved_CFLAGS $_define_flag"
11086 fi
11087 else
11088    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11089 $as_echo "no" >&6; }
11090                   CFLAGS="$saved_CFLAGS"
11091
11092 fi
11093 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11094 }
11095         {
11096         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -pie" >&5
11097 $as_echo_n "checking if $LD supports link flag -pie... " >&6; }
11098         saved_LDFLAGS="$LDFLAGS"
11099         LDFLAGS="$LDFLAGS $WERROR -pie"
11100         _define_flag=""
11101         test "x$_define_flag" = "x" && _define_flag="-pie"
11102         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11103 /* end confdefs.h.  */
11104
11105 #include <stdlib.h>
11106 #include <stdio.h>
11107 int main(int argc, char **argv) {
11108         /* Some math to catch -ftrapv problems in the toolchain */
11109         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
11110         float l = i * 2.1;
11111         double m = l / 0.5;
11112         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
11113         long long p = n * o;
11114         printf("%d %d %d %f %f %lld %lld %lld\n", i, j, k, l, m, n, o, p);
11115         exit(0);
11116 }
11117
11118 _ACEOF
11119 if ac_fn_c_try_link "$LINENO"; then :
11120    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11121 $as_echo "yes" >&6; }
11122                   LDFLAGS="$saved_LDFLAGS $_define_flag"
11123 else
11124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11125 $as_echo "no" >&6; }
11126                   LDFLAGS="$saved_LDFLAGS"
11127
11128 fi
11129 rm -f core conftest.err conftest.$ac_objext \
11130     conftest$ac_exeext conftest.$ac_ext
11131 }
11132         # We use both -fPIE and -pie or neither.
11133         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether both -fPIE and -pie are supported" >&5
11134 $as_echo_n "checking whether both -fPIE and -pie are supported... " >&6; }
11135         if echo "x $CFLAGS"  | grep ' -fPIE' >/dev/null 2>&1 && \
11136            echo "x $LDFLAGS" | grep ' -pie'  >/dev/null 2>&1 ; then
11137                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11138 $as_echo "yes" >&6; }
11139         else
11140                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11141 $as_echo "no" >&6; }
11142                 CFLAGS="$SAVED_CFLAGS"
11143                 LDFLAGS="$SAVED_LDFLAGS"
11144         fi
11145 fi
11146
11147 for ac_func in  \
11148         Blowfish_initstate \
11149         Blowfish_expandstate \
11150         Blowfish_expand0state \
11151         Blowfish_stream2word \
11152         asprintf \
11153         b64_ntop \
11154         __b64_ntop \
11155         b64_pton \
11156         __b64_pton \
11157         bcopy \
11158         bcrypt_pbkdf \
11159         bindresvport_sa \
11160         blf_enc \
11161         bzero \
11162         cap_rights_limit \
11163         clock \
11164         closefrom \
11165         dirfd \
11166         endgrent \
11167         err \
11168         errx \
11169         explicit_bzero \
11170         fchmod \
11171         fchown \
11172         flock \
11173         freeaddrinfo \
11174         freezero \
11175         fstatfs \
11176         fstatvfs \
11177         futimes \
11178         getaddrinfo \
11179         getcwd \
11180         getgrouplist \
11181         getnameinfo \
11182         getopt \
11183         getpagesize \
11184         getpeereid \
11185         getpeerucred \
11186         getpgid \
11187         _getpty \
11188         getrlimit \
11189         getsid \
11190         getttyent \
11191         glob \
11192         group_from_gid \
11193         inet_aton \
11194         inet_ntoa \
11195         inet_ntop \
11196         innetgr \
11197         llabs \
11198         login_getcapbool \
11199         md5_crypt \
11200         memmove \
11201         memset_s \
11202         mkdtemp \
11203         ngetaddrinfo \
11204         nsleep \
11205         ogetaddrinfo \
11206         openlog_r \
11207         pledge \
11208         poll \
11209         prctl \
11210         pstat \
11211         raise \
11212         readpassphrase \
11213         reallocarray \
11214         recvmsg \
11215         recallocarray \
11216         rresvport_af \
11217         sendmsg \
11218         setdtablesize \
11219         setegid \
11220         setenv \
11221         seteuid \
11222         setgroupent \
11223         setgroups \
11224         setlinebuf \
11225         setlogin \
11226         setpassent\
11227         setpcred \
11228         setproctitle \
11229         setregid \
11230         setreuid \
11231         setrlimit \
11232         setsid \
11233         setvbuf \
11234         sigaction \
11235         sigvec \
11236         snprintf \
11237         socketpair \
11238         statfs \
11239         statvfs \
11240         strcasestr \
11241         strdup \
11242         strerror \
11243         strlcat \
11244         strlcpy \
11245         strmode \
11246         strndup \
11247         strnlen \
11248         strnvis \
11249         strptime \
11250         strsignal \
11251         strtonum \
11252         strtoll \
11253         strtoul \
11254         strtoull \
11255         swap32 \
11256         sysconf \
11257         tcgetpgrp \
11258         timingsafe_bcmp \
11259         truncate \
11260         unsetenv \
11261         updwtmpx \
11262         user_from_uid \
11263         usleep \
11264         vasprintf \
11265         vsnprintf \
11266         waitpid \
11267         warn \
11268
11269 do :
11270   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11271 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11272 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11273   cat >>confdefs.h <<_ACEOF
11274 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11275 _ACEOF
11276
11277 fi
11278 done
11279
11280
11281 ac_fn_c_check_decl "$LINENO" "bzero" "ac_cv_have_decl_bzero" "$ac_includes_default"
11282 if test "x$ac_cv_have_decl_bzero" = xyes; then :
11283   ac_have_decl=1
11284 else
11285   ac_have_decl=0
11286 fi
11287
11288 cat >>confdefs.h <<_ACEOF
11289 #define HAVE_DECL_BZERO $ac_have_decl
11290 _ACEOF
11291
11292
11293 for ac_func in mblen mbtowc nl_langinfo wcwidth
11294 do :
11295   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11296 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11297 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11298   cat >>confdefs.h <<_ACEOF
11299 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11300 _ACEOF
11301
11302 fi
11303 done
11304
11305
11306 TEST_SSH_UTF8=${TEST_SSH_UTF8:=yes}
11307 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utf8 locale support" >&5
11308 $as_echo_n "checking for utf8 locale support... " >&6; }
11309 if test "$cross_compiling" = yes; then :
11310   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
11311 $as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
11312
11313 else
11314   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11315 /* end confdefs.h.  */
11316
11317 #include <locale.h>
11318 #include <stdlib.h>
11319
11320 int
11321 main ()
11322 {
11323
11324         char *loc = setlocale(LC_CTYPE, "en_US.UTF-8");
11325         if (loc != NULL)
11326                 exit(0);
11327         exit(1);
11328
11329   ;
11330   return 0;
11331 }
11332 _ACEOF
11333 if ac_fn_c_try_run "$LINENO"; then :
11334   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11335 $as_echo "yes" >&6; }
11336 else
11337   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11338 $as_echo "no" >&6; }
11339          TEST_SSH_UTF8=no
11340 fi
11341 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11342   conftest.$ac_objext conftest.beam conftest.$ac_ext
11343 fi
11344
11345
11346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11347 /* end confdefs.h.  */
11348  #include <ctype.h>
11349 int
11350 main ()
11351 {
11352  return (isblank('a'));
11353   ;
11354   return 0;
11355 }
11356 _ACEOF
11357 if ac_fn_c_try_link "$LINENO"; then :
11358
11359 $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
11360
11361
11362 fi
11363 rm -f core conftest.err conftest.$ac_objext \
11364     conftest$ac_exeext conftest.$ac_ext
11365
11366 disable_pkcs11=
11367 # Check whether --enable-pkcs11 was given.
11368 if test "${enable_pkcs11+set}" = set; then :
11369   enableval=$enable_pkcs11;
11370                 if test "x$enableval" = "xno" ; then
11371                         disable_pkcs11=1
11372                 fi
11373
11374
11375 fi
11376
11377
11378 # PKCS11 depends on OpenSSL.
11379 if test "x$openssl" = "xyes" && test "x$disable_pkcs11" = "x"; then
11380         # PKCS#11 support requires dlopen() and co
11381         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
11382 $as_echo_n "checking for library containing dlopen... " >&6; }
11383 if ${ac_cv_search_dlopen+:} false; then :
11384   $as_echo_n "(cached) " >&6
11385 else
11386   ac_func_search_save_LIBS=$LIBS
11387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11388 /* end confdefs.h.  */
11389
11390 /* Override any GCC internal prototype to avoid an error.
11391    Use char because int might match the return type of a GCC
11392    builtin and then its argument prototype would still apply.  */
11393 #ifdef __cplusplus
11394 extern "C"
11395 #endif
11396 char dlopen ();
11397 int
11398 main ()
11399 {
11400 return dlopen ();
11401   ;
11402   return 0;
11403 }
11404 _ACEOF
11405 for ac_lib in '' dl; do
11406   if test -z "$ac_lib"; then
11407     ac_res="none required"
11408   else
11409     ac_res=-l$ac_lib
11410     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11411   fi
11412   if ac_fn_c_try_link "$LINENO"; then :
11413   ac_cv_search_dlopen=$ac_res
11414 fi
11415 rm -f core conftest.err conftest.$ac_objext \
11416     conftest$ac_exeext
11417   if ${ac_cv_search_dlopen+:} false; then :
11418   break
11419 fi
11420 done
11421 if ${ac_cv_search_dlopen+:} false; then :
11422
11423 else
11424   ac_cv_search_dlopen=no
11425 fi
11426 rm conftest.$ac_ext
11427 LIBS=$ac_func_search_save_LIBS
11428 fi
11429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
11430 $as_echo "$ac_cv_search_dlopen" >&6; }
11431 ac_res=$ac_cv_search_dlopen
11432 if test "$ac_res" != no; then :
11433   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11434   ac_fn_c_check_decl "$LINENO" "RTLD_NOW" "ac_cv_have_decl_RTLD_NOW" "#include <dlfcn.h>
11435
11436 "
11437 if test "x$ac_cv_have_decl_RTLD_NOW" = xyes; then :
11438
11439 $as_echo "#define ENABLE_PKCS11 /**/" >>confdefs.h
11440
11441 fi
11442
11443
11444 fi
11445
11446 fi
11447
11448 # IRIX has a const char return value for gai_strerror()
11449 for ac_func in gai_strerror
11450 do :
11451   ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror"
11452 if test "x$ac_cv_func_gai_strerror" = xyes; then :
11453   cat >>confdefs.h <<_ACEOF
11454 #define HAVE_GAI_STRERROR 1
11455 _ACEOF
11456
11457         $as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h
11458
11459         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11460 /* end confdefs.h.  */
11461
11462 #include <sys/types.h>
11463 #include <sys/socket.h>
11464 #include <netdb.h>
11465
11466 const char *gai_strerror(int);
11467
11468 int
11469 main ()
11470 {
11471
11472         char *str;
11473         str = gai_strerror(0);
11474
11475   ;
11476   return 0;
11477 }
11478 _ACEOF
11479 if ac_fn_c_try_compile "$LINENO"; then :
11480
11481
11482 $as_echo "#define HAVE_CONST_GAI_STRERROR_PROTO 1" >>confdefs.h
11483
11484 fi
11485 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11486 fi
11487 done
11488
11489
11490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
11491 $as_echo_n "checking for library containing nanosleep... " >&6; }
11492 if ${ac_cv_search_nanosleep+:} false; then :
11493   $as_echo_n "(cached) " >&6
11494 else
11495   ac_func_search_save_LIBS=$LIBS
11496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11497 /* end confdefs.h.  */
11498
11499 /* Override any GCC internal prototype to avoid an error.
11500    Use char because int might match the return type of a GCC
11501    builtin and then its argument prototype would still apply.  */
11502 #ifdef __cplusplus
11503 extern "C"
11504 #endif
11505 char nanosleep ();
11506 int
11507 main ()
11508 {
11509 return nanosleep ();
11510   ;
11511   return 0;
11512 }
11513 _ACEOF
11514 for ac_lib in '' rt posix4; do
11515   if test -z "$ac_lib"; then
11516     ac_res="none required"
11517   else
11518     ac_res=-l$ac_lib
11519     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11520   fi
11521   if ac_fn_c_try_link "$LINENO"; then :
11522   ac_cv_search_nanosleep=$ac_res
11523 fi
11524 rm -f core conftest.err conftest.$ac_objext \
11525     conftest$ac_exeext
11526   if ${ac_cv_search_nanosleep+:} false; then :
11527   break
11528 fi
11529 done
11530 if ${ac_cv_search_nanosleep+:} false; then :
11531
11532 else
11533   ac_cv_search_nanosleep=no
11534 fi
11535 rm conftest.$ac_ext
11536 LIBS=$ac_func_search_save_LIBS
11537 fi
11538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
11539 $as_echo "$ac_cv_search_nanosleep" >&6; }
11540 ac_res=$ac_cv_search_nanosleep
11541 if test "$ac_res" != no; then :
11542   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11543
11544 $as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h
11545
11546 fi
11547
11548
11549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
11550 $as_echo_n "checking for library containing clock_gettime... " >&6; }
11551 if ${ac_cv_search_clock_gettime+:} false; then :
11552   $as_echo_n "(cached) " >&6
11553 else
11554   ac_func_search_save_LIBS=$LIBS
11555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11556 /* end confdefs.h.  */
11557
11558 /* Override any GCC internal prototype to avoid an error.
11559    Use char because int might match the return type of a GCC
11560    builtin and then its argument prototype would still apply.  */
11561 #ifdef __cplusplus
11562 extern "C"
11563 #endif
11564 char clock_gettime ();
11565 int
11566 main ()
11567 {
11568 return clock_gettime ();
11569   ;
11570   return 0;
11571 }
11572 _ACEOF
11573 for ac_lib in '' rt; do
11574   if test -z "$ac_lib"; then
11575     ac_res="none required"
11576   else
11577     ac_res=-l$ac_lib
11578     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11579   fi
11580   if ac_fn_c_try_link "$LINENO"; then :
11581   ac_cv_search_clock_gettime=$ac_res
11582 fi
11583 rm -f core conftest.err conftest.$ac_objext \
11584     conftest$ac_exeext
11585   if ${ac_cv_search_clock_gettime+:} false; then :
11586   break
11587 fi
11588 done
11589 if ${ac_cv_search_clock_gettime+:} false; then :
11590
11591 else
11592   ac_cv_search_clock_gettime=no
11593 fi
11594 rm conftest.$ac_ext
11595 LIBS=$ac_func_search_save_LIBS
11596 fi
11597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
11598 $as_echo "$ac_cv_search_clock_gettime" >&6; }
11599 ac_res=$ac_cv_search_clock_gettime
11600 if test "$ac_res" != no; then :
11601   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11602
11603 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
11604
11605 fi
11606
11607
11608 ac_fn_c_check_decl "$LINENO" "strsep" "ac_cv_have_decl_strsep" "
11609 #ifdef HAVE_STRING_H
11610 # include <string.h>
11611 #endif
11612
11613 "
11614 if test "x$ac_cv_have_decl_strsep" = xyes; then :
11615   for ac_func in strsep
11616 do :
11617   ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
11618 if test "x$ac_cv_func_strsep" = xyes; then :
11619   cat >>confdefs.h <<_ACEOF
11620 #define HAVE_STRSEP 1
11621 _ACEOF
11622
11623 fi
11624 done
11625
11626 fi
11627
11628
11629 ac_fn_c_check_decl "$LINENO" "tcsendbreak" "ac_cv_have_decl_tcsendbreak" "#include <termios.h>
11630
11631 "
11632 if test "x$ac_cv_have_decl_tcsendbreak" = xyes; then :
11633   $as_echo "#define HAVE_TCSENDBREAK 1" >>confdefs.h
11634
11635 else
11636   for ac_func in tcsendbreak
11637 do :
11638   ac_fn_c_check_func "$LINENO" "tcsendbreak" "ac_cv_func_tcsendbreak"
11639 if test "x$ac_cv_func_tcsendbreak" = xyes; then :
11640   cat >>confdefs.h <<_ACEOF
11641 #define HAVE_TCSENDBREAK 1
11642 _ACEOF
11643
11644 fi
11645 done
11646
11647 fi
11648
11649
11650 ac_fn_c_check_decl "$LINENO" "h_errno" "ac_cv_have_decl_h_errno" "#include <netdb.h>
11651 "
11652 if test "x$ac_cv_have_decl_h_errno" = xyes; then :
11653   ac_have_decl=1
11654 else
11655   ac_have_decl=0
11656 fi
11657
11658 cat >>confdefs.h <<_ACEOF
11659 #define HAVE_DECL_H_ERRNO $ac_have_decl
11660 _ACEOF
11661
11662
11663 ac_fn_c_check_decl "$LINENO" "SHUT_RD" "ac_cv_have_decl_SHUT_RD" "
11664 #include <sys/types.h>
11665 #include <sys/socket.h>
11666
11667 "
11668 if test "x$ac_cv_have_decl_SHUT_RD" = xyes; then :
11669   ac_have_decl=1
11670 else
11671   ac_have_decl=0
11672 fi
11673
11674 cat >>confdefs.h <<_ACEOF
11675 #define HAVE_DECL_SHUT_RD $ac_have_decl
11676 _ACEOF
11677
11678
11679 ac_fn_c_check_decl "$LINENO" "O_NONBLOCK" "ac_cv_have_decl_O_NONBLOCK" "
11680 #include <sys/types.h>
11681 #ifdef HAVE_SYS_STAT_H
11682 # include <sys/stat.h>
11683 #endif
11684 #ifdef HAVE_FCNTL_H
11685 # include <fcntl.h>
11686 #endif
11687
11688 "
11689 if test "x$ac_cv_have_decl_O_NONBLOCK" = xyes; then :
11690   ac_have_decl=1
11691 else
11692   ac_have_decl=0
11693 fi
11694
11695 cat >>confdefs.h <<_ACEOF
11696 #define HAVE_DECL_O_NONBLOCK $ac_have_decl
11697 _ACEOF
11698
11699
11700 ac_fn_c_check_decl "$LINENO" "readv" "ac_cv_have_decl_readv" "
11701 #include <sys/types.h>
11702 #include <sys/uio.h>
11703 #include <unistd.h>
11704
11705 "
11706 if test "x$ac_cv_have_decl_readv" = xyes; then :
11707   ac_have_decl=1
11708 else
11709   ac_have_decl=0
11710 fi
11711
11712 cat >>confdefs.h <<_ACEOF
11713 #define HAVE_DECL_READV $ac_have_decl
11714 _ACEOF
11715 ac_fn_c_check_decl "$LINENO" "writev" "ac_cv_have_decl_writev" "
11716 #include <sys/types.h>
11717 #include <sys/uio.h>
11718 #include <unistd.h>
11719
11720 "
11721 if test "x$ac_cv_have_decl_writev" = xyes; then :
11722   ac_have_decl=1
11723 else
11724   ac_have_decl=0
11725 fi
11726
11727 cat >>confdefs.h <<_ACEOF
11728 #define HAVE_DECL_WRITEV $ac_have_decl
11729 _ACEOF
11730
11731
11732 ac_fn_c_check_decl "$LINENO" "MAXSYMLINKS" "ac_cv_have_decl_MAXSYMLINKS" "
11733 #include <sys/param.h>
11734
11735 "
11736 if test "x$ac_cv_have_decl_MAXSYMLINKS" = xyes; then :
11737   ac_have_decl=1
11738 else
11739   ac_have_decl=0
11740 fi
11741
11742 cat >>confdefs.h <<_ACEOF
11743 #define HAVE_DECL_MAXSYMLINKS $ac_have_decl
11744 _ACEOF
11745
11746
11747 ac_fn_c_check_decl "$LINENO" "offsetof" "ac_cv_have_decl_offsetof" "
11748 #include <stddef.h>
11749
11750 "
11751 if test "x$ac_cv_have_decl_offsetof" = xyes; then :
11752   ac_have_decl=1
11753 else
11754   ac_have_decl=0
11755 fi
11756
11757 cat >>confdefs.h <<_ACEOF
11758 #define HAVE_DECL_OFFSETOF $ac_have_decl
11759 _ACEOF
11760
11761
11762 # extra bits for select(2)
11763 ac_fn_c_check_decl "$LINENO" "howmany" "ac_cv_have_decl_howmany" "
11764 #include <sys/param.h>
11765 #include <sys/types.h>
11766 #ifdef HAVE_SYS_SYSMACROS_H
11767 #include <sys/sysmacros.h>
11768 #endif
11769 #ifdef HAVE_SYS_SELECT_H
11770 #include <sys/select.h>
11771 #endif
11772 #ifdef HAVE_SYS_TIME_H
11773 #include <sys/time.h>
11774 #endif
11775 #ifdef HAVE_UNISTD_H
11776 #include <unistd.h>
11777 #endif
11778
11779 "
11780 if test "x$ac_cv_have_decl_howmany" = xyes; then :
11781   ac_have_decl=1
11782 else
11783   ac_have_decl=0
11784 fi
11785
11786 cat >>confdefs.h <<_ACEOF
11787 #define HAVE_DECL_HOWMANY $ac_have_decl
11788 _ACEOF
11789 ac_fn_c_check_decl "$LINENO" "NFDBITS" "ac_cv_have_decl_NFDBITS" "
11790 #include <sys/param.h>
11791 #include <sys/types.h>
11792 #ifdef HAVE_SYS_SYSMACROS_H
11793 #include <sys/sysmacros.h>
11794 #endif
11795 #ifdef HAVE_SYS_SELECT_H
11796 #include <sys/select.h>
11797 #endif
11798 #ifdef HAVE_SYS_TIME_H
11799 #include <sys/time.h>
11800 #endif
11801 #ifdef HAVE_UNISTD_H
11802 #include <unistd.h>
11803 #endif
11804
11805 "
11806 if test "x$ac_cv_have_decl_NFDBITS" = xyes; then :
11807   ac_have_decl=1
11808 else
11809   ac_have_decl=0
11810 fi
11811
11812 cat >>confdefs.h <<_ACEOF
11813 #define HAVE_DECL_NFDBITS $ac_have_decl
11814 _ACEOF
11815
11816 ac_fn_c_check_type "$LINENO" "fd_mask" "ac_cv_type_fd_mask" "
11817 #include <sys/param.h>
11818 #include <sys/types.h>
11819 #ifdef HAVE_SYS_SELECT_H
11820 #include <sys/select.h>
11821 #endif
11822 #ifdef HAVE_SYS_TIME_H
11823 #include <sys/time.h>
11824 #endif
11825 #ifdef HAVE_UNISTD_H
11826 #include <unistd.h>
11827 #endif
11828
11829 "
11830 if test "x$ac_cv_type_fd_mask" = xyes; then :
11831
11832 cat >>confdefs.h <<_ACEOF
11833 #define HAVE_FD_MASK 1
11834 _ACEOF
11835
11836
11837 fi
11838
11839
11840 for ac_func in setresuid
11841 do :
11842   ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
11843 if test "x$ac_cv_func_setresuid" = xyes; then :
11844   cat >>confdefs.h <<_ACEOF
11845 #define HAVE_SETRESUID 1
11846 _ACEOF
11847
11848                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresuid seems to work" >&5
11849 $as_echo_n "checking if setresuid seems to work... " >&6; }
11850         if test "$cross_compiling" = yes; then :
11851   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
11852 $as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
11853
11854 else
11855   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11856 /* end confdefs.h.  */
11857
11858 #include <stdlib.h>
11859 #include <errno.h>
11860
11861 int
11862 main ()
11863 {
11864
11865         errno=0;
11866         setresuid(0,0,0);
11867         if (errno==ENOSYS)
11868                 exit(1);
11869         else
11870                 exit(0);
11871
11872   ;
11873   return 0;
11874 }
11875 _ACEOF
11876 if ac_fn_c_try_run "$LINENO"; then :
11877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11878 $as_echo "yes" >&6; }
11879 else
11880
11881 $as_echo "#define BROKEN_SETRESUID 1" >>confdefs.h
11882
11883                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
11884 $as_echo "not implemented" >&6; }
11885 fi
11886 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11887   conftest.$ac_objext conftest.beam conftest.$ac_ext
11888 fi
11889
11890
11891 fi
11892 done
11893
11894
11895 for ac_func in setresgid
11896 do :
11897   ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
11898 if test "x$ac_cv_func_setresgid" = xyes; then :
11899   cat >>confdefs.h <<_ACEOF
11900 #define HAVE_SETRESGID 1
11901 _ACEOF
11902
11903                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresgid seems to work" >&5
11904 $as_echo_n "checking if setresgid seems to work... " >&6; }
11905         if test "$cross_compiling" = yes; then :
11906   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
11907 $as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
11908
11909 else
11910   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11911 /* end confdefs.h.  */
11912
11913 #include <stdlib.h>
11914 #include <errno.h>
11915
11916 int
11917 main ()
11918 {
11919
11920         errno=0;
11921         setresgid(0,0,0);
11922         if (errno==ENOSYS)
11923                 exit(1);
11924         else
11925                 exit(0);
11926
11927   ;
11928   return 0;
11929 }
11930 _ACEOF
11931 if ac_fn_c_try_run "$LINENO"; then :
11932   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11933 $as_echo "yes" >&6; }
11934 else
11935
11936 $as_echo "#define BROKEN_SETRESGID 1" >>confdefs.h
11937
11938                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
11939 $as_echo "not implemented" >&6; }
11940 fi
11941 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11942   conftest.$ac_objext conftest.beam conftest.$ac_ext
11943 fi
11944
11945
11946 fi
11947 done
11948
11949
11950 for ac_func in realpath
11951 do :
11952   ac_fn_c_check_func "$LINENO" "realpath" "ac_cv_func_realpath"
11953 if test "x$ac_cv_func_realpath" = xyes; then :
11954   cat >>confdefs.h <<_ACEOF
11955 #define HAVE_REALPATH 1
11956 _ACEOF
11957
11958                                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if realpath works with non-existent files" >&5
11959 $as_echo_n "checking if realpath works with non-existent files... " >&6; }
11960         if test "$cross_compiling" = yes; then :
11961   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming working" >&5
11962 $as_echo "$as_me: WARNING: cross compiling: assuming working" >&2;}
11963
11964 else
11965   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11966 /* end confdefs.h.  */
11967
11968 #include <limits.h>
11969 #include <stdlib.h>
11970 #include <errno.h>
11971
11972 int
11973 main ()
11974 {
11975
11976                 char buf[PATH_MAX];
11977                 if (realpath("/opensshnonexistentfilename1234", buf) == NULL)
11978                         if (errno == ENOENT)
11979                                 exit(1);
11980                 exit(0);
11981
11982   ;
11983   return 0;
11984 }
11985 _ACEOF
11986 if ac_fn_c_try_run "$LINENO"; then :
11987   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11988 $as_echo "yes" >&6; }
11989 else
11990
11991 $as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
11992
11993                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11994 $as_echo "no" >&6; }
11995 fi
11996 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11997   conftest.$ac_objext conftest.beam conftest.$ac_ext
11998 fi
11999
12000
12001 fi
12002 done
12003
12004
12005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fflush(NULL)" >&5
12006 $as_echo_n "checking for working fflush(NULL)... " >&6; }
12007 if test "$cross_compiling" = yes; then :
12008   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming working" >&5
12009 $as_echo "$as_me: WARNING: cross compiling: assuming working" >&2;}
12010
12011 else
12012   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12013 /* end confdefs.h.  */
12014 #include <stdio.h>
12015 int
12016 main ()
12017 {
12018 fflush(NULL); exit(0);
12019   ;
12020   return 0;
12021 }
12022 _ACEOF
12023 if ac_fn_c_try_run "$LINENO"; then :
12024   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12025 $as_echo "yes" >&6; }
12026 else
12027   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12028 $as_echo "no" >&6; }
12029
12030 $as_echo "#define FFLUSH_NULL_BUG 1" >>confdefs.h
12031
12032 fi
12033 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12034   conftest.$ac_objext conftest.beam conftest.$ac_ext
12035 fi
12036
12037
12038 for ac_func in gettimeofday time
12039 do :
12040   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12041 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12042 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12043   cat >>confdefs.h <<_ACEOF
12044 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12045 _ACEOF
12046
12047 fi
12048 done
12049
12050 for ac_func in endutent getutent getutid getutline pututline setutent
12051 do :
12052   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12053 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12054 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12055   cat >>confdefs.h <<_ACEOF
12056 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12057 _ACEOF
12058
12059 fi
12060 done
12061
12062 for ac_func in utmpname
12063 do :
12064   ac_fn_c_check_func "$LINENO" "utmpname" "ac_cv_func_utmpname"
12065 if test "x$ac_cv_func_utmpname" = xyes; then :
12066   cat >>confdefs.h <<_ACEOF
12067 #define HAVE_UTMPNAME 1
12068 _ACEOF
12069
12070 fi
12071 done
12072
12073 for ac_func in endutxent getutxent getutxid getutxline getutxuser pututxline
12074 do :
12075   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12076 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12077 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12078   cat >>confdefs.h <<_ACEOF
12079 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12080 _ACEOF
12081
12082 fi
12083 done
12084
12085 for ac_func in setutxdb setutxent utmpxname
12086 do :
12087   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12088 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12089 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12090   cat >>confdefs.h <<_ACEOF
12091 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12092 _ACEOF
12093
12094 fi
12095 done
12096
12097 for ac_func in getlastlogxbyname
12098 do :
12099   ac_fn_c_check_func "$LINENO" "getlastlogxbyname" "ac_cv_func_getlastlogxbyname"
12100 if test "x$ac_cv_func_getlastlogxbyname" = xyes; then :
12101   cat >>confdefs.h <<_ACEOF
12102 #define HAVE_GETLASTLOGXBYNAME 1
12103 _ACEOF
12104
12105 fi
12106 done
12107
12108
12109 ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
12110 if test "x$ac_cv_func_daemon" = xyes; then :
12111
12112 $as_echo "#define HAVE_DAEMON 1" >>confdefs.h
12113
12114 else
12115   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for daemon in -lbsd" >&5
12116 $as_echo_n "checking for daemon in -lbsd... " >&6; }
12117 if ${ac_cv_lib_bsd_daemon+:} false; then :
12118   $as_echo_n "(cached) " >&6
12119 else
12120   ac_check_lib_save_LIBS=$LIBS
12121 LIBS="-lbsd  $LIBS"
12122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12123 /* end confdefs.h.  */
12124
12125 /* Override any GCC internal prototype to avoid an error.
12126    Use char because int might match the return type of a GCC
12127    builtin and then its argument prototype would still apply.  */
12128 #ifdef __cplusplus
12129 extern "C"
12130 #endif
12131 char daemon ();
12132 int
12133 main ()
12134 {
12135 return daemon ();
12136   ;
12137   return 0;
12138 }
12139 _ACEOF
12140 if ac_fn_c_try_link "$LINENO"; then :
12141   ac_cv_lib_bsd_daemon=yes
12142 else
12143   ac_cv_lib_bsd_daemon=no
12144 fi
12145 rm -f core conftest.err conftest.$ac_objext \
12146     conftest$ac_exeext conftest.$ac_ext
12147 LIBS=$ac_check_lib_save_LIBS
12148 fi
12149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_daemon" >&5
12150 $as_echo "$ac_cv_lib_bsd_daemon" >&6; }
12151 if test "x$ac_cv_lib_bsd_daemon" = xyes; then :
12152   LIBS="$LIBS -lbsd"; $as_echo "#define HAVE_DAEMON 1" >>confdefs.h
12153
12154 fi
12155
12156
12157 fi
12158
12159
12160 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12161 if test "x$ac_cv_func_getpagesize" = xyes; then :
12162
12163 $as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
12164
12165 else
12166   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize in -lucb" >&5
12167 $as_echo_n "checking for getpagesize in -lucb... " >&6; }
12168 if ${ac_cv_lib_ucb_getpagesize+:} false; then :
12169   $as_echo_n "(cached) " >&6
12170 else
12171   ac_check_lib_save_LIBS=$LIBS
12172 LIBS="-lucb  $LIBS"
12173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12174 /* end confdefs.h.  */
12175
12176 /* Override any GCC internal prototype to avoid an error.
12177    Use char because int might match the return type of a GCC
12178    builtin and then its argument prototype would still apply.  */
12179 #ifdef __cplusplus
12180 extern "C"
12181 #endif
12182 char getpagesize ();
12183 int
12184 main ()
12185 {
12186 return getpagesize ();
12187   ;
12188   return 0;
12189 }
12190 _ACEOF
12191 if ac_fn_c_try_link "$LINENO"; then :
12192   ac_cv_lib_ucb_getpagesize=yes
12193 else
12194   ac_cv_lib_ucb_getpagesize=no
12195 fi
12196 rm -f core conftest.err conftest.$ac_objext \
12197     conftest$ac_exeext conftest.$ac_ext
12198 LIBS=$ac_check_lib_save_LIBS
12199 fi
12200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ucb_getpagesize" >&5
12201 $as_echo "$ac_cv_lib_ucb_getpagesize" >&6; }
12202 if test "x$ac_cv_lib_ucb_getpagesize" = xyes; then :
12203   LIBS="$LIBS -lucb"; $as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
12204
12205 fi
12206
12207
12208 fi
12209
12210
12211 # Check for broken snprintf
12212 if test "x$ac_cv_func_snprintf" = "xyes" ; then
12213         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf correctly terminates long strings" >&5
12214 $as_echo_n "checking whether snprintf correctly terminates long strings... " >&6; }
12215         if test "$cross_compiling" = yes; then :
12216    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
12217 $as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
12218
12219 else
12220   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12221 /* end confdefs.h.  */
12222  #include <stdio.h>
12223 int
12224 main ()
12225 {
12226
12227         char b[5];
12228         snprintf(b,5,"123456789");
12229         exit(b[4]!='\0');
12230
12231   ;
12232   return 0;
12233 }
12234 _ACEOF
12235 if ac_fn_c_try_run "$LINENO"; then :
12236   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12237 $as_echo "yes" >&6; }
12238 else
12239
12240                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12241 $as_echo "no" >&6; }
12242
12243 $as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
12244
12245                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
12246 $as_echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
12247
12248 fi
12249 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12250   conftest.$ac_objext conftest.beam conftest.$ac_ext
12251 fi
12252
12253 fi
12254
12255 # We depend on vsnprintf returning the right thing on overflow: the
12256 # number of characters it tried to create (as per SUSv3)
12257 if test "x$ac_cv_func_vsnprintf" = "xyes" ; then
12258         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf returns correct values on overflow" >&5
12259 $as_echo_n "checking whether vsnprintf returns correct values on overflow... " >&6; }
12260         if test "$cross_compiling" = yes; then :
12261    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working vsnprintf()" >&5
12262 $as_echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;}
12263
12264 else
12265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12266 /* end confdefs.h.  */
12267
12268 #include <sys/types.h>
12269 #include <stdio.h>
12270 #include <stdarg.h>
12271
12272 int x_snprintf(char *str, size_t count, const char *fmt, ...)
12273 {
12274         size_t ret;
12275         va_list ap;
12276
12277         va_start(ap, fmt);
12278         ret = vsnprintf(str, count, fmt, ap);
12279         va_end(ap);
12280         return ret;
12281 }
12282
12283 int
12284 main ()
12285 {
12286
12287 char x[1];
12288 if (x_snprintf(x, 1, "%s %d", "hello", 12345) != 11)
12289         return 1;
12290 if (x_snprintf(NULL, 0, "%s %d", "hello", 12345) != 11)
12291         return 1;
12292 return 0;
12293
12294   ;
12295   return 0;
12296 }
12297 _ACEOF
12298 if ac_fn_c_try_run "$LINENO"; then :
12299   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12300 $as_echo "yes" >&6; }
12301 else
12302
12303                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12304 $as_echo "no" >&6; }
12305
12306 $as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
12307
12308                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&5
12309 $as_echo "$as_me: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&2;}
12310
12311 fi
12312 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12313   conftest.$ac_objext conftest.beam conftest.$ac_ext
12314 fi
12315
12316 fi
12317
12318 # On systems where [v]snprintf is broken, but is declared in stdio,
12319 # check that the fmt argument is const char * or just char *.
12320 # This is only useful for when BROKEN_SNPRINTF
12321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf can declare const char *fmt" >&5
12322 $as_echo_n "checking whether snprintf can declare const char *fmt... " >&6; }
12323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12324 /* end confdefs.h.  */
12325
12326 #include <stdio.h>
12327 int snprintf(char *a, size_t b, const char *c, ...) { return 0; }
12328
12329 int
12330 main ()
12331 {
12332
12333         snprintf(0, 0, 0);
12334
12335   ;
12336   return 0;
12337 }
12338 _ACEOF
12339 if ac_fn_c_try_compile "$LINENO"; then :
12340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12341 $as_echo "yes" >&6; }
12342
12343 $as_echo "#define SNPRINTF_CONST const" >>confdefs.h
12344
12345 else
12346   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12347 $as_echo "no" >&6; }
12348     $as_echo "#define SNPRINTF_CONST /* not const */" >>confdefs.h
12349
12350 fi
12351 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12352
12353 # Check for missing getpeereid (or equiv) support
12354 NO_PEERCHECK=""
12355 if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then
12356         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports SO_PEERCRED getsockopt" >&5
12357 $as_echo_n "checking whether system supports SO_PEERCRED getsockopt... " >&6; }
12358         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12359 /* end confdefs.h.  */
12360
12361 #include <sys/types.h>
12362 #include <sys/socket.h>
12363 int
12364 main ()
12365 {
12366 int i = SO_PEERCRED;
12367   ;
12368   return 0;
12369 }
12370 _ACEOF
12371 if ac_fn_c_try_compile "$LINENO"; then :
12372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12373 $as_echo "yes" >&6; }
12374
12375 $as_echo "#define HAVE_SO_PEERCRED 1" >>confdefs.h
12376
12377
12378 else
12379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12380 $as_echo "no" >&6; }
12381                 NO_PEERCHECK=1
12382
12383 fi
12384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12385 fi
12386
12387 if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
12388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (overly) strict mkstemp" >&5
12389 $as_echo_n "checking for (overly) strict mkstemp... " >&6; }
12390 if test "$cross_compiling" = yes; then :
12391
12392                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12393 $as_echo "yes" >&6; }
12394                 $as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
12395
12396
12397
12398 else
12399   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12400 /* end confdefs.h.  */
12401
12402 #include <stdlib.h>
12403
12404 int
12405 main ()
12406 {
12407
12408         char template[]="conftest.mkstemp-test";
12409         if (mkstemp(template) == -1)
12410                 exit(1);
12411         unlink(template);
12412         exit(0);
12413
12414   ;
12415   return 0;
12416 }
12417 _ACEOF
12418 if ac_fn_c_try_run "$LINENO"; then :
12419
12420                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12421 $as_echo "no" >&6; }
12422
12423 else
12424
12425                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12426 $as_echo "yes" >&6; }
12427
12428 $as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
12429
12430
12431 fi
12432 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12433   conftest.$ac_objext conftest.beam conftest.$ac_ext
12434 fi
12435
12436 fi
12437
12438 if test ! -z "$check_for_openpty_ctty_bug"; then
12439         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openpty correctly handles controlling tty" >&5
12440 $as_echo_n "checking if openpty correctly handles controlling tty... " >&6; }
12441         if test "$cross_compiling" = yes; then :
12442
12443                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
12444 $as_echo "cross-compiling, assuming yes" >&6; }
12445
12446
12447 else
12448   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12449 /* end confdefs.h.  */
12450
12451 #include <stdio.h>
12452 #include <sys/fcntl.h>
12453 #include <sys/types.h>
12454 #include <sys/wait.h>
12455
12456 int
12457 main ()
12458 {
12459
12460         pid_t pid;
12461         int fd, ptyfd, ttyfd, status;
12462
12463         pid = fork();
12464         if (pid < 0) {          /* failed */
12465                 exit(1);
12466         } else if (pid > 0) {   /* parent */
12467                 waitpid(pid, &status, 0);
12468                 if (WIFEXITED(status))
12469                         exit(WEXITSTATUS(status));
12470                 else
12471                         exit(2);
12472         } else {                /* child */
12473                 close(0); close(1); close(2);
12474                 setsid();
12475                 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
12476                 fd = open("/dev/tty", O_RDWR | O_NOCTTY);
12477                 if (fd >= 0)
12478                         exit(3);        /* Acquired ctty: broken */
12479                 else
12480                         exit(0);        /* Did not acquire ctty: OK */
12481         }
12482
12483   ;
12484   return 0;
12485 }
12486 _ACEOF
12487 if ac_fn_c_try_run "$LINENO"; then :
12488
12489                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12490 $as_echo "yes" >&6; }
12491
12492 else
12493
12494                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12495 $as_echo "no" >&6; }
12496                         $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
12497
12498
12499 fi
12500 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12501   conftest.$ac_objext conftest.beam conftest.$ac_ext
12502 fi
12503
12504 fi
12505
12506 if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
12507     test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
12508         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
12509 $as_echo_n "checking if getaddrinfo seems to work... " >&6; }
12510         if test "$cross_compiling" = yes; then :
12511
12512                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
12513 $as_echo "cross-compiling, assuming yes" >&6; }
12514
12515
12516 else
12517   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12518 /* end confdefs.h.  */
12519
12520 #include <stdio.h>
12521 #include <sys/socket.h>
12522 #include <netdb.h>
12523 #include <errno.h>
12524 #include <netinet/in.h>
12525
12526 #define TEST_PORT "2222"
12527
12528 int
12529 main ()
12530 {
12531
12532         int err, sock;
12533         struct addrinfo *gai_ai, *ai, hints;
12534         char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
12535
12536         memset(&hints, 0, sizeof(hints));
12537         hints.ai_family = PF_UNSPEC;
12538         hints.ai_socktype = SOCK_STREAM;
12539         hints.ai_flags = AI_PASSIVE;
12540
12541         err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
12542         if (err != 0) {
12543                 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
12544                 exit(1);
12545         }
12546
12547         for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
12548                 if (ai->ai_family != AF_INET6)
12549                         continue;
12550
12551                 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
12552                     sizeof(ntop), strport, sizeof(strport),
12553                     NI_NUMERICHOST|NI_NUMERICSERV);
12554
12555                 if (err != 0) {
12556                         if (err == EAI_SYSTEM)
12557                                 perror("getnameinfo EAI_SYSTEM");
12558                         else
12559                                 fprintf(stderr, "getnameinfo failed: %s\n",
12560                                     gai_strerror(err));
12561                         exit(2);
12562                 }
12563
12564                 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
12565                 if (sock < 0)
12566                         perror("socket");
12567                 if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
12568                         if (errno == EBADF)
12569                                 exit(3);
12570                 }
12571         }
12572         exit(0);
12573
12574   ;
12575   return 0;
12576 }
12577 _ACEOF
12578 if ac_fn_c_try_run "$LINENO"; then :
12579
12580                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12581 $as_echo "yes" >&6; }
12582
12583 else
12584
12585                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12586 $as_echo "no" >&6; }
12587                         $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
12588
12589
12590 fi
12591 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12592   conftest.$ac_objext conftest.beam conftest.$ac_ext
12593 fi
12594
12595 fi
12596
12597 if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
12598     test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
12599         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
12600 $as_echo_n "checking if getaddrinfo seems to work... " >&6; }
12601         if test "$cross_compiling" = yes; then :
12602
12603                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming no" >&5
12604 $as_echo "cross-compiling, assuming no" >&6; }
12605
12606
12607 else
12608   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12609 /* end confdefs.h.  */
12610
12611 #include <stdio.h>
12612 #include <sys/socket.h>
12613 #include <netdb.h>
12614 #include <errno.h>
12615 #include <netinet/in.h>
12616
12617 #define TEST_PORT "2222"
12618
12619 int
12620 main ()
12621 {
12622
12623         int err, sock;
12624         struct addrinfo *gai_ai, *ai, hints;
12625         char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
12626
12627         memset(&hints, 0, sizeof(hints));
12628         hints.ai_family = PF_UNSPEC;
12629         hints.ai_socktype = SOCK_STREAM;
12630         hints.ai_flags = AI_PASSIVE;
12631
12632         err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
12633         if (err != 0) {
12634                 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
12635                 exit(1);
12636         }
12637
12638         for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
12639                 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
12640                         continue;
12641
12642                 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
12643                     sizeof(ntop), strport, sizeof(strport),
12644                     NI_NUMERICHOST|NI_NUMERICSERV);
12645
12646                 if (ai->ai_family == AF_INET && err != 0) {
12647                         perror("getnameinfo");
12648                         exit(2);
12649                 }
12650         }
12651         exit(0);
12652
12653   ;
12654   return 0;
12655 }
12656 _ACEOF
12657 if ac_fn_c_try_run "$LINENO"; then :
12658
12659                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12660 $as_echo "yes" >&6; }
12661
12662 $as_echo "#define AIX_GETNAMEINFO_HACK 1" >>confdefs.h
12663
12664
12665 else
12666
12667                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12668 $as_echo "no" >&6; }
12669                         $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
12670
12671
12672 fi
12673 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12674   conftest.$ac_objext conftest.beam conftest.$ac_ext
12675 fi
12676
12677 fi
12678
12679 if test "x$ac_cv_func_getaddrinfo" = "xyes"; then
12680         ac_fn_c_check_decl "$LINENO" "AI_NUMERICSERV" "ac_cv_have_decl_AI_NUMERICSERV" "#include <sys/types.h>
12681              #include <sys/socket.h>
12682              #include <netdb.h>
12683 "
12684 if test "x$ac_cv_have_decl_AI_NUMERICSERV" = xyes; then :
12685   ac_have_decl=1
12686 else
12687   ac_have_decl=0
12688 fi
12689
12690 cat >>confdefs.h <<_ACEOF
12691 #define HAVE_DECL_AI_NUMERICSERV $ac_have_decl
12692 _ACEOF
12693
12694 fi
12695
12696 if test "x$check_for_conflicting_getspnam" = "x1"; then
12697         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for conflicting getspnam in shadow.h" >&5
12698 $as_echo_n "checking for conflicting getspnam in shadow.h... " >&6; }
12699         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12700 /* end confdefs.h.  */
12701  #include <shadow.h>
12702 int
12703 main ()
12704 {
12705  exit(0);
12706   ;
12707   return 0;
12708 }
12709 _ACEOF
12710 if ac_fn_c_try_compile "$LINENO"; then :
12711
12712                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12713 $as_echo "no" >&6; }
12714
12715 else
12716
12717                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12718 $as_echo "yes" >&6; }
12719
12720 $as_echo "#define GETSPNAM_CONFLICTING_DEFS 1" >>confdefs.h
12721
12722
12723
12724 fi
12725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12726 fi
12727
12728 if test "x$ac_cv_func_strnvis" = "xyes"; then
12729         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnvis" >&5
12730 $as_echo_n "checking for working strnvis... " >&6; }
12731         if test "$cross_compiling" = yes; then :
12732   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming broken" >&5
12733 $as_echo "$as_me: WARNING: cross compiling: assuming broken" >&2;}
12734
12735 $as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
12736
12737
12738 else
12739   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12740 /* end confdefs.h.  */
12741
12742 #include <signal.h>
12743 #include <stdlib.h>
12744 #include <string.h>
12745 #include <vis.h>
12746 static void sighandler(int sig) { _exit(1); }
12747
12748 int
12749 main ()
12750 {
12751
12752         char dst[16];
12753
12754         signal(SIGSEGV, sighandler);
12755         if (strnvis(dst, "src", 4, 0) && strcmp(dst, "src") == 0)
12756                 exit(0);
12757         exit(1)
12758
12759   ;
12760   return 0;
12761 }
12762 _ACEOF
12763 if ac_fn_c_try_run "$LINENO"; then :
12764   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12765 $as_echo "yes" >&6; }
12766 else
12767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12768 $as_echo "no" >&6; }
12769
12770 $as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
12771
12772 fi
12773 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12774   conftest.$ac_objext conftest.beam conftest.$ac_ext
12775 fi
12776
12777 fi
12778
12779 for ac_func in getpgrp
12780 do :
12781   ac_fn_c_check_func "$LINENO" "getpgrp" "ac_cv_func_getpgrp"
12782 if test "x$ac_cv_func_getpgrp" = xyes; then :
12783   cat >>confdefs.h <<_ACEOF
12784 #define HAVE_GETPGRP 1
12785 _ACEOF
12786
12787         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getpgrp accepts zero args" >&5
12788 $as_echo_n "checking if getpgrp accepts zero args... " >&6; }
12789         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12790 /* end confdefs.h.  */
12791 $ac_includes_default
12792 int
12793 main ()
12794 {
12795  getpgrp();
12796   ;
12797   return 0;
12798 }
12799 _ACEOF
12800 if ac_fn_c_try_compile "$LINENO"; then :
12801    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12802 $as_echo "yes" >&6; }
12803
12804 $as_echo "#define GETPGRP_VOID 1" >>confdefs.h
12805
12806 else
12807    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12808 $as_echo "no" >&6; }
12809
12810 $as_echo "#define GETPGRP_VOID 0" >>confdefs.h
12811
12812
12813 fi
12814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12815
12816 fi
12817 done
12818
12819
12820 # Search for OpenSSL
12821 saved_CPPFLAGS="$CPPFLAGS"
12822 saved_LDFLAGS="$LDFLAGS"
12823
12824 # Check whether --with-ssl-dir was given.
12825 if test "${with_ssl_dir+set}" = set; then :
12826   withval=$with_ssl_dir;
12827                 if test "x$openssl" = "xno" ; then
12828                         as_fn_error $? "cannot use --with-ssl-dir when OpenSSL disabled" "$LINENO" 5
12829                 fi
12830                 if test "x$withval" != "xno" ; then
12831                         case "$withval" in
12832                                 # Relative paths
12833                                 ./*|../*)       withval="`pwd`/$withval"
12834                         esac
12835                         if test -d "$withval/lib"; then
12836                                 if test -n "${need_dash_r}"; then
12837                                         LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
12838                                 else
12839                                         LDFLAGS="-L${withval}/lib ${LDFLAGS}"
12840                                 fi
12841                         elif test -d "$withval/lib64"; then
12842                                 if test -n "${need_dash_r}"; then
12843                                         LDFLAGS="-L${withval}/lib64 -R${withval}/lib64 ${LDFLAGS}"
12844                                 else
12845                                         LDFLAGS="-L${withval}/lib64 ${LDFLAGS}"
12846                                 fi
12847                         else
12848                                 if test -n "${need_dash_r}"; then
12849                                         LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
12850                                 else
12851                                         LDFLAGS="-L${withval} ${LDFLAGS}"
12852                                 fi
12853                         fi
12854                         if test -d "$withval/include"; then
12855                                 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
12856                         else
12857                                 CPPFLAGS="-I${withval} ${CPPFLAGS}"
12858                         fi
12859                 fi
12860
12861
12862 fi
12863
12864
12865
12866 # Check whether --with-openssl-header-check was given.
12867 if test "${with_openssl_header_check+set}" = set; then :
12868   withval=$with_openssl_header_check;
12869                 if test "x$withval" = "xno" ; then
12870                         openssl_check_nonfatal=1
12871                 fi
12872
12873
12874 fi
12875
12876
12877 openssl_engine=no
12878
12879 # Check whether --with-ssl-engine was given.
12880 if test "${with_ssl_engine+set}" = set; then :
12881   withval=$with_ssl_engine;
12882                 if test "x$withval" != "xno" ; then
12883                         if test "x$openssl" = "xno" ; then
12884                                 as_fn_error $? "cannot use --with-ssl-engine when OpenSSL disabled" "$LINENO" 5
12885                         fi
12886                         openssl_engine=yes
12887                 fi
12888
12889
12890 fi
12891
12892
12893 if test "x$openssl" = "xyes" ; then
12894         LIBS="-lcrypto $LIBS"
12895         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12896 /* end confdefs.h.  */
12897
12898 /* Override any GCC internal prototype to avoid an error.
12899    Use char because int might match the return type of a GCC
12900    builtin and then its argument prototype would still apply.  */
12901 #ifdef __cplusplus
12902 extern "C"
12903 #endif
12904 char RAND_add ();
12905 int
12906 main ()
12907 {
12908 return RAND_add ();
12909   ;
12910   return 0;
12911 }
12912 _ACEOF
12913 if ac_fn_c_try_link "$LINENO"; then :
12914
12915 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
12916
12917 else
12918
12919                                                 if test -n "${need_dash_r}"; then
12920                                 LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
12921                         else
12922                                 LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
12923                         fi
12924                         CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
12925                         ac_fn_c_check_header_mongrel "$LINENO" "openssl/opensslv.h" "ac_cv_header_openssl_opensslv_h" "$ac_includes_default"
12926 if test "x$ac_cv_header_openssl_opensslv_h" = xyes; then :
12927
12928 else
12929   as_fn_error $? "*** OpenSSL headers missing - please install first or check config.log ***" "$LINENO" 5
12930 fi
12931
12932
12933                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12934 /* end confdefs.h.  */
12935
12936 /* Override any GCC internal prototype to avoid an error.
12937    Use char because int might match the return type of a GCC
12938    builtin and then its argument prototype would still apply.  */
12939 #ifdef __cplusplus
12940 extern "C"
12941 #endif
12942 char RAND_add ();
12943 int
12944 main ()
12945 {
12946 return RAND_add ();
12947   ;
12948   return 0;
12949 }
12950 _ACEOF
12951 if ac_fn_c_try_link "$LINENO"; then :
12952   $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
12953
12954 else
12955
12956                                         as_fn_error $? "*** Can't find recent OpenSSL libcrypto (see config.log for details) ***" "$LINENO" 5
12957
12958
12959 fi
12960 rm -f core conftest.err conftest.$ac_objext \
12961     conftest$ac_exeext conftest.$ac_ext
12962
12963
12964 fi
12965 rm -f core conftest.err conftest.$ac_objext \
12966     conftest$ac_exeext conftest.$ac_ext
12967
12968         # Determine OpenSSL header version
12969         { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL header version" >&5
12970 $as_echo_n "checking OpenSSL header version... " >&6; }
12971         if test "$cross_compiling" = yes; then :
12972
12973                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
12974 $as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
12975
12976
12977 else
12978   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12979 /* end confdefs.h.  */
12980
12981         #include <stdlib.h>
12982         #include <stdio.h>
12983         #include <string.h>
12984         #include <openssl/opensslv.h>
12985         #define DATA "conftest.sslincver"
12986
12987 int
12988 main ()
12989 {
12990
12991                 FILE *fd;
12992                 int rc;
12993
12994                 fd = fopen(DATA,"w");
12995                 if(fd == NULL)
12996                         exit(1);
12997
12998                 if ((rc = fprintf(fd, "%08lx (%s)\n",
12999                     (unsigned long)OPENSSL_VERSION_NUMBER,
13000                      OPENSSL_VERSION_TEXT)) < 0)
13001                         exit(1);
13002
13003                 exit(0);
13004
13005   ;
13006   return 0;
13007 }
13008 _ACEOF
13009 if ac_fn_c_try_run "$LINENO"; then :
13010
13011                         ssl_header_ver=`cat conftest.sslincver`
13012                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_header_ver" >&5
13013 $as_echo "$ssl_header_ver" >&6; }
13014
13015 else
13016
13017                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13018 $as_echo "not found" >&6; }
13019                         as_fn_error $? "OpenSSL version header not found." "$LINENO" 5
13020
13021 fi
13022 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13023   conftest.$ac_objext conftest.beam conftest.$ac_ext
13024 fi
13025
13026
13027         # Determine OpenSSL library version
13028         { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version" >&5
13029 $as_echo_n "checking OpenSSL library version... " >&6; }
13030         if test "$cross_compiling" = yes; then :
13031
13032                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
13033 $as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
13034
13035
13036 else
13037   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13038 /* end confdefs.h.  */
13039
13040         #include <stdio.h>
13041         #include <string.h>
13042         #include <openssl/opensslv.h>
13043         #include <openssl/crypto.h>
13044         #define DATA "conftest.ssllibver"
13045
13046 int
13047 main ()
13048 {
13049
13050                 FILE *fd;
13051                 int rc;
13052
13053                 fd = fopen(DATA,"w");
13054                 if(fd == NULL)
13055                         exit(1);
13056
13057                 if ((rc = fprintf(fd, "%08lx (%s)\n", (unsigned long)SSLeay(),
13058                     SSLeay_version(SSLEAY_VERSION))) < 0)
13059                         exit(1);
13060
13061                 exit(0);
13062
13063   ;
13064   return 0;
13065 }
13066 _ACEOF
13067 if ac_fn_c_try_run "$LINENO"; then :
13068
13069                         ssl_library_ver=`cat conftest.ssllibver`
13070                         # Check version is supported.
13071                         case "$ssl_library_ver" in
13072                                 10000*|0*)
13073                                         as_fn_error $? "OpenSSL >= 1.0.1 required (have \"$ssl_library_ver\")" "$LINENO" 5
13074                                         ;;
13075                                 100*)   ;; # 1.0.x
13076                                 200*)   ;; # LibreSSL
13077                                 *)
13078                                         as_fn_error $? "OpenSSL >= 1.1.0 is not yet supported (have \"$ssl_library_ver\")" "$LINENO" 5
13079                                         ;;
13080                         esac
13081                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_library_ver" >&5
13082 $as_echo "$ssl_library_ver" >&6; }
13083
13084 else
13085
13086                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13087 $as_echo "not found" >&6; }
13088                         as_fn_error $? "OpenSSL library not found." "$LINENO" 5
13089
13090 fi
13091 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13092   conftest.$ac_objext conftest.beam conftest.$ac_ext
13093 fi
13094
13095
13096         # Sanity check OpenSSL headers
13097         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's headers match the library" >&5
13098 $as_echo_n "checking whether OpenSSL's headers match the library... " >&6; }
13099         if test "$cross_compiling" = yes; then :
13100
13101                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
13102 $as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
13103
13104
13105 else
13106   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13107 /* end confdefs.h.  */
13108
13109         #include <string.h>
13110         #include <openssl/opensslv.h>
13111         #include <openssl/crypto.h>
13112
13113 int
13114 main ()
13115 {
13116
13117                 exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1);
13118
13119   ;
13120   return 0;
13121 }
13122 _ACEOF
13123 if ac_fn_c_try_run "$LINENO"; then :
13124
13125                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13126 $as_echo "yes" >&6; }
13127
13128 else
13129
13130                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13131 $as_echo "no" >&6; }
13132                         if test "x$openssl_check_nonfatal" = "x"; then
13133                                 as_fn_error $? "Your OpenSSL headers do not match your
13134         library. Check config.log for details.
13135         If you are sure your installation is consistent, you can disable the check
13136         by running \"./configure --without-openssl-header-check\".
13137         Also see contrib/findssl.sh for help identifying header/library mismatches.
13138         " "$LINENO" 5
13139                         else
13140                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your OpenSSL headers do not match your
13141         library. Check config.log for details.
13142         Also see contrib/findssl.sh for help identifying header/library mismatches." >&5
13143 $as_echo "$as_me: WARNING: Your OpenSSL headers do not match your
13144         library. Check config.log for details.
13145         Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;}
13146                         fi
13147
13148 fi
13149 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13150   conftest.$ac_objext conftest.beam conftest.$ac_ext
13151 fi
13152
13153
13154         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL functions will link" >&5
13155 $as_echo_n "checking if programs using OpenSSL functions will link... " >&6; }
13156         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13157 /* end confdefs.h.  */
13158  #include <openssl/evp.h>
13159 int
13160 main ()
13161 {
13162  SSLeay_add_all_algorithms();
13163   ;
13164   return 0;
13165 }
13166 _ACEOF
13167 if ac_fn_c_try_link "$LINENO"; then :
13168
13169                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13170 $as_echo "yes" >&6; }
13171
13172 else
13173
13174                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13175 $as_echo "no" >&6; }
13176                         saved_LIBS="$LIBS"
13177                         LIBS="$LIBS -ldl"
13178                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL need -ldl" >&5
13179 $as_echo_n "checking if programs using OpenSSL need -ldl... " >&6; }
13180                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13181 /* end confdefs.h.  */
13182  #include <openssl/evp.h>
13183 int
13184 main ()
13185 {
13186  SSLeay_add_all_algorithms();
13187   ;
13188   return 0;
13189 }
13190 _ACEOF
13191 if ac_fn_c_try_link "$LINENO"; then :
13192
13193                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13194 $as_echo "yes" >&6; }
13195
13196 else
13197
13198                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13199 $as_echo "no" >&6; }
13200                                         LIBS="$saved_LIBS"
13201
13202
13203 fi
13204 rm -f core conftest.err conftest.$ac_objext \
13205     conftest$ac_exeext conftest.$ac_ext
13206
13207
13208 fi
13209 rm -f core conftest.err conftest.$ac_objext \
13210     conftest$ac_exeext conftest.$ac_ext
13211
13212         for ac_func in  \
13213                 BN_is_prime_ex \
13214                 DSA_generate_parameters_ex \
13215                 EVP_DigestInit_ex \
13216                 EVP_DigestFinal_ex \
13217                 EVP_MD_CTX_init \
13218                 EVP_MD_CTX_cleanup \
13219                 EVP_MD_CTX_copy_ex \
13220                 HMAC_CTX_init \
13221                 RSA_generate_key_ex \
13222                 RSA_get_default_method \
13223
13224 do :
13225   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13226 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13227 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13228   cat >>confdefs.h <<_ACEOF
13229 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13230 _ACEOF
13231
13232 fi
13233 done
13234
13235
13236         if test "x$openssl_engine" = "xyes" ; then
13237                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL ENGINE support" >&5
13238 $as_echo_n "checking for OpenSSL ENGINE support... " >&6; }
13239                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13240 /* end confdefs.h.  */
13241
13242         #include <openssl/engine.h>
13243
13244 int
13245 main ()
13246 {
13247
13248                                 ENGINE_load_builtin_engines();
13249                                 ENGINE_register_all_complete();
13250
13251   ;
13252   return 0;
13253 }
13254 _ACEOF
13255 if ac_fn_c_try_compile "$LINENO"; then :
13256    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13257 $as_echo "yes" >&6; }
13258
13259 $as_echo "#define USE_OPENSSL_ENGINE 1" >>confdefs.h
13260
13261
13262 else
13263    as_fn_error $? "OpenSSL ENGINE support not found" "$LINENO" 5
13264
13265 fi
13266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13267         fi
13268
13269         # Check for OpenSSL without EVP_aes_{192,256}_cbc
13270         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has crippled AES support" >&5
13271 $as_echo_n "checking whether OpenSSL has crippled AES support... " >&6; }
13272         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13273 /* end confdefs.h.  */
13274
13275         #include <string.h>
13276         #include <openssl/evp.h>
13277
13278 int
13279 main ()
13280 {
13281
13282                 exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);
13283
13284   ;
13285   return 0;
13286 }
13287 _ACEOF
13288 if ac_fn_c_try_link "$LINENO"; then :
13289
13290                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13291 $as_echo "no" >&6; }
13292
13293 else
13294
13295                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13296 $as_echo "yes" >&6; }
13297
13298 $as_echo "#define OPENSSL_LOBOTOMISED_AES 1" >>confdefs.h
13299
13300
13301
13302 fi
13303 rm -f core conftest.err conftest.$ac_objext \
13304     conftest$ac_exeext conftest.$ac_ext
13305
13306         # Check for OpenSSL with EVP_aes_*ctr
13307         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has AES CTR via EVP" >&5
13308 $as_echo_n "checking whether OpenSSL has AES CTR via EVP... " >&6; }
13309         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13310 /* end confdefs.h.  */
13311
13312         #include <string.h>
13313         #include <openssl/evp.h>
13314
13315 int
13316 main ()
13317 {
13318
13319                 exit(EVP_aes_128_ctr() == NULL ||
13320                     EVP_aes_192_cbc() == NULL ||
13321                     EVP_aes_256_cbc() == NULL);
13322
13323   ;
13324   return 0;
13325 }
13326 _ACEOF
13327 if ac_fn_c_try_link "$LINENO"; then :
13328
13329                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13330 $as_echo "yes" >&6; }
13331
13332 $as_echo "#define OPENSSL_HAVE_EVPCTR 1" >>confdefs.h
13333
13334
13335 else
13336
13337                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13338 $as_echo "no" >&6; }
13339
13340
13341 fi
13342 rm -f core conftest.err conftest.$ac_objext \
13343     conftest$ac_exeext conftest.$ac_ext
13344
13345         # Check for OpenSSL with EVP_aes_*gcm
13346         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has AES GCM via EVP" >&5
13347 $as_echo_n "checking whether OpenSSL has AES GCM via EVP... " >&6; }
13348         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13349 /* end confdefs.h.  */
13350
13351         #include <string.h>
13352         #include <openssl/evp.h>
13353
13354 int
13355 main ()
13356 {
13357
13358                 exit(EVP_aes_128_gcm() == NULL ||
13359                     EVP_aes_256_gcm() == NULL ||
13360                     EVP_CTRL_GCM_SET_IV_FIXED == 0 ||
13361                     EVP_CTRL_GCM_IV_GEN == 0 ||
13362                     EVP_CTRL_GCM_SET_TAG == 0 ||
13363                     EVP_CTRL_GCM_GET_TAG == 0 ||
13364                     EVP_CIPHER_CTX_ctrl(NULL, 0, 0, NULL) == 0);
13365
13366   ;
13367   return 0;
13368 }
13369 _ACEOF
13370 if ac_fn_c_try_link "$LINENO"; then :
13371
13372                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13373 $as_echo "yes" >&6; }
13374
13375 $as_echo "#define OPENSSL_HAVE_EVPGCM 1" >>confdefs.h
13376
13377
13378 else
13379
13380                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13381 $as_echo "no" >&6; }
13382                         unsupported_algorithms="$unsupported_cipers \
13383                            aes128-gcm@openssh.com \
13384                            aes256-gcm@openssh.com"
13385
13386
13387 fi
13388 rm -f core conftest.err conftest.$ac_objext \
13389     conftest$ac_exeext conftest.$ac_ext
13390
13391         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing EVP_CIPHER_CTX_ctrl" >&5
13392 $as_echo_n "checking for library containing EVP_CIPHER_CTX_ctrl... " >&6; }
13393 if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
13394   $as_echo_n "(cached) " >&6
13395 else
13396   ac_func_search_save_LIBS=$LIBS
13397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13398 /* end confdefs.h.  */
13399
13400 /* Override any GCC internal prototype to avoid an error.
13401    Use char because int might match the return type of a GCC
13402    builtin and then its argument prototype would still apply.  */
13403 #ifdef __cplusplus
13404 extern "C"
13405 #endif
13406 char EVP_CIPHER_CTX_ctrl ();
13407 int
13408 main ()
13409 {
13410 return EVP_CIPHER_CTX_ctrl ();
13411   ;
13412   return 0;
13413 }
13414 _ACEOF
13415 for ac_lib in '' crypto; do
13416   if test -z "$ac_lib"; then
13417     ac_res="none required"
13418   else
13419     ac_res=-l$ac_lib
13420     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
13421   fi
13422   if ac_fn_c_try_link "$LINENO"; then :
13423   ac_cv_search_EVP_CIPHER_CTX_ctrl=$ac_res
13424 fi
13425 rm -f core conftest.err conftest.$ac_objext \
13426     conftest$ac_exeext
13427   if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
13428   break
13429 fi
13430 done
13431 if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
13432
13433 else
13434   ac_cv_search_EVP_CIPHER_CTX_ctrl=no
13435 fi
13436 rm conftest.$ac_ext
13437 LIBS=$ac_func_search_save_LIBS
13438 fi
13439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_EVP_CIPHER_CTX_ctrl" >&5
13440 $as_echo "$ac_cv_search_EVP_CIPHER_CTX_ctrl" >&6; }
13441 ac_res=$ac_cv_search_EVP_CIPHER_CTX_ctrl
13442 if test "$ac_res" != no; then :
13443   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13444
13445 $as_echo "#define HAVE_EVP_CIPHER_CTX_CTRL 1" >>confdefs.h
13446
13447 fi
13448
13449
13450         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if EVP_DigestUpdate returns an int" >&5
13451 $as_echo_n "checking if EVP_DigestUpdate returns an int... " >&6; }
13452         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13453 /* end confdefs.h.  */
13454
13455         #include <string.h>
13456         #include <openssl/evp.h>
13457
13458 int
13459 main ()
13460 {
13461
13462                 if(EVP_DigestUpdate(NULL, NULL,0))
13463                         exit(0);
13464
13465   ;
13466   return 0;
13467 }
13468 _ACEOF
13469 if ac_fn_c_try_link "$LINENO"; then :
13470
13471                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13472 $as_echo "yes" >&6; }
13473
13474 else
13475
13476                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13477 $as_echo "no" >&6; }
13478
13479 $as_echo "#define OPENSSL_EVP_DIGESTUPDATE_VOID 1" >>confdefs.h
13480
13481
13482
13483 fi
13484 rm -f core conftest.err conftest.$ac_objext \
13485     conftest$ac_exeext conftest.$ac_ext
13486
13487         # Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
13488         # because the system crypt() is more featureful.
13489         if test "x$check_for_libcrypt_before" = "x1"; then
13490                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
13491 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
13492 if ${ac_cv_lib_crypt_crypt+:} false; then :
13493   $as_echo_n "(cached) " >&6
13494 else
13495   ac_check_lib_save_LIBS=$LIBS
13496 LIBS="-lcrypt  $LIBS"
13497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13498 /* end confdefs.h.  */
13499
13500 /* Override any GCC internal prototype to avoid an error.
13501    Use char because int might match the return type of a GCC
13502    builtin and then its argument prototype would still apply.  */
13503 #ifdef __cplusplus
13504 extern "C"
13505 #endif
13506 char crypt ();
13507 int
13508 main ()
13509 {
13510 return crypt ();
13511   ;
13512   return 0;
13513 }
13514 _ACEOF
13515 if ac_fn_c_try_link "$LINENO"; then :
13516   ac_cv_lib_crypt_crypt=yes
13517 else
13518   ac_cv_lib_crypt_crypt=no
13519 fi
13520 rm -f core conftest.err conftest.$ac_objext \
13521     conftest$ac_exeext conftest.$ac_ext
13522 LIBS=$ac_check_lib_save_LIBS
13523 fi
13524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
13525 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
13526 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
13527   cat >>confdefs.h <<_ACEOF
13528 #define HAVE_LIBCRYPT 1
13529 _ACEOF
13530
13531   LIBS="-lcrypt $LIBS"
13532
13533 fi
13534
13535         fi
13536
13537         # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
13538         # version in OpenSSL.
13539         if test "x$check_for_libcrypt_later" = "x1"; then
13540                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
13541 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
13542 if ${ac_cv_lib_crypt_crypt+:} false; then :
13543   $as_echo_n "(cached) " >&6
13544 else
13545   ac_check_lib_save_LIBS=$LIBS
13546 LIBS="-lcrypt  $LIBS"
13547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13548 /* end confdefs.h.  */
13549
13550 /* Override any GCC internal prototype to avoid an error.
13551    Use char because int might match the return type of a GCC
13552    builtin and then its argument prototype would still apply.  */
13553 #ifdef __cplusplus
13554 extern "C"
13555 #endif
13556 char crypt ();
13557 int
13558 main ()
13559 {
13560 return crypt ();
13561   ;
13562   return 0;
13563 }
13564 _ACEOF
13565 if ac_fn_c_try_link "$LINENO"; then :
13566   ac_cv_lib_crypt_crypt=yes
13567 else
13568   ac_cv_lib_crypt_crypt=no
13569 fi
13570 rm -f core conftest.err conftest.$ac_objext \
13571     conftest$ac_exeext conftest.$ac_ext
13572 LIBS=$ac_check_lib_save_LIBS
13573 fi
13574 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
13575 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
13576 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
13577   LIBS="$LIBS -lcrypt"
13578 fi
13579
13580         fi
13581         for ac_func in crypt DES_crypt
13582 do :
13583   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13584 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13585 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13586   cat >>confdefs.h <<_ACEOF
13587 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13588 _ACEOF
13589
13590 fi
13591 done
13592
13593
13594         # Search for SHA256 support in libc and/or OpenSSL
13595         for ac_func in SHA256_Update EVP_sha256
13596 do :
13597   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13598 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13599 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13600   cat >>confdefs.h <<_ACEOF
13601 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13602 _ACEOF
13603
13604 else
13605   unsupported_algorithms="$unsupported_algorithms \
13606                 hmac-sha2-256 \
13607                 hmac-sha2-512 \
13608                 diffie-hellman-group-exchange-sha256 \
13609                 hmac-sha2-256-etm@openssh.com \
13610                 hmac-sha2-512-etm@openssh.com"
13611
13612
13613 fi
13614 done
13615
13616         # Search for RIPE-MD support in OpenSSL
13617         for ac_func in EVP_ripemd160
13618 do :
13619   ac_fn_c_check_func "$LINENO" "EVP_ripemd160" "ac_cv_func_EVP_ripemd160"
13620 if test "x$ac_cv_func_EVP_ripemd160" = xyes; then :
13621   cat >>confdefs.h <<_ACEOF
13622 #define HAVE_EVP_RIPEMD160 1
13623 _ACEOF
13624
13625 else
13626   unsupported_algorithms="$unsupported_algorithms \
13627                 hmac-ripemd160 \
13628                 hmac-ripemd160@openssh.com \
13629                 hmac-ripemd160-etm@openssh.com"
13630
13631
13632 fi
13633 done
13634
13635
13636         # Check complete ECC support in OpenSSL
13637         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_X9_62_prime256v1" >&5
13638 $as_echo_n "checking whether OpenSSL has NID_X9_62_prime256v1... " >&6; }
13639         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13640 /* end confdefs.h.  */
13641
13642         #include <openssl/ec.h>
13643         #include <openssl/ecdh.h>
13644         #include <openssl/ecdsa.h>
13645         #include <openssl/evp.h>
13646         #include <openssl/objects.h>
13647         #include <openssl/opensslv.h>
13648
13649 int
13650 main ()
13651 {
13652
13653                 EC_KEY *e = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
13654                 const EVP_MD *m = EVP_sha256(); /* We need this too */
13655
13656   ;
13657   return 0;
13658 }
13659 _ACEOF
13660 if ac_fn_c_try_link "$LINENO"; then :
13661    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13662 $as_echo "yes" >&6; }
13663                   enable_nistp256=1
13664 else
13665    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13666 $as_echo "no" >&6; }
13667
13668 fi
13669 rm -f core conftest.err conftest.$ac_objext \
13670     conftest$ac_exeext conftest.$ac_ext
13671
13672         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_secp384r1" >&5
13673 $as_echo_n "checking whether OpenSSL has NID_secp384r1... " >&6; }
13674         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13675 /* end confdefs.h.  */
13676
13677         #include <openssl/ec.h>
13678         #include <openssl/ecdh.h>
13679         #include <openssl/ecdsa.h>
13680         #include <openssl/evp.h>
13681         #include <openssl/objects.h>
13682         #include <openssl/opensslv.h>
13683
13684 int
13685 main ()
13686 {
13687
13688                 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp384r1);
13689                 const EVP_MD *m = EVP_sha384(); /* We need this too */
13690
13691   ;
13692   return 0;
13693 }
13694 _ACEOF
13695 if ac_fn_c_try_link "$LINENO"; then :
13696    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13697 $as_echo "yes" >&6; }
13698                   enable_nistp384=1
13699 else
13700    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13701 $as_echo "no" >&6; }
13702
13703 fi
13704 rm -f core conftest.err conftest.$ac_objext \
13705     conftest$ac_exeext conftest.$ac_ext
13706
13707         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_secp521r1" >&5
13708 $as_echo_n "checking whether OpenSSL has NID_secp521r1... " >&6; }
13709         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13710 /* end confdefs.h.  */
13711
13712         #include <openssl/ec.h>
13713         #include <openssl/ecdh.h>
13714         #include <openssl/ecdsa.h>
13715         #include <openssl/evp.h>
13716         #include <openssl/objects.h>
13717         #include <openssl/opensslv.h>
13718
13719 int
13720 main ()
13721 {
13722
13723                 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
13724                 const EVP_MD *m = EVP_sha512(); /* We need this too */
13725
13726   ;
13727   return 0;
13728 }
13729 _ACEOF
13730 if ac_fn_c_try_link "$LINENO"; then :
13731    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13732 $as_echo "yes" >&6; }
13733                   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenSSL's NID_secp521r1 is functional" >&5
13734 $as_echo_n "checking if OpenSSL's NID_secp521r1 is functional... " >&6; }
13735                   if test "$cross_compiling" = yes; then :
13736    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: assuming yes" >&5
13737 $as_echo "$as_me: WARNING: cross-compiling: assuming yes" >&2;}
13738                           enable_nistp521=1
13739
13740 else
13741   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13742 /* end confdefs.h.  */
13743
13744         #include <openssl/ec.h>
13745         #include <openssl/ecdh.h>
13746         #include <openssl/ecdsa.h>
13747         #include <openssl/evp.h>
13748         #include <openssl/objects.h>
13749         #include <openssl/opensslv.h>
13750
13751 int
13752 main ()
13753 {
13754
13755                         EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
13756                         const EVP_MD *m = EVP_sha512(); /* We need this too */
13757                         exit(e == NULL || m == NULL);
13758
13759   ;
13760   return 0;
13761 }
13762 _ACEOF
13763 if ac_fn_c_try_run "$LINENO"; then :
13764    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13765 $as_echo "yes" >&6; }
13766                           enable_nistp521=1
13767 else
13768    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13769 $as_echo "no" >&6; }
13770 fi
13771 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13772   conftest.$ac_objext conftest.beam conftest.$ac_ext
13773 fi
13774
13775 else
13776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13777 $as_echo "no" >&6; }
13778
13779 fi
13780 rm -f core conftest.err conftest.$ac_objext \
13781     conftest$ac_exeext conftest.$ac_ext
13782
13783         COMMENT_OUT_ECC="#no ecc#"
13784         TEST_SSH_ECC=no
13785
13786         if test x$enable_nistp256 = x1 || test x$enable_nistp384 = x1 || \
13787             test x$enable_nistp521 = x1; then
13788
13789 $as_echo "#define OPENSSL_HAS_ECC 1" >>confdefs.h
13790
13791         fi
13792         if test x$enable_nistp256 = x1; then
13793
13794 $as_echo "#define OPENSSL_HAS_NISTP256 1" >>confdefs.h
13795
13796                 TEST_SSH_ECC=yes
13797                 COMMENT_OUT_ECC=""
13798         else
13799                 unsupported_algorithms="$unsupported_algorithms \
13800                         ecdsa-sha2-nistp256 \
13801                         ecdh-sha2-nistp256 \
13802                         ecdsa-sha2-nistp256-cert-v01@openssh.com"
13803         fi
13804         if test x$enable_nistp384 = x1; then
13805
13806 $as_echo "#define OPENSSL_HAS_NISTP384 1" >>confdefs.h
13807
13808                 TEST_SSH_ECC=yes
13809                 COMMENT_OUT_ECC=""
13810         else
13811                 unsupported_algorithms="$unsupported_algorithms \
13812                         ecdsa-sha2-nistp384 \
13813                         ecdh-sha2-nistp384 \
13814                         ecdsa-sha2-nistp384-cert-v01@openssh.com"
13815         fi
13816         if test x$enable_nistp521 = x1; then
13817
13818 $as_echo "#define OPENSSL_HAS_NISTP521 1" >>confdefs.h
13819
13820                 TEST_SSH_ECC=yes
13821                 COMMENT_OUT_ECC=""
13822         else
13823                 unsupported_algorithms="$unsupported_algorithms \
13824                         ecdh-sha2-nistp521 \
13825                         ecdsa-sha2-nistp521 \
13826                         ecdsa-sha2-nistp521-cert-v01@openssh.com"
13827         fi
13828
13829
13830
13831 else
13832         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
13833 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
13834 if ${ac_cv_lib_crypt_crypt+:} false; then :
13835   $as_echo_n "(cached) " >&6
13836 else
13837   ac_check_lib_save_LIBS=$LIBS
13838 LIBS="-lcrypt  $LIBS"
13839 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13840 /* end confdefs.h.  */
13841
13842 /* Override any GCC internal prototype to avoid an error.
13843    Use char because int might match the return type of a GCC
13844    builtin and then its argument prototype would still apply.  */
13845 #ifdef __cplusplus
13846 extern "C"
13847 #endif
13848 char crypt ();
13849 int
13850 main ()
13851 {
13852 return crypt ();
13853   ;
13854   return 0;
13855 }
13856 _ACEOF
13857 if ac_fn_c_try_link "$LINENO"; then :
13858   ac_cv_lib_crypt_crypt=yes
13859 else
13860   ac_cv_lib_crypt_crypt=no
13861 fi
13862 rm -f core conftest.err conftest.$ac_objext \
13863     conftest$ac_exeext conftest.$ac_ext
13864 LIBS=$ac_check_lib_save_LIBS
13865 fi
13866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
13867 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
13868 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
13869   LIBS="$LIBS -lcrypt"
13870 fi
13871
13872         for ac_func in crypt
13873 do :
13874   ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt"
13875 if test "x$ac_cv_func_crypt" = xyes; then :
13876   cat >>confdefs.h <<_ACEOF
13877 #define HAVE_CRYPT 1
13878 _ACEOF
13879
13880 fi
13881 done
13882
13883 fi
13884
13885 for ac_func in  \
13886         arc4random \
13887         arc4random_buf \
13888         arc4random_stir \
13889         arc4random_uniform \
13890
13891 do :
13892   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13893 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13894 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13895   cat >>confdefs.h <<_ACEOF
13896 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13897 _ACEOF
13898
13899 fi
13900 done
13901
13902
13903 saved_LIBS="$LIBS"
13904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ia_openinfo in -liaf" >&5
13905 $as_echo_n "checking for ia_openinfo in -liaf... " >&6; }
13906 if ${ac_cv_lib_iaf_ia_openinfo+:} false; then :
13907   $as_echo_n "(cached) " >&6
13908 else
13909   ac_check_lib_save_LIBS=$LIBS
13910 LIBS="-liaf  $LIBS"
13911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13912 /* end confdefs.h.  */
13913
13914 /* Override any GCC internal prototype to avoid an error.
13915    Use char because int might match the return type of a GCC
13916    builtin and then its argument prototype would still apply.  */
13917 #ifdef __cplusplus
13918 extern "C"
13919 #endif
13920 char ia_openinfo ();
13921 int
13922 main ()
13923 {
13924 return ia_openinfo ();
13925   ;
13926   return 0;
13927 }
13928 _ACEOF
13929 if ac_fn_c_try_link "$LINENO"; then :
13930   ac_cv_lib_iaf_ia_openinfo=yes
13931 else
13932   ac_cv_lib_iaf_ia_openinfo=no
13933 fi
13934 rm -f core conftest.err conftest.$ac_objext \
13935     conftest$ac_exeext conftest.$ac_ext
13936 LIBS=$ac_check_lib_save_LIBS
13937 fi
13938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iaf_ia_openinfo" >&5
13939 $as_echo "$ac_cv_lib_iaf_ia_openinfo" >&6; }
13940 if test "x$ac_cv_lib_iaf_ia_openinfo" = xyes; then :
13941
13942         LIBS="$LIBS -liaf"
13943         for ac_func in set_id
13944 do :
13945   ac_fn_c_check_func "$LINENO" "set_id" "ac_cv_func_set_id"
13946 if test "x$ac_cv_func_set_id" = xyes; then :
13947   cat >>confdefs.h <<_ACEOF
13948 #define HAVE_SET_ID 1
13949 _ACEOF
13950  SSHDLIBS="$SSHDLIBS -liaf"
13951
13952 $as_echo "#define HAVE_LIBIAF 1" >>confdefs.h
13953
13954
13955 fi
13956 done
13957
13958
13959 fi
13960
13961 LIBS="$saved_LIBS"
13962
13963 ### Configure cryptographic random number support
13964
13965 # Check wheter OpenSSL seeds itself
13966 if test "x$openssl" = "xyes" ; then
13967         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's PRNG is internally seeded" >&5
13968 $as_echo_n "checking whether OpenSSL's PRNG is internally seeded... " >&6; }
13969         if test "$cross_compiling" = yes; then :
13970
13971                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
13972 $as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
13973                         # This is safe, since we will fatal() at runtime if
13974                         # OpenSSL is not seeded correctly.
13975                         OPENSSL_SEEDS_ITSELF=yes
13976
13977
13978 else
13979   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13980 /* end confdefs.h.  */
13981
13982         #include <string.h>
13983         #include <openssl/rand.h>
13984
13985 int
13986 main ()
13987 {
13988
13989                 exit(RAND_status() == 1 ? 0 : 1);
13990
13991   ;
13992   return 0;
13993 }
13994 _ACEOF
13995 if ac_fn_c_try_run "$LINENO"; then :
13996
13997                         OPENSSL_SEEDS_ITSELF=yes
13998                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13999 $as_echo "yes" >&6; }
14000
14001 else
14002
14003                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14004 $as_echo "no" >&6; }
14005
14006 fi
14007 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14008   conftest.$ac_objext conftest.beam conftest.$ac_ext
14009 fi
14010
14011 fi
14012
14013 # PRNGD TCP socket
14014
14015 # Check whether --with-prngd-port was given.
14016 if test "${with_prngd_port+set}" = set; then :
14017   withval=$with_prngd_port;
14018                 case "$withval" in
14019                 no)
14020                         withval=""
14021                         ;;
14022                 [0-9]*)
14023                         ;;
14024                 *)
14025                         as_fn_error $? "You must specify a numeric port number for --with-prngd-port" "$LINENO" 5
14026                         ;;
14027                 esac
14028                 if test ! -z "$withval" ; then
14029                         PRNGD_PORT="$withval"
14030
14031 cat >>confdefs.h <<_ACEOF
14032 #define PRNGD_PORT $PRNGD_PORT
14033 _ACEOF
14034
14035                 fi
14036
14037
14038 fi
14039
14040
14041 # PRNGD Unix domain socket
14042
14043 # Check whether --with-prngd-socket was given.
14044 if test "${with_prngd_socket+set}" = set; then :
14045   withval=$with_prngd_socket;
14046                 case "$withval" in
14047                 yes)
14048                         withval="/var/run/egd-pool"
14049                         ;;
14050                 no)
14051                         withval=""
14052                         ;;
14053                 /*)
14054                         ;;
14055                 *)
14056                         as_fn_error $? "You must specify an absolute path to the entropy socket" "$LINENO" 5
14057                         ;;
14058                 esac
14059
14060                 if test ! -z "$withval" ; then
14061                         if test ! -z "$PRNGD_PORT" ; then
14062                                 as_fn_error $? "You may not specify both a PRNGD/EGD port and socket" "$LINENO" 5
14063                         fi
14064                         if test ! -r "$withval" ; then
14065                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Entropy socket is not readable" >&5
14066 $as_echo "$as_me: WARNING: Entropy socket is not readable" >&2;}
14067                         fi
14068                         PRNGD_SOCKET="$withval"
14069
14070 cat >>confdefs.h <<_ACEOF
14071 #define PRNGD_SOCKET "$PRNGD_SOCKET"
14072 _ACEOF
14073
14074                 fi
14075
14076 else
14077
14078                 # Check for existing socket only if we don't have a random device already
14079                 if test "x$OPENSSL_SEEDS_ITSELF" != "xyes" ; then
14080                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRNGD/EGD socket" >&5
14081 $as_echo_n "checking for PRNGD/EGD socket... " >&6; }
14082                         # Insert other locations here
14083                         for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
14084                                 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
14085                                         PRNGD_SOCKET="$sock"
14086                                         cat >>confdefs.h <<_ACEOF
14087 #define PRNGD_SOCKET "$PRNGD_SOCKET"
14088 _ACEOF
14089
14090                                         break;
14091                                 fi
14092                         done
14093                         if test ! -z "$PRNGD_SOCKET" ; then
14094                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRNGD_SOCKET" >&5
14095 $as_echo "$PRNGD_SOCKET" >&6; }
14096                         else
14097                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14098 $as_echo "not found" >&6; }
14099                         fi
14100                 fi
14101
14102
14103 fi
14104
14105
14106 # Which randomness source do we use?
14107 if test ! -z "$PRNGD_PORT" ; then
14108         RAND_MSG="PRNGd port $PRNGD_PORT"
14109 elif test ! -z "$PRNGD_SOCKET" ; then
14110         RAND_MSG="PRNGd socket $PRNGD_SOCKET"
14111 elif test ! -z "$OPENSSL_SEEDS_ITSELF" ; then
14112
14113 $as_echo "#define OPENSSL_PRNG_ONLY 1" >>confdefs.h
14114
14115         RAND_MSG="OpenSSL internal ONLY"
14116 elif test "x$openssl" = "xno" ; then
14117         { $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
14118 $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;}
14119 else
14120         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
14121 fi
14122
14123 # Check for PAM libs
14124 PAM_MSG="no"
14125
14126 # Check whether --with-pam was given.
14127 if test "${with_pam+set}" = set; then :
14128   withval=$with_pam;
14129                 if test "x$withval" != "xno" ; then
14130                         if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
14131                            test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
14132                                 as_fn_error $? "PAM headers not found" "$LINENO" 5
14133                         fi
14134
14135                         saved_LIBS="$LIBS"
14136                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
14137 $as_echo_n "checking for dlopen in -ldl... " >&6; }
14138 if ${ac_cv_lib_dl_dlopen+:} false; then :
14139   $as_echo_n "(cached) " >&6
14140 else
14141   ac_check_lib_save_LIBS=$LIBS
14142 LIBS="-ldl  $LIBS"
14143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14144 /* end confdefs.h.  */
14145
14146 /* Override any GCC internal prototype to avoid an error.
14147    Use char because int might match the return type of a GCC
14148    builtin and then its argument prototype would still apply.  */
14149 #ifdef __cplusplus
14150 extern "C"
14151 #endif
14152 char dlopen ();
14153 int
14154 main ()
14155 {
14156 return dlopen ();
14157   ;
14158   return 0;
14159 }
14160 _ACEOF
14161 if ac_fn_c_try_link "$LINENO"; then :
14162   ac_cv_lib_dl_dlopen=yes
14163 else
14164   ac_cv_lib_dl_dlopen=no
14165 fi
14166 rm -f core conftest.err conftest.$ac_objext \
14167     conftest$ac_exeext conftest.$ac_ext
14168 LIBS=$ac_check_lib_save_LIBS
14169 fi
14170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
14171 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
14172 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
14173   cat >>confdefs.h <<_ACEOF
14174 #define HAVE_LIBDL 1
14175 _ACEOF
14176
14177   LIBS="-ldl $LIBS"
14178
14179 fi
14180
14181                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_set_item in -lpam" >&5
14182 $as_echo_n "checking for pam_set_item in -lpam... " >&6; }
14183 if ${ac_cv_lib_pam_pam_set_item+:} false; then :
14184   $as_echo_n "(cached) " >&6
14185 else
14186   ac_check_lib_save_LIBS=$LIBS
14187 LIBS="-lpam  $LIBS"
14188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14189 /* end confdefs.h.  */
14190
14191 /* Override any GCC internal prototype to avoid an error.
14192    Use char because int might match the return type of a GCC
14193    builtin and then its argument prototype would still apply.  */
14194 #ifdef __cplusplus
14195 extern "C"
14196 #endif
14197 char pam_set_item ();
14198 int
14199 main ()
14200 {
14201 return pam_set_item ();
14202   ;
14203   return 0;
14204 }
14205 _ACEOF
14206 if ac_fn_c_try_link "$LINENO"; then :
14207   ac_cv_lib_pam_pam_set_item=yes
14208 else
14209   ac_cv_lib_pam_pam_set_item=no
14210 fi
14211 rm -f core conftest.err conftest.$ac_objext \
14212     conftest$ac_exeext conftest.$ac_ext
14213 LIBS=$ac_check_lib_save_LIBS
14214 fi
14215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_set_item" >&5
14216 $as_echo "$ac_cv_lib_pam_pam_set_item" >&6; }
14217 if test "x$ac_cv_lib_pam_pam_set_item" = xyes; then :
14218   cat >>confdefs.h <<_ACEOF
14219 #define HAVE_LIBPAM 1
14220 _ACEOF
14221
14222   LIBS="-lpam $LIBS"
14223
14224 else
14225   as_fn_error $? "*** libpam missing" "$LINENO" 5
14226 fi
14227
14228                         for ac_func in pam_getenvlist
14229 do :
14230   ac_fn_c_check_func "$LINENO" "pam_getenvlist" "ac_cv_func_pam_getenvlist"
14231 if test "x$ac_cv_func_pam_getenvlist" = xyes; then :
14232   cat >>confdefs.h <<_ACEOF
14233 #define HAVE_PAM_GETENVLIST 1
14234 _ACEOF
14235
14236 fi
14237 done
14238
14239                         for ac_func in pam_putenv
14240 do :
14241   ac_fn_c_check_func "$LINENO" "pam_putenv" "ac_cv_func_pam_putenv"
14242 if test "x$ac_cv_func_pam_putenv" = xyes; then :
14243   cat >>confdefs.h <<_ACEOF
14244 #define HAVE_PAM_PUTENV 1
14245 _ACEOF
14246
14247 fi
14248 done
14249
14250                         LIBS="$saved_LIBS"
14251
14252                         PAM_MSG="yes"
14253
14254                         SSHDLIBS="$SSHDLIBS -lpam"
14255
14256 $as_echo "#define USE_PAM 1" >>confdefs.h
14257
14258
14259                         if test $ac_cv_lib_dl_dlopen = yes; then
14260                                 case "$LIBS" in
14261                                 *-ldl*)
14262                                         # libdl already in LIBS
14263                                         ;;
14264                                 *)
14265                                         SSHDLIBS="$SSHDLIBS -ldl"
14266                                         ;;
14267                                 esac
14268                         fi
14269                 fi
14270
14271
14272 fi
14273
14274
14275
14276 # Check whether --with-pam-service was given.
14277 if test "${with_pam_service+set}" = set; then :
14278   withval=$with_pam_service;
14279                 if test "x$withval" != "xno" && \
14280                    test "x$withval" != "xyes" ; then
14281
14282 cat >>confdefs.h <<_ACEOF
14283 #define SSHD_PAM_SERVICE "$withval"
14284 _ACEOF
14285
14286                 fi
14287
14288
14289 fi
14290
14291
14292 # Check for older PAM
14293 if test "x$PAM_MSG" = "xyes" ; then
14294         # Check PAM strerror arguments (old PAM)
14295         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pam_strerror takes only one argument" >&5
14296 $as_echo_n "checking whether pam_strerror takes only one argument... " >&6; }
14297         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14298 /* end confdefs.h.  */
14299
14300 #include <stdlib.h>
14301 #if defined(HAVE_SECURITY_PAM_APPL_H)
14302 #include <security/pam_appl.h>
14303 #elif defined (HAVE_PAM_PAM_APPL_H)
14304 #include <pam/pam_appl.h>
14305 #endif
14306
14307 int
14308 main ()
14309 {
14310
14311 (void)pam_strerror((pam_handle_t *)NULL, -1);
14312
14313   ;
14314   return 0;
14315 }
14316 _ACEOF
14317 if ac_fn_c_try_compile "$LINENO"; then :
14318   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14319 $as_echo "no" >&6; }
14320 else
14321
14322
14323 $as_echo "#define HAVE_OLD_PAM 1" >>confdefs.h
14324
14325                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14326 $as_echo "yes" >&6; }
14327                         PAM_MSG="yes (old library)"
14328
14329
14330 fi
14331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14332 fi
14333
14334 case "$host" in
14335 *-*-cygwin*)
14336         SSH_PRIVSEP_USER=CYGWIN_SSH_PRIVSEP_USER
14337         ;;
14338 *)
14339         SSH_PRIVSEP_USER=sshd
14340         ;;
14341 esac
14342
14343 # Check whether --with-privsep-user was given.
14344 if test "${with_privsep_user+set}" = set; then :
14345   withval=$with_privsep_user;
14346                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
14347                     test "x${withval}" != "xyes"; then
14348                         SSH_PRIVSEP_USER=$withval
14349                 fi
14350
14351
14352 fi
14353
14354 if test "x$SSH_PRIVSEP_USER" = "xCYGWIN_SSH_PRIVSEP_USER" ; then
14355
14356 cat >>confdefs.h <<_ACEOF
14357 #define SSH_PRIVSEP_USER CYGWIN_SSH_PRIVSEP_USER
14358 _ACEOF
14359
14360 else
14361
14362 cat >>confdefs.h <<_ACEOF
14363 #define SSH_PRIVSEP_USER "$SSH_PRIVSEP_USER"
14364 _ACEOF
14365
14366 fi
14367
14368
14369 if test "x$have_linux_no_new_privs" = "x1" ; then
14370 ac_fn_c_check_decl "$LINENO" "SECCOMP_MODE_FILTER" "ac_cv_have_decl_SECCOMP_MODE_FILTER" "
14371         #include <sys/types.h>
14372         #include <linux/seccomp.h>
14373
14374 "
14375 if test "x$ac_cv_have_decl_SECCOMP_MODE_FILTER" = xyes; then :
14376   have_seccomp_filter=1
14377 fi
14378
14379 fi
14380 if test "x$have_seccomp_filter" = "x1" ; then
14381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel for seccomp_filter support" >&5
14382 $as_echo_n "checking kernel for seccomp_filter support... " >&6; }
14383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14384 /* end confdefs.h.  */
14385
14386                 #include <errno.h>
14387                 #include <elf.h>
14388                 #include <linux/audit.h>
14389                 #include <linux/seccomp.h>
14390                 #include <stdlib.h>
14391                 #include <sys/prctl.h>
14392
14393 int
14394 main ()
14395 {
14396  int i = $seccomp_audit_arch;
14397            errno = 0;
14398            prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0);
14399            exit(errno == EFAULT ? 0 : 1);
14400   ;
14401   return 0;
14402 }
14403 _ACEOF
14404 if ac_fn_c_try_link "$LINENO"; then :
14405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14406 $as_echo "yes" >&6; }
14407 else
14408
14409                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14410 $as_echo "no" >&6; }
14411                 # Disable seccomp filter as a target
14412                 have_seccomp_filter=0
14413
14414
14415 fi
14416 rm -f core conftest.err conftest.$ac_objext \
14417     conftest$ac_exeext conftest.$ac_ext
14418 fi
14419
14420 # Decide which sandbox style to use
14421 sandbox_arg=""
14422
14423 # Check whether --with-sandbox was given.
14424 if test "${with_sandbox+set}" = set; then :
14425   withval=$with_sandbox;
14426                 if test "x$withval" = "xyes" ; then
14427                         sandbox_arg=""
14428                 else
14429                         sandbox_arg="$withval"
14430                 fi
14431
14432
14433 fi
14434
14435
14436 # Some platforms (seems to be the ones that have a kernel poll(2)-type
14437 # function with which they implement select(2)) use an extra file descriptor
14438 # when calling select(2), which means we can't use the rlimit sandbox.
14439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select works with descriptor rlimit" >&5
14440 $as_echo_n "checking if select works with descriptor rlimit... " >&6; }
14441 if test "$cross_compiling" = yes; then :
14442   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
14443 $as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
14444          select_works_with_rlimit=yes
14445
14446 else
14447   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14448 /* end confdefs.h.  */
14449
14450 #include <sys/types.h>
14451 #ifdef HAVE_SYS_TIME_H
14452 # include <sys/time.h>
14453 #endif
14454 #include <sys/resource.h>
14455 #ifdef HAVE_SYS_SELECT_H
14456 # include <sys/select.h>
14457 #endif
14458 #include <errno.h>
14459 #include <fcntl.h>
14460 #include <stdlib.h>
14461
14462 int
14463 main ()
14464 {
14465
14466         struct rlimit rl_zero;
14467         int fd, r;
14468         fd_set fds;
14469         struct timeval tv;
14470
14471         fd = open("/dev/null", O_RDONLY);
14472         FD_ZERO(&fds);
14473         FD_SET(fd, &fds);
14474         rl_zero.rlim_cur = rl_zero.rlim_max = 0;
14475         setrlimit(RLIMIT_FSIZE, &rl_zero);
14476         setrlimit(RLIMIT_NOFILE, &rl_zero);
14477         tv.tv_sec = 1;
14478         tv.tv_usec = 0;
14479         r = select(fd+1, &fds, NULL, NULL, &tv);
14480         exit (r == -1 ? 1 : 0);
14481
14482   ;
14483   return 0;
14484 }
14485 _ACEOF
14486 if ac_fn_c_try_run "$LINENO"; then :
14487   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14488 $as_echo "yes" >&6; }
14489          select_works_with_rlimit=yes
14490 else
14491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14492 $as_echo "no" >&6; }
14493          select_works_with_rlimit=no
14494 fi
14495 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14496   conftest.$ac_objext conftest.beam conftest.$ac_ext
14497 fi
14498
14499
14500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setrlimit(RLIMIT_NOFILE,{0,0}) works" >&5
14501 $as_echo_n "checking if setrlimit(RLIMIT_NOFILE,{0,0}) works... " >&6; }
14502 if test "$cross_compiling" = yes; then :
14503   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
14504 $as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
14505          rlimit_nofile_zero_works=yes
14506
14507 else
14508   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14509 /* end confdefs.h.  */
14510
14511 #include <sys/types.h>
14512 #ifdef HAVE_SYS_TIME_H
14513 # include <sys/time.h>
14514 #endif
14515 #include <sys/resource.h>
14516 #include <errno.h>
14517 #include <stdlib.h>
14518
14519 int
14520 main ()
14521 {
14522
14523         struct rlimit rl_zero;
14524         int fd, r;
14525         fd_set fds;
14526
14527         rl_zero.rlim_cur = rl_zero.rlim_max = 0;
14528         r = setrlimit(RLIMIT_NOFILE, &rl_zero);
14529         exit (r == -1 ? 1 : 0);
14530
14531   ;
14532   return 0;
14533 }
14534 _ACEOF
14535 if ac_fn_c_try_run "$LINENO"; then :
14536   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14537 $as_echo "yes" >&6; }
14538          rlimit_nofile_zero_works=yes
14539 else
14540   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14541 $as_echo "no" >&6; }
14542          rlimit_nofile_zero_works=no
14543 fi
14544 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14545   conftest.$ac_objext conftest.beam conftest.$ac_ext
14546 fi
14547
14548
14549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setrlimit RLIMIT_FSIZE works" >&5
14550 $as_echo_n "checking if setrlimit RLIMIT_FSIZE works... " >&6; }
14551 if test "$cross_compiling" = yes; then :
14552   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
14553 $as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
14554
14555 else
14556   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14557 /* end confdefs.h.  */
14558
14559 #include <sys/types.h>
14560 #include <sys/resource.h>
14561 #include <stdlib.h>
14562
14563 int
14564 main ()
14565 {
14566
14567                 struct rlimit rl_zero;
14568
14569                 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
14570                 exit(setrlimit(RLIMIT_FSIZE, &rl_zero) != 0);
14571
14572   ;
14573   return 0;
14574 }
14575 _ACEOF
14576 if ac_fn_c_try_run "$LINENO"; then :
14577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14578 $as_echo "yes" >&6; }
14579 else
14580   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14581 $as_echo "no" >&6; }
14582
14583 $as_echo "#define SANDBOX_SKIP_RLIMIT_FSIZE 1" >>confdefs.h
14584
14585 fi
14586 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14587   conftest.$ac_objext conftest.beam conftest.$ac_ext
14588 fi
14589
14590
14591 if test "x$sandbox_arg" = "xpledge" || \
14592    ( test -z "$sandbox_arg" && test "x$ac_cv_func_pledge" = "xyes" ) ; then
14593         test "x$ac_cv_func_pledge" != "xyes" && \
14594                 as_fn_error $? "pledge sandbox requires pledge(2) support" "$LINENO" 5
14595         SANDBOX_STYLE="pledge"
14596
14597 $as_echo "#define SANDBOX_PLEDGE 1" >>confdefs.h
14598
14599 elif test "x$sandbox_arg" = "xsystrace" || \
14600    ( test -z "$sandbox_arg" && test "x$have_systr_policy_kill" = "x1" ) ; then
14601         test "x$have_systr_policy_kill" != "x1" && \
14602                 as_fn_error $? "systrace sandbox requires systrace headers and SYSTR_POLICY_KILL support" "$LINENO" 5
14603         SANDBOX_STYLE="systrace"
14604
14605 $as_echo "#define SANDBOX_SYSTRACE 1" >>confdefs.h
14606
14607 elif test "x$sandbox_arg" = "xdarwin" || \
14608      ( test -z "$sandbox_arg" && test "x$ac_cv_func_sandbox_init" = "xyes" && \
14609        test "x$ac_cv_header_sandbox_h" = "xyes") ; then
14610         test "x$ac_cv_func_sandbox_init" != "xyes" -o \
14611              "x$ac_cv_header_sandbox_h" != "xyes" && \
14612                 as_fn_error $? "Darwin seatbelt sandbox requires sandbox.h and sandbox_init function" "$LINENO" 5
14613         SANDBOX_STYLE="darwin"
14614
14615 $as_echo "#define SANDBOX_DARWIN 1" >>confdefs.h
14616
14617 elif test "x$sandbox_arg" = "xseccomp_filter" || \
14618      ( test -z "$sandbox_arg" && \
14619        test "x$have_seccomp_filter" = "x1" && \
14620        test "x$ac_cv_header_elf_h" = "xyes" && \
14621        test "x$ac_cv_header_linux_audit_h" = "xyes" && \
14622        test "x$ac_cv_header_linux_filter_h" = "xyes" && \
14623        test "x$seccomp_audit_arch" != "x" && \
14624        test "x$have_linux_no_new_privs" = "x1" && \
14625        test "x$ac_cv_func_prctl" = "xyes" ) ; then
14626         test "x$seccomp_audit_arch" = "x" && \
14627                 as_fn_error $? "seccomp_filter sandbox not supported on $host" "$LINENO" 5
14628         test "x$have_linux_no_new_privs" != "x1" && \
14629                 as_fn_error $? "seccomp_filter sandbox requires PR_SET_NO_NEW_PRIVS" "$LINENO" 5
14630         test "x$have_seccomp_filter" != "x1" && \
14631                 as_fn_error $? "seccomp_filter sandbox requires seccomp headers" "$LINENO" 5
14632         test "x$ac_cv_func_prctl" != "xyes" && \
14633                 as_fn_error $? "seccomp_filter sandbox requires prctl function" "$LINENO" 5
14634         SANDBOX_STYLE="seccomp_filter"
14635
14636 $as_echo "#define SANDBOX_SECCOMP_FILTER 1" >>confdefs.h
14637
14638 elif test "x$sandbox_arg" = "xcapsicum" || \
14639      ( test -z "$sandbox_arg" && \
14640        test "x$ac_cv_header_sys_capsicum_h" = "xyes" && \
14641        test "x$ac_cv_func_cap_rights_limit" = "xyes") ; then
14642        test "x$ac_cv_header_sys_capsicum_h" != "xyes" && \
14643                 as_fn_error $? "capsicum sandbox requires sys/capsicum.h header" "$LINENO" 5
14644        test "x$ac_cv_func_cap_rights_limit" != "xyes" && \
14645                 as_fn_error $? "capsicum sandbox requires cap_rights_limit function" "$LINENO" 5
14646        SANDBOX_STYLE="capsicum"
14647
14648 $as_echo "#define SANDBOX_CAPSICUM 1" >>confdefs.h
14649
14650 elif test "x$sandbox_arg" = "xrlimit" || \
14651      ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" && \
14652        test "x$select_works_with_rlimit" = "xyes" && \
14653        test "x$rlimit_nofile_zero_works" = "xyes" ) ; then
14654         test "x$ac_cv_func_setrlimit" != "xyes" && \
14655                 as_fn_error $? "rlimit sandbox requires setrlimit function" "$LINENO" 5
14656         test "x$select_works_with_rlimit" != "xyes" && \
14657                 as_fn_error $? "rlimit sandbox requires select to work with rlimit" "$LINENO" 5
14658         SANDBOX_STYLE="rlimit"
14659
14660 $as_echo "#define SANDBOX_RLIMIT 1" >>confdefs.h
14661
14662 elif test "x$sandbox_arg" = "xsolaris" || \
14663    ( test -z "$sandbox_arg" && test "x$SOLARIS_PRIVS" = "xyes" ) ; then
14664         SANDBOX_STYLE="solaris"
14665
14666 $as_echo "#define SANDBOX_SOLARIS 1" >>confdefs.h
14667
14668 elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \
14669      test "x$sandbox_arg" = "xnone" || test "x$sandbox_arg" = "xnull" ; then
14670         SANDBOX_STYLE="none"
14671
14672 $as_echo "#define SANDBOX_NULL 1" >>confdefs.h
14673
14674 else
14675         as_fn_error $? "unsupported --with-sandbox" "$LINENO" 5
14676 fi
14677
14678 # Cheap hack to ensure NEWS-OS libraries are arranged right.
14679 if test ! -z "$SONY" ; then
14680   LIBS="$LIBS -liberty";
14681 fi
14682
14683 # Check for  long long datatypes
14684 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
14685 if test "x$ac_cv_type_long_long" = xyes; then :
14686
14687 cat >>confdefs.h <<_ACEOF
14688 #define HAVE_LONG_LONG 1
14689 _ACEOF
14690
14691
14692 fi
14693 ac_fn_c_check_type "$LINENO" "unsigned long long" "ac_cv_type_unsigned_long_long" "$ac_includes_default"
14694 if test "x$ac_cv_type_unsigned_long_long" = xyes; then :
14695
14696 cat >>confdefs.h <<_ACEOF
14697 #define HAVE_UNSIGNED_LONG_LONG 1
14698 _ACEOF
14699
14700
14701 fi
14702 ac_fn_c_check_type "$LINENO" "long double" "ac_cv_type_long_double" "$ac_includes_default"
14703 if test "x$ac_cv_type_long_double" = xyes; then :
14704
14705 cat >>confdefs.h <<_ACEOF
14706 #define HAVE_LONG_DOUBLE 1
14707 _ACEOF
14708
14709
14710 fi
14711
14712
14713 # Check datatype sizes
14714 # The cast to long int works around a bug in the HP C Compiler
14715 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14716 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14717 # This bug is HP SR number 8606223364.
14718 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short int" >&5
14719 $as_echo_n "checking size of short int... " >&6; }
14720 if ${ac_cv_sizeof_short_int+:} false; then :
14721   $as_echo_n "(cached) " >&6
14722 else
14723   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short int))" "ac_cv_sizeof_short_int"        "$ac_includes_default"; then :
14724
14725 else
14726   if test "$ac_cv_type_short_int" = yes; then
14727      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14728 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14729 as_fn_error 77 "cannot compute sizeof (short int)
14730 See \`config.log' for more details" "$LINENO" 5; }
14731    else
14732      ac_cv_sizeof_short_int=0
14733    fi
14734 fi
14735
14736 fi
14737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short_int" >&5
14738 $as_echo "$ac_cv_sizeof_short_int" >&6; }
14739
14740
14741
14742 cat >>confdefs.h <<_ACEOF
14743 #define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
14744 _ACEOF
14745
14746
14747 # The cast to long int works around a bug in the HP C Compiler
14748 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14749 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14750 # This bug is HP SR number 8606223364.
14751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
14752 $as_echo_n "checking size of int... " >&6; }
14753 if ${ac_cv_sizeof_int+:} false; then :
14754   $as_echo_n "(cached) " >&6
14755 else
14756   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
14757
14758 else
14759   if test "$ac_cv_type_int" = yes; then
14760      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14761 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14762 as_fn_error 77 "cannot compute sizeof (int)
14763 See \`config.log' for more details" "$LINENO" 5; }
14764    else
14765      ac_cv_sizeof_int=0
14766    fi
14767 fi
14768
14769 fi
14770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
14771 $as_echo "$ac_cv_sizeof_int" >&6; }
14772
14773
14774
14775 cat >>confdefs.h <<_ACEOF
14776 #define SIZEOF_INT $ac_cv_sizeof_int
14777 _ACEOF
14778
14779
14780 # The cast to long int works around a bug in the HP C Compiler
14781 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14782 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14783 # This bug is HP SR number 8606223364.
14784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5
14785 $as_echo_n "checking size of long int... " >&6; }
14786 if ${ac_cv_sizeof_long_int+:} false; then :
14787   $as_echo_n "(cached) " >&6
14788 else
14789   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int"        "$ac_includes_default"; then :
14790
14791 else
14792   if test "$ac_cv_type_long_int" = yes; then
14793      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14794 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14795 as_fn_error 77 "cannot compute sizeof (long int)
14796 See \`config.log' for more details" "$LINENO" 5; }
14797    else
14798      ac_cv_sizeof_long_int=0
14799    fi
14800 fi
14801
14802 fi
14803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_int" >&5
14804 $as_echo "$ac_cv_sizeof_long_int" >&6; }
14805
14806
14807
14808 cat >>confdefs.h <<_ACEOF
14809 #define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
14810 _ACEOF
14811
14812
14813 # The cast to long int works around a bug in the HP C Compiler
14814 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
14815 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
14816 # This bug is HP SR number 8606223364.
14817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5
14818 $as_echo_n "checking size of long long int... " >&6; }
14819 if ${ac_cv_sizeof_long_long_int+:} false; then :
14820   $as_echo_n "(cached) " >&6
14821 else
14822   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int"        "$ac_includes_default"; then :
14823
14824 else
14825   if test "$ac_cv_type_long_long_int" = yes; then
14826      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
14827 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
14828 as_fn_error 77 "cannot compute sizeof (long long int)
14829 See \`config.log' for more details" "$LINENO" 5; }
14830    else
14831      ac_cv_sizeof_long_long_int=0
14832    fi
14833 fi
14834
14835 fi
14836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long_int" >&5
14837 $as_echo "$ac_cv_sizeof_long_long_int" >&6; }
14838
14839
14840
14841 cat >>confdefs.h <<_ACEOF
14842 #define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
14843 _ACEOF
14844
14845
14846
14847 # Sanity check long long for some platforms (AIX)
14848 if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
14849         ac_cv_sizeof_long_long_int=0
14850 fi
14851
14852 # compute LLONG_MIN and LLONG_MAX if we don't know them.
14853 if test -z "$have_llong_max"; then
14854         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for max value of long long" >&5
14855 $as_echo_n "checking for max value of long long... " >&6; }
14856         if test "$cross_compiling" = yes; then :
14857
14858                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
14859 $as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
14860
14861
14862 else
14863   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14864 /* end confdefs.h.  */
14865
14866 #include <stdio.h>
14867 /* Why is this so damn hard? */
14868 #ifdef __GNUC__
14869 # undef __GNUC__
14870 #endif
14871 #define __USE_ISOC99
14872 #include <limits.h>
14873 #define DATA "conftest.llminmax"
14874 #define my_abs(a) ((a) < 0 ? ((a) * -1) : (a))
14875
14876 /*
14877  * printf in libc on some platforms (eg old Tru64) does not understand %lld so
14878  * we do this the hard way.
14879  */
14880 static int
14881 fprint_ll(FILE *f, long long n)
14882 {
14883         unsigned int i;
14884         int l[sizeof(long long) * 8];
14885
14886         if (n < 0)
14887                 if (fprintf(f, "-") < 0)
14888                         return -1;
14889         for (i = 0; n != 0; i++) {
14890                 l[i] = my_abs(n % 10);
14891                 n /= 10;
14892         }
14893         do {
14894                 if (fprintf(f, "%d", l[--i]) < 0)
14895                         return -1;
14896         } while (i != 0);
14897         if (fprintf(f, " ") < 0)
14898                 return -1;
14899         return 0;
14900 }
14901
14902 int
14903 main ()
14904 {
14905
14906         FILE *f;
14907         long long i, llmin, llmax = 0;
14908
14909         if((f = fopen(DATA,"w")) == NULL)
14910                 exit(1);
14911
14912 #if defined(LLONG_MIN) && defined(LLONG_MAX)
14913         fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n");
14914         llmin = LLONG_MIN;
14915         llmax = LLONG_MAX;
14916 #else
14917         fprintf(stderr, "Calculating  LLONG_MIN and LLONG_MAX\n");
14918         /* This will work on one's complement and two's complement */
14919         for (i = 1; i > llmax; i <<= 1, i++)
14920                 llmax = i;
14921         llmin = llmax + 1LL;    /* wrap */
14922 #endif
14923
14924         /* Sanity check */
14925         if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
14926             || llmax - 1 > llmax || llmin == llmax || llmin == 0
14927             || llmax == 0 || llmax < LONG_MAX || llmin > LONG_MIN) {
14928                 fprintf(f, "unknown unknown\n");
14929                 exit(2);
14930         }
14931
14932         if (fprint_ll(f, llmin) < 0)
14933                 exit(3);
14934         if (fprint_ll(f, llmax) < 0)
14935                 exit(4);
14936         if (fclose(f) < 0)
14937                 exit(5);
14938         exit(0);
14939
14940   ;
14941   return 0;
14942 }
14943 _ACEOF
14944 if ac_fn_c_try_run "$LINENO"; then :
14945
14946                         llong_min=`$AWK '{print $1}' conftest.llminmax`
14947                         llong_max=`$AWK '{print $2}' conftest.llminmax`
14948
14949                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_max" >&5
14950 $as_echo "$llong_max" >&6; }
14951
14952 cat >>confdefs.h <<_ACEOF
14953 #define LLONG_MAX ${llong_max}LL
14954 _ACEOF
14955
14956                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for min value of long long" >&5
14957 $as_echo_n "checking for min value of long long... " >&6; }
14958                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_min" >&5
14959 $as_echo "$llong_min" >&6; }
14960
14961 cat >>confdefs.h <<_ACEOF
14962 #define LLONG_MIN ${llong_min}LL
14963 _ACEOF
14964
14965
14966 else
14967
14968                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14969 $as_echo "not found" >&6; }
14970
14971 fi
14972 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14973   conftest.$ac_objext conftest.beam conftest.$ac_ext
14974 fi
14975
14976 fi
14977
14978
14979 # More checks for data types
14980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int type" >&5
14981 $as_echo_n "checking for u_int type... " >&6; }
14982 if ${ac_cv_have_u_int+:} false; then :
14983   $as_echo_n "(cached) " >&6
14984 else
14985
14986         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14987 /* end confdefs.h.  */
14988  #include <sys/types.h>
14989 int
14990 main ()
14991 {
14992  u_int a; a = 1;
14993   ;
14994   return 0;
14995 }
14996 _ACEOF
14997 if ac_fn_c_try_compile "$LINENO"; then :
14998    ac_cv_have_u_int="yes"
14999 else
15000    ac_cv_have_u_int="no"
15001
15002 fi
15003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15004
15005 fi
15006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int" >&5
15007 $as_echo "$ac_cv_have_u_int" >&6; }
15008 if test "x$ac_cv_have_u_int" = "xyes" ; then
15009
15010 $as_echo "#define HAVE_U_INT 1" >>confdefs.h
15011
15012         have_u_int=1
15013 fi
15014
15015 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types" >&5
15016 $as_echo_n "checking for intXX_t types... " >&6; }
15017 if ${ac_cv_have_intxx_t+:} false; then :
15018   $as_echo_n "(cached) " >&6
15019 else
15020
15021         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15022 /* end confdefs.h.  */
15023  #include <sys/types.h>
15024 int
15025 main ()
15026 {
15027  int8_t a; int16_t b; int32_t c; a = b = c = 1;
15028   ;
15029   return 0;
15030 }
15031 _ACEOF
15032 if ac_fn_c_try_compile "$LINENO"; then :
15033    ac_cv_have_intxx_t="yes"
15034 else
15035    ac_cv_have_intxx_t="no"
15036
15037 fi
15038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15039
15040 fi
15041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_intxx_t" >&5
15042 $as_echo "$ac_cv_have_intxx_t" >&6; }
15043 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
15044
15045 $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
15046
15047         have_intxx_t=1
15048 fi
15049
15050 if (test -z "$have_intxx_t" && \
15051            test "x$ac_cv_header_stdint_h" = "xyes")
15052 then
15053     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types in stdint.h" >&5
15054 $as_echo_n "checking for intXX_t types in stdint.h... " >&6; }
15055         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15056 /* end confdefs.h.  */
15057  #include <stdint.h>
15058 int
15059 main ()
15060 {
15061  int8_t a; int16_t b; int32_t c; a = b = c = 1;
15062   ;
15063   return 0;
15064 }
15065 _ACEOF
15066 if ac_fn_c_try_compile "$LINENO"; then :
15067
15068                         $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
15069
15070                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15071 $as_echo "yes" >&6; }
15072
15073 else
15074    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15075 $as_echo "no" >&6; }
15076
15077 fi
15078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15079 fi
15080
15081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int64_t type" >&5
15082 $as_echo_n "checking for int64_t type... " >&6; }
15083 if ${ac_cv_have_int64_t+:} false; then :
15084   $as_echo_n "(cached) " >&6
15085 else
15086
15087         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15088 /* end confdefs.h.  */
15089
15090 #include <sys/types.h>
15091 #ifdef HAVE_STDINT_H
15092 # include <stdint.h>
15093 #endif
15094 #include <sys/socket.h>
15095 #ifdef HAVE_SYS_BITYPES_H
15096 # include <sys/bitypes.h>
15097 #endif
15098
15099 int
15100 main ()
15101 {
15102
15103 int64_t a; a = 1;
15104
15105   ;
15106   return 0;
15107 }
15108 _ACEOF
15109 if ac_fn_c_try_compile "$LINENO"; then :
15110    ac_cv_have_int64_t="yes"
15111 else
15112    ac_cv_have_int64_t="no"
15113
15114 fi
15115 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15116
15117 fi
15118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_int64_t" >&5
15119 $as_echo "$ac_cv_have_int64_t" >&6; }
15120 if test "x$ac_cv_have_int64_t" = "xyes" ; then
15121
15122 $as_echo "#define HAVE_INT64_T 1" >>confdefs.h
15123
15124 fi
15125
15126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types" >&5
15127 $as_echo_n "checking for u_intXX_t types... " >&6; }
15128 if ${ac_cv_have_u_intxx_t+:} false; then :
15129   $as_echo_n "(cached) " >&6
15130 else
15131
15132         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15133 /* end confdefs.h.  */
15134  #include <sys/types.h>
15135 int
15136 main ()
15137 {
15138  u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
15139   ;
15140   return 0;
15141 }
15142 _ACEOF
15143 if ac_fn_c_try_compile "$LINENO"; then :
15144    ac_cv_have_u_intxx_t="yes"
15145 else
15146    ac_cv_have_u_intxx_t="no"
15147
15148 fi
15149 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15150
15151 fi
15152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_intxx_t" >&5
15153 $as_echo "$ac_cv_have_u_intxx_t" >&6; }
15154 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
15155
15156 $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
15157
15158         have_u_intxx_t=1
15159 fi
15160
15161 if test -z "$have_u_intxx_t" ; then
15162     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types in sys/socket.h" >&5
15163 $as_echo_n "checking for u_intXX_t types in sys/socket.h... " >&6; }
15164         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15165 /* end confdefs.h.  */
15166  #include <sys/socket.h>
15167 int
15168 main ()
15169 {
15170  u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
15171   ;
15172   return 0;
15173 }
15174 _ACEOF
15175 if ac_fn_c_try_compile "$LINENO"; then :
15176
15177                         $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
15178
15179                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15180 $as_echo "yes" >&6; }
15181
15182 else
15183    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15184 $as_echo "no" >&6; }
15185
15186 fi
15187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15188 fi
15189
15190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t types" >&5
15191 $as_echo_n "checking for u_int64_t types... " >&6; }
15192 if ${ac_cv_have_u_int64_t+:} false; then :
15193   $as_echo_n "(cached) " >&6
15194 else
15195
15196         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15197 /* end confdefs.h.  */
15198  #include <sys/types.h>
15199 int
15200 main ()
15201 {
15202  u_int64_t a; a = 1;
15203   ;
15204   return 0;
15205 }
15206 _ACEOF
15207 if ac_fn_c_try_compile "$LINENO"; then :
15208    ac_cv_have_u_int64_t="yes"
15209 else
15210    ac_cv_have_u_int64_t="no"
15211
15212 fi
15213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15214
15215 fi
15216 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int64_t" >&5
15217 $as_echo "$ac_cv_have_u_int64_t" >&6; }
15218 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
15219
15220 $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
15221
15222         have_u_int64_t=1
15223 fi
15224
15225 if (test -z "$have_u_int64_t" && \
15226            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
15227 then
15228     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t type in sys/bitypes.h" >&5
15229 $as_echo_n "checking for u_int64_t type in sys/bitypes.h... " >&6; }
15230         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15231 /* end confdefs.h.  */
15232  #include <sys/bitypes.h>
15233 int
15234 main ()
15235 {
15236  u_int64_t a; a = 1
15237   ;
15238   return 0;
15239 }
15240 _ACEOF
15241 if ac_fn_c_try_compile "$LINENO"; then :
15242
15243                         $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
15244
15245                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15246 $as_echo "yes" >&6; }
15247
15248 else
15249    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15250 $as_echo "no" >&6; }
15251
15252 fi
15253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15254 fi
15255
15256 if test -z "$have_u_intxx_t" ; then
15257         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types" >&5
15258 $as_echo_n "checking for uintXX_t types... " >&6; }
15259 if ${ac_cv_have_uintxx_t+:} false; then :
15260   $as_echo_n "(cached) " >&6
15261 else
15262
15263                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15264 /* end confdefs.h.  */
15265
15266 #include <sys/types.h>
15267
15268 int
15269 main ()
15270 {
15271
15272         uint8_t a;
15273         uint16_t b;
15274         uint32_t c;
15275         a = b = c = 1;
15276
15277   ;
15278   return 0;
15279 }
15280 _ACEOF
15281 if ac_fn_c_try_compile "$LINENO"; then :
15282    ac_cv_have_uintxx_t="yes"
15283 else
15284    ac_cv_have_uintxx_t="no"
15285
15286 fi
15287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15288
15289 fi
15290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_uintxx_t" >&5
15291 $as_echo "$ac_cv_have_uintxx_t" >&6; }
15292         if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
15293
15294 $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
15295
15296         fi
15297 fi
15298
15299 if (test -z "$have_uintxx_t" && \
15300            test "x$ac_cv_header_stdint_h" = "xyes")
15301 then
15302     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in stdint.h" >&5
15303 $as_echo_n "checking for uintXX_t types in stdint.h... " >&6; }
15304         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15305 /* end confdefs.h.  */
15306  #include <stdint.h>
15307 int
15308 main ()
15309 {
15310  uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
15311   ;
15312   return 0;
15313 }
15314 _ACEOF
15315 if ac_fn_c_try_compile "$LINENO"; then :
15316
15317                         $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
15318
15319                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15320 $as_echo "yes" >&6; }
15321
15322 else
15323    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15324 $as_echo "no" >&6; }
15325
15326 fi
15327 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15328 fi
15329
15330 if (test -z "$have_uintxx_t" && \
15331            test "x$ac_cv_header_inttypes_h" = "xyes")
15332 then
15333     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in inttypes.h" >&5
15334 $as_echo_n "checking for uintXX_t types in inttypes.h... " >&6; }
15335         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15336 /* end confdefs.h.  */
15337  #include <inttypes.h>
15338 int
15339 main ()
15340 {
15341  uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
15342   ;
15343   return 0;
15344 }
15345 _ACEOF
15346 if ac_fn_c_try_compile "$LINENO"; then :
15347
15348                         $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
15349
15350                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15351 $as_echo "yes" >&6; }
15352
15353 else
15354    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15355 $as_echo "no" >&6; }
15356
15357 fi
15358 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15359 fi
15360
15361 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
15362            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
15363 then
15364         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
15365 $as_echo_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h... " >&6; }
15366         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15367 /* end confdefs.h.  */
15368
15369 #include <sys/bitypes.h>
15370
15371 int
15372 main ()
15373 {
15374
15375                         int8_t a; int16_t b; int32_t c;
15376                         u_int8_t e; u_int16_t f; u_int32_t g;
15377                         a = b = c = e = f = g = 1;
15378
15379   ;
15380   return 0;
15381 }
15382 _ACEOF
15383 if ac_fn_c_try_compile "$LINENO"; then :
15384
15385                         $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
15386
15387                         $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
15388
15389                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15390 $as_echo "yes" >&6; }
15391
15392 else
15393   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15394 $as_echo "no" >&6; }
15395
15396 fi
15397 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15398 fi
15399
15400
15401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_char" >&5
15402 $as_echo_n "checking for u_char... " >&6; }
15403 if ${ac_cv_have_u_char+:} false; then :
15404   $as_echo_n "(cached) " >&6
15405 else
15406
15407         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15408 /* end confdefs.h.  */
15409  #include <sys/types.h>
15410 int
15411 main ()
15412 {
15413  u_char foo; foo = 125;
15414   ;
15415   return 0;
15416 }
15417 _ACEOF
15418 if ac_fn_c_try_compile "$LINENO"; then :
15419    ac_cv_have_u_char="yes"
15420 else
15421    ac_cv_have_u_char="no"
15422
15423 fi
15424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15425
15426 fi
15427 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_char" >&5
15428 $as_echo "$ac_cv_have_u_char" >&6; }
15429 if test "x$ac_cv_have_u_char" = "xyes" ; then
15430
15431 $as_echo "#define HAVE_U_CHAR 1" >>confdefs.h
15432
15433 fi
15434
15435 ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "
15436 #include <sys/types.h>
15437 #include <stdint.h>
15438
15439 "
15440 if test "x$ac_cv_type_intmax_t" = xyes; then :
15441
15442 cat >>confdefs.h <<_ACEOF
15443 #define HAVE_INTMAX_T 1
15444 _ACEOF
15445
15446
15447 fi
15448 ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "
15449 #include <sys/types.h>
15450 #include <stdint.h>
15451
15452 "
15453 if test "x$ac_cv_type_uintmax_t" = xyes; then :
15454
15455 cat >>confdefs.h <<_ACEOF
15456 #define HAVE_UINTMAX_T 1
15457 _ACEOF
15458
15459
15460 fi
15461
15462
15463
15464    ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
15465 #include <sys/socket.h>
15466 "
15467 if test "x$ac_cv_type_socklen_t" = xyes; then :
15468
15469 else
15470
15471       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
15472 $as_echo_n "checking for socklen_t equivalent... " >&6; }
15473       if ${curl_cv_socklen_t_equiv+:} false; then :
15474   $as_echo_n "(cached) " >&6
15475 else
15476
15477          # Systems have either "struct sockaddr *" or
15478          # "void *" as the second argument to getpeername
15479          curl_cv_socklen_t_equiv=
15480          for arg2 in "struct sockaddr" void; do
15481             for t in int size_t unsigned long "unsigned long"; do
15482                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15483 /* end confdefs.h.  */
15484
15485                   #include <sys/types.h>
15486                   #include <sys/socket.h>
15487
15488                   int getpeername (int, $arg2 *, $t *);
15489
15490 int
15491 main ()
15492 {
15493
15494                   $t len;
15495                   getpeername(0,0,&len);
15496
15497   ;
15498   return 0;
15499 }
15500 _ACEOF
15501 if ac_fn_c_try_compile "$LINENO"; then :
15502
15503                   curl_cv_socklen_t_equiv="$t"
15504                   break
15505
15506 fi
15507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15508             done
15509          done
15510
15511          if test "x$curl_cv_socklen_t_equiv" = x; then
15512             as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
15513          fi
15514
15515 fi
15516
15517       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_socklen_t_equiv" >&5
15518 $as_echo "$curl_cv_socklen_t_equiv" >&6; }
15519
15520 cat >>confdefs.h <<_ACEOF
15521 #define socklen_t $curl_cv_socklen_t_equiv
15522 _ACEOF
15523
15524 fi
15525
15526
15527
15528 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
15529 "
15530 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
15531
15532 cat >>confdefs.h <<_ACEOF
15533 #define HAVE_SIG_ATOMIC_T 1
15534 _ACEOF
15535
15536
15537 fi
15538
15539 ac_fn_c_check_type "$LINENO" "fsblkcnt_t" "ac_cv_type_fsblkcnt_t" "
15540 #include <sys/types.h>
15541 #ifdef HAVE_SYS_BITYPES_H
15542 #include <sys/bitypes.h>
15543 #endif
15544 #ifdef HAVE_SYS_STATFS_H
15545 #include <sys/statfs.h>
15546 #endif
15547 #ifdef HAVE_SYS_STATVFS_H
15548 #include <sys/statvfs.h>
15549 #endif
15550
15551 "
15552 if test "x$ac_cv_type_fsblkcnt_t" = xyes; then :
15553
15554 cat >>confdefs.h <<_ACEOF
15555 #define HAVE_FSBLKCNT_T 1
15556 _ACEOF
15557
15558
15559 fi
15560 ac_fn_c_check_type "$LINENO" "fsfilcnt_t" "ac_cv_type_fsfilcnt_t" "
15561 #include <sys/types.h>
15562 #ifdef HAVE_SYS_BITYPES_H
15563 #include <sys/bitypes.h>
15564 #endif
15565 #ifdef HAVE_SYS_STATFS_H
15566 #include <sys/statfs.h>
15567 #endif
15568 #ifdef HAVE_SYS_STATVFS_H
15569 #include <sys/statvfs.h>
15570 #endif
15571
15572 "
15573 if test "x$ac_cv_type_fsfilcnt_t" = xyes; then :
15574
15575 cat >>confdefs.h <<_ACEOF
15576 #define HAVE_FSFILCNT_T 1
15577 _ACEOF
15578
15579
15580 fi
15581
15582
15583 ac_fn_c_check_member "$LINENO" "struct statfs" "f_flags" "ac_cv_member_struct_statfs_f_flags" "
15584 #include <sys/types.h>
15585 #ifdef HAVE_SYS_BITYPES_H
15586 #include <sys/bitypes.h>
15587 #endif
15588 #ifdef HAVE_SYS_STATFS_H
15589 #include <sys/statfs.h>
15590 #endif
15591 #ifdef HAVE_SYS_STATVFS_H
15592 #include <sys/statvfs.h>
15593 #endif
15594 #ifdef HAVE_SYS_VFS_H
15595 #include <sys/vfs.h>
15596 #endif
15597
15598 "
15599 if test "x$ac_cv_member_struct_statfs_f_flags" = xyes; then :
15600
15601 cat >>confdefs.h <<_ACEOF
15602 #define HAVE_STRUCT_STATFS_F_FLAGS 1
15603 _ACEOF
15604
15605
15606 fi
15607
15608
15609
15610 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "#include <sys/types.h>
15611 #include <netinet/in.h>
15612 "
15613 if test "x$ac_cv_type_in_addr_t" = xyes; then :
15614
15615 cat >>confdefs.h <<_ACEOF
15616 #define HAVE_IN_ADDR_T 1
15617 _ACEOF
15618
15619
15620 fi
15621 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "#include <sys/types.h>
15622 #include <netinet/in.h>
15623 "
15624 if test "x$ac_cv_type_in_port_t" = xyes; then :
15625
15626 cat >>confdefs.h <<_ACEOF
15627 #define HAVE_IN_PORT_T 1
15628 _ACEOF
15629
15630
15631 fi
15632
15633
15634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for size_t" >&5
15635 $as_echo_n "checking for size_t... " >&6; }
15636 if ${ac_cv_have_size_t+:} false; then :
15637   $as_echo_n "(cached) " >&6
15638 else
15639
15640         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15641 /* end confdefs.h.  */
15642  #include <sys/types.h>
15643 int
15644 main ()
15645 {
15646  size_t foo; foo = 1235;
15647   ;
15648   return 0;
15649 }
15650 _ACEOF
15651 if ac_fn_c_try_compile "$LINENO"; then :
15652    ac_cv_have_size_t="yes"
15653 else
15654    ac_cv_have_size_t="no"
15655
15656 fi
15657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15658
15659 fi
15660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t" >&5
15661 $as_echo "$ac_cv_have_size_t" >&6; }
15662 if test "x$ac_cv_have_size_t" = "xyes" ; then
15663
15664 $as_echo "#define HAVE_SIZE_T 1" >>confdefs.h
15665
15666 fi
15667
15668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
15669 $as_echo_n "checking for ssize_t... " >&6; }
15670 if ${ac_cv_have_ssize_t+:} false; then :
15671   $as_echo_n "(cached) " >&6
15672 else
15673
15674         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15675 /* end confdefs.h.  */
15676  #include <sys/types.h>
15677 int
15678 main ()
15679 {
15680  ssize_t foo; foo = 1235;
15681   ;
15682   return 0;
15683 }
15684 _ACEOF
15685 if ac_fn_c_try_compile "$LINENO"; then :
15686    ac_cv_have_ssize_t="yes"
15687 else
15688    ac_cv_have_ssize_t="no"
15689
15690 fi
15691 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15692
15693 fi
15694 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ssize_t" >&5
15695 $as_echo "$ac_cv_have_ssize_t" >&6; }
15696 if test "x$ac_cv_have_ssize_t" = "xyes" ; then
15697
15698 $as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
15699
15700 fi
15701
15702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
15703 $as_echo_n "checking for clock_t... " >&6; }
15704 if ${ac_cv_have_clock_t+:} false; then :
15705   $as_echo_n "(cached) " >&6
15706 else
15707
15708         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15709 /* end confdefs.h.  */
15710  #include <time.h>
15711 int
15712 main ()
15713 {
15714  clock_t foo; foo = 1235;
15715   ;
15716   return 0;
15717 }
15718 _ACEOF
15719 if ac_fn_c_try_compile "$LINENO"; then :
15720    ac_cv_have_clock_t="yes"
15721 else
15722    ac_cv_have_clock_t="no"
15723
15724 fi
15725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15726
15727 fi
15728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_clock_t" >&5
15729 $as_echo "$ac_cv_have_clock_t" >&6; }
15730 if test "x$ac_cv_have_clock_t" = "xyes" ; then
15731
15732 $as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h
15733
15734 fi
15735
15736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_family_t" >&5
15737 $as_echo_n "checking for sa_family_t... " >&6; }
15738 if ${ac_cv_have_sa_family_t+:} false; then :
15739   $as_echo_n "(cached) " >&6
15740 else
15741
15742         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15743 /* end confdefs.h.  */
15744
15745 #include <sys/types.h>
15746 #include <sys/socket.h>
15747
15748 int
15749 main ()
15750 {
15751  sa_family_t foo; foo = 1235;
15752   ;
15753   return 0;
15754 }
15755 _ACEOF
15756 if ac_fn_c_try_compile "$LINENO"; then :
15757    ac_cv_have_sa_family_t="yes"
15758 else
15759    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15760 /* end confdefs.h.  */
15761
15762 #include <sys/types.h>
15763 #include <sys/socket.h>
15764 #include <netinet/in.h>
15765
15766 int
15767 main ()
15768 {
15769  sa_family_t foo; foo = 1235;
15770   ;
15771   return 0;
15772 }
15773 _ACEOF
15774 if ac_fn_c_try_compile "$LINENO"; then :
15775    ac_cv_have_sa_family_t="yes"
15776 else
15777    ac_cv_have_sa_family_t="no"
15778
15779 fi
15780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15781
15782 fi
15783 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15784
15785 fi
15786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sa_family_t" >&5
15787 $as_echo "$ac_cv_have_sa_family_t" >&6; }
15788 if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
15789
15790 $as_echo "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
15791
15792 fi
15793
15794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pid_t" >&5
15795 $as_echo_n "checking for pid_t... " >&6; }
15796 if ${ac_cv_have_pid_t+:} false; then :
15797   $as_echo_n "(cached) " >&6
15798 else
15799
15800         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15801 /* end confdefs.h.  */
15802  #include <sys/types.h>
15803 int
15804 main ()
15805 {
15806  pid_t foo; foo = 1235;
15807   ;
15808   return 0;
15809 }
15810 _ACEOF
15811 if ac_fn_c_try_compile "$LINENO"; then :
15812    ac_cv_have_pid_t="yes"
15813 else
15814    ac_cv_have_pid_t="no"
15815
15816 fi
15817 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15818
15819 fi
15820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pid_t" >&5
15821 $as_echo "$ac_cv_have_pid_t" >&6; }
15822 if test "x$ac_cv_have_pid_t" = "xyes" ; then
15823
15824 $as_echo "#define HAVE_PID_T 1" >>confdefs.h
15825
15826 fi
15827
15828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mode_t" >&5
15829 $as_echo_n "checking for mode_t... " >&6; }
15830 if ${ac_cv_have_mode_t+:} false; then :
15831   $as_echo_n "(cached) " >&6
15832 else
15833
15834         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15835 /* end confdefs.h.  */
15836  #include <sys/types.h>
15837 int
15838 main ()
15839 {
15840  mode_t foo; foo = 1235;
15841   ;
15842   return 0;
15843 }
15844 _ACEOF
15845 if ac_fn_c_try_compile "$LINENO"; then :
15846    ac_cv_have_mode_t="yes"
15847 else
15848    ac_cv_have_mode_t="no"
15849
15850 fi
15851 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15852
15853 fi
15854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_mode_t" >&5
15855 $as_echo "$ac_cv_have_mode_t" >&6; }
15856 if test "x$ac_cv_have_mode_t" = "xyes" ; then
15857
15858 $as_echo "#define HAVE_MODE_T 1" >>confdefs.h
15859
15860 fi
15861
15862
15863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
15864 $as_echo_n "checking for struct sockaddr_storage... " >&6; }
15865 if ${ac_cv_have_struct_sockaddr_storage+:} false; then :
15866   $as_echo_n "(cached) " >&6
15867 else
15868
15869         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15870 /* end confdefs.h.  */
15871
15872 #include <sys/types.h>
15873 #include <sys/socket.h>
15874
15875 int
15876 main ()
15877 {
15878  struct sockaddr_storage s;
15879   ;
15880   return 0;
15881 }
15882 _ACEOF
15883 if ac_fn_c_try_compile "$LINENO"; then :
15884    ac_cv_have_struct_sockaddr_storage="yes"
15885 else
15886    ac_cv_have_struct_sockaddr_storage="no"
15887
15888 fi
15889 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15890
15891 fi
15892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_storage" >&5
15893 $as_echo "$ac_cv_have_struct_sockaddr_storage" >&6; }
15894 if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
15895
15896 $as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
15897
15898 fi
15899
15900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6" >&5
15901 $as_echo_n "checking for struct sockaddr_in6... " >&6; }
15902 if ${ac_cv_have_struct_sockaddr_in6+:} false; then :
15903   $as_echo_n "(cached) " >&6
15904 else
15905
15906         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15907 /* end confdefs.h.  */
15908
15909 #include <sys/types.h>
15910 #include <netinet/in.h>
15911
15912 int
15913 main ()
15914 {
15915  struct sockaddr_in6 s; s.sin6_family = 0;
15916   ;
15917   return 0;
15918 }
15919 _ACEOF
15920 if ac_fn_c_try_compile "$LINENO"; then :
15921    ac_cv_have_struct_sockaddr_in6="yes"
15922 else
15923    ac_cv_have_struct_sockaddr_in6="no"
15924
15925 fi
15926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15927
15928 fi
15929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_in6" >&5
15930 $as_echo "$ac_cv_have_struct_sockaddr_in6" >&6; }
15931 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
15932
15933 $as_echo "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h
15934
15935 fi
15936
15937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct in6_addr" >&5
15938 $as_echo_n "checking for struct in6_addr... " >&6; }
15939 if ${ac_cv_have_struct_in6_addr+:} false; then :
15940   $as_echo_n "(cached) " >&6
15941 else
15942
15943         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15944 /* end confdefs.h.  */
15945
15946 #include <sys/types.h>
15947 #include <netinet/in.h>
15948
15949 int
15950 main ()
15951 {
15952  struct in6_addr s; s.s6_addr[0] = 0;
15953   ;
15954   return 0;
15955 }
15956 _ACEOF
15957 if ac_fn_c_try_compile "$LINENO"; then :
15958    ac_cv_have_struct_in6_addr="yes"
15959 else
15960    ac_cv_have_struct_in6_addr="no"
15961
15962 fi
15963 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15964
15965 fi
15966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_in6_addr" >&5
15967 $as_echo "$ac_cv_have_struct_in6_addr" >&6; }
15968 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
15969
15970 $as_echo "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h
15971
15972
15973         ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "
15974 #ifdef HAVE_SYS_TYPES_H
15975 #include <sys/types.h>
15976 #endif
15977 #include <netinet/in.h>
15978
15979 "
15980 if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes; then :
15981
15982 cat >>confdefs.h <<_ACEOF
15983 #define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
15984 _ACEOF
15985
15986
15987 fi
15988
15989 fi
15990
15991 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct addrinfo" >&5
15992 $as_echo_n "checking for struct addrinfo... " >&6; }
15993 if ${ac_cv_have_struct_addrinfo+:} false; then :
15994   $as_echo_n "(cached) " >&6
15995 else
15996
15997         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15998 /* end confdefs.h.  */
15999
16000 #include <sys/types.h>
16001 #include <sys/socket.h>
16002 #include <netdb.h>
16003
16004 int
16005 main ()
16006 {
16007  struct addrinfo s; s.ai_flags = AI_PASSIVE;
16008   ;
16009   return 0;
16010 }
16011 _ACEOF
16012 if ac_fn_c_try_compile "$LINENO"; then :
16013    ac_cv_have_struct_addrinfo="yes"
16014 else
16015    ac_cv_have_struct_addrinfo="no"
16016
16017 fi
16018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16019
16020 fi
16021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_addrinfo" >&5
16022 $as_echo "$ac_cv_have_struct_addrinfo" >&6; }
16023 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
16024
16025 $as_echo "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
16026
16027 fi
16028
16029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
16030 $as_echo_n "checking for struct timeval... " >&6; }
16031 if ${ac_cv_have_struct_timeval+:} false; then :
16032   $as_echo_n "(cached) " >&6
16033 else
16034
16035         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16036 /* end confdefs.h.  */
16037  #include <sys/time.h>
16038 int
16039 main ()
16040 {
16041  struct timeval tv; tv.tv_sec = 1;
16042   ;
16043   return 0;
16044 }
16045 _ACEOF
16046 if ac_fn_c_try_compile "$LINENO"; then :
16047    ac_cv_have_struct_timeval="yes"
16048 else
16049    ac_cv_have_struct_timeval="no"
16050
16051 fi
16052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16053
16054 fi
16055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_timeval" >&5
16056 $as_echo "$ac_cv_have_struct_timeval" >&6; }
16057 if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
16058
16059 $as_echo "#define HAVE_STRUCT_TIMEVAL 1" >>confdefs.h
16060
16061         have_struct_timeval=1
16062 fi
16063
16064 ac_fn_c_check_type "$LINENO" "struct timespec" "ac_cv_type_struct_timespec" "$ac_includes_default"
16065 if test "x$ac_cv_type_struct_timespec" = xyes; then :
16066
16067 cat >>confdefs.h <<_ACEOF
16068 #define HAVE_STRUCT_TIMESPEC 1
16069 _ACEOF
16070
16071
16072 fi
16073
16074
16075 # We need int64_t or else certian parts of the compile will fail.
16076 if test "x$ac_cv_have_int64_t" = "xno" && \
16077         test "x$ac_cv_sizeof_long_int" != "x8" && \
16078         test "x$ac_cv_sizeof_long_long_int" = "x0" ; then
16079         echo "OpenSSH requires int64_t support.  Contact your vendor or install"
16080         echo "an alternative compiler (I.E., GCC) before continuing."
16081         echo ""
16082         exit 1;
16083 else
16084         if test "$cross_compiling" = yes; then :
16085   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
16086 $as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
16087
16088 else
16089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16090 /* end confdefs.h.  */
16091
16092 #include <stdio.h>
16093 #include <string.h>
16094 #ifdef HAVE_SNPRINTF
16095 main()
16096 {
16097         char buf[50];
16098         char expected_out[50];
16099         int mazsize = 50 ;
16100 #if (SIZEOF_LONG_INT == 8)
16101         long int num = 0x7fffffffffffffff;
16102 #else
16103         long long num = 0x7fffffffffffffffll;
16104 #endif
16105         strcpy(expected_out, "9223372036854775807");
16106         snprintf(buf, mazsize, "%lld", num);
16107         if(strcmp(buf, expected_out) != 0)
16108                 exit(1);
16109         exit(0);
16110 }
16111 #else
16112 main() { exit(0); }
16113 #endif
16114
16115 _ACEOF
16116 if ac_fn_c_try_run "$LINENO"; then :
16117    true
16118 else
16119    $as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
16120
16121 fi
16122 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16123   conftest.$ac_objext conftest.beam conftest.$ac_ext
16124 fi
16125
16126 fi
16127
16128
16129 # look for field 'ut_host' in header 'utmp.h'
16130                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16131                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
16132         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmp.h" >&5
16133 $as_echo_n "checking for ut_host field in utmp.h... " >&6; }
16134         if eval \${$ossh_varname+:} false; then :
16135   $as_echo_n "(cached) " >&6
16136 else
16137
16138                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16139 /* end confdefs.h.  */
16140 #include <utmp.h>
16141
16142 _ACEOF
16143 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16144   $EGREP "ut_host" >/dev/null 2>&1; then :
16145                         eval "$ossh_varname=yes"
16146 else
16147                         eval "$ossh_varname=no"
16148 fi
16149 rm -f conftest*
16150
16151 fi
16152
16153         ossh_result=`eval 'echo $'"$ossh_varname"`
16154         if test -n "`echo $ossh_varname`"; then
16155                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16156 $as_echo "$ossh_result" >&6; }
16157                 if test "x$ossh_result" = "xyes"; then
16158
16159 $as_echo "#define HAVE_HOST_IN_UTMP 1" >>confdefs.h
16160
16161                 fi
16162         else
16163                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16164 $as_echo "no" >&6; }
16165         fi
16166
16167
16168 # look for field 'ut_host' in header 'utmpx.h'
16169                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16170                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
16171         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmpx.h" >&5
16172 $as_echo_n "checking for ut_host field in utmpx.h... " >&6; }
16173         if eval \${$ossh_varname+:} false; then :
16174   $as_echo_n "(cached) " >&6
16175 else
16176
16177                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16178 /* end confdefs.h.  */
16179 #include <utmpx.h>
16180
16181 _ACEOF
16182 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16183   $EGREP "ut_host" >/dev/null 2>&1; then :
16184                         eval "$ossh_varname=yes"
16185 else
16186                         eval "$ossh_varname=no"
16187 fi
16188 rm -f conftest*
16189
16190 fi
16191
16192         ossh_result=`eval 'echo $'"$ossh_varname"`
16193         if test -n "`echo $ossh_varname`"; then
16194                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16195 $as_echo "$ossh_result" >&6; }
16196                 if test "x$ossh_result" = "xyes"; then
16197
16198 $as_echo "#define HAVE_HOST_IN_UTMPX 1" >>confdefs.h
16199
16200                 fi
16201         else
16202                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16203 $as_echo "no" >&6; }
16204         fi
16205
16206
16207 # look for field 'syslen' in header 'utmpx.h'
16208                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16209                 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
16210         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for syslen field in utmpx.h" >&5
16211 $as_echo_n "checking for syslen field in utmpx.h... " >&6; }
16212         if eval \${$ossh_varname+:} false; then :
16213   $as_echo_n "(cached) " >&6
16214 else
16215
16216                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16217 /* end confdefs.h.  */
16218 #include <utmpx.h>
16219
16220 _ACEOF
16221 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16222   $EGREP "syslen" >/dev/null 2>&1; then :
16223                         eval "$ossh_varname=yes"
16224 else
16225                         eval "$ossh_varname=no"
16226 fi
16227 rm -f conftest*
16228
16229 fi
16230
16231         ossh_result=`eval 'echo $'"$ossh_varname"`
16232         if test -n "`echo $ossh_varname`"; then
16233                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16234 $as_echo "$ossh_result" >&6; }
16235                 if test "x$ossh_result" = "xyes"; then
16236
16237 $as_echo "#define HAVE_SYSLEN_IN_UTMPX 1" >>confdefs.h
16238
16239                 fi
16240         else
16241                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16242 $as_echo "no" >&6; }
16243         fi
16244
16245
16246 # look for field 'ut_pid' in header 'utmp.h'
16247                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16248                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
16249         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_pid field in utmp.h" >&5
16250 $as_echo_n "checking for ut_pid field in utmp.h... " >&6; }
16251         if eval \${$ossh_varname+:} false; then :
16252   $as_echo_n "(cached) " >&6
16253 else
16254
16255                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16256 /* end confdefs.h.  */
16257 #include <utmp.h>
16258
16259 _ACEOF
16260 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16261   $EGREP "ut_pid" >/dev/null 2>&1; then :
16262                         eval "$ossh_varname=yes"
16263 else
16264                         eval "$ossh_varname=no"
16265 fi
16266 rm -f conftest*
16267
16268 fi
16269
16270         ossh_result=`eval 'echo $'"$ossh_varname"`
16271         if test -n "`echo $ossh_varname`"; then
16272                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16273 $as_echo "$ossh_result" >&6; }
16274                 if test "x$ossh_result" = "xyes"; then
16275
16276 $as_echo "#define HAVE_PID_IN_UTMP 1" >>confdefs.h
16277
16278                 fi
16279         else
16280                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16281 $as_echo "no" >&6; }
16282         fi
16283
16284
16285 # look for field 'ut_type' in header 'utmp.h'
16286                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16287                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
16288         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmp.h" >&5
16289 $as_echo_n "checking for ut_type field in utmp.h... " >&6; }
16290         if eval \${$ossh_varname+:} false; then :
16291   $as_echo_n "(cached) " >&6
16292 else
16293
16294                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16295 /* end confdefs.h.  */
16296 #include <utmp.h>
16297
16298 _ACEOF
16299 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16300   $EGREP "ut_type" >/dev/null 2>&1; then :
16301                         eval "$ossh_varname=yes"
16302 else
16303                         eval "$ossh_varname=no"
16304 fi
16305 rm -f conftest*
16306
16307 fi
16308
16309         ossh_result=`eval 'echo $'"$ossh_varname"`
16310         if test -n "`echo $ossh_varname`"; then
16311                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16312 $as_echo "$ossh_result" >&6; }
16313                 if test "x$ossh_result" = "xyes"; then
16314
16315 $as_echo "#define HAVE_TYPE_IN_UTMP 1" >>confdefs.h
16316
16317                 fi
16318         else
16319                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16320 $as_echo "no" >&6; }
16321         fi
16322
16323
16324 # look for field 'ut_type' in header 'utmpx.h'
16325                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16326                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
16327         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmpx.h" >&5
16328 $as_echo_n "checking for ut_type field in utmpx.h... " >&6; }
16329         if eval \${$ossh_varname+:} false; then :
16330   $as_echo_n "(cached) " >&6
16331 else
16332
16333                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16334 /* end confdefs.h.  */
16335 #include <utmpx.h>
16336
16337 _ACEOF
16338 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16339   $EGREP "ut_type" >/dev/null 2>&1; then :
16340                         eval "$ossh_varname=yes"
16341 else
16342                         eval "$ossh_varname=no"
16343 fi
16344 rm -f conftest*
16345
16346 fi
16347
16348         ossh_result=`eval 'echo $'"$ossh_varname"`
16349         if test -n "`echo $ossh_varname`"; then
16350                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16351 $as_echo "$ossh_result" >&6; }
16352                 if test "x$ossh_result" = "xyes"; then
16353
16354 $as_echo "#define HAVE_TYPE_IN_UTMPX 1" >>confdefs.h
16355
16356                 fi
16357         else
16358                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16359 $as_echo "no" >&6; }
16360         fi
16361
16362
16363 # look for field 'ut_tv' in header 'utmp.h'
16364                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16365                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
16366         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmp.h" >&5
16367 $as_echo_n "checking for ut_tv field in utmp.h... " >&6; }
16368         if eval \${$ossh_varname+:} false; then :
16369   $as_echo_n "(cached) " >&6
16370 else
16371
16372                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16373 /* end confdefs.h.  */
16374 #include <utmp.h>
16375
16376 _ACEOF
16377 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16378   $EGREP "ut_tv" >/dev/null 2>&1; then :
16379                         eval "$ossh_varname=yes"
16380 else
16381                         eval "$ossh_varname=no"
16382 fi
16383 rm -f conftest*
16384
16385 fi
16386
16387         ossh_result=`eval 'echo $'"$ossh_varname"`
16388         if test -n "`echo $ossh_varname`"; then
16389                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16390 $as_echo "$ossh_result" >&6; }
16391                 if test "x$ossh_result" = "xyes"; then
16392
16393 $as_echo "#define HAVE_TV_IN_UTMP 1" >>confdefs.h
16394
16395                 fi
16396         else
16397                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16398 $as_echo "no" >&6; }
16399         fi
16400
16401
16402 # look for field 'ut_id' in header 'utmp.h'
16403                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16404                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
16405         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmp.h" >&5
16406 $as_echo_n "checking for ut_id field in utmp.h... " >&6; }
16407         if eval \${$ossh_varname+:} false; then :
16408   $as_echo_n "(cached) " >&6
16409 else
16410
16411                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16412 /* end confdefs.h.  */
16413 #include <utmp.h>
16414
16415 _ACEOF
16416 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16417   $EGREP "ut_id" >/dev/null 2>&1; then :
16418                         eval "$ossh_varname=yes"
16419 else
16420                         eval "$ossh_varname=no"
16421 fi
16422 rm -f conftest*
16423
16424 fi
16425
16426         ossh_result=`eval 'echo $'"$ossh_varname"`
16427         if test -n "`echo $ossh_varname`"; then
16428                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16429 $as_echo "$ossh_result" >&6; }
16430                 if test "x$ossh_result" = "xyes"; then
16431
16432 $as_echo "#define HAVE_ID_IN_UTMP 1" >>confdefs.h
16433
16434                 fi
16435         else
16436                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16437 $as_echo "no" >&6; }
16438         fi
16439
16440
16441 # look for field 'ut_id' in header 'utmpx.h'
16442                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16443                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
16444         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmpx.h" >&5
16445 $as_echo_n "checking for ut_id field in utmpx.h... " >&6; }
16446         if eval \${$ossh_varname+:} false; then :
16447   $as_echo_n "(cached) " >&6
16448 else
16449
16450                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16451 /* end confdefs.h.  */
16452 #include <utmpx.h>
16453
16454 _ACEOF
16455 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16456   $EGREP "ut_id" >/dev/null 2>&1; then :
16457                         eval "$ossh_varname=yes"
16458 else
16459                         eval "$ossh_varname=no"
16460 fi
16461 rm -f conftest*
16462
16463 fi
16464
16465         ossh_result=`eval 'echo $'"$ossh_varname"`
16466         if test -n "`echo $ossh_varname`"; then
16467                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16468 $as_echo "$ossh_result" >&6; }
16469                 if test "x$ossh_result" = "xyes"; then
16470
16471 $as_echo "#define HAVE_ID_IN_UTMPX 1" >>confdefs.h
16472
16473                 fi
16474         else
16475                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16476 $as_echo "no" >&6; }
16477         fi
16478
16479
16480 # look for field 'ut_addr' in header 'utmp.h'
16481                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16482                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
16483         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmp.h" >&5
16484 $as_echo_n "checking for ut_addr field in utmp.h... " >&6; }
16485         if eval \${$ossh_varname+:} false; then :
16486   $as_echo_n "(cached) " >&6
16487 else
16488
16489                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16490 /* end confdefs.h.  */
16491 #include <utmp.h>
16492
16493 _ACEOF
16494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16495   $EGREP "ut_addr" >/dev/null 2>&1; then :
16496                         eval "$ossh_varname=yes"
16497 else
16498                         eval "$ossh_varname=no"
16499 fi
16500 rm -f conftest*
16501
16502 fi
16503
16504         ossh_result=`eval 'echo $'"$ossh_varname"`
16505         if test -n "`echo $ossh_varname`"; then
16506                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16507 $as_echo "$ossh_result" >&6; }
16508                 if test "x$ossh_result" = "xyes"; then
16509
16510 $as_echo "#define HAVE_ADDR_IN_UTMP 1" >>confdefs.h
16511
16512                 fi
16513         else
16514                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16515 $as_echo "no" >&6; }
16516         fi
16517
16518
16519 # look for field 'ut_addr' in header 'utmpx.h'
16520                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16521                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
16522         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmpx.h" >&5
16523 $as_echo_n "checking for ut_addr field in utmpx.h... " >&6; }
16524         if eval \${$ossh_varname+:} false; then :
16525   $as_echo_n "(cached) " >&6
16526 else
16527
16528                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16529 /* end confdefs.h.  */
16530 #include <utmpx.h>
16531
16532 _ACEOF
16533 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16534   $EGREP "ut_addr" >/dev/null 2>&1; then :
16535                         eval "$ossh_varname=yes"
16536 else
16537                         eval "$ossh_varname=no"
16538 fi
16539 rm -f conftest*
16540
16541 fi
16542
16543         ossh_result=`eval 'echo $'"$ossh_varname"`
16544         if test -n "`echo $ossh_varname`"; then
16545                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16546 $as_echo "$ossh_result" >&6; }
16547                 if test "x$ossh_result" = "xyes"; then
16548
16549 $as_echo "#define HAVE_ADDR_IN_UTMPX 1" >>confdefs.h
16550
16551                 fi
16552         else
16553                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16554 $as_echo "no" >&6; }
16555         fi
16556
16557
16558 # look for field 'ut_addr_v6' in header 'utmp.h'
16559                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16560                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
16561         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmp.h" >&5
16562 $as_echo_n "checking for ut_addr_v6 field in utmp.h... " >&6; }
16563         if eval \${$ossh_varname+:} false; then :
16564   $as_echo_n "(cached) " >&6
16565 else
16566
16567                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16568 /* end confdefs.h.  */
16569 #include <utmp.h>
16570
16571 _ACEOF
16572 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16573   $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
16574                         eval "$ossh_varname=yes"
16575 else
16576                         eval "$ossh_varname=no"
16577 fi
16578 rm -f conftest*
16579
16580 fi
16581
16582         ossh_result=`eval 'echo $'"$ossh_varname"`
16583         if test -n "`echo $ossh_varname`"; then
16584                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16585 $as_echo "$ossh_result" >&6; }
16586                 if test "x$ossh_result" = "xyes"; then
16587
16588 $as_echo "#define HAVE_ADDR_V6_IN_UTMP 1" >>confdefs.h
16589
16590                 fi
16591         else
16592                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16593 $as_echo "no" >&6; }
16594         fi
16595
16596
16597 # look for field 'ut_addr_v6' in header 'utmpx.h'
16598                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16599                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
16600         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmpx.h" >&5
16601 $as_echo_n "checking for ut_addr_v6 field in utmpx.h... " >&6; }
16602         if eval \${$ossh_varname+:} false; then :
16603   $as_echo_n "(cached) " >&6
16604 else
16605
16606                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16607 /* end confdefs.h.  */
16608 #include <utmpx.h>
16609
16610 _ACEOF
16611 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16612   $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
16613                         eval "$ossh_varname=yes"
16614 else
16615                         eval "$ossh_varname=no"
16616 fi
16617 rm -f conftest*
16618
16619 fi
16620
16621         ossh_result=`eval 'echo $'"$ossh_varname"`
16622         if test -n "`echo $ossh_varname`"; then
16623                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16624 $as_echo "$ossh_result" >&6; }
16625                 if test "x$ossh_result" = "xyes"; then
16626
16627 $as_echo "#define HAVE_ADDR_V6_IN_UTMPX 1" >>confdefs.h
16628
16629                 fi
16630         else
16631                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16632 $as_echo "no" >&6; }
16633         fi
16634
16635
16636 # look for field 'ut_exit' in header 'utmp.h'
16637                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16638                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
16639         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_exit field in utmp.h" >&5
16640 $as_echo_n "checking for ut_exit field in utmp.h... " >&6; }
16641         if eval \${$ossh_varname+:} false; then :
16642   $as_echo_n "(cached) " >&6
16643 else
16644
16645                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16646 /* end confdefs.h.  */
16647 #include <utmp.h>
16648
16649 _ACEOF
16650 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16651   $EGREP "ut_exit" >/dev/null 2>&1; then :
16652                         eval "$ossh_varname=yes"
16653 else
16654                         eval "$ossh_varname=no"
16655 fi
16656 rm -f conftest*
16657
16658 fi
16659
16660         ossh_result=`eval 'echo $'"$ossh_varname"`
16661         if test -n "`echo $ossh_varname`"; then
16662                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16663 $as_echo "$ossh_result" >&6; }
16664                 if test "x$ossh_result" = "xyes"; then
16665
16666 $as_echo "#define HAVE_EXIT_IN_UTMP 1" >>confdefs.h
16667
16668                 fi
16669         else
16670                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16671 $as_echo "no" >&6; }
16672         fi
16673
16674
16675 # look for field 'ut_time' in header 'utmp.h'
16676                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
16677                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
16678         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmp.h" >&5
16679 $as_echo_n "checking for ut_time field in utmp.h... " >&6; }
16680         if eval \${$ossh_varname+:} false; then :
16681   $as_echo_n "(cached) " >&6
16682 else
16683
16684                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16685 /* end confdefs.h.  */
16686 #include <utmp.h>
16687
16688 _ACEOF
16689 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16690   $EGREP "ut_time" >/dev/null 2>&1; then :
16691                         eval "$ossh_varname=yes"
16692 else
16693                         eval "$ossh_varname=no"
16694 fi
16695 rm -f conftest*
16696
16697 fi
16698
16699         ossh_result=`eval 'echo $'"$ossh_varname"`
16700         if test -n "`echo $ossh_varname`"; then
16701                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16702 $as_echo "$ossh_result" >&6; }
16703                 if test "x$ossh_result" = "xyes"; then
16704
16705 $as_echo "#define HAVE_TIME_IN_UTMP 1" >>confdefs.h
16706
16707                 fi
16708         else
16709                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16710 $as_echo "no" >&6; }
16711         fi
16712
16713
16714 # look for field 'ut_time' in header 'utmpx.h'
16715                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16716                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
16717         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmpx.h" >&5
16718 $as_echo_n "checking for ut_time field in utmpx.h... " >&6; }
16719         if eval \${$ossh_varname+:} false; then :
16720   $as_echo_n "(cached) " >&6
16721 else
16722
16723                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16724 /* end confdefs.h.  */
16725 #include <utmpx.h>
16726
16727 _ACEOF
16728 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16729   $EGREP "ut_time" >/dev/null 2>&1; then :
16730                         eval "$ossh_varname=yes"
16731 else
16732                         eval "$ossh_varname=no"
16733 fi
16734 rm -f conftest*
16735
16736 fi
16737
16738         ossh_result=`eval 'echo $'"$ossh_varname"`
16739         if test -n "`echo $ossh_varname`"; then
16740                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16741 $as_echo "$ossh_result" >&6; }
16742                 if test "x$ossh_result" = "xyes"; then
16743
16744 $as_echo "#define HAVE_TIME_IN_UTMPX 1" >>confdefs.h
16745
16746                 fi
16747         else
16748                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16749 $as_echo "no" >&6; }
16750         fi
16751
16752
16753 # look for field 'ut_tv' in header 'utmpx.h'
16754                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
16755                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
16756         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmpx.h" >&5
16757 $as_echo_n "checking for ut_tv field in utmpx.h... " >&6; }
16758         if eval \${$ossh_varname+:} false; then :
16759   $as_echo_n "(cached) " >&6
16760 else
16761
16762                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16763 /* end confdefs.h.  */
16764 #include <utmpx.h>
16765
16766 _ACEOF
16767 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16768   $EGREP "ut_tv" >/dev/null 2>&1; then :
16769                         eval "$ossh_varname=yes"
16770 else
16771                         eval "$ossh_varname=no"
16772 fi
16773 rm -f conftest*
16774
16775 fi
16776
16777         ossh_result=`eval 'echo $'"$ossh_varname"`
16778         if test -n "`echo $ossh_varname`"; then
16779                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
16780 $as_echo "$ossh_result" >&6; }
16781                 if test "x$ossh_result" = "xyes"; then
16782
16783 $as_echo "#define HAVE_TV_IN_UTMPX 1" >>confdefs.h
16784
16785                 fi
16786         else
16787                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16788 $as_echo "no" >&6; }
16789         fi
16790
16791
16792 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
16793 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
16794
16795 cat >>confdefs.h <<_ACEOF
16796 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
16797 _ACEOF
16798
16799
16800 fi
16801
16802 ac_fn_c_check_member "$LINENO" "struct stat" "st_mtim" "ac_cv_member_struct_stat_st_mtim" "$ac_includes_default"
16803 if test "x$ac_cv_member_struct_stat_st_mtim" = xyes; then :
16804
16805 cat >>confdefs.h <<_ACEOF
16806 #define HAVE_STRUCT_STAT_ST_MTIM 1
16807 _ACEOF
16808
16809
16810 fi
16811
16812 ac_fn_c_check_member "$LINENO" "struct stat" "st_mtime" "ac_cv_member_struct_stat_st_mtime" "$ac_includes_default"
16813 if test "x$ac_cv_member_struct_stat_st_mtime" = xyes; then :
16814
16815 cat >>confdefs.h <<_ACEOF
16816 #define HAVE_STRUCT_STAT_ST_MTIME 1
16817 _ACEOF
16818
16819
16820 fi
16821
16822 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
16823 #include <sys/types.h>
16824 #include <pwd.h>
16825
16826 "
16827 if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
16828
16829 cat >>confdefs.h <<_ACEOF
16830 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
16831 _ACEOF
16832
16833
16834 fi
16835 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_class" "ac_cv_member_struct_passwd_pw_class" "
16836 #include <sys/types.h>
16837 #include <pwd.h>
16838
16839 "
16840 if test "x$ac_cv_member_struct_passwd_pw_class" = xyes; then :
16841
16842 cat >>confdefs.h <<_ACEOF
16843 #define HAVE_STRUCT_PASSWD_PW_CLASS 1
16844 _ACEOF
16845
16846
16847 fi
16848 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_change" "ac_cv_member_struct_passwd_pw_change" "
16849 #include <sys/types.h>
16850 #include <pwd.h>
16851
16852 "
16853 if test "x$ac_cv_member_struct_passwd_pw_change" = xyes; then :
16854
16855 cat >>confdefs.h <<_ACEOF
16856 #define HAVE_STRUCT_PASSWD_PW_CHANGE 1
16857 _ACEOF
16858
16859
16860 fi
16861 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_expire" "ac_cv_member_struct_passwd_pw_expire" "
16862 #include <sys/types.h>
16863 #include <pwd.h>
16864
16865 "
16866 if test "x$ac_cv_member_struct_passwd_pw_expire" = xyes; then :
16867
16868 cat >>confdefs.h <<_ACEOF
16869 #define HAVE_STRUCT_PASSWD_PW_EXPIRE 1
16870 _ACEOF
16871
16872
16873 fi
16874
16875
16876 ac_fn_c_check_member "$LINENO" "struct __res_state" "retrans" "ac_cv_member_struct___res_state_retrans" "
16877 #include <stdio.h>
16878 #if HAVE_SYS_TYPES_H
16879 # include <sys/types.h>
16880 #endif
16881 #include <netinet/in.h>
16882 #include <arpa/nameser.h>
16883 #include <resolv.h>
16884
16885 "
16886 if test "x$ac_cv_member_struct___res_state_retrans" = xyes; then :
16887
16888 else
16889
16890 $as_echo "#define __res_state state" >>confdefs.h
16891
16892 fi
16893
16894
16895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ss_family field in struct sockaddr_storage" >&5
16896 $as_echo_n "checking for ss_family field in struct sockaddr_storage... " >&6; }
16897 if ${ac_cv_have_ss_family_in_struct_ss+:} false; then :
16898   $as_echo_n "(cached) " >&6
16899 else
16900
16901         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16902 /* end confdefs.h.  */
16903
16904 #include <sys/types.h>
16905 #include <sys/socket.h>
16906
16907 int
16908 main ()
16909 {
16910  struct sockaddr_storage s; s.ss_family = 1;
16911   ;
16912   return 0;
16913 }
16914 _ACEOF
16915 if ac_fn_c_try_compile "$LINENO"; then :
16916    ac_cv_have_ss_family_in_struct_ss="yes"
16917 else
16918    ac_cv_have_ss_family_in_struct_ss="no"
16919 fi
16920 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16921
16922 fi
16923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ss_family_in_struct_ss" >&5
16924 $as_echo "$ac_cv_have_ss_family_in_struct_ss" >&6; }
16925 if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
16926
16927 $as_echo "#define HAVE_SS_FAMILY_IN_SS 1" >>confdefs.h
16928
16929 fi
16930
16931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __ss_family field in struct sockaddr_storage" >&5
16932 $as_echo_n "checking for __ss_family field in struct sockaddr_storage... " >&6; }
16933 if ${ac_cv_have___ss_family_in_struct_ss+:} false; then :
16934   $as_echo_n "(cached) " >&6
16935 else
16936
16937         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16938 /* end confdefs.h.  */
16939
16940 #include <sys/types.h>
16941 #include <sys/socket.h>
16942
16943 int
16944 main ()
16945 {
16946  struct sockaddr_storage s; s.__ss_family = 1;
16947   ;
16948   return 0;
16949 }
16950 _ACEOF
16951 if ac_fn_c_try_compile "$LINENO"; then :
16952    ac_cv_have___ss_family_in_struct_ss="yes"
16953 else
16954    ac_cv_have___ss_family_in_struct_ss="no"
16955
16956 fi
16957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16958
16959 fi
16960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___ss_family_in_struct_ss" >&5
16961 $as_echo "$ac_cv_have___ss_family_in_struct_ss" >&6; }
16962 if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
16963
16964 $as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
16965
16966 fi
16967
16968 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_accrights field in struct msghdr" >&5
16969 $as_echo_n "checking for msg_accrights field in struct msghdr... " >&6; }
16970 if ${ac_cv_have_accrights_in_msghdr+:} false; then :
16971   $as_echo_n "(cached) " >&6
16972 else
16973
16974         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16975 /* end confdefs.h.  */
16976
16977 #include <sys/types.h>
16978 #include <sys/socket.h>
16979 #include <sys/uio.h>
16980
16981 int
16982 main ()
16983 {
16984
16985 #ifdef msg_accrights
16986 #error "msg_accrights is a macro"
16987 exit(1);
16988 #endif
16989 struct msghdr m;
16990 m.msg_accrights = 0;
16991 exit(0);
16992
16993   ;
16994   return 0;
16995 }
16996 _ACEOF
16997 if ac_fn_c_try_compile "$LINENO"; then :
16998    ac_cv_have_accrights_in_msghdr="yes"
16999 else
17000    ac_cv_have_accrights_in_msghdr="no"
17001
17002 fi
17003 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17004
17005 fi
17006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_accrights_in_msghdr" >&5
17007 $as_echo "$ac_cv_have_accrights_in_msghdr" >&6; }
17008 if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
17009
17010 $as_echo "#define HAVE_ACCRIGHTS_IN_MSGHDR 1" >>confdefs.h
17011
17012 fi
17013
17014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct statvfs.f_fsid is integral type" >&5
17015 $as_echo_n "checking if struct statvfs.f_fsid is integral type... " >&6; }
17016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17017 /* end confdefs.h.  */
17018
17019 #include <sys/param.h>
17020 #include <sys/stat.h>
17021 #ifdef HAVE_SYS_TIME_H
17022 # include <sys/time.h>
17023 #endif
17024 #ifdef HAVE_SYS_MOUNT_H
17025 #include <sys/mount.h>
17026 #endif
17027 #ifdef HAVE_SYS_STATVFS_H
17028 #include <sys/statvfs.h>
17029 #endif
17030
17031 int
17032 main ()
17033 {
17034  struct statvfs s; s.f_fsid = 0;
17035   ;
17036   return 0;
17037 }
17038 _ACEOF
17039 if ac_fn_c_try_compile "$LINENO"; then :
17040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17041 $as_echo "yes" >&6; }
17042 else
17043    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17044 $as_echo "no" >&6; }
17045
17046         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fsid_t has member val" >&5
17047 $as_echo_n "checking if fsid_t has member val... " >&6; }
17048         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17049 /* end confdefs.h.  */
17050
17051 #include <sys/types.h>
17052 #include <sys/statvfs.h>
17053
17054 int
17055 main ()
17056 {
17057  fsid_t t; t.val[0] = 0;
17058   ;
17059   return 0;
17060 }
17061 _ACEOF
17062 if ac_fn_c_try_compile "$LINENO"; then :
17063    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17064 $as_echo "yes" >&6; }
17065
17066 $as_echo "#define FSID_HAS_VAL 1" >>confdefs.h
17067
17068 else
17069    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17070 $as_echo "no" >&6; }
17071 fi
17072 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17073
17074         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if f_fsid has member __val" >&5
17075 $as_echo_n "checking if f_fsid has member __val... " >&6; }
17076         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17077 /* end confdefs.h.  */
17078
17079 #include <sys/types.h>
17080 #include <sys/statvfs.h>
17081
17082 int
17083 main ()
17084 {
17085  fsid_t t; t.__val[0] = 0;
17086   ;
17087   return 0;
17088 }
17089 _ACEOF
17090 if ac_fn_c_try_compile "$LINENO"; then :
17091    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17092 $as_echo "yes" >&6; }
17093
17094 $as_echo "#define FSID_HAS___VAL 1" >>confdefs.h
17095
17096 else
17097    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17098 $as_echo "no" >&6; }
17099 fi
17100 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17101
17102 fi
17103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17104
17105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_control field in struct msghdr" >&5
17106 $as_echo_n "checking for msg_control field in struct msghdr... " >&6; }
17107 if ${ac_cv_have_control_in_msghdr+:} false; then :
17108   $as_echo_n "(cached) " >&6
17109 else
17110
17111         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17112 /* end confdefs.h.  */
17113
17114 #include <sys/types.h>
17115 #include <sys/socket.h>
17116 #include <sys/uio.h>
17117
17118 int
17119 main ()
17120 {
17121
17122 #ifdef msg_control
17123 #error "msg_control is a macro"
17124 exit(1);
17125 #endif
17126 struct msghdr m;
17127 m.msg_control = 0;
17128 exit(0);
17129
17130   ;
17131   return 0;
17132 }
17133 _ACEOF
17134 if ac_fn_c_try_compile "$LINENO"; then :
17135    ac_cv_have_control_in_msghdr="yes"
17136 else
17137    ac_cv_have_control_in_msghdr="no"
17138
17139 fi
17140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17141
17142 fi
17143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_control_in_msghdr" >&5
17144 $as_echo "$ac_cv_have_control_in_msghdr" >&6; }
17145 if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
17146
17147 $as_echo "#define HAVE_CONTROL_IN_MSGHDR 1" >>confdefs.h
17148
17149 fi
17150
17151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines __progname" >&5
17152 $as_echo_n "checking if libc defines __progname... " >&6; }
17153 if ${ac_cv_libc_defines___progname+:} false; then :
17154   $as_echo_n "(cached) " >&6
17155 else
17156
17157         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17158 /* end confdefs.h.  */
17159
17160 int
17161 main ()
17162 {
17163  extern char *__progname; printf("%s", __progname);
17164   ;
17165   return 0;
17166 }
17167 _ACEOF
17168 if ac_fn_c_try_link "$LINENO"; then :
17169    ac_cv_libc_defines___progname="yes"
17170 else
17171    ac_cv_libc_defines___progname="no"
17172
17173 fi
17174 rm -f core conftest.err conftest.$ac_objext \
17175     conftest$ac_exeext conftest.$ac_ext
17176
17177 fi
17178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines___progname" >&5
17179 $as_echo "$ac_cv_libc_defines___progname" >&6; }
17180 if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
17181
17182 $as_echo "#define HAVE___PROGNAME 1" >>confdefs.h
17183
17184 fi
17185
17186 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __FUNCTION__" >&5
17187 $as_echo_n "checking whether $CC implements __FUNCTION__... " >&6; }
17188 if ${ac_cv_cc_implements___FUNCTION__+:} false; then :
17189   $as_echo_n "(cached) " >&6
17190 else
17191
17192         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17193 /* end confdefs.h.  */
17194  #include <stdio.h>
17195 int
17196 main ()
17197 {
17198  printf("%s", __FUNCTION__);
17199   ;
17200   return 0;
17201 }
17202 _ACEOF
17203 if ac_fn_c_try_link "$LINENO"; then :
17204    ac_cv_cc_implements___FUNCTION__="yes"
17205 else
17206    ac_cv_cc_implements___FUNCTION__="no"
17207
17208 fi
17209 rm -f core conftest.err conftest.$ac_objext \
17210     conftest$ac_exeext conftest.$ac_ext
17211
17212 fi
17213 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___FUNCTION__" >&5
17214 $as_echo "$ac_cv_cc_implements___FUNCTION__" >&6; }
17215 if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
17216
17217 $as_echo "#define HAVE___FUNCTION__ 1" >>confdefs.h
17218
17219 fi
17220
17221 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __func__" >&5
17222 $as_echo_n "checking whether $CC implements __func__... " >&6; }
17223 if ${ac_cv_cc_implements___func__+:} false; then :
17224   $as_echo_n "(cached) " >&6
17225 else
17226
17227         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17228 /* end confdefs.h.  */
17229  #include <stdio.h>
17230 int
17231 main ()
17232 {
17233  printf("%s", __func__);
17234   ;
17235   return 0;
17236 }
17237 _ACEOF
17238 if ac_fn_c_try_link "$LINENO"; then :
17239    ac_cv_cc_implements___func__="yes"
17240 else
17241    ac_cv_cc_implements___func__="no"
17242
17243 fi
17244 rm -f core conftest.err conftest.$ac_objext \
17245     conftest$ac_exeext conftest.$ac_ext
17246
17247 fi
17248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___func__" >&5
17249 $as_echo "$ac_cv_cc_implements___func__" >&6; }
17250 if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
17251
17252 $as_echo "#define HAVE___func__ 1" >>confdefs.h
17253
17254 fi
17255
17256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_copy exists" >&5
17257 $as_echo_n "checking whether va_copy exists... " >&6; }
17258 if ${ac_cv_have_va_copy+:} false; then :
17259   $as_echo_n "(cached) " >&6
17260 else
17261
17262         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17263 /* end confdefs.h.  */
17264
17265 #include <stdarg.h>
17266 va_list x,y;
17267
17268 int
17269 main ()
17270 {
17271  va_copy(x,y);
17272   ;
17273   return 0;
17274 }
17275 _ACEOF
17276 if ac_fn_c_try_link "$LINENO"; then :
17277    ac_cv_have_va_copy="yes"
17278 else
17279    ac_cv_have_va_copy="no"
17280
17281 fi
17282 rm -f core conftest.err conftest.$ac_objext \
17283     conftest$ac_exeext conftest.$ac_ext
17284
17285 fi
17286 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_va_copy" >&5
17287 $as_echo "$ac_cv_have_va_copy" >&6; }
17288 if test "x$ac_cv_have_va_copy" = "xyes" ; then
17289
17290 $as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
17291
17292 fi
17293
17294 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __va_copy exists" >&5
17295 $as_echo_n "checking whether __va_copy exists... " >&6; }
17296 if ${ac_cv_have___va_copy+:} false; then :
17297   $as_echo_n "(cached) " >&6
17298 else
17299
17300         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17301 /* end confdefs.h.  */
17302
17303 #include <stdarg.h>
17304 va_list x,y;
17305
17306 int
17307 main ()
17308 {
17309  __va_copy(x,y);
17310   ;
17311   return 0;
17312 }
17313 _ACEOF
17314 if ac_fn_c_try_link "$LINENO"; then :
17315    ac_cv_have___va_copy="yes"
17316 else
17317    ac_cv_have___va_copy="no"
17318
17319 fi
17320 rm -f core conftest.err conftest.$ac_objext \
17321     conftest$ac_exeext conftest.$ac_ext
17322
17323 fi
17324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___va_copy" >&5
17325 $as_echo "$ac_cv_have___va_copy" >&6; }
17326 if test "x$ac_cv_have___va_copy" = "xyes" ; then
17327
17328 $as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
17329
17330 fi
17331
17332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt has optreset support" >&5
17333 $as_echo_n "checking whether getopt has optreset support... " >&6; }
17334 if ${ac_cv_have_getopt_optreset+:} false; then :
17335   $as_echo_n "(cached) " >&6
17336 else
17337
17338         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17339 /* end confdefs.h.  */
17340  #include <getopt.h>
17341 int
17342 main ()
17343 {
17344  extern int optreset; optreset = 0;
17345   ;
17346   return 0;
17347 }
17348 _ACEOF
17349 if ac_fn_c_try_link "$LINENO"; then :
17350    ac_cv_have_getopt_optreset="yes"
17351 else
17352    ac_cv_have_getopt_optreset="no"
17353
17354 fi
17355 rm -f core conftest.err conftest.$ac_objext \
17356     conftest$ac_exeext conftest.$ac_ext
17357
17358 fi
17359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getopt_optreset" >&5
17360 $as_echo "$ac_cv_have_getopt_optreset" >&6; }
17361 if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
17362
17363 $as_echo "#define HAVE_GETOPT_OPTRESET 1" >>confdefs.h
17364
17365 fi
17366
17367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_errlist" >&5
17368 $as_echo_n "checking if libc defines sys_errlist... " >&6; }
17369 if ${ac_cv_libc_defines_sys_errlist+:} false; then :
17370   $as_echo_n "(cached) " >&6
17371 else
17372
17373         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17374 /* end confdefs.h.  */
17375
17376 int
17377 main ()
17378 {
17379  extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);
17380   ;
17381   return 0;
17382 }
17383 _ACEOF
17384 if ac_fn_c_try_link "$LINENO"; then :
17385    ac_cv_libc_defines_sys_errlist="yes"
17386 else
17387    ac_cv_libc_defines_sys_errlist="no"
17388
17389 fi
17390 rm -f core conftest.err conftest.$ac_objext \
17391     conftest$ac_exeext conftest.$ac_ext
17392
17393 fi
17394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_errlist" >&5
17395 $as_echo "$ac_cv_libc_defines_sys_errlist" >&6; }
17396 if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
17397
17398 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
17399
17400 fi
17401
17402
17403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_nerr" >&5
17404 $as_echo_n "checking if libc defines sys_nerr... " >&6; }
17405 if ${ac_cv_libc_defines_sys_nerr+:} false; then :
17406   $as_echo_n "(cached) " >&6
17407 else
17408
17409         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17410 /* end confdefs.h.  */
17411
17412 int
17413 main ()
17414 {
17415  extern int sys_nerr; printf("%i", sys_nerr);
17416   ;
17417   return 0;
17418 }
17419 _ACEOF
17420 if ac_fn_c_try_link "$LINENO"; then :
17421    ac_cv_libc_defines_sys_nerr="yes"
17422 else
17423    ac_cv_libc_defines_sys_nerr="no"
17424
17425 fi
17426 rm -f core conftest.err conftest.$ac_objext \
17427     conftest$ac_exeext conftest.$ac_ext
17428
17429 fi
17430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_nerr" >&5
17431 $as_echo "$ac_cv_libc_defines_sys_nerr" >&6; }
17432 if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
17433
17434 $as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h
17435
17436 fi
17437
17438 # Check libraries needed by DNS fingerprint support
17439 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getrrsetbyname" >&5
17440 $as_echo_n "checking for library containing getrrsetbyname... " >&6; }
17441 if ${ac_cv_search_getrrsetbyname+:} false; then :
17442   $as_echo_n "(cached) " >&6
17443 else
17444   ac_func_search_save_LIBS=$LIBS
17445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17446 /* end confdefs.h.  */
17447
17448 /* Override any GCC internal prototype to avoid an error.
17449    Use char because int might match the return type of a GCC
17450    builtin and then its argument prototype would still apply.  */
17451 #ifdef __cplusplus
17452 extern "C"
17453 #endif
17454 char getrrsetbyname ();
17455 int
17456 main ()
17457 {
17458 return getrrsetbyname ();
17459   ;
17460   return 0;
17461 }
17462 _ACEOF
17463 for ac_lib in '' resolv; do
17464   if test -z "$ac_lib"; then
17465     ac_res="none required"
17466   else
17467     ac_res=-l$ac_lib
17468     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17469   fi
17470   if ac_fn_c_try_link "$LINENO"; then :
17471   ac_cv_search_getrrsetbyname=$ac_res
17472 fi
17473 rm -f core conftest.err conftest.$ac_objext \
17474     conftest$ac_exeext
17475   if ${ac_cv_search_getrrsetbyname+:} false; then :
17476   break
17477 fi
17478 done
17479 if ${ac_cv_search_getrrsetbyname+:} false; then :
17480
17481 else
17482   ac_cv_search_getrrsetbyname=no
17483 fi
17484 rm conftest.$ac_ext
17485 LIBS=$ac_func_search_save_LIBS
17486 fi
17487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getrrsetbyname" >&5
17488 $as_echo "$ac_cv_search_getrrsetbyname" >&6; }
17489 ac_res=$ac_cv_search_getrrsetbyname
17490 if test "$ac_res" != no; then :
17491   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17492
17493 $as_echo "#define HAVE_GETRRSETBYNAME 1" >>confdefs.h
17494
17495 else
17496
17497                 # Needed by our getrrsetbyname()
17498                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_query" >&5
17499 $as_echo_n "checking for library containing res_query... " >&6; }
17500 if ${ac_cv_search_res_query+:} false; then :
17501   $as_echo_n "(cached) " >&6
17502 else
17503   ac_func_search_save_LIBS=$LIBS
17504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17505 /* end confdefs.h.  */
17506
17507 /* Override any GCC internal prototype to avoid an error.
17508    Use char because int might match the return type of a GCC
17509    builtin and then its argument prototype would still apply.  */
17510 #ifdef __cplusplus
17511 extern "C"
17512 #endif
17513 char res_query ();
17514 int
17515 main ()
17516 {
17517 return res_query ();
17518   ;
17519   return 0;
17520 }
17521 _ACEOF
17522 for ac_lib in '' resolv; do
17523   if test -z "$ac_lib"; then
17524     ac_res="none required"
17525   else
17526     ac_res=-l$ac_lib
17527     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17528   fi
17529   if ac_fn_c_try_link "$LINENO"; then :
17530   ac_cv_search_res_query=$ac_res
17531 fi
17532 rm -f core conftest.err conftest.$ac_objext \
17533     conftest$ac_exeext
17534   if ${ac_cv_search_res_query+:} false; then :
17535   break
17536 fi
17537 done
17538 if ${ac_cv_search_res_query+:} false; then :
17539
17540 else
17541   ac_cv_search_res_query=no
17542 fi
17543 rm conftest.$ac_ext
17544 LIBS=$ac_func_search_save_LIBS
17545 fi
17546 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_query" >&5
17547 $as_echo "$ac_cv_search_res_query" >&6; }
17548 ac_res=$ac_cv_search_res_query
17549 if test "$ac_res" != no; then :
17550   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17551
17552 fi
17553
17554                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
17555 $as_echo_n "checking for library containing dn_expand... " >&6; }
17556 if ${ac_cv_search_dn_expand+:} false; then :
17557   $as_echo_n "(cached) " >&6
17558 else
17559   ac_func_search_save_LIBS=$LIBS
17560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17561 /* end confdefs.h.  */
17562
17563 /* Override any GCC internal prototype to avoid an error.
17564    Use char because int might match the return type of a GCC
17565    builtin and then its argument prototype would still apply.  */
17566 #ifdef __cplusplus
17567 extern "C"
17568 #endif
17569 char dn_expand ();
17570 int
17571 main ()
17572 {
17573 return dn_expand ();
17574   ;
17575   return 0;
17576 }
17577 _ACEOF
17578 for ac_lib in '' resolv; do
17579   if test -z "$ac_lib"; then
17580     ac_res="none required"
17581   else
17582     ac_res=-l$ac_lib
17583     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17584   fi
17585   if ac_fn_c_try_link "$LINENO"; then :
17586   ac_cv_search_dn_expand=$ac_res
17587 fi
17588 rm -f core conftest.err conftest.$ac_objext \
17589     conftest$ac_exeext
17590   if ${ac_cv_search_dn_expand+:} false; then :
17591   break
17592 fi
17593 done
17594 if ${ac_cv_search_dn_expand+:} false; then :
17595
17596 else
17597   ac_cv_search_dn_expand=no
17598 fi
17599 rm conftest.$ac_ext
17600 LIBS=$ac_func_search_save_LIBS
17601 fi
17602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
17603 $as_echo "$ac_cv_search_dn_expand" >&6; }
17604 ac_res=$ac_cv_search_dn_expand
17605 if test "$ac_res" != no; then :
17606   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17607
17608 fi
17609
17610                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if res_query will link" >&5
17611 $as_echo_n "checking if res_query will link... " >&6; }
17612                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17613 /* end confdefs.h.  */
17614
17615 #include <sys/types.h>
17616 #include <netinet/in.h>
17617 #include <arpa/nameser.h>
17618 #include <netdb.h>
17619 #include <resolv.h>
17620
17621 int
17622 main ()
17623 {
17624
17625         res_query (0, 0, 0, 0, 0);
17626
17627   ;
17628   return 0;
17629 }
17630 _ACEOF
17631 if ac_fn_c_try_link "$LINENO"; then :
17632   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17633 $as_echo "yes" >&6; }
17634 else
17635   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17636 $as_echo "no" >&6; }
17637                     saved_LIBS="$LIBS"
17638                     LIBS="$LIBS -lresolv"
17639                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
17640 $as_echo_n "checking for res_query in -lresolv... " >&6; }
17641                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17642 /* end confdefs.h.  */
17643
17644 #include <sys/types.h>
17645 #include <netinet/in.h>
17646 #include <arpa/nameser.h>
17647 #include <netdb.h>
17648 #include <resolv.h>
17649
17650 int
17651 main ()
17652 {
17653
17654         res_query (0, 0, 0, 0, 0);
17655
17656   ;
17657   return 0;
17658 }
17659 _ACEOF
17660 if ac_fn_c_try_link "$LINENO"; then :
17661   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17662 $as_echo "yes" >&6; }
17663 else
17664   LIBS="$saved_LIBS"
17665                          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17666 $as_echo "no" >&6; }
17667 fi
17668 rm -f core conftest.err conftest.$ac_objext \
17669     conftest$ac_exeext conftest.$ac_ext
17670
17671 fi
17672 rm -f core conftest.err conftest.$ac_objext \
17673     conftest$ac_exeext conftest.$ac_ext
17674                 for ac_func in _getshort _getlong
17675 do :
17676   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17677 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17678 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17679   cat >>confdefs.h <<_ACEOF
17680 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17681 _ACEOF
17682
17683 fi
17684 done
17685
17686                 ac_fn_c_check_decl "$LINENO" "_getshort" "ac_cv_have_decl__getshort" "#include <sys/types.h>
17687                     #include <arpa/nameser.h>
17688 "
17689 if test "x$ac_cv_have_decl__getshort" = xyes; then :
17690   ac_have_decl=1
17691 else
17692   ac_have_decl=0
17693 fi
17694
17695 cat >>confdefs.h <<_ACEOF
17696 #define HAVE_DECL__GETSHORT $ac_have_decl
17697 _ACEOF
17698 ac_fn_c_check_decl "$LINENO" "_getlong" "ac_cv_have_decl__getlong" "#include <sys/types.h>
17699                     #include <arpa/nameser.h>
17700 "
17701 if test "x$ac_cv_have_decl__getlong" = xyes; then :
17702   ac_have_decl=1
17703 else
17704   ac_have_decl=0
17705 fi
17706
17707 cat >>confdefs.h <<_ACEOF
17708 #define HAVE_DECL__GETLONG $ac_have_decl
17709 _ACEOF
17710
17711                 ac_fn_c_check_member "$LINENO" "HEADER" "ad" "ac_cv_member_HEADER_ad" "#include <arpa/nameser.h>
17712 "
17713 if test "x$ac_cv_member_HEADER_ad" = xyes; then :
17714
17715 $as_echo "#define HAVE_HEADER_AD 1" >>confdefs.h
17716
17717 fi
17718
17719
17720 fi
17721
17722
17723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct __res_state _res is an extern" >&5
17724 $as_echo_n "checking if struct __res_state _res is an extern... " >&6; }
17725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17726 /* end confdefs.h.  */
17727
17728 #include <stdio.h>
17729 #if HAVE_SYS_TYPES_H
17730 # include <sys/types.h>
17731 #endif
17732 #include <netinet/in.h>
17733 #include <arpa/nameser.h>
17734 #include <resolv.h>
17735 extern struct __res_state _res;
17736
17737 int
17738 main ()
17739 {
17740
17741 struct __res_state *volatile p = &_res;  /* force resolution of _res */
17742 return 0;
17743
17744   ;
17745   return 0;
17746 }
17747 _ACEOF
17748 if ac_fn_c_try_link "$LINENO"; then :
17749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17750 $as_echo "yes" >&6; }
17751
17752 $as_echo "#define HAVE__RES_EXTERN 1" >>confdefs.h
17753
17754
17755 else
17756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17757 $as_echo "no" >&6; }
17758
17759 fi
17760 rm -f core conftest.err conftest.$ac_objext \
17761     conftest$ac_exeext conftest.$ac_ext
17762
17763 # Check whether user wants SELinux support
17764 SELINUX_MSG="no"
17765 LIBSELINUX=""
17766
17767 # Check whether --with-selinux was given.
17768 if test "${with_selinux+set}" = set; then :
17769   withval=$with_selinux;  if test "x$withval" != "xno" ; then
17770                 save_LIBS="$LIBS"
17771
17772 $as_echo "#define WITH_SELINUX 1" >>confdefs.h
17773
17774                 SELINUX_MSG="yes"
17775                 ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
17776 if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
17777
17778 else
17779   as_fn_error $? "SELinux support requires selinux.h header" "$LINENO" 5
17780 fi
17781
17782
17783                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setexeccon in -lselinux" >&5
17784 $as_echo_n "checking for setexeccon in -lselinux... " >&6; }
17785 if ${ac_cv_lib_selinux_setexeccon+:} false; then :
17786   $as_echo_n "(cached) " >&6
17787 else
17788   ac_check_lib_save_LIBS=$LIBS
17789 LIBS="-lselinux  $LIBS"
17790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17791 /* end confdefs.h.  */
17792
17793 /* Override any GCC internal prototype to avoid an error.
17794    Use char because int might match the return type of a GCC
17795    builtin and then its argument prototype would still apply.  */
17796 #ifdef __cplusplus
17797 extern "C"
17798 #endif
17799 char setexeccon ();
17800 int
17801 main ()
17802 {
17803 return setexeccon ();
17804   ;
17805   return 0;
17806 }
17807 _ACEOF
17808 if ac_fn_c_try_link "$LINENO"; then :
17809   ac_cv_lib_selinux_setexeccon=yes
17810 else
17811   ac_cv_lib_selinux_setexeccon=no
17812 fi
17813 rm -f core conftest.err conftest.$ac_objext \
17814     conftest$ac_exeext conftest.$ac_ext
17815 LIBS=$ac_check_lib_save_LIBS
17816 fi
17817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_setexeccon" >&5
17818 $as_echo "$ac_cv_lib_selinux_setexeccon" >&6; }
17819 if test "x$ac_cv_lib_selinux_setexeccon" = xyes; then :
17820    LIBSELINUX="-lselinux"
17821                           LIBS="$LIBS -lselinux"
17822
17823 else
17824   as_fn_error $? "SELinux support requires libselinux library" "$LINENO" 5
17825 fi
17826
17827                 SSHLIBS="$SSHLIBS $LIBSELINUX"
17828                 SSHDLIBS="$SSHDLIBS $LIBSELINUX"
17829                 for ac_func in getseuserbyname get_default_context_with_level
17830 do :
17831   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17832 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17833 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17834   cat >>confdefs.h <<_ACEOF
17835 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17836 _ACEOF
17837
17838 fi
17839 done
17840
17841                 LIBS="$save_LIBS"
17842         fi
17843
17844 fi
17845
17846
17847
17848
17849 # Check whether user wants Kerberos 5 support
17850 KRB5_MSG="no"
17851
17852 # Check whether --with-kerberos5 was given.
17853 if test "${with_kerberos5+set}" = set; then :
17854   withval=$with_kerberos5;  if test "x$withval" != "xno" ; then
17855                 if test "x$withval" = "xyes" ; then
17856                         KRB5ROOT="/usr/local"
17857                 else
17858                         KRB5ROOT=${withval}
17859                 fi
17860
17861
17862 $as_echo "#define KRB5 1" >>confdefs.h
17863
17864                 KRB5_MSG="yes"
17865
17866                 if test -n "$ac_tool_prefix"; then
17867   # Extract the first word of "${ac_tool_prefix}krb5-config", so it can be a program name with args.
17868 set dummy ${ac_tool_prefix}krb5-config; ac_word=$2
17869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17870 $as_echo_n "checking for $ac_word... " >&6; }
17871 if ${ac_cv_path_KRB5CONF+:} false; then :
17872   $as_echo_n "(cached) " >&6
17873 else
17874   case $KRB5CONF in
17875   [\\/]* | ?:[\\/]*)
17876   ac_cv_path_KRB5CONF="$KRB5CONF" # Let the user override the test with a path.
17877   ;;
17878   *)
17879   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17880 as_dummy="$KRB5ROOT/bin:$PATH"
17881 for as_dir in $as_dummy
17882 do
17883   IFS=$as_save_IFS
17884   test -z "$as_dir" && as_dir=.
17885     for ac_exec_ext in '' $ac_executable_extensions; do
17886   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17887     ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
17888     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17889     break 2
17890   fi
17891 done
17892   done
17893 IFS=$as_save_IFS
17894
17895   ;;
17896 esac
17897 fi
17898 KRB5CONF=$ac_cv_path_KRB5CONF
17899 if test -n "$KRB5CONF"; then
17900   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5CONF" >&5
17901 $as_echo "$KRB5CONF" >&6; }
17902 else
17903   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17904 $as_echo "no" >&6; }
17905 fi
17906
17907
17908 fi
17909 if test -z "$ac_cv_path_KRB5CONF"; then
17910   ac_pt_KRB5CONF=$KRB5CONF
17911   # Extract the first word of "krb5-config", so it can be a program name with args.
17912 set dummy krb5-config; ac_word=$2
17913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17914 $as_echo_n "checking for $ac_word... " >&6; }
17915 if ${ac_cv_path_ac_pt_KRB5CONF+:} false; then :
17916   $as_echo_n "(cached) " >&6
17917 else
17918   case $ac_pt_KRB5CONF in
17919   [\\/]* | ?:[\\/]*)
17920   ac_cv_path_ac_pt_KRB5CONF="$ac_pt_KRB5CONF" # Let the user override the test with a path.
17921   ;;
17922   *)
17923   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17924 as_dummy="$KRB5ROOT/bin:$PATH"
17925 for as_dir in $as_dummy
17926 do
17927   IFS=$as_save_IFS
17928   test -z "$as_dir" && as_dir=.
17929     for ac_exec_ext in '' $ac_executable_extensions; do
17930   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17931     ac_cv_path_ac_pt_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
17932     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17933     break 2
17934   fi
17935 done
17936   done
17937 IFS=$as_save_IFS
17938
17939   ;;
17940 esac
17941 fi
17942 ac_pt_KRB5CONF=$ac_cv_path_ac_pt_KRB5CONF
17943 if test -n "$ac_pt_KRB5CONF"; then
17944   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_KRB5CONF" >&5
17945 $as_echo "$ac_pt_KRB5CONF" >&6; }
17946 else
17947   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17948 $as_echo "no" >&6; }
17949 fi
17950
17951   if test "x$ac_pt_KRB5CONF" = x; then
17952     KRB5CONF="$KRB5ROOT/bin/krb5-config"
17953   else
17954     case $cross_compiling:$ac_tool_warned in
17955 yes:)
17956 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
17957 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
17958 ac_tool_warned=yes ;;
17959 esac
17960     KRB5CONF=$ac_pt_KRB5CONF
17961   fi
17962 else
17963   KRB5CONF="$ac_cv_path_KRB5CONF"
17964 fi
17965
17966                 if test -x $KRB5CONF ; then
17967                         K5CFLAGS="`$KRB5CONF --cflags`"
17968                         K5LIBS="`$KRB5CONF --libs`"
17969                         CPPFLAGS="$CPPFLAGS $K5CFLAGS"
17970
17971                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gssapi support" >&5
17972 $as_echo_n "checking for gssapi support... " >&6; }
17973                         if $KRB5CONF | grep gssapi >/dev/null ; then
17974                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17975 $as_echo "yes" >&6; }
17976
17977 $as_echo "#define GSSAPI 1" >>confdefs.h
17978
17979                                 GSSCFLAGS="`$KRB5CONF --cflags gssapi`"
17980                                 GSSLIBS="`$KRB5CONF --libs gssapi`"
17981                                 CPPFLAGS="$CPPFLAGS $GSSCFLAGS"
17982                         else
17983                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17984 $as_echo "no" >&6; }
17985                         fi
17986                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
17987 $as_echo_n "checking whether we are using Heimdal... " >&6; }
17988                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17989 /* end confdefs.h.  */
17990  #include <krb5.h>
17991
17992 int
17993 main ()
17994 {
17995  char *tmp = heimdal_version;
17996   ;
17997   return 0;
17998 }
17999 _ACEOF
18000 if ac_fn_c_try_compile "$LINENO"; then :
18001    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18002 $as_echo "yes" >&6; }
18003
18004 $as_echo "#define HEIMDAL 1" >>confdefs.h
18005
18006 else
18007   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18008 $as_echo "no" >&6; }
18009
18010 fi
18011 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18012                 else
18013                         CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
18014                         LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
18015                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
18016 $as_echo_n "checking whether we are using Heimdal... " >&6; }
18017                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18018 /* end confdefs.h.  */
18019  #include <krb5.h>
18020
18021 int
18022 main ()
18023 {
18024  char *tmp = heimdal_version;
18025   ;
18026   return 0;
18027 }
18028 _ACEOF
18029 if ac_fn_c_try_compile "$LINENO"; then :
18030    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18031 $as_echo "yes" >&6; }
18032                                          $as_echo "#define HEIMDAL 1" >>confdefs.h
18033
18034                                          K5LIBS="-lkrb5"
18035                                          K5LIBS="$K5LIBS -lcom_err -lasn1"
18036                                          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for net_write in -lroken" >&5
18037 $as_echo_n "checking for net_write in -lroken... " >&6; }
18038 if ${ac_cv_lib_roken_net_write+:} false; then :
18039   $as_echo_n "(cached) " >&6
18040 else
18041   ac_check_lib_save_LIBS=$LIBS
18042 LIBS="-lroken  $LIBS"
18043 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18044 /* end confdefs.h.  */
18045
18046 /* Override any GCC internal prototype to avoid an error.
18047    Use char because int might match the return type of a GCC
18048    builtin and then its argument prototype would still apply.  */
18049 #ifdef __cplusplus
18050 extern "C"
18051 #endif
18052 char net_write ();
18053 int
18054 main ()
18055 {
18056 return net_write ();
18057   ;
18058   return 0;
18059 }
18060 _ACEOF
18061 if ac_fn_c_try_link "$LINENO"; then :
18062   ac_cv_lib_roken_net_write=yes
18063 else
18064   ac_cv_lib_roken_net_write=no
18065 fi
18066 rm -f core conftest.err conftest.$ac_objext \
18067     conftest$ac_exeext conftest.$ac_ext
18068 LIBS=$ac_check_lib_save_LIBS
18069 fi
18070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_roken_net_write" >&5
18071 $as_echo "$ac_cv_lib_roken_net_write" >&6; }
18072 if test "x$ac_cv_lib_roken_net_write" = xyes; then :
18073   K5LIBS="$K5LIBS -lroken"
18074 fi
18075
18076                                          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
18077 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
18078 if ${ac_cv_lib_des_des_cbc_encrypt+:} false; then :
18079   $as_echo_n "(cached) " >&6
18080 else
18081   ac_check_lib_save_LIBS=$LIBS
18082 LIBS="-ldes  $LIBS"
18083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18084 /* end confdefs.h.  */
18085
18086 /* Override any GCC internal prototype to avoid an error.
18087    Use char because int might match the return type of a GCC
18088    builtin and then its argument prototype would still apply.  */
18089 #ifdef __cplusplus
18090 extern "C"
18091 #endif
18092 char des_cbc_encrypt ();
18093 int
18094 main ()
18095 {
18096 return des_cbc_encrypt ();
18097   ;
18098   return 0;
18099 }
18100 _ACEOF
18101 if ac_fn_c_try_link "$LINENO"; then :
18102   ac_cv_lib_des_des_cbc_encrypt=yes
18103 else
18104   ac_cv_lib_des_des_cbc_encrypt=no
18105 fi
18106 rm -f core conftest.err conftest.$ac_objext \
18107     conftest$ac_exeext conftest.$ac_ext
18108 LIBS=$ac_check_lib_save_LIBS
18109 fi
18110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
18111 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
18112 if test "x$ac_cv_lib_des_des_cbc_encrypt" = xyes; then :
18113   K5LIBS="$K5LIBS -ldes"
18114 fi
18115
18116
18117 else
18118    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18119 $as_echo "no" >&6; }
18120                                          K5LIBS="-lkrb5 -lk5crypto -lcom_err"
18121
18122 fi
18123 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18124                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
18125 $as_echo_n "checking for library containing dn_expand... " >&6; }
18126 if ${ac_cv_search_dn_expand+:} false; then :
18127   $as_echo_n "(cached) " >&6
18128 else
18129   ac_func_search_save_LIBS=$LIBS
18130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18131 /* end confdefs.h.  */
18132
18133 /* Override any GCC internal prototype to avoid an error.
18134    Use char because int might match the return type of a GCC
18135    builtin and then its argument prototype would still apply.  */
18136 #ifdef __cplusplus
18137 extern "C"
18138 #endif
18139 char dn_expand ();
18140 int
18141 main ()
18142 {
18143 return dn_expand ();
18144   ;
18145   return 0;
18146 }
18147 _ACEOF
18148 for ac_lib in '' resolv; do
18149   if test -z "$ac_lib"; then
18150     ac_res="none required"
18151   else
18152     ac_res=-l$ac_lib
18153     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18154   fi
18155   if ac_fn_c_try_link "$LINENO"; then :
18156   ac_cv_search_dn_expand=$ac_res
18157 fi
18158 rm -f core conftest.err conftest.$ac_objext \
18159     conftest$ac_exeext
18160   if ${ac_cv_search_dn_expand+:} false; then :
18161   break
18162 fi
18163 done
18164 if ${ac_cv_search_dn_expand+:} false; then :
18165
18166 else
18167   ac_cv_search_dn_expand=no
18168 fi
18169 rm conftest.$ac_ext
18170 LIBS=$ac_func_search_save_LIBS
18171 fi
18172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
18173 $as_echo "$ac_cv_search_dn_expand" >&6; }
18174 ac_res=$ac_cv_search_dn_expand
18175 if test "$ac_res" != no; then :
18176   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18177
18178 fi
18179
18180
18181                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi_krb5" >&5
18182 $as_echo_n "checking for gss_init_sec_context in -lgssapi_krb5... " >&6; }
18183 if ${ac_cv_lib_gssapi_krb5_gss_init_sec_context+:} false; then :
18184   $as_echo_n "(cached) " >&6
18185 else
18186   ac_check_lib_save_LIBS=$LIBS
18187 LIBS="-lgssapi_krb5  $LIBS"
18188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18189 /* end confdefs.h.  */
18190
18191 /* Override any GCC internal prototype to avoid an error.
18192    Use char because int might match the return type of a GCC
18193    builtin and then its argument prototype would still apply.  */
18194 #ifdef __cplusplus
18195 extern "C"
18196 #endif
18197 char gss_init_sec_context ();
18198 int
18199 main ()
18200 {
18201 return gss_init_sec_context ();
18202   ;
18203   return 0;
18204 }
18205 _ACEOF
18206 if ac_fn_c_try_link "$LINENO"; then :
18207   ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes
18208 else
18209   ac_cv_lib_gssapi_krb5_gss_init_sec_context=no
18210 fi
18211 rm -f core conftest.err conftest.$ac_objext \
18212     conftest$ac_exeext conftest.$ac_ext
18213 LIBS=$ac_check_lib_save_LIBS
18214 fi
18215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5
18216 $as_echo "$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6; }
18217 if test "x$ac_cv_lib_gssapi_krb5_gss_init_sec_context" = xyes; then :
18218    $as_echo "#define GSSAPI 1" >>confdefs.h
18219
18220                                   GSSLIBS="-lgssapi_krb5"
18221 else
18222    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi" >&5
18223 $as_echo_n "checking for gss_init_sec_context in -lgssapi... " >&6; }
18224 if ${ac_cv_lib_gssapi_gss_init_sec_context+:} false; then :
18225   $as_echo_n "(cached) " >&6
18226 else
18227   ac_check_lib_save_LIBS=$LIBS
18228 LIBS="-lgssapi  $LIBS"
18229 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18230 /* end confdefs.h.  */
18231
18232 /* Override any GCC internal prototype to avoid an error.
18233    Use char because int might match the return type of a GCC
18234    builtin and then its argument prototype would still apply.  */
18235 #ifdef __cplusplus
18236 extern "C"
18237 #endif
18238 char gss_init_sec_context ();
18239 int
18240 main ()
18241 {
18242 return gss_init_sec_context ();
18243   ;
18244   return 0;
18245 }
18246 _ACEOF
18247 if ac_fn_c_try_link "$LINENO"; then :
18248   ac_cv_lib_gssapi_gss_init_sec_context=yes
18249 else
18250   ac_cv_lib_gssapi_gss_init_sec_context=no
18251 fi
18252 rm -f core conftest.err conftest.$ac_objext \
18253     conftest$ac_exeext conftest.$ac_ext
18254 LIBS=$ac_check_lib_save_LIBS
18255 fi
18256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5
18257 $as_echo "$ac_cv_lib_gssapi_gss_init_sec_context" >&6; }
18258 if test "x$ac_cv_lib_gssapi_gss_init_sec_context" = xyes; then :
18259    $as_echo "#define GSSAPI 1" >>confdefs.h
18260
18261                                           GSSLIBS="-lgssapi"
18262 else
18263    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgss" >&5
18264 $as_echo_n "checking for gss_init_sec_context in -lgss... " >&6; }
18265 if ${ac_cv_lib_gss_gss_init_sec_context+:} false; then :
18266   $as_echo_n "(cached) " >&6
18267 else
18268   ac_check_lib_save_LIBS=$LIBS
18269 LIBS="-lgss  $LIBS"
18270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18271 /* end confdefs.h.  */
18272
18273 /* Override any GCC internal prototype to avoid an error.
18274    Use char because int might match the return type of a GCC
18275    builtin and then its argument prototype would still apply.  */
18276 #ifdef __cplusplus
18277 extern "C"
18278 #endif
18279 char gss_init_sec_context ();
18280 int
18281 main ()
18282 {
18283 return gss_init_sec_context ();
18284   ;
18285   return 0;
18286 }
18287 _ACEOF
18288 if ac_fn_c_try_link "$LINENO"; then :
18289   ac_cv_lib_gss_gss_init_sec_context=yes
18290 else
18291   ac_cv_lib_gss_gss_init_sec_context=no
18292 fi
18293 rm -f core conftest.err conftest.$ac_objext \
18294     conftest$ac_exeext conftest.$ac_ext
18295 LIBS=$ac_check_lib_save_LIBS
18296 fi
18297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_init_sec_context" >&5
18298 $as_echo "$ac_cv_lib_gss_gss_init_sec_context" >&6; }
18299 if test "x$ac_cv_lib_gss_gss_init_sec_context" = xyes; then :
18300    $as_echo "#define GSSAPI 1" >>confdefs.h
18301
18302                                                   GSSLIBS="-lgss"
18303 else
18304   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api library - build may fail" >&5
18305 $as_echo "$as_me: WARNING: Cannot find any suitable gss-api library - build may fail" >&2;}
18306 fi
18307
18308
18309 fi
18310
18311
18312 fi
18313
18314
18315                         ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
18316 if test "x$ac_cv_header_gssapi_h" = xyes; then :
18317
18318 else
18319    unset ac_cv_header_gssapi_h
18320                                   CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
18321                                   for ac_header in gssapi.h
18322 do :
18323   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
18324 if test "x$ac_cv_header_gssapi_h" = xyes; then :
18325   cat >>confdefs.h <<_ACEOF
18326 #define HAVE_GSSAPI_H 1
18327 _ACEOF
18328
18329 else
18330   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api header - build may fail" >&5
18331 $as_echo "$as_me: WARNING: Cannot find any suitable gss-api header - build may fail" >&2;}
18332
18333 fi
18334
18335 done
18336
18337
18338
18339 fi
18340
18341
18342
18343                         oldCPP="$CPPFLAGS"
18344                         CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
18345                         ac_fn_c_check_header_mongrel "$LINENO" "gssapi_krb5.h" "ac_cv_header_gssapi_krb5_h" "$ac_includes_default"
18346 if test "x$ac_cv_header_gssapi_krb5_h" = xyes; then :
18347
18348 else
18349    CPPFLAGS="$oldCPP"
18350 fi
18351
18352
18353
18354                 fi
18355                 if test ! -z "$need_dash_r" ; then
18356                         LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
18357                 fi
18358                 if test ! -z "$blibpath" ; then
18359                         blibpath="$blibpath:${KRB5ROOT}/lib"
18360                 fi
18361
18362                 for ac_header in gssapi.h gssapi/gssapi.h
18363 do :
18364   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18365 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18366 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18367   cat >>confdefs.h <<_ACEOF
18368 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18369 _ACEOF
18370
18371 fi
18372
18373 done
18374
18375                 for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h
18376 do :
18377   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18378 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18379 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18380   cat >>confdefs.h <<_ACEOF
18381 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18382 _ACEOF
18383
18384 fi
18385
18386 done
18387
18388                 for ac_header in gssapi_generic.h gssapi/gssapi_generic.h
18389 do :
18390   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
18391 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
18392 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
18393   cat >>confdefs.h <<_ACEOF
18394 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
18395 _ACEOF
18396
18397 fi
18398
18399 done
18400
18401
18402                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing k_hasafs" >&5
18403 $as_echo_n "checking for library containing k_hasafs... " >&6; }
18404 if ${ac_cv_search_k_hasafs+:} false; then :
18405   $as_echo_n "(cached) " >&6
18406 else
18407   ac_func_search_save_LIBS=$LIBS
18408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18409 /* end confdefs.h.  */
18410
18411 /* Override any GCC internal prototype to avoid an error.
18412    Use char because int might match the return type of a GCC
18413    builtin and then its argument prototype would still apply.  */
18414 #ifdef __cplusplus
18415 extern "C"
18416 #endif
18417 char k_hasafs ();
18418 int
18419 main ()
18420 {
18421 return k_hasafs ();
18422   ;
18423   return 0;
18424 }
18425 _ACEOF
18426 for ac_lib in '' kafs; do
18427   if test -z "$ac_lib"; then
18428     ac_res="none required"
18429   else
18430     ac_res=-l$ac_lib
18431     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
18432   fi
18433   if ac_fn_c_try_link "$LINENO"; then :
18434   ac_cv_search_k_hasafs=$ac_res
18435 fi
18436 rm -f core conftest.err conftest.$ac_objext \
18437     conftest$ac_exeext
18438   if ${ac_cv_search_k_hasafs+:} false; then :
18439   break
18440 fi
18441 done
18442 if ${ac_cv_search_k_hasafs+:} false; then :
18443
18444 else
18445   ac_cv_search_k_hasafs=no
18446 fi
18447 rm conftest.$ac_ext
18448 LIBS=$ac_func_search_save_LIBS
18449 fi
18450 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_k_hasafs" >&5
18451 $as_echo "$ac_cv_search_k_hasafs" >&6; }
18452 ac_res=$ac_cv_search_k_hasafs
18453 if test "$ac_res" != no; then :
18454   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
18455
18456 $as_echo "#define USE_AFS 1" >>confdefs.h
18457
18458 fi
18459
18460
18461                 ac_fn_c_check_decl "$LINENO" "GSS_C_NT_HOSTBASED_SERVICE" "ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" "
18462 #ifdef HAVE_GSSAPI_H
18463 # include <gssapi.h>
18464 #elif defined(HAVE_GSSAPI_GSSAPI_H)
18465 # include <gssapi/gssapi.h>
18466 #endif
18467
18468 #ifdef HAVE_GSSAPI_GENERIC_H
18469 # include <gssapi_generic.h>
18470 #elif defined(HAVE_GSSAPI_GSSAPI_GENERIC_H)
18471 # include <gssapi/gssapi_generic.h>
18472 #endif
18473
18474 "
18475 if test "x$ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" = xyes; then :
18476   ac_have_decl=1
18477 else
18478   ac_have_decl=0
18479 fi
18480
18481 cat >>confdefs.h <<_ACEOF
18482 #define HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE $ac_have_decl
18483 _ACEOF
18484
18485                 saved_LIBS="$LIBS"
18486                 LIBS="$LIBS $K5LIBS"
18487                 for ac_func in krb5_cc_new_unique krb5_get_error_message krb5_free_error_message
18488 do :
18489   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18490 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18491 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18492   cat >>confdefs.h <<_ACEOF
18493 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18494 _ACEOF
18495
18496 fi
18497 done
18498
18499                 LIBS="$saved_LIBS"
18500
18501         fi
18502
18503
18504 fi
18505
18506
18507
18508
18509 # Looking for programs, paths and files
18510
18511 PRIVSEP_PATH=/var/empty
18512
18513 # Check whether --with-privsep-path was given.
18514 if test "${with_privsep_path+set}" = set; then :
18515   withval=$with_privsep_path;
18516                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
18517                     test "x${withval}" != "xyes"; then
18518                         PRIVSEP_PATH=$withval
18519                 fi
18520
18521
18522 fi
18523
18524
18525
18526
18527 # Check whether --with-xauth was given.
18528 if test "${with_xauth+set}" = set; then :
18529   withval=$with_xauth;
18530                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
18531                     test "x${withval}" != "xyes"; then
18532                         xauth_path=$withval
18533                 fi
18534
18535 else
18536
18537                 TestPath="$PATH"
18538                 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X/bin"
18539                 TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11"
18540                 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin"
18541                 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
18542                 # Extract the first word of "xauth", so it can be a program name with args.
18543 set dummy xauth; ac_word=$2
18544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18545 $as_echo_n "checking for $ac_word... " >&6; }
18546 if ${ac_cv_path_xauth_path+:} false; then :
18547   $as_echo_n "(cached) " >&6
18548 else
18549   case $xauth_path in
18550   [\\/]* | ?:[\\/]*)
18551   ac_cv_path_xauth_path="$xauth_path" # Let the user override the test with a path.
18552   ;;
18553   *)
18554   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18555 for as_dir in $TestPath
18556 do
18557   IFS=$as_save_IFS
18558   test -z "$as_dir" && as_dir=.
18559     for ac_exec_ext in '' $ac_executable_extensions; do
18560   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18561     ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext"
18562     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18563     break 2
18564   fi
18565 done
18566   done
18567 IFS=$as_save_IFS
18568
18569   ;;
18570 esac
18571 fi
18572 xauth_path=$ac_cv_path_xauth_path
18573 if test -n "$xauth_path"; then
18574   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xauth_path" >&5
18575 $as_echo "$xauth_path" >&6; }
18576 else
18577   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18578 $as_echo "no" >&6; }
18579 fi
18580
18581
18582                 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
18583                         xauth_path="/usr/openwin/bin/xauth"
18584                 fi
18585
18586
18587 fi
18588
18589
18590 STRIP_OPT=-s
18591 # Check whether --enable-strip was given.
18592 if test "${enable_strip+set}" = set; then :
18593   enableval=$enable_strip;
18594                 if test "x$enableval" = "xno" ; then
18595                         STRIP_OPT=
18596                 fi
18597
18598
18599 fi
18600
18601
18602
18603 if test -z "$xauth_path" ; then
18604         XAUTH_PATH="undefined"
18605
18606 else
18607
18608 cat >>confdefs.h <<_ACEOF
18609 #define XAUTH_PATH "$xauth_path"
18610 _ACEOF
18611
18612         XAUTH_PATH=$xauth_path
18613
18614 fi
18615
18616 # Check for mail directory
18617
18618 # Check whether --with-maildir was given.
18619 if test "${with_maildir+set}" = set; then :
18620   withval=$with_maildir;
18621         if test "X$withval" != X  &&  test "x$withval" != xno  &&  \
18622             test "x${withval}" != xyes; then
18623
18624 cat >>confdefs.h <<_ACEOF
18625 #define MAIL_DIRECTORY "$withval"
18626 _ACEOF
18627
18628             fi
18629
18630 else
18631
18632         if test "X$maildir" != "X"; then
18633             cat >>confdefs.h <<_ACEOF
18634 #define MAIL_DIRECTORY "$maildir"
18635 _ACEOF
18636
18637         else
18638             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Discovering system mail directory" >&5
18639 $as_echo_n "checking Discovering system mail directory... " >&6; }
18640             if test "$cross_compiling" = yes; then :
18641
18642                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&5
18643 $as_echo "$as_me: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&2;}
18644
18645
18646 else
18647   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18648 /* end confdefs.h.  */
18649
18650 #include <stdio.h>
18651 #include <string.h>
18652 #ifdef HAVE_PATHS_H
18653 #include <paths.h>
18654 #endif
18655 #ifdef HAVE_MAILLOCK_H
18656 #include <maillock.h>
18657 #endif
18658 #define DATA "conftest.maildir"
18659
18660 int
18661 main ()
18662 {
18663
18664         FILE *fd;
18665         int rc;
18666
18667         fd = fopen(DATA,"w");
18668         if(fd == NULL)
18669                 exit(1);
18670
18671 #if defined (_PATH_MAILDIR)
18672         if ((rc = fprintf(fd ,"_PATH_MAILDIR:%s\n", _PATH_MAILDIR)) <0)
18673                 exit(1);
18674 #elif defined (MAILDIR)
18675         if ((rc = fprintf(fd ,"MAILDIR:%s\n", MAILDIR)) <0)
18676                 exit(1);
18677 #elif defined (_PATH_MAIL)
18678         if ((rc = fprintf(fd ,"_PATH_MAIL:%s\n", _PATH_MAIL)) <0)
18679                 exit(1);
18680 #else
18681         exit (2);
18682 #endif
18683
18684         exit(0);
18685
18686   ;
18687   return 0;
18688 }
18689 _ACEOF
18690 if ac_fn_c_try_run "$LINENO"; then :
18691
18692                     maildir_what=`awk -F: '{print $1}' conftest.maildir`
18693                     maildir=`awk -F: '{print $2}' conftest.maildir \
18694                         | sed 's|/$||'`
18695                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: $maildir from $maildir_what" >&5
18696 $as_echo "Using: $maildir from $maildir_what" >&6; }
18697                     if test "x$maildir_what" != "x_PATH_MAILDIR"; then
18698                         cat >>confdefs.h <<_ACEOF
18699 #define MAIL_DIRECTORY "$maildir"
18700 _ACEOF
18701
18702                     fi
18703
18704 else
18705
18706                     if test "X$ac_status" = "X2";then
18707 # our test program didn't find it. Default to /var/spool/mail
18708                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: default value of /var/spool/mail" >&5
18709 $as_echo "Using: default value of /var/spool/mail" >&6; }
18710                         cat >>confdefs.h <<_ACEOF
18711 #define MAIL_DIRECTORY "/var/spool/mail"
18712 _ACEOF
18713
18714                      else
18715                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** not found ***" >&5
18716 $as_echo "*** not found ***" >&6; }
18717                      fi
18718
18719 fi
18720 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18721   conftest.$ac_objext conftest.beam conftest.$ac_ext
18722 fi
18723
18724         fi
18725
18726
18727 fi
18728  # maildir
18729
18730 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
18731         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptmx test" >&5
18732 $as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptmx test" >&2;}
18733         disable_ptmx_check=yes
18734 fi
18735 if test -z "$no_dev_ptmx" ; then
18736         if test "x$disable_ptmx_check" != "xyes" ; then
18737                 as_ac_File=`$as_echo "ac_cv_file_"/dev/ptmx"" | $as_tr_sh`
18738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptmx\"" >&5
18739 $as_echo_n "checking for \"/dev/ptmx\"... " >&6; }
18740 if eval \${$as_ac_File+:} false; then :
18741   $as_echo_n "(cached) " >&6
18742 else
18743   test "$cross_compiling" = yes &&
18744   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18745 if test -r ""/dev/ptmx""; then
18746   eval "$as_ac_File=yes"
18747 else
18748   eval "$as_ac_File=no"
18749 fi
18750 fi
18751 eval ac_res=\$$as_ac_File
18752                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18753 $as_echo "$ac_res" >&6; }
18754 if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
18755
18756
18757 cat >>confdefs.h <<_ACEOF
18758 #define HAVE_DEV_PTMX 1
18759 _ACEOF
18760
18761                                 have_dev_ptmx=1
18762
18763
18764 fi
18765
18766         fi
18767 fi
18768
18769 if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
18770         as_ac_File=`$as_echo "ac_cv_file_"/dev/ptc"" | $as_tr_sh`
18771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptc\"" >&5
18772 $as_echo_n "checking for \"/dev/ptc\"... " >&6; }
18773 if eval \${$as_ac_File+:} false; then :
18774   $as_echo_n "(cached) " >&6
18775 else
18776   test "$cross_compiling" = yes &&
18777   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
18778 if test -r ""/dev/ptc""; then
18779   eval "$as_ac_File=yes"
18780 else
18781   eval "$as_ac_File=no"
18782 fi
18783 fi
18784 eval ac_res=\$$as_ac_File
18785                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18786 $as_echo "$ac_res" >&6; }
18787 if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
18788
18789
18790 cat >>confdefs.h <<_ACEOF
18791 #define HAVE_DEV_PTS_AND_PTC 1
18792 _ACEOF
18793
18794                         have_dev_ptc=1
18795
18796
18797 fi
18798
18799 else
18800         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptc test" >&5
18801 $as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptc test" >&2;}
18802 fi
18803
18804 # Options from here on. Some of these are preset by platform above
18805
18806 # Check whether --with-mantype was given.
18807 if test "${with_mantype+set}" = set; then :
18808   withval=$with_mantype;
18809                 case "$withval" in
18810                 man|cat|doc)
18811                         MANTYPE=$withval
18812                         ;;
18813                 *)
18814                         as_fn_error $? "invalid man type: $withval" "$LINENO" 5
18815                         ;;
18816                 esac
18817
18818
18819 fi
18820
18821 if test -z "$MANTYPE"; then
18822         TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb"
18823         for ac_prog in nroff awf
18824 do
18825   # Extract the first word of "$ac_prog", so it can be a program name with args.
18826 set dummy $ac_prog; ac_word=$2
18827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18828 $as_echo_n "checking for $ac_word... " >&6; }
18829 if ${ac_cv_path_NROFF+:} false; then :
18830   $as_echo_n "(cached) " >&6
18831 else
18832   case $NROFF in
18833   [\\/]* | ?:[\\/]*)
18834   ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
18835   ;;
18836   *)
18837   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18838 for as_dir in $TestPath
18839 do
18840   IFS=$as_save_IFS
18841   test -z "$as_dir" && as_dir=.
18842     for ac_exec_ext in '' $ac_executable_extensions; do
18843   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18844     ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
18845     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18846     break 2
18847   fi
18848 done
18849   done
18850 IFS=$as_save_IFS
18851
18852   ;;
18853 esac
18854 fi
18855 NROFF=$ac_cv_path_NROFF
18856 if test -n "$NROFF"; then
18857   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
18858 $as_echo "$NROFF" >&6; }
18859 else
18860   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18861 $as_echo "no" >&6; }
18862 fi
18863
18864
18865   test -n "$NROFF" && break
18866 done
18867 test -n "$NROFF" || NROFF="/bin/false"
18868
18869         if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
18870                 MANTYPE=doc
18871         elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
18872                 MANTYPE=man
18873         else
18874                 MANTYPE=cat
18875         fi
18876 fi
18877
18878 if test "$MANTYPE" = "doc"; then
18879         mansubdir=man;
18880 else
18881         mansubdir=$MANTYPE;
18882 fi
18883
18884
18885 # Check whether to enable MD5 passwords
18886 MD5_MSG="no"
18887
18888 # Check whether --with-md5-passwords was given.
18889 if test "${with_md5_passwords+set}" = set; then :
18890   withval=$with_md5_passwords;
18891                 if test "x$withval" != "xno" ; then
18892
18893 $as_echo "#define HAVE_MD5_PASSWORDS 1" >>confdefs.h
18894
18895                         MD5_MSG="yes"
18896                 fi
18897
18898
18899 fi
18900
18901
18902 # Whether to disable shadow password support
18903
18904 # Check whether --with-shadow was given.
18905 if test "${with_shadow+set}" = set; then :
18906   withval=$with_shadow;
18907                 if test "x$withval" = "xno" ; then
18908                         $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
18909
18910                         disable_shadow=yes
18911                 fi
18912
18913
18914 fi
18915
18916
18917 if test -z "$disable_shadow" ; then
18918         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the systems has expire shadow information" >&5
18919 $as_echo_n "checking if the systems has expire shadow information... " >&6; }
18920         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18921 /* end confdefs.h.  */
18922
18923 #include <sys/types.h>
18924 #include <shadow.h>
18925 struct spwd sp;
18926
18927 int
18928 main ()
18929 {
18930  sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0;
18931   ;
18932   return 0;
18933 }
18934 _ACEOF
18935 if ac_fn_c_try_compile "$LINENO"; then :
18936    sp_expire_available=yes
18937 fi
18938 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18939
18940         if test "x$sp_expire_available" = "xyes" ; then
18941                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18942 $as_echo "yes" >&6; }
18943
18944 $as_echo "#define HAS_SHADOW_EXPIRE 1" >>confdefs.h
18945
18946         else
18947                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18948 $as_echo "no" >&6; }
18949         fi
18950 fi
18951
18952 # Use ip address instead of hostname in $DISPLAY
18953 if test ! -z "$IPADDR_IN_DISPLAY" ; then
18954         DISPLAY_HACK_MSG="yes"
18955
18956 $as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
18957
18958 else
18959         DISPLAY_HACK_MSG="no"
18960
18961 # Check whether --with-ipaddr-display was given.
18962 if test "${with_ipaddr_display+set}" = set; then :
18963   withval=$with_ipaddr_display;
18964                         if test "x$withval" != "xno" ; then
18965                                 $as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
18966
18967                                 DISPLAY_HACK_MSG="yes"
18968                         fi
18969
18970
18971 fi
18972
18973 fi
18974
18975 # check for /etc/default/login and use it if present.
18976 # Check whether --enable-etc-default-login was given.
18977 if test "${enable_etc_default_login+set}" = set; then :
18978   enableval=$enable_etc_default_login;  if test "x$enableval" = "xno"; then
18979                 { $as_echo "$as_me:${as_lineno-$LINENO}: /etc/default/login handling disabled" >&5
18980 $as_echo "$as_me: /etc/default/login handling disabled" >&6;}
18981                 etc_default_login=no
18982           else
18983                 etc_default_login=yes
18984           fi
18985 else
18986    if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
18987           then
18988                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking /etc/default/login" >&5
18989 $as_echo "$as_me: WARNING: cross compiling: not checking /etc/default/login" >&2;}
18990                 etc_default_login=no
18991           else
18992                 etc_default_login=yes
18993           fi
18994
18995 fi
18996
18997
18998 if test "x$etc_default_login" != "xno"; then
18999         as_ac_File=`$as_echo "ac_cv_file_"/etc/default/login"" | $as_tr_sh`
19000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/etc/default/login\"" >&5
19001 $as_echo_n "checking for \"/etc/default/login\"... " >&6; }
19002 if eval \${$as_ac_File+:} false; then :
19003   $as_echo_n "(cached) " >&6
19004 else
19005   test "$cross_compiling" = yes &&
19006   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
19007 if test -r ""/etc/default/login""; then
19008   eval "$as_ac_File=yes"
19009 else
19010   eval "$as_ac_File=no"
19011 fi
19012 fi
19013 eval ac_res=\$$as_ac_File
19014                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19015 $as_echo "$ac_res" >&6; }
19016 if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
19017    external_path_file=/etc/default/login
19018 fi
19019
19020         if test "x$external_path_file" = "x/etc/default/login"; then
19021
19022 $as_echo "#define HAVE_ETC_DEFAULT_LOGIN 1" >>confdefs.h
19023
19024         fi
19025 fi
19026
19027 if test $ac_cv_func_login_getcapbool = "yes" && \
19028         test $ac_cv_header_login_cap_h = "yes" ; then
19029         external_path_file=/etc/login.conf
19030 fi
19031
19032 # Whether to mess with the default path
19033 SERVER_PATH_MSG="(default)"
19034
19035 # Check whether --with-default-path was given.
19036 if test "${with_default_path+set}" = set; then :
19037   withval=$with_default_path;
19038                 if test "x$external_path_file" = "x/etc/login.conf" ; then
19039                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
19040 --with-default-path=PATH has no effect on this system.
19041 Edit /etc/login.conf instead." >&5
19042 $as_echo "$as_me: WARNING:
19043 --with-default-path=PATH has no effect on this system.
19044 Edit /etc/login.conf instead." >&2;}
19045                 elif test "x$withval" != "xno" ; then
19046                         if test ! -z "$external_path_file" ; then
19047                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
19048 --with-default-path=PATH will only be used if PATH is not defined in
19049 $external_path_file ." >&5
19050 $as_echo "$as_me: WARNING:
19051 --with-default-path=PATH will only be used if PATH is not defined in
19052 $external_path_file ." >&2;}
19053                         fi
19054                         user_path="$withval"
19055                         SERVER_PATH_MSG="$withval"
19056                 fi
19057
19058 else
19059    if test "x$external_path_file" = "x/etc/login.conf" ; then
19060                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Make sure the path to scp is in /etc/login.conf" >&5
19061 $as_echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;}
19062         else
19063                 if test ! -z "$external_path_file" ; then
19064                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
19065 If PATH is defined in $external_path_file, ensure the path to scp is included,
19066 otherwise scp will not work." >&5
19067 $as_echo "$as_me: WARNING:
19068 If PATH is defined in $external_path_file, ensure the path to scp is included,
19069 otherwise scp will not work." >&2;}
19070                 fi
19071                 if test "$cross_compiling" = yes; then :
19072    user_path="/usr/bin:/bin:/usr/sbin:/sbin"
19073
19074 else
19075   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19076 /* end confdefs.h.  */
19077
19078 /* find out what STDPATH is */
19079 #include <stdio.h>
19080 #ifdef HAVE_PATHS_H
19081 # include <paths.h>
19082 #endif
19083 #ifndef _PATH_STDPATH
19084 # ifdef _PATH_USERPATH  /* Irix */
19085 #  define _PATH_STDPATH _PATH_USERPATH
19086 # else
19087 #  define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
19088 # endif
19089 #endif
19090 #include <sys/types.h>
19091 #include <sys/stat.h>
19092 #include <fcntl.h>
19093 #define DATA "conftest.stdpath"
19094
19095 int
19096 main ()
19097 {
19098
19099         FILE *fd;
19100         int rc;
19101
19102         fd = fopen(DATA,"w");
19103         if(fd == NULL)
19104                 exit(1);
19105
19106         if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
19107                 exit(1);
19108
19109         exit(0);
19110
19111   ;
19112   return 0;
19113 }
19114 _ACEOF
19115 if ac_fn_c_try_run "$LINENO"; then :
19116    user_path=`cat conftest.stdpath`
19117 else
19118    user_path="/usr/bin:/bin:/usr/sbin:/sbin"
19119 fi
19120 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19121   conftest.$ac_objext conftest.beam conftest.$ac_ext
19122 fi
19123
19124 # make sure $bindir is in USER_PATH so scp will work
19125                 t_bindir="${bindir}"
19126                 while echo "${t_bindir}" | egrep '\$\{|NONE/' >/dev/null 2>&1; do
19127                         t_bindir=`eval echo ${t_bindir}`
19128                         case $t_bindir in
19129                                 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
19130                         esac
19131                         case $t_bindir in
19132                                 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
19133                         esac
19134                 done
19135                 echo $user_path | grep ":$t_bindir"  > /dev/null 2>&1
19136                 if test $? -ne 0  ; then
19137                         echo $user_path | grep "^$t_bindir"  > /dev/null 2>&1
19138                         if test $? -ne 0  ; then
19139                                 user_path=$user_path:$t_bindir
19140                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Adding $t_bindir to USER_PATH so scp will work" >&5
19141 $as_echo "Adding $t_bindir to USER_PATH so scp will work" >&6; }
19142                         fi
19143                 fi
19144         fi
19145
19146 fi
19147
19148 if test "x$external_path_file" != "x/etc/login.conf" ; then
19149
19150 cat >>confdefs.h <<_ACEOF
19151 #define USER_PATH "$user_path"
19152 _ACEOF
19153
19154
19155 fi
19156
19157 # Set superuser path separately to user path
19158
19159 # Check whether --with-superuser-path was given.
19160 if test "${with_superuser_path+set}" = set; then :
19161   withval=$with_superuser_path;
19162                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
19163                     test "x${withval}" != "xyes"; then
19164
19165 cat >>confdefs.h <<_ACEOF
19166 #define SUPERUSER_PATH "$withval"
19167 _ACEOF
19168
19169                         superuser_path=$withval
19170                 fi
19171
19172
19173 fi
19174
19175
19176
19177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
19178 $as_echo_n "checking if we need to convert IPv4 in IPv6-mapped addresses... " >&6; }
19179 IPV4_IN6_HACK_MSG="no"
19180
19181 # Check whether --with-4in6 was given.
19182 if test "${with_4in6+set}" = set; then :
19183   withval=$with_4in6;
19184                 if test "x$withval" != "xno" ; then
19185                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19186 $as_echo "yes" >&6; }
19187
19188 $as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
19189
19190                         IPV4_IN6_HACK_MSG="yes"
19191                 else
19192                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19193 $as_echo "no" >&6; }
19194                 fi
19195
19196 else
19197
19198                 if test "x$inet6_default_4in6" = "xyes"; then
19199                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
19200 $as_echo "yes (default)" >&6; }
19201                         $as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
19202
19203                         IPV4_IN6_HACK_MSG="yes"
19204                 else
19205                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5
19206 $as_echo "no (default)" >&6; }
19207                 fi
19208
19209
19210 fi
19211
19212
19213 # Whether to enable BSD auth support
19214 BSD_AUTH_MSG=no
19215
19216 # Check whether --with-bsd-auth was given.
19217 if test "${with_bsd_auth+set}" = set; then :
19218   withval=$with_bsd_auth;
19219                 if test "x$withval" != "xno" ; then
19220
19221 $as_echo "#define BSD_AUTH 1" >>confdefs.h
19222
19223                         BSD_AUTH_MSG=yes
19224                 fi
19225
19226
19227 fi
19228
19229
19230 # Where to place sshd.pid
19231 piddir=/var/run
19232 # make sure the directory exists
19233 if test ! -d $piddir ; then
19234         piddir=`eval echo ${sysconfdir}`
19235         case $piddir in
19236                 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
19237         esac
19238 fi
19239
19240
19241 # Check whether --with-pid-dir was given.
19242 if test "${with_pid_dir+set}" = set; then :
19243   withval=$with_pid_dir;
19244                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
19245                     test "x${withval}" != "xyes"; then
19246                         piddir=$withval
19247                         if test ! -d $piddir ; then
19248                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** no $piddir directory on this system **" >&5
19249 $as_echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;}
19250                         fi
19251                 fi
19252
19253
19254 fi
19255
19256
19257
19258 cat >>confdefs.h <<_ACEOF
19259 #define _PATH_SSH_PIDDIR "$piddir"
19260 _ACEOF
19261
19262
19263
19264 # Check whether --enable-lastlog was given.
19265 if test "${enable_lastlog+set}" = set; then :
19266   enableval=$enable_lastlog;
19267                 if test "x$enableval" = "xno" ; then
19268                         $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
19269
19270                 fi
19271
19272
19273 fi
19274
19275 # Check whether --enable-utmp was given.
19276 if test "${enable_utmp+set}" = set; then :
19277   enableval=$enable_utmp;
19278                 if test "x$enableval" = "xno" ; then
19279                         $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
19280
19281                 fi
19282
19283
19284 fi
19285
19286 # Check whether --enable-utmpx was given.
19287 if test "${enable_utmpx+set}" = set; then :
19288   enableval=$enable_utmpx;
19289                 if test "x$enableval" = "xno" ; then
19290
19291 $as_echo "#define DISABLE_UTMPX 1" >>confdefs.h
19292
19293                 fi
19294
19295
19296 fi
19297
19298 # Check whether --enable-wtmp was given.
19299 if test "${enable_wtmp+set}" = set; then :
19300   enableval=$enable_wtmp;
19301                 if test "x$enableval" = "xno" ; then
19302                         $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
19303
19304                 fi
19305
19306
19307 fi
19308
19309 # Check whether --enable-wtmpx was given.
19310 if test "${enable_wtmpx+set}" = set; then :
19311   enableval=$enable_wtmpx;
19312                 if test "x$enableval" = "xno" ; then
19313
19314 $as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
19315
19316                 fi
19317
19318
19319 fi
19320
19321 # Check whether --enable-libutil was given.
19322 if test "${enable_libutil+set}" = set; then :
19323   enableval=$enable_libutil;
19324                 if test "x$enableval" = "xno" ; then
19325                         $as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
19326
19327                 fi
19328
19329
19330 fi
19331
19332 # Check whether --enable-pututline was given.
19333 if test "${enable_pututline+set}" = set; then :
19334   enableval=$enable_pututline;
19335                 if test "x$enableval" = "xno" ; then
19336
19337 $as_echo "#define DISABLE_PUTUTLINE 1" >>confdefs.h
19338
19339                 fi
19340
19341
19342 fi
19343
19344 # Check whether --enable-pututxline was given.
19345 if test "${enable_pututxline+set}" = set; then :
19346   enableval=$enable_pututxline;
19347                 if test "x$enableval" = "xno" ; then
19348
19349 $as_echo "#define DISABLE_PUTUTXLINE 1" >>confdefs.h
19350
19351                 fi
19352
19353
19354 fi
19355
19356
19357 # Check whether --with-lastlog was given.
19358 if test "${with_lastlog+set}" = set; then :
19359   withval=$with_lastlog;
19360                 if test "x$withval" = "xno" ; then
19361                         $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
19362
19363                 elif test -n "$withval"  &&  test "x${withval}" != "xyes"; then
19364                         conf_lastlog_location=$withval
19365                 fi
19366
19367
19368 fi
19369
19370
19371
19372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines LASTLOG_FILE" >&5
19373 $as_echo_n "checking if your system defines LASTLOG_FILE... " >&6; }
19374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19375 /* end confdefs.h.  */
19376
19377 #include <sys/types.h>
19378 #include <utmp.h>
19379 #ifdef HAVE_LASTLOG_H
19380 #  include <lastlog.h>
19381 #endif
19382 #ifdef HAVE_PATHS_H
19383 #  include <paths.h>
19384 #endif
19385 #ifdef HAVE_LOGIN_H
19386 # include <login.h>
19387 #endif
19388
19389 int
19390 main ()
19391 {
19392  char *lastlog = LASTLOG_FILE;
19393   ;
19394   return 0;
19395 }
19396 _ACEOF
19397 if ac_fn_c_try_compile "$LINENO"; then :
19398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19399 $as_echo "yes" >&6; }
19400 else
19401
19402                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19403 $as_echo "no" >&6; }
19404                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines _PATH_LASTLOG" >&5
19405 $as_echo_n "checking if your system defines _PATH_LASTLOG... " >&6; }
19406                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19407 /* end confdefs.h.  */
19408
19409 #include <sys/types.h>
19410 #include <utmp.h>
19411 #ifdef HAVE_LASTLOG_H
19412 #  include <lastlog.h>
19413 #endif
19414 #ifdef HAVE_PATHS_H
19415 #  include <paths.h>
19416 #endif
19417
19418 int
19419 main ()
19420 {
19421  char *lastlog = _PATH_LASTLOG;
19422   ;
19423   return 0;
19424 }
19425 _ACEOF
19426 if ac_fn_c_try_compile "$LINENO"; then :
19427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19428 $as_echo "yes" >&6; }
19429 else
19430
19431                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19432 $as_echo "no" >&6; }
19433                         system_lastlog_path=no
19434
19435 fi
19436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19437
19438 fi
19439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19440
19441 if test -z "$conf_lastlog_location"; then
19442         if test x"$system_lastlog_path" = x"no" ; then
19443                 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
19444                                 if (test -d "$f" || test -f "$f") ; then
19445                                         conf_lastlog_location=$f
19446                                 fi
19447                 done
19448                 if test -z "$conf_lastlog_location"; then
19449                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** Cannot find lastlog **" >&5
19450 $as_echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;}
19451                                         fi
19452         fi
19453 fi
19454
19455 if test -n "$conf_lastlog_location"; then
19456
19457 cat >>confdefs.h <<_ACEOF
19458 #define CONF_LASTLOG_FILE "$conf_lastlog_location"
19459 _ACEOF
19460
19461 fi
19462
19463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines UTMP_FILE" >&5
19464 $as_echo_n "checking if your system defines UTMP_FILE... " >&6; }
19465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19466 /* end confdefs.h.  */
19467
19468 #include <sys/types.h>
19469 #include <utmp.h>
19470 #ifdef HAVE_PATHS_H
19471 #  include <paths.h>
19472 #endif
19473
19474 int
19475 main ()
19476 {
19477  char *utmp = UTMP_FILE;
19478   ;
19479   return 0;
19480 }
19481 _ACEOF
19482 if ac_fn_c_try_compile "$LINENO"; then :
19483    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19484 $as_echo "yes" >&6; }
19485 else
19486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19487 $as_echo "no" >&6; }
19488           system_utmp_path=no
19489
19490 fi
19491 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19492 if test -z "$conf_utmp_location"; then
19493         if test x"$system_utmp_path" = x"no" ; then
19494                 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
19495                         if test -f $f ; then
19496                                 conf_utmp_location=$f
19497                         fi
19498                 done
19499                 if test -z "$conf_utmp_location"; then
19500                         $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
19501
19502                 fi
19503         fi
19504 fi
19505 if test -n "$conf_utmp_location"; then
19506
19507 cat >>confdefs.h <<_ACEOF
19508 #define CONF_UTMP_FILE "$conf_utmp_location"
19509 _ACEOF
19510
19511 fi
19512
19513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMP_FILE" >&5
19514 $as_echo_n "checking if your system defines WTMP_FILE... " >&6; }
19515 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19516 /* end confdefs.h.  */
19517
19518 #include <sys/types.h>
19519 #include <utmp.h>
19520 #ifdef HAVE_PATHS_H
19521 #  include <paths.h>
19522 #endif
19523
19524 int
19525 main ()
19526 {
19527  char *wtmp = WTMP_FILE;
19528   ;
19529   return 0;
19530 }
19531 _ACEOF
19532 if ac_fn_c_try_compile "$LINENO"; then :
19533    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19534 $as_echo "yes" >&6; }
19535 else
19536    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19537 $as_echo "no" >&6; }
19538           system_wtmp_path=no
19539
19540 fi
19541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19542 if test -z "$conf_wtmp_location"; then
19543         if test x"$system_wtmp_path" = x"no" ; then
19544                 for f in /usr/adm/wtmp /var/log/wtmp; do
19545                         if test -f $f ; then
19546                                 conf_wtmp_location=$f
19547                         fi
19548                 done
19549                 if test -z "$conf_wtmp_location"; then
19550                         $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
19551
19552                 fi
19553         fi
19554 fi
19555 if test -n "$conf_wtmp_location"; then
19556
19557 cat >>confdefs.h <<_ACEOF
19558 #define CONF_WTMP_FILE "$conf_wtmp_location"
19559 _ACEOF
19560
19561 fi
19562
19563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMPX_FILE" >&5
19564 $as_echo_n "checking if your system defines WTMPX_FILE... " >&6; }
19565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19566 /* end confdefs.h.  */
19567
19568 #include <sys/types.h>
19569 #include <utmp.h>
19570 #ifdef HAVE_UTMPX_H
19571 #include <utmpx.h>
19572 #endif
19573 #ifdef HAVE_PATHS_H
19574 #  include <paths.h>
19575 #endif
19576
19577 int
19578 main ()
19579 {
19580  char *wtmpx = WTMPX_FILE;
19581   ;
19582   return 0;
19583 }
19584 _ACEOF
19585 if ac_fn_c_try_compile "$LINENO"; then :
19586    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19587 $as_echo "yes" >&6; }
19588 else
19589    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19590 $as_echo "no" >&6; }
19591           system_wtmpx_path=no
19592
19593 fi
19594 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19595 if test -z "$conf_wtmpx_location"; then
19596         if test x"$system_wtmpx_path" = x"no" ; then
19597                 $as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
19598
19599         fi
19600 else
19601
19602 cat >>confdefs.h <<_ACEOF
19603 #define CONF_WTMPX_FILE "$conf_wtmpx_location"
19604 _ACEOF
19605
19606 fi
19607
19608
19609 if test ! -z "$blibpath" ; then
19610         LDFLAGS="$LDFLAGS $blibflags$blibpath"
19611         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&5
19612 $as_echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;}
19613 fi
19614
19615 ac_fn_c_check_member "$LINENO" "struct lastlog" "ll_line" "ac_cv_member_struct_lastlog_ll_line" "
19616 #ifdef HAVE_SYS_TYPES_H
19617 #include <sys/types.h>
19618 #endif
19619 #ifdef HAVE_UTMP_H
19620 #include <utmp.h>
19621 #endif
19622 #ifdef HAVE_UTMPX_H
19623 #include <utmpx.h>
19624 #endif
19625 #ifdef HAVE_LASTLOG_H
19626 #include <lastlog.h>
19627 #endif
19628
19629 "
19630 if test "x$ac_cv_member_struct_lastlog_ll_line" = xyes; then :
19631
19632 else
19633
19634     if test x$SKIP_DISABLE_LASTLOG_DEFINE != "xyes" ; then
19635         $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
19636
19637     fi
19638
19639 fi
19640
19641
19642 ac_fn_c_check_member "$LINENO" "struct utmp" "ut_line" "ac_cv_member_struct_utmp_ut_line" "
19643 #ifdef HAVE_SYS_TYPES_H
19644 #include <sys/types.h>
19645 #endif
19646 #ifdef HAVE_UTMP_H
19647 #include <utmp.h>
19648 #endif
19649 #ifdef HAVE_UTMPX_H
19650 #include <utmpx.h>
19651 #endif
19652 #ifdef HAVE_LASTLOG_H
19653 #include <lastlog.h>
19654 #endif
19655
19656 "
19657 if test "x$ac_cv_member_struct_utmp_ut_line" = xyes; then :
19658
19659 else
19660
19661         $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
19662
19663         $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
19664
19665
19666 fi
19667
19668
19669 CFLAGS="$CFLAGS $werror_flags"
19670
19671 if test "x$ac_cv_func_getaddrinfo" != "xyes" ; then
19672         TEST_SSH_IPV6=no
19673 else
19674         TEST_SSH_IPV6=yes
19675 fi
19676 ac_fn_c_check_decl "$LINENO" "BROKEN_GETADDRINFO" "ac_cv_have_decl_BROKEN_GETADDRINFO" "$ac_includes_default"
19677 if test "x$ac_cv_have_decl_BROKEN_GETADDRINFO" = xyes; then :
19678   TEST_SSH_IPV6=no
19679 fi
19680
19681 TEST_SSH_IPV6=$TEST_SSH_IPV6
19682
19683 TEST_SSH_UTF8=$TEST_SSH_UTF8
19684
19685 TEST_MALLOC_OPTIONS=$TEST_MALLOC_OPTIONS
19686
19687 UNSUPPORTED_ALGORITHMS=$unsupported_algorithms
19688
19689 DEPEND=$(cat $srcdir/.depend)
19690
19691
19692 CFLAGS="${CFLAGS} ${CFLAGS_AFTER}"
19693 LDFLAGS="${LDFLAGS} ${LDFLAGS_AFTER}"
19694
19695
19696 ac_config_files="$ac_config_files Makefile buildpkg.sh opensshd.init openssh.xml openbsd-compat/Makefile openbsd-compat/regress/Makefile survey.sh"
19697
19698 cat >confcache <<\_ACEOF
19699 # This file is a shell script that caches the results of configure
19700 # tests run on this system so they can be shared between configure
19701 # scripts and configure runs, see configure's option --config-cache.
19702 # It is not useful on other systems.  If it contains results you don't
19703 # want to keep, you may remove or edit it.
19704 #
19705 # config.status only pays attention to the cache file if you give it
19706 # the --recheck option to rerun configure.
19707 #
19708 # `ac_cv_env_foo' variables (set or unset) will be overridden when
19709 # loading this file, other *unset* `ac_cv_foo' will be assigned the
19710 # following values.
19711
19712 _ACEOF
19713
19714 # The following way of writing the cache mishandles newlines in values,
19715 # but we know of no workaround that is simple, portable, and efficient.
19716 # So, we kill variables containing newlines.
19717 # Ultrix sh set writes to stderr and can't be redirected directly,
19718 # and sets the high bit in the cache file unless we assign to the vars.
19719 (
19720   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
19721     eval ac_val=\$$ac_var
19722     case $ac_val in #(
19723     *${as_nl}*)
19724       case $ac_var in #(
19725       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19726 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19727       esac
19728       case $ac_var in #(
19729       _ | IFS | as_nl) ;; #(
19730       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19731       *) { eval $ac_var=; unset $ac_var;} ;;
19732       esac ;;
19733     esac
19734   done
19735
19736   (set) 2>&1 |
19737     case $as_nl`(ac_space=' '; set) 2>&1` in #(
19738     *${as_nl}ac_space=\ *)
19739       # `set' does not quote correctly, so add quotes: double-quote
19740       # substitution turns \\\\ into \\, and sed turns \\ into \.
19741       sed -n \
19742         "s/'/'\\\\''/g;
19743           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19744       ;; #(
19745     *)
19746       # `set' quotes correctly as required by POSIX, so do not add quotes.
19747       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19748       ;;
19749     esac |
19750     sort
19751 ) |
19752   sed '
19753      /^ac_cv_env_/b end
19754      t clear
19755      :clear
19756      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19757      t end
19758      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19759      :end' >>confcache
19760 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19761   if test -w "$cache_file"; then
19762     if test "x$cache_file" != "x/dev/null"; then
19763       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19764 $as_echo "$as_me: updating cache $cache_file" >&6;}
19765       if test ! -f "$cache_file" || test -h "$cache_file"; then
19766         cat confcache >"$cache_file"
19767       else
19768         case $cache_file in #(
19769         */* | ?:*)
19770           mv -f confcache "$cache_file"$$ &&
19771           mv -f "$cache_file"$$ "$cache_file" ;; #(
19772         *)
19773           mv -f confcache "$cache_file" ;;
19774         esac
19775       fi
19776     fi
19777   else
19778     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19779 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19780   fi
19781 fi
19782 rm -f confcache
19783
19784 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19785 # Let make expand exec_prefix.
19786 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19787
19788 DEFS=-DHAVE_CONFIG_H
19789
19790 ac_libobjs=
19791 ac_ltlibobjs=
19792 U=
19793 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19794   # 1. Remove the extension, and $U if already installed.
19795   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19796   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19797   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
19798   #    will be set to the directory where LIBOBJS objects are built.
19799   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19800   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19801 done
19802 LIBOBJS=$ac_libobjs
19803
19804 LTLIBOBJS=$ac_ltlibobjs
19805
19806
19807
19808
19809 : "${CONFIG_STATUS=./config.status}"
19810 ac_write_fail=0
19811 ac_clean_files_save=$ac_clean_files
19812 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19813 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19814 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19815 as_write_fail=0
19816 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19817 #! $SHELL
19818 # Generated by $as_me.
19819 # Run this file to recreate the current configuration.
19820 # Compiler output produced by configure, useful for debugging
19821 # configure, is in config.log if it exists.
19822
19823 debug=false
19824 ac_cs_recheck=false
19825 ac_cs_silent=false
19826
19827 SHELL=\${CONFIG_SHELL-$SHELL}
19828 export SHELL
19829 _ASEOF
19830 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19831 ## -------------------- ##
19832 ## M4sh Initialization. ##
19833 ## -------------------- ##
19834
19835 # Be more Bourne compatible
19836 DUALCASE=1; export DUALCASE # for MKS sh
19837 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19838   emulate sh
19839   NULLCMD=:
19840   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19841   # is contrary to our usage.  Disable this feature.
19842   alias -g '${1+"$@"}'='"$@"'
19843   setopt NO_GLOB_SUBST
19844 else
19845   case `(set -o) 2>/dev/null` in #(
19846   *posix*) :
19847     set -o posix ;; #(
19848   *) :
19849      ;;
19850 esac
19851 fi
19852
19853
19854 as_nl='
19855 '
19856 export as_nl
19857 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19858 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19859 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19860 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19861 # Prefer a ksh shell builtin over an external printf program on Solaris,
19862 # but without wasting forks for bash or zsh.
19863 if test -z "$BASH_VERSION$ZSH_VERSION" \
19864     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19865   as_echo='print -r --'
19866   as_echo_n='print -rn --'
19867 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19868   as_echo='printf %s\n'
19869   as_echo_n='printf %s'
19870 else
19871   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19872     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19873     as_echo_n='/usr/ucb/echo -n'
19874   else
19875     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19876     as_echo_n_body='eval
19877       arg=$1;
19878       case $arg in #(
19879       *"$as_nl"*)
19880         expr "X$arg" : "X\\(.*\\)$as_nl";
19881         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19882       esac;
19883       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19884     '
19885     export as_echo_n_body
19886     as_echo_n='sh -c $as_echo_n_body as_echo'
19887   fi
19888   export as_echo_body
19889   as_echo='sh -c $as_echo_body as_echo'
19890 fi
19891
19892 # The user is always right.
19893 if test "${PATH_SEPARATOR+set}" != set; then
19894   PATH_SEPARATOR=:
19895   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19896     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19897       PATH_SEPARATOR=';'
19898   }
19899 fi
19900
19901
19902 # IFS
19903 # We need space, tab and new line, in precisely that order.  Quoting is
19904 # there to prevent editors from complaining about space-tab.
19905 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19906 # splitting by setting IFS to empty value.)
19907 IFS=" ""        $as_nl"
19908
19909 # Find who we are.  Look in the path if we contain no directory separator.
19910 as_myself=
19911 case $0 in #((
19912   *[\\/]* ) as_myself=$0 ;;
19913   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19914 for as_dir in $PATH
19915 do
19916   IFS=$as_save_IFS
19917   test -z "$as_dir" && as_dir=.
19918     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19919   done
19920 IFS=$as_save_IFS
19921
19922      ;;
19923 esac
19924 # We did not find ourselves, most probably we were run as `sh COMMAND'
19925 # in which case we are not to be found in the path.
19926 if test "x$as_myself" = x; then
19927   as_myself=$0
19928 fi
19929 if test ! -f "$as_myself"; then
19930   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19931   exit 1
19932 fi
19933
19934 # Unset variables that we do not need and which cause bugs (e.g. in
19935 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
19936 # suppresses any "Segmentation fault" message there.  '((' could
19937 # trigger a bug in pdksh 5.2.14.
19938 for as_var in BASH_ENV ENV MAIL MAILPATH
19939 do eval test x\${$as_var+set} = xset \
19940   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19941 done
19942 PS1='$ '
19943 PS2='> '
19944 PS4='+ '
19945
19946 # NLS nuisances.
19947 LC_ALL=C
19948 export LC_ALL
19949 LANGUAGE=C
19950 export LANGUAGE
19951
19952 # CDPATH.
19953 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19954
19955
19956 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19957 # ----------------------------------------
19958 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19959 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19960 # script with STATUS, using 1 if that was 0.
19961 as_fn_error ()
19962 {
19963   as_status=$1; test $as_status -eq 0 && as_status=1
19964   if test "$4"; then
19965     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19966     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19967   fi
19968   $as_echo "$as_me: error: $2" >&2
19969   as_fn_exit $as_status
19970 } # as_fn_error
19971
19972
19973 # as_fn_set_status STATUS
19974 # -----------------------
19975 # Set $? to STATUS, without forking.
19976 as_fn_set_status ()
19977 {
19978   return $1
19979 } # as_fn_set_status
19980
19981 # as_fn_exit STATUS
19982 # -----------------
19983 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19984 as_fn_exit ()
19985 {
19986   set +e
19987   as_fn_set_status $1
19988   exit $1
19989 } # as_fn_exit
19990
19991 # as_fn_unset VAR
19992 # ---------------
19993 # Portably unset VAR.
19994 as_fn_unset ()
19995 {
19996   { eval $1=; unset $1;}
19997 }
19998 as_unset=as_fn_unset
19999 # as_fn_append VAR VALUE
20000 # ----------------------
20001 # Append the text in VALUE to the end of the definition contained in VAR. Take
20002 # advantage of any shell optimizations that allow amortized linear growth over
20003 # repeated appends, instead of the typical quadratic growth present in naive
20004 # implementations.
20005 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
20006   eval 'as_fn_append ()
20007   {
20008     eval $1+=\$2
20009   }'
20010 else
20011   as_fn_append ()
20012   {
20013     eval $1=\$$1\$2
20014   }
20015 fi # as_fn_append
20016
20017 # as_fn_arith ARG...
20018 # ------------------
20019 # Perform arithmetic evaluation on the ARGs, and store the result in the
20020 # global $as_val. Take advantage of shells that can avoid forks. The arguments
20021 # must be portable across $(()) and expr.
20022 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
20023   eval 'as_fn_arith ()
20024   {
20025     as_val=$(( $* ))
20026   }'
20027 else
20028   as_fn_arith ()
20029   {
20030     as_val=`expr "$@" || test $? -eq 1`
20031   }
20032 fi # as_fn_arith
20033
20034
20035 if expr a : '\(a\)' >/dev/null 2>&1 &&
20036    test "X`expr 00001 : '.*\(...\)'`" = X001; then
20037   as_expr=expr
20038 else
20039   as_expr=false
20040 fi
20041
20042 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
20043   as_basename=basename
20044 else
20045   as_basename=false
20046 fi
20047
20048 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
20049   as_dirname=dirname
20050 else
20051   as_dirname=false
20052 fi
20053
20054 as_me=`$as_basename -- "$0" ||
20055 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
20056          X"$0" : 'X\(//\)$' \| \
20057          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
20058 $as_echo X/"$0" |
20059     sed '/^.*\/\([^/][^/]*\)\/*$/{
20060             s//\1/
20061             q
20062           }
20063           /^X\/\(\/\/\)$/{
20064             s//\1/
20065             q
20066           }
20067           /^X\/\(\/\).*/{
20068             s//\1/
20069             q
20070           }
20071           s/.*/./; q'`
20072
20073 # Avoid depending upon Character Ranges.
20074 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
20075 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
20076 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
20077 as_cr_digits='0123456789'
20078 as_cr_alnum=$as_cr_Letters$as_cr_digits
20079
20080 ECHO_C= ECHO_N= ECHO_T=
20081 case `echo -n x` in #(((((
20082 -n*)
20083   case `echo 'xy\c'` in
20084   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
20085   xy)  ECHO_C='\c';;
20086   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
20087        ECHO_T=' ';;
20088   esac;;
20089 *)
20090   ECHO_N='-n';;
20091 esac
20092
20093 rm -f conf$$ conf$$.exe conf$$.file
20094 if test -d conf$$.dir; then
20095   rm -f conf$$.dir/conf$$.file
20096 else
20097   rm -f conf$$.dir
20098   mkdir conf$$.dir 2>/dev/null
20099 fi
20100 if (echo >conf$$.file) 2>/dev/null; then
20101   if ln -s conf$$.file conf$$ 2>/dev/null; then
20102     as_ln_s='ln -s'
20103     # ... but there are two gotchas:
20104     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
20105     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
20106     # In both cases, we have to default to `cp -pR'.
20107     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
20108       as_ln_s='cp -pR'
20109   elif ln conf$$.file conf$$ 2>/dev/null; then
20110     as_ln_s=ln
20111   else
20112     as_ln_s='cp -pR'
20113   fi
20114 else
20115   as_ln_s='cp -pR'
20116 fi
20117 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
20118 rmdir conf$$.dir 2>/dev/null
20119
20120
20121 # as_fn_mkdir_p
20122 # -------------
20123 # Create "$as_dir" as a directory, including parents if necessary.
20124 as_fn_mkdir_p ()
20125 {
20126
20127   case $as_dir in #(
20128   -*) as_dir=./$as_dir;;
20129   esac
20130   test -d "$as_dir" || eval $as_mkdir_p || {
20131     as_dirs=
20132     while :; do
20133       case $as_dir in #(
20134       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
20135       *) as_qdir=$as_dir;;
20136       esac
20137       as_dirs="'$as_qdir' $as_dirs"
20138       as_dir=`$as_dirname -- "$as_dir" ||
20139 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20140          X"$as_dir" : 'X\(//\)[^/]' \| \
20141          X"$as_dir" : 'X\(//\)$' \| \
20142          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
20143 $as_echo X"$as_dir" |
20144     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20145             s//\1/
20146             q
20147           }
20148           /^X\(\/\/\)[^/].*/{
20149             s//\1/
20150             q
20151           }
20152           /^X\(\/\/\)$/{
20153             s//\1/
20154             q
20155           }
20156           /^X\(\/\).*/{
20157             s//\1/
20158             q
20159           }
20160           s/.*/./; q'`
20161       test -d "$as_dir" && break
20162     done
20163     test -z "$as_dirs" || eval "mkdir $as_dirs"
20164   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
20165
20166
20167 } # as_fn_mkdir_p
20168 if mkdir -p . 2>/dev/null; then
20169   as_mkdir_p='mkdir -p "$as_dir"'
20170 else
20171   test -d ./-p && rmdir ./-p
20172   as_mkdir_p=false
20173 fi
20174
20175
20176 # as_fn_executable_p FILE
20177 # -----------------------
20178 # Test if FILE is an executable regular file.
20179 as_fn_executable_p ()
20180 {
20181   test -f "$1" && test -x "$1"
20182 } # as_fn_executable_p
20183 as_test_x='test -x'
20184 as_executable_p=as_fn_executable_p
20185
20186 # Sed expression to map a string onto a valid CPP name.
20187 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
20188
20189 # Sed expression to map a string onto a valid variable name.
20190 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
20191
20192
20193 exec 6>&1
20194 ## ----------------------------------- ##
20195 ## Main body of $CONFIG_STATUS script. ##
20196 ## ----------------------------------- ##
20197 _ASEOF
20198 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
20199
20200 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20201 # Save the log message, to keep $0 and so on meaningful, and to
20202 # report actual input values of CONFIG_FILES etc. instead of their
20203 # values after options handling.
20204 ac_log="
20205 This file was extended by OpenSSH $as_me Portable, which was
20206 generated by GNU Autoconf 2.69.  Invocation command line was
20207
20208   CONFIG_FILES    = $CONFIG_FILES
20209   CONFIG_HEADERS  = $CONFIG_HEADERS
20210   CONFIG_LINKS    = $CONFIG_LINKS
20211   CONFIG_COMMANDS = $CONFIG_COMMANDS
20212   $ $0 $@
20213
20214 on `(hostname || uname -n) 2>/dev/null | sed 1q`
20215 "
20216
20217 _ACEOF
20218
20219 case $ac_config_files in *"
20220 "*) set x $ac_config_files; shift; ac_config_files=$*;;
20221 esac
20222
20223 case $ac_config_headers in *"
20224 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
20225 esac
20226
20227
20228 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20229 # Files that config.status was made for.
20230 config_files="$ac_config_files"
20231 config_headers="$ac_config_headers"
20232
20233 _ACEOF
20234
20235 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20236 ac_cs_usage="\
20237 \`$as_me' instantiates files and other configuration actions
20238 from templates according to the current configuration.  Unless the files
20239 and actions are specified as TAGs, all are instantiated by default.
20240
20241 Usage: $0 [OPTION]... [TAG]...
20242
20243   -h, --help       print this help, then exit
20244   -V, --version    print version number and configuration settings, then exit
20245       --config     print configuration, then exit
20246   -q, --quiet, --silent
20247                    do not print progress messages
20248   -d, --debug      don't remove temporary files
20249       --recheck    update $as_me by reconfiguring in the same conditions
20250       --file=FILE[:TEMPLATE]
20251                    instantiate the configuration file FILE
20252       --header=FILE[:TEMPLATE]
20253                    instantiate the configuration header FILE
20254
20255 Configuration files:
20256 $config_files
20257
20258 Configuration headers:
20259 $config_headers
20260
20261 Report bugs to <openssh-unix-dev@mindrot.org>."
20262
20263 _ACEOF
20264 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20265 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
20266 ac_cs_version="\\
20267 OpenSSH config.status Portable
20268 configured by $0, generated by GNU Autoconf 2.69,
20269   with options \\"\$ac_cs_config\\"
20270
20271 Copyright (C) 2012 Free Software Foundation, Inc.
20272 This config.status script is free software; the Free Software Foundation
20273 gives unlimited permission to copy, distribute and modify it."
20274
20275 ac_pwd='$ac_pwd'
20276 srcdir='$srcdir'
20277 INSTALL='$INSTALL'
20278 MKDIR_P='$MKDIR_P'
20279 AWK='$AWK'
20280 test -n "\$AWK" || AWK=awk
20281 _ACEOF
20282
20283 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20284 # The default lists apply if the user does not specify any file.
20285 ac_need_defaults=:
20286 while test $# != 0
20287 do
20288   case $1 in
20289   --*=?*)
20290     ac_option=`expr "X$1" : 'X\([^=]*\)='`
20291     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
20292     ac_shift=:
20293     ;;
20294   --*=)
20295     ac_option=`expr "X$1" : 'X\([^=]*\)='`
20296     ac_optarg=
20297     ac_shift=:
20298     ;;
20299   *)
20300     ac_option=$1
20301     ac_optarg=$2
20302     ac_shift=shift
20303     ;;
20304   esac
20305
20306   case $ac_option in
20307   # Handling of the options.
20308   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
20309     ac_cs_recheck=: ;;
20310   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
20311     $as_echo "$ac_cs_version"; exit ;;
20312   --config | --confi | --conf | --con | --co | --c )
20313     $as_echo "$ac_cs_config"; exit ;;
20314   --debug | --debu | --deb | --de | --d | -d )
20315     debug=: ;;
20316   --file | --fil | --fi | --f )
20317     $ac_shift
20318     case $ac_optarg in
20319     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20320     '') as_fn_error $? "missing file argument" ;;
20321     esac
20322     as_fn_append CONFIG_FILES " '$ac_optarg'"
20323     ac_need_defaults=false;;
20324   --header | --heade | --head | --hea )
20325     $ac_shift
20326     case $ac_optarg in
20327     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
20328     esac
20329     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
20330     ac_need_defaults=false;;
20331   --he | --h)
20332     # Conflict between --help and --header
20333     as_fn_error $? "ambiguous option: \`$1'
20334 Try \`$0 --help' for more information.";;
20335   --help | --hel | -h )
20336     $as_echo "$ac_cs_usage"; exit ;;
20337   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
20338   | -silent | --silent | --silen | --sile | --sil | --si | --s)
20339     ac_cs_silent=: ;;
20340
20341   # This is an error.
20342   -*) as_fn_error $? "unrecognized option: \`$1'
20343 Try \`$0 --help' for more information." ;;
20344
20345   *) as_fn_append ac_config_targets " $1"
20346      ac_need_defaults=false ;;
20347
20348   esac
20349   shift
20350 done
20351
20352 ac_configure_extra_args=
20353
20354 if $ac_cs_silent; then
20355   exec 6>/dev/null
20356   ac_configure_extra_args="$ac_configure_extra_args --silent"
20357 fi
20358
20359 _ACEOF
20360 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20361 if \$ac_cs_recheck; then
20362   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
20363   shift
20364   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
20365   CONFIG_SHELL='$SHELL'
20366   export CONFIG_SHELL
20367   exec "\$@"
20368 fi
20369
20370 _ACEOF
20371 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20372 exec 5>>config.log
20373 {
20374   echo
20375   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
20376 ## Running $as_me. ##
20377 _ASBOX
20378   $as_echo "$ac_log"
20379 } >&5
20380
20381 _ACEOF
20382 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20383 _ACEOF
20384
20385 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20386
20387 # Handling of arguments.
20388 for ac_config_target in $ac_config_targets
20389 do
20390   case $ac_config_target in
20391     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
20392     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
20393     "buildpkg.sh") CONFIG_FILES="$CONFIG_FILES buildpkg.sh" ;;
20394     "opensshd.init") CONFIG_FILES="$CONFIG_FILES opensshd.init" ;;
20395     "openssh.xml") CONFIG_FILES="$CONFIG_FILES openssh.xml" ;;
20396     "openbsd-compat/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;;
20397     "openbsd-compat/regress/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/regress/Makefile" ;;
20398     "survey.sh") CONFIG_FILES="$CONFIG_FILES survey.sh" ;;
20399
20400   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
20401   esac
20402 done
20403
20404
20405 # If the user did not use the arguments to specify the items to instantiate,
20406 # then the envvar interface is used.  Set only those that are not.
20407 # We use the long form for the default assignment because of an extremely
20408 # bizarre bug on SunOS 4.1.3.
20409 if $ac_need_defaults; then
20410   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
20411   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
20412 fi
20413
20414 # Have a temporary directory for convenience.  Make it in the build tree
20415 # simply because there is no reason against having it here, and in addition,
20416 # creating and moving files from /tmp can sometimes cause problems.
20417 # Hook for its removal unless debugging.
20418 # Note that there is a small window in which the directory will not be cleaned:
20419 # after its creation but before its name has been assigned to `$tmp'.
20420 $debug ||
20421 {
20422   tmp= ac_tmp=
20423   trap 'exit_status=$?
20424   : "${ac_tmp:=$tmp}"
20425   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
20426 ' 0
20427   trap 'as_fn_exit 1' 1 2 13 15
20428 }
20429 # Create a (secure) tmp directory for tmp files.
20430
20431 {
20432   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
20433   test -d "$tmp"
20434 }  ||
20435 {
20436   tmp=./conf$$-$RANDOM
20437   (umask 077 && mkdir "$tmp")
20438 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
20439 ac_tmp=$tmp
20440
20441 # Set up the scripts for CONFIG_FILES section.
20442 # No need to generate them if there are no CONFIG_FILES.
20443 # This happens for instance with `./config.status config.h'.
20444 if test -n "$CONFIG_FILES"; then
20445
20446
20447 ac_cr=`echo X | tr X '\015'`
20448 # On cygwin, bash can eat \r inside `` if the user requested igncr.
20449 # But we know of no other shell where ac_cr would be empty at this
20450 # point, so we can use a bashism as a fallback.
20451 if test "x$ac_cr" = x; then
20452   eval ac_cr=\$\'\\r\'
20453 fi
20454 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
20455 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
20456   ac_cs_awk_cr='\\r'
20457 else
20458   ac_cs_awk_cr=$ac_cr
20459 fi
20460
20461 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
20462 _ACEOF
20463
20464
20465 {
20466   echo "cat >conf$$subs.awk <<_ACEOF" &&
20467   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
20468   echo "_ACEOF"
20469 } >conf$$subs.sh ||
20470   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20471 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
20472 ac_delim='%!_!# '
20473 for ac_last_try in false false false false false :; do
20474   . ./conf$$subs.sh ||
20475     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20476
20477   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
20478   if test $ac_delim_n = $ac_delim_num; then
20479     break
20480   elif $ac_last_try; then
20481     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
20482   else
20483     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20484   fi
20485 done
20486 rm -f conf$$subs.sh
20487
20488 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20489 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
20490 _ACEOF
20491 sed -n '
20492 h
20493 s/^/S["/; s/!.*/"]=/
20494 p
20495 g
20496 s/^[^!]*!//
20497 :repl
20498 t repl
20499 s/'"$ac_delim"'$//
20500 t delim
20501 :nl
20502 h
20503 s/\(.\{148\}\)..*/\1/
20504 t more1
20505 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
20506 p
20507 n
20508 b repl
20509 :more1
20510 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20511 p
20512 g
20513 s/.\{148\}//
20514 t nl
20515 :delim
20516 h
20517 s/\(.\{148\}\)..*/\1/
20518 t more2
20519 s/["\\]/\\&/g; s/^/"/; s/$/"/
20520 p
20521 b
20522 :more2
20523 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
20524 p
20525 g
20526 s/.\{148\}//
20527 t delim
20528 ' <conf$$subs.awk | sed '
20529 /^[^""]/{
20530   N
20531   s/\n//
20532 }
20533 ' >>$CONFIG_STATUS || ac_write_fail=1
20534 rm -f conf$$subs.awk
20535 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20536 _ACAWK
20537 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
20538   for (key in S) S_is_set[key] = 1
20539   FS = "\a"
20540
20541 }
20542 {
20543   line = $ 0
20544   nfields = split(line, field, "@")
20545   substed = 0
20546   len = length(field[1])
20547   for (i = 2; i < nfields; i++) {
20548     key = field[i]
20549     keylen = length(key)
20550     if (S_is_set[key]) {
20551       value = S[key]
20552       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
20553       len += length(value) + length(field[++i])
20554       substed = 1
20555     } else
20556       len += 1 + keylen
20557   }
20558
20559   print line
20560 }
20561
20562 _ACAWK
20563 _ACEOF
20564 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20565 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
20566   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
20567 else
20568   cat
20569 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
20570   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
20571 _ACEOF
20572
20573 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
20574 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
20575 # trailing colons and then remove the whole line if VPATH becomes empty
20576 # (actually we leave an empty line to preserve line numbers).
20577 if test "x$srcdir" = x.; then
20578   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
20579 h
20580 s///
20581 s/^/:/
20582 s/[      ]*$/:/
20583 s/:\$(srcdir):/:/g
20584 s/:\${srcdir}:/:/g
20585 s/:@srcdir@:/:/g
20586 s/^:*//
20587 s/:*$//
20588 x
20589 s/\(=[   ]*\).*/\1/
20590 G
20591 s/\n//
20592 s/^[^=]*=[       ]*$//
20593 }'
20594 fi
20595
20596 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20597 fi # test -n "$CONFIG_FILES"
20598
20599 # Set up the scripts for CONFIG_HEADERS section.
20600 # No need to generate them if there are no CONFIG_HEADERS.
20601 # This happens for instance with `./config.status Makefile'.
20602 if test -n "$CONFIG_HEADERS"; then
20603 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
20604 BEGIN {
20605 _ACEOF
20606
20607 # Transform confdefs.h into an awk script `defines.awk', embedded as
20608 # here-document in config.status, that substitutes the proper values into
20609 # config.h.in to produce config.h.
20610
20611 # Create a delimiter string that does not exist in confdefs.h, to ease
20612 # handling of long lines.
20613 ac_delim='%!_!# '
20614 for ac_last_try in false false :; do
20615   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
20616   if test -z "$ac_tt"; then
20617     break
20618   elif $ac_last_try; then
20619     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
20620   else
20621     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
20622   fi
20623 done
20624
20625 # For the awk script, D is an array of macro values keyed by name,
20626 # likewise P contains macro parameters if any.  Preserve backslash
20627 # newline sequences.
20628
20629 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
20630 sed -n '
20631 s/.\{148\}/&'"$ac_delim"'/g
20632 t rset
20633 :rset
20634 s/^[     ]*#[    ]*define[       ][      ]*/ /
20635 t def
20636 d
20637 :def
20638 s/\\$//
20639 t bsnl
20640 s/["\\]/\\&/g
20641 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20642 D["\1"]=" \3"/p
20643 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
20644 d
20645 :bsnl
20646 s/["\\]/\\&/g
20647 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
20648 D["\1"]=" \3\\\\\\n"\\/p
20649 t cont
20650 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
20651 t cont
20652 d
20653 :cont
20654 n
20655 s/.\{148\}/&'"$ac_delim"'/g
20656 t clear
20657 :clear
20658 s/\\$//
20659 t bsnlc
20660 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20661 d
20662 :bsnlc
20663 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20664 b cont
20665 ' <confdefs.h | sed '
20666 s/'"$ac_delim"'/"\\\
20667 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20668
20669 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20670   for (key in D) D_is_set[key] = 1
20671   FS = "\a"
20672 }
20673 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20674   line = \$ 0
20675   split(line, arg, " ")
20676   if (arg[1] == "#") {
20677     defundef = arg[2]
20678     mac1 = arg[3]
20679   } else {
20680     defundef = substr(arg[1], 2)
20681     mac1 = arg[2]
20682   }
20683   split(mac1, mac2, "(") #)
20684   macro = mac2[1]
20685   prefix = substr(line, 1, index(line, defundef) - 1)
20686   if (D_is_set[macro]) {
20687     # Preserve the white space surrounding the "#".
20688     print prefix "define", macro P[macro] D[macro]
20689     next
20690   } else {
20691     # Replace #undef with comments.  This is necessary, for example,
20692     # in the case of _POSIX_SOURCE, which is predefined and required
20693     # on some systems where configure will not decide to define it.
20694     if (defundef == "undef") {
20695       print "/*", prefix defundef, macro, "*/"
20696       next
20697     }
20698   }
20699 }
20700 { print }
20701 _ACAWK
20702 _ACEOF
20703 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20704   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20705 fi # test -n "$CONFIG_HEADERS"
20706
20707
20708 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
20709 shift
20710 for ac_tag
20711 do
20712   case $ac_tag in
20713   :[FHLC]) ac_mode=$ac_tag; continue;;
20714   esac
20715   case $ac_mode$ac_tag in
20716   :[FHL]*:*);;
20717   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20718   :[FH]-) ac_tag=-:-;;
20719   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20720   esac
20721   ac_save_IFS=$IFS
20722   IFS=:
20723   set x $ac_tag
20724   IFS=$ac_save_IFS
20725   shift
20726   ac_file=$1
20727   shift
20728
20729   case $ac_mode in
20730   :L) ac_source=$1;;
20731   :[FH])
20732     ac_file_inputs=
20733     for ac_f
20734     do
20735       case $ac_f in
20736       -) ac_f="$ac_tmp/stdin";;
20737       *) # Look for the file first in the build tree, then in the source tree
20738          # (if the path is not absolute).  The absolute path cannot be DOS-style,
20739          # because $ac_f cannot contain `:'.
20740          test -f "$ac_f" ||
20741            case $ac_f in
20742            [\\/$]*) false;;
20743            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20744            esac ||
20745            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20746       esac
20747       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20748       as_fn_append ac_file_inputs " '$ac_f'"
20749     done
20750
20751     # Let's still pretend it is `configure' which instantiates (i.e., don't
20752     # use $as_me), people would be surprised to read:
20753     #    /* config.h.  Generated by config.status.  */
20754     configure_input='Generated from '`
20755           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20756         `' by configure.'
20757     if test x"$ac_file" != x-; then
20758       configure_input="$ac_file.  $configure_input"
20759       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20760 $as_echo "$as_me: creating $ac_file" >&6;}
20761     fi
20762     # Neutralize special characters interpreted by sed in replacement strings.
20763     case $configure_input in #(
20764     *\&* | *\|* | *\\* )
20765        ac_sed_conf_input=`$as_echo "$configure_input" |
20766        sed 's/[\\\\&|]/\\\\&/g'`;; #(
20767     *) ac_sed_conf_input=$configure_input;;
20768     esac
20769
20770     case $ac_tag in
20771     *:-:* | *:-) cat >"$ac_tmp/stdin" \
20772       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20773     esac
20774     ;;
20775   esac
20776
20777   ac_dir=`$as_dirname -- "$ac_file" ||
20778 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20779          X"$ac_file" : 'X\(//\)[^/]' \| \
20780          X"$ac_file" : 'X\(//\)$' \| \
20781          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20782 $as_echo X"$ac_file" |
20783     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20784             s//\1/
20785             q
20786           }
20787           /^X\(\/\/\)[^/].*/{
20788             s//\1/
20789             q
20790           }
20791           /^X\(\/\/\)$/{
20792             s//\1/
20793             q
20794           }
20795           /^X\(\/\).*/{
20796             s//\1/
20797             q
20798           }
20799           s/.*/./; q'`
20800   as_dir="$ac_dir"; as_fn_mkdir_p
20801   ac_builddir=.
20802
20803 case "$ac_dir" in
20804 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20805 *)
20806   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20807   # A ".." for each directory in $ac_dir_suffix.
20808   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20809   case $ac_top_builddir_sub in
20810   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20811   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20812   esac ;;
20813 esac
20814 ac_abs_top_builddir=$ac_pwd
20815 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20816 # for backward compatibility:
20817 ac_top_builddir=$ac_top_build_prefix
20818
20819 case $srcdir in
20820   .)  # We are building in place.
20821     ac_srcdir=.
20822     ac_top_srcdir=$ac_top_builddir_sub
20823     ac_abs_top_srcdir=$ac_pwd ;;
20824   [\\/]* | ?:[\\/]* )  # Absolute name.
20825     ac_srcdir=$srcdir$ac_dir_suffix;
20826     ac_top_srcdir=$srcdir
20827     ac_abs_top_srcdir=$srcdir ;;
20828   *) # Relative name.
20829     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20830     ac_top_srcdir=$ac_top_build_prefix$srcdir
20831     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20832 esac
20833 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20834
20835
20836   case $ac_mode in
20837   :F)
20838   #
20839   # CONFIG_FILE
20840   #
20841
20842   case $INSTALL in
20843   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20844   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20845   esac
20846   ac_MKDIR_P=$MKDIR_P
20847   case $MKDIR_P in
20848   [\\/$]* | ?:[\\/]* ) ;;
20849   */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
20850   esac
20851 _ACEOF
20852
20853 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20854 # If the template does not know about datarootdir, expand it.
20855 # FIXME: This hack should be removed a few years after 2.60.
20856 ac_datarootdir_hack=; ac_datarootdir_seen=
20857 ac_sed_dataroot='
20858 /datarootdir/ {
20859   p
20860   q
20861 }
20862 /@datadir@/p
20863 /@docdir@/p
20864 /@infodir@/p
20865 /@localedir@/p
20866 /@mandir@/p'
20867 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20868 *datarootdir*) ac_datarootdir_seen=yes;;
20869 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20870   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20871 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20872 _ACEOF
20873 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20874   ac_datarootdir_hack='
20875   s&@datadir@&$datadir&g
20876   s&@docdir@&$docdir&g
20877   s&@infodir@&$infodir&g
20878   s&@localedir@&$localedir&g
20879   s&@mandir@&$mandir&g
20880   s&\\\${datarootdir}&$datarootdir&g' ;;
20881 esac
20882 _ACEOF
20883
20884 # Neutralize VPATH when `$srcdir' = `.'.
20885 # Shell code in configure.ac might set extrasub.
20886 # FIXME: do we really want to maintain this feature?
20887 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20888 ac_sed_extra="$ac_vpsub
20889 $extrasub
20890 _ACEOF
20891 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20892 :t
20893 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20894 s|@configure_input@|$ac_sed_conf_input|;t t
20895 s&@top_builddir@&$ac_top_builddir_sub&;t t
20896 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20897 s&@srcdir@&$ac_srcdir&;t t
20898 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20899 s&@top_srcdir@&$ac_top_srcdir&;t t
20900 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20901 s&@builddir@&$ac_builddir&;t t
20902 s&@abs_builddir@&$ac_abs_builddir&;t t
20903 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20904 s&@INSTALL@&$ac_INSTALL&;t t
20905 s&@MKDIR_P@&$ac_MKDIR_P&;t t
20906 $ac_datarootdir_hack
20907 "
20908 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
20909   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20910
20911 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20912   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20913   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
20914       "$ac_tmp/out"`; test -z "$ac_out"; } &&
20915   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20916 which seems to be undefined.  Please make sure it is defined" >&5
20917 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20918 which seems to be undefined.  Please make sure it is defined" >&2;}
20919
20920   rm -f "$ac_tmp/stdin"
20921   case $ac_file in
20922   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20923   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20924   esac \
20925   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20926  ;;
20927   :H)
20928   #
20929   # CONFIG_HEADER
20930   #
20931   if test x"$ac_file" != x-; then
20932     {
20933       $as_echo "/* $configure_input  */" \
20934       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20935     } >"$ac_tmp/config.h" \
20936       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20937     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20938       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20939 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20940     else
20941       rm -f "$ac_file"
20942       mv "$ac_tmp/config.h" "$ac_file" \
20943         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20944     fi
20945   else
20946     $as_echo "/* $configure_input  */" \
20947       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20948       || as_fn_error $? "could not create -" "$LINENO" 5
20949   fi
20950  ;;
20951
20952
20953   esac
20954
20955 done # for ac_tag
20956
20957
20958 as_fn_exit 0
20959 _ACEOF
20960 ac_clean_files=$ac_clean_files_save
20961
20962 test $ac_write_fail = 0 ||
20963   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20964
20965
20966 # configure is writing to config.log, and then calls config.status.
20967 # config.status does its own redirection, appending to config.log.
20968 # Unfortunately, on DOS this fails, as config.log is still kept open
20969 # by configure, so config.status won't be able to write to it; its
20970 # output is simply discarded.  So we exec the FD to /dev/null,
20971 # effectively closing config.log, so it can be properly (re)opened and
20972 # appended to by config.status.  When coming back to configure, we
20973 # need to make the FD available again.
20974 if test "$no_create" != yes; then
20975   ac_cs_success=:
20976   ac_config_status_args=
20977   test "$silent" = yes &&
20978     ac_config_status_args="$ac_config_status_args --quiet"
20979   exec 5>/dev/null
20980   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20981   exec 5>>config.log
20982   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20983   # would make configure fail if this is the last instruction.
20984   $ac_cs_success || as_fn_exit 1
20985 fi
20986 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20987   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20988 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20989 fi
20990
20991
20992 # Print summary of options
20993
20994 # Someone please show me a better way :)
20995 A=`eval echo ${prefix}` ; A=`eval echo ${A}`
20996 B=`eval echo ${bindir}` ; B=`eval echo ${B}`
20997 C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
20998 D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
20999 E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
21000 F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
21001 G=`eval echo ${piddir}` ; G=`eval echo ${G}`
21002 H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}`
21003 I=`eval echo ${user_path}` ; I=`eval echo ${I}`
21004 J=`eval echo ${superuser_path}` ; J=`eval echo ${J}`
21005
21006 echo ""
21007 echo "OpenSSH has been configured with the following options:"
21008 echo "                     User binaries: $B"
21009 echo "                   System binaries: $C"
21010 echo "               Configuration files: $D"
21011 echo "                   Askpass program: $E"
21012 echo "                      Manual pages: $F"
21013 echo "                          PID file: $G"
21014 echo "  Privilege separation chroot path: $H"
21015 if test "x$external_path_file" = "x/etc/login.conf" ; then
21016 echo "   At runtime, sshd will use the path defined in $external_path_file"
21017 echo "   Make sure the path to scp is present, otherwise scp will not work"
21018 else
21019 echo "            sshd default user PATH: $I"
21020         if test ! -z "$external_path_file"; then
21021 echo "   (If PATH is set in $external_path_file it will be used instead. If"
21022 echo "   used, ensure the path to scp is present, otherwise scp will not work.)"
21023         fi
21024 fi
21025 if test ! -z "$superuser_path" ; then
21026 echo "          sshd superuser user PATH: $J"
21027 fi
21028 echo "                    Manpage format: $MANTYPE"
21029 echo "                       PAM support: $PAM_MSG"
21030 echo "                   OSF SIA support: $SIA_MSG"
21031 echo "                 KerberosV support: $KRB5_MSG"
21032 echo "                   SELinux support: $SELINUX_MSG"
21033 echo "                     S/KEY support: $SKEY_MSG"
21034 echo "              MD5 password support: $MD5_MSG"
21035 echo "                   libedit support: $LIBEDIT_MSG"
21036 echo "                   libldns support: $LDNS_MSG"
21037 echo "  Solaris process contract support: $SPC_MSG"
21038 echo "           Solaris project support: $SP_MSG"
21039 echo "         Solaris privilege support: $SPP_MSG"
21040 echo "       IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
21041 echo "           Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
21042 echo "                  BSD Auth support: $BSD_AUTH_MSG"
21043 echo "              Random number source: $RAND_MSG"
21044 echo "             Privsep sandbox style: $SANDBOX_STYLE"
21045
21046 echo ""
21047
21048 echo "              Host: ${host}"
21049 echo "          Compiler: ${CC}"
21050 echo "    Compiler flags: ${CFLAGS}"
21051 echo "Preprocessor flags: ${CPPFLAGS}"
21052 echo "      Linker flags: ${LDFLAGS}"
21053 echo "         Libraries: ${LIBS}"
21054 if test ! -z "${SSHDLIBS}"; then
21055 echo "         +for sshd: ${SSHDLIBS}"
21056 fi
21057 if test ! -z "${SSHLIBS}"; then
21058 echo "          +for ssh: ${SSHLIBS}"
21059 fi
21060
21061 echo ""
21062
21063 if test "x$MAKE_PACKAGE_SUPPORTED" = "xyes" ; then
21064         echo "SVR4 style packages are supported with \"make package\""
21065         echo ""
21066 fi
21067
21068 if test "x$PAM_MSG" = "xyes" ; then
21069         echo "PAM is enabled. You may need to install a PAM control file "
21070         echo "for sshd, otherwise password authentication may fail. "
21071         echo "Example PAM control files can be found in the contrib/ "
21072         echo "subdirectory"
21073         echo ""
21074 fi
21075
21076 if test ! -z "$NO_PEERCHECK" ; then
21077         echo "WARNING: the operating system that you are using does not"
21078         echo "appear to support getpeereid(), getpeerucred() or the"
21079         echo "SO_PEERCRED getsockopt() option. These facilities are used to"
21080         echo "enforce security checks to prevent unauthorised connections to"
21081         echo "ssh-agent. Their absence increases the risk that a malicious"
21082         echo "user can connect to your agent."
21083         echo ""
21084 fi
21085
21086 if test "$AUDIT_MODULE" = "bsm" ; then
21087         echo "WARNING: BSM audit support is currently considered EXPERIMENTAL."
21088         echo "See the Solaris section in README.platform for details."
21089 fi