]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - crypto/openssh/configure
Now that we have local modifications in configure.ac and configure, run
[FreeBSD/FreeBSD.git] / crypto / openssh / 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 LIBOBJS
628 UNSUPPORTED_ALGORITHMS
629 TEST_MALLOC_OPTIONS
630 TEST_SSH_IPV6
631 piddir
632 user_path
633 mansubdir
634 MANTYPE
635 XAUTH_PATH
636 STRIP_OPT
637 xauth_path
638 PRIVSEP_PATH
639 K5LIBS
640 GSSLIBS
641 KRB5CONF
642 SSHDLIBS
643 SSHLIBS
644 SSH_PRIVSEP_USER
645 COMMENT_OUT_ECC
646 TEST_SSH_ECC
647 LIBEDIT
648 PKGCONFIG
649 LD
650 PATH_PASSWD_PROG
651 LOGIN_PROGRAM_FALLBACK
652 STARTUP_SCRIPT_SHELL
653 MAKE_PACKAGE_SUPPORTED
654 PATH_USERADD_PROG
655 PATH_GROUPADD_PROG
656 MANFMT
657 TEST_SHELL
658 MANDOC
659 NROFF
660 GROFF
661 SH
662 TEST_MINUS_S_SH
663 ENT
664 SED
665 PERL
666 KILL
667 CAT
668 AR
669 INSTALL_DATA
670 INSTALL_SCRIPT
671 INSTALL_PROGRAM
672 RANLIB
673 AWK
674 EGREP
675 GREP
676 CPP
677 host_os
678 host_vendor
679 host_cpu
680 host
681 build_os
682 build_vendor
683 build_cpu
684 build
685 OBJEXT
686 EXEEXT
687 ac_ct_CC
688 CPPFLAGS
689 LDFLAGS
690 CFLAGS
691 CC
692 target_alias
693 host_alias
694 build_alias
695 LIBS
696 ECHO_T
697 ECHO_N
698 ECHO_C
699 DEFS
700 mandir
701 localedir
702 libdir
703 psdir
704 pdfdir
705 dvidir
706 htmldir
707 infodir
708 docdir
709 oldincludedir
710 includedir
711 localstatedir
712 sharedstatedir
713 sysconfdir
714 datadir
715 datarootdir
716 libexecdir
717 sbindir
718 bindir
719 program_transform_name
720 prefix
721 exec_prefix
722 PACKAGE_URL
723 PACKAGE_BUGREPORT
724 PACKAGE_STRING
725 PACKAGE_VERSION
726 PACKAGE_TARNAME
727 PACKAGE_NAME
728 PATH_SEPARATOR
729 SHELL'
730 ac_subst_files=''
731 ac_user_opts='
732 enable_option_checking
733 enable_largefile
734 with_stackprotect
735 with_hardening
736 with_rpath
737 with_cflags
738 with_cppflags
739 with_ldflags
740 with_libs
741 with_Werror
742 with_solaris_contracts
743 with_solaris_projects
744 with_osfsia
745 with_zlib
746 with_zlib_version_check
747 with_skey
748 with_tcp_wrappers
749 with_ldns
750 with_libedit
751 with_audit
752 with_pie
753 with_ssl_dir
754 with_openssl_header_check
755 with_ssl_engine
756 with_prngd_port
757 with_prngd_socket
758 with_pam
759 with_privsep_user
760 with_sandbox
761 with_selinux
762 with_kerberos5
763 with_privsep_path
764 with_xauth
765 enable_strip
766 with_maildir
767 with_mantype
768 with_md5_passwords
769 with_shadow
770 with_ipaddr_display
771 enable_etc_default_login
772 with_default_path
773 with_superuser_path
774 with_4in6
775 with_bsd_auth
776 with_pid_dir
777 enable_lastlog
778 enable_utmp
779 enable_utmpx
780 enable_wtmp
781 enable_wtmpx
782 enable_libutil
783 enable_pututline
784 enable_pututxline
785 with_lastlog
786 '
787       ac_precious_vars='build_alias
788 host_alias
789 target_alias
790 CC
791 CFLAGS
792 LDFLAGS
793 LIBS
794 CPPFLAGS
795 CPP'
796
797
798 # Initialize some variables set by options.
799 ac_init_help=
800 ac_init_version=false
801 ac_unrecognized_opts=
802 ac_unrecognized_sep=
803 # The variables have the same names as the options, with
804 # dashes changed to underlines.
805 cache_file=/dev/null
806 exec_prefix=NONE
807 no_create=
808 no_recursion=
809 prefix=NONE
810 program_prefix=NONE
811 program_suffix=NONE
812 program_transform_name=s,x,x,
813 silent=
814 site=
815 srcdir=
816 verbose=
817 x_includes=NONE
818 x_libraries=NONE
819
820 # Installation directory options.
821 # These are left unexpanded so users can "make install exec_prefix=/foo"
822 # and all the variables that are supposed to be based on exec_prefix
823 # by default will actually change.
824 # Use braces instead of parens because sh, perl, etc. also accept them.
825 # (The list follows the same order as the GNU Coding Standards.)
826 bindir='${exec_prefix}/bin'
827 sbindir='${exec_prefix}/sbin'
828 libexecdir='${exec_prefix}/libexec'
829 datarootdir='${prefix}/share'
830 datadir='${datarootdir}'
831 sysconfdir='${prefix}/etc'
832 sharedstatedir='${prefix}/com'
833 localstatedir='${prefix}/var'
834 includedir='${prefix}/include'
835 oldincludedir='/usr/include'
836 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
837 infodir='${datarootdir}/info'
838 htmldir='${docdir}'
839 dvidir='${docdir}'
840 pdfdir='${docdir}'
841 psdir='${docdir}'
842 libdir='${exec_prefix}/lib'
843 localedir='${datarootdir}/locale'
844 mandir='${datarootdir}/man'
845
846 ac_prev=
847 ac_dashdash=
848 for ac_option
849 do
850   # If the previous option needs an argument, assign it.
851   if test -n "$ac_prev"; then
852     eval $ac_prev=\$ac_option
853     ac_prev=
854     continue
855   fi
856
857   case $ac_option in
858   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
859   *=)   ac_optarg= ;;
860   *)    ac_optarg=yes ;;
861   esac
862
863   # Accept the important Cygnus configure options, so we can diagnose typos.
864
865   case $ac_dashdash$ac_option in
866   --)
867     ac_dashdash=yes ;;
868
869   -bindir | --bindir | --bindi | --bind | --bin | --bi)
870     ac_prev=bindir ;;
871   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
872     bindir=$ac_optarg ;;
873
874   -build | --build | --buil | --bui | --bu)
875     ac_prev=build_alias ;;
876   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
877     build_alias=$ac_optarg ;;
878
879   -cache-file | --cache-file | --cache-fil | --cache-fi \
880   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
881     ac_prev=cache_file ;;
882   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
883   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
884     cache_file=$ac_optarg ;;
885
886   --config-cache | -C)
887     cache_file=config.cache ;;
888
889   -datadir | --datadir | --datadi | --datad)
890     ac_prev=datadir ;;
891   -datadir=* | --datadir=* | --datadi=* | --datad=*)
892     datadir=$ac_optarg ;;
893
894   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
895   | --dataroo | --dataro | --datar)
896     ac_prev=datarootdir ;;
897   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
898   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
899     datarootdir=$ac_optarg ;;
900
901   -disable-* | --disable-*)
902     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
903     # Reject names that are not valid shell variable names.
904     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
905       as_fn_error $? "invalid feature name: $ac_useropt"
906     ac_useropt_orig=$ac_useropt
907     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
908     case $ac_user_opts in
909       *"
910 "enable_$ac_useropt"
911 "*) ;;
912       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
913          ac_unrecognized_sep=', ';;
914     esac
915     eval enable_$ac_useropt=no ;;
916
917   -docdir | --docdir | --docdi | --doc | --do)
918     ac_prev=docdir ;;
919   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
920     docdir=$ac_optarg ;;
921
922   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
923     ac_prev=dvidir ;;
924   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
925     dvidir=$ac_optarg ;;
926
927   -enable-* | --enable-*)
928     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
929     # Reject names that are not valid shell variable names.
930     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
931       as_fn_error $? "invalid feature name: $ac_useropt"
932     ac_useropt_orig=$ac_useropt
933     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
934     case $ac_user_opts in
935       *"
936 "enable_$ac_useropt"
937 "*) ;;
938       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
939          ac_unrecognized_sep=', ';;
940     esac
941     eval enable_$ac_useropt=\$ac_optarg ;;
942
943   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
944   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
945   | --exec | --exe | --ex)
946     ac_prev=exec_prefix ;;
947   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
948   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
949   | --exec=* | --exe=* | --ex=*)
950     exec_prefix=$ac_optarg ;;
951
952   -gas | --gas | --ga | --g)
953     # Obsolete; use --with-gas.
954     with_gas=yes ;;
955
956   -help | --help | --hel | --he | -h)
957     ac_init_help=long ;;
958   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
959     ac_init_help=recursive ;;
960   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
961     ac_init_help=short ;;
962
963   -host | --host | --hos | --ho)
964     ac_prev=host_alias ;;
965   -host=* | --host=* | --hos=* | --ho=*)
966     host_alias=$ac_optarg ;;
967
968   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
969     ac_prev=htmldir ;;
970   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
971   | --ht=*)
972     htmldir=$ac_optarg ;;
973
974   -includedir | --includedir | --includedi | --included | --include \
975   | --includ | --inclu | --incl | --inc)
976     ac_prev=includedir ;;
977   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
978   | --includ=* | --inclu=* | --incl=* | --inc=*)
979     includedir=$ac_optarg ;;
980
981   -infodir | --infodir | --infodi | --infod | --info | --inf)
982     ac_prev=infodir ;;
983   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
984     infodir=$ac_optarg ;;
985
986   -libdir | --libdir | --libdi | --libd)
987     ac_prev=libdir ;;
988   -libdir=* | --libdir=* | --libdi=* | --libd=*)
989     libdir=$ac_optarg ;;
990
991   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
992   | --libexe | --libex | --libe)
993     ac_prev=libexecdir ;;
994   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
995   | --libexe=* | --libex=* | --libe=*)
996     libexecdir=$ac_optarg ;;
997
998   -localedir | --localedir | --localedi | --localed | --locale)
999     ac_prev=localedir ;;
1000   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1001     localedir=$ac_optarg ;;
1002
1003   -localstatedir | --localstatedir | --localstatedi | --localstated \
1004   | --localstate | --localstat | --localsta | --localst | --locals)
1005     ac_prev=localstatedir ;;
1006   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1007   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1008     localstatedir=$ac_optarg ;;
1009
1010   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1011     ac_prev=mandir ;;
1012   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1013     mandir=$ac_optarg ;;
1014
1015   -nfp | --nfp | --nf)
1016     # Obsolete; use --without-fp.
1017     with_fp=no ;;
1018
1019   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1020   | --no-cr | --no-c | -n)
1021     no_create=yes ;;
1022
1023   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1024   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1025     no_recursion=yes ;;
1026
1027   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1028   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1029   | --oldin | --oldi | --old | --ol | --o)
1030     ac_prev=oldincludedir ;;
1031   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1032   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1033   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1034     oldincludedir=$ac_optarg ;;
1035
1036   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1037     ac_prev=prefix ;;
1038   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1039     prefix=$ac_optarg ;;
1040
1041   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1042   | --program-pre | --program-pr | --program-p)
1043     ac_prev=program_prefix ;;
1044   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1045   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1046     program_prefix=$ac_optarg ;;
1047
1048   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1049   | --program-suf | --program-su | --program-s)
1050     ac_prev=program_suffix ;;
1051   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1052   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1053     program_suffix=$ac_optarg ;;
1054
1055   -program-transform-name | --program-transform-name \
1056   | --program-transform-nam | --program-transform-na \
1057   | --program-transform-n | --program-transform- \
1058   | --program-transform | --program-transfor \
1059   | --program-transfo | --program-transf \
1060   | --program-trans | --program-tran \
1061   | --progr-tra | --program-tr | --program-t)
1062     ac_prev=program_transform_name ;;
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     program_transform_name=$ac_optarg ;;
1071
1072   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1073     ac_prev=pdfdir ;;
1074   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1075     pdfdir=$ac_optarg ;;
1076
1077   -psdir | --psdir | --psdi | --psd | --ps)
1078     ac_prev=psdir ;;
1079   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1080     psdir=$ac_optarg ;;
1081
1082   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1083   | -silent | --silent | --silen | --sile | --sil)
1084     silent=yes ;;
1085
1086   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1087     ac_prev=sbindir ;;
1088   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1089   | --sbi=* | --sb=*)
1090     sbindir=$ac_optarg ;;
1091
1092   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1093   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1094   | --sharedst | --shareds | --shared | --share | --shar \
1095   | --sha | --sh)
1096     ac_prev=sharedstatedir ;;
1097   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1098   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1099   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1100   | --sha=* | --sh=*)
1101     sharedstatedir=$ac_optarg ;;
1102
1103   -site | --site | --sit)
1104     ac_prev=site ;;
1105   -site=* | --site=* | --sit=*)
1106     site=$ac_optarg ;;
1107
1108   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1109     ac_prev=srcdir ;;
1110   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1111     srcdir=$ac_optarg ;;
1112
1113   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1114   | --syscon | --sysco | --sysc | --sys | --sy)
1115     ac_prev=sysconfdir ;;
1116   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1117   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1118     sysconfdir=$ac_optarg ;;
1119
1120   -target | --target | --targe | --targ | --tar | --ta | --t)
1121     ac_prev=target_alias ;;
1122   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1123     target_alias=$ac_optarg ;;
1124
1125   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1126     verbose=yes ;;
1127
1128   -version | --version | --versio | --versi | --vers | -V)
1129     ac_init_version=: ;;
1130
1131   -with-* | --with-*)
1132     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1133     # Reject names that are not valid shell variable names.
1134     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1135       as_fn_error $? "invalid package name: $ac_useropt"
1136     ac_useropt_orig=$ac_useropt
1137     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1138     case $ac_user_opts in
1139       *"
1140 "with_$ac_useropt"
1141 "*) ;;
1142       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1143          ac_unrecognized_sep=', ';;
1144     esac
1145     eval with_$ac_useropt=\$ac_optarg ;;
1146
1147   -without-* | --without-*)
1148     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1149     # Reject names that are not valid shell variable names.
1150     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1151       as_fn_error $? "invalid package name: $ac_useropt"
1152     ac_useropt_orig=$ac_useropt
1153     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1154     case $ac_user_opts in
1155       *"
1156 "with_$ac_useropt"
1157 "*) ;;
1158       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1159          ac_unrecognized_sep=', ';;
1160     esac
1161     eval with_$ac_useropt=no ;;
1162
1163   --x)
1164     # Obsolete; use --with-x.
1165     with_x=yes ;;
1166
1167   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1168   | --x-incl | --x-inc | --x-in | --x-i)
1169     ac_prev=x_includes ;;
1170   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1171   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1172     x_includes=$ac_optarg ;;
1173
1174   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1175   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1176     ac_prev=x_libraries ;;
1177   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1178   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1179     x_libraries=$ac_optarg ;;
1180
1181   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1182 Try \`$0 --help' for more information"
1183     ;;
1184
1185   *=*)
1186     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1187     # Reject names that are not valid shell variable names.
1188     case $ac_envvar in #(
1189       '' | [0-9]* | *[!_$as_cr_alnum]* )
1190       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1191     esac
1192     eval $ac_envvar=\$ac_optarg
1193     export $ac_envvar ;;
1194
1195   *)
1196     # FIXME: should be removed in autoconf 3.0.
1197     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1198     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1199       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1200     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1201     ;;
1202
1203   esac
1204 done
1205
1206 if test -n "$ac_prev"; then
1207   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1208   as_fn_error $? "missing argument to $ac_option"
1209 fi
1210
1211 if test -n "$ac_unrecognized_opts"; then
1212   case $enable_option_checking in
1213     no) ;;
1214     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1215     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1216   esac
1217 fi
1218
1219 # Check all directory arguments for consistency.
1220 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1221                 datadir sysconfdir sharedstatedir localstatedir includedir \
1222                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1223                 libdir localedir mandir
1224 do
1225   eval ac_val=\$$ac_var
1226   # Remove trailing slashes.
1227   case $ac_val in
1228     */ )
1229       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1230       eval $ac_var=\$ac_val;;
1231   esac
1232   # Be sure to have absolute directory names.
1233   case $ac_val in
1234     [\\/$]* | ?:[\\/]* )  continue;;
1235     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1236   esac
1237   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1238 done
1239
1240 # There might be people who depend on the old broken behavior: `$host'
1241 # used to hold the argument of --host etc.
1242 # FIXME: To remove some day.
1243 build=$build_alias
1244 host=$host_alias
1245 target=$target_alias
1246
1247 # FIXME: To remove some day.
1248 if test "x$host_alias" != x; then
1249   if test "x$build_alias" = x; then
1250     cross_compiling=maybe
1251   elif test "x$build_alias" != "x$host_alias"; then
1252     cross_compiling=yes
1253   fi
1254 fi
1255
1256 ac_tool_prefix=
1257 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1258
1259 test "$silent" = yes && exec 6>/dev/null
1260
1261
1262 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1263 ac_ls_di=`ls -di .` &&
1264 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1265   as_fn_error $? "working directory cannot be determined"
1266 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1267   as_fn_error $? "pwd does not report name of working directory"
1268
1269
1270 # Find the source files, if location was not specified.
1271 if test -z "$srcdir"; then
1272   ac_srcdir_defaulted=yes
1273   # Try the directory containing this script, then the parent directory.
1274   ac_confdir=`$as_dirname -- "$as_myself" ||
1275 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1276          X"$as_myself" : 'X\(//\)[^/]' \| \
1277          X"$as_myself" : 'X\(//\)$' \| \
1278          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1279 $as_echo X"$as_myself" |
1280     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1281             s//\1/
1282             q
1283           }
1284           /^X\(\/\/\)[^/].*/{
1285             s//\1/
1286             q
1287           }
1288           /^X\(\/\/\)$/{
1289             s//\1/
1290             q
1291           }
1292           /^X\(\/\).*/{
1293             s//\1/
1294             q
1295           }
1296           s/.*/./; q'`
1297   srcdir=$ac_confdir
1298   if test ! -r "$srcdir/$ac_unique_file"; then
1299     srcdir=..
1300   fi
1301 else
1302   ac_srcdir_defaulted=no
1303 fi
1304 if test ! -r "$srcdir/$ac_unique_file"; then
1305   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1306   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1307 fi
1308 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1309 ac_abs_confdir=`(
1310         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1311         pwd)`
1312 # When building in place, set srcdir=.
1313 if test "$ac_abs_confdir" = "$ac_pwd"; then
1314   srcdir=.
1315 fi
1316 # Remove unnecessary trailing slashes from srcdir.
1317 # Double slashes in file names in object file debugging info
1318 # mess up M-x gdb in Emacs.
1319 case $srcdir in
1320 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1321 esac
1322 for ac_var in $ac_precious_vars; do
1323   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1324   eval ac_env_${ac_var}_value=\$${ac_var}
1325   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1326   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1327 done
1328
1329 #
1330 # Report the --help message.
1331 #
1332 if test "$ac_init_help" = "long"; then
1333   # Omit some internal or obsolete options to make the list less imposing.
1334   # This message is too long to be a string in the A/UX 3.1 sh.
1335   cat <<_ACEOF
1336 \`configure' configures OpenSSH Portable to adapt to many kinds of systems.
1337
1338 Usage: $0 [OPTION]... [VAR=VALUE]...
1339
1340 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1341 VAR=VALUE.  See below for descriptions of some of the useful variables.
1342
1343 Defaults for the options are specified in brackets.
1344
1345 Configuration:
1346   -h, --help              display this help and exit
1347       --help=short        display options specific to this package
1348       --help=recursive    display the short help of all the included packages
1349   -V, --version           display version information and exit
1350   -q, --quiet, --silent   do not print \`checking ...' messages
1351       --cache-file=FILE   cache test results in FILE [disabled]
1352   -C, --config-cache      alias for \`--cache-file=config.cache'
1353   -n, --no-create         do not create output files
1354       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1355
1356 Installation directories:
1357   --prefix=PREFIX         install architecture-independent files in PREFIX
1358                           [$ac_default_prefix]
1359   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1360                           [PREFIX]
1361
1362 By default, \`make install' will install all the files in
1363 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1364 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1365 for instance \`--prefix=\$HOME'.
1366
1367 For better control, use the options below.
1368
1369 Fine tuning of the installation directories:
1370   --bindir=DIR            user executables [EPREFIX/bin]
1371   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1372   --libexecdir=DIR        program executables [EPREFIX/libexec]
1373   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1374   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1375   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1376   --libdir=DIR            object code libraries [EPREFIX/lib]
1377   --includedir=DIR        C header files [PREFIX/include]
1378   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1379   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1380   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1381   --infodir=DIR           info documentation [DATAROOTDIR/info]
1382   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1383   --mandir=DIR            man documentation [DATAROOTDIR/man]
1384   --docdir=DIR            documentation root [DATAROOTDIR/doc/openssh]
1385   --htmldir=DIR           html documentation [DOCDIR]
1386   --dvidir=DIR            dvi documentation [DOCDIR]
1387   --pdfdir=DIR            pdf documentation [DOCDIR]
1388   --psdir=DIR             ps documentation [DOCDIR]
1389 _ACEOF
1390
1391   cat <<\_ACEOF
1392
1393 System types:
1394   --build=BUILD     configure for building on BUILD [guessed]
1395   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1396 _ACEOF
1397 fi
1398
1399 if test -n "$ac_init_help"; then
1400   case $ac_init_help in
1401      short | recursive ) echo "Configuration of OpenSSH Portable:";;
1402    esac
1403   cat <<\_ACEOF
1404
1405 Optional Features:
1406   --disable-option-checking  ignore unrecognized --enable/--with options
1407   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1408   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1409   --disable-largefile     omit support for large files
1410   --disable-strip         Disable calling strip(1) on install
1411   --disable-etc-default-login Disable using PATH from /etc/default/login no
1412   --disable-lastlog       disable use of lastlog even if detected no
1413   --disable-utmp          disable use of utmp even if detected no
1414   --disable-utmpx         disable use of utmpx even if detected no
1415   --disable-wtmp          disable use of wtmp even if detected no
1416   --disable-wtmpx         disable use of wtmpx even if detected no
1417   --disable-libutil       disable use of libutil (login() etc.) no
1418   --disable-pututline     disable use of pututline() etc. (uwtmp) no
1419   --disable-pututxline    disable use of pututxline() etc. (uwtmpx) no
1420
1421 Optional Packages:
1422   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1423   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1424   --without-stackprotect  Don't use compiler's stack protection
1425   --without-hardening     Don't use toolchain hardening flags
1426   --without-rpath         Disable auto-added -R linker paths
1427   --with-cflags           Specify additional flags to pass to compiler
1428   --with-cppflags         Specify additional flags to pass to preprocessor
1429   --with-ldflags          Specify additional flags to pass to linker
1430   --with-libs             Specify additional libraries to link with
1431   --with-Werror           Build main code with -Werror
1432   --with-solaris-contracts Enable Solaris process contracts (experimental)
1433   --with-solaris-projects Enable Solaris projects (experimental)
1434   --with-osfsia           Enable Digital Unix SIA
1435   --with-zlib=PATH        Use zlib in PATH
1436   --without-zlib-version-check Disable zlib version check
1437   --with-skey[=PATH]      Enable S/Key support (optionally in PATH)
1438   --with-tcp-wrappers[=PATH] Enable tcpwrappers support (optionally in PATH)
1439   --with-ldns[=PATH]      Use ldns for DNSSEC support (optionally in PATH)
1440   --with-libedit[=PATH]   Enable libedit support for sftp
1441   --with-audit=module     Enable audit support (modules=debug,bsm,linux)
1442   --with-pie           Build Position Independent Executables if possible
1443   --with-ssl-dir=PATH     Specify path to OpenSSL installation
1444   --without-openssl-header-check Disable OpenSSL version consistency check
1445   --with-ssl-engine       Enable OpenSSL (hardware) ENGINE support
1446   --with-prngd-port=PORT  read entropy from PRNGD/EGD TCP localhost:PORT
1447   --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)
1448   --with-pam              Enable PAM support
1449   --with-privsep-user=user Specify non-privileged user for privilege separation
1450   --with-sandbox=style    Specify privilege separation sandbox (no, darwin, rlimit, systrace, seccomp_filter, capsicum)
1451   --with-selinux          Enable SELinux support
1452   --with-kerberos5=PATH   Enable Kerberos 5 support
1453   --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)
1454   --with-xauth=PATH       Specify path to xauth program
1455   --with-maildir=/path/to/mail    Specify your system mail directory
1456   --with-mantype=man|cat|doc  Set man page type
1457   --with-md5-passwords    Enable use of MD5 passwords
1458   --without-shadow        Disable shadow password support
1459   --with-ipaddr-display   Use ip address instead of hostname in \$DISPLAY
1460   --with-default-path=    Specify default \$PATH environment for server
1461   --with-superuser-path=  Specify different path for super-user
1462   --with-4in6             Check for and convert IPv4 in IPv6 mapped addresses
1463   --with-bsd-auth         Enable BSD auth support
1464   --with-pid-dir=PATH     Specify location of ssh.pid file
1465   --with-lastlog=FILE|DIR specify lastlog location common locations
1466
1467 Some influential environment variables:
1468   CC          C compiler command
1469   CFLAGS      C compiler flags
1470   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1471               nonstandard directory <lib dir>
1472   LIBS        libraries to pass to the linker, e.g. -l<library>
1473   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1474               you have headers in a nonstandard directory <include dir>
1475   CPP         C preprocessor
1476
1477 Use these variables to override the choices made by `configure' or to help
1478 it to find libraries and programs with nonstandard names/locations.
1479
1480 Report bugs to <openssh-unix-dev@mindrot.org>.
1481 _ACEOF
1482 ac_status=$?
1483 fi
1484
1485 if test "$ac_init_help" = "recursive"; then
1486   # If there are subdirs, report their specific --help.
1487   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1488     test -d "$ac_dir" ||
1489       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1490       continue
1491     ac_builddir=.
1492
1493 case "$ac_dir" in
1494 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1495 *)
1496   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1497   # A ".." for each directory in $ac_dir_suffix.
1498   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1499   case $ac_top_builddir_sub in
1500   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1501   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1502   esac ;;
1503 esac
1504 ac_abs_top_builddir=$ac_pwd
1505 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1506 # for backward compatibility:
1507 ac_top_builddir=$ac_top_build_prefix
1508
1509 case $srcdir in
1510   .)  # We are building in place.
1511     ac_srcdir=.
1512     ac_top_srcdir=$ac_top_builddir_sub
1513     ac_abs_top_srcdir=$ac_pwd ;;
1514   [\\/]* | ?:[\\/]* )  # Absolute name.
1515     ac_srcdir=$srcdir$ac_dir_suffix;
1516     ac_top_srcdir=$srcdir
1517     ac_abs_top_srcdir=$srcdir ;;
1518   *) # Relative name.
1519     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1520     ac_top_srcdir=$ac_top_build_prefix$srcdir
1521     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1522 esac
1523 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1524
1525     cd "$ac_dir" || { ac_status=$?; continue; }
1526     # Check for guested configure.
1527     if test -f "$ac_srcdir/configure.gnu"; then
1528       echo &&
1529       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1530     elif test -f "$ac_srcdir/configure"; then
1531       echo &&
1532       $SHELL "$ac_srcdir/configure" --help=recursive
1533     else
1534       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1535     fi || ac_status=$?
1536     cd "$ac_pwd" || { ac_status=$?; break; }
1537   done
1538 fi
1539
1540 test -n "$ac_init_help" && exit $ac_status
1541 if $ac_init_version; then
1542   cat <<\_ACEOF
1543 OpenSSH configure Portable
1544 generated by GNU Autoconf 2.69
1545
1546 Copyright (C) 2012 Free Software Foundation, Inc.
1547 This configure script is free software; the Free Software Foundation
1548 gives unlimited permission to copy, distribute and modify it.
1549 _ACEOF
1550   exit
1551 fi
1552
1553 ## ------------------------ ##
1554 ## Autoconf initialization. ##
1555 ## ------------------------ ##
1556
1557 # ac_fn_c_try_compile LINENO
1558 # --------------------------
1559 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1560 ac_fn_c_try_compile ()
1561 {
1562   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1563   rm -f conftest.$ac_objext
1564   if { { ac_try="$ac_compile"
1565 case "(($ac_try" in
1566   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1567   *) ac_try_echo=$ac_try;;
1568 esac
1569 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1570 $as_echo "$ac_try_echo"; } >&5
1571   (eval "$ac_compile") 2>conftest.err
1572   ac_status=$?
1573   if test -s conftest.err; then
1574     grep -v '^ *+' conftest.err >conftest.er1
1575     cat conftest.er1 >&5
1576     mv -f conftest.er1 conftest.err
1577   fi
1578   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1579   test $ac_status = 0; } && {
1580          test -z "$ac_c_werror_flag" ||
1581          test ! -s conftest.err
1582        } && test -s conftest.$ac_objext; then :
1583   ac_retval=0
1584 else
1585   $as_echo "$as_me: failed program was:" >&5
1586 sed 's/^/| /' conftest.$ac_ext >&5
1587
1588         ac_retval=1
1589 fi
1590   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1591   as_fn_set_status $ac_retval
1592
1593 } # ac_fn_c_try_compile
1594
1595 # ac_fn_c_try_run LINENO
1596 # ----------------------
1597 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1598 # that executables *can* be run.
1599 ac_fn_c_try_run ()
1600 {
1601   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1602   if { { ac_try="$ac_link"
1603 case "(($ac_try" in
1604   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1605   *) ac_try_echo=$ac_try;;
1606 esac
1607 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1608 $as_echo "$ac_try_echo"; } >&5
1609   (eval "$ac_link") 2>&5
1610   ac_status=$?
1611   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1612   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1613   { { case "(($ac_try" in
1614   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1615   *) ac_try_echo=$ac_try;;
1616 esac
1617 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1618 $as_echo "$ac_try_echo"; } >&5
1619   (eval "$ac_try") 2>&5
1620   ac_status=$?
1621   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1622   test $ac_status = 0; }; }; then :
1623   ac_retval=0
1624 else
1625   $as_echo "$as_me: program exited with status $ac_status" >&5
1626        $as_echo "$as_me: failed program was:" >&5
1627 sed 's/^/| /' conftest.$ac_ext >&5
1628
1629        ac_retval=$ac_status
1630 fi
1631   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1632   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1633   as_fn_set_status $ac_retval
1634
1635 } # ac_fn_c_try_run
1636
1637 # ac_fn_c_try_cpp LINENO
1638 # ----------------------
1639 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1640 ac_fn_c_try_cpp ()
1641 {
1642   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1643   if { { ac_try="$ac_cpp conftest.$ac_ext"
1644 case "(($ac_try" in
1645   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1646   *) ac_try_echo=$ac_try;;
1647 esac
1648 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1649 $as_echo "$ac_try_echo"; } >&5
1650   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1651   ac_status=$?
1652   if test -s conftest.err; then
1653     grep -v '^ *+' conftest.err >conftest.er1
1654     cat conftest.er1 >&5
1655     mv -f conftest.er1 conftest.err
1656   fi
1657   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1658   test $ac_status = 0; } > conftest.i && {
1659          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1660          test ! -s conftest.err
1661        }; then :
1662   ac_retval=0
1663 else
1664   $as_echo "$as_me: failed program was:" >&5
1665 sed 's/^/| /' conftest.$ac_ext >&5
1666
1667     ac_retval=1
1668 fi
1669   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1670   as_fn_set_status $ac_retval
1671
1672 } # ac_fn_c_try_cpp
1673
1674 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1675 # -------------------------------------------------------
1676 # Tests whether HEADER exists and can be compiled using the include files in
1677 # INCLUDES, setting the cache variable VAR accordingly.
1678 ac_fn_c_check_header_compile ()
1679 {
1680   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1681   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1682 $as_echo_n "checking for $2... " >&6; }
1683 if eval \${$3+:} false; then :
1684   $as_echo_n "(cached) " >&6
1685 else
1686   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1687 /* end confdefs.h.  */
1688 $4
1689 #include <$2>
1690 _ACEOF
1691 if ac_fn_c_try_compile "$LINENO"; then :
1692   eval "$3=yes"
1693 else
1694   eval "$3=no"
1695 fi
1696 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1697 fi
1698 eval ac_res=\$$3
1699                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1700 $as_echo "$ac_res" >&6; }
1701   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1702
1703 } # ac_fn_c_check_header_compile
1704
1705 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1706 # ---------------------------------------------
1707 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1708 # accordingly.
1709 ac_fn_c_check_decl ()
1710 {
1711   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1712   as_decl_name=`echo $2|sed 's/ *(.*//'`
1713   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1714   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1715 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1716 if eval \${$3+:} false; then :
1717   $as_echo_n "(cached) " >&6
1718 else
1719   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1720 /* end confdefs.h.  */
1721 $4
1722 int
1723 main ()
1724 {
1725 #ifndef $as_decl_name
1726 #ifdef __cplusplus
1727   (void) $as_decl_use;
1728 #else
1729   (void) $as_decl_name;
1730 #endif
1731 #endif
1732
1733   ;
1734   return 0;
1735 }
1736 _ACEOF
1737 if ac_fn_c_try_compile "$LINENO"; then :
1738   eval "$3=yes"
1739 else
1740   eval "$3=no"
1741 fi
1742 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1743 fi
1744 eval ac_res=\$$3
1745                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1746 $as_echo "$ac_res" >&6; }
1747   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1748
1749 } # ac_fn_c_check_decl
1750
1751 # ac_fn_c_try_link LINENO
1752 # -----------------------
1753 # Try to link conftest.$ac_ext, and return whether this succeeded.
1754 ac_fn_c_try_link ()
1755 {
1756   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1757   rm -f conftest.$ac_objext conftest$ac_exeext
1758   if { { ac_try="$ac_link"
1759 case "(($ac_try" in
1760   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1761   *) ac_try_echo=$ac_try;;
1762 esac
1763 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1764 $as_echo "$ac_try_echo"; } >&5
1765   (eval "$ac_link") 2>conftest.err
1766   ac_status=$?
1767   if test -s conftest.err; then
1768     grep -v '^ *+' conftest.err >conftest.er1
1769     cat conftest.er1 >&5
1770     mv -f conftest.er1 conftest.err
1771   fi
1772   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1773   test $ac_status = 0; } && {
1774          test -z "$ac_c_werror_flag" ||
1775          test ! -s conftest.err
1776        } && test -s conftest$ac_exeext && {
1777          test "$cross_compiling" = yes ||
1778          test -x conftest$ac_exeext
1779        }; then :
1780   ac_retval=0
1781 else
1782   $as_echo "$as_me: failed program was:" >&5
1783 sed 's/^/| /' conftest.$ac_ext >&5
1784
1785         ac_retval=1
1786 fi
1787   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1788   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1789   # interfere with the next link command; also delete a directory that is
1790   # left behind by Apple's compiler.  We do this before executing the actions.
1791   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1792   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1793   as_fn_set_status $ac_retval
1794
1795 } # ac_fn_c_try_link
1796
1797 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1798 # -------------------------------------------------------
1799 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1800 # the include files in INCLUDES and setting the cache variable VAR
1801 # accordingly.
1802 ac_fn_c_check_header_mongrel ()
1803 {
1804   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1805   if eval \${$3+:} false; then :
1806   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1807 $as_echo_n "checking for $2... " >&6; }
1808 if eval \${$3+:} false; then :
1809   $as_echo_n "(cached) " >&6
1810 fi
1811 eval ac_res=\$$3
1812                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1813 $as_echo "$ac_res" >&6; }
1814 else
1815   # Is the header compilable?
1816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1817 $as_echo_n "checking $2 usability... " >&6; }
1818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1819 /* end confdefs.h.  */
1820 $4
1821 #include <$2>
1822 _ACEOF
1823 if ac_fn_c_try_compile "$LINENO"; then :
1824   ac_header_compiler=yes
1825 else
1826   ac_header_compiler=no
1827 fi
1828 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1830 $as_echo "$ac_header_compiler" >&6; }
1831
1832 # Is the header present?
1833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1834 $as_echo_n "checking $2 presence... " >&6; }
1835 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1836 /* end confdefs.h.  */
1837 #include <$2>
1838 _ACEOF
1839 if ac_fn_c_try_cpp "$LINENO"; then :
1840   ac_header_preproc=yes
1841 else
1842   ac_header_preproc=no
1843 fi
1844 rm -f conftest.err conftest.i conftest.$ac_ext
1845 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1846 $as_echo "$ac_header_preproc" >&6; }
1847
1848 # So?  What about this header?
1849 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1850   yes:no: )
1851     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1852 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1853     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1854 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1855     ;;
1856   no:yes:* )
1857     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1858 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1859     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1860 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1861     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1862 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1863     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1864 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1865     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1866 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1867 ( $as_echo "## ------------------------------------------- ##
1868 ## Report this to openssh-unix-dev@mindrot.org ##
1869 ## ------------------------------------------- ##"
1870      ) | sed "s/^/$as_me: WARNING:     /" >&2
1871     ;;
1872 esac
1873   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1874 $as_echo_n "checking for $2... " >&6; }
1875 if eval \${$3+:} false; then :
1876   $as_echo_n "(cached) " >&6
1877 else
1878   eval "$3=\$ac_header_compiler"
1879 fi
1880 eval ac_res=\$$3
1881                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1882 $as_echo "$ac_res" >&6; }
1883 fi
1884   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1885
1886 } # ac_fn_c_check_header_mongrel
1887
1888 # ac_fn_c_check_func LINENO FUNC VAR
1889 # ----------------------------------
1890 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1891 ac_fn_c_check_func ()
1892 {
1893   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1894   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1895 $as_echo_n "checking for $2... " >&6; }
1896 if eval \${$3+:} false; then :
1897   $as_echo_n "(cached) " >&6
1898 else
1899   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1900 /* end confdefs.h.  */
1901 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1902    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1903 #define $2 innocuous_$2
1904
1905 /* System header to define __stub macros and hopefully few prototypes,
1906     which can conflict with char $2 (); below.
1907     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1908     <limits.h> exists even on freestanding compilers.  */
1909
1910 #ifdef __STDC__
1911 # include <limits.h>
1912 #else
1913 # include <assert.h>
1914 #endif
1915
1916 #undef $2
1917
1918 /* Override any GCC internal prototype to avoid an error.
1919    Use char because int might match the return type of a GCC
1920    builtin and then its argument prototype would still apply.  */
1921 #ifdef __cplusplus
1922 extern "C"
1923 #endif
1924 char $2 ();
1925 /* The GNU C library defines this for functions which it implements
1926     to always fail with ENOSYS.  Some functions are actually named
1927     something starting with __ and the normal name is an alias.  */
1928 #if defined __stub_$2 || defined __stub___$2
1929 choke me
1930 #endif
1931
1932 int
1933 main ()
1934 {
1935 return $2 ();
1936   ;
1937   return 0;
1938 }
1939 _ACEOF
1940 if ac_fn_c_try_link "$LINENO"; then :
1941   eval "$3=yes"
1942 else
1943   eval "$3=no"
1944 fi
1945 rm -f core conftest.err conftest.$ac_objext \
1946     conftest$ac_exeext conftest.$ac_ext
1947 fi
1948 eval ac_res=\$$3
1949                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1950 $as_echo "$ac_res" >&6; }
1951   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1952
1953 } # ac_fn_c_check_func
1954
1955 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1956 # -------------------------------------------
1957 # Tests whether TYPE exists after having included INCLUDES, setting cache
1958 # variable VAR accordingly.
1959 ac_fn_c_check_type ()
1960 {
1961   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1962   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1963 $as_echo_n "checking for $2... " >&6; }
1964 if eval \${$3+:} false; then :
1965   $as_echo_n "(cached) " >&6
1966 else
1967   eval "$3=no"
1968   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1969 /* end confdefs.h.  */
1970 $4
1971 int
1972 main ()
1973 {
1974 if (sizeof ($2))
1975          return 0;
1976   ;
1977   return 0;
1978 }
1979 _ACEOF
1980 if ac_fn_c_try_compile "$LINENO"; then :
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
1995 else
1996   eval "$3=yes"
1997 fi
1998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1999 fi
2000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2001 fi
2002 eval ac_res=\$$3
2003                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2004 $as_echo "$ac_res" >&6; }
2005   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2006
2007 } # ac_fn_c_check_type
2008
2009 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2010 # --------------------------------------------
2011 # Tries to find the compile-time value of EXPR in a program that includes
2012 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2013 # computed
2014 ac_fn_c_compute_int ()
2015 {
2016   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2017   if test "$cross_compiling" = yes; then
2018     # Depending upon the size, compute the lo and hi bounds.
2019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2020 /* end confdefs.h.  */
2021 $4
2022 int
2023 main ()
2024 {
2025 static int test_array [1 - 2 * !(($2) >= 0)];
2026 test_array [0] = 0;
2027 return test_array [0];
2028
2029   ;
2030   return 0;
2031 }
2032 _ACEOF
2033 if ac_fn_c_try_compile "$LINENO"; then :
2034   ac_lo=0 ac_mid=0
2035   while :; do
2036     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2037 /* end confdefs.h.  */
2038 $4
2039 int
2040 main ()
2041 {
2042 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2043 test_array [0] = 0;
2044 return test_array [0];
2045
2046   ;
2047   return 0;
2048 }
2049 _ACEOF
2050 if ac_fn_c_try_compile "$LINENO"; then :
2051   ac_hi=$ac_mid; break
2052 else
2053   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2054                         if test $ac_lo -le $ac_mid; then
2055                           ac_lo= ac_hi=
2056                           break
2057                         fi
2058                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2059 fi
2060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2061   done
2062 else
2063   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2064 /* end confdefs.h.  */
2065 $4
2066 int
2067 main ()
2068 {
2069 static int test_array [1 - 2 * !(($2) < 0)];
2070 test_array [0] = 0;
2071 return test_array [0];
2072
2073   ;
2074   return 0;
2075 }
2076 _ACEOF
2077 if ac_fn_c_try_compile "$LINENO"; then :
2078   ac_hi=-1 ac_mid=-1
2079   while :; do
2080     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2081 /* end confdefs.h.  */
2082 $4
2083 int
2084 main ()
2085 {
2086 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2087 test_array [0] = 0;
2088 return test_array [0];
2089
2090   ;
2091   return 0;
2092 }
2093 _ACEOF
2094 if ac_fn_c_try_compile "$LINENO"; then :
2095   ac_lo=$ac_mid; break
2096 else
2097   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2098                         if test $ac_mid -le $ac_hi; then
2099                           ac_lo= ac_hi=
2100                           break
2101                         fi
2102                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2103 fi
2104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2105   done
2106 else
2107   ac_lo= ac_hi=
2108 fi
2109 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2110 fi
2111 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2112 # Binary search between lo and hi bounds.
2113 while test "x$ac_lo" != "x$ac_hi"; do
2114   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2115   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2116 /* end confdefs.h.  */
2117 $4
2118 int
2119 main ()
2120 {
2121 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2122 test_array [0] = 0;
2123 return test_array [0];
2124
2125   ;
2126   return 0;
2127 }
2128 _ACEOF
2129 if ac_fn_c_try_compile "$LINENO"; then :
2130   ac_hi=$ac_mid
2131 else
2132   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2133 fi
2134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2135 done
2136 case $ac_lo in #((
2137 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2138 '') ac_retval=1 ;;
2139 esac
2140   else
2141     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2142 /* end confdefs.h.  */
2143 $4
2144 static long int longval () { return $2; }
2145 static unsigned long int ulongval () { return $2; }
2146 #include <stdio.h>
2147 #include <stdlib.h>
2148 int
2149 main ()
2150 {
2151
2152   FILE *f = fopen ("conftest.val", "w");
2153   if (! f)
2154     return 1;
2155   if (($2) < 0)
2156     {
2157       long int i = longval ();
2158       if (i != ($2))
2159         return 1;
2160       fprintf (f, "%ld", i);
2161     }
2162   else
2163     {
2164       unsigned long int i = ulongval ();
2165       if (i != ($2))
2166         return 1;
2167       fprintf (f, "%lu", i);
2168     }
2169   /* Do not output a trailing newline, as this causes \r\n confusion
2170      on some platforms.  */
2171   return ferror (f) || fclose (f) != 0;
2172
2173   ;
2174   return 0;
2175 }
2176 _ACEOF
2177 if ac_fn_c_try_run "$LINENO"; then :
2178   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2179 else
2180   ac_retval=1
2181 fi
2182 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2183   conftest.$ac_objext conftest.beam conftest.$ac_ext
2184 rm -f conftest.val
2185
2186   fi
2187   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2188   as_fn_set_status $ac_retval
2189
2190 } # ac_fn_c_compute_int
2191
2192 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2193 # ----------------------------------------------------
2194 # Tries to find if the field MEMBER exists in type AGGR, after including
2195 # INCLUDES, setting cache variable VAR accordingly.
2196 ac_fn_c_check_member ()
2197 {
2198   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2199   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2200 $as_echo_n "checking for $2.$3... " >&6; }
2201 if eval \${$4+:} false; then :
2202   $as_echo_n "(cached) " >&6
2203 else
2204   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2205 /* end confdefs.h.  */
2206 $5
2207 int
2208 main ()
2209 {
2210 static $2 ac_aggr;
2211 if (ac_aggr.$3)
2212 return 0;
2213   ;
2214   return 0;
2215 }
2216 _ACEOF
2217 if ac_fn_c_try_compile "$LINENO"; then :
2218   eval "$4=yes"
2219 else
2220   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2221 /* end confdefs.h.  */
2222 $5
2223 int
2224 main ()
2225 {
2226 static $2 ac_aggr;
2227 if (sizeof ac_aggr.$3)
2228 return 0;
2229   ;
2230   return 0;
2231 }
2232 _ACEOF
2233 if ac_fn_c_try_compile "$LINENO"; then :
2234   eval "$4=yes"
2235 else
2236   eval "$4=no"
2237 fi
2238 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2239 fi
2240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2241 fi
2242 eval ac_res=\$$4
2243                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2244 $as_echo "$ac_res" >&6; }
2245   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2246
2247 } # ac_fn_c_check_member
2248 cat >config.log <<_ACEOF
2249 This file contains any messages produced by compilers while
2250 running configure, to aid debugging if configure makes a mistake.
2251
2252 It was created by OpenSSH $as_me Portable, which was
2253 generated by GNU Autoconf 2.69.  Invocation command line was
2254
2255   $ $0 $@
2256
2257 _ACEOF
2258 exec 5>>config.log
2259 {
2260 cat <<_ASUNAME
2261 ## --------- ##
2262 ## Platform. ##
2263 ## --------- ##
2264
2265 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2266 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2267 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2268 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2269 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2270
2271 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2272 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2273
2274 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2275 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2276 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2277 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2278 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2279 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2280 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2281
2282 _ASUNAME
2283
2284 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2285 for as_dir in $PATH
2286 do
2287   IFS=$as_save_IFS
2288   test -z "$as_dir" && as_dir=.
2289     $as_echo "PATH: $as_dir"
2290   done
2291 IFS=$as_save_IFS
2292
2293 } >&5
2294
2295 cat >&5 <<_ACEOF
2296
2297
2298 ## ----------- ##
2299 ## Core tests. ##
2300 ## ----------- ##
2301
2302 _ACEOF
2303
2304
2305 # Keep a trace of the command line.
2306 # Strip out --no-create and --no-recursion so they do not pile up.
2307 # Strip out --silent because we don't want to record it for future runs.
2308 # Also quote any args containing shell meta-characters.
2309 # Make two passes to allow for proper duplicate-argument suppression.
2310 ac_configure_args=
2311 ac_configure_args0=
2312 ac_configure_args1=
2313 ac_must_keep_next=false
2314 for ac_pass in 1 2
2315 do
2316   for ac_arg
2317   do
2318     case $ac_arg in
2319     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2320     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2321     | -silent | --silent | --silen | --sile | --sil)
2322       continue ;;
2323     *\'*)
2324       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2325     esac
2326     case $ac_pass in
2327     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2328     2)
2329       as_fn_append ac_configure_args1 " '$ac_arg'"
2330       if test $ac_must_keep_next = true; then
2331         ac_must_keep_next=false # Got value, back to normal.
2332       else
2333         case $ac_arg in
2334           *=* | --config-cache | -C | -disable-* | --disable-* \
2335           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2336           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2337           | -with-* | --with-* | -without-* | --without-* | --x)
2338             case "$ac_configure_args0 " in
2339               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2340             esac
2341             ;;
2342           -* ) ac_must_keep_next=true ;;
2343         esac
2344       fi
2345       as_fn_append ac_configure_args " '$ac_arg'"
2346       ;;
2347     esac
2348   done
2349 done
2350 { ac_configure_args0=; unset ac_configure_args0;}
2351 { ac_configure_args1=; unset ac_configure_args1;}
2352
2353 # When interrupted or exit'd, cleanup temporary files, and complete
2354 # config.log.  We remove comments because anyway the quotes in there
2355 # would cause problems or look ugly.
2356 # WARNING: Use '\'' to represent an apostrophe within the trap.
2357 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2358 trap 'exit_status=$?
2359   # Save into config.log some information that might help in debugging.
2360   {
2361     echo
2362
2363     $as_echo "## ---------------- ##
2364 ## Cache variables. ##
2365 ## ---------------- ##"
2366     echo
2367     # The following way of writing the cache mishandles newlines in values,
2368 (
2369   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2370     eval ac_val=\$$ac_var
2371     case $ac_val in #(
2372     *${as_nl}*)
2373       case $ac_var in #(
2374       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2375 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2376       esac
2377       case $ac_var in #(
2378       _ | IFS | as_nl) ;; #(
2379       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2380       *) { eval $ac_var=; unset $ac_var;} ;;
2381       esac ;;
2382     esac
2383   done
2384   (set) 2>&1 |
2385     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2386     *${as_nl}ac_space=\ *)
2387       sed -n \
2388         "s/'\''/'\''\\\\'\'''\''/g;
2389           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2390       ;; #(
2391     *)
2392       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2393       ;;
2394     esac |
2395     sort
2396 )
2397     echo
2398
2399     $as_echo "## ----------------- ##
2400 ## Output variables. ##
2401 ## ----------------- ##"
2402     echo
2403     for ac_var in $ac_subst_vars
2404     do
2405       eval ac_val=\$$ac_var
2406       case $ac_val in
2407       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2408       esac
2409       $as_echo "$ac_var='\''$ac_val'\''"
2410     done | sort
2411     echo
2412
2413     if test -n "$ac_subst_files"; then
2414       $as_echo "## ------------------- ##
2415 ## File substitutions. ##
2416 ## ------------------- ##"
2417       echo
2418       for ac_var in $ac_subst_files
2419       do
2420         eval ac_val=\$$ac_var
2421         case $ac_val in
2422         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2423         esac
2424         $as_echo "$ac_var='\''$ac_val'\''"
2425       done | sort
2426       echo
2427     fi
2428
2429     if test -s confdefs.h; then
2430       $as_echo "## ----------- ##
2431 ## confdefs.h. ##
2432 ## ----------- ##"
2433       echo
2434       cat confdefs.h
2435       echo
2436     fi
2437     test "$ac_signal" != 0 &&
2438       $as_echo "$as_me: caught signal $ac_signal"
2439     $as_echo "$as_me: exit $exit_status"
2440   } >&5
2441   rm -f core *.core core.conftest.* &&
2442     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2443     exit $exit_status
2444 ' 0
2445 for ac_signal in 1 2 13 15; do
2446   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2447 done
2448 ac_signal=0
2449
2450 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2451 rm -f -r conftest* confdefs.h
2452
2453 $as_echo "/* confdefs.h */" > confdefs.h
2454
2455 # Predefined preprocessor variables.
2456
2457 cat >>confdefs.h <<_ACEOF
2458 #define PACKAGE_NAME "$PACKAGE_NAME"
2459 _ACEOF
2460
2461 cat >>confdefs.h <<_ACEOF
2462 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2463 _ACEOF
2464
2465 cat >>confdefs.h <<_ACEOF
2466 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2467 _ACEOF
2468
2469 cat >>confdefs.h <<_ACEOF
2470 #define PACKAGE_STRING "$PACKAGE_STRING"
2471 _ACEOF
2472
2473 cat >>confdefs.h <<_ACEOF
2474 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2475 _ACEOF
2476
2477 cat >>confdefs.h <<_ACEOF
2478 #define PACKAGE_URL "$PACKAGE_URL"
2479 _ACEOF
2480
2481
2482 # Let the site file select an alternate cache file if it wants to.
2483 # Prefer an explicitly selected file to automatically selected ones.
2484 ac_site_file1=NONE
2485 ac_site_file2=NONE
2486 if test -n "$CONFIG_SITE"; then
2487   # We do not want a PATH search for config.site.
2488   case $CONFIG_SITE in #((
2489     -*)  ac_site_file1=./$CONFIG_SITE;;
2490     */*) ac_site_file1=$CONFIG_SITE;;
2491     *)   ac_site_file1=./$CONFIG_SITE;;
2492   esac
2493 elif test "x$prefix" != xNONE; then
2494   ac_site_file1=$prefix/share/config.site
2495   ac_site_file2=$prefix/etc/config.site
2496 else
2497   ac_site_file1=$ac_default_prefix/share/config.site
2498   ac_site_file2=$ac_default_prefix/etc/config.site
2499 fi
2500 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2501 do
2502   test "x$ac_site_file" = xNONE && continue
2503   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2504     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2505 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2506     sed 's/^/| /' "$ac_site_file" >&5
2507     . "$ac_site_file" \
2508       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2509 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2510 as_fn_error $? "failed to load site script $ac_site_file
2511 See \`config.log' for more details" "$LINENO" 5; }
2512   fi
2513 done
2514
2515 if test -r "$cache_file"; then
2516   # Some versions of bash will fail to source /dev/null (special files
2517   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2518   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2519     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2520 $as_echo "$as_me: loading cache $cache_file" >&6;}
2521     case $cache_file in
2522       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2523       *)                      . "./$cache_file";;
2524     esac
2525   fi
2526 else
2527   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2528 $as_echo "$as_me: creating cache $cache_file" >&6;}
2529   >$cache_file
2530 fi
2531
2532 # Check that the precious variables saved in the cache have kept the same
2533 # value.
2534 ac_cache_corrupted=false
2535 for ac_var in $ac_precious_vars; do
2536   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2537   eval ac_new_set=\$ac_env_${ac_var}_set
2538   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2539   eval ac_new_val=\$ac_env_${ac_var}_value
2540   case $ac_old_set,$ac_new_set in
2541     set,)
2542       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2543 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2544       ac_cache_corrupted=: ;;
2545     ,set)
2546       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2547 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2548       ac_cache_corrupted=: ;;
2549     ,);;
2550     *)
2551       if test "x$ac_old_val" != "x$ac_new_val"; then
2552         # differences in whitespace do not lead to failure.
2553         ac_old_val_w=`echo x $ac_old_val`
2554         ac_new_val_w=`echo x $ac_new_val`
2555         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2556           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2557 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2558           ac_cache_corrupted=:
2559         else
2560           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2561 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2562           eval $ac_var=\$ac_old_val
2563         fi
2564         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2565 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2566         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2567 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2568       fi;;
2569   esac
2570   # Pass precious variables to config.status.
2571   if test "$ac_new_set" = set; then
2572     case $ac_new_val in
2573     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2574     *) ac_arg=$ac_var=$ac_new_val ;;
2575     esac
2576     case " $ac_configure_args " in
2577       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2578       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2579     esac
2580   fi
2581 done
2582 if $ac_cache_corrupted; then
2583   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2584 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2585   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2586 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2587   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2588 fi
2589 ## -------------------- ##
2590 ## Main body of script. ##
2591 ## -------------------- ##
2592
2593 ac_ext=c
2594 ac_cpp='$CPP $CPPFLAGS'
2595 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2596 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2597 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2598
2599
2600
2601
2602 ac_ext=c
2603 ac_cpp='$CPP $CPPFLAGS'
2604 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2605 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2606 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2607
2608
2609 ac_config_headers="$ac_config_headers config.h"
2610
2611 ac_ext=c
2612 ac_cpp='$CPP $CPPFLAGS'
2613 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2614 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2615 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2616 if test -n "$ac_tool_prefix"; then
2617   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2618 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2620 $as_echo_n "checking for $ac_word... " >&6; }
2621 if ${ac_cv_prog_CC+:} false; then :
2622   $as_echo_n "(cached) " >&6
2623 else
2624   if test -n "$CC"; then
2625   ac_cv_prog_CC="$CC" # Let the user override the test.
2626 else
2627 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2628 for as_dir in $PATH
2629 do
2630   IFS=$as_save_IFS
2631   test -z "$as_dir" && as_dir=.
2632     for ac_exec_ext in '' $ac_executable_extensions; do
2633   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2634     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2635     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2636     break 2
2637   fi
2638 done
2639   done
2640 IFS=$as_save_IFS
2641
2642 fi
2643 fi
2644 CC=$ac_cv_prog_CC
2645 if test -n "$CC"; then
2646   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2647 $as_echo "$CC" >&6; }
2648 else
2649   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2650 $as_echo "no" >&6; }
2651 fi
2652
2653
2654 fi
2655 if test -z "$ac_cv_prog_CC"; then
2656   ac_ct_CC=$CC
2657   # Extract the first word of "gcc", so it can be a program name with args.
2658 set dummy gcc; ac_word=$2
2659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2660 $as_echo_n "checking for $ac_word... " >&6; }
2661 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2662   $as_echo_n "(cached) " >&6
2663 else
2664   if test -n "$ac_ct_CC"; then
2665   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2666 else
2667 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2668 for as_dir in $PATH
2669 do
2670   IFS=$as_save_IFS
2671   test -z "$as_dir" && as_dir=.
2672     for ac_exec_ext in '' $ac_executable_extensions; do
2673   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2674     ac_cv_prog_ac_ct_CC="gcc"
2675     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2676     break 2
2677   fi
2678 done
2679   done
2680 IFS=$as_save_IFS
2681
2682 fi
2683 fi
2684 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2685 if test -n "$ac_ct_CC"; then
2686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2687 $as_echo "$ac_ct_CC" >&6; }
2688 else
2689   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2690 $as_echo "no" >&6; }
2691 fi
2692
2693   if test "x$ac_ct_CC" = x; then
2694     CC=""
2695   else
2696     case $cross_compiling:$ac_tool_warned in
2697 yes:)
2698 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2699 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2700 ac_tool_warned=yes ;;
2701 esac
2702     CC=$ac_ct_CC
2703   fi
2704 else
2705   CC="$ac_cv_prog_CC"
2706 fi
2707
2708 if test -z "$CC"; then
2709           if test -n "$ac_tool_prefix"; then
2710     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2711 set dummy ${ac_tool_prefix}cc; ac_word=$2
2712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2713 $as_echo_n "checking for $ac_word... " >&6; }
2714 if ${ac_cv_prog_CC+:} false; then :
2715   $as_echo_n "(cached) " >&6
2716 else
2717   if test -n "$CC"; then
2718   ac_cv_prog_CC="$CC" # Let the user override the test.
2719 else
2720 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2721 for as_dir in $PATH
2722 do
2723   IFS=$as_save_IFS
2724   test -z "$as_dir" && as_dir=.
2725     for ac_exec_ext in '' $ac_executable_extensions; do
2726   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2727     ac_cv_prog_CC="${ac_tool_prefix}cc"
2728     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2729     break 2
2730   fi
2731 done
2732   done
2733 IFS=$as_save_IFS
2734
2735 fi
2736 fi
2737 CC=$ac_cv_prog_CC
2738 if test -n "$CC"; then
2739   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2740 $as_echo "$CC" >&6; }
2741 else
2742   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2743 $as_echo "no" >&6; }
2744 fi
2745
2746
2747   fi
2748 fi
2749 if test -z "$CC"; then
2750   # Extract the first word of "cc", so it can be a program name with args.
2751 set dummy cc; ac_word=$2
2752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2753 $as_echo_n "checking for $ac_word... " >&6; }
2754 if ${ac_cv_prog_CC+:} false; then :
2755   $as_echo_n "(cached) " >&6
2756 else
2757   if test -n "$CC"; then
2758   ac_cv_prog_CC="$CC" # Let the user override the test.
2759 else
2760   ac_prog_rejected=no
2761 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2762 for as_dir in $PATH
2763 do
2764   IFS=$as_save_IFS
2765   test -z "$as_dir" && as_dir=.
2766     for ac_exec_ext in '' $ac_executable_extensions; do
2767   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2768     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2769        ac_prog_rejected=yes
2770        continue
2771      fi
2772     ac_cv_prog_CC="cc"
2773     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2774     break 2
2775   fi
2776 done
2777   done
2778 IFS=$as_save_IFS
2779
2780 if test $ac_prog_rejected = yes; then
2781   # We found a bogon in the path, so make sure we never use it.
2782   set dummy $ac_cv_prog_CC
2783   shift
2784   if test $# != 0; then
2785     # We chose a different compiler from the bogus one.
2786     # However, it has the same basename, so the bogon will be chosen
2787     # first if we set CC to just the basename; use the full file name.
2788     shift
2789     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2790   fi
2791 fi
2792 fi
2793 fi
2794 CC=$ac_cv_prog_CC
2795 if test -n "$CC"; then
2796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2797 $as_echo "$CC" >&6; }
2798 else
2799   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2800 $as_echo "no" >&6; }
2801 fi
2802
2803
2804 fi
2805 if test -z "$CC"; then
2806   if test -n "$ac_tool_prefix"; then
2807   for ac_prog in cl.exe
2808   do
2809     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2810 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2812 $as_echo_n "checking for $ac_word... " >&6; }
2813 if ${ac_cv_prog_CC+:} false; then :
2814   $as_echo_n "(cached) " >&6
2815 else
2816   if test -n "$CC"; then
2817   ac_cv_prog_CC="$CC" # Let the user override the test.
2818 else
2819 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2820 for as_dir in $PATH
2821 do
2822   IFS=$as_save_IFS
2823   test -z "$as_dir" && as_dir=.
2824     for ac_exec_ext in '' $ac_executable_extensions; do
2825   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2826     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2827     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2828     break 2
2829   fi
2830 done
2831   done
2832 IFS=$as_save_IFS
2833
2834 fi
2835 fi
2836 CC=$ac_cv_prog_CC
2837 if test -n "$CC"; then
2838   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2839 $as_echo "$CC" >&6; }
2840 else
2841   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2842 $as_echo "no" >&6; }
2843 fi
2844
2845
2846     test -n "$CC" && break
2847   done
2848 fi
2849 if test -z "$CC"; then
2850   ac_ct_CC=$CC
2851   for ac_prog in cl.exe
2852 do
2853   # Extract the first word of "$ac_prog", so it can be a program name with args.
2854 set dummy $ac_prog; ac_word=$2
2855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2856 $as_echo_n "checking for $ac_word... " >&6; }
2857 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2858   $as_echo_n "(cached) " >&6
2859 else
2860   if test -n "$ac_ct_CC"; then
2861   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2862 else
2863 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2864 for as_dir in $PATH
2865 do
2866   IFS=$as_save_IFS
2867   test -z "$as_dir" && as_dir=.
2868     for ac_exec_ext in '' $ac_executable_extensions; do
2869   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2870     ac_cv_prog_ac_ct_CC="$ac_prog"
2871     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2872     break 2
2873   fi
2874 done
2875   done
2876 IFS=$as_save_IFS
2877
2878 fi
2879 fi
2880 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2881 if test -n "$ac_ct_CC"; then
2882   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2883 $as_echo "$ac_ct_CC" >&6; }
2884 else
2885   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2886 $as_echo "no" >&6; }
2887 fi
2888
2889
2890   test -n "$ac_ct_CC" && break
2891 done
2892
2893   if test "x$ac_ct_CC" = x; then
2894     CC=""
2895   else
2896     case $cross_compiling:$ac_tool_warned in
2897 yes:)
2898 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2899 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2900 ac_tool_warned=yes ;;
2901 esac
2902     CC=$ac_ct_CC
2903   fi
2904 fi
2905
2906 fi
2907
2908
2909 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2910 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2911 as_fn_error $? "no acceptable C compiler found in \$PATH
2912 See \`config.log' for more details" "$LINENO" 5; }
2913
2914 # Provide some information about the compiler.
2915 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2916 set X $ac_compile
2917 ac_compiler=$2
2918 for ac_option in --version -v -V -qversion; do
2919   { { ac_try="$ac_compiler $ac_option >&5"
2920 case "(($ac_try" in
2921   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2922   *) ac_try_echo=$ac_try;;
2923 esac
2924 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2925 $as_echo "$ac_try_echo"; } >&5
2926   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2927   ac_status=$?
2928   if test -s conftest.err; then
2929     sed '10a\
2930 ... rest of stderr output deleted ...
2931          10q' conftest.err >conftest.er1
2932     cat conftest.er1 >&5
2933   fi
2934   rm -f conftest.er1 conftest.err
2935   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2936   test $ac_status = 0; }
2937 done
2938
2939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2940 /* end confdefs.h.  */
2941
2942 int
2943 main ()
2944 {
2945
2946   ;
2947   return 0;
2948 }
2949 _ACEOF
2950 ac_clean_files_save=$ac_clean_files
2951 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2952 # Try to create an executable without -o first, disregard a.out.
2953 # It will help us diagnose broken compilers, and finding out an intuition
2954 # of exeext.
2955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2956 $as_echo_n "checking whether the C compiler works... " >&6; }
2957 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2958
2959 # The possible output files:
2960 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2961
2962 ac_rmfiles=
2963 for ac_file in $ac_files
2964 do
2965   case $ac_file in
2966     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2967     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2968   esac
2969 done
2970 rm -f $ac_rmfiles
2971
2972 if { { ac_try="$ac_link_default"
2973 case "(($ac_try" in
2974   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2975   *) ac_try_echo=$ac_try;;
2976 esac
2977 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2978 $as_echo "$ac_try_echo"; } >&5
2979   (eval "$ac_link_default") 2>&5
2980   ac_status=$?
2981   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2982   test $ac_status = 0; }; then :
2983   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2984 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2985 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2986 # so that the user can short-circuit this test for compilers unknown to
2987 # Autoconf.
2988 for ac_file in $ac_files ''
2989 do
2990   test -f "$ac_file" || continue
2991   case $ac_file in
2992     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2993         ;;
2994     [ab].out )
2995         # We found the default executable, but exeext='' is most
2996         # certainly right.
2997         break;;
2998     *.* )
2999         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3000         then :; else
3001            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3002         fi
3003         # We set ac_cv_exeext here because the later test for it is not
3004         # safe: cross compilers may not add the suffix if given an `-o'
3005         # argument, so we may need to know it at that point already.
3006         # Even if this section looks crufty: it has the advantage of
3007         # actually working.
3008         break;;
3009     * )
3010         break;;
3011   esac
3012 done
3013 test "$ac_cv_exeext" = no && ac_cv_exeext=
3014
3015 else
3016   ac_file=''
3017 fi
3018 if test -z "$ac_file"; then :
3019   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3020 $as_echo "no" >&6; }
3021 $as_echo "$as_me: failed program was:" >&5
3022 sed 's/^/| /' conftest.$ac_ext >&5
3023
3024 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3025 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3026 as_fn_error 77 "C compiler cannot create executables
3027 See \`config.log' for more details" "$LINENO" 5; }
3028 else
3029   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3030 $as_echo "yes" >&6; }
3031 fi
3032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3033 $as_echo_n "checking for C compiler default output file name... " >&6; }
3034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3035 $as_echo "$ac_file" >&6; }
3036 ac_exeext=$ac_cv_exeext
3037
3038 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3039 ac_clean_files=$ac_clean_files_save
3040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3041 $as_echo_n "checking for suffix of executables... " >&6; }
3042 if { { ac_try="$ac_link"
3043 case "(($ac_try" in
3044   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3045   *) ac_try_echo=$ac_try;;
3046 esac
3047 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3048 $as_echo "$ac_try_echo"; } >&5
3049   (eval "$ac_link") 2>&5
3050   ac_status=$?
3051   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3052   test $ac_status = 0; }; then :
3053   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3054 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3055 # work properly (i.e., refer to `conftest.exe'), while it won't with
3056 # `rm'.
3057 for ac_file in conftest.exe conftest conftest.*; do
3058   test -f "$ac_file" || continue
3059   case $ac_file in
3060     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3061     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3062           break;;
3063     * ) break;;
3064   esac
3065 done
3066 else
3067   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3068 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3069 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3070 See \`config.log' for more details" "$LINENO" 5; }
3071 fi
3072 rm -f conftest conftest$ac_cv_exeext
3073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3074 $as_echo "$ac_cv_exeext" >&6; }
3075
3076 rm -f conftest.$ac_ext
3077 EXEEXT=$ac_cv_exeext
3078 ac_exeext=$EXEEXT
3079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3080 /* end confdefs.h.  */
3081 #include <stdio.h>
3082 int
3083 main ()
3084 {
3085 FILE *f = fopen ("conftest.out", "w");
3086  return ferror (f) || fclose (f) != 0;
3087
3088   ;
3089   return 0;
3090 }
3091 _ACEOF
3092 ac_clean_files="$ac_clean_files conftest.out"
3093 # Check that the compiler produces executables we can run.  If not, either
3094 # the compiler is broken, or we cross compile.
3095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3096 $as_echo_n "checking whether we are cross compiling... " >&6; }
3097 if test "$cross_compiling" != yes; then
3098   { { ac_try="$ac_link"
3099 case "(($ac_try" in
3100   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3101   *) ac_try_echo=$ac_try;;
3102 esac
3103 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3104 $as_echo "$ac_try_echo"; } >&5
3105   (eval "$ac_link") 2>&5
3106   ac_status=$?
3107   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3108   test $ac_status = 0; }
3109   if { ac_try='./conftest$ac_cv_exeext'
3110   { { case "(($ac_try" in
3111   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3112   *) ac_try_echo=$ac_try;;
3113 esac
3114 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3115 $as_echo "$ac_try_echo"; } >&5
3116   (eval "$ac_try") 2>&5
3117   ac_status=$?
3118   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3119   test $ac_status = 0; }; }; then
3120     cross_compiling=no
3121   else
3122     if test "$cross_compiling" = maybe; then
3123         cross_compiling=yes
3124     else
3125         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3126 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3127 as_fn_error $? "cannot run C compiled programs.
3128 If you meant to cross compile, use \`--host'.
3129 See \`config.log' for more details" "$LINENO" 5; }
3130     fi
3131   fi
3132 fi
3133 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3134 $as_echo "$cross_compiling" >&6; }
3135
3136 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3137 ac_clean_files=$ac_clean_files_save
3138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3139 $as_echo_n "checking for suffix of object files... " >&6; }
3140 if ${ac_cv_objext+:} false; then :
3141   $as_echo_n "(cached) " >&6
3142 else
3143   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3144 /* end confdefs.h.  */
3145
3146 int
3147 main ()
3148 {
3149
3150   ;
3151   return 0;
3152 }
3153 _ACEOF
3154 rm -f conftest.o conftest.obj
3155 if { { ac_try="$ac_compile"
3156 case "(($ac_try" in
3157   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3158   *) ac_try_echo=$ac_try;;
3159 esac
3160 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3161 $as_echo "$ac_try_echo"; } >&5
3162   (eval "$ac_compile") 2>&5
3163   ac_status=$?
3164   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3165   test $ac_status = 0; }; then :
3166   for ac_file in conftest.o conftest.obj conftest.*; do
3167   test -f "$ac_file" || continue;
3168   case $ac_file in
3169     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3170     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3171        break;;
3172   esac
3173 done
3174 else
3175   $as_echo "$as_me: failed program was:" >&5
3176 sed 's/^/| /' conftest.$ac_ext >&5
3177
3178 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3179 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3180 as_fn_error $? "cannot compute suffix of object files: cannot compile
3181 See \`config.log' for more details" "$LINENO" 5; }
3182 fi
3183 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3184 fi
3185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3186 $as_echo "$ac_cv_objext" >&6; }
3187 OBJEXT=$ac_cv_objext
3188 ac_objext=$OBJEXT
3189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3190 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3191 if ${ac_cv_c_compiler_gnu+:} false; then :
3192   $as_echo_n "(cached) " >&6
3193 else
3194   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3195 /* end confdefs.h.  */
3196
3197 int
3198 main ()
3199 {
3200 #ifndef __GNUC__
3201        choke me
3202 #endif
3203
3204   ;
3205   return 0;
3206 }
3207 _ACEOF
3208 if ac_fn_c_try_compile "$LINENO"; then :
3209   ac_compiler_gnu=yes
3210 else
3211   ac_compiler_gnu=no
3212 fi
3213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3214 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3215
3216 fi
3217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3218 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3219 if test $ac_compiler_gnu = yes; then
3220   GCC=yes
3221 else
3222   GCC=
3223 fi
3224 ac_test_CFLAGS=${CFLAGS+set}
3225 ac_save_CFLAGS=$CFLAGS
3226 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3227 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3228 if ${ac_cv_prog_cc_g+:} false; then :
3229   $as_echo_n "(cached) " >&6
3230 else
3231   ac_save_c_werror_flag=$ac_c_werror_flag
3232    ac_c_werror_flag=yes
3233    ac_cv_prog_cc_g=no
3234    CFLAGS="-g"
3235    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3236 /* end confdefs.h.  */
3237
3238 int
3239 main ()
3240 {
3241
3242   ;
3243   return 0;
3244 }
3245 _ACEOF
3246 if ac_fn_c_try_compile "$LINENO"; then :
3247   ac_cv_prog_cc_g=yes
3248 else
3249   CFLAGS=""
3250       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3251 /* end confdefs.h.  */
3252
3253 int
3254 main ()
3255 {
3256
3257   ;
3258   return 0;
3259 }
3260 _ACEOF
3261 if ac_fn_c_try_compile "$LINENO"; then :
3262
3263 else
3264   ac_c_werror_flag=$ac_save_c_werror_flag
3265          CFLAGS="-g"
3266          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3267 /* end confdefs.h.  */
3268
3269 int
3270 main ()
3271 {
3272
3273   ;
3274   return 0;
3275 }
3276 _ACEOF
3277 if ac_fn_c_try_compile "$LINENO"; then :
3278   ac_cv_prog_cc_g=yes
3279 fi
3280 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3281 fi
3282 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3283 fi
3284 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3285    ac_c_werror_flag=$ac_save_c_werror_flag
3286 fi
3287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3288 $as_echo "$ac_cv_prog_cc_g" >&6; }
3289 if test "$ac_test_CFLAGS" = set; then
3290   CFLAGS=$ac_save_CFLAGS
3291 elif test $ac_cv_prog_cc_g = yes; then
3292   if test "$GCC" = yes; then
3293     CFLAGS="-g -O2"
3294   else
3295     CFLAGS="-g"
3296   fi
3297 else
3298   if test "$GCC" = yes; then
3299     CFLAGS="-O2"
3300   else
3301     CFLAGS=
3302   fi
3303 fi
3304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3305 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3306 if ${ac_cv_prog_cc_c89+:} false; then :
3307   $as_echo_n "(cached) " >&6
3308 else
3309   ac_cv_prog_cc_c89=no
3310 ac_save_CC=$CC
3311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3312 /* end confdefs.h.  */
3313 #include <stdarg.h>
3314 #include <stdio.h>
3315 struct stat;
3316 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3317 struct buf { int x; };
3318 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3319 static char *e (p, i)
3320      char **p;
3321      int i;
3322 {
3323   return p[i];
3324 }
3325 static char *f (char * (*g) (char **, int), char **p, ...)
3326 {
3327   char *s;
3328   va_list v;
3329   va_start (v,p);
3330   s = g (p, va_arg (v,int));
3331   va_end (v);
3332   return s;
3333 }
3334
3335 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3336    function prototypes and stuff, but not '\xHH' hex character constants.
3337    These don't provoke an error unfortunately, instead are silently treated
3338    as 'x'.  The following induces an error, until -std is added to get
3339    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3340    array size at least.  It's necessary to write '\x00'==0 to get something
3341    that's true only with -std.  */
3342 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3343
3344 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3345    inside strings and character constants.  */
3346 #define FOO(x) 'x'
3347 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3348
3349 int test (int i, double x);
3350 struct s1 {int (*f) (int a);};
3351 struct s2 {int (*f) (double a);};
3352 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3353 int argc;
3354 char **argv;
3355 int
3356 main ()
3357 {
3358 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3359   ;
3360   return 0;
3361 }
3362 _ACEOF
3363 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3364         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3365 do
3366   CC="$ac_save_CC $ac_arg"
3367   if ac_fn_c_try_compile "$LINENO"; then :
3368   ac_cv_prog_cc_c89=$ac_arg
3369 fi
3370 rm -f core conftest.err conftest.$ac_objext
3371   test "x$ac_cv_prog_cc_c89" != "xno" && break
3372 done
3373 rm -f conftest.$ac_ext
3374 CC=$ac_save_CC
3375
3376 fi
3377 # AC_CACHE_VAL
3378 case "x$ac_cv_prog_cc_c89" in
3379   x)
3380     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3381 $as_echo "none needed" >&6; } ;;
3382   xno)
3383     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3384 $as_echo "unsupported" >&6; } ;;
3385   *)
3386     CC="$CC $ac_cv_prog_cc_c89"
3387     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3388 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3389 esac
3390 if test "x$ac_cv_prog_cc_c89" != xno; then :
3391
3392 fi
3393
3394 ac_ext=c
3395 ac_cpp='$CPP $CPPFLAGS'
3396 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3397 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3398 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3399
3400 ac_aux_dir=
3401 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3402   if test -f "$ac_dir/install-sh"; then
3403     ac_aux_dir=$ac_dir
3404     ac_install_sh="$ac_aux_dir/install-sh -c"
3405     break
3406   elif test -f "$ac_dir/install.sh"; then
3407     ac_aux_dir=$ac_dir
3408     ac_install_sh="$ac_aux_dir/install.sh -c"
3409     break
3410   elif test -f "$ac_dir/shtool"; then
3411     ac_aux_dir=$ac_dir
3412     ac_install_sh="$ac_aux_dir/shtool install -c"
3413     break
3414   fi
3415 done
3416 if test -z "$ac_aux_dir"; then
3417   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3418 fi
3419
3420 # These three variables are undocumented and unsupported,
3421 # and are intended to be withdrawn in a future Autoconf release.
3422 # They can cause serious problems if a builder's source tree is in a directory
3423 # whose full name contains unusual characters.
3424 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3425 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3426 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3427
3428
3429 # Make sure we can run config.sub.
3430 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3431   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3432
3433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3434 $as_echo_n "checking build system type... " >&6; }
3435 if ${ac_cv_build+:} false; then :
3436   $as_echo_n "(cached) " >&6
3437 else
3438   ac_build_alias=$build_alias
3439 test "x$ac_build_alias" = x &&
3440   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3441 test "x$ac_build_alias" = x &&
3442   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3443 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3444   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3445
3446 fi
3447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3448 $as_echo "$ac_cv_build" >&6; }
3449 case $ac_cv_build in
3450 *-*-*) ;;
3451 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3452 esac
3453 build=$ac_cv_build
3454 ac_save_IFS=$IFS; IFS='-'
3455 set x $ac_cv_build
3456 shift
3457 build_cpu=$1
3458 build_vendor=$2
3459 shift; shift
3460 # Remember, the first character of IFS is used to create $*,
3461 # except with old shells:
3462 build_os=$*
3463 IFS=$ac_save_IFS
3464 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3465
3466
3467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3468 $as_echo_n "checking host system type... " >&6; }
3469 if ${ac_cv_host+:} false; then :
3470   $as_echo_n "(cached) " >&6
3471 else
3472   if test "x$host_alias" = x; then
3473   ac_cv_host=$ac_cv_build
3474 else
3475   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3476     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3477 fi
3478
3479 fi
3480 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3481 $as_echo "$ac_cv_host" >&6; }
3482 case $ac_cv_host in
3483 *-*-*) ;;
3484 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3485 esac
3486 host=$ac_cv_host
3487 ac_save_IFS=$IFS; IFS='-'
3488 set x $ac_cv_host
3489 shift
3490 host_cpu=$1
3491 host_vendor=$2
3492 shift; shift
3493 # Remember, the first character of IFS is used to create $*,
3494 # except with old shells:
3495 host_os=$*
3496 IFS=$ac_save_IFS
3497 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3498
3499
3500
3501 ac_ext=c
3502 ac_cpp='$CPP $CPPFLAGS'
3503 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3504 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3505 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3507 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3508 # On Suns, sometimes $CPP names a directory.
3509 if test -n "$CPP" && test -d "$CPP"; then
3510   CPP=
3511 fi
3512 if test -z "$CPP"; then
3513   if ${ac_cv_prog_CPP+:} false; then :
3514   $as_echo_n "(cached) " >&6
3515 else
3516       # Double quotes because CPP needs to be expanded
3517     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3518     do
3519       ac_preproc_ok=false
3520 for ac_c_preproc_warn_flag in '' yes
3521 do
3522   # Use a header file that comes with gcc, so configuring glibc
3523   # with a fresh cross-compiler works.
3524   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3525   # <limits.h> exists even on freestanding compilers.
3526   # On the NeXT, cc -E runs the code through the compiler's parser,
3527   # not just through cpp. "Syntax error" is here to catch this case.
3528   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3529 /* end confdefs.h.  */
3530 #ifdef __STDC__
3531 # include <limits.h>
3532 #else
3533 # include <assert.h>
3534 #endif
3535                      Syntax error
3536 _ACEOF
3537 if ac_fn_c_try_cpp "$LINENO"; then :
3538
3539 else
3540   # Broken: fails on valid input.
3541 continue
3542 fi
3543 rm -f conftest.err conftest.i conftest.$ac_ext
3544
3545   # OK, works on sane cases.  Now check whether nonexistent headers
3546   # can be detected and how.
3547   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3548 /* end confdefs.h.  */
3549 #include <ac_nonexistent.h>
3550 _ACEOF
3551 if ac_fn_c_try_cpp "$LINENO"; then :
3552   # Broken: success on invalid input.
3553 continue
3554 else
3555   # Passes both tests.
3556 ac_preproc_ok=:
3557 break
3558 fi
3559 rm -f conftest.err conftest.i conftest.$ac_ext
3560
3561 done
3562 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3563 rm -f conftest.i conftest.err conftest.$ac_ext
3564 if $ac_preproc_ok; then :
3565   break
3566 fi
3567
3568     done
3569     ac_cv_prog_CPP=$CPP
3570
3571 fi
3572   CPP=$ac_cv_prog_CPP
3573 else
3574   ac_cv_prog_CPP=$CPP
3575 fi
3576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3577 $as_echo "$CPP" >&6; }
3578 ac_preproc_ok=false
3579 for ac_c_preproc_warn_flag in '' yes
3580 do
3581   # Use a header file that comes with gcc, so configuring glibc
3582   # with a fresh cross-compiler works.
3583   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3584   # <limits.h> exists even on freestanding compilers.
3585   # On the NeXT, cc -E runs the code through the compiler's parser,
3586   # not just through cpp. "Syntax error" is here to catch this case.
3587   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3588 /* end confdefs.h.  */
3589 #ifdef __STDC__
3590 # include <limits.h>
3591 #else
3592 # include <assert.h>
3593 #endif
3594                      Syntax error
3595 _ACEOF
3596 if ac_fn_c_try_cpp "$LINENO"; then :
3597
3598 else
3599   # Broken: fails on valid input.
3600 continue
3601 fi
3602 rm -f conftest.err conftest.i conftest.$ac_ext
3603
3604   # OK, works on sane cases.  Now check whether nonexistent headers
3605   # can be detected and how.
3606   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3607 /* end confdefs.h.  */
3608 #include <ac_nonexistent.h>
3609 _ACEOF
3610 if ac_fn_c_try_cpp "$LINENO"; then :
3611   # Broken: success on invalid input.
3612 continue
3613 else
3614   # Passes both tests.
3615 ac_preproc_ok=:
3616 break
3617 fi
3618 rm -f conftest.err conftest.i conftest.$ac_ext
3619
3620 done
3621 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3622 rm -f conftest.i conftest.err conftest.$ac_ext
3623 if $ac_preproc_ok; then :
3624
3625 else
3626   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3627 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3628 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3629 See \`config.log' for more details" "$LINENO" 5; }
3630 fi
3631
3632 ac_ext=c
3633 ac_cpp='$CPP $CPPFLAGS'
3634 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3635 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3636 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3637
3638
3639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3640 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3641 if ${ac_cv_path_GREP+:} false; then :
3642   $as_echo_n "(cached) " >&6
3643 else
3644   if test -z "$GREP"; then
3645   ac_path_GREP_found=false
3646   # Loop through the user's path and test for each of PROGNAME-LIST
3647   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3648 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3649 do
3650   IFS=$as_save_IFS
3651   test -z "$as_dir" && as_dir=.
3652     for ac_prog in grep ggrep; do
3653     for ac_exec_ext in '' $ac_executable_extensions; do
3654       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3655       as_fn_executable_p "$ac_path_GREP" || continue
3656 # Check for GNU ac_path_GREP and select it if it is found.
3657   # Check for GNU $ac_path_GREP
3658 case `"$ac_path_GREP" --version 2>&1` in
3659 *GNU*)
3660   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3661 *)
3662   ac_count=0
3663   $as_echo_n 0123456789 >"conftest.in"
3664   while :
3665   do
3666     cat "conftest.in" "conftest.in" >"conftest.tmp"
3667     mv "conftest.tmp" "conftest.in"
3668     cp "conftest.in" "conftest.nl"
3669     $as_echo 'GREP' >> "conftest.nl"
3670     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3671     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3672     as_fn_arith $ac_count + 1 && ac_count=$as_val
3673     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3674       # Best one so far, save it but keep looking for a better one
3675       ac_cv_path_GREP="$ac_path_GREP"
3676       ac_path_GREP_max=$ac_count
3677     fi
3678     # 10*(2^10) chars as input seems more than enough
3679     test $ac_count -gt 10 && break
3680   done
3681   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3682 esac
3683
3684       $ac_path_GREP_found && break 3
3685     done
3686   done
3687   done
3688 IFS=$as_save_IFS
3689   if test -z "$ac_cv_path_GREP"; then
3690     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3691   fi
3692 else
3693   ac_cv_path_GREP=$GREP
3694 fi
3695
3696 fi
3697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3698 $as_echo "$ac_cv_path_GREP" >&6; }
3699  GREP="$ac_cv_path_GREP"
3700
3701
3702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3703 $as_echo_n "checking for egrep... " >&6; }
3704 if ${ac_cv_path_EGREP+:} false; then :
3705   $as_echo_n "(cached) " >&6
3706 else
3707   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3708    then ac_cv_path_EGREP="$GREP -E"
3709    else
3710      if test -z "$EGREP"; then
3711   ac_path_EGREP_found=false
3712   # Loop through the user's path and test for each of PROGNAME-LIST
3713   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3714 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3715 do
3716   IFS=$as_save_IFS
3717   test -z "$as_dir" && as_dir=.
3718     for ac_prog in egrep; do
3719     for ac_exec_ext in '' $ac_executable_extensions; do
3720       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3721       as_fn_executable_p "$ac_path_EGREP" || continue
3722 # Check for GNU ac_path_EGREP and select it if it is found.
3723   # Check for GNU $ac_path_EGREP
3724 case `"$ac_path_EGREP" --version 2>&1` in
3725 *GNU*)
3726   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3727 *)
3728   ac_count=0
3729   $as_echo_n 0123456789 >"conftest.in"
3730   while :
3731   do
3732     cat "conftest.in" "conftest.in" >"conftest.tmp"
3733     mv "conftest.tmp" "conftest.in"
3734     cp "conftest.in" "conftest.nl"
3735     $as_echo 'EGREP' >> "conftest.nl"
3736     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3737     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3738     as_fn_arith $ac_count + 1 && ac_count=$as_val
3739     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3740       # Best one so far, save it but keep looking for a better one
3741       ac_cv_path_EGREP="$ac_path_EGREP"
3742       ac_path_EGREP_max=$ac_count
3743     fi
3744     # 10*(2^10) chars as input seems more than enough
3745     test $ac_count -gt 10 && break
3746   done
3747   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3748 esac
3749
3750       $ac_path_EGREP_found && break 3
3751     done
3752   done
3753   done
3754 IFS=$as_save_IFS
3755   if test -z "$ac_cv_path_EGREP"; then
3756     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3757   fi
3758 else
3759   ac_cv_path_EGREP=$EGREP
3760 fi
3761
3762    fi
3763 fi
3764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3765 $as_echo "$ac_cv_path_EGREP" >&6; }
3766  EGREP="$ac_cv_path_EGREP"
3767
3768
3769 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3770 $as_echo_n "checking for ANSI C header files... " >&6; }
3771 if ${ac_cv_header_stdc+:} false; then :
3772   $as_echo_n "(cached) " >&6
3773 else
3774   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3775 /* end confdefs.h.  */
3776 #include <stdlib.h>
3777 #include <stdarg.h>
3778 #include <string.h>
3779 #include <float.h>
3780
3781 int
3782 main ()
3783 {
3784
3785   ;
3786   return 0;
3787 }
3788 _ACEOF
3789 if ac_fn_c_try_compile "$LINENO"; then :
3790   ac_cv_header_stdc=yes
3791 else
3792   ac_cv_header_stdc=no
3793 fi
3794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3795
3796 if test $ac_cv_header_stdc = yes; then
3797   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3798   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3799 /* end confdefs.h.  */
3800 #include <string.h>
3801
3802 _ACEOF
3803 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3804   $EGREP "memchr" >/dev/null 2>&1; then :
3805
3806 else
3807   ac_cv_header_stdc=no
3808 fi
3809 rm -f conftest*
3810
3811 fi
3812
3813 if test $ac_cv_header_stdc = yes; then
3814   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3815   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3816 /* end confdefs.h.  */
3817 #include <stdlib.h>
3818
3819 _ACEOF
3820 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3821   $EGREP "free" >/dev/null 2>&1; then :
3822
3823 else
3824   ac_cv_header_stdc=no
3825 fi
3826 rm -f conftest*
3827
3828 fi
3829
3830 if test $ac_cv_header_stdc = yes; then
3831   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3832   if test "$cross_compiling" = yes; then :
3833   :
3834 else
3835   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3836 /* end confdefs.h.  */
3837 #include <ctype.h>
3838 #include <stdlib.h>
3839 #if ((' ' & 0x0FF) == 0x020)
3840 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3841 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3842 #else
3843 # define ISLOWER(c) \
3844                    (('a' <= (c) && (c) <= 'i') \
3845                      || ('j' <= (c) && (c) <= 'r') \
3846                      || ('s' <= (c) && (c) <= 'z'))
3847 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3848 #endif
3849
3850 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3851 int
3852 main ()
3853 {
3854   int i;
3855   for (i = 0; i < 256; i++)
3856     if (XOR (islower (i), ISLOWER (i))
3857         || toupper (i) != TOUPPER (i))
3858       return 2;
3859   return 0;
3860 }
3861 _ACEOF
3862 if ac_fn_c_try_run "$LINENO"; then :
3863
3864 else
3865   ac_cv_header_stdc=no
3866 fi
3867 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3868   conftest.$ac_objext conftest.beam conftest.$ac_ext
3869 fi
3870
3871 fi
3872 fi
3873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3874 $as_echo "$ac_cv_header_stdc" >&6; }
3875 if test $ac_cv_header_stdc = yes; then
3876
3877 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
3878
3879 fi
3880
3881 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3882 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3883                   inttypes.h stdint.h unistd.h
3884 do :
3885   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3886 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3887 "
3888 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3889   cat >>confdefs.h <<_ACEOF
3890 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3891 _ACEOF
3892
3893 fi
3894
3895 done
3896
3897
3898  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
3899 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
3900 if ${ac_cv_c_bigendian+:} false; then :
3901   $as_echo_n "(cached) " >&6
3902 else
3903   ac_cv_c_bigendian=unknown
3904     # See if we're dealing with a universal compiler.
3905     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3906 /* end confdefs.h.  */
3907 #ifndef __APPLE_CC__
3908                not a universal capable compiler
3909              #endif
3910              typedef int dummy;
3911
3912 _ACEOF
3913 if ac_fn_c_try_compile "$LINENO"; then :
3914
3915         # Check for potential -arch flags.  It is not universal unless
3916         # there are at least two -arch flags with different values.
3917         ac_arch=
3918         ac_prev=
3919         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
3920          if test -n "$ac_prev"; then
3921            case $ac_word in
3922              i?86 | x86_64 | ppc | ppc64)
3923                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
3924                  ac_arch=$ac_word
3925                else
3926                  ac_cv_c_bigendian=universal
3927                  break
3928                fi
3929                ;;
3930            esac
3931            ac_prev=
3932          elif test "x$ac_word" = "x-arch"; then
3933            ac_prev=arch
3934          fi
3935        done
3936 fi
3937 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3938     if test $ac_cv_c_bigendian = unknown; then
3939       # See if sys/param.h defines the BYTE_ORDER macro.
3940       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3941 /* end confdefs.h.  */
3942 #include <sys/types.h>
3943              #include <sys/param.h>
3944
3945 int
3946 main ()
3947 {
3948 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
3949                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
3950                      && LITTLE_ENDIAN)
3951               bogus endian macros
3952              #endif
3953
3954   ;
3955   return 0;
3956 }
3957 _ACEOF
3958 if ac_fn_c_try_compile "$LINENO"; then :
3959   # It does; now see whether it defined to BIG_ENDIAN or not.
3960          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3961 /* end confdefs.h.  */
3962 #include <sys/types.h>
3963                 #include <sys/param.h>
3964
3965 int
3966 main ()
3967 {
3968 #if BYTE_ORDER != BIG_ENDIAN
3969                  not big endian
3970                 #endif
3971
3972   ;
3973   return 0;
3974 }
3975 _ACEOF
3976 if ac_fn_c_try_compile "$LINENO"; then :
3977   ac_cv_c_bigendian=yes
3978 else
3979   ac_cv_c_bigendian=no
3980 fi
3981 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3982 fi
3983 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3984     fi
3985     if test $ac_cv_c_bigendian = unknown; then
3986       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
3987       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3988 /* end confdefs.h.  */
3989 #include <limits.h>
3990
3991 int
3992 main ()
3993 {
3994 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
3995               bogus endian macros
3996              #endif
3997
3998   ;
3999   return 0;
4000 }
4001 _ACEOF
4002 if ac_fn_c_try_compile "$LINENO"; then :
4003   # It does; now see whether it defined to _BIG_ENDIAN or not.
4004          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4005 /* end confdefs.h.  */
4006 #include <limits.h>
4007
4008 int
4009 main ()
4010 {
4011 #ifndef _BIG_ENDIAN
4012                  not big endian
4013                 #endif
4014
4015   ;
4016   return 0;
4017 }
4018 _ACEOF
4019 if ac_fn_c_try_compile "$LINENO"; then :
4020   ac_cv_c_bigendian=yes
4021 else
4022   ac_cv_c_bigendian=no
4023 fi
4024 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4025 fi
4026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4027     fi
4028     if test $ac_cv_c_bigendian = unknown; then
4029       # Compile a test program.
4030       if test "$cross_compiling" = yes; then :
4031   # Try to guess by grepping values from an object file.
4032          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4033 /* end confdefs.h.  */
4034 short int ascii_mm[] =
4035                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4036                 short int ascii_ii[] =
4037                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4038                 int use_ascii (int i) {
4039                   return ascii_mm[i] + ascii_ii[i];
4040                 }
4041                 short int ebcdic_ii[] =
4042                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4043                 short int ebcdic_mm[] =
4044                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4045                 int use_ebcdic (int i) {
4046                   return ebcdic_mm[i] + ebcdic_ii[i];
4047                 }
4048                 extern int foo;
4049
4050 int
4051 main ()
4052 {
4053 return use_ascii (foo) == use_ebcdic (foo);
4054   ;
4055   return 0;
4056 }
4057 _ACEOF
4058 if ac_fn_c_try_compile "$LINENO"; then :
4059   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4060               ac_cv_c_bigendian=yes
4061             fi
4062             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4063               if test "$ac_cv_c_bigendian" = unknown; then
4064                 ac_cv_c_bigendian=no
4065               else
4066                 # finding both strings is unlikely to happen, but who knows?
4067                 ac_cv_c_bigendian=unknown
4068               fi
4069             fi
4070 fi
4071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4072 else
4073   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4074 /* end confdefs.h.  */
4075 $ac_includes_default
4076 int
4077 main ()
4078 {
4079
4080              /* Are we little or big endian?  From Harbison&Steele.  */
4081              union
4082              {
4083                long int l;
4084                char c[sizeof (long int)];
4085              } u;
4086              u.l = 1;
4087              return u.c[sizeof (long int) - 1] == 1;
4088
4089   ;
4090   return 0;
4091 }
4092 _ACEOF
4093 if ac_fn_c_try_run "$LINENO"; then :
4094   ac_cv_c_bigendian=no
4095 else
4096   ac_cv_c_bigendian=yes
4097 fi
4098 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4099   conftest.$ac_objext conftest.beam conftest.$ac_ext
4100 fi
4101
4102     fi
4103 fi
4104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
4105 $as_echo "$ac_cv_c_bigendian" >&6; }
4106  case $ac_cv_c_bigendian in #(
4107    yes)
4108      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
4109 ;; #(
4110    no)
4111       ;; #(
4112    universal)
4113
4114 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
4115
4116      ;; #(
4117    *)
4118      as_fn_error $? "unknown endianness
4119  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
4120  esac
4121
4122
4123 # Checks for programs.
4124 for ac_prog in gawk mawk nawk awk
4125 do
4126   # Extract the first word of "$ac_prog", so it can be a program name with args.
4127 set dummy $ac_prog; ac_word=$2
4128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4129 $as_echo_n "checking for $ac_word... " >&6; }
4130 if ${ac_cv_prog_AWK+:} false; then :
4131   $as_echo_n "(cached) " >&6
4132 else
4133   if test -n "$AWK"; then
4134   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4135 else
4136 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4137 for as_dir in $PATH
4138 do
4139   IFS=$as_save_IFS
4140   test -z "$as_dir" && as_dir=.
4141     for ac_exec_ext in '' $ac_executable_extensions; do
4142   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4143     ac_cv_prog_AWK="$ac_prog"
4144     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4145     break 2
4146   fi
4147 done
4148   done
4149 IFS=$as_save_IFS
4150
4151 fi
4152 fi
4153 AWK=$ac_cv_prog_AWK
4154 if test -n "$AWK"; then
4155   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4156 $as_echo "$AWK" >&6; }
4157 else
4158   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4159 $as_echo "no" >&6; }
4160 fi
4161
4162
4163   test -n "$AWK" && break
4164 done
4165
4166 ac_ext=c
4167 ac_cpp='$CPP $CPPFLAGS'
4168 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4169 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4170 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4172 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4173 # On Suns, sometimes $CPP names a directory.
4174 if test -n "$CPP" && test -d "$CPP"; then
4175   CPP=
4176 fi
4177 if test -z "$CPP"; then
4178   if ${ac_cv_prog_CPP+:} false; then :
4179   $as_echo_n "(cached) " >&6
4180 else
4181       # Double quotes because CPP needs to be expanded
4182     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4183     do
4184       ac_preproc_ok=false
4185 for ac_c_preproc_warn_flag in '' yes
4186 do
4187   # Use a header file that comes with gcc, so configuring glibc
4188   # with a fresh cross-compiler works.
4189   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4190   # <limits.h> exists even on freestanding compilers.
4191   # On the NeXT, cc -E runs the code through the compiler's parser,
4192   # not just through cpp. "Syntax error" is here to catch this case.
4193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4194 /* end confdefs.h.  */
4195 #ifdef __STDC__
4196 # include <limits.h>
4197 #else
4198 # include <assert.h>
4199 #endif
4200                      Syntax error
4201 _ACEOF
4202 if ac_fn_c_try_cpp "$LINENO"; then :
4203
4204 else
4205   # Broken: fails on valid input.
4206 continue
4207 fi
4208 rm -f conftest.err conftest.i conftest.$ac_ext
4209
4210   # OK, works on sane cases.  Now check whether nonexistent headers
4211   # can be detected and how.
4212   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4213 /* end confdefs.h.  */
4214 #include <ac_nonexistent.h>
4215 _ACEOF
4216 if ac_fn_c_try_cpp "$LINENO"; then :
4217   # Broken: success on invalid input.
4218 continue
4219 else
4220   # Passes both tests.
4221 ac_preproc_ok=:
4222 break
4223 fi
4224 rm -f conftest.err conftest.i conftest.$ac_ext
4225
4226 done
4227 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4228 rm -f conftest.i conftest.err conftest.$ac_ext
4229 if $ac_preproc_ok; then :
4230   break
4231 fi
4232
4233     done
4234     ac_cv_prog_CPP=$CPP
4235
4236 fi
4237   CPP=$ac_cv_prog_CPP
4238 else
4239   ac_cv_prog_CPP=$CPP
4240 fi
4241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4242 $as_echo "$CPP" >&6; }
4243 ac_preproc_ok=false
4244 for ac_c_preproc_warn_flag in '' yes
4245 do
4246   # Use a header file that comes with gcc, so configuring glibc
4247   # with a fresh cross-compiler works.
4248   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4249   # <limits.h> exists even on freestanding compilers.
4250   # On the NeXT, cc -E runs the code through the compiler's parser,
4251   # not just through cpp. "Syntax error" is here to catch this case.
4252   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4253 /* end confdefs.h.  */
4254 #ifdef __STDC__
4255 # include <limits.h>
4256 #else
4257 # include <assert.h>
4258 #endif
4259                      Syntax error
4260 _ACEOF
4261 if ac_fn_c_try_cpp "$LINENO"; then :
4262
4263 else
4264   # Broken: fails on valid input.
4265 continue
4266 fi
4267 rm -f conftest.err conftest.i conftest.$ac_ext
4268
4269   # OK, works on sane cases.  Now check whether nonexistent headers
4270   # can be detected and how.
4271   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4272 /* end confdefs.h.  */
4273 #include <ac_nonexistent.h>
4274 _ACEOF
4275 if ac_fn_c_try_cpp "$LINENO"; then :
4276   # Broken: success on invalid input.
4277 continue
4278 else
4279   # Passes both tests.
4280 ac_preproc_ok=:
4281 break
4282 fi
4283 rm -f conftest.err conftest.i conftest.$ac_ext
4284
4285 done
4286 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4287 rm -f conftest.i conftest.err conftest.$ac_ext
4288 if $ac_preproc_ok; then :
4289
4290 else
4291   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4292 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4293 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4294 See \`config.log' for more details" "$LINENO" 5; }
4295 fi
4296
4297 ac_ext=c
4298 ac_cpp='$CPP $CPPFLAGS'
4299 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4300 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4301 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4302
4303 if test -n "$ac_tool_prefix"; then
4304   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4305 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4307 $as_echo_n "checking for $ac_word... " >&6; }
4308 if ${ac_cv_prog_RANLIB+:} false; then :
4309   $as_echo_n "(cached) " >&6
4310 else
4311   if test -n "$RANLIB"; then
4312   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4313 else
4314 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4315 for as_dir in $PATH
4316 do
4317   IFS=$as_save_IFS
4318   test -z "$as_dir" && as_dir=.
4319     for ac_exec_ext in '' $ac_executable_extensions; do
4320   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4321     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4322     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4323     break 2
4324   fi
4325 done
4326   done
4327 IFS=$as_save_IFS
4328
4329 fi
4330 fi
4331 RANLIB=$ac_cv_prog_RANLIB
4332 if test -n "$RANLIB"; then
4333   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4334 $as_echo "$RANLIB" >&6; }
4335 else
4336   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4337 $as_echo "no" >&6; }
4338 fi
4339
4340
4341 fi
4342 if test -z "$ac_cv_prog_RANLIB"; then
4343   ac_ct_RANLIB=$RANLIB
4344   # Extract the first word of "ranlib", so it can be a program name with args.
4345 set dummy ranlib; ac_word=$2
4346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4347 $as_echo_n "checking for $ac_word... " >&6; }
4348 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4349   $as_echo_n "(cached) " >&6
4350 else
4351   if test -n "$ac_ct_RANLIB"; then
4352   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4353 else
4354 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4355 for as_dir in $PATH
4356 do
4357   IFS=$as_save_IFS
4358   test -z "$as_dir" && as_dir=.
4359     for ac_exec_ext in '' $ac_executable_extensions; do
4360   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4361     ac_cv_prog_ac_ct_RANLIB="ranlib"
4362     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4363     break 2
4364   fi
4365 done
4366   done
4367 IFS=$as_save_IFS
4368
4369 fi
4370 fi
4371 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4372 if test -n "$ac_ct_RANLIB"; then
4373   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4374 $as_echo "$ac_ct_RANLIB" >&6; }
4375 else
4376   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4377 $as_echo "no" >&6; }
4378 fi
4379
4380   if test "x$ac_ct_RANLIB" = x; then
4381     RANLIB=":"
4382   else
4383     case $cross_compiling:$ac_tool_warned in
4384 yes:)
4385 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4386 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4387 ac_tool_warned=yes ;;
4388 esac
4389     RANLIB=$ac_ct_RANLIB
4390   fi
4391 else
4392   RANLIB="$ac_cv_prog_RANLIB"
4393 fi
4394
4395 # Find a good install program.  We prefer a C program (faster),
4396 # so one script is as good as another.  But avoid the broken or
4397 # incompatible versions:
4398 # SysV /etc/install, /usr/sbin/install
4399 # SunOS /usr/etc/install
4400 # IRIX /sbin/install
4401 # AIX /bin/install
4402 # AmigaOS /C/install, which installs bootblocks on floppy discs
4403 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4404 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4405 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4406 # OS/2's system install, which has a completely different semantic
4407 # ./install, which can be erroneously created by make from ./install.sh.
4408 # Reject install programs that cannot install multiple files.
4409 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4410 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4411 if test -z "$INSTALL"; then
4412 if ${ac_cv_path_install+:} false; then :
4413   $as_echo_n "(cached) " >&6
4414 else
4415   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4416 for as_dir in $PATH
4417 do
4418   IFS=$as_save_IFS
4419   test -z "$as_dir" && as_dir=.
4420     # Account for people who put trailing slashes in PATH elements.
4421 case $as_dir/ in #((
4422   ./ | .// | /[cC]/* | \
4423   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4424   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4425   /usr/ucb/* ) ;;
4426   *)
4427     # OSF1 and SCO ODT 3.0 have their own names for install.
4428     # Don't use installbsd from OSF since it installs stuff as root
4429     # by default.
4430     for ac_prog in ginstall scoinst install; do
4431       for ac_exec_ext in '' $ac_executable_extensions; do
4432         if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
4433           if test $ac_prog = install &&
4434             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4435             # AIX install.  It has an incompatible calling convention.
4436             :
4437           elif test $ac_prog = install &&
4438             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4439             # program-specific install script used by HP pwplus--don't use.
4440             :
4441           else
4442             rm -rf conftest.one conftest.two conftest.dir
4443             echo one > conftest.one
4444             echo two > conftest.two
4445             mkdir conftest.dir
4446             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4447               test -s conftest.one && test -s conftest.two &&
4448               test -s conftest.dir/conftest.one &&
4449               test -s conftest.dir/conftest.two
4450             then
4451               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4452               break 3
4453             fi
4454           fi
4455         fi
4456       done
4457     done
4458     ;;
4459 esac
4460
4461   done
4462 IFS=$as_save_IFS
4463
4464 rm -rf conftest.one conftest.two conftest.dir
4465
4466 fi
4467   if test "${ac_cv_path_install+set}" = set; then
4468     INSTALL=$ac_cv_path_install
4469   else
4470     # As a last resort, use the slow shell script.  Don't cache a
4471     # value for INSTALL within a source directory, because that will
4472     # break other packages using the cache if that directory is
4473     # removed, or if the value is a relative name.
4474     INSTALL=$ac_install_sh
4475   fi
4476 fi
4477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4478 $as_echo "$INSTALL" >&6; }
4479
4480 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4481 # It thinks the first close brace ends the variable substitution.
4482 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4483
4484 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4485
4486 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4487
4488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4489 $as_echo_n "checking for egrep... " >&6; }
4490 if ${ac_cv_path_EGREP+:} false; then :
4491   $as_echo_n "(cached) " >&6
4492 else
4493   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4494    then ac_cv_path_EGREP="$GREP -E"
4495    else
4496      if test -z "$EGREP"; then
4497   ac_path_EGREP_found=false
4498   # Loop through the user's path and test for each of PROGNAME-LIST
4499   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4500 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4501 do
4502   IFS=$as_save_IFS
4503   test -z "$as_dir" && as_dir=.
4504     for ac_prog in egrep; do
4505     for ac_exec_ext in '' $ac_executable_extensions; do
4506       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4507       as_fn_executable_p "$ac_path_EGREP" || continue
4508 # Check for GNU ac_path_EGREP and select it if it is found.
4509   # Check for GNU $ac_path_EGREP
4510 case `"$ac_path_EGREP" --version 2>&1` in
4511 *GNU*)
4512   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4513 *)
4514   ac_count=0
4515   $as_echo_n 0123456789 >"conftest.in"
4516   while :
4517   do
4518     cat "conftest.in" "conftest.in" >"conftest.tmp"
4519     mv "conftest.tmp" "conftest.in"
4520     cp "conftest.in" "conftest.nl"
4521     $as_echo 'EGREP' >> "conftest.nl"
4522     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4523     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4524     as_fn_arith $ac_count + 1 && ac_count=$as_val
4525     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4526       # Best one so far, save it but keep looking for a better one
4527       ac_cv_path_EGREP="$ac_path_EGREP"
4528       ac_path_EGREP_max=$ac_count
4529     fi
4530     # 10*(2^10) chars as input seems more than enough
4531     test $ac_count -gt 10 && break
4532   done
4533   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4534 esac
4535
4536       $ac_path_EGREP_found && break 3
4537     done
4538   done
4539   done
4540 IFS=$as_save_IFS
4541   if test -z "$ac_cv_path_EGREP"; then
4542     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4543   fi
4544 else
4545   ac_cv_path_EGREP=$EGREP
4546 fi
4547
4548    fi
4549 fi
4550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4551 $as_echo "$ac_cv_path_EGREP" >&6; }
4552  EGREP="$ac_cv_path_EGREP"
4553
4554
4555 # Extract the first word of "ar", so it can be a program name with args.
4556 set dummy ar; ac_word=$2
4557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4558 $as_echo_n "checking for $ac_word... " >&6; }
4559 if ${ac_cv_path_AR+:} false; then :
4560   $as_echo_n "(cached) " >&6
4561 else
4562   case $AR in
4563   [\\/]* | ?:[\\/]*)
4564   ac_cv_path_AR="$AR" # Let the user override the test with a path.
4565   ;;
4566   *)
4567   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4568 for as_dir in $PATH
4569 do
4570   IFS=$as_save_IFS
4571   test -z "$as_dir" && as_dir=.
4572     for ac_exec_ext in '' $ac_executable_extensions; do
4573   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4574     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
4575     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4576     break 2
4577   fi
4578 done
4579   done
4580 IFS=$as_save_IFS
4581
4582   ;;
4583 esac
4584 fi
4585 AR=$ac_cv_path_AR
4586 if test -n "$AR"; then
4587   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4588 $as_echo "$AR" >&6; }
4589 else
4590   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4591 $as_echo "no" >&6; }
4592 fi
4593
4594
4595 # Extract the first word of "cat", so it can be a program name with args.
4596 set dummy cat; ac_word=$2
4597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4598 $as_echo_n "checking for $ac_word... " >&6; }
4599 if ${ac_cv_path_CAT+:} false; then :
4600   $as_echo_n "(cached) " >&6
4601 else
4602   case $CAT in
4603   [\\/]* | ?:[\\/]*)
4604   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4605   ;;
4606   *)
4607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4608 for as_dir in $PATH
4609 do
4610   IFS=$as_save_IFS
4611   test -z "$as_dir" && as_dir=.
4612     for ac_exec_ext in '' $ac_executable_extensions; do
4613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4614     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4616     break 2
4617   fi
4618 done
4619   done
4620 IFS=$as_save_IFS
4621
4622   ;;
4623 esac
4624 fi
4625 CAT=$ac_cv_path_CAT
4626 if test -n "$CAT"; then
4627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4628 $as_echo "$CAT" >&6; }
4629 else
4630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4631 $as_echo "no" >&6; }
4632 fi
4633
4634
4635 # Extract the first word of "kill", so it can be a program name with args.
4636 set dummy kill; ac_word=$2
4637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4638 $as_echo_n "checking for $ac_word... " >&6; }
4639 if ${ac_cv_path_KILL+:} false; then :
4640   $as_echo_n "(cached) " >&6
4641 else
4642   case $KILL in
4643   [\\/]* | ?:[\\/]*)
4644   ac_cv_path_KILL="$KILL" # Let the user override the test with a path.
4645   ;;
4646   *)
4647   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4648 for as_dir in $PATH
4649 do
4650   IFS=$as_save_IFS
4651   test -z "$as_dir" && as_dir=.
4652     for ac_exec_ext in '' $ac_executable_extensions; do
4653   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4654     ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext"
4655     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4656     break 2
4657   fi
4658 done
4659   done
4660 IFS=$as_save_IFS
4661
4662   ;;
4663 esac
4664 fi
4665 KILL=$ac_cv_path_KILL
4666 if test -n "$KILL"; then
4667   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KILL" >&5
4668 $as_echo "$KILL" >&6; }
4669 else
4670   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4671 $as_echo "no" >&6; }
4672 fi
4673
4674
4675 for ac_prog in perl5 perl
4676 do
4677   # Extract the first word of "$ac_prog", so it can be a program name with args.
4678 set dummy $ac_prog; ac_word=$2
4679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4680 $as_echo_n "checking for $ac_word... " >&6; }
4681 if ${ac_cv_path_PERL+:} false; then :
4682   $as_echo_n "(cached) " >&6
4683 else
4684   case $PERL in
4685   [\\/]* | ?:[\\/]*)
4686   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4687   ;;
4688   *)
4689   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4690 for as_dir in $PATH
4691 do
4692   IFS=$as_save_IFS
4693   test -z "$as_dir" && as_dir=.
4694     for ac_exec_ext in '' $ac_executable_extensions; do
4695   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4696     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4697     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4698     break 2
4699   fi
4700 done
4701   done
4702 IFS=$as_save_IFS
4703
4704   ;;
4705 esac
4706 fi
4707 PERL=$ac_cv_path_PERL
4708 if test -n "$PERL"; then
4709   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
4710 $as_echo "$PERL" >&6; }
4711 else
4712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4713 $as_echo "no" >&6; }
4714 fi
4715
4716
4717   test -n "$PERL" && break
4718 done
4719
4720 # Extract the first word of "sed", so it can be a program name with args.
4721 set dummy sed; ac_word=$2
4722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4723 $as_echo_n "checking for $ac_word... " >&6; }
4724 if ${ac_cv_path_SED+:} false; then :
4725   $as_echo_n "(cached) " >&6
4726 else
4727   case $SED in
4728   [\\/]* | ?:[\\/]*)
4729   ac_cv_path_SED="$SED" # Let the user override the test with a path.
4730   ;;
4731   *)
4732   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4733 for as_dir in $PATH
4734 do
4735   IFS=$as_save_IFS
4736   test -z "$as_dir" && as_dir=.
4737     for ac_exec_ext in '' $ac_executable_extensions; do
4738   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4739     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
4740     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4741     break 2
4742   fi
4743 done
4744   done
4745 IFS=$as_save_IFS
4746
4747   ;;
4748 esac
4749 fi
4750 SED=$ac_cv_path_SED
4751 if test -n "$SED"; then
4752   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
4753 $as_echo "$SED" >&6; }
4754 else
4755   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4756 $as_echo "no" >&6; }
4757 fi
4758
4759
4760
4761 # Extract the first word of "ent", so it can be a program name with args.
4762 set dummy ent; ac_word=$2
4763 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4764 $as_echo_n "checking for $ac_word... " >&6; }
4765 if ${ac_cv_path_ENT+:} false; then :
4766   $as_echo_n "(cached) " >&6
4767 else
4768   case $ENT in
4769   [\\/]* | ?:[\\/]*)
4770   ac_cv_path_ENT="$ENT" # Let the user override the test with a path.
4771   ;;
4772   *)
4773   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4774 for as_dir in $PATH
4775 do
4776   IFS=$as_save_IFS
4777   test -z "$as_dir" && as_dir=.
4778     for ac_exec_ext in '' $ac_executable_extensions; do
4779   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4780     ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext"
4781     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4782     break 2
4783   fi
4784 done
4785   done
4786 IFS=$as_save_IFS
4787
4788   ;;
4789 esac
4790 fi
4791 ENT=$ac_cv_path_ENT
4792 if test -n "$ENT"; then
4793   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENT" >&5
4794 $as_echo "$ENT" >&6; }
4795 else
4796   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4797 $as_echo "no" >&6; }
4798 fi
4799
4800
4801
4802 # Extract the first word of "bash", so it can be a program name with args.
4803 set dummy bash; ac_word=$2
4804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4805 $as_echo_n "checking for $ac_word... " >&6; }
4806 if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4807   $as_echo_n "(cached) " >&6
4808 else
4809   case $TEST_MINUS_S_SH in
4810   [\\/]* | ?:[\\/]*)
4811   ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4812   ;;
4813   *)
4814   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4815 for as_dir in $PATH
4816 do
4817   IFS=$as_save_IFS
4818   test -z "$as_dir" && as_dir=.
4819     for ac_exec_ext in '' $ac_executable_extensions; do
4820   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4821     ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4822     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4823     break 2
4824   fi
4825 done
4826   done
4827 IFS=$as_save_IFS
4828
4829   ;;
4830 esac
4831 fi
4832 TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4833 if test -n "$TEST_MINUS_S_SH"; then
4834   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4835 $as_echo "$TEST_MINUS_S_SH" >&6; }
4836 else
4837   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4838 $as_echo "no" >&6; }
4839 fi
4840
4841
4842 # Extract the first word of "ksh", so it can be a program name with args.
4843 set dummy ksh; ac_word=$2
4844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4845 $as_echo_n "checking for $ac_word... " >&6; }
4846 if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4847   $as_echo_n "(cached) " >&6
4848 else
4849   case $TEST_MINUS_S_SH in
4850   [\\/]* | ?:[\\/]*)
4851   ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4852   ;;
4853   *)
4854   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4855 for as_dir in $PATH
4856 do
4857   IFS=$as_save_IFS
4858   test -z "$as_dir" && as_dir=.
4859     for ac_exec_ext in '' $ac_executable_extensions; do
4860   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4861     ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4862     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4863     break 2
4864   fi
4865 done
4866   done
4867 IFS=$as_save_IFS
4868
4869   ;;
4870 esac
4871 fi
4872 TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4873 if test -n "$TEST_MINUS_S_SH"; then
4874   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4875 $as_echo "$TEST_MINUS_S_SH" >&6; }
4876 else
4877   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4878 $as_echo "no" >&6; }
4879 fi
4880
4881
4882 # Extract the first word of "sh", so it can be a program name with args.
4883 set dummy sh; ac_word=$2
4884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4885 $as_echo_n "checking for $ac_word... " >&6; }
4886 if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4887   $as_echo_n "(cached) " >&6
4888 else
4889   case $TEST_MINUS_S_SH in
4890   [\\/]* | ?:[\\/]*)
4891   ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4892   ;;
4893   *)
4894   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4895 for as_dir in $PATH
4896 do
4897   IFS=$as_save_IFS
4898   test -z "$as_dir" && as_dir=.
4899     for ac_exec_ext in '' $ac_executable_extensions; do
4900   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4901     ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4902     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4903     break 2
4904   fi
4905 done
4906   done
4907 IFS=$as_save_IFS
4908
4909   ;;
4910 esac
4911 fi
4912 TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4913 if test -n "$TEST_MINUS_S_SH"; then
4914   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4915 $as_echo "$TEST_MINUS_S_SH" >&6; }
4916 else
4917   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4918 $as_echo "no" >&6; }
4919 fi
4920
4921
4922 # Extract the first word of "sh", so it can be a program name with args.
4923 set dummy sh; ac_word=$2
4924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4925 $as_echo_n "checking for $ac_word... " >&6; }
4926 if ${ac_cv_path_SH+:} false; then :
4927   $as_echo_n "(cached) " >&6
4928 else
4929   case $SH in
4930   [\\/]* | ?:[\\/]*)
4931   ac_cv_path_SH="$SH" # Let the user override the test with a path.
4932   ;;
4933   *)
4934   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4935 for as_dir in $PATH
4936 do
4937   IFS=$as_save_IFS
4938   test -z "$as_dir" && as_dir=.
4939     for ac_exec_ext in '' $ac_executable_extensions; do
4940   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4941     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
4942     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4943     break 2
4944   fi
4945 done
4946   done
4947 IFS=$as_save_IFS
4948
4949   ;;
4950 esac
4951 fi
4952 SH=$ac_cv_path_SH
4953 if test -n "$SH"; then
4954   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
4955 $as_echo "$SH" >&6; }
4956 else
4957   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4958 $as_echo "no" >&6; }
4959 fi
4960
4961
4962 # Extract the first word of "groff", so it can be a program name with args.
4963 set dummy groff; ac_word=$2
4964 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4965 $as_echo_n "checking for $ac_word... " >&6; }
4966 if ${ac_cv_path_GROFF+:} false; then :
4967   $as_echo_n "(cached) " >&6
4968 else
4969   case $GROFF in
4970   [\\/]* | ?:[\\/]*)
4971   ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path.
4972   ;;
4973   *)
4974   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4975 for as_dir in $PATH
4976 do
4977   IFS=$as_save_IFS
4978   test -z "$as_dir" && as_dir=.
4979     for ac_exec_ext in '' $ac_executable_extensions; do
4980   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4981     ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext"
4982     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4983     break 2
4984   fi
4985 done
4986   done
4987 IFS=$as_save_IFS
4988
4989   ;;
4990 esac
4991 fi
4992 GROFF=$ac_cv_path_GROFF
4993 if test -n "$GROFF"; then
4994   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5
4995 $as_echo "$GROFF" >&6; }
4996 else
4997   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4998 $as_echo "no" >&6; }
4999 fi
5000
5001
5002 # Extract the first word of "nroff", so it can be a program name with args.
5003 set dummy nroff; ac_word=$2
5004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5005 $as_echo_n "checking for $ac_word... " >&6; }
5006 if ${ac_cv_path_NROFF+:} false; then :
5007   $as_echo_n "(cached) " >&6
5008 else
5009   case $NROFF in
5010   [\\/]* | ?:[\\/]*)
5011   ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
5012   ;;
5013   *)
5014   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5015 for as_dir in $PATH
5016 do
5017   IFS=$as_save_IFS
5018   test -z "$as_dir" && as_dir=.
5019     for ac_exec_ext in '' $ac_executable_extensions; do
5020   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5021     ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
5022     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5023     break 2
5024   fi
5025 done
5026   done
5027 IFS=$as_save_IFS
5028
5029   ;;
5030 esac
5031 fi
5032 NROFF=$ac_cv_path_NROFF
5033 if test -n "$NROFF"; then
5034   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
5035 $as_echo "$NROFF" >&6; }
5036 else
5037   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5038 $as_echo "no" >&6; }
5039 fi
5040
5041
5042 # Extract the first word of "mandoc", so it can be a program name with args.
5043 set dummy mandoc; ac_word=$2
5044 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5045 $as_echo_n "checking for $ac_word... " >&6; }
5046 if ${ac_cv_path_MANDOC+:} false; then :
5047   $as_echo_n "(cached) " >&6
5048 else
5049   case $MANDOC in
5050   [\\/]* | ?:[\\/]*)
5051   ac_cv_path_MANDOC="$MANDOC" # Let the user override the test with a path.
5052   ;;
5053   *)
5054   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5055 for as_dir in $PATH
5056 do
5057   IFS=$as_save_IFS
5058   test -z "$as_dir" && as_dir=.
5059     for ac_exec_ext in '' $ac_executable_extensions; do
5060   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5061     ac_cv_path_MANDOC="$as_dir/$ac_word$ac_exec_ext"
5062     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5063     break 2
5064   fi
5065 done
5066   done
5067 IFS=$as_save_IFS
5068
5069   ;;
5070 esac
5071 fi
5072 MANDOC=$ac_cv_path_MANDOC
5073 if test -n "$MANDOC"; then
5074   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANDOC" >&5
5075 $as_echo "$MANDOC" >&6; }
5076 else
5077   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5078 $as_echo "no" >&6; }
5079 fi
5080
5081
5082 TEST_SHELL=sh
5083
5084
5085 if test "x$MANDOC" != "x" ; then
5086         MANFMT="$MANDOC"
5087 elif test "x$NROFF" != "x" ; then
5088         MANFMT="$NROFF -mandoc"
5089 elif test "x$GROFF" != "x" ; then
5090         MANFMT="$GROFF -mandoc -Tascii"
5091 else
5092         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no manpage formatted found" >&5
5093 $as_echo "$as_me: WARNING: no manpage formatted found" >&2;}
5094         MANFMT="false"
5095 fi
5096
5097
5098 # Extract the first word of "groupadd", so it can be a program name with args.
5099 set dummy groupadd; ac_word=$2
5100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5101 $as_echo_n "checking for $ac_word... " >&6; }
5102 if ${ac_cv_path_PATH_GROUPADD_PROG+:} false; then :
5103   $as_echo_n "(cached) " >&6
5104 else
5105   case $PATH_GROUPADD_PROG in
5106   [\\/]* | ?:[\\/]*)
5107   ac_cv_path_PATH_GROUPADD_PROG="$PATH_GROUPADD_PROG" # Let the user override the test with a path.
5108   ;;
5109   *)
5110   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5111 for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
5112 do
5113   IFS=$as_save_IFS
5114   test -z "$as_dir" && as_dir=.
5115     for ac_exec_ext in '' $ac_executable_extensions; do
5116   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5117     ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext"
5118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5119     break 2
5120   fi
5121 done
5122   done
5123 IFS=$as_save_IFS
5124
5125   test -z "$ac_cv_path_PATH_GROUPADD_PROG" && ac_cv_path_PATH_GROUPADD_PROG="groupadd"
5126   ;;
5127 esac
5128 fi
5129 PATH_GROUPADD_PROG=$ac_cv_path_PATH_GROUPADD_PROG
5130 if test -n "$PATH_GROUPADD_PROG"; then
5131   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_GROUPADD_PROG" >&5
5132 $as_echo "$PATH_GROUPADD_PROG" >&6; }
5133 else
5134   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5135 $as_echo "no" >&6; }
5136 fi
5137
5138
5139 # Extract the first word of "useradd", so it can be a program name with args.
5140 set dummy useradd; ac_word=$2
5141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5142 $as_echo_n "checking for $ac_word... " >&6; }
5143 if ${ac_cv_path_PATH_USERADD_PROG+:} false; then :
5144   $as_echo_n "(cached) " >&6
5145 else
5146   case $PATH_USERADD_PROG in
5147   [\\/]* | ?:[\\/]*)
5148   ac_cv_path_PATH_USERADD_PROG="$PATH_USERADD_PROG" # Let the user override the test with a path.
5149   ;;
5150   *)
5151   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5152 for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
5153 do
5154   IFS=$as_save_IFS
5155   test -z "$as_dir" && as_dir=.
5156     for ac_exec_ext in '' $ac_executable_extensions; do
5157   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5158     ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext"
5159     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5160     break 2
5161   fi
5162 done
5163   done
5164 IFS=$as_save_IFS
5165
5166   test -z "$ac_cv_path_PATH_USERADD_PROG" && ac_cv_path_PATH_USERADD_PROG="useradd"
5167   ;;
5168 esac
5169 fi
5170 PATH_USERADD_PROG=$ac_cv_path_PATH_USERADD_PROG
5171 if test -n "$PATH_USERADD_PROG"; then
5172   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_USERADD_PROG" >&5
5173 $as_echo "$PATH_USERADD_PROG" >&6; }
5174 else
5175   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5176 $as_echo "no" >&6; }
5177 fi
5178
5179
5180 # Extract the first word of "pkgmk", so it can be a program name with args.
5181 set dummy pkgmk; ac_word=$2
5182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5183 $as_echo_n "checking for $ac_word... " >&6; }
5184 if ${ac_cv_prog_MAKE_PACKAGE_SUPPORTED+:} false; then :
5185   $as_echo_n "(cached) " >&6
5186 else
5187   if test -n "$MAKE_PACKAGE_SUPPORTED"; then
5188   ac_cv_prog_MAKE_PACKAGE_SUPPORTED="$MAKE_PACKAGE_SUPPORTED" # Let the user override the test.
5189 else
5190 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5191 for as_dir in $PATH
5192 do
5193   IFS=$as_save_IFS
5194   test -z "$as_dir" && as_dir=.
5195     for ac_exec_ext in '' $ac_executable_extensions; do
5196   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5197     ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes"
5198     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5199     break 2
5200   fi
5201 done
5202   done
5203 IFS=$as_save_IFS
5204
5205   test -z "$ac_cv_prog_MAKE_PACKAGE_SUPPORTED" && ac_cv_prog_MAKE_PACKAGE_SUPPORTED="no"
5206 fi
5207 fi
5208 MAKE_PACKAGE_SUPPORTED=$ac_cv_prog_MAKE_PACKAGE_SUPPORTED
5209 if test -n "$MAKE_PACKAGE_SUPPORTED"; then
5210   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE_PACKAGE_SUPPORTED" >&5
5211 $as_echo "$MAKE_PACKAGE_SUPPORTED" >&6; }
5212 else
5213   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5214 $as_echo "no" >&6; }
5215 fi
5216
5217
5218 if test -x /sbin/sh; then
5219         STARTUP_SCRIPT_SHELL=/sbin/sh
5220
5221 else
5222         STARTUP_SCRIPT_SHELL=/bin/sh
5223
5224 fi
5225
5226 # System features
5227 # Check whether --enable-largefile was given.
5228 if test "${enable_largefile+set}" = set; then :
5229   enableval=$enable_largefile;
5230 fi
5231
5232 if test "$enable_largefile" != no; then
5233
5234   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5235 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5236 if ${ac_cv_sys_largefile_CC+:} false; then :
5237   $as_echo_n "(cached) " >&6
5238 else
5239   ac_cv_sys_largefile_CC=no
5240      if test "$GCC" != yes; then
5241        ac_save_CC=$CC
5242        while :; do
5243          # IRIX 6.2 and later do not support large files by default,
5244          # so use the C compiler's -n32 option if that helps.
5245          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5246 /* end confdefs.h.  */
5247 #include <sys/types.h>
5248  /* Check that off_t can represent 2**63 - 1 correctly.
5249     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5250     since some C++ compilers masquerading as C compilers
5251     incorrectly reject 9223372036854775807.  */
5252 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5253   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5254                        && LARGE_OFF_T % 2147483647 == 1)
5255                       ? 1 : -1];
5256 int
5257 main ()
5258 {
5259
5260   ;
5261   return 0;
5262 }
5263 _ACEOF
5264          if ac_fn_c_try_compile "$LINENO"; then :
5265   break
5266 fi
5267 rm -f core conftest.err conftest.$ac_objext
5268          CC="$CC -n32"
5269          if ac_fn_c_try_compile "$LINENO"; then :
5270   ac_cv_sys_largefile_CC=' -n32'; break
5271 fi
5272 rm -f core conftest.err conftest.$ac_objext
5273          break
5274        done
5275        CC=$ac_save_CC
5276        rm -f conftest.$ac_ext
5277     fi
5278 fi
5279 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5280 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5281   if test "$ac_cv_sys_largefile_CC" != no; then
5282     CC=$CC$ac_cv_sys_largefile_CC
5283   fi
5284
5285   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5286 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5287 if ${ac_cv_sys_file_offset_bits+:} false; then :
5288   $as_echo_n "(cached) " >&6
5289 else
5290   while :; do
5291   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5292 /* end confdefs.h.  */
5293 #include <sys/types.h>
5294  /* Check that off_t can represent 2**63 - 1 correctly.
5295     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5296     since some C++ compilers masquerading as C compilers
5297     incorrectly reject 9223372036854775807.  */
5298 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5299   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5300                        && LARGE_OFF_T % 2147483647 == 1)
5301                       ? 1 : -1];
5302 int
5303 main ()
5304 {
5305
5306   ;
5307   return 0;
5308 }
5309 _ACEOF
5310 if ac_fn_c_try_compile "$LINENO"; then :
5311   ac_cv_sys_file_offset_bits=no; break
5312 fi
5313 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5314   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5315 /* end confdefs.h.  */
5316 #define _FILE_OFFSET_BITS 64
5317 #include <sys/types.h>
5318  /* Check that off_t can represent 2**63 - 1 correctly.
5319     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5320     since some C++ compilers masquerading as C compilers
5321     incorrectly reject 9223372036854775807.  */
5322 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5323   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5324                        && LARGE_OFF_T % 2147483647 == 1)
5325                       ? 1 : -1];
5326 int
5327 main ()
5328 {
5329
5330   ;
5331   return 0;
5332 }
5333 _ACEOF
5334 if ac_fn_c_try_compile "$LINENO"; then :
5335   ac_cv_sys_file_offset_bits=64; break
5336 fi
5337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5338   ac_cv_sys_file_offset_bits=unknown
5339   break
5340 done
5341 fi
5342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5343 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5344 case $ac_cv_sys_file_offset_bits in #(
5345   no | unknown) ;;
5346   *)
5347 cat >>confdefs.h <<_ACEOF
5348 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5349 _ACEOF
5350 ;;
5351 esac
5352 rm -rf conftest*
5353   if test $ac_cv_sys_file_offset_bits = unknown; then
5354     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5355 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5356 if ${ac_cv_sys_large_files+:} 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_large_files=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 _LARGE_FILES 1
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_large_files=1; break
5405 fi
5406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5407   ac_cv_sys_large_files=unknown
5408   break
5409 done
5410 fi
5411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5412 $as_echo "$ac_cv_sys_large_files" >&6; }
5413 case $ac_cv_sys_large_files in #(
5414   no | unknown) ;;
5415   *)
5416 cat >>confdefs.h <<_ACEOF
5417 #define _LARGE_FILES $ac_cv_sys_large_files
5418 _ACEOF
5419 ;;
5420 esac
5421 rm -rf conftest*
5422   fi
5423
5424
5425 fi
5426
5427
5428 if test -z "$AR" ; then
5429         as_fn_error $? "*** 'ar' missing, please install or fix your \$PATH ***" "$LINENO" 5
5430 fi
5431
5432 # Use LOGIN_PROGRAM from environment if possible
5433 if test ! -z "$LOGIN_PROGRAM" ; then
5434
5435 cat >>confdefs.h <<_ACEOF
5436 #define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM"
5437 _ACEOF
5438
5439 else
5440         # Search for login
5441         # Extract the first word of "login", so it can be a program name with args.
5442 set dummy login; ac_word=$2
5443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5444 $as_echo_n "checking for $ac_word... " >&6; }
5445 if ${ac_cv_path_LOGIN_PROGRAM_FALLBACK+:} false; then :
5446   $as_echo_n "(cached) " >&6
5447 else
5448   case $LOGIN_PROGRAM_FALLBACK in
5449   [\\/]* | ?:[\\/]*)
5450   ac_cv_path_LOGIN_PROGRAM_FALLBACK="$LOGIN_PROGRAM_FALLBACK" # Let the user override the test with a path.
5451   ;;
5452   *)
5453   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5454 for as_dir in $PATH
5455 do
5456   IFS=$as_save_IFS
5457   test -z "$as_dir" && as_dir=.
5458     for ac_exec_ext in '' $ac_executable_extensions; do
5459   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5460     ac_cv_path_LOGIN_PROGRAM_FALLBACK="$as_dir/$ac_word$ac_exec_ext"
5461     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5462     break 2
5463   fi
5464 done
5465   done
5466 IFS=$as_save_IFS
5467
5468   ;;
5469 esac
5470 fi
5471 LOGIN_PROGRAM_FALLBACK=$ac_cv_path_LOGIN_PROGRAM_FALLBACK
5472 if test -n "$LOGIN_PROGRAM_FALLBACK"; then
5473   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOGIN_PROGRAM_FALLBACK" >&5
5474 $as_echo "$LOGIN_PROGRAM_FALLBACK" >&6; }
5475 else
5476   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5477 $as_echo "no" >&6; }
5478 fi
5479
5480
5481         if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
5482                 cat >>confdefs.h <<_ACEOF
5483 #define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM_FALLBACK"
5484 _ACEOF
5485
5486         fi
5487 fi
5488
5489 # Extract the first word of "passwd", so it can be a program name with args.
5490 set dummy passwd; ac_word=$2
5491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5492 $as_echo_n "checking for $ac_word... " >&6; }
5493 if ${ac_cv_path_PATH_PASSWD_PROG+:} false; then :
5494   $as_echo_n "(cached) " >&6
5495 else
5496   case $PATH_PASSWD_PROG in
5497   [\\/]* | ?:[\\/]*)
5498   ac_cv_path_PATH_PASSWD_PROG="$PATH_PASSWD_PROG" # Let the user override the test with a path.
5499   ;;
5500   *)
5501   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5502 for as_dir in $PATH
5503 do
5504   IFS=$as_save_IFS
5505   test -z "$as_dir" && as_dir=.
5506     for ac_exec_ext in '' $ac_executable_extensions; do
5507   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5508     ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext"
5509     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5510     break 2
5511   fi
5512 done
5513   done
5514 IFS=$as_save_IFS
5515
5516   ;;
5517 esac
5518 fi
5519 PATH_PASSWD_PROG=$ac_cv_path_PATH_PASSWD_PROG
5520 if test -n "$PATH_PASSWD_PROG"; then
5521   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_PASSWD_PROG" >&5
5522 $as_echo "$PATH_PASSWD_PROG" >&6; }
5523 else
5524   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5525 $as_echo "no" >&6; }
5526 fi
5527
5528
5529 if test ! -z "$PATH_PASSWD_PROG" ; then
5530
5531 cat >>confdefs.h <<_ACEOF
5532 #define _PATH_PASSWD_PROG "$PATH_PASSWD_PROG"
5533 _ACEOF
5534
5535 fi
5536
5537 if test -z "$LD" ; then
5538         LD=$CC
5539 fi
5540
5541
5542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5543 $as_echo_n "checking for inline... " >&6; }
5544 if ${ac_cv_c_inline+:} false; then :
5545   $as_echo_n "(cached) " >&6
5546 else
5547   ac_cv_c_inline=no
5548 for ac_kw in inline __inline__ __inline; do
5549   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5550 /* end confdefs.h.  */
5551 #ifndef __cplusplus
5552 typedef int foo_t;
5553 static $ac_kw foo_t static_foo () {return 0; }
5554 $ac_kw foo_t foo () {return 0; }
5555 #endif
5556
5557 _ACEOF
5558 if ac_fn_c_try_compile "$LINENO"; then :
5559   ac_cv_c_inline=$ac_kw
5560 fi
5561 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5562   test "$ac_cv_c_inline" != no && break
5563 done
5564
5565 fi
5566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5567 $as_echo "$ac_cv_c_inline" >&6; }
5568
5569 case $ac_cv_c_inline in
5570   inline | yes) ;;
5571   *)
5572     case $ac_cv_c_inline in
5573       no) ac_val=;;
5574       *) ac_val=$ac_cv_c_inline;;
5575     esac
5576     cat >>confdefs.h <<_ACEOF
5577 #ifndef __cplusplus
5578 #define inline $ac_val
5579 #endif
5580 _ACEOF
5581     ;;
5582 esac
5583
5584
5585 ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
5586 "
5587 if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
5588   have_llong_max=1
5589 fi
5590
5591 ac_fn_c_check_decl "$LINENO" "SYSTR_POLICY_KILL" "ac_cv_have_decl_SYSTR_POLICY_KILL" "
5592         #include <sys/types.h>
5593         #include <sys/param.h>
5594         #include <dev/systrace.h>
5595
5596 "
5597 if test "x$ac_cv_have_decl_SYSTR_POLICY_KILL" = xyes; then :
5598   have_systr_policy_kill=1
5599 fi
5600
5601 ac_fn_c_check_decl "$LINENO" "RLIMIT_NPROC" "ac_cv_have_decl_RLIMIT_NPROC" "
5602         #include <sys/types.h>
5603         #include <sys/resource.h>
5604
5605 "
5606 if test "x$ac_cv_have_decl_RLIMIT_NPROC" = xyes; then :
5607
5608 $as_echo "#define HAVE_RLIMIT_NPROC /**/" >>confdefs.h
5609
5610 fi
5611
5612 ac_fn_c_check_decl "$LINENO" "PR_SET_NO_NEW_PRIVS" "ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" "
5613         #include <sys/types.h>
5614         #include <linux/prctl.h>
5615
5616 "
5617 if test "x$ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" = xyes; then :
5618   have_linux_no_new_privs=1
5619 fi
5620
5621
5622 use_stack_protector=1
5623 use_toolchain_hardening=1
5624
5625 # Check whether --with-stackprotect was given.
5626 if test "${with_stackprotect+set}" = set; then :
5627   withval=$with_stackprotect;
5628     if test "x$withval" = "xno"; then
5629         use_stack_protector=0
5630     fi
5631 fi
5632
5633
5634 # Check whether --with-hardening was given.
5635 if test "${with_hardening+set}" = set; then :
5636   withval=$with_hardening;
5637     if test "x$withval" = "xno"; then
5638         use_toolchain_hardening=0
5639     fi
5640 fi
5641
5642
5643 # We use -Werror for the tests only so that we catch warnings like "this is
5644 # on by default" for things like -fPIE.
5645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Werror" >&5
5646 $as_echo_n "checking if $CC supports -Werror... " >&6; }
5647 saved_CFLAGS="$CFLAGS"
5648 CFLAGS="$CFLAGS -Werror"
5649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5650 /* end confdefs.h.  */
5651 int main(void) { return 0; }
5652 _ACEOF
5653 if ac_fn_c_try_compile "$LINENO"; then :
5654    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5655 $as_echo "yes" >&6; }
5656           WERROR="-Werror"
5657 else
5658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5659 $as_echo "no" >&6; }
5660           WERROR=""
5661
5662 fi
5663 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5664 CFLAGS="$saved_CFLAGS"
5665
5666 if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
5667         {
5668         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Qunused-arguments" >&5
5669 $as_echo_n "checking if $CC supports compile flag -Qunused-arguments... " >&6; }
5670         saved_CFLAGS="$CFLAGS"
5671         CFLAGS="$CFLAGS $WERROR -Qunused-arguments"
5672         _define_flag=""
5673         test "x$_define_flag" = "x" && _define_flag="-Qunused-arguments"
5674         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5675 /* end confdefs.h.  */
5676
5677 #include <stdlib.h>
5678 #include <stdio.h>
5679 int main(int argc, char **argv) {
5680         /* Some math to catch -ftrapv problems in the toolchain */
5681         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5682         float l = i * 2.1;
5683         double m = l / 0.5;
5684         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5685         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5686         exit(0);
5687 }
5688
5689 _ACEOF
5690 if ac_fn_c_try_compile "$LINENO"; then :
5691
5692 if `grep -i "unrecognized option" conftest.err >/dev/null`
5693 then
5694                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5695 $as_echo "no" >&6; }
5696                 CFLAGS="$saved_CFLAGS"
5697 else
5698                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5699 $as_echo "yes" >&6; }
5700                  CFLAGS="$saved_CFLAGS $_define_flag"
5701 fi
5702 else
5703    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5704 $as_echo "no" >&6; }
5705                   CFLAGS="$saved_CFLAGS"
5706
5707 fi
5708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5709 }
5710         {
5711         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wunknown-warning-option" >&5
5712 $as_echo_n "checking if $CC supports compile flag -Wunknown-warning-option... " >&6; }
5713         saved_CFLAGS="$CFLAGS"
5714         CFLAGS="$CFLAGS $WERROR -Wunknown-warning-option"
5715         _define_flag=""
5716         test "x$_define_flag" = "x" && _define_flag="-Wunknown-warning-option"
5717         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5718 /* end confdefs.h.  */
5719
5720 #include <stdlib.h>
5721 #include <stdio.h>
5722 int main(int argc, char **argv) {
5723         /* Some math to catch -ftrapv problems in the toolchain */
5724         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5725         float l = i * 2.1;
5726         double m = l / 0.5;
5727         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5728         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5729         exit(0);
5730 }
5731
5732 _ACEOF
5733 if ac_fn_c_try_compile "$LINENO"; then :
5734
5735 if `grep -i "unrecognized option" conftest.err >/dev/null`
5736 then
5737                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5738 $as_echo "no" >&6; }
5739                 CFLAGS="$saved_CFLAGS"
5740 else
5741                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5742 $as_echo "yes" >&6; }
5743                  CFLAGS="$saved_CFLAGS $_define_flag"
5744 fi
5745 else
5746    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5747 $as_echo "no" >&6; }
5748                   CFLAGS="$saved_CFLAGS"
5749
5750 fi
5751 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5752 }
5753         {
5754         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wall" >&5
5755 $as_echo_n "checking if $CC supports compile flag -Wall... " >&6; }
5756         saved_CFLAGS="$CFLAGS"
5757         CFLAGS="$CFLAGS $WERROR -Wall"
5758         _define_flag=""
5759         test "x$_define_flag" = "x" && _define_flag="-Wall"
5760         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5761 /* end confdefs.h.  */
5762
5763 #include <stdlib.h>
5764 #include <stdio.h>
5765 int main(int argc, char **argv) {
5766         /* Some math to catch -ftrapv problems in the toolchain */
5767         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5768         float l = i * 2.1;
5769         double m = l / 0.5;
5770         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5771         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5772         exit(0);
5773 }
5774
5775 _ACEOF
5776 if ac_fn_c_try_compile "$LINENO"; then :
5777
5778 if `grep -i "unrecognized option" conftest.err >/dev/null`
5779 then
5780                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5781 $as_echo "no" >&6; }
5782                 CFLAGS="$saved_CFLAGS"
5783 else
5784                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5785 $as_echo "yes" >&6; }
5786                  CFLAGS="$saved_CFLAGS $_define_flag"
5787 fi
5788 else
5789    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5790 $as_echo "no" >&6; }
5791                   CFLAGS="$saved_CFLAGS"
5792
5793 fi
5794 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5795 }
5796         {
5797         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wpointer-arith" >&5
5798 $as_echo_n "checking if $CC supports compile flag -Wpointer-arith... " >&6; }
5799         saved_CFLAGS="$CFLAGS"
5800         CFLAGS="$CFLAGS $WERROR -Wpointer-arith"
5801         _define_flag=""
5802         test "x$_define_flag" = "x" && _define_flag="-Wpointer-arith"
5803         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5804 /* end confdefs.h.  */
5805
5806 #include <stdlib.h>
5807 #include <stdio.h>
5808 int main(int argc, char **argv) {
5809         /* Some math to catch -ftrapv problems in the toolchain */
5810         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5811         float l = i * 2.1;
5812         double m = l / 0.5;
5813         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5814         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5815         exit(0);
5816 }
5817
5818 _ACEOF
5819 if ac_fn_c_try_compile "$LINENO"; then :
5820
5821 if `grep -i "unrecognized option" conftest.err >/dev/null`
5822 then
5823                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5824 $as_echo "no" >&6; }
5825                 CFLAGS="$saved_CFLAGS"
5826 else
5827                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5828 $as_echo "yes" >&6; }
5829                  CFLAGS="$saved_CFLAGS $_define_flag"
5830 fi
5831 else
5832    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5833 $as_echo "no" >&6; }
5834                   CFLAGS="$saved_CFLAGS"
5835
5836 fi
5837 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5838 }
5839         {
5840         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wuninitialized" >&5
5841 $as_echo_n "checking if $CC supports compile flag -Wuninitialized... " >&6; }
5842         saved_CFLAGS="$CFLAGS"
5843         CFLAGS="$CFLAGS $WERROR -Wuninitialized"
5844         _define_flag=""
5845         test "x$_define_flag" = "x" && _define_flag="-Wuninitialized"
5846         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5847 /* end confdefs.h.  */
5848
5849 #include <stdlib.h>
5850 #include <stdio.h>
5851 int main(int argc, char **argv) {
5852         /* Some math to catch -ftrapv problems in the toolchain */
5853         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5854         float l = i * 2.1;
5855         double m = l / 0.5;
5856         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5857         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5858         exit(0);
5859 }
5860
5861 _ACEOF
5862 if ac_fn_c_try_compile "$LINENO"; then :
5863
5864 if `grep -i "unrecognized option" conftest.err >/dev/null`
5865 then
5866                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5867 $as_echo "no" >&6; }
5868                 CFLAGS="$saved_CFLAGS"
5869 else
5870                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5871 $as_echo "yes" >&6; }
5872                  CFLAGS="$saved_CFLAGS $_define_flag"
5873 fi
5874 else
5875    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5876 $as_echo "no" >&6; }
5877                   CFLAGS="$saved_CFLAGS"
5878
5879 fi
5880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5881 }
5882         {
5883         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wsign-compare" >&5
5884 $as_echo_n "checking if $CC supports compile flag -Wsign-compare... " >&6; }
5885         saved_CFLAGS="$CFLAGS"
5886         CFLAGS="$CFLAGS $WERROR -Wsign-compare"
5887         _define_flag=""
5888         test "x$_define_flag" = "x" && _define_flag="-Wsign-compare"
5889         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5890 /* end confdefs.h.  */
5891
5892 #include <stdlib.h>
5893 #include <stdio.h>
5894 int main(int argc, char **argv) {
5895         /* Some math to catch -ftrapv problems in the toolchain */
5896         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5897         float l = i * 2.1;
5898         double m = l / 0.5;
5899         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5900         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5901         exit(0);
5902 }
5903
5904 _ACEOF
5905 if ac_fn_c_try_compile "$LINENO"; then :
5906
5907 if `grep -i "unrecognized option" conftest.err >/dev/null`
5908 then
5909                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5910 $as_echo "no" >&6; }
5911                 CFLAGS="$saved_CFLAGS"
5912 else
5913                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5914 $as_echo "yes" >&6; }
5915                  CFLAGS="$saved_CFLAGS $_define_flag"
5916 fi
5917 else
5918    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5919 $as_echo "no" >&6; }
5920                   CFLAGS="$saved_CFLAGS"
5921
5922 fi
5923 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5924 }
5925         {
5926         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wformat-security" >&5
5927 $as_echo_n "checking if $CC supports compile flag -Wformat-security... " >&6; }
5928         saved_CFLAGS="$CFLAGS"
5929         CFLAGS="$CFLAGS $WERROR -Wformat-security"
5930         _define_flag=""
5931         test "x$_define_flag" = "x" && _define_flag="-Wformat-security"
5932         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5933 /* end confdefs.h.  */
5934
5935 #include <stdlib.h>
5936 #include <stdio.h>
5937 int main(int argc, char **argv) {
5938         /* Some math to catch -ftrapv problems in the toolchain */
5939         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5940         float l = i * 2.1;
5941         double m = l / 0.5;
5942         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5943         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5944         exit(0);
5945 }
5946
5947 _ACEOF
5948 if ac_fn_c_try_compile "$LINENO"; then :
5949
5950 if `grep -i "unrecognized option" conftest.err >/dev/null`
5951 then
5952                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5953 $as_echo "no" >&6; }
5954                 CFLAGS="$saved_CFLAGS"
5955 else
5956                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5957 $as_echo "yes" >&6; }
5958                  CFLAGS="$saved_CFLAGS $_define_flag"
5959 fi
5960 else
5961    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5962 $as_echo "no" >&6; }
5963                   CFLAGS="$saved_CFLAGS"
5964
5965 fi
5966 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5967 }
5968         {
5969         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wsizeof-pointer-memaccess" >&5
5970 $as_echo_n "checking if $CC supports compile flag -Wsizeof-pointer-memaccess... " >&6; }
5971         saved_CFLAGS="$CFLAGS"
5972         CFLAGS="$CFLAGS $WERROR -Wsizeof-pointer-memaccess"
5973         _define_flag=""
5974         test "x$_define_flag" = "x" && _define_flag="-Wsizeof-pointer-memaccess"
5975         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5976 /* end confdefs.h.  */
5977
5978 #include <stdlib.h>
5979 #include <stdio.h>
5980 int main(int argc, char **argv) {
5981         /* Some math to catch -ftrapv problems in the toolchain */
5982         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
5983         float l = i * 2.1;
5984         double m = l / 0.5;
5985         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
5986         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
5987         exit(0);
5988 }
5989
5990 _ACEOF
5991 if ac_fn_c_try_compile "$LINENO"; then :
5992
5993 if `grep -i "unrecognized option" conftest.err >/dev/null`
5994 then
5995                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5996 $as_echo "no" >&6; }
5997                 CFLAGS="$saved_CFLAGS"
5998 else
5999                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6000 $as_echo "yes" >&6; }
6001                  CFLAGS="$saved_CFLAGS $_define_flag"
6002 fi
6003 else
6004    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6005 $as_echo "no" >&6; }
6006                   CFLAGS="$saved_CFLAGS"
6007
6008 fi
6009 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6010 }
6011         {
6012         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wpointer-sign" >&5
6013 $as_echo_n "checking if $CC supports compile flag -Wpointer-sign... " >&6; }
6014         saved_CFLAGS="$CFLAGS"
6015         CFLAGS="$CFLAGS $WERROR -Wpointer-sign"
6016         _define_flag="-Wno-pointer-sign"
6017         test "x$_define_flag" = "x" && _define_flag="-Wpointer-sign"
6018         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6019 /* end confdefs.h.  */
6020
6021 #include <stdlib.h>
6022 #include <stdio.h>
6023 int main(int argc, char **argv) {
6024         /* Some math to catch -ftrapv problems in the toolchain */
6025         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6026         float l = i * 2.1;
6027         double m = l / 0.5;
6028         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6029         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6030         exit(0);
6031 }
6032
6033 _ACEOF
6034 if ac_fn_c_try_compile "$LINENO"; then :
6035
6036 if `grep -i "unrecognized option" conftest.err >/dev/null`
6037 then
6038                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6039 $as_echo "no" >&6; }
6040                 CFLAGS="$saved_CFLAGS"
6041 else
6042                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6043 $as_echo "yes" >&6; }
6044                  CFLAGS="$saved_CFLAGS $_define_flag"
6045 fi
6046 else
6047    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6048 $as_echo "no" >&6; }
6049                   CFLAGS="$saved_CFLAGS"
6050
6051 fi
6052 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6053 }
6054         {
6055         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wunused-result" >&5
6056 $as_echo_n "checking if $CC supports compile flag -Wunused-result... " >&6; }
6057         saved_CFLAGS="$CFLAGS"
6058         CFLAGS="$CFLAGS $WERROR -Wunused-result"
6059         _define_flag="-Wno-unused-result"
6060         test "x$_define_flag" = "x" && _define_flag="-Wunused-result"
6061         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6062 /* end confdefs.h.  */
6063
6064 #include <stdlib.h>
6065 #include <stdio.h>
6066 int main(int argc, char **argv) {
6067         /* Some math to catch -ftrapv problems in the toolchain */
6068         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6069         float l = i * 2.1;
6070         double m = l / 0.5;
6071         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6072         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6073         exit(0);
6074 }
6075
6076 _ACEOF
6077 if ac_fn_c_try_compile "$LINENO"; then :
6078
6079 if `grep -i "unrecognized option" conftest.err >/dev/null`
6080 then
6081                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6082 $as_echo "no" >&6; }
6083                 CFLAGS="$saved_CFLAGS"
6084 else
6085                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6086 $as_echo "yes" >&6; }
6087                  CFLAGS="$saved_CFLAGS $_define_flag"
6088 fi
6089 else
6090    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6091 $as_echo "no" >&6; }
6092                   CFLAGS="$saved_CFLAGS"
6093
6094 fi
6095 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6096 }
6097         {
6098         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -fno-strict-aliasing" >&5
6099 $as_echo_n "checking if $CC supports compile flag -fno-strict-aliasing... " >&6; }
6100         saved_CFLAGS="$CFLAGS"
6101         CFLAGS="$CFLAGS $WERROR -fno-strict-aliasing"
6102         _define_flag=""
6103         test "x$_define_flag" = "x" && _define_flag="-fno-strict-aliasing"
6104         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6105 /* end confdefs.h.  */
6106
6107 #include <stdlib.h>
6108 #include <stdio.h>
6109 int main(int argc, char **argv) {
6110         /* Some math to catch -ftrapv problems in the toolchain */
6111         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6112         float l = i * 2.1;
6113         double m = l / 0.5;
6114         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6115         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6116         exit(0);
6117 }
6118
6119 _ACEOF
6120 if ac_fn_c_try_compile "$LINENO"; then :
6121
6122 if `grep -i "unrecognized option" conftest.err >/dev/null`
6123 then
6124                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6125 $as_echo "no" >&6; }
6126                 CFLAGS="$saved_CFLAGS"
6127 else
6128                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6129 $as_echo "yes" >&6; }
6130                  CFLAGS="$saved_CFLAGS $_define_flag"
6131 fi
6132 else
6133    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6134 $as_echo "no" >&6; }
6135                   CFLAGS="$saved_CFLAGS"
6136
6137 fi
6138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6139 }
6140         {
6141         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -D_FORTIFY_SOURCE=2" >&5
6142 $as_echo_n "checking if $CC supports compile flag -D_FORTIFY_SOURCE=2... " >&6; }
6143         saved_CFLAGS="$CFLAGS"
6144         CFLAGS="$CFLAGS $WERROR -D_FORTIFY_SOURCE=2"
6145         _define_flag=""
6146         test "x$_define_flag" = "x" && _define_flag="-D_FORTIFY_SOURCE=2"
6147         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6148 /* end confdefs.h.  */
6149
6150 #include <stdlib.h>
6151 #include <stdio.h>
6152 int main(int argc, char **argv) {
6153         /* Some math to catch -ftrapv problems in the toolchain */
6154         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6155         float l = i * 2.1;
6156         double m = l / 0.5;
6157         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6158         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6159         exit(0);
6160 }
6161
6162 _ACEOF
6163 if ac_fn_c_try_compile "$LINENO"; then :
6164
6165 if `grep -i "unrecognized option" conftest.err >/dev/null`
6166 then
6167                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6168 $as_echo "no" >&6; }
6169                 CFLAGS="$saved_CFLAGS"
6170 else
6171                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6172 $as_echo "yes" >&6; }
6173                  CFLAGS="$saved_CFLAGS $_define_flag"
6174 fi
6175 else
6176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6177 $as_echo "no" >&6; }
6178                   CFLAGS="$saved_CFLAGS"
6179
6180 fi
6181 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6182 }
6183     if test "x$use_toolchain_hardening" = "x1"; then
6184         {
6185         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,relro" >&5
6186 $as_echo_n "checking if $LD supports link flag -Wl,-z,relro... " >&6; }
6187         saved_LDFLAGS="$LDFLAGS"
6188         LDFLAGS="$LDFLAGS $WERROR -Wl,-z,relro"
6189         _define_flag=""
6190         test "x$_define_flag" = "x" && _define_flag="-Wl,-z,relro"
6191         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6192 /* end confdefs.h.  */
6193
6194 #include <stdlib.h>
6195 #include <stdio.h>
6196 int main(int argc, char **argv) {
6197         /* Some math to catch -ftrapv problems in the toolchain */
6198         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6199         float l = i * 2.1;
6200         double m = l / 0.5;
6201         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6202         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6203         exit(0);
6204 }
6205
6206 _ACEOF
6207 if ac_fn_c_try_link "$LINENO"; then :
6208    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6209 $as_echo "yes" >&6; }
6210                   LDFLAGS="$saved_LDFLAGS $_define_flag"
6211 else
6212    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6213 $as_echo "no" >&6; }
6214                   LDFLAGS="$saved_LDFLAGS"
6215
6216 fi
6217 rm -f core conftest.err conftest.$ac_objext \
6218     conftest$ac_exeext conftest.$ac_ext
6219 }
6220         {
6221         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,now" >&5
6222 $as_echo_n "checking if $LD supports link flag -Wl,-z,now... " >&6; }
6223         saved_LDFLAGS="$LDFLAGS"
6224         LDFLAGS="$LDFLAGS $WERROR -Wl,-z,now"
6225         _define_flag=""
6226         test "x$_define_flag" = "x" && _define_flag="-Wl,-z,now"
6227         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6228 /* end confdefs.h.  */
6229
6230 #include <stdlib.h>
6231 #include <stdio.h>
6232 int main(int argc, char **argv) {
6233         /* Some math to catch -ftrapv problems in the toolchain */
6234         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6235         float l = i * 2.1;
6236         double m = l / 0.5;
6237         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6238         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6239         exit(0);
6240 }
6241
6242 _ACEOF
6243 if ac_fn_c_try_link "$LINENO"; then :
6244    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6245 $as_echo "yes" >&6; }
6246                   LDFLAGS="$saved_LDFLAGS $_define_flag"
6247 else
6248    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6249 $as_echo "no" >&6; }
6250                   LDFLAGS="$saved_LDFLAGS"
6251
6252 fi
6253 rm -f core conftest.err conftest.$ac_objext \
6254     conftest$ac_exeext conftest.$ac_ext
6255 }
6256         {
6257         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -Wl,-z,noexecstack" >&5
6258 $as_echo_n "checking if $LD supports link flag -Wl,-z,noexecstack... " >&6; }
6259         saved_LDFLAGS="$LDFLAGS"
6260         LDFLAGS="$LDFLAGS $WERROR -Wl,-z,noexecstack"
6261         _define_flag=""
6262         test "x$_define_flag" = "x" && _define_flag="-Wl,-z,noexecstack"
6263         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6264 /* end confdefs.h.  */
6265
6266 #include <stdlib.h>
6267 #include <stdio.h>
6268 int main(int argc, char **argv) {
6269         /* Some math to catch -ftrapv problems in the toolchain */
6270         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6271         float l = i * 2.1;
6272         double m = l / 0.5;
6273         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6274         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6275         exit(0);
6276 }
6277
6278 _ACEOF
6279 if ac_fn_c_try_link "$LINENO"; then :
6280    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6281 $as_echo "yes" >&6; }
6282                   LDFLAGS="$saved_LDFLAGS $_define_flag"
6283 else
6284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6285 $as_echo "no" >&6; }
6286                   LDFLAGS="$saved_LDFLAGS"
6287
6288 fi
6289 rm -f core conftest.err conftest.$ac_objext \
6290     conftest$ac_exeext conftest.$ac_ext
6291 }
6292         # NB. -ftrapv expects certain support functions to be present in
6293         # the compiler library (libgcc or similar) to detect integer operations
6294         # that can overflow. We must check that the result of enabling it
6295         # actually links. The test program compiled/linked includes a number
6296         # of integer operations that should exercise this.
6297         {
6298         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -ftrapv and linking succeeds" >&5
6299 $as_echo_n "checking if $CC supports compile flag -ftrapv and linking succeeds... " >&6; }
6300         saved_CFLAGS="$CFLAGS"
6301         CFLAGS="$CFLAGS $WERROR -ftrapv"
6302         _define_flag=""
6303         test "x$_define_flag" = "x" && _define_flag="-ftrapv"
6304         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6305 /* end confdefs.h.  */
6306
6307 #include <stdlib.h>
6308 #include <stdio.h>
6309 int main(int argc, char **argv) {
6310         /* Some math to catch -ftrapv problems in the toolchain */
6311         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
6312         float l = i * 2.1;
6313         double m = l / 0.5;
6314         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
6315         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
6316         exit(0);
6317 }
6318
6319 _ACEOF
6320 if ac_fn_c_try_link "$LINENO"; then :
6321
6322 if `grep -i "unrecognized option" conftest.err >/dev/null`
6323 then
6324                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6325 $as_echo "no" >&6; }
6326                 CFLAGS="$saved_CFLAGS"
6327 else
6328                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6329 $as_echo "yes" >&6; }
6330                  CFLAGS="$saved_CFLAGS $_define_flag"
6331 fi
6332 else
6333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6334 $as_echo "no" >&6; }
6335                   CFLAGS="$saved_CFLAGS"
6336
6337 fi
6338 rm -f core conftest.err conftest.$ac_objext \
6339     conftest$ac_exeext conftest.$ac_ext
6340 }
6341     fi
6342         { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc version" >&5
6343 $as_echo_n "checking gcc version... " >&6; }
6344         GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`
6345         case $GCC_VER in
6346                 1.*) no_attrib_nonnull=1 ;;
6347                 2.8* | 2.9*)
6348                      no_attrib_nonnull=1
6349                      ;;
6350                 2.*) no_attrib_nonnull=1 ;;
6351                 *) ;;
6352         esac
6353         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC_VER" >&5
6354 $as_echo "$GCC_VER" >&6; }
6355
6356         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-builtin-memset" >&5
6357 $as_echo_n "checking if $CC accepts -fno-builtin-memset... " >&6; }
6358         saved_CFLAGS="$CFLAGS"
6359         CFLAGS="$CFLAGS -fno-builtin-memset"
6360         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6361 /* end confdefs.h.  */
6362  #include <string.h>
6363 int
6364 main ()
6365 {
6366  char b[10]; memset(b, 0, sizeof(b));
6367   ;
6368   return 0;
6369 }
6370 _ACEOF
6371 if ac_fn_c_try_link "$LINENO"; then :
6372    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6373 $as_echo "yes" >&6; }
6374 else
6375    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6376 $as_echo "no" >&6; }
6377                   CFLAGS="$saved_CFLAGS"
6378
6379 fi
6380 rm -f core conftest.err conftest.$ac_objext \
6381     conftest$ac_exeext conftest.$ac_ext
6382
6383         # -fstack-protector-all doesn't always work for some GCC versions
6384         # and/or platforms, so we test if we can.  If it's not supported
6385         # on a given platform gcc will emit a warning so we use -Werror.
6386         if test "x$use_stack_protector" = "x1"; then
6387             for t in -fstack-protector-strong -fstack-protector-all \
6388                     -fstack-protector; do
6389                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports $t" >&5
6390 $as_echo_n "checking if $CC supports $t... " >&6; }
6391                 saved_CFLAGS="$CFLAGS"
6392                 saved_LDFLAGS="$LDFLAGS"
6393                 CFLAGS="$CFLAGS $t -Werror"
6394                 LDFLAGS="$LDFLAGS $t -Werror"
6395                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6396 /* end confdefs.h.  */
6397  #include <stdio.h>
6398 int
6399 main ()
6400 {
6401
6402         char x[256];
6403         snprintf(x, sizeof(x), "XXX");
6404
6405   ;
6406   return 0;
6407 }
6408 _ACEOF
6409 if ac_fn_c_try_link "$LINENO"; then :
6410    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6411 $as_echo "yes" >&6; }
6412                       CFLAGS="$saved_CFLAGS $t"
6413                       LDFLAGS="$saved_LDFLAGS $t"
6414                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $t works" >&5
6415 $as_echo_n "checking if $t works... " >&6; }
6416                       if test "$cross_compiling" = yes; then :
6417    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: cannot test" >&5
6418 $as_echo "$as_me: WARNING: cross compiling: cannot test" >&2;}
6419                           break
6420
6421 else
6422   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6423 /* end confdefs.h.  */
6424  #include <stdio.h>
6425 int
6426 main ()
6427 {
6428
6429         char x[256];
6430         snprintf(x, sizeof(x), "XXX");
6431
6432   ;
6433   return 0;
6434 }
6435 _ACEOF
6436 if ac_fn_c_try_run "$LINENO"; then :
6437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6438 $as_echo "yes" >&6; }
6439                           break
6440 else
6441    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6442 $as_echo "no" >&6; }
6443 fi
6444 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6445   conftest.$ac_objext conftest.beam conftest.$ac_ext
6446 fi
6447
6448
6449 else
6450    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6451 $as_echo "no" >&6; }
6452
6453 fi
6454 rm -f core conftest.err conftest.$ac_objext \
6455     conftest$ac_exeext conftest.$ac_ext
6456                 CFLAGS="$saved_CFLAGS"
6457                 LDFLAGS="$saved_LDFLAGS"
6458             done
6459         fi
6460
6461         if test -z "$have_llong_max"; then
6462                 # retry LLONG_MAX with -std=gnu99, needed on some Linuxes
6463                 unset ac_cv_have_decl_LLONG_MAX
6464                 saved_CFLAGS="$CFLAGS"
6465                 CFLAGS="$CFLAGS -std=gnu99"
6466                 ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
6467
6468 "
6469 if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
6470   have_llong_max=1
6471 else
6472   CFLAGS="$saved_CFLAGS"
6473 fi
6474
6475         fi
6476 fi
6477
6478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows __attribute__ on return types" >&5
6479 $as_echo_n "checking if compiler allows __attribute__ on return types... " >&6; }
6480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6481 /* end confdefs.h.  */
6482
6483 #include <stdlib.h>
6484 __attribute__((__unused__)) static void foo(void){return;}
6485 int
6486 main ()
6487 {
6488  exit(0);
6489   ;
6490   return 0;
6491 }
6492 _ACEOF
6493 if ac_fn_c_try_compile "$LINENO"; then :
6494    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6495 $as_echo "yes" >&6; }
6496 else
6497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6498 $as_echo "no" >&6; }
6499
6500 $as_echo "#define NO_ATTRIBUTE_ON_RETURN_TYPE 1" >>confdefs.h
6501
6502
6503 fi
6504 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6505
6506 if test "x$no_attrib_nonnull" != "x1" ; then
6507
6508 $as_echo "#define HAVE_ATTRIBUTE__NONNULL__ 1" >>confdefs.h
6509
6510 fi
6511
6512
6513 # Check whether --with-rpath was given.
6514 if test "${with_rpath+set}" = set; then :
6515   withval=$with_rpath;
6516                 if test "x$withval" = "xno" ; then
6517                         need_dash_r=""
6518                 fi
6519                 if test "x$withval" = "xyes" ; then
6520                         need_dash_r=1
6521                 fi
6522
6523
6524 fi
6525
6526
6527 # Allow user to specify flags
6528
6529 # Check whether --with-cflags was given.
6530 if test "${with_cflags+set}" = set; then :
6531   withval=$with_cflags;
6532                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
6533                     test "x${withval}" != "xyes"; then
6534                         CFLAGS="$CFLAGS $withval"
6535                 fi
6536
6537
6538 fi
6539
6540
6541 # Check whether --with-cppflags was given.
6542 if test "${with_cppflags+set}" = set; then :
6543   withval=$with_cppflags;
6544                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
6545                     test "x${withval}" != "xyes"; then
6546                         CPPFLAGS="$CPPFLAGS $withval"
6547                 fi
6548
6549
6550 fi
6551
6552
6553 # Check whether --with-ldflags was given.
6554 if test "${with_ldflags+set}" = set; then :
6555   withval=$with_ldflags;
6556                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
6557                     test "x${withval}" != "xyes"; then
6558                         LDFLAGS="$LDFLAGS $withval"
6559                 fi
6560
6561
6562 fi
6563
6564
6565 # Check whether --with-libs was given.
6566 if test "${with_libs+set}" = set; then :
6567   withval=$with_libs;
6568                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
6569                     test "x${withval}" != "xyes"; then
6570                         LIBS="$LIBS $withval"
6571                 fi
6572
6573
6574 fi
6575
6576
6577 # Check whether --with-Werror was given.
6578 if test "${with_Werror+set}" = set; then :
6579   withval=$with_Werror;
6580                 if test -n "$withval"  &&  test "x$withval" != "xno"; then
6581                         werror_flags="-Werror"
6582                         if test "x${withval}" != "xyes"; then
6583                                 werror_flags="$withval"
6584                         fi
6585                 fi
6586
6587
6588 fi
6589
6590
6591 for ac_header in  \
6592         blf.h \
6593         bstring.h \
6594         crypt.h \
6595         crypto/sha2.h \
6596         dirent.h \
6597         endian.h \
6598         elf.h \
6599         features.h \
6600         fcntl.h \
6601         floatingpoint.h \
6602         getopt.h \
6603         glob.h \
6604         ia.h \
6605         iaf.h \
6606         inttypes.h \
6607         limits.h \
6608         locale.h \
6609         login.h \
6610         maillock.h \
6611         ndir.h \
6612         net/if_tun.h \
6613         netdb.h \
6614         netgroup.h \
6615         pam/pam_appl.h \
6616         paths.h \
6617         poll.h \
6618         pty.h \
6619         readpassphrase.h \
6620         rpc/types.h \
6621         security/pam_appl.h \
6622         sha2.h \
6623         shadow.h \
6624         stddef.h \
6625         stdint.h \
6626         string.h \
6627         strings.h \
6628         sys/audit.h \
6629         sys/bitypes.h \
6630         sys/bsdtty.h \
6631         sys/cdefs.h \
6632         sys/dir.h \
6633         sys/mman.h \
6634         sys/ndir.h \
6635         sys/poll.h \
6636         sys/prctl.h \
6637         sys/pstat.h \
6638         sys/select.h \
6639         sys/stat.h \
6640         sys/stream.h \
6641         sys/stropts.h \
6642         sys/strtio.h \
6643         sys/statvfs.h \
6644         sys/sysmacros.h \
6645         sys/time.h \
6646         sys/timers.h \
6647         time.h \
6648         tmpdir.h \
6649         ttyent.h \
6650         ucred.h \
6651         unistd.h \
6652         usersec.h \
6653         util.h \
6654         utime.h \
6655         utmp.h \
6656         utmpx.h \
6657         vis.h \
6658
6659 do :
6660   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6661 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6662 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6663   cat >>confdefs.h <<_ACEOF
6664 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6665 _ACEOF
6666
6667 fi
6668
6669 done
6670
6671
6672 # sys/capsicum.h requires sys/types.h
6673 for ac_header in sys/capsicum.h
6674 do :
6675   ac_fn_c_check_header_compile "$LINENO" "sys/capsicum.h" "ac_cv_header_sys_capsicum_h" "
6676 #ifdef HAVE_SYS_TYPES_H
6677 # include <sys/types.h>
6678 #endif
6679
6680 "
6681 if test "x$ac_cv_header_sys_capsicum_h" = xyes; then :
6682   cat >>confdefs.h <<_ACEOF
6683 #define HAVE_SYS_CAPSICUM_H 1
6684 _ACEOF
6685
6686 fi
6687
6688 done
6689
6690
6691 # lastlog.h requires sys/time.h to be included first on Solaris
6692 for ac_header in lastlog.h
6693 do :
6694   ac_fn_c_check_header_compile "$LINENO" "lastlog.h" "ac_cv_header_lastlog_h" "
6695 #ifdef HAVE_SYS_TIME_H
6696 # include <sys/time.h>
6697 #endif
6698
6699 "
6700 if test "x$ac_cv_header_lastlog_h" = xyes; then :
6701   cat >>confdefs.h <<_ACEOF
6702 #define HAVE_LASTLOG_H 1
6703 _ACEOF
6704
6705 fi
6706
6707 done
6708
6709
6710 # sys/ptms.h requires sys/stream.h to be included first on Solaris
6711 for ac_header in sys/ptms.h
6712 do :
6713   ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "
6714 #ifdef HAVE_SYS_STREAM_H
6715 # include <sys/stream.h>
6716 #endif
6717
6718 "
6719 if test "x$ac_cv_header_sys_ptms_h" = xyes; then :
6720   cat >>confdefs.h <<_ACEOF
6721 #define HAVE_SYS_PTMS_H 1
6722 _ACEOF
6723
6724 fi
6725
6726 done
6727
6728
6729 # login_cap.h requires sys/types.h on NetBSD
6730 for ac_header in login_cap.h
6731 do :
6732   ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "
6733 #include <sys/types.h>
6734
6735 "
6736 if test "x$ac_cv_header_login_cap_h" = xyes; then :
6737   cat >>confdefs.h <<_ACEOF
6738 #define HAVE_LOGIN_CAP_H 1
6739 _ACEOF
6740
6741 fi
6742
6743 done
6744
6745
6746 # older BSDs need sys/param.h before sys/mount.h
6747 for ac_header in sys/mount.h
6748 do :
6749   ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "
6750 #include <sys/param.h>
6751
6752 "
6753 if test "x$ac_cv_header_sys_mount_h" = xyes; then :
6754   cat >>confdefs.h <<_ACEOF
6755 #define HAVE_SYS_MOUNT_H 1
6756 _ACEOF
6757
6758 fi
6759
6760 done
6761
6762
6763 # Android requires sys/socket.h to be included before sys/un.h
6764 for ac_header in sys/un.h
6765 do :
6766   ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "
6767 #include <sys/types.h>
6768 #include <sys/socket.h>
6769
6770 "
6771 if test "x$ac_cv_header_sys_un_h" = xyes; then :
6772   cat >>confdefs.h <<_ACEOF
6773 #define HAVE_SYS_UN_H 1
6774 _ACEOF
6775
6776 fi
6777
6778 done
6779
6780
6781 # Messages for features tested for in target-specific section
6782 SIA_MSG="no"
6783 SPC_MSG="no"
6784 SP_MSG="no"
6785
6786 # Check for some target-specific stuff
6787 case "$host" in
6788 *-*-aix*)
6789         # Some versions of VAC won't allow macro redefinitions at
6790         # -qlanglevel=ansi, and autoconf 2.60 sometimes insists on using that
6791         # particularly with older versions of vac or xlc.
6792         # It also throws errors about null macro argments, but these are
6793         # not fatal.
6794         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows macro redefinitions" >&5
6795 $as_echo_n "checking if compiler allows macro redefinitions... " >&6; }
6796         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6797 /* end confdefs.h.  */
6798
6799 #define testmacro foo
6800 #define testmacro bar
6801 int
6802 main ()
6803 {
6804  exit(0);
6805   ;
6806   return 0;
6807 }
6808 _ACEOF
6809 if ac_fn_c_try_compile "$LINENO"; then :
6810    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6811 $as_echo "yes" >&6; }
6812 else
6813    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6814 $as_echo "no" >&6; }
6815               CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
6816               LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`"
6817               CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
6818               CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`"
6819
6820
6821 fi
6822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6823
6824         { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to specify blibpath for linker ($LD)" >&5
6825 $as_echo_n "checking how to specify blibpath for linker ($LD)... " >&6; }
6826         if (test -z "$blibpath"); then
6827                 blibpath="/usr/lib:/lib"
6828         fi
6829         saved_LDFLAGS="$LDFLAGS"
6830         if test "$GCC" = "yes"; then
6831                 flags="-Wl,-blibpath: -Wl,-rpath, -blibpath:"
6832         else
6833                 flags="-blibpath: -Wl,-blibpath: -Wl,-rpath,"
6834         fi
6835         for tryflags in $flags ;do
6836                 if (test -z "$blibflags"); then
6837                         LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
6838                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6839 /* end confdefs.h.  */
6840
6841 int
6842 main ()
6843 {
6844
6845   ;
6846   return 0;
6847 }
6848 _ACEOF
6849 if ac_fn_c_try_link "$LINENO"; then :
6850   blibflags=$tryflags
6851 fi
6852 rm -f core conftest.err conftest.$ac_objext \
6853     conftest$ac_exeext conftest.$ac_ext
6854                 fi
6855         done
6856         if (test -z "$blibflags"); then
6857                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6858 $as_echo "not found" >&6; }
6859                 as_fn_error $? "*** must be able to specify blibpath on AIX - check config.log" "$LINENO" 5
6860         else
6861                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $blibflags" >&5
6862 $as_echo "$blibflags" >&6; }
6863         fi
6864         LDFLAGS="$saved_LDFLAGS"
6865                 ac_fn_c_check_func "$LINENO" "authenticate" "ac_cv_func_authenticate"
6866 if test "x$ac_cv_func_authenticate" = xyes; then :
6867
6868 $as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
6869
6870 else
6871   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for authenticate in -ls" >&5
6872 $as_echo_n "checking for authenticate in -ls... " >&6; }
6873 if ${ac_cv_lib_s_authenticate+:} false; then :
6874   $as_echo_n "(cached) " >&6
6875 else
6876   ac_check_lib_save_LIBS=$LIBS
6877 LIBS="-ls  $LIBS"
6878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6879 /* end confdefs.h.  */
6880
6881 /* Override any GCC internal prototype to avoid an error.
6882    Use char because int might match the return type of a GCC
6883    builtin and then its argument prototype would still apply.  */
6884 #ifdef __cplusplus
6885 extern "C"
6886 #endif
6887 char authenticate ();
6888 int
6889 main ()
6890 {
6891 return authenticate ();
6892   ;
6893   return 0;
6894 }
6895 _ACEOF
6896 if ac_fn_c_try_link "$LINENO"; then :
6897   ac_cv_lib_s_authenticate=yes
6898 else
6899   ac_cv_lib_s_authenticate=no
6900 fi
6901 rm -f core conftest.err conftest.$ac_objext \
6902     conftest$ac_exeext conftest.$ac_ext
6903 LIBS=$ac_check_lib_save_LIBS
6904 fi
6905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_s_authenticate" >&5
6906 $as_echo "$ac_cv_lib_s_authenticate" >&6; }
6907 if test "x$ac_cv_lib_s_authenticate" = xyes; then :
6908    $as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
6909
6910                                 LIBS="$LIBS -ls"
6911
6912 fi
6913
6914
6915 fi
6916
6917                 ac_fn_c_check_decl "$LINENO" "authenticate" "ac_cv_have_decl_authenticate" "#include <usersec.h>
6918 "
6919 if test "x$ac_cv_have_decl_authenticate" = xyes; then :
6920   ac_have_decl=1
6921 else
6922   ac_have_decl=0
6923 fi
6924
6925 cat >>confdefs.h <<_ACEOF
6926 #define HAVE_DECL_AUTHENTICATE $ac_have_decl
6927 _ACEOF
6928 ac_fn_c_check_decl "$LINENO" "loginrestrictions" "ac_cv_have_decl_loginrestrictions" "#include <usersec.h>
6929 "
6930 if test "x$ac_cv_have_decl_loginrestrictions" = xyes; then :
6931   ac_have_decl=1
6932 else
6933   ac_have_decl=0
6934 fi
6935
6936 cat >>confdefs.h <<_ACEOF
6937 #define HAVE_DECL_LOGINRESTRICTIONS $ac_have_decl
6938 _ACEOF
6939 ac_fn_c_check_decl "$LINENO" "loginsuccess" "ac_cv_have_decl_loginsuccess" "#include <usersec.h>
6940 "
6941 if test "x$ac_cv_have_decl_loginsuccess" = xyes; then :
6942   ac_have_decl=1
6943 else
6944   ac_have_decl=0
6945 fi
6946
6947 cat >>confdefs.h <<_ACEOF
6948 #define HAVE_DECL_LOGINSUCCESS $ac_have_decl
6949 _ACEOF
6950 ac_fn_c_check_decl "$LINENO" "passwdexpired" "ac_cv_have_decl_passwdexpired" "#include <usersec.h>
6951 "
6952 if test "x$ac_cv_have_decl_passwdexpired" = xyes; then :
6953   ac_have_decl=1
6954 else
6955   ac_have_decl=0
6956 fi
6957
6958 cat >>confdefs.h <<_ACEOF
6959 #define HAVE_DECL_PASSWDEXPIRED $ac_have_decl
6960 _ACEOF
6961 ac_fn_c_check_decl "$LINENO" "setauthdb" "ac_cv_have_decl_setauthdb" "#include <usersec.h>
6962 "
6963 if test "x$ac_cv_have_decl_setauthdb" = xyes; then :
6964   ac_have_decl=1
6965 else
6966   ac_have_decl=0
6967 fi
6968
6969 cat >>confdefs.h <<_ACEOF
6970 #define HAVE_DECL_SETAUTHDB $ac_have_decl
6971 _ACEOF
6972
6973                 ac_fn_c_check_decl "$LINENO" "loginfailed" "ac_cv_have_decl_loginfailed" "#include <usersec.h>
6974
6975 "
6976 if test "x$ac_cv_have_decl_loginfailed" = xyes; then :
6977   ac_have_decl=1
6978 else
6979   ac_have_decl=0
6980 fi
6981
6982 cat >>confdefs.h <<_ACEOF
6983 #define HAVE_DECL_LOGINFAILED $ac_have_decl
6984 _ACEOF
6985 if test $ac_have_decl = 1; then :
6986   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if loginfailed takes 4 arguments" >&5
6987 $as_echo_n "checking if loginfailed takes 4 arguments... " >&6; }
6988             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6989 /* end confdefs.h.  */
6990  #include <usersec.h>
6991 int
6992 main ()
6993 {
6994  (void)loginfailed("user","host","tty",0);
6995   ;
6996   return 0;
6997 }
6998 _ACEOF
6999 if ac_fn_c_try_compile "$LINENO"; then :
7000   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7001 $as_echo "yes" >&6; }
7002
7003 $as_echo "#define AIX_LOGINFAILED_4ARG 1" >>confdefs.h
7004
7005 else
7006   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7007 $as_echo "no" >&6; }
7008
7009 fi
7010 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7011 fi
7012
7013         for ac_func in getgrset setauthdb
7014 do :
7015   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7016 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7017 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7018   cat >>confdefs.h <<_ACEOF
7019 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7020 _ACEOF
7021
7022 fi
7023 done
7024
7025         ac_fn_c_check_decl "$LINENO" "F_CLOSEM" "ac_cv_have_decl_F_CLOSEM" " #include <limits.h>
7026               #include <fcntl.h>
7027
7028 "
7029 if test "x$ac_cv_have_decl_F_CLOSEM" = xyes; then :
7030
7031 $as_echo "#define HAVE_FCNTL_CLOSEM 1" >>confdefs.h
7032
7033 fi
7034
7035         check_for_aix_broken_getaddrinfo=1
7036
7037 $as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
7038
7039
7040 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7041
7042
7043 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7044
7045
7046 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7047
7048
7049 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
7050
7051
7052 $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
7053
7054
7055 $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7056
7057
7058 $as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
7059
7060
7061 $as_echo "#define PTY_ZEROREAD 1" >>confdefs.h
7062
7063
7064 $as_echo "#define PLATFORM_SYS_DIR_UID 2" >>confdefs.h
7065
7066         ;;
7067 *-*-android*)
7068
7069 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
7070
7071
7072 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
7073
7074         ;;
7075 *-*-cygwin*)
7076         check_for_libcrypt_later=1
7077         LIBS="$LIBS /usr/lib/textreadmode.o"
7078
7079 $as_echo "#define HAVE_CYGWIN 1" >>confdefs.h
7080
7081
7082 $as_echo "#define USE_PIPES 1" >>confdefs.h
7083
7084
7085 $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
7086
7087
7088 $as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
7089
7090
7091 $as_echo "#define NO_IPPORT_RESERVED_CONCEPT 1" >>confdefs.h
7092
7093
7094 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7095
7096
7097 $as_echo "#define SSH_IOBUFSZ 65535" >>confdefs.h
7098
7099
7100 $as_echo "#define FILESYSTEM_NO_BACKSLASH 1" >>confdefs.h
7101
7102         # Cygwin defines optargs, optargs as declspec(dllimport) for historical
7103         # reasons which cause compile warnings, so we disable those warnings.
7104         {
7105         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -Wno-attributes" >&5
7106 $as_echo_n "checking if $CC supports compile flag -Wno-attributes... " >&6; }
7107         saved_CFLAGS="$CFLAGS"
7108         CFLAGS="$CFLAGS $WERROR -Wno-attributes"
7109         _define_flag=""
7110         test "x$_define_flag" = "x" && _define_flag="-Wno-attributes"
7111         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7112 /* end confdefs.h.  */
7113
7114 #include <stdlib.h>
7115 #include <stdio.h>
7116 int main(int argc, char **argv) {
7117         /* Some math to catch -ftrapv problems in the toolchain */
7118         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
7119         float l = i * 2.1;
7120         double m = l / 0.5;
7121         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
7122         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
7123         exit(0);
7124 }
7125
7126 _ACEOF
7127 if ac_fn_c_try_compile "$LINENO"; then :
7128
7129 if `grep -i "unrecognized option" conftest.err >/dev/null`
7130 then
7131                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7132 $as_echo "no" >&6; }
7133                 CFLAGS="$saved_CFLAGS"
7134 else
7135                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7136 $as_echo "yes" >&6; }
7137                  CFLAGS="$saved_CFLAGS $_define_flag"
7138 fi
7139 else
7140    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7141 $as_echo "no" >&6; }
7142                   CFLAGS="$saved_CFLAGS"
7143
7144 fi
7145 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7146 }
7147         ;;
7148 *-*-dgux*)
7149
7150 $as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
7151
7152         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7153
7154         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7155
7156         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7157
7158         ;;
7159 *-*-darwin*)
7160         use_pie=auto
7161         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have working getaddrinfo" >&5
7162 $as_echo_n "checking if we have working getaddrinfo... " >&6; }
7163         if test "$cross_compiling" = yes; then :
7164   { $as_echo "$as_me:${as_lineno-$LINENO}: result: assume it is working" >&5
7165 $as_echo "assume it is working" >&6; }
7166 else
7167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7168 /* end confdefs.h.  */
7169  #include <mach-o/dyld.h>
7170 main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
7171                 exit(0);
7172         else
7173                 exit(1);
7174 }
7175
7176 _ACEOF
7177 if ac_fn_c_try_run "$LINENO"; then :
7178   { $as_echo "$as_me:${as_lineno-$LINENO}: result: working" >&5
7179 $as_echo "working" >&6; }
7180 else
7181   { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5
7182 $as_echo "buggy" >&6; }
7183
7184 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
7185
7186
7187 fi
7188 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7189   conftest.$ac_objext conftest.beam conftest.$ac_ext
7190 fi
7191
7192         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7193
7194         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7195
7196         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7197
7198
7199 $as_echo "#define BROKEN_GLOB 1" >>confdefs.h
7200
7201
7202 cat >>confdefs.h <<_ACEOF
7203 #define BIND_8_COMPAT 1
7204 _ACEOF
7205
7206
7207 $as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
7208
7209
7210 $as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
7211
7212
7213 $as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
7214
7215
7216         ac_fn_c_check_decl "$LINENO" "AU_IPv4" "ac_cv_have_decl_AU_IPv4" "$ac_includes_default"
7217 if test "x$ac_cv_have_decl_AU_IPv4" = xyes; then :
7218
7219 else
7220
7221 $as_echo "#define AU_IPv4 0" >>confdefs.h
7222
7223             #include <bsm/audit.h>
7224
7225 $as_echo "#define LASTLOG_WRITE_PUTUTXLINE 1" >>confdefs.h
7226
7227
7228 fi
7229
7230
7231 $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7232
7233         for ac_func in sandbox_init
7234 do :
7235   ac_fn_c_check_func "$LINENO" "sandbox_init" "ac_cv_func_sandbox_init"
7236 if test "x$ac_cv_func_sandbox_init" = xyes; then :
7237   cat >>confdefs.h <<_ACEOF
7238 #define HAVE_SANDBOX_INIT 1
7239 _ACEOF
7240
7241 fi
7242 done
7243
7244         for ac_header in sandbox.h
7245 do :
7246   ac_fn_c_check_header_mongrel "$LINENO" "sandbox.h" "ac_cv_header_sandbox_h" "$ac_includes_default"
7247 if test "x$ac_cv_header_sandbox_h" = xyes; then :
7248   cat >>confdefs.h <<_ACEOF
7249 #define HAVE_SANDBOX_H 1
7250 _ACEOF
7251
7252 fi
7253
7254 done
7255
7256         ;;
7257 *-*-dragonfly*)
7258         SSHDLIBS="$SSHDLIBS -lcrypt"
7259         TEST_MALLOC_OPTIONS="AFGJPRX"
7260         ;;
7261 *-*-haiku*)
7262     LIBS="$LIBS -lbsd "
7263     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
7264 $as_echo_n "checking for socket in -lnetwork... " >&6; }
7265 if ${ac_cv_lib_network_socket+:} false; then :
7266   $as_echo_n "(cached) " >&6
7267 else
7268   ac_check_lib_save_LIBS=$LIBS
7269 LIBS="-lnetwork  $LIBS"
7270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7271 /* end confdefs.h.  */
7272
7273 /* Override any GCC internal prototype to avoid an error.
7274    Use char because int might match the return type of a GCC
7275    builtin and then its argument prototype would still apply.  */
7276 #ifdef __cplusplus
7277 extern "C"
7278 #endif
7279 char socket ();
7280 int
7281 main ()
7282 {
7283 return socket ();
7284   ;
7285   return 0;
7286 }
7287 _ACEOF
7288 if ac_fn_c_try_link "$LINENO"; then :
7289   ac_cv_lib_network_socket=yes
7290 else
7291   ac_cv_lib_network_socket=no
7292 fi
7293 rm -f core conftest.err conftest.$ac_objext \
7294     conftest$ac_exeext conftest.$ac_ext
7295 LIBS=$ac_check_lib_save_LIBS
7296 fi
7297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
7298 $as_echo "$ac_cv_lib_network_socket" >&6; }
7299 if test "x$ac_cv_lib_network_socket" = xyes; then :
7300   cat >>confdefs.h <<_ACEOF
7301 #define HAVE_LIBNETWORK 1
7302 _ACEOF
7303
7304   LIBS="-lnetwork $LIBS"
7305
7306 fi
7307
7308     $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
7309
7310     MANTYPE=man
7311     ;;
7312 *-*-hpux*)
7313         # first we define all of the options common to all HP-UX releases
7314         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
7315         IPADDR_IN_DISPLAY=yes
7316         $as_echo "#define USE_PIPES 1" >>confdefs.h
7317
7318
7319 $as_echo "#define LOGIN_NO_ENDOPT 1" >>confdefs.h
7320
7321         $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
7322
7323
7324 $as_echo "#define LOCKED_PASSWD_STRING \"*\"" >>confdefs.h
7325
7326         $as_echo "#define SPT_TYPE SPT_PSTAT" >>confdefs.h
7327
7328
7329 $as_echo "#define PLATFORM_SYS_DIR_UID 2" >>confdefs.h
7330
7331         maildir="/var/mail"
7332         LIBS="$LIBS -lsec"
7333         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_error in -lxnet" >&5
7334 $as_echo_n "checking for t_error in -lxnet... " >&6; }
7335 if ${ac_cv_lib_xnet_t_error+:} false; then :
7336   $as_echo_n "(cached) " >&6
7337 else
7338   ac_check_lib_save_LIBS=$LIBS
7339 LIBS="-lxnet  $LIBS"
7340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7341 /* end confdefs.h.  */
7342
7343 /* Override any GCC internal prototype to avoid an error.
7344    Use char because int might match the return type of a GCC
7345    builtin and then its argument prototype would still apply.  */
7346 #ifdef __cplusplus
7347 extern "C"
7348 #endif
7349 char t_error ();
7350 int
7351 main ()
7352 {
7353 return t_error ();
7354   ;
7355   return 0;
7356 }
7357 _ACEOF
7358 if ac_fn_c_try_link "$LINENO"; then :
7359   ac_cv_lib_xnet_t_error=yes
7360 else
7361   ac_cv_lib_xnet_t_error=no
7362 fi
7363 rm -f core conftest.err conftest.$ac_objext \
7364     conftest$ac_exeext conftest.$ac_ext
7365 LIBS=$ac_check_lib_save_LIBS
7366 fi
7367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_t_error" >&5
7368 $as_echo "$ac_cv_lib_xnet_t_error" >&6; }
7369 if test "x$ac_cv_lib_xnet_t_error" = xyes; then :
7370   cat >>confdefs.h <<_ACEOF
7371 #define HAVE_LIBXNET 1
7372 _ACEOF
7373
7374   LIBS="-lxnet $LIBS"
7375
7376 else
7377   as_fn_error $? "*** -lxnet needed on HP-UX - check config.log ***" "$LINENO" 5
7378 fi
7379
7380
7381         # next, we define all of the options specific to major releases
7382         case "$host" in
7383         *-*-hpux10*)
7384                 if test -z "$GCC"; then
7385                         CFLAGS="$CFLAGS -Ae"
7386                 fi
7387                 ;;
7388         *-*-hpux11*)
7389
7390 $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
7391
7392
7393 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
7394
7395
7396 $as_echo "#define USE_BTMP 1" >>confdefs.h
7397
7398                 check_for_hpux_broken_getaddrinfo=1
7399                 check_for_conflicting_getspnam=1
7400                 ;;
7401         esac
7402
7403         # lastly, we define options specific to minor releases
7404         case "$host" in
7405         *-*-hpux10.26)
7406
7407 $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
7408
7409                 disable_ptmx_check=yes
7410                 LIBS="$LIBS -lsecpw"
7411                 ;;
7412         esac
7413         ;;
7414 *-*-irix5*)
7415         PATH="$PATH:/usr/etc"
7416
7417 $as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
7418
7419         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7420
7421         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7422
7423         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7424
7425
7426 $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
7427
7428         $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7429
7430         ;;
7431 *-*-irix6*)
7432         PATH="$PATH:/usr/etc"
7433
7434 $as_echo "#define WITH_IRIX_ARRAY 1" >>confdefs.h
7435
7436
7437 $as_echo "#define WITH_IRIX_PROJECT 1" >>confdefs.h
7438
7439
7440 $as_echo "#define WITH_IRIX_AUDIT 1" >>confdefs.h
7441
7442         ac_fn_c_check_func "$LINENO" "jlimit_startjob" "ac_cv_func_jlimit_startjob"
7443 if test "x$ac_cv_func_jlimit_startjob" = xyes; then :
7444
7445 $as_echo "#define WITH_IRIX_JOBS 1" >>confdefs.h
7446
7447 fi
7448
7449         $as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
7450
7451         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7452
7453         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7454
7455         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7456
7457
7458 $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
7459
7460         $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
7461
7462         $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7463
7464         ;;
7465 *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
7466         check_for_libcrypt_later=1
7467         $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
7468
7469         $as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
7470
7471         $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7472
7473
7474 $as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
7475
7476
7477 $as_echo "#define USE_BTMP 1" >>confdefs.h
7478
7479         ;;
7480 *-*-linux*)
7481         no_dev_ptmx=1
7482         use_pie=auto
7483         check_for_libcrypt_later=1
7484         check_for_openpty_ctty_bug=1
7485
7486 $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
7487
7488
7489 $as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
7490
7491         $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7492
7493
7494 $as_echo "#define LINK_OPNOTSUPP_ERRNO EPERM" >>confdefs.h
7495
7496
7497 $as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
7498
7499         $as_echo "#define USE_BTMP 1" >>confdefs.h
7500
7501
7502 $as_echo "#define LINUX_OOM_ADJUST 1" >>confdefs.h
7503
7504         inet6_default_4in6=yes
7505         case `uname -r` in
7506         1.*|2.0.*)
7507
7508 $as_echo "#define BROKEN_CMSG_TYPE 1" >>confdefs.h
7509
7510                 ;;
7511         esac
7512         # tun(4) forwarding compat code
7513         for ac_header in linux/if_tun.h
7514 do :
7515   ac_fn_c_check_header_mongrel "$LINENO" "linux/if_tun.h" "ac_cv_header_linux_if_tun_h" "$ac_includes_default"
7516 if test "x$ac_cv_header_linux_if_tun_h" = xyes; then :
7517   cat >>confdefs.h <<_ACEOF
7518 #define HAVE_LINUX_IF_TUN_H 1
7519 _ACEOF
7520
7521 fi
7522
7523 done
7524
7525         if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then
7526
7527 $as_echo "#define SSH_TUN_LINUX 1" >>confdefs.h
7528
7529
7530 $as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
7531
7532
7533 $as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
7534
7535         fi
7536         for ac_header in linux/seccomp.h linux/filter.h linux/audit.h
7537 do :
7538   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7539 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <linux/types.h>
7540 "
7541 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7542   cat >>confdefs.h <<_ACEOF
7543 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7544 _ACEOF
7545
7546 fi
7547
7548 done
7549
7550         for ac_func in prctl
7551 do :
7552   ac_fn_c_check_func "$LINENO" "prctl" "ac_cv_func_prctl"
7553 if test "x$ac_cv_func_prctl" = xyes; then :
7554   cat >>confdefs.h <<_ACEOF
7555 #define HAVE_PRCTL 1
7556 _ACEOF
7557
7558 fi
7559 done
7560
7561         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for seccomp architecture" >&5
7562 $as_echo_n "checking for seccomp architecture... " >&6; }
7563         seccomp_audit_arch=
7564         case "$host" in
7565         x86_64-*)
7566                 seccomp_audit_arch=AUDIT_ARCH_X86_64
7567                 ;;
7568         i*86-*)
7569                 seccomp_audit_arch=AUDIT_ARCH_I386
7570                 ;;
7571         arm*-*)
7572                 seccomp_audit_arch=AUDIT_ARCH_ARM
7573                 ;;
7574         esac
7575         if test "x$seccomp_audit_arch" != "x" ; then
7576                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$seccomp_audit_arch\"" >&5
7577 $as_echo "\"$seccomp_audit_arch\"" >&6; }
7578
7579 cat >>confdefs.h <<_ACEOF
7580 #define SECCOMP_AUDIT_ARCH $seccomp_audit_arch
7581 _ACEOF
7582
7583         else
7584                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: architecture not supported" >&5
7585 $as_echo "architecture not supported" >&6; }
7586         fi
7587         ;;
7588 mips-sony-bsd|mips-sony-newsos4)
7589
7590 $as_echo "#define NEED_SETPGRP 1" >>confdefs.h
7591
7592         SONY=1
7593         ;;
7594 *-*-netbsd*)
7595         check_for_libcrypt_before=1
7596         if test "x$withval" != "xno" ; then
7597                 need_dash_r=1
7598         fi
7599
7600 $as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
7601
7602         ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
7603 if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
7604
7605 else
7606
7607 $as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
7608
7609 fi
7610
7611
7612
7613 $as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
7614
7615         TEST_MALLOC_OPTIONS="AJRX"
7616
7617 $as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
7618
7619
7620 $as_echo "#define BROKEN_READ_COMPARISON 1" >>confdefs.h
7621
7622         ;;
7623 *-*-freebsd*)
7624         check_for_libcrypt_later=1
7625
7626 $as_echo "#define LOCKED_PASSWD_PREFIX \"*LOCKED*\"" >>confdefs.h
7627
7628
7629 $as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
7630
7631         ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
7632 if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
7633
7634 else
7635
7636 $as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
7637
7638 fi
7639
7640
7641
7642 $as_echo "#define BROKEN_GLOB 1" >>confdefs.h
7643
7644
7645 $as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
7646
7647         TEST_MALLOC_OPTIONS="AJRX"
7648         # Preauth crypto occasionally uses file descriptors for crypto offload
7649         # and will crash if they cannot be opened.
7650
7651 $as_echo "#define SANDBOX_SKIP_RLIMIT_NOFILE 1" >>confdefs.h
7652
7653         ;;
7654 *-*-bsdi*)
7655         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7656
7657         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7658
7659         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7660
7661         ;;
7662 *-next-*)
7663         conf_lastlog_location="/usr/adm/lastlog"
7664         conf_utmp_location=/etc/utmp
7665         conf_wtmp_location=/usr/adm/wtmp
7666         maildir=/usr/spool/mail
7667
7668 $as_echo "#define HAVE_NEXT 1" >>confdefs.h
7669
7670         $as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
7671
7672         $as_echo "#define USE_PIPES 1" >>confdefs.h
7673
7674
7675 $as_echo "#define BROKEN_SAVED_UIDS 1" >>confdefs.h
7676
7677         ;;
7678 *-*-openbsd*)
7679         use_pie=auto
7680
7681 $as_echo "#define HAVE_ATTRIBUTE__SENTINEL__ 1" >>confdefs.h
7682
7683
7684 $as_echo "#define HAVE_ATTRIBUTE__BOUNDED__ 1" >>confdefs.h
7685
7686
7687 $as_echo "#define SSH_TUN_OPENBSD 1" >>confdefs.h
7688
7689
7690 $as_echo "#define SYSLOG_R_SAFE_IN_SIGHAND 1" >>confdefs.h
7691
7692         TEST_MALLOC_OPTIONS="AFGJPRX"
7693         ;;
7694 *-*-solaris*)
7695         if test "x$withval" != "xno" ; then
7696                 need_dash_r=1
7697         fi
7698         $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
7699
7700         $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
7701
7702
7703 $as_echo "#define LOGIN_NEEDS_TERM 1" >>confdefs.h
7704
7705         $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
7706
7707
7708 $as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
7709
7710         $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7711
7712         # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
7713
7714 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
7715
7716
7717 $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
7718
7719
7720 $as_echo "#define BROKEN_TCGETATTR_ICANON 1" >>confdefs.h
7721
7722         external_path_file=/etc/default/login
7723         # hardwire lastlog location (can't detect it on some versions)
7724         conf_lastlog_location="/var/adm/lastlog"
7725         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obsolete utmp and wtmp in solaris2.x" >&5
7726 $as_echo_n "checking for obsolete utmp and wtmp in solaris2.x... " >&6; }
7727         sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
7728         if test "$sol2ver" -ge 8; then
7729                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7730 $as_echo "yes" >&6; }
7731                 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
7732
7733
7734 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
7735
7736         else
7737                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7738 $as_echo "no" >&6; }
7739         fi
7740
7741 # Check whether --with-solaris-contracts was given.
7742 if test "${with_solaris_contracts+set}" = set; then :
7743   withval=$with_solaris_contracts;
7744                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ct_tmpl_activate in -lcontract" >&5
7745 $as_echo_n "checking for ct_tmpl_activate in -lcontract... " >&6; }
7746 if ${ac_cv_lib_contract_ct_tmpl_activate+:} false; then :
7747   $as_echo_n "(cached) " >&6
7748 else
7749   ac_check_lib_save_LIBS=$LIBS
7750 LIBS="-lcontract  $LIBS"
7751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7752 /* end confdefs.h.  */
7753
7754 /* Override any GCC internal prototype to avoid an error.
7755    Use char because int might match the return type of a GCC
7756    builtin and then its argument prototype would still apply.  */
7757 #ifdef __cplusplus
7758 extern "C"
7759 #endif
7760 char ct_tmpl_activate ();
7761 int
7762 main ()
7763 {
7764 return ct_tmpl_activate ();
7765   ;
7766   return 0;
7767 }
7768 _ACEOF
7769 if ac_fn_c_try_link "$LINENO"; then :
7770   ac_cv_lib_contract_ct_tmpl_activate=yes
7771 else
7772   ac_cv_lib_contract_ct_tmpl_activate=no
7773 fi
7774 rm -f core conftest.err conftest.$ac_objext \
7775     conftest$ac_exeext conftest.$ac_ext
7776 LIBS=$ac_check_lib_save_LIBS
7777 fi
7778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_contract_ct_tmpl_activate" >&5
7779 $as_echo "$ac_cv_lib_contract_ct_tmpl_activate" >&6; }
7780 if test "x$ac_cv_lib_contract_ct_tmpl_activate" = xyes; then :
7781
7782 $as_echo "#define USE_SOLARIS_PROCESS_CONTRACTS 1" >>confdefs.h
7783
7784                           SSHDLIBS="$SSHDLIBS -lcontract"
7785                           SPC_MSG="yes"
7786 fi
7787
7788
7789 fi
7790
7791
7792 # Check whether --with-solaris-projects was given.
7793 if test "${with_solaris_projects+set}" = set; then :
7794   withval=$with_solaris_projects;
7795                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproject in -lproject" >&5
7796 $as_echo_n "checking for setproject in -lproject... " >&6; }
7797 if ${ac_cv_lib_project_setproject+:} false; then :
7798   $as_echo_n "(cached) " >&6
7799 else
7800   ac_check_lib_save_LIBS=$LIBS
7801 LIBS="-lproject  $LIBS"
7802 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7803 /* end confdefs.h.  */
7804
7805 /* Override any GCC internal prototype to avoid an error.
7806    Use char because int might match the return type of a GCC
7807    builtin and then its argument prototype would still apply.  */
7808 #ifdef __cplusplus
7809 extern "C"
7810 #endif
7811 char setproject ();
7812 int
7813 main ()
7814 {
7815 return setproject ();
7816   ;
7817   return 0;
7818 }
7819 _ACEOF
7820 if ac_fn_c_try_link "$LINENO"; then :
7821   ac_cv_lib_project_setproject=yes
7822 else
7823   ac_cv_lib_project_setproject=no
7824 fi
7825 rm -f core conftest.err conftest.$ac_objext \
7826     conftest$ac_exeext conftest.$ac_ext
7827 LIBS=$ac_check_lib_save_LIBS
7828 fi
7829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_project_setproject" >&5
7830 $as_echo "$ac_cv_lib_project_setproject" >&6; }
7831 if test "x$ac_cv_lib_project_setproject" = xyes; then :
7832
7833 $as_echo "#define USE_SOLARIS_PROJECTS 1" >>confdefs.h
7834
7835                         SSHDLIBS="$SSHDLIBS -lproject"
7836                         SP_MSG="yes"
7837 fi
7838
7839
7840 fi
7841
7842         TEST_SHELL=$SHELL       # let configure find us a capable shell
7843         ;;
7844 *-*-sunos4*)
7845         CPPFLAGS="$CPPFLAGS -DSUNOS4"
7846         for ac_func in getpwanam
7847 do :
7848   ac_fn_c_check_func "$LINENO" "getpwanam" "ac_cv_func_getpwanam"
7849 if test "x$ac_cv_func_getpwanam" = xyes; then :
7850   cat >>confdefs.h <<_ACEOF
7851 #define HAVE_GETPWANAM 1
7852 _ACEOF
7853
7854 fi
7855 done
7856
7857         $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
7858
7859         conf_utmp_location=/etc/utmp
7860         conf_wtmp_location=/var/adm/wtmp
7861         conf_lastlog_location=/var/adm/lastlog
7862         $as_echo "#define USE_PIPES 1" >>confdefs.h
7863
7864         ;;
7865 *-ncr-sysv*)
7866         LIBS="$LIBS -lc89"
7867         $as_echo "#define USE_PIPES 1" >>confdefs.h
7868
7869         $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
7870
7871         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7872
7873         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7874
7875         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7876
7877         ;;
7878 *-sni-sysv*)
7879         # /usr/ucblib MUST NOT be searched on ReliantUNIX
7880         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
7881 $as_echo_n "checking for dlsym in -ldl... " >&6; }
7882 if ${ac_cv_lib_dl_dlsym+:} false; then :
7883   $as_echo_n "(cached) " >&6
7884 else
7885   ac_check_lib_save_LIBS=$LIBS
7886 LIBS="-ldl  $LIBS"
7887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7888 /* end confdefs.h.  */
7889
7890 /* Override any GCC internal prototype to avoid an error.
7891    Use char because int might match the return type of a GCC
7892    builtin and then its argument prototype would still apply.  */
7893 #ifdef __cplusplus
7894 extern "C"
7895 #endif
7896 char dlsym ();
7897 int
7898 main ()
7899 {
7900 return dlsym ();
7901   ;
7902   return 0;
7903 }
7904 _ACEOF
7905 if ac_fn_c_try_link "$LINENO"; then :
7906   ac_cv_lib_dl_dlsym=yes
7907 else
7908   ac_cv_lib_dl_dlsym=no
7909 fi
7910 rm -f core conftest.err conftest.$ac_objext \
7911     conftest$ac_exeext conftest.$ac_ext
7912 LIBS=$ac_check_lib_save_LIBS
7913 fi
7914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
7915 $as_echo "$ac_cv_lib_dl_dlsym" >&6; }
7916 if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
7917   cat >>confdefs.h <<_ACEOF
7918 #define HAVE_LIBDL 1
7919 _ACEOF
7920
7921   LIBS="-ldl $LIBS"
7922
7923 fi
7924
7925         # -lresolv needs to be at the end of LIBS or DNS lookups break
7926         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
7927 $as_echo_n "checking for res_query in -lresolv... " >&6; }
7928 if ${ac_cv_lib_resolv_res_query+:} false; then :
7929   $as_echo_n "(cached) " >&6
7930 else
7931   ac_check_lib_save_LIBS=$LIBS
7932 LIBS="-lresolv  $LIBS"
7933 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7934 /* end confdefs.h.  */
7935
7936 /* Override any GCC internal prototype to avoid an error.
7937    Use char because int might match the return type of a GCC
7938    builtin and then its argument prototype would still apply.  */
7939 #ifdef __cplusplus
7940 extern "C"
7941 #endif
7942 char res_query ();
7943 int
7944 main ()
7945 {
7946 return res_query ();
7947   ;
7948   return 0;
7949 }
7950 _ACEOF
7951 if ac_fn_c_try_link "$LINENO"; then :
7952   ac_cv_lib_resolv_res_query=yes
7953 else
7954   ac_cv_lib_resolv_res_query=no
7955 fi
7956 rm -f core conftest.err conftest.$ac_objext \
7957     conftest$ac_exeext conftest.$ac_ext
7958 LIBS=$ac_check_lib_save_LIBS
7959 fi
7960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_query" >&5
7961 $as_echo "$ac_cv_lib_resolv_res_query" >&6; }
7962 if test "x$ac_cv_lib_resolv_res_query" = xyes; then :
7963    LIBS="$LIBS -lresolv"
7964 fi
7965
7966         IPADDR_IN_DISPLAY=yes
7967         $as_echo "#define USE_PIPES 1" >>confdefs.h
7968
7969         $as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
7970
7971         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7972
7973         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7974
7975         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7976
7977         $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
7978
7979         external_path_file=/etc/default/login
7980         # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
7981         # Attention: always take care to bind libsocket and libnsl before libc,
7982         # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
7983         ;;
7984 # UnixWare 1.x, UnixWare 2.x, and others based on code from Univel.
7985 *-*-sysv4.2*)
7986         $as_echo "#define USE_PIPES 1" >>confdefs.h
7987
7988         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7989
7990         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7991
7992         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7993
7994
7995 $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
7996
7997         $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7998
7999         TEST_SHELL=$SHELL       # let configure find us a capable shell
8000         ;;
8001 # UnixWare 7.x, OpenUNIX 8
8002 *-*-sysv5*)
8003         CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf"
8004
8005 $as_echo "#define UNIXWARE_LONG_PASSWORDS 1" >>confdefs.h
8006
8007         $as_echo "#define USE_PIPES 1" >>confdefs.h
8008
8009         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8010
8011         $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
8012
8013         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8014
8015         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8016
8017         $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
8018
8019         TEST_SHELL=$SHELL       # let configure find us a capable shell
8020         case "$host" in
8021         *-*-sysv5SCO_SV*)       # SCO OpenServer 6.x
8022                 maildir=/var/spool/mail
8023
8024 $as_echo "#define BROKEN_LIBIAF 1" >>confdefs.h
8025
8026                 $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
8027
8028                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getluid in -lprot" >&5
8029 $as_echo_n "checking for getluid in -lprot... " >&6; }
8030 if ${ac_cv_lib_prot_getluid+:} false; then :
8031   $as_echo_n "(cached) " >&6
8032 else
8033   ac_check_lib_save_LIBS=$LIBS
8034 LIBS="-lprot  $LIBS"
8035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8036 /* end confdefs.h.  */
8037
8038 /* Override any GCC internal prototype to avoid an error.
8039    Use char because int might match the return type of a GCC
8040    builtin and then its argument prototype would still apply.  */
8041 #ifdef __cplusplus
8042 extern "C"
8043 #endif
8044 char getluid ();
8045 int
8046 main ()
8047 {
8048 return getluid ();
8049   ;
8050   return 0;
8051 }
8052 _ACEOF
8053 if ac_fn_c_try_link "$LINENO"; then :
8054   ac_cv_lib_prot_getluid=yes
8055 else
8056   ac_cv_lib_prot_getluid=no
8057 fi
8058 rm -f core conftest.err conftest.$ac_objext \
8059     conftest$ac_exeext conftest.$ac_ext
8060 LIBS=$ac_check_lib_save_LIBS
8061 fi
8062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getluid" >&5
8063 $as_echo "$ac_cv_lib_prot_getluid" >&6; }
8064 if test "x$ac_cv_lib_prot_getluid" = xyes; then :
8065    LIBS="$LIBS -lprot"
8066                         for ac_func in getluid setluid
8067 do :
8068   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8069 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8070 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8071   cat >>confdefs.h <<_ACEOF
8072 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8073 _ACEOF
8074
8075 fi
8076 done
8077
8078                         $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
8079
8080                         $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
8081
8082
8083 fi
8084
8085                 ;;
8086         *)      $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
8087
8088                 check_for_libcrypt_later=1
8089                 ;;
8090         esac
8091         ;;
8092 *-*-sysv*)
8093         ;;
8094 # SCO UNIX and OEM versions of SCO UNIX
8095 *-*-sco3.2v4*)
8096         as_fn_error $? "\"This Platform is no longer supported.\"" "$LINENO" 5
8097         ;;
8098 # SCO OpenServer 5.x
8099 *-*-sco3.2v5*)
8100         if test -z "$GCC"; then
8101                 CFLAGS="$CFLAGS -belf"
8102         fi
8103         LIBS="$LIBS -lprot -lx -ltinfo -lm"
8104         no_dev_ptmx=1
8105         $as_echo "#define USE_PIPES 1" >>confdefs.h
8106
8107         $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
8108
8109         $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
8110
8111         $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8112
8113         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8114
8115         $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
8116
8117         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8118
8119         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8120
8121         $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
8122
8123         $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
8124
8125         $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
8126
8127         for ac_func in getluid setluid
8128 do :
8129   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8130 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8131 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8132   cat >>confdefs.h <<_ACEOF
8133 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8134 _ACEOF
8135
8136 fi
8137 done
8138
8139         MANTYPE=man
8140         TEST_SHELL=$SHELL       # let configure find us a capable shell
8141         SKIP_DISABLE_LASTLOG_DEFINE=yes
8142         ;;
8143 *-*-unicosmk*)
8144
8145 $as_echo "#define NO_SSH_LASTLOG 1" >>confdefs.h
8146
8147         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8148
8149         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8150
8151         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8152
8153         $as_echo "#define USE_PIPES 1" >>confdefs.h
8154
8155         $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8156
8157         LDFLAGS="$LDFLAGS"
8158         LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
8159         MANTYPE=cat
8160         ;;
8161 *-*-unicosmp*)
8162         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8163
8164         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8165
8166         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8167
8168         $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
8169
8170         $as_echo "#define USE_PIPES 1" >>confdefs.h
8171
8172         $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8173
8174         LDFLAGS="$LDFLAGS"
8175         LIBS="$LIBS -lgen -lacid -ldb"
8176         MANTYPE=cat
8177         ;;
8178 *-*-unicos*)
8179         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8180
8181         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8182
8183         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8184
8185         $as_echo "#define USE_PIPES 1" >>confdefs.h
8186
8187         $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8188
8189         $as_echo "#define NO_SSH_LASTLOG 1" >>confdefs.h
8190
8191         LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal"
8192         LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
8193         MANTYPE=cat
8194         ;;
8195 *-dec-osf*)
8196         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Digital Unix SIA" >&5
8197 $as_echo_n "checking for Digital Unix SIA... " >&6; }
8198         no_osfsia=""
8199
8200 # Check whether --with-osfsia was given.
8201 if test "${with_osfsia+set}" = set; then :
8202   withval=$with_osfsia;
8203                         if test "x$withval" = "xno" ; then
8204                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8205 $as_echo "disabled" >&6; }
8206                                 no_osfsia=1
8207                         fi
8208
8209 fi
8210
8211         if test -z "$no_osfsia" ; then
8212                 if test -f /etc/sia/matrix.conf; then
8213                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8214 $as_echo "yes" >&6; }
8215
8216 $as_echo "#define HAVE_OSF_SIA 1" >>confdefs.h
8217
8218
8219 $as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
8220
8221                         $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8222
8223                         LIBS="$LIBS -lsecurity -ldb -lm -laud"
8224                         SIA_MSG="yes"
8225                 else
8226                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8227 $as_echo "no" >&6; }
8228
8229 $as_echo "#define LOCKED_PASSWD_SUBSTR \"Nologin\"" >>confdefs.h
8230
8231                 fi
8232         fi
8233         $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
8234
8235         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8236
8237         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8238
8239         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8240
8241
8242 $as_echo "#define BROKEN_READV_COMPARISON 1" >>confdefs.h
8243
8244         ;;
8245
8246 *-*-nto-qnx*)
8247         $as_echo "#define USE_PIPES 1" >>confdefs.h
8248
8249         $as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
8250
8251         $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
8252
8253         $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
8254
8255
8256 $as_echo "#define BROKEN_SHADOW_EXPIRE 1" >>confdefs.h
8257
8258         enable_etc_default_login=no     # has incompatible /etc/default/login
8259         case "$host" in
8260         *-*-nto-qnx6*)
8261                 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
8262
8263                 ;;
8264         esac
8265         ;;
8266
8267 *-*-ultrix*)
8268
8269 $as_echo "#define BROKEN_GETGROUPS 1" >>confdefs.h
8270
8271
8272 $as_echo "#define BROKEN_MMAP 1" >>confdefs.h
8273
8274         $as_echo "#define NEED_SETPGRP 1" >>confdefs.h
8275
8276
8277 $as_echo "#define HAVE_SYS_SYSLOG_H 1" >>confdefs.h
8278
8279         ;;
8280
8281 *-*-lynxos)
8282         CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
8283
8284 $as_echo "#define BROKEN_SETVBUF 1" >>confdefs.h
8285
8286         ;;
8287 esac
8288
8289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler and flags for sanity" >&5
8290 $as_echo_n "checking compiler and flags for sanity... " >&6; }
8291 if test "$cross_compiling" = yes; then :
8292         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking compiler sanity" >&5
8293 $as_echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;}
8294
8295 else
8296   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8297 /* end confdefs.h.  */
8298  #include <stdio.h>
8299 int
8300 main ()
8301 {
8302  exit(0);
8303   ;
8304   return 0;
8305 }
8306 _ACEOF
8307 if ac_fn_c_try_run "$LINENO"; then :
8308         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8309 $as_echo "yes" >&6; }
8310 else
8311
8312                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8313 $as_echo "no" >&6; }
8314                 as_fn_error $? "*** compiler cannot create working executables, check config.log ***" "$LINENO" 5
8315
8316 fi
8317 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8318   conftest.$ac_objext conftest.beam conftest.$ac_ext
8319 fi
8320
8321
8322 # Checks for libraries.
8323 ac_fn_c_check_func "$LINENO" "yp_match" "ac_cv_func_yp_match"
8324 if test "x$ac_cv_func_yp_match" = xyes; then :
8325
8326 else
8327   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yp_match in -lnsl" >&5
8328 $as_echo_n "checking for yp_match in -lnsl... " >&6; }
8329 if ${ac_cv_lib_nsl_yp_match+:} false; then :
8330   $as_echo_n "(cached) " >&6
8331 else
8332   ac_check_lib_save_LIBS=$LIBS
8333 LIBS="-lnsl  $LIBS"
8334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8335 /* end confdefs.h.  */
8336
8337 /* Override any GCC internal prototype to avoid an error.
8338    Use char because int might match the return type of a GCC
8339    builtin and then its argument prototype would still apply.  */
8340 #ifdef __cplusplus
8341 extern "C"
8342 #endif
8343 char yp_match ();
8344 int
8345 main ()
8346 {
8347 return yp_match ();
8348   ;
8349   return 0;
8350 }
8351 _ACEOF
8352 if ac_fn_c_try_link "$LINENO"; then :
8353   ac_cv_lib_nsl_yp_match=yes
8354 else
8355   ac_cv_lib_nsl_yp_match=no
8356 fi
8357 rm -f core conftest.err conftest.$ac_objext \
8358     conftest$ac_exeext conftest.$ac_ext
8359 LIBS=$ac_check_lib_save_LIBS
8360 fi
8361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_yp_match" >&5
8362 $as_echo "$ac_cv_lib_nsl_yp_match" >&6; }
8363 if test "x$ac_cv_lib_nsl_yp_match" = xyes; then :
8364   cat >>confdefs.h <<_ACEOF
8365 #define HAVE_LIBNSL 1
8366 _ACEOF
8367
8368   LIBS="-lnsl $LIBS"
8369
8370 fi
8371
8372 fi
8373
8374 ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt"
8375 if test "x$ac_cv_func_setsockopt" = xyes; then :
8376
8377 else
8378   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5
8379 $as_echo_n "checking for setsockopt in -lsocket... " >&6; }
8380 if ${ac_cv_lib_socket_setsockopt+:} false; then :
8381   $as_echo_n "(cached) " >&6
8382 else
8383   ac_check_lib_save_LIBS=$LIBS
8384 LIBS="-lsocket  $LIBS"
8385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8386 /* end confdefs.h.  */
8387
8388 /* Override any GCC internal prototype to avoid an error.
8389    Use char because int might match the return type of a GCC
8390    builtin and then its argument prototype would still apply.  */
8391 #ifdef __cplusplus
8392 extern "C"
8393 #endif
8394 char setsockopt ();
8395 int
8396 main ()
8397 {
8398 return setsockopt ();
8399   ;
8400   return 0;
8401 }
8402 _ACEOF
8403 if ac_fn_c_try_link "$LINENO"; then :
8404   ac_cv_lib_socket_setsockopt=yes
8405 else
8406   ac_cv_lib_socket_setsockopt=no
8407 fi
8408 rm -f core conftest.err conftest.$ac_objext \
8409     conftest$ac_exeext conftest.$ac_ext
8410 LIBS=$ac_check_lib_save_LIBS
8411 fi
8412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5
8413 $as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
8414 if test "x$ac_cv_lib_socket_setsockopt" = xyes; then :
8415   cat >>confdefs.h <<_ACEOF
8416 #define HAVE_LIBSOCKET 1
8417 _ACEOF
8418
8419   LIBS="-lsocket $LIBS"
8420
8421 fi
8422
8423 fi
8424
8425
8426 for ac_func in dirname
8427 do :
8428   ac_fn_c_check_func "$LINENO" "dirname" "ac_cv_func_dirname"
8429 if test "x$ac_cv_func_dirname" = xyes; then :
8430   cat >>confdefs.h <<_ACEOF
8431 #define HAVE_DIRNAME 1
8432 _ACEOF
8433  for ac_header in libgen.h
8434 do :
8435   ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
8436 if test "x$ac_cv_header_libgen_h" = xyes; then :
8437   cat >>confdefs.h <<_ACEOF
8438 #define HAVE_LIBGEN_H 1
8439 _ACEOF
8440
8441 fi
8442
8443 done
8444
8445 else
8446
8447         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirname in -lgen" >&5
8448 $as_echo_n "checking for dirname in -lgen... " >&6; }
8449 if ${ac_cv_lib_gen_dirname+:} false; then :
8450   $as_echo_n "(cached) " >&6
8451 else
8452   ac_check_lib_save_LIBS=$LIBS
8453 LIBS="-lgen  $LIBS"
8454 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8455 /* end confdefs.h.  */
8456
8457 /* Override any GCC internal prototype to avoid an error.
8458    Use char because int might match the return type of a GCC
8459    builtin and then its argument prototype would still apply.  */
8460 #ifdef __cplusplus
8461 extern "C"
8462 #endif
8463 char dirname ();
8464 int
8465 main ()
8466 {
8467 return dirname ();
8468   ;
8469   return 0;
8470 }
8471 _ACEOF
8472 if ac_fn_c_try_link "$LINENO"; then :
8473   ac_cv_lib_gen_dirname=yes
8474 else
8475   ac_cv_lib_gen_dirname=no
8476 fi
8477 rm -f core conftest.err conftest.$ac_objext \
8478     conftest$ac_exeext conftest.$ac_ext
8479 LIBS=$ac_check_lib_save_LIBS
8480 fi
8481 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_dirname" >&5
8482 $as_echo "$ac_cv_lib_gen_dirname" >&6; }
8483 if test "x$ac_cv_lib_gen_dirname" = xyes; then :
8484
8485                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken dirname" >&5
8486 $as_echo_n "checking for broken dirname... " >&6; }
8487 if ${ac_cv_have_broken_dirname+:} false; then :
8488   $as_echo_n "(cached) " >&6
8489 else
8490
8491                         save_LIBS="$LIBS"
8492                         LIBS="$LIBS -lgen"
8493                         if test "$cross_compiling" = yes; then :
8494    ac_cv_have_broken_dirname="no"
8495 else
8496   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8497 /* end confdefs.h.  */
8498
8499 #include <libgen.h>
8500 #include <string.h>
8501
8502 int main(int argc, char **argv) {
8503     char *s, buf[32];
8504
8505     strncpy(buf,"/etc", 32);
8506     s = dirname(buf);
8507     if (!s || strncmp(s, "/", 32) != 0) {
8508         exit(1);
8509     } else {
8510         exit(0);
8511     }
8512 }
8513
8514 _ACEOF
8515 if ac_fn_c_try_run "$LINENO"; then :
8516    ac_cv_have_broken_dirname="no"
8517 else
8518    ac_cv_have_broken_dirname="yes"
8519 fi
8520 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8521   conftest.$ac_objext conftest.beam conftest.$ac_ext
8522 fi
8523
8524                         LIBS="$save_LIBS"
8525
8526 fi
8527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_broken_dirname" >&5
8528 $as_echo "$ac_cv_have_broken_dirname" >&6; }
8529                 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
8530                         LIBS="$LIBS -lgen"
8531                         $as_echo "#define HAVE_DIRNAME 1" >>confdefs.h
8532
8533                         for ac_header in libgen.h
8534 do :
8535   ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
8536 if test "x$ac_cv_header_libgen_h" = xyes; then :
8537   cat >>confdefs.h <<_ACEOF
8538 #define HAVE_LIBGEN_H 1
8539 _ACEOF
8540
8541 fi
8542
8543 done
8544
8545                 fi
8546
8547 fi
8548
8549
8550 fi
8551 done
8552
8553
8554 ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
8555 if test "x$ac_cv_func_getspnam" = xyes; then :
8556
8557 else
8558   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
8559 $as_echo_n "checking for getspnam in -lgen... " >&6; }
8560 if ${ac_cv_lib_gen_getspnam+:} false; then :
8561   $as_echo_n "(cached) " >&6
8562 else
8563   ac_check_lib_save_LIBS=$LIBS
8564 LIBS="-lgen  $LIBS"
8565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8566 /* end confdefs.h.  */
8567
8568 /* Override any GCC internal prototype to avoid an error.
8569    Use char because int might match the return type of a GCC
8570    builtin and then its argument prototype would still apply.  */
8571 #ifdef __cplusplus
8572 extern "C"
8573 #endif
8574 char getspnam ();
8575 int
8576 main ()
8577 {
8578 return getspnam ();
8579   ;
8580   return 0;
8581 }
8582 _ACEOF
8583 if ac_fn_c_try_link "$LINENO"; then :
8584   ac_cv_lib_gen_getspnam=yes
8585 else
8586   ac_cv_lib_gen_getspnam=no
8587 fi
8588 rm -f core conftest.err conftest.$ac_objext \
8589     conftest$ac_exeext conftest.$ac_ext
8590 LIBS=$ac_check_lib_save_LIBS
8591 fi
8592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
8593 $as_echo "$ac_cv_lib_gen_getspnam" >&6; }
8594 if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
8595   LIBS="$LIBS -lgen"
8596 fi
8597
8598 fi
8599
8600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing basename" >&5
8601 $as_echo_n "checking for library containing basename... " >&6; }
8602 if ${ac_cv_search_basename+:} false; then :
8603   $as_echo_n "(cached) " >&6
8604 else
8605   ac_func_search_save_LIBS=$LIBS
8606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8607 /* end confdefs.h.  */
8608
8609 /* Override any GCC internal prototype to avoid an error.
8610    Use char because int might match the return type of a GCC
8611    builtin and then its argument prototype would still apply.  */
8612 #ifdef __cplusplus
8613 extern "C"
8614 #endif
8615 char basename ();
8616 int
8617 main ()
8618 {
8619 return basename ();
8620   ;
8621   return 0;
8622 }
8623 _ACEOF
8624 for ac_lib in '' gen; do
8625   if test -z "$ac_lib"; then
8626     ac_res="none required"
8627   else
8628     ac_res=-l$ac_lib
8629     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8630   fi
8631   if ac_fn_c_try_link "$LINENO"; then :
8632   ac_cv_search_basename=$ac_res
8633 fi
8634 rm -f core conftest.err conftest.$ac_objext \
8635     conftest$ac_exeext
8636   if ${ac_cv_search_basename+:} false; then :
8637   break
8638 fi
8639 done
8640 if ${ac_cv_search_basename+:} false; then :
8641
8642 else
8643   ac_cv_search_basename=no
8644 fi
8645 rm conftest.$ac_ext
8646 LIBS=$ac_func_search_save_LIBS
8647 fi
8648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_basename" >&5
8649 $as_echo "$ac_cv_search_basename" >&6; }
8650 ac_res=$ac_cv_search_basename
8651 if test "$ac_res" != no; then :
8652   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8653
8654 $as_echo "#define HAVE_BASENAME 1" >>confdefs.h
8655
8656 fi
8657
8658
8659
8660 # Check whether --with-zlib was given.
8661 if test "${with_zlib+set}" = set; then :
8662   withval=$with_zlib;  if test "x$withval" = "xno" ; then
8663                 as_fn_error $? "*** zlib is required ***" "$LINENO" 5
8664           elif test "x$withval" != "xyes"; then
8665                 if test -d "$withval/lib"; then
8666                         if test -n "${need_dash_r}"; then
8667                                 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
8668                         else
8669                                 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
8670                         fi
8671                 else
8672                         if test -n "${need_dash_r}"; then
8673                                 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
8674                         else
8675                                 LDFLAGS="-L${withval} ${LDFLAGS}"
8676                         fi
8677                 fi
8678                 if test -d "$withval/include"; then
8679                         CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
8680                 else
8681                         CPPFLAGS="-I${withval} ${CPPFLAGS}"
8682                 fi
8683         fi
8684
8685 fi
8686
8687
8688 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
8689 if test "x$ac_cv_header_zlib_h" = xyes; then :
8690
8691 else
8692   as_fn_error $? "*** zlib.h missing - please install first or check config.log ***" "$LINENO" 5
8693 fi
8694
8695
8696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
8697 $as_echo_n "checking for deflate in -lz... " >&6; }
8698 if ${ac_cv_lib_z_deflate+:} false; then :
8699   $as_echo_n "(cached) " >&6
8700 else
8701   ac_check_lib_save_LIBS=$LIBS
8702 LIBS="-lz  $LIBS"
8703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8704 /* end confdefs.h.  */
8705
8706 /* Override any GCC internal prototype to avoid an error.
8707    Use char because int might match the return type of a GCC
8708    builtin and then its argument prototype would still apply.  */
8709 #ifdef __cplusplus
8710 extern "C"
8711 #endif
8712 char deflate ();
8713 int
8714 main ()
8715 {
8716 return deflate ();
8717   ;
8718   return 0;
8719 }
8720 _ACEOF
8721 if ac_fn_c_try_link "$LINENO"; then :
8722   ac_cv_lib_z_deflate=yes
8723 else
8724   ac_cv_lib_z_deflate=no
8725 fi
8726 rm -f core conftest.err conftest.$ac_objext \
8727     conftest$ac_exeext conftest.$ac_ext
8728 LIBS=$ac_check_lib_save_LIBS
8729 fi
8730 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
8731 $as_echo "$ac_cv_lib_z_deflate" >&6; }
8732 if test "x$ac_cv_lib_z_deflate" = xyes; then :
8733   cat >>confdefs.h <<_ACEOF
8734 #define HAVE_LIBZ 1
8735 _ACEOF
8736
8737   LIBS="-lz $LIBS"
8738
8739 else
8740
8741                 saved_CPPFLAGS="$CPPFLAGS"
8742                 saved_LDFLAGS="$LDFLAGS"
8743                 save_LIBS="$LIBS"
8744                                 if test -n "${need_dash_r}"; then
8745                         LDFLAGS="-L/usr/local/lib -R/usr/local/lib ${saved_LDFLAGS}"
8746                 else
8747                         LDFLAGS="-L/usr/local/lib ${saved_LDFLAGS}"
8748                 fi
8749                 CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}"
8750                 LIBS="$LIBS -lz"
8751                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8752 /* end confdefs.h.  */
8753
8754 /* Override any GCC internal prototype to avoid an error.
8755    Use char because int might match the return type of a GCC
8756    builtin and then its argument prototype would still apply.  */
8757 #ifdef __cplusplus
8758 extern "C"
8759 #endif
8760 char deflate ();
8761 int
8762 main ()
8763 {
8764 return deflate ();
8765   ;
8766   return 0;
8767 }
8768 _ACEOF
8769 if ac_fn_c_try_link "$LINENO"; then :
8770   $as_echo "#define HAVE_LIBZ 1" >>confdefs.h
8771
8772 else
8773
8774                                 as_fn_error $? "*** zlib missing - please install first or check config.log ***" "$LINENO" 5
8775
8776
8777 fi
8778 rm -f core conftest.err conftest.$ac_objext \
8779     conftest$ac_exeext conftest.$ac_ext
8780
8781
8782 fi
8783
8784
8785
8786 # Check whether --with-zlib-version-check was given.
8787 if test "${with_zlib_version_check+set}" = set; then :
8788   withval=$with_zlib_version_check;   if test "x$withval" = "xno" ; then
8789                 zlib_check_nonfatal=1
8790            fi
8791
8792
8793 fi
8794
8795
8796 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for possibly buggy zlib" >&5
8797 $as_echo_n "checking for possibly buggy zlib... " >&6; }
8798 if test "$cross_compiling" = yes; then :
8799         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking zlib version" >&5
8800 $as_echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;}
8801
8802 else
8803   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8804 /* end confdefs.h.  */
8805
8806 #include <stdio.h>
8807 #include <stdlib.h>
8808 #include <zlib.h>
8809
8810 int
8811 main ()
8812 {
8813
8814         int a=0, b=0, c=0, d=0, n, v;
8815         n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
8816         if (n != 3 && n != 4)
8817                 exit(1);
8818         v = a*1000000 + b*10000 + c*100 + d;
8819         fprintf(stderr, "found zlib version %s (%d)\n", ZLIB_VERSION, v);
8820
8821         /* 1.1.4 is OK */
8822         if (a == 1 && b == 1 && c >= 4)
8823                 exit(0);
8824
8825         /* 1.2.3 and up are OK */
8826         if (v >= 1020300)
8827                 exit(0);
8828
8829         exit(2);
8830
8831   ;
8832   return 0;
8833 }
8834 _ACEOF
8835 if ac_fn_c_try_run "$LINENO"; then :
8836   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8837 $as_echo "no" >&6; }
8838 else
8839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8840 $as_echo "yes" >&6; }
8841           if test -z "$zlib_check_nonfatal" ; then
8842                 as_fn_error $? "*** zlib too old - check config.log ***
8843 Your reported zlib version has known security problems.  It's possible your
8844 vendor has fixed these problems without changing the version number.  If you
8845 are sure this is the case, you can disable the check by running
8846 \"./configure --without-zlib-version-check\".
8847 If you are in doubt, upgrade zlib to version 1.2.3 or greater.
8848 See http://www.gzip.org/zlib/ for details." "$LINENO" 5
8849           else
8850                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib version may have security problems" >&5
8851 $as_echo "$as_me: WARNING: zlib version may have security problems" >&2;}
8852           fi
8853
8854 fi
8855 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8856   conftest.$ac_objext conftest.beam conftest.$ac_ext
8857 fi
8858
8859
8860 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
8861 if test "x$ac_cv_func_strcasecmp" = xyes; then :
8862
8863 else
8864    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp in -lresolv" >&5
8865 $as_echo_n "checking for strcasecmp in -lresolv... " >&6; }
8866 if ${ac_cv_lib_resolv_strcasecmp+:} false; then :
8867   $as_echo_n "(cached) " >&6
8868 else
8869   ac_check_lib_save_LIBS=$LIBS
8870 LIBS="-lresolv  $LIBS"
8871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8872 /* end confdefs.h.  */
8873
8874 /* Override any GCC internal prototype to avoid an error.
8875    Use char because int might match the return type of a GCC
8876    builtin and then its argument prototype would still apply.  */
8877 #ifdef __cplusplus
8878 extern "C"
8879 #endif
8880 char strcasecmp ();
8881 int
8882 main ()
8883 {
8884 return strcasecmp ();
8885   ;
8886   return 0;
8887 }
8888 _ACEOF
8889 if ac_fn_c_try_link "$LINENO"; then :
8890   ac_cv_lib_resolv_strcasecmp=yes
8891 else
8892   ac_cv_lib_resolv_strcasecmp=no
8893 fi
8894 rm -f core conftest.err conftest.$ac_objext \
8895     conftest$ac_exeext conftest.$ac_ext
8896 LIBS=$ac_check_lib_save_LIBS
8897 fi
8898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_strcasecmp" >&5
8899 $as_echo "$ac_cv_lib_resolv_strcasecmp" >&6; }
8900 if test "x$ac_cv_lib_resolv_strcasecmp" = xyes; then :
8901   LIBS="$LIBS -lresolv"
8902 fi
8903
8904
8905 fi
8906
8907 for ac_func in utimes
8908 do :
8909   ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
8910 if test "x$ac_cv_func_utimes" = xyes; then :
8911   cat >>confdefs.h <<_ACEOF
8912 #define HAVE_UTIMES 1
8913 _ACEOF
8914
8915 else
8916    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimes in -lc89" >&5
8917 $as_echo_n "checking for utimes in -lc89... " >&6; }
8918 if ${ac_cv_lib_c89_utimes+:} false; then :
8919   $as_echo_n "(cached) " >&6
8920 else
8921   ac_check_lib_save_LIBS=$LIBS
8922 LIBS="-lc89  $LIBS"
8923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8924 /* end confdefs.h.  */
8925
8926 /* Override any GCC internal prototype to avoid an error.
8927    Use char because int might match the return type of a GCC
8928    builtin and then its argument prototype would still apply.  */
8929 #ifdef __cplusplus
8930 extern "C"
8931 #endif
8932 char utimes ();
8933 int
8934 main ()
8935 {
8936 return utimes ();
8937   ;
8938   return 0;
8939 }
8940 _ACEOF
8941 if ac_fn_c_try_link "$LINENO"; then :
8942   ac_cv_lib_c89_utimes=yes
8943 else
8944   ac_cv_lib_c89_utimes=no
8945 fi
8946 rm -f core conftest.err conftest.$ac_objext \
8947     conftest$ac_exeext conftest.$ac_ext
8948 LIBS=$ac_check_lib_save_LIBS
8949 fi
8950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c89_utimes" >&5
8951 $as_echo "$ac_cv_lib_c89_utimes" >&6; }
8952 if test "x$ac_cv_lib_c89_utimes" = xyes; then :
8953   $as_echo "#define HAVE_UTIMES 1" >>confdefs.h
8954
8955                                         LIBS="$LIBS -lc89"
8956 fi
8957
8958
8959 fi
8960 done
8961
8962
8963 for ac_header in bsd/libutil.h libutil.h
8964 do :
8965   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8966 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8967 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8968   cat >>confdefs.h <<_ACEOF
8969 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8970 _ACEOF
8971
8972 fi
8973
8974 done
8975
8976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fmt_scaled" >&5
8977 $as_echo_n "checking for library containing fmt_scaled... " >&6; }
8978 if ${ac_cv_search_fmt_scaled+:} false; then :
8979   $as_echo_n "(cached) " >&6
8980 else
8981   ac_func_search_save_LIBS=$LIBS
8982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8983 /* end confdefs.h.  */
8984
8985 /* Override any GCC internal prototype to avoid an error.
8986    Use char because int might match the return type of a GCC
8987    builtin and then its argument prototype would still apply.  */
8988 #ifdef __cplusplus
8989 extern "C"
8990 #endif
8991 char fmt_scaled ();
8992 int
8993 main ()
8994 {
8995 return fmt_scaled ();
8996   ;
8997   return 0;
8998 }
8999 _ACEOF
9000 for ac_lib in '' util bsd; do
9001   if test -z "$ac_lib"; then
9002     ac_res="none required"
9003   else
9004     ac_res=-l$ac_lib
9005     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9006   fi
9007   if ac_fn_c_try_link "$LINENO"; then :
9008   ac_cv_search_fmt_scaled=$ac_res
9009 fi
9010 rm -f core conftest.err conftest.$ac_objext \
9011     conftest$ac_exeext
9012   if ${ac_cv_search_fmt_scaled+:} false; then :
9013   break
9014 fi
9015 done
9016 if ${ac_cv_search_fmt_scaled+:} false; then :
9017
9018 else
9019   ac_cv_search_fmt_scaled=no
9020 fi
9021 rm conftest.$ac_ext
9022 LIBS=$ac_func_search_save_LIBS
9023 fi
9024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fmt_scaled" >&5
9025 $as_echo "$ac_cv_search_fmt_scaled" >&6; }
9026 ac_res=$ac_cv_search_fmt_scaled
9027 if test "$ac_res" != no; then :
9028   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9029
9030 fi
9031
9032 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing scan_scaled" >&5
9033 $as_echo_n "checking for library containing scan_scaled... " >&6; }
9034 if ${ac_cv_search_scan_scaled+:} false; then :
9035   $as_echo_n "(cached) " >&6
9036 else
9037   ac_func_search_save_LIBS=$LIBS
9038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9039 /* end confdefs.h.  */
9040
9041 /* Override any GCC internal prototype to avoid an error.
9042    Use char because int might match the return type of a GCC
9043    builtin and then its argument prototype would still apply.  */
9044 #ifdef __cplusplus
9045 extern "C"
9046 #endif
9047 char scan_scaled ();
9048 int
9049 main ()
9050 {
9051 return scan_scaled ();
9052   ;
9053   return 0;
9054 }
9055 _ACEOF
9056 for ac_lib in '' util bsd; do
9057   if test -z "$ac_lib"; then
9058     ac_res="none required"
9059   else
9060     ac_res=-l$ac_lib
9061     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9062   fi
9063   if ac_fn_c_try_link "$LINENO"; then :
9064   ac_cv_search_scan_scaled=$ac_res
9065 fi
9066 rm -f core conftest.err conftest.$ac_objext \
9067     conftest$ac_exeext
9068   if ${ac_cv_search_scan_scaled+:} false; then :
9069   break
9070 fi
9071 done
9072 if ${ac_cv_search_scan_scaled+:} false; then :
9073
9074 else
9075   ac_cv_search_scan_scaled=no
9076 fi
9077 rm conftest.$ac_ext
9078 LIBS=$ac_func_search_save_LIBS
9079 fi
9080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_scan_scaled" >&5
9081 $as_echo "$ac_cv_search_scan_scaled" >&6; }
9082 ac_res=$ac_cv_search_scan_scaled
9083 if test "$ac_res" != no; then :
9084   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9085
9086 fi
9087
9088 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing login" >&5
9089 $as_echo_n "checking for library containing login... " >&6; }
9090 if ${ac_cv_search_login+:} false; then :
9091   $as_echo_n "(cached) " >&6
9092 else
9093   ac_func_search_save_LIBS=$LIBS
9094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9095 /* end confdefs.h.  */
9096
9097 /* Override any GCC internal prototype to avoid an error.
9098    Use char because int might match the return type of a GCC
9099    builtin and then its argument prototype would still apply.  */
9100 #ifdef __cplusplus
9101 extern "C"
9102 #endif
9103 char login ();
9104 int
9105 main ()
9106 {
9107 return login ();
9108   ;
9109   return 0;
9110 }
9111 _ACEOF
9112 for ac_lib in '' util bsd; do
9113   if test -z "$ac_lib"; then
9114     ac_res="none required"
9115   else
9116     ac_res=-l$ac_lib
9117     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9118   fi
9119   if ac_fn_c_try_link "$LINENO"; then :
9120   ac_cv_search_login=$ac_res
9121 fi
9122 rm -f core conftest.err conftest.$ac_objext \
9123     conftest$ac_exeext
9124   if ${ac_cv_search_login+:} false; then :
9125   break
9126 fi
9127 done
9128 if ${ac_cv_search_login+:} false; then :
9129
9130 else
9131   ac_cv_search_login=no
9132 fi
9133 rm conftest.$ac_ext
9134 LIBS=$ac_func_search_save_LIBS
9135 fi
9136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_login" >&5
9137 $as_echo "$ac_cv_search_login" >&6; }
9138 ac_res=$ac_cv_search_login
9139 if test "$ac_res" != no; then :
9140   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9141
9142 fi
9143
9144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing logout" >&5
9145 $as_echo_n "checking for library containing logout... " >&6; }
9146 if ${ac_cv_search_logout+:} false; then :
9147   $as_echo_n "(cached) " >&6
9148 else
9149   ac_func_search_save_LIBS=$LIBS
9150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9151 /* end confdefs.h.  */
9152
9153 /* Override any GCC internal prototype to avoid an error.
9154    Use char because int might match the return type of a GCC
9155    builtin and then its argument prototype would still apply.  */
9156 #ifdef __cplusplus
9157 extern "C"
9158 #endif
9159 char logout ();
9160 int
9161 main ()
9162 {
9163 return logout ();
9164   ;
9165   return 0;
9166 }
9167 _ACEOF
9168 for ac_lib in '' util bsd; do
9169   if test -z "$ac_lib"; then
9170     ac_res="none required"
9171   else
9172     ac_res=-l$ac_lib
9173     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9174   fi
9175   if ac_fn_c_try_link "$LINENO"; then :
9176   ac_cv_search_logout=$ac_res
9177 fi
9178 rm -f core conftest.err conftest.$ac_objext \
9179     conftest$ac_exeext
9180   if ${ac_cv_search_logout+:} false; then :
9181   break
9182 fi
9183 done
9184 if ${ac_cv_search_logout+:} false; then :
9185
9186 else
9187   ac_cv_search_logout=no
9188 fi
9189 rm conftest.$ac_ext
9190 LIBS=$ac_func_search_save_LIBS
9191 fi
9192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_logout" >&5
9193 $as_echo "$ac_cv_search_logout" >&6; }
9194 ac_res=$ac_cv_search_logout
9195 if test "$ac_res" != no; then :
9196   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9197
9198 fi
9199
9200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing logwtmp" >&5
9201 $as_echo_n "checking for library containing logwtmp... " >&6; }
9202 if ${ac_cv_search_logwtmp+:} false; then :
9203   $as_echo_n "(cached) " >&6
9204 else
9205   ac_func_search_save_LIBS=$LIBS
9206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9207 /* end confdefs.h.  */
9208
9209 /* Override any GCC internal prototype to avoid an error.
9210    Use char because int might match the return type of a GCC
9211    builtin and then its argument prototype would still apply.  */
9212 #ifdef __cplusplus
9213 extern "C"
9214 #endif
9215 char logwtmp ();
9216 int
9217 main ()
9218 {
9219 return logwtmp ();
9220   ;
9221   return 0;
9222 }
9223 _ACEOF
9224 for ac_lib in '' util bsd; do
9225   if test -z "$ac_lib"; then
9226     ac_res="none required"
9227   else
9228     ac_res=-l$ac_lib
9229     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9230   fi
9231   if ac_fn_c_try_link "$LINENO"; then :
9232   ac_cv_search_logwtmp=$ac_res
9233 fi
9234 rm -f core conftest.err conftest.$ac_objext \
9235     conftest$ac_exeext
9236   if ${ac_cv_search_logwtmp+:} false; then :
9237   break
9238 fi
9239 done
9240 if ${ac_cv_search_logwtmp+:} false; then :
9241
9242 else
9243   ac_cv_search_logwtmp=no
9244 fi
9245 rm conftest.$ac_ext
9246 LIBS=$ac_func_search_save_LIBS
9247 fi
9248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_logwtmp" >&5
9249 $as_echo "$ac_cv_search_logwtmp" >&6; }
9250 ac_res=$ac_cv_search_logwtmp
9251 if test "$ac_res" != no; then :
9252   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9253
9254 fi
9255
9256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openpty" >&5
9257 $as_echo_n "checking for library containing openpty... " >&6; }
9258 if ${ac_cv_search_openpty+:} false; then :
9259   $as_echo_n "(cached) " >&6
9260 else
9261   ac_func_search_save_LIBS=$LIBS
9262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9263 /* end confdefs.h.  */
9264
9265 /* Override any GCC internal prototype to avoid an error.
9266    Use char because int might match the return type of a GCC
9267    builtin and then its argument prototype would still apply.  */
9268 #ifdef __cplusplus
9269 extern "C"
9270 #endif
9271 char openpty ();
9272 int
9273 main ()
9274 {
9275 return openpty ();
9276   ;
9277   return 0;
9278 }
9279 _ACEOF
9280 for ac_lib in '' util bsd; do
9281   if test -z "$ac_lib"; then
9282     ac_res="none required"
9283   else
9284     ac_res=-l$ac_lib
9285     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9286   fi
9287   if ac_fn_c_try_link "$LINENO"; then :
9288   ac_cv_search_openpty=$ac_res
9289 fi
9290 rm -f core conftest.err conftest.$ac_objext \
9291     conftest$ac_exeext
9292   if ${ac_cv_search_openpty+:} false; then :
9293   break
9294 fi
9295 done
9296 if ${ac_cv_search_openpty+:} false; then :
9297
9298 else
9299   ac_cv_search_openpty=no
9300 fi
9301 rm conftest.$ac_ext
9302 LIBS=$ac_func_search_save_LIBS
9303 fi
9304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openpty" >&5
9305 $as_echo "$ac_cv_search_openpty" >&6; }
9306 ac_res=$ac_cv_search_openpty
9307 if test "$ac_res" != no; then :
9308   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9309
9310 fi
9311
9312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing updwtmp" >&5
9313 $as_echo_n "checking for library containing updwtmp... " >&6; }
9314 if ${ac_cv_search_updwtmp+:} false; then :
9315   $as_echo_n "(cached) " >&6
9316 else
9317   ac_func_search_save_LIBS=$LIBS
9318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9319 /* end confdefs.h.  */
9320
9321 /* Override any GCC internal prototype to avoid an error.
9322    Use char because int might match the return type of a GCC
9323    builtin and then its argument prototype would still apply.  */
9324 #ifdef __cplusplus
9325 extern "C"
9326 #endif
9327 char updwtmp ();
9328 int
9329 main ()
9330 {
9331 return updwtmp ();
9332   ;
9333   return 0;
9334 }
9335 _ACEOF
9336 for ac_lib in '' util bsd; do
9337   if test -z "$ac_lib"; then
9338     ac_res="none required"
9339   else
9340     ac_res=-l$ac_lib
9341     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9342   fi
9343   if ac_fn_c_try_link "$LINENO"; then :
9344   ac_cv_search_updwtmp=$ac_res
9345 fi
9346 rm -f core conftest.err conftest.$ac_objext \
9347     conftest$ac_exeext
9348   if ${ac_cv_search_updwtmp+:} false; then :
9349   break
9350 fi
9351 done
9352 if ${ac_cv_search_updwtmp+:} false; then :
9353
9354 else
9355   ac_cv_search_updwtmp=no
9356 fi
9357 rm conftest.$ac_ext
9358 LIBS=$ac_func_search_save_LIBS
9359 fi
9360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_updwtmp" >&5
9361 $as_echo "$ac_cv_search_updwtmp" >&6; }
9362 ac_res=$ac_cv_search_updwtmp
9363 if test "$ac_res" != no; then :
9364   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9365
9366 fi
9367
9368 for ac_func in fmt_scaled scan_scaled login logout openpty updwtmp logwtmp
9369 do :
9370   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9371 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9372 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9373   cat >>confdefs.h <<_ACEOF
9374 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9375 _ACEOF
9376
9377 fi
9378 done
9379
9380
9381 # On some platforms, inet_ntop may be found in libresolv or libnsl.
9382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
9383 $as_echo_n "checking for library containing inet_ntop... " >&6; }
9384 if ${ac_cv_search_inet_ntop+:} false; then :
9385   $as_echo_n "(cached) " >&6
9386 else
9387   ac_func_search_save_LIBS=$LIBS
9388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9389 /* end confdefs.h.  */
9390
9391 /* Override any GCC internal prototype to avoid an error.
9392    Use char because int might match the return type of a GCC
9393    builtin and then its argument prototype would still apply.  */
9394 #ifdef __cplusplus
9395 extern "C"
9396 #endif
9397 char inet_ntop ();
9398 int
9399 main ()
9400 {
9401 return inet_ntop ();
9402   ;
9403   return 0;
9404 }
9405 _ACEOF
9406 for ac_lib in '' resolv nsl; do
9407   if test -z "$ac_lib"; then
9408     ac_res="none required"
9409   else
9410     ac_res=-l$ac_lib
9411     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9412   fi
9413   if ac_fn_c_try_link "$LINENO"; then :
9414   ac_cv_search_inet_ntop=$ac_res
9415 fi
9416 rm -f core conftest.err conftest.$ac_objext \
9417     conftest$ac_exeext
9418   if ${ac_cv_search_inet_ntop+:} false; then :
9419   break
9420 fi
9421 done
9422 if ${ac_cv_search_inet_ntop+:} false; then :
9423
9424 else
9425   ac_cv_search_inet_ntop=no
9426 fi
9427 rm conftest.$ac_ext
9428 LIBS=$ac_func_search_save_LIBS
9429 fi
9430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
9431 $as_echo "$ac_cv_search_inet_ntop" >&6; }
9432 ac_res=$ac_cv_search_inet_ntop
9433 if test "$ac_res" != no; then :
9434   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9435
9436 fi
9437
9438
9439 for ac_func in strftime
9440 do :
9441   ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
9442 if test "x$ac_cv_func_strftime" = xyes; then :
9443   cat >>confdefs.h <<_ACEOF
9444 #define HAVE_STRFTIME 1
9445 _ACEOF
9446
9447 else
9448   # strftime is in -lintl on SCO UNIX.
9449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
9450 $as_echo_n "checking for strftime in -lintl... " >&6; }
9451 if ${ac_cv_lib_intl_strftime+:} false; then :
9452   $as_echo_n "(cached) " >&6
9453 else
9454   ac_check_lib_save_LIBS=$LIBS
9455 LIBS="-lintl  $LIBS"
9456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9457 /* end confdefs.h.  */
9458
9459 /* Override any GCC internal prototype to avoid an error.
9460    Use char because int might match the return type of a GCC
9461    builtin and then its argument prototype would still apply.  */
9462 #ifdef __cplusplus
9463 extern "C"
9464 #endif
9465 char strftime ();
9466 int
9467 main ()
9468 {
9469 return strftime ();
9470   ;
9471   return 0;
9472 }
9473 _ACEOF
9474 if ac_fn_c_try_link "$LINENO"; then :
9475   ac_cv_lib_intl_strftime=yes
9476 else
9477   ac_cv_lib_intl_strftime=no
9478 fi
9479 rm -f core conftest.err conftest.$ac_objext \
9480     conftest$ac_exeext conftest.$ac_ext
9481 LIBS=$ac_check_lib_save_LIBS
9482 fi
9483 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
9484 $as_echo "$ac_cv_lib_intl_strftime" >&6; }
9485 if test "x$ac_cv_lib_intl_strftime" = xyes; then :
9486   $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
9487
9488 LIBS="-lintl $LIBS"
9489 fi
9490
9491 fi
9492 done
9493
9494
9495 # Check for ALTDIRFUNC glob() extension
9496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_ALTDIRFUNC support" >&5
9497 $as_echo_n "checking for GLOB_ALTDIRFUNC support... " >&6; }
9498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9499 /* end confdefs.h.  */
9500
9501                 #include <glob.h>
9502                 #ifdef GLOB_ALTDIRFUNC
9503                 FOUNDIT
9504                 #endif
9505
9506 _ACEOF
9507 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9508   $EGREP "FOUNDIT" >/dev/null 2>&1; then :
9509
9510
9511 $as_echo "#define GLOB_HAS_ALTDIRFUNC 1" >>confdefs.h
9512
9513                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9514 $as_echo "yes" >&6; }
9515
9516 else
9517
9518                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9519 $as_echo "no" >&6; }
9520
9521
9522 fi
9523 rm -f conftest*
9524
9525
9526 # Check for g.gl_matchc glob() extension
9527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_matchc field in glob_t" >&5
9528 $as_echo_n "checking for gl_matchc field in glob_t... " >&6; }
9529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9530 /* end confdefs.h.  */
9531  #include <glob.h>
9532 int
9533 main ()
9534 {
9535  glob_t g; g.gl_matchc = 1;
9536   ;
9537   return 0;
9538 }
9539 _ACEOF
9540 if ac_fn_c_try_compile "$LINENO"; then :
9541
9542
9543 $as_echo "#define GLOB_HAS_GL_MATCHC 1" >>confdefs.h
9544
9545                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9546 $as_echo "yes" >&6; }
9547
9548 else
9549
9550                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9551 $as_echo "no" >&6; }
9552
9553 fi
9554 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9555
9556 # Check for g.gl_statv glob() extension
9557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_statv and GLOB_KEEPSTAT extensions for glob" >&5
9558 $as_echo_n "checking for gl_statv and GLOB_KEEPSTAT extensions for glob... " >&6; }
9559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9560 /* end confdefs.h.  */
9561  #include <glob.h>
9562 int
9563 main ()
9564 {
9565
9566 #ifndef GLOB_KEEPSTAT
9567 #error "glob does not support GLOB_KEEPSTAT extension"
9568 #endif
9569 glob_t g;
9570 g.gl_statv = NULL;
9571
9572   ;
9573   return 0;
9574 }
9575 _ACEOF
9576 if ac_fn_c_try_compile "$LINENO"; then :
9577
9578
9579 $as_echo "#define GLOB_HAS_GL_STATV 1" >>confdefs.h
9580
9581                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9582 $as_echo "yes" >&6; }
9583
9584 else
9585
9586                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9587 $as_echo "no" >&6; }
9588
9589
9590 fi
9591 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9592
9593 ac_fn_c_check_decl "$LINENO" "GLOB_NOMATCH" "ac_cv_have_decl_GLOB_NOMATCH" "#include <glob.h>
9594 "
9595 if test "x$ac_cv_have_decl_GLOB_NOMATCH" = xyes; then :
9596   ac_have_decl=1
9597 else
9598   ac_have_decl=0
9599 fi
9600
9601 cat >>confdefs.h <<_ACEOF
9602 #define HAVE_DECL_GLOB_NOMATCH $ac_have_decl
9603 _ACEOF
9604
9605
9606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct dirent allocates space for d_name" >&5
9607 $as_echo_n "checking whether struct dirent allocates space for d_name... " >&6; }
9608 if test "$cross_compiling" = yes; then :
9609
9610                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&5
9611 $as_echo "$as_me: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&2;}
9612                 $as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
9613
9614
9615
9616 else
9617   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9618 /* end confdefs.h.  */
9619
9620 #include <sys/types.h>
9621 #include <dirent.h>
9622 int
9623 main ()
9624 {
9625
9626         struct dirent d;
9627         exit(sizeof(d.d_name)<=sizeof(char));
9628
9629   ;
9630   return 0;
9631 }
9632 _ACEOF
9633 if ac_fn_c_try_run "$LINENO"; then :
9634   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9635 $as_echo "yes" >&6; }
9636 else
9637
9638                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9639 $as_echo "no" >&6; }
9640
9641 $as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
9642
9643
9644 fi
9645 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9646   conftest.$ac_objext conftest.beam conftest.$ac_ext
9647 fi
9648
9649
9650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /proc/pid/fd directory" >&5
9651 $as_echo_n "checking for /proc/pid/fd directory... " >&6; }
9652 if test -d "/proc/$$/fd" ; then
9653
9654 $as_echo "#define HAVE_PROC_PID 1" >>confdefs.h
9655
9656         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9657 $as_echo "yes" >&6; }
9658 else
9659         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9660 $as_echo "no" >&6; }
9661 fi
9662
9663 # Check whether user wants S/Key support
9664 SKEY_MSG="no"
9665
9666 # Check whether --with-skey was given.
9667 if test "${with_skey+set}" = set; then :
9668   withval=$with_skey;
9669                 if test "x$withval" != "xno" ; then
9670
9671                         if test "x$withval" != "xyes" ; then
9672                                 CPPFLAGS="$CPPFLAGS -I${withval}/include"
9673                                 LDFLAGS="$LDFLAGS -L${withval}/lib"
9674                         fi
9675
9676
9677 $as_echo "#define SKEY 1" >>confdefs.h
9678
9679                         LIBS="-lskey $LIBS"
9680                         SKEY_MSG="yes"
9681
9682                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for s/key support" >&5
9683 $as_echo_n "checking for s/key support... " >&6; }
9684                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9685 /* end confdefs.h.  */
9686
9687 #include <stdio.h>
9688 #include <skey.h>
9689
9690 int
9691 main ()
9692 {
9693
9694         char *ff = skey_keyinfo(""); ff="";
9695         exit(0);
9696
9697   ;
9698   return 0;
9699 }
9700 _ACEOF
9701 if ac_fn_c_try_link "$LINENO"; then :
9702   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9703 $as_echo "yes" >&6; }
9704 else
9705
9706                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9707 $as_echo "no" >&6; }
9708                                         as_fn_error $? "** Incomplete or missing s/key libraries." "$LINENO" 5
9709
9710 fi
9711 rm -f core conftest.err conftest.$ac_objext \
9712     conftest$ac_exeext conftest.$ac_ext
9713                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if skeychallenge takes 4 arguments" >&5
9714 $as_echo_n "checking if skeychallenge takes 4 arguments... " >&6; }
9715                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9716 /* end confdefs.h.  */
9717
9718 #include <stdio.h>
9719 #include <skey.h>
9720
9721 int
9722 main ()
9723 {
9724
9725         (void)skeychallenge(NULL,"name","",0);
9726
9727   ;
9728   return 0;
9729 }
9730 _ACEOF
9731 if ac_fn_c_try_compile "$LINENO"; then :
9732
9733                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9734 $as_echo "yes" >&6; }
9735
9736 $as_echo "#define SKEYCHALLENGE_4ARG 1" >>confdefs.h
9737
9738 else
9739
9740                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9741 $as_echo "no" >&6; }
9742
9743 fi
9744 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9745                 fi
9746
9747
9748 fi
9749
9750
9751 # Check whether user wants TCP wrappers support
9752 TCPW_MSG="no"
9753
9754 # Check whether --with-tcp-wrappers was given.
9755 if test "${with_tcp_wrappers+set}" = set; then :
9756   withval=$with_tcp_wrappers;
9757                 if test "x$withval" != "xno" ; then
9758                         saved_LIBS="$LIBS"
9759                         saved_LDFLAGS="$LDFLAGS"
9760                         saved_CPPFLAGS="$CPPFLAGS"
9761                         if test -n "${withval}" && \
9762                             test "x${withval}" != "xyes"; then
9763                                 if test -d "${withval}/lib"; then
9764                                         if test -n "${need_dash_r}"; then
9765                                                 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
9766                                         else
9767                                                 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
9768                                         fi
9769                                 else
9770                                         if test -n "${need_dash_r}"; then
9771                                                 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
9772                                         else
9773                                                 LDFLAGS="-L${withval} ${LDFLAGS}"
9774                                         fi
9775                                 fi
9776                                 if test -d "${withval}/include"; then
9777                                         CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
9778                                 else
9779                                         CPPFLAGS="-I${withval} ${CPPFLAGS}"
9780                                 fi
9781                         fi
9782                         LIBS="-lwrap $LIBS"
9783                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libwrap" >&5
9784 $as_echo_n "checking for libwrap... " >&6; }
9785                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9786 /* end confdefs.h.  */
9787
9788 #include <sys/types.h>
9789 #include <sys/socket.h>
9790 #include <netinet/in.h>
9791 #include <tcpd.h>
9792 int deny_severity = 0, allow_severity = 0;
9793
9794 int
9795 main ()
9796 {
9797
9798         hosts_access(0);
9799
9800   ;
9801   return 0;
9802 }
9803 _ACEOF
9804 if ac_fn_c_try_link "$LINENO"; then :
9805
9806                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9807 $as_echo "yes" >&6; }
9808
9809 $as_echo "#define LIBWRAP 1" >>confdefs.h
9810
9811                                         SSHDLIBS="$SSHDLIBS -lwrap"
9812                                         TCPW_MSG="yes"
9813
9814 else
9815
9816                                         as_fn_error $? "*** libwrap missing" "$LINENO" 5
9817
9818
9819 fi
9820 rm -f core conftest.err conftest.$ac_objext \
9821     conftest$ac_exeext conftest.$ac_ext
9822                         LIBS="$saved_LIBS"
9823                 fi
9824
9825
9826 fi
9827
9828
9829 # Check whether user wants to use ldns
9830 LDNS_MSG="no"
9831
9832 # Check whether --with-ldns was given.
9833 if test "${with_ldns+set}" = set; then :
9834   withval=$with_ldns;
9835         if test "x$withval" != "xno" ; then
9836
9837                         if test "x$withval" != "xyes" ; then
9838                                 CPPFLAGS="$CPPFLAGS -I${withval}/include"
9839                                 LDFLAGS="$LDFLAGS -L${withval}/lib"
9840                         fi
9841
9842
9843 $as_echo "#define HAVE_LDNS 1" >>confdefs.h
9844
9845             LIBS="-lldns $LIBS"
9846             LDNS_MSG="yes"
9847
9848             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldns support" >&5
9849 $as_echo_n "checking for ldns support... " >&6; }
9850             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9851 /* end confdefs.h.  */
9852
9853 #include <stdio.h>
9854 #include <stdlib.h>
9855 #include <stdint.h>
9856 #include <ldns/ldns.h>
9857 int main() { ldns_status status = ldns_verify_trusted(NULL, NULL, NULL, NULL); status=LDNS_STATUS_OK; exit(0); }
9858
9859
9860 _ACEOF
9861 if ac_fn_c_try_link "$LINENO"; then :
9862   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9863 $as_echo "yes" >&6; }
9864 else
9865
9866                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9867 $as_echo "no" >&6; }
9868                                         as_fn_error $? "** Incomplete or missing ldns libraries." "$LINENO" 5
9869
9870 fi
9871 rm -f core conftest.err conftest.$ac_objext \
9872     conftest$ac_exeext conftest.$ac_ext
9873         fi
9874
9875
9876 fi
9877
9878
9879 # Check whether user wants libedit support
9880 LIBEDIT_MSG="no"
9881
9882 # Check whether --with-libedit was given.
9883 if test "${with_libedit+set}" = set; then :
9884   withval=$with_libedit;  if test "x$withval" != "xno" ; then
9885                 if test "x$withval" = "xyes" ; then
9886                         if test -n "$ac_tool_prefix"; then
9887   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9888 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9890 $as_echo_n "checking for $ac_word... " >&6; }
9891 if ${ac_cv_path_PKGCONFIG+:} false; then :
9892   $as_echo_n "(cached) " >&6
9893 else
9894   case $PKGCONFIG in
9895   [\\/]* | ?:[\\/]*)
9896   ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
9897   ;;
9898   *)
9899   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9900 for as_dir in $PATH
9901 do
9902   IFS=$as_save_IFS
9903   test -z "$as_dir" && as_dir=.
9904     for ac_exec_ext in '' $ac_executable_extensions; do
9905   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9906     ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
9907     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9908     break 2
9909   fi
9910 done
9911   done
9912 IFS=$as_save_IFS
9913
9914   ;;
9915 esac
9916 fi
9917 PKGCONFIG=$ac_cv_path_PKGCONFIG
9918 if test -n "$PKGCONFIG"; then
9919   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
9920 $as_echo "$PKGCONFIG" >&6; }
9921 else
9922   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9923 $as_echo "no" >&6; }
9924 fi
9925
9926
9927 fi
9928 if test -z "$ac_cv_path_PKGCONFIG"; then
9929   ac_pt_PKGCONFIG=$PKGCONFIG
9930   # Extract the first word of "pkg-config", so it can be a program name with args.
9931 set dummy pkg-config; ac_word=$2
9932 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9933 $as_echo_n "checking for $ac_word... " >&6; }
9934 if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
9935   $as_echo_n "(cached) " >&6
9936 else
9937   case $ac_pt_PKGCONFIG in
9938   [\\/]* | ?:[\\/]*)
9939   ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
9940   ;;
9941   *)
9942   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9943 for as_dir in $PATH
9944 do
9945   IFS=$as_save_IFS
9946   test -z "$as_dir" && as_dir=.
9947     for ac_exec_ext in '' $ac_executable_extensions; do
9948   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9949     ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
9950     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9951     break 2
9952   fi
9953 done
9954   done
9955 IFS=$as_save_IFS
9956
9957   ;;
9958 esac
9959 fi
9960 ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
9961 if test -n "$ac_pt_PKGCONFIG"; then
9962   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
9963 $as_echo "$ac_pt_PKGCONFIG" >&6; }
9964 else
9965   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9966 $as_echo "no" >&6; }
9967 fi
9968
9969   if test "x$ac_pt_PKGCONFIG" = x; then
9970     PKGCONFIG="no"
9971   else
9972     case $cross_compiling:$ac_tool_warned in
9973 yes:)
9974 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9975 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9976 ac_tool_warned=yes ;;
9977 esac
9978     PKGCONFIG=$ac_pt_PKGCONFIG
9979   fi
9980 else
9981   PKGCONFIG="$ac_cv_path_PKGCONFIG"
9982 fi
9983
9984                         if test "x$PKGCONFIG" != "xno"; then
9985                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PKGCONFIG knows about libedit" >&5
9986 $as_echo_n "checking if $PKGCONFIG knows about libedit... " >&6; }
9987                                 if "$PKGCONFIG" libedit; then
9988                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9989 $as_echo "yes" >&6; }
9990                                         use_pkgconfig_for_libedit=yes
9991                                 else
9992                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9993 $as_echo "no" >&6; }
9994                                 fi
9995                         fi
9996                 else
9997                         CPPFLAGS="$CPPFLAGS -I${withval}/include"
9998                         if test -n "${need_dash_r}"; then
9999                                 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
10000                         else
10001                                 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
10002                         fi
10003                 fi
10004                 if test "x$use_pkgconfig_for_libedit" = "xyes"; then
10005                         LIBEDIT=`$PKGCONFIG --libs libedit`
10006                         CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libedit`"
10007                 else
10008                         LIBEDIT="-ledit -lcurses"
10009                 fi
10010                 OTHERLIBS=`echo $LIBEDIT | sed 's/-ledit//'`
10011                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_init in -ledit" >&5
10012 $as_echo_n "checking for el_init in -ledit... " >&6; }
10013 if ${ac_cv_lib_edit_el_init+:} false; then :
10014   $as_echo_n "(cached) " >&6
10015 else
10016   ac_check_lib_save_LIBS=$LIBS
10017 LIBS="-ledit  $OTHERLIBS
10018                  $LIBS"
10019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10020 /* end confdefs.h.  */
10021
10022 /* Override any GCC internal prototype to avoid an error.
10023    Use char because int might match the return type of a GCC
10024    builtin and then its argument prototype would still apply.  */
10025 #ifdef __cplusplus
10026 extern "C"
10027 #endif
10028 char el_init ();
10029 int
10030 main ()
10031 {
10032 return el_init ();
10033   ;
10034   return 0;
10035 }
10036 _ACEOF
10037 if ac_fn_c_try_link "$LINENO"; then :
10038   ac_cv_lib_edit_el_init=yes
10039 else
10040   ac_cv_lib_edit_el_init=no
10041 fi
10042 rm -f core conftest.err conftest.$ac_objext \
10043     conftest$ac_exeext conftest.$ac_ext
10044 LIBS=$ac_check_lib_save_LIBS
10045 fi
10046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_el_init" >&5
10047 $as_echo "$ac_cv_lib_edit_el_init" >&6; }
10048 if test "x$ac_cv_lib_edit_el_init" = xyes; then :
10049
10050 $as_echo "#define USE_LIBEDIT 1" >>confdefs.h
10051
10052                           LIBEDIT_MSG="yes"
10053
10054
10055 else
10056    as_fn_error $? "libedit not found" "$LINENO" 5
10057 fi
10058
10059                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libedit version is compatible" >&5
10060 $as_echo_n "checking if libedit version is compatible... " >&6; }
10061                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10062 /* end confdefs.h.  */
10063  #include <histedit.h>
10064 int
10065 main ()
10066 {
10067
10068         int i = H_SETSIZE;
10069         el_init("", NULL, NULL, NULL);
10070         exit(0);
10071
10072   ;
10073   return 0;
10074 }
10075 _ACEOF
10076 if ac_fn_c_try_compile "$LINENO"; then :
10077    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10078 $as_echo "yes" >&6; }
10079 else
10080    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10081 $as_echo "no" >&6; }
10082                       as_fn_error $? "libedit version is not compatible" "$LINENO" 5
10083
10084 fi
10085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10086         fi
10087
10088 fi
10089
10090
10091 AUDIT_MODULE=none
10092
10093 # Check whether --with-audit was given.
10094 if test "${with_audit+set}" = set; then :
10095   withval=$with_audit;
10096           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported audit module" >&5
10097 $as_echo_n "checking for supported audit module... " >&6; }
10098           case "$withval" in
10099           bsm)
10100                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bsm" >&5
10101 $as_echo "bsm" >&6; }
10102                 AUDIT_MODULE=bsm
10103                                 for ac_header in bsm/audit.h
10104 do :
10105   ac_fn_c_check_header_compile "$LINENO" "bsm/audit.h" "ac_cv_header_bsm_audit_h" "
10106 #ifdef HAVE_TIME_H
10107 # include <time.h>
10108 #endif
10109
10110
10111 "
10112 if test "x$ac_cv_header_bsm_audit_h" = xyes; then :
10113   cat >>confdefs.h <<_ACEOF
10114 #define HAVE_BSM_AUDIT_H 1
10115 _ACEOF
10116
10117 else
10118   as_fn_error $? "BSM enabled and bsm/audit.h not found" "$LINENO" 5
10119 fi
10120
10121 done
10122
10123                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaudit in -lbsm" >&5
10124 $as_echo_n "checking for getaudit in -lbsm... " >&6; }
10125 if ${ac_cv_lib_bsm_getaudit+:} false; then :
10126   $as_echo_n "(cached) " >&6
10127 else
10128   ac_check_lib_save_LIBS=$LIBS
10129 LIBS="-lbsm  $LIBS"
10130 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10131 /* end confdefs.h.  */
10132
10133 /* Override any GCC internal prototype to avoid an error.
10134    Use char because int might match the return type of a GCC
10135    builtin and then its argument prototype would still apply.  */
10136 #ifdef __cplusplus
10137 extern "C"
10138 #endif
10139 char getaudit ();
10140 int
10141 main ()
10142 {
10143 return getaudit ();
10144   ;
10145   return 0;
10146 }
10147 _ACEOF
10148 if ac_fn_c_try_link "$LINENO"; then :
10149   ac_cv_lib_bsm_getaudit=yes
10150 else
10151   ac_cv_lib_bsm_getaudit=no
10152 fi
10153 rm -f core conftest.err conftest.$ac_objext \
10154     conftest$ac_exeext conftest.$ac_ext
10155 LIBS=$ac_check_lib_save_LIBS
10156 fi
10157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsm_getaudit" >&5
10158 $as_echo "$ac_cv_lib_bsm_getaudit" >&6; }
10159 if test "x$ac_cv_lib_bsm_getaudit" = xyes; then :
10160   cat >>confdefs.h <<_ACEOF
10161 #define HAVE_LIBBSM 1
10162 _ACEOF
10163
10164   LIBS="-lbsm $LIBS"
10165
10166 else
10167   as_fn_error $? "BSM enabled and required library not found" "$LINENO" 5
10168 fi
10169
10170                 for ac_func in getaudit
10171 do :
10172   ac_fn_c_check_func "$LINENO" "getaudit" "ac_cv_func_getaudit"
10173 if test "x$ac_cv_func_getaudit" = xyes; then :
10174   cat >>confdefs.h <<_ACEOF
10175 #define HAVE_GETAUDIT 1
10176 _ACEOF
10177
10178 else
10179   as_fn_error $? "BSM enabled and required function not found" "$LINENO" 5
10180 fi
10181 done
10182
10183                 # These are optional
10184                 for ac_func in getaudit_addr aug_get_machine
10185 do :
10186   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10187 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10188 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10189   cat >>confdefs.h <<_ACEOF
10190 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10191 _ACEOF
10192
10193 fi
10194 done
10195
10196
10197 $as_echo "#define USE_BSM_AUDIT 1" >>confdefs.h
10198
10199                 if test "$sol2ver" -ge 11; then
10200                         SSHDLIBS="$SSHDLIBS -lscf"
10201
10202 $as_echo "#define BROKEN_BSM_API 1" >>confdefs.h
10203
10204                 fi
10205                 ;;
10206           linux)
10207                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux" >&5
10208 $as_echo "linux" >&6; }
10209                 AUDIT_MODULE=linux
10210                                 for ac_header in libaudit.h
10211 do :
10212   ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
10213 if test "x$ac_cv_header_libaudit_h" = xyes; then :
10214   cat >>confdefs.h <<_ACEOF
10215 #define HAVE_LIBAUDIT_H 1
10216 _ACEOF
10217
10218 fi
10219
10220 done
10221
10222                 SSHDLIBS="$SSHDLIBS -laudit"
10223
10224 $as_echo "#define USE_LINUX_AUDIT 1" >>confdefs.h
10225
10226                 ;;
10227           debug)
10228                 AUDIT_MODULE=debug
10229                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: debug" >&5
10230 $as_echo "debug" >&6; }
10231
10232 $as_echo "#define SSH_AUDIT_EVENTS 1" >>confdefs.h
10233
10234                 ;;
10235           no)
10236                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10237 $as_echo "no" >&6; }
10238                 ;;
10239           *)
10240                 as_fn_error $? "Unknown audit module $withval" "$LINENO" 5
10241                 ;;
10242         esac
10243
10244 fi
10245
10246
10247
10248 # Check whether --with-pie was given.
10249 if test "${with_pie+set}" = set; then :
10250   withval=$with_pie;
10251         if test "x$withval" = "xno"; then
10252                 use_pie=no
10253         fi
10254         if test "x$withval" = "xyes"; then
10255                 use_pie=yes
10256         fi
10257
10258
10259 fi
10260
10261 if test "x$use_pie" = "x"; then
10262         use_pie=no
10263 fi
10264 if test "x$use_toolchain_hardening" != "x1" && test "x$use_pie" = "xauto"; then
10265         # Turn off automatic PIE when toolchain hardening is off.
10266         use_pie=no
10267 fi
10268 if test "x$use_pie" = "xauto"; then
10269         # Automatic PIE requires gcc >= 4.x
10270         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc >= 4.x" >&5
10271 $as_echo_n "checking for gcc >= 4.x... " >&6; }
10272         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10273 /* end confdefs.h.  */
10274
10275 #if !defined(__GNUC__) || __GNUC__ < 4
10276 #error gcc is too old
10277 #endif
10278
10279 _ACEOF
10280 if ac_fn_c_try_compile "$LINENO"; then :
10281    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10282 $as_echo "yes" >&6; }
10283 else
10284    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10285 $as_echo "no" >&6; }
10286           use_pie=no
10287
10288 fi
10289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10290 fi
10291 if test "x$use_pie" != "xno"; then
10292         SAVED_CFLAGS="$CFLAGS"
10293         SAVED_LDFLAGS="$LDFLAGS"
10294         {
10295         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports compile flag -fPIE" >&5
10296 $as_echo_n "checking if $CC supports compile flag -fPIE... " >&6; }
10297         saved_CFLAGS="$CFLAGS"
10298         CFLAGS="$CFLAGS $WERROR -fPIE"
10299         _define_flag=""
10300         test "x$_define_flag" = "x" && _define_flag="-fPIE"
10301         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10302 /* end confdefs.h.  */
10303
10304 #include <stdlib.h>
10305 #include <stdio.h>
10306 int main(int argc, char **argv) {
10307         /* Some math to catch -ftrapv problems in the toolchain */
10308         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
10309         float l = i * 2.1;
10310         double m = l / 0.5;
10311         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
10312         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
10313         exit(0);
10314 }
10315
10316 _ACEOF
10317 if ac_fn_c_try_compile "$LINENO"; then :
10318
10319 if `grep -i "unrecognized option" conftest.err >/dev/null`
10320 then
10321                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10322 $as_echo "no" >&6; }
10323                 CFLAGS="$saved_CFLAGS"
10324 else
10325                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10326 $as_echo "yes" >&6; }
10327                  CFLAGS="$saved_CFLAGS $_define_flag"
10328 fi
10329 else
10330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10331 $as_echo "no" >&6; }
10332                   CFLAGS="$saved_CFLAGS"
10333
10334 fi
10335 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10336 }
10337         {
10338         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $LD supports link flag -pie" >&5
10339 $as_echo_n "checking if $LD supports link flag -pie... " >&6; }
10340         saved_LDFLAGS="$LDFLAGS"
10341         LDFLAGS="$LDFLAGS $WERROR -pie"
10342         _define_flag=""
10343         test "x$_define_flag" = "x" && _define_flag="-pie"
10344         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10345 /* end confdefs.h.  */
10346
10347 #include <stdlib.h>
10348 #include <stdio.h>
10349 int main(int argc, char **argv) {
10350         /* Some math to catch -ftrapv problems in the toolchain */
10351         int i = 123 * argc, j = 456 + argc, k = 789 - argc;
10352         float l = i * 2.1;
10353         double m = l / 0.5;
10354         long long int n = argc * 12345LL, o = 12345LL * (long long int)argc;
10355         printf("%d %d %d %f %f %lld %lld\n", i, j, k, l, m, n, o);
10356         exit(0);
10357 }
10358
10359 _ACEOF
10360 if ac_fn_c_try_link "$LINENO"; then :
10361    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10362 $as_echo "yes" >&6; }
10363                   LDFLAGS="$saved_LDFLAGS $_define_flag"
10364 else
10365    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10366 $as_echo "no" >&6; }
10367                   LDFLAGS="$saved_LDFLAGS"
10368
10369 fi
10370 rm -f core conftest.err conftest.$ac_objext \
10371     conftest$ac_exeext conftest.$ac_ext
10372 }
10373         # We use both -fPIE and -pie or neither.
10374         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether both -fPIE and -pie are supported" >&5
10375 $as_echo_n "checking whether both -fPIE and -pie are supported... " >&6; }
10376         if echo "x $CFLAGS"  | grep ' -fPIE' >/dev/null 2>&1 && \
10377            echo "x $LDFLAGS" | grep ' -pie'  >/dev/null 2>&1 ; then
10378                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10379 $as_echo "yes" >&6; }
10380         else
10381                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10382 $as_echo "no" >&6; }
10383                 CFLAGS="$SAVED_CFLAGS"
10384                 LDFLAGS="$SAVED_LDFLAGS"
10385         fi
10386 fi
10387
10388 for ac_func in  \
10389         Blowfish_initstate \
10390         Blowfish_expandstate \
10391         Blowfish_expand0state \
10392         Blowfish_stream2word \
10393         asprintf \
10394         b64_ntop \
10395         __b64_ntop \
10396         b64_pton \
10397         __b64_pton \
10398         bcopy \
10399         bcrypt_pbkdf \
10400         bindresvport_sa \
10401         blf_enc \
10402         cap_rights_limit \
10403         clock \
10404         closefrom \
10405         dirfd \
10406         endgrent \
10407         explicit_bzero \
10408         fchmod \
10409         fchown \
10410         freeaddrinfo \
10411         fstatfs \
10412         fstatvfs \
10413         futimes \
10414         getaddrinfo \
10415         getcwd \
10416         getgrouplist \
10417         getnameinfo \
10418         getopt \
10419         getpeereid \
10420         getpeerucred \
10421         getpgid \
10422         getpgrp \
10423         _getpty \
10424         getrlimit \
10425         getttyent \
10426         glob \
10427         group_from_gid \
10428         inet_aton \
10429         inet_ntoa \
10430         inet_ntop \
10431         innetgr \
10432         login_getcapbool \
10433         mblen \
10434         md5_crypt \
10435         memmove \
10436         memset_s \
10437         mkdtemp \
10438         mmap \
10439         ngetaddrinfo \
10440         nsleep \
10441         ogetaddrinfo \
10442         openlog_r \
10443         poll \
10444         prctl \
10445         pstat \
10446         readpassphrase \
10447         realpath \
10448         recvmsg \
10449         rresvport_af \
10450         sendmsg \
10451         setdtablesize \
10452         setegid \
10453         setenv \
10454         seteuid \
10455         setgroupent \
10456         setgroups \
10457         setlinebuf \
10458         setlogin \
10459         setpassent\
10460         setpcred \
10461         setproctitle \
10462         setregid \
10463         setreuid \
10464         setrlimit \
10465         setsid \
10466         setvbuf \
10467         sigaction \
10468         sigvec \
10469         snprintf \
10470         socketpair \
10471         statfs \
10472         statvfs \
10473         strdup \
10474         strerror \
10475         strlcat \
10476         strlcpy \
10477         strmode \
10478         strnlen \
10479         strnvis \
10480         strptime \
10481         strtonum \
10482         strtoll \
10483         strtoul \
10484         strtoull \
10485         swap32 \
10486         sysconf \
10487         tcgetpgrp \
10488         timingsafe_bcmp \
10489         truncate \
10490         unsetenv \
10491         updwtmpx \
10492         user_from_uid \
10493         usleep \
10494         vasprintf \
10495         vsnprintf \
10496         waitpid \
10497
10498 do :
10499   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10500 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10501 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10502   cat >>confdefs.h <<_ACEOF
10503 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10504 _ACEOF
10505
10506 fi
10507 done
10508
10509
10510 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10511 /* end confdefs.h.  */
10512  #include <ctype.h>
10513 int
10514 main ()
10515 {
10516  return (isblank('a'));
10517   ;
10518   return 0;
10519 }
10520 _ACEOF
10521 if ac_fn_c_try_link "$LINENO"; then :
10522
10523 $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
10524
10525
10526 fi
10527 rm -f core conftest.err conftest.$ac_objext \
10528     conftest$ac_exeext conftest.$ac_ext
10529
10530 # PKCS#11 support requires dlopen() and co
10531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
10532 $as_echo_n "checking for library containing dlopen... " >&6; }
10533 if ${ac_cv_search_dlopen+:} false; then :
10534   $as_echo_n "(cached) " >&6
10535 else
10536   ac_func_search_save_LIBS=$LIBS
10537 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10538 /* end confdefs.h.  */
10539
10540 /* Override any GCC internal prototype to avoid an error.
10541    Use char because int might match the return type of a GCC
10542    builtin and then its argument prototype would still apply.  */
10543 #ifdef __cplusplus
10544 extern "C"
10545 #endif
10546 char dlopen ();
10547 int
10548 main ()
10549 {
10550 return dlopen ();
10551   ;
10552   return 0;
10553 }
10554 _ACEOF
10555 for ac_lib in '' dl; do
10556   if test -z "$ac_lib"; then
10557     ac_res="none required"
10558   else
10559     ac_res=-l$ac_lib
10560     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10561   fi
10562   if ac_fn_c_try_link "$LINENO"; then :
10563   ac_cv_search_dlopen=$ac_res
10564 fi
10565 rm -f core conftest.err conftest.$ac_objext \
10566     conftest$ac_exeext
10567   if ${ac_cv_search_dlopen+:} false; then :
10568   break
10569 fi
10570 done
10571 if ${ac_cv_search_dlopen+:} false; then :
10572
10573 else
10574   ac_cv_search_dlopen=no
10575 fi
10576 rm conftest.$ac_ext
10577 LIBS=$ac_func_search_save_LIBS
10578 fi
10579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
10580 $as_echo "$ac_cv_search_dlopen" >&6; }
10581 ac_res=$ac_cv_search_dlopen
10582 if test "$ac_res" != no; then :
10583   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10584
10585 $as_echo "#define ENABLE_PKCS11 /**/" >>confdefs.h
10586
10587
10588 fi
10589
10590
10591 # IRIX has a const char return value for gai_strerror()
10592 for ac_func in gai_strerror
10593 do :
10594   ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror"
10595 if test "x$ac_cv_func_gai_strerror" = xyes; then :
10596   cat >>confdefs.h <<_ACEOF
10597 #define HAVE_GAI_STRERROR 1
10598 _ACEOF
10599
10600         $as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h
10601
10602         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10603 /* end confdefs.h.  */
10604
10605 #include <sys/types.h>
10606 #include <sys/socket.h>
10607 #include <netdb.h>
10608
10609 const char *gai_strerror(int);
10610
10611 int
10612 main ()
10613 {
10614
10615         char *str;
10616         str = gai_strerror(0);
10617
10618   ;
10619   return 0;
10620 }
10621 _ACEOF
10622 if ac_fn_c_try_compile "$LINENO"; then :
10623
10624
10625 $as_echo "#define HAVE_CONST_GAI_STRERROR_PROTO 1" >>confdefs.h
10626
10627 fi
10628 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10629 fi
10630 done
10631
10632
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
10634 $as_echo_n "checking for library containing nanosleep... " >&6; }
10635 if ${ac_cv_search_nanosleep+:} false; then :
10636   $as_echo_n "(cached) " >&6
10637 else
10638   ac_func_search_save_LIBS=$LIBS
10639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10640 /* end confdefs.h.  */
10641
10642 /* Override any GCC internal prototype to avoid an error.
10643    Use char because int might match the return type of a GCC
10644    builtin and then its argument prototype would still apply.  */
10645 #ifdef __cplusplus
10646 extern "C"
10647 #endif
10648 char nanosleep ();
10649 int
10650 main ()
10651 {
10652 return nanosleep ();
10653   ;
10654   return 0;
10655 }
10656 _ACEOF
10657 for ac_lib in '' rt posix4; do
10658   if test -z "$ac_lib"; then
10659     ac_res="none required"
10660   else
10661     ac_res=-l$ac_lib
10662     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10663   fi
10664   if ac_fn_c_try_link "$LINENO"; then :
10665   ac_cv_search_nanosleep=$ac_res
10666 fi
10667 rm -f core conftest.err conftest.$ac_objext \
10668     conftest$ac_exeext
10669   if ${ac_cv_search_nanosleep+:} false; then :
10670   break
10671 fi
10672 done
10673 if ${ac_cv_search_nanosleep+:} false; then :
10674
10675 else
10676   ac_cv_search_nanosleep=no
10677 fi
10678 rm conftest.$ac_ext
10679 LIBS=$ac_func_search_save_LIBS
10680 fi
10681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
10682 $as_echo "$ac_cv_search_nanosleep" >&6; }
10683 ac_res=$ac_cv_search_nanosleep
10684 if test "$ac_res" != no; then :
10685   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10686
10687 $as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h
10688
10689 fi
10690
10691
10692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
10693 $as_echo_n "checking for library containing clock_gettime... " >&6; }
10694 if ${ac_cv_search_clock_gettime+:} false; then :
10695   $as_echo_n "(cached) " >&6
10696 else
10697   ac_func_search_save_LIBS=$LIBS
10698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10699 /* end confdefs.h.  */
10700
10701 /* Override any GCC internal prototype to avoid an error.
10702    Use char because int might match the return type of a GCC
10703    builtin and then its argument prototype would still apply.  */
10704 #ifdef __cplusplus
10705 extern "C"
10706 #endif
10707 char clock_gettime ();
10708 int
10709 main ()
10710 {
10711 return clock_gettime ();
10712   ;
10713   return 0;
10714 }
10715 _ACEOF
10716 for ac_lib in '' rt; do
10717   if test -z "$ac_lib"; then
10718     ac_res="none required"
10719   else
10720     ac_res=-l$ac_lib
10721     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10722   fi
10723   if ac_fn_c_try_link "$LINENO"; then :
10724   ac_cv_search_clock_gettime=$ac_res
10725 fi
10726 rm -f core conftest.err conftest.$ac_objext \
10727     conftest$ac_exeext
10728   if ${ac_cv_search_clock_gettime+:} false; then :
10729   break
10730 fi
10731 done
10732 if ${ac_cv_search_clock_gettime+:} false; then :
10733
10734 else
10735   ac_cv_search_clock_gettime=no
10736 fi
10737 rm conftest.$ac_ext
10738 LIBS=$ac_func_search_save_LIBS
10739 fi
10740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
10741 $as_echo "$ac_cv_search_clock_gettime" >&6; }
10742 ac_res=$ac_cv_search_clock_gettime
10743 if test "$ac_res" != no; then :
10744   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10745
10746 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
10747
10748 fi
10749
10750
10751 ac_fn_c_check_decl "$LINENO" "getrusage" "ac_cv_have_decl_getrusage" "$ac_includes_default"
10752 if test "x$ac_cv_have_decl_getrusage" = xyes; then :
10753   for ac_func in getrusage
10754 do :
10755   ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
10756 if test "x$ac_cv_func_getrusage" = xyes; then :
10757   cat >>confdefs.h <<_ACEOF
10758 #define HAVE_GETRUSAGE 1
10759 _ACEOF
10760
10761 fi
10762 done
10763
10764 fi
10765
10766 ac_fn_c_check_decl "$LINENO" "strsep" "ac_cv_have_decl_strsep" "
10767 #ifdef HAVE_STRING_H
10768 # include <string.h>
10769 #endif
10770
10771 "
10772 if test "x$ac_cv_have_decl_strsep" = xyes; then :
10773   for ac_func in strsep
10774 do :
10775   ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
10776 if test "x$ac_cv_func_strsep" = xyes; then :
10777   cat >>confdefs.h <<_ACEOF
10778 #define HAVE_STRSEP 1
10779 _ACEOF
10780
10781 fi
10782 done
10783
10784 fi
10785
10786
10787 ac_fn_c_check_decl "$LINENO" "tcsendbreak" "ac_cv_have_decl_tcsendbreak" "#include <termios.h>
10788
10789 "
10790 if test "x$ac_cv_have_decl_tcsendbreak" = xyes; then :
10791   $as_echo "#define HAVE_TCSENDBREAK 1" >>confdefs.h
10792
10793 else
10794   for ac_func in tcsendbreak
10795 do :
10796   ac_fn_c_check_func "$LINENO" "tcsendbreak" "ac_cv_func_tcsendbreak"
10797 if test "x$ac_cv_func_tcsendbreak" = xyes; then :
10798   cat >>confdefs.h <<_ACEOF
10799 #define HAVE_TCSENDBREAK 1
10800 _ACEOF
10801
10802 fi
10803 done
10804
10805 fi
10806
10807
10808 ac_fn_c_check_decl "$LINENO" "h_errno" "ac_cv_have_decl_h_errno" "#include <netdb.h>
10809 "
10810 if test "x$ac_cv_have_decl_h_errno" = xyes; then :
10811   ac_have_decl=1
10812 else
10813   ac_have_decl=0
10814 fi
10815
10816 cat >>confdefs.h <<_ACEOF
10817 #define HAVE_DECL_H_ERRNO $ac_have_decl
10818 _ACEOF
10819
10820
10821 ac_fn_c_check_decl "$LINENO" "SHUT_RD" "ac_cv_have_decl_SHUT_RD" "
10822 #include <sys/types.h>
10823 #include <sys/socket.h>
10824
10825 "
10826 if test "x$ac_cv_have_decl_SHUT_RD" = xyes; then :
10827   ac_have_decl=1
10828 else
10829   ac_have_decl=0
10830 fi
10831
10832 cat >>confdefs.h <<_ACEOF
10833 #define HAVE_DECL_SHUT_RD $ac_have_decl
10834 _ACEOF
10835
10836
10837 ac_fn_c_check_decl "$LINENO" "O_NONBLOCK" "ac_cv_have_decl_O_NONBLOCK" "
10838 #include <sys/types.h>
10839 #ifdef HAVE_SYS_STAT_H
10840 # include <sys/stat.h>
10841 #endif
10842 #ifdef HAVE_FCNTL_H
10843 # include <fcntl.h>
10844 #endif
10845
10846 "
10847 if test "x$ac_cv_have_decl_O_NONBLOCK" = xyes; then :
10848   ac_have_decl=1
10849 else
10850   ac_have_decl=0
10851 fi
10852
10853 cat >>confdefs.h <<_ACEOF
10854 #define HAVE_DECL_O_NONBLOCK $ac_have_decl
10855 _ACEOF
10856
10857
10858 ac_fn_c_check_decl "$LINENO" "writev" "ac_cv_have_decl_writev" "
10859 #include <sys/types.h>
10860 #include <sys/uio.h>
10861 #include <unistd.h>
10862
10863 "
10864 if test "x$ac_cv_have_decl_writev" = xyes; then :
10865   ac_have_decl=1
10866 else
10867   ac_have_decl=0
10868 fi
10869
10870 cat >>confdefs.h <<_ACEOF
10871 #define HAVE_DECL_WRITEV $ac_have_decl
10872 _ACEOF
10873
10874
10875 ac_fn_c_check_decl "$LINENO" "MAXSYMLINKS" "ac_cv_have_decl_MAXSYMLINKS" "
10876 #include <sys/param.h>
10877
10878 "
10879 if test "x$ac_cv_have_decl_MAXSYMLINKS" = xyes; then :
10880   ac_have_decl=1
10881 else
10882   ac_have_decl=0
10883 fi
10884
10885 cat >>confdefs.h <<_ACEOF
10886 #define HAVE_DECL_MAXSYMLINKS $ac_have_decl
10887 _ACEOF
10888
10889
10890 ac_fn_c_check_decl "$LINENO" "offsetof" "ac_cv_have_decl_offsetof" "
10891 #include <stddef.h>
10892
10893 "
10894 if test "x$ac_cv_have_decl_offsetof" = xyes; then :
10895   ac_have_decl=1
10896 else
10897   ac_have_decl=0
10898 fi
10899
10900 cat >>confdefs.h <<_ACEOF
10901 #define HAVE_DECL_OFFSETOF $ac_have_decl
10902 _ACEOF
10903
10904
10905 # extra bits for select(2)
10906 ac_fn_c_check_decl "$LINENO" "howmany" "ac_cv_have_decl_howmany" "
10907 #include <sys/param.h>
10908 #include <sys/types.h>
10909 #ifdef HAVE_SYS_SYSMACROS_H
10910 #include <sys/sysmacros.h>
10911 #endif
10912 #ifdef HAVE_SYS_SELECT_H
10913 #include <sys/select.h>
10914 #endif
10915 #ifdef HAVE_SYS_TIME_H
10916 #include <sys/time.h>
10917 #endif
10918 #ifdef HAVE_UNISTD_H
10919 #include <unistd.h>
10920 #endif
10921
10922 "
10923 if test "x$ac_cv_have_decl_howmany" = xyes; then :
10924   ac_have_decl=1
10925 else
10926   ac_have_decl=0
10927 fi
10928
10929 cat >>confdefs.h <<_ACEOF
10930 #define HAVE_DECL_HOWMANY $ac_have_decl
10931 _ACEOF
10932 ac_fn_c_check_decl "$LINENO" "NFDBITS" "ac_cv_have_decl_NFDBITS" "
10933 #include <sys/param.h>
10934 #include <sys/types.h>
10935 #ifdef HAVE_SYS_SYSMACROS_H
10936 #include <sys/sysmacros.h>
10937 #endif
10938 #ifdef HAVE_SYS_SELECT_H
10939 #include <sys/select.h>
10940 #endif
10941 #ifdef HAVE_SYS_TIME_H
10942 #include <sys/time.h>
10943 #endif
10944 #ifdef HAVE_UNISTD_H
10945 #include <unistd.h>
10946 #endif
10947
10948 "
10949 if test "x$ac_cv_have_decl_NFDBITS" = xyes; then :
10950   ac_have_decl=1
10951 else
10952   ac_have_decl=0
10953 fi
10954
10955 cat >>confdefs.h <<_ACEOF
10956 #define HAVE_DECL_NFDBITS $ac_have_decl
10957 _ACEOF
10958
10959 ac_fn_c_check_type "$LINENO" "fd_mask" "ac_cv_type_fd_mask" "
10960 #include <sys/param.h>
10961 #include <sys/types.h>
10962 #ifdef HAVE_SYS_SELECT_H
10963 #include <sys/select.h>
10964 #endif
10965 #ifdef HAVE_SYS_TIME_H
10966 #include <sys/time.h>
10967 #endif
10968 #ifdef HAVE_UNISTD_H
10969 #include <unistd.h>
10970 #endif
10971
10972 "
10973 if test "x$ac_cv_type_fd_mask" = xyes; then :
10974
10975 cat >>confdefs.h <<_ACEOF
10976 #define HAVE_FD_MASK 1
10977 _ACEOF
10978
10979
10980 fi
10981
10982
10983 for ac_func in setresuid
10984 do :
10985   ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
10986 if test "x$ac_cv_func_setresuid" = xyes; then :
10987   cat >>confdefs.h <<_ACEOF
10988 #define HAVE_SETRESUID 1
10989 _ACEOF
10990
10991                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresuid seems to work" >&5
10992 $as_echo_n "checking if setresuid seems to work... " >&6; }
10993         if test "$cross_compiling" = yes; then :
10994   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
10995 $as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
10996
10997 else
10998   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10999 /* end confdefs.h.  */
11000
11001 #include <stdlib.h>
11002 #include <errno.h>
11003
11004 int
11005 main ()
11006 {
11007
11008         errno=0;
11009         setresuid(0,0,0);
11010         if (errno==ENOSYS)
11011                 exit(1);
11012         else
11013                 exit(0);
11014
11015   ;
11016   return 0;
11017 }
11018 _ACEOF
11019 if ac_fn_c_try_run "$LINENO"; then :
11020   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11021 $as_echo "yes" >&6; }
11022 else
11023
11024 $as_echo "#define BROKEN_SETRESUID 1" >>confdefs.h
11025
11026                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
11027 $as_echo "not implemented" >&6; }
11028 fi
11029 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11030   conftest.$ac_objext conftest.beam conftest.$ac_ext
11031 fi
11032
11033
11034 fi
11035 done
11036
11037
11038 for ac_func in setresgid
11039 do :
11040   ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
11041 if test "x$ac_cv_func_setresgid" = xyes; then :
11042   cat >>confdefs.h <<_ACEOF
11043 #define HAVE_SETRESGID 1
11044 _ACEOF
11045
11046                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresgid seems to work" >&5
11047 $as_echo_n "checking if setresgid seems to work... " >&6; }
11048         if test "$cross_compiling" = yes; then :
11049   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
11050 $as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
11051
11052 else
11053   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11054 /* end confdefs.h.  */
11055
11056 #include <stdlib.h>
11057 #include <errno.h>
11058
11059 int
11060 main ()
11061 {
11062
11063         errno=0;
11064         setresgid(0,0,0);
11065         if (errno==ENOSYS)
11066                 exit(1);
11067         else
11068                 exit(0);
11069
11070   ;
11071   return 0;
11072 }
11073 _ACEOF
11074 if ac_fn_c_try_run "$LINENO"; then :
11075   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11076 $as_echo "yes" >&6; }
11077 else
11078
11079 $as_echo "#define BROKEN_SETRESGID 1" >>confdefs.h
11080
11081                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
11082 $as_echo "not implemented" >&6; }
11083 fi
11084 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11085   conftest.$ac_objext conftest.beam conftest.$ac_ext
11086 fi
11087
11088
11089 fi
11090 done
11091
11092
11093 for ac_func in gettimeofday time
11094 do :
11095   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11096 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11097 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11098   cat >>confdefs.h <<_ACEOF
11099 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11100 _ACEOF
11101
11102 fi
11103 done
11104
11105 for ac_func in endutent getutent getutid getutline pututline setutent
11106 do :
11107   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11108 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11109 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11110   cat >>confdefs.h <<_ACEOF
11111 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11112 _ACEOF
11113
11114 fi
11115 done
11116
11117 for ac_func in utmpname
11118 do :
11119   ac_fn_c_check_func "$LINENO" "utmpname" "ac_cv_func_utmpname"
11120 if test "x$ac_cv_func_utmpname" = xyes; then :
11121   cat >>confdefs.h <<_ACEOF
11122 #define HAVE_UTMPNAME 1
11123 _ACEOF
11124
11125 fi
11126 done
11127
11128 for ac_func in endutxent getutxent getutxid getutxline getutxuser pututxline
11129 do :
11130   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11131 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11132 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11133   cat >>confdefs.h <<_ACEOF
11134 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11135 _ACEOF
11136
11137 fi
11138 done
11139
11140 for ac_func in setutxdb setutxent utmpxname
11141 do :
11142   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11143 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11144 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11145   cat >>confdefs.h <<_ACEOF
11146 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11147 _ACEOF
11148
11149 fi
11150 done
11151
11152 for ac_func in getlastlogxbyname
11153 do :
11154   ac_fn_c_check_func "$LINENO" "getlastlogxbyname" "ac_cv_func_getlastlogxbyname"
11155 if test "x$ac_cv_func_getlastlogxbyname" = xyes; then :
11156   cat >>confdefs.h <<_ACEOF
11157 #define HAVE_GETLASTLOGXBYNAME 1
11158 _ACEOF
11159
11160 fi
11161 done
11162
11163
11164 ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
11165 if test "x$ac_cv_func_daemon" = xyes; then :
11166
11167 $as_echo "#define HAVE_DAEMON 1" >>confdefs.h
11168
11169 else
11170   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for daemon in -lbsd" >&5
11171 $as_echo_n "checking for daemon in -lbsd... " >&6; }
11172 if ${ac_cv_lib_bsd_daemon+:} false; then :
11173   $as_echo_n "(cached) " >&6
11174 else
11175   ac_check_lib_save_LIBS=$LIBS
11176 LIBS="-lbsd  $LIBS"
11177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11178 /* end confdefs.h.  */
11179
11180 /* Override any GCC internal prototype to avoid an error.
11181    Use char because int might match the return type of a GCC
11182    builtin and then its argument prototype would still apply.  */
11183 #ifdef __cplusplus
11184 extern "C"
11185 #endif
11186 char daemon ();
11187 int
11188 main ()
11189 {
11190 return daemon ();
11191   ;
11192   return 0;
11193 }
11194 _ACEOF
11195 if ac_fn_c_try_link "$LINENO"; then :
11196   ac_cv_lib_bsd_daemon=yes
11197 else
11198   ac_cv_lib_bsd_daemon=no
11199 fi
11200 rm -f core conftest.err conftest.$ac_objext \
11201     conftest$ac_exeext conftest.$ac_ext
11202 LIBS=$ac_check_lib_save_LIBS
11203 fi
11204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_daemon" >&5
11205 $as_echo "$ac_cv_lib_bsd_daemon" >&6; }
11206 if test "x$ac_cv_lib_bsd_daemon" = xyes; then :
11207   LIBS="$LIBS -lbsd"; $as_echo "#define HAVE_DAEMON 1" >>confdefs.h
11208
11209 fi
11210
11211
11212 fi
11213
11214
11215 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
11216 if test "x$ac_cv_func_getpagesize" = xyes; then :
11217
11218 $as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
11219
11220 else
11221   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize in -lucb" >&5
11222 $as_echo_n "checking for getpagesize in -lucb... " >&6; }
11223 if ${ac_cv_lib_ucb_getpagesize+:} false; then :
11224   $as_echo_n "(cached) " >&6
11225 else
11226   ac_check_lib_save_LIBS=$LIBS
11227 LIBS="-lucb  $LIBS"
11228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11229 /* end confdefs.h.  */
11230
11231 /* Override any GCC internal prototype to avoid an error.
11232    Use char because int might match the return type of a GCC
11233    builtin and then its argument prototype would still apply.  */
11234 #ifdef __cplusplus
11235 extern "C"
11236 #endif
11237 char getpagesize ();
11238 int
11239 main ()
11240 {
11241 return getpagesize ();
11242   ;
11243   return 0;
11244 }
11245 _ACEOF
11246 if ac_fn_c_try_link "$LINENO"; then :
11247   ac_cv_lib_ucb_getpagesize=yes
11248 else
11249   ac_cv_lib_ucb_getpagesize=no
11250 fi
11251 rm -f core conftest.err conftest.$ac_objext \
11252     conftest$ac_exeext conftest.$ac_ext
11253 LIBS=$ac_check_lib_save_LIBS
11254 fi
11255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ucb_getpagesize" >&5
11256 $as_echo "$ac_cv_lib_ucb_getpagesize" >&6; }
11257 if test "x$ac_cv_lib_ucb_getpagesize" = xyes; then :
11258   LIBS="$LIBS -lucb"; $as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
11259
11260 fi
11261
11262
11263 fi
11264
11265
11266 # Check for broken snprintf
11267 if test "x$ac_cv_func_snprintf" = "xyes" ; then
11268         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf correctly terminates long strings" >&5
11269 $as_echo_n "checking whether snprintf correctly terminates long strings... " >&6; }
11270         if test "$cross_compiling" = yes; then :
11271    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
11272 $as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
11273
11274 else
11275   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11276 /* end confdefs.h.  */
11277  #include <stdio.h>
11278 int
11279 main ()
11280 {
11281
11282         char b[5];
11283         snprintf(b,5,"123456789");
11284         exit(b[4]!='\0');
11285
11286   ;
11287   return 0;
11288 }
11289 _ACEOF
11290 if ac_fn_c_try_run "$LINENO"; then :
11291   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11292 $as_echo "yes" >&6; }
11293 else
11294
11295                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11296 $as_echo "no" >&6; }
11297
11298 $as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
11299
11300                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
11301 $as_echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
11302
11303 fi
11304 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11305   conftest.$ac_objext conftest.beam conftest.$ac_ext
11306 fi
11307
11308 fi
11309
11310 # We depend on vsnprintf returning the right thing on overflow: the
11311 # number of characters it tried to create (as per SUSv3)
11312 if test "x$ac_cv_func_vsnprintf" = "xyes" ; then
11313         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf returns correct values on overflow" >&5
11314 $as_echo_n "checking whether vsnprintf returns correct values on overflow... " >&6; }
11315         if test "$cross_compiling" = yes; then :
11316    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working vsnprintf()" >&5
11317 $as_echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;}
11318
11319 else
11320   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11321 /* end confdefs.h.  */
11322
11323 #include <sys/types.h>
11324 #include <stdio.h>
11325 #include <stdarg.h>
11326
11327 int x_snprintf(char *str, size_t count, const char *fmt, ...)
11328 {
11329         size_t ret;
11330         va_list ap;
11331
11332         va_start(ap, fmt);
11333         ret = vsnprintf(str, count, fmt, ap);
11334         va_end(ap);
11335         return ret;
11336 }
11337
11338 int
11339 main ()
11340 {
11341
11342 char x[1];
11343 if (x_snprintf(x, 1, "%s %d", "hello", 12345) != 11)
11344         return 1;
11345 if (x_snprintf(NULL, 0, "%s %d", "hello", 12345) != 11)
11346         return 1;
11347 return 0;
11348
11349   ;
11350   return 0;
11351 }
11352 _ACEOF
11353 if ac_fn_c_try_run "$LINENO"; then :
11354   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11355 $as_echo "yes" >&6; }
11356 else
11357
11358                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11359 $as_echo "no" >&6; }
11360
11361 $as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
11362
11363                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&5
11364 $as_echo "$as_me: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&2;}
11365
11366 fi
11367 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11368   conftest.$ac_objext conftest.beam conftest.$ac_ext
11369 fi
11370
11371 fi
11372
11373 # On systems where [v]snprintf is broken, but is declared in stdio,
11374 # check that the fmt argument is const char * or just char *.
11375 # This is only useful for when BROKEN_SNPRINTF
11376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf can declare const char *fmt" >&5
11377 $as_echo_n "checking whether snprintf can declare const char *fmt... " >&6; }
11378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11379 /* end confdefs.h.  */
11380
11381 #include <stdio.h>
11382 int snprintf(char *a, size_t b, const char *c, ...) { return 0; }
11383
11384 int
11385 main ()
11386 {
11387
11388         snprintf(0, 0, 0);
11389
11390   ;
11391   return 0;
11392 }
11393 _ACEOF
11394 if ac_fn_c_try_compile "$LINENO"; then :
11395   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11396 $as_echo "yes" >&6; }
11397
11398 $as_echo "#define SNPRINTF_CONST const" >>confdefs.h
11399
11400 else
11401   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11402 $as_echo "no" >&6; }
11403     $as_echo "#define SNPRINTF_CONST /* not const */" >>confdefs.h
11404
11405 fi
11406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11407
11408 # Check for missing getpeereid (or equiv) support
11409 NO_PEERCHECK=""
11410 if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then
11411         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports SO_PEERCRED getsockopt" >&5
11412 $as_echo_n "checking whether system supports SO_PEERCRED getsockopt... " >&6; }
11413         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11414 /* end confdefs.h.  */
11415
11416 #include <sys/types.h>
11417 #include <sys/socket.h>
11418 int
11419 main ()
11420 {
11421 int i = SO_PEERCRED;
11422   ;
11423   return 0;
11424 }
11425 _ACEOF
11426 if ac_fn_c_try_compile "$LINENO"; then :
11427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11428 $as_echo "yes" >&6; }
11429
11430 $as_echo "#define HAVE_SO_PEERCRED 1" >>confdefs.h
11431
11432
11433 else
11434   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11435 $as_echo "no" >&6; }
11436                 NO_PEERCHECK=1
11437
11438 fi
11439 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11440 fi
11441
11442 if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
11443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (overly) strict mkstemp" >&5
11444 $as_echo_n "checking for (overly) strict mkstemp... " >&6; }
11445 if test "$cross_compiling" = yes; then :
11446
11447                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11448 $as_echo "yes" >&6; }
11449                 $as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
11450
11451
11452
11453 else
11454   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11455 /* end confdefs.h.  */
11456
11457 #include <stdlib.h>
11458
11459 int
11460 main ()
11461 {
11462
11463         char template[]="conftest.mkstemp-test";
11464         if (mkstemp(template) == -1)
11465                 exit(1);
11466         unlink(template);
11467         exit(0);
11468
11469   ;
11470   return 0;
11471 }
11472 _ACEOF
11473 if ac_fn_c_try_run "$LINENO"; then :
11474
11475                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11476 $as_echo "no" >&6; }
11477
11478 else
11479
11480                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11481 $as_echo "yes" >&6; }
11482
11483 $as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
11484
11485
11486 fi
11487 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11488   conftest.$ac_objext conftest.beam conftest.$ac_ext
11489 fi
11490
11491 fi
11492
11493 if test ! -z "$check_for_openpty_ctty_bug"; then
11494         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openpty correctly handles controlling tty" >&5
11495 $as_echo_n "checking if openpty correctly handles controlling tty... " >&6; }
11496         if test "$cross_compiling" = yes; then :
11497
11498                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
11499 $as_echo "cross-compiling, assuming yes" >&6; }
11500
11501
11502 else
11503   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11504 /* end confdefs.h.  */
11505
11506 #include <stdio.h>
11507 #include <sys/fcntl.h>
11508 #include <sys/types.h>
11509 #include <sys/wait.h>
11510
11511 int
11512 main ()
11513 {
11514
11515         pid_t pid;
11516         int fd, ptyfd, ttyfd, status;
11517
11518         pid = fork();
11519         if (pid < 0) {          /* failed */
11520                 exit(1);
11521         } else if (pid > 0) {   /* parent */
11522                 waitpid(pid, &status, 0);
11523                 if (WIFEXITED(status))
11524                         exit(WEXITSTATUS(status));
11525                 else
11526                         exit(2);
11527         } else {                /* child */
11528                 close(0); close(1); close(2);
11529                 setsid();
11530                 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
11531                 fd = open("/dev/tty", O_RDWR | O_NOCTTY);
11532                 if (fd >= 0)
11533                         exit(3);        /* Acquired ctty: broken */
11534                 else
11535                         exit(0);        /* Did not acquire ctty: OK */
11536         }
11537
11538   ;
11539   return 0;
11540 }
11541 _ACEOF
11542 if ac_fn_c_try_run "$LINENO"; then :
11543
11544                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11545 $as_echo "yes" >&6; }
11546
11547 else
11548
11549                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11550 $as_echo "no" >&6; }
11551                         $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
11552
11553
11554 fi
11555 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11556   conftest.$ac_objext conftest.beam conftest.$ac_ext
11557 fi
11558
11559 fi
11560
11561 if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
11562     test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
11563         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
11564 $as_echo_n "checking if getaddrinfo seems to work... " >&6; }
11565         if test "$cross_compiling" = yes; then :
11566
11567                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
11568 $as_echo "cross-compiling, assuming yes" >&6; }
11569
11570
11571 else
11572   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11573 /* end confdefs.h.  */
11574
11575 #include <stdio.h>
11576 #include <sys/socket.h>
11577 #include <netdb.h>
11578 #include <errno.h>
11579 #include <netinet/in.h>
11580
11581 #define TEST_PORT "2222"
11582
11583 int
11584 main ()
11585 {
11586
11587         int err, sock;
11588         struct addrinfo *gai_ai, *ai, hints;
11589         char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
11590
11591         memset(&hints, 0, sizeof(hints));
11592         hints.ai_family = PF_UNSPEC;
11593         hints.ai_socktype = SOCK_STREAM;
11594         hints.ai_flags = AI_PASSIVE;
11595
11596         err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
11597         if (err != 0) {
11598                 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
11599                 exit(1);
11600         }
11601
11602         for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
11603                 if (ai->ai_family != AF_INET6)
11604                         continue;
11605
11606                 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
11607                     sizeof(ntop), strport, sizeof(strport),
11608                     NI_NUMERICHOST|NI_NUMERICSERV);
11609
11610                 if (err != 0) {
11611                         if (err == EAI_SYSTEM)
11612                                 perror("getnameinfo EAI_SYSTEM");
11613                         else
11614                                 fprintf(stderr, "getnameinfo failed: %s\n",
11615                                     gai_strerror(err));
11616                         exit(2);
11617                 }
11618
11619                 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
11620                 if (sock < 0)
11621                         perror("socket");
11622                 if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
11623                         if (errno == EBADF)
11624                                 exit(3);
11625                 }
11626         }
11627         exit(0);
11628
11629   ;
11630   return 0;
11631 }
11632 _ACEOF
11633 if ac_fn_c_try_run "$LINENO"; then :
11634
11635                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11636 $as_echo "yes" >&6; }
11637
11638 else
11639
11640                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11641 $as_echo "no" >&6; }
11642                         $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
11643
11644
11645 fi
11646 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11647   conftest.$ac_objext conftest.beam conftest.$ac_ext
11648 fi
11649
11650 fi
11651
11652 if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
11653     test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
11654         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
11655 $as_echo_n "checking if getaddrinfo seems to work... " >&6; }
11656         if test "$cross_compiling" = yes; then :
11657
11658                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming no" >&5
11659 $as_echo "cross-compiling, assuming no" >&6; }
11660
11661
11662 else
11663   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11664 /* end confdefs.h.  */
11665
11666 #include <stdio.h>
11667 #include <sys/socket.h>
11668 #include <netdb.h>
11669 #include <errno.h>
11670 #include <netinet/in.h>
11671
11672 #define TEST_PORT "2222"
11673
11674 int
11675 main ()
11676 {
11677
11678         int err, sock;
11679         struct addrinfo *gai_ai, *ai, hints;
11680         char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
11681
11682         memset(&hints, 0, sizeof(hints));
11683         hints.ai_family = PF_UNSPEC;
11684         hints.ai_socktype = SOCK_STREAM;
11685         hints.ai_flags = AI_PASSIVE;
11686
11687         err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
11688         if (err != 0) {
11689                 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
11690                 exit(1);
11691         }
11692
11693         for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
11694                 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
11695                         continue;
11696
11697                 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
11698                     sizeof(ntop), strport, sizeof(strport),
11699                     NI_NUMERICHOST|NI_NUMERICSERV);
11700
11701                 if (ai->ai_family == AF_INET && err != 0) {
11702                         perror("getnameinfo");
11703                         exit(2);
11704                 }
11705         }
11706         exit(0);
11707
11708   ;
11709   return 0;
11710 }
11711 _ACEOF
11712 if ac_fn_c_try_run "$LINENO"; then :
11713
11714                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11715 $as_echo "yes" >&6; }
11716
11717 $as_echo "#define AIX_GETNAMEINFO_HACK 1" >>confdefs.h
11718
11719
11720 else
11721
11722                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11723 $as_echo "no" >&6; }
11724                         $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
11725
11726
11727 fi
11728 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11729   conftest.$ac_objext conftest.beam conftest.$ac_ext
11730 fi
11731
11732 fi
11733
11734 if test "x$check_for_conflicting_getspnam" = "x1"; then
11735         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for conflicting getspnam in shadow.h" >&5
11736 $as_echo_n "checking for conflicting getspnam in shadow.h... " >&6; }
11737         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11738 /* end confdefs.h.  */
11739  #include <shadow.h>
11740 int
11741 main ()
11742 {
11743  exit(0);
11744   ;
11745   return 0;
11746 }
11747 _ACEOF
11748 if ac_fn_c_try_compile "$LINENO"; then :
11749
11750                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11751 $as_echo "no" >&6; }
11752
11753 else
11754
11755                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11756 $as_echo "yes" >&6; }
11757
11758 $as_echo "#define GETSPNAM_CONFLICTING_DEFS 1" >>confdefs.h
11759
11760
11761
11762 fi
11763 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11764 fi
11765
11766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
11767 $as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
11768 if ${ac_cv_func_getpgrp_void+:} false; then :
11769   $as_echo_n "(cached) " >&6
11770 else
11771   # Use it with a single arg.
11772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11773 /* end confdefs.h.  */
11774 $ac_includes_default
11775 int
11776 main ()
11777 {
11778 getpgrp (0);
11779   ;
11780   return 0;
11781 }
11782 _ACEOF
11783 if ac_fn_c_try_compile "$LINENO"; then :
11784   ac_cv_func_getpgrp_void=no
11785 else
11786   ac_cv_func_getpgrp_void=yes
11787 fi
11788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11789
11790 fi
11791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
11792 $as_echo "$ac_cv_func_getpgrp_void" >&6; }
11793 if test $ac_cv_func_getpgrp_void = yes; then
11794
11795 $as_echo "#define GETPGRP_VOID 1" >>confdefs.h
11796
11797 fi
11798
11799
11800 # Search for OpenSSL
11801 saved_CPPFLAGS="$CPPFLAGS"
11802 saved_LDFLAGS="$LDFLAGS"
11803
11804 # Check whether --with-ssl-dir was given.
11805 if test "${with_ssl_dir+set}" = set; then :
11806   withval=$with_ssl_dir;
11807                 if test "x$withval" != "xno" ; then
11808                         case "$withval" in
11809                                 # Relative paths
11810                                 ./*|../*)       withval="`pwd`/$withval"
11811                         esac
11812                         if test -d "$withval/lib"; then
11813                                 if test -n "${need_dash_r}"; then
11814                                         LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
11815                                 else
11816                                         LDFLAGS="-L${withval}/lib ${LDFLAGS}"
11817                                 fi
11818                         elif test -d "$withval/lib64"; then
11819                                 if test -n "${need_dash_r}"; then
11820                                         LDFLAGS="-L${withval}/lib64 -R${withval}/lib64 ${LDFLAGS}"
11821                                 else
11822                                         LDFLAGS="-L${withval}/lib64 ${LDFLAGS}"
11823                                 fi
11824                         else
11825                                 if test -n "${need_dash_r}"; then
11826                                         LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
11827                                 else
11828                                         LDFLAGS="-L${withval} ${LDFLAGS}"
11829                                 fi
11830                         fi
11831                         if test -d "$withval/include"; then
11832                                 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
11833                         else
11834                                 CPPFLAGS="-I${withval} ${CPPFLAGS}"
11835                         fi
11836                 fi
11837
11838
11839 fi
11840
11841 LIBS="-lcrypto $LIBS"
11842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11843 /* end confdefs.h.  */
11844
11845 /* Override any GCC internal prototype to avoid an error.
11846    Use char because int might match the return type of a GCC
11847    builtin and then its argument prototype would still apply.  */
11848 #ifdef __cplusplus
11849 extern "C"
11850 #endif
11851 char RAND_add ();
11852 int
11853 main ()
11854 {
11855 return RAND_add ();
11856   ;
11857   return 0;
11858 }
11859 _ACEOF
11860 if ac_fn_c_try_link "$LINENO"; then :
11861
11862 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
11863
11864 else
11865
11866                                 if test -n "${need_dash_r}"; then
11867                         LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
11868                 else
11869                         LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
11870                 fi
11871                 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
11872                 ac_fn_c_check_header_mongrel "$LINENO" "openssl/opensslv.h" "ac_cv_header_openssl_opensslv_h" "$ac_includes_default"
11873 if test "x$ac_cv_header_openssl_opensslv_h" = xyes; then :
11874
11875 else
11876   as_fn_error $? "*** OpenSSL headers missing - please install first or check config.log ***" "$LINENO" 5
11877 fi
11878
11879
11880                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11881 /* end confdefs.h.  */
11882
11883 /* Override any GCC internal prototype to avoid an error.
11884    Use char because int might match the return type of a GCC
11885    builtin and then its argument prototype would still apply.  */
11886 #ifdef __cplusplus
11887 extern "C"
11888 #endif
11889 char RAND_add ();
11890 int
11891 main ()
11892 {
11893 return RAND_add ();
11894   ;
11895   return 0;
11896 }
11897 _ACEOF
11898 if ac_fn_c_try_link "$LINENO"; then :
11899   $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
11900
11901 else
11902
11903                                 as_fn_error $? "*** Can't find recent OpenSSL libcrypto (see config.log for details) ***" "$LINENO" 5
11904
11905
11906 fi
11907 rm -f core conftest.err conftest.$ac_objext \
11908     conftest$ac_exeext conftest.$ac_ext
11909
11910
11911 fi
11912 rm -f core conftest.err conftest.$ac_objext \
11913     conftest$ac_exeext conftest.$ac_ext
11914
11915 # Determine OpenSSL header version
11916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL header version" >&5
11917 $as_echo_n "checking OpenSSL header version... " >&6; }
11918 if test "$cross_compiling" = yes; then :
11919
11920                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
11921 $as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
11922
11923
11924 else
11925   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11926 /* end confdefs.h.  */
11927
11928 #include <stdio.h>
11929 #include <string.h>
11930 #include <openssl/opensslv.h>
11931 #define DATA "conftest.sslincver"
11932
11933 int
11934 main ()
11935 {
11936
11937         FILE *fd;
11938         int rc;
11939
11940         fd = fopen(DATA,"w");
11941         if(fd == NULL)
11942                 exit(1);
11943
11944         if ((rc = fprintf(fd ,"%08x (%s)\n", OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT)) <0)
11945                 exit(1);
11946
11947         exit(0);
11948
11949   ;
11950   return 0;
11951 }
11952 _ACEOF
11953 if ac_fn_c_try_run "$LINENO"; then :
11954
11955                 ssl_header_ver=`cat conftest.sslincver`
11956                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_header_ver" >&5
11957 $as_echo "$ssl_header_ver" >&6; }
11958
11959 else
11960
11961                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11962 $as_echo "not found" >&6; }
11963                 as_fn_error $? "OpenSSL version header not found." "$LINENO" 5
11964
11965 fi
11966 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11967   conftest.$ac_objext conftest.beam conftest.$ac_ext
11968 fi
11969
11970
11971 # Determine OpenSSL library version
11972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version" >&5
11973 $as_echo_n "checking OpenSSL library version... " >&6; }
11974 if test "$cross_compiling" = yes; then :
11975
11976                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
11977 $as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
11978
11979
11980 else
11981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11982 /* end confdefs.h.  */
11983
11984 #include <stdio.h>
11985 #include <string.h>
11986 #include <openssl/opensslv.h>
11987 #include <openssl/crypto.h>
11988 #define DATA "conftest.ssllibver"
11989
11990 int
11991 main ()
11992 {
11993
11994         FILE *fd;
11995         int rc;
11996
11997         fd = fopen(DATA,"w");
11998         if(fd == NULL)
11999                 exit(1);
12000
12001         if ((rc = fprintf(fd ,"%08x (%s)\n", SSLeay(),
12002             SSLeay_version(SSLEAY_VERSION))) <0)
12003                 exit(1);
12004
12005         exit(0);
12006
12007   ;
12008   return 0;
12009 }
12010 _ACEOF
12011 if ac_fn_c_try_run "$LINENO"; then :
12012
12013                 ssl_library_ver=`cat conftest.ssllibver`
12014                 # Check version is supported.
12015                 case "$ssl_library_ver" in
12016                         0090[0-7]*|009080[0-5]*)
12017                                 as_fn_error $? "OpenSSL >= 0.9.8f required" "$LINENO" 5
12018                                 ;;
12019                         *) ;;
12020                 esac
12021                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_library_ver" >&5
12022 $as_echo "$ssl_library_ver" >&6; }
12023
12024 else
12025
12026                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12027 $as_echo "not found" >&6; }
12028                 as_fn_error $? "OpenSSL library not found." "$LINENO" 5
12029
12030 fi
12031 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12032   conftest.$ac_objext conftest.beam conftest.$ac_ext
12033 fi
12034
12035
12036 # XXX make --without-openssl work
12037
12038 cat >>confdefs.h <<_ACEOF
12039 #define WITH_OPENSSL 1
12040 _ACEOF
12041
12042
12043 cat >>confdefs.h <<_ACEOF
12044 #define WITH_SSH1 1
12045 _ACEOF
12046
12047
12048
12049 # Check whether --with-openssl-header-check was given.
12050 if test "${with_openssl_header_check+set}" = set; then :
12051   withval=$with_openssl_header_check;   if test "x$withval" = "xno" ; then
12052                 openssl_check_nonfatal=1
12053            fi
12054
12055
12056 fi
12057
12058
12059 # Sanity check OpenSSL headers
12060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's headers match the library" >&5
12061 $as_echo_n "checking whether OpenSSL's headers match the library... " >&6; }
12062 if test "$cross_compiling" = yes; then :
12063
12064                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
12065 $as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
12066
12067
12068 else
12069   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12070 /* end confdefs.h.  */
12071
12072 #include <string.h>
12073 #include <openssl/opensslv.h>
12074
12075 int
12076 main ()
12077 {
12078
12079         exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1);
12080
12081   ;
12082   return 0;
12083 }
12084 _ACEOF
12085 if ac_fn_c_try_run "$LINENO"; then :
12086
12087                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12088 $as_echo "yes" >&6; }
12089
12090 else
12091
12092                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12093 $as_echo "no" >&6; }
12094                 if test "x$openssl_check_nonfatal" = "x"; then
12095                         as_fn_error $? "Your OpenSSL headers do not match your
12096 library. Check config.log for details.
12097 If you are sure your installation is consistent, you can disable the check
12098 by running \"./configure --without-openssl-header-check\".
12099 Also see contrib/findssl.sh for help identifying header/library mismatches.
12100 " "$LINENO" 5
12101                 else
12102                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your OpenSSL headers do not match your
12103 library. Check config.log for details.
12104 Also see contrib/findssl.sh for help identifying header/library mismatches." >&5
12105 $as_echo "$as_me: WARNING: Your OpenSSL headers do not match your
12106 library. Check config.log for details.
12107 Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;}
12108                 fi
12109
12110 fi
12111 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12112   conftest.$ac_objext conftest.beam conftest.$ac_ext
12113 fi
12114
12115
12116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL functions will link" >&5
12117 $as_echo_n "checking if programs using OpenSSL functions will link... " >&6; }
12118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12119 /* end confdefs.h.  */
12120  #include <openssl/evp.h>
12121 int
12122 main ()
12123 {
12124  SSLeay_add_all_algorithms();
12125   ;
12126   return 0;
12127 }
12128 _ACEOF
12129 if ac_fn_c_try_link "$LINENO"; then :
12130
12131                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12132 $as_echo "yes" >&6; }
12133
12134 else
12135
12136                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12137 $as_echo "no" >&6; }
12138                 saved_LIBS="$LIBS"
12139                 LIBS="$LIBS -ldl"
12140                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL need -ldl" >&5
12141 $as_echo_n "checking if programs using OpenSSL need -ldl... " >&6; }
12142                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12143 /* end confdefs.h.  */
12144  #include <openssl/evp.h>
12145 int
12146 main ()
12147 {
12148  SSLeay_add_all_algorithms();
12149   ;
12150   return 0;
12151 }
12152 _ACEOF
12153 if ac_fn_c_try_link "$LINENO"; then :
12154
12155                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12156 $as_echo "yes" >&6; }
12157
12158 else
12159
12160                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12161 $as_echo "no" >&6; }
12162                                 LIBS="$saved_LIBS"
12163
12164
12165 fi
12166 rm -f core conftest.err conftest.$ac_objext \
12167     conftest$ac_exeext conftest.$ac_ext
12168
12169
12170 fi
12171 rm -f core conftest.err conftest.$ac_objext \
12172     conftest$ac_exeext conftest.$ac_ext
12173
12174 for ac_func in  \
12175         BN_is_prime_ex \
12176         DSA_generate_parameters_ex \
12177         EVP_DigestInit_ex \
12178         EVP_DigestFinal_ex \
12179         EVP_MD_CTX_init \
12180         EVP_MD_CTX_cleanup \
12181         EVP_MD_CTX_copy_ex \
12182         HMAC_CTX_init \
12183         RSA_generate_key_ex \
12184         RSA_get_default_method \
12185
12186 do :
12187   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12188 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12189 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12190   cat >>confdefs.h <<_ACEOF
12191 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12192 _ACEOF
12193
12194 fi
12195 done
12196
12197
12198
12199 # Check whether --with-ssl-engine was given.
12200 if test "${with_ssl_engine+set}" = set; then :
12201   withval=$with_ssl_engine;  if test "x$withval" != "xno" ; then
12202                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL ENGINE support" >&5
12203 $as_echo_n "checking for OpenSSL ENGINE support... " >&6; }
12204                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12205 /* end confdefs.h.  */
12206
12207 #include <openssl/engine.h>
12208
12209 int
12210 main ()
12211 {
12212
12213         ENGINE_load_builtin_engines();
12214         ENGINE_register_all_complete();
12215
12216   ;
12217   return 0;
12218 }
12219 _ACEOF
12220 if ac_fn_c_try_compile "$LINENO"; then :
12221    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12222 $as_echo "yes" >&6; }
12223
12224 $as_echo "#define USE_OPENSSL_ENGINE 1" >>confdefs.h
12225
12226
12227 else
12228    as_fn_error $? "OpenSSL ENGINE support not found" "$LINENO" 5
12229
12230 fi
12231 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12232           fi
12233
12234 fi
12235
12236
12237 # Check for OpenSSL without EVP_aes_{192,256}_cbc
12238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has crippled AES support" >&5
12239 $as_echo_n "checking whether OpenSSL has crippled AES support... " >&6; }
12240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12241 /* end confdefs.h.  */
12242
12243 #include <string.h>
12244 #include <openssl/evp.h>
12245
12246 int
12247 main ()
12248 {
12249
12250         exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);
12251
12252   ;
12253   return 0;
12254 }
12255 _ACEOF
12256 if ac_fn_c_try_link "$LINENO"; then :
12257
12258                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12259 $as_echo "no" >&6; }
12260
12261 else
12262
12263                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12264 $as_echo "yes" >&6; }
12265
12266 $as_echo "#define OPENSSL_LOBOTOMISED_AES 1" >>confdefs.h
12267
12268
12269
12270 fi
12271 rm -f core conftest.err conftest.$ac_objext \
12272     conftest$ac_exeext conftest.$ac_ext
12273
12274 # Check for OpenSSL with EVP_aes_*ctr
12275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has AES CTR via EVP" >&5
12276 $as_echo_n "checking whether OpenSSL has AES CTR via EVP... " >&6; }
12277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12278 /* end confdefs.h.  */
12279
12280 #include <string.h>
12281 #include <openssl/evp.h>
12282
12283 int
12284 main ()
12285 {
12286
12287         exit(EVP_aes_128_ctr() == NULL ||
12288             EVP_aes_192_cbc() == NULL ||
12289             EVP_aes_256_cbc() == NULL);
12290
12291   ;
12292   return 0;
12293 }
12294 _ACEOF
12295 if ac_fn_c_try_link "$LINENO"; then :
12296
12297                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12298 $as_echo "yes" >&6; }
12299
12300 $as_echo "#define OPENSSL_HAVE_EVPCTR 1" >>confdefs.h
12301
12302
12303 else
12304
12305                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12306 $as_echo "no" >&6; }
12307
12308
12309 fi
12310 rm -f core conftest.err conftest.$ac_objext \
12311     conftest$ac_exeext conftest.$ac_ext
12312
12313 # Check for OpenSSL with EVP_aes_*gcm
12314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has AES GCM via EVP" >&5
12315 $as_echo_n "checking whether OpenSSL has AES GCM via EVP... " >&6; }
12316 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12317 /* end confdefs.h.  */
12318
12319 #include <string.h>
12320 #include <openssl/evp.h>
12321
12322 int
12323 main ()
12324 {
12325
12326         exit(EVP_aes_128_gcm() == NULL ||
12327             EVP_aes_256_gcm() == NULL ||
12328             EVP_CTRL_GCM_SET_IV_FIXED == 0 ||
12329             EVP_CTRL_GCM_IV_GEN == 0 ||
12330             EVP_CTRL_GCM_SET_TAG == 0 ||
12331             EVP_CTRL_GCM_GET_TAG == 0 ||
12332             EVP_CIPHER_CTX_ctrl(NULL, 0, 0, NULL) == 0);
12333
12334   ;
12335   return 0;
12336 }
12337 _ACEOF
12338 if ac_fn_c_try_link "$LINENO"; then :
12339
12340                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12341 $as_echo "yes" >&6; }
12342
12343 $as_echo "#define OPENSSL_HAVE_EVPGCM 1" >>confdefs.h
12344
12345
12346 else
12347
12348                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12349 $as_echo "no" >&6; }
12350                 unsupported_algorithms="$unsupported_cipers \
12351                    aes128-gcm@openssh.com aes256-gcm@openssh.com"
12352
12353
12354 fi
12355 rm -f core conftest.err conftest.$ac_objext \
12356     conftest$ac_exeext conftest.$ac_ext
12357
12358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing EVP_CIPHER_CTX_ctrl" >&5
12359 $as_echo_n "checking for library containing EVP_CIPHER_CTX_ctrl... " >&6; }
12360 if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
12361   $as_echo_n "(cached) " >&6
12362 else
12363   ac_func_search_save_LIBS=$LIBS
12364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12365 /* end confdefs.h.  */
12366
12367 /* Override any GCC internal prototype to avoid an error.
12368    Use char because int might match the return type of a GCC
12369    builtin and then its argument prototype would still apply.  */
12370 #ifdef __cplusplus
12371 extern "C"
12372 #endif
12373 char EVP_CIPHER_CTX_ctrl ();
12374 int
12375 main ()
12376 {
12377 return EVP_CIPHER_CTX_ctrl ();
12378   ;
12379   return 0;
12380 }
12381 _ACEOF
12382 for ac_lib in '' crypto; do
12383   if test -z "$ac_lib"; then
12384     ac_res="none required"
12385   else
12386     ac_res=-l$ac_lib
12387     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
12388   fi
12389   if ac_fn_c_try_link "$LINENO"; then :
12390   ac_cv_search_EVP_CIPHER_CTX_ctrl=$ac_res
12391 fi
12392 rm -f core conftest.err conftest.$ac_objext \
12393     conftest$ac_exeext
12394   if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
12395   break
12396 fi
12397 done
12398 if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
12399
12400 else
12401   ac_cv_search_EVP_CIPHER_CTX_ctrl=no
12402 fi
12403 rm conftest.$ac_ext
12404 LIBS=$ac_func_search_save_LIBS
12405 fi
12406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_EVP_CIPHER_CTX_ctrl" >&5
12407 $as_echo "$ac_cv_search_EVP_CIPHER_CTX_ctrl" >&6; }
12408 ac_res=$ac_cv_search_EVP_CIPHER_CTX_ctrl
12409 if test "$ac_res" != no; then :
12410   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12411
12412 $as_echo "#define HAVE_EVP_CIPHER_CTX_CTRL 1" >>confdefs.h
12413
12414 fi
12415
12416
12417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if EVP_DigestUpdate returns an int" >&5
12418 $as_echo_n "checking if EVP_DigestUpdate returns an int... " >&6; }
12419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12420 /* end confdefs.h.  */
12421
12422 #include <string.h>
12423 #include <openssl/evp.h>
12424
12425 int
12426 main ()
12427 {
12428
12429         if(EVP_DigestUpdate(NULL, NULL,0))
12430                 exit(0);
12431
12432   ;
12433   return 0;
12434 }
12435 _ACEOF
12436 if ac_fn_c_try_link "$LINENO"; then :
12437
12438                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12439 $as_echo "yes" >&6; }
12440
12441 else
12442
12443                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12444 $as_echo "no" >&6; }
12445
12446 $as_echo "#define OPENSSL_EVP_DIGESTUPDATE_VOID 1" >>confdefs.h
12447
12448
12449
12450 fi
12451 rm -f core conftest.err conftest.$ac_objext \
12452     conftest$ac_exeext conftest.$ac_ext
12453
12454 # Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
12455 # because the system crypt() is more featureful.
12456 if test "x$check_for_libcrypt_before" = "x1"; then
12457         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
12458 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
12459 if ${ac_cv_lib_crypt_crypt+:} false; then :
12460   $as_echo_n "(cached) " >&6
12461 else
12462   ac_check_lib_save_LIBS=$LIBS
12463 LIBS="-lcrypt  $LIBS"
12464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12465 /* end confdefs.h.  */
12466
12467 /* Override any GCC internal prototype to avoid an error.
12468    Use char because int might match the return type of a GCC
12469    builtin and then its argument prototype would still apply.  */
12470 #ifdef __cplusplus
12471 extern "C"
12472 #endif
12473 char crypt ();
12474 int
12475 main ()
12476 {
12477 return crypt ();
12478   ;
12479   return 0;
12480 }
12481 _ACEOF
12482 if ac_fn_c_try_link "$LINENO"; then :
12483   ac_cv_lib_crypt_crypt=yes
12484 else
12485   ac_cv_lib_crypt_crypt=no
12486 fi
12487 rm -f core conftest.err conftest.$ac_objext \
12488     conftest$ac_exeext conftest.$ac_ext
12489 LIBS=$ac_check_lib_save_LIBS
12490 fi
12491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
12492 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
12493 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
12494   cat >>confdefs.h <<_ACEOF
12495 #define HAVE_LIBCRYPT 1
12496 _ACEOF
12497
12498   LIBS="-lcrypt $LIBS"
12499
12500 fi
12501
12502 fi
12503
12504 # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
12505 # version in OpenSSL.
12506 if test "x$check_for_libcrypt_later" = "x1"; then
12507         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
12508 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
12509 if ${ac_cv_lib_crypt_crypt+:} false; then :
12510   $as_echo_n "(cached) " >&6
12511 else
12512   ac_check_lib_save_LIBS=$LIBS
12513 LIBS="-lcrypt  $LIBS"
12514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12515 /* end confdefs.h.  */
12516
12517 /* Override any GCC internal prototype to avoid an error.
12518    Use char because int might match the return type of a GCC
12519    builtin and then its argument prototype would still apply.  */
12520 #ifdef __cplusplus
12521 extern "C"
12522 #endif
12523 char crypt ();
12524 int
12525 main ()
12526 {
12527 return crypt ();
12528   ;
12529   return 0;
12530 }
12531 _ACEOF
12532 if ac_fn_c_try_link "$LINENO"; then :
12533   ac_cv_lib_crypt_crypt=yes
12534 else
12535   ac_cv_lib_crypt_crypt=no
12536 fi
12537 rm -f core conftest.err conftest.$ac_objext \
12538     conftest$ac_exeext conftest.$ac_ext
12539 LIBS=$ac_check_lib_save_LIBS
12540 fi
12541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
12542 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
12543 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
12544   LIBS="$LIBS -lcrypt"
12545 fi
12546
12547 fi
12548 for ac_func in crypt DES_crypt
12549 do :
12550   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12551 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12552 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12553   cat >>confdefs.h <<_ACEOF
12554 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12555 _ACEOF
12556
12557 fi
12558 done
12559
12560
12561 # Search for SHA256 support in libc and/or OpenSSL
12562 for ac_func in SHA256_Update EVP_sha256
12563 do :
12564   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12565 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12566 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12567   cat >>confdefs.h <<_ACEOF
12568 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12569 _ACEOF
12570
12571 else
12572   unsupported_algorithms="$unsupported_algorithms \
12573         hmac-sha2-256 hmac-sha2-512 \
12574         diffie-hellman-group-exchange-sha256 \
12575         hmac-sha2-256-etm@openssh.com hmac-sha2-512-etm@openssh.com"
12576
12577
12578 fi
12579 done
12580
12581 # Search for RIPE-MD support in OpenSSL
12582 for ac_func in EVP_ripemd160
12583 do :
12584   ac_fn_c_check_func "$LINENO" "EVP_ripemd160" "ac_cv_func_EVP_ripemd160"
12585 if test "x$ac_cv_func_EVP_ripemd160" = xyes; then :
12586   cat >>confdefs.h <<_ACEOF
12587 #define HAVE_EVP_RIPEMD160 1
12588 _ACEOF
12589
12590 else
12591   unsupported_algorithms="$unsupported_algorithms \
12592         hmac-ripemd160
12593         hmac-ripemd160@openssh.com
12594         hmac-ripemd160-etm@openssh.com"
12595
12596
12597 fi
12598 done
12599
12600
12601 # Check complete ECC support in OpenSSL
12602 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_X9_62_prime256v1" >&5
12603 $as_echo_n "checking whether OpenSSL has NID_X9_62_prime256v1... " >&6; }
12604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12605 /* end confdefs.h.  */
12606
12607 #include <openssl/ec.h>
12608 #include <openssl/ecdh.h>
12609 #include <openssl/ecdsa.h>
12610 #include <openssl/evp.h>
12611 #include <openssl/objects.h>
12612 #include <openssl/opensslv.h>
12613 #if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */
12614 # error "OpenSSL < 0.9.8g has unreliable ECC code"
12615 #endif
12616
12617 int
12618 main ()
12619 {
12620
12621         EC_KEY *e = EC_KEY_new_by_curve_name(NID_X9_62_prime256v1);
12622         const EVP_MD *m = EVP_sha256(); /* We need this too */
12623
12624   ;
12625   return 0;
12626 }
12627 _ACEOF
12628 if ac_fn_c_try_link "$LINENO"; then :
12629    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12630 $as_echo "yes" >&6; }
12631           enable_nistp256=1
12632 else
12633    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12634 $as_echo "no" >&6; }
12635
12636 fi
12637 rm -f core conftest.err conftest.$ac_objext \
12638     conftest$ac_exeext conftest.$ac_ext
12639
12640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_secp384r1" >&5
12641 $as_echo_n "checking whether OpenSSL has NID_secp384r1... " >&6; }
12642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12643 /* end confdefs.h.  */
12644
12645 #include <openssl/ec.h>
12646 #include <openssl/ecdh.h>
12647 #include <openssl/ecdsa.h>
12648 #include <openssl/evp.h>
12649 #include <openssl/objects.h>
12650 #include <openssl/opensslv.h>
12651 #if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */
12652 # error "OpenSSL < 0.9.8g has unreliable ECC code"
12653 #endif
12654
12655 int
12656 main ()
12657 {
12658
12659         EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp384r1);
12660         const EVP_MD *m = EVP_sha384(); /* We need this too */
12661
12662   ;
12663   return 0;
12664 }
12665 _ACEOF
12666 if ac_fn_c_try_link "$LINENO"; then :
12667    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12668 $as_echo "yes" >&6; }
12669           enable_nistp384=1
12670 else
12671    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12672 $as_echo "no" >&6; }
12673
12674 fi
12675 rm -f core conftest.err conftest.$ac_objext \
12676     conftest$ac_exeext conftest.$ac_ext
12677
12678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has NID_secp521r1" >&5
12679 $as_echo_n "checking whether OpenSSL has NID_secp521r1... " >&6; }
12680 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12681 /* end confdefs.h.  */
12682
12683 #include <openssl/ec.h>
12684 #include <openssl/ecdh.h>
12685 #include <openssl/ecdsa.h>
12686 #include <openssl/evp.h>
12687 #include <openssl/objects.h>
12688 #include <openssl/opensslv.h>
12689 #if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */
12690 # error "OpenSSL < 0.9.8g has unreliable ECC code"
12691 #endif
12692
12693 int
12694 main ()
12695 {
12696
12697         EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
12698         const EVP_MD *m = EVP_sha512(); /* We need this too */
12699
12700   ;
12701   return 0;
12702 }
12703 _ACEOF
12704 if ac_fn_c_try_link "$LINENO"; then :
12705    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12706 $as_echo "yes" >&6; }
12707           { $as_echo "$as_me:${as_lineno-$LINENO}: checking if OpenSSL's NID_secp521r1 is functional" >&5
12708 $as_echo_n "checking if OpenSSL's NID_secp521r1 is functional... " >&6; }
12709           if test "$cross_compiling" = yes; then :
12710    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross-compiling: assuming yes" >&5
12711 $as_echo "$as_me: WARNING: cross-compiling: assuming yes" >&2;}
12712                   enable_nistp521=1
12713
12714 else
12715   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12716 /* end confdefs.h.  */
12717
12718 #include <openssl/ec.h>
12719 #include <openssl/ecdh.h>
12720 #include <openssl/ecdsa.h>
12721 #include <openssl/evp.h>
12722 #include <openssl/objects.h>
12723 #include <openssl/opensslv.h>
12724
12725 int
12726 main ()
12727 {
12728
12729                 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
12730                 const EVP_MD *m = EVP_sha512(); /* We need this too */
12731                 exit(e == NULL || m == NULL);
12732
12733   ;
12734   return 0;
12735 }
12736 _ACEOF
12737 if ac_fn_c_try_run "$LINENO"; then :
12738    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12739 $as_echo "yes" >&6; }
12740                   enable_nistp521=1
12741 else
12742    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12743 $as_echo "no" >&6; }
12744 fi
12745 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12746   conftest.$ac_objext conftest.beam conftest.$ac_ext
12747 fi
12748
12749 else
12750   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12751 $as_echo "no" >&6; }
12752
12753 fi
12754 rm -f core conftest.err conftest.$ac_objext \
12755     conftest$ac_exeext conftest.$ac_ext
12756
12757 COMMENT_OUT_ECC="#no ecc#"
12758 TEST_SSH_ECC=no
12759
12760 if test x$enable_nistp256 = x1 || test x$enable_nistp384 = x1 || \
12761     test x$enable_nistp521 = x1; then
12762
12763 $as_echo "#define OPENSSL_HAS_ECC 1" >>confdefs.h
12764
12765 fi
12766 if test x$enable_nistp256 = x1; then
12767
12768 $as_echo "#define OPENSSL_HAS_NISTP256 1" >>confdefs.h
12769
12770         TEST_SSH_ECC=yes
12771         COMMENT_OUT_ECC=""
12772 else
12773         unsupported_algorithms="$unsupported_algorithms ecdsa-sha2-nistp256 \
12774             ecdh-sha2-nistp256 ecdsa-sha2-nistp256-cert-v01@openssh.com"
12775 fi
12776 if test x$enable_nistp384 = x1; then
12777
12778 $as_echo "#define OPENSSL_HAS_NISTP384 1" >>confdefs.h
12779
12780         TEST_SSH_ECC=yes
12781         COMMENT_OUT_ECC=""
12782 else
12783         unsupported_algorithms="$unsupported_algorithms ecdsa-sha2-nistp384 \
12784             ecdh-sha2-nistp384 ecdsa-sha2-nistp384-cert-v01@openssh.com"
12785 fi
12786 if test x$enable_nistp521 = x1; then
12787
12788 $as_echo "#define OPENSSL_HAS_NISTP521 1" >>confdefs.h
12789
12790         TEST_SSH_ECC=yes
12791         COMMENT_OUT_ECC=""
12792 else
12793         unsupported_algorithms="$unsupported_algorithms ecdh-sha2-nistp521 \
12794             ecdsa-sha2-nistp521 ecdsa-sha2-nistp521-cert-v01@openssh.com"
12795 fi
12796
12797
12798
12799
12800 for ac_func in  \
12801         arc4random \
12802         arc4random_buf \
12803         arc4random_stir \
12804         arc4random_uniform \
12805
12806 do :
12807   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12808 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12809 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12810   cat >>confdefs.h <<_ACEOF
12811 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12812 _ACEOF
12813
12814 fi
12815 done
12816
12817
12818 saved_LIBS="$LIBS"
12819 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ia_openinfo in -liaf" >&5
12820 $as_echo_n "checking for ia_openinfo in -liaf... " >&6; }
12821 if ${ac_cv_lib_iaf_ia_openinfo+:} false; then :
12822   $as_echo_n "(cached) " >&6
12823 else
12824   ac_check_lib_save_LIBS=$LIBS
12825 LIBS="-liaf  $LIBS"
12826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12827 /* end confdefs.h.  */
12828
12829 /* Override any GCC internal prototype to avoid an error.
12830    Use char because int might match the return type of a GCC
12831    builtin and then its argument prototype would still apply.  */
12832 #ifdef __cplusplus
12833 extern "C"
12834 #endif
12835 char ia_openinfo ();
12836 int
12837 main ()
12838 {
12839 return ia_openinfo ();
12840   ;
12841   return 0;
12842 }
12843 _ACEOF
12844 if ac_fn_c_try_link "$LINENO"; then :
12845   ac_cv_lib_iaf_ia_openinfo=yes
12846 else
12847   ac_cv_lib_iaf_ia_openinfo=no
12848 fi
12849 rm -f core conftest.err conftest.$ac_objext \
12850     conftest$ac_exeext conftest.$ac_ext
12851 LIBS=$ac_check_lib_save_LIBS
12852 fi
12853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iaf_ia_openinfo" >&5
12854 $as_echo "$ac_cv_lib_iaf_ia_openinfo" >&6; }
12855 if test "x$ac_cv_lib_iaf_ia_openinfo" = xyes; then :
12856
12857         LIBS="$LIBS -liaf"
12858         for ac_func in set_id
12859 do :
12860   ac_fn_c_check_func "$LINENO" "set_id" "ac_cv_func_set_id"
12861 if test "x$ac_cv_func_set_id" = xyes; then :
12862   cat >>confdefs.h <<_ACEOF
12863 #define HAVE_SET_ID 1
12864 _ACEOF
12865  SSHDLIBS="$SSHDLIBS -liaf"
12866
12867 $as_echo "#define HAVE_LIBIAF 1" >>confdefs.h
12868
12869
12870 fi
12871 done
12872
12873
12874 fi
12875
12876 LIBS="$saved_LIBS"
12877
12878 ### Configure cryptographic random number support
12879
12880 # Check wheter OpenSSL seeds itself
12881 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's PRNG is internally seeded" >&5
12882 $as_echo_n "checking whether OpenSSL's PRNG is internally seeded... " >&6; }
12883 if test "$cross_compiling" = yes; then :
12884
12885                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
12886 $as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
12887                 # This is safe, since we will fatal() at runtime if
12888                 # OpenSSL is not seeded correctly.
12889                 OPENSSL_SEEDS_ITSELF=yes
12890
12891
12892 else
12893   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12894 /* end confdefs.h.  */
12895
12896 #include <string.h>
12897 #include <openssl/rand.h>
12898
12899 int
12900 main ()
12901 {
12902
12903         exit(RAND_status() == 1 ? 0 : 1);
12904
12905   ;
12906   return 0;
12907 }
12908 _ACEOF
12909 if ac_fn_c_try_run "$LINENO"; then :
12910
12911                 OPENSSL_SEEDS_ITSELF=yes
12912                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12913 $as_echo "yes" >&6; }
12914
12915 else
12916
12917                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12918 $as_echo "no" >&6; }
12919
12920 fi
12921 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12922   conftest.$ac_objext conftest.beam conftest.$ac_ext
12923 fi
12924
12925
12926 # PRNGD TCP socket
12927
12928 # Check whether --with-prngd-port was given.
12929 if test "${with_prngd_port+set}" = set; then :
12930   withval=$with_prngd_port;
12931                 case "$withval" in
12932                 no)
12933                         withval=""
12934                         ;;
12935                 [0-9]*)
12936                         ;;
12937                 *)
12938                         as_fn_error $? "You must specify a numeric port number for --with-prngd-port" "$LINENO" 5
12939                         ;;
12940                 esac
12941                 if test ! -z "$withval" ; then
12942                         PRNGD_PORT="$withval"
12943
12944 cat >>confdefs.h <<_ACEOF
12945 #define PRNGD_PORT $PRNGD_PORT
12946 _ACEOF
12947
12948                 fi
12949
12950
12951 fi
12952
12953
12954 # PRNGD Unix domain socket
12955
12956 # Check whether --with-prngd-socket was given.
12957 if test "${with_prngd_socket+set}" = set; then :
12958   withval=$with_prngd_socket;
12959                 case "$withval" in
12960                 yes)
12961                         withval="/var/run/egd-pool"
12962                         ;;
12963                 no)
12964                         withval=""
12965                         ;;
12966                 /*)
12967                         ;;
12968                 *)
12969                         as_fn_error $? "You must specify an absolute path to the entropy socket" "$LINENO" 5
12970                         ;;
12971                 esac
12972
12973                 if test ! -z "$withval" ; then
12974                         if test ! -z "$PRNGD_PORT" ; then
12975                                 as_fn_error $? "You may not specify both a PRNGD/EGD port and socket" "$LINENO" 5
12976                         fi
12977                         if test ! -r "$withval" ; then
12978                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Entropy socket is not readable" >&5
12979 $as_echo "$as_me: WARNING: Entropy socket is not readable" >&2;}
12980                         fi
12981                         PRNGD_SOCKET="$withval"
12982
12983 cat >>confdefs.h <<_ACEOF
12984 #define PRNGD_SOCKET "$PRNGD_SOCKET"
12985 _ACEOF
12986
12987                 fi
12988
12989 else
12990
12991                 # Check for existing socket only if we don't have a random device already
12992                 if test "x$OPENSSL_SEEDS_ITSELF" != "xyes" ; then
12993                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRNGD/EGD socket" >&5
12994 $as_echo_n "checking for PRNGD/EGD socket... " >&6; }
12995                         # Insert other locations here
12996                         for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
12997                                 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
12998                                         PRNGD_SOCKET="$sock"
12999                                         cat >>confdefs.h <<_ACEOF
13000 #define PRNGD_SOCKET "$PRNGD_SOCKET"
13001 _ACEOF
13002
13003                                         break;
13004                                 fi
13005                         done
13006                         if test ! -z "$PRNGD_SOCKET" ; then
13007                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRNGD_SOCKET" >&5
13008 $as_echo "$PRNGD_SOCKET" >&6; }
13009                         else
13010                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13011 $as_echo "not found" >&6; }
13012                         fi
13013                 fi
13014
13015
13016 fi
13017
13018
13019 # Which randomness source do we use?
13020 if test ! -z "$PRNGD_PORT" ; then
13021         RAND_MSG="PRNGd port $PRNGD_PORT"
13022 elif test ! -z "$PRNGD_SOCKET" ; then
13023         RAND_MSG="PRNGd socket $PRNGD_SOCKET"
13024 elif test ! -z "$OPENSSL_SEEDS_ITSELF" ; then
13025
13026 $as_echo "#define OPENSSL_PRNG_ONLY 1" >>confdefs.h
13027
13028         RAND_MSG="OpenSSL internal ONLY"
13029 else
13030         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
13031 fi
13032
13033 # Check for PAM libs
13034 PAM_MSG="no"
13035
13036 # Check whether --with-pam was given.
13037 if test "${with_pam+set}" = set; then :
13038   withval=$with_pam;
13039                 if test "x$withval" != "xno" ; then
13040                         if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
13041                            test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
13042                                 as_fn_error $? "PAM headers not found" "$LINENO" 5
13043                         fi
13044
13045                         saved_LIBS="$LIBS"
13046                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
13047 $as_echo_n "checking for dlopen in -ldl... " >&6; }
13048 if ${ac_cv_lib_dl_dlopen+:} false; then :
13049   $as_echo_n "(cached) " >&6
13050 else
13051   ac_check_lib_save_LIBS=$LIBS
13052 LIBS="-ldl  $LIBS"
13053 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13054 /* end confdefs.h.  */
13055
13056 /* Override any GCC internal prototype to avoid an error.
13057    Use char because int might match the return type of a GCC
13058    builtin and then its argument prototype would still apply.  */
13059 #ifdef __cplusplus
13060 extern "C"
13061 #endif
13062 char dlopen ();
13063 int
13064 main ()
13065 {
13066 return dlopen ();
13067   ;
13068   return 0;
13069 }
13070 _ACEOF
13071 if ac_fn_c_try_link "$LINENO"; then :
13072   ac_cv_lib_dl_dlopen=yes
13073 else
13074   ac_cv_lib_dl_dlopen=no
13075 fi
13076 rm -f core conftest.err conftest.$ac_objext \
13077     conftest$ac_exeext conftest.$ac_ext
13078 LIBS=$ac_check_lib_save_LIBS
13079 fi
13080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
13081 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
13082 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
13083   cat >>confdefs.h <<_ACEOF
13084 #define HAVE_LIBDL 1
13085 _ACEOF
13086
13087   LIBS="-ldl $LIBS"
13088
13089 fi
13090
13091                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_set_item in -lpam" >&5
13092 $as_echo_n "checking for pam_set_item in -lpam... " >&6; }
13093 if ${ac_cv_lib_pam_pam_set_item+:} false; then :
13094   $as_echo_n "(cached) " >&6
13095 else
13096   ac_check_lib_save_LIBS=$LIBS
13097 LIBS="-lpam  $LIBS"
13098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13099 /* end confdefs.h.  */
13100
13101 /* Override any GCC internal prototype to avoid an error.
13102    Use char because int might match the return type of a GCC
13103    builtin and then its argument prototype would still apply.  */
13104 #ifdef __cplusplus
13105 extern "C"
13106 #endif
13107 char pam_set_item ();
13108 int
13109 main ()
13110 {
13111 return pam_set_item ();
13112   ;
13113   return 0;
13114 }
13115 _ACEOF
13116 if ac_fn_c_try_link "$LINENO"; then :
13117   ac_cv_lib_pam_pam_set_item=yes
13118 else
13119   ac_cv_lib_pam_pam_set_item=no
13120 fi
13121 rm -f core conftest.err conftest.$ac_objext \
13122     conftest$ac_exeext conftest.$ac_ext
13123 LIBS=$ac_check_lib_save_LIBS
13124 fi
13125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_set_item" >&5
13126 $as_echo "$ac_cv_lib_pam_pam_set_item" >&6; }
13127 if test "x$ac_cv_lib_pam_pam_set_item" = xyes; then :
13128   cat >>confdefs.h <<_ACEOF
13129 #define HAVE_LIBPAM 1
13130 _ACEOF
13131
13132   LIBS="-lpam $LIBS"
13133
13134 else
13135   as_fn_error $? "*** libpam missing" "$LINENO" 5
13136 fi
13137
13138                         for ac_func in pam_getenvlist
13139 do :
13140   ac_fn_c_check_func "$LINENO" "pam_getenvlist" "ac_cv_func_pam_getenvlist"
13141 if test "x$ac_cv_func_pam_getenvlist" = xyes; then :
13142   cat >>confdefs.h <<_ACEOF
13143 #define HAVE_PAM_GETENVLIST 1
13144 _ACEOF
13145
13146 fi
13147 done
13148
13149                         for ac_func in pam_putenv
13150 do :
13151   ac_fn_c_check_func "$LINENO" "pam_putenv" "ac_cv_func_pam_putenv"
13152 if test "x$ac_cv_func_pam_putenv" = xyes; then :
13153   cat >>confdefs.h <<_ACEOF
13154 #define HAVE_PAM_PUTENV 1
13155 _ACEOF
13156
13157 fi
13158 done
13159
13160                         LIBS="$saved_LIBS"
13161
13162                         PAM_MSG="yes"
13163
13164                         SSHDLIBS="$SSHDLIBS -lpam"
13165
13166 $as_echo "#define USE_PAM 1" >>confdefs.h
13167
13168
13169                         if test $ac_cv_lib_dl_dlopen = yes; then
13170                                 case "$LIBS" in
13171                                 *-ldl*)
13172                                         # libdl already in LIBS
13173                                         ;;
13174                                 *)
13175                                         SSHDLIBS="$SSHDLIBS -ldl"
13176                                         ;;
13177                                 esac
13178                         fi
13179                 fi
13180
13181
13182 fi
13183
13184
13185 # Check for older PAM
13186 if test "x$PAM_MSG" = "xyes" ; then
13187         # Check PAM strerror arguments (old PAM)
13188         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pam_strerror takes only one argument" >&5
13189 $as_echo_n "checking whether pam_strerror takes only one argument... " >&6; }
13190         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13191 /* end confdefs.h.  */
13192
13193 #include <stdlib.h>
13194 #if defined(HAVE_SECURITY_PAM_APPL_H)
13195 #include <security/pam_appl.h>
13196 #elif defined (HAVE_PAM_PAM_APPL_H)
13197 #include <pam/pam_appl.h>
13198 #endif
13199
13200 int
13201 main ()
13202 {
13203
13204 (void)pam_strerror((pam_handle_t *)NULL, -1);
13205
13206   ;
13207   return 0;
13208 }
13209 _ACEOF
13210 if ac_fn_c_try_compile "$LINENO"; then :
13211   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13212 $as_echo "no" >&6; }
13213 else
13214
13215
13216 $as_echo "#define HAVE_OLD_PAM 1" >>confdefs.h
13217
13218                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13219 $as_echo "yes" >&6; }
13220                         PAM_MSG="yes (old library)"
13221
13222
13223 fi
13224 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13225 fi
13226
13227 case "$host" in
13228 *-*-cygwin*)
13229         SSH_PRIVSEP_USER=CYGWIN_SSH_PRIVSEP_USER
13230         ;;
13231 *)
13232         SSH_PRIVSEP_USER=sshd
13233         ;;
13234 esac
13235
13236 # Check whether --with-privsep-user was given.
13237 if test "${with_privsep_user+set}" = set; then :
13238   withval=$with_privsep_user;
13239                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
13240                     test "x${withval}" != "xyes"; then
13241                         SSH_PRIVSEP_USER=$withval
13242                 fi
13243
13244
13245 fi
13246
13247 if test "x$SSH_PRIVSEP_USER" = "xCYGWIN_SSH_PRIVSEP_USER" ; then
13248
13249 cat >>confdefs.h <<_ACEOF
13250 #define SSH_PRIVSEP_USER CYGWIN_SSH_PRIVSEP_USER
13251 _ACEOF
13252
13253 else
13254
13255 cat >>confdefs.h <<_ACEOF
13256 #define SSH_PRIVSEP_USER "$SSH_PRIVSEP_USER"
13257 _ACEOF
13258
13259 fi
13260
13261
13262 if test "x$have_linux_no_new_privs" = "x1" ; then
13263 ac_fn_c_check_decl "$LINENO" "SECCOMP_MODE_FILTER" "ac_cv_have_decl_SECCOMP_MODE_FILTER" "
13264         #include <sys/types.h>
13265         #include <linux/seccomp.h>
13266
13267 "
13268 if test "x$ac_cv_have_decl_SECCOMP_MODE_FILTER" = xyes; then :
13269   have_seccomp_filter=1
13270 fi
13271
13272 fi
13273 if test "x$have_seccomp_filter" = "x1" ; then
13274 { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel for seccomp_filter support" >&5
13275 $as_echo_n "checking kernel for seccomp_filter support... " >&6; }
13276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13277 /* end confdefs.h.  */
13278
13279                 #include <errno.h>
13280                 #include <elf.h>
13281                 #include <linux/audit.h>
13282                 #include <linux/seccomp.h>
13283                 #include <stdlib.h>
13284                 #include <sys/prctl.h>
13285
13286 int
13287 main ()
13288 {
13289  int i = $seccomp_audit_arch;
13290            errno = 0;
13291            prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0);
13292            exit(errno == EFAULT ? 0 : 1);
13293   ;
13294   return 0;
13295 }
13296 _ACEOF
13297 if ac_fn_c_try_link "$LINENO"; then :
13298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13299 $as_echo "yes" >&6; }
13300 else
13301
13302                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13303 $as_echo "no" >&6; }
13304                 # Disable seccomp filter as a target
13305                 have_seccomp_filter=0
13306
13307
13308 fi
13309 rm -f core conftest.err conftest.$ac_objext \
13310     conftest$ac_exeext conftest.$ac_ext
13311 fi
13312
13313 # Decide which sandbox style to use
13314 sandbox_arg=""
13315
13316 # Check whether --with-sandbox was given.
13317 if test "${with_sandbox+set}" = set; then :
13318   withval=$with_sandbox;
13319                 if test "x$withval" = "xyes" ; then
13320                         sandbox_arg=""
13321                 else
13322                         sandbox_arg="$withval"
13323                 fi
13324
13325
13326 fi
13327
13328
13329 # Some platforms (seems to be the ones that have a kernel poll(2)-type
13330 # function with which they implement select(2)) use an extra file descriptor
13331 # when calling select(2), which means we can't use the rlimit sandbox.
13332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select works with descriptor rlimit" >&5
13333 $as_echo_n "checking if select works with descriptor rlimit... " >&6; }
13334 if test "$cross_compiling" = yes; then :
13335   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
13336 $as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
13337
13338 else
13339   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13340 /* end confdefs.h.  */
13341
13342 #include <sys/types.h>
13343 #ifdef HAVE_SYS_TIME_H
13344 # include <sys/time.h>
13345 #endif
13346 #include <sys/resource.h>
13347 #ifdef HAVE_SYS_SELECT_H
13348 # include <sys/select.h>
13349 #endif
13350 #include <errno.h>
13351 #include <fcntl.h>
13352 #include <stdlib.h>
13353
13354 int
13355 main ()
13356 {
13357
13358         struct rlimit rl_zero;
13359         int fd, r;
13360         fd_set fds;
13361         struct timeval tv;
13362
13363         fd = open("/dev/null", O_RDONLY);
13364         FD_ZERO(&fds);
13365         FD_SET(fd, &fds);
13366         rl_zero.rlim_cur = rl_zero.rlim_max = 0;
13367         setrlimit(RLIMIT_FSIZE, &rl_zero);
13368         setrlimit(RLIMIT_NOFILE, &rl_zero);
13369         tv.tv_sec = 1;
13370         tv.tv_usec = 0;
13371         r = select(fd+1, &fds, NULL, NULL, &tv);
13372         exit (r == -1 ? 1 : 0);
13373
13374   ;
13375   return 0;
13376 }
13377 _ACEOF
13378 if ac_fn_c_try_run "$LINENO"; then :
13379   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13380 $as_echo "yes" >&6; }
13381          select_works_with_rlimit=yes
13382 else
13383   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13384 $as_echo "no" >&6; }
13385          select_works_with_rlimit=no
13386 fi
13387 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13388   conftest.$ac_objext conftest.beam conftest.$ac_ext
13389 fi
13390
13391
13392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setrlimit(RLIMIT_NOFILE,{0,0}) works" >&5
13393 $as_echo_n "checking if setrlimit(RLIMIT_NOFILE,{0,0}) works... " >&6; }
13394 if test "$cross_compiling" = yes; then :
13395   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
13396 $as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
13397
13398 else
13399   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13400 /* end confdefs.h.  */
13401
13402 #include <sys/types.h>
13403 #ifdef HAVE_SYS_TIME_H
13404 # include <sys/time.h>
13405 #endif
13406 #include <sys/resource.h>
13407 #include <errno.h>
13408 #include <stdlib.h>
13409
13410 int
13411 main ()
13412 {
13413
13414         struct rlimit rl_zero;
13415         int fd, r;
13416         fd_set fds;
13417
13418         rl_zero.rlim_cur = rl_zero.rlim_max = 0;
13419         r = setrlimit(RLIMIT_NOFILE, &rl_zero);
13420         exit (r == -1 ? 1 : 0);
13421
13422   ;
13423   return 0;
13424 }
13425 _ACEOF
13426 if ac_fn_c_try_run "$LINENO"; then :
13427   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13428 $as_echo "yes" >&6; }
13429          rlimit_nofile_zero_works=yes
13430 else
13431   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13432 $as_echo "no" >&6; }
13433          rlimit_nofile_zero_works=no
13434 fi
13435 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13436   conftest.$ac_objext conftest.beam conftest.$ac_ext
13437 fi
13438
13439
13440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setrlimit RLIMIT_FSIZE works" >&5
13441 $as_echo_n "checking if setrlimit RLIMIT_FSIZE works... " >&6; }
13442 if test "$cross_compiling" = yes; then :
13443   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
13444 $as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
13445
13446 else
13447   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13448 /* end confdefs.h.  */
13449
13450 #include <sys/types.h>
13451 #include <sys/resource.h>
13452 #include <stdlib.h>
13453
13454 int
13455 main ()
13456 {
13457
13458                 struct rlimit rl_zero;
13459
13460                 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
13461                 exit(setrlimit(RLIMIT_FSIZE, &rl_zero) != 0);
13462
13463   ;
13464   return 0;
13465 }
13466 _ACEOF
13467 if ac_fn_c_try_run "$LINENO"; then :
13468   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13469 $as_echo "yes" >&6; }
13470 else
13471   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13472 $as_echo "no" >&6; }
13473
13474 $as_echo "#define SANDBOX_SKIP_RLIMIT_FSIZE 1" >>confdefs.h
13475
13476 fi
13477 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13478   conftest.$ac_objext conftest.beam conftest.$ac_ext
13479 fi
13480
13481
13482 if test "x$sandbox_arg" = "xsystrace" || \
13483    ( test -z "$sandbox_arg" && test "x$have_systr_policy_kill" = "x1" ) ; then
13484         test "x$have_systr_policy_kill" != "x1" && \
13485                 as_fn_error $? "systrace sandbox requires systrace headers and SYSTR_POLICY_KILL support" "$LINENO" 5
13486         SANDBOX_STYLE="systrace"
13487
13488 $as_echo "#define SANDBOX_SYSTRACE 1" >>confdefs.h
13489
13490 elif test "x$sandbox_arg" = "xdarwin" || \
13491      ( test -z "$sandbox_arg" && test "x$ac_cv_func_sandbox_init" = "xyes" && \
13492        test "x$ac_cv_header_sandbox_h" = "xyes") ; then
13493         test "x$ac_cv_func_sandbox_init" != "xyes" -o \
13494              "x$ac_cv_header_sandbox_h" != "xyes" && \
13495                 as_fn_error $? "Darwin seatbelt sandbox requires sandbox.h and sandbox_init function" "$LINENO" 5
13496         SANDBOX_STYLE="darwin"
13497
13498 $as_echo "#define SANDBOX_DARWIN 1" >>confdefs.h
13499
13500 elif test "x$sandbox_arg" = "xseccomp_filter" || \
13501      ( test -z "$sandbox_arg" && \
13502        test "x$have_seccomp_filter" = "x1" && \
13503        test "x$ac_cv_header_elf_h" = "xyes" && \
13504        test "x$ac_cv_header_linux_audit_h" = "xyes" && \
13505        test "x$ac_cv_header_linux_filter_h" = "xyes" && \
13506        test "x$seccomp_audit_arch" != "x" && \
13507        test "x$have_linux_no_new_privs" = "x1" && \
13508        test "x$ac_cv_func_prctl" = "xyes" ) ; then
13509         test "x$seccomp_audit_arch" = "x" && \
13510                 as_fn_error $? "seccomp_filter sandbox not supported on $host" "$LINENO" 5
13511         test "x$have_linux_no_new_privs" != "x1" && \
13512                 as_fn_error $? "seccomp_filter sandbox requires PR_SET_NO_NEW_PRIVS" "$LINENO" 5
13513         test "x$have_seccomp_filter" != "x1" && \
13514                 as_fn_error $? "seccomp_filter sandbox requires seccomp headers" "$LINENO" 5
13515         test "x$ac_cv_func_prctl" != "xyes" && \
13516                 as_fn_error $? "seccomp_filter sandbox requires prctl function" "$LINENO" 5
13517         SANDBOX_STYLE="seccomp_filter"
13518
13519 $as_echo "#define SANDBOX_SECCOMP_FILTER 1" >>confdefs.h
13520
13521 elif test "x$sandbox_arg" = "xcapsicum" || \
13522      ( test -z "$sandbox_arg" && \
13523        test "x$ac_cv_header_sys_capsicum_h" = "xyes" && \
13524        test "x$ac_cv_func_cap_rights_limit" = "xyes") ; then
13525        test "x$ac_cv_header_sys_capsicum_h" != "xyes" && \
13526                 as_fn_error $? "capsicum sandbox requires sys/capsicum.h header" "$LINENO" 5
13527        test "x$ac_cv_func_cap_rights_limit" != "xyes" && \
13528                 as_fn_error $? "capsicum sandbox requires cap_rights_limit function" "$LINENO" 5
13529        SANDBOX_STYLE="capsicum"
13530
13531 $as_echo "#define SANDBOX_CAPSICUM 1" >>confdefs.h
13532
13533 elif test "x$sandbox_arg" = "xrlimit" || \
13534      ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" && \
13535        test "x$select_works_with_rlimit" = "xyes" && \
13536        test "x$rlimit_nofile_zero_works" = "xyes" ) ; then
13537         test "x$ac_cv_func_setrlimit" != "xyes" && \
13538                 as_fn_error $? "rlimit sandbox requires setrlimit function" "$LINENO" 5
13539         test "x$select_works_with_rlimit" != "xyes" && \
13540                 as_fn_error $? "rlimit sandbox requires select to work with rlimit" "$LINENO" 5
13541         SANDBOX_STYLE="rlimit"
13542
13543 $as_echo "#define SANDBOX_RLIMIT 1" >>confdefs.h
13544
13545 elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \
13546      test "x$sandbox_arg" = "xnone" || test "x$sandbox_arg" = "xnull" ; then
13547         SANDBOX_STYLE="none"
13548
13549 $as_echo "#define SANDBOX_NULL 1" >>confdefs.h
13550
13551 else
13552         as_fn_error $? "unsupported --with-sandbox" "$LINENO" 5
13553 fi
13554
13555 # Cheap hack to ensure NEWS-OS libraries are arranged right.
13556 if test ! -z "$SONY" ; then
13557   LIBS="$LIBS -liberty";
13558 fi
13559
13560 # Check for  long long datatypes
13561 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
13562 if test "x$ac_cv_type_long_long" = xyes; then :
13563
13564 cat >>confdefs.h <<_ACEOF
13565 #define HAVE_LONG_LONG 1
13566 _ACEOF
13567
13568
13569 fi
13570 ac_fn_c_check_type "$LINENO" "unsigned long long" "ac_cv_type_unsigned_long_long" "$ac_includes_default"
13571 if test "x$ac_cv_type_unsigned_long_long" = xyes; then :
13572
13573 cat >>confdefs.h <<_ACEOF
13574 #define HAVE_UNSIGNED_LONG_LONG 1
13575 _ACEOF
13576
13577
13578 fi
13579 ac_fn_c_check_type "$LINENO" "long double" "ac_cv_type_long_double" "$ac_includes_default"
13580 if test "x$ac_cv_type_long_double" = xyes; then :
13581
13582 cat >>confdefs.h <<_ACEOF
13583 #define HAVE_LONG_DOUBLE 1
13584 _ACEOF
13585
13586
13587 fi
13588
13589
13590 # Check datatype sizes
13591 # The cast to long int works around a bug in the HP C Compiler
13592 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13593 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13594 # This bug is HP SR number 8606223364.
13595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short int" >&5
13596 $as_echo_n "checking size of short int... " >&6; }
13597 if ${ac_cv_sizeof_short_int+:} false; then :
13598   $as_echo_n "(cached) " >&6
13599 else
13600   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short int))" "ac_cv_sizeof_short_int"        "$ac_includes_default"; then :
13601
13602 else
13603   if test "$ac_cv_type_short_int" = yes; then
13604      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13605 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13606 as_fn_error 77 "cannot compute sizeof (short int)
13607 See \`config.log' for more details" "$LINENO" 5; }
13608    else
13609      ac_cv_sizeof_short_int=0
13610    fi
13611 fi
13612
13613 fi
13614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short_int" >&5
13615 $as_echo "$ac_cv_sizeof_short_int" >&6; }
13616
13617
13618
13619 cat >>confdefs.h <<_ACEOF
13620 #define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
13621 _ACEOF
13622
13623
13624 # The cast to long int works around a bug in the HP C Compiler
13625 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13626 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13627 # This bug is HP SR number 8606223364.
13628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
13629 $as_echo_n "checking size of int... " >&6; }
13630 if ${ac_cv_sizeof_int+:} false; then :
13631   $as_echo_n "(cached) " >&6
13632 else
13633   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
13634
13635 else
13636   if test "$ac_cv_type_int" = yes; then
13637      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13638 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13639 as_fn_error 77 "cannot compute sizeof (int)
13640 See \`config.log' for more details" "$LINENO" 5; }
13641    else
13642      ac_cv_sizeof_int=0
13643    fi
13644 fi
13645
13646 fi
13647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
13648 $as_echo "$ac_cv_sizeof_int" >&6; }
13649
13650
13651
13652 cat >>confdefs.h <<_ACEOF
13653 #define SIZEOF_INT $ac_cv_sizeof_int
13654 _ACEOF
13655
13656
13657 # The cast to long int works around a bug in the HP C Compiler
13658 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13659 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13660 # This bug is HP SR number 8606223364.
13661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5
13662 $as_echo_n "checking size of long int... " >&6; }
13663 if ${ac_cv_sizeof_long_int+:} false; then :
13664   $as_echo_n "(cached) " >&6
13665 else
13666   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int"        "$ac_includes_default"; then :
13667
13668 else
13669   if test "$ac_cv_type_long_int" = yes; then
13670      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13671 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13672 as_fn_error 77 "cannot compute sizeof (long int)
13673 See \`config.log' for more details" "$LINENO" 5; }
13674    else
13675      ac_cv_sizeof_long_int=0
13676    fi
13677 fi
13678
13679 fi
13680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_int" >&5
13681 $as_echo "$ac_cv_sizeof_long_int" >&6; }
13682
13683
13684
13685 cat >>confdefs.h <<_ACEOF
13686 #define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
13687 _ACEOF
13688
13689
13690 # The cast to long int works around a bug in the HP C Compiler
13691 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
13692 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
13693 # This bug is HP SR number 8606223364.
13694 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5
13695 $as_echo_n "checking size of long long int... " >&6; }
13696 if ${ac_cv_sizeof_long_long_int+:} false; then :
13697   $as_echo_n "(cached) " >&6
13698 else
13699   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int"        "$ac_includes_default"; then :
13700
13701 else
13702   if test "$ac_cv_type_long_long_int" = yes; then
13703      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
13704 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
13705 as_fn_error 77 "cannot compute sizeof (long long int)
13706 See \`config.log' for more details" "$LINENO" 5; }
13707    else
13708      ac_cv_sizeof_long_long_int=0
13709    fi
13710 fi
13711
13712 fi
13713 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long_int" >&5
13714 $as_echo "$ac_cv_sizeof_long_long_int" >&6; }
13715
13716
13717
13718 cat >>confdefs.h <<_ACEOF
13719 #define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
13720 _ACEOF
13721
13722
13723
13724 # Sanity check long long for some platforms (AIX)
13725 if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
13726         ac_cv_sizeof_long_long_int=0
13727 fi
13728
13729 # compute LLONG_MIN and LLONG_MAX if we don't know them.
13730 if test -z "$have_llong_max"; then
13731         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for max value of long long" >&5
13732 $as_echo_n "checking for max value of long long... " >&6; }
13733         if test "$cross_compiling" = yes; then :
13734
13735                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
13736 $as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
13737
13738
13739 else
13740   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13741 /* end confdefs.h.  */
13742
13743 #include <stdio.h>
13744 /* Why is this so damn hard? */
13745 #ifdef __GNUC__
13746 # undef __GNUC__
13747 #endif
13748 #define __USE_ISOC99
13749 #include <limits.h>
13750 #define DATA "conftest.llminmax"
13751 #define my_abs(a) ((a) < 0 ? ((a) * -1) : (a))
13752
13753 /*
13754  * printf in libc on some platforms (eg old Tru64) does not understand %lld so
13755  * we do this the hard way.
13756  */
13757 static int
13758 fprint_ll(FILE *f, long long n)
13759 {
13760         unsigned int i;
13761         int l[sizeof(long long) * 8];
13762
13763         if (n < 0)
13764                 if (fprintf(f, "-") < 0)
13765                         return -1;
13766         for (i = 0; n != 0; i++) {
13767                 l[i] = my_abs(n % 10);
13768                 n /= 10;
13769         }
13770         do {
13771                 if (fprintf(f, "%d", l[--i]) < 0)
13772                         return -1;
13773         } while (i != 0);
13774         if (fprintf(f, " ") < 0)
13775                 return -1;
13776         return 0;
13777 }
13778
13779 int
13780 main ()
13781 {
13782
13783         FILE *f;
13784         long long i, llmin, llmax = 0;
13785
13786         if((f = fopen(DATA,"w")) == NULL)
13787                 exit(1);
13788
13789 #if defined(LLONG_MIN) && defined(LLONG_MAX)
13790         fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n");
13791         llmin = LLONG_MIN;
13792         llmax = LLONG_MAX;
13793 #else
13794         fprintf(stderr, "Calculating  LLONG_MIN and LLONG_MAX\n");
13795         /* This will work on one's complement and two's complement */
13796         for (i = 1; i > llmax; i <<= 1, i++)
13797                 llmax = i;
13798         llmin = llmax + 1LL;    /* wrap */
13799 #endif
13800
13801         /* Sanity check */
13802         if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
13803             || llmax - 1 > llmax || llmin == llmax || llmin == 0
13804             || llmax == 0 || llmax < LONG_MAX || llmin > LONG_MIN) {
13805                 fprintf(f, "unknown unknown\n");
13806                 exit(2);
13807         }
13808
13809         if (fprint_ll(f, llmin) < 0)
13810                 exit(3);
13811         if (fprint_ll(f, llmax) < 0)
13812                 exit(4);
13813         if (fclose(f) < 0)
13814                 exit(5);
13815         exit(0);
13816
13817   ;
13818   return 0;
13819 }
13820 _ACEOF
13821 if ac_fn_c_try_run "$LINENO"; then :
13822
13823                         llong_min=`$AWK '{print $1}' conftest.llminmax`
13824                         llong_max=`$AWK '{print $2}' conftest.llminmax`
13825
13826                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_max" >&5
13827 $as_echo "$llong_max" >&6; }
13828
13829 cat >>confdefs.h <<_ACEOF
13830 #define LLONG_MAX ${llong_max}LL
13831 _ACEOF
13832
13833                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for min value of long long" >&5
13834 $as_echo_n "checking for min value of long long... " >&6; }
13835                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_min" >&5
13836 $as_echo "$llong_min" >&6; }
13837
13838 cat >>confdefs.h <<_ACEOF
13839 #define LLONG_MIN ${llong_min}LL
13840 _ACEOF
13841
13842
13843 else
13844
13845                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13846 $as_echo "not found" >&6; }
13847
13848 fi
13849 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13850   conftest.$ac_objext conftest.beam conftest.$ac_ext
13851 fi
13852
13853 fi
13854
13855
13856 # More checks for data types
13857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int type" >&5
13858 $as_echo_n "checking for u_int type... " >&6; }
13859 if ${ac_cv_have_u_int+:} false; then :
13860   $as_echo_n "(cached) " >&6
13861 else
13862
13863         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13864 /* end confdefs.h.  */
13865  #include <sys/types.h>
13866 int
13867 main ()
13868 {
13869  u_int a; a = 1;
13870   ;
13871   return 0;
13872 }
13873 _ACEOF
13874 if ac_fn_c_try_compile "$LINENO"; then :
13875    ac_cv_have_u_int="yes"
13876 else
13877    ac_cv_have_u_int="no"
13878
13879 fi
13880 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13881
13882 fi
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int" >&5
13884 $as_echo "$ac_cv_have_u_int" >&6; }
13885 if test "x$ac_cv_have_u_int" = "xyes" ; then
13886
13887 $as_echo "#define HAVE_U_INT 1" >>confdefs.h
13888
13889         have_u_int=1
13890 fi
13891
13892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types" >&5
13893 $as_echo_n "checking for intXX_t types... " >&6; }
13894 if ${ac_cv_have_intxx_t+:} false; then :
13895   $as_echo_n "(cached) " >&6
13896 else
13897
13898         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13899 /* end confdefs.h.  */
13900  #include <sys/types.h>
13901 int
13902 main ()
13903 {
13904  int8_t a; int16_t b; int32_t c; a = b = c = 1;
13905   ;
13906   return 0;
13907 }
13908 _ACEOF
13909 if ac_fn_c_try_compile "$LINENO"; then :
13910    ac_cv_have_intxx_t="yes"
13911 else
13912    ac_cv_have_intxx_t="no"
13913
13914 fi
13915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13916
13917 fi
13918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_intxx_t" >&5
13919 $as_echo "$ac_cv_have_intxx_t" >&6; }
13920 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
13921
13922 $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
13923
13924         have_intxx_t=1
13925 fi
13926
13927 if (test -z "$have_intxx_t" && \
13928            test "x$ac_cv_header_stdint_h" = "xyes")
13929 then
13930     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types in stdint.h" >&5
13931 $as_echo_n "checking for intXX_t types in stdint.h... " >&6; }
13932         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13933 /* end confdefs.h.  */
13934  #include <stdint.h>
13935 int
13936 main ()
13937 {
13938  int8_t a; int16_t b; int32_t c; a = b = c = 1;
13939   ;
13940   return 0;
13941 }
13942 _ACEOF
13943 if ac_fn_c_try_compile "$LINENO"; then :
13944
13945                         $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
13946
13947                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13948 $as_echo "yes" >&6; }
13949
13950 else
13951    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13952 $as_echo "no" >&6; }
13953
13954 fi
13955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13956 fi
13957
13958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int64_t type" >&5
13959 $as_echo_n "checking for int64_t type... " >&6; }
13960 if ${ac_cv_have_int64_t+:} false; then :
13961   $as_echo_n "(cached) " >&6
13962 else
13963
13964         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13965 /* end confdefs.h.  */
13966
13967 #include <sys/types.h>
13968 #ifdef HAVE_STDINT_H
13969 # include <stdint.h>
13970 #endif
13971 #include <sys/socket.h>
13972 #ifdef HAVE_SYS_BITYPES_H
13973 # include <sys/bitypes.h>
13974 #endif
13975
13976 int
13977 main ()
13978 {
13979
13980 int64_t a; a = 1;
13981
13982   ;
13983   return 0;
13984 }
13985 _ACEOF
13986 if ac_fn_c_try_compile "$LINENO"; then :
13987    ac_cv_have_int64_t="yes"
13988 else
13989    ac_cv_have_int64_t="no"
13990
13991 fi
13992 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13993
13994 fi
13995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_int64_t" >&5
13996 $as_echo "$ac_cv_have_int64_t" >&6; }
13997 if test "x$ac_cv_have_int64_t" = "xyes" ; then
13998
13999 $as_echo "#define HAVE_INT64_T 1" >>confdefs.h
14000
14001 fi
14002
14003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types" >&5
14004 $as_echo_n "checking for u_intXX_t types... " >&6; }
14005 if ${ac_cv_have_u_intxx_t+:} false; then :
14006   $as_echo_n "(cached) " >&6
14007 else
14008
14009         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14010 /* end confdefs.h.  */
14011  #include <sys/types.h>
14012 int
14013 main ()
14014 {
14015  u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
14016   ;
14017   return 0;
14018 }
14019 _ACEOF
14020 if ac_fn_c_try_compile "$LINENO"; then :
14021    ac_cv_have_u_intxx_t="yes"
14022 else
14023    ac_cv_have_u_intxx_t="no"
14024
14025 fi
14026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14027
14028 fi
14029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_intxx_t" >&5
14030 $as_echo "$ac_cv_have_u_intxx_t" >&6; }
14031 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
14032
14033 $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
14034
14035         have_u_intxx_t=1
14036 fi
14037
14038 if test -z "$have_u_intxx_t" ; then
14039     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types in sys/socket.h" >&5
14040 $as_echo_n "checking for u_intXX_t types in sys/socket.h... " >&6; }
14041         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14042 /* end confdefs.h.  */
14043  #include <sys/socket.h>
14044 int
14045 main ()
14046 {
14047  u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
14048   ;
14049   return 0;
14050 }
14051 _ACEOF
14052 if ac_fn_c_try_compile "$LINENO"; then :
14053
14054                         $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
14055
14056                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14057 $as_echo "yes" >&6; }
14058
14059 else
14060    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14061 $as_echo "no" >&6; }
14062
14063 fi
14064 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14065 fi
14066
14067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t types" >&5
14068 $as_echo_n "checking for u_int64_t types... " >&6; }
14069 if ${ac_cv_have_u_int64_t+:} false; then :
14070   $as_echo_n "(cached) " >&6
14071 else
14072
14073         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14074 /* end confdefs.h.  */
14075  #include <sys/types.h>
14076 int
14077 main ()
14078 {
14079  u_int64_t a; a = 1;
14080   ;
14081   return 0;
14082 }
14083 _ACEOF
14084 if ac_fn_c_try_compile "$LINENO"; then :
14085    ac_cv_have_u_int64_t="yes"
14086 else
14087    ac_cv_have_u_int64_t="no"
14088
14089 fi
14090 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14091
14092 fi
14093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int64_t" >&5
14094 $as_echo "$ac_cv_have_u_int64_t" >&6; }
14095 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
14096
14097 $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
14098
14099         have_u_int64_t=1
14100 fi
14101
14102 if (test -z "$have_u_int64_t" && \
14103            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
14104 then
14105     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t type in sys/bitypes.h" >&5
14106 $as_echo_n "checking for u_int64_t type in sys/bitypes.h... " >&6; }
14107         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14108 /* end confdefs.h.  */
14109  #include <sys/bitypes.h>
14110 int
14111 main ()
14112 {
14113  u_int64_t a; a = 1
14114   ;
14115   return 0;
14116 }
14117 _ACEOF
14118 if ac_fn_c_try_compile "$LINENO"; then :
14119
14120                         $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
14121
14122                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14123 $as_echo "yes" >&6; }
14124
14125 else
14126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14127 $as_echo "no" >&6; }
14128
14129 fi
14130 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14131 fi
14132
14133 if test -z "$have_u_intxx_t" ; then
14134         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types" >&5
14135 $as_echo_n "checking for uintXX_t types... " >&6; }
14136 if ${ac_cv_have_uintxx_t+:} false; then :
14137   $as_echo_n "(cached) " >&6
14138 else
14139
14140                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14141 /* end confdefs.h.  */
14142
14143 #include <sys/types.h>
14144
14145 int
14146 main ()
14147 {
14148
14149         uint8_t a;
14150         uint16_t b;
14151         uint32_t c;
14152         a = b = c = 1;
14153
14154   ;
14155   return 0;
14156 }
14157 _ACEOF
14158 if ac_fn_c_try_compile "$LINENO"; then :
14159    ac_cv_have_uintxx_t="yes"
14160 else
14161    ac_cv_have_uintxx_t="no"
14162
14163 fi
14164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14165
14166 fi
14167 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_uintxx_t" >&5
14168 $as_echo "$ac_cv_have_uintxx_t" >&6; }
14169         if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
14170
14171 $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
14172
14173         fi
14174 fi
14175
14176 if (test -z "$have_uintxx_t" && \
14177            test "x$ac_cv_header_stdint_h" = "xyes")
14178 then
14179     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in stdint.h" >&5
14180 $as_echo_n "checking for uintXX_t types in stdint.h... " >&6; }
14181         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14182 /* end confdefs.h.  */
14183  #include <stdint.h>
14184 int
14185 main ()
14186 {
14187  uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
14188   ;
14189   return 0;
14190 }
14191 _ACEOF
14192 if ac_fn_c_try_compile "$LINENO"; then :
14193
14194                         $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
14195
14196                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14197 $as_echo "yes" >&6; }
14198
14199 else
14200    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14201 $as_echo "no" >&6; }
14202
14203 fi
14204 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14205 fi
14206
14207 if (test -z "$have_uintxx_t" && \
14208            test "x$ac_cv_header_inttypes_h" = "xyes")
14209 then
14210     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in inttypes.h" >&5
14211 $as_echo_n "checking for uintXX_t types in inttypes.h... " >&6; }
14212         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14213 /* end confdefs.h.  */
14214  #include <inttypes.h>
14215 int
14216 main ()
14217 {
14218  uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
14219   ;
14220   return 0;
14221 }
14222 _ACEOF
14223 if ac_fn_c_try_compile "$LINENO"; then :
14224
14225                         $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
14226
14227                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14228 $as_echo "yes" >&6; }
14229
14230 else
14231    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14232 $as_echo "no" >&6; }
14233
14234 fi
14235 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14236 fi
14237
14238 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
14239            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
14240 then
14241         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
14242 $as_echo_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h... " >&6; }
14243         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14244 /* end confdefs.h.  */
14245
14246 #include <sys/bitypes.h>
14247
14248 int
14249 main ()
14250 {
14251
14252                         int8_t a; int16_t b; int32_t c;
14253                         u_int8_t e; u_int16_t f; u_int32_t g;
14254                         a = b = c = e = f = g = 1;
14255
14256   ;
14257   return 0;
14258 }
14259 _ACEOF
14260 if ac_fn_c_try_compile "$LINENO"; then :
14261
14262                         $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
14263
14264                         $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
14265
14266                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14267 $as_echo "yes" >&6; }
14268
14269 else
14270   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14271 $as_echo "no" >&6; }
14272
14273 fi
14274 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14275 fi
14276
14277
14278 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_char" >&5
14279 $as_echo_n "checking for u_char... " >&6; }
14280 if ${ac_cv_have_u_char+:} false; then :
14281   $as_echo_n "(cached) " >&6
14282 else
14283
14284         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14285 /* end confdefs.h.  */
14286  #include <sys/types.h>
14287 int
14288 main ()
14289 {
14290  u_char foo; foo = 125;
14291   ;
14292   return 0;
14293 }
14294 _ACEOF
14295 if ac_fn_c_try_compile "$LINENO"; then :
14296    ac_cv_have_u_char="yes"
14297 else
14298    ac_cv_have_u_char="no"
14299
14300 fi
14301 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14302
14303 fi
14304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_char" >&5
14305 $as_echo "$ac_cv_have_u_char" >&6; }
14306 if test "x$ac_cv_have_u_char" = "xyes" ; then
14307
14308 $as_echo "#define HAVE_U_CHAR 1" >>confdefs.h
14309
14310 fi
14311
14312 ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "
14313 #include <sys/types.h>
14314 #include <stdint.h>
14315
14316 "
14317 if test "x$ac_cv_type_intmax_t" = xyes; then :
14318
14319 cat >>confdefs.h <<_ACEOF
14320 #define HAVE_INTMAX_T 1
14321 _ACEOF
14322
14323
14324 fi
14325 ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "
14326 #include <sys/types.h>
14327 #include <stdint.h>
14328
14329 "
14330 if test "x$ac_cv_type_uintmax_t" = xyes; then :
14331
14332 cat >>confdefs.h <<_ACEOF
14333 #define HAVE_UINTMAX_T 1
14334 _ACEOF
14335
14336
14337 fi
14338
14339
14340
14341    ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
14342 #include <sys/socket.h>
14343 "
14344 if test "x$ac_cv_type_socklen_t" = xyes; then :
14345
14346 else
14347
14348       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
14349 $as_echo_n "checking for socklen_t equivalent... " >&6; }
14350       if ${curl_cv_socklen_t_equiv+:} false; then :
14351   $as_echo_n "(cached) " >&6
14352 else
14353
14354          # Systems have either "struct sockaddr *" or
14355          # "void *" as the second argument to getpeername
14356          curl_cv_socklen_t_equiv=
14357          for arg2 in "struct sockaddr" void; do
14358             for t in int size_t unsigned long "unsigned long"; do
14359                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14360 /* end confdefs.h.  */
14361
14362                   #include <sys/types.h>
14363                   #include <sys/socket.h>
14364
14365                   int getpeername (int, $arg2 *, $t *);
14366
14367 int
14368 main ()
14369 {
14370
14371                   $t len;
14372                   getpeername(0,0,&len);
14373
14374   ;
14375   return 0;
14376 }
14377 _ACEOF
14378 if ac_fn_c_try_compile "$LINENO"; then :
14379
14380                   curl_cv_socklen_t_equiv="$t"
14381                   break
14382
14383 fi
14384 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14385             done
14386          done
14387
14388          if test "x$curl_cv_socklen_t_equiv" = x; then
14389             as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
14390          fi
14391
14392 fi
14393
14394       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_socklen_t_equiv" >&5
14395 $as_echo "$curl_cv_socklen_t_equiv" >&6; }
14396
14397 cat >>confdefs.h <<_ACEOF
14398 #define socklen_t $curl_cv_socklen_t_equiv
14399 _ACEOF
14400
14401 fi
14402
14403
14404
14405 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
14406 "
14407 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
14408
14409 cat >>confdefs.h <<_ACEOF
14410 #define HAVE_SIG_ATOMIC_T 1
14411 _ACEOF
14412
14413
14414 fi
14415
14416 ac_fn_c_check_type "$LINENO" "fsblkcnt_t" "ac_cv_type_fsblkcnt_t" "
14417 #include <sys/types.h>
14418 #ifdef HAVE_SYS_BITYPES_H
14419 #include <sys/bitypes.h>
14420 #endif
14421 #ifdef HAVE_SYS_STATFS_H
14422 #include <sys/statfs.h>
14423 #endif
14424 #ifdef HAVE_SYS_STATVFS_H
14425 #include <sys/statvfs.h>
14426 #endif
14427
14428 "
14429 if test "x$ac_cv_type_fsblkcnt_t" = xyes; then :
14430
14431 cat >>confdefs.h <<_ACEOF
14432 #define HAVE_FSBLKCNT_T 1
14433 _ACEOF
14434
14435
14436 fi
14437 ac_fn_c_check_type "$LINENO" "fsfilcnt_t" "ac_cv_type_fsfilcnt_t" "
14438 #include <sys/types.h>
14439 #ifdef HAVE_SYS_BITYPES_H
14440 #include <sys/bitypes.h>
14441 #endif
14442 #ifdef HAVE_SYS_STATFS_H
14443 #include <sys/statfs.h>
14444 #endif
14445 #ifdef HAVE_SYS_STATVFS_H
14446 #include <sys/statvfs.h>
14447 #endif
14448
14449 "
14450 if test "x$ac_cv_type_fsfilcnt_t" = xyes; then :
14451
14452 cat >>confdefs.h <<_ACEOF
14453 #define HAVE_FSFILCNT_T 1
14454 _ACEOF
14455
14456
14457 fi
14458
14459
14460 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "#include <sys/types.h>
14461 #include <netinet/in.h>
14462 "
14463 if test "x$ac_cv_type_in_addr_t" = xyes; then :
14464
14465 cat >>confdefs.h <<_ACEOF
14466 #define HAVE_IN_ADDR_T 1
14467 _ACEOF
14468
14469
14470 fi
14471 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "#include <sys/types.h>
14472 #include <netinet/in.h>
14473 "
14474 if test "x$ac_cv_type_in_port_t" = xyes; then :
14475
14476 cat >>confdefs.h <<_ACEOF
14477 #define HAVE_IN_PORT_T 1
14478 _ACEOF
14479
14480
14481 fi
14482
14483
14484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for size_t" >&5
14485 $as_echo_n "checking for size_t... " >&6; }
14486 if ${ac_cv_have_size_t+:} false; then :
14487   $as_echo_n "(cached) " >&6
14488 else
14489
14490         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14491 /* end confdefs.h.  */
14492  #include <sys/types.h>
14493 int
14494 main ()
14495 {
14496  size_t foo; foo = 1235;
14497   ;
14498   return 0;
14499 }
14500 _ACEOF
14501 if ac_fn_c_try_compile "$LINENO"; then :
14502    ac_cv_have_size_t="yes"
14503 else
14504    ac_cv_have_size_t="no"
14505
14506 fi
14507 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14508
14509 fi
14510 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t" >&5
14511 $as_echo "$ac_cv_have_size_t" >&6; }
14512 if test "x$ac_cv_have_size_t" = "xyes" ; then
14513
14514 $as_echo "#define HAVE_SIZE_T 1" >>confdefs.h
14515
14516 fi
14517
14518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
14519 $as_echo_n "checking for ssize_t... " >&6; }
14520 if ${ac_cv_have_ssize_t+:} false; then :
14521   $as_echo_n "(cached) " >&6
14522 else
14523
14524         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14525 /* end confdefs.h.  */
14526  #include <sys/types.h>
14527 int
14528 main ()
14529 {
14530  ssize_t foo; foo = 1235;
14531   ;
14532   return 0;
14533 }
14534 _ACEOF
14535 if ac_fn_c_try_compile "$LINENO"; then :
14536    ac_cv_have_ssize_t="yes"
14537 else
14538    ac_cv_have_ssize_t="no"
14539
14540 fi
14541 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14542
14543 fi
14544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ssize_t" >&5
14545 $as_echo "$ac_cv_have_ssize_t" >&6; }
14546 if test "x$ac_cv_have_ssize_t" = "xyes" ; then
14547
14548 $as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
14549
14550 fi
14551
14552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
14553 $as_echo_n "checking for clock_t... " >&6; }
14554 if ${ac_cv_have_clock_t+:} false; then :
14555   $as_echo_n "(cached) " >&6
14556 else
14557
14558         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14559 /* end confdefs.h.  */
14560  #include <time.h>
14561 int
14562 main ()
14563 {
14564  clock_t foo; foo = 1235;
14565   ;
14566   return 0;
14567 }
14568 _ACEOF
14569 if ac_fn_c_try_compile "$LINENO"; then :
14570    ac_cv_have_clock_t="yes"
14571 else
14572    ac_cv_have_clock_t="no"
14573
14574 fi
14575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14576
14577 fi
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_clock_t" >&5
14579 $as_echo "$ac_cv_have_clock_t" >&6; }
14580 if test "x$ac_cv_have_clock_t" = "xyes" ; then
14581
14582 $as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h
14583
14584 fi
14585
14586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_family_t" >&5
14587 $as_echo_n "checking for sa_family_t... " >&6; }
14588 if ${ac_cv_have_sa_family_t+:} false; then :
14589   $as_echo_n "(cached) " >&6
14590 else
14591
14592         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14593 /* end confdefs.h.  */
14594
14595 #include <sys/types.h>
14596 #include <sys/socket.h>
14597
14598 int
14599 main ()
14600 {
14601  sa_family_t foo; foo = 1235;
14602   ;
14603   return 0;
14604 }
14605 _ACEOF
14606 if ac_fn_c_try_compile "$LINENO"; then :
14607    ac_cv_have_sa_family_t="yes"
14608 else
14609    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14610 /* end confdefs.h.  */
14611
14612 #include <sys/types.h>
14613 #include <sys/socket.h>
14614 #include <netinet/in.h>
14615
14616 int
14617 main ()
14618 {
14619  sa_family_t foo; foo = 1235;
14620   ;
14621   return 0;
14622 }
14623 _ACEOF
14624 if ac_fn_c_try_compile "$LINENO"; then :
14625    ac_cv_have_sa_family_t="yes"
14626 else
14627    ac_cv_have_sa_family_t="no"
14628
14629 fi
14630 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14631
14632 fi
14633 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14634
14635 fi
14636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sa_family_t" >&5
14637 $as_echo "$ac_cv_have_sa_family_t" >&6; }
14638 if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
14639
14640 $as_echo "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
14641
14642 fi
14643
14644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pid_t" >&5
14645 $as_echo_n "checking for pid_t... " >&6; }
14646 if ${ac_cv_have_pid_t+:} false; then :
14647   $as_echo_n "(cached) " >&6
14648 else
14649
14650         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14651 /* end confdefs.h.  */
14652  #include <sys/types.h>
14653 int
14654 main ()
14655 {
14656  pid_t foo; foo = 1235;
14657   ;
14658   return 0;
14659 }
14660 _ACEOF
14661 if ac_fn_c_try_compile "$LINENO"; then :
14662    ac_cv_have_pid_t="yes"
14663 else
14664    ac_cv_have_pid_t="no"
14665
14666 fi
14667 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14668
14669 fi
14670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pid_t" >&5
14671 $as_echo "$ac_cv_have_pid_t" >&6; }
14672 if test "x$ac_cv_have_pid_t" = "xyes" ; then
14673
14674 $as_echo "#define HAVE_PID_T 1" >>confdefs.h
14675
14676 fi
14677
14678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mode_t" >&5
14679 $as_echo_n "checking for mode_t... " >&6; }
14680 if ${ac_cv_have_mode_t+:} false; then :
14681   $as_echo_n "(cached) " >&6
14682 else
14683
14684         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14685 /* end confdefs.h.  */
14686  #include <sys/types.h>
14687 int
14688 main ()
14689 {
14690  mode_t foo; foo = 1235;
14691   ;
14692   return 0;
14693 }
14694 _ACEOF
14695 if ac_fn_c_try_compile "$LINENO"; then :
14696    ac_cv_have_mode_t="yes"
14697 else
14698    ac_cv_have_mode_t="no"
14699
14700 fi
14701 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14702
14703 fi
14704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_mode_t" >&5
14705 $as_echo "$ac_cv_have_mode_t" >&6; }
14706 if test "x$ac_cv_have_mode_t" = "xyes" ; then
14707
14708 $as_echo "#define HAVE_MODE_T 1" >>confdefs.h
14709
14710 fi
14711
14712
14713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
14714 $as_echo_n "checking for struct sockaddr_storage... " >&6; }
14715 if ${ac_cv_have_struct_sockaddr_storage+:} false; then :
14716   $as_echo_n "(cached) " >&6
14717 else
14718
14719         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14720 /* end confdefs.h.  */
14721
14722 #include <sys/types.h>
14723 #include <sys/socket.h>
14724
14725 int
14726 main ()
14727 {
14728  struct sockaddr_storage s;
14729   ;
14730   return 0;
14731 }
14732 _ACEOF
14733 if ac_fn_c_try_compile "$LINENO"; then :
14734    ac_cv_have_struct_sockaddr_storage="yes"
14735 else
14736    ac_cv_have_struct_sockaddr_storage="no"
14737
14738 fi
14739 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14740
14741 fi
14742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_storage" >&5
14743 $as_echo "$ac_cv_have_struct_sockaddr_storage" >&6; }
14744 if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
14745
14746 $as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
14747
14748 fi
14749
14750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6" >&5
14751 $as_echo_n "checking for struct sockaddr_in6... " >&6; }
14752 if ${ac_cv_have_struct_sockaddr_in6+:} false; then :
14753   $as_echo_n "(cached) " >&6
14754 else
14755
14756         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14757 /* end confdefs.h.  */
14758
14759 #include <sys/types.h>
14760 #include <netinet/in.h>
14761
14762 int
14763 main ()
14764 {
14765  struct sockaddr_in6 s; s.sin6_family = 0;
14766   ;
14767   return 0;
14768 }
14769 _ACEOF
14770 if ac_fn_c_try_compile "$LINENO"; then :
14771    ac_cv_have_struct_sockaddr_in6="yes"
14772 else
14773    ac_cv_have_struct_sockaddr_in6="no"
14774
14775 fi
14776 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14777
14778 fi
14779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_in6" >&5
14780 $as_echo "$ac_cv_have_struct_sockaddr_in6" >&6; }
14781 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
14782
14783 $as_echo "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h
14784
14785 fi
14786
14787 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct in6_addr" >&5
14788 $as_echo_n "checking for struct in6_addr... " >&6; }
14789 if ${ac_cv_have_struct_in6_addr+:} false; then :
14790   $as_echo_n "(cached) " >&6
14791 else
14792
14793         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14794 /* end confdefs.h.  */
14795
14796 #include <sys/types.h>
14797 #include <netinet/in.h>
14798
14799 int
14800 main ()
14801 {
14802  struct in6_addr s; s.s6_addr[0] = 0;
14803   ;
14804   return 0;
14805 }
14806 _ACEOF
14807 if ac_fn_c_try_compile "$LINENO"; then :
14808    ac_cv_have_struct_in6_addr="yes"
14809 else
14810    ac_cv_have_struct_in6_addr="no"
14811
14812 fi
14813 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14814
14815 fi
14816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_in6_addr" >&5
14817 $as_echo "$ac_cv_have_struct_in6_addr" >&6; }
14818 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
14819
14820 $as_echo "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h
14821
14822
14823         ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "
14824 #ifdef HAVE_SYS_TYPES_H
14825 #include <sys/types.h>
14826 #endif
14827 #include <netinet/in.h>
14828
14829 "
14830 if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes; then :
14831
14832 cat >>confdefs.h <<_ACEOF
14833 #define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
14834 _ACEOF
14835
14836
14837 fi
14838
14839 fi
14840
14841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct addrinfo" >&5
14842 $as_echo_n "checking for struct addrinfo... " >&6; }
14843 if ${ac_cv_have_struct_addrinfo+:} false; then :
14844   $as_echo_n "(cached) " >&6
14845 else
14846
14847         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14848 /* end confdefs.h.  */
14849
14850 #include <sys/types.h>
14851 #include <sys/socket.h>
14852 #include <netdb.h>
14853
14854 int
14855 main ()
14856 {
14857  struct addrinfo s; s.ai_flags = AI_PASSIVE;
14858   ;
14859   return 0;
14860 }
14861 _ACEOF
14862 if ac_fn_c_try_compile "$LINENO"; then :
14863    ac_cv_have_struct_addrinfo="yes"
14864 else
14865    ac_cv_have_struct_addrinfo="no"
14866
14867 fi
14868 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14869
14870 fi
14871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_addrinfo" >&5
14872 $as_echo "$ac_cv_have_struct_addrinfo" >&6; }
14873 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
14874
14875 $as_echo "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
14876
14877 fi
14878
14879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
14880 $as_echo_n "checking for struct timeval... " >&6; }
14881 if ${ac_cv_have_struct_timeval+:} false; then :
14882   $as_echo_n "(cached) " >&6
14883 else
14884
14885         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14886 /* end confdefs.h.  */
14887  #include <sys/time.h>
14888 int
14889 main ()
14890 {
14891  struct timeval tv; tv.tv_sec = 1;
14892   ;
14893   return 0;
14894 }
14895 _ACEOF
14896 if ac_fn_c_try_compile "$LINENO"; then :
14897    ac_cv_have_struct_timeval="yes"
14898 else
14899    ac_cv_have_struct_timeval="no"
14900
14901 fi
14902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14903
14904 fi
14905 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_timeval" >&5
14906 $as_echo "$ac_cv_have_struct_timeval" >&6; }
14907 if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
14908
14909 $as_echo "#define HAVE_STRUCT_TIMEVAL 1" >>confdefs.h
14910
14911         have_struct_timeval=1
14912 fi
14913
14914 ac_fn_c_check_type "$LINENO" "struct timespec" "ac_cv_type_struct_timespec" "$ac_includes_default"
14915 if test "x$ac_cv_type_struct_timespec" = xyes; then :
14916
14917 cat >>confdefs.h <<_ACEOF
14918 #define HAVE_STRUCT_TIMESPEC 1
14919 _ACEOF
14920
14921
14922 fi
14923
14924
14925 # We need int64_t or else certian parts of the compile will fail.
14926 if test "x$ac_cv_have_int64_t" = "xno" && \
14927         test "x$ac_cv_sizeof_long_int" != "x8" && \
14928         test "x$ac_cv_sizeof_long_long_int" = "x0" ; then
14929         echo "OpenSSH requires int64_t support.  Contact your vendor or install"
14930         echo "an alternative compiler (I.E., GCC) before continuing."
14931         echo ""
14932         exit 1;
14933 else
14934         if test "$cross_compiling" = yes; then :
14935   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
14936 $as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
14937
14938 else
14939   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14940 /* end confdefs.h.  */
14941
14942 #include <stdio.h>
14943 #include <string.h>
14944 #ifdef HAVE_SNPRINTF
14945 main()
14946 {
14947         char buf[50];
14948         char expected_out[50];
14949         int mazsize = 50 ;
14950 #if (SIZEOF_LONG_INT == 8)
14951         long int num = 0x7fffffffffffffff;
14952 #else
14953         long long num = 0x7fffffffffffffffll;
14954 #endif
14955         strcpy(expected_out, "9223372036854775807");
14956         snprintf(buf, mazsize, "%lld", num);
14957         if(strcmp(buf, expected_out) != 0)
14958                 exit(1);
14959         exit(0);
14960 }
14961 #else
14962 main() { exit(0); }
14963 #endif
14964
14965 _ACEOF
14966 if ac_fn_c_try_run "$LINENO"; then :
14967    true
14968 else
14969    $as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
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 # look for field 'ut_host' in header 'utmp.h'
14980                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14981                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
14982         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmp.h" >&5
14983 $as_echo_n "checking for ut_host field in utmp.h... " >&6; }
14984         if eval \${$ossh_varname+:} false; then :
14985   $as_echo_n "(cached) " >&6
14986 else
14987
14988                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14989 /* end confdefs.h.  */
14990 #include <utmp.h>
14991
14992 _ACEOF
14993 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14994   $EGREP "ut_host" >/dev/null 2>&1; then :
14995                         eval "$ossh_varname=yes"
14996 else
14997                         eval "$ossh_varname=no"
14998 fi
14999 rm -f conftest*
15000
15001 fi
15002
15003         ossh_result=`eval 'echo $'"$ossh_varname"`
15004         if test -n "`echo $ossh_varname`"; then
15005                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15006 $as_echo "$ossh_result" >&6; }
15007                 if test "x$ossh_result" = "xyes"; then
15008
15009 $as_echo "#define HAVE_HOST_IN_UTMP 1" >>confdefs.h
15010
15011                 fi
15012         else
15013                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15014 $as_echo "no" >&6; }
15015         fi
15016
15017
15018 # look for field 'ut_host' in header 'utmpx.h'
15019                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
15020                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
15021         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmpx.h" >&5
15022 $as_echo_n "checking for ut_host field in utmpx.h... " >&6; }
15023         if eval \${$ossh_varname+:} false; then :
15024   $as_echo_n "(cached) " >&6
15025 else
15026
15027                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15028 /* end confdefs.h.  */
15029 #include <utmpx.h>
15030
15031 _ACEOF
15032 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15033   $EGREP "ut_host" >/dev/null 2>&1; then :
15034                         eval "$ossh_varname=yes"
15035 else
15036                         eval "$ossh_varname=no"
15037 fi
15038 rm -f conftest*
15039
15040 fi
15041
15042         ossh_result=`eval 'echo $'"$ossh_varname"`
15043         if test -n "`echo $ossh_varname`"; then
15044                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15045 $as_echo "$ossh_result" >&6; }
15046                 if test "x$ossh_result" = "xyes"; then
15047
15048 $as_echo "#define HAVE_HOST_IN_UTMPX 1" >>confdefs.h
15049
15050                 fi
15051         else
15052                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15053 $as_echo "no" >&6; }
15054         fi
15055
15056
15057 # look for field 'syslen' in header 'utmpx.h'
15058                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
15059                 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
15060         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for syslen field in utmpx.h" >&5
15061 $as_echo_n "checking for syslen field in utmpx.h... " >&6; }
15062         if eval \${$ossh_varname+:} false; then :
15063   $as_echo_n "(cached) " >&6
15064 else
15065
15066                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15067 /* end confdefs.h.  */
15068 #include <utmpx.h>
15069
15070 _ACEOF
15071 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15072   $EGREP "syslen" >/dev/null 2>&1; then :
15073                         eval "$ossh_varname=yes"
15074 else
15075                         eval "$ossh_varname=no"
15076 fi
15077 rm -f conftest*
15078
15079 fi
15080
15081         ossh_result=`eval 'echo $'"$ossh_varname"`
15082         if test -n "`echo $ossh_varname`"; then
15083                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15084 $as_echo "$ossh_result" >&6; }
15085                 if test "x$ossh_result" = "xyes"; then
15086
15087 $as_echo "#define HAVE_SYSLEN_IN_UTMPX 1" >>confdefs.h
15088
15089                 fi
15090         else
15091                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15092 $as_echo "no" >&6; }
15093         fi
15094
15095
15096 # look for field 'ut_pid' in header 'utmp.h'
15097                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
15098                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
15099         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_pid field in utmp.h" >&5
15100 $as_echo_n "checking for ut_pid field in utmp.h... " >&6; }
15101         if eval \${$ossh_varname+:} false; then :
15102   $as_echo_n "(cached) " >&6
15103 else
15104
15105                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15106 /* end confdefs.h.  */
15107 #include <utmp.h>
15108
15109 _ACEOF
15110 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15111   $EGREP "ut_pid" >/dev/null 2>&1; then :
15112                         eval "$ossh_varname=yes"
15113 else
15114                         eval "$ossh_varname=no"
15115 fi
15116 rm -f conftest*
15117
15118 fi
15119
15120         ossh_result=`eval 'echo $'"$ossh_varname"`
15121         if test -n "`echo $ossh_varname`"; then
15122                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15123 $as_echo "$ossh_result" >&6; }
15124                 if test "x$ossh_result" = "xyes"; then
15125
15126 $as_echo "#define HAVE_PID_IN_UTMP 1" >>confdefs.h
15127
15128                 fi
15129         else
15130                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15131 $as_echo "no" >&6; }
15132         fi
15133
15134
15135 # look for field 'ut_type' in header 'utmp.h'
15136                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
15137                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
15138         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmp.h" >&5
15139 $as_echo_n "checking for ut_type field in utmp.h... " >&6; }
15140         if eval \${$ossh_varname+:} false; then :
15141   $as_echo_n "(cached) " >&6
15142 else
15143
15144                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15145 /* end confdefs.h.  */
15146 #include <utmp.h>
15147
15148 _ACEOF
15149 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15150   $EGREP "ut_type" >/dev/null 2>&1; then :
15151                         eval "$ossh_varname=yes"
15152 else
15153                         eval "$ossh_varname=no"
15154 fi
15155 rm -f conftest*
15156
15157 fi
15158
15159         ossh_result=`eval 'echo $'"$ossh_varname"`
15160         if test -n "`echo $ossh_varname`"; then
15161                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15162 $as_echo "$ossh_result" >&6; }
15163                 if test "x$ossh_result" = "xyes"; then
15164
15165 $as_echo "#define HAVE_TYPE_IN_UTMP 1" >>confdefs.h
15166
15167                 fi
15168         else
15169                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15170 $as_echo "no" >&6; }
15171         fi
15172
15173
15174 # look for field 'ut_type' in header 'utmpx.h'
15175                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
15176                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
15177         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmpx.h" >&5
15178 $as_echo_n "checking for ut_type field in utmpx.h... " >&6; }
15179         if eval \${$ossh_varname+:} false; then :
15180   $as_echo_n "(cached) " >&6
15181 else
15182
15183                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15184 /* end confdefs.h.  */
15185 #include <utmpx.h>
15186
15187 _ACEOF
15188 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15189   $EGREP "ut_type" >/dev/null 2>&1; then :
15190                         eval "$ossh_varname=yes"
15191 else
15192                         eval "$ossh_varname=no"
15193 fi
15194 rm -f conftest*
15195
15196 fi
15197
15198         ossh_result=`eval 'echo $'"$ossh_varname"`
15199         if test -n "`echo $ossh_varname`"; then
15200                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15201 $as_echo "$ossh_result" >&6; }
15202                 if test "x$ossh_result" = "xyes"; then
15203
15204 $as_echo "#define HAVE_TYPE_IN_UTMPX 1" >>confdefs.h
15205
15206                 fi
15207         else
15208                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15209 $as_echo "no" >&6; }
15210         fi
15211
15212
15213 # look for field 'ut_tv' in header 'utmp.h'
15214                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
15215                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
15216         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmp.h" >&5
15217 $as_echo_n "checking for ut_tv field in utmp.h... " >&6; }
15218         if eval \${$ossh_varname+:} false; then :
15219   $as_echo_n "(cached) " >&6
15220 else
15221
15222                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15223 /* end confdefs.h.  */
15224 #include <utmp.h>
15225
15226 _ACEOF
15227 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15228   $EGREP "ut_tv" >/dev/null 2>&1; then :
15229                         eval "$ossh_varname=yes"
15230 else
15231                         eval "$ossh_varname=no"
15232 fi
15233 rm -f conftest*
15234
15235 fi
15236
15237         ossh_result=`eval 'echo $'"$ossh_varname"`
15238         if test -n "`echo $ossh_varname`"; then
15239                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15240 $as_echo "$ossh_result" >&6; }
15241                 if test "x$ossh_result" = "xyes"; then
15242
15243 $as_echo "#define HAVE_TV_IN_UTMP 1" >>confdefs.h
15244
15245                 fi
15246         else
15247                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15248 $as_echo "no" >&6; }
15249         fi
15250
15251
15252 # look for field 'ut_id' in header 'utmp.h'
15253                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
15254                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
15255         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmp.h" >&5
15256 $as_echo_n "checking for ut_id field in utmp.h... " >&6; }
15257         if eval \${$ossh_varname+:} false; then :
15258   $as_echo_n "(cached) " >&6
15259 else
15260
15261                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15262 /* end confdefs.h.  */
15263 #include <utmp.h>
15264
15265 _ACEOF
15266 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15267   $EGREP "ut_id" >/dev/null 2>&1; then :
15268                         eval "$ossh_varname=yes"
15269 else
15270                         eval "$ossh_varname=no"
15271 fi
15272 rm -f conftest*
15273
15274 fi
15275
15276         ossh_result=`eval 'echo $'"$ossh_varname"`
15277         if test -n "`echo $ossh_varname`"; then
15278                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15279 $as_echo "$ossh_result" >&6; }
15280                 if test "x$ossh_result" = "xyes"; then
15281
15282 $as_echo "#define HAVE_ID_IN_UTMP 1" >>confdefs.h
15283
15284                 fi
15285         else
15286                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15287 $as_echo "no" >&6; }
15288         fi
15289
15290
15291 # look for field 'ut_id' in header 'utmpx.h'
15292                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
15293                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
15294         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmpx.h" >&5
15295 $as_echo_n "checking for ut_id field in utmpx.h... " >&6; }
15296         if eval \${$ossh_varname+:} false; then :
15297   $as_echo_n "(cached) " >&6
15298 else
15299
15300                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15301 /* end confdefs.h.  */
15302 #include <utmpx.h>
15303
15304 _ACEOF
15305 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15306   $EGREP "ut_id" >/dev/null 2>&1; then :
15307                         eval "$ossh_varname=yes"
15308 else
15309                         eval "$ossh_varname=no"
15310 fi
15311 rm -f conftest*
15312
15313 fi
15314
15315         ossh_result=`eval 'echo $'"$ossh_varname"`
15316         if test -n "`echo $ossh_varname`"; then
15317                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15318 $as_echo "$ossh_result" >&6; }
15319                 if test "x$ossh_result" = "xyes"; then
15320
15321 $as_echo "#define HAVE_ID_IN_UTMPX 1" >>confdefs.h
15322
15323                 fi
15324         else
15325                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15326 $as_echo "no" >&6; }
15327         fi
15328
15329
15330 # look for field 'ut_addr' in header 'utmp.h'
15331                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
15332                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
15333         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmp.h" >&5
15334 $as_echo_n "checking for ut_addr field in utmp.h... " >&6; }
15335         if eval \${$ossh_varname+:} false; then :
15336   $as_echo_n "(cached) " >&6
15337 else
15338
15339                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15340 /* end confdefs.h.  */
15341 #include <utmp.h>
15342
15343 _ACEOF
15344 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15345   $EGREP "ut_addr" >/dev/null 2>&1; then :
15346                         eval "$ossh_varname=yes"
15347 else
15348                         eval "$ossh_varname=no"
15349 fi
15350 rm -f conftest*
15351
15352 fi
15353
15354         ossh_result=`eval 'echo $'"$ossh_varname"`
15355         if test -n "`echo $ossh_varname`"; then
15356                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15357 $as_echo "$ossh_result" >&6; }
15358                 if test "x$ossh_result" = "xyes"; then
15359
15360 $as_echo "#define HAVE_ADDR_IN_UTMP 1" >>confdefs.h
15361
15362                 fi
15363         else
15364                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15365 $as_echo "no" >&6; }
15366         fi
15367
15368
15369 # look for field 'ut_addr' in header 'utmpx.h'
15370                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
15371                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
15372         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmpx.h" >&5
15373 $as_echo_n "checking for ut_addr field in utmpx.h... " >&6; }
15374         if eval \${$ossh_varname+:} false; then :
15375   $as_echo_n "(cached) " >&6
15376 else
15377
15378                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15379 /* end confdefs.h.  */
15380 #include <utmpx.h>
15381
15382 _ACEOF
15383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15384   $EGREP "ut_addr" >/dev/null 2>&1; then :
15385                         eval "$ossh_varname=yes"
15386 else
15387                         eval "$ossh_varname=no"
15388 fi
15389 rm -f conftest*
15390
15391 fi
15392
15393         ossh_result=`eval 'echo $'"$ossh_varname"`
15394         if test -n "`echo $ossh_varname`"; then
15395                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15396 $as_echo "$ossh_result" >&6; }
15397                 if test "x$ossh_result" = "xyes"; then
15398
15399 $as_echo "#define HAVE_ADDR_IN_UTMPX 1" >>confdefs.h
15400
15401                 fi
15402         else
15403                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15404 $as_echo "no" >&6; }
15405         fi
15406
15407
15408 # look for field 'ut_addr_v6' in header 'utmp.h'
15409                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
15410                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
15411         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmp.h" >&5
15412 $as_echo_n "checking for ut_addr_v6 field in utmp.h... " >&6; }
15413         if eval \${$ossh_varname+:} false; then :
15414   $as_echo_n "(cached) " >&6
15415 else
15416
15417                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15418 /* end confdefs.h.  */
15419 #include <utmp.h>
15420
15421 _ACEOF
15422 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15423   $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
15424                         eval "$ossh_varname=yes"
15425 else
15426                         eval "$ossh_varname=no"
15427 fi
15428 rm -f conftest*
15429
15430 fi
15431
15432         ossh_result=`eval 'echo $'"$ossh_varname"`
15433         if test -n "`echo $ossh_varname`"; then
15434                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15435 $as_echo "$ossh_result" >&6; }
15436                 if test "x$ossh_result" = "xyes"; then
15437
15438 $as_echo "#define HAVE_ADDR_V6_IN_UTMP 1" >>confdefs.h
15439
15440                 fi
15441         else
15442                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15443 $as_echo "no" >&6; }
15444         fi
15445
15446
15447 # look for field 'ut_addr_v6' in header 'utmpx.h'
15448                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
15449                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
15450         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmpx.h" >&5
15451 $as_echo_n "checking for ut_addr_v6 field in utmpx.h... " >&6; }
15452         if eval \${$ossh_varname+:} false; then :
15453   $as_echo_n "(cached) " >&6
15454 else
15455
15456                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15457 /* end confdefs.h.  */
15458 #include <utmpx.h>
15459
15460 _ACEOF
15461 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15462   $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
15463                         eval "$ossh_varname=yes"
15464 else
15465                         eval "$ossh_varname=no"
15466 fi
15467 rm -f conftest*
15468
15469 fi
15470
15471         ossh_result=`eval 'echo $'"$ossh_varname"`
15472         if test -n "`echo $ossh_varname`"; then
15473                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15474 $as_echo "$ossh_result" >&6; }
15475                 if test "x$ossh_result" = "xyes"; then
15476
15477 $as_echo "#define HAVE_ADDR_V6_IN_UTMPX 1" >>confdefs.h
15478
15479                 fi
15480         else
15481                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15482 $as_echo "no" >&6; }
15483         fi
15484
15485
15486 # look for field 'ut_exit' in header 'utmp.h'
15487                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
15488                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
15489         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_exit field in utmp.h" >&5
15490 $as_echo_n "checking for ut_exit field in utmp.h... " >&6; }
15491         if eval \${$ossh_varname+:} false; then :
15492   $as_echo_n "(cached) " >&6
15493 else
15494
15495                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15496 /* end confdefs.h.  */
15497 #include <utmp.h>
15498
15499 _ACEOF
15500 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15501   $EGREP "ut_exit" >/dev/null 2>&1; then :
15502                         eval "$ossh_varname=yes"
15503 else
15504                         eval "$ossh_varname=no"
15505 fi
15506 rm -f conftest*
15507
15508 fi
15509
15510         ossh_result=`eval 'echo $'"$ossh_varname"`
15511         if test -n "`echo $ossh_varname`"; then
15512                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15513 $as_echo "$ossh_result" >&6; }
15514                 if test "x$ossh_result" = "xyes"; then
15515
15516 $as_echo "#define HAVE_EXIT_IN_UTMP 1" >>confdefs.h
15517
15518                 fi
15519         else
15520                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15521 $as_echo "no" >&6; }
15522         fi
15523
15524
15525 # look for field 'ut_time' in header 'utmp.h'
15526                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
15527                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
15528         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmp.h" >&5
15529 $as_echo_n "checking for ut_time field in utmp.h... " >&6; }
15530         if eval \${$ossh_varname+:} false; then :
15531   $as_echo_n "(cached) " >&6
15532 else
15533
15534                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15535 /* end confdefs.h.  */
15536 #include <utmp.h>
15537
15538 _ACEOF
15539 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15540   $EGREP "ut_time" >/dev/null 2>&1; then :
15541                         eval "$ossh_varname=yes"
15542 else
15543                         eval "$ossh_varname=no"
15544 fi
15545 rm -f conftest*
15546
15547 fi
15548
15549         ossh_result=`eval 'echo $'"$ossh_varname"`
15550         if test -n "`echo $ossh_varname`"; then
15551                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15552 $as_echo "$ossh_result" >&6; }
15553                 if test "x$ossh_result" = "xyes"; then
15554
15555 $as_echo "#define HAVE_TIME_IN_UTMP 1" >>confdefs.h
15556
15557                 fi
15558         else
15559                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15560 $as_echo "no" >&6; }
15561         fi
15562
15563
15564 # look for field 'ut_time' in header 'utmpx.h'
15565                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
15566                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
15567         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmpx.h" >&5
15568 $as_echo_n "checking for ut_time field in utmpx.h... " >&6; }
15569         if eval \${$ossh_varname+:} false; then :
15570   $as_echo_n "(cached) " >&6
15571 else
15572
15573                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15574 /* end confdefs.h.  */
15575 #include <utmpx.h>
15576
15577 _ACEOF
15578 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15579   $EGREP "ut_time" >/dev/null 2>&1; then :
15580                         eval "$ossh_varname=yes"
15581 else
15582                         eval "$ossh_varname=no"
15583 fi
15584 rm -f conftest*
15585
15586 fi
15587
15588         ossh_result=`eval 'echo $'"$ossh_varname"`
15589         if test -n "`echo $ossh_varname`"; then
15590                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15591 $as_echo "$ossh_result" >&6; }
15592                 if test "x$ossh_result" = "xyes"; then
15593
15594 $as_echo "#define HAVE_TIME_IN_UTMPX 1" >>confdefs.h
15595
15596                 fi
15597         else
15598                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15599 $as_echo "no" >&6; }
15600         fi
15601
15602
15603 # look for field 'ut_tv' in header 'utmpx.h'
15604                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
15605                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
15606         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmpx.h" >&5
15607 $as_echo_n "checking for ut_tv field in utmpx.h... " >&6; }
15608         if eval \${$ossh_varname+:} false; then :
15609   $as_echo_n "(cached) " >&6
15610 else
15611
15612                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15613 /* end confdefs.h.  */
15614 #include <utmpx.h>
15615
15616 _ACEOF
15617 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
15618   $EGREP "ut_tv" >/dev/null 2>&1; then :
15619                         eval "$ossh_varname=yes"
15620 else
15621                         eval "$ossh_varname=no"
15622 fi
15623 rm -f conftest*
15624
15625 fi
15626
15627         ossh_result=`eval 'echo $'"$ossh_varname"`
15628         if test -n "`echo $ossh_varname`"; then
15629                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
15630 $as_echo "$ossh_result" >&6; }
15631                 if test "x$ossh_result" = "xyes"; then
15632
15633 $as_echo "#define HAVE_TV_IN_UTMPX 1" >>confdefs.h
15634
15635                 fi
15636         else
15637                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15638 $as_echo "no" >&6; }
15639         fi
15640
15641
15642 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
15643 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
15644
15645 cat >>confdefs.h <<_ACEOF
15646 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
15647 _ACEOF
15648
15649
15650 fi
15651
15652 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
15653 #include <sys/types.h>
15654 #include <pwd.h>
15655
15656 "
15657 if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
15658
15659 cat >>confdefs.h <<_ACEOF
15660 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
15661 _ACEOF
15662
15663
15664 fi
15665 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_class" "ac_cv_member_struct_passwd_pw_class" "
15666 #include <sys/types.h>
15667 #include <pwd.h>
15668
15669 "
15670 if test "x$ac_cv_member_struct_passwd_pw_class" = xyes; then :
15671
15672 cat >>confdefs.h <<_ACEOF
15673 #define HAVE_STRUCT_PASSWD_PW_CLASS 1
15674 _ACEOF
15675
15676
15677 fi
15678 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_change" "ac_cv_member_struct_passwd_pw_change" "
15679 #include <sys/types.h>
15680 #include <pwd.h>
15681
15682 "
15683 if test "x$ac_cv_member_struct_passwd_pw_change" = xyes; then :
15684
15685 cat >>confdefs.h <<_ACEOF
15686 #define HAVE_STRUCT_PASSWD_PW_CHANGE 1
15687 _ACEOF
15688
15689
15690 fi
15691 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_expire" "ac_cv_member_struct_passwd_pw_expire" "
15692 #include <sys/types.h>
15693 #include <pwd.h>
15694
15695 "
15696 if test "x$ac_cv_member_struct_passwd_pw_expire" = xyes; then :
15697
15698 cat >>confdefs.h <<_ACEOF
15699 #define HAVE_STRUCT_PASSWD_PW_EXPIRE 1
15700 _ACEOF
15701
15702
15703 fi
15704
15705
15706 ac_fn_c_check_member "$LINENO" "struct __res_state" "retrans" "ac_cv_member_struct___res_state_retrans" "
15707 #include <stdio.h>
15708 #if HAVE_SYS_TYPES_H
15709 # include <sys/types.h>
15710 #endif
15711 #include <netinet/in.h>
15712 #include <arpa/nameser.h>
15713 #include <resolv.h>
15714
15715 "
15716 if test "x$ac_cv_member_struct___res_state_retrans" = xyes; then :
15717
15718 else
15719
15720 $as_echo "#define __res_state state" >>confdefs.h
15721
15722 fi
15723
15724
15725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ss_family field in struct sockaddr_storage" >&5
15726 $as_echo_n "checking for ss_family field in struct sockaddr_storage... " >&6; }
15727 if ${ac_cv_have_ss_family_in_struct_ss+:} false; then :
15728   $as_echo_n "(cached) " >&6
15729 else
15730
15731         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15732 /* end confdefs.h.  */
15733
15734 #include <sys/types.h>
15735 #include <sys/socket.h>
15736
15737 int
15738 main ()
15739 {
15740  struct sockaddr_storage s; s.ss_family = 1;
15741   ;
15742   return 0;
15743 }
15744 _ACEOF
15745 if ac_fn_c_try_compile "$LINENO"; then :
15746    ac_cv_have_ss_family_in_struct_ss="yes"
15747 else
15748    ac_cv_have_ss_family_in_struct_ss="no"
15749 fi
15750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15751
15752 fi
15753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ss_family_in_struct_ss" >&5
15754 $as_echo "$ac_cv_have_ss_family_in_struct_ss" >&6; }
15755 if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
15756
15757 $as_echo "#define HAVE_SS_FAMILY_IN_SS 1" >>confdefs.h
15758
15759 fi
15760
15761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __ss_family field in struct sockaddr_storage" >&5
15762 $as_echo_n "checking for __ss_family field in struct sockaddr_storage... " >&6; }
15763 if ${ac_cv_have___ss_family_in_struct_ss+:} false; then :
15764   $as_echo_n "(cached) " >&6
15765 else
15766
15767         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15768 /* end confdefs.h.  */
15769
15770 #include <sys/types.h>
15771 #include <sys/socket.h>
15772
15773 int
15774 main ()
15775 {
15776  struct sockaddr_storage s; s.__ss_family = 1;
15777   ;
15778   return 0;
15779 }
15780 _ACEOF
15781 if ac_fn_c_try_compile "$LINENO"; then :
15782    ac_cv_have___ss_family_in_struct_ss="yes"
15783 else
15784    ac_cv_have___ss_family_in_struct_ss="no"
15785
15786 fi
15787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15788
15789 fi
15790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___ss_family_in_struct_ss" >&5
15791 $as_echo "$ac_cv_have___ss_family_in_struct_ss" >&6; }
15792 if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
15793
15794 $as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
15795
15796 fi
15797
15798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_accrights field in struct msghdr" >&5
15799 $as_echo_n "checking for msg_accrights field in struct msghdr... " >&6; }
15800 if ${ac_cv_have_accrights_in_msghdr+:} false; then :
15801   $as_echo_n "(cached) " >&6
15802 else
15803
15804         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15805 /* end confdefs.h.  */
15806
15807 #include <sys/types.h>
15808 #include <sys/socket.h>
15809 #include <sys/uio.h>
15810
15811 int
15812 main ()
15813 {
15814
15815 #ifdef msg_accrights
15816 #error "msg_accrights is a macro"
15817 exit(1);
15818 #endif
15819 struct msghdr m;
15820 m.msg_accrights = 0;
15821 exit(0);
15822
15823   ;
15824   return 0;
15825 }
15826 _ACEOF
15827 if ac_fn_c_try_compile "$LINENO"; then :
15828    ac_cv_have_accrights_in_msghdr="yes"
15829 else
15830    ac_cv_have_accrights_in_msghdr="no"
15831
15832 fi
15833 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15834
15835 fi
15836 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_accrights_in_msghdr" >&5
15837 $as_echo "$ac_cv_have_accrights_in_msghdr" >&6; }
15838 if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
15839
15840 $as_echo "#define HAVE_ACCRIGHTS_IN_MSGHDR 1" >>confdefs.h
15841
15842 fi
15843
15844 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct statvfs.f_fsid is integral type" >&5
15845 $as_echo_n "checking if struct statvfs.f_fsid is integral type... " >&6; }
15846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15847 /* end confdefs.h.  */
15848
15849 #include <sys/param.h>
15850 #include <sys/stat.h>
15851 #ifdef HAVE_SYS_TIME_H
15852 # include <sys/time.h>
15853 #endif
15854 #ifdef HAVE_SYS_MOUNT_H
15855 #include <sys/mount.h>
15856 #endif
15857 #ifdef HAVE_SYS_STATVFS_H
15858 #include <sys/statvfs.h>
15859 #endif
15860
15861 int
15862 main ()
15863 {
15864  struct statvfs s; s.f_fsid = 0;
15865   ;
15866   return 0;
15867 }
15868 _ACEOF
15869 if ac_fn_c_try_compile "$LINENO"; then :
15870    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15871 $as_echo "yes" >&6; }
15872 else
15873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15874 $as_echo "no" >&6; }
15875
15876         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fsid_t has member val" >&5
15877 $as_echo_n "checking if fsid_t has member val... " >&6; }
15878         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15879 /* end confdefs.h.  */
15880
15881 #include <sys/types.h>
15882 #include <sys/statvfs.h>
15883
15884 int
15885 main ()
15886 {
15887  fsid_t t; t.val[0] = 0;
15888   ;
15889   return 0;
15890 }
15891 _ACEOF
15892 if ac_fn_c_try_compile "$LINENO"; then :
15893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15894 $as_echo "yes" >&6; }
15895
15896 $as_echo "#define FSID_HAS_VAL 1" >>confdefs.h
15897
15898 else
15899    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15900 $as_echo "no" >&6; }
15901 fi
15902 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15903
15904         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if f_fsid has member __val" >&5
15905 $as_echo_n "checking if f_fsid has member __val... " >&6; }
15906         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15907 /* end confdefs.h.  */
15908
15909 #include <sys/types.h>
15910 #include <sys/statvfs.h>
15911
15912 int
15913 main ()
15914 {
15915  fsid_t t; t.__val[0] = 0;
15916   ;
15917   return 0;
15918 }
15919 _ACEOF
15920 if ac_fn_c_try_compile "$LINENO"; then :
15921    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15922 $as_echo "yes" >&6; }
15923
15924 $as_echo "#define FSID_HAS___VAL 1" >>confdefs.h
15925
15926 else
15927    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15928 $as_echo "no" >&6; }
15929 fi
15930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15931
15932 fi
15933 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15934
15935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_control field in struct msghdr" >&5
15936 $as_echo_n "checking for msg_control field in struct msghdr... " >&6; }
15937 if ${ac_cv_have_control_in_msghdr+:} false; then :
15938   $as_echo_n "(cached) " >&6
15939 else
15940
15941         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15942 /* end confdefs.h.  */
15943
15944 #include <sys/types.h>
15945 #include <sys/socket.h>
15946 #include <sys/uio.h>
15947
15948 int
15949 main ()
15950 {
15951
15952 #ifdef msg_control
15953 #error "msg_control is a macro"
15954 exit(1);
15955 #endif
15956 struct msghdr m;
15957 m.msg_control = 0;
15958 exit(0);
15959
15960   ;
15961   return 0;
15962 }
15963 _ACEOF
15964 if ac_fn_c_try_compile "$LINENO"; then :
15965    ac_cv_have_control_in_msghdr="yes"
15966 else
15967    ac_cv_have_control_in_msghdr="no"
15968
15969 fi
15970 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15971
15972 fi
15973 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_control_in_msghdr" >&5
15974 $as_echo "$ac_cv_have_control_in_msghdr" >&6; }
15975 if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
15976
15977 $as_echo "#define HAVE_CONTROL_IN_MSGHDR 1" >>confdefs.h
15978
15979 fi
15980
15981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines __progname" >&5
15982 $as_echo_n "checking if libc defines __progname... " >&6; }
15983 if ${ac_cv_libc_defines___progname+:} false; then :
15984   $as_echo_n "(cached) " >&6
15985 else
15986
15987         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15988 /* end confdefs.h.  */
15989
15990 int
15991 main ()
15992 {
15993  extern char *__progname; printf("%s", __progname);
15994   ;
15995   return 0;
15996 }
15997 _ACEOF
15998 if ac_fn_c_try_link "$LINENO"; then :
15999    ac_cv_libc_defines___progname="yes"
16000 else
16001    ac_cv_libc_defines___progname="no"
16002
16003 fi
16004 rm -f core conftest.err conftest.$ac_objext \
16005     conftest$ac_exeext conftest.$ac_ext
16006
16007 fi
16008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines___progname" >&5
16009 $as_echo "$ac_cv_libc_defines___progname" >&6; }
16010 if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
16011
16012 $as_echo "#define HAVE___PROGNAME 1" >>confdefs.h
16013
16014 fi
16015
16016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __FUNCTION__" >&5
16017 $as_echo_n "checking whether $CC implements __FUNCTION__... " >&6; }
16018 if ${ac_cv_cc_implements___FUNCTION__+:} false; then :
16019   $as_echo_n "(cached) " >&6
16020 else
16021
16022         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16023 /* end confdefs.h.  */
16024  #include <stdio.h>
16025 int
16026 main ()
16027 {
16028  printf("%s", __FUNCTION__);
16029   ;
16030   return 0;
16031 }
16032 _ACEOF
16033 if ac_fn_c_try_link "$LINENO"; then :
16034    ac_cv_cc_implements___FUNCTION__="yes"
16035 else
16036    ac_cv_cc_implements___FUNCTION__="no"
16037
16038 fi
16039 rm -f core conftest.err conftest.$ac_objext \
16040     conftest$ac_exeext conftest.$ac_ext
16041
16042 fi
16043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___FUNCTION__" >&5
16044 $as_echo "$ac_cv_cc_implements___FUNCTION__" >&6; }
16045 if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
16046
16047 $as_echo "#define HAVE___FUNCTION__ 1" >>confdefs.h
16048
16049 fi
16050
16051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __func__" >&5
16052 $as_echo_n "checking whether $CC implements __func__... " >&6; }
16053 if ${ac_cv_cc_implements___func__+:} false; then :
16054   $as_echo_n "(cached) " >&6
16055 else
16056
16057         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16058 /* end confdefs.h.  */
16059  #include <stdio.h>
16060 int
16061 main ()
16062 {
16063  printf("%s", __func__);
16064   ;
16065   return 0;
16066 }
16067 _ACEOF
16068 if ac_fn_c_try_link "$LINENO"; then :
16069    ac_cv_cc_implements___func__="yes"
16070 else
16071    ac_cv_cc_implements___func__="no"
16072
16073 fi
16074 rm -f core conftest.err conftest.$ac_objext \
16075     conftest$ac_exeext conftest.$ac_ext
16076
16077 fi
16078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___func__" >&5
16079 $as_echo "$ac_cv_cc_implements___func__" >&6; }
16080 if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
16081
16082 $as_echo "#define HAVE___func__ 1" >>confdefs.h
16083
16084 fi
16085
16086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_copy exists" >&5
16087 $as_echo_n "checking whether va_copy exists... " >&6; }
16088 if ${ac_cv_have_va_copy+:} false; then :
16089   $as_echo_n "(cached) " >&6
16090 else
16091
16092         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16093 /* end confdefs.h.  */
16094
16095 #include <stdarg.h>
16096 va_list x,y;
16097
16098 int
16099 main ()
16100 {
16101  va_copy(x,y);
16102   ;
16103   return 0;
16104 }
16105 _ACEOF
16106 if ac_fn_c_try_link "$LINENO"; then :
16107    ac_cv_have_va_copy="yes"
16108 else
16109    ac_cv_have_va_copy="no"
16110
16111 fi
16112 rm -f core conftest.err conftest.$ac_objext \
16113     conftest$ac_exeext conftest.$ac_ext
16114
16115 fi
16116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_va_copy" >&5
16117 $as_echo "$ac_cv_have_va_copy" >&6; }
16118 if test "x$ac_cv_have_va_copy" = "xyes" ; then
16119
16120 $as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
16121
16122 fi
16123
16124 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __va_copy exists" >&5
16125 $as_echo_n "checking whether __va_copy exists... " >&6; }
16126 if ${ac_cv_have___va_copy+:} false; then :
16127   $as_echo_n "(cached) " >&6
16128 else
16129
16130         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16131 /* end confdefs.h.  */
16132
16133 #include <stdarg.h>
16134 va_list x,y;
16135
16136 int
16137 main ()
16138 {
16139  __va_copy(x,y);
16140   ;
16141   return 0;
16142 }
16143 _ACEOF
16144 if ac_fn_c_try_link "$LINENO"; then :
16145    ac_cv_have___va_copy="yes"
16146 else
16147    ac_cv_have___va_copy="no"
16148
16149 fi
16150 rm -f core conftest.err conftest.$ac_objext \
16151     conftest$ac_exeext conftest.$ac_ext
16152
16153 fi
16154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___va_copy" >&5
16155 $as_echo "$ac_cv_have___va_copy" >&6; }
16156 if test "x$ac_cv_have___va_copy" = "xyes" ; then
16157
16158 $as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
16159
16160 fi
16161
16162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt has optreset support" >&5
16163 $as_echo_n "checking whether getopt has optreset support... " >&6; }
16164 if ${ac_cv_have_getopt_optreset+:} false; then :
16165   $as_echo_n "(cached) " >&6
16166 else
16167
16168         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16169 /* end confdefs.h.  */
16170  #include <getopt.h>
16171 int
16172 main ()
16173 {
16174  extern int optreset; optreset = 0;
16175   ;
16176   return 0;
16177 }
16178 _ACEOF
16179 if ac_fn_c_try_link "$LINENO"; then :
16180    ac_cv_have_getopt_optreset="yes"
16181 else
16182    ac_cv_have_getopt_optreset="no"
16183
16184 fi
16185 rm -f core conftest.err conftest.$ac_objext \
16186     conftest$ac_exeext conftest.$ac_ext
16187
16188 fi
16189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getopt_optreset" >&5
16190 $as_echo "$ac_cv_have_getopt_optreset" >&6; }
16191 if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
16192
16193 $as_echo "#define HAVE_GETOPT_OPTRESET 1" >>confdefs.h
16194
16195 fi
16196
16197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_errlist" >&5
16198 $as_echo_n "checking if libc defines sys_errlist... " >&6; }
16199 if ${ac_cv_libc_defines_sys_errlist+:} false; then :
16200   $as_echo_n "(cached) " >&6
16201 else
16202
16203         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16204 /* end confdefs.h.  */
16205
16206 int
16207 main ()
16208 {
16209  extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);
16210   ;
16211   return 0;
16212 }
16213 _ACEOF
16214 if ac_fn_c_try_link "$LINENO"; then :
16215    ac_cv_libc_defines_sys_errlist="yes"
16216 else
16217    ac_cv_libc_defines_sys_errlist="no"
16218
16219 fi
16220 rm -f core conftest.err conftest.$ac_objext \
16221     conftest$ac_exeext conftest.$ac_ext
16222
16223 fi
16224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_errlist" >&5
16225 $as_echo "$ac_cv_libc_defines_sys_errlist" >&6; }
16226 if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
16227
16228 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
16229
16230 fi
16231
16232
16233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_nerr" >&5
16234 $as_echo_n "checking if libc defines sys_nerr... " >&6; }
16235 if ${ac_cv_libc_defines_sys_nerr+:} false; then :
16236   $as_echo_n "(cached) " >&6
16237 else
16238
16239         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16240 /* end confdefs.h.  */
16241
16242 int
16243 main ()
16244 {
16245  extern int sys_nerr; printf("%i", sys_nerr);
16246   ;
16247   return 0;
16248 }
16249 _ACEOF
16250 if ac_fn_c_try_link "$LINENO"; then :
16251    ac_cv_libc_defines_sys_nerr="yes"
16252 else
16253    ac_cv_libc_defines_sys_nerr="no"
16254
16255 fi
16256 rm -f core conftest.err conftest.$ac_objext \
16257     conftest$ac_exeext conftest.$ac_ext
16258
16259 fi
16260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_nerr" >&5
16261 $as_echo "$ac_cv_libc_defines_sys_nerr" >&6; }
16262 if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
16263
16264 $as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h
16265
16266 fi
16267
16268 # Check libraries needed by DNS fingerprint support
16269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getrrsetbyname" >&5
16270 $as_echo_n "checking for library containing getrrsetbyname... " >&6; }
16271 if ${ac_cv_search_getrrsetbyname+:} false; then :
16272   $as_echo_n "(cached) " >&6
16273 else
16274   ac_func_search_save_LIBS=$LIBS
16275 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16276 /* end confdefs.h.  */
16277
16278 /* Override any GCC internal prototype to avoid an error.
16279    Use char because int might match the return type of a GCC
16280    builtin and then its argument prototype would still apply.  */
16281 #ifdef __cplusplus
16282 extern "C"
16283 #endif
16284 char getrrsetbyname ();
16285 int
16286 main ()
16287 {
16288 return getrrsetbyname ();
16289   ;
16290   return 0;
16291 }
16292 _ACEOF
16293 for ac_lib in '' resolv; do
16294   if test -z "$ac_lib"; then
16295     ac_res="none required"
16296   else
16297     ac_res=-l$ac_lib
16298     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16299   fi
16300   if ac_fn_c_try_link "$LINENO"; then :
16301   ac_cv_search_getrrsetbyname=$ac_res
16302 fi
16303 rm -f core conftest.err conftest.$ac_objext \
16304     conftest$ac_exeext
16305   if ${ac_cv_search_getrrsetbyname+:} false; then :
16306   break
16307 fi
16308 done
16309 if ${ac_cv_search_getrrsetbyname+:} false; then :
16310
16311 else
16312   ac_cv_search_getrrsetbyname=no
16313 fi
16314 rm conftest.$ac_ext
16315 LIBS=$ac_func_search_save_LIBS
16316 fi
16317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getrrsetbyname" >&5
16318 $as_echo "$ac_cv_search_getrrsetbyname" >&6; }
16319 ac_res=$ac_cv_search_getrrsetbyname
16320 if test "$ac_res" != no; then :
16321   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16322
16323 $as_echo "#define HAVE_GETRRSETBYNAME 1" >>confdefs.h
16324
16325 else
16326
16327                 # Needed by our getrrsetbyname()
16328                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_query" >&5
16329 $as_echo_n "checking for library containing res_query... " >&6; }
16330 if ${ac_cv_search_res_query+:} false; then :
16331   $as_echo_n "(cached) " >&6
16332 else
16333   ac_func_search_save_LIBS=$LIBS
16334 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16335 /* end confdefs.h.  */
16336
16337 /* Override any GCC internal prototype to avoid an error.
16338    Use char because int might match the return type of a GCC
16339    builtin and then its argument prototype would still apply.  */
16340 #ifdef __cplusplus
16341 extern "C"
16342 #endif
16343 char res_query ();
16344 int
16345 main ()
16346 {
16347 return res_query ();
16348   ;
16349   return 0;
16350 }
16351 _ACEOF
16352 for ac_lib in '' resolv; do
16353   if test -z "$ac_lib"; then
16354     ac_res="none required"
16355   else
16356     ac_res=-l$ac_lib
16357     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16358   fi
16359   if ac_fn_c_try_link "$LINENO"; then :
16360   ac_cv_search_res_query=$ac_res
16361 fi
16362 rm -f core conftest.err conftest.$ac_objext \
16363     conftest$ac_exeext
16364   if ${ac_cv_search_res_query+:} false; then :
16365   break
16366 fi
16367 done
16368 if ${ac_cv_search_res_query+:} false; then :
16369
16370 else
16371   ac_cv_search_res_query=no
16372 fi
16373 rm conftest.$ac_ext
16374 LIBS=$ac_func_search_save_LIBS
16375 fi
16376 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_query" >&5
16377 $as_echo "$ac_cv_search_res_query" >&6; }
16378 ac_res=$ac_cv_search_res_query
16379 if test "$ac_res" != no; then :
16380   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16381
16382 fi
16383
16384                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
16385 $as_echo_n "checking for library containing dn_expand... " >&6; }
16386 if ${ac_cv_search_dn_expand+:} false; then :
16387   $as_echo_n "(cached) " >&6
16388 else
16389   ac_func_search_save_LIBS=$LIBS
16390 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16391 /* end confdefs.h.  */
16392
16393 /* Override any GCC internal prototype to avoid an error.
16394    Use char because int might match the return type of a GCC
16395    builtin and then its argument prototype would still apply.  */
16396 #ifdef __cplusplus
16397 extern "C"
16398 #endif
16399 char dn_expand ();
16400 int
16401 main ()
16402 {
16403 return dn_expand ();
16404   ;
16405   return 0;
16406 }
16407 _ACEOF
16408 for ac_lib in '' resolv; do
16409   if test -z "$ac_lib"; then
16410     ac_res="none required"
16411   else
16412     ac_res=-l$ac_lib
16413     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16414   fi
16415   if ac_fn_c_try_link "$LINENO"; then :
16416   ac_cv_search_dn_expand=$ac_res
16417 fi
16418 rm -f core conftest.err conftest.$ac_objext \
16419     conftest$ac_exeext
16420   if ${ac_cv_search_dn_expand+:} false; then :
16421   break
16422 fi
16423 done
16424 if ${ac_cv_search_dn_expand+:} false; then :
16425
16426 else
16427   ac_cv_search_dn_expand=no
16428 fi
16429 rm conftest.$ac_ext
16430 LIBS=$ac_func_search_save_LIBS
16431 fi
16432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
16433 $as_echo "$ac_cv_search_dn_expand" >&6; }
16434 ac_res=$ac_cv_search_dn_expand
16435 if test "$ac_res" != no; then :
16436   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16437
16438 fi
16439
16440                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if res_query will link" >&5
16441 $as_echo_n "checking if res_query will link... " >&6; }
16442                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16443 /* end confdefs.h.  */
16444
16445 #include <sys/types.h>
16446 #include <netinet/in.h>
16447 #include <arpa/nameser.h>
16448 #include <netdb.h>
16449 #include <resolv.h>
16450
16451 int
16452 main ()
16453 {
16454
16455         res_query (0, 0, 0, 0, 0);
16456
16457   ;
16458   return 0;
16459 }
16460 _ACEOF
16461 if ac_fn_c_try_link "$LINENO"; then :
16462   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16463 $as_echo "yes" >&6; }
16464 else
16465   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16466 $as_echo "no" >&6; }
16467                     saved_LIBS="$LIBS"
16468                     LIBS="$LIBS -lresolv"
16469                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
16470 $as_echo_n "checking for res_query in -lresolv... " >&6; }
16471                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16472 /* end confdefs.h.  */
16473
16474 #include <sys/types.h>
16475 #include <netinet/in.h>
16476 #include <arpa/nameser.h>
16477 #include <netdb.h>
16478 #include <resolv.h>
16479
16480 int
16481 main ()
16482 {
16483
16484         res_query (0, 0, 0, 0, 0);
16485
16486   ;
16487   return 0;
16488 }
16489 _ACEOF
16490 if ac_fn_c_try_link "$LINENO"; then :
16491   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16492 $as_echo "yes" >&6; }
16493 else
16494   LIBS="$saved_LIBS"
16495                          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16496 $as_echo "no" >&6; }
16497 fi
16498 rm -f core conftest.err conftest.$ac_objext \
16499     conftest$ac_exeext conftest.$ac_ext
16500
16501 fi
16502 rm -f core conftest.err conftest.$ac_objext \
16503     conftest$ac_exeext conftest.$ac_ext
16504                 for ac_func in _getshort _getlong
16505 do :
16506   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16507 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16508 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16509   cat >>confdefs.h <<_ACEOF
16510 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16511 _ACEOF
16512
16513 fi
16514 done
16515
16516                 ac_fn_c_check_decl "$LINENO" "_getshort" "ac_cv_have_decl__getshort" "#include <sys/types.h>
16517                     #include <arpa/nameser.h>
16518 "
16519 if test "x$ac_cv_have_decl__getshort" = xyes; then :
16520   ac_have_decl=1
16521 else
16522   ac_have_decl=0
16523 fi
16524
16525 cat >>confdefs.h <<_ACEOF
16526 #define HAVE_DECL__GETSHORT $ac_have_decl
16527 _ACEOF
16528 ac_fn_c_check_decl "$LINENO" "_getlong" "ac_cv_have_decl__getlong" "#include <sys/types.h>
16529                     #include <arpa/nameser.h>
16530 "
16531 if test "x$ac_cv_have_decl__getlong" = xyes; then :
16532   ac_have_decl=1
16533 else
16534   ac_have_decl=0
16535 fi
16536
16537 cat >>confdefs.h <<_ACEOF
16538 #define HAVE_DECL__GETLONG $ac_have_decl
16539 _ACEOF
16540
16541                 ac_fn_c_check_member "$LINENO" "HEADER" "ad" "ac_cv_member_HEADER_ad" "#include <arpa/nameser.h>
16542 "
16543 if test "x$ac_cv_member_HEADER_ad" = xyes; then :
16544
16545 $as_echo "#define HAVE_HEADER_AD 1" >>confdefs.h
16546
16547 fi
16548
16549
16550 fi
16551
16552
16553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct __res_state _res is an extern" >&5
16554 $as_echo_n "checking if struct __res_state _res is an extern... " >&6; }
16555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16556 /* end confdefs.h.  */
16557
16558 #include <stdio.h>
16559 #if HAVE_SYS_TYPES_H
16560 # include <sys/types.h>
16561 #endif
16562 #include <netinet/in.h>
16563 #include <arpa/nameser.h>
16564 #include <resolv.h>
16565 extern struct __res_state _res;
16566
16567 int
16568 main ()
16569 {
16570
16571   ;
16572   return 0;
16573 }
16574 _ACEOF
16575 if ac_fn_c_try_link "$LINENO"; then :
16576   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16577 $as_echo "yes" >&6; }
16578
16579 $as_echo "#define HAVE__RES_EXTERN 1" >>confdefs.h
16580
16581
16582 else
16583    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16584 $as_echo "no" >&6; }
16585
16586 fi
16587 rm -f core conftest.err conftest.$ac_objext \
16588     conftest$ac_exeext conftest.$ac_ext
16589
16590 # Check whether user wants SELinux support
16591 SELINUX_MSG="no"
16592 LIBSELINUX=""
16593
16594 # Check whether --with-selinux was given.
16595 if test "${with_selinux+set}" = set; then :
16596   withval=$with_selinux;  if test "x$withval" != "xno" ; then
16597                 save_LIBS="$LIBS"
16598
16599 $as_echo "#define WITH_SELINUX 1" >>confdefs.h
16600
16601                 SELINUX_MSG="yes"
16602                 ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
16603 if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
16604
16605 else
16606   as_fn_error $? "SELinux support requires selinux.h header" "$LINENO" 5
16607 fi
16608
16609
16610                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setexeccon in -lselinux" >&5
16611 $as_echo_n "checking for setexeccon in -lselinux... " >&6; }
16612 if ${ac_cv_lib_selinux_setexeccon+:} false; then :
16613   $as_echo_n "(cached) " >&6
16614 else
16615   ac_check_lib_save_LIBS=$LIBS
16616 LIBS="-lselinux  $LIBS"
16617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16618 /* end confdefs.h.  */
16619
16620 /* Override any GCC internal prototype to avoid an error.
16621    Use char because int might match the return type of a GCC
16622    builtin and then its argument prototype would still apply.  */
16623 #ifdef __cplusplus
16624 extern "C"
16625 #endif
16626 char setexeccon ();
16627 int
16628 main ()
16629 {
16630 return setexeccon ();
16631   ;
16632   return 0;
16633 }
16634 _ACEOF
16635 if ac_fn_c_try_link "$LINENO"; then :
16636   ac_cv_lib_selinux_setexeccon=yes
16637 else
16638   ac_cv_lib_selinux_setexeccon=no
16639 fi
16640 rm -f core conftest.err conftest.$ac_objext \
16641     conftest$ac_exeext conftest.$ac_ext
16642 LIBS=$ac_check_lib_save_LIBS
16643 fi
16644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_setexeccon" >&5
16645 $as_echo "$ac_cv_lib_selinux_setexeccon" >&6; }
16646 if test "x$ac_cv_lib_selinux_setexeccon" = xyes; then :
16647    LIBSELINUX="-lselinux"
16648                           LIBS="$LIBS -lselinux"
16649
16650 else
16651   as_fn_error $? "SELinux support requires libselinux library" "$LINENO" 5
16652 fi
16653
16654                 SSHLIBS="$SSHLIBS $LIBSELINUX"
16655                 SSHDLIBS="$SSHDLIBS $LIBSELINUX"
16656                 for ac_func in getseuserbyname get_default_context_with_level
16657 do :
16658   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16659 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16660 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16661   cat >>confdefs.h <<_ACEOF
16662 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16663 _ACEOF
16664
16665 fi
16666 done
16667
16668                 LIBS="$save_LIBS"
16669         fi
16670
16671 fi
16672
16673
16674
16675
16676 # Check whether user wants Kerberos 5 support
16677 KRB5_MSG="no"
16678
16679 # Check whether --with-kerberos5 was given.
16680 if test "${with_kerberos5+set}" = set; then :
16681   withval=$with_kerberos5;  if test "x$withval" != "xno" ; then
16682                 if test "x$withval" = "xyes" ; then
16683                         KRB5ROOT="/usr/local"
16684                 else
16685                         KRB5ROOT=${withval}
16686                 fi
16687
16688
16689 $as_echo "#define KRB5 1" >>confdefs.h
16690
16691                 KRB5_MSG="yes"
16692
16693                 # Extract the first word of "krb5-config", so it can be a program name with args.
16694 set dummy krb5-config; ac_word=$2
16695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16696 $as_echo_n "checking for $ac_word... " >&6; }
16697 if ${ac_cv_path_KRB5CONF+:} false; then :
16698   $as_echo_n "(cached) " >&6
16699 else
16700   case $KRB5CONF in
16701   [\\/]* | ?:[\\/]*)
16702   ac_cv_path_KRB5CONF="$KRB5CONF" # Let the user override the test with a path.
16703   ;;
16704   *)
16705   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16706 as_dummy="$KRB5ROOT/bin:$PATH"
16707 for as_dir in $as_dummy
16708 do
16709   IFS=$as_save_IFS
16710   test -z "$as_dir" && as_dir=.
16711     for ac_exec_ext in '' $ac_executable_extensions; do
16712   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16713     ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
16714     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16715     break 2
16716   fi
16717 done
16718   done
16719 IFS=$as_save_IFS
16720
16721   test -z "$ac_cv_path_KRB5CONF" && ac_cv_path_KRB5CONF="$KRB5ROOT/bin/krb5-config"
16722   ;;
16723 esac
16724 fi
16725 KRB5CONF=$ac_cv_path_KRB5CONF
16726 if test -n "$KRB5CONF"; then
16727   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5CONF" >&5
16728 $as_echo "$KRB5CONF" >&6; }
16729 else
16730   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16731 $as_echo "no" >&6; }
16732 fi
16733
16734
16735                 if test -x $KRB5CONF ; then
16736                         K5CFLAGS="`$KRB5CONF --cflags`"
16737                         K5LIBS="`$KRB5CONF --libs`"
16738                         CPPFLAGS="$CPPFLAGS $K5CFLAGS"
16739
16740                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gssapi support" >&5
16741 $as_echo_n "checking for gssapi support... " >&6; }
16742                         if $KRB5CONF | grep gssapi >/dev/null ; then
16743                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16744 $as_echo "yes" >&6; }
16745
16746 $as_echo "#define GSSAPI 1" >>confdefs.h
16747
16748                                 GSSCFLAGS="`$KRB5CONF --cflags gssapi`"
16749                                 GSSLIBS="`$KRB5CONF --libs gssapi`"
16750                                 CPPFLAGS="$CPPFLAGS $GSSCFLAGS"
16751                         else
16752                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16753 $as_echo "no" >&6; }
16754                         fi
16755                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
16756 $as_echo_n "checking whether we are using Heimdal... " >&6; }
16757                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16758 /* end confdefs.h.  */
16759  #include <krb5.h>
16760
16761 int
16762 main ()
16763 {
16764  char *tmp = heimdal_version;
16765   ;
16766   return 0;
16767 }
16768 _ACEOF
16769 if ac_fn_c_try_compile "$LINENO"; then :
16770    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16771 $as_echo "yes" >&6; }
16772
16773 $as_echo "#define HEIMDAL 1" >>confdefs.h
16774
16775 else
16776   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16777 $as_echo "no" >&6; }
16778
16779 fi
16780 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16781                 else
16782                         CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
16783                         LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
16784                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
16785 $as_echo_n "checking whether we are using Heimdal... " >&6; }
16786                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16787 /* end confdefs.h.  */
16788  #include <krb5.h>
16789
16790 int
16791 main ()
16792 {
16793  char *tmp = heimdal_version;
16794   ;
16795   return 0;
16796 }
16797 _ACEOF
16798 if ac_fn_c_try_compile "$LINENO"; then :
16799    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16800 $as_echo "yes" >&6; }
16801                                          $as_echo "#define HEIMDAL 1" >>confdefs.h
16802
16803                                          K5LIBS="-lkrb5"
16804                                          K5LIBS="$K5LIBS -lcom_err -lasn1"
16805                                          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for net_write in -lroken" >&5
16806 $as_echo_n "checking for net_write in -lroken... " >&6; }
16807 if ${ac_cv_lib_roken_net_write+:} false; then :
16808   $as_echo_n "(cached) " >&6
16809 else
16810   ac_check_lib_save_LIBS=$LIBS
16811 LIBS="-lroken  $LIBS"
16812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16813 /* end confdefs.h.  */
16814
16815 /* Override any GCC internal prototype to avoid an error.
16816    Use char because int might match the return type of a GCC
16817    builtin and then its argument prototype would still apply.  */
16818 #ifdef __cplusplus
16819 extern "C"
16820 #endif
16821 char net_write ();
16822 int
16823 main ()
16824 {
16825 return net_write ();
16826   ;
16827   return 0;
16828 }
16829 _ACEOF
16830 if ac_fn_c_try_link "$LINENO"; then :
16831   ac_cv_lib_roken_net_write=yes
16832 else
16833   ac_cv_lib_roken_net_write=no
16834 fi
16835 rm -f core conftest.err conftest.$ac_objext \
16836     conftest$ac_exeext conftest.$ac_ext
16837 LIBS=$ac_check_lib_save_LIBS
16838 fi
16839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_roken_net_write" >&5
16840 $as_echo "$ac_cv_lib_roken_net_write" >&6; }
16841 if test "x$ac_cv_lib_roken_net_write" = xyes; then :
16842   K5LIBS="$K5LIBS -lroken"
16843 fi
16844
16845                                          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
16846 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
16847 if ${ac_cv_lib_des_des_cbc_encrypt+:} false; then :
16848   $as_echo_n "(cached) " >&6
16849 else
16850   ac_check_lib_save_LIBS=$LIBS
16851 LIBS="-ldes  $LIBS"
16852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16853 /* end confdefs.h.  */
16854
16855 /* Override any GCC internal prototype to avoid an error.
16856    Use char because int might match the return type of a GCC
16857    builtin and then its argument prototype would still apply.  */
16858 #ifdef __cplusplus
16859 extern "C"
16860 #endif
16861 char des_cbc_encrypt ();
16862 int
16863 main ()
16864 {
16865 return des_cbc_encrypt ();
16866   ;
16867   return 0;
16868 }
16869 _ACEOF
16870 if ac_fn_c_try_link "$LINENO"; then :
16871   ac_cv_lib_des_des_cbc_encrypt=yes
16872 else
16873   ac_cv_lib_des_des_cbc_encrypt=no
16874 fi
16875 rm -f core conftest.err conftest.$ac_objext \
16876     conftest$ac_exeext conftest.$ac_ext
16877 LIBS=$ac_check_lib_save_LIBS
16878 fi
16879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
16880 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
16881 if test "x$ac_cv_lib_des_des_cbc_encrypt" = xyes; then :
16882   K5LIBS="$K5LIBS -ldes"
16883 fi
16884
16885
16886 else
16887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16888 $as_echo "no" >&6; }
16889                                          K5LIBS="-lkrb5 -lk5crypto -lcom_err"
16890
16891
16892 fi
16893 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16894                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
16895 $as_echo_n "checking for library containing dn_expand... " >&6; }
16896 if ${ac_cv_search_dn_expand+:} false; then :
16897   $as_echo_n "(cached) " >&6
16898 else
16899   ac_func_search_save_LIBS=$LIBS
16900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16901 /* end confdefs.h.  */
16902
16903 /* Override any GCC internal prototype to avoid an error.
16904    Use char because int might match the return type of a GCC
16905    builtin and then its argument prototype would still apply.  */
16906 #ifdef __cplusplus
16907 extern "C"
16908 #endif
16909 char dn_expand ();
16910 int
16911 main ()
16912 {
16913 return dn_expand ();
16914   ;
16915   return 0;
16916 }
16917 _ACEOF
16918 for ac_lib in '' resolv; do
16919   if test -z "$ac_lib"; then
16920     ac_res="none required"
16921   else
16922     ac_res=-l$ac_lib
16923     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16924   fi
16925   if ac_fn_c_try_link "$LINENO"; then :
16926   ac_cv_search_dn_expand=$ac_res
16927 fi
16928 rm -f core conftest.err conftest.$ac_objext \
16929     conftest$ac_exeext
16930   if ${ac_cv_search_dn_expand+:} false; then :
16931   break
16932 fi
16933 done
16934 if ${ac_cv_search_dn_expand+:} false; then :
16935
16936 else
16937   ac_cv_search_dn_expand=no
16938 fi
16939 rm conftest.$ac_ext
16940 LIBS=$ac_func_search_save_LIBS
16941 fi
16942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
16943 $as_echo "$ac_cv_search_dn_expand" >&6; }
16944 ac_res=$ac_cv_search_dn_expand
16945 if test "$ac_res" != no; then :
16946   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16947
16948 fi
16949
16950
16951                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi_krb5" >&5
16952 $as_echo_n "checking for gss_init_sec_context in -lgssapi_krb5... " >&6; }
16953 if ${ac_cv_lib_gssapi_krb5_gss_init_sec_context+:} false; then :
16954   $as_echo_n "(cached) " >&6
16955 else
16956   ac_check_lib_save_LIBS=$LIBS
16957 LIBS="-lgssapi_krb5  $LIBS"
16958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16959 /* end confdefs.h.  */
16960
16961 /* Override any GCC internal prototype to avoid an error.
16962    Use char because int might match the return type of a GCC
16963    builtin and then its argument prototype would still apply.  */
16964 #ifdef __cplusplus
16965 extern "C"
16966 #endif
16967 char gss_init_sec_context ();
16968 int
16969 main ()
16970 {
16971 return gss_init_sec_context ();
16972   ;
16973   return 0;
16974 }
16975 _ACEOF
16976 if ac_fn_c_try_link "$LINENO"; then :
16977   ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes
16978 else
16979   ac_cv_lib_gssapi_krb5_gss_init_sec_context=no
16980 fi
16981 rm -f core conftest.err conftest.$ac_objext \
16982     conftest$ac_exeext conftest.$ac_ext
16983 LIBS=$ac_check_lib_save_LIBS
16984 fi
16985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5
16986 $as_echo "$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6; }
16987 if test "x$ac_cv_lib_gssapi_krb5_gss_init_sec_context" = xyes; then :
16988    $as_echo "#define GSSAPI 1" >>confdefs.h
16989
16990                                   GSSLIBS="-lgssapi_krb5"
16991 else
16992    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi" >&5
16993 $as_echo_n "checking for gss_init_sec_context in -lgssapi... " >&6; }
16994 if ${ac_cv_lib_gssapi_gss_init_sec_context+:} false; then :
16995   $as_echo_n "(cached) " >&6
16996 else
16997   ac_check_lib_save_LIBS=$LIBS
16998 LIBS="-lgssapi  $LIBS"
16999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17000 /* end confdefs.h.  */
17001
17002 /* Override any GCC internal prototype to avoid an error.
17003    Use char because int might match the return type of a GCC
17004    builtin and then its argument prototype would still apply.  */
17005 #ifdef __cplusplus
17006 extern "C"
17007 #endif
17008 char gss_init_sec_context ();
17009 int
17010 main ()
17011 {
17012 return gss_init_sec_context ();
17013   ;
17014   return 0;
17015 }
17016 _ACEOF
17017 if ac_fn_c_try_link "$LINENO"; then :
17018   ac_cv_lib_gssapi_gss_init_sec_context=yes
17019 else
17020   ac_cv_lib_gssapi_gss_init_sec_context=no
17021 fi
17022 rm -f core conftest.err conftest.$ac_objext \
17023     conftest$ac_exeext conftest.$ac_ext
17024 LIBS=$ac_check_lib_save_LIBS
17025 fi
17026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5
17027 $as_echo "$ac_cv_lib_gssapi_gss_init_sec_context" >&6; }
17028 if test "x$ac_cv_lib_gssapi_gss_init_sec_context" = xyes; then :
17029    $as_echo "#define GSSAPI 1" >>confdefs.h
17030
17031                                           GSSLIBS="-lgssapi"
17032 else
17033    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgss" >&5
17034 $as_echo_n "checking for gss_init_sec_context in -lgss... " >&6; }
17035 if ${ac_cv_lib_gss_gss_init_sec_context+:} false; then :
17036   $as_echo_n "(cached) " >&6
17037 else
17038   ac_check_lib_save_LIBS=$LIBS
17039 LIBS="-lgss  $LIBS"
17040 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17041 /* end confdefs.h.  */
17042
17043 /* Override any GCC internal prototype to avoid an error.
17044    Use char because int might match the return type of a GCC
17045    builtin and then its argument prototype would still apply.  */
17046 #ifdef __cplusplus
17047 extern "C"
17048 #endif
17049 char gss_init_sec_context ();
17050 int
17051 main ()
17052 {
17053 return gss_init_sec_context ();
17054   ;
17055   return 0;
17056 }
17057 _ACEOF
17058 if ac_fn_c_try_link "$LINENO"; then :
17059   ac_cv_lib_gss_gss_init_sec_context=yes
17060 else
17061   ac_cv_lib_gss_gss_init_sec_context=no
17062 fi
17063 rm -f core conftest.err conftest.$ac_objext \
17064     conftest$ac_exeext conftest.$ac_ext
17065 LIBS=$ac_check_lib_save_LIBS
17066 fi
17067 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_init_sec_context" >&5
17068 $as_echo "$ac_cv_lib_gss_gss_init_sec_context" >&6; }
17069 if test "x$ac_cv_lib_gss_gss_init_sec_context" = xyes; then :
17070    $as_echo "#define GSSAPI 1" >>confdefs.h
17071
17072                                                   GSSLIBS="-lgss"
17073 else
17074   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api library - build may fail" >&5
17075 $as_echo "$as_me: WARNING: Cannot find any suitable gss-api library - build may fail" >&2;}
17076 fi
17077
17078
17079 fi
17080
17081
17082 fi
17083
17084
17085                         ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
17086 if test "x$ac_cv_header_gssapi_h" = xyes; then :
17087
17088 else
17089    unset ac_cv_header_gssapi_h
17090                                   CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
17091                                   for ac_header in gssapi.h
17092 do :
17093   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
17094 if test "x$ac_cv_header_gssapi_h" = xyes; then :
17095   cat >>confdefs.h <<_ACEOF
17096 #define HAVE_GSSAPI_H 1
17097 _ACEOF
17098
17099 else
17100   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api header - build may fail" >&5
17101 $as_echo "$as_me: WARNING: Cannot find any suitable gss-api header - build may fail" >&2;}
17102
17103 fi
17104
17105 done
17106
17107
17108
17109 fi
17110
17111
17112
17113                         oldCPP="$CPPFLAGS"
17114                         CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
17115                         ac_fn_c_check_header_mongrel "$LINENO" "gssapi_krb5.h" "ac_cv_header_gssapi_krb5_h" "$ac_includes_default"
17116 if test "x$ac_cv_header_gssapi_krb5_h" = xyes; then :
17117
17118 else
17119    CPPFLAGS="$oldCPP"
17120 fi
17121
17122
17123
17124                 fi
17125                 if test ! -z "$need_dash_r" ; then
17126                         LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
17127                 fi
17128                 if test ! -z "$blibpath" ; then
17129                         blibpath="$blibpath:${KRB5ROOT}/lib"
17130                 fi
17131
17132                 for ac_header in gssapi.h gssapi/gssapi.h
17133 do :
17134   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17135 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17136 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17137   cat >>confdefs.h <<_ACEOF
17138 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17139 _ACEOF
17140
17141 fi
17142
17143 done
17144
17145                 for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h
17146 do :
17147   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17148 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17149 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17150   cat >>confdefs.h <<_ACEOF
17151 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17152 _ACEOF
17153
17154 fi
17155
17156 done
17157
17158                 for ac_header in gssapi_generic.h gssapi/gssapi_generic.h
17159 do :
17160   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
17161 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
17162 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
17163   cat >>confdefs.h <<_ACEOF
17164 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
17165 _ACEOF
17166
17167 fi
17168
17169 done
17170
17171
17172                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing k_hasafs" >&5
17173 $as_echo_n "checking for library containing k_hasafs... " >&6; }
17174 if ${ac_cv_search_k_hasafs+:} false; then :
17175   $as_echo_n "(cached) " >&6
17176 else
17177   ac_func_search_save_LIBS=$LIBS
17178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17179 /* end confdefs.h.  */
17180
17181 /* Override any GCC internal prototype to avoid an error.
17182    Use char because int might match the return type of a GCC
17183    builtin and then its argument prototype would still apply.  */
17184 #ifdef __cplusplus
17185 extern "C"
17186 #endif
17187 char k_hasafs ();
17188 int
17189 main ()
17190 {
17191 return k_hasafs ();
17192   ;
17193   return 0;
17194 }
17195 _ACEOF
17196 for ac_lib in '' kafs; do
17197   if test -z "$ac_lib"; then
17198     ac_res="none required"
17199   else
17200     ac_res=-l$ac_lib
17201     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
17202   fi
17203   if ac_fn_c_try_link "$LINENO"; then :
17204   ac_cv_search_k_hasafs=$ac_res
17205 fi
17206 rm -f core conftest.err conftest.$ac_objext \
17207     conftest$ac_exeext
17208   if ${ac_cv_search_k_hasafs+:} false; then :
17209   break
17210 fi
17211 done
17212 if ${ac_cv_search_k_hasafs+:} false; then :
17213
17214 else
17215   ac_cv_search_k_hasafs=no
17216 fi
17217 rm conftest.$ac_ext
17218 LIBS=$ac_func_search_save_LIBS
17219 fi
17220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_k_hasafs" >&5
17221 $as_echo "$ac_cv_search_k_hasafs" >&6; }
17222 ac_res=$ac_cv_search_k_hasafs
17223 if test "$ac_res" != no; then :
17224   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17225
17226 $as_echo "#define USE_AFS 1" >>confdefs.h
17227
17228 fi
17229
17230
17231                 ac_fn_c_check_decl "$LINENO" "GSS_C_NT_HOSTBASED_SERVICE" "ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" "
17232 #ifdef HAVE_GSSAPI_H
17233 # include <gssapi.h>
17234 #elif defined(HAVE_GSSAPI_GSSAPI_H)
17235 # include <gssapi/gssapi.h>
17236 #endif
17237
17238 #ifdef HAVE_GSSAPI_GENERIC_H
17239 # include <gssapi_generic.h>
17240 #elif defined(HAVE_GSSAPI_GSSAPI_GENERIC_H)
17241 # include <gssapi/gssapi_generic.h>
17242 #endif
17243
17244 "
17245 if test "x$ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" = xyes; then :
17246   ac_have_decl=1
17247 else
17248   ac_have_decl=0
17249 fi
17250
17251 cat >>confdefs.h <<_ACEOF
17252 #define HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE $ac_have_decl
17253 _ACEOF
17254
17255                 saved_LIBS="$LIBS"
17256                 LIBS="$LIBS $K5LIBS"
17257                 for ac_func in krb5_cc_new_unique krb5_get_error_message krb5_free_error_message
17258 do :
17259   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17260 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17261 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17262   cat >>confdefs.h <<_ACEOF
17263 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17264 _ACEOF
17265
17266 fi
17267 done
17268
17269                 LIBS="$saved_LIBS"
17270
17271         fi
17272
17273
17274 fi
17275
17276
17277
17278
17279 # Looking for programs, paths and files
17280
17281 PRIVSEP_PATH=/var/empty
17282
17283 # Check whether --with-privsep-path was given.
17284 if test "${with_privsep_path+set}" = set; then :
17285   withval=$with_privsep_path;
17286                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
17287                     test "x${withval}" != "xyes"; then
17288                         PRIVSEP_PATH=$withval
17289                 fi
17290
17291
17292 fi
17293
17294
17295
17296
17297 # Check whether --with-xauth was given.
17298 if test "${with_xauth+set}" = set; then :
17299   withval=$with_xauth;
17300                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
17301                     test "x${withval}" != "xyes"; then
17302                         xauth_path=$withval
17303                 fi
17304
17305 else
17306
17307                 TestPath="$PATH"
17308                 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X/bin"
17309                 TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11"
17310                 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin"
17311                 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
17312                 # Extract the first word of "xauth", so it can be a program name with args.
17313 set dummy xauth; ac_word=$2
17314 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17315 $as_echo_n "checking for $ac_word... " >&6; }
17316 if ${ac_cv_path_xauth_path+:} false; then :
17317   $as_echo_n "(cached) " >&6
17318 else
17319   case $xauth_path in
17320   [\\/]* | ?:[\\/]*)
17321   ac_cv_path_xauth_path="$xauth_path" # Let the user override the test with a path.
17322   ;;
17323   *)
17324   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17325 for as_dir in $TestPath
17326 do
17327   IFS=$as_save_IFS
17328   test -z "$as_dir" && as_dir=.
17329     for ac_exec_ext in '' $ac_executable_extensions; do
17330   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17331     ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext"
17332     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17333     break 2
17334   fi
17335 done
17336   done
17337 IFS=$as_save_IFS
17338
17339   ;;
17340 esac
17341 fi
17342 xauth_path=$ac_cv_path_xauth_path
17343 if test -n "$xauth_path"; then
17344   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xauth_path" >&5
17345 $as_echo "$xauth_path" >&6; }
17346 else
17347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17348 $as_echo "no" >&6; }
17349 fi
17350
17351
17352                 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
17353                         xauth_path="/usr/openwin/bin/xauth"
17354                 fi
17355
17356
17357 fi
17358
17359
17360 STRIP_OPT=-s
17361 # Check whether --enable-strip was given.
17362 if test "${enable_strip+set}" = set; then :
17363   enableval=$enable_strip;
17364                 if test "x$enableval" = "xno" ; then
17365                         STRIP_OPT=
17366                 fi
17367
17368
17369 fi
17370
17371
17372
17373 if test -z "$xauth_path" ; then
17374         XAUTH_PATH="undefined"
17375
17376 else
17377
17378 cat >>confdefs.h <<_ACEOF
17379 #define XAUTH_PATH "$xauth_path"
17380 _ACEOF
17381
17382         XAUTH_PATH=$xauth_path
17383
17384 fi
17385
17386 # Check for mail directory
17387
17388 # Check whether --with-maildir was given.
17389 if test "${with_maildir+set}" = set; then :
17390   withval=$with_maildir;
17391         if test "X$withval" != X  &&  test "x$withval" != xno  &&  \
17392             test "x${withval}" != xyes; then
17393
17394 cat >>confdefs.h <<_ACEOF
17395 #define MAIL_DIRECTORY "$withval"
17396 _ACEOF
17397
17398             fi
17399
17400 else
17401
17402         if test "X$maildir" != "X"; then
17403             cat >>confdefs.h <<_ACEOF
17404 #define MAIL_DIRECTORY "$maildir"
17405 _ACEOF
17406
17407         else
17408             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Discovering system mail directory" >&5
17409 $as_echo_n "checking Discovering system mail directory... " >&6; }
17410             if test "$cross_compiling" = yes; then :
17411
17412                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&5
17413 $as_echo "$as_me: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&2;}
17414
17415
17416 else
17417   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17418 /* end confdefs.h.  */
17419
17420 #include <stdio.h>
17421 #include <string.h>
17422 #ifdef HAVE_PATHS_H
17423 #include <paths.h>
17424 #endif
17425 #ifdef HAVE_MAILLOCK_H
17426 #include <maillock.h>
17427 #endif
17428 #define DATA "conftest.maildir"
17429
17430 int
17431 main ()
17432 {
17433
17434         FILE *fd;
17435         int rc;
17436
17437         fd = fopen(DATA,"w");
17438         if(fd == NULL)
17439                 exit(1);
17440
17441 #if defined (_PATH_MAILDIR)
17442         if ((rc = fprintf(fd ,"_PATH_MAILDIR:%s\n", _PATH_MAILDIR)) <0)
17443                 exit(1);
17444 #elif defined (MAILDIR)
17445         if ((rc = fprintf(fd ,"MAILDIR:%s\n", MAILDIR)) <0)
17446                 exit(1);
17447 #elif defined (_PATH_MAIL)
17448         if ((rc = fprintf(fd ,"_PATH_MAIL:%s\n", _PATH_MAIL)) <0)
17449                 exit(1);
17450 #else
17451         exit (2);
17452 #endif
17453
17454         exit(0);
17455
17456   ;
17457   return 0;
17458 }
17459 _ACEOF
17460 if ac_fn_c_try_run "$LINENO"; then :
17461
17462                     maildir_what=`awk -F: '{print $1}' conftest.maildir`
17463                     maildir=`awk -F: '{print $2}' conftest.maildir \
17464                         | sed 's|/$||'`
17465                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: $maildir from $maildir_what" >&5
17466 $as_echo "Using: $maildir from $maildir_what" >&6; }
17467                     if test "x$maildir_what" != "x_PATH_MAILDIR"; then
17468                         cat >>confdefs.h <<_ACEOF
17469 #define MAIL_DIRECTORY "$maildir"
17470 _ACEOF
17471
17472                     fi
17473
17474 else
17475
17476                     if test "X$ac_status" = "X2";then
17477 # our test program didn't find it. Default to /var/spool/mail
17478                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: default value of /var/spool/mail" >&5
17479 $as_echo "Using: default value of /var/spool/mail" >&6; }
17480                         cat >>confdefs.h <<_ACEOF
17481 #define MAIL_DIRECTORY "/var/spool/mail"
17482 _ACEOF
17483
17484                      else
17485                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** not found ***" >&5
17486 $as_echo "*** not found ***" >&6; }
17487                      fi
17488
17489 fi
17490 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17491   conftest.$ac_objext conftest.beam conftest.$ac_ext
17492 fi
17493
17494         fi
17495
17496
17497 fi
17498  # maildir
17499
17500 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
17501         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptmx test" >&5
17502 $as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptmx test" >&2;}
17503         disable_ptmx_check=yes
17504 fi
17505 if test -z "$no_dev_ptmx" ; then
17506         if test "x$disable_ptmx_check" != "xyes" ; then
17507                 as_ac_File=`$as_echo "ac_cv_file_"/dev/ptmx"" | $as_tr_sh`
17508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptmx\"" >&5
17509 $as_echo_n "checking for \"/dev/ptmx\"... " >&6; }
17510 if eval \${$as_ac_File+:} false; then :
17511   $as_echo_n "(cached) " >&6
17512 else
17513   test "$cross_compiling" = yes &&
17514   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17515 if test -r ""/dev/ptmx""; then
17516   eval "$as_ac_File=yes"
17517 else
17518   eval "$as_ac_File=no"
17519 fi
17520 fi
17521 eval ac_res=\$$as_ac_File
17522                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17523 $as_echo "$ac_res" >&6; }
17524 if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
17525
17526
17527 cat >>confdefs.h <<_ACEOF
17528 #define HAVE_DEV_PTMX 1
17529 _ACEOF
17530
17531                                 have_dev_ptmx=1
17532
17533
17534 fi
17535
17536         fi
17537 fi
17538
17539 if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
17540         as_ac_File=`$as_echo "ac_cv_file_"/dev/ptc"" | $as_tr_sh`
17541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptc\"" >&5
17542 $as_echo_n "checking for \"/dev/ptc\"... " >&6; }
17543 if eval \${$as_ac_File+:} false; then :
17544   $as_echo_n "(cached) " >&6
17545 else
17546   test "$cross_compiling" = yes &&
17547   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17548 if test -r ""/dev/ptc""; then
17549   eval "$as_ac_File=yes"
17550 else
17551   eval "$as_ac_File=no"
17552 fi
17553 fi
17554 eval ac_res=\$$as_ac_File
17555                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17556 $as_echo "$ac_res" >&6; }
17557 if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
17558
17559
17560 cat >>confdefs.h <<_ACEOF
17561 #define HAVE_DEV_PTS_AND_PTC 1
17562 _ACEOF
17563
17564                         have_dev_ptc=1
17565
17566
17567 fi
17568
17569 else
17570         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptc test" >&5
17571 $as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptc test" >&2;}
17572 fi
17573
17574 # Options from here on. Some of these are preset by platform above
17575
17576 # Check whether --with-mantype was given.
17577 if test "${with_mantype+set}" = set; then :
17578   withval=$with_mantype;
17579                 case "$withval" in
17580                 man|cat|doc)
17581                         MANTYPE=$withval
17582                         ;;
17583                 *)
17584                         as_fn_error $? "invalid man type: $withval" "$LINENO" 5
17585                         ;;
17586                 esac
17587
17588
17589 fi
17590
17591 if test -z "$MANTYPE"; then
17592         TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb"
17593         for ac_prog in nroff awf
17594 do
17595   # Extract the first word of "$ac_prog", so it can be a program name with args.
17596 set dummy $ac_prog; ac_word=$2
17597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17598 $as_echo_n "checking for $ac_word... " >&6; }
17599 if ${ac_cv_path_NROFF+:} false; then :
17600   $as_echo_n "(cached) " >&6
17601 else
17602   case $NROFF in
17603   [\\/]* | ?:[\\/]*)
17604   ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
17605   ;;
17606   *)
17607   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17608 for as_dir in $TestPath
17609 do
17610   IFS=$as_save_IFS
17611   test -z "$as_dir" && as_dir=.
17612     for ac_exec_ext in '' $ac_executable_extensions; do
17613   if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17614     ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
17615     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17616     break 2
17617   fi
17618 done
17619   done
17620 IFS=$as_save_IFS
17621
17622   ;;
17623 esac
17624 fi
17625 NROFF=$ac_cv_path_NROFF
17626 if test -n "$NROFF"; then
17627   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
17628 $as_echo "$NROFF" >&6; }
17629 else
17630   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17631 $as_echo "no" >&6; }
17632 fi
17633
17634
17635   test -n "$NROFF" && break
17636 done
17637 test -n "$NROFF" || NROFF="/bin/false"
17638
17639         if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
17640                 MANTYPE=doc
17641         elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
17642                 MANTYPE=man
17643         else
17644                 MANTYPE=cat
17645         fi
17646 fi
17647
17648 if test "$MANTYPE" = "doc"; then
17649         mansubdir=man;
17650 else
17651         mansubdir=$MANTYPE;
17652 fi
17653
17654
17655 # Check whether to enable MD5 passwords
17656 MD5_MSG="no"
17657
17658 # Check whether --with-md5-passwords was given.
17659 if test "${with_md5_passwords+set}" = set; then :
17660   withval=$with_md5_passwords;
17661                 if test "x$withval" != "xno" ; then
17662
17663 $as_echo "#define HAVE_MD5_PASSWORDS 1" >>confdefs.h
17664
17665                         MD5_MSG="yes"
17666                 fi
17667
17668
17669 fi
17670
17671
17672 # Whether to disable shadow password support
17673
17674 # Check whether --with-shadow was given.
17675 if test "${with_shadow+set}" = set; then :
17676   withval=$with_shadow;
17677                 if test "x$withval" = "xno" ; then
17678                         $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
17679
17680                         disable_shadow=yes
17681                 fi
17682
17683
17684 fi
17685
17686
17687 if test -z "$disable_shadow" ; then
17688         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the systems has expire shadow information" >&5
17689 $as_echo_n "checking if the systems has expire shadow information... " >&6; }
17690         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17691 /* end confdefs.h.  */
17692
17693 #include <sys/types.h>
17694 #include <shadow.h>
17695 struct spwd sp;
17696
17697 int
17698 main ()
17699 {
17700  sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0;
17701   ;
17702   return 0;
17703 }
17704 _ACEOF
17705 if ac_fn_c_try_compile "$LINENO"; then :
17706    sp_expire_available=yes
17707 fi
17708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17709
17710         if test "x$sp_expire_available" = "xyes" ; then
17711                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17712 $as_echo "yes" >&6; }
17713
17714 $as_echo "#define HAS_SHADOW_EXPIRE 1" >>confdefs.h
17715
17716         else
17717                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17718 $as_echo "no" >&6; }
17719         fi
17720 fi
17721
17722 # Use ip address instead of hostname in $DISPLAY
17723 if test ! -z "$IPADDR_IN_DISPLAY" ; then
17724         DISPLAY_HACK_MSG="yes"
17725
17726 $as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
17727
17728 else
17729         DISPLAY_HACK_MSG="no"
17730
17731 # Check whether --with-ipaddr-display was given.
17732 if test "${with_ipaddr_display+set}" = set; then :
17733   withval=$with_ipaddr_display;
17734                         if test "x$withval" != "xno" ; then
17735                                 $as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
17736
17737                                 DISPLAY_HACK_MSG="yes"
17738                         fi
17739
17740
17741 fi
17742
17743 fi
17744
17745 # check for /etc/default/login and use it if present.
17746 # Check whether --enable-etc-default-login was given.
17747 if test "${enable_etc_default_login+set}" = set; then :
17748   enableval=$enable_etc_default_login;  if test "x$enableval" = "xno"; then
17749                 { $as_echo "$as_me:${as_lineno-$LINENO}: /etc/default/login handling disabled" >&5
17750 $as_echo "$as_me: /etc/default/login handling disabled" >&6;}
17751                 etc_default_login=no
17752           else
17753                 etc_default_login=yes
17754           fi
17755 else
17756    if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
17757           then
17758                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking /etc/default/login" >&5
17759 $as_echo "$as_me: WARNING: cross compiling: not checking /etc/default/login" >&2;}
17760                 etc_default_login=no
17761           else
17762                 etc_default_login=yes
17763           fi
17764
17765 fi
17766
17767
17768 if test "x$etc_default_login" != "xno"; then
17769         as_ac_File=`$as_echo "ac_cv_file_"/etc/default/login"" | $as_tr_sh`
17770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/etc/default/login\"" >&5
17771 $as_echo_n "checking for \"/etc/default/login\"... " >&6; }
17772 if eval \${$as_ac_File+:} false; then :
17773   $as_echo_n "(cached) " >&6
17774 else
17775   test "$cross_compiling" = yes &&
17776   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
17777 if test -r ""/etc/default/login""; then
17778   eval "$as_ac_File=yes"
17779 else
17780   eval "$as_ac_File=no"
17781 fi
17782 fi
17783 eval ac_res=\$$as_ac_File
17784                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17785 $as_echo "$ac_res" >&6; }
17786 if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
17787    external_path_file=/etc/default/login
17788 fi
17789
17790         if test "x$external_path_file" = "x/etc/default/login"; then
17791
17792 $as_echo "#define HAVE_ETC_DEFAULT_LOGIN 1" >>confdefs.h
17793
17794         fi
17795 fi
17796
17797 if test $ac_cv_func_login_getcapbool = "yes" && \
17798         test $ac_cv_header_login_cap_h = "yes" ; then
17799         external_path_file=/etc/login.conf
17800 fi
17801
17802 # Whether to mess with the default path
17803 SERVER_PATH_MSG="(default)"
17804
17805 # Check whether --with-default-path was given.
17806 if test "${with_default_path+set}" = set; then :
17807   withval=$with_default_path;
17808                 if test "x$external_path_file" = "x/etc/login.conf" ; then
17809                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
17810 --with-default-path=PATH has no effect on this system.
17811 Edit /etc/login.conf instead." >&5
17812 $as_echo "$as_me: WARNING:
17813 --with-default-path=PATH has no effect on this system.
17814 Edit /etc/login.conf instead." >&2;}
17815                 elif test "x$withval" != "xno" ; then
17816                         if test ! -z "$external_path_file" ; then
17817                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
17818 --with-default-path=PATH will only be used if PATH is not defined in
17819 $external_path_file ." >&5
17820 $as_echo "$as_me: WARNING:
17821 --with-default-path=PATH will only be used if PATH is not defined in
17822 $external_path_file ." >&2;}
17823                         fi
17824                         user_path="$withval"
17825                         SERVER_PATH_MSG="$withval"
17826                 fi
17827
17828 else
17829    if test "x$external_path_file" = "x/etc/login.conf" ; then
17830                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Make sure the path to scp is in /etc/login.conf" >&5
17831 $as_echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;}
17832         else
17833                 if test ! -z "$external_path_file" ; then
17834                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
17835 If PATH is defined in $external_path_file, ensure the path to scp is included,
17836 otherwise scp will not work." >&5
17837 $as_echo "$as_me: WARNING:
17838 If PATH is defined in $external_path_file, ensure the path to scp is included,
17839 otherwise scp will not work." >&2;}
17840                 fi
17841                 if test "$cross_compiling" = yes; then :
17842    user_path="/usr/bin:/bin:/usr/sbin:/sbin"
17843
17844 else
17845   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17846 /* end confdefs.h.  */
17847
17848 /* find out what STDPATH is */
17849 #include <stdio.h>
17850 #ifdef HAVE_PATHS_H
17851 # include <paths.h>
17852 #endif
17853 #ifndef _PATH_STDPATH
17854 # ifdef _PATH_USERPATH  /* Irix */
17855 #  define _PATH_STDPATH _PATH_USERPATH
17856 # else
17857 #  define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
17858 # endif
17859 #endif
17860 #include <sys/types.h>
17861 #include <sys/stat.h>
17862 #include <fcntl.h>
17863 #define DATA "conftest.stdpath"
17864
17865 int
17866 main ()
17867 {
17868
17869         FILE *fd;
17870         int rc;
17871
17872         fd = fopen(DATA,"w");
17873         if(fd == NULL)
17874                 exit(1);
17875
17876         if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
17877                 exit(1);
17878
17879         exit(0);
17880
17881   ;
17882   return 0;
17883 }
17884 _ACEOF
17885 if ac_fn_c_try_run "$LINENO"; then :
17886    user_path=`cat conftest.stdpath`
17887 else
17888    user_path="/usr/bin:/bin:/usr/sbin:/sbin"
17889 fi
17890 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17891   conftest.$ac_objext conftest.beam conftest.$ac_ext
17892 fi
17893
17894 # make sure $bindir is in USER_PATH so scp will work
17895                 t_bindir="${bindir}"
17896                 while echo "${t_bindir}" | egrep '\$\{|NONE/' >/dev/null 2>&1; do
17897                         t_bindir=`eval echo ${t_bindir}`
17898                         case $t_bindir in
17899                                 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
17900                         esac
17901                         case $t_bindir in
17902                                 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
17903                         esac
17904                 done
17905                 echo $user_path | grep ":$t_bindir"  > /dev/null 2>&1
17906                 if test $? -ne 0  ; then
17907                         echo $user_path | grep "^$t_bindir"  > /dev/null 2>&1
17908                         if test $? -ne 0  ; then
17909                                 user_path=$user_path:$t_bindir
17910                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Adding $t_bindir to USER_PATH so scp will work" >&5
17911 $as_echo "Adding $t_bindir to USER_PATH so scp will work" >&6; }
17912                         fi
17913                 fi
17914         fi
17915
17916 fi
17917
17918 if test "x$external_path_file" != "x/etc/login.conf" ; then
17919
17920 cat >>confdefs.h <<_ACEOF
17921 #define USER_PATH "$user_path"
17922 _ACEOF
17923
17924
17925 fi
17926
17927 # Set superuser path separately to user path
17928
17929 # Check whether --with-superuser-path was given.
17930 if test "${with_superuser_path+set}" = set; then :
17931   withval=$with_superuser_path;
17932                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
17933                     test "x${withval}" != "xyes"; then
17934
17935 cat >>confdefs.h <<_ACEOF
17936 #define SUPERUSER_PATH "$withval"
17937 _ACEOF
17938
17939                         superuser_path=$withval
17940                 fi
17941
17942
17943 fi
17944
17945
17946
17947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
17948 $as_echo_n "checking if we need to convert IPv4 in IPv6-mapped addresses... " >&6; }
17949 IPV4_IN6_HACK_MSG="no"
17950
17951 # Check whether --with-4in6 was given.
17952 if test "${with_4in6+set}" = set; then :
17953   withval=$with_4in6;
17954                 if test "x$withval" != "xno" ; then
17955                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17956 $as_echo "yes" >&6; }
17957
17958 $as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
17959
17960                         IPV4_IN6_HACK_MSG="yes"
17961                 else
17962                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17963 $as_echo "no" >&6; }
17964                 fi
17965
17966 else
17967
17968                 if test "x$inet6_default_4in6" = "xyes"; then
17969                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
17970 $as_echo "yes (default)" >&6; }
17971                         $as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
17972
17973                         IPV4_IN6_HACK_MSG="yes"
17974                 else
17975                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5
17976 $as_echo "no (default)" >&6; }
17977                 fi
17978
17979
17980 fi
17981
17982
17983 # Whether to enable BSD auth support
17984 BSD_AUTH_MSG=no
17985
17986 # Check whether --with-bsd-auth was given.
17987 if test "${with_bsd_auth+set}" = set; then :
17988   withval=$with_bsd_auth;
17989                 if test "x$withval" != "xno" ; then
17990
17991 $as_echo "#define BSD_AUTH 1" >>confdefs.h
17992
17993                         BSD_AUTH_MSG=yes
17994                 fi
17995
17996
17997 fi
17998
17999
18000 # Where to place sshd.pid
18001 piddir=/var/run
18002 # make sure the directory exists
18003 if test ! -d $piddir ; then
18004         piddir=`eval echo ${sysconfdir}`
18005         case $piddir in
18006                 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
18007         esac
18008 fi
18009
18010
18011 # Check whether --with-pid-dir was given.
18012 if test "${with_pid_dir+set}" = set; then :
18013   withval=$with_pid_dir;
18014                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
18015                     test "x${withval}" != "xyes"; then
18016                         piddir=$withval
18017                         if test ! -d $piddir ; then
18018                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** no $piddir directory on this system **" >&5
18019 $as_echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;}
18020                         fi
18021                 fi
18022
18023
18024 fi
18025
18026
18027
18028 cat >>confdefs.h <<_ACEOF
18029 #define _PATH_SSH_PIDDIR "$piddir"
18030 _ACEOF
18031
18032
18033
18034 # Check whether --enable-lastlog was given.
18035 if test "${enable_lastlog+set}" = set; then :
18036   enableval=$enable_lastlog;
18037                 if test "x$enableval" = "xno" ; then
18038                         $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
18039
18040                 fi
18041
18042
18043 fi
18044
18045 # Check whether --enable-utmp was given.
18046 if test "${enable_utmp+set}" = set; then :
18047   enableval=$enable_utmp;
18048                 if test "x$enableval" = "xno" ; then
18049                         $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
18050
18051                 fi
18052
18053
18054 fi
18055
18056 # Check whether --enable-utmpx was given.
18057 if test "${enable_utmpx+set}" = set; then :
18058   enableval=$enable_utmpx;
18059                 if test "x$enableval" = "xno" ; then
18060
18061 $as_echo "#define DISABLE_UTMPX 1" >>confdefs.h
18062
18063                 fi
18064
18065
18066 fi
18067
18068 # Check whether --enable-wtmp was given.
18069 if test "${enable_wtmp+set}" = set; then :
18070   enableval=$enable_wtmp;
18071                 if test "x$enableval" = "xno" ; then
18072                         $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
18073
18074                 fi
18075
18076
18077 fi
18078
18079 # Check whether --enable-wtmpx was given.
18080 if test "${enable_wtmpx+set}" = set; then :
18081   enableval=$enable_wtmpx;
18082                 if test "x$enableval" = "xno" ; then
18083
18084 $as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
18085
18086                 fi
18087
18088
18089 fi
18090
18091 # Check whether --enable-libutil was given.
18092 if test "${enable_libutil+set}" = set; then :
18093   enableval=$enable_libutil;
18094                 if test "x$enableval" = "xno" ; then
18095                         $as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
18096
18097                 fi
18098
18099
18100 fi
18101
18102 # Check whether --enable-pututline was given.
18103 if test "${enable_pututline+set}" = set; then :
18104   enableval=$enable_pututline;
18105                 if test "x$enableval" = "xno" ; then
18106
18107 $as_echo "#define DISABLE_PUTUTLINE 1" >>confdefs.h
18108
18109                 fi
18110
18111
18112 fi
18113
18114 # Check whether --enable-pututxline was given.
18115 if test "${enable_pututxline+set}" = set; then :
18116   enableval=$enable_pututxline;
18117                 if test "x$enableval" = "xno" ; then
18118
18119 $as_echo "#define DISABLE_PUTUTXLINE 1" >>confdefs.h
18120
18121                 fi
18122
18123
18124 fi
18125
18126
18127 # Check whether --with-lastlog was given.
18128 if test "${with_lastlog+set}" = set; then :
18129   withval=$with_lastlog;
18130                 if test "x$withval" = "xno" ; then
18131                         $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
18132
18133                 elif test -n "$withval"  &&  test "x${withval}" != "xyes"; then
18134                         conf_lastlog_location=$withval
18135                 fi
18136
18137
18138 fi
18139
18140
18141
18142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines LASTLOG_FILE" >&5
18143 $as_echo_n "checking if your system defines LASTLOG_FILE... " >&6; }
18144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18145 /* end confdefs.h.  */
18146
18147 #include <sys/types.h>
18148 #include <utmp.h>
18149 #ifdef HAVE_LASTLOG_H
18150 #  include <lastlog.h>
18151 #endif
18152 #ifdef HAVE_PATHS_H
18153 #  include <paths.h>
18154 #endif
18155 #ifdef HAVE_LOGIN_H
18156 # include <login.h>
18157 #endif
18158
18159 int
18160 main ()
18161 {
18162  char *lastlog = LASTLOG_FILE;
18163   ;
18164   return 0;
18165 }
18166 _ACEOF
18167 if ac_fn_c_try_compile "$LINENO"; then :
18168    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18169 $as_echo "yes" >&6; }
18170 else
18171
18172                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18173 $as_echo "no" >&6; }
18174                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines _PATH_LASTLOG" >&5
18175 $as_echo_n "checking if your system defines _PATH_LASTLOG... " >&6; }
18176                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18177 /* end confdefs.h.  */
18178
18179 #include <sys/types.h>
18180 #include <utmp.h>
18181 #ifdef HAVE_LASTLOG_H
18182 #  include <lastlog.h>
18183 #endif
18184 #ifdef HAVE_PATHS_H
18185 #  include <paths.h>
18186 #endif
18187
18188 int
18189 main ()
18190 {
18191  char *lastlog = _PATH_LASTLOG;
18192   ;
18193   return 0;
18194 }
18195 _ACEOF
18196 if ac_fn_c_try_compile "$LINENO"; then :
18197    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18198 $as_echo "yes" >&6; }
18199 else
18200
18201                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18202 $as_echo "no" >&6; }
18203                         system_lastlog_path=no
18204
18205 fi
18206 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18207
18208 fi
18209 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18210
18211 if test -z "$conf_lastlog_location"; then
18212         if test x"$system_lastlog_path" = x"no" ; then
18213                 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
18214                                 if (test -d "$f" || test -f "$f") ; then
18215                                         conf_lastlog_location=$f
18216                                 fi
18217                 done
18218                 if test -z "$conf_lastlog_location"; then
18219                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** Cannot find lastlog **" >&5
18220 $as_echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;}
18221                                         fi
18222         fi
18223 fi
18224
18225 if test -n "$conf_lastlog_location"; then
18226
18227 cat >>confdefs.h <<_ACEOF
18228 #define CONF_LASTLOG_FILE "$conf_lastlog_location"
18229 _ACEOF
18230
18231 fi
18232
18233 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines UTMP_FILE" >&5
18234 $as_echo_n "checking if your system defines UTMP_FILE... " >&6; }
18235 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18236 /* end confdefs.h.  */
18237
18238 #include <sys/types.h>
18239 #include <utmp.h>
18240 #ifdef HAVE_PATHS_H
18241 #  include <paths.h>
18242 #endif
18243
18244 int
18245 main ()
18246 {
18247  char *utmp = UTMP_FILE;
18248   ;
18249   return 0;
18250 }
18251 _ACEOF
18252 if ac_fn_c_try_compile "$LINENO"; then :
18253    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18254 $as_echo "yes" >&6; }
18255 else
18256    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18257 $as_echo "no" >&6; }
18258           system_utmp_path=no
18259
18260 fi
18261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18262 if test -z "$conf_utmp_location"; then
18263         if test x"$system_utmp_path" = x"no" ; then
18264                 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
18265                         if test -f $f ; then
18266                                 conf_utmp_location=$f
18267                         fi
18268                 done
18269                 if test -z "$conf_utmp_location"; then
18270                         $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
18271
18272                 fi
18273         fi
18274 fi
18275 if test -n "$conf_utmp_location"; then
18276
18277 cat >>confdefs.h <<_ACEOF
18278 #define CONF_UTMP_FILE "$conf_utmp_location"
18279 _ACEOF
18280
18281 fi
18282
18283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMP_FILE" >&5
18284 $as_echo_n "checking if your system defines WTMP_FILE... " >&6; }
18285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18286 /* end confdefs.h.  */
18287
18288 #include <sys/types.h>
18289 #include <utmp.h>
18290 #ifdef HAVE_PATHS_H
18291 #  include <paths.h>
18292 #endif
18293
18294 int
18295 main ()
18296 {
18297  char *wtmp = WTMP_FILE;
18298   ;
18299   return 0;
18300 }
18301 _ACEOF
18302 if ac_fn_c_try_compile "$LINENO"; then :
18303    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18304 $as_echo "yes" >&6; }
18305 else
18306    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18307 $as_echo "no" >&6; }
18308           system_wtmp_path=no
18309
18310 fi
18311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18312 if test -z "$conf_wtmp_location"; then
18313         if test x"$system_wtmp_path" = x"no" ; then
18314                 for f in /usr/adm/wtmp /var/log/wtmp; do
18315                         if test -f $f ; then
18316                                 conf_wtmp_location=$f
18317                         fi
18318                 done
18319                 if test -z "$conf_wtmp_location"; then
18320                         $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
18321
18322                 fi
18323         fi
18324 fi
18325 if test -n "$conf_wtmp_location"; then
18326
18327 cat >>confdefs.h <<_ACEOF
18328 #define CONF_WTMP_FILE "$conf_wtmp_location"
18329 _ACEOF
18330
18331 fi
18332
18333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMPX_FILE" >&5
18334 $as_echo_n "checking if your system defines WTMPX_FILE... " >&6; }
18335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18336 /* end confdefs.h.  */
18337
18338 #include <sys/types.h>
18339 #include <utmp.h>
18340 #ifdef HAVE_UTMPX_H
18341 #include <utmpx.h>
18342 #endif
18343 #ifdef HAVE_PATHS_H
18344 #  include <paths.h>
18345 #endif
18346
18347 int
18348 main ()
18349 {
18350  char *wtmpx = WTMPX_FILE;
18351   ;
18352   return 0;
18353 }
18354 _ACEOF
18355 if ac_fn_c_try_compile "$LINENO"; then :
18356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18357 $as_echo "yes" >&6; }
18358 else
18359    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18360 $as_echo "no" >&6; }
18361           system_wtmpx_path=no
18362
18363 fi
18364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18365 if test -z "$conf_wtmpx_location"; then
18366         if test x"$system_wtmpx_path" = x"no" ; then
18367                 $as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
18368
18369         fi
18370 else
18371
18372 cat >>confdefs.h <<_ACEOF
18373 #define CONF_WTMPX_FILE "$conf_wtmpx_location"
18374 _ACEOF
18375
18376 fi
18377
18378
18379 if test ! -z "$blibpath" ; then
18380         LDFLAGS="$LDFLAGS $blibflags$blibpath"
18381         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&5
18382 $as_echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;}
18383 fi
18384
18385 ac_fn_c_check_member "$LINENO" "struct lastlog" "ll_line" "ac_cv_member_struct_lastlog_ll_line" "
18386 #ifdef HAVE_SYS_TYPES_H
18387 #include <sys/types.h>
18388 #endif
18389 #ifdef HAVE_UTMP_H
18390 #include <utmp.h>
18391 #endif
18392 #ifdef HAVE_UTMPX_H
18393 #include <utmpx.h>
18394 #endif
18395 #ifdef HAVE_LASTLOG_H
18396 #include <lastlog.h>
18397 #endif
18398
18399 "
18400 if test "x$ac_cv_member_struct_lastlog_ll_line" = xyes; then :
18401
18402 else
18403
18404     if test x$SKIP_DISABLE_LASTLOG_DEFINE != "xyes" ; then
18405         $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
18406
18407     fi
18408
18409 fi
18410
18411
18412 ac_fn_c_check_member "$LINENO" "struct utmp" "ut_line" "ac_cv_member_struct_utmp_ut_line" "
18413 #ifdef HAVE_SYS_TYPES_H
18414 #include <sys/types.h>
18415 #endif
18416 #ifdef HAVE_UTMP_H
18417 #include <utmp.h>
18418 #endif
18419 #ifdef HAVE_UTMPX_H
18420 #include <utmpx.h>
18421 #endif
18422 #ifdef HAVE_LASTLOG_H
18423 #include <lastlog.h>
18424 #endif
18425
18426 "
18427 if test "x$ac_cv_member_struct_utmp_ut_line" = xyes; then :
18428
18429 else
18430
18431         $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
18432
18433         $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
18434
18435
18436 fi
18437
18438
18439 CFLAGS="$CFLAGS $werror_flags"
18440
18441 if test "x$ac_cv_func_getaddrinfo" != "xyes" ; then
18442         TEST_SSH_IPV6=no
18443 else
18444         TEST_SSH_IPV6=yes
18445 fi
18446 ac_fn_c_check_decl "$LINENO" "BROKEN_GETADDRINFO" "ac_cv_have_decl_BROKEN_GETADDRINFO" "$ac_includes_default"
18447 if test "x$ac_cv_have_decl_BROKEN_GETADDRINFO" = xyes; then :
18448   TEST_SSH_IPV6=no
18449 fi
18450
18451 TEST_SSH_IPV6=$TEST_SSH_IPV6
18452
18453 TEST_MALLOC_OPTIONS=$TEST_MALLOC_OPTIONS
18454
18455 UNSUPPORTED_ALGORITHMS=$unsupported_algorithms
18456
18457
18458
18459 ac_config_files="$ac_config_files Makefile buildpkg.sh opensshd.init openssh.xml openbsd-compat/Makefile openbsd-compat/regress/Makefile survey.sh"
18460
18461 cat >confcache <<\_ACEOF
18462 # This file is a shell script that caches the results of configure
18463 # tests run on this system so they can be shared between configure
18464 # scripts and configure runs, see configure's option --config-cache.
18465 # It is not useful on other systems.  If it contains results you don't
18466 # want to keep, you may remove or edit it.
18467 #
18468 # config.status only pays attention to the cache file if you give it
18469 # the --recheck option to rerun configure.
18470 #
18471 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18472 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18473 # following values.
18474
18475 _ACEOF
18476
18477 # The following way of writing the cache mishandles newlines in values,
18478 # but we know of no workaround that is simple, portable, and efficient.
18479 # So, we kill variables containing newlines.
18480 # Ultrix sh set writes to stderr and can't be redirected directly,
18481 # and sets the high bit in the cache file unless we assign to the vars.
18482 (
18483   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18484     eval ac_val=\$$ac_var
18485     case $ac_val in #(
18486     *${as_nl}*)
18487       case $ac_var in #(
18488       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
18489 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
18490       esac
18491       case $ac_var in #(
18492       _ | IFS | as_nl) ;; #(
18493       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
18494       *) { eval $ac_var=; unset $ac_var;} ;;
18495       esac ;;
18496     esac
18497   done
18498
18499   (set) 2>&1 |
18500     case $as_nl`(ac_space=' '; set) 2>&1` in #(
18501     *${as_nl}ac_space=\ *)
18502       # `set' does not quote correctly, so add quotes: double-quote
18503       # substitution turns \\\\ into \\, and sed turns \\ into \.
18504       sed -n \
18505         "s/'/'\\\\''/g;
18506           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
18507       ;; #(
18508     *)
18509       # `set' quotes correctly as required by POSIX, so do not add quotes.
18510       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
18511       ;;
18512     esac |
18513     sort
18514 ) |
18515   sed '
18516      /^ac_cv_env_/b end
18517      t clear
18518      :clear
18519      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
18520      t end
18521      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
18522      :end' >>confcache
18523 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
18524   if test -w "$cache_file"; then
18525     if test "x$cache_file" != "x/dev/null"; then
18526       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
18527 $as_echo "$as_me: updating cache $cache_file" >&6;}
18528       if test ! -f "$cache_file" || test -h "$cache_file"; then
18529         cat confcache >"$cache_file"
18530       else
18531         case $cache_file in #(
18532         */* | ?:*)
18533           mv -f confcache "$cache_file"$$ &&
18534           mv -f "$cache_file"$$ "$cache_file" ;; #(
18535         *)
18536           mv -f confcache "$cache_file" ;;
18537         esac
18538       fi
18539     fi
18540   else
18541     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
18542 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
18543   fi
18544 fi
18545 rm -f confcache
18546
18547 test "x$prefix" = xNONE && prefix=$ac_default_prefix
18548 # Let make expand exec_prefix.
18549 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
18550
18551 DEFS=-DHAVE_CONFIG_H
18552
18553 ac_libobjs=
18554 ac_ltlibobjs=
18555 U=
18556 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
18557   # 1. Remove the extension, and $U if already installed.
18558   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
18559   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
18560   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
18561   #    will be set to the directory where LIBOBJS objects are built.
18562   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
18563   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
18564 done
18565 LIBOBJS=$ac_libobjs
18566
18567 LTLIBOBJS=$ac_ltlibobjs
18568
18569
18570
18571
18572 : "${CONFIG_STATUS=./config.status}"
18573 ac_write_fail=0
18574 ac_clean_files_save=$ac_clean_files
18575 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
18576 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
18577 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
18578 as_write_fail=0
18579 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
18580 #! $SHELL
18581 # Generated by $as_me.
18582 # Run this file to recreate the current configuration.
18583 # Compiler output produced by configure, useful for debugging
18584 # configure, is in config.log if it exists.
18585
18586 debug=false
18587 ac_cs_recheck=false
18588 ac_cs_silent=false
18589
18590 SHELL=\${CONFIG_SHELL-$SHELL}
18591 export SHELL
18592 _ASEOF
18593 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
18594 ## -------------------- ##
18595 ## M4sh Initialization. ##
18596 ## -------------------- ##
18597
18598 # Be more Bourne compatible
18599 DUALCASE=1; export DUALCASE # for MKS sh
18600 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
18601   emulate sh
18602   NULLCMD=:
18603   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
18604   # is contrary to our usage.  Disable this feature.
18605   alias -g '${1+"$@"}'='"$@"'
18606   setopt NO_GLOB_SUBST
18607 else
18608   case `(set -o) 2>/dev/null` in #(
18609   *posix*) :
18610     set -o posix ;; #(
18611   *) :
18612      ;;
18613 esac
18614 fi
18615
18616
18617 as_nl='
18618 '
18619 export as_nl
18620 # Printing a long string crashes Solaris 7 /usr/bin/printf.
18621 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
18622 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
18623 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
18624 # Prefer a ksh shell builtin over an external printf program on Solaris,
18625 # but without wasting forks for bash or zsh.
18626 if test -z "$BASH_VERSION$ZSH_VERSION" \
18627     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
18628   as_echo='print -r --'
18629   as_echo_n='print -rn --'
18630 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
18631   as_echo='printf %s\n'
18632   as_echo_n='printf %s'
18633 else
18634   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
18635     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
18636     as_echo_n='/usr/ucb/echo -n'
18637   else
18638     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
18639     as_echo_n_body='eval
18640       arg=$1;
18641       case $arg in #(
18642       *"$as_nl"*)
18643         expr "X$arg" : "X\\(.*\\)$as_nl";
18644         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
18645       esac;
18646       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
18647     '
18648     export as_echo_n_body
18649     as_echo_n='sh -c $as_echo_n_body as_echo'
18650   fi
18651   export as_echo_body
18652   as_echo='sh -c $as_echo_body as_echo'
18653 fi
18654
18655 # The user is always right.
18656 if test "${PATH_SEPARATOR+set}" != set; then
18657   PATH_SEPARATOR=:
18658   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
18659     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
18660       PATH_SEPARATOR=';'
18661   }
18662 fi
18663
18664
18665 # IFS
18666 # We need space, tab and new line, in precisely that order.  Quoting is
18667 # there to prevent editors from complaining about space-tab.
18668 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
18669 # splitting by setting IFS to empty value.)
18670 IFS=" ""        $as_nl"
18671
18672 # Find who we are.  Look in the path if we contain no directory separator.
18673 as_myself=
18674 case $0 in #((
18675   *[\\/]* ) as_myself=$0 ;;
18676   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18677 for as_dir in $PATH
18678 do
18679   IFS=$as_save_IFS
18680   test -z "$as_dir" && as_dir=.
18681     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
18682   done
18683 IFS=$as_save_IFS
18684
18685      ;;
18686 esac
18687 # We did not find ourselves, most probably we were run as `sh COMMAND'
18688 # in which case we are not to be found in the path.
18689 if test "x$as_myself" = x; then
18690   as_myself=$0
18691 fi
18692 if test ! -f "$as_myself"; then
18693   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
18694   exit 1
18695 fi
18696
18697 # Unset variables that we do not need and which cause bugs (e.g. in
18698 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
18699 # suppresses any "Segmentation fault" message there.  '((' could
18700 # trigger a bug in pdksh 5.2.14.
18701 for as_var in BASH_ENV ENV MAIL MAILPATH
18702 do eval test x\${$as_var+set} = xset \
18703   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
18704 done
18705 PS1='$ '
18706 PS2='> '
18707 PS4='+ '
18708
18709 # NLS nuisances.
18710 LC_ALL=C
18711 export LC_ALL
18712 LANGUAGE=C
18713 export LANGUAGE
18714
18715 # CDPATH.
18716 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
18717
18718
18719 # as_fn_error STATUS ERROR [LINENO LOG_FD]
18720 # ----------------------------------------
18721 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
18722 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
18723 # script with STATUS, using 1 if that was 0.
18724 as_fn_error ()
18725 {
18726   as_status=$1; test $as_status -eq 0 && as_status=1
18727   if test "$4"; then
18728     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
18729     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
18730   fi
18731   $as_echo "$as_me: error: $2" >&2
18732   as_fn_exit $as_status
18733 } # as_fn_error
18734
18735
18736 # as_fn_set_status STATUS
18737 # -----------------------
18738 # Set $? to STATUS, without forking.
18739 as_fn_set_status ()
18740 {
18741   return $1
18742 } # as_fn_set_status
18743
18744 # as_fn_exit STATUS
18745 # -----------------
18746 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
18747 as_fn_exit ()
18748 {
18749   set +e
18750   as_fn_set_status $1
18751   exit $1
18752 } # as_fn_exit
18753
18754 # as_fn_unset VAR
18755 # ---------------
18756 # Portably unset VAR.
18757 as_fn_unset ()
18758 {
18759   { eval $1=; unset $1;}
18760 }
18761 as_unset=as_fn_unset
18762 # as_fn_append VAR VALUE
18763 # ----------------------
18764 # Append the text in VALUE to the end of the definition contained in VAR. Take
18765 # advantage of any shell optimizations that allow amortized linear growth over
18766 # repeated appends, instead of the typical quadratic growth present in naive
18767 # implementations.
18768 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
18769   eval 'as_fn_append ()
18770   {
18771     eval $1+=\$2
18772   }'
18773 else
18774   as_fn_append ()
18775   {
18776     eval $1=\$$1\$2
18777   }
18778 fi # as_fn_append
18779
18780 # as_fn_arith ARG...
18781 # ------------------
18782 # Perform arithmetic evaluation on the ARGs, and store the result in the
18783 # global $as_val. Take advantage of shells that can avoid forks. The arguments
18784 # must be portable across $(()) and expr.
18785 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
18786   eval 'as_fn_arith ()
18787   {
18788     as_val=$(( $* ))
18789   }'
18790 else
18791   as_fn_arith ()
18792   {
18793     as_val=`expr "$@" || test $? -eq 1`
18794   }
18795 fi # as_fn_arith
18796
18797
18798 if expr a : '\(a\)' >/dev/null 2>&1 &&
18799    test "X`expr 00001 : '.*\(...\)'`" = X001; then
18800   as_expr=expr
18801 else
18802   as_expr=false
18803 fi
18804
18805 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
18806   as_basename=basename
18807 else
18808   as_basename=false
18809 fi
18810
18811 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
18812   as_dirname=dirname
18813 else
18814   as_dirname=false
18815 fi
18816
18817 as_me=`$as_basename -- "$0" ||
18818 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
18819          X"$0" : 'X\(//\)$' \| \
18820          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
18821 $as_echo X/"$0" |
18822     sed '/^.*\/\([^/][^/]*\)\/*$/{
18823             s//\1/
18824             q
18825           }
18826           /^X\/\(\/\/\)$/{
18827             s//\1/
18828             q
18829           }
18830           /^X\/\(\/\).*/{
18831             s//\1/
18832             q
18833           }
18834           s/.*/./; q'`
18835
18836 # Avoid depending upon Character Ranges.
18837 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
18838 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
18839 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
18840 as_cr_digits='0123456789'
18841 as_cr_alnum=$as_cr_Letters$as_cr_digits
18842
18843 ECHO_C= ECHO_N= ECHO_T=
18844 case `echo -n x` in #(((((
18845 -n*)
18846   case `echo 'xy\c'` in
18847   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
18848   xy)  ECHO_C='\c';;
18849   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
18850        ECHO_T=' ';;
18851   esac;;
18852 *)
18853   ECHO_N='-n';;
18854 esac
18855
18856 rm -f conf$$ conf$$.exe conf$$.file
18857 if test -d conf$$.dir; then
18858   rm -f conf$$.dir/conf$$.file
18859 else
18860   rm -f conf$$.dir
18861   mkdir conf$$.dir 2>/dev/null
18862 fi
18863 if (echo >conf$$.file) 2>/dev/null; then
18864   if ln -s conf$$.file conf$$ 2>/dev/null; then
18865     as_ln_s='ln -s'
18866     # ... but there are two gotchas:
18867     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
18868     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
18869     # In both cases, we have to default to `cp -pR'.
18870     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
18871       as_ln_s='cp -pR'
18872   elif ln conf$$.file conf$$ 2>/dev/null; then
18873     as_ln_s=ln
18874   else
18875     as_ln_s='cp -pR'
18876   fi
18877 else
18878   as_ln_s='cp -pR'
18879 fi
18880 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
18881 rmdir conf$$.dir 2>/dev/null
18882
18883
18884 # as_fn_mkdir_p
18885 # -------------
18886 # Create "$as_dir" as a directory, including parents if necessary.
18887 as_fn_mkdir_p ()
18888 {
18889
18890   case $as_dir in #(
18891   -*) as_dir=./$as_dir;;
18892   esac
18893   test -d "$as_dir" || eval $as_mkdir_p || {
18894     as_dirs=
18895     while :; do
18896       case $as_dir in #(
18897       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
18898       *) as_qdir=$as_dir;;
18899       esac
18900       as_dirs="'$as_qdir' $as_dirs"
18901       as_dir=`$as_dirname -- "$as_dir" ||
18902 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18903          X"$as_dir" : 'X\(//\)[^/]' \| \
18904          X"$as_dir" : 'X\(//\)$' \| \
18905          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
18906 $as_echo X"$as_dir" |
18907     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18908             s//\1/
18909             q
18910           }
18911           /^X\(\/\/\)[^/].*/{
18912             s//\1/
18913             q
18914           }
18915           /^X\(\/\/\)$/{
18916             s//\1/
18917             q
18918           }
18919           /^X\(\/\).*/{
18920             s//\1/
18921             q
18922           }
18923           s/.*/./; q'`
18924       test -d "$as_dir" && break
18925     done
18926     test -z "$as_dirs" || eval "mkdir $as_dirs"
18927   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
18928
18929
18930 } # as_fn_mkdir_p
18931 if mkdir -p . 2>/dev/null; then
18932   as_mkdir_p='mkdir -p "$as_dir"'
18933 else
18934   test -d ./-p && rmdir ./-p
18935   as_mkdir_p=false
18936 fi
18937
18938
18939 # as_fn_executable_p FILE
18940 # -----------------------
18941 # Test if FILE is an executable regular file.
18942 as_fn_executable_p ()
18943 {
18944   test -f "$1" && test -x "$1"
18945 } # as_fn_executable_p
18946 as_test_x='test -x'
18947 as_executable_p=as_fn_executable_p
18948
18949 # Sed expression to map a string onto a valid CPP name.
18950 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18951
18952 # Sed expression to map a string onto a valid variable name.
18953 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18954
18955
18956 exec 6>&1
18957 ## ----------------------------------- ##
18958 ## Main body of $CONFIG_STATUS script. ##
18959 ## ----------------------------------- ##
18960 _ASEOF
18961 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18962
18963 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18964 # Save the log message, to keep $0 and so on meaningful, and to
18965 # report actual input values of CONFIG_FILES etc. instead of their
18966 # values after options handling.
18967 ac_log="
18968 This file was extended by OpenSSH $as_me Portable, which was
18969 generated by GNU Autoconf 2.69.  Invocation command line was
18970
18971   CONFIG_FILES    = $CONFIG_FILES
18972   CONFIG_HEADERS  = $CONFIG_HEADERS
18973   CONFIG_LINKS    = $CONFIG_LINKS
18974   CONFIG_COMMANDS = $CONFIG_COMMANDS
18975   $ $0 $@
18976
18977 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18978 "
18979
18980 _ACEOF
18981
18982 case $ac_config_files in *"
18983 "*) set x $ac_config_files; shift; ac_config_files=$*;;
18984 esac
18985
18986 case $ac_config_headers in *"
18987 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18988 esac
18989
18990
18991 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18992 # Files that config.status was made for.
18993 config_files="$ac_config_files"
18994 config_headers="$ac_config_headers"
18995
18996 _ACEOF
18997
18998 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18999 ac_cs_usage="\
19000 \`$as_me' instantiates files and other configuration actions
19001 from templates according to the current configuration.  Unless the files
19002 and actions are specified as TAGs, all are instantiated by default.
19003
19004 Usage: $0 [OPTION]... [TAG]...
19005
19006   -h, --help       print this help, then exit
19007   -V, --version    print version number and configuration settings, then exit
19008       --config     print configuration, then exit
19009   -q, --quiet, --silent
19010                    do not print progress messages
19011   -d, --debug      don't remove temporary files
19012       --recheck    update $as_me by reconfiguring in the same conditions
19013       --file=FILE[:TEMPLATE]
19014                    instantiate the configuration file FILE
19015       --header=FILE[:TEMPLATE]
19016                    instantiate the configuration header FILE
19017
19018 Configuration files:
19019 $config_files
19020
19021 Configuration headers:
19022 $config_headers
19023
19024 Report bugs to <openssh-unix-dev@mindrot.org>."
19025
19026 _ACEOF
19027 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19028 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19029 ac_cs_version="\\
19030 OpenSSH config.status Portable
19031 configured by $0, generated by GNU Autoconf 2.69,
19032   with options \\"\$ac_cs_config\\"
19033
19034 Copyright (C) 2012 Free Software Foundation, Inc.
19035 This config.status script is free software; the Free Software Foundation
19036 gives unlimited permission to copy, distribute and modify it."
19037
19038 ac_pwd='$ac_pwd'
19039 srcdir='$srcdir'
19040 INSTALL='$INSTALL'
19041 AWK='$AWK'
19042 test -n "\$AWK" || AWK=awk
19043 _ACEOF
19044
19045 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19046 # The default lists apply if the user does not specify any file.
19047 ac_need_defaults=:
19048 while test $# != 0
19049 do
19050   case $1 in
19051   --*=?*)
19052     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19053     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19054     ac_shift=:
19055     ;;
19056   --*=)
19057     ac_option=`expr "X$1" : 'X\([^=]*\)='`
19058     ac_optarg=
19059     ac_shift=:
19060     ;;
19061   *)
19062     ac_option=$1
19063     ac_optarg=$2
19064     ac_shift=shift
19065     ;;
19066   esac
19067
19068   case $ac_option in
19069   # Handling of the options.
19070   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19071     ac_cs_recheck=: ;;
19072   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19073     $as_echo "$ac_cs_version"; exit ;;
19074   --config | --confi | --conf | --con | --co | --c )
19075     $as_echo "$ac_cs_config"; exit ;;
19076   --debug | --debu | --deb | --de | --d | -d )
19077     debug=: ;;
19078   --file | --fil | --fi | --f )
19079     $ac_shift
19080     case $ac_optarg in
19081     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19082     '') as_fn_error $? "missing file argument" ;;
19083     esac
19084     as_fn_append CONFIG_FILES " '$ac_optarg'"
19085     ac_need_defaults=false;;
19086   --header | --heade | --head | --hea )
19087     $ac_shift
19088     case $ac_optarg in
19089     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19090     esac
19091     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19092     ac_need_defaults=false;;
19093   --he | --h)
19094     # Conflict between --help and --header
19095     as_fn_error $? "ambiguous option: \`$1'
19096 Try \`$0 --help' for more information.";;
19097   --help | --hel | -h )
19098     $as_echo "$ac_cs_usage"; exit ;;
19099   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19100   | -silent | --silent | --silen | --sile | --sil | --si | --s)
19101     ac_cs_silent=: ;;
19102
19103   # This is an error.
19104   -*) as_fn_error $? "unrecognized option: \`$1'
19105 Try \`$0 --help' for more information." ;;
19106
19107   *) as_fn_append ac_config_targets " $1"
19108      ac_need_defaults=false ;;
19109
19110   esac
19111   shift
19112 done
19113
19114 ac_configure_extra_args=
19115
19116 if $ac_cs_silent; then
19117   exec 6>/dev/null
19118   ac_configure_extra_args="$ac_configure_extra_args --silent"
19119 fi
19120
19121 _ACEOF
19122 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19123 if \$ac_cs_recheck; then
19124   set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19125   shift
19126   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19127   CONFIG_SHELL='$SHELL'
19128   export CONFIG_SHELL
19129   exec "\$@"
19130 fi
19131
19132 _ACEOF
19133 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19134 exec 5>>config.log
19135 {
19136   echo
19137   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19138 ## Running $as_me. ##
19139 _ASBOX
19140   $as_echo "$ac_log"
19141 } >&5
19142
19143 _ACEOF
19144 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19145 _ACEOF
19146
19147 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19148
19149 # Handling of arguments.
19150 for ac_config_target in $ac_config_targets
19151 do
19152   case $ac_config_target in
19153     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
19154     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19155     "buildpkg.sh") CONFIG_FILES="$CONFIG_FILES buildpkg.sh" ;;
19156     "opensshd.init") CONFIG_FILES="$CONFIG_FILES opensshd.init" ;;
19157     "openssh.xml") CONFIG_FILES="$CONFIG_FILES openssh.xml" ;;
19158     "openbsd-compat/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;;
19159     "openbsd-compat/regress/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/regress/Makefile" ;;
19160     "survey.sh") CONFIG_FILES="$CONFIG_FILES survey.sh" ;;
19161
19162   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19163   esac
19164 done
19165
19166
19167 # If the user did not use the arguments to specify the items to instantiate,
19168 # then the envvar interface is used.  Set only those that are not.
19169 # We use the long form for the default assignment because of an extremely
19170 # bizarre bug on SunOS 4.1.3.
19171 if $ac_need_defaults; then
19172   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19173   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19174 fi
19175
19176 # Have a temporary directory for convenience.  Make it in the build tree
19177 # simply because there is no reason against having it here, and in addition,
19178 # creating and moving files from /tmp can sometimes cause problems.
19179 # Hook for its removal unless debugging.
19180 # Note that there is a small window in which the directory will not be cleaned:
19181 # after its creation but before its name has been assigned to `$tmp'.
19182 $debug ||
19183 {
19184   tmp= ac_tmp=
19185   trap 'exit_status=$?
19186   : "${ac_tmp:=$tmp}"
19187   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19188 ' 0
19189   trap 'as_fn_exit 1' 1 2 13 15
19190 }
19191 # Create a (secure) tmp directory for tmp files.
19192
19193 {
19194   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19195   test -d "$tmp"
19196 }  ||
19197 {
19198   tmp=./conf$$-$RANDOM
19199   (umask 077 && mkdir "$tmp")
19200 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19201 ac_tmp=$tmp
19202
19203 # Set up the scripts for CONFIG_FILES section.
19204 # No need to generate them if there are no CONFIG_FILES.
19205 # This happens for instance with `./config.status config.h'.
19206 if test -n "$CONFIG_FILES"; then
19207
19208
19209 ac_cr=`echo X | tr X '\015'`
19210 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19211 # But we know of no other shell where ac_cr would be empty at this
19212 # point, so we can use a bashism as a fallback.
19213 if test "x$ac_cr" = x; then
19214   eval ac_cr=\$\'\\r\'
19215 fi
19216 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19217 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19218   ac_cs_awk_cr='\\r'
19219 else
19220   ac_cs_awk_cr=$ac_cr
19221 fi
19222
19223 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19224 _ACEOF
19225
19226
19227 {
19228   echo "cat >conf$$subs.awk <<_ACEOF" &&
19229   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19230   echo "_ACEOF"
19231 } >conf$$subs.sh ||
19232   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19233 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19234 ac_delim='%!_!# '
19235 for ac_last_try in false false false false false :; do
19236   . ./conf$$subs.sh ||
19237     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19238
19239   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19240   if test $ac_delim_n = $ac_delim_num; then
19241     break
19242   elif $ac_last_try; then
19243     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19244   else
19245     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19246   fi
19247 done
19248 rm -f conf$$subs.sh
19249
19250 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19251 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19252 _ACEOF
19253 sed -n '
19254 h
19255 s/^/S["/; s/!.*/"]=/
19256 p
19257 g
19258 s/^[^!]*!//
19259 :repl
19260 t repl
19261 s/'"$ac_delim"'$//
19262 t delim
19263 :nl
19264 h
19265 s/\(.\{148\}\)..*/\1/
19266 t more1
19267 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19268 p
19269 n
19270 b repl
19271 :more1
19272 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19273 p
19274 g
19275 s/.\{148\}//
19276 t nl
19277 :delim
19278 h
19279 s/\(.\{148\}\)..*/\1/
19280 t more2
19281 s/["\\]/\\&/g; s/^/"/; s/$/"/
19282 p
19283 b
19284 :more2
19285 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19286 p
19287 g
19288 s/.\{148\}//
19289 t delim
19290 ' <conf$$subs.awk | sed '
19291 /^[^""]/{
19292   N
19293   s/\n//
19294 }
19295 ' >>$CONFIG_STATUS || ac_write_fail=1
19296 rm -f conf$$subs.awk
19297 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19298 _ACAWK
19299 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19300   for (key in S) S_is_set[key] = 1
19301   FS = "\a"
19302
19303 }
19304 {
19305   line = $ 0
19306   nfields = split(line, field, "@")
19307   substed = 0
19308   len = length(field[1])
19309   for (i = 2; i < nfields; i++) {
19310     key = field[i]
19311     keylen = length(key)
19312     if (S_is_set[key]) {
19313       value = S[key]
19314       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19315       len += length(value) + length(field[++i])
19316       substed = 1
19317     } else
19318       len += 1 + keylen
19319   }
19320
19321   print line
19322 }
19323
19324 _ACAWK
19325 _ACEOF
19326 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19327 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19328   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19329 else
19330   cat
19331 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19332   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19333 _ACEOF
19334
19335 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19336 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19337 # trailing colons and then remove the whole line if VPATH becomes empty
19338 # (actually we leave an empty line to preserve line numbers).
19339 if test "x$srcdir" = x.; then
19340   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
19341 h
19342 s///
19343 s/^/:/
19344 s/[      ]*$/:/
19345 s/:\$(srcdir):/:/g
19346 s/:\${srcdir}:/:/g
19347 s/:@srcdir@:/:/g
19348 s/^:*//
19349 s/:*$//
19350 x
19351 s/\(=[   ]*\).*/\1/
19352 G
19353 s/\n//
19354 s/^[^=]*=[       ]*$//
19355 }'
19356 fi
19357
19358 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19359 fi # test -n "$CONFIG_FILES"
19360
19361 # Set up the scripts for CONFIG_HEADERS section.
19362 # No need to generate them if there are no CONFIG_HEADERS.
19363 # This happens for instance with `./config.status Makefile'.
19364 if test -n "$CONFIG_HEADERS"; then
19365 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19366 BEGIN {
19367 _ACEOF
19368
19369 # Transform confdefs.h into an awk script `defines.awk', embedded as
19370 # here-document in config.status, that substitutes the proper values into
19371 # config.h.in to produce config.h.
19372
19373 # Create a delimiter string that does not exist in confdefs.h, to ease
19374 # handling of long lines.
19375 ac_delim='%!_!# '
19376 for ac_last_try in false false :; do
19377   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19378   if test -z "$ac_tt"; then
19379     break
19380   elif $ac_last_try; then
19381     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19382   else
19383     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19384   fi
19385 done
19386
19387 # For the awk script, D is an array of macro values keyed by name,
19388 # likewise P contains macro parameters if any.  Preserve backslash
19389 # newline sequences.
19390
19391 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19392 sed -n '
19393 s/.\{148\}/&'"$ac_delim"'/g
19394 t rset
19395 :rset
19396 s/^[     ]*#[    ]*define[       ][      ]*/ /
19397 t def
19398 d
19399 :def
19400 s/\\$//
19401 t bsnl
19402 s/["\\]/\\&/g
19403 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
19404 D["\1"]=" \3"/p
19405 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
19406 d
19407 :bsnl
19408 s/["\\]/\\&/g
19409 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
19410 D["\1"]=" \3\\\\\\n"\\/p
19411 t cont
19412 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19413 t cont
19414 d
19415 :cont
19416 n
19417 s/.\{148\}/&'"$ac_delim"'/g
19418 t clear
19419 :clear
19420 s/\\$//
19421 t bsnlc
19422 s/["\\]/\\&/g; s/^/"/; s/$/"/p
19423 d
19424 :bsnlc
19425 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
19426 b cont
19427 ' <confdefs.h | sed '
19428 s/'"$ac_delim"'/"\\\
19429 "/g' >>$CONFIG_STATUS || ac_write_fail=1
19430
19431 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19432   for (key in D) D_is_set[key] = 1
19433   FS = "\a"
19434 }
19435 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
19436   line = \$ 0
19437   split(line, arg, " ")
19438   if (arg[1] == "#") {
19439     defundef = arg[2]
19440     mac1 = arg[3]
19441   } else {
19442     defundef = substr(arg[1], 2)
19443     mac1 = arg[2]
19444   }
19445   split(mac1, mac2, "(") #)
19446   macro = mac2[1]
19447   prefix = substr(line, 1, index(line, defundef) - 1)
19448   if (D_is_set[macro]) {
19449     # Preserve the white space surrounding the "#".
19450     print prefix "define", macro P[macro] D[macro]
19451     next
19452   } else {
19453     # Replace #undef with comments.  This is necessary, for example,
19454     # in the case of _POSIX_SOURCE, which is predefined and required
19455     # on some systems where configure will not decide to define it.
19456     if (defundef == "undef") {
19457       print "/*", prefix defundef, macro, "*/"
19458       next
19459     }
19460   }
19461 }
19462 { print }
19463 _ACAWK
19464 _ACEOF
19465 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19466   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
19467 fi # test -n "$CONFIG_HEADERS"
19468
19469
19470 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
19471 shift
19472 for ac_tag
19473 do
19474   case $ac_tag in
19475   :[FHLC]) ac_mode=$ac_tag; continue;;
19476   esac
19477   case $ac_mode$ac_tag in
19478   :[FHL]*:*);;
19479   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
19480   :[FH]-) ac_tag=-:-;;
19481   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
19482   esac
19483   ac_save_IFS=$IFS
19484   IFS=:
19485   set x $ac_tag
19486   IFS=$ac_save_IFS
19487   shift
19488   ac_file=$1
19489   shift
19490
19491   case $ac_mode in
19492   :L) ac_source=$1;;
19493   :[FH])
19494     ac_file_inputs=
19495     for ac_f
19496     do
19497       case $ac_f in
19498       -) ac_f="$ac_tmp/stdin";;
19499       *) # Look for the file first in the build tree, then in the source tree
19500          # (if the path is not absolute).  The absolute path cannot be DOS-style,
19501          # because $ac_f cannot contain `:'.
19502          test -f "$ac_f" ||
19503            case $ac_f in
19504            [\\/$]*) false;;
19505            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
19506            esac ||
19507            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
19508       esac
19509       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
19510       as_fn_append ac_file_inputs " '$ac_f'"
19511     done
19512
19513     # Let's still pretend it is `configure' which instantiates (i.e., don't
19514     # use $as_me), people would be surprised to read:
19515     #    /* config.h.  Generated by config.status.  */
19516     configure_input='Generated from '`
19517           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
19518         `' by configure.'
19519     if test x"$ac_file" != x-; then
19520       configure_input="$ac_file.  $configure_input"
19521       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
19522 $as_echo "$as_me: creating $ac_file" >&6;}
19523     fi
19524     # Neutralize special characters interpreted by sed in replacement strings.
19525     case $configure_input in #(
19526     *\&* | *\|* | *\\* )
19527        ac_sed_conf_input=`$as_echo "$configure_input" |
19528        sed 's/[\\\\&|]/\\\\&/g'`;; #(
19529     *) ac_sed_conf_input=$configure_input;;
19530     esac
19531
19532     case $ac_tag in
19533     *:-:* | *:-) cat >"$ac_tmp/stdin" \
19534       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
19535     esac
19536     ;;
19537   esac
19538
19539   ac_dir=`$as_dirname -- "$ac_file" ||
19540 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19541          X"$ac_file" : 'X\(//\)[^/]' \| \
19542          X"$ac_file" : 'X\(//\)$' \| \
19543          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
19544 $as_echo X"$ac_file" |
19545     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19546             s//\1/
19547             q
19548           }
19549           /^X\(\/\/\)[^/].*/{
19550             s//\1/
19551             q
19552           }
19553           /^X\(\/\/\)$/{
19554             s//\1/
19555             q
19556           }
19557           /^X\(\/\).*/{
19558             s//\1/
19559             q
19560           }
19561           s/.*/./; q'`
19562   as_dir="$ac_dir"; as_fn_mkdir_p
19563   ac_builddir=.
19564
19565 case "$ac_dir" in
19566 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
19567 *)
19568   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
19569   # A ".." for each directory in $ac_dir_suffix.
19570   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
19571   case $ac_top_builddir_sub in
19572   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
19573   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
19574   esac ;;
19575 esac
19576 ac_abs_top_builddir=$ac_pwd
19577 ac_abs_builddir=$ac_pwd$ac_dir_suffix
19578 # for backward compatibility:
19579 ac_top_builddir=$ac_top_build_prefix
19580
19581 case $srcdir in
19582   .)  # We are building in place.
19583     ac_srcdir=.
19584     ac_top_srcdir=$ac_top_builddir_sub
19585     ac_abs_top_srcdir=$ac_pwd ;;
19586   [\\/]* | ?:[\\/]* )  # Absolute name.
19587     ac_srcdir=$srcdir$ac_dir_suffix;
19588     ac_top_srcdir=$srcdir
19589     ac_abs_top_srcdir=$srcdir ;;
19590   *) # Relative name.
19591     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
19592     ac_top_srcdir=$ac_top_build_prefix$srcdir
19593     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
19594 esac
19595 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
19596
19597
19598   case $ac_mode in
19599   :F)
19600   #
19601   # CONFIG_FILE
19602   #
19603
19604   case $INSTALL in
19605   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
19606   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
19607   esac
19608 _ACEOF
19609
19610 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19611 # If the template does not know about datarootdir, expand it.
19612 # FIXME: This hack should be removed a few years after 2.60.
19613 ac_datarootdir_hack=; ac_datarootdir_seen=
19614 ac_sed_dataroot='
19615 /datarootdir/ {
19616   p
19617   q
19618 }
19619 /@datadir@/p
19620 /@docdir@/p
19621 /@infodir@/p
19622 /@localedir@/p
19623 /@mandir@/p'
19624 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
19625 *datarootdir*) ac_datarootdir_seen=yes;;
19626 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
19627   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
19628 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
19629 _ACEOF
19630 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19631   ac_datarootdir_hack='
19632   s&@datadir@&$datadir&g
19633   s&@docdir@&$docdir&g
19634   s&@infodir@&$infodir&g
19635   s&@localedir@&$localedir&g
19636   s&@mandir@&$mandir&g
19637   s&\\\${datarootdir}&$datarootdir&g' ;;
19638 esac
19639 _ACEOF
19640
19641 # Neutralize VPATH when `$srcdir' = `.'.
19642 # Shell code in configure.ac might set extrasub.
19643 # FIXME: do we really want to maintain this feature?
19644 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19645 ac_sed_extra="$ac_vpsub
19646 $extrasub
19647 _ACEOF
19648 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19649 :t
19650 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
19651 s|@configure_input@|$ac_sed_conf_input|;t t
19652 s&@top_builddir@&$ac_top_builddir_sub&;t t
19653 s&@top_build_prefix@&$ac_top_build_prefix&;t t
19654 s&@srcdir@&$ac_srcdir&;t t
19655 s&@abs_srcdir@&$ac_abs_srcdir&;t t
19656 s&@top_srcdir@&$ac_top_srcdir&;t t
19657 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
19658 s&@builddir@&$ac_builddir&;t t
19659 s&@abs_builddir@&$ac_abs_builddir&;t t
19660 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
19661 s&@INSTALL@&$ac_INSTALL&;t t
19662 $ac_datarootdir_hack
19663 "
19664 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
19665   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19666
19667 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
19668   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
19669   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
19670       "$ac_tmp/out"`; test -z "$ac_out"; } &&
19671   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19672 which seems to be undefined.  Please make sure it is defined" >&5
19673 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
19674 which seems to be undefined.  Please make sure it is defined" >&2;}
19675
19676   rm -f "$ac_tmp/stdin"
19677   case $ac_file in
19678   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
19679   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
19680   esac \
19681   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19682  ;;
19683   :H)
19684   #
19685   # CONFIG_HEADER
19686   #
19687   if test x"$ac_file" != x-; then
19688     {
19689       $as_echo "/* $configure_input  */" \
19690       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
19691     } >"$ac_tmp/config.h" \
19692       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19693     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
19694       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
19695 $as_echo "$as_me: $ac_file is unchanged" >&6;}
19696     else
19697       rm -f "$ac_file"
19698       mv "$ac_tmp/config.h" "$ac_file" \
19699         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
19700     fi
19701   else
19702     $as_echo "/* $configure_input  */" \
19703       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
19704       || as_fn_error $? "could not create -" "$LINENO" 5
19705   fi
19706  ;;
19707
19708
19709   esac
19710
19711 done # for ac_tag
19712
19713
19714 as_fn_exit 0
19715 _ACEOF
19716 ac_clean_files=$ac_clean_files_save
19717
19718 test $ac_write_fail = 0 ||
19719   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
19720
19721
19722 # configure is writing to config.log, and then calls config.status.
19723 # config.status does its own redirection, appending to config.log.
19724 # Unfortunately, on DOS this fails, as config.log is still kept open
19725 # by configure, so config.status won't be able to write to it; its
19726 # output is simply discarded.  So we exec the FD to /dev/null,
19727 # effectively closing config.log, so it can be properly (re)opened and
19728 # appended to by config.status.  When coming back to configure, we
19729 # need to make the FD available again.
19730 if test "$no_create" != yes; then
19731   ac_cs_success=:
19732   ac_config_status_args=
19733   test "$silent" = yes &&
19734     ac_config_status_args="$ac_config_status_args --quiet"
19735   exec 5>/dev/null
19736   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
19737   exec 5>>config.log
19738   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
19739   # would make configure fail if this is the last instruction.
19740   $ac_cs_success || as_fn_exit 1
19741 fi
19742 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
19743   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
19744 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
19745 fi
19746
19747
19748 # Print summary of options
19749
19750 # Someone please show me a better way :)
19751 A=`eval echo ${prefix}` ; A=`eval echo ${A}`
19752 B=`eval echo ${bindir}` ; B=`eval echo ${B}`
19753 C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
19754 D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
19755 E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
19756 F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
19757 G=`eval echo ${piddir}` ; G=`eval echo ${G}`
19758 H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}`
19759 I=`eval echo ${user_path}` ; I=`eval echo ${I}`
19760 J=`eval echo ${superuser_path}` ; J=`eval echo ${J}`
19761
19762 echo ""
19763 echo "OpenSSH has been configured with the following options:"
19764 echo "                     User binaries: $B"
19765 echo "                   System binaries: $C"
19766 echo "               Configuration files: $D"
19767 echo "                   Askpass program: $E"
19768 echo "                      Manual pages: $F"
19769 echo "                          PID file: $G"
19770 echo "  Privilege separation chroot path: $H"
19771 if test "x$external_path_file" = "x/etc/login.conf" ; then
19772 echo "   At runtime, sshd will use the path defined in $external_path_file"
19773 echo "   Make sure the path to scp is present, otherwise scp will not work"
19774 else
19775 echo "            sshd default user PATH: $I"
19776         if test ! -z "$external_path_file"; then
19777 echo "   (If PATH is set in $external_path_file it will be used instead. If"
19778 echo "   used, ensure the path to scp is present, otherwise scp will not work.)"
19779         fi
19780 fi
19781 if test ! -z "$superuser_path" ; then
19782 echo "          sshd superuser user PATH: $J"
19783 fi
19784 echo "                    Manpage format: $MANTYPE"
19785 echo "                       PAM support: $PAM_MSG"
19786 echo "                   OSF SIA support: $SIA_MSG"
19787 echo "                 KerberosV support: $KRB5_MSG"
19788 echo "                   SELinux support: $SELINUX_MSG"
19789 echo "                 Smartcard support: $SCARD_MSG"
19790 echo "                     S/KEY support: $SKEY_MSG"
19791 echo "              TCP Wrappers support: $TCPW_MSG"
19792 echo "              MD5 password support: $MD5_MSG"
19793 echo "                   libedit support: $LIBEDIT_MSG"
19794 echo "  Solaris process contract support: $SPC_MSG"
19795 echo "           Solaris project support: $SP_MSG"
19796 echo "       IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
19797 echo "           Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
19798 echo "                  BSD Auth support: $BSD_AUTH_MSG"
19799 echo "              Random number source: $RAND_MSG"
19800 echo "             Privsep sandbox style: $SANDBOX_STYLE"
19801
19802 echo ""
19803
19804 echo "              Host: ${host}"
19805 echo "          Compiler: ${CC}"
19806 echo "    Compiler flags: ${CFLAGS}"
19807 echo "Preprocessor flags: ${CPPFLAGS}"
19808 echo "      Linker flags: ${LDFLAGS}"
19809 echo "         Libraries: ${LIBS}"
19810 if test ! -z "${SSHDLIBS}"; then
19811 echo "         +for sshd: ${SSHDLIBS}"
19812 fi
19813 if test ! -z "${SSHLIBS}"; then
19814 echo "          +for ssh: ${SSHLIBS}"
19815 fi
19816
19817 echo ""
19818
19819 if test "x$MAKE_PACKAGE_SUPPORTED" = "xyes" ; then
19820         echo "SVR4 style packages are supported with \"make package\""
19821         echo ""
19822 fi
19823
19824 if test "x$PAM_MSG" = "xyes" ; then
19825         echo "PAM is enabled. You may need to install a PAM control file "
19826         echo "for sshd, otherwise password authentication may fail. "
19827         echo "Example PAM control files can be found in the contrib/ "
19828         echo "subdirectory"
19829         echo ""
19830 fi
19831
19832 if test ! -z "$NO_PEERCHECK" ; then
19833         echo "WARNING: the operating system that you are using does not"
19834         echo "appear to support getpeereid(), getpeerucred() or the"
19835         echo "SO_PEERCRED getsockopt() option. These facilities are used to"
19836         echo "enforce security checks to prevent unauthorised connections to"
19837         echo "ssh-agent. Their absence increases the risk that a malicious"
19838         echo "user can connect to your agent."
19839         echo ""
19840 fi
19841
19842 if test "$AUDIT_MODULE" = "bsm" ; then
19843         echo "WARNING: BSM audit support is currently considered EXPERIMENTAL."
19844         echo "See the Solaris section in README.platform for details."
19845 fi