]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - crypto/openssh/configure
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / crypto / openssh / configure
1 #! /bin/sh
2 # From configure.ac Revision: 1.536 .
3 # Guess values for system-dependent variables and create Makefiles.
4 # Generated by GNU Autoconf 2.68 for OpenSSH Portable.
5 #
6 # Report bugs to <openssh-unix-dev@mindrot.org>.
7 #
8 #
9 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
10 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11 # Foundation, Inc.
12 #
13 #
14 # This configure script is free software; the Free Software Foundation
15 # gives unlimited permission to copy, distribute and modify it.
16 ## -------------------- ##
17 ## M4sh Initialization. ##
18 ## -------------------- ##
19
20 # Be more Bourne compatible
21 DUALCASE=1; export DUALCASE # for MKS sh
22 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
23   emulate sh
24   NULLCMD=:
25   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
26   # is contrary to our usage.  Disable this feature.
27   alias -g '${1+"$@"}'='"$@"'
28   setopt NO_GLOB_SUBST
29 else
30   case `(set -o) 2>/dev/null` in #(
31   *posix*) :
32     set -o posix ;; #(
33   *) :
34      ;;
35 esac
36 fi
37
38
39 as_nl='
40 '
41 export as_nl
42 # Printing a long string crashes Solaris 7 /usr/bin/printf.
43 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
45 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
46 # Prefer a ksh shell builtin over an external printf program on Solaris,
47 # but without wasting forks for bash or zsh.
48 if test -z "$BASH_VERSION$ZSH_VERSION" \
49     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50   as_echo='print -r --'
51   as_echo_n='print -rn --'
52 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
53   as_echo='printf %s\n'
54   as_echo_n='printf %s'
55 else
56   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
57     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
58     as_echo_n='/usr/ucb/echo -n'
59   else
60     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
61     as_echo_n_body='eval
62       arg=$1;
63       case $arg in #(
64       *"$as_nl"*)
65         expr "X$arg" : "X\\(.*\\)$as_nl";
66         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67       esac;
68       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
69     '
70     export as_echo_n_body
71     as_echo_n='sh -c $as_echo_n_body as_echo'
72   fi
73   export as_echo_body
74   as_echo='sh -c $as_echo_body as_echo'
75 fi
76
77 # The user is always right.
78 if test "${PATH_SEPARATOR+set}" != set; then
79   PATH_SEPARATOR=:
80   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
81     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82       PATH_SEPARATOR=';'
83   }
84 fi
85
86
87 # IFS
88 # We need space, tab and new line, in precisely that order.  Quoting is
89 # there to prevent editors from complaining about space-tab.
90 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
91 # splitting by setting IFS to empty value.)
92 IFS=" ""        $as_nl"
93
94 # Find who we are.  Look in the path if we contain no directory separator.
95 as_myself=
96 case $0 in #((
97   *[\\/]* ) as_myself=$0 ;;
98   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
99 for as_dir in $PATH
100 do
101   IFS=$as_save_IFS
102   test -z "$as_dir" && as_dir=.
103     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104   done
105 IFS=$as_save_IFS
106
107      ;;
108 esac
109 # We did not find ourselves, most probably we were run as `sh COMMAND'
110 # in which case we are not to be found in the path.
111 if test "x$as_myself" = x; then
112   as_myself=$0
113 fi
114 if test ! -f "$as_myself"; then
115   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
116   exit 1
117 fi
118
119 # Unset variables that we do not need and which cause bugs (e.g. in
120 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
121 # suppresses any "Segmentation fault" message there.  '((' could
122 # trigger a bug in pdksh 5.2.14.
123 for as_var in BASH_ENV ENV MAIL MAILPATH
124 do eval test x\${$as_var+set} = xset \
125   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
126 done
127 PS1='$ '
128 PS2='> '
129 PS4='+ '
130
131 # NLS nuisances.
132 LC_ALL=C
133 export LC_ALL
134 LANGUAGE=C
135 export LANGUAGE
136
137 # CDPATH.
138 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139
140 if test "x$CONFIG_SHELL" = x; then
141   as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
142   emulate sh
143   NULLCMD=:
144   # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
145   # is contrary to our usage.  Disable this feature.
146   alias -g '\${1+\"\$@\"}'='\"\$@\"'
147   setopt NO_GLOB_SUBST
148 else
149   case \`(set -o) 2>/dev/null\` in #(
150   *posix*) :
151     set -o posix ;; #(
152   *) :
153      ;;
154 esac
155 fi
156 "
157   as_required="as_fn_return () { (exit \$1); }
158 as_fn_success () { as_fn_return 0; }
159 as_fn_failure () { as_fn_return 1; }
160 as_fn_ret_success () { return 0; }
161 as_fn_ret_failure () { return 1; }
162
163 exitcode=0
164 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
165 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
166 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
167 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
168 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
169
170 else
171   exitcode=1; echo positional parameters were not saved.
172 fi
173 test x\$exitcode = x0 || exit 1"
174   as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
175   as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
176   eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
177   test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
178 test \$(( 1 + 1 )) = 2 || exit 1"
179   if (eval "$as_required") 2>/dev/null; then :
180   as_have_required=yes
181 else
182   as_have_required=no
183 fi
184   if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
185
186 else
187   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
188 as_found=false
189 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
190 do
191   IFS=$as_save_IFS
192   test -z "$as_dir" && as_dir=.
193   as_found=:
194   case $as_dir in #(
195          /*)
196            for as_base in sh bash ksh sh5; do
197              # Try only shells that exist, to save several forks.
198              as_shell=$as_dir/$as_base
199              if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
200                     { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
201   CONFIG_SHELL=$as_shell as_have_required=yes
202                    if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
203   break 2
204 fi
205 fi
206            done;;
207        esac
208   as_found=false
209 done
210 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
211               { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
212   CONFIG_SHELL=$SHELL as_have_required=yes
213 fi; }
214 IFS=$as_save_IFS
215
216
217       if test "x$CONFIG_SHELL" != x; then :
218   # We cannot yet assume a decent shell, so we have to provide a
219         # neutralization value for shells without unset; and this also
220         # works around shells that cannot unset nonexistent variables.
221         # Preserve -v and -x to the replacement shell.
222         BASH_ENV=/dev/null
223         ENV=/dev/null
224         (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
225         export CONFIG_SHELL
226         case $- in # ((((
227           *v*x* | *x*v* ) as_opts=-vx ;;
228           *v* ) as_opts=-v ;;
229           *x* ) as_opts=-x ;;
230           * ) as_opts= ;;
231         esac
232         exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
233 fi
234
235     if test x$as_have_required = xno; then :
236   $as_echo "$0: This script requires a shell more modern than all"
237   $as_echo "$0: the shells that I found on your system."
238   if test x${ZSH_VERSION+set} = xset ; then
239     $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
240     $as_echo "$0: be upgraded to zsh 4.3.4 or later."
241   else
242     $as_echo "$0: Please tell bug-autoconf@gnu.org and
243 $0: openssh-unix-dev@mindrot.org about your system,
244 $0: including any error possibly output before this
245 $0: message. Then install a modern shell, or manually run
246 $0: the script under such a shell if you do have one."
247   fi
248   exit 1
249 fi
250 fi
251 fi
252 SHELL=${CONFIG_SHELL-/bin/sh}
253 export SHELL
254 # Unset more variables known to interfere with behavior of common tools.
255 CLICOLOR_FORCE= GREP_OPTIONS=
256 unset CLICOLOR_FORCE GREP_OPTIONS
257
258 ## --------------------- ##
259 ## M4sh Shell Functions. ##
260 ## --------------------- ##
261 # as_fn_unset VAR
262 # ---------------
263 # Portably unset VAR.
264 as_fn_unset ()
265 {
266   { eval $1=; unset $1;}
267 }
268 as_unset=as_fn_unset
269
270 # as_fn_set_status STATUS
271 # -----------------------
272 # Set $? to STATUS, without forking.
273 as_fn_set_status ()
274 {
275   return $1
276 } # as_fn_set_status
277
278 # as_fn_exit STATUS
279 # -----------------
280 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
281 as_fn_exit ()
282 {
283   set +e
284   as_fn_set_status $1
285   exit $1
286 } # as_fn_exit
287
288 # as_fn_mkdir_p
289 # -------------
290 # Create "$as_dir" as a directory, including parents if necessary.
291 as_fn_mkdir_p ()
292 {
293
294   case $as_dir in #(
295   -*) as_dir=./$as_dir;;
296   esac
297   test -d "$as_dir" || eval $as_mkdir_p || {
298     as_dirs=
299     while :; do
300       case $as_dir in #(
301       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
302       *) as_qdir=$as_dir;;
303       esac
304       as_dirs="'$as_qdir' $as_dirs"
305       as_dir=`$as_dirname -- "$as_dir" ||
306 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
307          X"$as_dir" : 'X\(//\)[^/]' \| \
308          X"$as_dir" : 'X\(//\)$' \| \
309          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
310 $as_echo X"$as_dir" |
311     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
312             s//\1/
313             q
314           }
315           /^X\(\/\/\)[^/].*/{
316             s//\1/
317             q
318           }
319           /^X\(\/\/\)$/{
320             s//\1/
321             q
322           }
323           /^X\(\/\).*/{
324             s//\1/
325             q
326           }
327           s/.*/./; q'`
328       test -d "$as_dir" && break
329     done
330     test -z "$as_dirs" || eval "mkdir $as_dirs"
331   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
332
333
334 } # as_fn_mkdir_p
335 # as_fn_append VAR VALUE
336 # ----------------------
337 # Append the text in VALUE to the end of the definition contained in VAR. Take
338 # advantage of any shell optimizations that allow amortized linear growth over
339 # repeated appends, instead of the typical quadratic growth present in naive
340 # implementations.
341 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
342   eval 'as_fn_append ()
343   {
344     eval $1+=\$2
345   }'
346 else
347   as_fn_append ()
348   {
349     eval $1=\$$1\$2
350   }
351 fi # as_fn_append
352
353 # as_fn_arith ARG...
354 # ------------------
355 # Perform arithmetic evaluation on the ARGs, and store the result in the
356 # global $as_val. Take advantage of shells that can avoid forks. The arguments
357 # must be portable across $(()) and expr.
358 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
359   eval 'as_fn_arith ()
360   {
361     as_val=$(( $* ))
362   }'
363 else
364   as_fn_arith ()
365   {
366     as_val=`expr "$@" || test $? -eq 1`
367   }
368 fi # as_fn_arith
369
370
371 # as_fn_error STATUS ERROR [LINENO LOG_FD]
372 # ----------------------------------------
373 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
374 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
375 # script with STATUS, using 1 if that was 0.
376 as_fn_error ()
377 {
378   as_status=$1; test $as_status -eq 0 && as_status=1
379   if test "$4"; then
380     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
381     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
382   fi
383   $as_echo "$as_me: error: $2" >&2
384   as_fn_exit $as_status
385 } # as_fn_error
386
387 if expr a : '\(a\)' >/dev/null 2>&1 &&
388    test "X`expr 00001 : '.*\(...\)'`" = X001; then
389   as_expr=expr
390 else
391   as_expr=false
392 fi
393
394 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
395   as_basename=basename
396 else
397   as_basename=false
398 fi
399
400 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
401   as_dirname=dirname
402 else
403   as_dirname=false
404 fi
405
406 as_me=`$as_basename -- "$0" ||
407 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
408          X"$0" : 'X\(//\)$' \| \
409          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
410 $as_echo X/"$0" |
411     sed '/^.*\/\([^/][^/]*\)\/*$/{
412             s//\1/
413             q
414           }
415           /^X\/\(\/\/\)$/{
416             s//\1/
417             q
418           }
419           /^X\/\(\/\).*/{
420             s//\1/
421             q
422           }
423           s/.*/./; q'`
424
425 # Avoid depending upon Character Ranges.
426 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
427 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
428 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
429 as_cr_digits='0123456789'
430 as_cr_alnum=$as_cr_Letters$as_cr_digits
431
432
433   as_lineno_1=$LINENO as_lineno_1a=$LINENO
434   as_lineno_2=$LINENO as_lineno_2a=$LINENO
435   eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
436   test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
437   # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
438   sed -n '
439     p
440     /[$]LINENO/=
441   ' <$as_myself |
442     sed '
443       s/[$]LINENO.*/&-/
444       t lineno
445       b
446       :lineno
447       N
448       :loop
449       s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
450       t loop
451       s/-\n.*//
452     ' >$as_me.lineno &&
453   chmod +x "$as_me.lineno" ||
454     { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
455
456   # Don't try to exec as it changes $[0], causing all sort of problems
457   # (the dirname of $[0] is not the place where we might find the
458   # original and so on.  Autoconf is especially sensitive to this).
459   . "./$as_me.lineno"
460   # Exit status is that of the last command.
461   exit
462 }
463
464 ECHO_C= ECHO_N= ECHO_T=
465 case `echo -n x` in #(((((
466 -n*)
467   case `echo 'xy\c'` in
468   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
469   xy)  ECHO_C='\c';;
470   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
471        ECHO_T=' ';;
472   esac;;
473 *)
474   ECHO_N='-n';;
475 esac
476
477 rm -f conf$$ conf$$.exe conf$$.file
478 if test -d conf$$.dir; then
479   rm -f conf$$.dir/conf$$.file
480 else
481   rm -f conf$$.dir
482   mkdir conf$$.dir 2>/dev/null
483 fi
484 if (echo >conf$$.file) 2>/dev/null; then
485   if ln -s conf$$.file conf$$ 2>/dev/null; then
486     as_ln_s='ln -s'
487     # ... but there are two gotchas:
488     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
489     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
490     # In both cases, we have to default to `cp -p'.
491     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
492       as_ln_s='cp -p'
493   elif ln conf$$.file conf$$ 2>/dev/null; then
494     as_ln_s=ln
495   else
496     as_ln_s='cp -p'
497   fi
498 else
499   as_ln_s='cp -p'
500 fi
501 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
502 rmdir conf$$.dir 2>/dev/null
503
504 if mkdir -p . 2>/dev/null; then
505   as_mkdir_p='mkdir -p "$as_dir"'
506 else
507   test -d ./-p && rmdir ./-p
508   as_mkdir_p=false
509 fi
510
511 if test -x / >/dev/null 2>&1; then
512   as_test_x='test -x'
513 else
514   if ls -dL / >/dev/null 2>&1; then
515     as_ls_L_option=L
516   else
517     as_ls_L_option=
518   fi
519   as_test_x='
520     eval sh -c '\''
521       if test -d "$1"; then
522         test -d "$1/.";
523       else
524         case $1 in #(
525         -*)set "./$1";;
526         esac;
527         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
528         ???[sx]*):;;*)false;;esac;fi
529     '\'' sh
530   '
531 fi
532 as_executable_p=$as_test_x
533
534 # Sed expression to map a string onto a valid CPP name.
535 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
536
537 # Sed expression to map a string onto a valid variable name.
538 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
539
540
541 test -n "$DJDIR" || exec 7<&0 </dev/null
542 exec 6>&1
543
544 # Name of the host.
545 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
546 # so uname gets run too.
547 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
548
549 #
550 # Initializations.
551 #
552 ac_default_prefix=/usr/local
553 ac_clean_files=
554 ac_config_libobj_dir=.
555 LIBOBJS=
556 cross_compiling=no
557 subdirs=
558 MFLAGS=
559 MAKEFLAGS=
560
561 # Identity of this package.
562 PACKAGE_NAME='OpenSSH'
563 PACKAGE_TARNAME='openssh'
564 PACKAGE_VERSION='Portable'
565 PACKAGE_STRING='OpenSSH Portable'
566 PACKAGE_BUGREPORT='openssh-unix-dev@mindrot.org'
567 PACKAGE_URL=''
568
569 ac_unique_file="ssh.c"
570 # Factoring default headers for most tests.
571 ac_includes_default="\
572 #include <stdio.h>
573 #ifdef HAVE_SYS_TYPES_H
574 # include <sys/types.h>
575 #endif
576 #ifdef HAVE_SYS_STAT_H
577 # include <sys/stat.h>
578 #endif
579 #ifdef STDC_HEADERS
580 # include <stdlib.h>
581 # include <stddef.h>
582 #else
583 # ifdef HAVE_STDLIB_H
584 #  include <stdlib.h>
585 # endif
586 #endif
587 #ifdef HAVE_STRING_H
588 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
589 #  include <memory.h>
590 # endif
591 # include <string.h>
592 #endif
593 #ifdef HAVE_STRINGS_H
594 # include <strings.h>
595 #endif
596 #ifdef HAVE_INTTYPES_H
597 # include <inttypes.h>
598 #endif
599 #ifdef HAVE_STDINT_H
600 # include <stdint.h>
601 #endif
602 #ifdef HAVE_UNISTD_H
603 # include <unistd.h>
604 #endif"
605
606 ac_subst_vars='LTLIBOBJS
607 LIBOBJS
608 UNSUPPORTED_ALGORITHMS
609 TEST_SSH_IPV6
610 piddir
611 user_path
612 mansubdir
613 MANTYPE
614 XAUTH_PATH
615 STRIP_OPT
616 xauth_path
617 PRIVSEP_PATH
618 K5LIBS
619 GSSLIBS
620 KRB5CONF
621 SSHDLIBS
622 SSHLIBS
623 SSH_PRIVSEP_USER
624 COMMENT_OUT_ECC
625 TEST_SSH_ECC
626 TEST_SSH_SHA256
627 LIBEDIT
628 PKGCONFIG
629 LD
630 PATH_PASSWD_PROG
631 LOGIN_PROGRAM_FALLBACK
632 STARTUP_SCRIPT_SHELL
633 MAKE_PACKAGE_SUPPORTED
634 PATH_USERADD_PROG
635 PATH_GROUPADD_PROG
636 MANFMT
637 TEST_SHELL
638 MANDOC
639 NROFF
640 GROFF
641 SH
642 TEST_MINUS_S_SH
643 ENT
644 SED
645 PERL
646 KILL
647 CAT
648 AR
649 INSTALL_DATA
650 INSTALL_SCRIPT
651 INSTALL_PROGRAM
652 RANLIB
653 AWK
654 EGREP
655 GREP
656 CPP
657 host_os
658 host_vendor
659 host_cpu
660 host
661 build_os
662 build_vendor
663 build_cpu
664 build
665 OBJEXT
666 EXEEXT
667 ac_ct_CC
668 CPPFLAGS
669 LDFLAGS
670 CFLAGS
671 CC
672 target_alias
673 host_alias
674 build_alias
675 LIBS
676 ECHO_T
677 ECHO_N
678 ECHO_C
679 DEFS
680 mandir
681 localedir
682 libdir
683 psdir
684 pdfdir
685 dvidir
686 htmldir
687 infodir
688 docdir
689 oldincludedir
690 includedir
691 localstatedir
692 sharedstatedir
693 sysconfdir
694 datadir
695 datarootdir
696 libexecdir
697 sbindir
698 bindir
699 program_transform_name
700 prefix
701 exec_prefix
702 PACKAGE_URL
703 PACKAGE_BUGREPORT
704 PACKAGE_STRING
705 PACKAGE_VERSION
706 PACKAGE_TARNAME
707 PACKAGE_NAME
708 PATH_SEPARATOR
709 SHELL'
710 ac_subst_files=''
711 ac_user_opts='
712 enable_option_checking
713 enable_largefile
714 with_stackprotect
715 with_rpath
716 with_cflags
717 with_cppflags
718 with_ldflags
719 with_libs
720 with_Werror
721 with_solaris_contracts
722 with_solaris_projects
723 with_osfsia
724 with_zlib
725 with_zlib_version_check
726 with_skey
727 with_tcp_wrappers
728 with_ldns
729 with_libedit
730 with_audit
731 with_ssl_dir
732 with_openssl_header_check
733 with_ssl_engine
734 with_prngd_port
735 with_prngd_socket
736 with_pam
737 with_privsep_user
738 with_sandbox
739 with_selinux
740 with_kerberos5
741 with_privsep_path
742 with_xauth
743 enable_strip
744 with_maildir
745 with_mantype
746 with_md5_passwords
747 with_shadow
748 with_ipaddr_display
749 enable_etc_default_login
750 with_default_path
751 with_superuser_path
752 with_4in6
753 with_bsd_auth
754 with_pid_dir
755 enable_lastlog
756 enable_utmp
757 enable_utmpx
758 enable_wtmp
759 enable_wtmpx
760 enable_libutil
761 enable_pututline
762 enable_pututxline
763 with_lastlog
764 '
765       ac_precious_vars='build_alias
766 host_alias
767 target_alias
768 CC
769 CFLAGS
770 LDFLAGS
771 LIBS
772 CPPFLAGS
773 CPP'
774
775
776 # Initialize some variables set by options.
777 ac_init_help=
778 ac_init_version=false
779 ac_unrecognized_opts=
780 ac_unrecognized_sep=
781 # The variables have the same names as the options, with
782 # dashes changed to underlines.
783 cache_file=/dev/null
784 exec_prefix=NONE
785 no_create=
786 no_recursion=
787 prefix=NONE
788 program_prefix=NONE
789 program_suffix=NONE
790 program_transform_name=s,x,x,
791 silent=
792 site=
793 srcdir=
794 verbose=
795 x_includes=NONE
796 x_libraries=NONE
797
798 # Installation directory options.
799 # These are left unexpanded so users can "make install exec_prefix=/foo"
800 # and all the variables that are supposed to be based on exec_prefix
801 # by default will actually change.
802 # Use braces instead of parens because sh, perl, etc. also accept them.
803 # (The list follows the same order as the GNU Coding Standards.)
804 bindir='${exec_prefix}/bin'
805 sbindir='${exec_prefix}/sbin'
806 libexecdir='${exec_prefix}/libexec'
807 datarootdir='${prefix}/share'
808 datadir='${datarootdir}'
809 sysconfdir='${prefix}/etc'
810 sharedstatedir='${prefix}/com'
811 localstatedir='${prefix}/var'
812 includedir='${prefix}/include'
813 oldincludedir='/usr/include'
814 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
815 infodir='${datarootdir}/info'
816 htmldir='${docdir}'
817 dvidir='${docdir}'
818 pdfdir='${docdir}'
819 psdir='${docdir}'
820 libdir='${exec_prefix}/lib'
821 localedir='${datarootdir}/locale'
822 mandir='${datarootdir}/man'
823
824 ac_prev=
825 ac_dashdash=
826 for ac_option
827 do
828   # If the previous option needs an argument, assign it.
829   if test -n "$ac_prev"; then
830     eval $ac_prev=\$ac_option
831     ac_prev=
832     continue
833   fi
834
835   case $ac_option in
836   *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
837   *=)   ac_optarg= ;;
838   *)    ac_optarg=yes ;;
839   esac
840
841   # Accept the important Cygnus configure options, so we can diagnose typos.
842
843   case $ac_dashdash$ac_option in
844   --)
845     ac_dashdash=yes ;;
846
847   -bindir | --bindir | --bindi | --bind | --bin | --bi)
848     ac_prev=bindir ;;
849   -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
850     bindir=$ac_optarg ;;
851
852   -build | --build | --buil | --bui | --bu)
853     ac_prev=build_alias ;;
854   -build=* | --build=* | --buil=* | --bui=* | --bu=*)
855     build_alias=$ac_optarg ;;
856
857   -cache-file | --cache-file | --cache-fil | --cache-fi \
858   | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
859     ac_prev=cache_file ;;
860   -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
861   | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
862     cache_file=$ac_optarg ;;
863
864   --config-cache | -C)
865     cache_file=config.cache ;;
866
867   -datadir | --datadir | --datadi | --datad)
868     ac_prev=datadir ;;
869   -datadir=* | --datadir=* | --datadi=* | --datad=*)
870     datadir=$ac_optarg ;;
871
872   -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
873   | --dataroo | --dataro | --datar)
874     ac_prev=datarootdir ;;
875   -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
876   | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
877     datarootdir=$ac_optarg ;;
878
879   -disable-* | --disable-*)
880     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
881     # Reject names that are not valid shell variable names.
882     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
883       as_fn_error $? "invalid feature name: $ac_useropt"
884     ac_useropt_orig=$ac_useropt
885     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
886     case $ac_user_opts in
887       *"
888 "enable_$ac_useropt"
889 "*) ;;
890       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
891          ac_unrecognized_sep=', ';;
892     esac
893     eval enable_$ac_useropt=no ;;
894
895   -docdir | --docdir | --docdi | --doc | --do)
896     ac_prev=docdir ;;
897   -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
898     docdir=$ac_optarg ;;
899
900   -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
901     ac_prev=dvidir ;;
902   -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
903     dvidir=$ac_optarg ;;
904
905   -enable-* | --enable-*)
906     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
907     # Reject names that are not valid shell variable names.
908     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
909       as_fn_error $? "invalid feature name: $ac_useropt"
910     ac_useropt_orig=$ac_useropt
911     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
912     case $ac_user_opts in
913       *"
914 "enable_$ac_useropt"
915 "*) ;;
916       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
917          ac_unrecognized_sep=', ';;
918     esac
919     eval enable_$ac_useropt=\$ac_optarg ;;
920
921   -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
922   | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
923   | --exec | --exe | --ex)
924     ac_prev=exec_prefix ;;
925   -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
926   | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
927   | --exec=* | --exe=* | --ex=*)
928     exec_prefix=$ac_optarg ;;
929
930   -gas | --gas | --ga | --g)
931     # Obsolete; use --with-gas.
932     with_gas=yes ;;
933
934   -help | --help | --hel | --he | -h)
935     ac_init_help=long ;;
936   -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
937     ac_init_help=recursive ;;
938   -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
939     ac_init_help=short ;;
940
941   -host | --host | --hos | --ho)
942     ac_prev=host_alias ;;
943   -host=* | --host=* | --hos=* | --ho=*)
944     host_alias=$ac_optarg ;;
945
946   -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
947     ac_prev=htmldir ;;
948   -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
949   | --ht=*)
950     htmldir=$ac_optarg ;;
951
952   -includedir | --includedir | --includedi | --included | --include \
953   | --includ | --inclu | --incl | --inc)
954     ac_prev=includedir ;;
955   -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
956   | --includ=* | --inclu=* | --incl=* | --inc=*)
957     includedir=$ac_optarg ;;
958
959   -infodir | --infodir | --infodi | --infod | --info | --inf)
960     ac_prev=infodir ;;
961   -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
962     infodir=$ac_optarg ;;
963
964   -libdir | --libdir | --libdi | --libd)
965     ac_prev=libdir ;;
966   -libdir=* | --libdir=* | --libdi=* | --libd=*)
967     libdir=$ac_optarg ;;
968
969   -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
970   | --libexe | --libex | --libe)
971     ac_prev=libexecdir ;;
972   -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
973   | --libexe=* | --libex=* | --libe=*)
974     libexecdir=$ac_optarg ;;
975
976   -localedir | --localedir | --localedi | --localed | --locale)
977     ac_prev=localedir ;;
978   -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
979     localedir=$ac_optarg ;;
980
981   -localstatedir | --localstatedir | --localstatedi | --localstated \
982   | --localstate | --localstat | --localsta | --localst | --locals)
983     ac_prev=localstatedir ;;
984   -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
985   | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
986     localstatedir=$ac_optarg ;;
987
988   -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
989     ac_prev=mandir ;;
990   -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
991     mandir=$ac_optarg ;;
992
993   -nfp | --nfp | --nf)
994     # Obsolete; use --without-fp.
995     with_fp=no ;;
996
997   -no-create | --no-create | --no-creat | --no-crea | --no-cre \
998   | --no-cr | --no-c | -n)
999     no_create=yes ;;
1000
1001   -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1002   | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1003     no_recursion=yes ;;
1004
1005   -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1006   | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1007   | --oldin | --oldi | --old | --ol | --o)
1008     ac_prev=oldincludedir ;;
1009   -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1010   | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1011   | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1012     oldincludedir=$ac_optarg ;;
1013
1014   -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1015     ac_prev=prefix ;;
1016   -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1017     prefix=$ac_optarg ;;
1018
1019   -program-prefix | --program-prefix | --program-prefi | --program-pref \
1020   | --program-pre | --program-pr | --program-p)
1021     ac_prev=program_prefix ;;
1022   -program-prefix=* | --program-prefix=* | --program-prefi=* \
1023   | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1024     program_prefix=$ac_optarg ;;
1025
1026   -program-suffix | --program-suffix | --program-suffi | --program-suff \
1027   | --program-suf | --program-su | --program-s)
1028     ac_prev=program_suffix ;;
1029   -program-suffix=* | --program-suffix=* | --program-suffi=* \
1030   | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1031     program_suffix=$ac_optarg ;;
1032
1033   -program-transform-name | --program-transform-name \
1034   | --program-transform-nam | --program-transform-na \
1035   | --program-transform-n | --program-transform- \
1036   | --program-transform | --program-transfor \
1037   | --program-transfo | --program-transf \
1038   | --program-trans | --program-tran \
1039   | --progr-tra | --program-tr | --program-t)
1040     ac_prev=program_transform_name ;;
1041   -program-transform-name=* | --program-transform-name=* \
1042   | --program-transform-nam=* | --program-transform-na=* \
1043   | --program-transform-n=* | --program-transform-=* \
1044   | --program-transform=* | --program-transfor=* \
1045   | --program-transfo=* | --program-transf=* \
1046   | --program-trans=* | --program-tran=* \
1047   | --progr-tra=* | --program-tr=* | --program-t=*)
1048     program_transform_name=$ac_optarg ;;
1049
1050   -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1051     ac_prev=pdfdir ;;
1052   -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1053     pdfdir=$ac_optarg ;;
1054
1055   -psdir | --psdir | --psdi | --psd | --ps)
1056     ac_prev=psdir ;;
1057   -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1058     psdir=$ac_optarg ;;
1059
1060   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1061   | -silent | --silent | --silen | --sile | --sil)
1062     silent=yes ;;
1063
1064   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1065     ac_prev=sbindir ;;
1066   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1067   | --sbi=* | --sb=*)
1068     sbindir=$ac_optarg ;;
1069
1070   -sharedstatedir | --sharedstatedir | --sharedstatedi \
1071   | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1072   | --sharedst | --shareds | --shared | --share | --shar \
1073   | --sha | --sh)
1074     ac_prev=sharedstatedir ;;
1075   -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1076   | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1077   | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1078   | --sha=* | --sh=*)
1079     sharedstatedir=$ac_optarg ;;
1080
1081   -site | --site | --sit)
1082     ac_prev=site ;;
1083   -site=* | --site=* | --sit=*)
1084     site=$ac_optarg ;;
1085
1086   -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1087     ac_prev=srcdir ;;
1088   -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1089     srcdir=$ac_optarg ;;
1090
1091   -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1092   | --syscon | --sysco | --sysc | --sys | --sy)
1093     ac_prev=sysconfdir ;;
1094   -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1095   | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1096     sysconfdir=$ac_optarg ;;
1097
1098   -target | --target | --targe | --targ | --tar | --ta | --t)
1099     ac_prev=target_alias ;;
1100   -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1101     target_alias=$ac_optarg ;;
1102
1103   -v | -verbose | --verbose | --verbos | --verbo | --verb)
1104     verbose=yes ;;
1105
1106   -version | --version | --versio | --versi | --vers | -V)
1107     ac_init_version=: ;;
1108
1109   -with-* | --with-*)
1110     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1111     # Reject names that are not valid shell variable names.
1112     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1113       as_fn_error $? "invalid package name: $ac_useropt"
1114     ac_useropt_orig=$ac_useropt
1115     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1116     case $ac_user_opts in
1117       *"
1118 "with_$ac_useropt"
1119 "*) ;;
1120       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1121          ac_unrecognized_sep=', ';;
1122     esac
1123     eval with_$ac_useropt=\$ac_optarg ;;
1124
1125   -without-* | --without-*)
1126     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1127     # Reject names that are not valid shell variable names.
1128     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1129       as_fn_error $? "invalid package name: $ac_useropt"
1130     ac_useropt_orig=$ac_useropt
1131     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1132     case $ac_user_opts in
1133       *"
1134 "with_$ac_useropt"
1135 "*) ;;
1136       *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1137          ac_unrecognized_sep=', ';;
1138     esac
1139     eval with_$ac_useropt=no ;;
1140
1141   --x)
1142     # Obsolete; use --with-x.
1143     with_x=yes ;;
1144
1145   -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1146   | --x-incl | --x-inc | --x-in | --x-i)
1147     ac_prev=x_includes ;;
1148   -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1149   | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1150     x_includes=$ac_optarg ;;
1151
1152   -x-libraries | --x-libraries | --x-librarie | --x-librari \
1153   | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1154     ac_prev=x_libraries ;;
1155   -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1156   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1157     x_libraries=$ac_optarg ;;
1158
1159   -*) as_fn_error $? "unrecognized option: \`$ac_option'
1160 Try \`$0 --help' for more information"
1161     ;;
1162
1163   *=*)
1164     ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1165     # Reject names that are not valid shell variable names.
1166     case $ac_envvar in #(
1167       '' | [0-9]* | *[!_$as_cr_alnum]* )
1168       as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1169     esac
1170     eval $ac_envvar=\$ac_optarg
1171     export $ac_envvar ;;
1172
1173   *)
1174     # FIXME: should be removed in autoconf 3.0.
1175     $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1176     expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1177       $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1178     : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1179     ;;
1180
1181   esac
1182 done
1183
1184 if test -n "$ac_prev"; then
1185   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1186   as_fn_error $? "missing argument to $ac_option"
1187 fi
1188
1189 if test -n "$ac_unrecognized_opts"; then
1190   case $enable_option_checking in
1191     no) ;;
1192     fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1193     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1194   esac
1195 fi
1196
1197 # Check all directory arguments for consistency.
1198 for ac_var in   exec_prefix prefix bindir sbindir libexecdir datarootdir \
1199                 datadir sysconfdir sharedstatedir localstatedir includedir \
1200                 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1201                 libdir localedir mandir
1202 do
1203   eval ac_val=\$$ac_var
1204   # Remove trailing slashes.
1205   case $ac_val in
1206     */ )
1207       ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1208       eval $ac_var=\$ac_val;;
1209   esac
1210   # Be sure to have absolute directory names.
1211   case $ac_val in
1212     [\\/$]* | ?:[\\/]* )  continue;;
1213     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1214   esac
1215   as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1216 done
1217
1218 # There might be people who depend on the old broken behavior: `$host'
1219 # used to hold the argument of --host etc.
1220 # FIXME: To remove some day.
1221 build=$build_alias
1222 host=$host_alias
1223 target=$target_alias
1224
1225 # FIXME: To remove some day.
1226 if test "x$host_alias" != x; then
1227   if test "x$build_alias" = x; then
1228     cross_compiling=maybe
1229     $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1230     If a cross compiler is detected then cross compile mode will be used" >&2
1231   elif test "x$build_alias" != "x$host_alias"; then
1232     cross_compiling=yes
1233   fi
1234 fi
1235
1236 ac_tool_prefix=
1237 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1238
1239 test "$silent" = yes && exec 6>/dev/null
1240
1241
1242 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1243 ac_ls_di=`ls -di .` &&
1244 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1245   as_fn_error $? "working directory cannot be determined"
1246 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1247   as_fn_error $? "pwd does not report name of working directory"
1248
1249
1250 # Find the source files, if location was not specified.
1251 if test -z "$srcdir"; then
1252   ac_srcdir_defaulted=yes
1253   # Try the directory containing this script, then the parent directory.
1254   ac_confdir=`$as_dirname -- "$as_myself" ||
1255 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1256          X"$as_myself" : 'X\(//\)[^/]' \| \
1257          X"$as_myself" : 'X\(//\)$' \| \
1258          X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1259 $as_echo X"$as_myself" |
1260     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1261             s//\1/
1262             q
1263           }
1264           /^X\(\/\/\)[^/].*/{
1265             s//\1/
1266             q
1267           }
1268           /^X\(\/\/\)$/{
1269             s//\1/
1270             q
1271           }
1272           /^X\(\/\).*/{
1273             s//\1/
1274             q
1275           }
1276           s/.*/./; q'`
1277   srcdir=$ac_confdir
1278   if test ! -r "$srcdir/$ac_unique_file"; then
1279     srcdir=..
1280   fi
1281 else
1282   ac_srcdir_defaulted=no
1283 fi
1284 if test ! -r "$srcdir/$ac_unique_file"; then
1285   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1286   as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1287 fi
1288 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1289 ac_abs_confdir=`(
1290         cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1291         pwd)`
1292 # When building in place, set srcdir=.
1293 if test "$ac_abs_confdir" = "$ac_pwd"; then
1294   srcdir=.
1295 fi
1296 # Remove unnecessary trailing slashes from srcdir.
1297 # Double slashes in file names in object file debugging info
1298 # mess up M-x gdb in Emacs.
1299 case $srcdir in
1300 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1301 esac
1302 for ac_var in $ac_precious_vars; do
1303   eval ac_env_${ac_var}_set=\${${ac_var}+set}
1304   eval ac_env_${ac_var}_value=\$${ac_var}
1305   eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1306   eval ac_cv_env_${ac_var}_value=\$${ac_var}
1307 done
1308
1309 #
1310 # Report the --help message.
1311 #
1312 if test "$ac_init_help" = "long"; then
1313   # Omit some internal or obsolete options to make the list less imposing.
1314   # This message is too long to be a string in the A/UX 3.1 sh.
1315   cat <<_ACEOF
1316 \`configure' configures OpenSSH Portable to adapt to many kinds of systems.
1317
1318 Usage: $0 [OPTION]... [VAR=VALUE]...
1319
1320 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1321 VAR=VALUE.  See below for descriptions of some of the useful variables.
1322
1323 Defaults for the options are specified in brackets.
1324
1325 Configuration:
1326   -h, --help              display this help and exit
1327       --help=short        display options specific to this package
1328       --help=recursive    display the short help of all the included packages
1329   -V, --version           display version information and exit
1330   -q, --quiet, --silent   do not print \`checking ...' messages
1331       --cache-file=FILE   cache test results in FILE [disabled]
1332   -C, --config-cache      alias for \`--cache-file=config.cache'
1333   -n, --no-create         do not create output files
1334       --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1335
1336 Installation directories:
1337   --prefix=PREFIX         install architecture-independent files in PREFIX
1338                           [$ac_default_prefix]
1339   --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1340                           [PREFIX]
1341
1342 By default, \`make install' will install all the files in
1343 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1344 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1345 for instance \`--prefix=\$HOME'.
1346
1347 For better control, use the options below.
1348
1349 Fine tuning of the installation directories:
1350   --bindir=DIR            user executables [EPREFIX/bin]
1351   --sbindir=DIR           system admin executables [EPREFIX/sbin]
1352   --libexecdir=DIR        program executables [EPREFIX/libexec]
1353   --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1354   --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1355   --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1356   --libdir=DIR            object code libraries [EPREFIX/lib]
1357   --includedir=DIR        C header files [PREFIX/include]
1358   --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1359   --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1360   --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1361   --infodir=DIR           info documentation [DATAROOTDIR/info]
1362   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1363   --mandir=DIR            man documentation [DATAROOTDIR/man]
1364   --docdir=DIR            documentation root [DATAROOTDIR/doc/openssh]
1365   --htmldir=DIR           html documentation [DOCDIR]
1366   --dvidir=DIR            dvi documentation [DOCDIR]
1367   --pdfdir=DIR            pdf documentation [DOCDIR]
1368   --psdir=DIR             ps documentation [DOCDIR]
1369 _ACEOF
1370
1371   cat <<\_ACEOF
1372
1373 System types:
1374   --build=BUILD     configure for building on BUILD [guessed]
1375   --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1376 _ACEOF
1377 fi
1378
1379 if test -n "$ac_init_help"; then
1380   case $ac_init_help in
1381      short | recursive ) echo "Configuration of OpenSSH Portable:";;
1382    esac
1383   cat <<\_ACEOF
1384
1385 Optional Features:
1386   --disable-option-checking  ignore unrecognized --enable/--with options
1387   --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1388   --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1389   --disable-largefile     omit support for large files
1390   --disable-strip         Disable calling strip(1) on install
1391   --disable-etc-default-login Disable using PATH from /etc/default/login no
1392   --disable-lastlog       disable use of lastlog even if detected no
1393   --disable-utmp          disable use of utmp even if detected no
1394   --disable-utmpx         disable use of utmpx even if detected no
1395   --disable-wtmp          disable use of wtmp even if detected no
1396   --disable-wtmpx         disable use of wtmpx even if detected no
1397   --disable-libutil       disable use of libutil (login() etc.) no
1398   --disable-pututline     disable use of pututline() etc. (uwtmp) no
1399   --disable-pututxline    disable use of pututxline() etc. (uwtmpx) no
1400
1401 Optional Packages:
1402   --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
1403   --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
1404   --without-stackprotect  Don't use compiler's stack protection
1405   --without-rpath         Disable auto-added -R linker paths
1406   --with-cflags           Specify additional flags to pass to compiler
1407   --with-cppflags         Specify additional flags to pass to preprocessor
1408   --with-ldflags          Specify additional flags to pass to linker
1409   --with-libs             Specify additional libraries to link with
1410   --with-Werror           Build main code with -Werror
1411   --with-solaris-contracts Enable Solaris process contracts (experimental)
1412   --with-solaris-projects Enable Solaris projects (experimental)
1413   --with-osfsia           Enable Digital Unix SIA
1414   --with-zlib=PATH        Use zlib in PATH
1415   --without-zlib-version-check Disable zlib version check
1416   --with-skey[=PATH]      Enable S/Key support (optionally in PATH)
1417   --with-tcp-wrappers[=PATH] Enable tcpwrappers support (optionally in PATH)
1418   --with-ldns[=PATH]      Use ldns for DNSSEC support (optionally in PATH)
1419   --with-libedit[=PATH]   Enable libedit support for sftp
1420   --with-audit=module     Enable audit support (modules=debug,bsm,linux)
1421   --with-ssl-dir=PATH     Specify path to OpenSSL installation
1422   --without-openssl-header-check Disable OpenSSL version consistency check
1423   --with-ssl-engine       Enable OpenSSL (hardware) ENGINE support
1424   --with-prngd-port=PORT  read entropy from PRNGD/EGD TCP localhost:PORT
1425   --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)
1426   --with-pam              Enable PAM support
1427   --with-privsep-user=user Specify non-privileged user for privilege separation
1428   --with-sandbox=style    Specify privilege separation sandbox (no, darwin, rlimit, systrace, seccomp_filter)
1429   --with-selinux          Enable SELinux support
1430   --with-kerberos5=PATH   Enable Kerberos 5 support
1431   --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)
1432   --with-xauth=PATH       Specify path to xauth program
1433   --with-maildir=/path/to/mail    Specify your system mail directory
1434   --with-mantype=man|cat|doc  Set man page type
1435   --with-md5-passwords    Enable use of MD5 passwords
1436   --without-shadow        Disable shadow password support
1437   --with-ipaddr-display   Use ip address instead of hostname in \$DISPLAY
1438   --with-default-path=    Specify default \$PATH environment for server
1439   --with-superuser-path=  Specify different path for super-user
1440   --with-4in6             Check for and convert IPv4 in IPv6 mapped addresses
1441   --with-bsd-auth         Enable BSD auth support
1442   --with-pid-dir=PATH     Specify location of ssh.pid file
1443   --with-lastlog=FILE|DIR specify lastlog location common locations
1444
1445 Some influential environment variables:
1446   CC          C compiler command
1447   CFLAGS      C compiler flags
1448   LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
1449               nonstandard directory <lib dir>
1450   LIBS        libraries to pass to the linker, e.g. -l<library>
1451   CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1452               you have headers in a nonstandard directory <include dir>
1453   CPP         C preprocessor
1454
1455 Use these variables to override the choices made by `configure' or to help
1456 it to find libraries and programs with nonstandard names/locations.
1457
1458 Report bugs to <openssh-unix-dev@mindrot.org>.
1459 _ACEOF
1460 ac_status=$?
1461 fi
1462
1463 if test "$ac_init_help" = "recursive"; then
1464   # If there are subdirs, report their specific --help.
1465   for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1466     test -d "$ac_dir" ||
1467       { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1468       continue
1469     ac_builddir=.
1470
1471 case "$ac_dir" in
1472 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1473 *)
1474   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1475   # A ".." for each directory in $ac_dir_suffix.
1476   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1477   case $ac_top_builddir_sub in
1478   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1479   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1480   esac ;;
1481 esac
1482 ac_abs_top_builddir=$ac_pwd
1483 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1484 # for backward compatibility:
1485 ac_top_builddir=$ac_top_build_prefix
1486
1487 case $srcdir in
1488   .)  # We are building in place.
1489     ac_srcdir=.
1490     ac_top_srcdir=$ac_top_builddir_sub
1491     ac_abs_top_srcdir=$ac_pwd ;;
1492   [\\/]* | ?:[\\/]* )  # Absolute name.
1493     ac_srcdir=$srcdir$ac_dir_suffix;
1494     ac_top_srcdir=$srcdir
1495     ac_abs_top_srcdir=$srcdir ;;
1496   *) # Relative name.
1497     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1498     ac_top_srcdir=$ac_top_build_prefix$srcdir
1499     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1500 esac
1501 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1502
1503     cd "$ac_dir" || { ac_status=$?; continue; }
1504     # Check for guested configure.
1505     if test -f "$ac_srcdir/configure.gnu"; then
1506       echo &&
1507       $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1508     elif test -f "$ac_srcdir/configure"; then
1509       echo &&
1510       $SHELL "$ac_srcdir/configure" --help=recursive
1511     else
1512       $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1513     fi || ac_status=$?
1514     cd "$ac_pwd" || { ac_status=$?; break; }
1515   done
1516 fi
1517
1518 test -n "$ac_init_help" && exit $ac_status
1519 if $ac_init_version; then
1520   cat <<\_ACEOF
1521 OpenSSH configure Portable
1522 generated by GNU Autoconf 2.68
1523
1524 Copyright (C) 2010 Free Software Foundation, Inc.
1525 This configure script is free software; the Free Software Foundation
1526 gives unlimited permission to copy, distribute and modify it.
1527 _ACEOF
1528   exit
1529 fi
1530
1531 ## ------------------------ ##
1532 ## Autoconf initialization. ##
1533 ## ------------------------ ##
1534
1535 # ac_fn_c_try_compile LINENO
1536 # --------------------------
1537 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1538 ac_fn_c_try_compile ()
1539 {
1540   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1541   rm -f conftest.$ac_objext
1542   if { { ac_try="$ac_compile"
1543 case "(($ac_try" in
1544   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1545   *) ac_try_echo=$ac_try;;
1546 esac
1547 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1548 $as_echo "$ac_try_echo"; } >&5
1549   (eval "$ac_compile") 2>conftest.err
1550   ac_status=$?
1551   if test -s conftest.err; then
1552     grep -v '^ *+' conftest.err >conftest.er1
1553     cat conftest.er1 >&5
1554     mv -f conftest.er1 conftest.err
1555   fi
1556   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1557   test $ac_status = 0; } && {
1558          test -z "$ac_c_werror_flag" ||
1559          test ! -s conftest.err
1560        } && test -s conftest.$ac_objext; then :
1561   ac_retval=0
1562 else
1563   $as_echo "$as_me: failed program was:" >&5
1564 sed 's/^/| /' conftest.$ac_ext >&5
1565
1566         ac_retval=1
1567 fi
1568   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1569   as_fn_set_status $ac_retval
1570
1571 } # ac_fn_c_try_compile
1572
1573 # ac_fn_c_try_run LINENO
1574 # ----------------------
1575 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1576 # that executables *can* be run.
1577 ac_fn_c_try_run ()
1578 {
1579   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1580   if { { ac_try="$ac_link"
1581 case "(($ac_try" in
1582   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1583   *) ac_try_echo=$ac_try;;
1584 esac
1585 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1586 $as_echo "$ac_try_echo"; } >&5
1587   (eval "$ac_link") 2>&5
1588   ac_status=$?
1589   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1590   test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1591   { { case "(($ac_try" in
1592   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1593   *) ac_try_echo=$ac_try;;
1594 esac
1595 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1596 $as_echo "$ac_try_echo"; } >&5
1597   (eval "$ac_try") 2>&5
1598   ac_status=$?
1599   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1600   test $ac_status = 0; }; }; then :
1601   ac_retval=0
1602 else
1603   $as_echo "$as_me: program exited with status $ac_status" >&5
1604        $as_echo "$as_me: failed program was:" >&5
1605 sed 's/^/| /' conftest.$ac_ext >&5
1606
1607        ac_retval=$ac_status
1608 fi
1609   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1610   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1611   as_fn_set_status $ac_retval
1612
1613 } # ac_fn_c_try_run
1614
1615 # ac_fn_c_try_cpp LINENO
1616 # ----------------------
1617 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1618 ac_fn_c_try_cpp ()
1619 {
1620   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1621   if { { ac_try="$ac_cpp conftest.$ac_ext"
1622 case "(($ac_try" in
1623   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1624   *) ac_try_echo=$ac_try;;
1625 esac
1626 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1627 $as_echo "$ac_try_echo"; } >&5
1628   (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1629   ac_status=$?
1630   if test -s conftest.err; then
1631     grep -v '^ *+' conftest.err >conftest.er1
1632     cat conftest.er1 >&5
1633     mv -f conftest.er1 conftest.err
1634   fi
1635   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1636   test $ac_status = 0; } > conftest.i && {
1637          test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1638          test ! -s conftest.err
1639        }; then :
1640   ac_retval=0
1641 else
1642   $as_echo "$as_me: failed program was:" >&5
1643 sed 's/^/| /' conftest.$ac_ext >&5
1644
1645     ac_retval=1
1646 fi
1647   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1648   as_fn_set_status $ac_retval
1649
1650 } # ac_fn_c_try_cpp
1651
1652 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1653 # -------------------------------------------------------
1654 # Tests whether HEADER exists and can be compiled using the include files in
1655 # INCLUDES, setting the cache variable VAR accordingly.
1656 ac_fn_c_check_header_compile ()
1657 {
1658   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1659   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1660 $as_echo_n "checking for $2... " >&6; }
1661 if eval \${$3+:} false; then :
1662   $as_echo_n "(cached) " >&6
1663 else
1664   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1665 /* end confdefs.h.  */
1666 $4
1667 #include <$2>
1668 _ACEOF
1669 if ac_fn_c_try_compile "$LINENO"; then :
1670   eval "$3=yes"
1671 else
1672   eval "$3=no"
1673 fi
1674 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1675 fi
1676 eval ac_res=\$$3
1677                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1678 $as_echo "$ac_res" >&6; }
1679   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1680
1681 } # ac_fn_c_check_header_compile
1682
1683 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1684 # ---------------------------------------------
1685 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1686 # accordingly.
1687 ac_fn_c_check_decl ()
1688 {
1689   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1690   as_decl_name=`echo $2|sed 's/ *(.*//'`
1691   as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1692   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1693 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1694 if eval \${$3+:} false; then :
1695   $as_echo_n "(cached) " >&6
1696 else
1697   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1698 /* end confdefs.h.  */
1699 $4
1700 int
1701 main ()
1702 {
1703 #ifndef $as_decl_name
1704 #ifdef __cplusplus
1705   (void) $as_decl_use;
1706 #else
1707   (void) $as_decl_name;
1708 #endif
1709 #endif
1710
1711   ;
1712   return 0;
1713 }
1714 _ACEOF
1715 if ac_fn_c_try_compile "$LINENO"; then :
1716   eval "$3=yes"
1717 else
1718   eval "$3=no"
1719 fi
1720 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1721 fi
1722 eval ac_res=\$$3
1723                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1724 $as_echo "$ac_res" >&6; }
1725   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1726
1727 } # ac_fn_c_check_decl
1728
1729 # ac_fn_c_try_link LINENO
1730 # -----------------------
1731 # Try to link conftest.$ac_ext, and return whether this succeeded.
1732 ac_fn_c_try_link ()
1733 {
1734   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1735   rm -f conftest.$ac_objext conftest$ac_exeext
1736   if { { ac_try="$ac_link"
1737 case "(($ac_try" in
1738   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1739   *) ac_try_echo=$ac_try;;
1740 esac
1741 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1742 $as_echo "$ac_try_echo"; } >&5
1743   (eval "$ac_link") 2>conftest.err
1744   ac_status=$?
1745   if test -s conftest.err; then
1746     grep -v '^ *+' conftest.err >conftest.er1
1747     cat conftest.er1 >&5
1748     mv -f conftest.er1 conftest.err
1749   fi
1750   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1751   test $ac_status = 0; } && {
1752          test -z "$ac_c_werror_flag" ||
1753          test ! -s conftest.err
1754        } && test -s conftest$ac_exeext && {
1755          test "$cross_compiling" = yes ||
1756          $as_test_x conftest$ac_exeext
1757        }; then :
1758   ac_retval=0
1759 else
1760   $as_echo "$as_me: failed program was:" >&5
1761 sed 's/^/| /' conftest.$ac_ext >&5
1762
1763         ac_retval=1
1764 fi
1765   # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1766   # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1767   # interfere with the next link command; also delete a directory that is
1768   # left behind by Apple's compiler.  We do this before executing the actions.
1769   rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1770   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1771   as_fn_set_status $ac_retval
1772
1773 } # ac_fn_c_try_link
1774
1775 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1776 # -------------------------------------------------------
1777 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1778 # the include files in INCLUDES and setting the cache variable VAR
1779 # accordingly.
1780 ac_fn_c_check_header_mongrel ()
1781 {
1782   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1783   if eval \${$3+:} false; then :
1784   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1785 $as_echo_n "checking for $2... " >&6; }
1786 if eval \${$3+:} false; then :
1787   $as_echo_n "(cached) " >&6
1788 fi
1789 eval ac_res=\$$3
1790                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1791 $as_echo "$ac_res" >&6; }
1792 else
1793   # Is the header compilable?
1794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1795 $as_echo_n "checking $2 usability... " >&6; }
1796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1797 /* end confdefs.h.  */
1798 $4
1799 #include <$2>
1800 _ACEOF
1801 if ac_fn_c_try_compile "$LINENO"; then :
1802   ac_header_compiler=yes
1803 else
1804   ac_header_compiler=no
1805 fi
1806 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1808 $as_echo "$ac_header_compiler" >&6; }
1809
1810 # Is the header present?
1811 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1812 $as_echo_n "checking $2 presence... " >&6; }
1813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1814 /* end confdefs.h.  */
1815 #include <$2>
1816 _ACEOF
1817 if ac_fn_c_try_cpp "$LINENO"; then :
1818   ac_header_preproc=yes
1819 else
1820   ac_header_preproc=no
1821 fi
1822 rm -f conftest.err conftest.i conftest.$ac_ext
1823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1824 $as_echo "$ac_header_preproc" >&6; }
1825
1826 # So?  What about this header?
1827 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1828   yes:no: )
1829     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1830 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1831     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1832 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1833     ;;
1834   no:yes:* )
1835     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1836 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1837     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
1838 $as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
1839     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1840 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1841     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
1842 $as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
1843     { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1844 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1845 ( $as_echo "## ------------------------------------------- ##
1846 ## Report this to openssh-unix-dev@mindrot.org ##
1847 ## ------------------------------------------- ##"
1848      ) | sed "s/^/$as_me: WARNING:     /" >&2
1849     ;;
1850 esac
1851   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1852 $as_echo_n "checking for $2... " >&6; }
1853 if eval \${$3+:} false; then :
1854   $as_echo_n "(cached) " >&6
1855 else
1856   eval "$3=\$ac_header_compiler"
1857 fi
1858 eval ac_res=\$$3
1859                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1860 $as_echo "$ac_res" >&6; }
1861 fi
1862   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1863
1864 } # ac_fn_c_check_header_mongrel
1865
1866 # ac_fn_c_check_func LINENO FUNC VAR
1867 # ----------------------------------
1868 # Tests whether FUNC exists, setting the cache variable VAR accordingly
1869 ac_fn_c_check_func ()
1870 {
1871   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1872   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1873 $as_echo_n "checking for $2... " >&6; }
1874 if eval \${$3+:} false; then :
1875   $as_echo_n "(cached) " >&6
1876 else
1877   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1878 /* end confdefs.h.  */
1879 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1880    For example, HP-UX 11i <limits.h> declares gettimeofday.  */
1881 #define $2 innocuous_$2
1882
1883 /* System header to define __stub macros and hopefully few prototypes,
1884     which can conflict with char $2 (); below.
1885     Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1886     <limits.h> exists even on freestanding compilers.  */
1887
1888 #ifdef __STDC__
1889 # include <limits.h>
1890 #else
1891 # include <assert.h>
1892 #endif
1893
1894 #undef $2
1895
1896 /* Override any GCC internal prototype to avoid an error.
1897    Use char because int might match the return type of a GCC
1898    builtin and then its argument prototype would still apply.  */
1899 #ifdef __cplusplus
1900 extern "C"
1901 #endif
1902 char $2 ();
1903 /* The GNU C library defines this for functions which it implements
1904     to always fail with ENOSYS.  Some functions are actually named
1905     something starting with __ and the normal name is an alias.  */
1906 #if defined __stub_$2 || defined __stub___$2
1907 choke me
1908 #endif
1909
1910 int
1911 main ()
1912 {
1913 return $2 ();
1914   ;
1915   return 0;
1916 }
1917 _ACEOF
1918 if ac_fn_c_try_link "$LINENO"; then :
1919   eval "$3=yes"
1920 else
1921   eval "$3=no"
1922 fi
1923 rm -f core conftest.err conftest.$ac_objext \
1924     conftest$ac_exeext conftest.$ac_ext
1925 fi
1926 eval ac_res=\$$3
1927                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1928 $as_echo "$ac_res" >&6; }
1929   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1930
1931 } # ac_fn_c_check_func
1932
1933 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1934 # -------------------------------------------
1935 # Tests whether TYPE exists after having included INCLUDES, setting cache
1936 # variable VAR accordingly.
1937 ac_fn_c_check_type ()
1938 {
1939   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1940   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1941 $as_echo_n "checking for $2... " >&6; }
1942 if eval \${$3+:} false; then :
1943   $as_echo_n "(cached) " >&6
1944 else
1945   eval "$3=no"
1946   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1947 /* end confdefs.h.  */
1948 $4
1949 int
1950 main ()
1951 {
1952 if (sizeof ($2))
1953          return 0;
1954   ;
1955   return 0;
1956 }
1957 _ACEOF
1958 if ac_fn_c_try_compile "$LINENO"; then :
1959   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1960 /* end confdefs.h.  */
1961 $4
1962 int
1963 main ()
1964 {
1965 if (sizeof (($2)))
1966             return 0;
1967   ;
1968   return 0;
1969 }
1970 _ACEOF
1971 if ac_fn_c_try_compile "$LINENO"; then :
1972
1973 else
1974   eval "$3=yes"
1975 fi
1976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1977 fi
1978 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1979 fi
1980 eval ac_res=\$$3
1981                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1982 $as_echo "$ac_res" >&6; }
1983   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1984
1985 } # ac_fn_c_check_type
1986
1987 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1988 # --------------------------------------------
1989 # Tries to find the compile-time value of EXPR in a program that includes
1990 # INCLUDES, setting VAR accordingly. Returns whether the value could be
1991 # computed
1992 ac_fn_c_compute_int ()
1993 {
1994   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1995   if test "$cross_compiling" = yes; then
1996     # Depending upon the size, compute the lo and hi bounds.
1997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1998 /* end confdefs.h.  */
1999 $4
2000 int
2001 main ()
2002 {
2003 static int test_array [1 - 2 * !(($2) >= 0)];
2004 test_array [0] = 0
2005
2006   ;
2007   return 0;
2008 }
2009 _ACEOF
2010 if ac_fn_c_try_compile "$LINENO"; then :
2011   ac_lo=0 ac_mid=0
2012   while :; do
2013     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2014 /* end confdefs.h.  */
2015 $4
2016 int
2017 main ()
2018 {
2019 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2020 test_array [0] = 0
2021
2022   ;
2023   return 0;
2024 }
2025 _ACEOF
2026 if ac_fn_c_try_compile "$LINENO"; then :
2027   ac_hi=$ac_mid; break
2028 else
2029   as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2030                         if test $ac_lo -le $ac_mid; then
2031                           ac_lo= ac_hi=
2032                           break
2033                         fi
2034                         as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2035 fi
2036 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2037   done
2038 else
2039   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2040 /* end confdefs.h.  */
2041 $4
2042 int
2043 main ()
2044 {
2045 static int test_array [1 - 2 * !(($2) < 0)];
2046 test_array [0] = 0
2047
2048   ;
2049   return 0;
2050 }
2051 _ACEOF
2052 if ac_fn_c_try_compile "$LINENO"; then :
2053   ac_hi=-1 ac_mid=-1
2054   while :; do
2055     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2056 /* end confdefs.h.  */
2057 $4
2058 int
2059 main ()
2060 {
2061 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2062 test_array [0] = 0
2063
2064   ;
2065   return 0;
2066 }
2067 _ACEOF
2068 if ac_fn_c_try_compile "$LINENO"; then :
2069   ac_lo=$ac_mid; break
2070 else
2071   as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2072                         if test $ac_mid -le $ac_hi; then
2073                           ac_lo= ac_hi=
2074                           break
2075                         fi
2076                         as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2077 fi
2078 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079   done
2080 else
2081   ac_lo= ac_hi=
2082 fi
2083 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2084 fi
2085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2086 # Binary search between lo and hi bounds.
2087 while test "x$ac_lo" != "x$ac_hi"; do
2088   as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2089   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2090 /* end confdefs.h.  */
2091 $4
2092 int
2093 main ()
2094 {
2095 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2096 test_array [0] = 0
2097
2098   ;
2099   return 0;
2100 }
2101 _ACEOF
2102 if ac_fn_c_try_compile "$LINENO"; then :
2103   ac_hi=$ac_mid
2104 else
2105   as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2106 fi
2107 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2108 done
2109 case $ac_lo in #((
2110 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2111 '') ac_retval=1 ;;
2112 esac
2113   else
2114     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2115 /* end confdefs.h.  */
2116 $4
2117 static long int longval () { return $2; }
2118 static unsigned long int ulongval () { return $2; }
2119 #include <stdio.h>
2120 #include <stdlib.h>
2121 int
2122 main ()
2123 {
2124
2125   FILE *f = fopen ("conftest.val", "w");
2126   if (! f)
2127     return 1;
2128   if (($2) < 0)
2129     {
2130       long int i = longval ();
2131       if (i != ($2))
2132         return 1;
2133       fprintf (f, "%ld", i);
2134     }
2135   else
2136     {
2137       unsigned long int i = ulongval ();
2138       if (i != ($2))
2139         return 1;
2140       fprintf (f, "%lu", i);
2141     }
2142   /* Do not output a trailing newline, as this causes \r\n confusion
2143      on some platforms.  */
2144   return ferror (f) || fclose (f) != 0;
2145
2146   ;
2147   return 0;
2148 }
2149 _ACEOF
2150 if ac_fn_c_try_run "$LINENO"; then :
2151   echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2152 else
2153   ac_retval=1
2154 fi
2155 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2156   conftest.$ac_objext conftest.beam conftest.$ac_ext
2157 rm -f conftest.val
2158
2159   fi
2160   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2161   as_fn_set_status $ac_retval
2162
2163 } # ac_fn_c_compute_int
2164
2165 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2166 # ----------------------------------------------------
2167 # Tries to find if the field MEMBER exists in type AGGR, after including
2168 # INCLUDES, setting cache variable VAR accordingly.
2169 ac_fn_c_check_member ()
2170 {
2171   as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2172   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2173 $as_echo_n "checking for $2.$3... " >&6; }
2174 if eval \${$4+:} false; then :
2175   $as_echo_n "(cached) " >&6
2176 else
2177   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2178 /* end confdefs.h.  */
2179 $5
2180 int
2181 main ()
2182 {
2183 static $2 ac_aggr;
2184 if (ac_aggr.$3)
2185 return 0;
2186   ;
2187   return 0;
2188 }
2189 _ACEOF
2190 if ac_fn_c_try_compile "$LINENO"; then :
2191   eval "$4=yes"
2192 else
2193   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2194 /* end confdefs.h.  */
2195 $5
2196 int
2197 main ()
2198 {
2199 static $2 ac_aggr;
2200 if (sizeof ac_aggr.$3)
2201 return 0;
2202   ;
2203   return 0;
2204 }
2205 _ACEOF
2206 if ac_fn_c_try_compile "$LINENO"; then :
2207   eval "$4=yes"
2208 else
2209   eval "$4=no"
2210 fi
2211 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2212 fi
2213 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2214 fi
2215 eval ac_res=\$$4
2216                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2217 $as_echo "$ac_res" >&6; }
2218   eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2219
2220 } # ac_fn_c_check_member
2221 cat >config.log <<_ACEOF
2222 This file contains any messages produced by compilers while
2223 running configure, to aid debugging if configure makes a mistake.
2224
2225 It was created by OpenSSH $as_me Portable, which was
2226 generated by GNU Autoconf 2.68.  Invocation command line was
2227
2228   $ $0 $@
2229
2230 _ACEOF
2231 exec 5>>config.log
2232 {
2233 cat <<_ASUNAME
2234 ## --------- ##
2235 ## Platform. ##
2236 ## --------- ##
2237
2238 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2239 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2240 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2241 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2242 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2243
2244 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2245 /bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
2246
2247 /bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
2248 /usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
2249 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2250 /usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
2251 /bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
2252 /usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
2253 /bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
2254
2255 _ASUNAME
2256
2257 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2258 for as_dir in $PATH
2259 do
2260   IFS=$as_save_IFS
2261   test -z "$as_dir" && as_dir=.
2262     $as_echo "PATH: $as_dir"
2263   done
2264 IFS=$as_save_IFS
2265
2266 } >&5
2267
2268 cat >&5 <<_ACEOF
2269
2270
2271 ## ----------- ##
2272 ## Core tests. ##
2273 ## ----------- ##
2274
2275 _ACEOF
2276
2277
2278 # Keep a trace of the command line.
2279 # Strip out --no-create and --no-recursion so they do not pile up.
2280 # Strip out --silent because we don't want to record it for future runs.
2281 # Also quote any args containing shell meta-characters.
2282 # Make two passes to allow for proper duplicate-argument suppression.
2283 ac_configure_args=
2284 ac_configure_args0=
2285 ac_configure_args1=
2286 ac_must_keep_next=false
2287 for ac_pass in 1 2
2288 do
2289   for ac_arg
2290   do
2291     case $ac_arg in
2292     -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2293     -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2294     | -silent | --silent | --silen | --sile | --sil)
2295       continue ;;
2296     *\'*)
2297       ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2298     esac
2299     case $ac_pass in
2300     1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2301     2)
2302       as_fn_append ac_configure_args1 " '$ac_arg'"
2303       if test $ac_must_keep_next = true; then
2304         ac_must_keep_next=false # Got value, back to normal.
2305       else
2306         case $ac_arg in
2307           *=* | --config-cache | -C | -disable-* | --disable-* \
2308           | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2309           | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2310           | -with-* | --with-* | -without-* | --without-* | --x)
2311             case "$ac_configure_args0 " in
2312               "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2313             esac
2314             ;;
2315           -* ) ac_must_keep_next=true ;;
2316         esac
2317       fi
2318       as_fn_append ac_configure_args " '$ac_arg'"
2319       ;;
2320     esac
2321   done
2322 done
2323 { ac_configure_args0=; unset ac_configure_args0;}
2324 { ac_configure_args1=; unset ac_configure_args1;}
2325
2326 # When interrupted or exit'd, cleanup temporary files, and complete
2327 # config.log.  We remove comments because anyway the quotes in there
2328 # would cause problems or look ugly.
2329 # WARNING: Use '\'' to represent an apostrophe within the trap.
2330 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2331 trap 'exit_status=$?
2332   # Save into config.log some information that might help in debugging.
2333   {
2334     echo
2335
2336     $as_echo "## ---------------- ##
2337 ## Cache variables. ##
2338 ## ---------------- ##"
2339     echo
2340     # The following way of writing the cache mishandles newlines in values,
2341 (
2342   for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2343     eval ac_val=\$$ac_var
2344     case $ac_val in #(
2345     *${as_nl}*)
2346       case $ac_var in #(
2347       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2348 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2349       esac
2350       case $ac_var in #(
2351       _ | IFS | as_nl) ;; #(
2352       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2353       *) { eval $ac_var=; unset $ac_var;} ;;
2354       esac ;;
2355     esac
2356   done
2357   (set) 2>&1 |
2358     case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2359     *${as_nl}ac_space=\ *)
2360       sed -n \
2361         "s/'\''/'\''\\\\'\'''\''/g;
2362           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2363       ;; #(
2364     *)
2365       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2366       ;;
2367     esac |
2368     sort
2369 )
2370     echo
2371
2372     $as_echo "## ----------------- ##
2373 ## Output variables. ##
2374 ## ----------------- ##"
2375     echo
2376     for ac_var in $ac_subst_vars
2377     do
2378       eval ac_val=\$$ac_var
2379       case $ac_val in
2380       *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2381       esac
2382       $as_echo "$ac_var='\''$ac_val'\''"
2383     done | sort
2384     echo
2385
2386     if test -n "$ac_subst_files"; then
2387       $as_echo "## ------------------- ##
2388 ## File substitutions. ##
2389 ## ------------------- ##"
2390       echo
2391       for ac_var in $ac_subst_files
2392       do
2393         eval ac_val=\$$ac_var
2394         case $ac_val in
2395         *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2396         esac
2397         $as_echo "$ac_var='\''$ac_val'\''"
2398       done | sort
2399       echo
2400     fi
2401
2402     if test -s confdefs.h; then
2403       $as_echo "## ----------- ##
2404 ## confdefs.h. ##
2405 ## ----------- ##"
2406       echo
2407       cat confdefs.h
2408       echo
2409     fi
2410     test "$ac_signal" != 0 &&
2411       $as_echo "$as_me: caught signal $ac_signal"
2412     $as_echo "$as_me: exit $exit_status"
2413   } >&5
2414   rm -f core *.core core.conftest.* &&
2415     rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2416     exit $exit_status
2417 ' 0
2418 for ac_signal in 1 2 13 15; do
2419   trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2420 done
2421 ac_signal=0
2422
2423 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2424 rm -f -r conftest* confdefs.h
2425
2426 $as_echo "/* confdefs.h */" > confdefs.h
2427
2428 # Predefined preprocessor variables.
2429
2430 cat >>confdefs.h <<_ACEOF
2431 #define PACKAGE_NAME "$PACKAGE_NAME"
2432 _ACEOF
2433
2434 cat >>confdefs.h <<_ACEOF
2435 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2436 _ACEOF
2437
2438 cat >>confdefs.h <<_ACEOF
2439 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2440 _ACEOF
2441
2442 cat >>confdefs.h <<_ACEOF
2443 #define PACKAGE_STRING "$PACKAGE_STRING"
2444 _ACEOF
2445
2446 cat >>confdefs.h <<_ACEOF
2447 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2448 _ACEOF
2449
2450 cat >>confdefs.h <<_ACEOF
2451 #define PACKAGE_URL "$PACKAGE_URL"
2452 _ACEOF
2453
2454
2455 # Let the site file select an alternate cache file if it wants to.
2456 # Prefer an explicitly selected file to automatically selected ones.
2457 ac_site_file1=NONE
2458 ac_site_file2=NONE
2459 if test -n "$CONFIG_SITE"; then
2460   # We do not want a PATH search for config.site.
2461   case $CONFIG_SITE in #((
2462     -*)  ac_site_file1=./$CONFIG_SITE;;
2463     */*) ac_site_file1=$CONFIG_SITE;;
2464     *)   ac_site_file1=./$CONFIG_SITE;;
2465   esac
2466 elif test "x$prefix" != xNONE; then
2467   ac_site_file1=$prefix/share/config.site
2468   ac_site_file2=$prefix/etc/config.site
2469 else
2470   ac_site_file1=$ac_default_prefix/share/config.site
2471   ac_site_file2=$ac_default_prefix/etc/config.site
2472 fi
2473 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2474 do
2475   test "x$ac_site_file" = xNONE && continue
2476   if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2477     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2478 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2479     sed 's/^/| /' "$ac_site_file" >&5
2480     . "$ac_site_file" \
2481       || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2482 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2483 as_fn_error $? "failed to load site script $ac_site_file
2484 See \`config.log' for more details" "$LINENO" 5; }
2485   fi
2486 done
2487
2488 if test -r "$cache_file"; then
2489   # Some versions of bash will fail to source /dev/null (special files
2490   # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
2491   if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2492     { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2493 $as_echo "$as_me: loading cache $cache_file" >&6;}
2494     case $cache_file in
2495       [\\/]* | ?:[\\/]* ) . "$cache_file";;
2496       *)                      . "./$cache_file";;
2497     esac
2498   fi
2499 else
2500   { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2501 $as_echo "$as_me: creating cache $cache_file" >&6;}
2502   >$cache_file
2503 fi
2504
2505 # Check that the precious variables saved in the cache have kept the same
2506 # value.
2507 ac_cache_corrupted=false
2508 for ac_var in $ac_precious_vars; do
2509   eval ac_old_set=\$ac_cv_env_${ac_var}_set
2510   eval ac_new_set=\$ac_env_${ac_var}_set
2511   eval ac_old_val=\$ac_cv_env_${ac_var}_value
2512   eval ac_new_val=\$ac_env_${ac_var}_value
2513   case $ac_old_set,$ac_new_set in
2514     set,)
2515       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2516 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2517       ac_cache_corrupted=: ;;
2518     ,set)
2519       { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2520 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2521       ac_cache_corrupted=: ;;
2522     ,);;
2523     *)
2524       if test "x$ac_old_val" != "x$ac_new_val"; then
2525         # differences in whitespace do not lead to failure.
2526         ac_old_val_w=`echo x $ac_old_val`
2527         ac_new_val_w=`echo x $ac_new_val`
2528         if test "$ac_old_val_w" != "$ac_new_val_w"; then
2529           { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2530 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2531           ac_cache_corrupted=:
2532         else
2533           { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2534 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2535           eval $ac_var=\$ac_old_val
2536         fi
2537         { $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
2538 $as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
2539         { $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
2540 $as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
2541       fi;;
2542   esac
2543   # Pass precious variables to config.status.
2544   if test "$ac_new_set" = set; then
2545     case $ac_new_val in
2546     *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2547     *) ac_arg=$ac_var=$ac_new_val ;;
2548     esac
2549     case " $ac_configure_args " in
2550       *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
2551       *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2552     esac
2553   fi
2554 done
2555 if $ac_cache_corrupted; then
2556   { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2557 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2558   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2559 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2560   as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2561 fi
2562 ## -------------------- ##
2563 ## Main body of script. ##
2564 ## -------------------- ##
2565
2566 ac_ext=c
2567 ac_cpp='$CPP $CPPFLAGS'
2568 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2569 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2570 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2571
2572
2573
2574
2575 ac_ext=c
2576 ac_cpp='$CPP $CPPFLAGS'
2577 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2578 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2579 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2580
2581
2582 ac_config_headers="$ac_config_headers config.h"
2583
2584 ac_ext=c
2585 ac_cpp='$CPP $CPPFLAGS'
2586 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2587 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2588 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2589 if test -n "$ac_tool_prefix"; then
2590   # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2591 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2593 $as_echo_n "checking for $ac_word... " >&6; }
2594 if ${ac_cv_prog_CC+:} false; then :
2595   $as_echo_n "(cached) " >&6
2596 else
2597   if test -n "$CC"; then
2598   ac_cv_prog_CC="$CC" # Let the user override the test.
2599 else
2600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2601 for as_dir in $PATH
2602 do
2603   IFS=$as_save_IFS
2604   test -z "$as_dir" && as_dir=.
2605     for ac_exec_ext in '' $ac_executable_extensions; do
2606   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2607     ac_cv_prog_CC="${ac_tool_prefix}gcc"
2608     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2609     break 2
2610   fi
2611 done
2612   done
2613 IFS=$as_save_IFS
2614
2615 fi
2616 fi
2617 CC=$ac_cv_prog_CC
2618 if test -n "$CC"; then
2619   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2620 $as_echo "$CC" >&6; }
2621 else
2622   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2623 $as_echo "no" >&6; }
2624 fi
2625
2626
2627 fi
2628 if test -z "$ac_cv_prog_CC"; then
2629   ac_ct_CC=$CC
2630   # Extract the first word of "gcc", so it can be a program name with args.
2631 set dummy gcc; ac_word=$2
2632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2633 $as_echo_n "checking for $ac_word... " >&6; }
2634 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2635   $as_echo_n "(cached) " >&6
2636 else
2637   if test -n "$ac_ct_CC"; then
2638   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2639 else
2640 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2641 for as_dir in $PATH
2642 do
2643   IFS=$as_save_IFS
2644   test -z "$as_dir" && as_dir=.
2645     for ac_exec_ext in '' $ac_executable_extensions; do
2646   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2647     ac_cv_prog_ac_ct_CC="gcc"
2648     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2649     break 2
2650   fi
2651 done
2652   done
2653 IFS=$as_save_IFS
2654
2655 fi
2656 fi
2657 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2658 if test -n "$ac_ct_CC"; then
2659   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2660 $as_echo "$ac_ct_CC" >&6; }
2661 else
2662   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2663 $as_echo "no" >&6; }
2664 fi
2665
2666   if test "x$ac_ct_CC" = x; then
2667     CC=""
2668   else
2669     case $cross_compiling:$ac_tool_warned in
2670 yes:)
2671 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2672 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2673 ac_tool_warned=yes ;;
2674 esac
2675     CC=$ac_ct_CC
2676   fi
2677 else
2678   CC="$ac_cv_prog_CC"
2679 fi
2680
2681 if test -z "$CC"; then
2682           if test -n "$ac_tool_prefix"; then
2683     # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
2684 set dummy ${ac_tool_prefix}cc; ac_word=$2
2685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2686 $as_echo_n "checking for $ac_word... " >&6; }
2687 if ${ac_cv_prog_CC+:} false; then :
2688   $as_echo_n "(cached) " >&6
2689 else
2690   if test -n "$CC"; then
2691   ac_cv_prog_CC="$CC" # Let the user override the test.
2692 else
2693 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2694 for as_dir in $PATH
2695 do
2696   IFS=$as_save_IFS
2697   test -z "$as_dir" && as_dir=.
2698     for ac_exec_ext in '' $ac_executable_extensions; do
2699   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2700     ac_cv_prog_CC="${ac_tool_prefix}cc"
2701     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2702     break 2
2703   fi
2704 done
2705   done
2706 IFS=$as_save_IFS
2707
2708 fi
2709 fi
2710 CC=$ac_cv_prog_CC
2711 if test -n "$CC"; then
2712   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2713 $as_echo "$CC" >&6; }
2714 else
2715   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2716 $as_echo "no" >&6; }
2717 fi
2718
2719
2720   fi
2721 fi
2722 if test -z "$CC"; then
2723   # Extract the first word of "cc", so it can be a program name with args.
2724 set dummy cc; ac_word=$2
2725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2726 $as_echo_n "checking for $ac_word... " >&6; }
2727 if ${ac_cv_prog_CC+:} false; then :
2728   $as_echo_n "(cached) " >&6
2729 else
2730   if test -n "$CC"; then
2731   ac_cv_prog_CC="$CC" # Let the user override the test.
2732 else
2733   ac_prog_rejected=no
2734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2735 for as_dir in $PATH
2736 do
2737   IFS=$as_save_IFS
2738   test -z "$as_dir" && as_dir=.
2739     for ac_exec_ext in '' $ac_executable_extensions; do
2740   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2741     if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
2742        ac_prog_rejected=yes
2743        continue
2744      fi
2745     ac_cv_prog_CC="cc"
2746     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2747     break 2
2748   fi
2749 done
2750   done
2751 IFS=$as_save_IFS
2752
2753 if test $ac_prog_rejected = yes; then
2754   # We found a bogon in the path, so make sure we never use it.
2755   set dummy $ac_cv_prog_CC
2756   shift
2757   if test $# != 0; then
2758     # We chose a different compiler from the bogus one.
2759     # However, it has the same basename, so the bogon will be chosen
2760     # first if we set CC to just the basename; use the full file name.
2761     shift
2762     ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
2763   fi
2764 fi
2765 fi
2766 fi
2767 CC=$ac_cv_prog_CC
2768 if test -n "$CC"; then
2769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2770 $as_echo "$CC" >&6; }
2771 else
2772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2773 $as_echo "no" >&6; }
2774 fi
2775
2776
2777 fi
2778 if test -z "$CC"; then
2779   if test -n "$ac_tool_prefix"; then
2780   for ac_prog in cl.exe
2781   do
2782     # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2783 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2785 $as_echo_n "checking for $ac_word... " >&6; }
2786 if ${ac_cv_prog_CC+:} false; then :
2787   $as_echo_n "(cached) " >&6
2788 else
2789   if test -n "$CC"; then
2790   ac_cv_prog_CC="$CC" # Let the user override the test.
2791 else
2792 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2793 for as_dir in $PATH
2794 do
2795   IFS=$as_save_IFS
2796   test -z "$as_dir" && as_dir=.
2797     for ac_exec_ext in '' $ac_executable_extensions; do
2798   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2799     ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2800     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2801     break 2
2802   fi
2803 done
2804   done
2805 IFS=$as_save_IFS
2806
2807 fi
2808 fi
2809 CC=$ac_cv_prog_CC
2810 if test -n "$CC"; then
2811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2812 $as_echo "$CC" >&6; }
2813 else
2814   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2815 $as_echo "no" >&6; }
2816 fi
2817
2818
2819     test -n "$CC" && break
2820   done
2821 fi
2822 if test -z "$CC"; then
2823   ac_ct_CC=$CC
2824   for ac_prog in cl.exe
2825 do
2826   # Extract the first word of "$ac_prog", so it can be a program name with args.
2827 set dummy $ac_prog; ac_word=$2
2828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2829 $as_echo_n "checking for $ac_word... " >&6; }
2830 if ${ac_cv_prog_ac_ct_CC+:} false; then :
2831   $as_echo_n "(cached) " >&6
2832 else
2833   if test -n "$ac_ct_CC"; then
2834   ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
2835 else
2836 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2837 for as_dir in $PATH
2838 do
2839   IFS=$as_save_IFS
2840   test -z "$as_dir" && as_dir=.
2841     for ac_exec_ext in '' $ac_executable_extensions; do
2842   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2843     ac_cv_prog_ac_ct_CC="$ac_prog"
2844     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2845     break 2
2846   fi
2847 done
2848   done
2849 IFS=$as_save_IFS
2850
2851 fi
2852 fi
2853 ac_ct_CC=$ac_cv_prog_ac_ct_CC
2854 if test -n "$ac_ct_CC"; then
2855   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2856 $as_echo "$ac_ct_CC" >&6; }
2857 else
2858   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2859 $as_echo "no" >&6; }
2860 fi
2861
2862
2863   test -n "$ac_ct_CC" && break
2864 done
2865
2866   if test "x$ac_ct_CC" = x; then
2867     CC=""
2868   else
2869     case $cross_compiling:$ac_tool_warned in
2870 yes:)
2871 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2872 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2873 ac_tool_warned=yes ;;
2874 esac
2875     CC=$ac_ct_CC
2876   fi
2877 fi
2878
2879 fi
2880
2881
2882 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2883 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2884 as_fn_error $? "no acceptable C compiler found in \$PATH
2885 See \`config.log' for more details" "$LINENO" 5; }
2886
2887 # Provide some information about the compiler.
2888 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2889 set X $ac_compile
2890 ac_compiler=$2
2891 for ac_option in --version -v -V -qversion; do
2892   { { ac_try="$ac_compiler $ac_option >&5"
2893 case "(($ac_try" in
2894   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2895   *) ac_try_echo=$ac_try;;
2896 esac
2897 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2898 $as_echo "$ac_try_echo"; } >&5
2899   (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2900   ac_status=$?
2901   if test -s conftest.err; then
2902     sed '10a\
2903 ... rest of stderr output deleted ...
2904          10q' conftest.err >conftest.er1
2905     cat conftest.er1 >&5
2906   fi
2907   rm -f conftest.er1 conftest.err
2908   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2909   test $ac_status = 0; }
2910 done
2911
2912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2913 /* end confdefs.h.  */
2914
2915 int
2916 main ()
2917 {
2918
2919   ;
2920   return 0;
2921 }
2922 _ACEOF
2923 ac_clean_files_save=$ac_clean_files
2924 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2925 # Try to create an executable without -o first, disregard a.out.
2926 # It will help us diagnose broken compilers, and finding out an intuition
2927 # of exeext.
2928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2929 $as_echo_n "checking whether the C compiler works... " >&6; }
2930 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2931
2932 # The possible output files:
2933 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2934
2935 ac_rmfiles=
2936 for ac_file in $ac_files
2937 do
2938   case $ac_file in
2939     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2940     * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2941   esac
2942 done
2943 rm -f $ac_rmfiles
2944
2945 if { { ac_try="$ac_link_default"
2946 case "(($ac_try" in
2947   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2948   *) ac_try_echo=$ac_try;;
2949 esac
2950 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2951 $as_echo "$ac_try_echo"; } >&5
2952   (eval "$ac_link_default") 2>&5
2953   ac_status=$?
2954   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2955   test $ac_status = 0; }; then :
2956   # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2957 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2958 # in a Makefile.  We should not override ac_cv_exeext if it was cached,
2959 # so that the user can short-circuit this test for compilers unknown to
2960 # Autoconf.
2961 for ac_file in $ac_files ''
2962 do
2963   test -f "$ac_file" || continue
2964   case $ac_file in
2965     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2966         ;;
2967     [ab].out )
2968         # We found the default executable, but exeext='' is most
2969         # certainly right.
2970         break;;
2971     *.* )
2972         if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2973         then :; else
2974            ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2975         fi
2976         # We set ac_cv_exeext here because the later test for it is not
2977         # safe: cross compilers may not add the suffix if given an `-o'
2978         # argument, so we may need to know it at that point already.
2979         # Even if this section looks crufty: it has the advantage of
2980         # actually working.
2981         break;;
2982     * )
2983         break;;
2984   esac
2985 done
2986 test "$ac_cv_exeext" = no && ac_cv_exeext=
2987
2988 else
2989   ac_file=''
2990 fi
2991 if test -z "$ac_file"; then :
2992   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2993 $as_echo "no" >&6; }
2994 $as_echo "$as_me: failed program was:" >&5
2995 sed 's/^/| /' conftest.$ac_ext >&5
2996
2997 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2998 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2999 as_fn_error 77 "C compiler cannot create executables
3000 See \`config.log' for more details" "$LINENO" 5; }
3001 else
3002   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3003 $as_echo "yes" >&6; }
3004 fi
3005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3006 $as_echo_n "checking for C compiler default output file name... " >&6; }
3007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3008 $as_echo "$ac_file" >&6; }
3009 ac_exeext=$ac_cv_exeext
3010
3011 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3012 ac_clean_files=$ac_clean_files_save
3013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3014 $as_echo_n "checking for suffix of executables... " >&6; }
3015 if { { ac_try="$ac_link"
3016 case "(($ac_try" in
3017   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3018   *) ac_try_echo=$ac_try;;
3019 esac
3020 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3021 $as_echo "$ac_try_echo"; } >&5
3022   (eval "$ac_link") 2>&5
3023   ac_status=$?
3024   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3025   test $ac_status = 0; }; then :
3026   # If both `conftest.exe' and `conftest' are `present' (well, observable)
3027 # catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
3028 # work properly (i.e., refer to `conftest.exe'), while it won't with
3029 # `rm'.
3030 for ac_file in conftest.exe conftest conftest.*; do
3031   test -f "$ac_file" || continue
3032   case $ac_file in
3033     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3034     *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3035           break;;
3036     * ) break;;
3037   esac
3038 done
3039 else
3040   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3041 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3042 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3043 See \`config.log' for more details" "$LINENO" 5; }
3044 fi
3045 rm -f conftest conftest$ac_cv_exeext
3046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3047 $as_echo "$ac_cv_exeext" >&6; }
3048
3049 rm -f conftest.$ac_ext
3050 EXEEXT=$ac_cv_exeext
3051 ac_exeext=$EXEEXT
3052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3053 /* end confdefs.h.  */
3054 #include <stdio.h>
3055 int
3056 main ()
3057 {
3058 FILE *f = fopen ("conftest.out", "w");
3059  return ferror (f) || fclose (f) != 0;
3060
3061   ;
3062   return 0;
3063 }
3064 _ACEOF
3065 ac_clean_files="$ac_clean_files conftest.out"
3066 # Check that the compiler produces executables we can run.  If not, either
3067 # the compiler is broken, or we cross compile.
3068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3069 $as_echo_n "checking whether we are cross compiling... " >&6; }
3070 if test "$cross_compiling" != yes; then
3071   { { ac_try="$ac_link"
3072 case "(($ac_try" in
3073   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3074   *) ac_try_echo=$ac_try;;
3075 esac
3076 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3077 $as_echo "$ac_try_echo"; } >&5
3078   (eval "$ac_link") 2>&5
3079   ac_status=$?
3080   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3081   test $ac_status = 0; }
3082   if { ac_try='./conftest$ac_cv_exeext'
3083   { { case "(($ac_try" in
3084   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3085   *) ac_try_echo=$ac_try;;
3086 esac
3087 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3088 $as_echo "$ac_try_echo"; } >&5
3089   (eval "$ac_try") 2>&5
3090   ac_status=$?
3091   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3092   test $ac_status = 0; }; }; then
3093     cross_compiling=no
3094   else
3095     if test "$cross_compiling" = maybe; then
3096         cross_compiling=yes
3097     else
3098         { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3099 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3100 as_fn_error $? "cannot run C compiled programs.
3101 If you meant to cross compile, use \`--host'.
3102 See \`config.log' for more details" "$LINENO" 5; }
3103     fi
3104   fi
3105 fi
3106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3107 $as_echo "$cross_compiling" >&6; }
3108
3109 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3110 ac_clean_files=$ac_clean_files_save
3111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3112 $as_echo_n "checking for suffix of object files... " >&6; }
3113 if ${ac_cv_objext+:} false; then :
3114   $as_echo_n "(cached) " >&6
3115 else
3116   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3117 /* end confdefs.h.  */
3118
3119 int
3120 main ()
3121 {
3122
3123   ;
3124   return 0;
3125 }
3126 _ACEOF
3127 rm -f conftest.o conftest.obj
3128 if { { ac_try="$ac_compile"
3129 case "(($ac_try" in
3130   *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3131   *) ac_try_echo=$ac_try;;
3132 esac
3133 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3134 $as_echo "$ac_try_echo"; } >&5
3135   (eval "$ac_compile") 2>&5
3136   ac_status=$?
3137   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3138   test $ac_status = 0; }; then :
3139   for ac_file in conftest.o conftest.obj conftest.*; do
3140   test -f "$ac_file" || continue;
3141   case $ac_file in
3142     *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3143     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3144        break;;
3145   esac
3146 done
3147 else
3148   $as_echo "$as_me: failed program was:" >&5
3149 sed 's/^/| /' conftest.$ac_ext >&5
3150
3151 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3152 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3153 as_fn_error $? "cannot compute suffix of object files: cannot compile
3154 See \`config.log' for more details" "$LINENO" 5; }
3155 fi
3156 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3157 fi
3158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3159 $as_echo "$ac_cv_objext" >&6; }
3160 OBJEXT=$ac_cv_objext
3161 ac_objext=$OBJEXT
3162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3163 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3164 if ${ac_cv_c_compiler_gnu+:} false; then :
3165   $as_echo_n "(cached) " >&6
3166 else
3167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3168 /* end confdefs.h.  */
3169
3170 int
3171 main ()
3172 {
3173 #ifndef __GNUC__
3174        choke me
3175 #endif
3176
3177   ;
3178   return 0;
3179 }
3180 _ACEOF
3181 if ac_fn_c_try_compile "$LINENO"; then :
3182   ac_compiler_gnu=yes
3183 else
3184   ac_compiler_gnu=no
3185 fi
3186 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3187 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3188
3189 fi
3190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3191 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3192 if test $ac_compiler_gnu = yes; then
3193   GCC=yes
3194 else
3195   GCC=
3196 fi
3197 ac_test_CFLAGS=${CFLAGS+set}
3198 ac_save_CFLAGS=$CFLAGS
3199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3200 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3201 if ${ac_cv_prog_cc_g+:} false; then :
3202   $as_echo_n "(cached) " >&6
3203 else
3204   ac_save_c_werror_flag=$ac_c_werror_flag
3205    ac_c_werror_flag=yes
3206    ac_cv_prog_cc_g=no
3207    CFLAGS="-g"
3208    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3209 /* end confdefs.h.  */
3210
3211 int
3212 main ()
3213 {
3214
3215   ;
3216   return 0;
3217 }
3218 _ACEOF
3219 if ac_fn_c_try_compile "$LINENO"; then :
3220   ac_cv_prog_cc_g=yes
3221 else
3222   CFLAGS=""
3223       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3224 /* end confdefs.h.  */
3225
3226 int
3227 main ()
3228 {
3229
3230   ;
3231   return 0;
3232 }
3233 _ACEOF
3234 if ac_fn_c_try_compile "$LINENO"; then :
3235
3236 else
3237   ac_c_werror_flag=$ac_save_c_werror_flag
3238          CFLAGS="-g"
3239          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3240 /* end confdefs.h.  */
3241
3242 int
3243 main ()
3244 {
3245
3246   ;
3247   return 0;
3248 }
3249 _ACEOF
3250 if ac_fn_c_try_compile "$LINENO"; then :
3251   ac_cv_prog_cc_g=yes
3252 fi
3253 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3254 fi
3255 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3256 fi
3257 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3258    ac_c_werror_flag=$ac_save_c_werror_flag
3259 fi
3260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3261 $as_echo "$ac_cv_prog_cc_g" >&6; }
3262 if test "$ac_test_CFLAGS" = set; then
3263   CFLAGS=$ac_save_CFLAGS
3264 elif test $ac_cv_prog_cc_g = yes; then
3265   if test "$GCC" = yes; then
3266     CFLAGS="-g -O2"
3267   else
3268     CFLAGS="-g"
3269   fi
3270 else
3271   if test "$GCC" = yes; then
3272     CFLAGS="-O2"
3273   else
3274     CFLAGS=
3275   fi
3276 fi
3277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3278 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3279 if ${ac_cv_prog_cc_c89+:} false; then :
3280   $as_echo_n "(cached) " >&6
3281 else
3282   ac_cv_prog_cc_c89=no
3283 ac_save_CC=$CC
3284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3285 /* end confdefs.h.  */
3286 #include <stdarg.h>
3287 #include <stdio.h>
3288 #include <sys/types.h>
3289 #include <sys/stat.h>
3290 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
3291 struct buf { int x; };
3292 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3293 static char *e (p, i)
3294      char **p;
3295      int i;
3296 {
3297   return p[i];
3298 }
3299 static char *f (char * (*g) (char **, int), char **p, ...)
3300 {
3301   char *s;
3302   va_list v;
3303   va_start (v,p);
3304   s = g (p, va_arg (v,int));
3305   va_end (v);
3306   return s;
3307 }
3308
3309 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
3310    function prototypes and stuff, but not '\xHH' hex character constants.
3311    These don't provoke an error unfortunately, instead are silently treated
3312    as 'x'.  The following induces an error, until -std is added to get
3313    proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
3314    array size at least.  It's necessary to write '\x00'==0 to get something
3315    that's true only with -std.  */
3316 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3317
3318 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3319    inside strings and character constants.  */
3320 #define FOO(x) 'x'
3321 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3322
3323 int test (int i, double x);
3324 struct s1 {int (*f) (int a);};
3325 struct s2 {int (*f) (double a);};
3326 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3327 int argc;
3328 char **argv;
3329 int
3330 main ()
3331 {
3332 return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
3333   ;
3334   return 0;
3335 }
3336 _ACEOF
3337 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3338         -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3339 do
3340   CC="$ac_save_CC $ac_arg"
3341   if ac_fn_c_try_compile "$LINENO"; then :
3342   ac_cv_prog_cc_c89=$ac_arg
3343 fi
3344 rm -f core conftest.err conftest.$ac_objext
3345   test "x$ac_cv_prog_cc_c89" != "xno" && break
3346 done
3347 rm -f conftest.$ac_ext
3348 CC=$ac_save_CC
3349
3350 fi
3351 # AC_CACHE_VAL
3352 case "x$ac_cv_prog_cc_c89" in
3353   x)
3354     { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3355 $as_echo "none needed" >&6; } ;;
3356   xno)
3357     { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3358 $as_echo "unsupported" >&6; } ;;
3359   *)
3360     CC="$CC $ac_cv_prog_cc_c89"
3361     { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3362 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3363 esac
3364 if test "x$ac_cv_prog_cc_c89" != xno; then :
3365
3366 fi
3367
3368 ac_ext=c
3369 ac_cpp='$CPP $CPPFLAGS'
3370 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3371 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3372 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3373
3374 ac_aux_dir=
3375 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
3376   if test -f "$ac_dir/install-sh"; then
3377     ac_aux_dir=$ac_dir
3378     ac_install_sh="$ac_aux_dir/install-sh -c"
3379     break
3380   elif test -f "$ac_dir/install.sh"; then
3381     ac_aux_dir=$ac_dir
3382     ac_install_sh="$ac_aux_dir/install.sh -c"
3383     break
3384   elif test -f "$ac_dir/shtool"; then
3385     ac_aux_dir=$ac_dir
3386     ac_install_sh="$ac_aux_dir/shtool install -c"
3387     break
3388   fi
3389 done
3390 if test -z "$ac_aux_dir"; then
3391   as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
3392 fi
3393
3394 # These three variables are undocumented and unsupported,
3395 # and are intended to be withdrawn in a future Autoconf release.
3396 # They can cause serious problems if a builder's source tree is in a directory
3397 # whose full name contains unusual characters.
3398 ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3399 ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3400 ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3401
3402
3403 # Make sure we can run config.sub.
3404 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
3405   as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
3406
3407 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
3408 $as_echo_n "checking build system type... " >&6; }
3409 if ${ac_cv_build+:} false; then :
3410   $as_echo_n "(cached) " >&6
3411 else
3412   ac_build_alias=$build_alias
3413 test "x$ac_build_alias" = x &&
3414   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
3415 test "x$ac_build_alias" = x &&
3416   as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
3417 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
3418   as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
3419
3420 fi
3421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
3422 $as_echo "$ac_cv_build" >&6; }
3423 case $ac_cv_build in
3424 *-*-*) ;;
3425 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
3426 esac
3427 build=$ac_cv_build
3428 ac_save_IFS=$IFS; IFS='-'
3429 set x $ac_cv_build
3430 shift
3431 build_cpu=$1
3432 build_vendor=$2
3433 shift; shift
3434 # Remember, the first character of IFS is used to create $*,
3435 # except with old shells:
3436 build_os=$*
3437 IFS=$ac_save_IFS
3438 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
3439
3440
3441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
3442 $as_echo_n "checking host system type... " >&6; }
3443 if ${ac_cv_host+:} false; then :
3444   $as_echo_n "(cached) " >&6
3445 else
3446   if test "x$host_alias" = x; then
3447   ac_cv_host=$ac_cv_build
3448 else
3449   ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
3450     as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
3451 fi
3452
3453 fi
3454 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
3455 $as_echo "$ac_cv_host" >&6; }
3456 case $ac_cv_host in
3457 *-*-*) ;;
3458 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
3459 esac
3460 host=$ac_cv_host
3461 ac_save_IFS=$IFS; IFS='-'
3462 set x $ac_cv_host
3463 shift
3464 host_cpu=$1
3465 host_vendor=$2
3466 shift; shift
3467 # Remember, the first character of IFS is used to create $*,
3468 # except with old shells:
3469 host_os=$*
3470 IFS=$ac_save_IFS
3471 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
3472
3473
3474
3475 ac_ext=c
3476 ac_cpp='$CPP $CPPFLAGS'
3477 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3478 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3479 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3481 $as_echo_n "checking how to run the C preprocessor... " >&6; }
3482 # On Suns, sometimes $CPP names a directory.
3483 if test -n "$CPP" && test -d "$CPP"; then
3484   CPP=
3485 fi
3486 if test -z "$CPP"; then
3487   if ${ac_cv_prog_CPP+:} false; then :
3488   $as_echo_n "(cached) " >&6
3489 else
3490       # Double quotes because CPP needs to be expanded
3491     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
3492     do
3493       ac_preproc_ok=false
3494 for ac_c_preproc_warn_flag in '' yes
3495 do
3496   # Use a header file that comes with gcc, so configuring glibc
3497   # with a fresh cross-compiler works.
3498   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3499   # <limits.h> exists even on freestanding compilers.
3500   # On the NeXT, cc -E runs the code through the compiler's parser,
3501   # not just through cpp. "Syntax error" is here to catch this case.
3502   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3503 /* end confdefs.h.  */
3504 #ifdef __STDC__
3505 # include <limits.h>
3506 #else
3507 # include <assert.h>
3508 #endif
3509                      Syntax error
3510 _ACEOF
3511 if ac_fn_c_try_cpp "$LINENO"; then :
3512
3513 else
3514   # Broken: fails on valid input.
3515 continue
3516 fi
3517 rm -f conftest.err conftest.i conftest.$ac_ext
3518
3519   # OK, works on sane cases.  Now check whether nonexistent headers
3520   # can be detected and how.
3521   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3522 /* end confdefs.h.  */
3523 #include <ac_nonexistent.h>
3524 _ACEOF
3525 if ac_fn_c_try_cpp "$LINENO"; then :
3526   # Broken: success on invalid input.
3527 continue
3528 else
3529   # Passes both tests.
3530 ac_preproc_ok=:
3531 break
3532 fi
3533 rm -f conftest.err conftest.i conftest.$ac_ext
3534
3535 done
3536 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3537 rm -f conftest.i conftest.err conftest.$ac_ext
3538 if $ac_preproc_ok; then :
3539   break
3540 fi
3541
3542     done
3543     ac_cv_prog_CPP=$CPP
3544
3545 fi
3546   CPP=$ac_cv_prog_CPP
3547 else
3548   ac_cv_prog_CPP=$CPP
3549 fi
3550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3551 $as_echo "$CPP" >&6; }
3552 ac_preproc_ok=false
3553 for ac_c_preproc_warn_flag in '' yes
3554 do
3555   # Use a header file that comes with gcc, so configuring glibc
3556   # with a fresh cross-compiler works.
3557   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3558   # <limits.h> exists even on freestanding compilers.
3559   # On the NeXT, cc -E runs the code through the compiler's parser,
3560   # not just through cpp. "Syntax error" is here to catch this case.
3561   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3562 /* end confdefs.h.  */
3563 #ifdef __STDC__
3564 # include <limits.h>
3565 #else
3566 # include <assert.h>
3567 #endif
3568                      Syntax error
3569 _ACEOF
3570 if ac_fn_c_try_cpp "$LINENO"; then :
3571
3572 else
3573   # Broken: fails on valid input.
3574 continue
3575 fi
3576 rm -f conftest.err conftest.i conftest.$ac_ext
3577
3578   # OK, works on sane cases.  Now check whether nonexistent headers
3579   # can be detected and how.
3580   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3581 /* end confdefs.h.  */
3582 #include <ac_nonexistent.h>
3583 _ACEOF
3584 if ac_fn_c_try_cpp "$LINENO"; then :
3585   # Broken: success on invalid input.
3586 continue
3587 else
3588   # Passes both tests.
3589 ac_preproc_ok=:
3590 break
3591 fi
3592 rm -f conftest.err conftest.i conftest.$ac_ext
3593
3594 done
3595 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3596 rm -f conftest.i conftest.err conftest.$ac_ext
3597 if $ac_preproc_ok; then :
3598
3599 else
3600   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3601 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3602 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3603 See \`config.log' for more details" "$LINENO" 5; }
3604 fi
3605
3606 ac_ext=c
3607 ac_cpp='$CPP $CPPFLAGS'
3608 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3609 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3610 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3611
3612
3613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3614 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3615 if ${ac_cv_path_GREP+:} false; then :
3616   $as_echo_n "(cached) " >&6
3617 else
3618   if test -z "$GREP"; then
3619   ac_path_GREP_found=false
3620   # Loop through the user's path and test for each of PROGNAME-LIST
3621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3622 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3623 do
3624   IFS=$as_save_IFS
3625   test -z "$as_dir" && as_dir=.
3626     for ac_prog in grep ggrep; do
3627     for ac_exec_ext in '' $ac_executable_extensions; do
3628       ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3629       { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3630 # Check for GNU ac_path_GREP and select it if it is found.
3631   # Check for GNU $ac_path_GREP
3632 case `"$ac_path_GREP" --version 2>&1` in
3633 *GNU*)
3634   ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3635 *)
3636   ac_count=0
3637   $as_echo_n 0123456789 >"conftest.in"
3638   while :
3639   do
3640     cat "conftest.in" "conftest.in" >"conftest.tmp"
3641     mv "conftest.tmp" "conftest.in"
3642     cp "conftest.in" "conftest.nl"
3643     $as_echo 'GREP' >> "conftest.nl"
3644     "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3645     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3646     as_fn_arith $ac_count + 1 && ac_count=$as_val
3647     if test $ac_count -gt ${ac_path_GREP_max-0}; then
3648       # Best one so far, save it but keep looking for a better one
3649       ac_cv_path_GREP="$ac_path_GREP"
3650       ac_path_GREP_max=$ac_count
3651     fi
3652     # 10*(2^10) chars as input seems more than enough
3653     test $ac_count -gt 10 && break
3654   done
3655   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3656 esac
3657
3658       $ac_path_GREP_found && break 3
3659     done
3660   done
3661   done
3662 IFS=$as_save_IFS
3663   if test -z "$ac_cv_path_GREP"; then
3664     as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3665   fi
3666 else
3667   ac_cv_path_GREP=$GREP
3668 fi
3669
3670 fi
3671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3672 $as_echo "$ac_cv_path_GREP" >&6; }
3673  GREP="$ac_cv_path_GREP"
3674
3675
3676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3677 $as_echo_n "checking for egrep... " >&6; }
3678 if ${ac_cv_path_EGREP+:} false; then :
3679   $as_echo_n "(cached) " >&6
3680 else
3681   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3682    then ac_cv_path_EGREP="$GREP -E"
3683    else
3684      if test -z "$EGREP"; then
3685   ac_path_EGREP_found=false
3686   # Loop through the user's path and test for each of PROGNAME-LIST
3687   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3688 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3689 do
3690   IFS=$as_save_IFS
3691   test -z "$as_dir" && as_dir=.
3692     for ac_prog in egrep; do
3693     for ac_exec_ext in '' $ac_executable_extensions; do
3694       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3695       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3696 # Check for GNU ac_path_EGREP and select it if it is found.
3697   # Check for GNU $ac_path_EGREP
3698 case `"$ac_path_EGREP" --version 2>&1` in
3699 *GNU*)
3700   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3701 *)
3702   ac_count=0
3703   $as_echo_n 0123456789 >"conftest.in"
3704   while :
3705   do
3706     cat "conftest.in" "conftest.in" >"conftest.tmp"
3707     mv "conftest.tmp" "conftest.in"
3708     cp "conftest.in" "conftest.nl"
3709     $as_echo 'EGREP' >> "conftest.nl"
3710     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3711     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3712     as_fn_arith $ac_count + 1 && ac_count=$as_val
3713     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3714       # Best one so far, save it but keep looking for a better one
3715       ac_cv_path_EGREP="$ac_path_EGREP"
3716       ac_path_EGREP_max=$ac_count
3717     fi
3718     # 10*(2^10) chars as input seems more than enough
3719     test $ac_count -gt 10 && break
3720   done
3721   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3722 esac
3723
3724       $ac_path_EGREP_found && break 3
3725     done
3726   done
3727   done
3728 IFS=$as_save_IFS
3729   if test -z "$ac_cv_path_EGREP"; then
3730     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3731   fi
3732 else
3733   ac_cv_path_EGREP=$EGREP
3734 fi
3735
3736    fi
3737 fi
3738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3739 $as_echo "$ac_cv_path_EGREP" >&6; }
3740  EGREP="$ac_cv_path_EGREP"
3741
3742
3743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3744 $as_echo_n "checking for ANSI C header files... " >&6; }
3745 if ${ac_cv_header_stdc+:} false; then :
3746   $as_echo_n "(cached) " >&6
3747 else
3748   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3749 /* end confdefs.h.  */
3750 #include <stdlib.h>
3751 #include <stdarg.h>
3752 #include <string.h>
3753 #include <float.h>
3754
3755 int
3756 main ()
3757 {
3758
3759   ;
3760   return 0;
3761 }
3762 _ACEOF
3763 if ac_fn_c_try_compile "$LINENO"; then :
3764   ac_cv_header_stdc=yes
3765 else
3766   ac_cv_header_stdc=no
3767 fi
3768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3769
3770 if test $ac_cv_header_stdc = yes; then
3771   # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3772   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3773 /* end confdefs.h.  */
3774 #include <string.h>
3775
3776 _ACEOF
3777 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3778   $EGREP "memchr" >/dev/null 2>&1; then :
3779
3780 else
3781   ac_cv_header_stdc=no
3782 fi
3783 rm -f conftest*
3784
3785 fi
3786
3787 if test $ac_cv_header_stdc = yes; then
3788   # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3789   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3790 /* end confdefs.h.  */
3791 #include <stdlib.h>
3792
3793 _ACEOF
3794 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3795   $EGREP "free" >/dev/null 2>&1; then :
3796
3797 else
3798   ac_cv_header_stdc=no
3799 fi
3800 rm -f conftest*
3801
3802 fi
3803
3804 if test $ac_cv_header_stdc = yes; then
3805   # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3806   if test "$cross_compiling" = yes; then :
3807   :
3808 else
3809   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3810 /* end confdefs.h.  */
3811 #include <ctype.h>
3812 #include <stdlib.h>
3813 #if ((' ' & 0x0FF) == 0x020)
3814 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
3815 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
3816 #else
3817 # define ISLOWER(c) \
3818                    (('a' <= (c) && (c) <= 'i') \
3819                      || ('j' <= (c) && (c) <= 'r') \
3820                      || ('s' <= (c) && (c) <= 'z'))
3821 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
3822 #endif
3823
3824 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
3825 int
3826 main ()
3827 {
3828   int i;
3829   for (i = 0; i < 256; i++)
3830     if (XOR (islower (i), ISLOWER (i))
3831         || toupper (i) != TOUPPER (i))
3832       return 2;
3833   return 0;
3834 }
3835 _ACEOF
3836 if ac_fn_c_try_run "$LINENO"; then :
3837
3838 else
3839   ac_cv_header_stdc=no
3840 fi
3841 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3842   conftest.$ac_objext conftest.beam conftest.$ac_ext
3843 fi
3844
3845 fi
3846 fi
3847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3848 $as_echo "$ac_cv_header_stdc" >&6; }
3849 if test $ac_cv_header_stdc = yes; then
3850
3851 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
3852
3853 fi
3854
3855 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
3856 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3857                   inttypes.h stdint.h unistd.h
3858 do :
3859   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3860 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3861 "
3862 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3863   cat >>confdefs.h <<_ACEOF
3864 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3865 _ACEOF
3866
3867 fi
3868
3869 done
3870
3871
3872  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
3873 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
3874 if ${ac_cv_c_bigendian+:} false; then :
3875   $as_echo_n "(cached) " >&6
3876 else
3877   ac_cv_c_bigendian=unknown
3878     # See if we're dealing with a universal compiler.
3879     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3880 /* end confdefs.h.  */
3881 #ifndef __APPLE_CC__
3882                not a universal capable compiler
3883              #endif
3884              typedef int dummy;
3885
3886 _ACEOF
3887 if ac_fn_c_try_compile "$LINENO"; then :
3888
3889         # Check for potential -arch flags.  It is not universal unless
3890         # there are at least two -arch flags with different values.
3891         ac_arch=
3892         ac_prev=
3893         for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
3894          if test -n "$ac_prev"; then
3895            case $ac_word in
3896              i?86 | x86_64 | ppc | ppc64)
3897                if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
3898                  ac_arch=$ac_word
3899                else
3900                  ac_cv_c_bigendian=universal
3901                  break
3902                fi
3903                ;;
3904            esac
3905            ac_prev=
3906          elif test "x$ac_word" = "x-arch"; then
3907            ac_prev=arch
3908          fi
3909        done
3910 fi
3911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3912     if test $ac_cv_c_bigendian = unknown; then
3913       # See if sys/param.h defines the BYTE_ORDER macro.
3914       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3915 /* end confdefs.h.  */
3916 #include <sys/types.h>
3917              #include <sys/param.h>
3918
3919 int
3920 main ()
3921 {
3922 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
3923                      && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
3924                      && LITTLE_ENDIAN)
3925               bogus endian macros
3926              #endif
3927
3928   ;
3929   return 0;
3930 }
3931 _ACEOF
3932 if ac_fn_c_try_compile "$LINENO"; then :
3933   # It does; now see whether it defined to BIG_ENDIAN or not.
3934          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3935 /* end confdefs.h.  */
3936 #include <sys/types.h>
3937                 #include <sys/param.h>
3938
3939 int
3940 main ()
3941 {
3942 #if BYTE_ORDER != BIG_ENDIAN
3943                  not big endian
3944                 #endif
3945
3946   ;
3947   return 0;
3948 }
3949 _ACEOF
3950 if ac_fn_c_try_compile "$LINENO"; then :
3951   ac_cv_c_bigendian=yes
3952 else
3953   ac_cv_c_bigendian=no
3954 fi
3955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3956 fi
3957 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3958     fi
3959     if test $ac_cv_c_bigendian = unknown; then
3960       # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
3961       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3962 /* end confdefs.h.  */
3963 #include <limits.h>
3964
3965 int
3966 main ()
3967 {
3968 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
3969               bogus endian macros
3970              #endif
3971
3972   ;
3973   return 0;
3974 }
3975 _ACEOF
3976 if ac_fn_c_try_compile "$LINENO"; then :
3977   # It does; now see whether it defined to _BIG_ENDIAN or not.
3978          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3979 /* end confdefs.h.  */
3980 #include <limits.h>
3981
3982 int
3983 main ()
3984 {
3985 #ifndef _BIG_ENDIAN
3986                  not big endian
3987                 #endif
3988
3989   ;
3990   return 0;
3991 }
3992 _ACEOF
3993 if ac_fn_c_try_compile "$LINENO"; then :
3994   ac_cv_c_bigendian=yes
3995 else
3996   ac_cv_c_bigendian=no
3997 fi
3998 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3999 fi
4000 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4001     fi
4002     if test $ac_cv_c_bigendian = unknown; then
4003       # Compile a test program.
4004       if test "$cross_compiling" = yes; then :
4005   # Try to guess by grepping values from an object file.
4006          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4007 /* end confdefs.h.  */
4008 short int ascii_mm[] =
4009                   { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4010                 short int ascii_ii[] =
4011                   { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4012                 int use_ascii (int i) {
4013                   return ascii_mm[i] + ascii_ii[i];
4014                 }
4015                 short int ebcdic_ii[] =
4016                   { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4017                 short int ebcdic_mm[] =
4018                   { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4019                 int use_ebcdic (int i) {
4020                   return ebcdic_mm[i] + ebcdic_ii[i];
4021                 }
4022                 extern int foo;
4023
4024 int
4025 main ()
4026 {
4027 return use_ascii (foo) == use_ebcdic (foo);
4028   ;
4029   return 0;
4030 }
4031 _ACEOF
4032 if ac_fn_c_try_compile "$LINENO"; then :
4033   if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4034               ac_cv_c_bigendian=yes
4035             fi
4036             if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4037               if test "$ac_cv_c_bigendian" = unknown; then
4038                 ac_cv_c_bigendian=no
4039               else
4040                 # finding both strings is unlikely to happen, but who knows?
4041                 ac_cv_c_bigendian=unknown
4042               fi
4043             fi
4044 fi
4045 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4046 else
4047   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4048 /* end confdefs.h.  */
4049 $ac_includes_default
4050 int
4051 main ()
4052 {
4053
4054              /* Are we little or big endian?  From Harbison&Steele.  */
4055              union
4056              {
4057                long int l;
4058                char c[sizeof (long int)];
4059              } u;
4060              u.l = 1;
4061              return u.c[sizeof (long int) - 1] == 1;
4062
4063   ;
4064   return 0;
4065 }
4066 _ACEOF
4067 if ac_fn_c_try_run "$LINENO"; then :
4068   ac_cv_c_bigendian=no
4069 else
4070   ac_cv_c_bigendian=yes
4071 fi
4072 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4073   conftest.$ac_objext conftest.beam conftest.$ac_ext
4074 fi
4075
4076     fi
4077 fi
4078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
4079 $as_echo "$ac_cv_c_bigendian" >&6; }
4080  case $ac_cv_c_bigendian in #(
4081    yes)
4082      $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
4083 ;; #(
4084    no)
4085       ;; #(
4086    universal)
4087
4088 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
4089
4090      ;; #(
4091    *)
4092      as_fn_error $? "unknown endianness
4093  presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
4094  esac
4095
4096
4097 # Checks for programs.
4098 for ac_prog in gawk mawk nawk awk
4099 do
4100   # Extract the first word of "$ac_prog", so it can be a program name with args.
4101 set dummy $ac_prog; ac_word=$2
4102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4103 $as_echo_n "checking for $ac_word... " >&6; }
4104 if ${ac_cv_prog_AWK+:} false; then :
4105   $as_echo_n "(cached) " >&6
4106 else
4107   if test -n "$AWK"; then
4108   ac_cv_prog_AWK="$AWK" # Let the user override the test.
4109 else
4110 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4111 for as_dir in $PATH
4112 do
4113   IFS=$as_save_IFS
4114   test -z "$as_dir" && as_dir=.
4115     for ac_exec_ext in '' $ac_executable_extensions; do
4116   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4117     ac_cv_prog_AWK="$ac_prog"
4118     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4119     break 2
4120   fi
4121 done
4122   done
4123 IFS=$as_save_IFS
4124
4125 fi
4126 fi
4127 AWK=$ac_cv_prog_AWK
4128 if test -n "$AWK"; then
4129   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
4130 $as_echo "$AWK" >&6; }
4131 else
4132   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4133 $as_echo "no" >&6; }
4134 fi
4135
4136
4137   test -n "$AWK" && break
4138 done
4139
4140 ac_ext=c
4141 ac_cpp='$CPP $CPPFLAGS'
4142 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4143 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4144 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4146 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4147 # On Suns, sometimes $CPP names a directory.
4148 if test -n "$CPP" && test -d "$CPP"; then
4149   CPP=
4150 fi
4151 if test -z "$CPP"; then
4152   if ${ac_cv_prog_CPP+:} false; then :
4153   $as_echo_n "(cached) " >&6
4154 else
4155       # Double quotes because CPP needs to be expanded
4156     for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4157     do
4158       ac_preproc_ok=false
4159 for ac_c_preproc_warn_flag in '' yes
4160 do
4161   # Use a header file that comes with gcc, so configuring glibc
4162   # with a fresh cross-compiler works.
4163   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4164   # <limits.h> exists even on freestanding compilers.
4165   # On the NeXT, cc -E runs the code through the compiler's parser,
4166   # not just through cpp. "Syntax error" is here to catch this case.
4167   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4168 /* end confdefs.h.  */
4169 #ifdef __STDC__
4170 # include <limits.h>
4171 #else
4172 # include <assert.h>
4173 #endif
4174                      Syntax error
4175 _ACEOF
4176 if ac_fn_c_try_cpp "$LINENO"; then :
4177
4178 else
4179   # Broken: fails on valid input.
4180 continue
4181 fi
4182 rm -f conftest.err conftest.i conftest.$ac_ext
4183
4184   # OK, works on sane cases.  Now check whether nonexistent headers
4185   # can be detected and how.
4186   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4187 /* end confdefs.h.  */
4188 #include <ac_nonexistent.h>
4189 _ACEOF
4190 if ac_fn_c_try_cpp "$LINENO"; then :
4191   # Broken: success on invalid input.
4192 continue
4193 else
4194   # Passes both tests.
4195 ac_preproc_ok=:
4196 break
4197 fi
4198 rm -f conftest.err conftest.i conftest.$ac_ext
4199
4200 done
4201 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4202 rm -f conftest.i conftest.err conftest.$ac_ext
4203 if $ac_preproc_ok; then :
4204   break
4205 fi
4206
4207     done
4208     ac_cv_prog_CPP=$CPP
4209
4210 fi
4211   CPP=$ac_cv_prog_CPP
4212 else
4213   ac_cv_prog_CPP=$CPP
4214 fi
4215 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4216 $as_echo "$CPP" >&6; }
4217 ac_preproc_ok=false
4218 for ac_c_preproc_warn_flag in '' yes
4219 do
4220   # Use a header file that comes with gcc, so configuring glibc
4221   # with a fresh cross-compiler works.
4222   # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4223   # <limits.h> exists even on freestanding compilers.
4224   # On the NeXT, cc -E runs the code through the compiler's parser,
4225   # not just through cpp. "Syntax error" is here to catch this case.
4226   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4227 /* end confdefs.h.  */
4228 #ifdef __STDC__
4229 # include <limits.h>
4230 #else
4231 # include <assert.h>
4232 #endif
4233                      Syntax error
4234 _ACEOF
4235 if ac_fn_c_try_cpp "$LINENO"; then :
4236
4237 else
4238   # Broken: fails on valid input.
4239 continue
4240 fi
4241 rm -f conftest.err conftest.i conftest.$ac_ext
4242
4243   # OK, works on sane cases.  Now check whether nonexistent headers
4244   # can be detected and how.
4245   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4246 /* end confdefs.h.  */
4247 #include <ac_nonexistent.h>
4248 _ACEOF
4249 if ac_fn_c_try_cpp "$LINENO"; then :
4250   # Broken: success on invalid input.
4251 continue
4252 else
4253   # Passes both tests.
4254 ac_preproc_ok=:
4255 break
4256 fi
4257 rm -f conftest.err conftest.i conftest.$ac_ext
4258
4259 done
4260 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4261 rm -f conftest.i conftest.err conftest.$ac_ext
4262 if $ac_preproc_ok; then :
4263
4264 else
4265   { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4266 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4267 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4268 See \`config.log' for more details" "$LINENO" 5; }
4269 fi
4270
4271 ac_ext=c
4272 ac_cpp='$CPP $CPPFLAGS'
4273 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4274 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4275 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4276
4277 if test -n "$ac_tool_prefix"; then
4278   # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4279 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4281 $as_echo_n "checking for $ac_word... " >&6; }
4282 if ${ac_cv_prog_RANLIB+:} false; then :
4283   $as_echo_n "(cached) " >&6
4284 else
4285   if test -n "$RANLIB"; then
4286   ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
4287 else
4288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4289 for as_dir in $PATH
4290 do
4291   IFS=$as_save_IFS
4292   test -z "$as_dir" && as_dir=.
4293     for ac_exec_ext in '' $ac_executable_extensions; do
4294   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4295     ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4296     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4297     break 2
4298   fi
4299 done
4300   done
4301 IFS=$as_save_IFS
4302
4303 fi
4304 fi
4305 RANLIB=$ac_cv_prog_RANLIB
4306 if test -n "$RANLIB"; then
4307   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4308 $as_echo "$RANLIB" >&6; }
4309 else
4310   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4311 $as_echo "no" >&6; }
4312 fi
4313
4314
4315 fi
4316 if test -z "$ac_cv_prog_RANLIB"; then
4317   ac_ct_RANLIB=$RANLIB
4318   # Extract the first word of "ranlib", so it can be a program name with args.
4319 set dummy ranlib; ac_word=$2
4320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4321 $as_echo_n "checking for $ac_word... " >&6; }
4322 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4323   $as_echo_n "(cached) " >&6
4324 else
4325   if test -n "$ac_ct_RANLIB"; then
4326   ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
4327 else
4328 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4329 for as_dir in $PATH
4330 do
4331   IFS=$as_save_IFS
4332   test -z "$as_dir" && as_dir=.
4333     for ac_exec_ext in '' $ac_executable_extensions; do
4334   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4335     ac_cv_prog_ac_ct_RANLIB="ranlib"
4336     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4337     break 2
4338   fi
4339 done
4340   done
4341 IFS=$as_save_IFS
4342
4343 fi
4344 fi
4345 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4346 if test -n "$ac_ct_RANLIB"; then
4347   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4348 $as_echo "$ac_ct_RANLIB" >&6; }
4349 else
4350   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4351 $as_echo "no" >&6; }
4352 fi
4353
4354   if test "x$ac_ct_RANLIB" = x; then
4355     RANLIB=":"
4356   else
4357     case $cross_compiling:$ac_tool_warned in
4358 yes:)
4359 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4360 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4361 ac_tool_warned=yes ;;
4362 esac
4363     RANLIB=$ac_ct_RANLIB
4364   fi
4365 else
4366   RANLIB="$ac_cv_prog_RANLIB"
4367 fi
4368
4369 # Find a good install program.  We prefer a C program (faster),
4370 # so one script is as good as another.  But avoid the broken or
4371 # incompatible versions:
4372 # SysV /etc/install, /usr/sbin/install
4373 # SunOS /usr/etc/install
4374 # IRIX /sbin/install
4375 # AIX /bin/install
4376 # AmigaOS /C/install, which installs bootblocks on floppy discs
4377 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
4378 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
4379 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4380 # OS/2's system install, which has a completely different semantic
4381 # ./install, which can be erroneously created by make from ./install.sh.
4382 # Reject install programs that cannot install multiple files.
4383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4384 $as_echo_n "checking for a BSD-compatible install... " >&6; }
4385 if test -z "$INSTALL"; then
4386 if ${ac_cv_path_install+:} false; then :
4387   $as_echo_n "(cached) " >&6
4388 else
4389   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4390 for as_dir in $PATH
4391 do
4392   IFS=$as_save_IFS
4393   test -z "$as_dir" && as_dir=.
4394     # Account for people who put trailing slashes in PATH elements.
4395 case $as_dir/ in #((
4396   ./ | .// | /[cC]/* | \
4397   /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4398   ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4399   /usr/ucb/* ) ;;
4400   *)
4401     # OSF1 and SCO ODT 3.0 have their own names for install.
4402     # Don't use installbsd from OSF since it installs stuff as root
4403     # by default.
4404     for ac_prog in ginstall scoinst install; do
4405       for ac_exec_ext in '' $ac_executable_extensions; do
4406         if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
4407           if test $ac_prog = install &&
4408             grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4409             # AIX install.  It has an incompatible calling convention.
4410             :
4411           elif test $ac_prog = install &&
4412             grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
4413             # program-specific install script used by HP pwplus--don't use.
4414             :
4415           else
4416             rm -rf conftest.one conftest.two conftest.dir
4417             echo one > conftest.one
4418             echo two > conftest.two
4419             mkdir conftest.dir
4420             if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4421               test -s conftest.one && test -s conftest.two &&
4422               test -s conftest.dir/conftest.one &&
4423               test -s conftest.dir/conftest.two
4424             then
4425               ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4426               break 3
4427             fi
4428           fi
4429         fi
4430       done
4431     done
4432     ;;
4433 esac
4434
4435   done
4436 IFS=$as_save_IFS
4437
4438 rm -rf conftest.one conftest.two conftest.dir
4439
4440 fi
4441   if test "${ac_cv_path_install+set}" = set; then
4442     INSTALL=$ac_cv_path_install
4443   else
4444     # As a last resort, use the slow shell script.  Don't cache a
4445     # value for INSTALL within a source directory, because that will
4446     # break other packages using the cache if that directory is
4447     # removed, or if the value is a relative name.
4448     INSTALL=$ac_install_sh
4449   fi
4450 fi
4451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4452 $as_echo "$INSTALL" >&6; }
4453
4454 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4455 # It thinks the first close brace ends the variable substitution.
4456 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
4457
4458 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4459
4460 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4461
4462 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4463 $as_echo_n "checking for egrep... " >&6; }
4464 if ${ac_cv_path_EGREP+:} false; then :
4465   $as_echo_n "(cached) " >&6
4466 else
4467   if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4468    then ac_cv_path_EGREP="$GREP -E"
4469    else
4470      if test -z "$EGREP"; then
4471   ac_path_EGREP_found=false
4472   # Loop through the user's path and test for each of PROGNAME-LIST
4473   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4474 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4475 do
4476   IFS=$as_save_IFS
4477   test -z "$as_dir" && as_dir=.
4478     for ac_prog in egrep; do
4479     for ac_exec_ext in '' $ac_executable_extensions; do
4480       ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4481       { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4482 # Check for GNU ac_path_EGREP and select it if it is found.
4483   # Check for GNU $ac_path_EGREP
4484 case `"$ac_path_EGREP" --version 2>&1` in
4485 *GNU*)
4486   ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4487 *)
4488   ac_count=0
4489   $as_echo_n 0123456789 >"conftest.in"
4490   while :
4491   do
4492     cat "conftest.in" "conftest.in" >"conftest.tmp"
4493     mv "conftest.tmp" "conftest.in"
4494     cp "conftest.in" "conftest.nl"
4495     $as_echo 'EGREP' >> "conftest.nl"
4496     "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4497     diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4498     as_fn_arith $ac_count + 1 && ac_count=$as_val
4499     if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4500       # Best one so far, save it but keep looking for a better one
4501       ac_cv_path_EGREP="$ac_path_EGREP"
4502       ac_path_EGREP_max=$ac_count
4503     fi
4504     # 10*(2^10) chars as input seems more than enough
4505     test $ac_count -gt 10 && break
4506   done
4507   rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4508 esac
4509
4510       $ac_path_EGREP_found && break 3
4511     done
4512   done
4513   done
4514 IFS=$as_save_IFS
4515   if test -z "$ac_cv_path_EGREP"; then
4516     as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4517   fi
4518 else
4519   ac_cv_path_EGREP=$EGREP
4520 fi
4521
4522    fi
4523 fi
4524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4525 $as_echo "$ac_cv_path_EGREP" >&6; }
4526  EGREP="$ac_cv_path_EGREP"
4527
4528
4529 # Extract the first word of "ar", so it can be a program name with args.
4530 set dummy ar; ac_word=$2
4531 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4532 $as_echo_n "checking for $ac_word... " >&6; }
4533 if ${ac_cv_path_AR+:} false; then :
4534   $as_echo_n "(cached) " >&6
4535 else
4536   case $AR in
4537   [\\/]* | ?:[\\/]*)
4538   ac_cv_path_AR="$AR" # Let the user override the test with a path.
4539   ;;
4540   *)
4541   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4542 for as_dir in $PATH
4543 do
4544   IFS=$as_save_IFS
4545   test -z "$as_dir" && as_dir=.
4546     for ac_exec_ext in '' $ac_executable_extensions; do
4547   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4548     ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
4549     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4550     break 2
4551   fi
4552 done
4553   done
4554 IFS=$as_save_IFS
4555
4556   ;;
4557 esac
4558 fi
4559 AR=$ac_cv_path_AR
4560 if test -n "$AR"; then
4561   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4562 $as_echo "$AR" >&6; }
4563 else
4564   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4565 $as_echo "no" >&6; }
4566 fi
4567
4568
4569 # Extract the first word of "cat", so it can be a program name with args.
4570 set dummy cat; ac_word=$2
4571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4572 $as_echo_n "checking for $ac_word... " >&6; }
4573 if ${ac_cv_path_CAT+:} false; then :
4574   $as_echo_n "(cached) " >&6
4575 else
4576   case $CAT in
4577   [\\/]* | ?:[\\/]*)
4578   ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
4579   ;;
4580   *)
4581   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4582 for as_dir in $PATH
4583 do
4584   IFS=$as_save_IFS
4585   test -z "$as_dir" && as_dir=.
4586     for ac_exec_ext in '' $ac_executable_extensions; do
4587   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4588     ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4589     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4590     break 2
4591   fi
4592 done
4593   done
4594 IFS=$as_save_IFS
4595
4596   ;;
4597 esac
4598 fi
4599 CAT=$ac_cv_path_CAT
4600 if test -n "$CAT"; then
4601   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4602 $as_echo "$CAT" >&6; }
4603 else
4604   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4605 $as_echo "no" >&6; }
4606 fi
4607
4608
4609 # Extract the first word of "kill", so it can be a program name with args.
4610 set dummy kill; ac_word=$2
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4612 $as_echo_n "checking for $ac_word... " >&6; }
4613 if ${ac_cv_path_KILL+:} false; then :
4614   $as_echo_n "(cached) " >&6
4615 else
4616   case $KILL in
4617   [\\/]* | ?:[\\/]*)
4618   ac_cv_path_KILL="$KILL" # Let the user override the test with a path.
4619   ;;
4620   *)
4621   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4622 for as_dir in $PATH
4623 do
4624   IFS=$as_save_IFS
4625   test -z "$as_dir" && as_dir=.
4626     for ac_exec_ext in '' $ac_executable_extensions; do
4627   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4628     ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext"
4629     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4630     break 2
4631   fi
4632 done
4633   done
4634 IFS=$as_save_IFS
4635
4636   ;;
4637 esac
4638 fi
4639 KILL=$ac_cv_path_KILL
4640 if test -n "$KILL"; then
4641   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KILL" >&5
4642 $as_echo "$KILL" >&6; }
4643 else
4644   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4645 $as_echo "no" >&6; }
4646 fi
4647
4648
4649 for ac_prog in perl5 perl
4650 do
4651   # Extract the first word of "$ac_prog", so it can be a program name with args.
4652 set dummy $ac_prog; ac_word=$2
4653 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4654 $as_echo_n "checking for $ac_word... " >&6; }
4655 if ${ac_cv_path_PERL+:} false; then :
4656   $as_echo_n "(cached) " >&6
4657 else
4658   case $PERL in
4659   [\\/]* | ?:[\\/]*)
4660   ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
4661   ;;
4662   *)
4663   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4664 for as_dir in $PATH
4665 do
4666   IFS=$as_save_IFS
4667   test -z "$as_dir" && as_dir=.
4668     for ac_exec_ext in '' $ac_executable_extensions; do
4669   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4670     ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4671     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4672     break 2
4673   fi
4674 done
4675   done
4676 IFS=$as_save_IFS
4677
4678   ;;
4679 esac
4680 fi
4681 PERL=$ac_cv_path_PERL
4682 if test -n "$PERL"; then
4683   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
4684 $as_echo "$PERL" >&6; }
4685 else
4686   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4687 $as_echo "no" >&6; }
4688 fi
4689
4690
4691   test -n "$PERL" && break
4692 done
4693
4694 # Extract the first word of "sed", so it can be a program name with args.
4695 set dummy sed; ac_word=$2
4696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4697 $as_echo_n "checking for $ac_word... " >&6; }
4698 if ${ac_cv_path_SED+:} false; then :
4699   $as_echo_n "(cached) " >&6
4700 else
4701   case $SED in
4702   [\\/]* | ?:[\\/]*)
4703   ac_cv_path_SED="$SED" # Let the user override the test with a path.
4704   ;;
4705   *)
4706   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4707 for as_dir in $PATH
4708 do
4709   IFS=$as_save_IFS
4710   test -z "$as_dir" && as_dir=.
4711     for ac_exec_ext in '' $ac_executable_extensions; do
4712   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4713     ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
4714     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4715     break 2
4716   fi
4717 done
4718   done
4719 IFS=$as_save_IFS
4720
4721   ;;
4722 esac
4723 fi
4724 SED=$ac_cv_path_SED
4725 if test -n "$SED"; then
4726   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
4727 $as_echo "$SED" >&6; }
4728 else
4729   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4730 $as_echo "no" >&6; }
4731 fi
4732
4733
4734
4735 # Extract the first word of "ent", so it can be a program name with args.
4736 set dummy ent; ac_word=$2
4737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4738 $as_echo_n "checking for $ac_word... " >&6; }
4739 if ${ac_cv_path_ENT+:} false; then :
4740   $as_echo_n "(cached) " >&6
4741 else
4742   case $ENT in
4743   [\\/]* | ?:[\\/]*)
4744   ac_cv_path_ENT="$ENT" # Let the user override the test with a path.
4745   ;;
4746   *)
4747   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4748 for as_dir in $PATH
4749 do
4750   IFS=$as_save_IFS
4751   test -z "$as_dir" && as_dir=.
4752     for ac_exec_ext in '' $ac_executable_extensions; do
4753   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4754     ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext"
4755     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4756     break 2
4757   fi
4758 done
4759   done
4760 IFS=$as_save_IFS
4761
4762   ;;
4763 esac
4764 fi
4765 ENT=$ac_cv_path_ENT
4766 if test -n "$ENT"; then
4767   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENT" >&5
4768 $as_echo "$ENT" >&6; }
4769 else
4770   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4771 $as_echo "no" >&6; }
4772 fi
4773
4774
4775
4776 # Extract the first word of "bash", so it can be a program name with args.
4777 set dummy bash; ac_word=$2
4778 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4779 $as_echo_n "checking for $ac_word... " >&6; }
4780 if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4781   $as_echo_n "(cached) " >&6
4782 else
4783   case $TEST_MINUS_S_SH in
4784   [\\/]* | ?:[\\/]*)
4785   ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4786   ;;
4787   *)
4788   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4789 for as_dir in $PATH
4790 do
4791   IFS=$as_save_IFS
4792   test -z "$as_dir" && as_dir=.
4793     for ac_exec_ext in '' $ac_executable_extensions; do
4794   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4795     ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4796     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4797     break 2
4798   fi
4799 done
4800   done
4801 IFS=$as_save_IFS
4802
4803   ;;
4804 esac
4805 fi
4806 TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4807 if test -n "$TEST_MINUS_S_SH"; then
4808   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4809 $as_echo "$TEST_MINUS_S_SH" >&6; }
4810 else
4811   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4812 $as_echo "no" >&6; }
4813 fi
4814
4815
4816 # Extract the first word of "ksh", so it can be a program name with args.
4817 set dummy ksh; ac_word=$2
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4819 $as_echo_n "checking for $ac_word... " >&6; }
4820 if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4821   $as_echo_n "(cached) " >&6
4822 else
4823   case $TEST_MINUS_S_SH in
4824   [\\/]* | ?:[\\/]*)
4825   ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4826   ;;
4827   *)
4828   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4829 for as_dir in $PATH
4830 do
4831   IFS=$as_save_IFS
4832   test -z "$as_dir" && as_dir=.
4833     for ac_exec_ext in '' $ac_executable_extensions; do
4834   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4835     ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4836     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4837     break 2
4838   fi
4839 done
4840   done
4841 IFS=$as_save_IFS
4842
4843   ;;
4844 esac
4845 fi
4846 TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4847 if test -n "$TEST_MINUS_S_SH"; then
4848   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4849 $as_echo "$TEST_MINUS_S_SH" >&6; }
4850 else
4851   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4852 $as_echo "no" >&6; }
4853 fi
4854
4855
4856 # Extract the first word of "sh", so it can be a program name with args.
4857 set dummy sh; ac_word=$2
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4859 $as_echo_n "checking for $ac_word... " >&6; }
4860 if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4861   $as_echo_n "(cached) " >&6
4862 else
4863   case $TEST_MINUS_S_SH in
4864   [\\/]* | ?:[\\/]*)
4865   ac_cv_path_TEST_MINUS_S_SH="$TEST_MINUS_S_SH" # Let the user override the test with a path.
4866   ;;
4867   *)
4868   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4869 for as_dir in $PATH
4870 do
4871   IFS=$as_save_IFS
4872   test -z "$as_dir" && as_dir=.
4873     for ac_exec_ext in '' $ac_executable_extensions; do
4874   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4875     ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4876     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4877     break 2
4878   fi
4879 done
4880   done
4881 IFS=$as_save_IFS
4882
4883   ;;
4884 esac
4885 fi
4886 TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4887 if test -n "$TEST_MINUS_S_SH"; then
4888   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4889 $as_echo "$TEST_MINUS_S_SH" >&6; }
4890 else
4891   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4892 $as_echo "no" >&6; }
4893 fi
4894
4895
4896 # Extract the first word of "sh", so it can be a program name with args.
4897 set dummy sh; ac_word=$2
4898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4899 $as_echo_n "checking for $ac_word... " >&6; }
4900 if ${ac_cv_path_SH+:} false; then :
4901   $as_echo_n "(cached) " >&6
4902 else
4903   case $SH in
4904   [\\/]* | ?:[\\/]*)
4905   ac_cv_path_SH="$SH" # Let the user override the test with a path.
4906   ;;
4907   *)
4908   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4909 for as_dir in $PATH
4910 do
4911   IFS=$as_save_IFS
4912   test -z "$as_dir" && as_dir=.
4913     for ac_exec_ext in '' $ac_executable_extensions; do
4914   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4915     ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
4916     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4917     break 2
4918   fi
4919 done
4920   done
4921 IFS=$as_save_IFS
4922
4923   ;;
4924 esac
4925 fi
4926 SH=$ac_cv_path_SH
4927 if test -n "$SH"; then
4928   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
4929 $as_echo "$SH" >&6; }
4930 else
4931   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4932 $as_echo "no" >&6; }
4933 fi
4934
4935
4936 # Extract the first word of "groff", so it can be a program name with args.
4937 set dummy groff; ac_word=$2
4938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4939 $as_echo_n "checking for $ac_word... " >&6; }
4940 if ${ac_cv_path_GROFF+:} false; then :
4941   $as_echo_n "(cached) " >&6
4942 else
4943   case $GROFF in
4944   [\\/]* | ?:[\\/]*)
4945   ac_cv_path_GROFF="$GROFF" # Let the user override the test with a path.
4946   ;;
4947   *)
4948   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4949 for as_dir in $PATH
4950 do
4951   IFS=$as_save_IFS
4952   test -z "$as_dir" && as_dir=.
4953     for ac_exec_ext in '' $ac_executable_extensions; do
4954   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4955     ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext"
4956     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4957     break 2
4958   fi
4959 done
4960   done
4961 IFS=$as_save_IFS
4962
4963   ;;
4964 esac
4965 fi
4966 GROFF=$ac_cv_path_GROFF
4967 if test -n "$GROFF"; then
4968   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5
4969 $as_echo "$GROFF" >&6; }
4970 else
4971   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4972 $as_echo "no" >&6; }
4973 fi
4974
4975
4976 # Extract the first word of "nroff", so it can be a program name with args.
4977 set dummy nroff; ac_word=$2
4978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4979 $as_echo_n "checking for $ac_word... " >&6; }
4980 if ${ac_cv_path_NROFF+:} false; then :
4981   $as_echo_n "(cached) " >&6
4982 else
4983   case $NROFF in
4984   [\\/]* | ?:[\\/]*)
4985   ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
4986   ;;
4987   *)
4988   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4989 for as_dir in $PATH
4990 do
4991   IFS=$as_save_IFS
4992   test -z "$as_dir" && as_dir=.
4993     for ac_exec_ext in '' $ac_executable_extensions; do
4994   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4995     ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
4996     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4997     break 2
4998   fi
4999 done
5000   done
5001 IFS=$as_save_IFS
5002
5003   ;;
5004 esac
5005 fi
5006 NROFF=$ac_cv_path_NROFF
5007 if test -n "$NROFF"; then
5008   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
5009 $as_echo "$NROFF" >&6; }
5010 else
5011   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5012 $as_echo "no" >&6; }
5013 fi
5014
5015
5016 # Extract the first word of "mandoc", so it can be a program name with args.
5017 set dummy mandoc; ac_word=$2
5018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5019 $as_echo_n "checking for $ac_word... " >&6; }
5020 if ${ac_cv_path_MANDOC+:} false; then :
5021   $as_echo_n "(cached) " >&6
5022 else
5023   case $MANDOC in
5024   [\\/]* | ?:[\\/]*)
5025   ac_cv_path_MANDOC="$MANDOC" # Let the user override the test with a path.
5026   ;;
5027   *)
5028   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5029 for as_dir in $PATH
5030 do
5031   IFS=$as_save_IFS
5032   test -z "$as_dir" && as_dir=.
5033     for ac_exec_ext in '' $ac_executable_extensions; do
5034   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5035     ac_cv_path_MANDOC="$as_dir/$ac_word$ac_exec_ext"
5036     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5037     break 2
5038   fi
5039 done
5040   done
5041 IFS=$as_save_IFS
5042
5043   ;;
5044 esac
5045 fi
5046 MANDOC=$ac_cv_path_MANDOC
5047 if test -n "$MANDOC"; then
5048   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANDOC" >&5
5049 $as_echo "$MANDOC" >&6; }
5050 else
5051   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5052 $as_echo "no" >&6; }
5053 fi
5054
5055
5056 TEST_SHELL=sh
5057
5058
5059 if test "x$MANDOC" != "x" ; then
5060         MANFMT="$MANDOC"
5061 elif test "x$NROFF" != "x" ; then
5062         MANFMT="$NROFF -mandoc"
5063 elif test "x$GROFF" != "x" ; then
5064         MANFMT="$GROFF -mandoc -Tascii"
5065 else
5066         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no manpage formatted found" >&5
5067 $as_echo "$as_me: WARNING: no manpage formatted found" >&2;}
5068         MANFMT="false"
5069 fi
5070
5071
5072 # Extract the first word of "groupadd", so it can be a program name with args.
5073 set dummy groupadd; ac_word=$2
5074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5075 $as_echo_n "checking for $ac_word... " >&6; }
5076 if ${ac_cv_path_PATH_GROUPADD_PROG+:} false; then :
5077   $as_echo_n "(cached) " >&6
5078 else
5079   case $PATH_GROUPADD_PROG in
5080   [\\/]* | ?:[\\/]*)
5081   ac_cv_path_PATH_GROUPADD_PROG="$PATH_GROUPADD_PROG" # Let the user override the test with a path.
5082   ;;
5083   *)
5084   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5085 for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
5086 do
5087   IFS=$as_save_IFS
5088   test -z "$as_dir" && as_dir=.
5089     for ac_exec_ext in '' $ac_executable_extensions; do
5090   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5091     ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext"
5092     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5093     break 2
5094   fi
5095 done
5096   done
5097 IFS=$as_save_IFS
5098
5099   test -z "$ac_cv_path_PATH_GROUPADD_PROG" && ac_cv_path_PATH_GROUPADD_PROG="groupadd"
5100   ;;
5101 esac
5102 fi
5103 PATH_GROUPADD_PROG=$ac_cv_path_PATH_GROUPADD_PROG
5104 if test -n "$PATH_GROUPADD_PROG"; then
5105   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_GROUPADD_PROG" >&5
5106 $as_echo "$PATH_GROUPADD_PROG" >&6; }
5107 else
5108   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5109 $as_echo "no" >&6; }
5110 fi
5111
5112
5113 # Extract the first word of "useradd", so it can be a program name with args.
5114 set dummy useradd; ac_word=$2
5115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5116 $as_echo_n "checking for $ac_word... " >&6; }
5117 if ${ac_cv_path_PATH_USERADD_PROG+:} false; then :
5118   $as_echo_n "(cached) " >&6
5119 else
5120   case $PATH_USERADD_PROG in
5121   [\\/]* | ?:[\\/]*)
5122   ac_cv_path_PATH_USERADD_PROG="$PATH_USERADD_PROG" # Let the user override the test with a path.
5123   ;;
5124   *)
5125   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5126 for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
5127 do
5128   IFS=$as_save_IFS
5129   test -z "$as_dir" && as_dir=.
5130     for ac_exec_ext in '' $ac_executable_extensions; do
5131   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5132     ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext"
5133     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5134     break 2
5135   fi
5136 done
5137   done
5138 IFS=$as_save_IFS
5139
5140   test -z "$ac_cv_path_PATH_USERADD_PROG" && ac_cv_path_PATH_USERADD_PROG="useradd"
5141   ;;
5142 esac
5143 fi
5144 PATH_USERADD_PROG=$ac_cv_path_PATH_USERADD_PROG
5145 if test -n "$PATH_USERADD_PROG"; then
5146   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_USERADD_PROG" >&5
5147 $as_echo "$PATH_USERADD_PROG" >&6; }
5148 else
5149   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5150 $as_echo "no" >&6; }
5151 fi
5152
5153
5154 # Extract the first word of "pkgmk", so it can be a program name with args.
5155 set dummy pkgmk; ac_word=$2
5156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5157 $as_echo_n "checking for $ac_word... " >&6; }
5158 if ${ac_cv_prog_MAKE_PACKAGE_SUPPORTED+:} false; then :
5159   $as_echo_n "(cached) " >&6
5160 else
5161   if test -n "$MAKE_PACKAGE_SUPPORTED"; then
5162   ac_cv_prog_MAKE_PACKAGE_SUPPORTED="$MAKE_PACKAGE_SUPPORTED" # Let the user override the test.
5163 else
5164 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5165 for as_dir in $PATH
5166 do
5167   IFS=$as_save_IFS
5168   test -z "$as_dir" && as_dir=.
5169     for ac_exec_ext in '' $ac_executable_extensions; do
5170   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5171     ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes"
5172     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5173     break 2
5174   fi
5175 done
5176   done
5177 IFS=$as_save_IFS
5178
5179   test -z "$ac_cv_prog_MAKE_PACKAGE_SUPPORTED" && ac_cv_prog_MAKE_PACKAGE_SUPPORTED="no"
5180 fi
5181 fi
5182 MAKE_PACKAGE_SUPPORTED=$ac_cv_prog_MAKE_PACKAGE_SUPPORTED
5183 if test -n "$MAKE_PACKAGE_SUPPORTED"; then
5184   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE_PACKAGE_SUPPORTED" >&5
5185 $as_echo "$MAKE_PACKAGE_SUPPORTED" >&6; }
5186 else
5187   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5188 $as_echo "no" >&6; }
5189 fi
5190
5191
5192 if test -x /sbin/sh; then
5193         STARTUP_SCRIPT_SHELL=/sbin/sh
5194
5195 else
5196         STARTUP_SCRIPT_SHELL=/bin/sh
5197
5198 fi
5199
5200 # System features
5201 # Check whether --enable-largefile was given.
5202 if test "${enable_largefile+set}" = set; then :
5203   enableval=$enable_largefile;
5204 fi
5205
5206 if test "$enable_largefile" != no; then
5207
5208   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5209 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5210 if ${ac_cv_sys_largefile_CC+:} false; then :
5211   $as_echo_n "(cached) " >&6
5212 else
5213   ac_cv_sys_largefile_CC=no
5214      if test "$GCC" != yes; then
5215        ac_save_CC=$CC
5216        while :; do
5217          # IRIX 6.2 and later do not support large files by default,
5218          # so use the C compiler's -n32 option if that helps.
5219          cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5220 /* end confdefs.h.  */
5221 #include <sys/types.h>
5222  /* Check that off_t can represent 2**63 - 1 correctly.
5223     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5224     since some C++ compilers masquerading as C compilers
5225     incorrectly reject 9223372036854775807.  */
5226 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5227   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5228                        && LARGE_OFF_T % 2147483647 == 1)
5229                       ? 1 : -1];
5230 int
5231 main ()
5232 {
5233
5234   ;
5235   return 0;
5236 }
5237 _ACEOF
5238          if ac_fn_c_try_compile "$LINENO"; then :
5239   break
5240 fi
5241 rm -f core conftest.err conftest.$ac_objext
5242          CC="$CC -n32"
5243          if ac_fn_c_try_compile "$LINENO"; then :
5244   ac_cv_sys_largefile_CC=' -n32'; break
5245 fi
5246 rm -f core conftest.err conftest.$ac_objext
5247          break
5248        done
5249        CC=$ac_save_CC
5250        rm -f conftest.$ac_ext
5251     fi
5252 fi
5253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5254 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5255   if test "$ac_cv_sys_largefile_CC" != no; then
5256     CC=$CC$ac_cv_sys_largefile_CC
5257   fi
5258
5259   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5260 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5261 if ${ac_cv_sys_file_offset_bits+:} false; then :
5262   $as_echo_n "(cached) " >&6
5263 else
5264   while :; do
5265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5266 /* end confdefs.h.  */
5267 #include <sys/types.h>
5268  /* Check that off_t can represent 2**63 - 1 correctly.
5269     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5270     since some C++ compilers masquerading as C compilers
5271     incorrectly reject 9223372036854775807.  */
5272 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5273   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5274                        && LARGE_OFF_T % 2147483647 == 1)
5275                       ? 1 : -1];
5276 int
5277 main ()
5278 {
5279
5280   ;
5281   return 0;
5282 }
5283 _ACEOF
5284 if ac_fn_c_try_compile "$LINENO"; then :
5285   ac_cv_sys_file_offset_bits=no; break
5286 fi
5287 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5288   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5289 /* end confdefs.h.  */
5290 #define _FILE_OFFSET_BITS 64
5291 #include <sys/types.h>
5292  /* Check that off_t can represent 2**63 - 1 correctly.
5293     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5294     since some C++ compilers masquerading as C compilers
5295     incorrectly reject 9223372036854775807.  */
5296 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5297   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5298                        && LARGE_OFF_T % 2147483647 == 1)
5299                       ? 1 : -1];
5300 int
5301 main ()
5302 {
5303
5304   ;
5305   return 0;
5306 }
5307 _ACEOF
5308 if ac_fn_c_try_compile "$LINENO"; then :
5309   ac_cv_sys_file_offset_bits=64; break
5310 fi
5311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5312   ac_cv_sys_file_offset_bits=unknown
5313   break
5314 done
5315 fi
5316 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5317 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5318 case $ac_cv_sys_file_offset_bits in #(
5319   no | unknown) ;;
5320   *)
5321 cat >>confdefs.h <<_ACEOF
5322 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
5323 _ACEOF
5324 ;;
5325 esac
5326 rm -rf conftest*
5327   if test $ac_cv_sys_file_offset_bits = unknown; then
5328     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5329 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5330 if ${ac_cv_sys_large_files+:} false; then :
5331   $as_echo_n "(cached) " >&6
5332 else
5333   while :; do
5334   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5335 /* end confdefs.h.  */
5336 #include <sys/types.h>
5337  /* Check that off_t can represent 2**63 - 1 correctly.
5338     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5339     since some C++ compilers masquerading as C compilers
5340     incorrectly reject 9223372036854775807.  */
5341 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5342   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5343                        && LARGE_OFF_T % 2147483647 == 1)
5344                       ? 1 : -1];
5345 int
5346 main ()
5347 {
5348
5349   ;
5350   return 0;
5351 }
5352 _ACEOF
5353 if ac_fn_c_try_compile "$LINENO"; then :
5354   ac_cv_sys_large_files=no; break
5355 fi
5356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5357   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5358 /* end confdefs.h.  */
5359 #define _LARGE_FILES 1
5360 #include <sys/types.h>
5361  /* Check that off_t can represent 2**63 - 1 correctly.
5362     We can't simply define LARGE_OFF_T to be 9223372036854775807,
5363     since some C++ compilers masquerading as C compilers
5364     incorrectly reject 9223372036854775807.  */
5365 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5366   int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5367                        && LARGE_OFF_T % 2147483647 == 1)
5368                       ? 1 : -1];
5369 int
5370 main ()
5371 {
5372
5373   ;
5374   return 0;
5375 }
5376 _ACEOF
5377 if ac_fn_c_try_compile "$LINENO"; then :
5378   ac_cv_sys_large_files=1; break
5379 fi
5380 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5381   ac_cv_sys_large_files=unknown
5382   break
5383 done
5384 fi
5385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5386 $as_echo "$ac_cv_sys_large_files" >&6; }
5387 case $ac_cv_sys_large_files in #(
5388   no | unknown) ;;
5389   *)
5390 cat >>confdefs.h <<_ACEOF
5391 #define _LARGE_FILES $ac_cv_sys_large_files
5392 _ACEOF
5393 ;;
5394 esac
5395 rm -rf conftest*
5396   fi
5397 fi
5398
5399
5400 if test -z "$AR" ; then
5401         as_fn_error $? "*** 'ar' missing, please install or fix your \$PATH ***" "$LINENO" 5
5402 fi
5403
5404 # Use LOGIN_PROGRAM from environment if possible
5405 if test ! -z "$LOGIN_PROGRAM" ; then
5406
5407 cat >>confdefs.h <<_ACEOF
5408 #define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM"
5409 _ACEOF
5410
5411 else
5412         # Search for login
5413         # Extract the first word of "login", so it can be a program name with args.
5414 set dummy login; ac_word=$2
5415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5416 $as_echo_n "checking for $ac_word... " >&6; }
5417 if ${ac_cv_path_LOGIN_PROGRAM_FALLBACK+:} false; then :
5418   $as_echo_n "(cached) " >&6
5419 else
5420   case $LOGIN_PROGRAM_FALLBACK in
5421   [\\/]* | ?:[\\/]*)
5422   ac_cv_path_LOGIN_PROGRAM_FALLBACK="$LOGIN_PROGRAM_FALLBACK" # Let the user override the test with a path.
5423   ;;
5424   *)
5425   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5426 for as_dir in $PATH
5427 do
5428   IFS=$as_save_IFS
5429   test -z "$as_dir" && as_dir=.
5430     for ac_exec_ext in '' $ac_executable_extensions; do
5431   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5432     ac_cv_path_LOGIN_PROGRAM_FALLBACK="$as_dir/$ac_word$ac_exec_ext"
5433     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5434     break 2
5435   fi
5436 done
5437   done
5438 IFS=$as_save_IFS
5439
5440   ;;
5441 esac
5442 fi
5443 LOGIN_PROGRAM_FALLBACK=$ac_cv_path_LOGIN_PROGRAM_FALLBACK
5444 if test -n "$LOGIN_PROGRAM_FALLBACK"; then
5445   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOGIN_PROGRAM_FALLBACK" >&5
5446 $as_echo "$LOGIN_PROGRAM_FALLBACK" >&6; }
5447 else
5448   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5449 $as_echo "no" >&6; }
5450 fi
5451
5452
5453         if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
5454                 cat >>confdefs.h <<_ACEOF
5455 #define LOGIN_PROGRAM_FALLBACK "$LOGIN_PROGRAM_FALLBACK"
5456 _ACEOF
5457
5458         fi
5459 fi
5460
5461 # Extract the first word of "passwd", so it can be a program name with args.
5462 set dummy passwd; ac_word=$2
5463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5464 $as_echo_n "checking for $ac_word... " >&6; }
5465 if ${ac_cv_path_PATH_PASSWD_PROG+:} false; then :
5466   $as_echo_n "(cached) " >&6
5467 else
5468   case $PATH_PASSWD_PROG in
5469   [\\/]* | ?:[\\/]*)
5470   ac_cv_path_PATH_PASSWD_PROG="$PATH_PASSWD_PROG" # Let the user override the test with a path.
5471   ;;
5472   *)
5473   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5474 for as_dir in $PATH
5475 do
5476   IFS=$as_save_IFS
5477   test -z "$as_dir" && as_dir=.
5478     for ac_exec_ext in '' $ac_executable_extensions; do
5479   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5480     ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext"
5481     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5482     break 2
5483   fi
5484 done
5485   done
5486 IFS=$as_save_IFS
5487
5488   ;;
5489 esac
5490 fi
5491 PATH_PASSWD_PROG=$ac_cv_path_PATH_PASSWD_PROG
5492 if test -n "$PATH_PASSWD_PROG"; then
5493   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_PASSWD_PROG" >&5
5494 $as_echo "$PATH_PASSWD_PROG" >&6; }
5495 else
5496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5497 $as_echo "no" >&6; }
5498 fi
5499
5500
5501 if test ! -z "$PATH_PASSWD_PROG" ; then
5502
5503 cat >>confdefs.h <<_ACEOF
5504 #define _PATH_PASSWD_PROG "$PATH_PASSWD_PROG"
5505 _ACEOF
5506
5507 fi
5508
5509 if test -z "$LD" ; then
5510         LD=$CC
5511 fi
5512
5513
5514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5515 $as_echo_n "checking for inline... " >&6; }
5516 if ${ac_cv_c_inline+:} false; then :
5517   $as_echo_n "(cached) " >&6
5518 else
5519   ac_cv_c_inline=no
5520 for ac_kw in inline __inline__ __inline; do
5521   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5522 /* end confdefs.h.  */
5523 #ifndef __cplusplus
5524 typedef int foo_t;
5525 static $ac_kw foo_t static_foo () {return 0; }
5526 $ac_kw foo_t foo () {return 0; }
5527 #endif
5528
5529 _ACEOF
5530 if ac_fn_c_try_compile "$LINENO"; then :
5531   ac_cv_c_inline=$ac_kw
5532 fi
5533 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5534   test "$ac_cv_c_inline" != no && break
5535 done
5536
5537 fi
5538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5539 $as_echo "$ac_cv_c_inline" >&6; }
5540
5541 case $ac_cv_c_inline in
5542   inline | yes) ;;
5543   *)
5544     case $ac_cv_c_inline in
5545       no) ac_val=;;
5546       *) ac_val=$ac_cv_c_inline;;
5547     esac
5548     cat >>confdefs.h <<_ACEOF
5549 #ifndef __cplusplus
5550 #define inline $ac_val
5551 #endif
5552 _ACEOF
5553     ;;
5554 esac
5555
5556
5557 ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
5558 "
5559 if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
5560   have_llong_max=1
5561 fi
5562
5563 ac_fn_c_check_decl "$LINENO" "SYSTR_POLICY_KILL" "ac_cv_have_decl_SYSTR_POLICY_KILL" "
5564         #include <sys/types.h>
5565         #include <sys/param.h>
5566         #include <dev/systrace.h>
5567
5568 "
5569 if test "x$ac_cv_have_decl_SYSTR_POLICY_KILL" = xyes; then :
5570   have_systr_policy_kill=1
5571 fi
5572
5573 ac_fn_c_check_decl "$LINENO" "RLIMIT_NPROC" "ac_cv_have_decl_RLIMIT_NPROC" "
5574         #include <sys/types.h>
5575         #include <sys/resource.h>
5576
5577 "
5578 if test "x$ac_cv_have_decl_RLIMIT_NPROC" = xyes; then :
5579
5580 $as_echo "#define HAVE_RLIMIT_NPROC /**/" >>confdefs.h
5581
5582 fi
5583
5584 ac_fn_c_check_decl "$LINENO" "PR_SET_NO_NEW_PRIVS" "ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" "
5585         #include <sys/types.h>
5586         #include <linux/prctl.h>
5587
5588 "
5589 if test "x$ac_cv_have_decl_PR_SET_NO_NEW_PRIVS" = xyes; then :
5590   have_linux_no_new_privs=1
5591 fi
5592
5593 use_stack_protector=1
5594
5595 # Check whether --with-stackprotect was given.
5596 if test "${with_stackprotect+set}" = set; then :
5597   withval=$with_stackprotect;
5598     if test "x$withval" = "xno"; then
5599         use_stack_protector=0
5600     fi
5601 fi
5602
5603
5604
5605 if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
5606         {
5607         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Qunused-arguments -Werror" >&5
5608 $as_echo_n "checking if $CC supports -Qunused-arguments -Werror... " >&6; }
5609         saved_CFLAGS="$CFLAGS"
5610         CFLAGS="$CFLAGS -Qunused-arguments -Werror"
5611         _define_flag="-Qunused-arguments"
5612         test "x$_define_flag" = "x" && _define_flag="-Qunused-arguments -Werror"
5613         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5614 /* end confdefs.h.  */
5615 int main(void) { return 0; }
5616 _ACEOF
5617 if ac_fn_c_try_compile "$LINENO"; then :
5618
5619 if `grep -i "unrecognized option" conftest.err >/dev/null`
5620 then
5621                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5622 $as_echo "no" >&6; }
5623                 CFLAGS="$saved_CFLAGS"
5624 else
5625                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5626 $as_echo "yes" >&6; }
5627                  CFLAGS="$saved_CFLAGS $_define_flag"
5628 fi
5629 else
5630    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5631 $as_echo "no" >&6; }
5632                   CFLAGS="$saved_CFLAGS"
5633
5634 fi
5635 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5636 }
5637         {
5638         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunknown-warning-option -Werror" >&5
5639 $as_echo_n "checking if $CC supports -Wunknown-warning-option -Werror... " >&6; }
5640         saved_CFLAGS="$CFLAGS"
5641         CFLAGS="$CFLAGS -Wunknown-warning-option -Werror"
5642         _define_flag="-Wno-unknown-warning-option"
5643         test "x$_define_flag" = "x" && _define_flag="-Wunknown-warning-option -Werror"
5644         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5645 /* end confdefs.h.  */
5646 int main(void) { return 0; }
5647 _ACEOF
5648 if ac_fn_c_try_compile "$LINENO"; then :
5649
5650 if `grep -i "unrecognized option" conftest.err >/dev/null`
5651 then
5652                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5653 $as_echo "no" >&6; }
5654                 CFLAGS="$saved_CFLAGS"
5655 else
5656                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5657 $as_echo "yes" >&6; }
5658                  CFLAGS="$saved_CFLAGS $_define_flag"
5659 fi
5660 else
5661    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5662 $as_echo "no" >&6; }
5663                   CFLAGS="$saved_CFLAGS"
5664
5665 fi
5666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5667 }
5668         {
5669         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5
5670 $as_echo_n "checking if $CC supports -Wall... " >&6; }
5671         saved_CFLAGS="$CFLAGS"
5672         CFLAGS="$CFLAGS -Wall"
5673         _define_flag=""
5674         test "x$_define_flag" = "x" && _define_flag="-Wall"
5675         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5676 /* end confdefs.h.  */
5677 int main(void) { return 0; }
5678 _ACEOF
5679 if ac_fn_c_try_compile "$LINENO"; then :
5680
5681 if `grep -i "unrecognized option" conftest.err >/dev/null`
5682 then
5683                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5684 $as_echo "no" >&6; }
5685                 CFLAGS="$saved_CFLAGS"
5686 else
5687                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5688 $as_echo "yes" >&6; }
5689                  CFLAGS="$saved_CFLAGS $_define_flag"
5690 fi
5691 else
5692    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5693 $as_echo "no" >&6; }
5694                   CFLAGS="$saved_CFLAGS"
5695
5696 fi
5697 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5698 }
5699         {
5700         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-arith" >&5
5701 $as_echo_n "checking if $CC supports -Wpointer-arith... " >&6; }
5702         saved_CFLAGS="$CFLAGS"
5703         CFLAGS="$CFLAGS -Wpointer-arith"
5704         _define_flag=""
5705         test "x$_define_flag" = "x" && _define_flag="-Wpointer-arith"
5706         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5707 /* end confdefs.h.  */
5708 int main(void) { return 0; }
5709 _ACEOF
5710 if ac_fn_c_try_compile "$LINENO"; then :
5711
5712 if `grep -i "unrecognized option" conftest.err >/dev/null`
5713 then
5714                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5715 $as_echo "no" >&6; }
5716                 CFLAGS="$saved_CFLAGS"
5717 else
5718                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5719 $as_echo "yes" >&6; }
5720                  CFLAGS="$saved_CFLAGS $_define_flag"
5721 fi
5722 else
5723    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5724 $as_echo "no" >&6; }
5725                   CFLAGS="$saved_CFLAGS"
5726
5727 fi
5728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5729 }
5730         {
5731         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5
5732 $as_echo_n "checking if $CC supports -Wuninitialized... " >&6; }
5733         saved_CFLAGS="$CFLAGS"
5734         CFLAGS="$CFLAGS -Wuninitialized"
5735         _define_flag=""
5736         test "x$_define_flag" = "x" && _define_flag="-Wuninitialized"
5737         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5738 /* end confdefs.h.  */
5739 int main(void) { return 0; }
5740 _ACEOF
5741 if ac_fn_c_try_compile "$LINENO"; then :
5742
5743 if `grep -i "unrecognized option" conftest.err >/dev/null`
5744 then
5745                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5746 $as_echo "no" >&6; }
5747                 CFLAGS="$saved_CFLAGS"
5748 else
5749                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5750 $as_echo "yes" >&6; }
5751                  CFLAGS="$saved_CFLAGS $_define_flag"
5752 fi
5753 else
5754    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5755 $as_echo "no" >&6; }
5756                   CFLAGS="$saved_CFLAGS"
5757
5758 fi
5759 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5760 }
5761         {
5762         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsign-compare" >&5
5763 $as_echo_n "checking if $CC supports -Wsign-compare... " >&6; }
5764         saved_CFLAGS="$CFLAGS"
5765         CFLAGS="$CFLAGS -Wsign-compare"
5766         _define_flag=""
5767         test "x$_define_flag" = "x" && _define_flag="-Wsign-compare"
5768         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5769 /* end confdefs.h.  */
5770 int main(void) { return 0; }
5771 _ACEOF
5772 if ac_fn_c_try_compile "$LINENO"; then :
5773
5774 if `grep -i "unrecognized option" conftest.err >/dev/null`
5775 then
5776                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5777 $as_echo "no" >&6; }
5778                 CFLAGS="$saved_CFLAGS"
5779 else
5780                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5781 $as_echo "yes" >&6; }
5782                  CFLAGS="$saved_CFLAGS $_define_flag"
5783 fi
5784 else
5785    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5786 $as_echo "no" >&6; }
5787                   CFLAGS="$saved_CFLAGS"
5788
5789 fi
5790 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5791 }
5792         {
5793         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat-security" >&5
5794 $as_echo_n "checking if $CC supports -Wformat-security... " >&6; }
5795         saved_CFLAGS="$CFLAGS"
5796         CFLAGS="$CFLAGS -Wformat-security"
5797         _define_flag=""
5798         test "x$_define_flag" = "x" && _define_flag="-Wformat-security"
5799         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5800 /* end confdefs.h.  */
5801 int main(void) { return 0; }
5802 _ACEOF
5803 if ac_fn_c_try_compile "$LINENO"; then :
5804
5805 if `grep -i "unrecognized option" conftest.err >/dev/null`
5806 then
5807                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5808 $as_echo "no" >&6; }
5809                 CFLAGS="$saved_CFLAGS"
5810 else
5811                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5812 $as_echo "yes" >&6; }
5813                  CFLAGS="$saved_CFLAGS $_define_flag"
5814 fi
5815 else
5816    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5817 $as_echo "no" >&6; }
5818                   CFLAGS="$saved_CFLAGS"
5819
5820 fi
5821 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5822 }
5823         {
5824         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsizeof-pointer-memaccess" >&5
5825 $as_echo_n "checking if $CC supports -Wsizeof-pointer-memaccess... " >&6; }
5826         saved_CFLAGS="$CFLAGS"
5827         CFLAGS="$CFLAGS -Wsizeof-pointer-memaccess"
5828         _define_flag=""
5829         test "x$_define_flag" = "x" && _define_flag="-Wsizeof-pointer-memaccess"
5830         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5831 /* end confdefs.h.  */
5832 int main(void) { return 0; }
5833 _ACEOF
5834 if ac_fn_c_try_compile "$LINENO"; then :
5835
5836 if `grep -i "unrecognized option" conftest.err >/dev/null`
5837 then
5838                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5839 $as_echo "no" >&6; }
5840                 CFLAGS="$saved_CFLAGS"
5841 else
5842                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5843 $as_echo "yes" >&6; }
5844                  CFLAGS="$saved_CFLAGS $_define_flag"
5845 fi
5846 else
5847    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5848 $as_echo "no" >&6; }
5849                   CFLAGS="$saved_CFLAGS"
5850
5851 fi
5852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5853 }
5854         {
5855         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-sign" >&5
5856 $as_echo_n "checking if $CC supports -Wpointer-sign... " >&6; }
5857         saved_CFLAGS="$CFLAGS"
5858         CFLAGS="$CFLAGS -Wpointer-sign"
5859         _define_flag="-Wno-pointer-sign"
5860         test "x$_define_flag" = "x" && _define_flag="-Wpointer-sign"
5861         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5862 /* end confdefs.h.  */
5863 int main(void) { return 0; }
5864 _ACEOF
5865 if ac_fn_c_try_compile "$LINENO"; then :
5866
5867 if `grep -i "unrecognized option" conftest.err >/dev/null`
5868 then
5869                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5870 $as_echo "no" >&6; }
5871                 CFLAGS="$saved_CFLAGS"
5872 else
5873                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5874 $as_echo "yes" >&6; }
5875                  CFLAGS="$saved_CFLAGS $_define_flag"
5876 fi
5877 else
5878    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5879 $as_echo "no" >&6; }
5880                   CFLAGS="$saved_CFLAGS"
5881
5882 fi
5883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5884 }
5885         {
5886         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunused-result" >&5
5887 $as_echo_n "checking if $CC supports -Wunused-result... " >&6; }
5888         saved_CFLAGS="$CFLAGS"
5889         CFLAGS="$CFLAGS -Wunused-result"
5890         _define_flag="-Wno-unused-result"
5891         test "x$_define_flag" = "x" && _define_flag="-Wunused-result"
5892         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5893 /* end confdefs.h.  */
5894 int main(void) { return 0; }
5895 _ACEOF
5896 if ac_fn_c_try_compile "$LINENO"; then :
5897
5898 if `grep -i "unrecognized option" conftest.err >/dev/null`
5899 then
5900                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5901 $as_echo "no" >&6; }
5902                 CFLAGS="$saved_CFLAGS"
5903 else
5904                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5905 $as_echo "yes" >&6; }
5906                  CFLAGS="$saved_CFLAGS $_define_flag"
5907 fi
5908 else
5909    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5910 $as_echo "no" >&6; }
5911                   CFLAGS="$saved_CFLAGS"
5912
5913 fi
5914 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5915 }
5916         {
5917         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fno-strict-aliasing" >&5
5918 $as_echo_n "checking if $CC supports -fno-strict-aliasing... " >&6; }
5919         saved_CFLAGS="$CFLAGS"
5920         CFLAGS="$CFLAGS -fno-strict-aliasing"
5921         _define_flag=""
5922         test "x$_define_flag" = "x" && _define_flag="-fno-strict-aliasing"
5923         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5924 /* end confdefs.h.  */
5925 int main(void) { return 0; }
5926 _ACEOF
5927 if ac_fn_c_try_compile "$LINENO"; then :
5928
5929 if `grep -i "unrecognized option" conftest.err >/dev/null`
5930 then
5931                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5932 $as_echo "no" >&6; }
5933                 CFLAGS="$saved_CFLAGS"
5934 else
5935                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5936 $as_echo "yes" >&6; }
5937                  CFLAGS="$saved_CFLAGS $_define_flag"
5938 fi
5939 else
5940    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5941 $as_echo "no" >&6; }
5942                   CFLAGS="$saved_CFLAGS"
5943
5944 fi
5945 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5946 }
5947         {
5948         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -D_FORTIFY_SOURCE=2" >&5
5949 $as_echo_n "checking if $CC supports -D_FORTIFY_SOURCE=2... " >&6; }
5950         saved_CFLAGS="$CFLAGS"
5951         CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=2"
5952         _define_flag=""
5953         test "x$_define_flag" = "x" && _define_flag="-D_FORTIFY_SOURCE=2"
5954         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5955 /* end confdefs.h.  */
5956 int main(void) { return 0; }
5957 _ACEOF
5958 if ac_fn_c_try_compile "$LINENO"; then :
5959
5960 if `grep -i "unrecognized option" conftest.err >/dev/null`
5961 then
5962                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5963 $as_echo "no" >&6; }
5964                 CFLAGS="$saved_CFLAGS"
5965 else
5966                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5967 $as_echo "yes" >&6; }
5968                  CFLAGS="$saved_CFLAGS $_define_flag"
5969 fi
5970 else
5971    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5972 $as_echo "no" >&6; }
5973                   CFLAGS="$saved_CFLAGS"
5974
5975 fi
5976 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5977 }
5978         { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc version" >&5
5979 $as_echo_n "checking gcc version... " >&6; }
5980         GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`
5981         case $GCC_VER in
5982                 1.*) no_attrib_nonnull=1 ;;
5983                 2.8* | 2.9*)
5984                      no_attrib_nonnull=1
5985                      ;;
5986                 2.*) no_attrib_nonnull=1 ;;
5987                 *) ;;
5988         esac
5989         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC_VER" >&5
5990 $as_echo "$GCC_VER" >&6; }
5991
5992         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-builtin-memset" >&5
5993 $as_echo_n "checking if $CC accepts -fno-builtin-memset... " >&6; }
5994         saved_CFLAGS="$CFLAGS"
5995         CFLAGS="$CFLAGS -fno-builtin-memset"
5996         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5997 /* end confdefs.h.  */
5998  #include <string.h>
5999 int
6000 main ()
6001 {
6002  char b[10]; memset(b, 0, sizeof(b));
6003   ;
6004   return 0;
6005 }
6006 _ACEOF
6007 if ac_fn_c_try_link "$LINENO"; then :
6008    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6009 $as_echo "yes" >&6; }
6010 else
6011    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6012 $as_echo "no" >&6; }
6013                   CFLAGS="$saved_CFLAGS"
6014
6015 fi
6016 rm -f core conftest.err conftest.$ac_objext \
6017     conftest$ac_exeext conftest.$ac_ext
6018
6019         # -fstack-protector-all doesn't always work for some GCC versions
6020         # and/or platforms, so we test if we can.  If it's not supported
6021         # on a given platform gcc will emit a warning so we use -Werror.
6022         if test "x$use_stack_protector" = "x1"; then
6023             for t in -fstack-protector-all -fstack-protector; do
6024                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports $t" >&5
6025 $as_echo_n "checking if $CC supports $t... " >&6; }
6026                 saved_CFLAGS="$CFLAGS"
6027                 saved_LDFLAGS="$LDFLAGS"
6028                 CFLAGS="$CFLAGS $t -Werror"
6029                 LDFLAGS="$LDFLAGS $t -Werror"
6030                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6031 /* end confdefs.h.  */
6032  #include <stdio.h>
6033 int
6034 main ()
6035 {
6036
6037         char x[256];
6038         snprintf(x, sizeof(x), "XXX");
6039
6040   ;
6041   return 0;
6042 }
6043 _ACEOF
6044 if ac_fn_c_try_link "$LINENO"; then :
6045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6046 $as_echo "yes" >&6; }
6047                       CFLAGS="$saved_CFLAGS $t"
6048                       LDFLAGS="$saved_LDFLAGS $t"
6049                       { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $t works" >&5
6050 $as_echo_n "checking if $t works... " >&6; }
6051                       if test "$cross_compiling" = yes; then :
6052    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: cannot test" >&5
6053 $as_echo "$as_me: WARNING: cross compiling: cannot test" >&2;}
6054                           break
6055
6056 else
6057   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6058 /* end confdefs.h.  */
6059  #include <stdio.h>
6060 int
6061 main ()
6062 {
6063
6064         char x[256];
6065         snprintf(x, sizeof(x), "XXX");
6066
6067   ;
6068   return 0;
6069 }
6070 _ACEOF
6071 if ac_fn_c_try_run "$LINENO"; then :
6072    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6073 $as_echo "yes" >&6; }
6074                           break
6075 else
6076    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6077 $as_echo "no" >&6; }
6078 fi
6079 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6080   conftest.$ac_objext conftest.beam conftest.$ac_ext
6081 fi
6082
6083
6084 else
6085    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6086 $as_echo "no" >&6; }
6087
6088 fi
6089 rm -f core conftest.err conftest.$ac_objext \
6090     conftest$ac_exeext conftest.$ac_ext
6091                 CFLAGS="$saved_CFLAGS"
6092                 LDFLAGS="$saved_LDFLAGS"
6093             done
6094         fi
6095
6096         if test -z "$have_llong_max"; then
6097                 # retry LLONG_MAX with -std=gnu99, needed on some Linuxes
6098                 unset ac_cv_have_decl_LLONG_MAX
6099                 saved_CFLAGS="$CFLAGS"
6100                 CFLAGS="$CFLAGS -std=gnu99"
6101                 ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
6102
6103 "
6104 if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
6105   have_llong_max=1
6106 else
6107   CFLAGS="$saved_CFLAGS"
6108 fi
6109
6110         fi
6111 fi
6112
6113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows __attribute__ on return types" >&5
6114 $as_echo_n "checking if compiler allows __attribute__ on return types... " >&6; }
6115 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6116 /* end confdefs.h.  */
6117
6118 #include <stdlib.h>
6119 __attribute__((__unused__)) static void foo(void){return;}
6120 int
6121 main ()
6122 {
6123  exit(0);
6124   ;
6125   return 0;
6126 }
6127 _ACEOF
6128 if ac_fn_c_try_compile "$LINENO"; then :
6129    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6130 $as_echo "yes" >&6; }
6131 else
6132    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6133 $as_echo "no" >&6; }
6134
6135 $as_echo "#define NO_ATTRIBUTE_ON_RETURN_TYPE 1" >>confdefs.h
6136
6137
6138 fi
6139 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6140
6141 if test "x$no_attrib_nonnull" != "x1" ; then
6142
6143 $as_echo "#define HAVE_ATTRIBUTE__NONNULL__ 1" >>confdefs.h
6144
6145 fi
6146
6147
6148 # Check whether --with-rpath was given.
6149 if test "${with_rpath+set}" = set; then :
6150   withval=$with_rpath;
6151                 if test "x$withval" = "xno" ; then
6152                         need_dash_r=""
6153                 fi
6154                 if test "x$withval" = "xyes" ; then
6155                         need_dash_r=1
6156                 fi
6157
6158
6159 fi
6160
6161
6162 # Allow user to specify flags
6163
6164 # Check whether --with-cflags was given.
6165 if test "${with_cflags+set}" = set; then :
6166   withval=$with_cflags;
6167                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
6168                     test "x${withval}" != "xyes"; then
6169                         CFLAGS="$CFLAGS $withval"
6170                 fi
6171
6172
6173 fi
6174
6175
6176 # Check whether --with-cppflags was given.
6177 if test "${with_cppflags+set}" = set; then :
6178   withval=$with_cppflags;
6179                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
6180                     test "x${withval}" != "xyes"; then
6181                         CPPFLAGS="$CPPFLAGS $withval"
6182                 fi
6183
6184
6185 fi
6186
6187
6188 # Check whether --with-ldflags was given.
6189 if test "${with_ldflags+set}" = set; then :
6190   withval=$with_ldflags;
6191                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
6192                     test "x${withval}" != "xyes"; then
6193                         LDFLAGS="$LDFLAGS $withval"
6194                 fi
6195
6196
6197 fi
6198
6199
6200 # Check whether --with-libs was given.
6201 if test "${with_libs+set}" = set; then :
6202   withval=$with_libs;
6203                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
6204                     test "x${withval}" != "xyes"; then
6205                         LIBS="$LIBS $withval"
6206                 fi
6207
6208
6209 fi
6210
6211
6212 # Check whether --with-Werror was given.
6213 if test "${with_Werror+set}" = set; then :
6214   withval=$with_Werror;
6215                 if test -n "$withval"  &&  test "x$withval" != "xno"; then
6216                         werror_flags="-Werror"
6217                         if test "x${withval}" != "xyes"; then
6218                                 werror_flags="$withval"
6219                         fi
6220                 fi
6221
6222
6223 fi
6224
6225
6226 for ac_header in  \
6227         bstring.h \
6228         crypt.h \
6229         crypto/sha2.h \
6230         dirent.h \
6231         endian.h \
6232         elf.h \
6233         features.h \
6234         fcntl.h \
6235         floatingpoint.h \
6236         getopt.h \
6237         glob.h \
6238         ia.h \
6239         iaf.h \
6240         limits.h \
6241         locale.h \
6242         login.h \
6243         maillock.h \
6244         ndir.h \
6245         net/if_tun.h \
6246         netdb.h \
6247         netgroup.h \
6248         pam/pam_appl.h \
6249         paths.h \
6250         poll.h \
6251         pty.h \
6252         readpassphrase.h \
6253         rpc/types.h \
6254         security/pam_appl.h \
6255         sha2.h \
6256         shadow.h \
6257         stddef.h \
6258         stdint.h \
6259         string.h \
6260         strings.h \
6261         sys/audit.h \
6262         sys/bitypes.h \
6263         sys/bsdtty.h \
6264         sys/cdefs.h \
6265         sys/dir.h \
6266         sys/mman.h \
6267         sys/ndir.h \
6268         sys/poll.h \
6269         sys/prctl.h \
6270         sys/pstat.h \
6271         sys/select.h \
6272         sys/stat.h \
6273         sys/stream.h \
6274         sys/stropts.h \
6275         sys/strtio.h \
6276         sys/statvfs.h \
6277         sys/sysmacros.h \
6278         sys/time.h \
6279         sys/timers.h \
6280         time.h \
6281         tmpdir.h \
6282         ttyent.h \
6283         ucred.h \
6284         unistd.h \
6285         usersec.h \
6286         util.h \
6287         utime.h \
6288         utmp.h \
6289         utmpx.h \
6290         vis.h \
6291
6292 do :
6293   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6294 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6295 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6296   cat >>confdefs.h <<_ACEOF
6297 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6298 _ACEOF
6299
6300 fi
6301
6302 done
6303
6304
6305 # lastlog.h requires sys/time.h to be included first on Solaris
6306 for ac_header in lastlog.h
6307 do :
6308   ac_fn_c_check_header_compile "$LINENO" "lastlog.h" "ac_cv_header_lastlog_h" "
6309 #ifdef HAVE_SYS_TIME_H
6310 # include <sys/time.h>
6311 #endif
6312
6313 "
6314 if test "x$ac_cv_header_lastlog_h" = xyes; then :
6315   cat >>confdefs.h <<_ACEOF
6316 #define HAVE_LASTLOG_H 1
6317 _ACEOF
6318
6319 fi
6320
6321 done
6322
6323
6324 # sys/ptms.h requires sys/stream.h to be included first on Solaris
6325 for ac_header in sys/ptms.h
6326 do :
6327   ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "
6328 #ifdef HAVE_SYS_STREAM_H
6329 # include <sys/stream.h>
6330 #endif
6331
6332 "
6333 if test "x$ac_cv_header_sys_ptms_h" = xyes; then :
6334   cat >>confdefs.h <<_ACEOF
6335 #define HAVE_SYS_PTMS_H 1
6336 _ACEOF
6337
6338 fi
6339
6340 done
6341
6342
6343 # login_cap.h requires sys/types.h on NetBSD
6344 for ac_header in login_cap.h
6345 do :
6346   ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "
6347 #include <sys/types.h>
6348
6349 "
6350 if test "x$ac_cv_header_login_cap_h" = xyes; then :
6351   cat >>confdefs.h <<_ACEOF
6352 #define HAVE_LOGIN_CAP_H 1
6353 _ACEOF
6354
6355 fi
6356
6357 done
6358
6359
6360 # older BSDs need sys/param.h before sys/mount.h
6361 for ac_header in sys/mount.h
6362 do :
6363   ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "
6364 #include <sys/param.h>
6365
6366 "
6367 if test "x$ac_cv_header_sys_mount_h" = xyes; then :
6368   cat >>confdefs.h <<_ACEOF
6369 #define HAVE_SYS_MOUNT_H 1
6370 _ACEOF
6371
6372 fi
6373
6374 done
6375
6376
6377 # Android requires sys/socket.h to be included before sys/un.h
6378 for ac_header in sys/un.h
6379 do :
6380   ac_fn_c_check_header_compile "$LINENO" "sys/un.h" "ac_cv_header_sys_un_h" "
6381 #include <sys/types.h>
6382 #include <sys/socket.h>
6383
6384 "
6385 if test "x$ac_cv_header_sys_un_h" = xyes; then :
6386   cat >>confdefs.h <<_ACEOF
6387 #define HAVE_SYS_UN_H 1
6388 _ACEOF
6389
6390 fi
6391
6392 done
6393
6394
6395 # Messages for features tested for in target-specific section
6396 SIA_MSG="no"
6397 SPC_MSG="no"
6398 SP_MSG="no"
6399
6400 # Check for some target-specific stuff
6401 case "$host" in
6402 *-*-aix*)
6403         # Some versions of VAC won't allow macro redefinitions at
6404         # -qlanglevel=ansi, and autoconf 2.60 sometimes insists on using that
6405         # particularly with older versions of vac or xlc.
6406         # It also throws errors about null macro argments, but these are
6407         # not fatal.
6408         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows macro redefinitions" >&5
6409 $as_echo_n "checking if compiler allows macro redefinitions... " >&6; }
6410         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6411 /* end confdefs.h.  */
6412
6413 #define testmacro foo
6414 #define testmacro bar
6415 int
6416 main ()
6417 {
6418  exit(0);
6419   ;
6420   return 0;
6421 }
6422 _ACEOF
6423 if ac_fn_c_try_compile "$LINENO"; then :
6424    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6425 $as_echo "yes" >&6; }
6426 else
6427    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6428 $as_echo "no" >&6; }
6429               CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
6430               LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`"
6431               CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
6432               CPPFLAGS="`echo $CPPFLAGS | sed 's/-qlanglvl\=ansi//g'`"
6433
6434
6435 fi
6436 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6437
6438         { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to specify blibpath for linker ($LD)" >&5
6439 $as_echo_n "checking how to specify blibpath for linker ($LD)... " >&6; }
6440         if (test -z "$blibpath"); then
6441                 blibpath="/usr/lib:/lib"
6442         fi
6443         saved_LDFLAGS="$LDFLAGS"
6444         if test "$GCC" = "yes"; then
6445                 flags="-Wl,-blibpath: -Wl,-rpath, -blibpath:"
6446         else
6447                 flags="-blibpath: -Wl,-blibpath: -Wl,-rpath,"
6448         fi
6449         for tryflags in $flags ;do
6450                 if (test -z "$blibflags"); then
6451                         LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
6452                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6453 /* end confdefs.h.  */
6454
6455 int
6456 main ()
6457 {
6458
6459   ;
6460   return 0;
6461 }
6462 _ACEOF
6463 if ac_fn_c_try_link "$LINENO"; then :
6464   blibflags=$tryflags
6465 fi
6466 rm -f core conftest.err conftest.$ac_objext \
6467     conftest$ac_exeext conftest.$ac_ext
6468                 fi
6469         done
6470         if (test -z "$blibflags"); then
6471                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6472 $as_echo "not found" >&6; }
6473                 as_fn_error $? "*** must be able to specify blibpath on AIX - check config.log" "$LINENO" 5
6474         else
6475                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $blibflags" >&5
6476 $as_echo "$blibflags" >&6; }
6477         fi
6478         LDFLAGS="$saved_LDFLAGS"
6479                 ac_fn_c_check_func "$LINENO" "authenticate" "ac_cv_func_authenticate"
6480 if test "x$ac_cv_func_authenticate" = xyes; then :
6481
6482 $as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
6483
6484 else
6485   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for authenticate in -ls" >&5
6486 $as_echo_n "checking for authenticate in -ls... " >&6; }
6487 if ${ac_cv_lib_s_authenticate+:} false; then :
6488   $as_echo_n "(cached) " >&6
6489 else
6490   ac_check_lib_save_LIBS=$LIBS
6491 LIBS="-ls  $LIBS"
6492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6493 /* end confdefs.h.  */
6494
6495 /* Override any GCC internal prototype to avoid an error.
6496    Use char because int might match the return type of a GCC
6497    builtin and then its argument prototype would still apply.  */
6498 #ifdef __cplusplus
6499 extern "C"
6500 #endif
6501 char authenticate ();
6502 int
6503 main ()
6504 {
6505 return authenticate ();
6506   ;
6507   return 0;
6508 }
6509 _ACEOF
6510 if ac_fn_c_try_link "$LINENO"; then :
6511   ac_cv_lib_s_authenticate=yes
6512 else
6513   ac_cv_lib_s_authenticate=no
6514 fi
6515 rm -f core conftest.err conftest.$ac_objext \
6516     conftest$ac_exeext conftest.$ac_ext
6517 LIBS=$ac_check_lib_save_LIBS
6518 fi
6519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_s_authenticate" >&5
6520 $as_echo "$ac_cv_lib_s_authenticate" >&6; }
6521 if test "x$ac_cv_lib_s_authenticate" = xyes; then :
6522    $as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
6523
6524                                 LIBS="$LIBS -ls"
6525
6526 fi
6527
6528
6529 fi
6530
6531                 ac_fn_c_check_decl "$LINENO" "authenticate" "ac_cv_have_decl_authenticate" "#include <usersec.h>
6532 "
6533 if test "x$ac_cv_have_decl_authenticate" = xyes; then :
6534   ac_have_decl=1
6535 else
6536   ac_have_decl=0
6537 fi
6538
6539 cat >>confdefs.h <<_ACEOF
6540 #define HAVE_DECL_AUTHENTICATE $ac_have_decl
6541 _ACEOF
6542 ac_fn_c_check_decl "$LINENO" "loginrestrictions" "ac_cv_have_decl_loginrestrictions" "#include <usersec.h>
6543 "
6544 if test "x$ac_cv_have_decl_loginrestrictions" = xyes; then :
6545   ac_have_decl=1
6546 else
6547   ac_have_decl=0
6548 fi
6549
6550 cat >>confdefs.h <<_ACEOF
6551 #define HAVE_DECL_LOGINRESTRICTIONS $ac_have_decl
6552 _ACEOF
6553 ac_fn_c_check_decl "$LINENO" "loginsuccess" "ac_cv_have_decl_loginsuccess" "#include <usersec.h>
6554 "
6555 if test "x$ac_cv_have_decl_loginsuccess" = xyes; then :
6556   ac_have_decl=1
6557 else
6558   ac_have_decl=0
6559 fi
6560
6561 cat >>confdefs.h <<_ACEOF
6562 #define HAVE_DECL_LOGINSUCCESS $ac_have_decl
6563 _ACEOF
6564 ac_fn_c_check_decl "$LINENO" "passwdexpired" "ac_cv_have_decl_passwdexpired" "#include <usersec.h>
6565 "
6566 if test "x$ac_cv_have_decl_passwdexpired" = xyes; then :
6567   ac_have_decl=1
6568 else
6569   ac_have_decl=0
6570 fi
6571
6572 cat >>confdefs.h <<_ACEOF
6573 #define HAVE_DECL_PASSWDEXPIRED $ac_have_decl
6574 _ACEOF
6575 ac_fn_c_check_decl "$LINENO" "setauthdb" "ac_cv_have_decl_setauthdb" "#include <usersec.h>
6576 "
6577 if test "x$ac_cv_have_decl_setauthdb" = xyes; then :
6578   ac_have_decl=1
6579 else
6580   ac_have_decl=0
6581 fi
6582
6583 cat >>confdefs.h <<_ACEOF
6584 #define HAVE_DECL_SETAUTHDB $ac_have_decl
6585 _ACEOF
6586
6587                 ac_fn_c_check_decl "$LINENO" "loginfailed" "ac_cv_have_decl_loginfailed" "#include <usersec.h>
6588
6589 "
6590 if test "x$ac_cv_have_decl_loginfailed" = xyes; then :
6591   ac_have_decl=1
6592 else
6593   ac_have_decl=0
6594 fi
6595
6596 cat >>confdefs.h <<_ACEOF
6597 #define HAVE_DECL_LOGINFAILED $ac_have_decl
6598 _ACEOF
6599 if test $ac_have_decl = 1; then :
6600   { $as_echo "$as_me:${as_lineno-$LINENO}: checking if loginfailed takes 4 arguments" >&5
6601 $as_echo_n "checking if loginfailed takes 4 arguments... " >&6; }
6602             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6603 /* end confdefs.h.  */
6604  #include <usersec.h>
6605 int
6606 main ()
6607 {
6608  (void)loginfailed("user","host","tty",0);
6609   ;
6610   return 0;
6611 }
6612 _ACEOF
6613 if ac_fn_c_try_compile "$LINENO"; then :
6614   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6615 $as_echo "yes" >&6; }
6616
6617 $as_echo "#define AIX_LOGINFAILED_4ARG 1" >>confdefs.h
6618
6619 else
6620   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6621 $as_echo "no" >&6; }
6622
6623 fi
6624 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6625 fi
6626
6627         for ac_func in getgrset setauthdb
6628 do :
6629   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6630 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6631 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6632   cat >>confdefs.h <<_ACEOF
6633 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6634 _ACEOF
6635
6636 fi
6637 done
6638
6639         ac_fn_c_check_decl "$LINENO" "F_CLOSEM" "ac_cv_have_decl_F_CLOSEM" " #include <limits.h>
6640               #include <fcntl.h>
6641
6642 "
6643 if test "x$ac_cv_have_decl_F_CLOSEM" = xyes; then :
6644
6645 $as_echo "#define HAVE_FCNTL_CLOSEM 1" >>confdefs.h
6646
6647 fi
6648
6649         check_for_aix_broken_getaddrinfo=1
6650
6651 $as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
6652
6653
6654 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
6655
6656
6657 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
6658
6659
6660 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
6661
6662
6663 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
6664
6665
6666 $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
6667
6668
6669 $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
6670
6671
6672 $as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
6673
6674
6675 $as_echo "#define PTY_ZEROREAD 1" >>confdefs.h
6676
6677
6678 $as_echo "#define PLATFORM_SYS_DIR_UID 2" >>confdefs.h
6679
6680         ;;
6681 *-*-android*)
6682
6683 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
6684
6685
6686 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
6687
6688         ;;
6689 *-*-cygwin*)
6690         check_for_libcrypt_later=1
6691         LIBS="$LIBS /usr/lib/textreadmode.o"
6692
6693 $as_echo "#define HAVE_CYGWIN 1" >>confdefs.h
6694
6695
6696 $as_echo "#define USE_PIPES 1" >>confdefs.h
6697
6698
6699 $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
6700
6701
6702 $as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
6703
6704
6705 $as_echo "#define NO_IPPORT_RESERVED_CONCEPT 1" >>confdefs.h
6706
6707
6708 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
6709
6710
6711 $as_echo "#define SSH_IOBUFSZ 65535" >>confdefs.h
6712
6713
6714 $as_echo "#define FILESYSTEM_NO_BACKSLASH 1" >>confdefs.h
6715
6716         ;;
6717 *-*-dgux*)
6718
6719 $as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
6720
6721         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
6722
6723         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
6724
6725         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
6726
6727         ;;
6728 *-*-darwin*)
6729         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have working getaddrinfo" >&5
6730 $as_echo_n "checking if we have working getaddrinfo... " >&6; }
6731         if test "$cross_compiling" = yes; then :
6732   { $as_echo "$as_me:${as_lineno-$LINENO}: result: assume it is working" >&5
6733 $as_echo "assume it is working" >&6; }
6734 else
6735   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6736 /* end confdefs.h.  */
6737  #include <mach-o/dyld.h>
6738 main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
6739                 exit(0);
6740         else
6741                 exit(1);
6742 }
6743
6744 _ACEOF
6745 if ac_fn_c_try_run "$LINENO"; then :
6746   { $as_echo "$as_me:${as_lineno-$LINENO}: result: working" >&5
6747 $as_echo "working" >&6; }
6748 else
6749   { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5
6750 $as_echo "buggy" >&6; }
6751
6752 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
6753
6754
6755 fi
6756 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6757   conftest.$ac_objext conftest.beam conftest.$ac_ext
6758 fi
6759
6760         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
6761
6762         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
6763
6764         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
6765
6766
6767 $as_echo "#define BROKEN_GLOB 1" >>confdefs.h
6768
6769
6770 cat >>confdefs.h <<_ACEOF
6771 #define BIND_8_COMPAT 1
6772 _ACEOF
6773
6774
6775 $as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
6776
6777
6778 $as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
6779
6780
6781 $as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
6782
6783
6784         ac_fn_c_check_decl "$LINENO" "AU_IPv4" "ac_cv_have_decl_AU_IPv4" "$ac_includes_default"
6785 if test "x$ac_cv_have_decl_AU_IPv4" = xyes; then :
6786
6787 else
6788
6789 $as_echo "#define AU_IPv4 0" >>confdefs.h
6790
6791             #include <bsm/audit.h>
6792
6793 $as_echo "#define LASTLOG_WRITE_PUTUTXLINE 1" >>confdefs.h
6794
6795
6796 fi
6797
6798
6799 $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
6800
6801         for ac_func in sandbox_init
6802 do :
6803   ac_fn_c_check_func "$LINENO" "sandbox_init" "ac_cv_func_sandbox_init"
6804 if test "x$ac_cv_func_sandbox_init" = xyes; then :
6805   cat >>confdefs.h <<_ACEOF
6806 #define HAVE_SANDBOX_INIT 1
6807 _ACEOF
6808
6809 fi
6810 done
6811
6812         for ac_header in sandbox.h
6813 do :
6814   ac_fn_c_check_header_mongrel "$LINENO" "sandbox.h" "ac_cv_header_sandbox_h" "$ac_includes_default"
6815 if test "x$ac_cv_header_sandbox_h" = xyes; then :
6816   cat >>confdefs.h <<_ACEOF
6817 #define HAVE_SANDBOX_H 1
6818 _ACEOF
6819
6820 fi
6821
6822 done
6823
6824         ;;
6825 *-*-dragonfly*)
6826         SSHDLIBS="$SSHDLIBS -lcrypt"
6827         ;;
6828 *-*-haiku*)
6829     LIBS="$LIBS -lbsd "
6830     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
6831 $as_echo_n "checking for socket in -lnetwork... " >&6; }
6832 if ${ac_cv_lib_network_socket+:} false; then :
6833   $as_echo_n "(cached) " >&6
6834 else
6835   ac_check_lib_save_LIBS=$LIBS
6836 LIBS="-lnetwork  $LIBS"
6837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6838 /* end confdefs.h.  */
6839
6840 /* Override any GCC internal prototype to avoid an error.
6841    Use char because int might match the return type of a GCC
6842    builtin and then its argument prototype would still apply.  */
6843 #ifdef __cplusplus
6844 extern "C"
6845 #endif
6846 char socket ();
6847 int
6848 main ()
6849 {
6850 return socket ();
6851   ;
6852   return 0;
6853 }
6854 _ACEOF
6855 if ac_fn_c_try_link "$LINENO"; then :
6856   ac_cv_lib_network_socket=yes
6857 else
6858   ac_cv_lib_network_socket=no
6859 fi
6860 rm -f core conftest.err conftest.$ac_objext \
6861     conftest$ac_exeext conftest.$ac_ext
6862 LIBS=$ac_check_lib_save_LIBS
6863 fi
6864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
6865 $as_echo "$ac_cv_lib_network_socket" >&6; }
6866 if test "x$ac_cv_lib_network_socket" = xyes; then :
6867   cat >>confdefs.h <<_ACEOF
6868 #define HAVE_LIBNETWORK 1
6869 _ACEOF
6870
6871   LIBS="-lnetwork $LIBS"
6872
6873 fi
6874
6875     $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
6876
6877     MANTYPE=man
6878     ;;
6879 *-*-hpux*)
6880         # first we define all of the options common to all HP-UX releases
6881         CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
6882         IPADDR_IN_DISPLAY=yes
6883         $as_echo "#define USE_PIPES 1" >>confdefs.h
6884
6885
6886 $as_echo "#define LOGIN_NO_ENDOPT 1" >>confdefs.h
6887
6888         $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
6889
6890
6891 $as_echo "#define LOCKED_PASSWD_STRING \"*\"" >>confdefs.h
6892
6893         $as_echo "#define SPT_TYPE SPT_PSTAT" >>confdefs.h
6894
6895
6896 $as_echo "#define PLATFORM_SYS_DIR_UID 2" >>confdefs.h
6897
6898         maildir="/var/mail"
6899         LIBS="$LIBS -lsec"
6900         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_error in -lxnet" >&5
6901 $as_echo_n "checking for t_error in -lxnet... " >&6; }
6902 if ${ac_cv_lib_xnet_t_error+:} false; then :
6903   $as_echo_n "(cached) " >&6
6904 else
6905   ac_check_lib_save_LIBS=$LIBS
6906 LIBS="-lxnet  $LIBS"
6907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6908 /* end confdefs.h.  */
6909
6910 /* Override any GCC internal prototype to avoid an error.
6911    Use char because int might match the return type of a GCC
6912    builtin and then its argument prototype would still apply.  */
6913 #ifdef __cplusplus
6914 extern "C"
6915 #endif
6916 char t_error ();
6917 int
6918 main ()
6919 {
6920 return t_error ();
6921   ;
6922   return 0;
6923 }
6924 _ACEOF
6925 if ac_fn_c_try_link "$LINENO"; then :
6926   ac_cv_lib_xnet_t_error=yes
6927 else
6928   ac_cv_lib_xnet_t_error=no
6929 fi
6930 rm -f core conftest.err conftest.$ac_objext \
6931     conftest$ac_exeext conftest.$ac_ext
6932 LIBS=$ac_check_lib_save_LIBS
6933 fi
6934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_t_error" >&5
6935 $as_echo "$ac_cv_lib_xnet_t_error" >&6; }
6936 if test "x$ac_cv_lib_xnet_t_error" = xyes; then :
6937   cat >>confdefs.h <<_ACEOF
6938 #define HAVE_LIBXNET 1
6939 _ACEOF
6940
6941   LIBS="-lxnet $LIBS"
6942
6943 else
6944   as_fn_error $? "*** -lxnet needed on HP-UX - check config.log ***" "$LINENO" 5
6945 fi
6946
6947
6948         # next, we define all of the options specific to major releases
6949         case "$host" in
6950         *-*-hpux10*)
6951                 if test -z "$GCC"; then
6952                         CFLAGS="$CFLAGS -Ae"
6953                 fi
6954                 ;;
6955         *-*-hpux11*)
6956
6957 $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
6958
6959
6960 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
6961
6962
6963 $as_echo "#define USE_BTMP 1" >>confdefs.h
6964
6965                 check_for_hpux_broken_getaddrinfo=1
6966                 check_for_conflicting_getspnam=1
6967                 ;;
6968         esac
6969
6970         # lastly, we define options specific to minor releases
6971         case "$host" in
6972         *-*-hpux10.26)
6973
6974 $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
6975
6976                 disable_ptmx_check=yes
6977                 LIBS="$LIBS -lsecpw"
6978                 ;;
6979         esac
6980         ;;
6981 *-*-irix5*)
6982         PATH="$PATH:/usr/etc"
6983
6984 $as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
6985
6986         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
6987
6988         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
6989
6990         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
6991
6992
6993 $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
6994
6995         $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
6996
6997         ;;
6998 *-*-irix6*)
6999         PATH="$PATH:/usr/etc"
7000
7001 $as_echo "#define WITH_IRIX_ARRAY 1" >>confdefs.h
7002
7003
7004 $as_echo "#define WITH_IRIX_PROJECT 1" >>confdefs.h
7005
7006
7007 $as_echo "#define WITH_IRIX_AUDIT 1" >>confdefs.h
7008
7009         ac_fn_c_check_func "$LINENO" "jlimit_startjob" "ac_cv_func_jlimit_startjob"
7010 if test "x$ac_cv_func_jlimit_startjob" = xyes; then :
7011
7012 $as_echo "#define WITH_IRIX_JOBS 1" >>confdefs.h
7013
7014 fi
7015
7016         $as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
7017
7018         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7019
7020         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7021
7022         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7023
7024
7025 $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
7026
7027         $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
7028
7029         $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7030
7031         ;;
7032 *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
7033         check_for_libcrypt_later=1
7034         $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
7035
7036         $as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
7037
7038         $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7039
7040
7041 $as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
7042
7043
7044 $as_echo "#define USE_BTMP 1" >>confdefs.h
7045
7046         ;;
7047 *-*-linux*)
7048         no_dev_ptmx=1
7049         check_for_libcrypt_later=1
7050         check_for_openpty_ctty_bug=1
7051
7052 $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
7053
7054
7055 $as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
7056
7057         $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7058
7059
7060 $as_echo "#define LINK_OPNOTSUPP_ERRNO EPERM" >>confdefs.h
7061
7062
7063 $as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
7064
7065         $as_echo "#define USE_BTMP 1" >>confdefs.h
7066
7067
7068 $as_echo "#define LINUX_OOM_ADJUST 1" >>confdefs.h
7069
7070         inet6_default_4in6=yes
7071         case `uname -r` in
7072         1.*|2.0.*)
7073
7074 $as_echo "#define BROKEN_CMSG_TYPE 1" >>confdefs.h
7075
7076                 ;;
7077         esac
7078         # tun(4) forwarding compat code
7079         for ac_header in linux/if_tun.h
7080 do :
7081   ac_fn_c_check_header_mongrel "$LINENO" "linux/if_tun.h" "ac_cv_header_linux_if_tun_h" "$ac_includes_default"
7082 if test "x$ac_cv_header_linux_if_tun_h" = xyes; then :
7083   cat >>confdefs.h <<_ACEOF
7084 #define HAVE_LINUX_IF_TUN_H 1
7085 _ACEOF
7086
7087 fi
7088
7089 done
7090
7091         if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then
7092
7093 $as_echo "#define SSH_TUN_LINUX 1" >>confdefs.h
7094
7095
7096 $as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
7097
7098
7099 $as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
7100
7101         fi
7102         for ac_header in linux/seccomp.h linux/filter.h linux/audit.h
7103 do :
7104   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7105 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#include <linux/types.h>
7106 "
7107 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7108   cat >>confdefs.h <<_ACEOF
7109 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7110 _ACEOF
7111
7112 fi
7113
7114 done
7115
7116         for ac_func in prctl
7117 do :
7118   ac_fn_c_check_func "$LINENO" "prctl" "ac_cv_func_prctl"
7119 if test "x$ac_cv_func_prctl" = xyes; then :
7120   cat >>confdefs.h <<_ACEOF
7121 #define HAVE_PRCTL 1
7122 _ACEOF
7123
7124 fi
7125 done
7126
7127         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for seccomp architecture" >&5
7128 $as_echo_n "checking for seccomp architecture... " >&6; }
7129         seccomp_audit_arch=
7130         case "$host" in
7131         x86_64-*)
7132                 seccomp_audit_arch=AUDIT_ARCH_X86_64
7133                 ;;
7134         i*86-*)
7135                 seccomp_audit_arch=AUDIT_ARCH_I386
7136                 ;;
7137         arm*-*)
7138                 seccomp_audit_arch=AUDIT_ARCH_ARM
7139                 ;;
7140         esac
7141         if test "x$seccomp_audit_arch" != "x" ; then
7142                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: \"$seccomp_audit_arch\"" >&5
7143 $as_echo "\"$seccomp_audit_arch\"" >&6; }
7144
7145 cat >>confdefs.h <<_ACEOF
7146 #define SECCOMP_AUDIT_ARCH $seccomp_audit_arch
7147 _ACEOF
7148
7149         else
7150                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: architecture not supported" >&5
7151 $as_echo "architecture not supported" >&6; }
7152         fi
7153         ;;
7154 mips-sony-bsd|mips-sony-newsos4)
7155
7156 $as_echo "#define NEED_SETPGRP 1" >>confdefs.h
7157
7158         SONY=1
7159         ;;
7160 *-*-netbsd*)
7161         check_for_libcrypt_before=1
7162         if test "x$withval" != "xno" ; then
7163                 need_dash_r=1
7164         fi
7165
7166 $as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
7167
7168         ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
7169 if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
7170
7171 else
7172
7173 $as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
7174
7175 fi
7176
7177
7178
7179 $as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
7180
7181         ;;
7182 *-*-freebsd*)
7183         check_for_libcrypt_later=1
7184
7185 $as_echo "#define LOCKED_PASSWD_PREFIX \"*LOCKED*\"" >>confdefs.h
7186
7187
7188 $as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
7189
7190         ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
7191 if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
7192
7193 else
7194
7195 $as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
7196
7197 fi
7198
7199
7200
7201 $as_echo "#define BROKEN_GLOB 1" >>confdefs.h
7202
7203
7204 $as_echo "#define BROKEN_STRNVIS 1" >>confdefs.h
7205
7206         ;;
7207 *-*-bsdi*)
7208         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7209
7210         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7211
7212         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7213
7214         ;;
7215 *-next-*)
7216         conf_lastlog_location="/usr/adm/lastlog"
7217         conf_utmp_location=/etc/utmp
7218         conf_wtmp_location=/usr/adm/wtmp
7219         maildir=/usr/spool/mail
7220
7221 $as_echo "#define HAVE_NEXT 1" >>confdefs.h
7222
7223         $as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
7224
7225         $as_echo "#define USE_PIPES 1" >>confdefs.h
7226
7227
7228 $as_echo "#define BROKEN_SAVED_UIDS 1" >>confdefs.h
7229
7230         ;;
7231 *-*-openbsd*)
7232
7233 $as_echo "#define HAVE_ATTRIBUTE__SENTINEL__ 1" >>confdefs.h
7234
7235
7236 $as_echo "#define HAVE_ATTRIBUTE__BOUNDED__ 1" >>confdefs.h
7237
7238
7239 $as_echo "#define SSH_TUN_OPENBSD 1" >>confdefs.h
7240
7241
7242 $as_echo "#define SYSLOG_R_SAFE_IN_SIGHAND 1" >>confdefs.h
7243
7244         ;;
7245 *-*-solaris*)
7246         if test "x$withval" != "xno" ; then
7247                 need_dash_r=1
7248         fi
7249         $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
7250
7251         $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
7252
7253
7254 $as_echo "#define LOGIN_NEEDS_TERM 1" >>confdefs.h
7255
7256         $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
7257
7258
7259 $as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
7260
7261         $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7262
7263         # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
7264
7265 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
7266
7267
7268 $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
7269
7270
7271 $as_echo "#define BROKEN_TCGETATTR_ICANON 1" >>confdefs.h
7272
7273         external_path_file=/etc/default/login
7274         # hardwire lastlog location (can't detect it on some versions)
7275         conf_lastlog_location="/var/adm/lastlog"
7276         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obsolete utmp and wtmp in solaris2.x" >&5
7277 $as_echo_n "checking for obsolete utmp and wtmp in solaris2.x... " >&6; }
7278         sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
7279         if test "$sol2ver" -ge 8; then
7280                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7281 $as_echo "yes" >&6; }
7282                 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
7283
7284
7285 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
7286
7287         else
7288                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7289 $as_echo "no" >&6; }
7290         fi
7291
7292 # Check whether --with-solaris-contracts was given.
7293 if test "${with_solaris_contracts+set}" = set; then :
7294   withval=$with_solaris_contracts;
7295                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ct_tmpl_activate in -lcontract" >&5
7296 $as_echo_n "checking for ct_tmpl_activate in -lcontract... " >&6; }
7297 if ${ac_cv_lib_contract_ct_tmpl_activate+:} false; then :
7298   $as_echo_n "(cached) " >&6
7299 else
7300   ac_check_lib_save_LIBS=$LIBS
7301 LIBS="-lcontract  $LIBS"
7302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7303 /* end confdefs.h.  */
7304
7305 /* Override any GCC internal prototype to avoid an error.
7306    Use char because int might match the return type of a GCC
7307    builtin and then its argument prototype would still apply.  */
7308 #ifdef __cplusplus
7309 extern "C"
7310 #endif
7311 char ct_tmpl_activate ();
7312 int
7313 main ()
7314 {
7315 return ct_tmpl_activate ();
7316   ;
7317   return 0;
7318 }
7319 _ACEOF
7320 if ac_fn_c_try_link "$LINENO"; then :
7321   ac_cv_lib_contract_ct_tmpl_activate=yes
7322 else
7323   ac_cv_lib_contract_ct_tmpl_activate=no
7324 fi
7325 rm -f core conftest.err conftest.$ac_objext \
7326     conftest$ac_exeext conftest.$ac_ext
7327 LIBS=$ac_check_lib_save_LIBS
7328 fi
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_contract_ct_tmpl_activate" >&5
7330 $as_echo "$ac_cv_lib_contract_ct_tmpl_activate" >&6; }
7331 if test "x$ac_cv_lib_contract_ct_tmpl_activate" = xyes; then :
7332
7333 $as_echo "#define USE_SOLARIS_PROCESS_CONTRACTS 1" >>confdefs.h
7334
7335                           SSHDLIBS="$SSHDLIBS -lcontract"
7336                           SPC_MSG="yes"
7337 fi
7338
7339
7340 fi
7341
7342
7343 # Check whether --with-solaris-projects was given.
7344 if test "${with_solaris_projects+set}" = set; then :
7345   withval=$with_solaris_projects;
7346                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproject in -lproject" >&5
7347 $as_echo_n "checking for setproject in -lproject... " >&6; }
7348 if ${ac_cv_lib_project_setproject+:} false; then :
7349   $as_echo_n "(cached) " >&6
7350 else
7351   ac_check_lib_save_LIBS=$LIBS
7352 LIBS="-lproject  $LIBS"
7353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7354 /* end confdefs.h.  */
7355
7356 /* Override any GCC internal prototype to avoid an error.
7357    Use char because int might match the return type of a GCC
7358    builtin and then its argument prototype would still apply.  */
7359 #ifdef __cplusplus
7360 extern "C"
7361 #endif
7362 char setproject ();
7363 int
7364 main ()
7365 {
7366 return setproject ();
7367   ;
7368   return 0;
7369 }
7370 _ACEOF
7371 if ac_fn_c_try_link "$LINENO"; then :
7372   ac_cv_lib_project_setproject=yes
7373 else
7374   ac_cv_lib_project_setproject=no
7375 fi
7376 rm -f core conftest.err conftest.$ac_objext \
7377     conftest$ac_exeext conftest.$ac_ext
7378 LIBS=$ac_check_lib_save_LIBS
7379 fi
7380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_project_setproject" >&5
7381 $as_echo "$ac_cv_lib_project_setproject" >&6; }
7382 if test "x$ac_cv_lib_project_setproject" = xyes; then :
7383
7384 $as_echo "#define USE_SOLARIS_PROJECTS 1" >>confdefs.h
7385
7386                         SSHDLIBS="$SSHDLIBS -lproject"
7387                         SP_MSG="yes"
7388 fi
7389
7390
7391 fi
7392
7393         TEST_SHELL=$SHELL       # let configure find us a capable shell
7394         ;;
7395 *-*-sunos4*)
7396         CPPFLAGS="$CPPFLAGS -DSUNOS4"
7397         for ac_func in getpwanam
7398 do :
7399   ac_fn_c_check_func "$LINENO" "getpwanam" "ac_cv_func_getpwanam"
7400 if test "x$ac_cv_func_getpwanam" = xyes; then :
7401   cat >>confdefs.h <<_ACEOF
7402 #define HAVE_GETPWANAM 1
7403 _ACEOF
7404
7405 fi
7406 done
7407
7408         $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
7409
7410         conf_utmp_location=/etc/utmp
7411         conf_wtmp_location=/var/adm/wtmp
7412         conf_lastlog_location=/var/adm/lastlog
7413         $as_echo "#define USE_PIPES 1" >>confdefs.h
7414
7415         ;;
7416 *-ncr-sysv*)
7417         LIBS="$LIBS -lc89"
7418         $as_echo "#define USE_PIPES 1" >>confdefs.h
7419
7420         $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
7421
7422         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7423
7424         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7425
7426         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7427
7428         ;;
7429 *-sni-sysv*)
7430         # /usr/ucblib MUST NOT be searched on ReliantUNIX
7431         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
7432 $as_echo_n "checking for dlsym in -ldl... " >&6; }
7433 if ${ac_cv_lib_dl_dlsym+:} false; then :
7434   $as_echo_n "(cached) " >&6
7435 else
7436   ac_check_lib_save_LIBS=$LIBS
7437 LIBS="-ldl  $LIBS"
7438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7439 /* end confdefs.h.  */
7440
7441 /* Override any GCC internal prototype to avoid an error.
7442    Use char because int might match the return type of a GCC
7443    builtin and then its argument prototype would still apply.  */
7444 #ifdef __cplusplus
7445 extern "C"
7446 #endif
7447 char dlsym ();
7448 int
7449 main ()
7450 {
7451 return dlsym ();
7452   ;
7453   return 0;
7454 }
7455 _ACEOF
7456 if ac_fn_c_try_link "$LINENO"; then :
7457   ac_cv_lib_dl_dlsym=yes
7458 else
7459   ac_cv_lib_dl_dlsym=no
7460 fi
7461 rm -f core conftest.err conftest.$ac_objext \
7462     conftest$ac_exeext conftest.$ac_ext
7463 LIBS=$ac_check_lib_save_LIBS
7464 fi
7465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
7466 $as_echo "$ac_cv_lib_dl_dlsym" >&6; }
7467 if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
7468   cat >>confdefs.h <<_ACEOF
7469 #define HAVE_LIBDL 1
7470 _ACEOF
7471
7472   LIBS="-ldl $LIBS"
7473
7474 fi
7475
7476         # -lresolv needs to be at the end of LIBS or DNS lookups break
7477         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
7478 $as_echo_n "checking for res_query in -lresolv... " >&6; }
7479 if ${ac_cv_lib_resolv_res_query+:} false; then :
7480   $as_echo_n "(cached) " >&6
7481 else
7482   ac_check_lib_save_LIBS=$LIBS
7483 LIBS="-lresolv  $LIBS"
7484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7485 /* end confdefs.h.  */
7486
7487 /* Override any GCC internal prototype to avoid an error.
7488    Use char because int might match the return type of a GCC
7489    builtin and then its argument prototype would still apply.  */
7490 #ifdef __cplusplus
7491 extern "C"
7492 #endif
7493 char res_query ();
7494 int
7495 main ()
7496 {
7497 return res_query ();
7498   ;
7499   return 0;
7500 }
7501 _ACEOF
7502 if ac_fn_c_try_link "$LINENO"; then :
7503   ac_cv_lib_resolv_res_query=yes
7504 else
7505   ac_cv_lib_resolv_res_query=no
7506 fi
7507 rm -f core conftest.err conftest.$ac_objext \
7508     conftest$ac_exeext conftest.$ac_ext
7509 LIBS=$ac_check_lib_save_LIBS
7510 fi
7511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_query" >&5
7512 $as_echo "$ac_cv_lib_resolv_res_query" >&6; }
7513 if test "x$ac_cv_lib_resolv_res_query" = xyes; then :
7514    LIBS="$LIBS -lresolv"
7515 fi
7516
7517         IPADDR_IN_DISPLAY=yes
7518         $as_echo "#define USE_PIPES 1" >>confdefs.h
7519
7520         $as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
7521
7522         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7523
7524         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7525
7526         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7527
7528         $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
7529
7530         external_path_file=/etc/default/login
7531         # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
7532         # Attention: always take care to bind libsocket and libnsl before libc,
7533         # otherwise you will find lots of "SIOCGPGRP errno 22" on syslog
7534         ;;
7535 # UnixWare 1.x, UnixWare 2.x, and others based on code from Univel.
7536 *-*-sysv4.2*)
7537         $as_echo "#define USE_PIPES 1" >>confdefs.h
7538
7539         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7540
7541         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7542
7543         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7544
7545
7546 $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
7547
7548         $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7549
7550         TEST_SHELL=$SHELL       # let configure find us a capable shell
7551         ;;
7552 # UnixWare 7.x, OpenUNIX 8
7553 *-*-sysv5*)
7554         CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf"
7555
7556 $as_echo "#define UNIXWARE_LONG_PASSWORDS 1" >>confdefs.h
7557
7558         $as_echo "#define USE_PIPES 1" >>confdefs.h
7559
7560         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7561
7562         $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
7563
7564         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7565
7566         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7567
7568         $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
7569
7570         TEST_SHELL=$SHELL       # let configure find us a capable shell
7571         case "$host" in
7572         *-*-sysv5SCO_SV*)       # SCO OpenServer 6.x
7573                 maildir=/var/spool/mail
7574
7575 $as_echo "#define BROKEN_LIBIAF 1" >>confdefs.h
7576
7577                 $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
7578
7579                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getluid in -lprot" >&5
7580 $as_echo_n "checking for getluid in -lprot... " >&6; }
7581 if ${ac_cv_lib_prot_getluid+:} false; then :
7582   $as_echo_n "(cached) " >&6
7583 else
7584   ac_check_lib_save_LIBS=$LIBS
7585 LIBS="-lprot  $LIBS"
7586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7587 /* end confdefs.h.  */
7588
7589 /* Override any GCC internal prototype to avoid an error.
7590    Use char because int might match the return type of a GCC
7591    builtin and then its argument prototype would still apply.  */
7592 #ifdef __cplusplus
7593 extern "C"
7594 #endif
7595 char getluid ();
7596 int
7597 main ()
7598 {
7599 return getluid ();
7600   ;
7601   return 0;
7602 }
7603 _ACEOF
7604 if ac_fn_c_try_link "$LINENO"; then :
7605   ac_cv_lib_prot_getluid=yes
7606 else
7607   ac_cv_lib_prot_getluid=no
7608 fi
7609 rm -f core conftest.err conftest.$ac_objext \
7610     conftest$ac_exeext conftest.$ac_ext
7611 LIBS=$ac_check_lib_save_LIBS
7612 fi
7613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getluid" >&5
7614 $as_echo "$ac_cv_lib_prot_getluid" >&6; }
7615 if test "x$ac_cv_lib_prot_getluid" = xyes; then :
7616    LIBS="$LIBS -lprot"
7617                         for ac_func in getluid setluid
7618 do :
7619   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7620 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7621 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7622   cat >>confdefs.h <<_ACEOF
7623 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7624 _ACEOF
7625
7626 fi
7627 done
7628
7629                         $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
7630
7631                         $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
7632
7633
7634 fi
7635
7636                 ;;
7637         *)      $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
7638
7639                 check_for_libcrypt_later=1
7640                 ;;
7641         esac
7642         ;;
7643 *-*-sysv*)
7644         ;;
7645 # SCO UNIX and OEM versions of SCO UNIX
7646 *-*-sco3.2v4*)
7647         as_fn_error $? "\"This Platform is no longer supported.\"" "$LINENO" 5
7648         ;;
7649 # SCO OpenServer 5.x
7650 *-*-sco3.2v5*)
7651         if test -z "$GCC"; then
7652                 CFLAGS="$CFLAGS -belf"
7653         fi
7654         LIBS="$LIBS -lprot -lx -ltinfo -lm"
7655         no_dev_ptmx=1
7656         $as_echo "#define USE_PIPES 1" >>confdefs.h
7657
7658         $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
7659
7660         $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
7661
7662         $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7663
7664         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7665
7666         $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
7667
7668         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7669
7670         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7671
7672         $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
7673
7674         $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
7675
7676         $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
7677
7678         for ac_func in getluid setluid
7679 do :
7680   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7681 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7682 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7683   cat >>confdefs.h <<_ACEOF
7684 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7685 _ACEOF
7686
7687 fi
7688 done
7689
7690         MANTYPE=man
7691         TEST_SHELL=$SHELL       # let configure find us a capable shell
7692         SKIP_DISABLE_LASTLOG_DEFINE=yes
7693         ;;
7694 *-*-unicosmk*)
7695
7696 $as_echo "#define NO_SSH_LASTLOG 1" >>confdefs.h
7697
7698         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7699
7700         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7701
7702         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7703
7704         $as_echo "#define USE_PIPES 1" >>confdefs.h
7705
7706         $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7707
7708         LDFLAGS="$LDFLAGS"
7709         LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
7710         MANTYPE=cat
7711         ;;
7712 *-*-unicosmp*)
7713         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7714
7715         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7716
7717         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7718
7719         $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
7720
7721         $as_echo "#define USE_PIPES 1" >>confdefs.h
7722
7723         $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7724
7725         LDFLAGS="$LDFLAGS"
7726         LIBS="$LIBS -lgen -lacid -ldb"
7727         MANTYPE=cat
7728         ;;
7729 *-*-unicos*)
7730         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7731
7732         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7733
7734         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7735
7736         $as_echo "#define USE_PIPES 1" >>confdefs.h
7737
7738         $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7739
7740         $as_echo "#define NO_SSH_LASTLOG 1" >>confdefs.h
7741
7742         LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal"
7743         LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
7744         MANTYPE=cat
7745         ;;
7746 *-dec-osf*)
7747         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Digital Unix SIA" >&5
7748 $as_echo_n "checking for Digital Unix SIA... " >&6; }
7749         no_osfsia=""
7750
7751 # Check whether --with-osfsia was given.
7752 if test "${with_osfsia+set}" = set; then :
7753   withval=$with_osfsia;
7754                         if test "x$withval" = "xno" ; then
7755                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7756 $as_echo "disabled" >&6; }
7757                                 no_osfsia=1
7758                         fi
7759
7760 fi
7761
7762         if test -z "$no_osfsia" ; then
7763                 if test -f /etc/sia/matrix.conf; then
7764                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7765 $as_echo "yes" >&6; }
7766
7767 $as_echo "#define HAVE_OSF_SIA 1" >>confdefs.h
7768
7769
7770 $as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
7771
7772                         $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7773
7774                         LIBS="$LIBS -lsecurity -ldb -lm -laud"
7775                         SIA_MSG="yes"
7776                 else
7777                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7778 $as_echo "no" >&6; }
7779
7780 $as_echo "#define LOCKED_PASSWD_SUBSTR \"Nologin\"" >>confdefs.h
7781
7782                 fi
7783         fi
7784         $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
7785
7786         $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7787
7788         $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7789
7790         $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7791
7792
7793 $as_echo "#define BROKEN_READV_COMPARISON 1" >>confdefs.h
7794
7795         ;;
7796
7797 *-*-nto-qnx*)
7798         $as_echo "#define USE_PIPES 1" >>confdefs.h
7799
7800         $as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
7801
7802         $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
7803
7804         $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
7805
7806
7807 $as_echo "#define BROKEN_SHADOW_EXPIRE 1" >>confdefs.h
7808
7809         enable_etc_default_login=no     # has incompatible /etc/default/login
7810         case "$host" in
7811         *-*-nto-qnx6*)
7812                 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7813
7814                 ;;
7815         esac
7816         ;;
7817
7818 *-*-ultrix*)
7819
7820 $as_echo "#define BROKEN_GETGROUPS 1" >>confdefs.h
7821
7822
7823 $as_echo "#define BROKEN_MMAP 1" >>confdefs.h
7824
7825         $as_echo "#define NEED_SETPGRP 1" >>confdefs.h
7826
7827
7828 $as_echo "#define HAVE_SYS_SYSLOG_H 1" >>confdefs.h
7829
7830         ;;
7831
7832 *-*-lynxos)
7833         CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
7834
7835 $as_echo "#define BROKEN_SETVBUF 1" >>confdefs.h
7836
7837         ;;
7838 esac
7839
7840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler and flags for sanity" >&5
7841 $as_echo_n "checking compiler and flags for sanity... " >&6; }
7842 if test "$cross_compiling" = yes; then :
7843         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking compiler sanity" >&5
7844 $as_echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;}
7845
7846 else
7847   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7848 /* end confdefs.h.  */
7849  #include <stdio.h>
7850 int
7851 main ()
7852 {
7853  exit(0);
7854   ;
7855   return 0;
7856 }
7857 _ACEOF
7858 if ac_fn_c_try_run "$LINENO"; then :
7859         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7860 $as_echo "yes" >&6; }
7861 else
7862
7863                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7864 $as_echo "no" >&6; }
7865                 as_fn_error $? "*** compiler cannot create working executables, check config.log ***" "$LINENO" 5
7866
7867 fi
7868 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7869   conftest.$ac_objext conftest.beam conftest.$ac_ext
7870 fi
7871
7872
7873 # Checks for libraries.
7874 ac_fn_c_check_func "$LINENO" "yp_match" "ac_cv_func_yp_match"
7875 if test "x$ac_cv_func_yp_match" = xyes; then :
7876
7877 else
7878   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yp_match in -lnsl" >&5
7879 $as_echo_n "checking for yp_match in -lnsl... " >&6; }
7880 if ${ac_cv_lib_nsl_yp_match+:} false; then :
7881   $as_echo_n "(cached) " >&6
7882 else
7883   ac_check_lib_save_LIBS=$LIBS
7884 LIBS="-lnsl  $LIBS"
7885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7886 /* end confdefs.h.  */
7887
7888 /* Override any GCC internal prototype to avoid an error.
7889    Use char because int might match the return type of a GCC
7890    builtin and then its argument prototype would still apply.  */
7891 #ifdef __cplusplus
7892 extern "C"
7893 #endif
7894 char yp_match ();
7895 int
7896 main ()
7897 {
7898 return yp_match ();
7899   ;
7900   return 0;
7901 }
7902 _ACEOF
7903 if ac_fn_c_try_link "$LINENO"; then :
7904   ac_cv_lib_nsl_yp_match=yes
7905 else
7906   ac_cv_lib_nsl_yp_match=no
7907 fi
7908 rm -f core conftest.err conftest.$ac_objext \
7909     conftest$ac_exeext conftest.$ac_ext
7910 LIBS=$ac_check_lib_save_LIBS
7911 fi
7912 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_yp_match" >&5
7913 $as_echo "$ac_cv_lib_nsl_yp_match" >&6; }
7914 if test "x$ac_cv_lib_nsl_yp_match" = xyes; then :
7915   cat >>confdefs.h <<_ACEOF
7916 #define HAVE_LIBNSL 1
7917 _ACEOF
7918
7919   LIBS="-lnsl $LIBS"
7920
7921 fi
7922
7923 fi
7924
7925 ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt"
7926 if test "x$ac_cv_func_setsockopt" = xyes; then :
7927
7928 else
7929   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5
7930 $as_echo_n "checking for setsockopt in -lsocket... " >&6; }
7931 if ${ac_cv_lib_socket_setsockopt+:} false; then :
7932   $as_echo_n "(cached) " >&6
7933 else
7934   ac_check_lib_save_LIBS=$LIBS
7935 LIBS="-lsocket  $LIBS"
7936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7937 /* end confdefs.h.  */
7938
7939 /* Override any GCC internal prototype to avoid an error.
7940    Use char because int might match the return type of a GCC
7941    builtin and then its argument prototype would still apply.  */
7942 #ifdef __cplusplus
7943 extern "C"
7944 #endif
7945 char setsockopt ();
7946 int
7947 main ()
7948 {
7949 return setsockopt ();
7950   ;
7951   return 0;
7952 }
7953 _ACEOF
7954 if ac_fn_c_try_link "$LINENO"; then :
7955   ac_cv_lib_socket_setsockopt=yes
7956 else
7957   ac_cv_lib_socket_setsockopt=no
7958 fi
7959 rm -f core conftest.err conftest.$ac_objext \
7960     conftest$ac_exeext conftest.$ac_ext
7961 LIBS=$ac_check_lib_save_LIBS
7962 fi
7963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5
7964 $as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
7965 if test "x$ac_cv_lib_socket_setsockopt" = xyes; then :
7966   cat >>confdefs.h <<_ACEOF
7967 #define HAVE_LIBSOCKET 1
7968 _ACEOF
7969
7970   LIBS="-lsocket $LIBS"
7971
7972 fi
7973
7974 fi
7975
7976
7977 for ac_func in dirname
7978 do :
7979   ac_fn_c_check_func "$LINENO" "dirname" "ac_cv_func_dirname"
7980 if test "x$ac_cv_func_dirname" = xyes; then :
7981   cat >>confdefs.h <<_ACEOF
7982 #define HAVE_DIRNAME 1
7983 _ACEOF
7984  for ac_header in libgen.h
7985 do :
7986   ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
7987 if test "x$ac_cv_header_libgen_h" = xyes; then :
7988   cat >>confdefs.h <<_ACEOF
7989 #define HAVE_LIBGEN_H 1
7990 _ACEOF
7991
7992 fi
7993
7994 done
7995
7996 else
7997
7998         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirname in -lgen" >&5
7999 $as_echo_n "checking for dirname in -lgen... " >&6; }
8000 if ${ac_cv_lib_gen_dirname+:} false; then :
8001   $as_echo_n "(cached) " >&6
8002 else
8003   ac_check_lib_save_LIBS=$LIBS
8004 LIBS="-lgen  $LIBS"
8005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8006 /* end confdefs.h.  */
8007
8008 /* Override any GCC internal prototype to avoid an error.
8009    Use char because int might match the return type of a GCC
8010    builtin and then its argument prototype would still apply.  */
8011 #ifdef __cplusplus
8012 extern "C"
8013 #endif
8014 char dirname ();
8015 int
8016 main ()
8017 {
8018 return dirname ();
8019   ;
8020   return 0;
8021 }
8022 _ACEOF
8023 if ac_fn_c_try_link "$LINENO"; then :
8024   ac_cv_lib_gen_dirname=yes
8025 else
8026   ac_cv_lib_gen_dirname=no
8027 fi
8028 rm -f core conftest.err conftest.$ac_objext \
8029     conftest$ac_exeext conftest.$ac_ext
8030 LIBS=$ac_check_lib_save_LIBS
8031 fi
8032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_dirname" >&5
8033 $as_echo "$ac_cv_lib_gen_dirname" >&6; }
8034 if test "x$ac_cv_lib_gen_dirname" = xyes; then :
8035
8036                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken dirname" >&5
8037 $as_echo_n "checking for broken dirname... " >&6; }
8038 if ${ac_cv_have_broken_dirname+:} false; then :
8039   $as_echo_n "(cached) " >&6
8040 else
8041
8042                         save_LIBS="$LIBS"
8043                         LIBS="$LIBS -lgen"
8044                         if test "$cross_compiling" = yes; then :
8045    ac_cv_have_broken_dirname="no"
8046 else
8047   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8048 /* end confdefs.h.  */
8049
8050 #include <libgen.h>
8051 #include <string.h>
8052
8053 int main(int argc, char **argv) {
8054     char *s, buf[32];
8055
8056     strncpy(buf,"/etc", 32);
8057     s = dirname(buf);
8058     if (!s || strncmp(s, "/", 32) != 0) {
8059         exit(1);
8060     } else {
8061         exit(0);
8062     }
8063 }
8064
8065 _ACEOF
8066 if ac_fn_c_try_run "$LINENO"; then :
8067    ac_cv_have_broken_dirname="no"
8068 else
8069    ac_cv_have_broken_dirname="yes"
8070 fi
8071 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8072   conftest.$ac_objext conftest.beam conftest.$ac_ext
8073 fi
8074
8075                         LIBS="$save_LIBS"
8076
8077 fi
8078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_broken_dirname" >&5
8079 $as_echo "$ac_cv_have_broken_dirname" >&6; }
8080                 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
8081                         LIBS="$LIBS -lgen"
8082                         $as_echo "#define HAVE_DIRNAME 1" >>confdefs.h
8083
8084                         for ac_header in libgen.h
8085 do :
8086   ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
8087 if test "x$ac_cv_header_libgen_h" = xyes; then :
8088   cat >>confdefs.h <<_ACEOF
8089 #define HAVE_LIBGEN_H 1
8090 _ACEOF
8091
8092 fi
8093
8094 done
8095
8096                 fi
8097
8098 fi
8099
8100
8101 fi
8102 done
8103
8104
8105 ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
8106 if test "x$ac_cv_func_getspnam" = xyes; then :
8107
8108 else
8109   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
8110 $as_echo_n "checking for getspnam in -lgen... " >&6; }
8111 if ${ac_cv_lib_gen_getspnam+:} false; then :
8112   $as_echo_n "(cached) " >&6
8113 else
8114   ac_check_lib_save_LIBS=$LIBS
8115 LIBS="-lgen  $LIBS"
8116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8117 /* end confdefs.h.  */
8118
8119 /* Override any GCC internal prototype to avoid an error.
8120    Use char because int might match the return type of a GCC
8121    builtin and then its argument prototype would still apply.  */
8122 #ifdef __cplusplus
8123 extern "C"
8124 #endif
8125 char getspnam ();
8126 int
8127 main ()
8128 {
8129 return getspnam ();
8130   ;
8131   return 0;
8132 }
8133 _ACEOF
8134 if ac_fn_c_try_link "$LINENO"; then :
8135   ac_cv_lib_gen_getspnam=yes
8136 else
8137   ac_cv_lib_gen_getspnam=no
8138 fi
8139 rm -f core conftest.err conftest.$ac_objext \
8140     conftest$ac_exeext conftest.$ac_ext
8141 LIBS=$ac_check_lib_save_LIBS
8142 fi
8143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
8144 $as_echo "$ac_cv_lib_gen_getspnam" >&6; }
8145 if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
8146   LIBS="$LIBS -lgen"
8147 fi
8148
8149 fi
8150
8151 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing basename" >&5
8152 $as_echo_n "checking for library containing basename... " >&6; }
8153 if ${ac_cv_search_basename+:} false; then :
8154   $as_echo_n "(cached) " >&6
8155 else
8156   ac_func_search_save_LIBS=$LIBS
8157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8158 /* end confdefs.h.  */
8159
8160 /* Override any GCC internal prototype to avoid an error.
8161    Use char because int might match the return type of a GCC
8162    builtin and then its argument prototype would still apply.  */
8163 #ifdef __cplusplus
8164 extern "C"
8165 #endif
8166 char basename ();
8167 int
8168 main ()
8169 {
8170 return basename ();
8171   ;
8172   return 0;
8173 }
8174 _ACEOF
8175 for ac_lib in '' gen; do
8176   if test -z "$ac_lib"; then
8177     ac_res="none required"
8178   else
8179     ac_res=-l$ac_lib
8180     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8181   fi
8182   if ac_fn_c_try_link "$LINENO"; then :
8183   ac_cv_search_basename=$ac_res
8184 fi
8185 rm -f core conftest.err conftest.$ac_objext \
8186     conftest$ac_exeext
8187   if ${ac_cv_search_basename+:} false; then :
8188   break
8189 fi
8190 done
8191 if ${ac_cv_search_basename+:} false; then :
8192
8193 else
8194   ac_cv_search_basename=no
8195 fi
8196 rm conftest.$ac_ext
8197 LIBS=$ac_func_search_save_LIBS
8198 fi
8199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_basename" >&5
8200 $as_echo "$ac_cv_search_basename" >&6; }
8201 ac_res=$ac_cv_search_basename
8202 if test "$ac_res" != no; then :
8203   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8204
8205 $as_echo "#define HAVE_BASENAME 1" >>confdefs.h
8206
8207 fi
8208
8209
8210
8211 # Check whether --with-zlib was given.
8212 if test "${with_zlib+set}" = set; then :
8213   withval=$with_zlib;  if test "x$withval" = "xno" ; then
8214                 as_fn_error $? "*** zlib is required ***" "$LINENO" 5
8215           elif test "x$withval" != "xyes"; then
8216                 if test -d "$withval/lib"; then
8217                         if test -n "${need_dash_r}"; then
8218                                 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
8219                         else
8220                                 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
8221                         fi
8222                 else
8223                         if test -n "${need_dash_r}"; then
8224                                 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
8225                         else
8226                                 LDFLAGS="-L${withval} ${LDFLAGS}"
8227                         fi
8228                 fi
8229                 if test -d "$withval/include"; then
8230                         CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
8231                 else
8232                         CPPFLAGS="-I${withval} ${CPPFLAGS}"
8233                 fi
8234         fi
8235
8236 fi
8237
8238
8239 ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
8240 if test "x$ac_cv_header_zlib_h" = xyes; then :
8241
8242 else
8243   as_fn_error $? "*** zlib.h missing - please install first or check config.log ***" "$LINENO" 5
8244 fi
8245
8246
8247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
8248 $as_echo_n "checking for deflate in -lz... " >&6; }
8249 if ${ac_cv_lib_z_deflate+:} false; then :
8250   $as_echo_n "(cached) " >&6
8251 else
8252   ac_check_lib_save_LIBS=$LIBS
8253 LIBS="-lz  $LIBS"
8254 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8255 /* end confdefs.h.  */
8256
8257 /* Override any GCC internal prototype to avoid an error.
8258    Use char because int might match the return type of a GCC
8259    builtin and then its argument prototype would still apply.  */
8260 #ifdef __cplusplus
8261 extern "C"
8262 #endif
8263 char deflate ();
8264 int
8265 main ()
8266 {
8267 return deflate ();
8268   ;
8269   return 0;
8270 }
8271 _ACEOF
8272 if ac_fn_c_try_link "$LINENO"; then :
8273   ac_cv_lib_z_deflate=yes
8274 else
8275   ac_cv_lib_z_deflate=no
8276 fi
8277 rm -f core conftest.err conftest.$ac_objext \
8278     conftest$ac_exeext conftest.$ac_ext
8279 LIBS=$ac_check_lib_save_LIBS
8280 fi
8281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
8282 $as_echo "$ac_cv_lib_z_deflate" >&6; }
8283 if test "x$ac_cv_lib_z_deflate" = xyes; then :
8284   cat >>confdefs.h <<_ACEOF
8285 #define HAVE_LIBZ 1
8286 _ACEOF
8287
8288   LIBS="-lz $LIBS"
8289
8290 else
8291
8292                 saved_CPPFLAGS="$CPPFLAGS"
8293                 saved_LDFLAGS="$LDFLAGS"
8294                 save_LIBS="$LIBS"
8295                                 if test -n "${need_dash_r}"; then
8296                         LDFLAGS="-L/usr/local/lib -R/usr/local/lib ${saved_LDFLAGS}"
8297                 else
8298                         LDFLAGS="-L/usr/local/lib ${saved_LDFLAGS}"
8299                 fi
8300                 CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}"
8301                 LIBS="$LIBS -lz"
8302                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8303 /* end confdefs.h.  */
8304
8305 /* Override any GCC internal prototype to avoid an error.
8306    Use char because int might match the return type of a GCC
8307    builtin and then its argument prototype would still apply.  */
8308 #ifdef __cplusplus
8309 extern "C"
8310 #endif
8311 char deflate ();
8312 int
8313 main ()
8314 {
8315 return deflate ();
8316   ;
8317   return 0;
8318 }
8319 _ACEOF
8320 if ac_fn_c_try_link "$LINENO"; then :
8321   $as_echo "#define HAVE_LIBZ 1" >>confdefs.h
8322
8323 else
8324
8325                                 as_fn_error $? "*** zlib missing - please install first or check config.log ***" "$LINENO" 5
8326
8327
8328 fi
8329 rm -f core conftest.err conftest.$ac_objext \
8330     conftest$ac_exeext conftest.$ac_ext
8331
8332
8333 fi
8334
8335
8336
8337 # Check whether --with-zlib-version-check was given.
8338 if test "${with_zlib_version_check+set}" = set; then :
8339   withval=$with_zlib_version_check;   if test "x$withval" = "xno" ; then
8340                 zlib_check_nonfatal=1
8341            fi
8342
8343
8344 fi
8345
8346
8347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for possibly buggy zlib" >&5
8348 $as_echo_n "checking for possibly buggy zlib... " >&6; }
8349 if test "$cross_compiling" = yes; then :
8350         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking zlib version" >&5
8351 $as_echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;}
8352
8353 else
8354   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8355 /* end confdefs.h.  */
8356
8357 #include <stdio.h>
8358 #include <stdlib.h>
8359 #include <zlib.h>
8360
8361 int
8362 main ()
8363 {
8364
8365         int a=0, b=0, c=0, d=0, n, v;
8366         n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
8367         if (n != 3 && n != 4)
8368                 exit(1);
8369         v = a*1000000 + b*10000 + c*100 + d;
8370         fprintf(stderr, "found zlib version %s (%d)\n", ZLIB_VERSION, v);
8371
8372         /* 1.1.4 is OK */
8373         if (a == 1 && b == 1 && c >= 4)
8374                 exit(0);
8375
8376         /* 1.2.3 and up are OK */
8377         if (v >= 1020300)
8378                 exit(0);
8379
8380         exit(2);
8381
8382   ;
8383   return 0;
8384 }
8385 _ACEOF
8386 if ac_fn_c_try_run "$LINENO"; then :
8387   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8388 $as_echo "no" >&6; }
8389 else
8390    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8391 $as_echo "yes" >&6; }
8392           if test -z "$zlib_check_nonfatal" ; then
8393                 as_fn_error $? "*** zlib too old - check config.log ***
8394 Your reported zlib version has known security problems.  It's possible your
8395 vendor has fixed these problems without changing the version number.  If you
8396 are sure this is the case, you can disable the check by running
8397 \"./configure --without-zlib-version-check\".
8398 If you are in doubt, upgrade zlib to version 1.2.3 or greater.
8399 See http://www.gzip.org/zlib/ for details." "$LINENO" 5
8400           else
8401                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib version may have security problems" >&5
8402 $as_echo "$as_me: WARNING: zlib version may have security problems" >&2;}
8403           fi
8404
8405 fi
8406 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8407   conftest.$ac_objext conftest.beam conftest.$ac_ext
8408 fi
8409
8410
8411 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
8412 if test "x$ac_cv_func_strcasecmp" = xyes; then :
8413
8414 else
8415    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp in -lresolv" >&5
8416 $as_echo_n "checking for strcasecmp in -lresolv... " >&6; }
8417 if ${ac_cv_lib_resolv_strcasecmp+:} false; then :
8418   $as_echo_n "(cached) " >&6
8419 else
8420   ac_check_lib_save_LIBS=$LIBS
8421 LIBS="-lresolv  $LIBS"
8422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8423 /* end confdefs.h.  */
8424
8425 /* Override any GCC internal prototype to avoid an error.
8426    Use char because int might match the return type of a GCC
8427    builtin and then its argument prototype would still apply.  */
8428 #ifdef __cplusplus
8429 extern "C"
8430 #endif
8431 char strcasecmp ();
8432 int
8433 main ()
8434 {
8435 return strcasecmp ();
8436   ;
8437   return 0;
8438 }
8439 _ACEOF
8440 if ac_fn_c_try_link "$LINENO"; then :
8441   ac_cv_lib_resolv_strcasecmp=yes
8442 else
8443   ac_cv_lib_resolv_strcasecmp=no
8444 fi
8445 rm -f core conftest.err conftest.$ac_objext \
8446     conftest$ac_exeext conftest.$ac_ext
8447 LIBS=$ac_check_lib_save_LIBS
8448 fi
8449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_strcasecmp" >&5
8450 $as_echo "$ac_cv_lib_resolv_strcasecmp" >&6; }
8451 if test "x$ac_cv_lib_resolv_strcasecmp" = xyes; then :
8452   LIBS="$LIBS -lresolv"
8453 fi
8454
8455
8456 fi
8457
8458 for ac_func in utimes
8459 do :
8460   ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
8461 if test "x$ac_cv_func_utimes" = xyes; then :
8462   cat >>confdefs.h <<_ACEOF
8463 #define HAVE_UTIMES 1
8464 _ACEOF
8465
8466 else
8467    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimes in -lc89" >&5
8468 $as_echo_n "checking for utimes in -lc89... " >&6; }
8469 if ${ac_cv_lib_c89_utimes+:} false; then :
8470   $as_echo_n "(cached) " >&6
8471 else
8472   ac_check_lib_save_LIBS=$LIBS
8473 LIBS="-lc89  $LIBS"
8474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8475 /* end confdefs.h.  */
8476
8477 /* Override any GCC internal prototype to avoid an error.
8478    Use char because int might match the return type of a GCC
8479    builtin and then its argument prototype would still apply.  */
8480 #ifdef __cplusplus
8481 extern "C"
8482 #endif
8483 char utimes ();
8484 int
8485 main ()
8486 {
8487 return utimes ();
8488   ;
8489   return 0;
8490 }
8491 _ACEOF
8492 if ac_fn_c_try_link "$LINENO"; then :
8493   ac_cv_lib_c89_utimes=yes
8494 else
8495   ac_cv_lib_c89_utimes=no
8496 fi
8497 rm -f core conftest.err conftest.$ac_objext \
8498     conftest$ac_exeext conftest.$ac_ext
8499 LIBS=$ac_check_lib_save_LIBS
8500 fi
8501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c89_utimes" >&5
8502 $as_echo "$ac_cv_lib_c89_utimes" >&6; }
8503 if test "x$ac_cv_lib_c89_utimes" = xyes; then :
8504   $as_echo "#define HAVE_UTIMES 1" >>confdefs.h
8505
8506                                         LIBS="$LIBS -lc89"
8507 fi
8508
8509
8510 fi
8511 done
8512
8513
8514 for ac_header in bsd/libutil.h libutil.h
8515 do :
8516   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
8517 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
8518 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
8519   cat >>confdefs.h <<_ACEOF
8520 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
8521 _ACEOF
8522
8523 fi
8524
8525 done
8526
8527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing fmt_scaled" >&5
8528 $as_echo_n "checking for library containing fmt_scaled... " >&6; }
8529 if ${ac_cv_search_fmt_scaled+:} false; then :
8530   $as_echo_n "(cached) " >&6
8531 else
8532   ac_func_search_save_LIBS=$LIBS
8533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8534 /* end confdefs.h.  */
8535
8536 /* Override any GCC internal prototype to avoid an error.
8537    Use char because int might match the return type of a GCC
8538    builtin and then its argument prototype would still apply.  */
8539 #ifdef __cplusplus
8540 extern "C"
8541 #endif
8542 char fmt_scaled ();
8543 int
8544 main ()
8545 {
8546 return fmt_scaled ();
8547   ;
8548   return 0;
8549 }
8550 _ACEOF
8551 for ac_lib in '' util bsd; do
8552   if test -z "$ac_lib"; then
8553     ac_res="none required"
8554   else
8555     ac_res=-l$ac_lib
8556     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8557   fi
8558   if ac_fn_c_try_link "$LINENO"; then :
8559   ac_cv_search_fmt_scaled=$ac_res
8560 fi
8561 rm -f core conftest.err conftest.$ac_objext \
8562     conftest$ac_exeext
8563   if ${ac_cv_search_fmt_scaled+:} false; then :
8564   break
8565 fi
8566 done
8567 if ${ac_cv_search_fmt_scaled+:} false; then :
8568
8569 else
8570   ac_cv_search_fmt_scaled=no
8571 fi
8572 rm conftest.$ac_ext
8573 LIBS=$ac_func_search_save_LIBS
8574 fi
8575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_fmt_scaled" >&5
8576 $as_echo "$ac_cv_search_fmt_scaled" >&6; }
8577 ac_res=$ac_cv_search_fmt_scaled
8578 if test "$ac_res" != no; then :
8579   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8580
8581 fi
8582
8583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing scan_scaled" >&5
8584 $as_echo_n "checking for library containing scan_scaled... " >&6; }
8585 if ${ac_cv_search_scan_scaled+:} false; then :
8586   $as_echo_n "(cached) " >&6
8587 else
8588   ac_func_search_save_LIBS=$LIBS
8589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8590 /* end confdefs.h.  */
8591
8592 /* Override any GCC internal prototype to avoid an error.
8593    Use char because int might match the return type of a GCC
8594    builtin and then its argument prototype would still apply.  */
8595 #ifdef __cplusplus
8596 extern "C"
8597 #endif
8598 char scan_scaled ();
8599 int
8600 main ()
8601 {
8602 return scan_scaled ();
8603   ;
8604   return 0;
8605 }
8606 _ACEOF
8607 for ac_lib in '' util bsd; do
8608   if test -z "$ac_lib"; then
8609     ac_res="none required"
8610   else
8611     ac_res=-l$ac_lib
8612     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8613   fi
8614   if ac_fn_c_try_link "$LINENO"; then :
8615   ac_cv_search_scan_scaled=$ac_res
8616 fi
8617 rm -f core conftest.err conftest.$ac_objext \
8618     conftest$ac_exeext
8619   if ${ac_cv_search_scan_scaled+:} false; then :
8620   break
8621 fi
8622 done
8623 if ${ac_cv_search_scan_scaled+:} false; then :
8624
8625 else
8626   ac_cv_search_scan_scaled=no
8627 fi
8628 rm conftest.$ac_ext
8629 LIBS=$ac_func_search_save_LIBS
8630 fi
8631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_scan_scaled" >&5
8632 $as_echo "$ac_cv_search_scan_scaled" >&6; }
8633 ac_res=$ac_cv_search_scan_scaled
8634 if test "$ac_res" != no; then :
8635   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8636
8637 fi
8638
8639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing login" >&5
8640 $as_echo_n "checking for library containing login... " >&6; }
8641 if ${ac_cv_search_login+:} false; then :
8642   $as_echo_n "(cached) " >&6
8643 else
8644   ac_func_search_save_LIBS=$LIBS
8645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8646 /* end confdefs.h.  */
8647
8648 /* Override any GCC internal prototype to avoid an error.
8649    Use char because int might match the return type of a GCC
8650    builtin and then its argument prototype would still apply.  */
8651 #ifdef __cplusplus
8652 extern "C"
8653 #endif
8654 char login ();
8655 int
8656 main ()
8657 {
8658 return login ();
8659   ;
8660   return 0;
8661 }
8662 _ACEOF
8663 for ac_lib in '' util bsd; do
8664   if test -z "$ac_lib"; then
8665     ac_res="none required"
8666   else
8667     ac_res=-l$ac_lib
8668     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8669   fi
8670   if ac_fn_c_try_link "$LINENO"; then :
8671   ac_cv_search_login=$ac_res
8672 fi
8673 rm -f core conftest.err conftest.$ac_objext \
8674     conftest$ac_exeext
8675   if ${ac_cv_search_login+:} false; then :
8676   break
8677 fi
8678 done
8679 if ${ac_cv_search_login+:} false; then :
8680
8681 else
8682   ac_cv_search_login=no
8683 fi
8684 rm conftest.$ac_ext
8685 LIBS=$ac_func_search_save_LIBS
8686 fi
8687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_login" >&5
8688 $as_echo "$ac_cv_search_login" >&6; }
8689 ac_res=$ac_cv_search_login
8690 if test "$ac_res" != no; then :
8691   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8692
8693 fi
8694
8695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing logout" >&5
8696 $as_echo_n "checking for library containing logout... " >&6; }
8697 if ${ac_cv_search_logout+:} false; then :
8698   $as_echo_n "(cached) " >&6
8699 else
8700   ac_func_search_save_LIBS=$LIBS
8701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8702 /* end confdefs.h.  */
8703
8704 /* Override any GCC internal prototype to avoid an error.
8705    Use char because int might match the return type of a GCC
8706    builtin and then its argument prototype would still apply.  */
8707 #ifdef __cplusplus
8708 extern "C"
8709 #endif
8710 char logout ();
8711 int
8712 main ()
8713 {
8714 return logout ();
8715   ;
8716   return 0;
8717 }
8718 _ACEOF
8719 for ac_lib in '' util bsd; do
8720   if test -z "$ac_lib"; then
8721     ac_res="none required"
8722   else
8723     ac_res=-l$ac_lib
8724     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8725   fi
8726   if ac_fn_c_try_link "$LINENO"; then :
8727   ac_cv_search_logout=$ac_res
8728 fi
8729 rm -f core conftest.err conftest.$ac_objext \
8730     conftest$ac_exeext
8731   if ${ac_cv_search_logout+:} false; then :
8732   break
8733 fi
8734 done
8735 if ${ac_cv_search_logout+:} false; then :
8736
8737 else
8738   ac_cv_search_logout=no
8739 fi
8740 rm conftest.$ac_ext
8741 LIBS=$ac_func_search_save_LIBS
8742 fi
8743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_logout" >&5
8744 $as_echo "$ac_cv_search_logout" >&6; }
8745 ac_res=$ac_cv_search_logout
8746 if test "$ac_res" != no; then :
8747   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8748
8749 fi
8750
8751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing logwtmp" >&5
8752 $as_echo_n "checking for library containing logwtmp... " >&6; }
8753 if ${ac_cv_search_logwtmp+:} false; then :
8754   $as_echo_n "(cached) " >&6
8755 else
8756   ac_func_search_save_LIBS=$LIBS
8757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8758 /* end confdefs.h.  */
8759
8760 /* Override any GCC internal prototype to avoid an error.
8761    Use char because int might match the return type of a GCC
8762    builtin and then its argument prototype would still apply.  */
8763 #ifdef __cplusplus
8764 extern "C"
8765 #endif
8766 char logwtmp ();
8767 int
8768 main ()
8769 {
8770 return logwtmp ();
8771   ;
8772   return 0;
8773 }
8774 _ACEOF
8775 for ac_lib in '' util bsd; do
8776   if test -z "$ac_lib"; then
8777     ac_res="none required"
8778   else
8779     ac_res=-l$ac_lib
8780     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8781   fi
8782   if ac_fn_c_try_link "$LINENO"; then :
8783   ac_cv_search_logwtmp=$ac_res
8784 fi
8785 rm -f core conftest.err conftest.$ac_objext \
8786     conftest$ac_exeext
8787   if ${ac_cv_search_logwtmp+:} false; then :
8788   break
8789 fi
8790 done
8791 if ${ac_cv_search_logwtmp+:} false; then :
8792
8793 else
8794   ac_cv_search_logwtmp=no
8795 fi
8796 rm conftest.$ac_ext
8797 LIBS=$ac_func_search_save_LIBS
8798 fi
8799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_logwtmp" >&5
8800 $as_echo "$ac_cv_search_logwtmp" >&6; }
8801 ac_res=$ac_cv_search_logwtmp
8802 if test "$ac_res" != no; then :
8803   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8804
8805 fi
8806
8807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing openpty" >&5
8808 $as_echo_n "checking for library containing openpty... " >&6; }
8809 if ${ac_cv_search_openpty+:} false; then :
8810   $as_echo_n "(cached) " >&6
8811 else
8812   ac_func_search_save_LIBS=$LIBS
8813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8814 /* end confdefs.h.  */
8815
8816 /* Override any GCC internal prototype to avoid an error.
8817    Use char because int might match the return type of a GCC
8818    builtin and then its argument prototype would still apply.  */
8819 #ifdef __cplusplus
8820 extern "C"
8821 #endif
8822 char openpty ();
8823 int
8824 main ()
8825 {
8826 return openpty ();
8827   ;
8828   return 0;
8829 }
8830 _ACEOF
8831 for ac_lib in '' util bsd; do
8832   if test -z "$ac_lib"; then
8833     ac_res="none required"
8834   else
8835     ac_res=-l$ac_lib
8836     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8837   fi
8838   if ac_fn_c_try_link "$LINENO"; then :
8839   ac_cv_search_openpty=$ac_res
8840 fi
8841 rm -f core conftest.err conftest.$ac_objext \
8842     conftest$ac_exeext
8843   if ${ac_cv_search_openpty+:} false; then :
8844   break
8845 fi
8846 done
8847 if ${ac_cv_search_openpty+:} false; then :
8848
8849 else
8850   ac_cv_search_openpty=no
8851 fi
8852 rm conftest.$ac_ext
8853 LIBS=$ac_func_search_save_LIBS
8854 fi
8855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_openpty" >&5
8856 $as_echo "$ac_cv_search_openpty" >&6; }
8857 ac_res=$ac_cv_search_openpty
8858 if test "$ac_res" != no; then :
8859   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8860
8861 fi
8862
8863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing updwtmp" >&5
8864 $as_echo_n "checking for library containing updwtmp... " >&6; }
8865 if ${ac_cv_search_updwtmp+:} false; then :
8866   $as_echo_n "(cached) " >&6
8867 else
8868   ac_func_search_save_LIBS=$LIBS
8869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8870 /* end confdefs.h.  */
8871
8872 /* Override any GCC internal prototype to avoid an error.
8873    Use char because int might match the return type of a GCC
8874    builtin and then its argument prototype would still apply.  */
8875 #ifdef __cplusplus
8876 extern "C"
8877 #endif
8878 char updwtmp ();
8879 int
8880 main ()
8881 {
8882 return updwtmp ();
8883   ;
8884   return 0;
8885 }
8886 _ACEOF
8887 for ac_lib in '' util bsd; do
8888   if test -z "$ac_lib"; then
8889     ac_res="none required"
8890   else
8891     ac_res=-l$ac_lib
8892     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
8893   fi
8894   if ac_fn_c_try_link "$LINENO"; then :
8895   ac_cv_search_updwtmp=$ac_res
8896 fi
8897 rm -f core conftest.err conftest.$ac_objext \
8898     conftest$ac_exeext
8899   if ${ac_cv_search_updwtmp+:} false; then :
8900   break
8901 fi
8902 done
8903 if ${ac_cv_search_updwtmp+:} false; then :
8904
8905 else
8906   ac_cv_search_updwtmp=no
8907 fi
8908 rm conftest.$ac_ext
8909 LIBS=$ac_func_search_save_LIBS
8910 fi
8911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_updwtmp" >&5
8912 $as_echo "$ac_cv_search_updwtmp" >&6; }
8913 ac_res=$ac_cv_search_updwtmp
8914 if test "$ac_res" != no; then :
8915   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8916
8917 fi
8918
8919 for ac_func in fmt_scaled scan_scaled login logout openpty updwtmp logwtmp
8920 do :
8921   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8922 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8923 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8924   cat >>confdefs.h <<_ACEOF
8925 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8926 _ACEOF
8927
8928 fi
8929 done
8930
8931
8932 for ac_func in strftime
8933 do :
8934   ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
8935 if test "x$ac_cv_func_strftime" = xyes; then :
8936   cat >>confdefs.h <<_ACEOF
8937 #define HAVE_STRFTIME 1
8938 _ACEOF
8939
8940 else
8941   # strftime is in -lintl on SCO UNIX.
8942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
8943 $as_echo_n "checking for strftime in -lintl... " >&6; }
8944 if ${ac_cv_lib_intl_strftime+:} false; then :
8945   $as_echo_n "(cached) " >&6
8946 else
8947   ac_check_lib_save_LIBS=$LIBS
8948 LIBS="-lintl  $LIBS"
8949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8950 /* end confdefs.h.  */
8951
8952 /* Override any GCC internal prototype to avoid an error.
8953    Use char because int might match the return type of a GCC
8954    builtin and then its argument prototype would still apply.  */
8955 #ifdef __cplusplus
8956 extern "C"
8957 #endif
8958 char strftime ();
8959 int
8960 main ()
8961 {
8962 return strftime ();
8963   ;
8964   return 0;
8965 }
8966 _ACEOF
8967 if ac_fn_c_try_link "$LINENO"; then :
8968   ac_cv_lib_intl_strftime=yes
8969 else
8970   ac_cv_lib_intl_strftime=no
8971 fi
8972 rm -f core conftest.err conftest.$ac_objext \
8973     conftest$ac_exeext conftest.$ac_ext
8974 LIBS=$ac_check_lib_save_LIBS
8975 fi
8976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
8977 $as_echo "$ac_cv_lib_intl_strftime" >&6; }
8978 if test "x$ac_cv_lib_intl_strftime" = xyes; then :
8979   $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
8980
8981 LIBS="-lintl $LIBS"
8982 fi
8983
8984 fi
8985 done
8986
8987
8988 # Check for ALTDIRFUNC glob() extension
8989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_ALTDIRFUNC support" >&5
8990 $as_echo_n "checking for GLOB_ALTDIRFUNC support... " >&6; }
8991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8992 /* end confdefs.h.  */
8993
8994                 #include <glob.h>
8995                 #ifdef GLOB_ALTDIRFUNC
8996                 FOUNDIT
8997                 #endif
8998
8999 _ACEOF
9000 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9001   $EGREP "FOUNDIT" >/dev/null 2>&1; then :
9002
9003
9004 $as_echo "#define GLOB_HAS_ALTDIRFUNC 1" >>confdefs.h
9005
9006                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9007 $as_echo "yes" >&6; }
9008
9009 else
9010
9011                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9012 $as_echo "no" >&6; }
9013
9014
9015 fi
9016 rm -f conftest*
9017
9018
9019 # Check for g.gl_matchc glob() extension
9020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_matchc field in glob_t" >&5
9021 $as_echo_n "checking for gl_matchc field in glob_t... " >&6; }
9022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9023 /* end confdefs.h.  */
9024  #include <glob.h>
9025 int
9026 main ()
9027 {
9028  glob_t g; g.gl_matchc = 1;
9029   ;
9030   return 0;
9031 }
9032 _ACEOF
9033 if ac_fn_c_try_compile "$LINENO"; then :
9034
9035
9036 $as_echo "#define GLOB_HAS_GL_MATCHC 1" >>confdefs.h
9037
9038                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9039 $as_echo "yes" >&6; }
9040
9041 else
9042
9043                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9044 $as_echo "no" >&6; }
9045
9046 fi
9047 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9048
9049 # Check for g.gl_statv glob() extension
9050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_statv and GLOB_KEEPSTAT extensions for glob" >&5
9051 $as_echo_n "checking for gl_statv and GLOB_KEEPSTAT extensions for glob... " >&6; }
9052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9053 /* end confdefs.h.  */
9054  #include <glob.h>
9055 int
9056 main ()
9057 {
9058
9059 #ifndef GLOB_KEEPSTAT
9060 #error "glob does not support GLOB_KEEPSTAT extension"
9061 #endif
9062 glob_t g;
9063 g.gl_statv = NULL;
9064
9065   ;
9066   return 0;
9067 }
9068 _ACEOF
9069 if ac_fn_c_try_compile "$LINENO"; then :
9070
9071
9072 $as_echo "#define GLOB_HAS_GL_STATV 1" >>confdefs.h
9073
9074                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9075 $as_echo "yes" >&6; }
9076
9077 else
9078
9079                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9080 $as_echo "no" >&6; }
9081
9082
9083 fi
9084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9085
9086 ac_fn_c_check_decl "$LINENO" "GLOB_NOMATCH" "ac_cv_have_decl_GLOB_NOMATCH" "#include <glob.h>
9087 "
9088 if test "x$ac_cv_have_decl_GLOB_NOMATCH" = xyes; then :
9089   ac_have_decl=1
9090 else
9091   ac_have_decl=0
9092 fi
9093
9094 cat >>confdefs.h <<_ACEOF
9095 #define HAVE_DECL_GLOB_NOMATCH $ac_have_decl
9096 _ACEOF
9097
9098
9099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct dirent allocates space for d_name" >&5
9100 $as_echo_n "checking whether struct dirent allocates space for d_name... " >&6; }
9101 if test "$cross_compiling" = yes; then :
9102
9103                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&5
9104 $as_echo "$as_me: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&2;}
9105                 $as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
9106
9107
9108
9109 else
9110   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9111 /* end confdefs.h.  */
9112
9113 #include <sys/types.h>
9114 #include <dirent.h>
9115 int
9116 main ()
9117 {
9118
9119         struct dirent d;
9120         exit(sizeof(d.d_name)<=sizeof(char));
9121
9122   ;
9123   return 0;
9124 }
9125 _ACEOF
9126 if ac_fn_c_try_run "$LINENO"; then :
9127   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9128 $as_echo "yes" >&6; }
9129 else
9130
9131                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9132 $as_echo "no" >&6; }
9133
9134 $as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
9135
9136
9137 fi
9138 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9139   conftest.$ac_objext conftest.beam conftest.$ac_ext
9140 fi
9141
9142
9143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /proc/pid/fd directory" >&5
9144 $as_echo_n "checking for /proc/pid/fd directory... " >&6; }
9145 if test -d "/proc/$$/fd" ; then
9146
9147 $as_echo "#define HAVE_PROC_PID 1" >>confdefs.h
9148
9149         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9150 $as_echo "yes" >&6; }
9151 else
9152         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9153 $as_echo "no" >&6; }
9154 fi
9155
9156 # Check whether user wants S/Key support
9157 SKEY_MSG="no"
9158
9159 # Check whether --with-skey was given.
9160 if test "${with_skey+set}" = set; then :
9161   withval=$with_skey;
9162                 if test "x$withval" != "xno" ; then
9163
9164                         if test "x$withval" != "xyes" ; then
9165                                 CPPFLAGS="$CPPFLAGS -I${withval}/include"
9166                                 LDFLAGS="$LDFLAGS -L${withval}/lib"
9167                         fi
9168
9169
9170 $as_echo "#define SKEY 1" >>confdefs.h
9171
9172                         LIBS="-lskey $LIBS"
9173                         SKEY_MSG="yes"
9174
9175                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for s/key support" >&5
9176 $as_echo_n "checking for s/key support... " >&6; }
9177                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9178 /* end confdefs.h.  */
9179
9180 #include <stdio.h>
9181 #include <skey.h>
9182
9183 int
9184 main ()
9185 {
9186
9187         char *ff = skey_keyinfo(""); ff="";
9188         exit(0);
9189
9190   ;
9191   return 0;
9192 }
9193 _ACEOF
9194 if ac_fn_c_try_link "$LINENO"; then :
9195   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9196 $as_echo "yes" >&6; }
9197 else
9198
9199                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9200 $as_echo "no" >&6; }
9201                                         as_fn_error $? "** Incomplete or missing s/key libraries." "$LINENO" 5
9202
9203 fi
9204 rm -f core conftest.err conftest.$ac_objext \
9205     conftest$ac_exeext conftest.$ac_ext
9206                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if skeychallenge takes 4 arguments" >&5
9207 $as_echo_n "checking if skeychallenge takes 4 arguments... " >&6; }
9208                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9209 /* end confdefs.h.  */
9210
9211 #include <stdio.h>
9212 #include <skey.h>
9213
9214 int
9215 main ()
9216 {
9217
9218         (void)skeychallenge(NULL,"name","",0);
9219
9220   ;
9221   return 0;
9222 }
9223 _ACEOF
9224 if ac_fn_c_try_compile "$LINENO"; then :
9225
9226                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9227 $as_echo "yes" >&6; }
9228
9229 $as_echo "#define SKEYCHALLENGE_4ARG 1" >>confdefs.h
9230
9231 else
9232
9233                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9234 $as_echo "no" >&6; }
9235
9236 fi
9237 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9238                 fi
9239
9240
9241 fi
9242
9243
9244 # Check whether user wants TCP wrappers support
9245 TCPW_MSG="no"
9246
9247 # Check whether --with-tcp-wrappers was given.
9248 if test "${with_tcp_wrappers+set}" = set; then :
9249   withval=$with_tcp_wrappers;
9250                 if test "x$withval" != "xno" ; then
9251                         saved_LIBS="$LIBS"
9252                         saved_LDFLAGS="$LDFLAGS"
9253                         saved_CPPFLAGS="$CPPFLAGS"
9254                         if test -n "${withval}" && \
9255                             test "x${withval}" != "xyes"; then
9256                                 if test -d "${withval}/lib"; then
9257                                         if test -n "${need_dash_r}"; then
9258                                                 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
9259                                         else
9260                                                 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
9261                                         fi
9262                                 else
9263                                         if test -n "${need_dash_r}"; then
9264                                                 LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
9265                                         else
9266                                                 LDFLAGS="-L${withval} ${LDFLAGS}"
9267                                         fi
9268                                 fi
9269                                 if test -d "${withval}/include"; then
9270                                         CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
9271                                 else
9272                                         CPPFLAGS="-I${withval} ${CPPFLAGS}"
9273                                 fi
9274                         fi
9275                         LIBS="-lwrap $LIBS"
9276                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libwrap" >&5
9277 $as_echo_n "checking for libwrap... " >&6; }
9278                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9279 /* end confdefs.h.  */
9280
9281 #include <sys/types.h>
9282 #include <sys/socket.h>
9283 #include <netinet/in.h>
9284 #include <tcpd.h>
9285 int deny_severity = 0, allow_severity = 0;
9286
9287 int
9288 main ()
9289 {
9290
9291         hosts_access(0);
9292
9293   ;
9294   return 0;
9295 }
9296 _ACEOF
9297 if ac_fn_c_try_link "$LINENO"; then :
9298
9299                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9300 $as_echo "yes" >&6; }
9301
9302 $as_echo "#define LIBWRAP 1" >>confdefs.h
9303
9304                                         SSHDLIBS="$SSHDLIBS -lwrap"
9305                                         TCPW_MSG="yes"
9306
9307 else
9308
9309                                         as_fn_error $? "*** libwrap missing" "$LINENO" 5
9310
9311
9312 fi
9313 rm -f core conftest.err conftest.$ac_objext \
9314     conftest$ac_exeext conftest.$ac_ext
9315                         LIBS="$saved_LIBS"
9316                 fi
9317
9318
9319 fi
9320
9321
9322 # Check whether user wants to use ldns
9323 LDNS_MSG="no"
9324
9325 # Check whether --with-ldns was given.
9326 if test "${with_ldns+set}" = set; then :
9327   withval=$with_ldns;
9328         if test "x$withval" != "xno" ; then
9329
9330                         if test "x$withval" != "xyes" ; then
9331                                 CPPFLAGS="$CPPFLAGS -I${withval}/include"
9332                                 LDFLAGS="$LDFLAGS -L${withval}/lib"
9333                         fi
9334
9335
9336 $as_echo "#define HAVE_LDNS 1" >>confdefs.h
9337
9338             LIBS="-lldns $LIBS"
9339             LDNS_MSG="yes"
9340
9341             { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldns support" >&5
9342 $as_echo_n "checking for ldns support... " >&6; }
9343             cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9344 /* end confdefs.h.  */
9345
9346 #include <stdio.h>
9347 #include <stdlib.h>
9348 #include <stdint.h>
9349 #include <ldns/ldns.h>
9350 int main() { ldns_status status = ldns_verify_trusted(NULL, NULL, NULL, NULL); status=LDNS_STATUS_OK; exit(0); }
9351
9352
9353 _ACEOF
9354 if ac_fn_c_try_link "$LINENO"; then :
9355   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9356 $as_echo "yes" >&6; }
9357 else
9358
9359                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9360 $as_echo "no" >&6; }
9361                                         as_fn_error $? "** Incomplete or missing ldns libraries." "$LINENO" 5
9362
9363 fi
9364 rm -f core conftest.err conftest.$ac_objext \
9365     conftest$ac_exeext conftest.$ac_ext
9366         fi
9367
9368
9369 fi
9370
9371
9372 # Check whether user wants libedit support
9373 LIBEDIT_MSG="no"
9374
9375 # Check whether --with-libedit was given.
9376 if test "${with_libedit+set}" = set; then :
9377   withval=$with_libedit;  if test "x$withval" != "xno" ; then
9378                 if test "x$withval" = "xyes" ; then
9379                         if test -n "$ac_tool_prefix"; then
9380   # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9381 set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9383 $as_echo_n "checking for $ac_word... " >&6; }
9384 if ${ac_cv_path_PKGCONFIG+:} false; then :
9385   $as_echo_n "(cached) " >&6
9386 else
9387   case $PKGCONFIG in
9388   [\\/]* | ?:[\\/]*)
9389   ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path.
9390   ;;
9391   *)
9392   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9393 for as_dir in $PATH
9394 do
9395   IFS=$as_save_IFS
9396   test -z "$as_dir" && as_dir=.
9397     for ac_exec_ext in '' $ac_executable_extensions; do
9398   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9399     ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
9400     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9401     break 2
9402   fi
9403 done
9404   done
9405 IFS=$as_save_IFS
9406
9407   ;;
9408 esac
9409 fi
9410 PKGCONFIG=$ac_cv_path_PKGCONFIG
9411 if test -n "$PKGCONFIG"; then
9412   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
9413 $as_echo "$PKGCONFIG" >&6; }
9414 else
9415   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9416 $as_echo "no" >&6; }
9417 fi
9418
9419
9420 fi
9421 if test -z "$ac_cv_path_PKGCONFIG"; then
9422   ac_pt_PKGCONFIG=$PKGCONFIG
9423   # Extract the first word of "pkg-config", so it can be a program name with args.
9424 set dummy pkg-config; ac_word=$2
9425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9426 $as_echo_n "checking for $ac_word... " >&6; }
9427 if ${ac_cv_path_ac_pt_PKGCONFIG+:} false; then :
9428   $as_echo_n "(cached) " >&6
9429 else
9430   case $ac_pt_PKGCONFIG in
9431   [\\/]* | ?:[\\/]*)
9432   ac_cv_path_ac_pt_PKGCONFIG="$ac_pt_PKGCONFIG" # Let the user override the test with a path.
9433   ;;
9434   *)
9435   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9436 for as_dir in $PATH
9437 do
9438   IFS=$as_save_IFS
9439   test -z "$as_dir" && as_dir=.
9440     for ac_exec_ext in '' $ac_executable_extensions; do
9441   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
9442     ac_cv_path_ac_pt_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
9443     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9444     break 2
9445   fi
9446 done
9447   done
9448 IFS=$as_save_IFS
9449
9450   ;;
9451 esac
9452 fi
9453 ac_pt_PKGCONFIG=$ac_cv_path_ac_pt_PKGCONFIG
9454 if test -n "$ac_pt_PKGCONFIG"; then
9455   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKGCONFIG" >&5
9456 $as_echo "$ac_pt_PKGCONFIG" >&6; }
9457 else
9458   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9459 $as_echo "no" >&6; }
9460 fi
9461
9462   if test "x$ac_pt_PKGCONFIG" = x; then
9463     PKGCONFIG="no"
9464   else
9465     case $cross_compiling:$ac_tool_warned in
9466 yes:)
9467 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
9468 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
9469 ac_tool_warned=yes ;;
9470 esac
9471     PKGCONFIG=$ac_pt_PKGCONFIG
9472   fi
9473 else
9474   PKGCONFIG="$ac_cv_path_PKGCONFIG"
9475 fi
9476
9477                         if test "x$PKGCONFIG" != "xno"; then
9478                                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PKGCONFIG knows about libedit" >&5
9479 $as_echo_n "checking if $PKGCONFIG knows about libedit... " >&6; }
9480                                 if "$PKGCONFIG" libedit; then
9481                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9482 $as_echo "yes" >&6; }
9483                                         use_pkgconfig_for_libedit=yes
9484                                 else
9485                                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9486 $as_echo "no" >&6; }
9487                                 fi
9488                         fi
9489                 else
9490                         CPPFLAGS="$CPPFLAGS -I${withval}/include"
9491                         if test -n "${need_dash_r}"; then
9492                                 LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
9493                         else
9494                                 LDFLAGS="-L${withval}/lib ${LDFLAGS}"
9495                         fi
9496                 fi
9497                 if test "x$use_pkgconfig_for_libedit" = "xyes"; then
9498                         LIBEDIT=`$PKGCONFIG --libs-only-l libedit`
9499                         CPPFLAGS="$CPPFLAGS `$PKGCONFIG --cflags libedit`"
9500                 else
9501                         LIBEDIT="-ledit -lcurses"
9502                 fi
9503                 OTHERLIBS=`echo $LIBEDIT | sed 's/-ledit//'`
9504                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_init in -ledit" >&5
9505 $as_echo_n "checking for el_init in -ledit... " >&6; }
9506 if ${ac_cv_lib_edit_el_init+:} false; then :
9507   $as_echo_n "(cached) " >&6
9508 else
9509   ac_check_lib_save_LIBS=$LIBS
9510 LIBS="-ledit  $OTHERLIBS
9511                  $LIBS"
9512 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9513 /* end confdefs.h.  */
9514
9515 /* Override any GCC internal prototype to avoid an error.
9516    Use char because int might match the return type of a GCC
9517    builtin and then its argument prototype would still apply.  */
9518 #ifdef __cplusplus
9519 extern "C"
9520 #endif
9521 char el_init ();
9522 int
9523 main ()
9524 {
9525 return el_init ();
9526   ;
9527   return 0;
9528 }
9529 _ACEOF
9530 if ac_fn_c_try_link "$LINENO"; then :
9531   ac_cv_lib_edit_el_init=yes
9532 else
9533   ac_cv_lib_edit_el_init=no
9534 fi
9535 rm -f core conftest.err conftest.$ac_objext \
9536     conftest$ac_exeext conftest.$ac_ext
9537 LIBS=$ac_check_lib_save_LIBS
9538 fi
9539 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_el_init" >&5
9540 $as_echo "$ac_cv_lib_edit_el_init" >&6; }
9541 if test "x$ac_cv_lib_edit_el_init" = xyes; then :
9542
9543 $as_echo "#define USE_LIBEDIT 1" >>confdefs.h
9544
9545                           LIBEDIT_MSG="yes"
9546
9547
9548 else
9549    as_fn_error $? "libedit not found" "$LINENO" 5
9550 fi
9551
9552                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libedit version is compatible" >&5
9553 $as_echo_n "checking if libedit version is compatible... " >&6; }
9554                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9555 /* end confdefs.h.  */
9556  #include <histedit.h>
9557 int
9558 main ()
9559 {
9560
9561         int i = H_SETSIZE;
9562         el_init("", NULL, NULL, NULL);
9563         exit(0);
9564
9565   ;
9566   return 0;
9567 }
9568 _ACEOF
9569 if ac_fn_c_try_compile "$LINENO"; then :
9570    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9571 $as_echo "yes" >&6; }
9572 else
9573    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9574 $as_echo "no" >&6; }
9575                       as_fn_error $? "libedit version is not compatible" "$LINENO" 5
9576
9577 fi
9578 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9579         fi
9580
9581 fi
9582
9583
9584 AUDIT_MODULE=none
9585
9586 # Check whether --with-audit was given.
9587 if test "${with_audit+set}" = set; then :
9588   withval=$with_audit;
9589           { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported audit module" >&5
9590 $as_echo_n "checking for supported audit module... " >&6; }
9591           case "$withval" in
9592           bsm)
9593                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bsm" >&5
9594 $as_echo "bsm" >&6; }
9595                 AUDIT_MODULE=bsm
9596                                 for ac_header in bsm/audit.h
9597 do :
9598   ac_fn_c_check_header_compile "$LINENO" "bsm/audit.h" "ac_cv_header_bsm_audit_h" "
9599 #ifdef HAVE_TIME_H
9600 # include <time.h>
9601 #endif
9602
9603
9604 "
9605 if test "x$ac_cv_header_bsm_audit_h" = xyes; then :
9606   cat >>confdefs.h <<_ACEOF
9607 #define HAVE_BSM_AUDIT_H 1
9608 _ACEOF
9609
9610 else
9611   as_fn_error $? "BSM enabled and bsm/audit.h not found" "$LINENO" 5
9612 fi
9613
9614 done
9615
9616                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaudit in -lbsm" >&5
9617 $as_echo_n "checking for getaudit in -lbsm... " >&6; }
9618 if ${ac_cv_lib_bsm_getaudit+:} false; then :
9619   $as_echo_n "(cached) " >&6
9620 else
9621   ac_check_lib_save_LIBS=$LIBS
9622 LIBS="-lbsm  $LIBS"
9623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9624 /* end confdefs.h.  */
9625
9626 /* Override any GCC internal prototype to avoid an error.
9627    Use char because int might match the return type of a GCC
9628    builtin and then its argument prototype would still apply.  */
9629 #ifdef __cplusplus
9630 extern "C"
9631 #endif
9632 char getaudit ();
9633 int
9634 main ()
9635 {
9636 return getaudit ();
9637   ;
9638   return 0;
9639 }
9640 _ACEOF
9641 if ac_fn_c_try_link "$LINENO"; then :
9642   ac_cv_lib_bsm_getaudit=yes
9643 else
9644   ac_cv_lib_bsm_getaudit=no
9645 fi
9646 rm -f core conftest.err conftest.$ac_objext \
9647     conftest$ac_exeext conftest.$ac_ext
9648 LIBS=$ac_check_lib_save_LIBS
9649 fi
9650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsm_getaudit" >&5
9651 $as_echo "$ac_cv_lib_bsm_getaudit" >&6; }
9652 if test "x$ac_cv_lib_bsm_getaudit" = xyes; then :
9653   cat >>confdefs.h <<_ACEOF
9654 #define HAVE_LIBBSM 1
9655 _ACEOF
9656
9657   LIBS="-lbsm $LIBS"
9658
9659 else
9660   as_fn_error $? "BSM enabled and required library not found" "$LINENO" 5
9661 fi
9662
9663                 for ac_func in getaudit
9664 do :
9665   ac_fn_c_check_func "$LINENO" "getaudit" "ac_cv_func_getaudit"
9666 if test "x$ac_cv_func_getaudit" = xyes; then :
9667   cat >>confdefs.h <<_ACEOF
9668 #define HAVE_GETAUDIT 1
9669 _ACEOF
9670
9671 else
9672   as_fn_error $? "BSM enabled and required function not found" "$LINENO" 5
9673 fi
9674 done
9675
9676                 # These are optional
9677                 for ac_func in getaudit_addr aug_get_machine
9678 do :
9679   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9680 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9681 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9682   cat >>confdefs.h <<_ACEOF
9683 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9684 _ACEOF
9685
9686 fi
9687 done
9688
9689
9690 $as_echo "#define USE_BSM_AUDIT 1" >>confdefs.h
9691
9692                 if test "$sol2ver" -eq 11; then
9693                         SSHDLIBS="$SSHDLIBS -lscf"
9694
9695 $as_echo "#define BROKEN_BSM_API 1" >>confdefs.h
9696
9697                 fi
9698                 ;;
9699           linux)
9700                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux" >&5
9701 $as_echo "linux" >&6; }
9702                 AUDIT_MODULE=linux
9703                                 for ac_header in libaudit.h
9704 do :
9705   ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
9706 if test "x$ac_cv_header_libaudit_h" = xyes; then :
9707   cat >>confdefs.h <<_ACEOF
9708 #define HAVE_LIBAUDIT_H 1
9709 _ACEOF
9710
9711 fi
9712
9713 done
9714
9715                 SSHDLIBS="$SSHDLIBS -laudit"
9716
9717 $as_echo "#define USE_LINUX_AUDIT 1" >>confdefs.h
9718
9719                 ;;
9720           debug)
9721                 AUDIT_MODULE=debug
9722                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: debug" >&5
9723 $as_echo "debug" >&6; }
9724
9725 $as_echo "#define SSH_AUDIT_EVENTS 1" >>confdefs.h
9726
9727                 ;;
9728           no)
9729                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9730 $as_echo "no" >&6; }
9731                 ;;
9732           *)
9733                 as_fn_error $? "Unknown audit module $withval" "$LINENO" 5
9734                 ;;
9735         esac
9736
9737 fi
9738
9739
9740 for ac_func in  \
9741         arc4random \
9742         arc4random_buf \
9743         arc4random_uniform \
9744         asprintf \
9745         b64_ntop \
9746         __b64_ntop \
9747         b64_pton \
9748         __b64_pton \
9749         bcopy \
9750         bindresvport_sa \
9751         clock \
9752         closefrom \
9753         dirfd \
9754         endgrent \
9755         fchmod \
9756         fchown \
9757         freeaddrinfo \
9758         fstatvfs \
9759         futimes \
9760         getaddrinfo \
9761         getcwd \
9762         getgrouplist \
9763         getnameinfo \
9764         getopt \
9765         getpeereid \
9766         getpeerucred \
9767         getpgid \
9768         getpgrp \
9769         _getpty \
9770         getrlimit \
9771         getttyent \
9772         glob \
9773         group_from_gid \
9774         inet_aton \
9775         inet_ntoa \
9776         inet_ntop \
9777         innetgr \
9778         login_getcapbool \
9779         mblen \
9780         md5_crypt \
9781         memmove \
9782         mkdtemp \
9783         mmap \
9784         ngetaddrinfo \
9785         nsleep \
9786         ogetaddrinfo \
9787         openlog_r \
9788         poll \
9789         prctl \
9790         pstat \
9791         readpassphrase \
9792         realpath \
9793         recvmsg \
9794         rresvport_af \
9795         sendmsg \
9796         setdtablesize \
9797         setegid \
9798         setenv \
9799         seteuid \
9800         setgroupent \
9801         setgroups \
9802         setlinebuf \
9803         setlogin \
9804         setpassent\
9805         setpcred \
9806         setproctitle \
9807         setregid \
9808         setreuid \
9809         setrlimit \
9810         setsid \
9811         setvbuf \
9812         sigaction \
9813         sigvec \
9814         snprintf \
9815         socketpair \
9816         statfs \
9817         statvfs \
9818         strdup \
9819         strerror \
9820         strlcat \
9821         strlcpy \
9822         strmode \
9823         strnlen \
9824         strnvis \
9825         strptime \
9826         strtonum \
9827         strtoll \
9828         strtoul \
9829         strtoull \
9830         swap32 \
9831         sysconf \
9832         tcgetpgrp \
9833         timingsafe_bcmp \
9834         truncate \
9835         unsetenv \
9836         updwtmpx \
9837         user_from_uid \
9838         usleep \
9839         vasprintf \
9840         vhangup \
9841         vsnprintf \
9842         waitpid \
9843
9844 do :
9845   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9846 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9847 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9848   cat >>confdefs.h <<_ACEOF
9849 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9850 _ACEOF
9851
9852 fi
9853 done
9854
9855
9856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9857 /* end confdefs.h.  */
9858  #include <ctype.h>
9859 int
9860 main ()
9861 {
9862  return (isblank('a'));
9863   ;
9864   return 0;
9865 }
9866 _ACEOF
9867 if ac_fn_c_try_link "$LINENO"; then :
9868
9869 $as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
9870
9871
9872 fi
9873 rm -f core conftest.err conftest.$ac_objext \
9874     conftest$ac_exeext conftest.$ac_ext
9875
9876 # PKCS#11 support requires dlopen() and co
9877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9878 $as_echo_n "checking for library containing dlopen... " >&6; }
9879 if ${ac_cv_search_dlopen+:} false; then :
9880   $as_echo_n "(cached) " >&6
9881 else
9882   ac_func_search_save_LIBS=$LIBS
9883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9884 /* end confdefs.h.  */
9885
9886 /* Override any GCC internal prototype to avoid an error.
9887    Use char because int might match the return type of a GCC
9888    builtin and then its argument prototype would still apply.  */
9889 #ifdef __cplusplus
9890 extern "C"
9891 #endif
9892 char dlopen ();
9893 int
9894 main ()
9895 {
9896 return dlopen ();
9897   ;
9898   return 0;
9899 }
9900 _ACEOF
9901 for ac_lib in '' dl; do
9902   if test -z "$ac_lib"; then
9903     ac_res="none required"
9904   else
9905     ac_res=-l$ac_lib
9906     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
9907   fi
9908   if ac_fn_c_try_link "$LINENO"; then :
9909   ac_cv_search_dlopen=$ac_res
9910 fi
9911 rm -f core conftest.err conftest.$ac_objext \
9912     conftest$ac_exeext
9913   if ${ac_cv_search_dlopen+:} false; then :
9914   break
9915 fi
9916 done
9917 if ${ac_cv_search_dlopen+:} false; then :
9918
9919 else
9920   ac_cv_search_dlopen=no
9921 fi
9922 rm conftest.$ac_ext
9923 LIBS=$ac_func_search_save_LIBS
9924 fi
9925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9926 $as_echo "$ac_cv_search_dlopen" >&6; }
9927 ac_res=$ac_cv_search_dlopen
9928 if test "$ac_res" != no; then :
9929   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9930
9931 $as_echo "#define ENABLE_PKCS11 /**/" >>confdefs.h
9932
9933
9934 fi
9935
9936
9937 # IRIX has a const char return value for gai_strerror()
9938 for ac_func in gai_strerror
9939 do :
9940   ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror"
9941 if test "x$ac_cv_func_gai_strerror" = xyes; then :
9942   cat >>confdefs.h <<_ACEOF
9943 #define HAVE_GAI_STRERROR 1
9944 _ACEOF
9945
9946         $as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h
9947
9948         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9949 /* end confdefs.h.  */
9950
9951 #include <sys/types.h>
9952 #include <sys/socket.h>
9953 #include <netdb.h>
9954
9955 const char *gai_strerror(int);
9956
9957 int
9958 main ()
9959 {
9960
9961         char *str;
9962         str = gai_strerror(0);
9963
9964   ;
9965   return 0;
9966 }
9967 _ACEOF
9968 if ac_fn_c_try_compile "$LINENO"; then :
9969
9970
9971 $as_echo "#define HAVE_CONST_GAI_STRERROR_PROTO 1" >>confdefs.h
9972
9973 fi
9974 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9975 fi
9976 done
9977
9978
9979 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
9980 $as_echo_n "checking for library containing nanosleep... " >&6; }
9981 if ${ac_cv_search_nanosleep+:} false; then :
9982   $as_echo_n "(cached) " >&6
9983 else
9984   ac_func_search_save_LIBS=$LIBS
9985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9986 /* end confdefs.h.  */
9987
9988 /* Override any GCC internal prototype to avoid an error.
9989    Use char because int might match the return type of a GCC
9990    builtin and then its argument prototype would still apply.  */
9991 #ifdef __cplusplus
9992 extern "C"
9993 #endif
9994 char nanosleep ();
9995 int
9996 main ()
9997 {
9998 return nanosleep ();
9999   ;
10000   return 0;
10001 }
10002 _ACEOF
10003 for ac_lib in '' rt posix4; do
10004   if test -z "$ac_lib"; then
10005     ac_res="none required"
10006   else
10007     ac_res=-l$ac_lib
10008     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10009   fi
10010   if ac_fn_c_try_link "$LINENO"; then :
10011   ac_cv_search_nanosleep=$ac_res
10012 fi
10013 rm -f core conftest.err conftest.$ac_objext \
10014     conftest$ac_exeext
10015   if ${ac_cv_search_nanosleep+:} false; then :
10016   break
10017 fi
10018 done
10019 if ${ac_cv_search_nanosleep+:} false; then :
10020
10021 else
10022   ac_cv_search_nanosleep=no
10023 fi
10024 rm conftest.$ac_ext
10025 LIBS=$ac_func_search_save_LIBS
10026 fi
10027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
10028 $as_echo "$ac_cv_search_nanosleep" >&6; }
10029 ac_res=$ac_cv_search_nanosleep
10030 if test "$ac_res" != no; then :
10031   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10032
10033 $as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h
10034
10035 fi
10036
10037
10038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
10039 $as_echo_n "checking for library containing clock_gettime... " >&6; }
10040 if ${ac_cv_search_clock_gettime+:} false; then :
10041   $as_echo_n "(cached) " >&6
10042 else
10043   ac_func_search_save_LIBS=$LIBS
10044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10045 /* end confdefs.h.  */
10046
10047 /* Override any GCC internal prototype to avoid an error.
10048    Use char because int might match the return type of a GCC
10049    builtin and then its argument prototype would still apply.  */
10050 #ifdef __cplusplus
10051 extern "C"
10052 #endif
10053 char clock_gettime ();
10054 int
10055 main ()
10056 {
10057 return clock_gettime ();
10058   ;
10059   return 0;
10060 }
10061 _ACEOF
10062 for ac_lib in '' rt; do
10063   if test -z "$ac_lib"; then
10064     ac_res="none required"
10065   else
10066     ac_res=-l$ac_lib
10067     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
10068   fi
10069   if ac_fn_c_try_link "$LINENO"; then :
10070   ac_cv_search_clock_gettime=$ac_res
10071 fi
10072 rm -f core conftest.err conftest.$ac_objext \
10073     conftest$ac_exeext
10074   if ${ac_cv_search_clock_gettime+:} false; then :
10075   break
10076 fi
10077 done
10078 if ${ac_cv_search_clock_gettime+:} false; then :
10079
10080 else
10081   ac_cv_search_clock_gettime=no
10082 fi
10083 rm conftest.$ac_ext
10084 LIBS=$ac_func_search_save_LIBS
10085 fi
10086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
10087 $as_echo "$ac_cv_search_clock_gettime" >&6; }
10088 ac_res=$ac_cv_search_clock_gettime
10089 if test "$ac_res" != no; then :
10090   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
10091
10092 $as_echo "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h
10093
10094 fi
10095
10096
10097 ac_fn_c_check_decl "$LINENO" "getrusage" "ac_cv_have_decl_getrusage" "$ac_includes_default"
10098 if test "x$ac_cv_have_decl_getrusage" = xyes; then :
10099   for ac_func in getrusage
10100 do :
10101   ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
10102 if test "x$ac_cv_func_getrusage" = xyes; then :
10103   cat >>confdefs.h <<_ACEOF
10104 #define HAVE_GETRUSAGE 1
10105 _ACEOF
10106
10107 fi
10108 done
10109
10110 fi
10111
10112 ac_fn_c_check_decl "$LINENO" "strsep" "ac_cv_have_decl_strsep" "
10113 #ifdef HAVE_STRING_H
10114 # include <string.h>
10115 #endif
10116
10117 "
10118 if test "x$ac_cv_have_decl_strsep" = xyes; then :
10119   for ac_func in strsep
10120 do :
10121   ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
10122 if test "x$ac_cv_func_strsep" = xyes; then :
10123   cat >>confdefs.h <<_ACEOF
10124 #define HAVE_STRSEP 1
10125 _ACEOF
10126
10127 fi
10128 done
10129
10130 fi
10131
10132
10133 ac_fn_c_check_decl "$LINENO" "tcsendbreak" "ac_cv_have_decl_tcsendbreak" "#include <termios.h>
10134
10135 "
10136 if test "x$ac_cv_have_decl_tcsendbreak" = xyes; then :
10137   $as_echo "#define HAVE_TCSENDBREAK 1" >>confdefs.h
10138
10139 else
10140   for ac_func in tcsendbreak
10141 do :
10142   ac_fn_c_check_func "$LINENO" "tcsendbreak" "ac_cv_func_tcsendbreak"
10143 if test "x$ac_cv_func_tcsendbreak" = xyes; then :
10144   cat >>confdefs.h <<_ACEOF
10145 #define HAVE_TCSENDBREAK 1
10146 _ACEOF
10147
10148 fi
10149 done
10150
10151 fi
10152
10153
10154 ac_fn_c_check_decl "$LINENO" "h_errno" "ac_cv_have_decl_h_errno" "#include <netdb.h>
10155 "
10156 if test "x$ac_cv_have_decl_h_errno" = xyes; then :
10157   ac_have_decl=1
10158 else
10159   ac_have_decl=0
10160 fi
10161
10162 cat >>confdefs.h <<_ACEOF
10163 #define HAVE_DECL_H_ERRNO $ac_have_decl
10164 _ACEOF
10165
10166
10167 ac_fn_c_check_decl "$LINENO" "SHUT_RD" "ac_cv_have_decl_SHUT_RD" "
10168 #include <sys/types.h>
10169 #include <sys/socket.h>
10170
10171 "
10172 if test "x$ac_cv_have_decl_SHUT_RD" = xyes; then :
10173   ac_have_decl=1
10174 else
10175   ac_have_decl=0
10176 fi
10177
10178 cat >>confdefs.h <<_ACEOF
10179 #define HAVE_DECL_SHUT_RD $ac_have_decl
10180 _ACEOF
10181
10182
10183 ac_fn_c_check_decl "$LINENO" "O_NONBLOCK" "ac_cv_have_decl_O_NONBLOCK" "
10184 #include <sys/types.h>
10185 #ifdef HAVE_SYS_STAT_H
10186 # include <sys/stat.h>
10187 #endif
10188 #ifdef HAVE_FCNTL_H
10189 # include <fcntl.h>
10190 #endif
10191
10192 "
10193 if test "x$ac_cv_have_decl_O_NONBLOCK" = xyes; then :
10194   ac_have_decl=1
10195 else
10196   ac_have_decl=0
10197 fi
10198
10199 cat >>confdefs.h <<_ACEOF
10200 #define HAVE_DECL_O_NONBLOCK $ac_have_decl
10201 _ACEOF
10202
10203
10204 ac_fn_c_check_decl "$LINENO" "writev" "ac_cv_have_decl_writev" "
10205 #include <sys/types.h>
10206 #include <sys/uio.h>
10207 #include <unistd.h>
10208
10209 "
10210 if test "x$ac_cv_have_decl_writev" = xyes; then :
10211   ac_have_decl=1
10212 else
10213   ac_have_decl=0
10214 fi
10215
10216 cat >>confdefs.h <<_ACEOF
10217 #define HAVE_DECL_WRITEV $ac_have_decl
10218 _ACEOF
10219
10220
10221 ac_fn_c_check_decl "$LINENO" "MAXSYMLINKS" "ac_cv_have_decl_MAXSYMLINKS" "
10222 #include <sys/param.h>
10223
10224 "
10225 if test "x$ac_cv_have_decl_MAXSYMLINKS" = xyes; then :
10226   ac_have_decl=1
10227 else
10228   ac_have_decl=0
10229 fi
10230
10231 cat >>confdefs.h <<_ACEOF
10232 #define HAVE_DECL_MAXSYMLINKS $ac_have_decl
10233 _ACEOF
10234
10235
10236 ac_fn_c_check_decl "$LINENO" "offsetof" "ac_cv_have_decl_offsetof" "
10237 #include <stddef.h>
10238
10239 "
10240 if test "x$ac_cv_have_decl_offsetof" = xyes; then :
10241   ac_have_decl=1
10242 else
10243   ac_have_decl=0
10244 fi
10245
10246 cat >>confdefs.h <<_ACEOF
10247 #define HAVE_DECL_OFFSETOF $ac_have_decl
10248 _ACEOF
10249
10250
10251 # extra bits for select(2)
10252 ac_fn_c_check_decl "$LINENO" "howmany" "ac_cv_have_decl_howmany" "
10253 #include <sys/param.h>
10254 #include <sys/types.h>
10255 #ifdef HAVE_SYS_SYSMACROS_H
10256 #include <sys/sysmacros.h>
10257 #endif
10258 #ifdef HAVE_SYS_SELECT_H
10259 #include <sys/select.h>
10260 #endif
10261 #ifdef HAVE_SYS_TIME_H
10262 #include <sys/time.h>
10263 #endif
10264 #ifdef HAVE_UNISTD_H
10265 #include <unistd.h>
10266 #endif
10267
10268 "
10269 if test "x$ac_cv_have_decl_howmany" = xyes; then :
10270   ac_have_decl=1
10271 else
10272   ac_have_decl=0
10273 fi
10274
10275 cat >>confdefs.h <<_ACEOF
10276 #define HAVE_DECL_HOWMANY $ac_have_decl
10277 _ACEOF
10278 ac_fn_c_check_decl "$LINENO" "NFDBITS" "ac_cv_have_decl_NFDBITS" "
10279 #include <sys/param.h>
10280 #include <sys/types.h>
10281 #ifdef HAVE_SYS_SYSMACROS_H
10282 #include <sys/sysmacros.h>
10283 #endif
10284 #ifdef HAVE_SYS_SELECT_H
10285 #include <sys/select.h>
10286 #endif
10287 #ifdef HAVE_SYS_TIME_H
10288 #include <sys/time.h>
10289 #endif
10290 #ifdef HAVE_UNISTD_H
10291 #include <unistd.h>
10292 #endif
10293
10294 "
10295 if test "x$ac_cv_have_decl_NFDBITS" = xyes; then :
10296   ac_have_decl=1
10297 else
10298   ac_have_decl=0
10299 fi
10300
10301 cat >>confdefs.h <<_ACEOF
10302 #define HAVE_DECL_NFDBITS $ac_have_decl
10303 _ACEOF
10304
10305 ac_fn_c_check_type "$LINENO" "fd_mask" "ac_cv_type_fd_mask" "
10306 #include <sys/param.h>
10307 #include <sys/types.h>
10308 #ifdef HAVE_SYS_SELECT_H
10309 #include <sys/select.h>
10310 #endif
10311 #ifdef HAVE_SYS_TIME_H
10312 #include <sys/time.h>
10313 #endif
10314 #ifdef HAVE_UNISTD_H
10315 #include <unistd.h>
10316 #endif
10317
10318 "
10319 if test "x$ac_cv_type_fd_mask" = xyes; then :
10320
10321 cat >>confdefs.h <<_ACEOF
10322 #define HAVE_FD_MASK 1
10323 _ACEOF
10324
10325
10326 fi
10327
10328
10329 for ac_func in setresuid
10330 do :
10331   ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
10332 if test "x$ac_cv_func_setresuid" = xyes; then :
10333   cat >>confdefs.h <<_ACEOF
10334 #define HAVE_SETRESUID 1
10335 _ACEOF
10336
10337                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresuid seems to work" >&5
10338 $as_echo_n "checking if setresuid seems to work... " >&6; }
10339         if test "$cross_compiling" = yes; then :
10340   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
10341 $as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
10342
10343 else
10344   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10345 /* end confdefs.h.  */
10346
10347 #include <stdlib.h>
10348 #include <errno.h>
10349
10350 int
10351 main ()
10352 {
10353
10354         errno=0;
10355         setresuid(0,0,0);
10356         if (errno==ENOSYS)
10357                 exit(1);
10358         else
10359                 exit(0);
10360
10361   ;
10362   return 0;
10363 }
10364 _ACEOF
10365 if ac_fn_c_try_run "$LINENO"; then :
10366   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10367 $as_echo "yes" >&6; }
10368 else
10369
10370 $as_echo "#define BROKEN_SETRESUID 1" >>confdefs.h
10371
10372                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
10373 $as_echo "not implemented" >&6; }
10374 fi
10375 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10376   conftest.$ac_objext conftest.beam conftest.$ac_ext
10377 fi
10378
10379
10380 fi
10381 done
10382
10383
10384 for ac_func in setresgid
10385 do :
10386   ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
10387 if test "x$ac_cv_func_setresgid" = xyes; then :
10388   cat >>confdefs.h <<_ACEOF
10389 #define HAVE_SETRESGID 1
10390 _ACEOF
10391
10392                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresgid seems to work" >&5
10393 $as_echo_n "checking if setresgid seems to work... " >&6; }
10394         if test "$cross_compiling" = yes; then :
10395   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
10396 $as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
10397
10398 else
10399   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10400 /* end confdefs.h.  */
10401
10402 #include <stdlib.h>
10403 #include <errno.h>
10404
10405 int
10406 main ()
10407 {
10408
10409         errno=0;
10410         setresgid(0,0,0);
10411         if (errno==ENOSYS)
10412                 exit(1);
10413         else
10414                 exit(0);
10415
10416   ;
10417   return 0;
10418 }
10419 _ACEOF
10420 if ac_fn_c_try_run "$LINENO"; then :
10421   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10422 $as_echo "yes" >&6; }
10423 else
10424
10425 $as_echo "#define BROKEN_SETRESGID 1" >>confdefs.h
10426
10427                  { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
10428 $as_echo "not implemented" >&6; }
10429 fi
10430 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10431   conftest.$ac_objext conftest.beam conftest.$ac_ext
10432 fi
10433
10434
10435 fi
10436 done
10437
10438
10439 for ac_func in gettimeofday time
10440 do :
10441   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10442 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10443 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10444   cat >>confdefs.h <<_ACEOF
10445 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10446 _ACEOF
10447
10448 fi
10449 done
10450
10451 for ac_func in endutent getutent getutid getutline pututline setutent
10452 do :
10453   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10454 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10455 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10456   cat >>confdefs.h <<_ACEOF
10457 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10458 _ACEOF
10459
10460 fi
10461 done
10462
10463 for ac_func in utmpname
10464 do :
10465   ac_fn_c_check_func "$LINENO" "utmpname" "ac_cv_func_utmpname"
10466 if test "x$ac_cv_func_utmpname" = xyes; then :
10467   cat >>confdefs.h <<_ACEOF
10468 #define HAVE_UTMPNAME 1
10469 _ACEOF
10470
10471 fi
10472 done
10473
10474 for ac_func in endutxent getutxent getutxid getutxline getutxuser pututxline
10475 do :
10476   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10477 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10478 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10479   cat >>confdefs.h <<_ACEOF
10480 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10481 _ACEOF
10482
10483 fi
10484 done
10485
10486 for ac_func in setutxdb setutxent utmpxname
10487 do :
10488   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
10489 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
10490 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
10491   cat >>confdefs.h <<_ACEOF
10492 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
10493 _ACEOF
10494
10495 fi
10496 done
10497
10498 for ac_func in getlastlogxbyname
10499 do :
10500   ac_fn_c_check_func "$LINENO" "getlastlogxbyname" "ac_cv_func_getlastlogxbyname"
10501 if test "x$ac_cv_func_getlastlogxbyname" = xyes; then :
10502   cat >>confdefs.h <<_ACEOF
10503 #define HAVE_GETLASTLOGXBYNAME 1
10504 _ACEOF
10505
10506 fi
10507 done
10508
10509
10510 ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
10511 if test "x$ac_cv_func_daemon" = xyes; then :
10512
10513 $as_echo "#define HAVE_DAEMON 1" >>confdefs.h
10514
10515 else
10516   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for daemon in -lbsd" >&5
10517 $as_echo_n "checking for daemon in -lbsd... " >&6; }
10518 if ${ac_cv_lib_bsd_daemon+:} false; then :
10519   $as_echo_n "(cached) " >&6
10520 else
10521   ac_check_lib_save_LIBS=$LIBS
10522 LIBS="-lbsd  $LIBS"
10523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10524 /* end confdefs.h.  */
10525
10526 /* Override any GCC internal prototype to avoid an error.
10527    Use char because int might match the return type of a GCC
10528    builtin and then its argument prototype would still apply.  */
10529 #ifdef __cplusplus
10530 extern "C"
10531 #endif
10532 char daemon ();
10533 int
10534 main ()
10535 {
10536 return daemon ();
10537   ;
10538   return 0;
10539 }
10540 _ACEOF
10541 if ac_fn_c_try_link "$LINENO"; then :
10542   ac_cv_lib_bsd_daemon=yes
10543 else
10544   ac_cv_lib_bsd_daemon=no
10545 fi
10546 rm -f core conftest.err conftest.$ac_objext \
10547     conftest$ac_exeext conftest.$ac_ext
10548 LIBS=$ac_check_lib_save_LIBS
10549 fi
10550 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_daemon" >&5
10551 $as_echo "$ac_cv_lib_bsd_daemon" >&6; }
10552 if test "x$ac_cv_lib_bsd_daemon" = xyes; then :
10553   LIBS="$LIBS -lbsd"; $as_echo "#define HAVE_DAEMON 1" >>confdefs.h
10554
10555 fi
10556
10557
10558 fi
10559
10560
10561 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
10562 if test "x$ac_cv_func_getpagesize" = xyes; then :
10563
10564 $as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
10565
10566 else
10567   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize in -lucb" >&5
10568 $as_echo_n "checking for getpagesize in -lucb... " >&6; }
10569 if ${ac_cv_lib_ucb_getpagesize+:} false; then :
10570   $as_echo_n "(cached) " >&6
10571 else
10572   ac_check_lib_save_LIBS=$LIBS
10573 LIBS="-lucb  $LIBS"
10574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10575 /* end confdefs.h.  */
10576
10577 /* Override any GCC internal prototype to avoid an error.
10578    Use char because int might match the return type of a GCC
10579    builtin and then its argument prototype would still apply.  */
10580 #ifdef __cplusplus
10581 extern "C"
10582 #endif
10583 char getpagesize ();
10584 int
10585 main ()
10586 {
10587 return getpagesize ();
10588   ;
10589   return 0;
10590 }
10591 _ACEOF
10592 if ac_fn_c_try_link "$LINENO"; then :
10593   ac_cv_lib_ucb_getpagesize=yes
10594 else
10595   ac_cv_lib_ucb_getpagesize=no
10596 fi
10597 rm -f core conftest.err conftest.$ac_objext \
10598     conftest$ac_exeext conftest.$ac_ext
10599 LIBS=$ac_check_lib_save_LIBS
10600 fi
10601 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ucb_getpagesize" >&5
10602 $as_echo "$ac_cv_lib_ucb_getpagesize" >&6; }
10603 if test "x$ac_cv_lib_ucb_getpagesize" = xyes; then :
10604   LIBS="$LIBS -lucb"; $as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
10605
10606 fi
10607
10608
10609 fi
10610
10611
10612 # Check for broken snprintf
10613 if test "x$ac_cv_func_snprintf" = "xyes" ; then
10614         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf correctly terminates long strings" >&5
10615 $as_echo_n "checking whether snprintf correctly terminates long strings... " >&6; }
10616         if test "$cross_compiling" = yes; then :
10617    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
10618 $as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
10619
10620 else
10621   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10622 /* end confdefs.h.  */
10623  #include <stdio.h>
10624 int
10625 main ()
10626 {
10627
10628         char b[5];
10629         snprintf(b,5,"123456789");
10630         exit(b[4]!='\0');
10631
10632   ;
10633   return 0;
10634 }
10635 _ACEOF
10636 if ac_fn_c_try_run "$LINENO"; then :
10637   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10638 $as_echo "yes" >&6; }
10639 else
10640
10641                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10642 $as_echo "no" >&6; }
10643
10644 $as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
10645
10646                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
10647 $as_echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
10648
10649 fi
10650 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10651   conftest.$ac_objext conftest.beam conftest.$ac_ext
10652 fi
10653
10654 fi
10655
10656 # If we don't have a working asprintf, then we strongly depend on vsnprintf
10657 # returning the right thing on overflow: the number of characters it tried to
10658 # create (as per SUSv3)
10659 if test "x$ac_cv_func_asprintf" != "xyes" && \
10660    test "x$ac_cv_func_vsnprintf" = "xyes" ; then
10661         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf returns correct values on overflow" >&5
10662 $as_echo_n "checking whether vsnprintf returns correct values on overflow... " >&6; }
10663         if test "$cross_compiling" = yes; then :
10664    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working vsnprintf()" >&5
10665 $as_echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;}
10666
10667 else
10668   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10669 /* end confdefs.h.  */
10670
10671 #include <sys/types.h>
10672 #include <stdio.h>
10673 #include <stdarg.h>
10674
10675 int x_snprintf(char *str,size_t count,const char *fmt,...)
10676 {
10677         size_t ret; va_list ap;
10678         va_start(ap, fmt); ret = vsnprintf(str, count, fmt, ap); va_end(ap);
10679         return ret;
10680 }
10681
10682 int
10683 main ()
10684 {
10685
10686         char x[1];
10687         exit(x_snprintf(x, 1, "%s %d", "hello", 12345) == 11 ? 0 : 1);
10688
10689   ;
10690   return 0;
10691 }
10692 _ACEOF
10693 if ac_fn_c_try_run "$LINENO"; then :
10694   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10695 $as_echo "yes" >&6; }
10696 else
10697
10698                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10699 $as_echo "no" >&6; }
10700
10701 $as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
10702
10703                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&5
10704 $as_echo "$as_me: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&2;}
10705
10706 fi
10707 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10708   conftest.$ac_objext conftest.beam conftest.$ac_ext
10709 fi
10710
10711 fi
10712
10713 # On systems where [v]snprintf is broken, but is declared in stdio,
10714 # check that the fmt argument is const char * or just char *.
10715 # This is only useful for when BROKEN_SNPRINTF
10716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf can declare const char *fmt" >&5
10717 $as_echo_n "checking whether snprintf can declare const char *fmt... " >&6; }
10718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10719 /* end confdefs.h.  */
10720
10721 #include <stdio.h>
10722 int snprintf(char *a, size_t b, const char *c, ...) { return 0; }
10723
10724 int
10725 main ()
10726 {
10727
10728         snprintf(0, 0, 0);
10729
10730   ;
10731   return 0;
10732 }
10733 _ACEOF
10734 if ac_fn_c_try_compile "$LINENO"; then :
10735   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10736 $as_echo "yes" >&6; }
10737
10738 $as_echo "#define SNPRINTF_CONST const" >>confdefs.h
10739
10740 else
10741   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10742 $as_echo "no" >&6; }
10743     $as_echo "#define SNPRINTF_CONST /* not const */" >>confdefs.h
10744
10745 fi
10746 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10747
10748 # Check for missing getpeereid (or equiv) support
10749 NO_PEERCHECK=""
10750 if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then
10751         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports SO_PEERCRED getsockopt" >&5
10752 $as_echo_n "checking whether system supports SO_PEERCRED getsockopt... " >&6; }
10753         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10754 /* end confdefs.h.  */
10755
10756 #include <sys/types.h>
10757 #include <sys/socket.h>
10758 int
10759 main ()
10760 {
10761 int i = SO_PEERCRED;
10762   ;
10763   return 0;
10764 }
10765 _ACEOF
10766 if ac_fn_c_try_compile "$LINENO"; then :
10767    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10768 $as_echo "yes" >&6; }
10769
10770 $as_echo "#define HAVE_SO_PEERCRED 1" >>confdefs.h
10771
10772
10773 else
10774   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10775 $as_echo "no" >&6; }
10776                 NO_PEERCHECK=1
10777
10778 fi
10779 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10780 fi
10781
10782 if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
10783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for (overly) strict mkstemp" >&5
10784 $as_echo_n "checking for (overly) strict mkstemp... " >&6; }
10785 if test "$cross_compiling" = yes; then :
10786
10787                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10788 $as_echo "yes" >&6; }
10789                 $as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
10790
10791
10792
10793 else
10794   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10795 /* end confdefs.h.  */
10796
10797 #include <stdlib.h>
10798
10799 int
10800 main ()
10801 {
10802
10803         char template[]="conftest.mkstemp-test";
10804         if (mkstemp(template) == -1)
10805                 exit(1);
10806         unlink(template);
10807         exit(0);
10808
10809   ;
10810   return 0;
10811 }
10812 _ACEOF
10813 if ac_fn_c_try_run "$LINENO"; then :
10814
10815                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10816 $as_echo "no" >&6; }
10817
10818 else
10819
10820                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10821 $as_echo "yes" >&6; }
10822
10823 $as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
10824
10825
10826 fi
10827 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10828   conftest.$ac_objext conftest.beam conftest.$ac_ext
10829 fi
10830
10831 fi
10832
10833 if test ! -z "$check_for_openpty_ctty_bug"; then
10834         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openpty correctly handles controlling tty" >&5
10835 $as_echo_n "checking if openpty correctly handles controlling tty... " >&6; }
10836         if test "$cross_compiling" = yes; then :
10837
10838                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
10839 $as_echo "cross-compiling, assuming yes" >&6; }
10840
10841
10842 else
10843   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10844 /* end confdefs.h.  */
10845
10846 #include <stdio.h>
10847 #include <sys/fcntl.h>
10848 #include <sys/types.h>
10849 #include <sys/wait.h>
10850
10851 int
10852 main ()
10853 {
10854
10855         pid_t pid;
10856         int fd, ptyfd, ttyfd, status;
10857
10858         pid = fork();
10859         if (pid < 0) {          /* failed */
10860                 exit(1);
10861         } else if (pid > 0) {   /* parent */
10862                 waitpid(pid, &status, 0);
10863                 if (WIFEXITED(status))
10864                         exit(WEXITSTATUS(status));
10865                 else
10866                         exit(2);
10867         } else {                /* child */
10868                 close(0); close(1); close(2);
10869                 setsid();
10870                 openpty(&ptyfd, &ttyfd, NULL, NULL, NULL);
10871                 fd = open("/dev/tty", O_RDWR | O_NOCTTY);
10872                 if (fd >= 0)
10873                         exit(3);        /* Acquired ctty: broken */
10874                 else
10875                         exit(0);        /* Did not acquire ctty: OK */
10876         }
10877
10878   ;
10879   return 0;
10880 }
10881 _ACEOF
10882 if ac_fn_c_try_run "$LINENO"; then :
10883
10884                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10885 $as_echo "yes" >&6; }
10886
10887 else
10888
10889                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10890 $as_echo "no" >&6; }
10891                         $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
10892
10893
10894 fi
10895 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10896   conftest.$ac_objext conftest.beam conftest.$ac_ext
10897 fi
10898
10899 fi
10900
10901 if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
10902     test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
10903         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
10904 $as_echo_n "checking if getaddrinfo seems to work... " >&6; }
10905         if test "$cross_compiling" = yes; then :
10906
10907                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
10908 $as_echo "cross-compiling, assuming yes" >&6; }
10909
10910
10911 else
10912   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10913 /* end confdefs.h.  */
10914
10915 #include <stdio.h>
10916 #include <sys/socket.h>
10917 #include <netdb.h>
10918 #include <errno.h>
10919 #include <netinet/in.h>
10920
10921 #define TEST_PORT "2222"
10922
10923 int
10924 main ()
10925 {
10926
10927         int err, sock;
10928         struct addrinfo *gai_ai, *ai, hints;
10929         char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
10930
10931         memset(&hints, 0, sizeof(hints));
10932         hints.ai_family = PF_UNSPEC;
10933         hints.ai_socktype = SOCK_STREAM;
10934         hints.ai_flags = AI_PASSIVE;
10935
10936         err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
10937         if (err != 0) {
10938                 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
10939                 exit(1);
10940         }
10941
10942         for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
10943                 if (ai->ai_family != AF_INET6)
10944                         continue;
10945
10946                 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
10947                     sizeof(ntop), strport, sizeof(strport),
10948                     NI_NUMERICHOST|NI_NUMERICSERV);
10949
10950                 if (err != 0) {
10951                         if (err == EAI_SYSTEM)
10952                                 perror("getnameinfo EAI_SYSTEM");
10953                         else
10954                                 fprintf(stderr, "getnameinfo failed: %s\n",
10955                                     gai_strerror(err));
10956                         exit(2);
10957                 }
10958
10959                 sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol);
10960                 if (sock < 0)
10961                         perror("socket");
10962                 if (bind(sock, ai->ai_addr, ai->ai_addrlen) < 0) {
10963                         if (errno == EBADF)
10964                                 exit(3);
10965                 }
10966         }
10967         exit(0);
10968
10969   ;
10970   return 0;
10971 }
10972 _ACEOF
10973 if ac_fn_c_try_run "$LINENO"; then :
10974
10975                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10976 $as_echo "yes" >&6; }
10977
10978 else
10979
10980                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10981 $as_echo "no" >&6; }
10982                         $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
10983
10984
10985 fi
10986 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10987   conftest.$ac_objext conftest.beam conftest.$ac_ext
10988 fi
10989
10990 fi
10991
10992 if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
10993     test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
10994         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
10995 $as_echo_n "checking if getaddrinfo seems to work... " >&6; }
10996         if test "$cross_compiling" = yes; then :
10997
10998                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming no" >&5
10999 $as_echo "cross-compiling, assuming no" >&6; }
11000
11001
11002 else
11003   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11004 /* end confdefs.h.  */
11005
11006 #include <stdio.h>
11007 #include <sys/socket.h>
11008 #include <netdb.h>
11009 #include <errno.h>
11010 #include <netinet/in.h>
11011
11012 #define TEST_PORT "2222"
11013
11014 int
11015 main ()
11016 {
11017
11018         int err, sock;
11019         struct addrinfo *gai_ai, *ai, hints;
11020         char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
11021
11022         memset(&hints, 0, sizeof(hints));
11023         hints.ai_family = PF_UNSPEC;
11024         hints.ai_socktype = SOCK_STREAM;
11025         hints.ai_flags = AI_PASSIVE;
11026
11027         err = getaddrinfo(name, TEST_PORT, &hints, &gai_ai);
11028         if (err != 0) {
11029                 fprintf(stderr, "getaddrinfo failed (%s)", gai_strerror(err));
11030                 exit(1);
11031         }
11032
11033         for (ai = gai_ai; ai != NULL; ai = ai->ai_next) {
11034                 if (ai->ai_family != AF_INET && ai->ai_family != AF_INET6)
11035                         continue;
11036
11037                 err = getnameinfo(ai->ai_addr, ai->ai_addrlen, ntop,
11038                     sizeof(ntop), strport, sizeof(strport),
11039                     NI_NUMERICHOST|NI_NUMERICSERV);
11040
11041                 if (ai->ai_family == AF_INET && err != 0) {
11042                         perror("getnameinfo");
11043                         exit(2);
11044                 }
11045         }
11046         exit(0);
11047
11048   ;
11049   return 0;
11050 }
11051 _ACEOF
11052 if ac_fn_c_try_run "$LINENO"; then :
11053
11054                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11055 $as_echo "yes" >&6; }
11056
11057 $as_echo "#define AIX_GETNAMEINFO_HACK 1" >>confdefs.h
11058
11059
11060 else
11061
11062                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11063 $as_echo "no" >&6; }
11064                         $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
11065
11066
11067 fi
11068 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11069   conftest.$ac_objext conftest.beam conftest.$ac_ext
11070 fi
11071
11072 fi
11073
11074 if test "x$check_for_conflicting_getspnam" = "x1"; then
11075         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for conflicting getspnam in shadow.h" >&5
11076 $as_echo_n "checking for conflicting getspnam in shadow.h... " >&6; }
11077         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11078 /* end confdefs.h.  */
11079  #include <shadow.h>
11080 int
11081 main ()
11082 {
11083  exit(0);
11084   ;
11085   return 0;
11086 }
11087 _ACEOF
11088 if ac_fn_c_try_compile "$LINENO"; then :
11089
11090                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11091 $as_echo "no" >&6; }
11092
11093 else
11094
11095                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11096 $as_echo "yes" >&6; }
11097
11098 $as_echo "#define GETSPNAM_CONFLICTING_DEFS 1" >>confdefs.h
11099
11100
11101
11102 fi
11103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11104 fi
11105
11106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
11107 $as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
11108 if ${ac_cv_func_getpgrp_void+:} false; then :
11109   $as_echo_n "(cached) " >&6
11110 else
11111   # Use it with a single arg.
11112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11113 /* end confdefs.h.  */
11114 $ac_includes_default
11115 int
11116 main ()
11117 {
11118 getpgrp (0);
11119   ;
11120   return 0;
11121 }
11122 _ACEOF
11123 if ac_fn_c_try_compile "$LINENO"; then :
11124   ac_cv_func_getpgrp_void=no
11125 else
11126   ac_cv_func_getpgrp_void=yes
11127 fi
11128 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11129
11130 fi
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
11132 $as_echo "$ac_cv_func_getpgrp_void" >&6; }
11133 if test $ac_cv_func_getpgrp_void = yes; then
11134
11135 $as_echo "#define GETPGRP_VOID 1" >>confdefs.h
11136
11137 fi
11138
11139
11140 # Search for OpenSSL
11141 saved_CPPFLAGS="$CPPFLAGS"
11142 saved_LDFLAGS="$LDFLAGS"
11143
11144 # Check whether --with-ssl-dir was given.
11145 if test "${with_ssl_dir+set}" = set; then :
11146   withval=$with_ssl_dir;
11147                 if test "x$withval" != "xno" ; then
11148                         case "$withval" in
11149                                 # Relative paths
11150                                 ./*|../*)       withval="`pwd`/$withval"
11151                         esac
11152                         if test -d "$withval/lib"; then
11153                                 if test -n "${need_dash_r}"; then
11154                                         LDFLAGS="-L${withval}/lib -R${withval}/lib ${LDFLAGS}"
11155                                 else
11156                                         LDFLAGS="-L${withval}/lib ${LDFLAGS}"
11157                                 fi
11158                         elif test -d "$withval/lib64"; then
11159                                 if test -n "${need_dash_r}"; then
11160                                         LDFLAGS="-L${withval}/lib64 -R${withval}/lib64 ${LDFLAGS}"
11161                                 else
11162                                         LDFLAGS="-L${withval}/lib64 ${LDFLAGS}"
11163                                 fi
11164                         else
11165                                 if test -n "${need_dash_r}"; then
11166                                         LDFLAGS="-L${withval} -R${withval} ${LDFLAGS}"
11167                                 else
11168                                         LDFLAGS="-L${withval} ${LDFLAGS}"
11169                                 fi
11170                         fi
11171                         if test -d "$withval/include"; then
11172                                 CPPFLAGS="-I${withval}/include ${CPPFLAGS}"
11173                         else
11174                                 CPPFLAGS="-I${withval} ${CPPFLAGS}"
11175                         fi
11176                 fi
11177
11178
11179 fi
11180
11181 LIBS="-lcrypto $LIBS"
11182 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11183 /* end confdefs.h.  */
11184
11185 /* Override any GCC internal prototype to avoid an error.
11186    Use char because int might match the return type of a GCC
11187    builtin and then its argument prototype would still apply.  */
11188 #ifdef __cplusplus
11189 extern "C"
11190 #endif
11191 char RAND_add ();
11192 int
11193 main ()
11194 {
11195 return RAND_add ();
11196   ;
11197   return 0;
11198 }
11199 _ACEOF
11200 if ac_fn_c_try_link "$LINENO"; then :
11201
11202 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
11203
11204 else
11205
11206                                 if test -n "${need_dash_r}"; then
11207                         LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
11208                 else
11209                         LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
11210                 fi
11211                 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
11212                 ac_fn_c_check_header_mongrel "$LINENO" "openssl/opensslv.h" "ac_cv_header_openssl_opensslv_h" "$ac_includes_default"
11213 if test "x$ac_cv_header_openssl_opensslv_h" = xyes; then :
11214
11215 else
11216   as_fn_error $? "*** OpenSSL headers missing - please install first or check config.log ***" "$LINENO" 5
11217 fi
11218
11219
11220                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11221 /* end confdefs.h.  */
11222
11223 /* Override any GCC internal prototype to avoid an error.
11224    Use char because int might match the return type of a GCC
11225    builtin and then its argument prototype would still apply.  */
11226 #ifdef __cplusplus
11227 extern "C"
11228 #endif
11229 char RAND_add ();
11230 int
11231 main ()
11232 {
11233 return RAND_add ();
11234   ;
11235   return 0;
11236 }
11237 _ACEOF
11238 if ac_fn_c_try_link "$LINENO"; then :
11239   $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
11240
11241 else
11242
11243                                 as_fn_error $? "*** Can't find recent OpenSSL libcrypto (see config.log for details) ***" "$LINENO" 5
11244
11245
11246 fi
11247 rm -f core conftest.err conftest.$ac_objext \
11248     conftest$ac_exeext conftest.$ac_ext
11249
11250
11251 fi
11252 rm -f core conftest.err conftest.$ac_objext \
11253     conftest$ac_exeext conftest.$ac_ext
11254
11255 # Determine OpenSSL header version
11256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL header version" >&5
11257 $as_echo_n "checking OpenSSL header version... " >&6; }
11258 if test "$cross_compiling" = yes; then :
11259
11260                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
11261 $as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
11262
11263
11264 else
11265   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11266 /* end confdefs.h.  */
11267
11268 #include <stdio.h>
11269 #include <string.h>
11270 #include <openssl/opensslv.h>
11271 #define DATA "conftest.sslincver"
11272
11273 int
11274 main ()
11275 {
11276
11277         FILE *fd;
11278         int rc;
11279
11280         fd = fopen(DATA,"w");
11281         if(fd == NULL)
11282                 exit(1);
11283
11284         if ((rc = fprintf(fd ,"%x (%s)\n", OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_TEXT)) <0)
11285                 exit(1);
11286
11287         exit(0);
11288
11289   ;
11290   return 0;
11291 }
11292 _ACEOF
11293 if ac_fn_c_try_run "$LINENO"; then :
11294
11295                 ssl_header_ver=`cat conftest.sslincver`
11296                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_header_ver" >&5
11297 $as_echo "$ssl_header_ver" >&6; }
11298
11299 else
11300
11301                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11302 $as_echo "not found" >&6; }
11303                 as_fn_error $? "OpenSSL version header not found." "$LINENO" 5
11304
11305 fi
11306 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11307   conftest.$ac_objext conftest.beam conftest.$ac_ext
11308 fi
11309
11310
11311 # Determine OpenSSL library version
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version" >&5
11313 $as_echo_n "checking OpenSSL library version... " >&6; }
11314 if test "$cross_compiling" = yes; then :
11315
11316                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
11317 $as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
11318
11319
11320 else
11321   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11322 /* end confdefs.h.  */
11323
11324 #include <stdio.h>
11325 #include <string.h>
11326 #include <openssl/opensslv.h>
11327 #include <openssl/crypto.h>
11328 #define DATA "conftest.ssllibver"
11329
11330 int
11331 main ()
11332 {
11333
11334         FILE *fd;
11335         int rc;
11336
11337         fd = fopen(DATA,"w");
11338         if(fd == NULL)
11339                 exit(1);
11340
11341         if ((rc = fprintf(fd ,"%x (%s)\n", SSLeay(), SSLeay_version(SSLEAY_VERSION))) <0)
11342                 exit(1);
11343
11344         exit(0);
11345
11346   ;
11347   return 0;
11348 }
11349 _ACEOF
11350 if ac_fn_c_try_run "$LINENO"; then :
11351
11352                 ssl_library_ver=`cat conftest.ssllibver`
11353                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_library_ver" >&5
11354 $as_echo "$ssl_library_ver" >&6; }
11355
11356 else
11357
11358                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11359 $as_echo "not found" >&6; }
11360                 as_fn_error $? "OpenSSL library not found." "$LINENO" 5
11361
11362 fi
11363 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11364   conftest.$ac_objext conftest.beam conftest.$ac_ext
11365 fi
11366
11367
11368
11369 # Check whether --with-openssl-header-check was given.
11370 if test "${with_openssl_header_check+set}" = set; then :
11371   withval=$with_openssl_header_check;   if test "x$withval" = "xno" ; then
11372                 openssl_check_nonfatal=1
11373            fi
11374
11375
11376 fi
11377
11378
11379 # Sanity check OpenSSL headers
11380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's headers match the library" >&5
11381 $as_echo_n "checking whether OpenSSL's headers match the library... " >&6; }
11382 if test "$cross_compiling" = yes; then :
11383
11384                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
11385 $as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
11386
11387
11388 else
11389   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11390 /* end confdefs.h.  */
11391
11392 #include <string.h>
11393 #include <openssl/opensslv.h>
11394
11395 int
11396 main ()
11397 {
11398
11399         exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1);
11400
11401   ;
11402   return 0;
11403 }
11404 _ACEOF
11405 if ac_fn_c_try_run "$LINENO"; then :
11406
11407                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11408 $as_echo "yes" >&6; }
11409
11410 else
11411
11412                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11413 $as_echo "no" >&6; }
11414                 if test "x$openssl_check_nonfatal" = "x"; then
11415                         as_fn_error $? "Your OpenSSL headers do not match your
11416 library. Check config.log for details.
11417 If you are sure your installation is consistent, you can disable the check
11418 by running \"./configure --without-openssl-header-check\".
11419 Also see contrib/findssl.sh for help identifying header/library mismatches.
11420 " "$LINENO" 5
11421                 else
11422                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your OpenSSL headers do not match your
11423 library. Check config.log for details.
11424 Also see contrib/findssl.sh for help identifying header/library mismatches." >&5
11425 $as_echo "$as_me: WARNING: Your OpenSSL headers do not match your
11426 library. Check config.log for details.
11427 Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;}
11428                 fi
11429
11430 fi
11431 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11432   conftest.$ac_objext conftest.beam conftest.$ac_ext
11433 fi
11434
11435
11436 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL functions will link" >&5
11437 $as_echo_n "checking if programs using OpenSSL functions will link... " >&6; }
11438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11439 /* end confdefs.h.  */
11440  #include <openssl/evp.h>
11441 int
11442 main ()
11443 {
11444  SSLeay_add_all_algorithms();
11445   ;
11446   return 0;
11447 }
11448 _ACEOF
11449 if ac_fn_c_try_link "$LINENO"; then :
11450
11451                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11452 $as_echo "yes" >&6; }
11453
11454 else
11455
11456                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11457 $as_echo "no" >&6; }
11458                 saved_LIBS="$LIBS"
11459                 LIBS="$LIBS -ldl"
11460                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL need -ldl" >&5
11461 $as_echo_n "checking if programs using OpenSSL need -ldl... " >&6; }
11462                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11463 /* end confdefs.h.  */
11464  #include <openssl/evp.h>
11465 int
11466 main ()
11467 {
11468  SSLeay_add_all_algorithms();
11469   ;
11470   return 0;
11471 }
11472 _ACEOF
11473 if ac_fn_c_try_link "$LINENO"; then :
11474
11475                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11476 $as_echo "yes" >&6; }
11477
11478 else
11479
11480                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11481 $as_echo "no" >&6; }
11482                                 LIBS="$saved_LIBS"
11483
11484
11485 fi
11486 rm -f core conftest.err conftest.$ac_objext \
11487     conftest$ac_exeext conftest.$ac_ext
11488
11489
11490 fi
11491 rm -f core conftest.err conftest.$ac_objext \
11492     conftest$ac_exeext conftest.$ac_ext
11493
11494 for ac_func in RSA_generate_key_ex DSA_generate_parameters_ex BN_is_prime_ex RSA_get_default_method HMAC_CTX_init
11495 do :
11496   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11497 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11498 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11499   cat >>confdefs.h <<_ACEOF
11500 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11501 _ACEOF
11502
11503 fi
11504 done
11505
11506
11507
11508 # Check whether --with-ssl-engine was given.
11509 if test "${with_ssl_engine+set}" = set; then :
11510   withval=$with_ssl_engine;  if test "x$withval" != "xno" ; then
11511                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL ENGINE support" >&5
11512 $as_echo_n "checking for OpenSSL ENGINE support... " >&6; }
11513                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11514 /* end confdefs.h.  */
11515
11516 #include <openssl/engine.h>
11517
11518 int
11519 main ()
11520 {
11521
11522         ENGINE_load_builtin_engines();
11523         ENGINE_register_all_complete();
11524
11525   ;
11526   return 0;
11527 }
11528 _ACEOF
11529 if ac_fn_c_try_compile "$LINENO"; then :
11530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11531 $as_echo "yes" >&6; }
11532
11533 $as_echo "#define USE_OPENSSL_ENGINE 1" >>confdefs.h
11534
11535
11536 else
11537    as_fn_error $? "OpenSSL ENGINE support not found" "$LINENO" 5
11538
11539 fi
11540 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11541           fi
11542
11543 fi
11544
11545
11546 # Check for OpenSSL without EVP_aes_{192,256}_cbc
11547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has crippled AES support" >&5
11548 $as_echo_n "checking whether OpenSSL has crippled AES support... " >&6; }
11549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11550 /* end confdefs.h.  */
11551
11552 #include <string.h>
11553 #include <openssl/evp.h>
11554
11555 int
11556 main ()
11557 {
11558
11559         exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);
11560
11561   ;
11562   return 0;
11563 }
11564 _ACEOF
11565 if ac_fn_c_try_link "$LINENO"; then :
11566
11567                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11568 $as_echo "no" >&6; }
11569
11570 else
11571
11572                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11573 $as_echo "yes" >&6; }
11574
11575 $as_echo "#define OPENSSL_LOBOTOMISED_AES 1" >>confdefs.h
11576
11577
11578
11579 fi
11580 rm -f core conftest.err conftest.$ac_objext \
11581     conftest$ac_exeext conftest.$ac_ext
11582
11583 # Check for OpenSSL with EVP_aes_*ctr
11584 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has AES CTR via EVP" >&5
11585 $as_echo_n "checking whether OpenSSL has AES CTR via EVP... " >&6; }
11586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11587 /* end confdefs.h.  */
11588
11589 #include <string.h>
11590 #include <openssl/evp.h>
11591
11592 int
11593 main ()
11594 {
11595
11596         exit(EVP_aes_128_ctr() == NULL ||
11597             EVP_aes_192_cbc() == NULL ||
11598             EVP_aes_256_cbc() == NULL);
11599
11600   ;
11601   return 0;
11602 }
11603 _ACEOF
11604 if ac_fn_c_try_link "$LINENO"; then :
11605
11606                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11607 $as_echo "yes" >&6; }
11608
11609 $as_echo "#define OPENSSL_HAVE_EVPCTR 1" >>confdefs.h
11610
11611
11612 else
11613
11614                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11615 $as_echo "no" >&6; }
11616
11617
11618 fi
11619 rm -f core conftest.err conftest.$ac_objext \
11620     conftest$ac_exeext conftest.$ac_ext
11621
11622 # Check for OpenSSL with EVP_aes_*gcm
11623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has AES GCM via EVP" >&5
11624 $as_echo_n "checking whether OpenSSL has AES GCM via EVP... " >&6; }
11625 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11626 /* end confdefs.h.  */
11627
11628 #include <string.h>
11629 #include <openssl/evp.h>
11630
11631 int
11632 main ()
11633 {
11634
11635         exit(EVP_aes_128_gcm() == NULL ||
11636             EVP_aes_256_gcm() == NULL ||
11637             EVP_CTRL_GCM_SET_IV_FIXED == 0 ||
11638             EVP_CTRL_GCM_IV_GEN == 0 ||
11639             EVP_CTRL_GCM_SET_TAG == 0 ||
11640             EVP_CTRL_GCM_GET_TAG == 0 ||
11641             EVP_CIPHER_CTX_ctrl(NULL, 0, 0, NULL) == 0);
11642
11643   ;
11644   return 0;
11645 }
11646 _ACEOF
11647 if ac_fn_c_try_link "$LINENO"; then :
11648
11649                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11650 $as_echo "yes" >&6; }
11651
11652 $as_echo "#define OPENSSL_HAVE_EVPGCM 1" >>confdefs.h
11653
11654
11655 else
11656
11657                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11658 $as_echo "no" >&6; }
11659                 unsupported_algorithms="$unsupported_cipers \
11660                    aes128-gcm@openssh.com aes256-gcm@openssh.com"
11661
11662
11663 fi
11664 rm -f core conftest.err conftest.$ac_objext \
11665     conftest$ac_exeext conftest.$ac_ext
11666
11667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing EVP_CIPHER_CTX_ctrl" >&5
11668 $as_echo_n "checking for library containing EVP_CIPHER_CTX_ctrl... " >&6; }
11669 if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
11670   $as_echo_n "(cached) " >&6
11671 else
11672   ac_func_search_save_LIBS=$LIBS
11673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11674 /* end confdefs.h.  */
11675
11676 /* Override any GCC internal prototype to avoid an error.
11677    Use char because int might match the return type of a GCC
11678    builtin and then its argument prototype would still apply.  */
11679 #ifdef __cplusplus
11680 extern "C"
11681 #endif
11682 char EVP_CIPHER_CTX_ctrl ();
11683 int
11684 main ()
11685 {
11686 return EVP_CIPHER_CTX_ctrl ();
11687   ;
11688   return 0;
11689 }
11690 _ACEOF
11691 for ac_lib in '' crypto; do
11692   if test -z "$ac_lib"; then
11693     ac_res="none required"
11694   else
11695     ac_res=-l$ac_lib
11696     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
11697   fi
11698   if ac_fn_c_try_link "$LINENO"; then :
11699   ac_cv_search_EVP_CIPHER_CTX_ctrl=$ac_res
11700 fi
11701 rm -f core conftest.err conftest.$ac_objext \
11702     conftest$ac_exeext
11703   if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
11704   break
11705 fi
11706 done
11707 if ${ac_cv_search_EVP_CIPHER_CTX_ctrl+:} false; then :
11708
11709 else
11710   ac_cv_search_EVP_CIPHER_CTX_ctrl=no
11711 fi
11712 rm conftest.$ac_ext
11713 LIBS=$ac_func_search_save_LIBS
11714 fi
11715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_EVP_CIPHER_CTX_ctrl" >&5
11716 $as_echo "$ac_cv_search_EVP_CIPHER_CTX_ctrl" >&6; }
11717 ac_res=$ac_cv_search_EVP_CIPHER_CTX_ctrl
11718 if test "$ac_res" != no; then :
11719   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11720
11721 $as_echo "#define HAVE_EVP_CIPHER_CTX_CTRL 1" >>confdefs.h
11722
11723 fi
11724
11725
11726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if EVP_DigestUpdate returns an int" >&5
11727 $as_echo_n "checking if EVP_DigestUpdate returns an int... " >&6; }
11728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11729 /* end confdefs.h.  */
11730
11731 #include <string.h>
11732 #include <openssl/evp.h>
11733
11734 int
11735 main ()
11736 {
11737
11738         if(EVP_DigestUpdate(NULL, NULL,0))
11739                 exit(0);
11740
11741   ;
11742   return 0;
11743 }
11744 _ACEOF
11745 if ac_fn_c_try_link "$LINENO"; then :
11746
11747                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11748 $as_echo "yes" >&6; }
11749
11750 else
11751
11752                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11753 $as_echo "no" >&6; }
11754
11755 $as_echo "#define OPENSSL_EVP_DIGESTUPDATE_VOID 1" >>confdefs.h
11756
11757
11758
11759 fi
11760 rm -f core conftest.err conftest.$ac_objext \
11761     conftest$ac_exeext conftest.$ac_ext
11762
11763 # Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
11764 # because the system crypt() is more featureful.
11765 if test "x$check_for_libcrypt_before" = "x1"; then
11766         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
11767 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
11768 if ${ac_cv_lib_crypt_crypt+:} false; then :
11769   $as_echo_n "(cached) " >&6
11770 else
11771   ac_check_lib_save_LIBS=$LIBS
11772 LIBS="-lcrypt  $LIBS"
11773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11774 /* end confdefs.h.  */
11775
11776 /* Override any GCC internal prototype to avoid an error.
11777    Use char because int might match the return type of a GCC
11778    builtin and then its argument prototype would still apply.  */
11779 #ifdef __cplusplus
11780 extern "C"
11781 #endif
11782 char crypt ();
11783 int
11784 main ()
11785 {
11786 return crypt ();
11787   ;
11788   return 0;
11789 }
11790 _ACEOF
11791 if ac_fn_c_try_link "$LINENO"; then :
11792   ac_cv_lib_crypt_crypt=yes
11793 else
11794   ac_cv_lib_crypt_crypt=no
11795 fi
11796 rm -f core conftest.err conftest.$ac_objext \
11797     conftest$ac_exeext conftest.$ac_ext
11798 LIBS=$ac_check_lib_save_LIBS
11799 fi
11800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
11801 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
11802 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
11803   cat >>confdefs.h <<_ACEOF
11804 #define HAVE_LIBCRYPT 1
11805 _ACEOF
11806
11807   LIBS="-lcrypt $LIBS"
11808
11809 fi
11810
11811 fi
11812
11813 # Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
11814 # version in OpenSSL.
11815 if test "x$check_for_libcrypt_later" = "x1"; then
11816         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
11817 $as_echo_n "checking for crypt in -lcrypt... " >&6; }
11818 if ${ac_cv_lib_crypt_crypt+:} false; then :
11819   $as_echo_n "(cached) " >&6
11820 else
11821   ac_check_lib_save_LIBS=$LIBS
11822 LIBS="-lcrypt  $LIBS"
11823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11824 /* end confdefs.h.  */
11825
11826 /* Override any GCC internal prototype to avoid an error.
11827    Use char because int might match the return type of a GCC
11828    builtin and then its argument prototype would still apply.  */
11829 #ifdef __cplusplus
11830 extern "C"
11831 #endif
11832 char crypt ();
11833 int
11834 main ()
11835 {
11836 return crypt ();
11837   ;
11838   return 0;
11839 }
11840 _ACEOF
11841 if ac_fn_c_try_link "$LINENO"; then :
11842   ac_cv_lib_crypt_crypt=yes
11843 else
11844   ac_cv_lib_crypt_crypt=no
11845 fi
11846 rm -f core conftest.err conftest.$ac_objext \
11847     conftest$ac_exeext conftest.$ac_ext
11848 LIBS=$ac_check_lib_save_LIBS
11849 fi
11850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
11851 $as_echo "$ac_cv_lib_crypt_crypt" >&6; }
11852 if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
11853   LIBS="$LIBS -lcrypt"
11854 fi
11855
11856 fi
11857 for ac_func in crypt DES_crypt
11858 do :
11859   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11860 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11861 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11862   cat >>confdefs.h <<_ACEOF
11863 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11864 _ACEOF
11865
11866 fi
11867 done
11868
11869
11870 # Search for SHA256 support in libc and/or OpenSSL
11871 for ac_func in SHA256_Update EVP_sha256
11872 do :
11873   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
11874 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
11875 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
11876   cat >>confdefs.h <<_ACEOF
11877 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
11878 _ACEOF
11879  TEST_SSH_SHA256=yes
11880 else
11881   TEST_SSH_SHA256=no
11882      unsupported_algorithms="$unsupported_algorithms \
11883         hmac-sha2-256 hmac-sha2-512 \
11884         diffie-hellman-group-exchange-sha256 \
11885         hmac-sha2-256-etm@openssh.com hmac-sha2-512-etm@openssh.com"
11886
11887
11888 fi
11889 done
11890
11891
11892
11893 # Check complete ECC support in OpenSSL
11894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has complete ECC support" >&5
11895 $as_echo_n "checking whether OpenSSL has complete ECC support... " >&6; }
11896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11897 /* end confdefs.h.  */
11898
11899 #include <openssl/ec.h>
11900 #include <openssl/ecdh.h>
11901 #include <openssl/ecdsa.h>
11902 #include <openssl/evp.h>
11903 #include <openssl/objects.h>
11904 #include <openssl/opensslv.h>
11905 #if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */
11906 # error "OpenSSL < 0.9.8g has unreliable ECC code"
11907 #endif
11908
11909 int
11910 main ()
11911 {
11912
11913         EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
11914         const EVP_MD *m = EVP_sha512(); /* We need this too */
11915
11916   ;
11917   return 0;
11918 }
11919 _ACEOF
11920 if ac_fn_c_try_link "$LINENO"; then :
11921
11922                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11923 $as_echo "yes" >&6; }
11924
11925 $as_echo "#define OPENSSL_HAS_ECC 1" >>confdefs.h
11926
11927                 TEST_SSH_ECC=yes
11928                 COMMENT_OUT_ECC=""
11929
11930 else
11931
11932                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11933 $as_echo "no" >&6; }
11934                 TEST_SSH_ECC=no
11935                 COMMENT_OUT_ECC="#no ecc#"
11936                 unsupported_algorithms="$unsupported_algorithms \
11937                     ecdh-sha2-nistp256 ecdh-sha2-nistp384 ecdh-sha2-nistp521 \
11938                     ecdsa-sha2-nistp256-cert-v01@openssh.com \
11939                     ecdsa-sha2-nistp384-cert-v01@openssh.com \
11940                     ecdsa-sha2-nistp521-cert-v01@openssh.com \
11941                     ecdsa-sha2-nistp256 ecdsa-sha2-nistp384 ecdsa-sha2-nistp521"
11942
11943
11944 fi
11945 rm -f core conftest.err conftest.$ac_objext \
11946     conftest$ac_exeext conftest.$ac_ext
11947
11948
11949
11950 saved_LIBS="$LIBS"
11951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ia_openinfo in -liaf" >&5
11952 $as_echo_n "checking for ia_openinfo in -liaf... " >&6; }
11953 if ${ac_cv_lib_iaf_ia_openinfo+:} false; then :
11954   $as_echo_n "(cached) " >&6
11955 else
11956   ac_check_lib_save_LIBS=$LIBS
11957 LIBS="-liaf  $LIBS"
11958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11959 /* end confdefs.h.  */
11960
11961 /* Override any GCC internal prototype to avoid an error.
11962    Use char because int might match the return type of a GCC
11963    builtin and then its argument prototype would still apply.  */
11964 #ifdef __cplusplus
11965 extern "C"
11966 #endif
11967 char ia_openinfo ();
11968 int
11969 main ()
11970 {
11971 return ia_openinfo ();
11972   ;
11973   return 0;
11974 }
11975 _ACEOF
11976 if ac_fn_c_try_link "$LINENO"; then :
11977   ac_cv_lib_iaf_ia_openinfo=yes
11978 else
11979   ac_cv_lib_iaf_ia_openinfo=no
11980 fi
11981 rm -f core conftest.err conftest.$ac_objext \
11982     conftest$ac_exeext conftest.$ac_ext
11983 LIBS=$ac_check_lib_save_LIBS
11984 fi
11985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iaf_ia_openinfo" >&5
11986 $as_echo "$ac_cv_lib_iaf_ia_openinfo" >&6; }
11987 if test "x$ac_cv_lib_iaf_ia_openinfo" = xyes; then :
11988
11989         LIBS="$LIBS -liaf"
11990         for ac_func in set_id
11991 do :
11992   ac_fn_c_check_func "$LINENO" "set_id" "ac_cv_func_set_id"
11993 if test "x$ac_cv_func_set_id" = xyes; then :
11994   cat >>confdefs.h <<_ACEOF
11995 #define HAVE_SET_ID 1
11996 _ACEOF
11997  SSHDLIBS="$SSHDLIBS -liaf"
11998
11999 $as_echo "#define HAVE_LIBIAF 1" >>confdefs.h
12000
12001
12002 fi
12003 done
12004
12005
12006 fi
12007
12008 LIBS="$saved_LIBS"
12009
12010 ### Configure cryptographic random number support
12011
12012 # Check wheter OpenSSL seeds itself
12013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's PRNG is internally seeded" >&5
12014 $as_echo_n "checking whether OpenSSL's PRNG is internally seeded... " >&6; }
12015 if test "$cross_compiling" = yes; then :
12016
12017                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
12018 $as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
12019                 # This is safe, since we will fatal() at runtime if
12020                 # OpenSSL is not seeded correctly.
12021                 OPENSSL_SEEDS_ITSELF=yes
12022
12023
12024 else
12025   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12026 /* end confdefs.h.  */
12027
12028 #include <string.h>
12029 #include <openssl/rand.h>
12030
12031 int
12032 main ()
12033 {
12034
12035         exit(RAND_status() == 1 ? 0 : 1);
12036
12037   ;
12038   return 0;
12039 }
12040 _ACEOF
12041 if ac_fn_c_try_run "$LINENO"; then :
12042
12043                 OPENSSL_SEEDS_ITSELF=yes
12044                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12045 $as_echo "yes" >&6; }
12046
12047 else
12048
12049                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12050 $as_echo "no" >&6; }
12051
12052 fi
12053 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12054   conftest.$ac_objext conftest.beam conftest.$ac_ext
12055 fi
12056
12057
12058 # PRNGD TCP socket
12059
12060 # Check whether --with-prngd-port was given.
12061 if test "${with_prngd_port+set}" = set; then :
12062   withval=$with_prngd_port;
12063                 case "$withval" in
12064                 no)
12065                         withval=""
12066                         ;;
12067                 [0-9]*)
12068                         ;;
12069                 *)
12070                         as_fn_error $? "You must specify a numeric port number for --with-prngd-port" "$LINENO" 5
12071                         ;;
12072                 esac
12073                 if test ! -z "$withval" ; then
12074                         PRNGD_PORT="$withval"
12075
12076 cat >>confdefs.h <<_ACEOF
12077 #define PRNGD_PORT $PRNGD_PORT
12078 _ACEOF
12079
12080                 fi
12081
12082
12083 fi
12084
12085
12086 # PRNGD Unix domain socket
12087
12088 # Check whether --with-prngd-socket was given.
12089 if test "${with_prngd_socket+set}" = set; then :
12090   withval=$with_prngd_socket;
12091                 case "$withval" in
12092                 yes)
12093                         withval="/var/run/egd-pool"
12094                         ;;
12095                 no)
12096                         withval=""
12097                         ;;
12098                 /*)
12099                         ;;
12100                 *)
12101                         as_fn_error $? "You must specify an absolute path to the entropy socket" "$LINENO" 5
12102                         ;;
12103                 esac
12104
12105                 if test ! -z "$withval" ; then
12106                         if test ! -z "$PRNGD_PORT" ; then
12107                                 as_fn_error $? "You may not specify both a PRNGD/EGD port and socket" "$LINENO" 5
12108                         fi
12109                         if test ! -r "$withval" ; then
12110                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Entropy socket is not readable" >&5
12111 $as_echo "$as_me: WARNING: Entropy socket is not readable" >&2;}
12112                         fi
12113                         PRNGD_SOCKET="$withval"
12114
12115 cat >>confdefs.h <<_ACEOF
12116 #define PRNGD_SOCKET "$PRNGD_SOCKET"
12117 _ACEOF
12118
12119                 fi
12120
12121 else
12122
12123                 # Check for existing socket only if we don't have a random device already
12124                 if test "x$OPENSSL_SEEDS_ITSELF" != "xyes" ; then
12125                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRNGD/EGD socket" >&5
12126 $as_echo_n "checking for PRNGD/EGD socket... " >&6; }
12127                         # Insert other locations here
12128                         for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
12129                                 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
12130                                         PRNGD_SOCKET="$sock"
12131                                         cat >>confdefs.h <<_ACEOF
12132 #define PRNGD_SOCKET "$PRNGD_SOCKET"
12133 _ACEOF
12134
12135                                         break;
12136                                 fi
12137                         done
12138                         if test ! -z "$PRNGD_SOCKET" ; then
12139                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRNGD_SOCKET" >&5
12140 $as_echo "$PRNGD_SOCKET" >&6; }
12141                         else
12142                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12143 $as_echo "not found" >&6; }
12144                         fi
12145                 fi
12146
12147
12148 fi
12149
12150
12151 # Which randomness source do we use?
12152 if test ! -z "$PRNGD_PORT" ; then
12153         RAND_MSG="PRNGd port $PRNGD_PORT"
12154 elif test ! -z "$PRNGD_SOCKET" ; then
12155         RAND_MSG="PRNGd socket $PRNGD_SOCKET"
12156 elif test ! -z "$OPENSSL_SEEDS_ITSELF" ; then
12157
12158 $as_echo "#define OPENSSL_PRNG_ONLY 1" >>confdefs.h
12159
12160         RAND_MSG="OpenSSL internal ONLY"
12161 else
12162         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
12163 fi
12164
12165 # Check for PAM libs
12166 PAM_MSG="no"
12167
12168 # Check whether --with-pam was given.
12169 if test "${with_pam+set}" = set; then :
12170   withval=$with_pam;
12171                 if test "x$withval" != "xno" ; then
12172                         if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
12173                            test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
12174                                 as_fn_error $? "PAM headers not found" "$LINENO" 5
12175                         fi
12176
12177                         saved_LIBS="$LIBS"
12178                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
12179 $as_echo_n "checking for dlopen in -ldl... " >&6; }
12180 if ${ac_cv_lib_dl_dlopen+:} false; then :
12181   $as_echo_n "(cached) " >&6
12182 else
12183   ac_check_lib_save_LIBS=$LIBS
12184 LIBS="-ldl  $LIBS"
12185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12186 /* end confdefs.h.  */
12187
12188 /* Override any GCC internal prototype to avoid an error.
12189    Use char because int might match the return type of a GCC
12190    builtin and then its argument prototype would still apply.  */
12191 #ifdef __cplusplus
12192 extern "C"
12193 #endif
12194 char dlopen ();
12195 int
12196 main ()
12197 {
12198 return dlopen ();
12199   ;
12200   return 0;
12201 }
12202 _ACEOF
12203 if ac_fn_c_try_link "$LINENO"; then :
12204   ac_cv_lib_dl_dlopen=yes
12205 else
12206   ac_cv_lib_dl_dlopen=no
12207 fi
12208 rm -f core conftest.err conftest.$ac_objext \
12209     conftest$ac_exeext conftest.$ac_ext
12210 LIBS=$ac_check_lib_save_LIBS
12211 fi
12212 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
12213 $as_echo "$ac_cv_lib_dl_dlopen" >&6; }
12214 if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
12215   cat >>confdefs.h <<_ACEOF
12216 #define HAVE_LIBDL 1
12217 _ACEOF
12218
12219   LIBS="-ldl $LIBS"
12220
12221 fi
12222
12223                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_set_item in -lpam" >&5
12224 $as_echo_n "checking for pam_set_item in -lpam... " >&6; }
12225 if ${ac_cv_lib_pam_pam_set_item+:} false; then :
12226   $as_echo_n "(cached) " >&6
12227 else
12228   ac_check_lib_save_LIBS=$LIBS
12229 LIBS="-lpam  $LIBS"
12230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12231 /* end confdefs.h.  */
12232
12233 /* Override any GCC internal prototype to avoid an error.
12234    Use char because int might match the return type of a GCC
12235    builtin and then its argument prototype would still apply.  */
12236 #ifdef __cplusplus
12237 extern "C"
12238 #endif
12239 char pam_set_item ();
12240 int
12241 main ()
12242 {
12243 return pam_set_item ();
12244   ;
12245   return 0;
12246 }
12247 _ACEOF
12248 if ac_fn_c_try_link "$LINENO"; then :
12249   ac_cv_lib_pam_pam_set_item=yes
12250 else
12251   ac_cv_lib_pam_pam_set_item=no
12252 fi
12253 rm -f core conftest.err conftest.$ac_objext \
12254     conftest$ac_exeext conftest.$ac_ext
12255 LIBS=$ac_check_lib_save_LIBS
12256 fi
12257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_set_item" >&5
12258 $as_echo "$ac_cv_lib_pam_pam_set_item" >&6; }
12259 if test "x$ac_cv_lib_pam_pam_set_item" = xyes; then :
12260   cat >>confdefs.h <<_ACEOF
12261 #define HAVE_LIBPAM 1
12262 _ACEOF
12263
12264   LIBS="-lpam $LIBS"
12265
12266 else
12267   as_fn_error $? "*** libpam missing" "$LINENO" 5
12268 fi
12269
12270                         for ac_func in pam_getenvlist
12271 do :
12272   ac_fn_c_check_func "$LINENO" "pam_getenvlist" "ac_cv_func_pam_getenvlist"
12273 if test "x$ac_cv_func_pam_getenvlist" = xyes; then :
12274   cat >>confdefs.h <<_ACEOF
12275 #define HAVE_PAM_GETENVLIST 1
12276 _ACEOF
12277
12278 fi
12279 done
12280
12281                         for ac_func in pam_putenv
12282 do :
12283   ac_fn_c_check_func "$LINENO" "pam_putenv" "ac_cv_func_pam_putenv"
12284 if test "x$ac_cv_func_pam_putenv" = xyes; then :
12285   cat >>confdefs.h <<_ACEOF
12286 #define HAVE_PAM_PUTENV 1
12287 _ACEOF
12288
12289 fi
12290 done
12291
12292                         LIBS="$saved_LIBS"
12293
12294                         PAM_MSG="yes"
12295
12296                         SSHDLIBS="$SSHDLIBS -lpam"
12297
12298 $as_echo "#define USE_PAM 1" >>confdefs.h
12299
12300
12301                         if test $ac_cv_lib_dl_dlopen = yes; then
12302                                 case "$LIBS" in
12303                                 *-ldl*)
12304                                         # libdl already in LIBS
12305                                         ;;
12306                                 *)
12307                                         SSHDLIBS="$SSHDLIBS -ldl"
12308                                         ;;
12309                                 esac
12310                         fi
12311                 fi
12312
12313
12314 fi
12315
12316
12317 # Check for older PAM
12318 if test "x$PAM_MSG" = "xyes" ; then
12319         # Check PAM strerror arguments (old PAM)
12320         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pam_strerror takes only one argument" >&5
12321 $as_echo_n "checking whether pam_strerror takes only one argument... " >&6; }
12322         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12323 /* end confdefs.h.  */
12324
12325 #include <stdlib.h>
12326 #if defined(HAVE_SECURITY_PAM_APPL_H)
12327 #include <security/pam_appl.h>
12328 #elif defined (HAVE_PAM_PAM_APPL_H)
12329 #include <pam/pam_appl.h>
12330 #endif
12331
12332 int
12333 main ()
12334 {
12335
12336 (void)pam_strerror((pam_handle_t *)NULL, -1);
12337
12338   ;
12339   return 0;
12340 }
12341 _ACEOF
12342 if ac_fn_c_try_compile "$LINENO"; then :
12343   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12344 $as_echo "no" >&6; }
12345 else
12346
12347
12348 $as_echo "#define HAVE_OLD_PAM 1" >>confdefs.h
12349
12350                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12351 $as_echo "yes" >&6; }
12352                         PAM_MSG="yes (old library)"
12353
12354
12355 fi
12356 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12357 fi
12358
12359 SSH_PRIVSEP_USER=sshd
12360
12361 # Check whether --with-privsep-user was given.
12362 if test "${with_privsep_user+set}" = set; then :
12363   withval=$with_privsep_user;
12364                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
12365                     test "x${withval}" != "xyes"; then
12366                         SSH_PRIVSEP_USER=$withval
12367                 fi
12368
12369
12370 fi
12371
12372
12373 cat >>confdefs.h <<_ACEOF
12374 #define SSH_PRIVSEP_USER "$SSH_PRIVSEP_USER"
12375 _ACEOF
12376
12377
12378
12379 if test "x$have_linux_no_new_privs" = "x1" ; then
12380 ac_fn_c_check_decl "$LINENO" "SECCOMP_MODE_FILTER" "ac_cv_have_decl_SECCOMP_MODE_FILTER" "
12381         #include <sys/types.h>
12382         #include <linux/seccomp.h>
12383
12384 "
12385 if test "x$ac_cv_have_decl_SECCOMP_MODE_FILTER" = xyes; then :
12386   have_seccomp_filter=1
12387 fi
12388
12389 fi
12390 if test "x$have_seccomp_filter" = "x1" ; then
12391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking kernel for seccomp_filter support" >&5
12392 $as_echo_n "checking kernel for seccomp_filter support... " >&6; }
12393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12394 /* end confdefs.h.  */
12395
12396                 #include <errno.h>
12397                 #include <elf.h>
12398                 #include <linux/audit.h>
12399                 #include <linux/seccomp.h>
12400                 #include <stdlib.h>
12401                 #include <sys/prctl.h>
12402
12403 int
12404 main ()
12405 {
12406  int i = $seccomp_audit_arch;
12407            errno = 0;
12408            prctl(PR_SET_SECCOMP, SECCOMP_MODE_FILTER, NULL, 0, 0);
12409            exit(errno == EFAULT ? 0 : 1);
12410   ;
12411   return 0;
12412 }
12413 _ACEOF
12414 if ac_fn_c_try_link "$LINENO"; then :
12415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12416 $as_echo "yes" >&6; }
12417 else
12418
12419                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12420 $as_echo "no" >&6; }
12421                 # Disable seccomp filter as a target
12422                 have_seccomp_filter=0
12423
12424
12425 fi
12426 rm -f core conftest.err conftest.$ac_objext \
12427     conftest$ac_exeext conftest.$ac_ext
12428 fi
12429
12430 # Decide which sandbox style to use
12431 sandbox_arg=""
12432
12433 # Check whether --with-sandbox was given.
12434 if test "${with_sandbox+set}" = set; then :
12435   withval=$with_sandbox;
12436                 if test "x$withval" = "xyes" ; then
12437                         sandbox_arg=""
12438                 else
12439                         sandbox_arg="$withval"
12440                 fi
12441
12442
12443 fi
12444
12445
12446 # Some platforms (seems to be the ones that have a kernel poll(2)-type
12447 # function with which they implement select(2)) use an extra file descriptor
12448 # when calling select(2), which means we can't use the rlimit sandbox.
12449 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if select works with descriptor rlimit" >&5
12450 $as_echo_n "checking if select works with descriptor rlimit... " >&6; }
12451 if test "$cross_compiling" = yes; then :
12452   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
12453 $as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
12454
12455 else
12456   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12457 /* end confdefs.h.  */
12458
12459 #include <sys/types.h>
12460 #ifdef HAVE_SYS_TIME_H
12461 # include <sys/time.h>
12462 #endif
12463 #include <sys/resource.h>
12464 #ifdef HAVE_SYS_SELECT_H
12465 # include <sys/select.h>
12466 #endif
12467 #include <errno.h>
12468 #include <fcntl.h>
12469 #include <stdlib.h>
12470
12471 int
12472 main ()
12473 {
12474
12475         struct rlimit rl_zero;
12476         int fd, r;
12477         fd_set fds;
12478         struct timeval tv;
12479
12480         fd = open("/dev/null", O_RDONLY);
12481         FD_ZERO(&fds);
12482         FD_SET(fd, &fds);
12483         rl_zero.rlim_cur = rl_zero.rlim_max = 0;
12484         setrlimit(RLIMIT_FSIZE, &rl_zero);
12485         setrlimit(RLIMIT_NOFILE, &rl_zero);
12486         tv.tv_sec = 1;
12487         tv.tv_usec = 0;
12488         r = select(fd+1, &fds, NULL, NULL, &tv);
12489         exit (r == -1 ? 1 : 0);
12490
12491   ;
12492   return 0;
12493 }
12494 _ACEOF
12495 if ac_fn_c_try_run "$LINENO"; then :
12496   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12497 $as_echo "yes" >&6; }
12498          select_works_with_rlimit=yes
12499 else
12500   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12501 $as_echo "no" >&6; }
12502          select_works_with_rlimit=no
12503 fi
12504 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12505   conftest.$ac_objext conftest.beam conftest.$ac_ext
12506 fi
12507
12508
12509 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setrlimit(RLIMIT_NOFILE,{0,0}) works" >&5
12510 $as_echo_n "checking if setrlimit(RLIMIT_NOFILE,{0,0}) works... " >&6; }
12511 if test "$cross_compiling" = yes; then :
12512   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
12513 $as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
12514
12515 else
12516   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12517 /* end confdefs.h.  */
12518
12519 #include <sys/types.h>
12520 #ifdef HAVE_SYS_TIME_H
12521 # include <sys/time.h>
12522 #endif
12523 #include <sys/resource.h>
12524 #include <errno.h>
12525 #include <stdlib.h>
12526
12527 int
12528 main ()
12529 {
12530
12531         struct rlimit rl_zero;
12532         int fd, r;
12533         fd_set fds;
12534
12535         rl_zero.rlim_cur = rl_zero.rlim_max = 0;
12536         r = setrlimit(RLIMIT_NOFILE, &rl_zero);
12537         exit (r == -1 ? 1 : 0);
12538
12539   ;
12540   return 0;
12541 }
12542 _ACEOF
12543 if ac_fn_c_try_run "$LINENO"; then :
12544   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12545 $as_echo "yes" >&6; }
12546          rlimit_nofile_zero_works=yes
12547 else
12548   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12549 $as_echo "no" >&6; }
12550          rlimit_nofile_zero_works=no
12551 fi
12552 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12553   conftest.$ac_objext conftest.beam conftest.$ac_ext
12554 fi
12555
12556
12557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setrlimit RLIMIT_FSIZE works" >&5
12558 $as_echo_n "checking if setrlimit RLIMIT_FSIZE works... " >&6; }
12559 if test "$cross_compiling" = yes; then :
12560   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
12561 $as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
12562
12563 else
12564   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12565 /* end confdefs.h.  */
12566
12567 #include <sys/types.h>
12568 #include <sys/resource.h>
12569 #include <stdlib.h>
12570
12571 int
12572 main ()
12573 {
12574
12575                 struct rlimit rl_zero;
12576
12577                 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
12578                 exit(setrlimit(RLIMIT_FSIZE, &rl_zero) != 0);
12579
12580   ;
12581   return 0;
12582 }
12583 _ACEOF
12584 if ac_fn_c_try_run "$LINENO"; then :
12585   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12586 $as_echo "yes" >&6; }
12587 else
12588   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12589 $as_echo "no" >&6; }
12590
12591 $as_echo "#define SANDBOX_SKIP_RLIMIT_FSIZE 1" >>confdefs.h
12592
12593 fi
12594 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12595   conftest.$ac_objext conftest.beam conftest.$ac_ext
12596 fi
12597
12598
12599 if test "x$sandbox_arg" = "xsystrace" || \
12600    ( test -z "$sandbox_arg" && test "x$have_systr_policy_kill" = "x1" ) ; then
12601         test "x$have_systr_policy_kill" != "x1" && \
12602                 as_fn_error $? "systrace sandbox requires systrace headers and SYSTR_POLICY_KILL support" "$LINENO" 5
12603         SANDBOX_STYLE="systrace"
12604
12605 $as_echo "#define SANDBOX_SYSTRACE 1" >>confdefs.h
12606
12607 elif test "x$sandbox_arg" = "xdarwin" || \
12608      ( test -z "$sandbox_arg" && test "x$ac_cv_func_sandbox_init" = "xyes" && \
12609        test "x$ac_cv_header_sandbox_h" = "xyes") ; then
12610         test "x$ac_cv_func_sandbox_init" != "xyes" -o \
12611              "x$ac_cv_header_sandbox_h" != "xyes" && \
12612                 as_fn_error $? "Darwin seatbelt sandbox requires sandbox.h and sandbox_init function" "$LINENO" 5
12613         SANDBOX_STYLE="darwin"
12614
12615 $as_echo "#define SANDBOX_DARWIN 1" >>confdefs.h
12616
12617 elif test "x$sandbox_arg" = "xseccomp_filter" || \
12618      ( test -z "$sandbox_arg" && \
12619        test "x$have_seccomp_filter" = "x1" && \
12620        test "x$ac_cv_header_elf_h" = "xyes" && \
12621        test "x$ac_cv_header_linux_audit_h" = "xyes" && \
12622        test "x$ac_cv_header_linux_filter_h" = "xyes" && \
12623        test "x$seccomp_audit_arch" != "x" && \
12624        test "x$have_linux_no_new_privs" = "x1" && \
12625        test "x$ac_cv_func_prctl" = "xyes" ) ; then
12626         test "x$seccomp_audit_arch" = "x" && \
12627                 as_fn_error $? "seccomp_filter sandbox not supported on $host" "$LINENO" 5
12628         test "x$have_linux_no_new_privs" != "x1" && \
12629                 as_fn_error $? "seccomp_filter sandbox requires PR_SET_NO_NEW_PRIVS" "$LINENO" 5
12630         test "x$have_seccomp_filter" != "x1" && \
12631                 as_fn_error $? "seccomp_filter sandbox requires seccomp headers" "$LINENO" 5
12632         test "x$ac_cv_func_prctl" != "xyes" && \
12633                 as_fn_error $? "seccomp_filter sandbox requires prctl function" "$LINENO" 5
12634         SANDBOX_STYLE="seccomp_filter"
12635
12636 $as_echo "#define SANDBOX_SECCOMP_FILTER 1" >>confdefs.h
12637
12638 elif test "x$sandbox_arg" = "xrlimit" || \
12639      ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" && \
12640        test "x$select_works_with_rlimit" = "xyes" && \
12641        test "x$rlimit_nofile_zero_works" = "xyes" ) ; then
12642         test "x$ac_cv_func_setrlimit" != "xyes" && \
12643                 as_fn_error $? "rlimit sandbox requires setrlimit function" "$LINENO" 5
12644         test "x$select_works_with_rlimit" != "xyes" && \
12645                 as_fn_error $? "rlimit sandbox requires select to work with rlimit" "$LINENO" 5
12646         SANDBOX_STYLE="rlimit"
12647
12648 $as_echo "#define SANDBOX_RLIMIT 1" >>confdefs.h
12649
12650 elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \
12651      test "x$sandbox_arg" = "xnone" || test "x$sandbox_arg" = "xnull" ; then
12652         SANDBOX_STYLE="none"
12653
12654 $as_echo "#define SANDBOX_NULL 1" >>confdefs.h
12655
12656 else
12657         as_fn_error $? "unsupported --with-sandbox" "$LINENO" 5
12658 fi
12659
12660 # Cheap hack to ensure NEWS-OS libraries are arranged right.
12661 if test ! -z "$SONY" ; then
12662   LIBS="$LIBS -liberty";
12663 fi
12664
12665 # Check for  long long datatypes
12666 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
12667 if test "x$ac_cv_type_long_long" = xyes; then :
12668
12669 cat >>confdefs.h <<_ACEOF
12670 #define HAVE_LONG_LONG 1
12671 _ACEOF
12672
12673
12674 fi
12675 ac_fn_c_check_type "$LINENO" "unsigned long long" "ac_cv_type_unsigned_long_long" "$ac_includes_default"
12676 if test "x$ac_cv_type_unsigned_long_long" = xyes; then :
12677
12678 cat >>confdefs.h <<_ACEOF
12679 #define HAVE_UNSIGNED_LONG_LONG 1
12680 _ACEOF
12681
12682
12683 fi
12684 ac_fn_c_check_type "$LINENO" "long double" "ac_cv_type_long_double" "$ac_includes_default"
12685 if test "x$ac_cv_type_long_double" = xyes; then :
12686
12687 cat >>confdefs.h <<_ACEOF
12688 #define HAVE_LONG_DOUBLE 1
12689 _ACEOF
12690
12691
12692 fi
12693
12694
12695 # Check datatype sizes
12696 # The cast to long int works around a bug in the HP C Compiler
12697 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12698 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12699 # This bug is HP SR number 8606223364.
12700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short int" >&5
12701 $as_echo_n "checking size of short int... " >&6; }
12702 if ${ac_cv_sizeof_short_int+:} false; then :
12703   $as_echo_n "(cached) " >&6
12704 else
12705   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short int))" "ac_cv_sizeof_short_int"        "$ac_includes_default"; then :
12706
12707 else
12708   if test "$ac_cv_type_short_int" = yes; then
12709      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12710 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12711 as_fn_error 77 "cannot compute sizeof (short int)
12712 See \`config.log' for more details" "$LINENO" 5; }
12713    else
12714      ac_cv_sizeof_short_int=0
12715    fi
12716 fi
12717
12718 fi
12719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short_int" >&5
12720 $as_echo "$ac_cv_sizeof_short_int" >&6; }
12721
12722
12723
12724 cat >>confdefs.h <<_ACEOF
12725 #define SIZEOF_SHORT_INT $ac_cv_sizeof_short_int
12726 _ACEOF
12727
12728
12729 # The cast to long int works around a bug in the HP C Compiler
12730 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12731 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12732 # This bug is HP SR number 8606223364.
12733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
12734 $as_echo_n "checking size of int... " >&6; }
12735 if ${ac_cv_sizeof_int+:} false; then :
12736   $as_echo_n "(cached) " >&6
12737 else
12738   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int"        "$ac_includes_default"; then :
12739
12740 else
12741   if test "$ac_cv_type_int" = yes; then
12742      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12743 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12744 as_fn_error 77 "cannot compute sizeof (int)
12745 See \`config.log' for more details" "$LINENO" 5; }
12746    else
12747      ac_cv_sizeof_int=0
12748    fi
12749 fi
12750
12751 fi
12752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
12753 $as_echo "$ac_cv_sizeof_int" >&6; }
12754
12755
12756
12757 cat >>confdefs.h <<_ACEOF
12758 #define SIZEOF_INT $ac_cv_sizeof_int
12759 _ACEOF
12760
12761
12762 # The cast to long int works around a bug in the HP C Compiler
12763 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12764 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12765 # This bug is HP SR number 8606223364.
12766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5
12767 $as_echo_n "checking size of long int... " >&6; }
12768 if ${ac_cv_sizeof_long_int+:} false; then :
12769   $as_echo_n "(cached) " >&6
12770 else
12771   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int"        "$ac_includes_default"; then :
12772
12773 else
12774   if test "$ac_cv_type_long_int" = yes; then
12775      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12776 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12777 as_fn_error 77 "cannot compute sizeof (long int)
12778 See \`config.log' for more details" "$LINENO" 5; }
12779    else
12780      ac_cv_sizeof_long_int=0
12781    fi
12782 fi
12783
12784 fi
12785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_int" >&5
12786 $as_echo "$ac_cv_sizeof_long_int" >&6; }
12787
12788
12789
12790 cat >>confdefs.h <<_ACEOF
12791 #define SIZEOF_LONG_INT $ac_cv_sizeof_long_int
12792 _ACEOF
12793
12794
12795 # The cast to long int works around a bug in the HP C Compiler
12796 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
12797 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
12798 # This bug is HP SR number 8606223364.
12799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5
12800 $as_echo_n "checking size of long long int... " >&6; }
12801 if ${ac_cv_sizeof_long_long_int+:} false; then :
12802   $as_echo_n "(cached) " >&6
12803 else
12804   if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int"        "$ac_includes_default"; then :
12805
12806 else
12807   if test "$ac_cv_type_long_long_int" = yes; then
12808      { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
12809 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
12810 as_fn_error 77 "cannot compute sizeof (long long int)
12811 See \`config.log' for more details" "$LINENO" 5; }
12812    else
12813      ac_cv_sizeof_long_long_int=0
12814    fi
12815 fi
12816
12817 fi
12818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long_int" >&5
12819 $as_echo "$ac_cv_sizeof_long_long_int" >&6; }
12820
12821
12822
12823 cat >>confdefs.h <<_ACEOF
12824 #define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
12825 _ACEOF
12826
12827
12828
12829 # Sanity check long long for some platforms (AIX)
12830 if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
12831         ac_cv_sizeof_long_long_int=0
12832 fi
12833
12834 # compute LLONG_MIN and LLONG_MAX if we don't know them.
12835 if test -z "$have_llong_max"; then
12836         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for max value of long long" >&5
12837 $as_echo_n "checking for max value of long long... " >&6; }
12838         if test "$cross_compiling" = yes; then :
12839
12840                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
12841 $as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
12842
12843
12844 else
12845   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12846 /* end confdefs.h.  */
12847
12848 #include <stdio.h>
12849 /* Why is this so damn hard? */
12850 #ifdef __GNUC__
12851 # undef __GNUC__
12852 #endif
12853 #define __USE_ISOC99
12854 #include <limits.h>
12855 #define DATA "conftest.llminmax"
12856 #define my_abs(a) ((a) < 0 ? ((a) * -1) : (a))
12857
12858 /*
12859  * printf in libc on some platforms (eg old Tru64) does not understand %lld so
12860  * we do this the hard way.
12861  */
12862 static int
12863 fprint_ll(FILE *f, long long n)
12864 {
12865         unsigned int i;
12866         int l[sizeof(long long) * 8];
12867
12868         if (n < 0)
12869                 if (fprintf(f, "-") < 0)
12870                         return -1;
12871         for (i = 0; n != 0; i++) {
12872                 l[i] = my_abs(n % 10);
12873                 n /= 10;
12874         }
12875         do {
12876                 if (fprintf(f, "%d", l[--i]) < 0)
12877                         return -1;
12878         } while (i != 0);
12879         if (fprintf(f, " ") < 0)
12880                 return -1;
12881         return 0;
12882 }
12883
12884 int
12885 main ()
12886 {
12887
12888         FILE *f;
12889         long long i, llmin, llmax = 0;
12890
12891         if((f = fopen(DATA,"w")) == NULL)
12892                 exit(1);
12893
12894 #if defined(LLONG_MIN) && defined(LLONG_MAX)
12895         fprintf(stderr, "Using system header for LLONG_MIN and LLONG_MAX\n");
12896         llmin = LLONG_MIN;
12897         llmax = LLONG_MAX;
12898 #else
12899         fprintf(stderr, "Calculating  LLONG_MIN and LLONG_MAX\n");
12900         /* This will work on one's complement and two's complement */
12901         for (i = 1; i > llmax; i <<= 1, i++)
12902                 llmax = i;
12903         llmin = llmax + 1LL;    /* wrap */
12904 #endif
12905
12906         /* Sanity check */
12907         if (llmin + 1 < llmin || llmin - 1 < llmin || llmax + 1 > llmax
12908             || llmax - 1 > llmax || llmin == llmax || llmin == 0
12909             || llmax == 0 || llmax < LONG_MAX || llmin > LONG_MIN) {
12910                 fprintf(f, "unknown unknown\n");
12911                 exit(2);
12912         }
12913
12914         if (fprint_ll(f, llmin) < 0)
12915                 exit(3);
12916         if (fprint_ll(f, llmax) < 0)
12917                 exit(4);
12918         if (fclose(f) < 0)
12919                 exit(5);
12920         exit(0);
12921
12922   ;
12923   return 0;
12924 }
12925 _ACEOF
12926 if ac_fn_c_try_run "$LINENO"; then :
12927
12928                         llong_min=`$AWK '{print $1}' conftest.llminmax`
12929                         llong_max=`$AWK '{print $2}' conftest.llminmax`
12930
12931                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_max" >&5
12932 $as_echo "$llong_max" >&6; }
12933
12934 cat >>confdefs.h <<_ACEOF
12935 #define LLONG_MAX ${llong_max}LL
12936 _ACEOF
12937
12938                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for min value of long long" >&5
12939 $as_echo_n "checking for min value of long long... " >&6; }
12940                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_min" >&5
12941 $as_echo "$llong_min" >&6; }
12942
12943 cat >>confdefs.h <<_ACEOF
12944 #define LLONG_MIN ${llong_min}LL
12945 _ACEOF
12946
12947
12948 else
12949
12950                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12951 $as_echo "not found" >&6; }
12952
12953 fi
12954 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12955   conftest.$ac_objext conftest.beam conftest.$ac_ext
12956 fi
12957
12958 fi
12959
12960
12961 # More checks for data types
12962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int type" >&5
12963 $as_echo_n "checking for u_int type... " >&6; }
12964 if ${ac_cv_have_u_int+:} false; then :
12965   $as_echo_n "(cached) " >&6
12966 else
12967
12968         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12969 /* end confdefs.h.  */
12970  #include <sys/types.h>
12971 int
12972 main ()
12973 {
12974  u_int a; a = 1;
12975   ;
12976   return 0;
12977 }
12978 _ACEOF
12979 if ac_fn_c_try_compile "$LINENO"; then :
12980    ac_cv_have_u_int="yes"
12981 else
12982    ac_cv_have_u_int="no"
12983
12984 fi
12985 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12986
12987 fi
12988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int" >&5
12989 $as_echo "$ac_cv_have_u_int" >&6; }
12990 if test "x$ac_cv_have_u_int" = "xyes" ; then
12991
12992 $as_echo "#define HAVE_U_INT 1" >>confdefs.h
12993
12994         have_u_int=1
12995 fi
12996
12997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types" >&5
12998 $as_echo_n "checking for intXX_t types... " >&6; }
12999 if ${ac_cv_have_intxx_t+:} false; then :
13000   $as_echo_n "(cached) " >&6
13001 else
13002
13003         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13004 /* end confdefs.h.  */
13005  #include <sys/types.h>
13006 int
13007 main ()
13008 {
13009  int8_t a; int16_t b; int32_t c; a = b = c = 1;
13010   ;
13011   return 0;
13012 }
13013 _ACEOF
13014 if ac_fn_c_try_compile "$LINENO"; then :
13015    ac_cv_have_intxx_t="yes"
13016 else
13017    ac_cv_have_intxx_t="no"
13018
13019 fi
13020 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13021
13022 fi
13023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_intxx_t" >&5
13024 $as_echo "$ac_cv_have_intxx_t" >&6; }
13025 if test "x$ac_cv_have_intxx_t" = "xyes" ; then
13026
13027 $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
13028
13029         have_intxx_t=1
13030 fi
13031
13032 if (test -z "$have_intxx_t" && \
13033            test "x$ac_cv_header_stdint_h" = "xyes")
13034 then
13035     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types in stdint.h" >&5
13036 $as_echo_n "checking for intXX_t types in stdint.h... " >&6; }
13037         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13038 /* end confdefs.h.  */
13039  #include <stdint.h>
13040 int
13041 main ()
13042 {
13043  int8_t a; int16_t b; int32_t c; a = b = c = 1;
13044   ;
13045   return 0;
13046 }
13047 _ACEOF
13048 if ac_fn_c_try_compile "$LINENO"; then :
13049
13050                         $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
13051
13052                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13053 $as_echo "yes" >&6; }
13054
13055 else
13056    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13057 $as_echo "no" >&6; }
13058
13059 fi
13060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13061 fi
13062
13063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int64_t type" >&5
13064 $as_echo_n "checking for int64_t type... " >&6; }
13065 if ${ac_cv_have_int64_t+:} false; then :
13066   $as_echo_n "(cached) " >&6
13067 else
13068
13069         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13070 /* end confdefs.h.  */
13071
13072 #include <sys/types.h>
13073 #ifdef HAVE_STDINT_H
13074 # include <stdint.h>
13075 #endif
13076 #include <sys/socket.h>
13077 #ifdef HAVE_SYS_BITYPES_H
13078 # include <sys/bitypes.h>
13079 #endif
13080
13081 int
13082 main ()
13083 {
13084
13085 int64_t a; a = 1;
13086
13087   ;
13088   return 0;
13089 }
13090 _ACEOF
13091 if ac_fn_c_try_compile "$LINENO"; then :
13092    ac_cv_have_int64_t="yes"
13093 else
13094    ac_cv_have_int64_t="no"
13095
13096 fi
13097 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13098
13099 fi
13100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_int64_t" >&5
13101 $as_echo "$ac_cv_have_int64_t" >&6; }
13102 if test "x$ac_cv_have_int64_t" = "xyes" ; then
13103
13104 $as_echo "#define HAVE_INT64_T 1" >>confdefs.h
13105
13106 fi
13107
13108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types" >&5
13109 $as_echo_n "checking for u_intXX_t types... " >&6; }
13110 if ${ac_cv_have_u_intxx_t+:} false; then :
13111   $as_echo_n "(cached) " >&6
13112 else
13113
13114         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13115 /* end confdefs.h.  */
13116  #include <sys/types.h>
13117 int
13118 main ()
13119 {
13120  u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
13121   ;
13122   return 0;
13123 }
13124 _ACEOF
13125 if ac_fn_c_try_compile "$LINENO"; then :
13126    ac_cv_have_u_intxx_t="yes"
13127 else
13128    ac_cv_have_u_intxx_t="no"
13129
13130 fi
13131 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13132
13133 fi
13134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_intxx_t" >&5
13135 $as_echo "$ac_cv_have_u_intxx_t" >&6; }
13136 if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
13137
13138 $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
13139
13140         have_u_intxx_t=1
13141 fi
13142
13143 if test -z "$have_u_intxx_t" ; then
13144     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types in sys/socket.h" >&5
13145 $as_echo_n "checking for u_intXX_t types in sys/socket.h... " >&6; }
13146         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13147 /* end confdefs.h.  */
13148  #include <sys/socket.h>
13149 int
13150 main ()
13151 {
13152  u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;
13153   ;
13154   return 0;
13155 }
13156 _ACEOF
13157 if ac_fn_c_try_compile "$LINENO"; then :
13158
13159                         $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
13160
13161                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13162 $as_echo "yes" >&6; }
13163
13164 else
13165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13166 $as_echo "no" >&6; }
13167
13168 fi
13169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13170 fi
13171
13172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t types" >&5
13173 $as_echo_n "checking for u_int64_t types... " >&6; }
13174 if ${ac_cv_have_u_int64_t+:} false; then :
13175   $as_echo_n "(cached) " >&6
13176 else
13177
13178         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13179 /* end confdefs.h.  */
13180  #include <sys/types.h>
13181 int
13182 main ()
13183 {
13184  u_int64_t a; a = 1;
13185   ;
13186   return 0;
13187 }
13188 _ACEOF
13189 if ac_fn_c_try_compile "$LINENO"; then :
13190    ac_cv_have_u_int64_t="yes"
13191 else
13192    ac_cv_have_u_int64_t="no"
13193
13194 fi
13195 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13196
13197 fi
13198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int64_t" >&5
13199 $as_echo "$ac_cv_have_u_int64_t" >&6; }
13200 if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
13201
13202 $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
13203
13204         have_u_int64_t=1
13205 fi
13206
13207 if test -z "$have_u_int64_t" ; then
13208     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t type in sys/bitypes.h" >&5
13209 $as_echo_n "checking for u_int64_t type in sys/bitypes.h... " >&6; }
13210         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13211 /* end confdefs.h.  */
13212  #include <sys/bitypes.h>
13213 int
13214 main ()
13215 {
13216  u_int64_t a; a = 1
13217   ;
13218   return 0;
13219 }
13220 _ACEOF
13221 if ac_fn_c_try_compile "$LINENO"; then :
13222
13223                         $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
13224
13225                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13226 $as_echo "yes" >&6; }
13227
13228 else
13229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13230 $as_echo "no" >&6; }
13231
13232 fi
13233 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13234 fi
13235
13236 if test -z "$have_u_intxx_t" ; then
13237         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types" >&5
13238 $as_echo_n "checking for uintXX_t types... " >&6; }
13239 if ${ac_cv_have_uintxx_t+:} false; then :
13240   $as_echo_n "(cached) " >&6
13241 else
13242
13243                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13244 /* end confdefs.h.  */
13245
13246 #include <sys/types.h>
13247
13248 int
13249 main ()
13250 {
13251
13252         uint8_t a;
13253         uint16_t b;
13254         uint32_t c;
13255         a = b = c = 1;
13256
13257   ;
13258   return 0;
13259 }
13260 _ACEOF
13261 if ac_fn_c_try_compile "$LINENO"; then :
13262    ac_cv_have_uintxx_t="yes"
13263 else
13264    ac_cv_have_uintxx_t="no"
13265
13266 fi
13267 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13268
13269 fi
13270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_uintxx_t" >&5
13271 $as_echo "$ac_cv_have_uintxx_t" >&6; }
13272         if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
13273
13274 $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
13275
13276         fi
13277 fi
13278
13279 if test -z "$have_uintxx_t" ; then
13280     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in stdint.h" >&5
13281 $as_echo_n "checking for uintXX_t types in stdint.h... " >&6; }
13282         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13283 /* end confdefs.h.  */
13284  #include <stdint.h>
13285 int
13286 main ()
13287 {
13288  uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;
13289   ;
13290   return 0;
13291 }
13292 _ACEOF
13293 if ac_fn_c_try_compile "$LINENO"; then :
13294
13295                         $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
13296
13297                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13298 $as_echo "yes" >&6; }
13299
13300 else
13301    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13302 $as_echo "no" >&6; }
13303
13304 fi
13305 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13306 fi
13307
13308 if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
13309            test "x$ac_cv_header_sys_bitypes_h" = "xyes")
13310 then
13311         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
13312 $as_echo_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h... " >&6; }
13313         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13314 /* end confdefs.h.  */
13315
13316 #include <sys/bitypes.h>
13317
13318 int
13319 main ()
13320 {
13321
13322                         int8_t a; int16_t b; int32_t c;
13323                         u_int8_t e; u_int16_t f; u_int32_t g;
13324                         a = b = c = e = f = g = 1;
13325
13326   ;
13327   return 0;
13328 }
13329 _ACEOF
13330 if ac_fn_c_try_compile "$LINENO"; then :
13331
13332                         $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
13333
13334                         $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
13335
13336                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13337 $as_echo "yes" >&6; }
13338
13339 else
13340   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13341 $as_echo "no" >&6; }
13342
13343 fi
13344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13345 fi
13346
13347
13348 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_char" >&5
13349 $as_echo_n "checking for u_char... " >&6; }
13350 if ${ac_cv_have_u_char+:} false; then :
13351   $as_echo_n "(cached) " >&6
13352 else
13353
13354         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13355 /* end confdefs.h.  */
13356  #include <sys/types.h>
13357 int
13358 main ()
13359 {
13360  u_char foo; foo = 125;
13361   ;
13362   return 0;
13363 }
13364 _ACEOF
13365 if ac_fn_c_try_compile "$LINENO"; then :
13366    ac_cv_have_u_char="yes"
13367 else
13368    ac_cv_have_u_char="no"
13369
13370 fi
13371 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13372
13373 fi
13374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_char" >&5
13375 $as_echo "$ac_cv_have_u_char" >&6; }
13376 if test "x$ac_cv_have_u_char" = "xyes" ; then
13377
13378 $as_echo "#define HAVE_U_CHAR 1" >>confdefs.h
13379
13380 fi
13381
13382
13383    ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
13384 #include <sys/socket.h>
13385 "
13386 if test "x$ac_cv_type_socklen_t" = xyes; then :
13387
13388 else
13389
13390       { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
13391 $as_echo_n "checking for socklen_t equivalent... " >&6; }
13392       if ${curl_cv_socklen_t_equiv+:} false; then :
13393   $as_echo_n "(cached) " >&6
13394 else
13395
13396          # Systems have either "struct sockaddr *" or
13397          # "void *" as the second argument to getpeername
13398          curl_cv_socklen_t_equiv=
13399          for arg2 in "struct sockaddr" void; do
13400             for t in int size_t unsigned long "unsigned long"; do
13401                cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13402 /* end confdefs.h.  */
13403
13404                   #include <sys/types.h>
13405                   #include <sys/socket.h>
13406
13407                   int getpeername (int, $arg2 *, $t *);
13408
13409 int
13410 main ()
13411 {
13412
13413                   $t len;
13414                   getpeername(0,0,&len);
13415
13416   ;
13417   return 0;
13418 }
13419 _ACEOF
13420 if ac_fn_c_try_compile "$LINENO"; then :
13421
13422                   curl_cv_socklen_t_equiv="$t"
13423                   break
13424
13425 fi
13426 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13427             done
13428          done
13429
13430          if test "x$curl_cv_socklen_t_equiv" = x; then
13431             as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
13432          fi
13433
13434 fi
13435
13436       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_socklen_t_equiv" >&5
13437 $as_echo "$curl_cv_socklen_t_equiv" >&6; }
13438
13439 cat >>confdefs.h <<_ACEOF
13440 #define socklen_t $curl_cv_socklen_t_equiv
13441 _ACEOF
13442
13443 fi
13444
13445
13446
13447 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
13448 "
13449 if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
13450
13451 cat >>confdefs.h <<_ACEOF
13452 #define HAVE_SIG_ATOMIC_T 1
13453 _ACEOF
13454
13455
13456 fi
13457
13458 ac_fn_c_check_type "$LINENO" "fsblkcnt_t" "ac_cv_type_fsblkcnt_t" "
13459 #include <sys/types.h>
13460 #ifdef HAVE_SYS_BITYPES_H
13461 #include <sys/bitypes.h>
13462 #endif
13463 #ifdef HAVE_SYS_STATFS_H
13464 #include <sys/statfs.h>
13465 #endif
13466 #ifdef HAVE_SYS_STATVFS_H
13467 #include <sys/statvfs.h>
13468 #endif
13469
13470 "
13471 if test "x$ac_cv_type_fsblkcnt_t" = xyes; then :
13472
13473 cat >>confdefs.h <<_ACEOF
13474 #define HAVE_FSBLKCNT_T 1
13475 _ACEOF
13476
13477
13478 fi
13479 ac_fn_c_check_type "$LINENO" "fsfilcnt_t" "ac_cv_type_fsfilcnt_t" "
13480 #include <sys/types.h>
13481 #ifdef HAVE_SYS_BITYPES_H
13482 #include <sys/bitypes.h>
13483 #endif
13484 #ifdef HAVE_SYS_STATFS_H
13485 #include <sys/statfs.h>
13486 #endif
13487 #ifdef HAVE_SYS_STATVFS_H
13488 #include <sys/statvfs.h>
13489 #endif
13490
13491 "
13492 if test "x$ac_cv_type_fsfilcnt_t" = xyes; then :
13493
13494 cat >>confdefs.h <<_ACEOF
13495 #define HAVE_FSFILCNT_T 1
13496 _ACEOF
13497
13498
13499 fi
13500
13501
13502 ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "#include <sys/types.h>
13503 #include <netinet/in.h>
13504 "
13505 if test "x$ac_cv_type_in_addr_t" = xyes; then :
13506
13507 cat >>confdefs.h <<_ACEOF
13508 #define HAVE_IN_ADDR_T 1
13509 _ACEOF
13510
13511
13512 fi
13513 ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "#include <sys/types.h>
13514 #include <netinet/in.h>
13515 "
13516 if test "x$ac_cv_type_in_port_t" = xyes; then :
13517
13518 cat >>confdefs.h <<_ACEOF
13519 #define HAVE_IN_PORT_T 1
13520 _ACEOF
13521
13522
13523 fi
13524
13525
13526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for size_t" >&5
13527 $as_echo_n "checking for size_t... " >&6; }
13528 if ${ac_cv_have_size_t+:} false; then :
13529   $as_echo_n "(cached) " >&6
13530 else
13531
13532         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13533 /* end confdefs.h.  */
13534  #include <sys/types.h>
13535 int
13536 main ()
13537 {
13538  size_t foo; foo = 1235;
13539   ;
13540   return 0;
13541 }
13542 _ACEOF
13543 if ac_fn_c_try_compile "$LINENO"; then :
13544    ac_cv_have_size_t="yes"
13545 else
13546    ac_cv_have_size_t="no"
13547
13548 fi
13549 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13550
13551 fi
13552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t" >&5
13553 $as_echo "$ac_cv_have_size_t" >&6; }
13554 if test "x$ac_cv_have_size_t" = "xyes" ; then
13555
13556 $as_echo "#define HAVE_SIZE_T 1" >>confdefs.h
13557
13558 fi
13559
13560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
13561 $as_echo_n "checking for ssize_t... " >&6; }
13562 if ${ac_cv_have_ssize_t+:} false; then :
13563   $as_echo_n "(cached) " >&6
13564 else
13565
13566         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13567 /* end confdefs.h.  */
13568  #include <sys/types.h>
13569 int
13570 main ()
13571 {
13572  ssize_t foo; foo = 1235;
13573   ;
13574   return 0;
13575 }
13576 _ACEOF
13577 if ac_fn_c_try_compile "$LINENO"; then :
13578    ac_cv_have_ssize_t="yes"
13579 else
13580    ac_cv_have_ssize_t="no"
13581
13582 fi
13583 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13584
13585 fi
13586 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ssize_t" >&5
13587 $as_echo "$ac_cv_have_ssize_t" >&6; }
13588 if test "x$ac_cv_have_ssize_t" = "xyes" ; then
13589
13590 $as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
13591
13592 fi
13593
13594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
13595 $as_echo_n "checking for clock_t... " >&6; }
13596 if ${ac_cv_have_clock_t+:} false; then :
13597   $as_echo_n "(cached) " >&6
13598 else
13599
13600         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13601 /* end confdefs.h.  */
13602  #include <time.h>
13603 int
13604 main ()
13605 {
13606  clock_t foo; foo = 1235;
13607   ;
13608   return 0;
13609 }
13610 _ACEOF
13611 if ac_fn_c_try_compile "$LINENO"; then :
13612    ac_cv_have_clock_t="yes"
13613 else
13614    ac_cv_have_clock_t="no"
13615
13616 fi
13617 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13618
13619 fi
13620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_clock_t" >&5
13621 $as_echo "$ac_cv_have_clock_t" >&6; }
13622 if test "x$ac_cv_have_clock_t" = "xyes" ; then
13623
13624 $as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h
13625
13626 fi
13627
13628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_family_t" >&5
13629 $as_echo_n "checking for sa_family_t... " >&6; }
13630 if ${ac_cv_have_sa_family_t+:} false; then :
13631   $as_echo_n "(cached) " >&6
13632 else
13633
13634         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13635 /* end confdefs.h.  */
13636
13637 #include <sys/types.h>
13638 #include <sys/socket.h>
13639
13640 int
13641 main ()
13642 {
13643  sa_family_t foo; foo = 1235;
13644   ;
13645   return 0;
13646 }
13647 _ACEOF
13648 if ac_fn_c_try_compile "$LINENO"; then :
13649    ac_cv_have_sa_family_t="yes"
13650 else
13651    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13652 /* end confdefs.h.  */
13653
13654 #include <sys/types.h>
13655 #include <sys/socket.h>
13656 #include <netinet/in.h>
13657
13658 int
13659 main ()
13660 {
13661  sa_family_t foo; foo = 1235;
13662   ;
13663   return 0;
13664 }
13665 _ACEOF
13666 if ac_fn_c_try_compile "$LINENO"; then :
13667    ac_cv_have_sa_family_t="yes"
13668 else
13669    ac_cv_have_sa_family_t="no"
13670
13671 fi
13672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13673
13674 fi
13675 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13676
13677 fi
13678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sa_family_t" >&5
13679 $as_echo "$ac_cv_have_sa_family_t" >&6; }
13680 if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
13681
13682 $as_echo "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
13683
13684 fi
13685
13686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pid_t" >&5
13687 $as_echo_n "checking for pid_t... " >&6; }
13688 if ${ac_cv_have_pid_t+:} false; then :
13689   $as_echo_n "(cached) " >&6
13690 else
13691
13692         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13693 /* end confdefs.h.  */
13694  #include <sys/types.h>
13695 int
13696 main ()
13697 {
13698  pid_t foo; foo = 1235;
13699   ;
13700   return 0;
13701 }
13702 _ACEOF
13703 if ac_fn_c_try_compile "$LINENO"; then :
13704    ac_cv_have_pid_t="yes"
13705 else
13706    ac_cv_have_pid_t="no"
13707
13708 fi
13709 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13710
13711 fi
13712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pid_t" >&5
13713 $as_echo "$ac_cv_have_pid_t" >&6; }
13714 if test "x$ac_cv_have_pid_t" = "xyes" ; then
13715
13716 $as_echo "#define HAVE_PID_T 1" >>confdefs.h
13717
13718 fi
13719
13720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mode_t" >&5
13721 $as_echo_n "checking for mode_t... " >&6; }
13722 if ${ac_cv_have_mode_t+:} false; then :
13723   $as_echo_n "(cached) " >&6
13724 else
13725
13726         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13727 /* end confdefs.h.  */
13728  #include <sys/types.h>
13729 int
13730 main ()
13731 {
13732  mode_t foo; foo = 1235;
13733   ;
13734   return 0;
13735 }
13736 _ACEOF
13737 if ac_fn_c_try_compile "$LINENO"; then :
13738    ac_cv_have_mode_t="yes"
13739 else
13740    ac_cv_have_mode_t="no"
13741
13742 fi
13743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13744
13745 fi
13746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_mode_t" >&5
13747 $as_echo "$ac_cv_have_mode_t" >&6; }
13748 if test "x$ac_cv_have_mode_t" = "xyes" ; then
13749
13750 $as_echo "#define HAVE_MODE_T 1" >>confdefs.h
13751
13752 fi
13753
13754
13755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
13756 $as_echo_n "checking for struct sockaddr_storage... " >&6; }
13757 if ${ac_cv_have_struct_sockaddr_storage+:} false; then :
13758   $as_echo_n "(cached) " >&6
13759 else
13760
13761         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13762 /* end confdefs.h.  */
13763
13764 #include <sys/types.h>
13765 #include <sys/socket.h>
13766
13767 int
13768 main ()
13769 {
13770  struct sockaddr_storage s;
13771   ;
13772   return 0;
13773 }
13774 _ACEOF
13775 if ac_fn_c_try_compile "$LINENO"; then :
13776    ac_cv_have_struct_sockaddr_storage="yes"
13777 else
13778    ac_cv_have_struct_sockaddr_storage="no"
13779
13780 fi
13781 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13782
13783 fi
13784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_storage" >&5
13785 $as_echo "$ac_cv_have_struct_sockaddr_storage" >&6; }
13786 if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
13787
13788 $as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
13789
13790 fi
13791
13792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6" >&5
13793 $as_echo_n "checking for struct sockaddr_in6... " >&6; }
13794 if ${ac_cv_have_struct_sockaddr_in6+:} false; then :
13795   $as_echo_n "(cached) " >&6
13796 else
13797
13798         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13799 /* end confdefs.h.  */
13800
13801 #include <sys/types.h>
13802 #include <netinet/in.h>
13803
13804 int
13805 main ()
13806 {
13807  struct sockaddr_in6 s; s.sin6_family = 0;
13808   ;
13809   return 0;
13810 }
13811 _ACEOF
13812 if ac_fn_c_try_compile "$LINENO"; then :
13813    ac_cv_have_struct_sockaddr_in6="yes"
13814 else
13815    ac_cv_have_struct_sockaddr_in6="no"
13816
13817 fi
13818 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13819
13820 fi
13821 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_in6" >&5
13822 $as_echo "$ac_cv_have_struct_sockaddr_in6" >&6; }
13823 if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
13824
13825 $as_echo "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h
13826
13827 fi
13828
13829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct in6_addr" >&5
13830 $as_echo_n "checking for struct in6_addr... " >&6; }
13831 if ${ac_cv_have_struct_in6_addr+:} false; then :
13832   $as_echo_n "(cached) " >&6
13833 else
13834
13835         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13836 /* end confdefs.h.  */
13837
13838 #include <sys/types.h>
13839 #include <netinet/in.h>
13840
13841 int
13842 main ()
13843 {
13844  struct in6_addr s; s.s6_addr[0] = 0;
13845   ;
13846   return 0;
13847 }
13848 _ACEOF
13849 if ac_fn_c_try_compile "$LINENO"; then :
13850    ac_cv_have_struct_in6_addr="yes"
13851 else
13852    ac_cv_have_struct_in6_addr="no"
13853
13854 fi
13855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13856
13857 fi
13858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_in6_addr" >&5
13859 $as_echo "$ac_cv_have_struct_in6_addr" >&6; }
13860 if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
13861
13862 $as_echo "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h
13863
13864
13865         ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "
13866 #ifdef HAVE_SYS_TYPES_H
13867 #include <sys/types.h>
13868 #endif
13869 #include <netinet/in.h>
13870
13871 "
13872 if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes; then :
13873
13874 cat >>confdefs.h <<_ACEOF
13875 #define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
13876 _ACEOF
13877
13878
13879 fi
13880
13881 fi
13882
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct addrinfo" >&5
13884 $as_echo_n "checking for struct addrinfo... " >&6; }
13885 if ${ac_cv_have_struct_addrinfo+:} false; then :
13886   $as_echo_n "(cached) " >&6
13887 else
13888
13889         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13890 /* end confdefs.h.  */
13891
13892 #include <sys/types.h>
13893 #include <sys/socket.h>
13894 #include <netdb.h>
13895
13896 int
13897 main ()
13898 {
13899  struct addrinfo s; s.ai_flags = AI_PASSIVE;
13900   ;
13901   return 0;
13902 }
13903 _ACEOF
13904 if ac_fn_c_try_compile "$LINENO"; then :
13905    ac_cv_have_struct_addrinfo="yes"
13906 else
13907    ac_cv_have_struct_addrinfo="no"
13908
13909 fi
13910 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13911
13912 fi
13913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_addrinfo" >&5
13914 $as_echo "$ac_cv_have_struct_addrinfo" >&6; }
13915 if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
13916
13917 $as_echo "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
13918
13919 fi
13920
13921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
13922 $as_echo_n "checking for struct timeval... " >&6; }
13923 if ${ac_cv_have_struct_timeval+:} false; then :
13924   $as_echo_n "(cached) " >&6
13925 else
13926
13927         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13928 /* end confdefs.h.  */
13929  #include <sys/time.h>
13930 int
13931 main ()
13932 {
13933  struct timeval tv; tv.tv_sec = 1;
13934   ;
13935   return 0;
13936 }
13937 _ACEOF
13938 if ac_fn_c_try_compile "$LINENO"; then :
13939    ac_cv_have_struct_timeval="yes"
13940 else
13941    ac_cv_have_struct_timeval="no"
13942
13943 fi
13944 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13945
13946 fi
13947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_timeval" >&5
13948 $as_echo "$ac_cv_have_struct_timeval" >&6; }
13949 if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
13950
13951 $as_echo "#define HAVE_STRUCT_TIMEVAL 1" >>confdefs.h
13952
13953         have_struct_timeval=1
13954 fi
13955
13956 ac_fn_c_check_type "$LINENO" "struct timespec" "ac_cv_type_struct_timespec" "$ac_includes_default"
13957 if test "x$ac_cv_type_struct_timespec" = xyes; then :
13958
13959 cat >>confdefs.h <<_ACEOF
13960 #define HAVE_STRUCT_TIMESPEC 1
13961 _ACEOF
13962
13963
13964 fi
13965
13966
13967 # We need int64_t or else certian parts of the compile will fail.
13968 if test "x$ac_cv_have_int64_t" = "xno" && \
13969         test "x$ac_cv_sizeof_long_int" != "x8" && \
13970         test "x$ac_cv_sizeof_long_long_int" = "x0" ; then
13971         echo "OpenSSH requires int64_t support.  Contact your vendor or install"
13972         echo "an alternative compiler (I.E., GCC) before continuing."
13973         echo ""
13974         exit 1;
13975 else
13976         if test "$cross_compiling" = yes; then :
13977   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
13978 $as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
13979
13980 else
13981   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13982 /* end confdefs.h.  */
13983
13984 #include <stdio.h>
13985 #include <string.h>
13986 #ifdef HAVE_SNPRINTF
13987 main()
13988 {
13989         char buf[50];
13990         char expected_out[50];
13991         int mazsize = 50 ;
13992 #if (SIZEOF_LONG_INT == 8)
13993         long int num = 0x7fffffffffffffff;
13994 #else
13995         long long num = 0x7fffffffffffffffll;
13996 #endif
13997         strcpy(expected_out, "9223372036854775807");
13998         snprintf(buf, mazsize, "%lld", num);
13999         if(strcmp(buf, expected_out) != 0)
14000                 exit(1);
14001         exit(0);
14002 }
14003 #else
14004 main() { exit(0); }
14005 #endif
14006
14007 _ACEOF
14008 if ac_fn_c_try_run "$LINENO"; then :
14009    true
14010 else
14011    $as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
14012
14013 fi
14014 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14015   conftest.$ac_objext conftest.beam conftest.$ac_ext
14016 fi
14017
14018 fi
14019
14020
14021 # look for field 'ut_host' in header 'utmp.h'
14022                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14023                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
14024         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmp.h" >&5
14025 $as_echo_n "checking for ut_host field in utmp.h... " >&6; }
14026         if eval \${$ossh_varname+:} false; then :
14027   $as_echo_n "(cached) " >&6
14028 else
14029
14030                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14031 /* end confdefs.h.  */
14032 #include <utmp.h>
14033
14034 _ACEOF
14035 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14036   $EGREP "ut_host" >/dev/null 2>&1; then :
14037                         eval "$ossh_varname=yes"
14038 else
14039                         eval "$ossh_varname=no"
14040 fi
14041 rm -f conftest*
14042
14043 fi
14044
14045         ossh_result=`eval 'echo $'"$ossh_varname"`
14046         if test -n "`echo $ossh_varname`"; then
14047                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14048 $as_echo "$ossh_result" >&6; }
14049                 if test "x$ossh_result" = "xyes"; then
14050
14051 $as_echo "#define HAVE_HOST_IN_UTMP 1" >>confdefs.h
14052
14053                 fi
14054         else
14055                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14056 $as_echo "no" >&6; }
14057         fi
14058
14059
14060 # look for field 'ut_host' in header 'utmpx.h'
14061                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14062                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
14063         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmpx.h" >&5
14064 $as_echo_n "checking for ut_host field in utmpx.h... " >&6; }
14065         if eval \${$ossh_varname+:} false; then :
14066   $as_echo_n "(cached) " >&6
14067 else
14068
14069                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14070 /* end confdefs.h.  */
14071 #include <utmpx.h>
14072
14073 _ACEOF
14074 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14075   $EGREP "ut_host" >/dev/null 2>&1; then :
14076                         eval "$ossh_varname=yes"
14077 else
14078                         eval "$ossh_varname=no"
14079 fi
14080 rm -f conftest*
14081
14082 fi
14083
14084         ossh_result=`eval 'echo $'"$ossh_varname"`
14085         if test -n "`echo $ossh_varname`"; then
14086                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14087 $as_echo "$ossh_result" >&6; }
14088                 if test "x$ossh_result" = "xyes"; then
14089
14090 $as_echo "#define HAVE_HOST_IN_UTMPX 1" >>confdefs.h
14091
14092                 fi
14093         else
14094                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14095 $as_echo "no" >&6; }
14096         fi
14097
14098
14099 # look for field 'syslen' in header 'utmpx.h'
14100                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14101                 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
14102         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for syslen field in utmpx.h" >&5
14103 $as_echo_n "checking for syslen field in utmpx.h... " >&6; }
14104         if eval \${$ossh_varname+:} false; then :
14105   $as_echo_n "(cached) " >&6
14106 else
14107
14108                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14109 /* end confdefs.h.  */
14110 #include <utmpx.h>
14111
14112 _ACEOF
14113 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14114   $EGREP "syslen" >/dev/null 2>&1; then :
14115                         eval "$ossh_varname=yes"
14116 else
14117                         eval "$ossh_varname=no"
14118 fi
14119 rm -f conftest*
14120
14121 fi
14122
14123         ossh_result=`eval 'echo $'"$ossh_varname"`
14124         if test -n "`echo $ossh_varname`"; then
14125                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14126 $as_echo "$ossh_result" >&6; }
14127                 if test "x$ossh_result" = "xyes"; then
14128
14129 $as_echo "#define HAVE_SYSLEN_IN_UTMPX 1" >>confdefs.h
14130
14131                 fi
14132         else
14133                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14134 $as_echo "no" >&6; }
14135         fi
14136
14137
14138 # look for field 'ut_pid' in header 'utmp.h'
14139                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14140                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
14141         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_pid field in utmp.h" >&5
14142 $as_echo_n "checking for ut_pid field in utmp.h... " >&6; }
14143         if eval \${$ossh_varname+:} false; then :
14144   $as_echo_n "(cached) " >&6
14145 else
14146
14147                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14148 /* end confdefs.h.  */
14149 #include <utmp.h>
14150
14151 _ACEOF
14152 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14153   $EGREP "ut_pid" >/dev/null 2>&1; then :
14154                         eval "$ossh_varname=yes"
14155 else
14156                         eval "$ossh_varname=no"
14157 fi
14158 rm -f conftest*
14159
14160 fi
14161
14162         ossh_result=`eval 'echo $'"$ossh_varname"`
14163         if test -n "`echo $ossh_varname`"; then
14164                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14165 $as_echo "$ossh_result" >&6; }
14166                 if test "x$ossh_result" = "xyes"; then
14167
14168 $as_echo "#define HAVE_PID_IN_UTMP 1" >>confdefs.h
14169
14170                 fi
14171         else
14172                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14173 $as_echo "no" >&6; }
14174         fi
14175
14176
14177 # look for field 'ut_type' in header 'utmp.h'
14178                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14179                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
14180         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmp.h" >&5
14181 $as_echo_n "checking for ut_type field in utmp.h... " >&6; }
14182         if eval \${$ossh_varname+:} false; then :
14183   $as_echo_n "(cached) " >&6
14184 else
14185
14186                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14187 /* end confdefs.h.  */
14188 #include <utmp.h>
14189
14190 _ACEOF
14191 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14192   $EGREP "ut_type" >/dev/null 2>&1; then :
14193                         eval "$ossh_varname=yes"
14194 else
14195                         eval "$ossh_varname=no"
14196 fi
14197 rm -f conftest*
14198
14199 fi
14200
14201         ossh_result=`eval 'echo $'"$ossh_varname"`
14202         if test -n "`echo $ossh_varname`"; then
14203                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14204 $as_echo "$ossh_result" >&6; }
14205                 if test "x$ossh_result" = "xyes"; then
14206
14207 $as_echo "#define HAVE_TYPE_IN_UTMP 1" >>confdefs.h
14208
14209                 fi
14210         else
14211                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14212 $as_echo "no" >&6; }
14213         fi
14214
14215
14216 # look for field 'ut_type' in header 'utmpx.h'
14217                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14218                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
14219         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmpx.h" >&5
14220 $as_echo_n "checking for ut_type field in utmpx.h... " >&6; }
14221         if eval \${$ossh_varname+:} false; then :
14222   $as_echo_n "(cached) " >&6
14223 else
14224
14225                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14226 /* end confdefs.h.  */
14227 #include <utmpx.h>
14228
14229 _ACEOF
14230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14231   $EGREP "ut_type" >/dev/null 2>&1; then :
14232                         eval "$ossh_varname=yes"
14233 else
14234                         eval "$ossh_varname=no"
14235 fi
14236 rm -f conftest*
14237
14238 fi
14239
14240         ossh_result=`eval 'echo $'"$ossh_varname"`
14241         if test -n "`echo $ossh_varname`"; then
14242                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14243 $as_echo "$ossh_result" >&6; }
14244                 if test "x$ossh_result" = "xyes"; then
14245
14246 $as_echo "#define HAVE_TYPE_IN_UTMPX 1" >>confdefs.h
14247
14248                 fi
14249         else
14250                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14251 $as_echo "no" >&6; }
14252         fi
14253
14254
14255 # look for field 'ut_tv' in header 'utmp.h'
14256                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14257                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
14258         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmp.h" >&5
14259 $as_echo_n "checking for ut_tv field in utmp.h... " >&6; }
14260         if eval \${$ossh_varname+:} false; then :
14261   $as_echo_n "(cached) " >&6
14262 else
14263
14264                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14265 /* end confdefs.h.  */
14266 #include <utmp.h>
14267
14268 _ACEOF
14269 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14270   $EGREP "ut_tv" >/dev/null 2>&1; then :
14271                         eval "$ossh_varname=yes"
14272 else
14273                         eval "$ossh_varname=no"
14274 fi
14275 rm -f conftest*
14276
14277 fi
14278
14279         ossh_result=`eval 'echo $'"$ossh_varname"`
14280         if test -n "`echo $ossh_varname`"; then
14281                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14282 $as_echo "$ossh_result" >&6; }
14283                 if test "x$ossh_result" = "xyes"; then
14284
14285 $as_echo "#define HAVE_TV_IN_UTMP 1" >>confdefs.h
14286
14287                 fi
14288         else
14289                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14290 $as_echo "no" >&6; }
14291         fi
14292
14293
14294 # look for field 'ut_id' in header 'utmp.h'
14295                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14296                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
14297         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmp.h" >&5
14298 $as_echo_n "checking for ut_id field in utmp.h... " >&6; }
14299         if eval \${$ossh_varname+:} false; then :
14300   $as_echo_n "(cached) " >&6
14301 else
14302
14303                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14304 /* end confdefs.h.  */
14305 #include <utmp.h>
14306
14307 _ACEOF
14308 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14309   $EGREP "ut_id" >/dev/null 2>&1; then :
14310                         eval "$ossh_varname=yes"
14311 else
14312                         eval "$ossh_varname=no"
14313 fi
14314 rm -f conftest*
14315
14316 fi
14317
14318         ossh_result=`eval 'echo $'"$ossh_varname"`
14319         if test -n "`echo $ossh_varname`"; then
14320                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14321 $as_echo "$ossh_result" >&6; }
14322                 if test "x$ossh_result" = "xyes"; then
14323
14324 $as_echo "#define HAVE_ID_IN_UTMP 1" >>confdefs.h
14325
14326                 fi
14327         else
14328                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14329 $as_echo "no" >&6; }
14330         fi
14331
14332
14333 # look for field 'ut_id' in header 'utmpx.h'
14334                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14335                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
14336         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmpx.h" >&5
14337 $as_echo_n "checking for ut_id field in utmpx.h... " >&6; }
14338         if eval \${$ossh_varname+:} false; then :
14339   $as_echo_n "(cached) " >&6
14340 else
14341
14342                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14343 /* end confdefs.h.  */
14344 #include <utmpx.h>
14345
14346 _ACEOF
14347 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14348   $EGREP "ut_id" >/dev/null 2>&1; then :
14349                         eval "$ossh_varname=yes"
14350 else
14351                         eval "$ossh_varname=no"
14352 fi
14353 rm -f conftest*
14354
14355 fi
14356
14357         ossh_result=`eval 'echo $'"$ossh_varname"`
14358         if test -n "`echo $ossh_varname`"; then
14359                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14360 $as_echo "$ossh_result" >&6; }
14361                 if test "x$ossh_result" = "xyes"; then
14362
14363 $as_echo "#define HAVE_ID_IN_UTMPX 1" >>confdefs.h
14364
14365                 fi
14366         else
14367                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14368 $as_echo "no" >&6; }
14369         fi
14370
14371
14372 # look for field 'ut_addr' in header 'utmp.h'
14373                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14374                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
14375         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmp.h" >&5
14376 $as_echo_n "checking for ut_addr field in utmp.h... " >&6; }
14377         if eval \${$ossh_varname+:} false; then :
14378   $as_echo_n "(cached) " >&6
14379 else
14380
14381                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14382 /* end confdefs.h.  */
14383 #include <utmp.h>
14384
14385 _ACEOF
14386 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14387   $EGREP "ut_addr" >/dev/null 2>&1; then :
14388                         eval "$ossh_varname=yes"
14389 else
14390                         eval "$ossh_varname=no"
14391 fi
14392 rm -f conftest*
14393
14394 fi
14395
14396         ossh_result=`eval 'echo $'"$ossh_varname"`
14397         if test -n "`echo $ossh_varname`"; then
14398                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14399 $as_echo "$ossh_result" >&6; }
14400                 if test "x$ossh_result" = "xyes"; then
14401
14402 $as_echo "#define HAVE_ADDR_IN_UTMP 1" >>confdefs.h
14403
14404                 fi
14405         else
14406                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14407 $as_echo "no" >&6; }
14408         fi
14409
14410
14411 # look for field 'ut_addr' in header 'utmpx.h'
14412                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14413                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
14414         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmpx.h" >&5
14415 $as_echo_n "checking for ut_addr field in utmpx.h... " >&6; }
14416         if eval \${$ossh_varname+:} false; then :
14417   $as_echo_n "(cached) " >&6
14418 else
14419
14420                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14421 /* end confdefs.h.  */
14422 #include <utmpx.h>
14423
14424 _ACEOF
14425 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14426   $EGREP "ut_addr" >/dev/null 2>&1; then :
14427                         eval "$ossh_varname=yes"
14428 else
14429                         eval "$ossh_varname=no"
14430 fi
14431 rm -f conftest*
14432
14433 fi
14434
14435         ossh_result=`eval 'echo $'"$ossh_varname"`
14436         if test -n "`echo $ossh_varname`"; then
14437                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14438 $as_echo "$ossh_result" >&6; }
14439                 if test "x$ossh_result" = "xyes"; then
14440
14441 $as_echo "#define HAVE_ADDR_IN_UTMPX 1" >>confdefs.h
14442
14443                 fi
14444         else
14445                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14446 $as_echo "no" >&6; }
14447         fi
14448
14449
14450 # look for field 'ut_addr_v6' in header 'utmp.h'
14451                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14452                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
14453         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmp.h" >&5
14454 $as_echo_n "checking for ut_addr_v6 field in utmp.h... " >&6; }
14455         if eval \${$ossh_varname+:} false; then :
14456   $as_echo_n "(cached) " >&6
14457 else
14458
14459                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14460 /* end confdefs.h.  */
14461 #include <utmp.h>
14462
14463 _ACEOF
14464 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14465   $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
14466                         eval "$ossh_varname=yes"
14467 else
14468                         eval "$ossh_varname=no"
14469 fi
14470 rm -f conftest*
14471
14472 fi
14473
14474         ossh_result=`eval 'echo $'"$ossh_varname"`
14475         if test -n "`echo $ossh_varname`"; then
14476                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14477 $as_echo "$ossh_result" >&6; }
14478                 if test "x$ossh_result" = "xyes"; then
14479
14480 $as_echo "#define HAVE_ADDR_V6_IN_UTMP 1" >>confdefs.h
14481
14482                 fi
14483         else
14484                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14485 $as_echo "no" >&6; }
14486         fi
14487
14488
14489 # look for field 'ut_addr_v6' in header 'utmpx.h'
14490                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14491                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
14492         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmpx.h" >&5
14493 $as_echo_n "checking for ut_addr_v6 field in utmpx.h... " >&6; }
14494         if eval \${$ossh_varname+:} false; then :
14495   $as_echo_n "(cached) " >&6
14496 else
14497
14498                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14499 /* end confdefs.h.  */
14500 #include <utmpx.h>
14501
14502 _ACEOF
14503 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14504   $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
14505                         eval "$ossh_varname=yes"
14506 else
14507                         eval "$ossh_varname=no"
14508 fi
14509 rm -f conftest*
14510
14511 fi
14512
14513         ossh_result=`eval 'echo $'"$ossh_varname"`
14514         if test -n "`echo $ossh_varname`"; then
14515                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14516 $as_echo "$ossh_result" >&6; }
14517                 if test "x$ossh_result" = "xyes"; then
14518
14519 $as_echo "#define HAVE_ADDR_V6_IN_UTMPX 1" >>confdefs.h
14520
14521                 fi
14522         else
14523                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14524 $as_echo "no" >&6; }
14525         fi
14526
14527
14528 # look for field 'ut_exit' in header 'utmp.h'
14529                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14530                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
14531         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_exit field in utmp.h" >&5
14532 $as_echo_n "checking for ut_exit field in utmp.h... " >&6; }
14533         if eval \${$ossh_varname+:} false; then :
14534   $as_echo_n "(cached) " >&6
14535 else
14536
14537                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14538 /* end confdefs.h.  */
14539 #include <utmp.h>
14540
14541 _ACEOF
14542 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14543   $EGREP "ut_exit" >/dev/null 2>&1; then :
14544                         eval "$ossh_varname=yes"
14545 else
14546                         eval "$ossh_varname=no"
14547 fi
14548 rm -f conftest*
14549
14550 fi
14551
14552         ossh_result=`eval 'echo $'"$ossh_varname"`
14553         if test -n "`echo $ossh_varname`"; then
14554                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14555 $as_echo "$ossh_result" >&6; }
14556                 if test "x$ossh_result" = "xyes"; then
14557
14558 $as_echo "#define HAVE_EXIT_IN_UTMP 1" >>confdefs.h
14559
14560                 fi
14561         else
14562                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14563 $as_echo "no" >&6; }
14564         fi
14565
14566
14567 # look for field 'ut_time' in header 'utmp.h'
14568                 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
14569                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
14570         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmp.h" >&5
14571 $as_echo_n "checking for ut_time field in utmp.h... " >&6; }
14572         if eval \${$ossh_varname+:} false; then :
14573   $as_echo_n "(cached) " >&6
14574 else
14575
14576                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14577 /* end confdefs.h.  */
14578 #include <utmp.h>
14579
14580 _ACEOF
14581 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14582   $EGREP "ut_time" >/dev/null 2>&1; then :
14583                         eval "$ossh_varname=yes"
14584 else
14585                         eval "$ossh_varname=no"
14586 fi
14587 rm -f conftest*
14588
14589 fi
14590
14591         ossh_result=`eval 'echo $'"$ossh_varname"`
14592         if test -n "`echo $ossh_varname`"; then
14593                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14594 $as_echo "$ossh_result" >&6; }
14595                 if test "x$ossh_result" = "xyes"; then
14596
14597 $as_echo "#define HAVE_TIME_IN_UTMP 1" >>confdefs.h
14598
14599                 fi
14600         else
14601                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14602 $as_echo "no" >&6; }
14603         fi
14604
14605
14606 # look for field 'ut_time' in header 'utmpx.h'
14607                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14608                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
14609         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmpx.h" >&5
14610 $as_echo_n "checking for ut_time field in utmpx.h... " >&6; }
14611         if eval \${$ossh_varname+:} false; then :
14612   $as_echo_n "(cached) " >&6
14613 else
14614
14615                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14616 /* end confdefs.h.  */
14617 #include <utmpx.h>
14618
14619 _ACEOF
14620 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14621   $EGREP "ut_time" >/dev/null 2>&1; then :
14622                         eval "$ossh_varname=yes"
14623 else
14624                         eval "$ossh_varname=no"
14625 fi
14626 rm -f conftest*
14627
14628 fi
14629
14630         ossh_result=`eval 'echo $'"$ossh_varname"`
14631         if test -n "`echo $ossh_varname`"; then
14632                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14633 $as_echo "$ossh_result" >&6; }
14634                 if test "x$ossh_result" = "xyes"; then
14635
14636 $as_echo "#define HAVE_TIME_IN_UTMPX 1" >>confdefs.h
14637
14638                 fi
14639         else
14640                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14641 $as_echo "no" >&6; }
14642         fi
14643
14644
14645 # look for field 'ut_tv' in header 'utmpx.h'
14646                 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
14647                 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
14648         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmpx.h" >&5
14649 $as_echo_n "checking for ut_tv field in utmpx.h... " >&6; }
14650         if eval \${$ossh_varname+:} false; then :
14651   $as_echo_n "(cached) " >&6
14652 else
14653
14654                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14655 /* end confdefs.h.  */
14656 #include <utmpx.h>
14657
14658 _ACEOF
14659 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14660   $EGREP "ut_tv" >/dev/null 2>&1; then :
14661                         eval "$ossh_varname=yes"
14662 else
14663                         eval "$ossh_varname=no"
14664 fi
14665 rm -f conftest*
14666
14667 fi
14668
14669         ossh_result=`eval 'echo $'"$ossh_varname"`
14670         if test -n "`echo $ossh_varname`"; then
14671                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
14672 $as_echo "$ossh_result" >&6; }
14673                 if test "x$ossh_result" = "xyes"; then
14674
14675 $as_echo "#define HAVE_TV_IN_UTMPX 1" >>confdefs.h
14676
14677                 fi
14678         else
14679                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14680 $as_echo "no" >&6; }
14681         fi
14682
14683
14684 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
14685 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
14686
14687 cat >>confdefs.h <<_ACEOF
14688 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
14689 _ACEOF
14690
14691
14692 fi
14693
14694 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_gecos" "ac_cv_member_struct_passwd_pw_gecos" "
14695 #include <sys/types.h>
14696 #include <pwd.h>
14697
14698 "
14699 if test "x$ac_cv_member_struct_passwd_pw_gecos" = xyes; then :
14700
14701 cat >>confdefs.h <<_ACEOF
14702 #define HAVE_STRUCT_PASSWD_PW_GECOS 1
14703 _ACEOF
14704
14705
14706 fi
14707 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_class" "ac_cv_member_struct_passwd_pw_class" "
14708 #include <sys/types.h>
14709 #include <pwd.h>
14710
14711 "
14712 if test "x$ac_cv_member_struct_passwd_pw_class" = xyes; then :
14713
14714 cat >>confdefs.h <<_ACEOF
14715 #define HAVE_STRUCT_PASSWD_PW_CLASS 1
14716 _ACEOF
14717
14718
14719 fi
14720 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_change" "ac_cv_member_struct_passwd_pw_change" "
14721 #include <sys/types.h>
14722 #include <pwd.h>
14723
14724 "
14725 if test "x$ac_cv_member_struct_passwd_pw_change" = xyes; then :
14726
14727 cat >>confdefs.h <<_ACEOF
14728 #define HAVE_STRUCT_PASSWD_PW_CHANGE 1
14729 _ACEOF
14730
14731
14732 fi
14733 ac_fn_c_check_member "$LINENO" "struct passwd" "pw_expire" "ac_cv_member_struct_passwd_pw_expire" "
14734 #include <sys/types.h>
14735 #include <pwd.h>
14736
14737 "
14738 if test "x$ac_cv_member_struct_passwd_pw_expire" = xyes; then :
14739
14740 cat >>confdefs.h <<_ACEOF
14741 #define HAVE_STRUCT_PASSWD_PW_EXPIRE 1
14742 _ACEOF
14743
14744
14745 fi
14746
14747
14748 ac_fn_c_check_member "$LINENO" "struct __res_state" "retrans" "ac_cv_member_struct___res_state_retrans" "
14749 #include <stdio.h>
14750 #if HAVE_SYS_TYPES_H
14751 # include <sys/types.h>
14752 #endif
14753 #include <netinet/in.h>
14754 #include <arpa/nameser.h>
14755 #include <resolv.h>
14756
14757 "
14758 if test "x$ac_cv_member_struct___res_state_retrans" = xyes; then :
14759
14760 else
14761
14762 $as_echo "#define __res_state state" >>confdefs.h
14763
14764 fi
14765
14766
14767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ss_family field in struct sockaddr_storage" >&5
14768 $as_echo_n "checking for ss_family field in struct sockaddr_storage... " >&6; }
14769 if ${ac_cv_have_ss_family_in_struct_ss+:} false; then :
14770   $as_echo_n "(cached) " >&6
14771 else
14772
14773         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14774 /* end confdefs.h.  */
14775
14776 #include <sys/types.h>
14777 #include <sys/socket.h>
14778
14779 int
14780 main ()
14781 {
14782  struct sockaddr_storage s; s.ss_family = 1;
14783   ;
14784   return 0;
14785 }
14786 _ACEOF
14787 if ac_fn_c_try_compile "$LINENO"; then :
14788    ac_cv_have_ss_family_in_struct_ss="yes"
14789 else
14790    ac_cv_have_ss_family_in_struct_ss="no"
14791 fi
14792 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14793
14794 fi
14795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ss_family_in_struct_ss" >&5
14796 $as_echo "$ac_cv_have_ss_family_in_struct_ss" >&6; }
14797 if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
14798
14799 $as_echo "#define HAVE_SS_FAMILY_IN_SS 1" >>confdefs.h
14800
14801 fi
14802
14803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __ss_family field in struct sockaddr_storage" >&5
14804 $as_echo_n "checking for __ss_family field in struct sockaddr_storage... " >&6; }
14805 if ${ac_cv_have___ss_family_in_struct_ss+:} false; then :
14806   $as_echo_n "(cached) " >&6
14807 else
14808
14809         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14810 /* end confdefs.h.  */
14811
14812 #include <sys/types.h>
14813 #include <sys/socket.h>
14814
14815 int
14816 main ()
14817 {
14818  struct sockaddr_storage s; s.__ss_family = 1;
14819   ;
14820   return 0;
14821 }
14822 _ACEOF
14823 if ac_fn_c_try_compile "$LINENO"; then :
14824    ac_cv_have___ss_family_in_struct_ss="yes"
14825 else
14826    ac_cv_have___ss_family_in_struct_ss="no"
14827
14828 fi
14829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14830
14831 fi
14832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___ss_family_in_struct_ss" >&5
14833 $as_echo "$ac_cv_have___ss_family_in_struct_ss" >&6; }
14834 if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
14835
14836 $as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
14837
14838 fi
14839
14840 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_accrights field in struct msghdr" >&5
14841 $as_echo_n "checking for msg_accrights field in struct msghdr... " >&6; }
14842 if ${ac_cv_have_accrights_in_msghdr+:} false; then :
14843   $as_echo_n "(cached) " >&6
14844 else
14845
14846         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14847 /* end confdefs.h.  */
14848
14849 #include <sys/types.h>
14850 #include <sys/socket.h>
14851 #include <sys/uio.h>
14852
14853 int
14854 main ()
14855 {
14856
14857 #ifdef msg_accrights
14858 #error "msg_accrights is a macro"
14859 exit(1);
14860 #endif
14861 struct msghdr m;
14862 m.msg_accrights = 0;
14863 exit(0);
14864
14865   ;
14866   return 0;
14867 }
14868 _ACEOF
14869 if ac_fn_c_try_compile "$LINENO"; then :
14870    ac_cv_have_accrights_in_msghdr="yes"
14871 else
14872    ac_cv_have_accrights_in_msghdr="no"
14873
14874 fi
14875 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14876
14877 fi
14878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_accrights_in_msghdr" >&5
14879 $as_echo "$ac_cv_have_accrights_in_msghdr" >&6; }
14880 if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
14881
14882 $as_echo "#define HAVE_ACCRIGHTS_IN_MSGHDR 1" >>confdefs.h
14883
14884 fi
14885
14886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct statvfs.f_fsid is integral type" >&5
14887 $as_echo_n "checking if struct statvfs.f_fsid is integral type... " >&6; }
14888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14889 /* end confdefs.h.  */
14890
14891 #include <sys/param.h>
14892 #include <sys/stat.h>
14893 #ifdef HAVE_SYS_TIME_H
14894 # include <sys/time.h>
14895 #endif
14896 #ifdef HAVE_SYS_MOUNT_H
14897 #include <sys/mount.h>
14898 #endif
14899 #ifdef HAVE_SYS_STATVFS_H
14900 #include <sys/statvfs.h>
14901 #endif
14902
14903 int
14904 main ()
14905 {
14906  struct statvfs s; s.f_fsid = 0;
14907   ;
14908   return 0;
14909 }
14910 _ACEOF
14911 if ac_fn_c_try_compile "$LINENO"; then :
14912    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14913 $as_echo "yes" >&6; }
14914 else
14915    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14916 $as_echo "no" >&6; }
14917
14918         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fsid_t has member val" >&5
14919 $as_echo_n "checking if fsid_t has member val... " >&6; }
14920         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14921 /* end confdefs.h.  */
14922
14923 #include <sys/types.h>
14924 #include <sys/statvfs.h>
14925
14926 int
14927 main ()
14928 {
14929  fsid_t t; t.val[0] = 0;
14930   ;
14931   return 0;
14932 }
14933 _ACEOF
14934 if ac_fn_c_try_compile "$LINENO"; then :
14935    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14936 $as_echo "yes" >&6; }
14937
14938 $as_echo "#define FSID_HAS_VAL 1" >>confdefs.h
14939
14940 else
14941    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14942 $as_echo "no" >&6; }
14943 fi
14944 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14945
14946         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if f_fsid has member __val" >&5
14947 $as_echo_n "checking if f_fsid has member __val... " >&6; }
14948         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14949 /* end confdefs.h.  */
14950
14951 #include <sys/types.h>
14952 #include <sys/statvfs.h>
14953
14954 int
14955 main ()
14956 {
14957  fsid_t t; t.__val[0] = 0;
14958   ;
14959   return 0;
14960 }
14961 _ACEOF
14962 if ac_fn_c_try_compile "$LINENO"; then :
14963    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14964 $as_echo "yes" >&6; }
14965
14966 $as_echo "#define FSID_HAS___VAL 1" >>confdefs.h
14967
14968 else
14969    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14970 $as_echo "no" >&6; }
14971 fi
14972 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14973
14974 fi
14975 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14976
14977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_control field in struct msghdr" >&5
14978 $as_echo_n "checking for msg_control field in struct msghdr... " >&6; }
14979 if ${ac_cv_have_control_in_msghdr+:} false; then :
14980   $as_echo_n "(cached) " >&6
14981 else
14982
14983         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14984 /* end confdefs.h.  */
14985
14986 #include <sys/types.h>
14987 #include <sys/socket.h>
14988 #include <sys/uio.h>
14989
14990 int
14991 main ()
14992 {
14993
14994 #ifdef msg_control
14995 #error "msg_control is a macro"
14996 exit(1);
14997 #endif
14998 struct msghdr m;
14999 m.msg_control = 0;
15000 exit(0);
15001
15002   ;
15003   return 0;
15004 }
15005 _ACEOF
15006 if ac_fn_c_try_compile "$LINENO"; then :
15007    ac_cv_have_control_in_msghdr="yes"
15008 else
15009    ac_cv_have_control_in_msghdr="no"
15010
15011 fi
15012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15013
15014 fi
15015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_control_in_msghdr" >&5
15016 $as_echo "$ac_cv_have_control_in_msghdr" >&6; }
15017 if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
15018
15019 $as_echo "#define HAVE_CONTROL_IN_MSGHDR 1" >>confdefs.h
15020
15021 fi
15022
15023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines __progname" >&5
15024 $as_echo_n "checking if libc defines __progname... " >&6; }
15025 if ${ac_cv_libc_defines___progname+:} false; then :
15026   $as_echo_n "(cached) " >&6
15027 else
15028
15029         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15030 /* end confdefs.h.  */
15031
15032 int
15033 main ()
15034 {
15035  extern char *__progname; printf("%s", __progname);
15036   ;
15037   return 0;
15038 }
15039 _ACEOF
15040 if ac_fn_c_try_link "$LINENO"; then :
15041    ac_cv_libc_defines___progname="yes"
15042 else
15043    ac_cv_libc_defines___progname="no"
15044
15045 fi
15046 rm -f core conftest.err conftest.$ac_objext \
15047     conftest$ac_exeext conftest.$ac_ext
15048
15049 fi
15050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines___progname" >&5
15051 $as_echo "$ac_cv_libc_defines___progname" >&6; }
15052 if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
15053
15054 $as_echo "#define HAVE___PROGNAME 1" >>confdefs.h
15055
15056 fi
15057
15058 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __FUNCTION__" >&5
15059 $as_echo_n "checking whether $CC implements __FUNCTION__... " >&6; }
15060 if ${ac_cv_cc_implements___FUNCTION__+:} false; then :
15061   $as_echo_n "(cached) " >&6
15062 else
15063
15064         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15065 /* end confdefs.h.  */
15066  #include <stdio.h>
15067 int
15068 main ()
15069 {
15070  printf("%s", __FUNCTION__);
15071   ;
15072   return 0;
15073 }
15074 _ACEOF
15075 if ac_fn_c_try_link "$LINENO"; then :
15076    ac_cv_cc_implements___FUNCTION__="yes"
15077 else
15078    ac_cv_cc_implements___FUNCTION__="no"
15079
15080 fi
15081 rm -f core conftest.err conftest.$ac_objext \
15082     conftest$ac_exeext conftest.$ac_ext
15083
15084 fi
15085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___FUNCTION__" >&5
15086 $as_echo "$ac_cv_cc_implements___FUNCTION__" >&6; }
15087 if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
15088
15089 $as_echo "#define HAVE___FUNCTION__ 1" >>confdefs.h
15090
15091 fi
15092
15093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __func__" >&5
15094 $as_echo_n "checking whether $CC implements __func__... " >&6; }
15095 if ${ac_cv_cc_implements___func__+:} false; then :
15096   $as_echo_n "(cached) " >&6
15097 else
15098
15099         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15100 /* end confdefs.h.  */
15101  #include <stdio.h>
15102 int
15103 main ()
15104 {
15105  printf("%s", __func__);
15106   ;
15107   return 0;
15108 }
15109 _ACEOF
15110 if ac_fn_c_try_link "$LINENO"; then :
15111    ac_cv_cc_implements___func__="yes"
15112 else
15113    ac_cv_cc_implements___func__="no"
15114
15115 fi
15116 rm -f core conftest.err conftest.$ac_objext \
15117     conftest$ac_exeext conftest.$ac_ext
15118
15119 fi
15120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___func__" >&5
15121 $as_echo "$ac_cv_cc_implements___func__" >&6; }
15122 if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
15123
15124 $as_echo "#define HAVE___func__ 1" >>confdefs.h
15125
15126 fi
15127
15128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_copy exists" >&5
15129 $as_echo_n "checking whether va_copy exists... " >&6; }
15130 if ${ac_cv_have_va_copy+:} false; then :
15131   $as_echo_n "(cached) " >&6
15132 else
15133
15134         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15135 /* end confdefs.h.  */
15136
15137 #include <stdarg.h>
15138 va_list x,y;
15139
15140 int
15141 main ()
15142 {
15143  va_copy(x,y);
15144   ;
15145   return 0;
15146 }
15147 _ACEOF
15148 if ac_fn_c_try_link "$LINENO"; then :
15149    ac_cv_have_va_copy="yes"
15150 else
15151    ac_cv_have_va_copy="no"
15152
15153 fi
15154 rm -f core conftest.err conftest.$ac_objext \
15155     conftest$ac_exeext conftest.$ac_ext
15156
15157 fi
15158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_va_copy" >&5
15159 $as_echo "$ac_cv_have_va_copy" >&6; }
15160 if test "x$ac_cv_have_va_copy" = "xyes" ; then
15161
15162 $as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
15163
15164 fi
15165
15166 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __va_copy exists" >&5
15167 $as_echo_n "checking whether __va_copy exists... " >&6; }
15168 if ${ac_cv_have___va_copy+:} false; then :
15169   $as_echo_n "(cached) " >&6
15170 else
15171
15172         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15173 /* end confdefs.h.  */
15174
15175 #include <stdarg.h>
15176 va_list x,y;
15177
15178 int
15179 main ()
15180 {
15181  __va_copy(x,y);
15182   ;
15183   return 0;
15184 }
15185 _ACEOF
15186 if ac_fn_c_try_link "$LINENO"; then :
15187    ac_cv_have___va_copy="yes"
15188 else
15189    ac_cv_have___va_copy="no"
15190
15191 fi
15192 rm -f core conftest.err conftest.$ac_objext \
15193     conftest$ac_exeext conftest.$ac_ext
15194
15195 fi
15196 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___va_copy" >&5
15197 $as_echo "$ac_cv_have___va_copy" >&6; }
15198 if test "x$ac_cv_have___va_copy" = "xyes" ; then
15199
15200 $as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
15201
15202 fi
15203
15204 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt has optreset support" >&5
15205 $as_echo_n "checking whether getopt has optreset support... " >&6; }
15206 if ${ac_cv_have_getopt_optreset+:} false; then :
15207   $as_echo_n "(cached) " >&6
15208 else
15209
15210         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15211 /* end confdefs.h.  */
15212  #include <getopt.h>
15213 int
15214 main ()
15215 {
15216  extern int optreset; optreset = 0;
15217   ;
15218   return 0;
15219 }
15220 _ACEOF
15221 if ac_fn_c_try_link "$LINENO"; then :
15222    ac_cv_have_getopt_optreset="yes"
15223 else
15224    ac_cv_have_getopt_optreset="no"
15225
15226 fi
15227 rm -f core conftest.err conftest.$ac_objext \
15228     conftest$ac_exeext conftest.$ac_ext
15229
15230 fi
15231 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getopt_optreset" >&5
15232 $as_echo "$ac_cv_have_getopt_optreset" >&6; }
15233 if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
15234
15235 $as_echo "#define HAVE_GETOPT_OPTRESET 1" >>confdefs.h
15236
15237 fi
15238
15239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_errlist" >&5
15240 $as_echo_n "checking if libc defines sys_errlist... " >&6; }
15241 if ${ac_cv_libc_defines_sys_errlist+:} false; then :
15242   $as_echo_n "(cached) " >&6
15243 else
15244
15245         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15246 /* end confdefs.h.  */
15247
15248 int
15249 main ()
15250 {
15251  extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);
15252   ;
15253   return 0;
15254 }
15255 _ACEOF
15256 if ac_fn_c_try_link "$LINENO"; then :
15257    ac_cv_libc_defines_sys_errlist="yes"
15258 else
15259    ac_cv_libc_defines_sys_errlist="no"
15260
15261 fi
15262 rm -f core conftest.err conftest.$ac_objext \
15263     conftest$ac_exeext conftest.$ac_ext
15264
15265 fi
15266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_errlist" >&5
15267 $as_echo "$ac_cv_libc_defines_sys_errlist" >&6; }
15268 if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
15269
15270 $as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
15271
15272 fi
15273
15274
15275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_nerr" >&5
15276 $as_echo_n "checking if libc defines sys_nerr... " >&6; }
15277 if ${ac_cv_libc_defines_sys_nerr+:} false; then :
15278   $as_echo_n "(cached) " >&6
15279 else
15280
15281         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15282 /* end confdefs.h.  */
15283
15284 int
15285 main ()
15286 {
15287  extern int sys_nerr; printf("%i", sys_nerr);
15288   ;
15289   return 0;
15290 }
15291 _ACEOF
15292 if ac_fn_c_try_link "$LINENO"; then :
15293    ac_cv_libc_defines_sys_nerr="yes"
15294 else
15295    ac_cv_libc_defines_sys_nerr="no"
15296
15297 fi
15298 rm -f core conftest.err conftest.$ac_objext \
15299     conftest$ac_exeext conftest.$ac_ext
15300
15301 fi
15302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_nerr" >&5
15303 $as_echo "$ac_cv_libc_defines_sys_nerr" >&6; }
15304 if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
15305
15306 $as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h
15307
15308 fi
15309
15310 # Check libraries needed by DNS fingerprint support
15311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getrrsetbyname" >&5
15312 $as_echo_n "checking for library containing getrrsetbyname... " >&6; }
15313 if ${ac_cv_search_getrrsetbyname+:} false; then :
15314   $as_echo_n "(cached) " >&6
15315 else
15316   ac_func_search_save_LIBS=$LIBS
15317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15318 /* end confdefs.h.  */
15319
15320 /* Override any GCC internal prototype to avoid an error.
15321    Use char because int might match the return type of a GCC
15322    builtin and then its argument prototype would still apply.  */
15323 #ifdef __cplusplus
15324 extern "C"
15325 #endif
15326 char getrrsetbyname ();
15327 int
15328 main ()
15329 {
15330 return getrrsetbyname ();
15331   ;
15332   return 0;
15333 }
15334 _ACEOF
15335 for ac_lib in '' resolv; do
15336   if test -z "$ac_lib"; then
15337     ac_res="none required"
15338   else
15339     ac_res=-l$ac_lib
15340     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15341   fi
15342   if ac_fn_c_try_link "$LINENO"; then :
15343   ac_cv_search_getrrsetbyname=$ac_res
15344 fi
15345 rm -f core conftest.err conftest.$ac_objext \
15346     conftest$ac_exeext
15347   if ${ac_cv_search_getrrsetbyname+:} false; then :
15348   break
15349 fi
15350 done
15351 if ${ac_cv_search_getrrsetbyname+:} false; then :
15352
15353 else
15354   ac_cv_search_getrrsetbyname=no
15355 fi
15356 rm conftest.$ac_ext
15357 LIBS=$ac_func_search_save_LIBS
15358 fi
15359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getrrsetbyname" >&5
15360 $as_echo "$ac_cv_search_getrrsetbyname" >&6; }
15361 ac_res=$ac_cv_search_getrrsetbyname
15362 if test "$ac_res" != no; then :
15363   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15364
15365 $as_echo "#define HAVE_GETRRSETBYNAME 1" >>confdefs.h
15366
15367 else
15368
15369                 # Needed by our getrrsetbyname()
15370                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_query" >&5
15371 $as_echo_n "checking for library containing res_query... " >&6; }
15372 if ${ac_cv_search_res_query+:} false; then :
15373   $as_echo_n "(cached) " >&6
15374 else
15375   ac_func_search_save_LIBS=$LIBS
15376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15377 /* end confdefs.h.  */
15378
15379 /* Override any GCC internal prototype to avoid an error.
15380    Use char because int might match the return type of a GCC
15381    builtin and then its argument prototype would still apply.  */
15382 #ifdef __cplusplus
15383 extern "C"
15384 #endif
15385 char res_query ();
15386 int
15387 main ()
15388 {
15389 return res_query ();
15390   ;
15391   return 0;
15392 }
15393 _ACEOF
15394 for ac_lib in '' resolv; do
15395   if test -z "$ac_lib"; then
15396     ac_res="none required"
15397   else
15398     ac_res=-l$ac_lib
15399     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15400   fi
15401   if ac_fn_c_try_link "$LINENO"; then :
15402   ac_cv_search_res_query=$ac_res
15403 fi
15404 rm -f core conftest.err conftest.$ac_objext \
15405     conftest$ac_exeext
15406   if ${ac_cv_search_res_query+:} false; then :
15407   break
15408 fi
15409 done
15410 if ${ac_cv_search_res_query+:} false; then :
15411
15412 else
15413   ac_cv_search_res_query=no
15414 fi
15415 rm conftest.$ac_ext
15416 LIBS=$ac_func_search_save_LIBS
15417 fi
15418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_query" >&5
15419 $as_echo "$ac_cv_search_res_query" >&6; }
15420 ac_res=$ac_cv_search_res_query
15421 if test "$ac_res" != no; then :
15422   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15423
15424 fi
15425
15426                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
15427 $as_echo_n "checking for library containing dn_expand... " >&6; }
15428 if ${ac_cv_search_dn_expand+:} false; then :
15429   $as_echo_n "(cached) " >&6
15430 else
15431   ac_func_search_save_LIBS=$LIBS
15432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15433 /* end confdefs.h.  */
15434
15435 /* Override any GCC internal prototype to avoid an error.
15436    Use char because int might match the return type of a GCC
15437    builtin and then its argument prototype would still apply.  */
15438 #ifdef __cplusplus
15439 extern "C"
15440 #endif
15441 char dn_expand ();
15442 int
15443 main ()
15444 {
15445 return dn_expand ();
15446   ;
15447   return 0;
15448 }
15449 _ACEOF
15450 for ac_lib in '' resolv; do
15451   if test -z "$ac_lib"; then
15452     ac_res="none required"
15453   else
15454     ac_res=-l$ac_lib
15455     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15456   fi
15457   if ac_fn_c_try_link "$LINENO"; then :
15458   ac_cv_search_dn_expand=$ac_res
15459 fi
15460 rm -f core conftest.err conftest.$ac_objext \
15461     conftest$ac_exeext
15462   if ${ac_cv_search_dn_expand+:} false; then :
15463   break
15464 fi
15465 done
15466 if ${ac_cv_search_dn_expand+:} false; then :
15467
15468 else
15469   ac_cv_search_dn_expand=no
15470 fi
15471 rm conftest.$ac_ext
15472 LIBS=$ac_func_search_save_LIBS
15473 fi
15474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
15475 $as_echo "$ac_cv_search_dn_expand" >&6; }
15476 ac_res=$ac_cv_search_dn_expand
15477 if test "$ac_res" != no; then :
15478   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15479
15480 fi
15481
15482                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if res_query will link" >&5
15483 $as_echo_n "checking if res_query will link... " >&6; }
15484                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15485 /* end confdefs.h.  */
15486
15487 #include <sys/types.h>
15488 #include <netinet/in.h>
15489 #include <arpa/nameser.h>
15490 #include <netdb.h>
15491 #include <resolv.h>
15492
15493 int
15494 main ()
15495 {
15496
15497         res_query (0, 0, 0, 0, 0);
15498
15499   ;
15500   return 0;
15501 }
15502 _ACEOF
15503 if ac_fn_c_try_link "$LINENO"; then :
15504   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15505 $as_echo "yes" >&6; }
15506 else
15507   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15508 $as_echo "no" >&6; }
15509                     saved_LIBS="$LIBS"
15510                     LIBS="$LIBS -lresolv"
15511                     { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
15512 $as_echo_n "checking for res_query in -lresolv... " >&6; }
15513                     cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15514 /* end confdefs.h.  */
15515
15516 #include <sys/types.h>
15517 #include <netinet/in.h>
15518 #include <arpa/nameser.h>
15519 #include <netdb.h>
15520 #include <resolv.h>
15521
15522 int
15523 main ()
15524 {
15525
15526         res_query (0, 0, 0, 0, 0);
15527
15528   ;
15529   return 0;
15530 }
15531 _ACEOF
15532 if ac_fn_c_try_link "$LINENO"; then :
15533   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15534 $as_echo "yes" >&6; }
15535 else
15536   LIBS="$saved_LIBS"
15537                          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15538 $as_echo "no" >&6; }
15539 fi
15540 rm -f core conftest.err conftest.$ac_objext \
15541     conftest$ac_exeext conftest.$ac_ext
15542
15543 fi
15544 rm -f core conftest.err conftest.$ac_objext \
15545     conftest$ac_exeext conftest.$ac_ext
15546                 for ac_func in _getshort _getlong
15547 do :
15548   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15549 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15550 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15551   cat >>confdefs.h <<_ACEOF
15552 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15553 _ACEOF
15554
15555 fi
15556 done
15557
15558                 ac_fn_c_check_decl "$LINENO" "_getshort" "ac_cv_have_decl__getshort" "#include <sys/types.h>
15559                     #include <arpa/nameser.h>
15560 "
15561 if test "x$ac_cv_have_decl__getshort" = xyes; then :
15562   ac_have_decl=1
15563 else
15564   ac_have_decl=0
15565 fi
15566
15567 cat >>confdefs.h <<_ACEOF
15568 #define HAVE_DECL__GETSHORT $ac_have_decl
15569 _ACEOF
15570 ac_fn_c_check_decl "$LINENO" "_getlong" "ac_cv_have_decl__getlong" "#include <sys/types.h>
15571                     #include <arpa/nameser.h>
15572 "
15573 if test "x$ac_cv_have_decl__getlong" = xyes; then :
15574   ac_have_decl=1
15575 else
15576   ac_have_decl=0
15577 fi
15578
15579 cat >>confdefs.h <<_ACEOF
15580 #define HAVE_DECL__GETLONG $ac_have_decl
15581 _ACEOF
15582
15583                 ac_fn_c_check_member "$LINENO" "HEADER" "ad" "ac_cv_member_HEADER_ad" "#include <arpa/nameser.h>
15584 "
15585 if test "x$ac_cv_member_HEADER_ad" = xyes; then :
15586
15587 $as_echo "#define HAVE_HEADER_AD 1" >>confdefs.h
15588
15589 fi
15590
15591
15592 fi
15593
15594
15595 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct __res_state _res is an extern" >&5
15596 $as_echo_n "checking if struct __res_state _res is an extern... " >&6; }
15597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15598 /* end confdefs.h.  */
15599
15600 #include <stdio.h>
15601 #if HAVE_SYS_TYPES_H
15602 # include <sys/types.h>
15603 #endif
15604 #include <netinet/in.h>
15605 #include <arpa/nameser.h>
15606 #include <resolv.h>
15607 extern struct __res_state _res;
15608
15609 int
15610 main ()
15611 {
15612
15613   ;
15614   return 0;
15615 }
15616 _ACEOF
15617 if ac_fn_c_try_link "$LINENO"; then :
15618   { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15619 $as_echo "yes" >&6; }
15620
15621 $as_echo "#define HAVE__RES_EXTERN 1" >>confdefs.h
15622
15623
15624 else
15625    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15626 $as_echo "no" >&6; }
15627
15628 fi
15629 rm -f core conftest.err conftest.$ac_objext \
15630     conftest$ac_exeext conftest.$ac_ext
15631
15632 # Check whether user wants SELinux support
15633 SELINUX_MSG="no"
15634 LIBSELINUX=""
15635
15636 # Check whether --with-selinux was given.
15637 if test "${with_selinux+set}" = set; then :
15638   withval=$with_selinux;  if test "x$withval" != "xno" ; then
15639                 save_LIBS="$LIBS"
15640
15641 $as_echo "#define WITH_SELINUX 1" >>confdefs.h
15642
15643                 SELINUX_MSG="yes"
15644                 ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
15645 if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
15646
15647 else
15648   as_fn_error $? "SELinux support requires selinux.h header" "$LINENO" 5
15649 fi
15650
15651
15652                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setexeccon in -lselinux" >&5
15653 $as_echo_n "checking for setexeccon in -lselinux... " >&6; }
15654 if ${ac_cv_lib_selinux_setexeccon+:} false; then :
15655   $as_echo_n "(cached) " >&6
15656 else
15657   ac_check_lib_save_LIBS=$LIBS
15658 LIBS="-lselinux  $LIBS"
15659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15660 /* end confdefs.h.  */
15661
15662 /* Override any GCC internal prototype to avoid an error.
15663    Use char because int might match the return type of a GCC
15664    builtin and then its argument prototype would still apply.  */
15665 #ifdef __cplusplus
15666 extern "C"
15667 #endif
15668 char setexeccon ();
15669 int
15670 main ()
15671 {
15672 return setexeccon ();
15673   ;
15674   return 0;
15675 }
15676 _ACEOF
15677 if ac_fn_c_try_link "$LINENO"; then :
15678   ac_cv_lib_selinux_setexeccon=yes
15679 else
15680   ac_cv_lib_selinux_setexeccon=no
15681 fi
15682 rm -f core conftest.err conftest.$ac_objext \
15683     conftest$ac_exeext conftest.$ac_ext
15684 LIBS=$ac_check_lib_save_LIBS
15685 fi
15686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_setexeccon" >&5
15687 $as_echo "$ac_cv_lib_selinux_setexeccon" >&6; }
15688 if test "x$ac_cv_lib_selinux_setexeccon" = xyes; then :
15689    LIBSELINUX="-lselinux"
15690                           LIBS="$LIBS -lselinux"
15691
15692 else
15693   as_fn_error $? "SELinux support requires libselinux library" "$LINENO" 5
15694 fi
15695
15696                 SSHLIBS="$SSHLIBS $LIBSELINUX"
15697                 SSHDLIBS="$SSHDLIBS $LIBSELINUX"
15698                 for ac_func in getseuserbyname get_default_context_with_level
15699 do :
15700   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15701 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15702 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15703   cat >>confdefs.h <<_ACEOF
15704 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15705 _ACEOF
15706
15707 fi
15708 done
15709
15710                 LIBS="$save_LIBS"
15711         fi
15712
15713 fi
15714
15715
15716
15717
15718 # Check whether user wants Kerberos 5 support
15719 KRB5_MSG="no"
15720
15721 # Check whether --with-kerberos5 was given.
15722 if test "${with_kerberos5+set}" = set; then :
15723   withval=$with_kerberos5;  if test "x$withval" != "xno" ; then
15724                 if test "x$withval" = "xyes" ; then
15725                         KRB5ROOT="/usr/local"
15726                 else
15727                         KRB5ROOT=${withval}
15728                 fi
15729
15730
15731 $as_echo "#define KRB5 1" >>confdefs.h
15732
15733                 KRB5_MSG="yes"
15734
15735                 # Extract the first word of "krb5-config", so it can be a program name with args.
15736 set dummy krb5-config; ac_word=$2
15737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15738 $as_echo_n "checking for $ac_word... " >&6; }
15739 if ${ac_cv_path_KRB5CONF+:} false; then :
15740   $as_echo_n "(cached) " >&6
15741 else
15742   case $KRB5CONF in
15743   [\\/]* | ?:[\\/]*)
15744   ac_cv_path_KRB5CONF="$KRB5CONF" # Let the user override the test with a path.
15745   ;;
15746   *)
15747   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15748 as_dummy="$KRB5ROOT/bin:$PATH"
15749 for as_dir in $as_dummy
15750 do
15751   IFS=$as_save_IFS
15752   test -z "$as_dir" && as_dir=.
15753     for ac_exec_ext in '' $ac_executable_extensions; do
15754   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
15755     ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
15756     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15757     break 2
15758   fi
15759 done
15760   done
15761 IFS=$as_save_IFS
15762
15763   test -z "$ac_cv_path_KRB5CONF" && ac_cv_path_KRB5CONF="$KRB5ROOT/bin/krb5-config"
15764   ;;
15765 esac
15766 fi
15767 KRB5CONF=$ac_cv_path_KRB5CONF
15768 if test -n "$KRB5CONF"; then
15769   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5CONF" >&5
15770 $as_echo "$KRB5CONF" >&6; }
15771 else
15772   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15773 $as_echo "no" >&6; }
15774 fi
15775
15776
15777                 if test -x $KRB5CONF ; then
15778                         K5CFLAGS="`$KRB5CONF --cflags`"
15779                         K5LIBS="`$KRB5CONF --libs`"
15780                         CPPFLAGS="$CPPFLAGS $K5CFLAGS"
15781
15782                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gssapi support" >&5
15783 $as_echo_n "checking for gssapi support... " >&6; }
15784                         if $KRB5CONF | grep gssapi >/dev/null ; then
15785                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15786 $as_echo "yes" >&6; }
15787
15788 $as_echo "#define GSSAPI 1" >>confdefs.h
15789
15790                                 GSSCFLAGS="`$KRB5CONF --cflags gssapi`"
15791                                 GSSLIBS="`$KRB5CONF --libs gssapi`"
15792                                 CPPFLAGS="$CPPFLAGS $GSSCFLAGS"
15793                         else
15794                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15795 $as_echo "no" >&6; }
15796                         fi
15797                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
15798 $as_echo_n "checking whether we are using Heimdal... " >&6; }
15799                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15800 /* end confdefs.h.  */
15801  #include <krb5.h>
15802
15803 int
15804 main ()
15805 {
15806  char *tmp = heimdal_version;
15807   ;
15808   return 0;
15809 }
15810 _ACEOF
15811 if ac_fn_c_try_compile "$LINENO"; then :
15812    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15813 $as_echo "yes" >&6; }
15814
15815 $as_echo "#define HEIMDAL 1" >>confdefs.h
15816
15817 else
15818   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15819 $as_echo "no" >&6; }
15820
15821 fi
15822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15823                 else
15824                         CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
15825                         LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
15826                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
15827 $as_echo_n "checking whether we are using Heimdal... " >&6; }
15828                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15829 /* end confdefs.h.  */
15830  #include <krb5.h>
15831
15832 int
15833 main ()
15834 {
15835  char *tmp = heimdal_version;
15836   ;
15837   return 0;
15838 }
15839 _ACEOF
15840 if ac_fn_c_try_compile "$LINENO"; then :
15841    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15842 $as_echo "yes" >&6; }
15843                                          $as_echo "#define HEIMDAL 1" >>confdefs.h
15844
15845                                          K5LIBS="-lkrb5"
15846                                          K5LIBS="$K5LIBS -lcom_err -lasn1"
15847                                          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for net_write in -lroken" >&5
15848 $as_echo_n "checking for net_write in -lroken... " >&6; }
15849 if ${ac_cv_lib_roken_net_write+:} false; then :
15850   $as_echo_n "(cached) " >&6
15851 else
15852   ac_check_lib_save_LIBS=$LIBS
15853 LIBS="-lroken  $LIBS"
15854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15855 /* end confdefs.h.  */
15856
15857 /* Override any GCC internal prototype to avoid an error.
15858    Use char because int might match the return type of a GCC
15859    builtin and then its argument prototype would still apply.  */
15860 #ifdef __cplusplus
15861 extern "C"
15862 #endif
15863 char net_write ();
15864 int
15865 main ()
15866 {
15867 return net_write ();
15868   ;
15869   return 0;
15870 }
15871 _ACEOF
15872 if ac_fn_c_try_link "$LINENO"; then :
15873   ac_cv_lib_roken_net_write=yes
15874 else
15875   ac_cv_lib_roken_net_write=no
15876 fi
15877 rm -f core conftest.err conftest.$ac_objext \
15878     conftest$ac_exeext conftest.$ac_ext
15879 LIBS=$ac_check_lib_save_LIBS
15880 fi
15881 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_roken_net_write" >&5
15882 $as_echo "$ac_cv_lib_roken_net_write" >&6; }
15883 if test "x$ac_cv_lib_roken_net_write" = xyes; then :
15884   K5LIBS="$K5LIBS -lroken"
15885 fi
15886
15887                                          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
15888 $as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
15889 if ${ac_cv_lib_des_des_cbc_encrypt+:} false; then :
15890   $as_echo_n "(cached) " >&6
15891 else
15892   ac_check_lib_save_LIBS=$LIBS
15893 LIBS="-ldes  $LIBS"
15894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15895 /* end confdefs.h.  */
15896
15897 /* Override any GCC internal prototype to avoid an error.
15898    Use char because int might match the return type of a GCC
15899    builtin and then its argument prototype would still apply.  */
15900 #ifdef __cplusplus
15901 extern "C"
15902 #endif
15903 char des_cbc_encrypt ();
15904 int
15905 main ()
15906 {
15907 return des_cbc_encrypt ();
15908   ;
15909   return 0;
15910 }
15911 _ACEOF
15912 if ac_fn_c_try_link "$LINENO"; then :
15913   ac_cv_lib_des_des_cbc_encrypt=yes
15914 else
15915   ac_cv_lib_des_des_cbc_encrypt=no
15916 fi
15917 rm -f core conftest.err conftest.$ac_objext \
15918     conftest$ac_exeext conftest.$ac_ext
15919 LIBS=$ac_check_lib_save_LIBS
15920 fi
15921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
15922 $as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
15923 if test "x$ac_cv_lib_des_des_cbc_encrypt" = xyes; then :
15924   K5LIBS="$K5LIBS -ldes"
15925 fi
15926
15927
15928 else
15929    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15930 $as_echo "no" >&6; }
15931                                          K5LIBS="-lkrb5 -lk5crypto -lcom_err"
15932
15933
15934 fi
15935 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15936                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
15937 $as_echo_n "checking for library containing dn_expand... " >&6; }
15938 if ${ac_cv_search_dn_expand+:} false; then :
15939   $as_echo_n "(cached) " >&6
15940 else
15941   ac_func_search_save_LIBS=$LIBS
15942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15943 /* end confdefs.h.  */
15944
15945 /* Override any GCC internal prototype to avoid an error.
15946    Use char because int might match the return type of a GCC
15947    builtin and then its argument prototype would still apply.  */
15948 #ifdef __cplusplus
15949 extern "C"
15950 #endif
15951 char dn_expand ();
15952 int
15953 main ()
15954 {
15955 return dn_expand ();
15956   ;
15957   return 0;
15958 }
15959 _ACEOF
15960 for ac_lib in '' resolv; do
15961   if test -z "$ac_lib"; then
15962     ac_res="none required"
15963   else
15964     ac_res=-l$ac_lib
15965     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
15966   fi
15967   if ac_fn_c_try_link "$LINENO"; then :
15968   ac_cv_search_dn_expand=$ac_res
15969 fi
15970 rm -f core conftest.err conftest.$ac_objext \
15971     conftest$ac_exeext
15972   if ${ac_cv_search_dn_expand+:} false; then :
15973   break
15974 fi
15975 done
15976 if ${ac_cv_search_dn_expand+:} false; then :
15977
15978 else
15979   ac_cv_search_dn_expand=no
15980 fi
15981 rm conftest.$ac_ext
15982 LIBS=$ac_func_search_save_LIBS
15983 fi
15984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
15985 $as_echo "$ac_cv_search_dn_expand" >&6; }
15986 ac_res=$ac_cv_search_dn_expand
15987 if test "$ac_res" != no; then :
15988   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15989
15990 fi
15991
15992
15993                         { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi_krb5" >&5
15994 $as_echo_n "checking for gss_init_sec_context in -lgssapi_krb5... " >&6; }
15995 if ${ac_cv_lib_gssapi_krb5_gss_init_sec_context+:} false; then :
15996   $as_echo_n "(cached) " >&6
15997 else
15998   ac_check_lib_save_LIBS=$LIBS
15999 LIBS="-lgssapi_krb5  $LIBS"
16000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16001 /* end confdefs.h.  */
16002
16003 /* Override any GCC internal prototype to avoid an error.
16004    Use char because int might match the return type of a GCC
16005    builtin and then its argument prototype would still apply.  */
16006 #ifdef __cplusplus
16007 extern "C"
16008 #endif
16009 char gss_init_sec_context ();
16010 int
16011 main ()
16012 {
16013 return gss_init_sec_context ();
16014   ;
16015   return 0;
16016 }
16017 _ACEOF
16018 if ac_fn_c_try_link "$LINENO"; then :
16019   ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes
16020 else
16021   ac_cv_lib_gssapi_krb5_gss_init_sec_context=no
16022 fi
16023 rm -f core conftest.err conftest.$ac_objext \
16024     conftest$ac_exeext conftest.$ac_ext
16025 LIBS=$ac_check_lib_save_LIBS
16026 fi
16027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5
16028 $as_echo "$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6; }
16029 if test "x$ac_cv_lib_gssapi_krb5_gss_init_sec_context" = xyes; then :
16030    $as_echo "#define GSSAPI 1" >>confdefs.h
16031
16032                                   GSSLIBS="-lgssapi_krb5"
16033 else
16034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi" >&5
16035 $as_echo_n "checking for gss_init_sec_context in -lgssapi... " >&6; }
16036 if ${ac_cv_lib_gssapi_gss_init_sec_context+:} false; then :
16037   $as_echo_n "(cached) " >&6
16038 else
16039   ac_check_lib_save_LIBS=$LIBS
16040 LIBS="-lgssapi  $LIBS"
16041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16042 /* end confdefs.h.  */
16043
16044 /* Override any GCC internal prototype to avoid an error.
16045    Use char because int might match the return type of a GCC
16046    builtin and then its argument prototype would still apply.  */
16047 #ifdef __cplusplus
16048 extern "C"
16049 #endif
16050 char gss_init_sec_context ();
16051 int
16052 main ()
16053 {
16054 return gss_init_sec_context ();
16055   ;
16056   return 0;
16057 }
16058 _ACEOF
16059 if ac_fn_c_try_link "$LINENO"; then :
16060   ac_cv_lib_gssapi_gss_init_sec_context=yes
16061 else
16062   ac_cv_lib_gssapi_gss_init_sec_context=no
16063 fi
16064 rm -f core conftest.err conftest.$ac_objext \
16065     conftest$ac_exeext conftest.$ac_ext
16066 LIBS=$ac_check_lib_save_LIBS
16067 fi
16068 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5
16069 $as_echo "$ac_cv_lib_gssapi_gss_init_sec_context" >&6; }
16070 if test "x$ac_cv_lib_gssapi_gss_init_sec_context" = xyes; then :
16071    $as_echo "#define GSSAPI 1" >>confdefs.h
16072
16073                                           GSSLIBS="-lgssapi"
16074 else
16075    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgss" >&5
16076 $as_echo_n "checking for gss_init_sec_context in -lgss... " >&6; }
16077 if ${ac_cv_lib_gss_gss_init_sec_context+:} false; then :
16078   $as_echo_n "(cached) " >&6
16079 else
16080   ac_check_lib_save_LIBS=$LIBS
16081 LIBS="-lgss  $LIBS"
16082 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16083 /* end confdefs.h.  */
16084
16085 /* Override any GCC internal prototype to avoid an error.
16086    Use char because int might match the return type of a GCC
16087    builtin and then its argument prototype would still apply.  */
16088 #ifdef __cplusplus
16089 extern "C"
16090 #endif
16091 char gss_init_sec_context ();
16092 int
16093 main ()
16094 {
16095 return gss_init_sec_context ();
16096   ;
16097   return 0;
16098 }
16099 _ACEOF
16100 if ac_fn_c_try_link "$LINENO"; then :
16101   ac_cv_lib_gss_gss_init_sec_context=yes
16102 else
16103   ac_cv_lib_gss_gss_init_sec_context=no
16104 fi
16105 rm -f core conftest.err conftest.$ac_objext \
16106     conftest$ac_exeext conftest.$ac_ext
16107 LIBS=$ac_check_lib_save_LIBS
16108 fi
16109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gss_gss_init_sec_context" >&5
16110 $as_echo "$ac_cv_lib_gss_gss_init_sec_context" >&6; }
16111 if test "x$ac_cv_lib_gss_gss_init_sec_context" = xyes; then :
16112    $as_echo "#define GSSAPI 1" >>confdefs.h
16113
16114                                                   GSSLIBS="-lgss"
16115 else
16116   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api library - build may fail" >&5
16117 $as_echo "$as_me: WARNING: Cannot find any suitable gss-api library - build may fail" >&2;}
16118 fi
16119
16120
16121 fi
16122
16123
16124 fi
16125
16126
16127                         ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
16128 if test "x$ac_cv_header_gssapi_h" = xyes; then :
16129
16130 else
16131    unset ac_cv_header_gssapi_h
16132                                   CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
16133                                   for ac_header in gssapi.h
16134 do :
16135   ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
16136 if test "x$ac_cv_header_gssapi_h" = xyes; then :
16137   cat >>confdefs.h <<_ACEOF
16138 #define HAVE_GSSAPI_H 1
16139 _ACEOF
16140
16141 else
16142   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api header - build may fail" >&5
16143 $as_echo "$as_me: WARNING: Cannot find any suitable gss-api header - build may fail" >&2;}
16144
16145 fi
16146
16147 done
16148
16149
16150
16151 fi
16152
16153
16154
16155                         oldCPP="$CPPFLAGS"
16156                         CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
16157                         ac_fn_c_check_header_mongrel "$LINENO" "gssapi_krb5.h" "ac_cv_header_gssapi_krb5_h" "$ac_includes_default"
16158 if test "x$ac_cv_header_gssapi_krb5_h" = xyes; then :
16159
16160 else
16161    CPPFLAGS="$oldCPP"
16162 fi
16163
16164
16165
16166                 fi
16167                 if test ! -z "$need_dash_r" ; then
16168                         LDFLAGS="$LDFLAGS -R${KRB5ROOT}/lib"
16169                 fi
16170                 if test ! -z "$blibpath" ; then
16171                         blibpath="$blibpath:${KRB5ROOT}/lib"
16172                 fi
16173
16174                 for ac_header in gssapi.h gssapi/gssapi.h
16175 do :
16176   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16177 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16178 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16179   cat >>confdefs.h <<_ACEOF
16180 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16181 _ACEOF
16182
16183 fi
16184
16185 done
16186
16187                 for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h
16188 do :
16189   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16190 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16191 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16192   cat >>confdefs.h <<_ACEOF
16193 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16194 _ACEOF
16195
16196 fi
16197
16198 done
16199
16200                 for ac_header in gssapi_generic.h gssapi/gssapi_generic.h
16201 do :
16202   as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
16203 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
16204 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
16205   cat >>confdefs.h <<_ACEOF
16206 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
16207 _ACEOF
16208
16209 fi
16210
16211 done
16212
16213
16214                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing k_hasafs" >&5
16215 $as_echo_n "checking for library containing k_hasafs... " >&6; }
16216 if ${ac_cv_search_k_hasafs+:} false; then :
16217   $as_echo_n "(cached) " >&6
16218 else
16219   ac_func_search_save_LIBS=$LIBS
16220 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16221 /* end confdefs.h.  */
16222
16223 /* Override any GCC internal prototype to avoid an error.
16224    Use char because int might match the return type of a GCC
16225    builtin and then its argument prototype would still apply.  */
16226 #ifdef __cplusplus
16227 extern "C"
16228 #endif
16229 char k_hasafs ();
16230 int
16231 main ()
16232 {
16233 return k_hasafs ();
16234   ;
16235   return 0;
16236 }
16237 _ACEOF
16238 for ac_lib in '' kafs; do
16239   if test -z "$ac_lib"; then
16240     ac_res="none required"
16241   else
16242     ac_res=-l$ac_lib
16243     LIBS="-l$ac_lib  $ac_func_search_save_LIBS"
16244   fi
16245   if ac_fn_c_try_link "$LINENO"; then :
16246   ac_cv_search_k_hasafs=$ac_res
16247 fi
16248 rm -f core conftest.err conftest.$ac_objext \
16249     conftest$ac_exeext
16250   if ${ac_cv_search_k_hasafs+:} false; then :
16251   break
16252 fi
16253 done
16254 if ${ac_cv_search_k_hasafs+:} false; then :
16255
16256 else
16257   ac_cv_search_k_hasafs=no
16258 fi
16259 rm conftest.$ac_ext
16260 LIBS=$ac_func_search_save_LIBS
16261 fi
16262 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_k_hasafs" >&5
16263 $as_echo "$ac_cv_search_k_hasafs" >&6; }
16264 ac_res=$ac_cv_search_k_hasafs
16265 if test "$ac_res" != no; then :
16266   test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16267
16268 $as_echo "#define USE_AFS 1" >>confdefs.h
16269
16270 fi
16271
16272
16273                 ac_fn_c_check_decl "$LINENO" "GSS_C_NT_HOSTBASED_SERVICE" "ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" "
16274 #ifdef HAVE_GSSAPI_H
16275 # include <gssapi.h>
16276 #elif defined(HAVE_GSSAPI_GSSAPI_H)
16277 # include <gssapi/gssapi.h>
16278 #endif
16279
16280 #ifdef HAVE_GSSAPI_GENERIC_H
16281 # include <gssapi_generic.h>
16282 #elif defined(HAVE_GSSAPI_GSSAPI_GENERIC_H)
16283 # include <gssapi/gssapi_generic.h>
16284 #endif
16285
16286 "
16287 if test "x$ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" = xyes; then :
16288   ac_have_decl=1
16289 else
16290   ac_have_decl=0
16291 fi
16292
16293 cat >>confdefs.h <<_ACEOF
16294 #define HAVE_DECL_GSS_C_NT_HOSTBASED_SERVICE $ac_have_decl
16295 _ACEOF
16296
16297                 saved_LIBS="$LIBS"
16298                 LIBS="$LIBS $K5LIBS"
16299                 for ac_func in krb5_cc_new_unique krb5_get_error_message krb5_free_error_message
16300 do :
16301   as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16302 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16303 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16304   cat >>confdefs.h <<_ACEOF
16305 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16306 _ACEOF
16307
16308 fi
16309 done
16310
16311                 LIBS="$saved_LIBS"
16312
16313         fi
16314
16315
16316 fi
16317
16318
16319
16320
16321 # Looking for programs, paths and files
16322
16323 PRIVSEP_PATH=/var/empty
16324
16325 # Check whether --with-privsep-path was given.
16326 if test "${with_privsep_path+set}" = set; then :
16327   withval=$with_privsep_path;
16328                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
16329                     test "x${withval}" != "xyes"; then
16330                         PRIVSEP_PATH=$withval
16331                 fi
16332
16333
16334 fi
16335
16336
16337
16338
16339 # Check whether --with-xauth was given.
16340 if test "${with_xauth+set}" = set; then :
16341   withval=$with_xauth;
16342                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
16343                     test "x${withval}" != "xyes"; then
16344                         xauth_path=$withval
16345                 fi
16346
16347 else
16348
16349                 TestPath="$PATH"
16350                 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X/bin"
16351                 TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11"
16352                 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin"
16353                 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
16354                 # Extract the first word of "xauth", so it can be a program name with args.
16355 set dummy xauth; ac_word=$2
16356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16357 $as_echo_n "checking for $ac_word... " >&6; }
16358 if ${ac_cv_path_xauth_path+:} false; then :
16359   $as_echo_n "(cached) " >&6
16360 else
16361   case $xauth_path in
16362   [\\/]* | ?:[\\/]*)
16363   ac_cv_path_xauth_path="$xauth_path" # Let the user override the test with a path.
16364   ;;
16365   *)
16366   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16367 for as_dir in $TestPath
16368 do
16369   IFS=$as_save_IFS
16370   test -z "$as_dir" && as_dir=.
16371     for ac_exec_ext in '' $ac_executable_extensions; do
16372   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16373     ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext"
16374     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16375     break 2
16376   fi
16377 done
16378   done
16379 IFS=$as_save_IFS
16380
16381   ;;
16382 esac
16383 fi
16384 xauth_path=$ac_cv_path_xauth_path
16385 if test -n "$xauth_path"; then
16386   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xauth_path" >&5
16387 $as_echo "$xauth_path" >&6; }
16388 else
16389   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16390 $as_echo "no" >&6; }
16391 fi
16392
16393
16394                 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
16395                         xauth_path="/usr/openwin/bin/xauth"
16396                 fi
16397
16398
16399 fi
16400
16401
16402 STRIP_OPT=-s
16403 # Check whether --enable-strip was given.
16404 if test "${enable_strip+set}" = set; then :
16405   enableval=$enable_strip;
16406                 if test "x$enableval" = "xno" ; then
16407                         STRIP_OPT=
16408                 fi
16409
16410
16411 fi
16412
16413
16414
16415 if test -z "$xauth_path" ; then
16416         XAUTH_PATH="undefined"
16417
16418 else
16419
16420 cat >>confdefs.h <<_ACEOF
16421 #define XAUTH_PATH "$xauth_path"
16422 _ACEOF
16423
16424         XAUTH_PATH=$xauth_path
16425
16426 fi
16427
16428 # Check for mail directory
16429
16430 # Check whether --with-maildir was given.
16431 if test "${with_maildir+set}" = set; then :
16432   withval=$with_maildir;
16433         if test "X$withval" != X  &&  test "x$withval" != xno  &&  \
16434             test "x${withval}" != xyes; then
16435
16436 cat >>confdefs.h <<_ACEOF
16437 #define MAIL_DIRECTORY "$withval"
16438 _ACEOF
16439
16440             fi
16441
16442 else
16443
16444         if test "X$maildir" != "X"; then
16445             cat >>confdefs.h <<_ACEOF
16446 #define MAIL_DIRECTORY "$maildir"
16447 _ACEOF
16448
16449         else
16450             { $as_echo "$as_me:${as_lineno-$LINENO}: checking Discovering system mail directory" >&5
16451 $as_echo_n "checking Discovering system mail directory... " >&6; }
16452             if test "$cross_compiling" = yes; then :
16453
16454                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&5
16455 $as_echo "$as_me: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&2;}
16456
16457
16458 else
16459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16460 /* end confdefs.h.  */
16461
16462 #include <stdio.h>
16463 #include <string.h>
16464 #ifdef HAVE_PATHS_H
16465 #include <paths.h>
16466 #endif
16467 #ifdef HAVE_MAILLOCK_H
16468 #include <maillock.h>
16469 #endif
16470 #define DATA "conftest.maildir"
16471
16472 int
16473 main ()
16474 {
16475
16476         FILE *fd;
16477         int rc;
16478
16479         fd = fopen(DATA,"w");
16480         if(fd == NULL)
16481                 exit(1);
16482
16483 #if defined (_PATH_MAILDIR)
16484         if ((rc = fprintf(fd ,"_PATH_MAILDIR:%s\n", _PATH_MAILDIR)) <0)
16485                 exit(1);
16486 #elif defined (MAILDIR)
16487         if ((rc = fprintf(fd ,"MAILDIR:%s\n", MAILDIR)) <0)
16488                 exit(1);
16489 #elif defined (_PATH_MAIL)
16490         if ((rc = fprintf(fd ,"_PATH_MAIL:%s\n", _PATH_MAIL)) <0)
16491                 exit(1);
16492 #else
16493         exit (2);
16494 #endif
16495
16496         exit(0);
16497
16498   ;
16499   return 0;
16500 }
16501 _ACEOF
16502 if ac_fn_c_try_run "$LINENO"; then :
16503
16504                     maildir_what=`awk -F: '{print $1}' conftest.maildir`
16505                     maildir=`awk -F: '{print $2}' conftest.maildir \
16506                         | sed 's|/$||'`
16507                     { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: $maildir from $maildir_what" >&5
16508 $as_echo "Using: $maildir from $maildir_what" >&6; }
16509                     if test "x$maildir_what" != "x_PATH_MAILDIR"; then
16510                         cat >>confdefs.h <<_ACEOF
16511 #define MAIL_DIRECTORY "$maildir"
16512 _ACEOF
16513
16514                     fi
16515
16516 else
16517
16518                     if test "X$ac_status" = "X2";then
16519 # our test program didn't find it. Default to /var/spool/mail
16520                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: default value of /var/spool/mail" >&5
16521 $as_echo "Using: default value of /var/spool/mail" >&6; }
16522                         cat >>confdefs.h <<_ACEOF
16523 #define MAIL_DIRECTORY "/var/spool/mail"
16524 _ACEOF
16525
16526                      else
16527                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** not found ***" >&5
16528 $as_echo "*** not found ***" >&6; }
16529                      fi
16530
16531 fi
16532 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16533   conftest.$ac_objext conftest.beam conftest.$ac_ext
16534 fi
16535
16536         fi
16537
16538
16539 fi
16540  # maildir
16541
16542 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
16543         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptmx test" >&5
16544 $as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptmx test" >&2;}
16545         disable_ptmx_check=yes
16546 fi
16547 if test -z "$no_dev_ptmx" ; then
16548         if test "x$disable_ptmx_check" != "xyes" ; then
16549                 as_ac_File=`$as_echo "ac_cv_file_"/dev/ptmx"" | $as_tr_sh`
16550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptmx\"" >&5
16551 $as_echo_n "checking for \"/dev/ptmx\"... " >&6; }
16552 if eval \${$as_ac_File+:} false; then :
16553   $as_echo_n "(cached) " >&6
16554 else
16555   test "$cross_compiling" = yes &&
16556   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16557 if test -r ""/dev/ptmx""; then
16558   eval "$as_ac_File=yes"
16559 else
16560   eval "$as_ac_File=no"
16561 fi
16562 fi
16563 eval ac_res=\$$as_ac_File
16564                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16565 $as_echo "$ac_res" >&6; }
16566 if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
16567
16568
16569 cat >>confdefs.h <<_ACEOF
16570 #define HAVE_DEV_PTMX 1
16571 _ACEOF
16572
16573                                 have_dev_ptmx=1
16574
16575
16576 fi
16577
16578         fi
16579 fi
16580
16581 if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
16582         as_ac_File=`$as_echo "ac_cv_file_"/dev/ptc"" | $as_tr_sh`
16583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptc\"" >&5
16584 $as_echo_n "checking for \"/dev/ptc\"... " >&6; }
16585 if eval \${$as_ac_File+:} false; then :
16586   $as_echo_n "(cached) " >&6
16587 else
16588   test "$cross_compiling" = yes &&
16589   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16590 if test -r ""/dev/ptc""; then
16591   eval "$as_ac_File=yes"
16592 else
16593   eval "$as_ac_File=no"
16594 fi
16595 fi
16596 eval ac_res=\$$as_ac_File
16597                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16598 $as_echo "$ac_res" >&6; }
16599 if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
16600
16601
16602 cat >>confdefs.h <<_ACEOF
16603 #define HAVE_DEV_PTS_AND_PTC 1
16604 _ACEOF
16605
16606                         have_dev_ptc=1
16607
16608
16609 fi
16610
16611 else
16612         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptc test" >&5
16613 $as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptc test" >&2;}
16614 fi
16615
16616 # Options from here on. Some of these are preset by platform above
16617
16618 # Check whether --with-mantype was given.
16619 if test "${with_mantype+set}" = set; then :
16620   withval=$with_mantype;
16621                 case "$withval" in
16622                 man|cat|doc)
16623                         MANTYPE=$withval
16624                         ;;
16625                 *)
16626                         as_fn_error $? "invalid man type: $withval" "$LINENO" 5
16627                         ;;
16628                 esac
16629
16630
16631 fi
16632
16633 if test -z "$MANTYPE"; then
16634         TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb"
16635         for ac_prog in nroff awf
16636 do
16637   # Extract the first word of "$ac_prog", so it can be a program name with args.
16638 set dummy $ac_prog; ac_word=$2
16639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16640 $as_echo_n "checking for $ac_word... " >&6; }
16641 if ${ac_cv_path_NROFF+:} false; then :
16642   $as_echo_n "(cached) " >&6
16643 else
16644   case $NROFF in
16645   [\\/]* | ?:[\\/]*)
16646   ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path.
16647   ;;
16648   *)
16649   as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16650 for as_dir in $TestPath
16651 do
16652   IFS=$as_save_IFS
16653   test -z "$as_dir" && as_dir=.
16654     for ac_exec_ext in '' $ac_executable_extensions; do
16655   if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
16656     ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
16657     $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16658     break 2
16659   fi
16660 done
16661   done
16662 IFS=$as_save_IFS
16663
16664   ;;
16665 esac
16666 fi
16667 NROFF=$ac_cv_path_NROFF
16668 if test -n "$NROFF"; then
16669   { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
16670 $as_echo "$NROFF" >&6; }
16671 else
16672   { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16673 $as_echo "no" >&6; }
16674 fi
16675
16676
16677   test -n "$NROFF" && break
16678 done
16679 test -n "$NROFF" || NROFF="/bin/false"
16680
16681         if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
16682                 MANTYPE=doc
16683         elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
16684                 MANTYPE=man
16685         else
16686                 MANTYPE=cat
16687         fi
16688 fi
16689
16690 if test "$MANTYPE" = "doc"; then
16691         mansubdir=man;
16692 else
16693         mansubdir=$MANTYPE;
16694 fi
16695
16696
16697 # Check whether to enable MD5 passwords
16698 MD5_MSG="no"
16699
16700 # Check whether --with-md5-passwords was given.
16701 if test "${with_md5_passwords+set}" = set; then :
16702   withval=$with_md5_passwords;
16703                 if test "x$withval" != "xno" ; then
16704
16705 $as_echo "#define HAVE_MD5_PASSWORDS 1" >>confdefs.h
16706
16707                         MD5_MSG="yes"
16708                 fi
16709
16710
16711 fi
16712
16713
16714 # Whether to disable shadow password support
16715
16716 # Check whether --with-shadow was given.
16717 if test "${with_shadow+set}" = set; then :
16718   withval=$with_shadow;
16719                 if test "x$withval" = "xno" ; then
16720                         $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
16721
16722                         disable_shadow=yes
16723                 fi
16724
16725
16726 fi
16727
16728
16729 if test -z "$disable_shadow" ; then
16730         { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the systems has expire shadow information" >&5
16731 $as_echo_n "checking if the systems has expire shadow information... " >&6; }
16732         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16733 /* end confdefs.h.  */
16734
16735 #include <sys/types.h>
16736 #include <shadow.h>
16737 struct spwd sp;
16738
16739 int
16740 main ()
16741 {
16742  sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0;
16743   ;
16744   return 0;
16745 }
16746 _ACEOF
16747 if ac_fn_c_try_compile "$LINENO"; then :
16748    sp_expire_available=yes
16749 fi
16750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16751
16752         if test "x$sp_expire_available" = "xyes" ; then
16753                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16754 $as_echo "yes" >&6; }
16755
16756 $as_echo "#define HAS_SHADOW_EXPIRE 1" >>confdefs.h
16757
16758         else
16759                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16760 $as_echo "no" >&6; }
16761         fi
16762 fi
16763
16764 # Use ip address instead of hostname in $DISPLAY
16765 if test ! -z "$IPADDR_IN_DISPLAY" ; then
16766         DISPLAY_HACK_MSG="yes"
16767
16768 $as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
16769
16770 else
16771         DISPLAY_HACK_MSG="no"
16772
16773 # Check whether --with-ipaddr-display was given.
16774 if test "${with_ipaddr_display+set}" = set; then :
16775   withval=$with_ipaddr_display;
16776                         if test "x$withval" != "xno" ; then
16777                                 $as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
16778
16779                                 DISPLAY_HACK_MSG="yes"
16780                         fi
16781
16782
16783 fi
16784
16785 fi
16786
16787 # check for /etc/default/login and use it if present.
16788 # Check whether --enable-etc-default-login was given.
16789 if test "${enable_etc_default_login+set}" = set; then :
16790   enableval=$enable_etc_default_login;  if test "x$enableval" = "xno"; then
16791                 { $as_echo "$as_me:${as_lineno-$LINENO}: /etc/default/login handling disabled" >&5
16792 $as_echo "$as_me: /etc/default/login handling disabled" >&6;}
16793                 etc_default_login=no
16794           else
16795                 etc_default_login=yes
16796           fi
16797 else
16798    if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
16799           then
16800                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking /etc/default/login" >&5
16801 $as_echo "$as_me: WARNING: cross compiling: not checking /etc/default/login" >&2;}
16802                 etc_default_login=no
16803           else
16804                 etc_default_login=yes
16805           fi
16806
16807 fi
16808
16809
16810 if test "x$etc_default_login" != "xno"; then
16811         as_ac_File=`$as_echo "ac_cv_file_"/etc/default/login"" | $as_tr_sh`
16812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/etc/default/login\"" >&5
16813 $as_echo_n "checking for \"/etc/default/login\"... " >&6; }
16814 if eval \${$as_ac_File+:} false; then :
16815   $as_echo_n "(cached) " >&6
16816 else
16817   test "$cross_compiling" = yes &&
16818   as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
16819 if test -r ""/etc/default/login""; then
16820   eval "$as_ac_File=yes"
16821 else
16822   eval "$as_ac_File=no"
16823 fi
16824 fi
16825 eval ac_res=\$$as_ac_File
16826                { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
16827 $as_echo "$ac_res" >&6; }
16828 if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
16829    external_path_file=/etc/default/login
16830 fi
16831
16832         if test "x$external_path_file" = "x/etc/default/login"; then
16833
16834 $as_echo "#define HAVE_ETC_DEFAULT_LOGIN 1" >>confdefs.h
16835
16836         fi
16837 fi
16838
16839 if test $ac_cv_func_login_getcapbool = "yes" && \
16840         test $ac_cv_header_login_cap_h = "yes" ; then
16841         external_path_file=/etc/login.conf
16842 fi
16843
16844 # Whether to mess with the default path
16845 SERVER_PATH_MSG="(default)"
16846
16847 # Check whether --with-default-path was given.
16848 if test "${with_default_path+set}" = set; then :
16849   withval=$with_default_path;
16850                 if test "x$external_path_file" = "x/etc/login.conf" ; then
16851                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
16852 --with-default-path=PATH has no effect on this system.
16853 Edit /etc/login.conf instead." >&5
16854 $as_echo "$as_me: WARNING:
16855 --with-default-path=PATH has no effect on this system.
16856 Edit /etc/login.conf instead." >&2;}
16857                 elif test "x$withval" != "xno" ; then
16858                         if test ! -z "$external_path_file" ; then
16859                                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
16860 --with-default-path=PATH will only be used if PATH is not defined in
16861 $external_path_file ." >&5
16862 $as_echo "$as_me: WARNING:
16863 --with-default-path=PATH will only be used if PATH is not defined in
16864 $external_path_file ." >&2;}
16865                         fi
16866                         user_path="$withval"
16867                         SERVER_PATH_MSG="$withval"
16868                 fi
16869
16870 else
16871    if test "x$external_path_file" = "x/etc/login.conf" ; then
16872                 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Make sure the path to scp is in /etc/login.conf" >&5
16873 $as_echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;}
16874         else
16875                 if test ! -z "$external_path_file" ; then
16876                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
16877 If PATH is defined in $external_path_file, ensure the path to scp is included,
16878 otherwise scp will not work." >&5
16879 $as_echo "$as_me: WARNING:
16880 If PATH is defined in $external_path_file, ensure the path to scp is included,
16881 otherwise scp will not work." >&2;}
16882                 fi
16883                 if test "$cross_compiling" = yes; then :
16884    user_path="/usr/bin:/bin:/usr/sbin:/sbin"
16885
16886 else
16887   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16888 /* end confdefs.h.  */
16889
16890 /* find out what STDPATH is */
16891 #include <stdio.h>
16892 #ifdef HAVE_PATHS_H
16893 # include <paths.h>
16894 #endif
16895 #ifndef _PATH_STDPATH
16896 # ifdef _PATH_USERPATH  /* Irix */
16897 #  define _PATH_STDPATH _PATH_USERPATH
16898 # else
16899 #  define _PATH_STDPATH "/usr/bin:/bin:/usr/sbin:/sbin"
16900 # endif
16901 #endif
16902 #include <sys/types.h>
16903 #include <sys/stat.h>
16904 #include <fcntl.h>
16905 #define DATA "conftest.stdpath"
16906
16907 int
16908 main ()
16909 {
16910
16911         FILE *fd;
16912         int rc;
16913
16914         fd = fopen(DATA,"w");
16915         if(fd == NULL)
16916                 exit(1);
16917
16918         if ((rc = fprintf(fd,"%s", _PATH_STDPATH)) < 0)
16919                 exit(1);
16920
16921         exit(0);
16922
16923   ;
16924   return 0;
16925 }
16926 _ACEOF
16927 if ac_fn_c_try_run "$LINENO"; then :
16928    user_path=`cat conftest.stdpath`
16929 else
16930    user_path="/usr/bin:/bin:/usr/sbin:/sbin"
16931 fi
16932 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16933   conftest.$ac_objext conftest.beam conftest.$ac_ext
16934 fi
16935
16936 # make sure $bindir is in USER_PATH so scp will work
16937                 t_bindir="${bindir}"
16938                 while echo "${t_bindir}" | egrep '\$\{|NONE/' >/dev/null 2>&1; do
16939                         t_bindir=`eval echo ${t_bindir}`
16940                         case $t_bindir in
16941                                 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$prefix~"` ;;
16942                         esac
16943                         case $t_bindir in
16944                                 NONE/*) t_bindir=`echo $t_bindir | sed "s~NONE~$ac_default_prefix~"` ;;
16945                         esac
16946                 done
16947                 echo $user_path | grep ":$t_bindir"  > /dev/null 2>&1
16948                 if test $? -ne 0  ; then
16949                         echo $user_path | grep "^$t_bindir"  > /dev/null 2>&1
16950                         if test $? -ne 0  ; then
16951                                 user_path=$user_path:$t_bindir
16952                                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Adding $t_bindir to USER_PATH so scp will work" >&5
16953 $as_echo "Adding $t_bindir to USER_PATH so scp will work" >&6; }
16954                         fi
16955                 fi
16956         fi
16957
16958 fi
16959
16960 if test "x$external_path_file" != "x/etc/login.conf" ; then
16961
16962 cat >>confdefs.h <<_ACEOF
16963 #define USER_PATH "$user_path"
16964 _ACEOF
16965
16966
16967 fi
16968
16969 # Set superuser path separately to user path
16970
16971 # Check whether --with-superuser-path was given.
16972 if test "${with_superuser_path+set}" = set; then :
16973   withval=$with_superuser_path;
16974                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
16975                     test "x${withval}" != "xyes"; then
16976
16977 cat >>confdefs.h <<_ACEOF
16978 #define SUPERUSER_PATH "$withval"
16979 _ACEOF
16980
16981                         superuser_path=$withval
16982                 fi
16983
16984
16985 fi
16986
16987
16988
16989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
16990 $as_echo_n "checking if we need to convert IPv4 in IPv6-mapped addresses... " >&6; }
16991 IPV4_IN6_HACK_MSG="no"
16992
16993 # Check whether --with-4in6 was given.
16994 if test "${with_4in6+set}" = set; then :
16995   withval=$with_4in6;
16996                 if test "x$withval" != "xno" ; then
16997                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16998 $as_echo "yes" >&6; }
16999
17000 $as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
17001
17002                         IPV4_IN6_HACK_MSG="yes"
17003                 else
17004                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17005 $as_echo "no" >&6; }
17006                 fi
17007
17008 else
17009
17010                 if test "x$inet6_default_4in6" = "xyes"; then
17011                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
17012 $as_echo "yes (default)" >&6; }
17013                         $as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
17014
17015                         IPV4_IN6_HACK_MSG="yes"
17016                 else
17017                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5
17018 $as_echo "no (default)" >&6; }
17019                 fi
17020
17021
17022 fi
17023
17024
17025 # Whether to enable BSD auth support
17026 BSD_AUTH_MSG=no
17027
17028 # Check whether --with-bsd-auth was given.
17029 if test "${with_bsd_auth+set}" = set; then :
17030   withval=$with_bsd_auth;
17031                 if test "x$withval" != "xno" ; then
17032
17033 $as_echo "#define BSD_AUTH 1" >>confdefs.h
17034
17035                         BSD_AUTH_MSG=yes
17036                 fi
17037
17038
17039 fi
17040
17041
17042 # Where to place sshd.pid
17043 piddir=/var/run
17044 # make sure the directory exists
17045 if test ! -d $piddir ; then
17046         piddir=`eval echo ${sysconfdir}`
17047         case $piddir in
17048                 NONE/*) piddir=`echo $piddir | sed "s~NONE~$ac_default_prefix~"` ;;
17049         esac
17050 fi
17051
17052
17053 # Check whether --with-pid-dir was given.
17054 if test "${with_pid_dir+set}" = set; then :
17055   withval=$with_pid_dir;
17056                 if test -n "$withval"  &&  test "x$withval" != "xno"  &&  \
17057                     test "x${withval}" != "xyes"; then
17058                         piddir=$withval
17059                         if test ! -d $piddir ; then
17060                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** no $piddir directory on this system **" >&5
17061 $as_echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;}
17062                         fi
17063                 fi
17064
17065
17066 fi
17067
17068
17069
17070 cat >>confdefs.h <<_ACEOF
17071 #define _PATH_SSH_PIDDIR "$piddir"
17072 _ACEOF
17073
17074
17075
17076 # Check whether --enable-lastlog was given.
17077 if test "${enable_lastlog+set}" = set; then :
17078   enableval=$enable_lastlog;
17079                 if test "x$enableval" = "xno" ; then
17080                         $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
17081
17082                 fi
17083
17084
17085 fi
17086
17087 # Check whether --enable-utmp was given.
17088 if test "${enable_utmp+set}" = set; then :
17089   enableval=$enable_utmp;
17090                 if test "x$enableval" = "xno" ; then
17091                         $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
17092
17093                 fi
17094
17095
17096 fi
17097
17098 # Check whether --enable-utmpx was given.
17099 if test "${enable_utmpx+set}" = set; then :
17100   enableval=$enable_utmpx;
17101                 if test "x$enableval" = "xno" ; then
17102
17103 $as_echo "#define DISABLE_UTMPX 1" >>confdefs.h
17104
17105                 fi
17106
17107
17108 fi
17109
17110 # Check whether --enable-wtmp was given.
17111 if test "${enable_wtmp+set}" = set; then :
17112   enableval=$enable_wtmp;
17113                 if test "x$enableval" = "xno" ; then
17114                         $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
17115
17116                 fi
17117
17118
17119 fi
17120
17121 # Check whether --enable-wtmpx was given.
17122 if test "${enable_wtmpx+set}" = set; then :
17123   enableval=$enable_wtmpx;
17124                 if test "x$enableval" = "xno" ; then
17125
17126 $as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
17127
17128                 fi
17129
17130
17131 fi
17132
17133 # Check whether --enable-libutil was given.
17134 if test "${enable_libutil+set}" = set; then :
17135   enableval=$enable_libutil;
17136                 if test "x$enableval" = "xno" ; then
17137                         $as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
17138
17139                 fi
17140
17141
17142 fi
17143
17144 # Check whether --enable-pututline was given.
17145 if test "${enable_pututline+set}" = set; then :
17146   enableval=$enable_pututline;
17147                 if test "x$enableval" = "xno" ; then
17148
17149 $as_echo "#define DISABLE_PUTUTLINE 1" >>confdefs.h
17150
17151                 fi
17152
17153
17154 fi
17155
17156 # Check whether --enable-pututxline was given.
17157 if test "${enable_pututxline+set}" = set; then :
17158   enableval=$enable_pututxline;
17159                 if test "x$enableval" = "xno" ; then
17160
17161 $as_echo "#define DISABLE_PUTUTXLINE 1" >>confdefs.h
17162
17163                 fi
17164
17165
17166 fi
17167
17168
17169 # Check whether --with-lastlog was given.
17170 if test "${with_lastlog+set}" = set; then :
17171   withval=$with_lastlog;
17172                 if test "x$withval" = "xno" ; then
17173                         $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
17174
17175                 elif test -n "$withval"  &&  test "x${withval}" != "xyes"; then
17176                         conf_lastlog_location=$withval
17177                 fi
17178
17179
17180 fi
17181
17182
17183
17184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines LASTLOG_FILE" >&5
17185 $as_echo_n "checking if your system defines LASTLOG_FILE... " >&6; }
17186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17187 /* end confdefs.h.  */
17188
17189 #include <sys/types.h>
17190 #include <utmp.h>
17191 #ifdef HAVE_LASTLOG_H
17192 #  include <lastlog.h>
17193 #endif
17194 #ifdef HAVE_PATHS_H
17195 #  include <paths.h>
17196 #endif
17197 #ifdef HAVE_LOGIN_H
17198 # include <login.h>
17199 #endif
17200
17201 int
17202 main ()
17203 {
17204  char *lastlog = LASTLOG_FILE;
17205   ;
17206   return 0;
17207 }
17208 _ACEOF
17209 if ac_fn_c_try_compile "$LINENO"; then :
17210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17211 $as_echo "yes" >&6; }
17212 else
17213
17214                 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17215 $as_echo "no" >&6; }
17216                 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines _PATH_LASTLOG" >&5
17217 $as_echo_n "checking if your system defines _PATH_LASTLOG... " >&6; }
17218                 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17219 /* end confdefs.h.  */
17220
17221 #include <sys/types.h>
17222 #include <utmp.h>
17223 #ifdef HAVE_LASTLOG_H
17224 #  include <lastlog.h>
17225 #endif
17226 #ifdef HAVE_PATHS_H
17227 #  include <paths.h>
17228 #endif
17229
17230 int
17231 main ()
17232 {
17233  char *lastlog = _PATH_LASTLOG;
17234   ;
17235   return 0;
17236 }
17237 _ACEOF
17238 if ac_fn_c_try_compile "$LINENO"; then :
17239    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17240 $as_echo "yes" >&6; }
17241 else
17242
17243                         { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17244 $as_echo "no" >&6; }
17245                         system_lastlog_path=no
17246
17247 fi
17248 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17249
17250 fi
17251 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17252
17253 if test -z "$conf_lastlog_location"; then
17254         if test x"$system_lastlog_path" = x"no" ; then
17255                 for f in /var/log/lastlog /usr/adm/lastlog /var/adm/lastlog /etc/security/lastlog ; do
17256                                 if (test -d "$f" || test -f "$f") ; then
17257                                         conf_lastlog_location=$f
17258                                 fi
17259                 done
17260                 if test -z "$conf_lastlog_location"; then
17261                         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** Cannot find lastlog **" >&5
17262 $as_echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;}
17263                                         fi
17264         fi
17265 fi
17266
17267 if test -n "$conf_lastlog_location"; then
17268
17269 cat >>confdefs.h <<_ACEOF
17270 #define CONF_LASTLOG_FILE "$conf_lastlog_location"
17271 _ACEOF
17272
17273 fi
17274
17275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines UTMP_FILE" >&5
17276 $as_echo_n "checking if your system defines UTMP_FILE... " >&6; }
17277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17278 /* end confdefs.h.  */
17279
17280 #include <sys/types.h>
17281 #include <utmp.h>
17282 #ifdef HAVE_PATHS_H
17283 #  include <paths.h>
17284 #endif
17285
17286 int
17287 main ()
17288 {
17289  char *utmp = UTMP_FILE;
17290   ;
17291   return 0;
17292 }
17293 _ACEOF
17294 if ac_fn_c_try_compile "$LINENO"; then :
17295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17296 $as_echo "yes" >&6; }
17297 else
17298    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17299 $as_echo "no" >&6; }
17300           system_utmp_path=no
17301
17302 fi
17303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17304 if test -z "$conf_utmp_location"; then
17305         if test x"$system_utmp_path" = x"no" ; then
17306                 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
17307                         if test -f $f ; then
17308                                 conf_utmp_location=$f
17309                         fi
17310                 done
17311                 if test -z "$conf_utmp_location"; then
17312                         $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
17313
17314                 fi
17315         fi
17316 fi
17317 if test -n "$conf_utmp_location"; then
17318
17319 cat >>confdefs.h <<_ACEOF
17320 #define CONF_UTMP_FILE "$conf_utmp_location"
17321 _ACEOF
17322
17323 fi
17324
17325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMP_FILE" >&5
17326 $as_echo_n "checking if your system defines WTMP_FILE... " >&6; }
17327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17328 /* end confdefs.h.  */
17329
17330 #include <sys/types.h>
17331 #include <utmp.h>
17332 #ifdef HAVE_PATHS_H
17333 #  include <paths.h>
17334 #endif
17335
17336 int
17337 main ()
17338 {
17339  char *wtmp = WTMP_FILE;
17340   ;
17341   return 0;
17342 }
17343 _ACEOF
17344 if ac_fn_c_try_compile "$LINENO"; then :
17345    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17346 $as_echo "yes" >&6; }
17347 else
17348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17349 $as_echo "no" >&6; }
17350           system_wtmp_path=no
17351
17352 fi
17353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17354 if test -z "$conf_wtmp_location"; then
17355         if test x"$system_wtmp_path" = x"no" ; then
17356                 for f in /usr/adm/wtmp /var/log/wtmp; do
17357                         if test -f $f ; then
17358                                 conf_wtmp_location=$f
17359                         fi
17360                 done
17361                 if test -z "$conf_wtmp_location"; then
17362                         $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
17363
17364                 fi
17365         fi
17366 fi
17367 if test -n "$conf_wtmp_location"; then
17368
17369 cat >>confdefs.h <<_ACEOF
17370 #define CONF_WTMP_FILE "$conf_wtmp_location"
17371 _ACEOF
17372
17373 fi
17374
17375 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMPX_FILE" >&5
17376 $as_echo_n "checking if your system defines WTMPX_FILE... " >&6; }
17377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17378 /* end confdefs.h.  */
17379
17380 #include <sys/types.h>
17381 #include <utmp.h>
17382 #ifdef HAVE_UTMPX_H
17383 #include <utmpx.h>
17384 #endif
17385 #ifdef HAVE_PATHS_H
17386 #  include <paths.h>
17387 #endif
17388
17389 int
17390 main ()
17391 {
17392  char *wtmpx = WTMPX_FILE;
17393   ;
17394   return 0;
17395 }
17396 _ACEOF
17397 if ac_fn_c_try_compile "$LINENO"; then :
17398    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17399 $as_echo "yes" >&6; }
17400 else
17401    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17402 $as_echo "no" >&6; }
17403           system_wtmpx_path=no
17404
17405 fi
17406 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17407 if test -z "$conf_wtmpx_location"; then
17408         if test x"$system_wtmpx_path" = x"no" ; then
17409                 $as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
17410
17411         fi
17412 else
17413
17414 cat >>confdefs.h <<_ACEOF
17415 #define CONF_WTMPX_FILE "$conf_wtmpx_location"
17416 _ACEOF
17417
17418 fi
17419
17420
17421 if test ! -z "$blibpath" ; then
17422         LDFLAGS="$LDFLAGS $blibflags$blibpath"
17423         { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&5
17424 $as_echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;}
17425 fi
17426
17427 ac_fn_c_check_member "$LINENO" "struct lastlog" "ll_line" "ac_cv_member_struct_lastlog_ll_line" "
17428 #ifdef HAVE_SYS_TYPES_H
17429 #include <sys/types.h>
17430 #endif
17431 #ifdef HAVE_UTMP_H
17432 #include <utmp.h>
17433 #endif
17434 #ifdef HAVE_UTMPX_H
17435 #include <utmpx.h>
17436 #endif
17437 #ifdef HAVE_LASTLOG_H
17438 #include <lastlog.h>
17439 #endif
17440
17441 "
17442 if test "x$ac_cv_member_struct_lastlog_ll_line" = xyes; then :
17443
17444 else
17445
17446     if test x$SKIP_DISABLE_LASTLOG_DEFINE != "xyes" ; then
17447         $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
17448
17449     fi
17450
17451 fi
17452
17453
17454 ac_fn_c_check_member "$LINENO" "struct utmp" "ut_line" "ac_cv_member_struct_utmp_ut_line" "
17455 #ifdef HAVE_SYS_TYPES_H
17456 #include <sys/types.h>
17457 #endif
17458 #ifdef HAVE_UTMP_H
17459 #include <utmp.h>
17460 #endif
17461 #ifdef HAVE_UTMPX_H
17462 #include <utmpx.h>
17463 #endif
17464 #ifdef HAVE_LASTLOG_H
17465 #include <lastlog.h>
17466 #endif
17467
17468 "
17469 if test "x$ac_cv_member_struct_utmp_ut_line" = xyes; then :
17470
17471 else
17472
17473         $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
17474
17475         $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
17476
17477
17478 fi
17479
17480
17481 CFLAGS="$CFLAGS $werror_flags"
17482
17483 if test "x$ac_cv_func_getaddrinfo" != "xyes" ; then
17484         TEST_SSH_IPV6=no
17485 else
17486         TEST_SSH_IPV6=yes
17487 fi
17488 ac_fn_c_check_decl "$LINENO" "BROKEN_GETADDRINFO" "ac_cv_have_decl_BROKEN_GETADDRINFO" "$ac_includes_default"
17489 if test "x$ac_cv_have_decl_BROKEN_GETADDRINFO" = xyes; then :
17490   TEST_SSH_IPV6=no
17491 fi
17492
17493 TEST_SSH_IPV6=$TEST_SSH_IPV6
17494
17495 UNSUPPORTED_ALGORITHMS=$unsupported_algorithms
17496
17497
17498
17499 ac_config_files="$ac_config_files Makefile buildpkg.sh opensshd.init openssh.xml openbsd-compat/Makefile openbsd-compat/regress/Makefile survey.sh"
17500
17501 cat >confcache <<\_ACEOF
17502 # This file is a shell script that caches the results of configure
17503 # tests run on this system so they can be shared between configure
17504 # scripts and configure runs, see configure's option --config-cache.
17505 # It is not useful on other systems.  If it contains results you don't
17506 # want to keep, you may remove or edit it.
17507 #
17508 # config.status only pays attention to the cache file if you give it
17509 # the --recheck option to rerun configure.
17510 #
17511 # `ac_cv_env_foo' variables (set or unset) will be overridden when
17512 # loading this file, other *unset* `ac_cv_foo' will be assigned the
17513 # following values.
17514
17515 _ACEOF
17516
17517 # The following way of writing the cache mishandles newlines in values,
17518 # but we know of no workaround that is simple, portable, and efficient.
17519 # So, we kill variables containing newlines.
17520 # Ultrix sh set writes to stderr and can't be redirected directly,
17521 # and sets the high bit in the cache file unless we assign to the vars.
17522 (
17523   for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
17524     eval ac_val=\$$ac_var
17525     case $ac_val in #(
17526     *${as_nl}*)
17527       case $ac_var in #(
17528       *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
17529 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
17530       esac
17531       case $ac_var in #(
17532       _ | IFS | as_nl) ;; #(
17533       BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
17534       *) { eval $ac_var=; unset $ac_var;} ;;
17535       esac ;;
17536     esac
17537   done
17538
17539   (set) 2>&1 |
17540     case $as_nl`(ac_space=' '; set) 2>&1` in #(
17541     *${as_nl}ac_space=\ *)
17542       # `set' does not quote correctly, so add quotes: double-quote
17543       # substitution turns \\\\ into \\, and sed turns \\ into \.
17544       sed -n \
17545         "s/'/'\\\\''/g;
17546           s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
17547       ;; #(
17548     *)
17549       # `set' quotes correctly as required by POSIX, so do not add quotes.
17550       sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
17551       ;;
17552     esac |
17553     sort
17554 ) |
17555   sed '
17556      /^ac_cv_env_/b end
17557      t clear
17558      :clear
17559      s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
17560      t end
17561      s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
17562      :end' >>confcache
17563 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
17564   if test -w "$cache_file"; then
17565     if test "x$cache_file" != "x/dev/null"; then
17566       { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
17567 $as_echo "$as_me: updating cache $cache_file" >&6;}
17568       if test ! -f "$cache_file" || test -h "$cache_file"; then
17569         cat confcache >"$cache_file"
17570       else
17571         case $cache_file in #(
17572         */* | ?:*)
17573           mv -f confcache "$cache_file"$$ &&
17574           mv -f "$cache_file"$$ "$cache_file" ;; #(
17575         *)
17576           mv -f confcache "$cache_file" ;;
17577         esac
17578       fi
17579     fi
17580   else
17581     { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
17582 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
17583   fi
17584 fi
17585 rm -f confcache
17586
17587 test "x$prefix" = xNONE && prefix=$ac_default_prefix
17588 # Let make expand exec_prefix.
17589 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
17590
17591 DEFS=-DHAVE_CONFIG_H
17592
17593 ac_libobjs=
17594 ac_ltlibobjs=
17595 U=
17596 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
17597   # 1. Remove the extension, and $U if already installed.
17598   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
17599   ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
17600   # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
17601   #    will be set to the directory where LIBOBJS objects are built.
17602   as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
17603   as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
17604 done
17605 LIBOBJS=$ac_libobjs
17606
17607 LTLIBOBJS=$ac_ltlibobjs
17608
17609
17610
17611
17612 : "${CONFIG_STATUS=./config.status}"
17613 ac_write_fail=0
17614 ac_clean_files_save=$ac_clean_files
17615 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
17616 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
17617 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
17618 as_write_fail=0
17619 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
17620 #! $SHELL
17621 # Generated by $as_me.
17622 # Run this file to recreate the current configuration.
17623 # Compiler output produced by configure, useful for debugging
17624 # configure, is in config.log if it exists.
17625
17626 debug=false
17627 ac_cs_recheck=false
17628 ac_cs_silent=false
17629
17630 SHELL=\${CONFIG_SHELL-$SHELL}
17631 export SHELL
17632 _ASEOF
17633 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
17634 ## -------------------- ##
17635 ## M4sh Initialization. ##
17636 ## -------------------- ##
17637
17638 # Be more Bourne compatible
17639 DUALCASE=1; export DUALCASE # for MKS sh
17640 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
17641   emulate sh
17642   NULLCMD=:
17643   # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
17644   # is contrary to our usage.  Disable this feature.
17645   alias -g '${1+"$@"}'='"$@"'
17646   setopt NO_GLOB_SUBST
17647 else
17648   case `(set -o) 2>/dev/null` in #(
17649   *posix*) :
17650     set -o posix ;; #(
17651   *) :
17652      ;;
17653 esac
17654 fi
17655
17656
17657 as_nl='
17658 '
17659 export as_nl
17660 # Printing a long string crashes Solaris 7 /usr/bin/printf.
17661 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
17662 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
17663 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
17664 # Prefer a ksh shell builtin over an external printf program on Solaris,
17665 # but without wasting forks for bash or zsh.
17666 if test -z "$BASH_VERSION$ZSH_VERSION" \
17667     && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
17668   as_echo='print -r --'
17669   as_echo_n='print -rn --'
17670 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
17671   as_echo='printf %s\n'
17672   as_echo_n='printf %s'
17673 else
17674   if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
17675     as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
17676     as_echo_n='/usr/ucb/echo -n'
17677   else
17678     as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
17679     as_echo_n_body='eval
17680       arg=$1;
17681       case $arg in #(
17682       *"$as_nl"*)
17683         expr "X$arg" : "X\\(.*\\)$as_nl";
17684         arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
17685       esac;
17686       expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
17687     '
17688     export as_echo_n_body
17689     as_echo_n='sh -c $as_echo_n_body as_echo'
17690   fi
17691   export as_echo_body
17692   as_echo='sh -c $as_echo_body as_echo'
17693 fi
17694
17695 # The user is always right.
17696 if test "${PATH_SEPARATOR+set}" != set; then
17697   PATH_SEPARATOR=:
17698   (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
17699     (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
17700       PATH_SEPARATOR=';'
17701   }
17702 fi
17703
17704
17705 # IFS
17706 # We need space, tab and new line, in precisely that order.  Quoting is
17707 # there to prevent editors from complaining about space-tab.
17708 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
17709 # splitting by setting IFS to empty value.)
17710 IFS=" ""        $as_nl"
17711
17712 # Find who we are.  Look in the path if we contain no directory separator.
17713 as_myself=
17714 case $0 in #((
17715   *[\\/]* ) as_myself=$0 ;;
17716   *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17717 for as_dir in $PATH
17718 do
17719   IFS=$as_save_IFS
17720   test -z "$as_dir" && as_dir=.
17721     test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
17722   done
17723 IFS=$as_save_IFS
17724
17725      ;;
17726 esac
17727 # We did not find ourselves, most probably we were run as `sh COMMAND'
17728 # in which case we are not to be found in the path.
17729 if test "x$as_myself" = x; then
17730   as_myself=$0
17731 fi
17732 if test ! -f "$as_myself"; then
17733   $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
17734   exit 1
17735 fi
17736
17737 # Unset variables that we do not need and which cause bugs (e.g. in
17738 # pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
17739 # suppresses any "Segmentation fault" message there.  '((' could
17740 # trigger a bug in pdksh 5.2.14.
17741 for as_var in BASH_ENV ENV MAIL MAILPATH
17742 do eval test x\${$as_var+set} = xset \
17743   && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
17744 done
17745 PS1='$ '
17746 PS2='> '
17747 PS4='+ '
17748
17749 # NLS nuisances.
17750 LC_ALL=C
17751 export LC_ALL
17752 LANGUAGE=C
17753 export LANGUAGE
17754
17755 # CDPATH.
17756 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
17757
17758
17759 # as_fn_error STATUS ERROR [LINENO LOG_FD]
17760 # ----------------------------------------
17761 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
17762 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
17763 # script with STATUS, using 1 if that was 0.
17764 as_fn_error ()
17765 {
17766   as_status=$1; test $as_status -eq 0 && as_status=1
17767   if test "$4"; then
17768     as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
17769     $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
17770   fi
17771   $as_echo "$as_me: error: $2" >&2
17772   as_fn_exit $as_status
17773 } # as_fn_error
17774
17775
17776 # as_fn_set_status STATUS
17777 # -----------------------
17778 # Set $? to STATUS, without forking.
17779 as_fn_set_status ()
17780 {
17781   return $1
17782 } # as_fn_set_status
17783
17784 # as_fn_exit STATUS
17785 # -----------------
17786 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
17787 as_fn_exit ()
17788 {
17789   set +e
17790   as_fn_set_status $1
17791   exit $1
17792 } # as_fn_exit
17793
17794 # as_fn_unset VAR
17795 # ---------------
17796 # Portably unset VAR.
17797 as_fn_unset ()
17798 {
17799   { eval $1=; unset $1;}
17800 }
17801 as_unset=as_fn_unset
17802 # as_fn_append VAR VALUE
17803 # ----------------------
17804 # Append the text in VALUE to the end of the definition contained in VAR. Take
17805 # advantage of any shell optimizations that allow amortized linear growth over
17806 # repeated appends, instead of the typical quadratic growth present in naive
17807 # implementations.
17808 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
17809   eval 'as_fn_append ()
17810   {
17811     eval $1+=\$2
17812   }'
17813 else
17814   as_fn_append ()
17815   {
17816     eval $1=\$$1\$2
17817   }
17818 fi # as_fn_append
17819
17820 # as_fn_arith ARG...
17821 # ------------------
17822 # Perform arithmetic evaluation on the ARGs, and store the result in the
17823 # global $as_val. Take advantage of shells that can avoid forks. The arguments
17824 # must be portable across $(()) and expr.
17825 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
17826   eval 'as_fn_arith ()
17827   {
17828     as_val=$(( $* ))
17829   }'
17830 else
17831   as_fn_arith ()
17832   {
17833     as_val=`expr "$@" || test $? -eq 1`
17834   }
17835 fi # as_fn_arith
17836
17837
17838 if expr a : '\(a\)' >/dev/null 2>&1 &&
17839    test "X`expr 00001 : '.*\(...\)'`" = X001; then
17840   as_expr=expr
17841 else
17842   as_expr=false
17843 fi
17844
17845 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
17846   as_basename=basename
17847 else
17848   as_basename=false
17849 fi
17850
17851 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
17852   as_dirname=dirname
17853 else
17854   as_dirname=false
17855 fi
17856
17857 as_me=`$as_basename -- "$0" ||
17858 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
17859          X"$0" : 'X\(//\)$' \| \
17860          X"$0" : 'X\(/\)' \| . 2>/dev/null ||
17861 $as_echo X/"$0" |
17862     sed '/^.*\/\([^/][^/]*\)\/*$/{
17863             s//\1/
17864             q
17865           }
17866           /^X\/\(\/\/\)$/{
17867             s//\1/
17868             q
17869           }
17870           /^X\/\(\/\).*/{
17871             s//\1/
17872             q
17873           }
17874           s/.*/./; q'`
17875
17876 # Avoid depending upon Character Ranges.
17877 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
17878 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
17879 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
17880 as_cr_digits='0123456789'
17881 as_cr_alnum=$as_cr_Letters$as_cr_digits
17882
17883 ECHO_C= ECHO_N= ECHO_T=
17884 case `echo -n x` in #(((((
17885 -n*)
17886   case `echo 'xy\c'` in
17887   *c*) ECHO_T=' ';;     # ECHO_T is single tab character.
17888   xy)  ECHO_C='\c';;
17889   *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
17890        ECHO_T=' ';;
17891   esac;;
17892 *)
17893   ECHO_N='-n';;
17894 esac
17895
17896 rm -f conf$$ conf$$.exe conf$$.file
17897 if test -d conf$$.dir; then
17898   rm -f conf$$.dir/conf$$.file
17899 else
17900   rm -f conf$$.dir
17901   mkdir conf$$.dir 2>/dev/null
17902 fi
17903 if (echo >conf$$.file) 2>/dev/null; then
17904   if ln -s conf$$.file conf$$ 2>/dev/null; then
17905     as_ln_s='ln -s'
17906     # ... but there are two gotchas:
17907     # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
17908     # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
17909     # In both cases, we have to default to `cp -p'.
17910     ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
17911       as_ln_s='cp -p'
17912   elif ln conf$$.file conf$$ 2>/dev/null; then
17913     as_ln_s=ln
17914   else
17915     as_ln_s='cp -p'
17916   fi
17917 else
17918   as_ln_s='cp -p'
17919 fi
17920 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
17921 rmdir conf$$.dir 2>/dev/null
17922
17923
17924 # as_fn_mkdir_p
17925 # -------------
17926 # Create "$as_dir" as a directory, including parents if necessary.
17927 as_fn_mkdir_p ()
17928 {
17929
17930   case $as_dir in #(
17931   -*) as_dir=./$as_dir;;
17932   esac
17933   test -d "$as_dir" || eval $as_mkdir_p || {
17934     as_dirs=
17935     while :; do
17936       case $as_dir in #(
17937       *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
17938       *) as_qdir=$as_dir;;
17939       esac
17940       as_dirs="'$as_qdir' $as_dirs"
17941       as_dir=`$as_dirname -- "$as_dir" ||
17942 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
17943          X"$as_dir" : 'X\(//\)[^/]' \| \
17944          X"$as_dir" : 'X\(//\)$' \| \
17945          X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
17946 $as_echo X"$as_dir" |
17947     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
17948             s//\1/
17949             q
17950           }
17951           /^X\(\/\/\)[^/].*/{
17952             s//\1/
17953             q
17954           }
17955           /^X\(\/\/\)$/{
17956             s//\1/
17957             q
17958           }
17959           /^X\(\/\).*/{
17960             s//\1/
17961             q
17962           }
17963           s/.*/./; q'`
17964       test -d "$as_dir" && break
17965     done
17966     test -z "$as_dirs" || eval "mkdir $as_dirs"
17967   } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
17968
17969
17970 } # as_fn_mkdir_p
17971 if mkdir -p . 2>/dev/null; then
17972   as_mkdir_p='mkdir -p "$as_dir"'
17973 else
17974   test -d ./-p && rmdir ./-p
17975   as_mkdir_p=false
17976 fi
17977
17978 if test -x / >/dev/null 2>&1; then
17979   as_test_x='test -x'
17980 else
17981   if ls -dL / >/dev/null 2>&1; then
17982     as_ls_L_option=L
17983   else
17984     as_ls_L_option=
17985   fi
17986   as_test_x='
17987     eval sh -c '\''
17988       if test -d "$1"; then
17989         test -d "$1/.";
17990       else
17991         case $1 in #(
17992         -*)set "./$1";;
17993         esac;
17994         case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
17995         ???[sx]*):;;*)false;;esac;fi
17996     '\'' sh
17997   '
17998 fi
17999 as_executable_p=$as_test_x
18000
18001 # Sed expression to map a string onto a valid CPP name.
18002 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
18003
18004 # Sed expression to map a string onto a valid variable name.
18005 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
18006
18007
18008 exec 6>&1
18009 ## ----------------------------------- ##
18010 ## Main body of $CONFIG_STATUS script. ##
18011 ## ----------------------------------- ##
18012 _ASEOF
18013 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
18014
18015 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18016 # Save the log message, to keep $0 and so on meaningful, and to
18017 # report actual input values of CONFIG_FILES etc. instead of their
18018 # values after options handling.
18019 ac_log="
18020 This file was extended by OpenSSH $as_me Portable, which was
18021 generated by GNU Autoconf 2.68.  Invocation command line was
18022
18023   CONFIG_FILES    = $CONFIG_FILES
18024   CONFIG_HEADERS  = $CONFIG_HEADERS
18025   CONFIG_LINKS    = $CONFIG_LINKS
18026   CONFIG_COMMANDS = $CONFIG_COMMANDS
18027   $ $0 $@
18028
18029 on `(hostname || uname -n) 2>/dev/null | sed 1q`
18030 "
18031
18032 _ACEOF
18033
18034 case $ac_config_files in *"
18035 "*) set x $ac_config_files; shift; ac_config_files=$*;;
18036 esac
18037
18038 case $ac_config_headers in *"
18039 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
18040 esac
18041
18042
18043 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18044 # Files that config.status was made for.
18045 config_files="$ac_config_files"
18046 config_headers="$ac_config_headers"
18047
18048 _ACEOF
18049
18050 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18051 ac_cs_usage="\
18052 \`$as_me' instantiates files and other configuration actions
18053 from templates according to the current configuration.  Unless the files
18054 and actions are specified as TAGs, all are instantiated by default.
18055
18056 Usage: $0 [OPTION]... [TAG]...
18057
18058   -h, --help       print this help, then exit
18059   -V, --version    print version number and configuration settings, then exit
18060       --config     print configuration, then exit
18061   -q, --quiet, --silent
18062                    do not print progress messages
18063   -d, --debug      don't remove temporary files
18064       --recheck    update $as_me by reconfiguring in the same conditions
18065       --file=FILE[:TEMPLATE]
18066                    instantiate the configuration file FILE
18067       --header=FILE[:TEMPLATE]
18068                    instantiate the configuration header FILE
18069
18070 Configuration files:
18071 $config_files
18072
18073 Configuration headers:
18074 $config_headers
18075
18076 Report bugs to <openssh-unix-dev@mindrot.org>."
18077
18078 _ACEOF
18079 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18080 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
18081 ac_cs_version="\\
18082 OpenSSH config.status Portable
18083 configured by $0, generated by GNU Autoconf 2.68,
18084   with options \\"\$ac_cs_config\\"
18085
18086 Copyright (C) 2010 Free Software Foundation, Inc.
18087 This config.status script is free software; the Free Software Foundation
18088 gives unlimited permission to copy, distribute and modify it."
18089
18090 ac_pwd='$ac_pwd'
18091 srcdir='$srcdir'
18092 INSTALL='$INSTALL'
18093 AWK='$AWK'
18094 test -n "\$AWK" || AWK=awk
18095 _ACEOF
18096
18097 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18098 # The default lists apply if the user does not specify any file.
18099 ac_need_defaults=:
18100 while test $# != 0
18101 do
18102   case $1 in
18103   --*=?*)
18104     ac_option=`expr "X$1" : 'X\([^=]*\)='`
18105     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
18106     ac_shift=:
18107     ;;
18108   --*=)
18109     ac_option=`expr "X$1" : 'X\([^=]*\)='`
18110     ac_optarg=
18111     ac_shift=:
18112     ;;
18113   *)
18114     ac_option=$1
18115     ac_optarg=$2
18116     ac_shift=shift
18117     ;;
18118   esac
18119
18120   case $ac_option in
18121   # Handling of the options.
18122   -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
18123     ac_cs_recheck=: ;;
18124   --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
18125     $as_echo "$ac_cs_version"; exit ;;
18126   --config | --confi | --conf | --con | --co | --c )
18127     $as_echo "$ac_cs_config"; exit ;;
18128   --debug | --debu | --deb | --de | --d | -d )
18129     debug=: ;;
18130   --file | --fil | --fi | --f )
18131     $ac_shift
18132     case $ac_optarg in
18133     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18134     '') as_fn_error $? "missing file argument" ;;
18135     esac
18136     as_fn_append CONFIG_FILES " '$ac_optarg'"
18137     ac_need_defaults=false;;
18138   --header | --heade | --head | --hea )
18139     $ac_shift
18140     case $ac_optarg in
18141     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
18142     esac
18143     as_fn_append CONFIG_HEADERS " '$ac_optarg'"
18144     ac_need_defaults=false;;
18145   --he | --h)
18146     # Conflict between --help and --header
18147     as_fn_error $? "ambiguous option: \`$1'
18148 Try \`$0 --help' for more information.";;
18149   --help | --hel | -h )
18150     $as_echo "$ac_cs_usage"; exit ;;
18151   -q | -quiet | --quiet | --quie | --qui | --qu | --q \
18152   | -silent | --silent | --silen | --sile | --sil | --si | --s)
18153     ac_cs_silent=: ;;
18154
18155   # This is an error.
18156   -*) as_fn_error $? "unrecognized option: \`$1'
18157 Try \`$0 --help' for more information." ;;
18158
18159   *) as_fn_append ac_config_targets " $1"
18160      ac_need_defaults=false ;;
18161
18162   esac
18163   shift
18164 done
18165
18166 ac_configure_extra_args=
18167
18168 if $ac_cs_silent; then
18169   exec 6>/dev/null
18170   ac_configure_extra_args="$ac_configure_extra_args --silent"
18171 fi
18172
18173 _ACEOF
18174 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18175 if \$ac_cs_recheck; then
18176   set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
18177   shift
18178   \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
18179   CONFIG_SHELL='$SHELL'
18180   export CONFIG_SHELL
18181   exec "\$@"
18182 fi
18183
18184 _ACEOF
18185 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18186 exec 5>>config.log
18187 {
18188   echo
18189   sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
18190 ## Running $as_me. ##
18191 _ASBOX
18192   $as_echo "$ac_log"
18193 } >&5
18194
18195 _ACEOF
18196 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18197 _ACEOF
18198
18199 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18200
18201 # Handling of arguments.
18202 for ac_config_target in $ac_config_targets
18203 do
18204   case $ac_config_target in
18205     "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
18206     "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
18207     "buildpkg.sh") CONFIG_FILES="$CONFIG_FILES buildpkg.sh" ;;
18208     "opensshd.init") CONFIG_FILES="$CONFIG_FILES opensshd.init" ;;
18209     "openssh.xml") CONFIG_FILES="$CONFIG_FILES openssh.xml" ;;
18210     "openbsd-compat/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;;
18211     "openbsd-compat/regress/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/regress/Makefile" ;;
18212     "survey.sh") CONFIG_FILES="$CONFIG_FILES survey.sh" ;;
18213
18214   *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
18215   esac
18216 done
18217
18218
18219 # If the user did not use the arguments to specify the items to instantiate,
18220 # then the envvar interface is used.  Set only those that are not.
18221 # We use the long form for the default assignment because of an extremely
18222 # bizarre bug on SunOS 4.1.3.
18223 if $ac_need_defaults; then
18224   test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
18225   test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
18226 fi
18227
18228 # Have a temporary directory for convenience.  Make it in the build tree
18229 # simply because there is no reason against having it here, and in addition,
18230 # creating and moving files from /tmp can sometimes cause problems.
18231 # Hook for its removal unless debugging.
18232 # Note that there is a small window in which the directory will not be cleaned:
18233 # after its creation but before its name has been assigned to `$tmp'.
18234 $debug ||
18235 {
18236   tmp= ac_tmp=
18237   trap 'exit_status=$?
18238   : "${ac_tmp:=$tmp}"
18239   { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
18240 ' 0
18241   trap 'as_fn_exit 1' 1 2 13 15
18242 }
18243 # Create a (secure) tmp directory for tmp files.
18244
18245 {
18246   tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
18247   test -d "$tmp"
18248 }  ||
18249 {
18250   tmp=./conf$$-$RANDOM
18251   (umask 077 && mkdir "$tmp")
18252 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
18253 ac_tmp=$tmp
18254
18255 # Set up the scripts for CONFIG_FILES section.
18256 # No need to generate them if there are no CONFIG_FILES.
18257 # This happens for instance with `./config.status config.h'.
18258 if test -n "$CONFIG_FILES"; then
18259
18260
18261 ac_cr=`echo X | tr X '\015'`
18262 # On cygwin, bash can eat \r inside `` if the user requested igncr.
18263 # But we know of no other shell where ac_cr would be empty at this
18264 # point, so we can use a bashism as a fallback.
18265 if test "x$ac_cr" = x; then
18266   eval ac_cr=\$\'\\r\'
18267 fi
18268 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
18269 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
18270   ac_cs_awk_cr='\\r'
18271 else
18272   ac_cs_awk_cr=$ac_cr
18273 fi
18274
18275 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
18276 _ACEOF
18277
18278
18279 {
18280   echo "cat >conf$$subs.awk <<_ACEOF" &&
18281   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
18282   echo "_ACEOF"
18283 } >conf$$subs.sh ||
18284   as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18285 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
18286 ac_delim='%!_!# '
18287 for ac_last_try in false false false false false :; do
18288   . ./conf$$subs.sh ||
18289     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18290
18291   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
18292   if test $ac_delim_n = $ac_delim_num; then
18293     break
18294   elif $ac_last_try; then
18295     as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
18296   else
18297     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18298   fi
18299 done
18300 rm -f conf$$subs.sh
18301
18302 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18303 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
18304 _ACEOF
18305 sed -n '
18306 h
18307 s/^/S["/; s/!.*/"]=/
18308 p
18309 g
18310 s/^[^!]*!//
18311 :repl
18312 t repl
18313 s/'"$ac_delim"'$//
18314 t delim
18315 :nl
18316 h
18317 s/\(.\{148\}\)..*/\1/
18318 t more1
18319 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
18320 p
18321 n
18322 b repl
18323 :more1
18324 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18325 p
18326 g
18327 s/.\{148\}//
18328 t nl
18329 :delim
18330 h
18331 s/\(.\{148\}\)..*/\1/
18332 t more2
18333 s/["\\]/\\&/g; s/^/"/; s/$/"/
18334 p
18335 b
18336 :more2
18337 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
18338 p
18339 g
18340 s/.\{148\}//
18341 t delim
18342 ' <conf$$subs.awk | sed '
18343 /^[^""]/{
18344   N
18345   s/\n//
18346 }
18347 ' >>$CONFIG_STATUS || ac_write_fail=1
18348 rm -f conf$$subs.awk
18349 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18350 _ACAWK
18351 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
18352   for (key in S) S_is_set[key] = 1
18353   FS = "\a"
18354
18355 }
18356 {
18357   line = $ 0
18358   nfields = split(line, field, "@")
18359   substed = 0
18360   len = length(field[1])
18361   for (i = 2; i < nfields; i++) {
18362     key = field[i]
18363     keylen = length(key)
18364     if (S_is_set[key]) {
18365       value = S[key]
18366       line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
18367       len += length(value) + length(field[++i])
18368       substed = 1
18369     } else
18370       len += 1 + keylen
18371   }
18372
18373   print line
18374 }
18375
18376 _ACAWK
18377 _ACEOF
18378 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18379 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
18380   sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
18381 else
18382   cat
18383 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
18384   || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
18385 _ACEOF
18386
18387 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
18388 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
18389 # trailing colons and then remove the whole line if VPATH becomes empty
18390 # (actually we leave an empty line to preserve line numbers).
18391 if test "x$srcdir" = x.; then
18392   ac_vpsub='/^[  ]*VPATH[        ]*=[    ]*/{
18393 h
18394 s///
18395 s/^/:/
18396 s/[      ]*$/:/
18397 s/:\$(srcdir):/:/g
18398 s/:\${srcdir}:/:/g
18399 s/:@srcdir@:/:/g
18400 s/^:*//
18401 s/:*$//
18402 x
18403 s/\(=[   ]*\).*/\1/
18404 G
18405 s/\n//
18406 s/^[^=]*=[       ]*$//
18407 }'
18408 fi
18409
18410 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18411 fi # test -n "$CONFIG_FILES"
18412
18413 # Set up the scripts for CONFIG_HEADERS section.
18414 # No need to generate them if there are no CONFIG_HEADERS.
18415 # This happens for instance with `./config.status Makefile'.
18416 if test -n "$CONFIG_HEADERS"; then
18417 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
18418 BEGIN {
18419 _ACEOF
18420
18421 # Transform confdefs.h into an awk script `defines.awk', embedded as
18422 # here-document in config.status, that substitutes the proper values into
18423 # config.h.in to produce config.h.
18424
18425 # Create a delimiter string that does not exist in confdefs.h, to ease
18426 # handling of long lines.
18427 ac_delim='%!_!# '
18428 for ac_last_try in false false :; do
18429   ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
18430   if test -z "$ac_tt"; then
18431     break
18432   elif $ac_last_try; then
18433     as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
18434   else
18435     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
18436   fi
18437 done
18438
18439 # For the awk script, D is an array of macro values keyed by name,
18440 # likewise P contains macro parameters if any.  Preserve backslash
18441 # newline sequences.
18442
18443 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
18444 sed -n '
18445 s/.\{148\}/&'"$ac_delim"'/g
18446 t rset
18447 :rset
18448 s/^[     ]*#[    ]*define[       ][      ]*/ /
18449 t def
18450 d
18451 :def
18452 s/\\$//
18453 t bsnl
18454 s/["\\]/\\&/g
18455 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
18456 D["\1"]=" \3"/p
18457 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2"/p
18458 d
18459 :bsnl
18460 s/["\\]/\\&/g
18461 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[     ]*\(.*\)/P["\1"]="\2"\
18462 D["\1"]=" \3\\\\\\n"\\/p
18463 t cont
18464 s/^ \('"$ac_word_re"'\)[         ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
18465 t cont
18466 d
18467 :cont
18468 n
18469 s/.\{148\}/&'"$ac_delim"'/g
18470 t clear
18471 :clear
18472 s/\\$//
18473 t bsnlc
18474 s/["\\]/\\&/g; s/^/"/; s/$/"/p
18475 d
18476 :bsnlc
18477 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
18478 b cont
18479 ' <confdefs.h | sed '
18480 s/'"$ac_delim"'/"\\\
18481 "/g' >>$CONFIG_STATUS || ac_write_fail=1
18482
18483 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18484   for (key in D) D_is_set[key] = 1
18485   FS = "\a"
18486 }
18487 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
18488   line = \$ 0
18489   split(line, arg, " ")
18490   if (arg[1] == "#") {
18491     defundef = arg[2]
18492     mac1 = arg[3]
18493   } else {
18494     defundef = substr(arg[1], 2)
18495     mac1 = arg[2]
18496   }
18497   split(mac1, mac2, "(") #)
18498   macro = mac2[1]
18499   prefix = substr(line, 1, index(line, defundef) - 1)
18500   if (D_is_set[macro]) {
18501     # Preserve the white space surrounding the "#".
18502     print prefix "define", macro P[macro] D[macro]
18503     next
18504   } else {
18505     # Replace #undef with comments.  This is necessary, for example,
18506     # in the case of _POSIX_SOURCE, which is predefined and required
18507     # on some systems where configure will not decide to define it.
18508     if (defundef == "undef") {
18509       print "/*", prefix defundef, macro, "*/"
18510       next
18511     }
18512   }
18513 }
18514 { print }
18515 _ACAWK
18516 _ACEOF
18517 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18518   as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
18519 fi # test -n "$CONFIG_HEADERS"
18520
18521
18522 eval set X "  :F $CONFIG_FILES  :H $CONFIG_HEADERS    "
18523 shift
18524 for ac_tag
18525 do
18526   case $ac_tag in
18527   :[FHLC]) ac_mode=$ac_tag; continue;;
18528   esac
18529   case $ac_mode$ac_tag in
18530   :[FHL]*:*);;
18531   :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
18532   :[FH]-) ac_tag=-:-;;
18533   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
18534   esac
18535   ac_save_IFS=$IFS
18536   IFS=:
18537   set x $ac_tag
18538   IFS=$ac_save_IFS
18539   shift
18540   ac_file=$1
18541   shift
18542
18543   case $ac_mode in
18544   :L) ac_source=$1;;
18545   :[FH])
18546     ac_file_inputs=
18547     for ac_f
18548     do
18549       case $ac_f in
18550       -) ac_f="$ac_tmp/stdin";;
18551       *) # Look for the file first in the build tree, then in the source tree
18552          # (if the path is not absolute).  The absolute path cannot be DOS-style,
18553          # because $ac_f cannot contain `:'.
18554          test -f "$ac_f" ||
18555            case $ac_f in
18556            [\\/$]*) false;;
18557            *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
18558            esac ||
18559            as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
18560       esac
18561       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
18562       as_fn_append ac_file_inputs " '$ac_f'"
18563     done
18564
18565     # Let's still pretend it is `configure' which instantiates (i.e., don't
18566     # use $as_me), people would be surprised to read:
18567     #    /* config.h.  Generated by config.status.  */
18568     configure_input='Generated from '`
18569           $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
18570         `' by configure.'
18571     if test x"$ac_file" != x-; then
18572       configure_input="$ac_file.  $configure_input"
18573       { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
18574 $as_echo "$as_me: creating $ac_file" >&6;}
18575     fi
18576     # Neutralize special characters interpreted by sed in replacement strings.
18577     case $configure_input in #(
18578     *\&* | *\|* | *\\* )
18579        ac_sed_conf_input=`$as_echo "$configure_input" |
18580        sed 's/[\\\\&|]/\\\\&/g'`;; #(
18581     *) ac_sed_conf_input=$configure_input;;
18582     esac
18583
18584     case $ac_tag in
18585     *:-:* | *:-) cat >"$ac_tmp/stdin" \
18586       || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
18587     esac
18588     ;;
18589   esac
18590
18591   ac_dir=`$as_dirname -- "$ac_file" ||
18592 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
18593          X"$ac_file" : 'X\(//\)[^/]' \| \
18594          X"$ac_file" : 'X\(//\)$' \| \
18595          X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
18596 $as_echo X"$ac_file" |
18597     sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
18598             s//\1/
18599             q
18600           }
18601           /^X\(\/\/\)[^/].*/{
18602             s//\1/
18603             q
18604           }
18605           /^X\(\/\/\)$/{
18606             s//\1/
18607             q
18608           }
18609           /^X\(\/\).*/{
18610             s//\1/
18611             q
18612           }
18613           s/.*/./; q'`
18614   as_dir="$ac_dir"; as_fn_mkdir_p
18615   ac_builddir=.
18616
18617 case "$ac_dir" in
18618 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
18619 *)
18620   ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
18621   # A ".." for each directory in $ac_dir_suffix.
18622   ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
18623   case $ac_top_builddir_sub in
18624   "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
18625   *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
18626   esac ;;
18627 esac
18628 ac_abs_top_builddir=$ac_pwd
18629 ac_abs_builddir=$ac_pwd$ac_dir_suffix
18630 # for backward compatibility:
18631 ac_top_builddir=$ac_top_build_prefix
18632
18633 case $srcdir in
18634   .)  # We are building in place.
18635     ac_srcdir=.
18636     ac_top_srcdir=$ac_top_builddir_sub
18637     ac_abs_top_srcdir=$ac_pwd ;;
18638   [\\/]* | ?:[\\/]* )  # Absolute name.
18639     ac_srcdir=$srcdir$ac_dir_suffix;
18640     ac_top_srcdir=$srcdir
18641     ac_abs_top_srcdir=$srcdir ;;
18642   *) # Relative name.
18643     ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
18644     ac_top_srcdir=$ac_top_build_prefix$srcdir
18645     ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
18646 esac
18647 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
18648
18649
18650   case $ac_mode in
18651   :F)
18652   #
18653   # CONFIG_FILE
18654   #
18655
18656   case $INSTALL in
18657   [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
18658   *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
18659   esac
18660 _ACEOF
18661
18662 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18663 # If the template does not know about datarootdir, expand it.
18664 # FIXME: This hack should be removed a few years after 2.60.
18665 ac_datarootdir_hack=; ac_datarootdir_seen=
18666 ac_sed_dataroot='
18667 /datarootdir/ {
18668   p
18669   q
18670 }
18671 /@datadir@/p
18672 /@docdir@/p
18673 /@infodir@/p
18674 /@localedir@/p
18675 /@mandir@/p'
18676 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
18677 *datarootdir*) ac_datarootdir_seen=yes;;
18678 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
18679   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
18680 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
18681 _ACEOF
18682 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18683   ac_datarootdir_hack='
18684   s&@datadir@&$datadir&g
18685   s&@docdir@&$docdir&g
18686   s&@infodir@&$infodir&g
18687   s&@localedir@&$localedir&g
18688   s&@mandir@&$mandir&g
18689   s&\\\${datarootdir}&$datarootdir&g' ;;
18690 esac
18691 _ACEOF
18692
18693 # Neutralize VPATH when `$srcdir' = `.'.
18694 # Shell code in configure.ac might set extrasub.
18695 # FIXME: do we really want to maintain this feature?
18696 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
18697 ac_sed_extra="$ac_vpsub
18698 $extrasub
18699 _ACEOF
18700 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
18701 :t
18702 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
18703 s|@configure_input@|$ac_sed_conf_input|;t t
18704 s&@top_builddir@&$ac_top_builddir_sub&;t t
18705 s&@top_build_prefix@&$ac_top_build_prefix&;t t
18706 s&@srcdir@&$ac_srcdir&;t t
18707 s&@abs_srcdir@&$ac_abs_srcdir&;t t
18708 s&@top_srcdir@&$ac_top_srcdir&;t t
18709 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
18710 s&@builddir@&$ac_builddir&;t t
18711 s&@abs_builddir@&$ac_abs_builddir&;t t
18712 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
18713 s&@INSTALL@&$ac_INSTALL&;t t
18714 $ac_datarootdir_hack
18715 "
18716 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
18717   >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18718
18719 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
18720   { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
18721   { ac_out=`sed -n '/^[  ]*datarootdir[  ]*:*=/p' \
18722       "$ac_tmp/out"`; test -z "$ac_out"; } &&
18723   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18724 which seems to be undefined.  Please make sure it is defined" >&5
18725 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
18726 which seems to be undefined.  Please make sure it is defined" >&2;}
18727
18728   rm -f "$ac_tmp/stdin"
18729   case $ac_file in
18730   -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
18731   *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
18732   esac \
18733   || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18734  ;;
18735   :H)
18736   #
18737   # CONFIG_HEADER
18738   #
18739   if test x"$ac_file" != x-; then
18740     {
18741       $as_echo "/* $configure_input  */" \
18742       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
18743     } >"$ac_tmp/config.h" \
18744       || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18745     if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
18746       { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
18747 $as_echo "$as_me: $ac_file is unchanged" >&6;}
18748     else
18749       rm -f "$ac_file"
18750       mv "$ac_tmp/config.h" "$ac_file" \
18751         || as_fn_error $? "could not create $ac_file" "$LINENO" 5
18752     fi
18753   else
18754     $as_echo "/* $configure_input  */" \
18755       && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
18756       || as_fn_error $? "could not create -" "$LINENO" 5
18757   fi
18758  ;;
18759
18760
18761   esac
18762
18763 done # for ac_tag
18764
18765
18766 as_fn_exit 0
18767 _ACEOF
18768 ac_clean_files=$ac_clean_files_save
18769
18770 test $ac_write_fail = 0 ||
18771   as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
18772
18773
18774 # configure is writing to config.log, and then calls config.status.
18775 # config.status does its own redirection, appending to config.log.
18776 # Unfortunately, on DOS this fails, as config.log is still kept open
18777 # by configure, so config.status won't be able to write to it; its
18778 # output is simply discarded.  So we exec the FD to /dev/null,
18779 # effectively closing config.log, so it can be properly (re)opened and
18780 # appended to by config.status.  When coming back to configure, we
18781 # need to make the FD available again.
18782 if test "$no_create" != yes; then
18783   ac_cs_success=:
18784   ac_config_status_args=
18785   test "$silent" = yes &&
18786     ac_config_status_args="$ac_config_status_args --quiet"
18787   exec 5>/dev/null
18788   $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
18789   exec 5>>config.log
18790   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
18791   # would make configure fail if this is the last instruction.
18792   $ac_cs_success || as_fn_exit 1
18793 fi
18794 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
18795   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
18796 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
18797 fi
18798
18799
18800 # Print summary of options
18801
18802 # Someone please show me a better way :)
18803 A=`eval echo ${prefix}` ; A=`eval echo ${A}`
18804 B=`eval echo ${bindir}` ; B=`eval echo ${B}`
18805 C=`eval echo ${sbindir}` ; C=`eval echo ${C}`
18806 D=`eval echo ${sysconfdir}` ; D=`eval echo ${D}`
18807 E=`eval echo ${libexecdir}/ssh-askpass` ; E=`eval echo ${E}`
18808 F=`eval echo ${mandir}/${mansubdir}X` ; F=`eval echo ${F}`
18809 G=`eval echo ${piddir}` ; G=`eval echo ${G}`
18810 H=`eval echo ${PRIVSEP_PATH}` ; H=`eval echo ${H}`
18811 I=`eval echo ${user_path}` ; I=`eval echo ${I}`
18812 J=`eval echo ${superuser_path}` ; J=`eval echo ${J}`
18813
18814 echo ""
18815 echo "OpenSSH has been configured with the following options:"
18816 echo "                     User binaries: $B"
18817 echo "                   System binaries: $C"
18818 echo "               Configuration files: $D"
18819 echo "                   Askpass program: $E"
18820 echo "                      Manual pages: $F"
18821 echo "                          PID file: $G"
18822 echo "  Privilege separation chroot path: $H"
18823 if test "x$external_path_file" = "x/etc/login.conf" ; then
18824 echo "   At runtime, sshd will use the path defined in $external_path_file"
18825 echo "   Make sure the path to scp is present, otherwise scp will not work"
18826 else
18827 echo "            sshd default user PATH: $I"
18828         if test ! -z "$external_path_file"; then
18829 echo "   (If PATH is set in $external_path_file it will be used instead. If"
18830 echo "   used, ensure the path to scp is present, otherwise scp will not work.)"
18831         fi
18832 fi
18833 if test ! -z "$superuser_path" ; then
18834 echo "          sshd superuser user PATH: $J"
18835 fi
18836 echo "                    Manpage format: $MANTYPE"
18837 echo "                       PAM support: $PAM_MSG"
18838 echo "                   OSF SIA support: $SIA_MSG"
18839 echo "                 KerberosV support: $KRB5_MSG"
18840 echo "                   SELinux support: $SELINUX_MSG"
18841 echo "                 Smartcard support: $SCARD_MSG"
18842 echo "                     S/KEY support: $SKEY_MSG"
18843 echo "              TCP Wrappers support: $TCPW_MSG"
18844 echo "              MD5 password support: $MD5_MSG"
18845 echo "                   libedit support: $LIBEDIT_MSG"
18846 echo "  Solaris process contract support: $SPC_MSG"
18847 echo "           Solaris project support: $SP_MSG"
18848 echo "       IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
18849 echo "           Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
18850 echo "                  BSD Auth support: $BSD_AUTH_MSG"
18851 echo "              Random number source: $RAND_MSG"
18852 echo "             Privsep sandbox style: $SANDBOX_STYLE"
18853
18854 echo ""
18855
18856 echo "              Host: ${host}"
18857 echo "          Compiler: ${CC}"
18858 echo "    Compiler flags: ${CFLAGS}"
18859 echo "Preprocessor flags: ${CPPFLAGS}"
18860 echo "      Linker flags: ${LDFLAGS}"
18861 echo "         Libraries: ${LIBS}"
18862 if test ! -z "${SSHDLIBS}"; then
18863 echo "         +for sshd: ${SSHDLIBS}"
18864 fi
18865 if test ! -z "${SSHLIBS}"; then
18866 echo "          +for ssh: ${SSHLIBS}"
18867 fi
18868
18869 echo ""
18870
18871 if test "x$MAKE_PACKAGE_SUPPORTED" = "xyes" ; then
18872         echo "SVR4 style packages are supported with \"make package\""
18873         echo ""
18874 fi
18875
18876 if test "x$PAM_MSG" = "xyes" ; then
18877         echo "PAM is enabled. You may need to install a PAM control file "
18878         echo "for sshd, otherwise password authentication may fail. "
18879         echo "Example PAM control files can be found in the contrib/ "
18880         echo "subdirectory"
18881         echo ""
18882 fi
18883
18884 if test ! -z "$NO_PEERCHECK" ; then
18885         echo "WARNING: the operating system that you are using does not"
18886         echo "appear to support getpeereid(), getpeerucred() or the"
18887         echo "SO_PEERCRED getsockopt() option. These facilities are used to"
18888         echo "enforce security checks to prevent unauthorised connections to"
18889         echo "ssh-agent. Their absence increases the risk that a malicious"
18890         echo "user can connect to your agent."
18891         echo ""
18892 fi
18893
18894 if test "$AUDIT_MODULE" = "bsm" ; then
18895         echo "WARNING: BSM audit support is currently considered EXPERIMENTAL."
18896         echo "See the Solaris section in README.platform for details."
18897 fi