summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2011-09-06 14:56:29 +0100
committerColin Watson <cjwatson@debian.org>2011-09-06 14:56:29 +0100
commit978e62d6f14c60747bddef2cc72d66a9c8b83b54 (patch)
tree89400a44e42d84937deba7864e4964d6c7734da5
parent87c685b8c6a49814fd782288097b3093f975aa72 (diff)
parent3a7e89697ca363de0f64e0d5704c57219294e41c (diff)
* New upstream release (http://www.openssh.org/txt/release-5.9).
- Introduce sandboxing of the pre-auth privsep child using an optional sshd_config(5) "UsePrivilegeSeparation=sandbox" mode that enables mandatory restrictions on the syscalls the privsep child can perform. - Add new SHA256-based HMAC transport integrity modes from http://www.ietf.org/id/draft-dbider-sha2-mac-for-ssh-02.txt. - The pre-authentication sshd(8) privilege separation slave process now logs via a socket shared with the master process, avoiding the need to maintain /dev/log inside the chroot (closes: #75043, #429243, #599240). - ssh(1) now warns when a server refuses X11 forwarding (closes: #504757). - sshd_config(5)'s AuthorizedKeysFile now accepts multiple paths, separated by whitespace (closes: #76312). The authorized_keys2 fallback is deprecated but documented (closes: #560156). - ssh(1) and sshd(8): set IPv6 traffic class from IPQoS, as well as IPv4 ToS/DSCP (closes: #498297). - ssh-add(1) now accepts keys piped from standard input. E.g. "ssh-add - < /path/to/key" (closes: #229124). - Clean up lost-passphrase text in ssh-keygen(1) (closes: #444691). - Say "required" rather than "recommended" in unprotected-private-key warning (LP: #663455).
-rw-r--r--ChangeLog489
-rw-r--r--INSTALL6
-rw-r--r--Makefile.in57
-rw-r--r--PROTOCOL.mux30
-rw-r--r--README4
-rw-r--r--WARNING.RNG95
-rw-r--r--aclocal.m430
-rw-r--r--auth-rsa.c70
-rw-r--r--auth-skey.c1
-rw-r--r--auth.c23
-rw-r--r--auth.h5
-rw-r--r--auth2-gss.c2
-rw-r--r--auth2-pubkey.c19
-rw-r--r--auth2.c2
-rw-r--r--authfd.c5
-rw-r--r--authfile.c159
-rw-r--r--authfile.h4
-rw-r--r--buildpkg.sh.in7
-rw-r--r--channels.c6
-rw-r--r--channels.h4
-rw-r--r--clientloop.c110
-rw-r--r--clientloop.h10
-rwxr-xr-xconfig.guess21
-rw-r--r--config.h.in50
-rwxr-xr-xconfig.sub67
-rwxr-xr-xconfigure27415
-rw-r--r--configure.ac2860
-rwxr-xr-xcontrib/aix/buildbff.sh11
-rw-r--r--contrib/caldera/openssh.spec4
-rw-r--r--contrib/cygwin/ssh-host-config544
-rw-r--r--contrib/cygwin/ssh-user-config84
-rw-r--r--contrib/redhat/openssh.spec24
-rwxr-xr-xcontrib/redhat/sshd.init71
-rw-r--r--contrib/ssh-copy-id2
-rw-r--r--contrib/suse/openssh.spec18
-rw-r--r--contrib/suse/rc.sshd16
-rw-r--r--debian/changelog27
-rw-r--r--debian/patches/auth-log-verbosity.patch6
-rw-r--r--debian/patches/authorized-keys-man-symlink.patch8
-rw-r--r--debian/patches/debian-banner.patch16
-rw-r--r--debian/patches/debian-config.patch4
-rw-r--r--debian/patches/doc-hash-tab-completion.patch2
-rw-r--r--debian/patches/gssapi-autoconf.patch29
-rw-r--r--debian/patches/gssapi.patch282
-rw-r--r--debian/patches/hostbased-ecdsa.patch71
-rw-r--r--debian/patches/keepalive-extensions.patch18
-rw-r--r--debian/patches/lintian-symlink-pickiness.patch2
-rw-r--r--debian/patches/openbsd-docs.patch58
-rw-r--r--debian/patches/package-versioning.patch6
-rw-r--r--debian/patches/quieter-signals.patch2
-rw-r--r--debian/patches/selinux-build-failure.patch19
-rw-r--r--debian/patches/selinux-role.patch42
-rw-r--r--debian/patches/series4
-rw-r--r--debian/patches/shell-path.patch2
-rw-r--r--debian/patches/ssh-add-fifo.patch37
-rw-r--r--debian/patches/ssh-argv0.patch2
-rw-r--r--debian/patches/ssh-vulnkey.patch121
-rw-r--r--debian/patches/ssh1-keepalive.patch6
-rw-r--r--debian/patches/syslog-level-silent.patch8
-rw-r--r--debian/patches/user-group-modes.patch16
-rwxr-xr-xdebian/rules1
-rw-r--r--defines.h25
-rw-r--r--entropy.c238
-rw-r--r--gss-serv.c4
-rw-r--r--key.c5
-rw-r--r--log.c35
-rw-r--r--log.h8
-rw-r--r--mac.c8
-rw-r--r--misc.c15
-rw-r--r--misc.h3
-rw-r--r--moduli.030
-rw-r--r--moduli.540
-rw-r--r--monitor.c156
-rw-r--r--monitor.h4
-rw-r--r--monitor_wrap.c46
-rw-r--r--monitor_wrap.h3
-rw-r--r--mux.c167
-rw-r--r--myproposal.h21
-rw-r--r--openbsd-compat/bsd-cygwin_util.c17
-rw-r--r--openbsd-compat/bsd-cygwin_util.h6
-rw-r--r--openbsd-compat/openssl-compat.c6
-rw-r--r--openbsd-compat/openssl-compat.h10
-rw-r--r--openbsd-compat/port-linux.c24
-rw-r--r--openbsd-compat/port-linux.h2
-rw-r--r--openbsd-compat/regress/closefromtest.c2
-rw-r--r--packet.c44
-rw-r--r--packet.h3
-rw-r--r--pathnames.h2
-rw-r--r--readconf.c119
-rw-r--r--readconf.h19
-rw-r--r--regress/README.regress6
-rw-r--r--regress/cert-hostkey.sh2
-rw-r--r--regress/cert-userkey.sh4
-rw-r--r--regress/cfgmatch.sh66
-rw-r--r--regress/cipher-speed.sh10
-rw-r--r--regress/connect-privsep.sh14
-rw-r--r--regress/dynamic-forward.sh23
-rw-r--r--regress/test-exec.sh5
-rw-r--r--regress/try-ciphers.sh4
-rw-r--r--sandbox-darwin.c98
-rw-r--r--sandbox-null.c72
-rw-r--r--sandbox-rlimit.c93
-rw-r--r--sandbox-systrace.c198
-rw-r--r--scp.02
-rw-r--r--servconf.c289
-rw-r--r--servconf.h26
-rw-r--r--serverloop.c6
-rw-r--r--session.c7
-rw-r--r--sftp-server.02
-rw-r--r--sftp-server.c6
-rw-r--r--sftp.012
-rw-r--r--sftp.110
-rw-r--r--ssh-add.02
-rw-r--r--ssh-add.c50
-rw-r--r--ssh-agent.02
-rw-r--r--ssh-agent.c9
-rw-r--r--ssh-keygen.021
-rw-r--r--ssh-keygen.127
-rw-r--r--ssh-keygen.c181
-rw-r--r--ssh-keyscan.02
-rw-r--r--ssh-keyscan.c5
-rw-r--r--ssh-keysign.02
-rw-r--r--ssh-keysign.c3
-rw-r--r--ssh-pkcs11-helper.02
-rw-r--r--ssh-pkcs11-helper.c1
-rw-r--r--ssh-pkcs11.c14
-rw-r--r--ssh-rand-helper.051
-rw-r--r--ssh-rand-helper.894
-rw-r--r--ssh-rand-helper.c932
-rwxr-xr-xssh-sandbox.h23
-rw-r--r--ssh-vulnkey.c1
-rw-r--r--ssh.013
-rw-r--r--ssh.115
-rw-r--r--ssh.c125
-rw-r--r--ssh_config.053
-rw-r--r--ssh_config.570
-rw-r--r--ssh_prng_cmds.in75
-rw-r--r--sshconnect.c73
-rw-r--r--sshconnect2.c14
-rw-r--r--sshd.033
-rw-r--r--sshd.813
-rw-r--r--sshd.c44
-rw-r--r--sshd_config9
-rw-r--r--sshd_config.015
-rw-r--r--sshd_config.517
-rw-r--r--version.h6
146 files changed, 11642 insertions, 25486 deletions
diff --git a/ChangeLog b/ChangeLog
index 993e0cb0b..f75aa5637 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,483 @@
120110905
2 - (djm) [README contrib/caldera/openssh.spec contrib/redhat/openssh.spec]
3 [contrib/suse/openssh.spec] Update version numbers.
4 - (djm) Release OpenSSH-5.9
5
620110904
7 - (djm) [regress/connect-privsep.sh regress/test-exec.sh] demote fatal
8 regress errors for the sandbox to warnings. ok tim dtucker
9 - (dtucker) [ssh-keygen.c ssh-pkcs11.c] Bug #1929: add null implementations
10 ofsh-pkcs11.cpkcs_init and pkcs_terminate for building without dlopen
11 support.
12
1320110829
14 - (djm) [openbsd-compat/port-linux.c] Suppress logging when attempting
15 to switch SELinux context away from unconfined_t, based on patch from
16 Jan Chadima; bz#1919 ok dtucker@
17
1820110827
19 - (dtucker) [auth-skey.c] Add log.h to fix build --with-skey.
20
2120110818
22 - (tim) [configure.ac] Typo in error message spotted by Andy Tsouladze
23
2420110817
25 - (tim) [mac.c myproposal.h] Wrap SHA256 and SHA512 in ifdefs for
26 OpenSSL 0.9.7. ok djm
27 - (djm) [ openbsd-compat/bsd-cygwin_util.c openbsd-compat/bsd-cygwin_util.h]
28 binary_pipe is no longer required on Cygwin; patch from Corinna Vinschen
29 - (djm) [configure.ac] error out if the host lacks the necessary bits for
30 an explicitly requested sandbox type
31 - (djm) [contrib/ssh-copy-id] Missing backlslash; spotted by
32 bisson AT archlinux.org
33 - (djm) OpenBSD CVS Sync
34 - dtucker@cvs.openbsd.org 2011/06/03 05:35:10
35 [regress/cfgmatch.sh]
36 use OBJ to find test configs, patch from Tim Rice
37 - markus@cvs.openbsd.org 2011/06/30 22:44:43
38 [regress/connect-privsep.sh]
39 test with sandbox enabled; ok djm@
40 - djm@cvs.openbsd.org 2011/08/02 01:23:41
41 [regress/cipher-speed.sh regress/try-ciphers.sh]
42 add SHA256/SHA512 based HMAC modes
43 - (djm) [regress/cipher-speed.sh regress/try-ciphers.sh] disable HMAC-SHA2
44 MAC tests for platforms that hack EVP_SHA2 support
45
4620110812
47 - (dtucker) [openbsd-compat/port-linux.c] Bug 1924: Improve selinux context
48 change error by reporting old and new context names Patch from
49 jchadima at redhat.
50 - (djm) [contrib/redhat/openssh.spec contrib/redhat/sshd.init]
51 [contrib/suse/openssh.spec contrib/suse/rc.sshd] Updated RHEL and SLES
52 init scrips from imorgan AT nas.nasa.gov; bz#1920
53 - (djm) [contrib/ssh-copy-id] Fix failure for cases where the path to the
54 identify file contained whitespace. bz#1828 patch from gwenael.lambrouin
55 AT gmail.com; ok dtucker@
56
5720110807
58 - (dtucker) OpenBSD CVS Sync
59 - jmc@cvs.openbsd.org 2008/06/26 06:59:39
60 [moduli.5]
61 tweak previous;
62 - sobrado@cvs.openbsd.org 2009/10/28 08:56:54
63 [moduli.5]
64 "Diffie-Hellman" is the usual spelling for the cryptographic protocol
65 first published by Whitfield Diffie and Martin Hellman in 1976.
66 ok jmc@
67 - jmc@cvs.openbsd.org 2010/10/14 20:41:28
68 [moduli.5]
69 probabalistic -> probabilistic; from naddy
70 - dtucker@cvs.openbsd.org 2011/08/07 12:55:30
71 [sftp.1]
72 typo, fix from Laurent Gautrot
73
7420110805
75 - OpenBSD CVS Sync
76 - djm@cvs.openbsd.org 2011/06/23 23:35:42
77 [monitor.c]
78 ignore EINTR errors from poll()
79 - tedu@cvs.openbsd.org 2011/07/06 18:09:21
80 [authfd.c]
81 bzero the agent address. the kernel was for a while very cranky about
82 these things. evne though that's fixed, always good to initialize
83 memory. ok deraadt djm
84 - djm@cvs.openbsd.org 2011/07/29 14:42:45
85 [sandbox-systrace.c]
86 fail open(2) with EPERM rather than SIGKILLing the whole process. libc
87 will call open() to do strerror() when NLS is enabled;
88 feedback and ok markus@
89 - markus@cvs.openbsd.org 2011/08/01 19:18:15
90 [gss-serv.c]
91 prevent post-auth resource exhaustion (int overflow leading to 4GB malloc);
92 report Adam Zabrock; ok djm@, deraadt@
93 - djm@cvs.openbsd.org 2011/08/02 01:22:11
94 [mac.c myproposal.h ssh.1 ssh_config.5 sshd.8 sshd_config.5]
95 Add new SHA256 and SHA512 based HMAC modes from
96 http://www.ietf.org/id/draft-dbider-sha2-mac-for-ssh-02.txt
97 Patch from mdb AT juniper.net; feedback and ok markus@
98 - djm@cvs.openbsd.org 2011/08/02 23:13:01
99 [version.h]
100 crank now, release later
101 - djm@cvs.openbsd.org 2011/08/02 23:15:03
102 [ssh.c]
103 typo in comment
104
10520110624
106 - (djm) [configure.ac Makefile.in sandbox-darwin.c] Add a sandbox for
107 Darwin/OS X using sandbox_init() + setrlimit(); feedback and testing
108 markus@
109
11020110623
111 - OpenBSD CVS Sync
112 - djm@cvs.openbsd.org 2011/06/22 21:47:28
113 [servconf.c]
114 reuse the multistate option arrays to pretty-print options for "sshd -T"
115 - djm@cvs.openbsd.org 2011/06/22 21:57:01
116 [servconf.c servconf.h sshd.c sshd_config.5]
117 [configure.ac Makefile.in]
118 introduce sandboxing of the pre-auth privsep child using systrace(4).
119
120 This introduces a new "UsePrivilegeSeparation=sandbox" option for
121 sshd_config that applies mandatory restrictions on the syscalls the
122 privsep child can perform. This prevents a compromised privsep child
123 from being used to attack other hosts (by opening sockets and proxying)
124 or probing local kernel attack surface.
125
126 The sandbox is implemented using systrace(4) in unsupervised "fast-path"
127 mode, where a list of permitted syscalls is supplied. Any syscall not
128 on the list results in SIGKILL being sent to the privsep child. Note
129 that this requires a kernel with the new SYSTR_POLICY_KILL option.
130
131 UsePrivilegeSeparation=sandbox will become the default in the future
132 so please start testing it now.
133
134 feedback dtucker@; ok markus@
135 - djm@cvs.openbsd.org 2011/06/22 22:08:42
136 [channels.c channels.h clientloop.c clientloop.h mux.c ssh.c]
137 hook up a channel confirm callback to warn the user then requested X11
138 forwarding was refused by the server; ok markus@
139 - djm@cvs.openbsd.org 2011/06/23 09:34:13
140 [sshd.c ssh-sandbox.h sandbox.h sandbox-rlimit.c sandbox-systrace.c]
141 [sandbox-null.c]
142 rename sandbox.h => ssh-sandbox.h to make things easier for portable
143 - (djm) [sandbox-null.c] Dummy sandbox for platforms that don't support
144 setrlimit(2)
145
14620110620
147 - OpenBSD CVS Sync
148 - djm@cvs.openbsd.org 2011/06/04 00:10:26
149 [ssh_config.5]
150 explain IdentifyFile's semantics a little better, prompted by bz#1898
151 ok dtucker jmc
152 - markus@cvs.openbsd.org 2011/06/14 22:49:18
153 [authfile.c]
154 make sure key_parse_public/private_rsa1() no longer consumes its input
155 buffer. fixes ssh-add for passphrase-protected ssh1-keys;
156 noted by naddy@; ok djm@
157 - djm@cvs.openbsd.org 2011/06/17 21:44:31
158 [log.c log.h monitor.c monitor.h monitor_wrap.c monitor_wrap.h sshd.c]
159 make the pre-auth privsep slave log via a socketpair shared with the
160 monitor rather than /var/empty/dev/log; ok dtucker@ deraadt@ markus@
161 - djm@cvs.openbsd.org 2011/06/17 21:46:16
162 [sftp-server.c]
163 the protocol version should be unsigned; bz#1913 reported by mb AT
164 smartftp.com
165 - djm@cvs.openbsd.org 2011/06/17 21:47:35
166 [servconf.c]
167 factor out multi-choice option parsing into a parse_multistate label
168 and some support structures; ok dtucker@
169 - djm@cvs.openbsd.org 2011/06/17 21:57:25
170 [clientloop.c]
171 setproctitle for a mux master that has been gracefully stopped;
172 bz#1911 from Bert.Wesarg AT googlemail.com
173
17420110603
175 - (dtucker) [README version.h contrib/caldera/openssh.spec
176 contrib/redhat/openssh.spec contrib/suse/openssh.spec] Pull the version
177 bumps from the 5.8p2 branch into HEAD. ok djm.
178 - (tim) [configure.ac defines.h] Run test program to detect system mail
179 directory. Add --with-maildir option to override. Fixed OpenServer 6
180 getting it wrong. Fixed many systems having MAIL=/var/mail//username
181 ok dtucker
182 - (dtucker) [monitor.c] Remove the !HAVE_SOCKETPAIR case. We use socketpair
183 unconditionally in other places and the survey data we have does not show
184 any systems that use it. "nuke it" djm@
185 - (djm) [configure.ac] enable setproctitle emulation for OS X
186 - (djm) OpenBSD CVS Sync
187 - djm@cvs.openbsd.org 2011/06/03 00:54:38
188 [ssh.c]
189 bz#1883 - setproctitle() to identify mux master; patch from Bert.Wesarg
190 AT googlemail.com; ok dtucker@
191 NB. includes additional portability code to enable setproctitle emulation
192 on platforms that don't support it.
193 - dtucker@cvs.openbsd.org 2011/06/03 01:37:40
194 [ssh-agent.c]
195 Check current parent process ID against saved one to determine if the parent
196 has exited, rather than attempting to send a zero signal, since the latter
197 won't work if the parent has changed privs. bz#1905, patch from Daniel Kahn
198 Gillmor, ok djm@
199 - dtucker@cvs.openbsd.org 2011/05/31 02:01:58
200 [regress/dynamic-forward.sh]
201 back out revs 1.6 and 1.5 since it's not reliable
202 - dtucker@cvs.openbsd.org 2011/05/31 02:03:34
203 [regress/dynamic-forward.sh]
204 work around startup and teardown races; caught by deraadt
205 - dtucker@cvs.openbsd.org 2011/06/03 00:29:52
206 [regress/dynamic-forward.sh]
207 Retry establishing the port forwarding after a small delay, should make
208 the tests less flaky when the previous test is slow to shut down and free
209 up the port.
210 - (tim) [regress/cfgmatch.sh] Build/test out of tree fix.
211
21220110529
213 - (djm) OpenBSD CVS Sync
214 - djm@cvs.openbsd.org 2011/05/23 03:30:07
215 [auth-rsa.c auth.c auth.h auth2-pubkey.c monitor.c monitor_wrap.c]
216 [pathnames.h servconf.c servconf.h sshd.8 sshd_config sshd_config.5]
217 allow AuthorizedKeysFile to specify multiple files, separated by spaces.
218 Bring back authorized_keys2 as a default search path (to avoid breaking
219 existing users of this file), but override this in sshd_config so it will
220 be no longer used on fresh installs. Maybe in 2015 we can remove it
221 entierly :)
222
223 feedback and ok markus@ dtucker@
224 - djm@cvs.openbsd.org 2011/05/23 03:33:38
225 [auth.c]
226 make secure_filename() spam debug logs less
227 - djm@cvs.openbsd.org 2011/05/23 03:52:55
228 [sshconnect.c]
229 remove extra newline
230 - jmc@cvs.openbsd.org 2011/05/23 07:10:21
231 [sshd.8 sshd_config.5]
232 tweak previous; ok djm
233 - djm@cvs.openbsd.org 2011/05/23 07:24:57
234 [authfile.c]
235 read in key comments for v.2 keys (though note that these are not
236 passed over the agent protocol); bz#439, based on patch from binder
237 AT arago.de; ok markus@
238 - djm@cvs.openbsd.org 2011/05/24 07:15:47
239 [readconf.c readconf.h ssh.c ssh_config.5 sshconnect.c sshconnect2.c]
240 Remove undocumented legacy options UserKnownHostsFile2 and
241 GlobalKnownHostsFile2 by making UserKnownHostsFile/GlobalKnownHostsFile
242 accept multiple paths per line and making their defaults include
243 known_hosts2; ok markus
244 - djm@cvs.openbsd.org 2011/05/23 03:31:31
245 [regress/cfgmatch.sh]
246 include testing of multiple/overridden AuthorizedKeysFiles
247 refactor to simply daemon start/stop and get rid of racy constructs
248
24920110520
250 - (djm) [session.c] call setexeccon() before executing passwd for pw
251 changes; bz#1891 reported by jchadima AT redhat.com; ok dtucker@
252 - (djm) [aclocal.m4 configure.ac] since gcc-4.x ignores all -Wno-options
253 options, we should corresponding -W-option when trying to determine
254 whether it is accepted. Also includes a warning fix on the program
255 fragment uses (bad main() return type).
256 bz#1900 and bz#1901 reported by g.esp AT free.fr; ok dtucker@
257 - (djm) [servconf.c] remove leftover droppings of AuthorizedKeysFile2
258 - OpenBSD CVS Sync
259 - djm@cvs.openbsd.org 2011/05/15 08:09:01
260 [authfd.c monitor.c serverloop.c]
261 use FD_CLOEXEC consistently; patch from zion AT x96.org
262 - djm@cvs.openbsd.org 2011/05/17 07:13:31
263 [key.c]
264 fatal() if asked to generate a legacy ECDSA cert (these don't exist)
265 and fix the regress test that was trying to generate them :)
266 - djm@cvs.openbsd.org 2011/05/20 00:55:02
267 [servconf.c]
268 the options TrustedUserCAKeys, RevokedKeysFile, AuthorizedKeysFile
269 and AuthorizedPrincipalsFile were not being correctly applied in
270 Match blocks, despite being overridable there; ok dtucker@
271 - dtucker@cvs.openbsd.org 2011/05/20 02:00:19
272 [servconf.c]
273 Add comment documenting what should be after the preauth check. ok djm
274 - djm@cvs.openbsd.org 2011/05/20 03:25:45
275 [monitor.c monitor_wrap.c servconf.c servconf.h]
276 use a macro to define which string options to copy between configs
277 for Match. This avoids problems caused by forgetting to keep three
278 code locations in perfect sync and ordering
279
280 "this is at once beautiful and horrible" + ok dtucker@
281 - djm@cvs.openbsd.org 2011/05/17 07:13:31
282 [regress/cert-userkey.sh]
283 fatal() if asked to generate a legacy ECDSA cert (these don't exist)
284 and fix the regress test that was trying to generate them :)
285 - djm@cvs.openbsd.org 2011/05/20 02:43:36
286 [cert-hostkey.sh]
287 another attempt to generate a v00 ECDSA key that broke the test
288 ID sync only - portable already had this somehow
289 - dtucker@cvs.openbsd.org 2011/05/20 05:19:50
290 [dynamic-forward.sh]
291 Prevent races in dynamic forwarding test; ok djm
292 - dtucker@cvs.openbsd.org 2011/05/20 06:32:30
293 [dynamic-forward.sh]
294 fix dumb error in dynamic-forward test
295
29620110515
297 - (djm) OpenBSD CVS Sync
298 - djm@cvs.openbsd.org 2011/05/05 05:12:08
299 [mux.c]
300 gracefully fall back when ControlPath is too large for a
301 sockaddr_un. ok markus@ as part of a larger diff
302 - dtucker@cvs.openbsd.org 2011/05/06 01:03:35
303 [sshd_config]
304 clarify language about overriding defaults. bz#1892, from Petr Cerny
305 - djm@cvs.openbsd.org 2011/05/06 01:09:53
306 [sftp.1]
307 mention that IPv6 addresses must be enclosed in square brackets;
308 bz#1845
309 - djm@cvs.openbsd.org 2011/05/06 02:05:41
310 [sshconnect2.c]
311 fix memory leak; bz#1849 ok dtucker@
312 - djm@cvs.openbsd.org 2011/05/06 21:14:05
313 [packet.c packet.h]
314 set traffic class for IPv6 traffic as we do for IPv4 TOS;
315 patch from lionel AT mamane.lu via Colin Watson in bz#1855;
316 ok markus@
317 - djm@cvs.openbsd.org 2011/05/06 21:18:02
318 [ssh.c ssh_config.5]
319 add a %L expansion (short-form of the local host name) for ControlPath;
320 sync some more expansions with LocalCommand; ok markus@
321 - djm@cvs.openbsd.org 2011/05/06 21:31:38
322 [readconf.c ssh_config.5]
323 support negated Host matching, e.g.
324
325 Host *.example.org !c.example.org
326 User mekmitasdigoat
327
328 Will match "a.example.org", "b.example.org", but not "c.example.org"
329 ok markus@
330 - djm@cvs.openbsd.org 2011/05/06 21:34:32
331 [clientloop.c mux.c readconf.c readconf.h ssh.c ssh_config.5]
332 Add a RequestTTY ssh_config option to allow configuration-based
333 control over tty allocation (like -t/-T); ok markus@
334 - djm@cvs.openbsd.org 2011/05/06 21:38:58
335 [ssh.c]
336 fix dropping from previous diff
337 - djm@cvs.openbsd.org 2011/05/06 22:20:10
338 [PROTOCOL.mux]
339 fix numbering; from bert.wesarg AT googlemail.com
340 - jmc@cvs.openbsd.org 2011/05/07 23:19:39
341 [ssh_config.5]
342 - tweak previous
343 - come consistency fixes
344 ok djm
345 - jmc@cvs.openbsd.org 2011/05/07 23:20:25
346 [ssh.1]
347 +.It RequestTTY
348 - djm@cvs.openbsd.org 2011/05/08 12:52:01
349 [PROTOCOL.mux clientloop.c clientloop.h mux.c]
350 improve our behaviour when TTY allocation fails: if we are in
351 RequestTTY=auto mode (the default), then do not treat at TTY
352 allocation error as fatal but rather just restore the local TTY
353 to cooked mode and continue. This is more graceful on devices that
354 never allocate TTYs.
355
356 If RequestTTY is set to "yes" or "force", then failure to allocate
357 a TTY is fatal.
358
359 ok markus@
360 - djm@cvs.openbsd.org 2011/05/10 05:46:46
361 [authfile.c]
362 despam debug() logs by detecting that we are trying to load a private key
363 in key_try_load_public() and returning early; ok markus@
364 - djm@cvs.openbsd.org 2011/05/11 04:47:06
365 [auth.c auth.h auth2-pubkey.c pathnames.h servconf.c servconf.h]
366 remove support for authorized_keys2; it is a relic from the early days
367 of protocol v.2 support and has been undocumented for many years;
368 ok markus@
369 - djm@cvs.openbsd.org 2011/05/13 00:05:36
370 [authfile.c]
371 warn on unexpected key type in key_parse_private_type()
372 - (djm) [packet.c] unbreak portability #endif
373
37420110510
375 - (dtucker) [openbsd-compat/openssl-compat.{c,h}] Bug #1882: fix
376 --with-ssl-engine which was broken with the change from deprecated
377 SSLeay_add_all_algorithms(). ok djm
378
37920110506
380 - (dtucker) [openbsd-compat/regress/closefromtest.c] Bug #1875: add prototype
381 for closefrom() in test code. Report from Dan Wallis via Gentoo.
382
38320110505
384 - (djm) [defines.h] Move up include of netinet/ip.h for IPTOS
385 definitions. From des AT des.no
386 - (djm) [Makefile.in WARNING.RNG aclocal.m4 buildpkg.sh.in configure.ac]
387 [entropy.c ssh-add.c ssh-agent.c ssh-keygen.c ssh-keyscan.c]
388 [ssh-keysign.c ssh-pkcs11-helper.c ssh-rand-helper.8 ssh-rand-helper.c]
389 [ssh.c ssh_prng_cmds.in sshd.c contrib/aix/buildbff.sh]
390 [regress/README.regress] Remove ssh-rand-helper and all its
391 tentacles. PRNGd seeding has been rolled into entropy.c directly.
392 Thanks to tim@ for testing on affected platforms.
393 - OpenBSD CVS Sync
394 - djm@cvs.openbsd.org 2011/03/10 02:52:57
395 [auth2-gss.c auth2.c auth.h]
396 allow GSSAPI authentication to detect when a server-side failure causes
397 authentication failure and don't count such failures against MaxAuthTries;
398 bz#1244 from simon AT sxw.org.uk; ok markus@ before lock
399 - okan@cvs.openbsd.org 2011/03/15 10:36:02
400 [ssh-keyscan.c]
401 use timerclear macro
402 ok djm@
403 - stevesk@cvs.openbsd.org 2011/03/23 15:16:22
404 [ssh-keygen.1 ssh-keygen.c]
405 Add -A option. For each of the key types (rsa1, rsa, dsa and ecdsa)
406 for which host keys do not exist, generate the host keys with the
407 default key file path, an empty passphrase, default bits for the key
408 type, and default comment. This will be used by /etc/rc to generate
409 new host keys. Idea from deraadt.
410 ok deraadt
411 - stevesk@cvs.openbsd.org 2011/03/23 16:24:56
412 [ssh-keygen.1]
413 -q not used in /etc/rc now so remove statement.
414 - stevesk@cvs.openbsd.org 2011/03/23 16:50:04
415 [ssh-keygen.c]
416 remove -d, documentation removed >10 years ago; ok markus
417 - jmc@cvs.openbsd.org 2011/03/24 15:29:30
418 [ssh-keygen.1]
419 zap trailing whitespace;
420 - stevesk@cvs.openbsd.org 2011/03/24 22:14:54
421 [ssh-keygen.c]
422 use strcasecmp() for "clear" cert permission option also; ok djm
423 - stevesk@cvs.openbsd.org 2011/03/29 18:54:17
424 [misc.c misc.h servconf.c]
425 print ipqos friendly string for sshd -T; ok markus
426 # sshd -Tf sshd_config|grep ipqos
427 ipqos lowdelay throughput
428 - djm@cvs.openbsd.org 2011/04/12 04:23:50
429 [ssh-keygen.c]
430 fix -Wshadow
431 - djm@cvs.openbsd.org 2011/04/12 05:32:49
432 [sshd.c]
433 exit with 0 status on SIGTERM; bz#1879
434 - djm@cvs.openbsd.org 2011/04/13 04:02:48
435 [ssh-keygen.1]
436 improve wording; bz#1861
437 - djm@cvs.openbsd.org 2011/04/13 04:09:37
438 [ssh-keygen.1]
439 mention valid -b sizes for ECDSA keys; bz#1862
440 - djm@cvs.openbsd.org 2011/04/17 22:42:42
441 [PROTOCOL.mux clientloop.c clientloop.h mux.c ssh.1 ssh.c]
442 allow graceful shutdown of multiplexing: request that a mux server
443 removes its listener socket and refuse future multiplexing requests;
444 ok markus@
445 - djm@cvs.openbsd.org 2011/04/18 00:46:05
446 [ssh-keygen.c]
447 certificate options are supposed to be packed in lexical order of
448 option name (though we don't actually enforce this at present).
449 Move one up that was out of sequence
450 - djm@cvs.openbsd.org 2011/05/04 21:15:29
451 [authfile.c authfile.h ssh-add.c]
452 allow "ssh-add - < key"; feedback and ok markus@
453 - (tim) [configure.ac] Add AC_LANG_SOURCE to OPENSSH_CHECK_CFLAG_COMPILE
454 so autoreconf 2.68 is happy.
455 - (tim) [defines.h] Deal with platforms that do not have S_IFSOCK ok djm@
456
45720110221
458 - (dtucker) [contrib/cygwin/ssh-host-config] From Corinna: revamp of the
459 Cygwin-specific service installer script ssh-host-config. The actual
460 functionality is the same, the revisited version is just more
461 exact when it comes to check for problems which disallow to run
462 certain aspects of the script. So, part of this script and the also
463 rearranged service helper script library "csih" is to check if all
464 the tools required to run the script are available on the system.
465 The new script also is more thorough to inform the user why the
466 script failed. Patch from vinschen at redhat com.
467
46820110218
469 - OpenBSD CVS Sync
470 - djm@cvs.openbsd.org 2011/02/16 00:31:14
471 [ssh-keysign.c]
472 make hostbased auth with ECDSA keys work correctly. Based on patch
473 by harvey.eneman AT oracle.com in bz#1858; ok markus@ (pre-lock)
474
47520110206
476 - (dtucker) [openbsd-compat/port-linux.c] Bug #1851: fix syntax error in
477 selinux code. Patch from Leonardo Chiquitto
478 - (dtucker) [contrib/cygwin/ssh-{host,user}-config] Add ECDSA key
479 generation and simplify. Patch from Corinna Vinschen.
480
120110204 48120110204
2 - OpenBSD CVS Sync 482 - OpenBSD CVS Sync
3 - djm@cvs.openbsd.org 2011/01/31 21:42:15 483 - djm@cvs.openbsd.org 2011/01/31 21:42:15
@@ -19,6 +499,14 @@
19 succeeded before using its result. Patch from cjwatson AT debian.org; 499 succeeded before using its result. Patch from cjwatson AT debian.org;
20 bz#1851 500 bz#1851
21 501
50220110127
503 - (tim) [config.guess config.sub] Sync with upstream.
504 - (tim) [configure.ac] Consistent M4 quoting throughout, updated obsolete
505 AC_TRY_COMPILE with AC_COMPILE_IFELSE, updated obsolete AC_TRY_LINK with
506 AC_LINK_IFELSE, updated obsolete AC_TRY_RUN with AC_RUN_IFELSE, misc white
507 space changes for consistency/readability. Makes autoconf 2.68 happy.
508 "Nice work" djm
509
2220110125 51020110125
23 - (djm) [configure.ac Makefile.in ssh.c openbsd-compat/port-linux.c 511 - (djm) [configure.ac Makefile.in ssh.c openbsd-compat/port-linux.c
24 openbsd-compat/port-linux.h] Move SELinux-specific code from ssh.c to 512 openbsd-compat/port-linux.h] Move SELinux-specific code from ssh.c to
@@ -1229,4 +1717,3 @@
1229 (use "ssh-keygen -t v00 -s ca_key ..." to generate a v00 certificate) 1717 (use "ssh-keygen -t v00 -s ca_key ..." to generate a v00 certificate)
1230 1718
1231 ok markus@ 1719 ok markus@
1232
diff --git a/INSTALL b/INSTALL
index 09dfd666d..0031dea85 100644
--- a/INSTALL
+++ b/INSTALL
@@ -16,9 +16,7 @@ The remaining items are optional.
16 16
17NB. If you operating system supports /dev/random, you should configure 17NB. If you operating system supports /dev/random, you should configure
18OpenSSL to use it. OpenSSH relies on OpenSSL's direct support of 18OpenSSL to use it. OpenSSH relies on OpenSSL's direct support of
19/dev/random, or failing that, either prngd or egd. If you don't have 19/dev/random, or failing that, either prngd or egd
20any of these you will have to rely on ssh-rand-helper, which is inferior
21to a good kernel-based solution or prngd.
22 20
23PRNGD: 21PRNGD:
24 22
@@ -262,4 +260,4 @@ Please refer to the "reporting bugs" section of the webpage at
262http://www.openssh.com/ 260http://www.openssh.com/
263 261
264 262
265$Id: INSTALL,v 1.85 2010/02/11 22:34:22 djm Exp $ 263$Id: INSTALL,v 1.86 2011/05/05 03:48:37 djm Exp $
diff --git a/Makefile.in b/Makefile.in
index c18ba7099..7406aef6f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,4 +1,4 @@
1# $Id: Makefile.in,v 1.320.4.1 2011/02/04 00:42:13 djm Exp $ 1# $Id: Makefile.in,v 1.325 2011/08/05 20:15:18 djm Exp $
2 2
3# uncomment if you run a non bourne compatable shell. Ie. csh 3# uncomment if you run a non bourne compatable shell. Ie. csh
4#SHELL = @SH@ 4#SHELL = @SH@
@@ -26,7 +26,6 @@ ASKPASS_PROGRAM=$(libexecdir)/ssh-askpass
26SFTP_SERVER=$(libexecdir)/sftp-server 26SFTP_SERVER=$(libexecdir)/sftp-server
27SSH_KEYSIGN=$(libexecdir)/ssh-keysign 27SSH_KEYSIGN=$(libexecdir)/ssh-keysign
28SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper 28SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper
29RAND_HELPER=$(libexecdir)/ssh-rand-helper
30SSH_DATADIR=$(datadir)/ssh 29SSH_DATADIR=$(datadir)/ssh
31PRIVSEP_PATH=@PRIVSEP_PATH@ 30PRIVSEP_PATH=@PRIVSEP_PATH@
32SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@ 31SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@
@@ -40,8 +39,7 @@ PATHS= -DSSHDIR=\"$(sysconfdir)\" \
40 -D_PATH_SSH_PKCS11_HELPER=\"$(SSH_PKCS11_HELPER)\" \ 39 -D_PATH_SSH_PKCS11_HELPER=\"$(SSH_PKCS11_HELPER)\" \
41 -D_PATH_SSH_PIDDIR=\"$(piddir)\" \ 40 -D_PATH_SSH_PIDDIR=\"$(piddir)\" \
42 -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \ 41 -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \
43 -DSSH_RAND_HELPER=\"$(RAND_HELPER)\" \ 42 -D_PATH_SSH_DATADIR=\"$(SSH_DATADIR)\" \
44 -D_PATH_SSH_DATADIR=\"$(SSH_DATADIR)\"
45 43
46CC=@CC@ 44CC=@CC@
47LD=@LD@ 45LD=@LD@
@@ -63,10 +61,7 @@ LDFLAGS=-L. -Lopenbsd-compat/ @LDFLAGS@
63EXEEXT=@EXEEXT@ 61EXEEXT=@EXEEXT@
64MANFMT=@MANFMT@ 62MANFMT=@MANFMT@
65 63
66INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@ 64TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-vulnkey$(EXEEXT)
67INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@
68
69TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-vulnkey$(EXEEXT)
70 65
71LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \ 66LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \
72 canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \ 67 canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \
@@ -97,17 +92,17 @@ SSHDOBJS=sshd.o auth-rhosts.o auth-passwd.o auth-rsa.o auth-rh-rsa.o \
97 auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o\ 92 auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o\
98 loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \ 93 loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \
99 sftp-server.o sftp-common.o \ 94 sftp-server.o sftp-common.o \
100 roaming_common.o roaming_serv.o 95 roaming_common.o roaming_serv.o \
96 sandbox-null.o sandbox-rlimit.o sandbox-systrace.o sandbox-darwin.o
101 97
102MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-rand-helper.8.out ssh-keysign.8.out ssh-pkcs11-helper.8.out ssh-vulnkey.1.out sshd_config.5.out ssh_config.5.out 98MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-keysign.8.out ssh-pkcs11-helper.8.out ssh-vulnkey.1.out sshd_config.5.out ssh_config.5.out
103MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-rand-helper.8 ssh-keysign.8 ssh-pkcs11-helper.8 ssh-vulnkey.1 sshd_config.5 ssh_config.5 99MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-keysign.8 ssh-pkcs11-helper.8 ssh-vulnkey.1 sshd_config.5 ssh_config.5
104MANTYPE = @MANTYPE@ 100MANTYPE = @MANTYPE@
105 101
106CONFIGFILES=sshd_config.out ssh_config.out moduli.out 102CONFIGFILES=sshd_config.out ssh_config.out moduli.out
107CONFIGFILES_IN=sshd_config ssh_config moduli 103CONFIGFILES_IN=sshd_config ssh_config moduli
108 104
109PATHSUBS = \ 105PATHSUBS = \
110 -e 's|/etc/ssh/ssh_prng_cmds|$(sysconfdir)/ssh_prng_cmds|g' \
111 -e 's|/etc/ssh/ssh_config|$(sysconfdir)/ssh_config|g' \ 106 -e 's|/etc/ssh/ssh_config|$(sysconfdir)/ssh_config|g' \
112 -e 's|/etc/ssh/ssh_known_hosts|$(sysconfdir)/ssh_known_hosts|g' \ 107 -e 's|/etc/ssh/ssh_known_hosts|$(sysconfdir)/ssh_known_hosts|g' \
113 -e 's|/etc/ssh/sshd_config|$(sysconfdir)/sshd_config|g' \ 108 -e 's|/etc/ssh/sshd_config|$(sysconfdir)/sshd_config|g' \
@@ -127,7 +122,7 @@ PATHSUBS = \
127 122
128FIXPATHSCMD = $(SED) $(PATHSUBS) 123FIXPATHSCMD = $(SED) $(PATHSUBS)
129 124
130all: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) 125all: $(CONFIGFILES) $(MANPAGES) $(TARGETS)
131 126
132$(LIBSSH_OBJS): Makefile.in config.h 127$(LIBSSH_OBJS): Makefile.in config.h
133$(SSHOBJS): Makefile.in config.h 128$(SSHOBJS): Makefile.in config.h
@@ -178,9 +173,6 @@ sftp-server$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-common.o sftp-server.o s
178sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-common.o sftp-glob.o progressmeter.o 173sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-common.o sftp-glob.o progressmeter.o
179 $(LD) -o $@ progressmeter.o sftp.o sftp-client.o sftp-common.o sftp-glob.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) $(LIBEDIT) 174 $(LD) -o $@ progressmeter.o sftp.o sftp-client.o sftp-common.o sftp-glob.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) $(LIBEDIT)
180 175
181ssh-rand-helper${EXEEXT}: $(LIBCOMPAT) libssh.a ssh-rand-helper.o
182 $(LD) -o $@ ssh-rand-helper.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
183
184ssh-vulnkey$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-vulnkey.o 176ssh-vulnkey$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-vulnkey.o
185 $(LD) -o $@ ssh-vulnkey.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 177 $(LD) -o $@ ssh-vulnkey.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
186 178
@@ -204,11 +196,6 @@ $(CONFIGFILES): $(CONFIGFILES_IN)
204 conffile=`echo $@ | sed 's/.out$$//'`; \ 196 conffile=`echo $@ | sed 's/.out$$//'`; \
205 $(FIXPATHSCMD) $(srcdir)/$${conffile} > $@ 197 $(FIXPATHSCMD) $(srcdir)/$${conffile} > $@
206 198
207ssh_prng_cmds.out: ssh_prng_cmds
208 if test ! -z "$(INSTALL_SSH_PRNG_CMDS)"; then \
209 $(PERL) $(srcdir)/fixprogs ssh_prng_cmds $(ENT); \
210 fi
211
212# fake rule to stop make trying to compile moduli.o into a binary "moduli.o" 199# fake rule to stop make trying to compile moduli.o into a binary "moduli.o"
213moduli: 200moduli:
214 echo 201 echo
@@ -221,7 +208,7 @@ clean: regressclean
221distclean: regressclean 208distclean: regressclean
222 rm -f *.o *.a $(TARGETS) logintest config.cache config.log 209 rm -f *.o *.a $(TARGETS) logintest config.cache config.log
223 rm -f *.out core opensshd.init openssh.xml 210 rm -f *.out core opensshd.init openssh.xml
224 rm -f Makefile buildpkg.sh config.h config.status ssh_prng_cmds 211 rm -f Makefile buildpkg.sh config.h config.status
225 rm -f survey.sh openbsd-compat/regress/Makefile *~ 212 rm -f survey.sh openbsd-compat/regress/Makefile *~
226 rm -rf autom4te.cache 213 rm -rf autom4te.cache
227 (cd openbsd-compat && $(MAKE) distclean) 214 (cd openbsd-compat && $(MAKE) distclean)
@@ -232,6 +219,8 @@ distclean: regressclean
232veryclean: distclean 219veryclean: distclean
233 rm -f configure config.h.in *.0 220 rm -f configure config.h.in *.0
234 221
222cleandir: veryclean
223
235mrproper: veryclean 224mrproper: veryclean
236 225
237realclean: veryclean 226realclean: veryclean
@@ -248,9 +237,9 @@ distprep: catman-do
248 $(AUTORECONF) 237 $(AUTORECONF)
249 -rm -rf autom4te.cache 238 -rm -rf autom4te.cache
250 239
251install: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files install-sysconf host-key check-config 240install: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files install-sysconf host-key check-config
252install-nokeys: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files install-sysconf 241install-nokeys: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files install-sysconf
253install-nosysconf: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) install-files 242install-nosysconf: $(CONFIGFILES) $(MANPAGES) $(TARGETS) install-files
254 243
255check-config: 244check-config:
256 -$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config 245 -$(DESTDIR)$(sbindir)/sshd -t -f $(DESTDIR)$(sysconfdir)/sshd_config
@@ -271,9 +260,6 @@ install-files:
271 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keygen$(EXEEXT) $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT) 260 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keygen$(EXEEXT) $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT)
272 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keyscan$(EXEEXT) $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT) 261 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-keyscan$(EXEEXT) $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT)
273 $(INSTALL) -m 0755 $(STRIP_OPT) sshd$(EXEEXT) $(DESTDIR)$(sbindir)/sshd$(EXEEXT) 262 $(INSTALL) -m 0755 $(STRIP_OPT) sshd$(EXEEXT) $(DESTDIR)$(sbindir)/sshd$(EXEEXT)
274 if test ! -z "$(INSTALL_SSH_RAND_HELPER)" ; then \
275 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-rand-helper$(EXEEXT) $(DESTDIR)$(libexecdir)/ssh-rand-helper$(EXEEXT) ; \
276 fi
277 $(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign$(EXEEXT) $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT) 263 $(INSTALL) -m 4711 $(STRIP_OPT) ssh-keysign$(EXEEXT) $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT)
278 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-pkcs11-helper$(EXEEXT) $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT) 264 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-pkcs11-helper$(EXEEXT) $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT)
279 $(INSTALL) -m 0755 $(STRIP_OPT) sftp$(EXEEXT) $(DESTDIR)$(bindir)/sftp$(EXEEXT) 265 $(INSTALL) -m 0755 $(STRIP_OPT) sftp$(EXEEXT) $(DESTDIR)$(bindir)/sftp$(EXEEXT)
@@ -290,9 +276,6 @@ install-files:
290 $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5 276 $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5
291 $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8 277 $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
292 ln -s ../$(mansubdir)8/sshd.8 $(DESTDIR)$(mandir)/$(mansubdir)5/authorized_keys.5 278 ln -s ../$(mansubdir)8/sshd.8 $(DESTDIR)$(mandir)/$(mansubdir)5/authorized_keys.5
293 if [ ! -z "$(INSTALL_SSH_RAND_HELPER)" ]; then \
294 $(INSTALL) -m 644 ssh-rand-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8 ; \
295 fi
296 $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1 279 $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
297 $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 280 $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
298 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 281 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
@@ -317,13 +300,6 @@ install-sysconf:
317 else \ 300 else \
318 echo "$(DESTDIR)$(sysconfdir)/sshd_config already exists, install will not overwrite"; \ 301 echo "$(DESTDIR)$(sysconfdir)/sshd_config already exists, install will not overwrite"; \
319 fi 302 fi
320 @if [ -f ssh_prng_cmds ] && [ ! -z "$(INSTALL_SSH_PRNG_CMDS)" ]; then \
321 if [ ! -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds ] ; then \
322 $(INSTALL) -m 644 ssh_prng_cmds.out $(DESTDIR)$(sysconfdir)/ssh_prng_cmds; \
323 else \
324 echo "$(DESTDIR)$(sysconfdir)/ssh_prng_cmds already exists, install will not overwrite"; \
325 fi ; \
326 fi
327 @if [ ! -f $(DESTDIR)$(sysconfdir)/moduli ]; then \ 303 @if [ ! -f $(DESTDIR)$(sysconfdir)/moduli ]; then \
328 if [ -f $(DESTDIR)$(sysconfdir)/primes ]; then \ 304 if [ -f $(DESTDIR)$(sysconfdir)/primes ]; then \
329 echo "moving $(DESTDIR)$(sysconfdir)/primes to $(DESTDIR)$(sysconfdir)/moduli"; \ 305 echo "moving $(DESTDIR)$(sysconfdir)/primes to $(DESTDIR)$(sysconfdir)/moduli"; \
@@ -370,7 +346,6 @@ host-key-force: ssh-keygen$(EXEEXT)
370uninstallall: uninstall 346uninstallall: uninstall
371 -rm -f $(DESTDIR)$(sysconfdir)/ssh_config 347 -rm -f $(DESTDIR)$(sysconfdir)/ssh_config
372 -rm -f $(DESTDIR)$(sysconfdir)/sshd_config 348 -rm -f $(DESTDIR)$(sysconfdir)/sshd_config
373 -rm -f $(DESTDIR)$(sysconfdir)/ssh_prng_cmds
374 -rmdir $(DESTDIR)$(sysconfdir) 349 -rmdir $(DESTDIR)$(sysconfdir)
375 -rmdir $(DESTDIR)$(bindir) 350 -rmdir $(DESTDIR)$(bindir)
376 -rmdir $(DESTDIR)$(sbindir) 351 -rmdir $(DESTDIR)$(sbindir)
@@ -393,7 +368,6 @@ uninstall:
393 -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT) 368 -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT)
394 -rm -f $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT) 369 -rm -f $(DESTDIR)$(SSH_KEYSIGN)$(EXEEXT)
395 -rm -f $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT) 370 -rm -f $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT)
396 -rm -f $(DESTDIR)$(RAND_HELPER)$(EXEEXT)
397 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 371 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
398 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1 372 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
399 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1 373 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
@@ -403,7 +377,6 @@ uninstall:
403 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1 377 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
404 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-vulnkey.1 378 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-vulnkey.1
405 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8 379 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
406 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8
407 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 380 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
408 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 381 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
409 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8 382 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
@@ -473,7 +446,7 @@ survey: survey.sh ssh
473send-survey: survey 446send-survey: survey
474 mail portable-survey@mindrot.org <survey 447 mail portable-survey@mindrot.org <survey
475 448
476package: $(CONFIGFILES) ssh_prng_cmds.out $(MANPAGES) $(TARGETS) 449package: $(CONFIGFILES) $(MANPAGES) $(TARGETS)
477 if [ "@MAKE_PACKAGE_SUPPORTED@" = yes ]; then \ 450 if [ "@MAKE_PACKAGE_SUPPORTED@" = yes ]; then \
478 sh buildpkg.sh; \ 451 sh buildpkg.sh; \
479 fi 452 fi
diff --git a/PROTOCOL.mux b/PROTOCOL.mux
index 2a5817bd7..9ad256602 100644
--- a/PROTOCOL.mux
+++ b/PROTOCOL.mux
@@ -73,6 +73,13 @@ non-multiplexed ssh(1) connection. Two additional cases that the
73client must cope with are it receiving a signal itself and the 73client must cope with are it receiving a signal itself and the
74server disconnecting without sending an exit message. 74server disconnecting without sending an exit message.
75 75
76A master may also send a MUX_S_TTY_ALLOC_FAIL before MUX_S_EXIT_MESSAGE
77if remote TTY allocation was unsuccessful. The client may use this to
78return its local tty to "cooked" mode.
79
80 uint32 MUX_S_TTY_ALLOC_FAIL
81 uint32 session id
82
763. Health checks 833. Health checks
77 84
78The client may request a health check/PID report from a server: 85The client may request a health check/PID report from a server:
@@ -149,10 +156,21 @@ The client then sends its standard input and output file descriptors
149 156
150The contents of "reserved" are currently ignored. 157The contents of "reserved" are currently ignored.
151 158
152A server may reply with a MUX_S_SESSION_OPEED, a MUX_S_PERMISSION_DENIED 159A server may reply with a MUX_S_SESSION_OPENED, a MUX_S_PERMISSION_DENIED
153or a MUX_S_FAILURE. 160or a MUX_S_FAILURE.
154 161
1558. Status messages 1628. Requesting shutdown of mux listener
163
164A client may request the master to stop accepting new multiplexing requests
165and remove its listener socket.
166
167 uint32 MUX_C_STOP_LISTENING
168 uint32 request id
169
170A server may reply with a MUX_S_OK, a MUX_S_PERMISSION_DENIED or a
171MUX_S_FAILURE.
172
1739. Status messages
156 174
157The MUX_S_OK message is empty: 175The MUX_S_OK message is empty:
158 176
@@ -169,7 +187,7 @@ The MUX_S_PERMISSION_DENIED and MUX_S_FAILURE include a reason:
169 uint32 client request id 187 uint32 client request id
170 string reason 188 string reason
171 189
1729. Protocol numbers 19010. Protocol numbers
173 191
174#define MUX_MSG_HELLO 0x00000001 192#define MUX_MSG_HELLO 0x00000001
175#define MUX_C_NEW_SESSION 0x10000002 193#define MUX_C_NEW_SESSION 0x10000002
@@ -178,6 +196,7 @@ The MUX_S_PERMISSION_DENIED and MUX_S_FAILURE include a reason:
178#define MUX_C_OPEN_FWD 0x10000006 196#define MUX_C_OPEN_FWD 0x10000006
179#define MUX_C_CLOSE_FWD 0x10000007 197#define MUX_C_CLOSE_FWD 0x10000007
180#define MUX_C_NEW_STDIO_FWD 0x10000008 198#define MUX_C_NEW_STDIO_FWD 0x10000008
199#define MUX_C_STOP_LISTENING 0x10000009
181#define MUX_S_OK 0x80000001 200#define MUX_S_OK 0x80000001
182#define MUX_S_PERMISSION_DENIED 0x80000002 201#define MUX_S_PERMISSION_DENIED 0x80000002
183#define MUX_S_FAILURE 0x80000003 202#define MUX_S_FAILURE 0x80000003
@@ -185,6 +204,7 @@ The MUX_S_PERMISSION_DENIED and MUX_S_FAILURE include a reason:
185#define MUX_S_ALIVE 0x80000005 204#define MUX_S_ALIVE 0x80000005
186#define MUX_S_SESSION_OPENED 0x80000006 205#define MUX_S_SESSION_OPENED 0x80000006
187#define MUX_S_REMOTE_PORT 0x80000007 206#define MUX_S_REMOTE_PORT 0x80000007
207#define MUX_S_TTY_ALLOC_FAIL 0x80000008
188 208
189#define MUX_FWD_LOCAL 1 209#define MUX_FWD_LOCAL 1
190#define MUX_FWD_REMOTE 2 210#define MUX_FWD_REMOTE 2
@@ -192,12 +212,10 @@ The MUX_S_PERMISSION_DENIED and MUX_S_FAILURE include a reason:
192 212
193XXX TODO 213XXX TODO
194XXX extended status (e.g. report open channels / forwards) 214XXX extended status (e.g. report open channels / forwards)
195XXX graceful close (delete listening socket, but keep existing sessions active)
196XXX lock (maybe) 215XXX lock (maybe)
197XXX watch in/out traffic (pre/post crypto) 216XXX watch in/out traffic (pre/post crypto)
198XXX inject packet (what about replies) 217XXX inject packet (what about replies)
199XXX server->client error/warning notifications 218XXX server->client error/warning notifications
200XXX port0 rfwd (need custom response message)
201XXX send signals via mux 219XXX send signals via mux
202 220
203$OpenBSD: PROTOCOL.mux,v 1.4 2011/01/31 21:42:15 djm Exp $ 221$OpenBSD: PROTOCOL.mux,v 1.7 2011/05/08 12:52:01 djm Exp $
diff --git a/README b/README
index 4f695066b..093a3849a 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
1See http://www.openssh.com/txt/release-5.8 for the release notes. 1See http://www.openssh.com/txt/release-5.9p1 for the release notes.
2 2
3- A Japanese translation of this document and of the OpenSSH FAQ is 3- A Japanese translation of this document and of the OpenSSH FAQ is
4- available at http://www.unixuser.org/~haruyama/security/openssh/index.html 4- available at http://www.unixuser.org/~haruyama/security/openssh/index.html
@@ -62,4 +62,4 @@ References -
62[6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9 62[6] http://www.openbsd.org/cgi-bin/man.cgi?query=style&sektion=9
63[7] http://www.openssh.com/faq.html 63[7] http://www.openssh.com/faq.html
64 64
65$Id: README,v 1.75.4.1 2011/02/04 00:57:50 djm Exp $ 65$Id: README,v 1.77.2.1 2011/09/05 00:27:58 djm Exp $
diff --git a/WARNING.RNG b/WARNING.RNG
deleted file mode 100644
index 97da74ff7..000000000
--- a/WARNING.RNG
+++ /dev/null
@@ -1,95 +0,0 @@
1This document contains a description of portable OpenSSH's random
2number collection code. An alternate reading of this text could
3well be titled "Why I should pressure my system vendor to supply
4/dev/random in their OS".
5
6Why is this important? OpenSSH depends on good, unpredictable numbers
7for generating keys, performing digital signatures and forming
8cryptographic challenges. If the random numbers that it uses are
9predictable, then the strength of the whole system is compromised.
10
11A particularly pernicious problem arises with DSA keys (used by the
12ssh2 protocol). Performing a DSA signature (which is required for
13authentication), entails the use of a 160 bit random number. If an
14attacker can predict this number, then they can deduce your *private*
15key and impersonate you or your hosts.
16
17If you are using the builtin random number support (configure will
18tell you if this is the case), then read this document in its entirety.
19Alternately, you can use Lutz Jaenicke's PRNGd - a small daemon which
20collects random numbers and makes them available by a socket.
21
22Please also request that your OS vendor provides a kernel-based random
23number collector (/dev/random) in future versions of your operating
24systems by default.
25
26On to the description...
27
28The portable OpenSSH contains random number collection support for
29systems which lack a kernel entropy pool (/dev/random).
30
31This collector (as of 3.1 and beyond) comes as an external application
32that allows the local admin to decide on how to implement entropy
33collection.
34
35The default entropy collector operates by executing the programs listed
36in ($etcdir)/ssh_prng_cmds, reading their output and adding it to the
37PRNG supplied by OpenSSL (which is hash-based). It also stirs in the
38output of several system calls and timings from the execution of the
39programs that it runs.
40
41The ssh_prng_cmds file also specifies a 'rate' for each program. This
42represents the number of bits of randomness per byte of output from
43the specified program.
44
45The random number code will also read and save a seed file to
46~/.ssh/prng_seed. This contents of this file are added to the random
47number generator at startup. The goal here is to maintain as much
48randomness between sessions as possible.
49
50The default entropy collection code has two main problems:
51
521. It is slow.
53
54Executing each program in the list can take a large amount of time,
55especially on slower machines. Additionally some program can take a
56disproportionate time to execute.
57
58Tuning the random helper can be done by running ./ssh-random-helper in
59very verbose mode ("-vvv") and identifying the commands that are taking
60excessive amounts of time or hanging altogher. Any problem commands can
61be modified or removed from ssh_prng_cmds.
62
63The default entropy collector will timeout programs which take too long
64to execute, the actual timeout used can be adjusted with the
65--with-entropy-timeout configure option. OpenSSH will not try to
66re-execute programs which have not been found, have had a non-zero
67exit status or have timed out more than a couple of times.
68
692. Estimating the real 'rate' of program outputs is non-trivial
70
71The shear volume of the task is problematic: there are currently
72around 50 commands in the ssh_prng_cmds list, portable OpenSSH
73supports at least 12 different OSs. That is already 600 sets of data
74to be analysed, without taking into account the numerous differences
75between versions of each OS.
76
77On top of this, the different commands can produce varying amounts of
78usable data depending on how busy the machine is, how long it has been
79up and various other factors.
80
81To make matters even more complex, some of the commands are reporting
82largely the same data as other commands (eg. the various "ps" calls).
83
84
85How to avoid the default entropy code?
86
87The best way is to read the OpenSSL documentation and recompile OpenSSL
88to use prngd or egd. Some platforms (like earily solaris) have 3rd
89party /dev/random devices that can be also used for this task.
90
91If you are forced to use ssh-rand-helper consider still downloading
92prngd/egd and configure OpenSSH using --with-prngd-port=xx or
93--with-prngd-socket=xx (refer to INSTALL for more information).
94
95$Id: WARNING.RNG,v 1.8 2005/05/26 01:47:54 djm Exp $
diff --git a/aclocal.m4 b/aclocal.m4
index b68a47080..9bdea5ec2 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,8 +1,26 @@
1dnl $Id: aclocal.m4,v 1.6 2005/09/19 16:33:39 tim Exp $ 1dnl $Id: aclocal.m4,v 1.8 2011/05/20 01:45:25 djm Exp $
2dnl 2dnl
3dnl OpenSSH-specific autoconf macros 3dnl OpenSSH-specific autoconf macros
4dnl 4dnl
5 5
6dnl OSSH_CHECK_CFLAG_COMPILE(check_flag[, define_flag])
7dnl Check that $CC accepts a flag 'check_flag'. If it is supported append
8dnl 'define_flag' to $CFLAGS. If 'define_flag' is not specified, then append
9dnl 'check_flag'.
10AC_DEFUN([OSSH_CHECK_CFLAG_COMPILE], [{
11 AC_MSG_CHECKING([if $CC supports $1])
12 saved_CFLAGS="$CFLAGS"
13 CFLAGS="$CFLAGS $1"
14 _define_flag="$2"
15 test "x$_define_flag" = "x" && _define_flag="$1"
16 AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int main(void) { return 0; }]])],
17 [ AC_MSG_RESULT([yes])
18 CFLAGS="$saved_CFLAGS $_define_flag"],
19 [ AC_MSG_RESULT([no])
20 CFLAGS="$saved_CFLAGS" ]
21 )
22}])
23
6 24
7dnl OSSH_CHECK_HEADER_FOR_FIELD(field, header, symbol) 25dnl OSSH_CHECK_HEADER_FOR_FIELD(field, header, symbol)
8dnl Does AC_EGREP_HEADER on 'header' for the string 'field' 26dnl Does AC_EGREP_HEADER on 'header' for the string 'field'
@@ -33,16 +51,6 @@ AC_DEFUN(OSSH_CHECK_HEADER_FOR_FIELD, [
33 fi 51 fi
34]) 52])
35 53
36dnl OSSH_PATH_ENTROPY_PROG(variablename, command):
37dnl Tidiness function, sets 'undef' if not found, and does the AC_SUBST
38AC_DEFUN(OSSH_PATH_ENTROPY_PROG, [
39 AC_PATH_PROG($1, $2)
40 if test -z "[$]$1" ; then
41 $1="undef"
42 fi
43 AC_SUBST($1)
44])
45
46dnl Check for socklen_t: historically on BSD it is an int, and in 54dnl Check for socklen_t: historically on BSD it is an int, and in
47dnl POSIX 1g it is a type of its own, but some platforms use different 55dnl POSIX 1g it is a type of its own, but some platforms use different
48dnl types for the argument to getsockopt, getpeername, etc. So we 56dnl types for the argument to getsockopt, getpeername, etc. So we
diff --git a/auth-rsa.c b/auth-rsa.c
index ec32c803f..99c4e882d 100644
--- a/auth-rsa.c
+++ b/auth-rsa.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth-rsa.c,v 1.79 2010/12/03 23:55:27 djm Exp $ */ 1/* $OpenBSD: auth-rsa.c,v 1.80 2011/05/23 03:30:07 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -160,38 +160,20 @@ auth_rsa_challenge_dialog(Key *key)
160 return (success); 160 return (success);
161} 161}
162 162
163/* 163static int
164 * check if there's user key matching client_n, 164rsa_key_allowed_in_file(struct passwd *pw, char *file,
165 * return key if login is allowed, NULL otherwise 165 const BIGNUM *client_n, Key **rkey)
166 */
167
168int
169auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
170{ 166{
171 char line[SSH_MAX_PUBKEY_BYTES], *file; 167 char line[SSH_MAX_PUBKEY_BYTES];
172 int allowed = 0; 168 int allowed = 0;
173 u_int bits; 169 u_int bits;
174 FILE *f; 170 FILE *f;
175 u_long linenum = 0; 171 u_long linenum = 0;
176 Key *key; 172 Key *key;
177 173
178 /* Temporarily use the user's uid. */
179 temporarily_use_uid(pw);
180
181 /* The authorized keys. */
182 file = authorized_keys_file(pw);
183 debug("trying public RSA key file %s", file); 174 debug("trying public RSA key file %s", file);
184 f = auth_openkeyfile(file, pw, options.strict_modes); 175 if ((f = auth_openkeyfile(file, pw, options.strict_modes)) == NULL)
185 if (!f) { 176 return 0;
186 xfree(file);
187 restore_uid();
188 return (0);
189 }
190
191 /* Flag indicating whether the key is allowed. */
192 allowed = 0;
193
194 key = key_new(KEY_RSA1);
195 177
196 auth_start_parse_options(); 178 auth_start_parse_options();
197 179
@@ -200,6 +182,7 @@ auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
200 * found, perform a challenge-response dialog to verify that the 182 * found, perform a challenge-response dialog to verify that the
201 * user really has the corresponding private key. 183 * user really has the corresponding private key.
202 */ 184 */
185 key = key_new(KEY_RSA1);
203 while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) { 186 while (read_keyfile_line(f, file, line, sizeof(line), &linenum) != -1) {
204 char *cp; 187 char *cp;
205 char *key_options; 188 char *key_options;
@@ -237,7 +220,10 @@ auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
237 } 220 }
238 /* cp now points to the comment part. */ 221 /* cp now points to the comment part. */
239 222
240 /* Check if the we have found the desired key (identified by its modulus). */ 223 /*
224 * Check if the we have found the desired key (identified
225 * by its modulus).
226 */
241 if (BN_cmp(key->rsa->n, client_n) != 0) 227 if (BN_cmp(key->rsa->n, client_n) != 0)
242 continue; 228 continue;
243 229
@@ -266,11 +252,7 @@ auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
266 break; 252 break;
267 } 253 }
268 254
269 /* Restore the privileged uid. */
270 restore_uid();
271
272 /* Close the file. */ 255 /* Close the file. */
273 xfree(file);
274 fclose(f); 256 fclose(f);
275 257
276 /* return key if allowed */ 258 /* return key if allowed */
@@ -278,7 +260,33 @@ auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
278 *rkey = key; 260 *rkey = key;
279 else 261 else
280 key_free(key); 262 key_free(key);
281 return (allowed); 263
264 return allowed;
265}
266
267/*
268 * check if there's user key matching client_n,
269 * return key if login is allowed, NULL otherwise
270 */
271
272int
273auth_rsa_key_allowed(struct passwd *pw, BIGNUM *client_n, Key **rkey)
274{
275 char *file;
276 u_int i, allowed = 0;
277
278 temporarily_use_uid(pw);
279
280 for (i = 0; !allowed && i < options.num_authkeys_files; i++) {
281 file = expand_authorized_keys(
282 options.authorized_keys_files[i], pw);
283 allowed = rsa_key_allowed_in_file(pw, file, client_n, rkey);
284 xfree(file);
285 }
286
287 restore_uid();
288
289 return allowed;
282} 290}
283 291
284/* 292/*
diff --git a/auth-skey.c b/auth-skey.c
index cb43dba48..3536ec8fa 100644
--- a/auth-skey.c
+++ b/auth-skey.c
@@ -39,6 +39,7 @@
39#include "hostfile.h" 39#include "hostfile.h"
40#include "auth.h" 40#include "auth.h"
41#include "ssh-gss.h" 41#include "ssh-gss.h"
42#include "log.h"
42#include "monitor_wrap.h" 43#include "monitor_wrap.h"
43 44
44static void * 45static void *
diff --git a/auth.c b/auth.c
index 4f9b75334..3e8fe57b2 100644
--- a/auth.c
+++ b/auth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth.c,v 1.91 2010/11/29 23:45:51 djm Exp $ */ 1/* $OpenBSD: auth.c,v 1.94 2011/05/23 03:33:38 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -332,7 +332,7 @@ auth_root_allowed(char *method)
332 * 332 *
333 * This returns a buffer allocated by xmalloc. 333 * This returns a buffer allocated by xmalloc.
334 */ 334 */
335static char * 335char *
336expand_authorized_keys(const char *filename, struct passwd *pw) 336expand_authorized_keys(const char *filename, struct passwd *pw)
337{ 337{
338 char *file, ret[MAXPATHLEN]; 338 char *file, ret[MAXPATHLEN];
@@ -356,18 +356,6 @@ expand_authorized_keys(const char *filename, struct passwd *pw)
356} 356}
357 357
358char * 358char *
359authorized_keys_file(struct passwd *pw)
360{
361 return expand_authorized_keys(options.authorized_keys_file, pw);
362}
363
364char *
365authorized_keys_file2(struct passwd *pw)
366{
367 return expand_authorized_keys(options.authorized_keys_file2, pw);
368}
369
370char *
371authorized_principals_file(struct passwd *pw) 359authorized_principals_file(struct passwd *pw)
372{ 360{
373 if (options.authorized_principals_file == NULL) 361 if (options.authorized_principals_file == NULL)
@@ -467,7 +455,6 @@ secure_filename(FILE *f, const char *file, struct passwd *pw,
467 } 455 }
468 strlcpy(buf, cp, sizeof(buf)); 456 strlcpy(buf, cp, sizeof(buf));
469 457
470 debug3("secure_filename: checking '%s'", buf);
471 if (stat(buf, &st) < 0 || 458 if (stat(buf, &st) < 0 ||
472 !secure_permissions(&st, uid)) { 459 !secure_permissions(&st, uid)) {
473 snprintf(err, errlen, 460 snprintf(err, errlen,
@@ -476,11 +463,9 @@ secure_filename(FILE *f, const char *file, struct passwd *pw,
476 } 463 }
477 464
478 /* If are past the homedir then we can stop */ 465 /* If are past the homedir then we can stop */
479 if (comparehome && strcmp(homedir, buf) == 0) { 466 if (comparehome && strcmp(homedir, buf) == 0)
480 debug3("secure_filename: terminating check at '%s'",
481 buf);
482 break; 467 break;
483 } 468
484 /* 469 /*
485 * dirname should always complete with a "/" path, 470 * dirname should always complete with a "/" path,
486 * but we can be paranoid and check for "." too 471 * but we can be paranoid and check for "." too
diff --git a/auth.h b/auth.h
index 6e20cd446..568212f9d 100644
--- a/auth.h
+++ b/auth.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth.h,v 1.66 2010/05/07 11:30:29 djm Exp $ */ 1/* $OpenBSD: auth.h,v 1.69 2011/05/23 03:30:07 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -169,8 +169,7 @@ char *get_challenge(Authctxt *);
169int verify_response(Authctxt *, const char *); 169int verify_response(Authctxt *, const char *);
170void abandon_challenge_response(Authctxt *); 170void abandon_challenge_response(Authctxt *);
171 171
172char *authorized_keys_file(struct passwd *); 172char *expand_authorized_keys(const char *, struct passwd *pw);
173char *authorized_keys_file2(struct passwd *);
174char *authorized_principals_file(struct passwd *); 173char *authorized_principals_file(struct passwd *);
175 174
176FILE *auth_openkeyfile(const char *, struct passwd *, int); 175FILE *auth_openkeyfile(const char *, struct passwd *, int);
diff --git a/auth2-gss.c b/auth2-gss.c
index a192d282f..7dc87dba4 100644
--- a/auth2-gss.c
+++ b/auth2-gss.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth2-gss.c,v 1.16 2007/10/29 00:52:45 dtucker Exp $ */ 1/* $OpenBSD: auth2-gss.c,v 1.17 2011/03/10 02:52:57 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved. 4 * Copyright (c) 2001-2007 Simon Wilkinson. All rights reserved.
diff --git a/auth2-pubkey.c b/auth2-pubkey.c
index dbf0d0d22..a1d31e930 100644
--- a/auth2-pubkey.c
+++ b/auth2-pubkey.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth2-pubkey.c,v 1.27 2010/11/20 05:12:38 deraadt Exp $ */ 1/* $OpenBSD: auth2-pubkey.c,v 1.29 2011/05/23 03:30:07 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
@@ -440,7 +440,7 @@ user_cert_trusted_ca(struct passwd *pw, Key *key)
440int 440int
441user_key_allowed(struct passwd *pw, Key *key) 441user_key_allowed(struct passwd *pw, Key *key)
442{ 442{
443 int success; 443 u_int success, i;
444 char *file; 444 char *file;
445 445
446 if (auth_key_is_revoked(key, 0)) 446 if (auth_key_is_revoked(key, 0))
@@ -453,16 +453,13 @@ user_key_allowed(struct passwd *pw, Key *key)
453 if (success) 453 if (success)
454 return success; 454 return success;
455 455
456 file = authorized_keys_file(pw); 456 for (i = 0; !success && i < options.num_authkeys_files; i++) {
457 success = user_key_allowed2(pw, key, file); 457 file = expand_authorized_keys(
458 xfree(file); 458 options.authorized_keys_files[i], pw);
459 if (success) 459 success = user_key_allowed2(pw, key, file);
460 return success; 460 xfree(file);
461 }
461 462
462 /* try suffix "2" for backward compat, too */
463 file = authorized_keys_file2(pw);
464 success = user_key_allowed2(pw, key, file);
465 xfree(file);
466 return success; 463 return success;
467} 464}
468 465
diff --git a/auth2.c b/auth2.c
index 1255b1fcd..52acf4606 100644
--- a/auth2.c
+++ b/auth2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: auth2.c,v 1.122 2010/08/31 09:58:37 djm Exp $ */ 1/* $OpenBSD: auth2.c,v 1.123 2011/03/10 02:52:57 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * 4 *
diff --git a/authfd.c b/authfd.c
index c11c3f5a8..f037e838b 100644
--- a/authfd.c
+++ b/authfd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfd.c,v 1.84 2010/08/31 11:54:45 djm Exp $ */ 1/* $OpenBSD: authfd.c,v 1.86 2011/07/06 18:09:21 tedu Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -102,6 +102,7 @@ ssh_get_authentication_socket(void)
102 if (!authsocket) 102 if (!authsocket)
103 return -1; 103 return -1;
104 104
105 bzero(&sunaddr, sizeof(sunaddr));
105 sunaddr.sun_family = AF_UNIX; 106 sunaddr.sun_family = AF_UNIX;
106 strlcpy(sunaddr.sun_path, authsocket, sizeof(sunaddr.sun_path)); 107 strlcpy(sunaddr.sun_path, authsocket, sizeof(sunaddr.sun_path));
107 108
@@ -110,7 +111,7 @@ ssh_get_authentication_socket(void)
110 return -1; 111 return -1;
111 112
112 /* close on exec */ 113 /* close on exec */
113 if (fcntl(sock, F_SETFD, 1) == -1) { 114 if (fcntl(sock, F_SETFD, FD_CLOEXEC) == -1) {
114 close(sock); 115 close(sock);
115 return -1; 116 return -1;
116 } 117 }
diff --git a/authfile.c b/authfile.c
index 2ed250232..e5fe0b801 100644
--- a/authfile.c
+++ b/authfile.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfile.c,v 1.87 2010/11/29 18:57:04 markus Exp $ */ 1/* $OpenBSD: authfile.c,v 1.92 2011/06/14 22:49:18 markus Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -70,6 +70,8 @@
70#include "atomicio.h" 70#include "atomicio.h"
71#include "pathnames.h" 71#include "pathnames.h"
72 72
73#define MAX_KEY_FILE_SIZE (1024 * 1024)
74
73/* Version identification string for SSH v1 identity files. */ 75/* Version identification string for SSH v1 identity files. */
74static const char authfile_id_string[] = 76static const char authfile_id_string[] =
75 "SSH PRIVATE KEY FILE FORMAT 1.1\n"; 77 "SSH PRIVATE KEY FILE FORMAT 1.1\n";
@@ -278,6 +280,7 @@ static Key *
278key_parse_public_rsa1(Buffer *blob, char **commentp) 280key_parse_public_rsa1(Buffer *blob, char **commentp)
279{ 281{
280 Key *pub; 282 Key *pub;
283 Buffer copy;
281 284
282 /* Check that it is at least big enough to contain the ID string. */ 285 /* Check that it is at least big enough to contain the ID string. */
283 if (buffer_len(blob) < sizeof(authfile_id_string)) { 286 if (buffer_len(blob) < sizeof(authfile_id_string)) {
@@ -294,31 +297,33 @@ key_parse_public_rsa1(Buffer *blob, char **commentp)
294 debug3("Incorrect RSA1 identifier"); 297 debug3("Incorrect RSA1 identifier");
295 return NULL; 298 return NULL;
296 } 299 }
297 buffer_consume(blob, sizeof(authfile_id_string)); 300 buffer_init(&copy);
301 buffer_append(&copy, buffer_ptr(blob), buffer_len(blob));
302 buffer_consume(&copy, sizeof(authfile_id_string));
298 303
299 /* Skip cipher type and reserved data. */ 304 /* Skip cipher type and reserved data. */
300 (void) buffer_get_char(blob); /* cipher type */ 305 (void) buffer_get_char(&copy); /* cipher type */
301 (void) buffer_get_int(blob); /* reserved */ 306 (void) buffer_get_int(&copy); /* reserved */
302 307
303 /* Read the public key from the buffer. */ 308 /* Read the public key from the buffer. */
304 (void) buffer_get_int(blob); 309 (void) buffer_get_int(&copy);
305 pub = key_new(KEY_RSA1); 310 pub = key_new(KEY_RSA1);
306 buffer_get_bignum(blob, pub->rsa->n); 311 buffer_get_bignum(&copy, pub->rsa->n);
307 buffer_get_bignum(blob, pub->rsa->e); 312 buffer_get_bignum(&copy, pub->rsa->e);
308 if (commentp) 313 if (commentp)
309 *commentp = buffer_get_string(blob, NULL); 314 *commentp = buffer_get_string(&copy, NULL);
310 /* The encrypted private part is not parsed by this function. */ 315 /* The encrypted private part is not parsed by this function. */
311 buffer_clear(blob); 316 buffer_free(&copy);
312 317
313 return pub; 318 return pub;
314} 319}
315 320
316/* Load the contents of a key file into a buffer */ 321/* Load a key from a fd into a buffer */
317static int 322int
318key_load_file(int fd, const char *filename, Buffer *blob) 323key_load_file(int fd, const char *filename, Buffer *blob)
319{ 324{
320 size_t len, readcount; 325 u_char buf[1024];
321 u_char *cp; 326 size_t len;
322 struct stat st; 327 struct stat st;
323 328
324 if (fstat(fd, &st) < 0) { 329 if (fstat(fd, &st) < 0) {
@@ -326,33 +331,45 @@ key_load_file(int fd, const char *filename, Buffer *blob)
326 filename == NULL ? "" : filename, 331 filename == NULL ? "" : filename,
327 filename == NULL ? "" : " ", 332 filename == NULL ? "" : " ",
328 strerror(errno)); 333 strerror(errno));
329 close(fd);
330 return 0; 334 return 0;
331 } 335 }
332 if (st.st_size > 1*1024*1024) { 336 if ((st.st_mode & (S_IFSOCK|S_IFCHR|S_IFIFO)) == 0 &&
337 st.st_size > MAX_KEY_FILE_SIZE) {
338 toobig:
333 error("%s: key file %.200s%stoo large", __func__, 339 error("%s: key file %.200s%stoo large", __func__,
334 filename == NULL ? "" : filename, 340 filename == NULL ? "" : filename,
335 filename == NULL ? "" : " "); 341 filename == NULL ? "" : " ");
336 close(fd);
337 return 0; 342 return 0;
338 } 343 }
339 len = (size_t)st.st_size; /* truncated */
340 if (0 == len && S_ISFIFO(st.st_mode))
341 len = 8192; /* we will try reading up to 8KiB from a FIFO */
342
343 buffer_init(blob); 344 buffer_init(blob);
344 cp = buffer_append_space(blob, len); 345 for (;;) {
345 346 if ((len = atomicio(read, fd, buf, sizeof(buf))) == 0) {
346 readcount = atomicio(read, fd, cp, len); 347 if (errno == EPIPE)
347 if (readcount != len && !(readcount > 0 && S_ISFIFO(st.st_mode))) { 348 break;
348 debug("%s: read from key file %.200s%sfailed: %.100s", __func__, 349 debug("%s: read from key file %.200s%sfailed: %.100s",
349 filename == NULL ? "" : filename, 350 __func__, filename == NULL ? "" : filename,
350 filename == NULL ? "" : " ", 351 filename == NULL ? "" : " ", strerror(errno));
351 strerror(errno)); 352 buffer_clear(blob);
353 bzero(buf, sizeof(buf));
354 return 0;
355 }
356 buffer_append(blob, buf, len);
357 if (buffer_len(blob) > MAX_KEY_FILE_SIZE) {
358 buffer_clear(blob);
359 bzero(buf, sizeof(buf));
360 goto toobig;
361 }
362 }
363 bzero(buf, sizeof(buf));
364 if ((st.st_mode & (S_IFSOCK|S_IFCHR|S_IFIFO)) == 0 &&
365 st.st_size != buffer_len(blob)) {
366 debug("%s: key file %.200s%schanged size while reading",
367 __func__, filename == NULL ? "" : filename,
368 filename == NULL ? "" : " ");
352 buffer_clear(blob); 369 buffer_clear(blob);
353 close(fd);
354 return 0; 370 return 0;
355 } 371 }
372
356 return 1; 373 return 1;
357} 374}
358 375
@@ -407,6 +424,7 @@ key_parse_private_rsa1(Buffer *blob, const char *passphrase, char **commentp)
407 CipherContext ciphercontext; 424 CipherContext ciphercontext;
408 Cipher *cipher; 425 Cipher *cipher;
409 Key *prv = NULL; 426 Key *prv = NULL;
427 Buffer copy;
410 428
411 /* Check that it is at least big enough to contain the ID string. */ 429 /* Check that it is at least big enough to contain the ID string. */
412 if (buffer_len(blob) < sizeof(authfile_id_string)) { 430 if (buffer_len(blob) < sizeof(authfile_id_string)) {
@@ -423,41 +441,44 @@ key_parse_private_rsa1(Buffer *blob, const char *passphrase, char **commentp)
423 debug3("Incorrect RSA1 identifier"); 441 debug3("Incorrect RSA1 identifier");
424 return NULL; 442 return NULL;
425 } 443 }
426 buffer_consume(blob, sizeof(authfile_id_string)); 444 buffer_init(&copy);
445 buffer_append(&copy, buffer_ptr(blob), buffer_len(blob));
446 buffer_consume(&copy, sizeof(authfile_id_string));
427 447
428 /* Read cipher type. */ 448 /* Read cipher type. */
429 cipher_type = buffer_get_char(blob); 449 cipher_type = buffer_get_char(&copy);
430 (void) buffer_get_int(blob); /* Reserved data. */ 450 (void) buffer_get_int(&copy); /* Reserved data. */
431 451
432 /* Read the public key from the buffer. */ 452 /* Read the public key from the buffer. */
433 (void) buffer_get_int(blob); 453 (void) buffer_get_int(&copy);
434 prv = key_new_private(KEY_RSA1); 454 prv = key_new_private(KEY_RSA1);
435 455
436 buffer_get_bignum(blob, prv->rsa->n); 456 buffer_get_bignum(&copy, prv->rsa->n);
437 buffer_get_bignum(blob, prv->rsa->e); 457 buffer_get_bignum(&copy, prv->rsa->e);
438 if (commentp) 458 if (commentp)
439 *commentp = buffer_get_string(blob, NULL); 459 *commentp = buffer_get_string(&copy, NULL);
440 else 460 else
441 (void)buffer_get_string_ptr(blob, NULL); 461 (void)buffer_get_string_ptr(&copy, NULL);
442 462
443 /* Check that it is a supported cipher. */ 463 /* Check that it is a supported cipher. */
444 cipher = cipher_by_number(cipher_type); 464 cipher = cipher_by_number(cipher_type);
445 if (cipher == NULL) { 465 if (cipher == NULL) {
446 debug("Unsupported RSA1 cipher %d", cipher_type); 466 debug("Unsupported RSA1 cipher %d", cipher_type);
467 buffer_free(&copy);
447 goto fail; 468 goto fail;
448 } 469 }
449 /* Initialize space for decrypted data. */ 470 /* Initialize space for decrypted data. */
450 buffer_init(&decrypted); 471 buffer_init(&decrypted);
451 cp = buffer_append_space(&decrypted, buffer_len(blob)); 472 cp = buffer_append_space(&decrypted, buffer_len(&copy));
452 473
453 /* Rest of the buffer is encrypted. Decrypt it using the passphrase. */ 474 /* Rest of the buffer is encrypted. Decrypt it using the passphrase. */
454 cipher_set_key_string(&ciphercontext, cipher, passphrase, 475 cipher_set_key_string(&ciphercontext, cipher, passphrase,
455 CIPHER_DECRYPT); 476 CIPHER_DECRYPT);
456 cipher_crypt(&ciphercontext, cp, 477 cipher_crypt(&ciphercontext, cp,
457 buffer_ptr(blob), buffer_len(blob)); 478 buffer_ptr(&copy), buffer_len(&copy));
458 cipher_cleanup(&ciphercontext); 479 cipher_cleanup(&ciphercontext);
459 memset(&ciphercontext, 0, sizeof(ciphercontext)); 480 memset(&ciphercontext, 0, sizeof(ciphercontext));
460 buffer_clear(blob); 481 buffer_free(&copy);
461 482
462 check1 = buffer_get_char(&decrypted); 483 check1 = buffer_get_char(&decrypted);
463 check2 = buffer_get_char(&decrypted); 484 check2 = buffer_get_char(&decrypted);
@@ -610,7 +631,7 @@ key_perm_ok(int fd, const char *filename)
610 error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@"); 631 error("@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@");
611 error("Permissions 0%3.3o for '%s' are too open.", 632 error("Permissions 0%3.3o for '%s' are too open.",
612 (u_int)st.st_mode & 0777, filename); 633 (u_int)st.st_mode & 0777, filename);
613 error("It is recommended that your private key files are NOT accessible by others."); 634 error("It is required that your private key files are NOT accessible by others.");
614 error("This private key will be ignored."); 635 error("This private key will be ignored.");
615 return 0; 636 return 0;
616 } 637 }
@@ -630,6 +651,7 @@ key_parse_private_type(Buffer *blob, int type, const char *passphrase,
630 case KEY_UNSPEC: 651 case KEY_UNSPEC:
631 return key_parse_private_pem(blob, type, passphrase, commentp); 652 return key_parse_private_pem(blob, type, passphrase, commentp);
632 default: 653 default:
654 error("%s: cannot parse key type %d", __func__, type);
633 break; 655 break;
634 } 656 }
635 return NULL; 657 return NULL;
@@ -674,11 +696,34 @@ key_load_private_type(int type, const char *filename, const char *passphrase,
674} 696}
675 697
676Key * 698Key *
699key_parse_private(Buffer *buffer, const char *filename,
700 const char *passphrase, char **commentp)
701{
702 Key *pub, *prv;
703
704 /* it's a SSH v1 key if the public key part is readable */
705 pub = key_parse_public_rsa1(buffer, commentp);
706 if (pub == NULL) {
707 prv = key_parse_private_type(buffer, KEY_UNSPEC,
708 passphrase, NULL);
709 /* use the filename as a comment for PEM */
710 if (commentp && prv)
711 *commentp = xstrdup(filename);
712 } else {
713 key_free(pub);
714 /* key_parse_public_rsa1() has already loaded the comment */
715 prv = key_parse_private_type(buffer, KEY_RSA1, passphrase,
716 NULL);
717 }
718 return prv;
719}
720
721Key *
677key_load_private(const char *filename, const char *passphrase, 722key_load_private(const char *filename, const char *passphrase,
678 char **commentp) 723 char **commentp)
679{ 724{
680 Key *pub, *prv; 725 Key *prv;
681 Buffer buffer, pubcopy; 726 Buffer buffer;
682 int fd; 727 int fd;
683 728
684 fd = open(filename, O_RDONLY); 729 fd = open(filename, O_RDONLY);
@@ -701,23 +746,7 @@ key_load_private(const char *filename, const char *passphrase,
701 } 746 }
702 close(fd); 747 close(fd);
703 748
704 buffer_init(&pubcopy); 749 prv = key_parse_private(&buffer, filename, passphrase, commentp);
705 buffer_append(&pubcopy, buffer_ptr(&buffer), buffer_len(&buffer));
706 /* it's a SSH v1 key if the public key part is readable */
707 pub = key_parse_public_rsa1(&pubcopy, commentp);
708 buffer_free(&pubcopy);
709 if (pub == NULL) {
710 prv = key_parse_private_type(&buffer, KEY_UNSPEC,
711 passphrase, NULL);
712 /* use the filename as a comment for PEM */
713 if (commentp && prv)
714 *commentp = xstrdup(filename);
715 } else {
716 key_free(pub);
717 /* key_parse_public_rsa1() has already loaded the comment */
718 prv = key_parse_private_type(&buffer, KEY_RSA1, passphrase,
719 NULL);
720 }
721 buffer_free(&buffer); 750 buffer_free(&buffer);
722 return prv; 751 return prv;
723} 752}
@@ -741,13 +770,19 @@ key_try_load_public(Key *k, const char *filename, char **commentp)
741 case '\0': 770 case '\0':
742 continue; 771 continue;
743 } 772 }
773 /* Abort loading if this looks like a private key */
774 if (strncmp(cp, "-----BEGIN", 10) == 0)
775 break;
744 /* Skip leading whitespace. */ 776 /* Skip leading whitespace. */
745 for (; *cp && (*cp == ' ' || *cp == '\t'); cp++) 777 for (; *cp && (*cp == ' ' || *cp == '\t'); cp++)
746 ; 778 ;
747 if (*cp) { 779 if (*cp) {
748 if (key_read(k, &cp) == 1) { 780 if (key_read(k, &cp) == 1) {
749 if (commentp) 781 cp[strcspn(cp, "\r\n")] = '\0';
750 *commentp=xstrdup(filename); 782 if (commentp) {
783 *commentp = xstrdup(*cp ?
784 cp : filename);
785 }
751 fclose(f); 786 fclose(f);
752 return 1; 787 return 1;
753 } 788 }
diff --git a/authfile.h b/authfile.h
index e66d1f573..3f2bdcb06 100644
--- a/authfile.h
+++ b/authfile.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: authfile.h,v 1.15 2010/08/04 05:42:47 djm Exp $ */ 1/* $OpenBSD: authfile.h,v 1.16 2011/05/04 21:15:29 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -16,9 +16,11 @@
16#define AUTHFILE_H 16#define AUTHFILE_H
17 17
18int key_save_private(Key *, const char *, const char *, const char *); 18int key_save_private(Key *, const char *, const char *, const char *);
19int key_load_file(int, const char *, Buffer *);
19Key *key_load_cert(const char *); 20Key *key_load_cert(const char *);
20Key *key_load_public(const char *, char **); 21Key *key_load_public(const char *, char **);
21Key *key_load_public_type(int, const char *, char **); 22Key *key_load_public_type(int, const char *, char **);
23Key *key_parse_private(Buffer *, const char *, const char *, char **);
22Key *key_load_private(const char *, const char *, char **); 24Key *key_load_private(const char *, const char *, char **);
23Key *key_load_private_cert(int, const char *, const char *, int *); 25Key *key_load_private_cert(int, const char *, const char *, int *);
24Key *key_load_private_type(int, const char *, const char *, char **, int *); 26Key *key_load_private_type(int, const char *, const char *, char **, int *);
diff --git a/buildpkg.sh.in b/buildpkg.sh.in
index 22c66fbd4..4de9d42e4 100644
--- a/buildpkg.sh.in
+++ b/buildpkg.sh.in
@@ -229,8 +229,6 @@ perl -p -i -e "s/#PrintMotd yes/PrintMotd no/" \
229# We don't want to overwrite config files on multiple installs 229# We don't want to overwrite config files on multiple installs
230mv $FAKE_ROOT${sysconfdir}/ssh_config $FAKE_ROOT${sysconfdir}/ssh_config.default 230mv $FAKE_ROOT${sysconfdir}/ssh_config $FAKE_ROOT${sysconfdir}/ssh_config.default
231mv $FAKE_ROOT${sysconfdir}/sshd_config $FAKE_ROOT${sysconfdir}/sshd_config.default 231mv $FAKE_ROOT${sysconfdir}/sshd_config $FAKE_ROOT${sysconfdir}/sshd_config.default
232[ -f $FAKE_ROOT${sysconfdir}/ssh_prng_cmds ] && \
233mv $FAKE_ROOT${sysconfdir}/ssh_prng_cmds $FAKE_ROOT${sysconfdir}/ssh_prng_cmds.default
234 232
235# local tweeks here 233# local tweeks here
236[ -s "${POST_MAKE_INSTALL_FIXES}" ] && . ${POST_MAKE_INSTALL_FIXES} 234[ -s "${POST_MAKE_INSTALL_FIXES}" ] && . ${POST_MAKE_INSTALL_FIXES}
@@ -317,11 +315,6 @@ cat > postinstall << _EOF
317[ -f \${PKG_INSTALL_ROOT}${sysconfdir}/sshd_config ] || \\ 315[ -f \${PKG_INSTALL_ROOT}${sysconfdir}/sshd_config ] || \\
318 cp -p \${PKG_INSTALL_ROOT}${sysconfdir}/sshd_config.default \\ 316 cp -p \${PKG_INSTALL_ROOT}${sysconfdir}/sshd_config.default \\
319 \${PKG_INSTALL_ROOT}${sysconfdir}/sshd_config 317 \${PKG_INSTALL_ROOT}${sysconfdir}/sshd_config
320[ -f \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_prng_cmds.default ] && {
321 [ -f \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_prng_cmds ] || \\
322 cp -p \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_prng_cmds.default \\
323 \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_prng_cmds
324}
325 318
326# make rc?.d dirs only if we are doing a test install 319# make rc?.d dirs only if we are doing a test install
327[ -n "${TEST_DIR}" ] && [ $DO_SMF -ne 1 ] && { 320[ -n "${TEST_DIR}" ] && [ $DO_SMF -ne 1 ] && {
diff --git a/channels.c b/channels.c
index 6abe2d012..24d4a9f42 100644
--- a/channels.c
+++ b/channels.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.c,v 1.310 2010/11/24 01:24:14 djm Exp $ */ 1/* $OpenBSD: channels.c,v 1.311 2011/06/22 22:08:42 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -3562,7 +3562,7 @@ deny_input_open(int type, u_int32_t seq, void *ctxt)
3562 */ 3562 */
3563void 3563void
3564x11_request_forwarding_with_spoofing(int client_session_id, const char *disp, 3564x11_request_forwarding_with_spoofing(int client_session_id, const char *disp,
3565 const char *proto, const char *data) 3565 const char *proto, const char *data, int want_reply)
3566{ 3566{
3567 u_int data_len = (u_int) strlen(data) / 2; 3567 u_int data_len = (u_int) strlen(data) / 2;
3568 u_int i, value; 3568 u_int i, value;
@@ -3615,7 +3615,7 @@ x11_request_forwarding_with_spoofing(int client_session_id, const char *disp,
3615 3615
3616 /* Send the request packet. */ 3616 /* Send the request packet. */
3617 if (compat20) { 3617 if (compat20) {
3618 channel_request_start(client_session_id, "x11-req", 0); 3618 channel_request_start(client_session_id, "x11-req", want_reply);
3619 packet_put_char(0); /* XXX bool single connection */ 3619 packet_put_char(0); /* XXX bool single connection */
3620 } else { 3620 } else {
3621 packet_start(SSH_CMSG_X11_REQUEST_FORWARDING); 3621 packet_start(SSH_CMSG_X11_REQUEST_FORWARDING);
diff --git a/channels.h b/channels.h
index 0680ed00e..e2941c85a 100644
--- a/channels.h
+++ b/channels.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: channels.h,v 1.104 2010/05/14 23:29:23 djm Exp $ */ 1/* $OpenBSD: channels.h,v 1.105 2011/06/22 22:08:42 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -271,7 +271,7 @@ int x11_connect_display(void);
271int x11_create_display_inet(int, int, int, u_int *, int **); 271int x11_create_display_inet(int, int, int, u_int *, int **);
272void x11_input_open(int, u_int32_t, void *); 272void x11_input_open(int, u_int32_t, void *);
273void x11_request_forwarding_with_spoofing(int, const char *, const char *, 273void x11_request_forwarding_with_spoofing(int, const char *, const char *,
274 const char *); 274 const char *, int);
275void deny_input_open(int, u_int32_t, void *); 275void deny_input_open(int, u_int32_t, void *);
276 276
277/* agent forwarding */ 277/* agent forwarding */
diff --git a/clientloop.c b/clientloop.c
index 97032e6a8..18a85c56c 100644
--- a/clientloop.c
+++ b/clientloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.c,v 1.231 2011/01/16 12:05:59 djm Exp $ */ 1/* $OpenBSD: clientloop.c,v 1.236 2011/06/22 22:08:42 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -134,9 +134,6 @@ extern int muxserver_sock; /* XXX use mux_client_cleanup() instead */
134 */ 134 */
135extern char *host; 135extern char *host;
136 136
137/* Force TTY allocation */
138extern int force_tty_flag;
139
140/* 137/*
141 * Flag to indicate that we have received a window change signal which has 138 * Flag to indicate that we have received a window change signal which has
142 * not yet been processed. This will cause a message indicating the new 139 * not yet been processed. This will cause a message indicating the new
@@ -183,7 +180,8 @@ struct escape_filter_ctx {
183/* Context for channel confirmation replies */ 180/* Context for channel confirmation replies */
184struct channel_reply_ctx { 181struct channel_reply_ctx {
185 const char *request_type; 182 const char *request_type;
186 int id, do_close; 183 int id;
184 enum confirm_action action;
187}; 185};
188 186
189/* Global request success/failure callbacks */ 187/* Global request success/failure callbacks */
@@ -269,10 +267,10 @@ static void
269set_control_persist_exit_time(void) 267set_control_persist_exit_time(void)
270{ 268{
271 if (muxserver_sock == -1 || !options.control_persist 269 if (muxserver_sock == -1 || !options.control_persist
272 || options.control_persist_timeout == 0) 270 || options.control_persist_timeout == 0) {
273 /* not using a ControlPersist timeout */ 271 /* not using a ControlPersist timeout */
274 control_persist_exit_time = 0; 272 control_persist_exit_time = 0;
275 else if (channel_still_open()) { 273 } else if (channel_still_open()) {
276 /* some client connections are still open */ 274 /* some client connections are still open */
277 if (control_persist_exit_time > 0) 275 if (control_persist_exit_time > 0)
278 debug2("%s: cancel scheduled exit", __func__); 276 debug2("%s: cancel scheduled exit", __func__);
@@ -671,7 +669,7 @@ client_suspend_self(Buffer *bin, Buffer *bout, Buffer *berr)
671 atomicio(vwrite, fileno(stderr), buffer_ptr(berr), 669 atomicio(vwrite, fileno(stderr), buffer_ptr(berr),
672 buffer_len(berr)); 670 buffer_len(berr));
673 671
674 leave_raw_mode(force_tty_flag); 672 leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
675 673
676 /* 674 /*
677 * Free (and clear) the buffer to reduce the amount of data that gets 675 * Free (and clear) the buffer to reduce the amount of data that gets
@@ -692,7 +690,7 @@ client_suspend_self(Buffer *bin, Buffer *bout, Buffer *berr)
692 buffer_init(bout); 690 buffer_init(bout);
693 buffer_init(berr); 691 buffer_init(berr);
694 692
695 enter_raw_mode(force_tty_flag); 693 enter_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
696} 694}
697 695
698static void 696static void
@@ -751,6 +749,15 @@ client_status_confirm(int type, Channel *c, void *ctx)
751 char errmsg[256]; 749 char errmsg[256];
752 int tochan; 750 int tochan;
753 751
752 /*
753 * If a TTY was explicitly requested, then a failure to allocate
754 * one is fatal.
755 */
756 if (cr->action == CONFIRM_TTY &&
757 (options.request_tty == REQUEST_TTY_FORCE ||
758 options.request_tty == REQUEST_TTY_YES))
759 cr->action = CONFIRM_CLOSE;
760
754 /* XXX supress on mux _client_ quietmode */ 761 /* XXX supress on mux _client_ quietmode */
755 tochan = options.log_level >= SYSLOG_LEVEL_ERROR && 762 tochan = options.log_level >= SYSLOG_LEVEL_ERROR &&
756 c->ctl_chan != -1 && c->extended_usage == CHAN_EXTENDED_WRITE; 763 c->ctl_chan != -1 && c->extended_usage == CHAN_EXTENDED_WRITE;
@@ -768,14 +775,27 @@ client_status_confirm(int type, Channel *c, void *ctx)
768 cr->request_type, c->self); 775 cr->request_type, c->self);
769 } 776 }
770 /* If error occurred on primary session channel, then exit */ 777 /* If error occurred on primary session channel, then exit */
771 if (cr->do_close && c->self == session_ident) 778 if (cr->action == CONFIRM_CLOSE && c->self == session_ident)
772 fatal("%s", errmsg); 779 fatal("%s", errmsg);
773 /* If error occurred on mux client, append to their stderr */ 780 /*
774 if (tochan) 781 * If error occurred on mux client, append to
775 buffer_append(&c->extended, errmsg, strlen(errmsg)); 782 * their stderr.
776 else 783 */
784 if (tochan) {
785 buffer_append(&c->extended, errmsg,
786 strlen(errmsg));
787 } else
777 error("%s", errmsg); 788 error("%s", errmsg);
778 if (cr->do_close) { 789 if (cr->action == CONFIRM_TTY) {
790 /*
791 * If a TTY allocation error occurred, then arrange
792 * for the correct TTY to leave raw mode.
793 */
794 if (c->self == session_ident)
795 leave_raw_mode(0);
796 else
797 mux_tty_alloc_failed(c);
798 } else if (cr->action == CONFIRM_CLOSE) {
779 chan_read_failed(c); 799 chan_read_failed(c);
780 chan_write_failed(c); 800 chan_write_failed(c);
781 } 801 }
@@ -789,13 +809,14 @@ client_abandon_status_confirm(Channel *c, void *ctx)
789 xfree(ctx); 809 xfree(ctx);
790} 810}
791 811
792static void 812void
793client_expect_confirm(int id, const char *request, int do_close) 813client_expect_confirm(int id, const char *request,
814 enum confirm_action action)
794{ 815{
795 struct channel_reply_ctx *cr = xmalloc(sizeof(*cr)); 816 struct channel_reply_ctx *cr = xmalloc(sizeof(*cr));
796 817
797 cr->request_type = request; 818 cr->request_type = request;
798 cr->do_close = do_close; 819 cr->action = action;
799 820
800 channel_register_status_confirm(id, client_status_confirm, 821 channel_register_status_confirm(id, client_status_confirm,
801 client_abandon_status_confirm, cr); 822 client_abandon_status_confirm, cr);
@@ -835,7 +856,7 @@ process_cmdline(void)
835 bzero(&fwd, sizeof(fwd)); 856 bzero(&fwd, sizeof(fwd));
836 fwd.listen_host = fwd.connect_host = NULL; 857 fwd.listen_host = fwd.connect_host = NULL;
837 858
838 leave_raw_mode(force_tty_flag); 859 leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
839 handler = signal(SIGINT, SIG_IGN); 860 handler = signal(SIGINT, SIG_IGN);
840 cmd = s = read_passphrase("\r\nssh> ", RP_ECHO); 861 cmd = s = read_passphrase("\r\nssh> ", RP_ECHO);
841 if (s == NULL) 862 if (s == NULL)
@@ -939,7 +960,7 @@ process_cmdline(void)
939 960
940out: 961out:
941 signal(SIGINT, handler); 962 signal(SIGINT, handler);
942 enter_raw_mode(force_tty_flag); 963 enter_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
943 if (cmd) 964 if (cmd)
944 xfree(cmd); 965 xfree(cmd);
945 if (fwd.listen_host != NULL) 966 if (fwd.listen_host != NULL)
@@ -1058,7 +1079,8 @@ process_escapes(Channel *c, Buffer *bin, Buffer *bout, Buffer *berr,
1058 * more new connections). 1079 * more new connections).
1059 */ 1080 */
1060 /* Restore tty modes. */ 1081 /* Restore tty modes. */
1061 leave_raw_mode(force_tty_flag); 1082 leave_raw_mode(
1083 options.request_tty == REQUEST_TTY_FORCE);
1062 1084
1063 /* Stop listening for new connections. */ 1085 /* Stop listening for new connections. */
1064 channel_stop_listening(); 1086 channel_stop_listening();
@@ -1353,7 +1375,7 @@ client_channel_closed(int id, void *arg)
1353{ 1375{
1354 channel_cancel_cleanup(id); 1376 channel_cancel_cleanup(id);
1355 session_closed = 1; 1377 session_closed = 1;
1356 leave_raw_mode(force_tty_flag); 1378 leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
1357} 1379}
1358 1380
1359/* 1381/*
@@ -1424,18 +1446,21 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1424 signal(SIGWINCH, window_change_handler); 1446 signal(SIGWINCH, window_change_handler);
1425 1447
1426 if (have_pty) 1448 if (have_pty)
1427 enter_raw_mode(force_tty_flag); 1449 enter_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
1428 1450
1429 if (compat20) { 1451 if (compat20) {
1430 session_ident = ssh2_chan_id; 1452 session_ident = ssh2_chan_id;
1431 if (escape_char_arg != SSH_ESCAPECHAR_NONE) 1453 if (session_ident != -1) {
1432 channel_register_filter(session_ident, 1454 if (escape_char_arg != SSH_ESCAPECHAR_NONE) {
1433 client_simple_escape_filter, NULL, 1455 channel_register_filter(session_ident,
1434 client_filter_cleanup, 1456 client_simple_escape_filter, NULL,
1435 client_new_escape_filter_ctx(escape_char_arg)); 1457 client_filter_cleanup,
1436 if (session_ident != -1) 1458 client_new_escape_filter_ctx(
1459 escape_char_arg));
1460 }
1437 channel_register_cleanup(session_ident, 1461 channel_register_cleanup(session_ident,
1438 client_channel_closed, 0); 1462 client_channel_closed, 0);
1463 }
1439 } else { 1464 } else {
1440 /* Check if we should immediately send eof on stdin. */ 1465 /* Check if we should immediately send eof on stdin. */
1441 client_check_initial_eof_on_stdin(); 1466 client_check_initial_eof_on_stdin();
@@ -1574,7 +1599,7 @@ client_loop(int have_pty, int escape_char_arg, int ssh2_chan_id)
1574 channel_free_all(); 1599 channel_free_all();
1575 1600
1576 if (have_pty) 1601 if (have_pty)
1577 leave_raw_mode(force_tty_flag); 1602 leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
1578 1603
1579 /* restore blocking io */ 1604 /* restore blocking io */
1580 if (!isatty(fileno(stdin))) 1605 if (!isatty(fileno(stdin)))
@@ -2002,7 +2027,7 @@ client_session2_setup(int id, int want_tty, int want_subsystem,
2002 memset(&ws, 0, sizeof(ws)); 2027 memset(&ws, 0, sizeof(ws));
2003 2028
2004 channel_request_start(id, "pty-req", 1); 2029 channel_request_start(id, "pty-req", 1);
2005 client_expect_confirm(id, "PTY allocation", 1); 2030 client_expect_confirm(id, "PTY allocation", CONFIRM_TTY);
2006 packet_put_cstring(term != NULL ? term : ""); 2031 packet_put_cstring(term != NULL ? term : "");
2007 packet_put_int((u_int)ws.ws_col); 2032 packet_put_int((u_int)ws.ws_col);
2008 packet_put_int((u_int)ws.ws_row); 2033 packet_put_int((u_int)ws.ws_row);
@@ -2061,18 +2086,18 @@ client_session2_setup(int id, int want_tty, int want_subsystem,
2061 debug("Sending subsystem: %.*s", 2086 debug("Sending subsystem: %.*s",
2062 len, (u_char*)buffer_ptr(cmd)); 2087 len, (u_char*)buffer_ptr(cmd));
2063 channel_request_start(id, "subsystem", 1); 2088 channel_request_start(id, "subsystem", 1);
2064 client_expect_confirm(id, "subsystem", 1); 2089 client_expect_confirm(id, "subsystem", CONFIRM_CLOSE);
2065 } else { 2090 } else {
2066 debug("Sending command: %.*s", 2091 debug("Sending command: %.*s",
2067 len, (u_char*)buffer_ptr(cmd)); 2092 len, (u_char*)buffer_ptr(cmd));
2068 channel_request_start(id, "exec", 1); 2093 channel_request_start(id, "exec", 1);
2069 client_expect_confirm(id, "exec", 1); 2094 client_expect_confirm(id, "exec", CONFIRM_CLOSE);
2070 } 2095 }
2071 packet_put_string(buffer_ptr(cmd), buffer_len(cmd)); 2096 packet_put_string(buffer_ptr(cmd), buffer_len(cmd));
2072 packet_send(); 2097 packet_send();
2073 } else { 2098 } else {
2074 channel_request_start(id, "shell", 1); 2099 channel_request_start(id, "shell", 1);
2075 client_expect_confirm(id, "shell", 1); 2100 client_expect_confirm(id, "shell", CONFIRM_CLOSE);
2076 packet_send(); 2101 packet_send();
2077 } 2102 }
2078} 2103}
@@ -2142,11 +2167,26 @@ client_init_dispatch(void)
2142 client_init_dispatch_15(); 2167 client_init_dispatch_15();
2143} 2168}
2144 2169
2170void
2171client_stop_mux(void)
2172{
2173 if (options.control_path != NULL && muxserver_sock != -1)
2174 unlink(options.control_path);
2175 /*
2176 * If we are in persist mode, signal that we should close when all
2177 * active channels are closed.
2178 */
2179 if (options.control_persist) {
2180 session_closed = 1;
2181 setproctitle("[stopped mux]");
2182 }
2183}
2184
2145/* client specific fatal cleanup */ 2185/* client specific fatal cleanup */
2146void 2186void
2147cleanup_exit(int i) 2187cleanup_exit(int i)
2148{ 2188{
2149 leave_raw_mode(force_tty_flag); 2189 leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
2150 leave_non_blocking(); 2190 leave_non_blocking();
2151 if (options.control_path != NULL && muxserver_sock != -1) 2191 if (options.control_path != NULL && muxserver_sock != -1)
2152 unlink(options.control_path); 2192 unlink(options.control_path);
diff --git a/clientloop.h b/clientloop.h
index 52115db6e..a259b5e14 100644
--- a/clientloop.h
+++ b/clientloop.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: clientloop.h,v 1.25 2010/06/25 23:15:36 djm Exp $ */ 1/* $OpenBSD: clientloop.h,v 1.28 2011/06/22 22:08:42 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -45,6 +45,7 @@ void client_global_request_reply_fwd(int, u_int32_t, void *);
45void client_session2_setup(int, int, int, const char *, struct termios *, 45void client_session2_setup(int, int, int, const char *, struct termios *,
46 int, Buffer *, char **); 46 int, Buffer *, char **);
47int client_request_tun_fwd(int, int, int); 47int client_request_tun_fwd(int, int, int);
48void client_stop_mux(void);
48 49
49/* Escape filter for protocol 2 sessions */ 50/* Escape filter for protocol 2 sessions */
50void *client_new_escape_filter_ctx(int); 51void *client_new_escape_filter_ctx(int);
@@ -55,6 +56,10 @@ int client_simple_escape_filter(Channel *, char *, int);
55typedef void global_confirm_cb(int, u_int32_t seq, void *); 56typedef void global_confirm_cb(int, u_int32_t seq, void *);
56void client_register_global_confirm(global_confirm_cb *, void *); 57void client_register_global_confirm(global_confirm_cb *, void *);
57 58
59/* Channel request confirmation callbacks */
60enum confirm_action { CONFIRM_WARN = 0, CONFIRM_CLOSE, CONFIRM_TTY };
61void client_expect_confirm(int, const char *, enum confirm_action);
62
58/* Multiplexing protocol version */ 63/* Multiplexing protocol version */
59#define SSHMUX_VER 4 64#define SSHMUX_VER 4
60 65
@@ -64,7 +69,10 @@ void client_register_global_confirm(global_confirm_cb *, void *);
64#define SSHMUX_COMMAND_TERMINATE 3 /* Ask master to exit */ 69#define SSHMUX_COMMAND_TERMINATE 3 /* Ask master to exit */
65#define SSHMUX_COMMAND_STDIO_FWD 4 /* Open stdio fwd (ssh -W) */ 70#define SSHMUX_COMMAND_STDIO_FWD 4 /* Open stdio fwd (ssh -W) */
66#define SSHMUX_COMMAND_FORWARD 5 /* Forward only, no command */ 71#define SSHMUX_COMMAND_FORWARD 5 /* Forward only, no command */
72#define SSHMUX_COMMAND_STOP 6 /* Disable mux but not conn */
67 73
68void muxserver_listen(void); 74void muxserver_listen(void);
69void muxclient(const char *); 75void muxclient(const char *);
70void mux_exit_message(Channel *, int); 76void mux_exit_message(Channel *, int);
77void mux_tty_alloc_failed(Channel *);
78
diff --git a/config.guess b/config.guess
index c2246a4f7..78553c4ea 100755
--- a/config.guess
+++ b/config.guess
@@ -1,10 +1,10 @@
1#! /bin/sh 1#! /bin/sh
2# Attempt to guess a canonical system name. 2# Attempt to guess a canonical system name.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5# Free Software Foundation, Inc. 5# 2011 Free Software Foundation, Inc.
6 6
7timestamp='2009-12-30' 7timestamp='2011-01-23'
8 8
9# This file is free software; you can redistribute it and/or modify it 9# This file is free software; you can redistribute it and/or modify it
10# under the terms of the GNU General Public License as published by 10# under the terms of the GNU General Public License as published by
@@ -57,7 +57,7 @@ GNU config.guess ($timestamp)
57 57
58Originally written by Per Bothner. 58Originally written by Per Bothner.
59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 59Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
602001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free 602001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free
61Software Foundation, Inc. 61Software Foundation, Inc.
62 62
63This is free software; see the source for copying conditions. There is NO 63This is free software; see the source for copying conditions. There is NO
@@ -270,7 +270,10 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
270 # A Xn.n version is an unreleased experimental baselevel. 270 # A Xn.n version is an unreleased experimental baselevel.
271 # 1.2 uses "1.2" for uname -r. 271 # 1.2 uses "1.2" for uname -r.
272 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` 272 echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
273 exit ;; 273 # Reset EXIT trap before exiting to avoid spurious non-zero exit code.
274 exitcode=$?
275 trap '' 0
276 exit $exitcode ;;
274 Alpha\ *:Windows_NT*:*) 277 Alpha\ *:Windows_NT*:*)
275 # How do we know it's Interix rather than the generic POSIX subsystem? 278 # How do we know it's Interix rather than the generic POSIX subsystem?
276 # Should we change UNAME_MACHINE based on the output of uname instead 279 # Should we change UNAME_MACHINE based on the output of uname instead
@@ -552,7 +555,7 @@ EOF
552 echo rs6000-ibm-aix3.2 555 echo rs6000-ibm-aix3.2
553 fi 556 fi
554 exit ;; 557 exit ;;
555 *:AIX:*:[456]) 558 *:AIX:*:[4567])
556 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` 559 IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
557 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then 560 if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
558 IBM_ARCH=rs6000 561 IBM_ARCH=rs6000
@@ -968,6 +971,9 @@ EOF
968 sparc:Linux:*:* | sparc64:Linux:*:*) 971 sparc:Linux:*:* | sparc64:Linux:*:*)
969 echo ${UNAME_MACHINE}-unknown-linux-gnu 972 echo ${UNAME_MACHINE}-unknown-linux-gnu
970 exit ;; 973 exit ;;
974 tile*:Linux:*:*)
975 echo ${UNAME_MACHINE}-tilera-linux-gnu
976 exit ;;
971 vax:Linux:*:*) 977 vax:Linux:*:*)
972 echo ${UNAME_MACHINE}-dec-linux-gnu 978 echo ${UNAME_MACHINE}-dec-linux-gnu
973 exit ;; 979 exit ;;
@@ -1231,6 +1237,9 @@ EOF
1231 *:QNX:*:4*) 1237 *:QNX:*:4*)
1232 echo i386-pc-qnx 1238 echo i386-pc-qnx
1233 exit ;; 1239 exit ;;
1240 NEO-?:NONSTOP_KERNEL:*:*)
1241 echo neo-tandem-nsk${UNAME_RELEASE}
1242 exit ;;
1234 NSE-?:NONSTOP_KERNEL:*:*) 1243 NSE-?:NONSTOP_KERNEL:*:*)
1235 echo nse-tandem-nsk${UNAME_RELEASE} 1244 echo nse-tandem-nsk${UNAME_RELEASE}
1236 exit ;; 1245 exit ;;
diff --git a/config.h.in b/config.h.in
index ae1758c58..ff651cc4a 100644
--- a/config.h.in
+++ b/config.h.in
@@ -1,5 +1,8 @@
1/* config.h.in. Generated from configure.ac by autoheader. */ 1/* config.h.in. Generated from configure.ac by autoheader. */
2 2
3/* Define if building universal (internal helper macro) */
4#undef AC_APPLE_UNIVERSAL_BUILD
5
3/* Define if you have a getaddrinfo that fails for the all-zeros IPv6 address 6/* Define if you have a getaddrinfo that fails for the all-zeros IPv6 address
4 */ 7 */
5#undef AIX_GETNAMEINFO_HACK 8#undef AIX_GETNAMEINFO_HACK
@@ -122,9 +125,6 @@
122/* Enable for PKCS#11 support */ 125/* Enable for PKCS#11 support */
123#undef ENABLE_PKCS11 126#undef ENABLE_PKCS11
124 127
125/* Builtin PRNG command timeout */
126#undef ENTROPY_TIMEOUT_MSEC
127
128/* File names may not contain backslash characters */ 128/* File names may not contain backslash characters */
129#undef FILESYSTEM_NO_BACKSLASH 129#undef FILESYSTEM_NO_BACKSLASH
130 130
@@ -750,6 +750,9 @@
750/* Define to 1 if you have the `recvmsg' function. */ 750/* Define to 1 if you have the `recvmsg' function. */
751#undef HAVE_RECVMSG 751#undef HAVE_RECVMSG
752 752
753/* sys/resource.h has RLIMIT_NPROC */
754#undef HAVE_RLIMIT_NPROC
755
753/* Define to 1 if you have the <rpc/types.h> header file. */ 756/* Define to 1 if you have the <rpc/types.h> header file. */
754#undef HAVE_RPC_TYPES_H 757#undef HAVE_RPC_TYPES_H
755 758
@@ -762,6 +765,12 @@
762/* Define to 1 if you have the `RSA_get_default_method' function. */ 765/* Define to 1 if you have the `RSA_get_default_method' function. */
763#undef HAVE_RSA_GET_DEFAULT_METHOD 766#undef HAVE_RSA_GET_DEFAULT_METHOD
764 767
768/* Define to 1 if you have the <sandbox.h> header file. */
769#undef HAVE_SANDBOX_H
770
771/* Define to 1 if you have the `sandbox_init' function. */
772#undef HAVE_SANDBOX_INIT
773
765/* define if you have sa_family_t data type */ 774/* define if you have sa_family_t data type */
766#undef HAVE_SA_FAMILY_T 775#undef HAVE_SA_FAMILY_T
767 776
@@ -948,13 +957,13 @@
948/* define if you have struct sockaddr_in6 data type */ 957/* define if you have struct sockaddr_in6 data type */
949#undef HAVE_STRUCT_SOCKADDR_IN6 958#undef HAVE_STRUCT_SOCKADDR_IN6
950 959
951/* Define to 1 if `sin6_scope_id' is member of `struct sockaddr_in6'. */ 960/* Define to 1 if `sin6_scope_id' is a member of `struct sockaddr_in6'. */
952#undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 961#undef HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID
953 962
954/* define if you have struct sockaddr_storage data type */ 963/* define if you have struct sockaddr_storage data type */
955#undef HAVE_STRUCT_SOCKADDR_STORAGE 964#undef HAVE_STRUCT_SOCKADDR_STORAGE
956 965
957/* Define to 1 if `st_blksize' is member of `struct stat'. */ 966/* Define to 1 if `st_blksize' is a member of `struct stat'. */
958#undef HAVE_STRUCT_STAT_ST_BLKSIZE 967#undef HAVE_STRUCT_STAT_ST_BLKSIZE
959 968
960/* Define to 1 if the system has the type `struct timespec'. */ 969/* Define to 1 if the system has the type `struct timespec'. */
@@ -1259,7 +1268,7 @@
1259 from environment and PATH */ 1268 from environment and PATH */
1260#undef LOGIN_PROGRAM_FALLBACK 1269#undef LOGIN_PROGRAM_FALLBACK
1261 1270
1262/* Set this to your mail directory if you don't have maillock.h */ 1271/* Set this to your mail directory if you do not have _PATH_MAILDIR */
1263#undef MAIL_DIRECTORY 1272#undef MAIL_DIRECTORY
1264 1273
1265/* Define on *nto-qnx systems */ 1274/* Define on *nto-qnx systems */
@@ -1307,6 +1316,9 @@
1307/* Define to the one symbol short name of this package. */ 1316/* Define to the one symbol short name of this package. */
1308#undef PACKAGE_TARNAME 1317#undef PACKAGE_TARNAME
1309 1318
1319/* Define to the home page for this package. */
1320#undef PACKAGE_URL
1321
1310/* Define to the version of this package. */ 1322/* Define to the version of this package. */
1311#undef PACKAGE_VERSION 1323#undef PACKAGE_VERSION
1312 1324
@@ -1329,6 +1341,18 @@
1329/* read(1) can return 0 for a non-closed fd */ 1341/* read(1) can return 0 for a non-closed fd */
1330#undef PTY_ZEROREAD 1342#undef PTY_ZEROREAD
1331 1343
1344/* Sandbox using Darwin sandbox_init(3) */
1345#undef SANDBOX_DARWIN
1346
1347/* no privsep sandboxing */
1348#undef SANDBOX_NULL
1349
1350/* Sandbox using setrlimit(2) */
1351#undef SANDBOX_RLIMIT
1352
1353/* Sandbox using systrace(4) */
1354#undef SANDBOX_SYSTRACE
1355
1332/* Define if your platform breaks doing a seteuid before a setuid */ 1356/* Define if your platform breaks doing a seteuid before a setuid */
1333#undef SETEUID_BREAKS_SETUID 1357#undef SETEUID_BREAKS_SETUID
1334 1358
@@ -1466,9 +1490,17 @@
1466/* Define if you want SELinux support. */ 1490/* Define if you want SELinux support. */
1467#undef WITH_SELINUX 1491#undef WITH_SELINUX
1468 1492
1469/* Define to 1 if your processor stores words with the most significant byte 1493/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
1470 first (like Motorola and SPARC, unlike Intel and VAX). */ 1494 significant byte first (like Motorola and SPARC, unlike Intel). */
1471#undef WORDS_BIGENDIAN 1495#if defined AC_APPLE_UNIVERSAL_BUILD
1496# if defined __BIG_ENDIAN__
1497# define WORDS_BIGENDIAN 1
1498# endif
1499#else
1500# ifndef WORDS_BIGENDIAN
1501# undef WORDS_BIGENDIAN
1502# endif
1503#endif
1472 1504
1473/* Define if xauth is found in your path */ 1505/* Define if xauth is found in your path */
1474#undef XAUTH_PATH 1506#undef XAUTH_PATH
diff --git a/config.sub b/config.sub
index c2d125724..2d8169626 100755
--- a/config.sub
+++ b/config.sub
@@ -1,10 +1,10 @@
1#! /bin/sh 1#! /bin/sh
2# Configuration validation subroutine script. 2# Configuration validation subroutine script.
3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 3# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 4# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010,
5# Free Software Foundation, Inc. 5# 2011 Free Software Foundation, Inc.
6 6
7timestamp='2010-01-22' 7timestamp='2011-01-01'
8 8
9# This file is (in principle) common to ALL GNU software. 9# This file is (in principle) common to ALL GNU software.
10# The presence of a machine in this file suggests that SOME GNU software 10# The presence of a machine in this file suggests that SOME GNU software
@@ -124,8 +124,9 @@ esac
124# Here we must recognize all the valid KERNEL-OS combinations. 124# Here we must recognize all the valid KERNEL-OS combinations.
125maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` 125maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
126case $maybe_os in 126case $maybe_os in
127 nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ 127 nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \
128 uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ 128 linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \
129 knetbsd*-gnu* | netbsd*-gnu* | \
129 kopensolaris*-gnu* | \ 130 kopensolaris*-gnu* | \
130 storm-chaos* | os2-emx* | rtmk-nova*) 131 storm-chaos* | os2-emx* | rtmk-nova*)
131 os=-$maybe_os 132 os=-$maybe_os
@@ -282,6 +283,7 @@ case $basic_machine in
282 | moxie \ 283 | moxie \
283 | mt \ 284 | mt \
284 | msp430 \ 285 | msp430 \
286 | nds32 | nds32le | nds32be \
285 | nios | nios2 \ 287 | nios | nios2 \
286 | ns16k | ns32k \ 288 | ns16k | ns32k \
287 | or32 \ 289 | or32 \
@@ -295,7 +297,7 @@ case $basic_machine in
295 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ 297 | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
296 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ 298 | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
297 | spu | strongarm \ 299 | spu | strongarm \
298 | tahoe | thumb | tic4x | tic80 | tron \ 300 | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
299 | ubicom32 \ 301 | ubicom32 \
300 | v850 | v850e \ 302 | v850 | v850e \
301 | we32k \ 303 | we32k \
@@ -303,6 +305,15 @@ case $basic_machine in
303 | z8k | z80) 305 | z8k | z80)
304 basic_machine=$basic_machine-unknown 306 basic_machine=$basic_machine-unknown
305 ;; 307 ;;
308 c54x)
309 basic_machine=tic54x-unknown
310 ;;
311 c55x)
312 basic_machine=tic55x-unknown
313 ;;
314 c6x)
315 basic_machine=tic6x-unknown
316 ;;
306 m6811 | m68hc11 | m6812 | m68hc12 | picochip) 317 m6811 | m68hc11 | m6812 | m68hc12 | picochip)
307 # Motorola 68HC11/12. 318 # Motorola 68HC11/12.
308 basic_machine=$basic_machine-unknown 319 basic_machine=$basic_machine-unknown
@@ -334,7 +345,7 @@ case $basic_machine in
334 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ 345 | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
335 | avr-* | avr32-* \ 346 | avr-* | avr32-* \
336 | bfin-* | bs2000-* \ 347 | bfin-* | bs2000-* \
337 | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ 348 | c[123]* | c30-* | [cjt]90-* | c4x-* \
338 | clipper-* | craynv-* | cydra-* \ 349 | clipper-* | craynv-* | cydra-* \
339 | d10v-* | d30v-* | dlx-* \ 350 | d10v-* | d30v-* | dlx-* \
340 | elxsi-* \ 351 | elxsi-* \
@@ -368,6 +379,7 @@ case $basic_machine in
368 | mmix-* \ 379 | mmix-* \
369 | mt-* \ 380 | mt-* \
370 | msp430-* \ 381 | msp430-* \
382 | nds32-* | nds32le-* | nds32be-* \
371 | nios-* | nios2-* \ 383 | nios-* | nios2-* \
372 | none-* | np1-* | ns16k-* | ns32k-* \ 384 | none-* | np1-* | ns16k-* | ns32k-* \
373 | orion-* \ 385 | orion-* \
@@ -482,6 +494,15 @@ case $basic_machine in
482 basic_machine=powerpc-ibm 494 basic_machine=powerpc-ibm
483 os=-cnk 495 os=-cnk
484 ;; 496 ;;
497 c54x-*)
498 basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
499 ;;
500 c55x-*)
501 basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
502 ;;
503 c6x-*)
504 basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
505 ;;
485 c90) 506 c90)
486 basic_machine=c90-cray 507 basic_machine=c90-cray
487 os=-unicos 508 os=-unicos
@@ -518,7 +539,7 @@ case $basic_machine in
518 basic_machine=craynv-cray 539 basic_machine=craynv-cray
519 os=-unicosmp 540 os=-unicosmp
520 ;; 541 ;;
521 cr16) 542 cr16 | cr16-*)
522 basic_machine=cr16-unknown 543 basic_machine=cr16-unknown
523 os=-elf 544 os=-elf
524 ;; 545 ;;
@@ -841,6 +862,12 @@ case $basic_machine in
841 np1) 862 np1)
842 basic_machine=np1-gould 863 basic_machine=np1-gould
843 ;; 864 ;;
865 neo-tandem)
866 basic_machine=neo-tandem
867 ;;
868 nse-tandem)
869 basic_machine=nse-tandem
870 ;;
844 nsr-tandem) 871 nsr-tandem)
845 basic_machine=nsr-tandem 872 basic_machine=nsr-tandem
846 ;; 873 ;;
@@ -1075,18 +1102,6 @@ case $basic_machine in
1075 basic_machine=t90-cray 1102 basic_machine=t90-cray
1076 os=-unicos 1103 os=-unicos
1077 ;; 1104 ;;
1078 tic54x | c54x*)
1079 basic_machine=tic54x-unknown
1080 os=-coff
1081 ;;
1082 tic55x | c55x*)
1083 basic_machine=tic55x-unknown
1084 os=-coff
1085 ;;
1086 tic6x | c6x*)
1087 basic_machine=tic6x-unknown
1088 os=-coff
1089 ;;
1090 # This must be matched before tile*. 1105 # This must be matched before tile*.
1091 tilegx*) 1106 tilegx*)
1092 basic_machine=tilegx-unknown 1107 basic_machine=tilegx-unknown
@@ -1301,7 +1316,8 @@ case $os in
1301 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ 1316 | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
1302 | -chorusos* | -chorusrdb* | -cegcc* \ 1317 | -chorusos* | -chorusrdb* | -cegcc* \
1303 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ 1318 | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
1304 | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ 1319 | -mingw32* | -linux-gnu* | -linux-android* \
1320 | -linux-newlib* | -linux-uclibc* \
1305 | -uxpv* | -beos* | -mpeix* | -udk* \ 1321 | -uxpv* | -beos* | -mpeix* | -udk* \
1306 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ 1322 | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
1307 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ 1323 | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1484,6 +1500,15 @@ case $basic_machine in
1484 c4x-* | tic4x-*) 1500 c4x-* | tic4x-*)
1485 os=-coff 1501 os=-coff
1486 ;; 1502 ;;
1503 tic54x-*)
1504 os=-coff
1505 ;;
1506 tic55x-*)
1507 os=-coff
1508 ;;
1509 tic6x-*)
1510 os=-coff
1511 ;;
1487 # This must come before the *-dec entry. 1512 # This must come before the *-dec entry.
1488 pdp10-*) 1513 pdp10-*)
1489 os=-tops20 1514 os=-tops20
diff --git a/configure b/configure
index 73040c5d3..c15fdc3cf 100755
--- a/configure
+++ b/configure
@@ -1,63 +1,86 @@
1#! /bin/sh 1#! /bin/sh
2# From configure.ac Revision: 1.469.4.1 . 2# From configure.ac Revision: 1.480 .
3# Guess values for system-dependent variables and create Makefiles. 3# Guess values for system-dependent variables and create Makefiles.
4# Generated by GNU Autoconf 2.61 for OpenSSH Portable. 4# Generated by GNU Autoconf 2.68 for OpenSSH Portable.
5# 5#
6# Report bugs to <openssh-unix-dev@mindrot.org>. 6# Report bugs to <openssh-unix-dev@mindrot.org>.
7# 7#
8#
8# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 9# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. 10# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
11# Foundation, Inc.
12#
13#
10# This configure script is free software; the Free Software Foundation 14# This configure script is free software; the Free Software Foundation
11# gives unlimited permission to copy, distribute and modify it. 15# gives unlimited permission to copy, distribute and modify it.
12## --------------------- ## 16## -------------------- ##
13## M4sh Initialization. ## 17## M4sh Initialization. ##
14## --------------------- ## 18## -------------------- ##
15 19
16# Be more Bourne compatible 20# Be more Bourne compatible
17DUALCASE=1; export DUALCASE # for MKS sh 21DUALCASE=1; export DUALCASE # for MKS sh
18if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 22if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19 emulate sh 23 emulate sh
20 NULLCMD=: 24 NULLCMD=:
21 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which 25 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
22 # is contrary to our usage. Disable this feature. 26 # is contrary to our usage. Disable this feature.
23 alias -g '${1+"$@"}'='"$@"' 27 alias -g '${1+"$@"}'='"$@"'
24 setopt NO_GLOB_SUBST 28 setopt NO_GLOB_SUBST
25else 29else
26 case `(set -o) 2>/dev/null` in 30 case `(set -o) 2>/dev/null` in #(
27 *posix*) set -o posix ;; 31 *posix*) :
32 set -o posix ;; #(
33 *) :
34 ;;
28esac 35esac
29
30fi 36fi
31 37
32 38
33 39as_nl='
34 40'
35# PATH needs CR 41export as_nl
36# Avoid depending upon Character Ranges. 42# Printing a long string crashes Solaris 7 /usr/bin/printf.
37as_cr_letters='abcdefghijklmnopqrstuvwxyz' 43as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
38as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 44as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
39as_cr_Letters=$as_cr_letters$as_cr_LETTERS 45as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
40as_cr_digits='0123456789' 46# Prefer a ksh shell builtin over an external printf program on Solaris,
41as_cr_alnum=$as_cr_Letters$as_cr_digits 47# but without wasting forks for bash or zsh.
42 48if test -z "$BASH_VERSION$ZSH_VERSION" \
43# The user is always right. 49 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
44if test "${PATH_SEPARATOR+set}" != set; then 50 as_echo='print -r --'
45 echo "#! /bin/sh" >conf$$.sh 51 as_echo_n='print -rn --'
46 echo "exit 0" >>conf$$.sh 52elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
47 chmod +x conf$$.sh 53 as_echo='printf %s\n'
48 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 54 as_echo_n='printf %s'
49 PATH_SEPARATOR=';' 55else
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'
50 else 59 else
51 PATH_SEPARATOR=: 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'
52 fi 72 fi
53 rm -f conf$$.sh 73 export as_echo_body
74 as_echo='sh -c $as_echo_body as_echo'
54fi 75fi
55 76
56# Support unset when possible. 77# The user is always right.
57if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 78if test "${PATH_SEPARATOR+set}" != set; then
58 as_unset=unset 79 PATH_SEPARATOR=:
59else 80 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
60 as_unset=false 81 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
82 PATH_SEPARATOR=';'
83 }
61fi 84fi
62 85
63 86
@@ -66,20 +89,19 @@ fi
66# there to prevent editors from complaining about space-tab. 89# there to prevent editors from complaining about space-tab.
67# (If _AS_PATH_WALK were called with IFS unset, it would disable word 90# (If _AS_PATH_WALK were called with IFS unset, it would disable word
68# splitting by setting IFS to empty value.) 91# splitting by setting IFS to empty value.)
69as_nl='
70'
71IFS=" "" $as_nl" 92IFS=" "" $as_nl"
72 93
73# Find who we are. Look in the path if we contain no directory separator. 94# Find who we are. Look in the path if we contain no directory separator.
74case $0 in 95as_myself=
96case $0 in #((
75 *[\\/]* ) as_myself=$0 ;; 97 *[\\/]* ) as_myself=$0 ;;
76 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 98 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
77for as_dir in $PATH 99for as_dir in $PATH
78do 100do
79 IFS=$as_save_IFS 101 IFS=$as_save_IFS
80 test -z "$as_dir" && as_dir=. 102 test -z "$as_dir" && as_dir=.
81 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 103 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
82done 104 done
83IFS=$as_save_IFS 105IFS=$as_save_IFS
84 106
85 ;; 107 ;;
@@ -90,354 +112,329 @@ if test "x$as_myself" = x; then
90 as_myself=$0 112 as_myself=$0
91fi 113fi
92if test ! -f "$as_myself"; then 114if test ! -f "$as_myself"; then
93 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 115 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
94 { (exit 1); exit 1; } 116 exit 1
95fi 117fi
96 118
97# Work around bugs in pre-3.0 UWIN ksh. 119# Unset variables that we do not need and which cause bugs (e.g. in
98for as_var in ENV MAIL MAILPATH 120# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
99do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var 121# suppresses any "Segmentation fault" message there. '((' could
122# trigger a bug in pdksh 5.2.14.
123for as_var in BASH_ENV ENV MAIL MAILPATH
124do eval test x\${$as_var+set} = xset \
125 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
100done 126done
101PS1='$ ' 127PS1='$ '
102PS2='> ' 128PS2='> '
103PS4='+ ' 129PS4='+ '
104 130
105# NLS nuisances. 131# NLS nuisances.
106for as_var in \ 132LC_ALL=C
107 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ 133export LC_ALL
108 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ 134LANGUAGE=C
109 LC_TELEPHONE LC_TIME 135export LANGUAGE
110do
111 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
112 eval $as_var=C; export $as_var
113 else
114 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
115 fi
116done
117
118# Required to use basename.
119if expr a : '\(a\)' >/dev/null 2>&1 &&
120 test "X`expr 00001 : '.*\(...\)'`" = X001; then
121 as_expr=expr
122else
123 as_expr=false
124fi
125
126if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
127 as_basename=basename
128else
129 as_basename=false
130fi
131
132
133# Name of the executable.
134as_me=`$as_basename -- "$0" ||
135$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
136 X"$0" : 'X\(//\)$' \| \
137 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
138echo X/"$0" |
139 sed '/^.*\/\([^/][^/]*\)\/*$/{
140 s//\1/
141 q
142 }
143 /^X\/\(\/\/\)$/{
144 s//\1/
145 q
146 }
147 /^X\/\(\/\).*/{
148 s//\1/
149 q
150 }
151 s/.*/./; q'`
152 136
153# CDPATH. 137# CDPATH.
154$as_unset CDPATH 138(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
155
156 139
157if test "x$CONFIG_SHELL" = x; then 140if test "x$CONFIG_SHELL" = x; then
158 if (eval ":") 2>/dev/null; then 141 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
159 as_have_required=yes 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
160else 148else
161 as_have_required=no 149 case \`(set -o) 2>/dev/null\` in #(
150 *posix*) :
151 set -o posix ;; #(
152 *) :
153 ;;
154esac
162fi 155fi
163 156"
164 if test $as_have_required = yes && (eval ": 157 as_required="as_fn_return () { (exit \$1); }
165(as_func_return () { 158as_fn_success () { as_fn_return 0; }
166 (exit \$1) 159as_fn_failure () { as_fn_return 1; }
167} 160as_fn_ret_success () { return 0; }
168as_func_success () { 161as_fn_ret_failure () { return 1; }
169 as_func_return 0
170}
171as_func_failure () {
172 as_func_return 1
173}
174as_func_ret_success () {
175 return 0
176}
177as_func_ret_failure () {
178 return 1
179}
180 162
181exitcode=0 163exitcode=0
182if as_func_success; then 164as_fn_success || { exitcode=1; echo as_fn_success failed.; }
183 : 165as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
184else 166as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
185 exitcode=1 167as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
186 echo as_func_success failed. 168if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
187fi 169
188 170else
189if as_func_failure; then 171 exitcode=1; echo positional parameters were not saved.
190 exitcode=1 172fi
191 echo as_func_failure succeeded. 173test x\$exitcode = x0 || exit 1"
192fi 174 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
193 175 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
194if as_func_ret_success; then 176 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
195 : 177 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
196else 178test \$(( 1 + 1 )) = 2 || exit 1"
197 exitcode=1 179 if (eval "$as_required") 2>/dev/null; then :
198 echo as_func_ret_success failed. 180 as_have_required=yes
199fi
200
201if as_func_ret_failure; then
202 exitcode=1
203 echo as_func_ret_failure succeeded.
204fi
205
206if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
207 :
208else 181else
209 exitcode=1 182 as_have_required=no
210 echo positional parameters were not saved.
211fi 183fi
184 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
212 185
213test \$exitcode = 0) || { (exit 1); exit 1; }
214
215(
216 as_lineno_1=\$LINENO
217 as_lineno_2=\$LINENO
218 test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
219 test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
220") 2> /dev/null; then
221 :
222else 186else
223 as_candidate_shells= 187 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
224 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 188as_found=false
225for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 189for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
226do 190do
227 IFS=$as_save_IFS 191 IFS=$as_save_IFS
228 test -z "$as_dir" && as_dir=. 192 test -z "$as_dir" && as_dir=.
229 case $as_dir in 193 as_found=:
194 case $as_dir in #(
230 /*) 195 /*)
231 for as_base in sh bash ksh sh5; do 196 for as_base in sh bash ksh sh5; do
232 as_candidate_shells="$as_candidate_shells $as_dir/$as_base" 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
204fi
205fi
233 done;; 206 done;;
234 esac 207 esac
208 as_found=false
235done 209done
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
213fi; }
236IFS=$as_save_IFS 214IFS=$as_save_IFS
237 215
238 216
239 for as_shell in $as_candidate_shells $SHELL; do 217 if test "x$CONFIG_SHELL" != x; then :
240 # Try only shells that exist, to save several forks. 218 # We cannot yet assume a decent shell, so we have to provide a
241 if { test -f "$as_shell" || test -f "$as_shell.exe"; } && 219 # neutralization value for shells without unset; and this also
242 { ("$as_shell") 2> /dev/null <<\_ASEOF 220 # works around shells that cannot unset nonexistent variables.
243if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 221 # Preserve -v and -x to the replacement shell.
244 emulate sh 222 BASH_ENV=/dev/null
245 NULLCMD=: 223 ENV=/dev/null
246 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which 224 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
247 # is contrary to our usage. Disable this feature. 225 export CONFIG_SHELL
248 alias -g '${1+"$@"}'='"$@"' 226 case $- in # ((((
249 setopt NO_GLOB_SUBST 227 *v*x* | *x*v* ) as_opts=-vx ;;
250else 228 *v* ) as_opts=-v ;;
251 case `(set -o) 2>/dev/null` in 229 *x* ) as_opts=-x ;;
252 *posix*) set -o posix ;; 230 * ) as_opts= ;;
253esac 231 esac
254 232 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
255fi 233fi
256 234
257 235 if test x$as_have_required = xno; then :
258: 236 $as_echo "$0: This script requires a shell more modern than all"
259_ASEOF 237 $as_echo "$0: the shells that I found on your system."
260}; then 238 if test x${ZSH_VERSION+set} = xset ; then
261 CONFIG_SHELL=$as_shell 239 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
262 as_have_required=yes 240 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
263 if { "$as_shell" 2> /dev/null <<\_ASEOF 241 else
264if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 242 $as_echo "$0: Please tell bug-autoconf@gnu.org and
265 emulate sh 243$0: openssh-unix-dev@mindrot.org about your system,
266 NULLCMD=: 244$0: including any error possibly output before this
267 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which 245$0: message. Then install a modern shell, or manually run
268 # is contrary to our usage. Disable this feature. 246$0: the script under such a shell if you do have one."
269 alias -g '${1+"$@"}'='"$@"' 247 fi
270 setopt NO_GLOB_SUBST 248 exit 1
271else
272 case `(set -o) 2>/dev/null` in
273 *posix*) set -o posix ;;
274esac
275
276fi 249fi
250fi
251fi
252SHELL=${CONFIG_SHELL-/bin/sh}
253export SHELL
254# Unset more variables known to interfere with behavior of common tools.
255CLICOLOR_FORCE= GREP_OPTIONS=
256unset CLICOLOR_FORCE GREP_OPTIONS
277 257
278 258## --------------------- ##
279: 259## M4sh Shell Functions. ##
280(as_func_return () { 260## --------------------- ##
281 (exit $1) 261# as_fn_unset VAR
282} 262# ---------------
283as_func_success () { 263# Portably unset VAR.
284 as_func_return 0 264as_fn_unset ()
285} 265{
286as_func_failure () { 266 { eval $1=; unset $1;}
287 as_func_return 1
288}
289as_func_ret_success () {
290 return 0
291}
292as_func_ret_failure () {
293 return 1
294} 267}
268as_unset=as_fn_unset
295 269
296exitcode=0 270# as_fn_set_status STATUS
297if as_func_success; then 271# -----------------------
298 : 272# Set $? to STATUS, without forking.
299else 273as_fn_set_status ()
300 exitcode=1 274{
301 echo as_func_success failed. 275 return $1
302fi 276} # as_fn_set_status
303 277
304if as_func_failure; then 278# as_fn_exit STATUS
305 exitcode=1 279# -----------------
306 echo as_func_failure succeeded. 280# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
307fi 281as_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.
291as_fn_mkdir_p ()
292{
308 293
309if as_func_ret_success; then 294 case $as_dir in #(
310 : 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.
341if (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 }'
311else 346else
312 exitcode=1 347 as_fn_append ()
313 echo as_func_ret_success failed. 348 {
314fi 349 eval $1=\$$1\$2
315 350 }
316if as_func_ret_failure; then 351fi # as_fn_append
317 exitcode=1 352
318 echo as_func_ret_failure succeeded. 353# as_fn_arith ARG...
319fi 354# ------------------
320 355# Perform arithmetic evaluation on the ARGs, and store the result in the
321if ( set x; as_func_ret_success y && test x = "$1" ); then 356# global $as_val. Take advantage of shells that can avoid forks. The arguments
322 : 357# must be portable across $(()) and expr.
358if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
359 eval 'as_fn_arith ()
360 {
361 as_val=$(( $* ))
362 }'
323else 363else
324 exitcode=1 364 as_fn_arith ()
325 echo positional parameters were not saved. 365 {
326fi 366 as_val=`expr "$@" || test $? -eq 1`
327 367 }
328test $exitcode = 0) || { (exit 1); exit 1; } 368fi # as_fn_arith
329
330(
331 as_lineno_1=$LINENO
332 as_lineno_2=$LINENO
333 test "x$as_lineno_1" != "x$as_lineno_2" &&
334 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
335
336_ASEOF
337}; then
338 break
339fi
340
341fi
342
343 done
344
345 if test "x$CONFIG_SHELL" != x; then
346 for as_var in BASH_ENV ENV
347 do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
348 done
349 export CONFIG_SHELL
350 exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
351fi
352
353
354 if test $as_have_required = no; then
355 echo This script requires a shell more modern than all the
356 echo shells that I found on your system. Please install a
357 echo modern shell, or manually run the script under such a
358 echo shell if you do have one.
359 { (exit 1); exit 1; }
360fi
361
362
363fi
364
365fi
366
367 369
368 370
369(eval "as_func_return () { 371# as_fn_error STATUS ERROR [LINENO LOG_FD]
370 (exit \$1) 372# ----------------------------------------
371} 373# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
372as_func_success () { 374# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
373 as_func_return 0 375# script with STATUS, using 1 if that was 0.
374} 376as_fn_error ()
375as_func_failure () { 377{
376 as_func_return 1 378 as_status=$1; test $as_status -eq 0 && as_status=1
377} 379 if test "$4"; then
378as_func_ret_success () { 380 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
379 return 0 381 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
380} 382 fi
381as_func_ret_failure () { 383 $as_echo "$as_me: error: $2" >&2
382 return 1 384 as_fn_exit $as_status
383} 385} # as_fn_error
384 386
385exitcode=0 387if expr a : '\(a\)' >/dev/null 2>&1 &&
386if as_func_success; then 388 test "X`expr 00001 : '.*\(...\)'`" = X001; then
387 : 389 as_expr=expr
388else 390else
389 exitcode=1 391 as_expr=false
390 echo as_func_success failed.
391fi
392
393if as_func_failure; then
394 exitcode=1
395 echo as_func_failure succeeded.
396fi 392fi
397 393
398if as_func_ret_success; then 394if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
399 : 395 as_basename=basename
400else 396else
401 exitcode=1 397 as_basename=false
402 echo as_func_ret_success failed.
403fi
404
405if as_func_ret_failure; then
406 exitcode=1
407 echo as_func_ret_failure succeeded.
408fi 398fi
409 399
410if ( set x; as_func_ret_success y && test x = \"\$1\" ); then 400if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
411 : 401 as_dirname=dirname
412else 402else
413 exitcode=1 403 as_dirname=false
414 echo positional parameters were not saved.
415fi 404fi
416 405
417test \$exitcode = 0") || { 406as_me=`$as_basename -- "$0" ||
418 echo No shell found that supports shell functions. 407$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
419 echo Please tell autoconf@gnu.org about your system, 408 X"$0" : 'X\(//\)$' \| \
420 echo including any error possibly output before this 409 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
421 echo message 410$as_echo X/"$0" |
422} 411 sed '/^.*\/\([^/][^/]*\)\/*$/{
423 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 424
425# Avoid depending upon Character Ranges.
426as_cr_letters='abcdefghijklmnopqrstuvwxyz'
427as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
428as_cr_Letters=$as_cr_letters$as_cr_LETTERS
429as_cr_digits='0123456789'
430as_cr_alnum=$as_cr_Letters$as_cr_digits
425 431
426 as_lineno_1=$LINENO
427 as_lineno_2=$LINENO
428 test "x$as_lineno_1" != "x$as_lineno_2" &&
429 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
430 432
431 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO 433 as_lineno_1=$LINENO as_lineno_1a=$LINENO
432 # uniformly replaced by the line number. The first 'sed' inserts a 434 as_lineno_2=$LINENO as_lineno_2a=$LINENO
433 # line-number line after each line using $LINENO; the second 'sed' 435 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
434 # does the real work. The second script uses 'N' to pair each 436 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
435 # line-number line with the line containing $LINENO, and appends 437 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
436 # trailing '-' during substitution so that $LINENO is not a special
437 # case at line end.
438 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
439 # scripts with optimization help from Paolo Bonzini. Blame Lee
440 # E. McMahon (1931-1989) for sed's syntax. :-)
441 sed -n ' 438 sed -n '
442 p 439 p
443 /[$]LINENO/= 440 /[$]LINENO/=
@@ -454,8 +451,7 @@ test \$exitcode = 0") || {
454 s/-\n.*// 451 s/-\n.*//
455 ' >$as_me.lineno && 452 ' >$as_me.lineno &&
456 chmod +x "$as_me.lineno" || 453 chmod +x "$as_me.lineno" ||
457 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 454 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
458 { (exit 1); exit 1; }; }
459 455
460 # Don't try to exec as it changes $[0], causing all sort of problems 456 # Don't try to exec as it changes $[0], causing all sort of problems
461 # (the dirname of $[0] is not the place where we might find the 457 # (the dirname of $[0] is not the place where we might find the
@@ -465,49 +461,40 @@ test \$exitcode = 0") || {
465 exit 461 exit
466} 462}
467 463
468
469if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
470 as_dirname=dirname
471else
472 as_dirname=false
473fi
474
475ECHO_C= ECHO_N= ECHO_T= 464ECHO_C= ECHO_N= ECHO_T=
476case `echo -n x` in 465case `echo -n x` in #(((((
477-n*) 466-n*)
478 case `echo 'x\c'` in 467 case `echo 'xy\c'` in
479 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 468 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
480 *) ECHO_C='\c';; 469 xy) ECHO_C='\c';;
470 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
471 ECHO_T=' ';;
481 esac;; 472 esac;;
482*) 473*)
483 ECHO_N='-n';; 474 ECHO_N='-n';;
484esac 475esac
485 476
486if expr a : '\(a\)' >/dev/null 2>&1 &&
487 test "X`expr 00001 : '.*\(...\)'`" = X001; then
488 as_expr=expr
489else
490 as_expr=false
491fi
492
493rm -f conf$$ conf$$.exe conf$$.file 477rm -f conf$$ conf$$.exe conf$$.file
494if test -d conf$$.dir; then 478if test -d conf$$.dir; then
495 rm -f conf$$.dir/conf$$.file 479 rm -f conf$$.dir/conf$$.file
496else 480else
497 rm -f conf$$.dir 481 rm -f conf$$.dir
498 mkdir conf$$.dir 482 mkdir conf$$.dir 2>/dev/null
499fi 483fi
500echo >conf$$.file 484if (echo >conf$$.file) 2>/dev/null; then
501if ln -s conf$$.file conf$$ 2>/dev/null; then 485 if ln -s conf$$.file conf$$ 2>/dev/null; then
502 as_ln_s='ln -s' 486 as_ln_s='ln -s'
503 # ... but there are two gotchas: 487 # ... but there are two gotchas:
504 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 488 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
505 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 489 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
506 # In both cases, we have to default to `cp -p'. 490 # In both cases, we have to default to `cp -p'.
507 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 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
508 as_ln_s='cp -p' 496 as_ln_s='cp -p'
509elif ln conf$$.file conf$$ 2>/dev/null; then 497 fi
510 as_ln_s=ln
511else 498else
512 as_ln_s='cp -p' 499 as_ln_s='cp -p'
513fi 500fi
@@ -515,7 +502,7 @@ rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
515rmdir conf$$.dir 2>/dev/null 502rmdir conf$$.dir 2>/dev/null
516 503
517if mkdir -p . 2>/dev/null; then 504if mkdir -p . 2>/dev/null; then
518 as_mkdir_p=: 505 as_mkdir_p='mkdir -p "$as_dir"'
519else 506else
520 test -d ./-p && rmdir ./-p 507 test -d ./-p && rmdir ./-p
521 as_mkdir_p=false 508 as_mkdir_p=false
@@ -532,12 +519,12 @@ else
532 as_test_x=' 519 as_test_x='
533 eval sh -c '\'' 520 eval sh -c '\''
534 if test -d "$1"; then 521 if test -d "$1"; then
535 test -d "$1/."; 522 test -d "$1/.";
536 else 523 else
537 case $1 in 524 case $1 in #(
538 -*)set "./$1";; 525 -*)set "./$1";;
539 esac; 526 esac;
540 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in 527 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
541 ???[sx]*):;;*)false;;esac;fi 528 ???[sx]*):;;*)false;;esac;fi
542 '\'' sh 529 '\'' sh
543 ' 530 '
@@ -551,11 +538,11 @@ as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
551as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 538as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
552 539
553 540
554 541test -n "$DJDIR" || exec 7<&0 </dev/null
555exec 7<&0 </dev/null 6>&1 542exec 6>&1
556 543
557# Name of the host. 544# Name of the host.
558# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, 545# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
559# so uname gets run too. 546# so uname gets run too.
560ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 547ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
561 548
@@ -570,7 +557,6 @@ cross_compiling=no
570subdirs= 557subdirs=
571MFLAGS= 558MFLAGS=
572MAKEFLAGS= 559MAKEFLAGS=
573SHELL=${CONFIG_SHELL-/bin/sh}
574 560
575# Identity of this package. 561# Identity of this package.
576PACKAGE_NAME='OpenSSH' 562PACKAGE_NAME='OpenSSH'
@@ -578,6 +564,7 @@ PACKAGE_TARNAME='openssh'
578PACKAGE_VERSION='Portable' 564PACKAGE_VERSION='Portable'
579PACKAGE_STRING='OpenSSH Portable' 565PACKAGE_STRING='OpenSSH Portable'
580PACKAGE_BUGREPORT='openssh-unix-dev@mindrot.org' 566PACKAGE_BUGREPORT='openssh-unix-dev@mindrot.org'
567PACKAGE_URL=''
581 568
582ac_unique_file="ssh.c" 569ac_unique_file="ssh.c"
583# Factoring default headers for most tests. 570# Factoring default headers for most tests.
@@ -616,125 +603,161 @@ ac_includes_default="\
616# include <unistd.h> 603# include <unistd.h>
617#endif" 604#endif"
618 605
619ac_subst_vars='SHELL 606ac_subst_vars='LTLIBOBJS
620PATH_SEPARATOR
621PACKAGE_NAME
622PACKAGE_TARNAME
623PACKAGE_VERSION
624PACKAGE_STRING
625PACKAGE_BUGREPORT
626exec_prefix
627prefix
628program_transform_name
629bindir
630sbindir
631libexecdir
632datarootdir
633datadir
634sysconfdir
635sharedstatedir
636localstatedir
637includedir
638oldincludedir
639docdir
640infodir
641htmldir
642dvidir
643pdfdir
644psdir
645libdir
646localedir
647mandir
648DEFS
649ECHO_C
650ECHO_N
651ECHO_T
652LIBS
653build_alias
654host_alias
655target_alias
656CC
657CFLAGS
658LDFLAGS
659CPPFLAGS
660ac_ct_CC
661EXEEXT
662OBJEXT
663build
664build_cpu
665build_vendor
666build_os
667host
668host_cpu
669host_vendor
670host_os
671CPP
672GREP
673EGREP
674AWK
675RANLIB
676INSTALL_PROGRAM
677INSTALL_SCRIPT
678INSTALL_DATA
679AR
680CAT
681KILL
682PERL
683SED
684ENT
685TEST_MINUS_S_SH
686SH
687GROFF
688NROFF
689MANDOC
690TEST_SHELL
691MANFMT
692PATH_GROUPADD_PROG
693PATH_USERADD_PROG
694MAKE_PACKAGE_SUPPORTED
695STARTUP_SCRIPT_SHELL
696LOGIN_PROGRAM_FALLBACK
697PATH_PASSWD_PROG
698LD
699PKGCONFIG
700LIBEDIT
701TEST_SSH_SHA256
702TEST_SSH_ECC
703COMMENT_OUT_ECC
704INSTALL_SSH_RAND_HELPER
705SSH_PRIVSEP_USER
706PROG_LS
707PROG_NETSTAT
708PROG_ARP
709PROG_IFCONFIG
710PROG_JSTAT
711PROG_PS
712PROG_SAR
713PROG_W
714PROG_WHO
715PROG_LAST
716PROG_LASTLOG
717PROG_DF
718PROG_VMSTAT
719PROG_UPTIME
720PROG_IPCS
721PROG_TAIL
722INSTALL_SSH_PRNG_CMDS
723SSHLIBS
724SSHDLIBS
725KRB5CONF
726PRIVSEP_PATH
727xauth_path
728STRIP_OPT
729XAUTH_PATH
730MANTYPE
731mansubdir
732user_path
733piddir
734TEST_SSH_IPV6
735LIBOBJS 607LIBOBJS
736LTLIBOBJS' 608TEST_SSH_IPV6
609piddir
610user_path
611mansubdir
612MANTYPE
613XAUTH_PATH
614STRIP_OPT
615xauth_path
616PRIVSEP_PATH
617KRB5CONF
618SSHDLIBS
619SSHLIBS
620SSH_PRIVSEP_USER
621COMMENT_OUT_ECC
622TEST_SSH_ECC
623TEST_SSH_SHA256
624LIBEDIT
625PKGCONFIG
626LD
627PATH_PASSWD_PROG
628LOGIN_PROGRAM_FALLBACK
629STARTUP_SCRIPT_SHELL
630MAKE_PACKAGE_SUPPORTED
631PATH_USERADD_PROG
632PATH_GROUPADD_PROG
633MANFMT
634TEST_SHELL
635MANDOC
636NROFF
637GROFF
638SH
639TEST_MINUS_S_SH
640ENT
641SED
642PERL
643KILL
644CAT
645AR
646INSTALL_DATA
647INSTALL_SCRIPT
648INSTALL_PROGRAM
649RANLIB
650AWK
651EGREP
652GREP
653CPP
654host_os
655host_vendor
656host_cpu
657host
658build_os
659build_vendor
660build_cpu
661build
662OBJEXT
663EXEEXT
664ac_ct_CC
665CPPFLAGS
666LDFLAGS
667CFLAGS
668CC
669target_alias
670host_alias
671build_alias
672LIBS
673ECHO_T
674ECHO_N
675ECHO_C
676DEFS
677mandir
678localedir
679libdir
680psdir
681pdfdir
682dvidir
683htmldir
684infodir
685docdir
686oldincludedir
687includedir
688localstatedir
689sharedstatedir
690sysconfdir
691datadir
692datarootdir
693libexecdir
694sbindir
695bindir
696program_transform_name
697prefix
698exec_prefix
699PACKAGE_URL
700PACKAGE_BUGREPORT
701PACKAGE_STRING
702PACKAGE_VERSION
703PACKAGE_TARNAME
704PACKAGE_NAME
705PATH_SEPARATOR
706SHELL'
737ac_subst_files='' 707ac_subst_files=''
708ac_user_opts='
709enable_option_checking
710enable_largefile
711with_stackprotect
712with_rpath
713with_cflags
714with_cppflags
715with_ldflags
716with_libs
717with_Werror
718with_solaris_contracts
719with_solaris_projects
720with_osfsia
721with_zlib
722with_zlib_version_check
723with_skey
724with_tcp_wrappers
725with_libedit
726with_audit
727with_ssl_dir
728with_openssl_header_check
729with_ssl_engine
730with_prngd_port
731with_prngd_socket
732with_pam
733with_privsep_user
734with_sandbox
735with_selinux
736with_kerberos5
737with_privsep_path
738with_xauth
739enable_strip
740with_maildir
741with_mantype
742with_md5_passwords
743with_shadow
744with_ipaddr_display
745enable_etc_default_login
746with_default_path
747with_superuser_path
748with_4in6
749with_bsd_auth
750with_pid_dir
751enable_lastlog
752enable_utmp
753enable_utmpx
754enable_wtmp
755enable_wtmpx
756enable_libutil
757enable_pututline
758enable_pututxline
759with_lastlog
760'
738 ac_precious_vars='build_alias 761 ac_precious_vars='build_alias
739host_alias 762host_alias
740target_alias 763target_alias
@@ -749,6 +772,8 @@ CPP'
749# Initialize some variables set by options. 772# Initialize some variables set by options.
750ac_init_help= 773ac_init_help=
751ac_init_version=false 774ac_init_version=false
775ac_unrecognized_opts=
776ac_unrecognized_sep=
752# The variables have the same names as the options, with 777# The variables have the same names as the options, with
753# dashes changed to underlines. 778# dashes changed to underlines.
754cache_file=/dev/null 779cache_file=/dev/null
@@ -804,8 +829,9 @@ do
804 fi 829 fi
805 830
806 case $ac_option in 831 case $ac_option in
807 *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 832 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
808 *) ac_optarg=yes ;; 833 *=) ac_optarg= ;;
834 *) ac_optarg=yes ;;
809 esac 835 esac
810 836
811 # Accept the important Cygnus configure options, so we can diagnose typos. 837 # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -847,13 +873,20 @@ do
847 datarootdir=$ac_optarg ;; 873 datarootdir=$ac_optarg ;;
848 874
849 -disable-* | --disable-*) 875 -disable-* | --disable-*)
850 ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 876 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
851 # Reject names that are not valid shell variable names. 877 # Reject names that are not valid shell variable names.
852 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && 878 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
853 { echo "$as_me: error: invalid feature name: $ac_feature" >&2 879 as_fn_error $? "invalid feature name: $ac_useropt"
854 { (exit 1); exit 1; }; } 880 ac_useropt_orig=$ac_useropt
855 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` 881 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
856 eval enable_$ac_feature=no ;; 882 case $ac_user_opts in
883 *"
884"enable_$ac_useropt"
885"*) ;;
886 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
887 ac_unrecognized_sep=', ';;
888 esac
889 eval enable_$ac_useropt=no ;;
857 890
858 -docdir | --docdir | --docdi | --doc | --do) 891 -docdir | --docdir | --docdi | --doc | --do)
859 ac_prev=docdir ;; 892 ac_prev=docdir ;;
@@ -866,13 +899,20 @@ do
866 dvidir=$ac_optarg ;; 899 dvidir=$ac_optarg ;;
867 900
868 -enable-* | --enable-*) 901 -enable-* | --enable-*)
869 ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 902 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
870 # Reject names that are not valid shell variable names. 903 # Reject names that are not valid shell variable names.
871 expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && 904 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
872 { echo "$as_me: error: invalid feature name: $ac_feature" >&2 905 as_fn_error $? "invalid feature name: $ac_useropt"
873 { (exit 1); exit 1; }; } 906 ac_useropt_orig=$ac_useropt
874 ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` 907 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
875 eval enable_$ac_feature=\$ac_optarg ;; 908 case $ac_user_opts in
909 *"
910"enable_$ac_useropt"
911"*) ;;
912 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
913 ac_unrecognized_sep=', ';;
914 esac
915 eval enable_$ac_useropt=\$ac_optarg ;;
876 916
877 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 917 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
878 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 918 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -1063,22 +1103,36 @@ do
1063 ac_init_version=: ;; 1103 ac_init_version=: ;;
1064 1104
1065 -with-* | --with-*) 1105 -with-* | --with-*)
1066 ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 1106 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1067 # Reject names that are not valid shell variable names. 1107 # Reject names that are not valid shell variable names.
1068 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && 1108 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1069 { echo "$as_me: error: invalid package name: $ac_package" >&2 1109 as_fn_error $? "invalid package name: $ac_useropt"
1070 { (exit 1); exit 1; }; } 1110 ac_useropt_orig=$ac_useropt
1071 ac_package=`echo $ac_package | sed 's/[-.]/_/g'` 1111 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1072 eval with_$ac_package=\$ac_optarg ;; 1112 case $ac_user_opts in
1113 *"
1114"with_$ac_useropt"
1115"*) ;;
1116 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1117 ac_unrecognized_sep=', ';;
1118 esac
1119 eval with_$ac_useropt=\$ac_optarg ;;
1073 1120
1074 -without-* | --without-*) 1121 -without-* | --without-*)
1075 ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` 1122 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1076 # Reject names that are not valid shell variable names. 1123 # Reject names that are not valid shell variable names.
1077 expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && 1124 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1078 { echo "$as_me: error: invalid package name: $ac_package" >&2 1125 as_fn_error $? "invalid package name: $ac_useropt"
1079 { (exit 1); exit 1; }; } 1126 ac_useropt_orig=$ac_useropt
1080 ac_package=`echo $ac_package | sed 's/[-.]/_/g'` 1127 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1081 eval with_$ac_package=no ;; 1128 case $ac_user_opts in
1129 *"
1130"with_$ac_useropt"
1131"*) ;;
1132 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1133 ac_unrecognized_sep=', ';;
1134 esac
1135 eval with_$ac_useropt=no ;;
1082 1136
1083 --x) 1137 --x)
1084 # Obsolete; use --with-x. 1138 # Obsolete; use --with-x.
@@ -1098,26 +1152,26 @@ do
1098 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 1152 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1099 x_libraries=$ac_optarg ;; 1153 x_libraries=$ac_optarg ;;
1100 1154
1101 -*) { echo "$as_me: error: unrecognized option: $ac_option 1155 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1102Try \`$0 --help' for more information." >&2 1156Try \`$0 --help' for more information"
1103 { (exit 1); exit 1; }; }
1104 ;; 1157 ;;
1105 1158
1106 *=*) 1159 *=*)
1107 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` 1160 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1108 # Reject names that are not valid shell variable names. 1161 # Reject names that are not valid shell variable names.
1109 expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && 1162 case $ac_envvar in #(
1110 { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 1163 '' | [0-9]* | *[!_$as_cr_alnum]* )
1111 { (exit 1); exit 1; }; } 1164 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1165 esac
1112 eval $ac_envvar=\$ac_optarg 1166 eval $ac_envvar=\$ac_optarg
1113 export $ac_envvar ;; 1167 export $ac_envvar ;;
1114 1168
1115 *) 1169 *)
1116 # FIXME: should be removed in autoconf 3.0. 1170 # FIXME: should be removed in autoconf 3.0.
1117 echo "$as_me: WARNING: you should use --build, --host, --target" >&2 1171 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1118 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 1172 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1119 echo "$as_me: WARNING: invalid host type: $ac_option" >&2 1173 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1120 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} 1174 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1121 ;; 1175 ;;
1122 1176
1123 esac 1177 esac
@@ -1125,23 +1179,36 @@ done
1125 1179
1126if test -n "$ac_prev"; then 1180if test -n "$ac_prev"; then
1127 ac_option=--`echo $ac_prev | sed 's/_/-/g'` 1181 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1128 { echo "$as_me: error: missing argument to $ac_option" >&2 1182 as_fn_error $? "missing argument to $ac_option"
1129 { (exit 1); exit 1; }; }
1130fi 1183fi
1131 1184
1132# Be sure to have absolute directory names. 1185if test -n "$ac_unrecognized_opts"; then
1186 case $enable_option_checking in
1187 no) ;;
1188 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1189 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1190 esac
1191fi
1192
1193# Check all directory arguments for consistency.
1133for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 1194for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1134 datadir sysconfdir sharedstatedir localstatedir includedir \ 1195 datadir sysconfdir sharedstatedir localstatedir includedir \
1135 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 1196 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1136 libdir localedir mandir 1197 libdir localedir mandir
1137do 1198do
1138 eval ac_val=\$$ac_var 1199 eval ac_val=\$$ac_var
1200 # Remove trailing slashes.
1201 case $ac_val in
1202 */ )
1203 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1204 eval $ac_var=\$ac_val;;
1205 esac
1206 # Be sure to have absolute directory names.
1139 case $ac_val in 1207 case $ac_val in
1140 [\\/$]* | ?:[\\/]* ) continue;; 1208 [\\/$]* | ?:[\\/]* ) continue;;
1141 NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 1209 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1142 esac 1210 esac
1143 { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 1211 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1144 { (exit 1); exit 1; }; }
1145done 1212done
1146 1213
1147# There might be people who depend on the old broken behavior: `$host' 1214# There might be people who depend on the old broken behavior: `$host'
@@ -1155,8 +1222,8 @@ target=$target_alias
1155if test "x$host_alias" != x; then 1222if test "x$host_alias" != x; then
1156 if test "x$build_alias" = x; then 1223 if test "x$build_alias" = x; then
1157 cross_compiling=maybe 1224 cross_compiling=maybe
1158 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. 1225 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1159 If a cross compiler is detected then cross compile mode will be used." >&2 1226 If a cross compiler is detected then cross compile mode will be used" >&2
1160 elif test "x$build_alias" != "x$host_alias"; then 1227 elif test "x$build_alias" != "x$host_alias"; then
1161 cross_compiling=yes 1228 cross_compiling=yes
1162 fi 1229 fi
@@ -1171,23 +1238,21 @@ test "$silent" = yes && exec 6>/dev/null
1171ac_pwd=`pwd` && test -n "$ac_pwd" && 1238ac_pwd=`pwd` && test -n "$ac_pwd" &&
1172ac_ls_di=`ls -di .` && 1239ac_ls_di=`ls -di .` &&
1173ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 1240ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1174 { echo "$as_me: error: Working directory cannot be determined" >&2 1241 as_fn_error $? "working directory cannot be determined"
1175 { (exit 1); exit 1; }; }
1176test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 1242test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1177 { echo "$as_me: error: pwd does not report name of working directory" >&2 1243 as_fn_error $? "pwd does not report name of working directory"
1178 { (exit 1); exit 1; }; }
1179 1244
1180 1245
1181# Find the source files, if location was not specified. 1246# Find the source files, if location was not specified.
1182if test -z "$srcdir"; then 1247if test -z "$srcdir"; then
1183 ac_srcdir_defaulted=yes 1248 ac_srcdir_defaulted=yes
1184 # Try the directory containing this script, then the parent directory. 1249 # Try the directory containing this script, then the parent directory.
1185 ac_confdir=`$as_dirname -- "$0" || 1250 ac_confdir=`$as_dirname -- "$as_myself" ||
1186$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 1251$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1187 X"$0" : 'X\(//\)[^/]' \| \ 1252 X"$as_myself" : 'X\(//\)[^/]' \| \
1188 X"$0" : 'X\(//\)$' \| \ 1253 X"$as_myself" : 'X\(//\)$' \| \
1189 X"$0" : 'X\(/\)' \| . 2>/dev/null || 1254 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1190echo X"$0" | 1255$as_echo X"$as_myself" |
1191 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 1256 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1192 s//\1/ 1257 s//\1/
1193 q 1258 q
@@ -1214,13 +1279,11 @@ else
1214fi 1279fi
1215if test ! -r "$srcdir/$ac_unique_file"; then 1280if test ! -r "$srcdir/$ac_unique_file"; then
1216 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 1281 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1217 { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 1282 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1218 { (exit 1); exit 1; }; }
1219fi 1283fi
1220ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 1284ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1221ac_abs_confdir=`( 1285ac_abs_confdir=`(
1222 cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 1286 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1223 { (exit 1); exit 1; }; }
1224 pwd)` 1287 pwd)`
1225# When building in place, set srcdir=. 1288# When building in place, set srcdir=.
1226if test "$ac_abs_confdir" = "$ac_pwd"; then 1289if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1260,7 +1323,7 @@ Configuration:
1260 --help=short display options specific to this package 1323 --help=short display options specific to this package
1261 --help=recursive display the short help of all the included packages 1324 --help=recursive display the short help of all the included packages
1262 -V, --version display version information and exit 1325 -V, --version display version information and exit
1263 -q, --quiet, --silent do not print \`checking...' messages 1326 -q, --quiet, --silent do not print \`checking ...' messages
1264 --cache-file=FILE cache test results in FILE [disabled] 1327 --cache-file=FILE cache test results in FILE [disabled]
1265 -C, --config-cache alias for \`--cache-file=config.cache' 1328 -C, --config-cache alias for \`--cache-file=config.cache'
1266 -n, --no-create do not create output files 1329 -n, --no-create do not create output files
@@ -1268,9 +1331,9 @@ Configuration:
1268 1331
1269Installation directories: 1332Installation directories:
1270 --prefix=PREFIX install architecture-independent files in PREFIX 1333 --prefix=PREFIX install architecture-independent files in PREFIX
1271 [$ac_default_prefix] 1334 [$ac_default_prefix]
1272 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 1335 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1273 [PREFIX] 1336 [PREFIX]
1274 1337
1275By default, \`make install' will install all the files in 1338By default, \`make install' will install all the files in
1276\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify 1339\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
@@ -1280,25 +1343,25 @@ for instance \`--prefix=\$HOME'.
1280For better control, use the options below. 1343For better control, use the options below.
1281 1344
1282Fine tuning of the installation directories: 1345Fine tuning of the installation directories:
1283 --bindir=DIR user executables [EPREFIX/bin] 1346 --bindir=DIR user executables [EPREFIX/bin]
1284 --sbindir=DIR system admin executables [EPREFIX/sbin] 1347 --sbindir=DIR system admin executables [EPREFIX/sbin]
1285 --libexecdir=DIR program executables [EPREFIX/libexec] 1348 --libexecdir=DIR program executables [EPREFIX/libexec]
1286 --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 1349 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1287 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 1350 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1288 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 1351 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1289 --libdir=DIR object code libraries [EPREFIX/lib] 1352 --libdir=DIR object code libraries [EPREFIX/lib]
1290 --includedir=DIR C header files [PREFIX/include] 1353 --includedir=DIR C header files [PREFIX/include]
1291 --oldincludedir=DIR C header files for non-gcc [/usr/include] 1354 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1292 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 1355 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1293 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 1356 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1294 --infodir=DIR info documentation [DATAROOTDIR/info] 1357 --infodir=DIR info documentation [DATAROOTDIR/info]
1295 --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 1358 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1296 --mandir=DIR man documentation [DATAROOTDIR/man] 1359 --mandir=DIR man documentation [DATAROOTDIR/man]
1297 --docdir=DIR documentation root [DATAROOTDIR/doc/openssh] 1360 --docdir=DIR documentation root [DATAROOTDIR/doc/openssh]
1298 --htmldir=DIR html documentation [DOCDIR] 1361 --htmldir=DIR html documentation [DOCDIR]
1299 --dvidir=DIR dvi documentation [DOCDIR] 1362 --dvidir=DIR dvi documentation [DOCDIR]
1300 --pdfdir=DIR pdf documentation [DOCDIR] 1363 --pdfdir=DIR pdf documentation [DOCDIR]
1301 --psdir=DIR ps documentation [DOCDIR] 1364 --psdir=DIR ps documentation [DOCDIR]
1302_ACEOF 1365_ACEOF
1303 1366
1304 cat <<\_ACEOF 1367 cat <<\_ACEOF
@@ -1316,6 +1379,7 @@ if test -n "$ac_init_help"; then
1316 cat <<\_ACEOF 1379 cat <<\_ACEOF
1317 1380
1318Optional Features: 1381Optional Features:
1382 --disable-option-checking ignore unrecognized --enable/--with options
1319 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 1383 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1320 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 1384 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1321 --disable-largefile omit support for large files 1385 --disable-largefile omit support for large files
@@ -1352,16 +1416,16 @@ Optional Packages:
1352 --with-ssl-dir=PATH Specify path to OpenSSL installation 1416 --with-ssl-dir=PATH Specify path to OpenSSL installation
1353 --without-openssl-header-check Disable OpenSSL version consistency check 1417 --without-openssl-header-check Disable OpenSSL version consistency check
1354 --with-ssl-engine Enable OpenSSL (hardware) ENGINE support 1418 --with-ssl-engine Enable OpenSSL (hardware) ENGINE support
1355 --with-pam Enable PAM support
1356 --with-rand-helper Use subprocess to gather strong randomness
1357 --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT 1419 --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT
1358 --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool) 1420 --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)
1359 --with-entropy-timeout Specify entropy gathering command timeout (msec) 1421 --with-pam Enable PAM support
1360 --with-privsep-user=user Specify non-privileged user for privilege separation 1422 --with-privsep-user=user Specify non-privileged user for privilege separation
1423 --with-sandbox=style Specify privilege separation sandbox (no, darwin, rlimit, systrace)
1361 --with-selinux Enable SELinux support 1424 --with-selinux Enable SELinux support
1362 --with-kerberos5=PATH Enable Kerberos 5 support 1425 --with-kerberos5=PATH Enable Kerberos 5 support
1363 --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty) 1426 --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)
1364 --with-xauth=PATH Specify path to xauth program 1427 --with-xauth=PATH Specify path to xauth program
1428 --with-maildir=/path/to/mail Specify your system mail directory
1365 --with-mantype=man|cat|doc Set man page type 1429 --with-mantype=man|cat|doc Set man page type
1366 --with-md5-passwords Enable use of MD5 passwords 1430 --with-md5-passwords Enable use of MD5 passwords
1367 --without-shadow Disable shadow password support 1431 --without-shadow Disable shadow password support
@@ -1379,7 +1443,7 @@ Some influential environment variables:
1379 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a 1443 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1380 nonstandard directory <lib dir> 1444 nonstandard directory <lib dir>
1381 LIBS libraries to pass to the linker, e.g. -l<library> 1445 LIBS libraries to pass to the linker, e.g. -l<library>
1382 CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if 1446 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1383 you have headers in a nonstandard directory <include dir> 1447 you have headers in a nonstandard directory <include dir>
1384 CPP C preprocessor 1448 CPP C preprocessor
1385 1449
@@ -1394,15 +1458,17 @@ fi
1394if test "$ac_init_help" = "recursive"; then 1458if test "$ac_init_help" = "recursive"; then
1395 # If there are subdirs, report their specific --help. 1459 # If there are subdirs, report their specific --help.
1396 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 1460 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1397 test -d "$ac_dir" || continue 1461 test -d "$ac_dir" ||
1462 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1463 continue
1398 ac_builddir=. 1464 ac_builddir=.
1399 1465
1400case "$ac_dir" in 1466case "$ac_dir" in
1401.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 1467.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1402*) 1468*)
1403 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` 1469 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1404 # A ".." for each directory in $ac_dir_suffix. 1470 # A ".." for each directory in $ac_dir_suffix.
1405 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` 1471 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1406 case $ac_top_builddir_sub in 1472 case $ac_top_builddir_sub in
1407 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 1473 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1408 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 1474 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -1438,7 +1504,7 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1438 echo && 1504 echo &&
1439 $SHELL "$ac_srcdir/configure" --help=recursive 1505 $SHELL "$ac_srcdir/configure" --help=recursive
1440 else 1506 else
1441 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 1507 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1442 fi || ac_status=$? 1508 fi || ac_status=$?
1443 cd "$ac_pwd" || { ac_status=$?; break; } 1509 cd "$ac_pwd" || { ac_status=$?; break; }
1444 done 1510 done
@@ -1448,21 +1514,711 @@ test -n "$ac_init_help" && exit $ac_status
1448if $ac_init_version; then 1514if $ac_init_version; then
1449 cat <<\_ACEOF 1515 cat <<\_ACEOF
1450OpenSSH configure Portable 1516OpenSSH configure Portable
1451generated by GNU Autoconf 2.61 1517generated by GNU Autoconf 2.68
1452 1518
1453Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 1519Copyright (C) 2010 Free Software Foundation, Inc.
14542002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
1455This configure script is free software; the Free Software Foundation 1520This configure script is free software; the Free Software Foundation
1456gives unlimited permission to copy, distribute and modify it. 1521gives unlimited permission to copy, distribute and modify it.
1457_ACEOF 1522_ACEOF
1458 exit 1523 exit
1459fi 1524fi
1525
1526## ------------------------ ##
1527## Autoconf initialization. ##
1528## ------------------------ ##
1529
1530# ac_fn_c_try_compile LINENO
1531# --------------------------
1532# Try to compile conftest.$ac_ext, and return whether this succeeded.
1533ac_fn_c_try_compile ()
1534{
1535 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1536 rm -f conftest.$ac_objext
1537 if { { ac_try="$ac_compile"
1538case "(($ac_try" in
1539 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1540 *) ac_try_echo=$ac_try;;
1541esac
1542eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1543$as_echo "$ac_try_echo"; } >&5
1544 (eval "$ac_compile") 2>conftest.err
1545 ac_status=$?
1546 if test -s conftest.err; then
1547 grep -v '^ *+' conftest.err >conftest.er1
1548 cat conftest.er1 >&5
1549 mv -f conftest.er1 conftest.err
1550 fi
1551 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1552 test $ac_status = 0; } && {
1553 test -z "$ac_c_werror_flag" ||
1554 test ! -s conftest.err
1555 } && test -s conftest.$ac_objext; then :
1556 ac_retval=0
1557else
1558 $as_echo "$as_me: failed program was:" >&5
1559sed 's/^/| /' conftest.$ac_ext >&5
1560
1561 ac_retval=1
1562fi
1563 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1564 as_fn_set_status $ac_retval
1565
1566} # ac_fn_c_try_compile
1567
1568# ac_fn_c_try_run LINENO
1569# ----------------------
1570# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1571# that executables *can* be run.
1572ac_fn_c_try_run ()
1573{
1574 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1575 if { { ac_try="$ac_link"
1576case "(($ac_try" in
1577 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1578 *) ac_try_echo=$ac_try;;
1579esac
1580eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1581$as_echo "$ac_try_echo"; } >&5
1582 (eval "$ac_link") 2>&5
1583 ac_status=$?
1584 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1585 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1586 { { case "(($ac_try" in
1587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1588 *) ac_try_echo=$ac_try;;
1589esac
1590eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1591$as_echo "$ac_try_echo"; } >&5
1592 (eval "$ac_try") 2>&5
1593 ac_status=$?
1594 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1595 test $ac_status = 0; }; }; then :
1596 ac_retval=0
1597else
1598 $as_echo "$as_me: program exited with status $ac_status" >&5
1599 $as_echo "$as_me: failed program was:" >&5
1600sed 's/^/| /' conftest.$ac_ext >&5
1601
1602 ac_retval=$ac_status
1603fi
1604 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1605 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1606 as_fn_set_status $ac_retval
1607
1608} # ac_fn_c_try_run
1609
1610# ac_fn_c_try_cpp LINENO
1611# ----------------------
1612# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1613ac_fn_c_try_cpp ()
1614{
1615 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1616 if { { ac_try="$ac_cpp conftest.$ac_ext"
1617case "(($ac_try" in
1618 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1619 *) ac_try_echo=$ac_try;;
1620esac
1621eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1622$as_echo "$ac_try_echo"; } >&5
1623 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1624 ac_status=$?
1625 if test -s conftest.err; then
1626 grep -v '^ *+' conftest.err >conftest.er1
1627 cat conftest.er1 >&5
1628 mv -f conftest.er1 conftest.err
1629 fi
1630 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1631 test $ac_status = 0; } > conftest.i && {
1632 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1633 test ! -s conftest.err
1634 }; then :
1635 ac_retval=0
1636else
1637 $as_echo "$as_me: failed program was:" >&5
1638sed 's/^/| /' conftest.$ac_ext >&5
1639
1640 ac_retval=1
1641fi
1642 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1643 as_fn_set_status $ac_retval
1644
1645} # ac_fn_c_try_cpp
1646
1647# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1648# -------------------------------------------------------
1649# Tests whether HEADER exists and can be compiled using the include files in
1650# INCLUDES, setting the cache variable VAR accordingly.
1651ac_fn_c_check_header_compile ()
1652{
1653 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1654 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1655$as_echo_n "checking for $2... " >&6; }
1656if eval \${$3+:} false; then :
1657 $as_echo_n "(cached) " >&6
1658else
1659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1660/* end confdefs.h. */
1661$4
1662#include <$2>
1663_ACEOF
1664if ac_fn_c_try_compile "$LINENO"; then :
1665 eval "$3=yes"
1666else
1667 eval "$3=no"
1668fi
1669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1670fi
1671eval ac_res=\$$3
1672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1673$as_echo "$ac_res" >&6; }
1674 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1675
1676} # ac_fn_c_check_header_compile
1677
1678# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
1679# ---------------------------------------------
1680# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
1681# accordingly.
1682ac_fn_c_check_decl ()
1683{
1684 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1685 as_decl_name=`echo $2|sed 's/ *(.*//'`
1686 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
1687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
1688$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
1689if eval \${$3+:} false; then :
1690 $as_echo_n "(cached) " >&6
1691else
1692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1693/* end confdefs.h. */
1694$4
1695int
1696main ()
1697{
1698#ifndef $as_decl_name
1699#ifdef __cplusplus
1700 (void) $as_decl_use;
1701#else
1702 (void) $as_decl_name;
1703#endif
1704#endif
1705
1706 ;
1707 return 0;
1708}
1709_ACEOF
1710if ac_fn_c_try_compile "$LINENO"; then :
1711 eval "$3=yes"
1712else
1713 eval "$3=no"
1714fi
1715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1716fi
1717eval ac_res=\$$3
1718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1719$as_echo "$ac_res" >&6; }
1720 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1721
1722} # ac_fn_c_check_decl
1723
1724# ac_fn_c_try_link LINENO
1725# -----------------------
1726# Try to link conftest.$ac_ext, and return whether this succeeded.
1727ac_fn_c_try_link ()
1728{
1729 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1730 rm -f conftest.$ac_objext conftest$ac_exeext
1731 if { { ac_try="$ac_link"
1732case "(($ac_try" in
1733 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1734 *) ac_try_echo=$ac_try;;
1735esac
1736eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1737$as_echo "$ac_try_echo"; } >&5
1738 (eval "$ac_link") 2>conftest.err
1739 ac_status=$?
1740 if test -s conftest.err; then
1741 grep -v '^ *+' conftest.err >conftest.er1
1742 cat conftest.er1 >&5
1743 mv -f conftest.er1 conftest.err
1744 fi
1745 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1746 test $ac_status = 0; } && {
1747 test -z "$ac_c_werror_flag" ||
1748 test ! -s conftest.err
1749 } && test -s conftest$ac_exeext && {
1750 test "$cross_compiling" = yes ||
1751 $as_test_x conftest$ac_exeext
1752 }; then :
1753 ac_retval=0
1754else
1755 $as_echo "$as_me: failed program was:" >&5
1756sed 's/^/| /' conftest.$ac_ext >&5
1757
1758 ac_retval=1
1759fi
1760 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
1761 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
1762 # interfere with the next link command; also delete a directory that is
1763 # left behind by Apple's compiler. We do this before executing the actions.
1764 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1765 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1766 as_fn_set_status $ac_retval
1767
1768} # ac_fn_c_try_link
1769
1770# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1771# -------------------------------------------------------
1772# Tests whether HEADER exists, giving a warning if it cannot be compiled using
1773# the include files in INCLUDES and setting the cache variable VAR
1774# accordingly.
1775ac_fn_c_check_header_mongrel ()
1776{
1777 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1778 if eval \${$3+:} false; then :
1779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1780$as_echo_n "checking for $2... " >&6; }
1781if eval \${$3+:} false; then :
1782 $as_echo_n "(cached) " >&6
1783fi
1784eval ac_res=\$$3
1785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1786$as_echo "$ac_res" >&6; }
1787else
1788 # Is the header compilable?
1789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1790$as_echo_n "checking $2 usability... " >&6; }
1791cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1792/* end confdefs.h. */
1793$4
1794#include <$2>
1795_ACEOF
1796if ac_fn_c_try_compile "$LINENO"; then :
1797 ac_header_compiler=yes
1798else
1799 ac_header_compiler=no
1800fi
1801rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1803$as_echo "$ac_header_compiler" >&6; }
1804
1805# Is the header present?
1806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1807$as_echo_n "checking $2 presence... " >&6; }
1808cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1809/* end confdefs.h. */
1810#include <$2>
1811_ACEOF
1812if ac_fn_c_try_cpp "$LINENO"; then :
1813 ac_header_preproc=yes
1814else
1815 ac_header_preproc=no
1816fi
1817rm -f conftest.err conftest.i conftest.$ac_ext
1818{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1819$as_echo "$ac_header_preproc" >&6; }
1820
1821# So? What about this header?
1822case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1823 yes:no: )
1824 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1825$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1826 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1827$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1828 ;;
1829 no:yes:* )
1830 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1831$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1833$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1834 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1835$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1837$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1839$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1840( $as_echo "## ------------------------------------------- ##
1841## Report this to openssh-unix-dev@mindrot.org ##
1842## ------------------------------------------- ##"
1843 ) | sed "s/^/$as_me: WARNING: /" >&2
1844 ;;
1845esac
1846 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1847$as_echo_n "checking for $2... " >&6; }
1848if eval \${$3+:} false; then :
1849 $as_echo_n "(cached) " >&6
1850else
1851 eval "$3=\$ac_header_compiler"
1852fi
1853eval ac_res=\$$3
1854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1855$as_echo "$ac_res" >&6; }
1856fi
1857 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1858
1859} # ac_fn_c_check_header_mongrel
1860
1861# ac_fn_c_check_func LINENO FUNC VAR
1862# ----------------------------------
1863# Tests whether FUNC exists, setting the cache variable VAR accordingly
1864ac_fn_c_check_func ()
1865{
1866 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1868$as_echo_n "checking for $2... " >&6; }
1869if eval \${$3+:} false; then :
1870 $as_echo_n "(cached) " >&6
1871else
1872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1873/* end confdefs.h. */
1874/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
1875 For example, HP-UX 11i <limits.h> declares gettimeofday. */
1876#define $2 innocuous_$2
1877
1878/* System header to define __stub macros and hopefully few prototypes,
1879 which can conflict with char $2 (); below.
1880 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
1881 <limits.h> exists even on freestanding compilers. */
1882
1883#ifdef __STDC__
1884# include <limits.h>
1885#else
1886# include <assert.h>
1887#endif
1888
1889#undef $2
1890
1891/* Override any GCC internal prototype to avoid an error.
1892 Use char because int might match the return type of a GCC
1893 builtin and then its argument prototype would still apply. */
1894#ifdef __cplusplus
1895extern "C"
1896#endif
1897char $2 ();
1898/* The GNU C library defines this for functions which it implements
1899 to always fail with ENOSYS. Some functions are actually named
1900 something starting with __ and the normal name is an alias. */
1901#if defined __stub_$2 || defined __stub___$2
1902choke me
1903#endif
1904
1905int
1906main ()
1907{
1908return $2 ();
1909 ;
1910 return 0;
1911}
1912_ACEOF
1913if ac_fn_c_try_link "$LINENO"; then :
1914 eval "$3=yes"
1915else
1916 eval "$3=no"
1917fi
1918rm -f core conftest.err conftest.$ac_objext \
1919 conftest$ac_exeext conftest.$ac_ext
1920fi
1921eval ac_res=\$$3
1922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1923$as_echo "$ac_res" >&6; }
1924 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1925
1926} # ac_fn_c_check_func
1927
1928# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
1929# -------------------------------------------
1930# Tests whether TYPE exists after having included INCLUDES, setting cache
1931# variable VAR accordingly.
1932ac_fn_c_check_type ()
1933{
1934 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1936$as_echo_n "checking for $2... " >&6; }
1937if eval \${$3+:} false; then :
1938 $as_echo_n "(cached) " >&6
1939else
1940 eval "$3=no"
1941 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1942/* end confdefs.h. */
1943$4
1944int
1945main ()
1946{
1947if (sizeof ($2))
1948 return 0;
1949 ;
1950 return 0;
1951}
1952_ACEOF
1953if ac_fn_c_try_compile "$LINENO"; then :
1954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1955/* end confdefs.h. */
1956$4
1957int
1958main ()
1959{
1960if (sizeof (($2)))
1961 return 0;
1962 ;
1963 return 0;
1964}
1965_ACEOF
1966if ac_fn_c_try_compile "$LINENO"; then :
1967
1968else
1969 eval "$3=yes"
1970fi
1971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1972fi
1973rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1974fi
1975eval ac_res=\$$3
1976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1977$as_echo "$ac_res" >&6; }
1978 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1979
1980} # ac_fn_c_check_type
1981
1982# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
1983# --------------------------------------------
1984# Tries to find the compile-time value of EXPR in a program that includes
1985# INCLUDES, setting VAR accordingly. Returns whether the value could be
1986# computed
1987ac_fn_c_compute_int ()
1988{
1989 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1990 if test "$cross_compiling" = yes; then
1991 # Depending upon the size, compute the lo and hi bounds.
1992cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1993/* end confdefs.h. */
1994$4
1995int
1996main ()
1997{
1998static int test_array [1 - 2 * !(($2) >= 0)];
1999test_array [0] = 0
2000
2001 ;
2002 return 0;
2003}
2004_ACEOF
2005if ac_fn_c_try_compile "$LINENO"; then :
2006 ac_lo=0 ac_mid=0
2007 while :; do
2008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2009/* end confdefs.h. */
2010$4
2011int
2012main ()
2013{
2014static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2015test_array [0] = 0
2016
2017 ;
2018 return 0;
2019}
2020_ACEOF
2021if ac_fn_c_try_compile "$LINENO"; then :
2022 ac_hi=$ac_mid; break
2023else
2024 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2025 if test $ac_lo -le $ac_mid; then
2026 ac_lo= ac_hi=
2027 break
2028 fi
2029 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2030fi
2031rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2032 done
2033else
2034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2035/* end confdefs.h. */
2036$4
2037int
2038main ()
2039{
2040static int test_array [1 - 2 * !(($2) < 0)];
2041test_array [0] = 0
2042
2043 ;
2044 return 0;
2045}
2046_ACEOF
2047if ac_fn_c_try_compile "$LINENO"; then :
2048 ac_hi=-1 ac_mid=-1
2049 while :; do
2050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2051/* end confdefs.h. */
2052$4
2053int
2054main ()
2055{
2056static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2057test_array [0] = 0
2058
2059 ;
2060 return 0;
2061}
2062_ACEOF
2063if ac_fn_c_try_compile "$LINENO"; then :
2064 ac_lo=$ac_mid; break
2065else
2066 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2067 if test $ac_mid -le $ac_hi; then
2068 ac_lo= ac_hi=
2069 break
2070 fi
2071 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2072fi
2073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2074 done
2075else
2076 ac_lo= ac_hi=
2077fi
2078rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2079fi
2080rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2081# Binary search between lo and hi bounds.
2082while test "x$ac_lo" != "x$ac_hi"; do
2083 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2085/* end confdefs.h. */
2086$4
2087int
2088main ()
2089{
2090static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2091test_array [0] = 0
2092
2093 ;
2094 return 0;
2095}
2096_ACEOF
2097if ac_fn_c_try_compile "$LINENO"; then :
2098 ac_hi=$ac_mid
2099else
2100 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2101fi
2102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2103done
2104case $ac_lo in #((
2105?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2106'') ac_retval=1 ;;
2107esac
2108 else
2109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2110/* end confdefs.h. */
2111$4
2112static long int longval () { return $2; }
2113static unsigned long int ulongval () { return $2; }
2114#include <stdio.h>
2115#include <stdlib.h>
2116int
2117main ()
2118{
2119
2120 FILE *f = fopen ("conftest.val", "w");
2121 if (! f)
2122 return 1;
2123 if (($2) < 0)
2124 {
2125 long int i = longval ();
2126 if (i != ($2))
2127 return 1;
2128 fprintf (f, "%ld", i);
2129 }
2130 else
2131 {
2132 unsigned long int i = ulongval ();
2133 if (i != ($2))
2134 return 1;
2135 fprintf (f, "%lu", i);
2136 }
2137 /* Do not output a trailing newline, as this causes \r\n confusion
2138 on some platforms. */
2139 return ferror (f) || fclose (f) != 0;
2140
2141 ;
2142 return 0;
2143}
2144_ACEOF
2145if ac_fn_c_try_run "$LINENO"; then :
2146 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2147else
2148 ac_retval=1
2149fi
2150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2151 conftest.$ac_objext conftest.beam conftest.$ac_ext
2152rm -f conftest.val
2153
2154 fi
2155 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2156 as_fn_set_status $ac_retval
2157
2158} # ac_fn_c_compute_int
2159
2160# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2161# ----------------------------------------------------
2162# Tries to find if the field MEMBER exists in type AGGR, after including
2163# INCLUDES, setting cache variable VAR accordingly.
2164ac_fn_c_check_member ()
2165{
2166 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2168$as_echo_n "checking for $2.$3... " >&6; }
2169if eval \${$4+:} false; then :
2170 $as_echo_n "(cached) " >&6
2171else
2172 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2173/* end confdefs.h. */
2174$5
2175int
2176main ()
2177{
2178static $2 ac_aggr;
2179if (ac_aggr.$3)
2180return 0;
2181 ;
2182 return 0;
2183}
2184_ACEOF
2185if ac_fn_c_try_compile "$LINENO"; then :
2186 eval "$4=yes"
2187else
2188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2189/* end confdefs.h. */
2190$5
2191int
2192main ()
2193{
2194static $2 ac_aggr;
2195if (sizeof ac_aggr.$3)
2196return 0;
2197 ;
2198 return 0;
2199}
2200_ACEOF
2201if ac_fn_c_try_compile "$LINENO"; then :
2202 eval "$4=yes"
2203else
2204 eval "$4=no"
2205fi
2206rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2207fi
2208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2209fi
2210eval ac_res=\$$4
2211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2212$as_echo "$ac_res" >&6; }
2213 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2214
2215} # ac_fn_c_check_member
1460cat >config.log <<_ACEOF 2216cat >config.log <<_ACEOF
1461This file contains any messages produced by compilers while 2217This file contains any messages produced by compilers while
1462running configure, to aid debugging if configure makes a mistake. 2218running configure, to aid debugging if configure makes a mistake.
1463 2219
1464It was created by OpenSSH $as_me Portable, which was 2220It was created by OpenSSH $as_me Portable, which was
1465generated by GNU Autoconf 2.61. Invocation command line was 2221generated by GNU Autoconf 2.68. Invocation command line was
1466 2222
1467 $ $0 $@ 2223 $ $0 $@
1468 2224
@@ -1498,8 +2254,8 @@ for as_dir in $PATH
1498do 2254do
1499 IFS=$as_save_IFS 2255 IFS=$as_save_IFS
1500 test -z "$as_dir" && as_dir=. 2256 test -z "$as_dir" && as_dir=.
1501 echo "PATH: $as_dir" 2257 $as_echo "PATH: $as_dir"
1502done 2258 done
1503IFS=$as_save_IFS 2259IFS=$as_save_IFS
1504 2260
1505} >&5 2261} >&5
@@ -1533,12 +2289,12 @@ do
1533 | -silent | --silent | --silen | --sile | --sil) 2289 | -silent | --silent | --silen | --sile | --sil)
1534 continue ;; 2290 continue ;;
1535 *\'*) 2291 *\'*)
1536 ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 2292 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
1537 esac 2293 esac
1538 case $ac_pass in 2294 case $ac_pass in
1539 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2295 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
1540 2) 2296 2)
1541 ac_configure_args1="$ac_configure_args1 '$ac_arg'" 2297 as_fn_append ac_configure_args1 " '$ac_arg'"
1542 if test $ac_must_keep_next = true; then 2298 if test $ac_must_keep_next = true; then
1543 ac_must_keep_next=false # Got value, back to normal. 2299 ac_must_keep_next=false # Got value, back to normal.
1544 else 2300 else
@@ -1554,13 +2310,13 @@ do
1554 -* ) ac_must_keep_next=true ;; 2310 -* ) ac_must_keep_next=true ;;
1555 esac 2311 esac
1556 fi 2312 fi
1557 ac_configure_args="$ac_configure_args '$ac_arg'" 2313 as_fn_append ac_configure_args " '$ac_arg'"
1558 ;; 2314 ;;
1559 esac 2315 esac
1560 done 2316 done
1561done 2317done
1562$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } 2318{ ac_configure_args0=; unset ac_configure_args0;}
1563$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } 2319{ ac_configure_args1=; unset ac_configure_args1;}
1564 2320
1565# When interrupted or exit'd, cleanup temporary files, and complete 2321# When interrupted or exit'd, cleanup temporary files, and complete
1566# config.log. We remove comments because anyway the quotes in there 2322# config.log. We remove comments because anyway the quotes in there
@@ -1572,11 +2328,9 @@ trap 'exit_status=$?
1572 { 2328 {
1573 echo 2329 echo
1574 2330
1575 cat <<\_ASBOX 2331 $as_echo "## ---------------- ##
1576## ---------------- ##
1577## Cache variables. ## 2332## Cache variables. ##
1578## ---------------- ## 2333## ---------------- ##"
1579_ASBOX
1580 echo 2334 echo
1581 # The following way of writing the cache mishandles newlines in values, 2335 # The following way of writing the cache mishandles newlines in values,
1582( 2336(
@@ -1585,12 +2339,13 @@ _ASBOX
1585 case $ac_val in #( 2339 case $ac_val in #(
1586 *${as_nl}*) 2340 *${as_nl}*)
1587 case $ac_var in #( 2341 case $ac_var in #(
1588 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 2342 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
1589echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; 2343$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
1590 esac 2344 esac
1591 case $ac_var in #( 2345 case $ac_var in #(
1592 _ | IFS | as_nl) ;; #( 2346 _ | IFS | as_nl) ;; #(
1593 *) $as_unset $ac_var ;; 2347 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2348 *) { eval $ac_var=; unset $ac_var;} ;;
1594 esac ;; 2349 esac ;;
1595 esac 2350 esac
1596 done 2351 done
@@ -1609,128 +2364,136 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
1609) 2364)
1610 echo 2365 echo
1611 2366
1612 cat <<\_ASBOX 2367 $as_echo "## ----------------- ##
1613## ----------------- ##
1614## Output variables. ## 2368## Output variables. ##
1615## ----------------- ## 2369## ----------------- ##"
1616_ASBOX
1617 echo 2370 echo
1618 for ac_var in $ac_subst_vars 2371 for ac_var in $ac_subst_vars
1619 do 2372 do
1620 eval ac_val=\$$ac_var 2373 eval ac_val=\$$ac_var
1621 case $ac_val in 2374 case $ac_val in
1622 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2375 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1623 esac 2376 esac
1624 echo "$ac_var='\''$ac_val'\''" 2377 $as_echo "$ac_var='\''$ac_val'\''"
1625 done | sort 2378 done | sort
1626 echo 2379 echo
1627 2380
1628 if test -n "$ac_subst_files"; then 2381 if test -n "$ac_subst_files"; then
1629 cat <<\_ASBOX 2382 $as_echo "## ------------------- ##
1630## ------------------- ##
1631## File substitutions. ## 2383## File substitutions. ##
1632## ------------------- ## 2384## ------------------- ##"
1633_ASBOX
1634 echo 2385 echo
1635 for ac_var in $ac_subst_files 2386 for ac_var in $ac_subst_files
1636 do 2387 do
1637 eval ac_val=\$$ac_var 2388 eval ac_val=\$$ac_var
1638 case $ac_val in 2389 case $ac_val in
1639 *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 2390 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
1640 esac 2391 esac
1641 echo "$ac_var='\''$ac_val'\''" 2392 $as_echo "$ac_var='\''$ac_val'\''"
1642 done | sort 2393 done | sort
1643 echo 2394 echo
1644 fi 2395 fi
1645 2396
1646 if test -s confdefs.h; then 2397 if test -s confdefs.h; then
1647 cat <<\_ASBOX 2398 $as_echo "## ----------- ##
1648## ----------- ##
1649## confdefs.h. ## 2399## confdefs.h. ##
1650## ----------- ## 2400## ----------- ##"
1651_ASBOX
1652 echo 2401 echo
1653 cat confdefs.h 2402 cat confdefs.h
1654 echo 2403 echo
1655 fi 2404 fi
1656 test "$ac_signal" != 0 && 2405 test "$ac_signal" != 0 &&
1657 echo "$as_me: caught signal $ac_signal" 2406 $as_echo "$as_me: caught signal $ac_signal"
1658 echo "$as_me: exit $exit_status" 2407 $as_echo "$as_me: exit $exit_status"
1659 } >&5 2408 } >&5
1660 rm -f core *.core core.conftest.* && 2409 rm -f core *.core core.conftest.* &&
1661 rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 2410 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
1662 exit $exit_status 2411 exit $exit_status
1663' 0 2412' 0
1664for ac_signal in 1 2 13 15; do 2413for ac_signal in 1 2 13 15; do
1665 trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal 2414 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
1666done 2415done
1667ac_signal=0 2416ac_signal=0
1668 2417
1669# confdefs.h avoids OS command line length limits that DEFS can exceed. 2418# confdefs.h avoids OS command line length limits that DEFS can exceed.
1670rm -f -r conftest* confdefs.h 2419rm -f -r conftest* confdefs.h
1671 2420
2421$as_echo "/* confdefs.h */" > confdefs.h
2422
1672# Predefined preprocessor variables. 2423# Predefined preprocessor variables.
1673 2424
1674cat >>confdefs.h <<_ACEOF 2425cat >>confdefs.h <<_ACEOF
1675#define PACKAGE_NAME "$PACKAGE_NAME" 2426#define PACKAGE_NAME "$PACKAGE_NAME"
1676_ACEOF 2427_ACEOF
1677 2428
1678
1679cat >>confdefs.h <<_ACEOF 2429cat >>confdefs.h <<_ACEOF
1680#define PACKAGE_TARNAME "$PACKAGE_TARNAME" 2430#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
1681_ACEOF 2431_ACEOF
1682 2432
1683
1684cat >>confdefs.h <<_ACEOF 2433cat >>confdefs.h <<_ACEOF
1685#define PACKAGE_VERSION "$PACKAGE_VERSION" 2434#define PACKAGE_VERSION "$PACKAGE_VERSION"
1686_ACEOF 2435_ACEOF
1687 2436
1688
1689cat >>confdefs.h <<_ACEOF 2437cat >>confdefs.h <<_ACEOF
1690#define PACKAGE_STRING "$PACKAGE_STRING" 2438#define PACKAGE_STRING "$PACKAGE_STRING"
1691_ACEOF 2439_ACEOF
1692 2440
1693
1694cat >>confdefs.h <<_ACEOF 2441cat >>confdefs.h <<_ACEOF
1695#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" 2442#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
1696_ACEOF 2443_ACEOF
1697 2444
2445cat >>confdefs.h <<_ACEOF
2446#define PACKAGE_URL "$PACKAGE_URL"
2447_ACEOF
2448
1698 2449
1699# Let the site file select an alternate cache file if it wants to. 2450# Let the site file select an alternate cache file if it wants to.
1700# Prefer explicitly selected file to automatically selected ones. 2451# Prefer an explicitly selected file to automatically selected ones.
2452ac_site_file1=NONE
2453ac_site_file2=NONE
1701if test -n "$CONFIG_SITE"; then 2454if test -n "$CONFIG_SITE"; then
1702 set x "$CONFIG_SITE" 2455 # We do not want a PATH search for config.site.
2456 case $CONFIG_SITE in #((
2457 -*) ac_site_file1=./$CONFIG_SITE;;
2458 */*) ac_site_file1=$CONFIG_SITE;;
2459 *) ac_site_file1=./$CONFIG_SITE;;
2460 esac
1703elif test "x$prefix" != xNONE; then 2461elif test "x$prefix" != xNONE; then
1704 set x "$prefix/share/config.site" "$prefix/etc/config.site" 2462 ac_site_file1=$prefix/share/config.site
2463 ac_site_file2=$prefix/etc/config.site
1705else 2464else
1706 set x "$ac_default_prefix/share/config.site" \ 2465 ac_site_file1=$ac_default_prefix/share/config.site
1707 "$ac_default_prefix/etc/config.site" 2466 ac_site_file2=$ac_default_prefix/etc/config.site
1708fi 2467fi
1709shift 2468for ac_site_file in "$ac_site_file1" "$ac_site_file2"
1710for ac_site_file
1711do 2469do
1712 if test -r "$ac_site_file"; then 2470 test "x$ac_site_file" = xNONE && continue
1713 { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 2471 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
1714echo "$as_me: loading site script $ac_site_file" >&6;} 2472 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2473$as_echo "$as_me: loading site script $ac_site_file" >&6;}
1715 sed 's/^/| /' "$ac_site_file" >&5 2474 sed 's/^/| /' "$ac_site_file" >&5
1716 . "$ac_site_file" 2475 . "$ac_site_file" \
2476 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2477$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2478as_fn_error $? "failed to load site script $ac_site_file
2479See \`config.log' for more details" "$LINENO" 5; }
1717 fi 2480 fi
1718done 2481done
1719 2482
1720if test -r "$cache_file"; then 2483if test -r "$cache_file"; then
1721 # Some versions of bash will fail to source /dev/null (special 2484 # Some versions of bash will fail to source /dev/null (special files
1722 # files actually), so we avoid doing that. 2485 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
1723 if test -f "$cache_file"; then 2486 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
1724 { echo "$as_me:$LINENO: loading cache $cache_file" >&5 2487 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
1725echo "$as_me: loading cache $cache_file" >&6;} 2488$as_echo "$as_me: loading cache $cache_file" >&6;}
1726 case $cache_file in 2489 case $cache_file in
1727 [\\/]* | ?:[\\/]* ) . "$cache_file";; 2490 [\\/]* | ?:[\\/]* ) . "$cache_file";;
1728 *) . "./$cache_file";; 2491 *) . "./$cache_file";;
1729 esac 2492 esac
1730 fi 2493 fi
1731else 2494else
1732 { echo "$as_me:$LINENO: creating cache $cache_file" >&5 2495 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
1733echo "$as_me: creating cache $cache_file" >&6;} 2496$as_echo "$as_me: creating cache $cache_file" >&6;}
1734 >$cache_file 2497 >$cache_file
1735fi 2498fi
1736 2499
@@ -1744,68 +2507,56 @@ for ac_var in $ac_precious_vars; do
1744 eval ac_new_val=\$ac_env_${ac_var}_value 2507 eval ac_new_val=\$ac_env_${ac_var}_value
1745 case $ac_old_set,$ac_new_set in 2508 case $ac_old_set,$ac_new_set in
1746 set,) 2509 set,)
1747 { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 2510 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1748echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 2511$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1749 ac_cache_corrupted=: ;; 2512 ac_cache_corrupted=: ;;
1750 ,set) 2513 ,set)
1751 { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 2514 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
1752echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 2515$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1753 ac_cache_corrupted=: ;; 2516 ac_cache_corrupted=: ;;
1754 ,);; 2517 ,);;
1755 *) 2518 *)
1756 if test "x$ac_old_val" != "x$ac_new_val"; then 2519 if test "x$ac_old_val" != "x$ac_new_val"; then
1757 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 2520 # differences in whitespace do not lead to failure.
1758echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 2521 ac_old_val_w=`echo x $ac_old_val`
1759 { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 2522 ac_new_val_w=`echo x $ac_new_val`
1760echo "$as_me: former value: $ac_old_val" >&2;} 2523 if test "$ac_old_val_w" != "$ac_new_val_w"; then
1761 { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 2524 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
1762echo "$as_me: current value: $ac_new_val" >&2;} 2525$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1763 ac_cache_corrupted=: 2526 ac_cache_corrupted=:
2527 else
2528 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2529$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2530 eval $ac_var=\$ac_old_val
2531 fi
2532 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2533$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2534 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2535$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
1764 fi;; 2536 fi;;
1765 esac 2537 esac
1766 # Pass precious variables to config.status. 2538 # Pass precious variables to config.status.
1767 if test "$ac_new_set" = set; then 2539 if test "$ac_new_set" = set; then
1768 case $ac_new_val in 2540 case $ac_new_val in
1769 *\'*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 2541 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
1770 *) ac_arg=$ac_var=$ac_new_val ;; 2542 *) ac_arg=$ac_var=$ac_new_val ;;
1771 esac 2543 esac
1772 case " $ac_configure_args " in 2544 case " $ac_configure_args " in
1773 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. 2545 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
1774 *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; 2546 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
1775 esac 2547 esac
1776 fi 2548 fi
1777done 2549done
1778if $ac_cache_corrupted; then 2550if $ac_cache_corrupted; then
1779 { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 2551 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
1780echo "$as_me: error: changes in the environment can compromise the build" >&2;} 2552$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
1781 { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 2553 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
1782echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} 2554$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1783 { (exit 1); exit 1; }; } 2555 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
1784fi 2556fi
1785 2557## -------------------- ##
1786 2558## Main body of script. ##
1787 2559## -------------------- ##
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809 2560
1810ac_ext=c 2561ac_ext=c
1811ac_cpp='$CPP $CPPFLAGS' 2562ac_cpp='$CPP $CPPFLAGS'
@@ -1816,8 +2567,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
1816 2567
1817 2568
1818 2569
1819 2570ac_ext=c
1820# local macros 2571ac_cpp='$CPP $CPPFLAGS'
2572ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2573ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2574ac_compiler_gnu=$ac_cv_c_compiler_gnu
1821 2575
1822 2576
1823ac_config_headers="$ac_config_headers config.h" 2577ac_config_headers="$ac_config_headers config.h"
@@ -1830,10 +2584,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
1830if test -n "$ac_tool_prefix"; then 2584if test -n "$ac_tool_prefix"; then
1831 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 2585 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1832set dummy ${ac_tool_prefix}gcc; ac_word=$2 2586set dummy ${ac_tool_prefix}gcc; ac_word=$2
1833{ echo "$as_me:$LINENO: checking for $ac_word" >&5 2587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1834echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 2588$as_echo_n "checking for $ac_word... " >&6; }
1835if test "${ac_cv_prog_CC+set}" = set; then 2589if ${ac_cv_prog_CC+:} false; then :
1836 echo $ECHO_N "(cached) $ECHO_C" >&6 2590 $as_echo_n "(cached) " >&6
1837else 2591else
1838 if test -n "$CC"; then 2592 if test -n "$CC"; then
1839 ac_cv_prog_CC="$CC" # Let the user override the test. 2593 ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1843,25 +2597,25 @@ for as_dir in $PATH
1843do 2597do
1844 IFS=$as_save_IFS 2598 IFS=$as_save_IFS
1845 test -z "$as_dir" && as_dir=. 2599 test -z "$as_dir" && as_dir=.
1846 for ac_exec_ext in '' $ac_executable_extensions; do 2600 for ac_exec_ext in '' $ac_executable_extensions; do
1847 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 2601 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1848 ac_cv_prog_CC="${ac_tool_prefix}gcc" 2602 ac_cv_prog_CC="${ac_tool_prefix}gcc"
1849 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2603 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1850 break 2 2604 break 2
1851 fi 2605 fi
1852done 2606done
1853done 2607 done
1854IFS=$as_save_IFS 2608IFS=$as_save_IFS
1855 2609
1856fi 2610fi
1857fi 2611fi
1858CC=$ac_cv_prog_CC 2612CC=$ac_cv_prog_CC
1859if test -n "$CC"; then 2613if test -n "$CC"; then
1860 { echo "$as_me:$LINENO: result: $CC" >&5 2614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
1861echo "${ECHO_T}$CC" >&6; } 2615$as_echo "$CC" >&6; }
1862else 2616else
1863 { echo "$as_me:$LINENO: result: no" >&5 2617 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1864echo "${ECHO_T}no" >&6; } 2618$as_echo "no" >&6; }
1865fi 2619fi
1866 2620
1867 2621
@@ -1870,10 +2624,10 @@ if test -z "$ac_cv_prog_CC"; then
1870 ac_ct_CC=$CC 2624 ac_ct_CC=$CC
1871 # Extract the first word of "gcc", so it can be a program name with args. 2625 # Extract the first word of "gcc", so it can be a program name with args.
1872set dummy gcc; ac_word=$2 2626set dummy gcc; ac_word=$2
1873{ echo "$as_me:$LINENO: checking for $ac_word" >&5 2627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1874echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 2628$as_echo_n "checking for $ac_word... " >&6; }
1875if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 2629if ${ac_cv_prog_ac_ct_CC+:} false; then :
1876 echo $ECHO_N "(cached) $ECHO_C" >&6 2630 $as_echo_n "(cached) " >&6
1877else 2631else
1878 if test -n "$ac_ct_CC"; then 2632 if test -n "$ac_ct_CC"; then
1879 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 2633 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -1883,25 +2637,25 @@ for as_dir in $PATH
1883do 2637do
1884 IFS=$as_save_IFS 2638 IFS=$as_save_IFS
1885 test -z "$as_dir" && as_dir=. 2639 test -z "$as_dir" && as_dir=.
1886 for ac_exec_ext in '' $ac_executable_extensions; do 2640 for ac_exec_ext in '' $ac_executable_extensions; do
1887 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 2641 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1888 ac_cv_prog_ac_ct_CC="gcc" 2642 ac_cv_prog_ac_ct_CC="gcc"
1889 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2643 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1890 break 2 2644 break 2
1891 fi 2645 fi
1892done 2646done
1893done 2647 done
1894IFS=$as_save_IFS 2648IFS=$as_save_IFS
1895 2649
1896fi 2650fi
1897fi 2651fi
1898ac_ct_CC=$ac_cv_prog_ac_ct_CC 2652ac_ct_CC=$ac_cv_prog_ac_ct_CC
1899if test -n "$ac_ct_CC"; then 2653if test -n "$ac_ct_CC"; then
1900 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 2654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
1901echo "${ECHO_T}$ac_ct_CC" >&6; } 2655$as_echo "$ac_ct_CC" >&6; }
1902else 2656else
1903 { echo "$as_me:$LINENO: result: no" >&5 2657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1904echo "${ECHO_T}no" >&6; } 2658$as_echo "no" >&6; }
1905fi 2659fi
1906 2660
1907 if test "x$ac_ct_CC" = x; then 2661 if test "x$ac_ct_CC" = x; then
@@ -1909,12 +2663,8 @@ fi
1909 else 2663 else
1910 case $cross_compiling:$ac_tool_warned in 2664 case $cross_compiling:$ac_tool_warned in
1911yes:) 2665yes:)
1912{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools 2666{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
1913whose name does not start with the host triplet. If you think this 2667$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
1914configuration is useful to you, please write to autoconf@gnu.org." >&5
1915echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
1916whose name does not start with the host triplet. If you think this
1917configuration is useful to you, please write to autoconf@gnu.org." >&2;}
1918ac_tool_warned=yes ;; 2668ac_tool_warned=yes ;;
1919esac 2669esac
1920 CC=$ac_ct_CC 2670 CC=$ac_ct_CC
@@ -1927,10 +2677,10 @@ if test -z "$CC"; then
1927 if test -n "$ac_tool_prefix"; then 2677 if test -n "$ac_tool_prefix"; then
1928 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 2678 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1929set dummy ${ac_tool_prefix}cc; ac_word=$2 2679set dummy ${ac_tool_prefix}cc; ac_word=$2
1930{ echo "$as_me:$LINENO: checking for $ac_word" >&5 2680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1931echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 2681$as_echo_n "checking for $ac_word... " >&6; }
1932if test "${ac_cv_prog_CC+set}" = set; then 2682if ${ac_cv_prog_CC+:} false; then :
1933 echo $ECHO_N "(cached) $ECHO_C" >&6 2683 $as_echo_n "(cached) " >&6
1934else 2684else
1935 if test -n "$CC"; then 2685 if test -n "$CC"; then
1936 ac_cv_prog_CC="$CC" # Let the user override the test. 2686 ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1940,25 +2690,25 @@ for as_dir in $PATH
1940do 2690do
1941 IFS=$as_save_IFS 2691 IFS=$as_save_IFS
1942 test -z "$as_dir" && as_dir=. 2692 test -z "$as_dir" && as_dir=.
1943 for ac_exec_ext in '' $ac_executable_extensions; do 2693 for ac_exec_ext in '' $ac_executable_extensions; do
1944 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 2694 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1945 ac_cv_prog_CC="${ac_tool_prefix}cc" 2695 ac_cv_prog_CC="${ac_tool_prefix}cc"
1946 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2696 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1947 break 2 2697 break 2
1948 fi 2698 fi
1949done 2699done
1950done 2700 done
1951IFS=$as_save_IFS 2701IFS=$as_save_IFS
1952 2702
1953fi 2703fi
1954fi 2704fi
1955CC=$ac_cv_prog_CC 2705CC=$ac_cv_prog_CC
1956if test -n "$CC"; then 2706if test -n "$CC"; then
1957 { echo "$as_me:$LINENO: result: $CC" >&5 2707 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
1958echo "${ECHO_T}$CC" >&6; } 2708$as_echo "$CC" >&6; }
1959else 2709else
1960 { echo "$as_me:$LINENO: result: no" >&5 2710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
1961echo "${ECHO_T}no" >&6; } 2711$as_echo "no" >&6; }
1962fi 2712fi
1963 2713
1964 2714
@@ -1967,10 +2717,10 @@ fi
1967if test -z "$CC"; then 2717if test -z "$CC"; then
1968 # Extract the first word of "cc", so it can be a program name with args. 2718 # Extract the first word of "cc", so it can be a program name with args.
1969set dummy cc; ac_word=$2 2719set dummy cc; ac_word=$2
1970{ echo "$as_me:$LINENO: checking for $ac_word" >&5 2720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
1971echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 2721$as_echo_n "checking for $ac_word... " >&6; }
1972if test "${ac_cv_prog_CC+set}" = set; then 2722if ${ac_cv_prog_CC+:} false; then :
1973 echo $ECHO_N "(cached) $ECHO_C" >&6 2723 $as_echo_n "(cached) " >&6
1974else 2724else
1975 if test -n "$CC"; then 2725 if test -n "$CC"; then
1976 ac_cv_prog_CC="$CC" # Let the user override the test. 2726 ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -1981,18 +2731,18 @@ for as_dir in $PATH
1981do 2731do
1982 IFS=$as_save_IFS 2732 IFS=$as_save_IFS
1983 test -z "$as_dir" && as_dir=. 2733 test -z "$as_dir" && as_dir=.
1984 for ac_exec_ext in '' $ac_executable_extensions; do 2734 for ac_exec_ext in '' $ac_executable_extensions; do
1985 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 2735 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
1986 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then 2736 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
1987 ac_prog_rejected=yes 2737 ac_prog_rejected=yes
1988 continue 2738 continue
1989 fi 2739 fi
1990 ac_cv_prog_CC="cc" 2740 ac_cv_prog_CC="cc"
1991 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2741 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
1992 break 2 2742 break 2
1993 fi 2743 fi
1994done 2744done
1995done 2745 done
1996IFS=$as_save_IFS 2746IFS=$as_save_IFS
1997 2747
1998if test $ac_prog_rejected = yes; then 2748if test $ac_prog_rejected = yes; then
@@ -2011,11 +2761,11 @@ fi
2011fi 2761fi
2012CC=$ac_cv_prog_CC 2762CC=$ac_cv_prog_CC
2013if test -n "$CC"; then 2763if test -n "$CC"; then
2014 { echo "$as_me:$LINENO: result: $CC" >&5 2764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2015echo "${ECHO_T}$CC" >&6; } 2765$as_echo "$CC" >&6; }
2016else 2766else
2017 { echo "$as_me:$LINENO: result: no" >&5 2767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2018echo "${ECHO_T}no" >&6; } 2768$as_echo "no" >&6; }
2019fi 2769fi
2020 2770
2021 2771
@@ -2026,10 +2776,10 @@ if test -z "$CC"; then
2026 do 2776 do
2027 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 2777 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
2028set dummy $ac_tool_prefix$ac_prog; ac_word=$2 2778set dummy $ac_tool_prefix$ac_prog; ac_word=$2
2029{ echo "$as_me:$LINENO: checking for $ac_word" >&5 2779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2030echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 2780$as_echo_n "checking for $ac_word... " >&6; }
2031if test "${ac_cv_prog_CC+set}" = set; then 2781if ${ac_cv_prog_CC+:} false; then :
2032 echo $ECHO_N "(cached) $ECHO_C" >&6 2782 $as_echo_n "(cached) " >&6
2033else 2783else
2034 if test -n "$CC"; then 2784 if test -n "$CC"; then
2035 ac_cv_prog_CC="$CC" # Let the user override the test. 2785 ac_cv_prog_CC="$CC" # Let the user override the test.
@@ -2039,25 +2789,25 @@ for as_dir in $PATH
2039do 2789do
2040 IFS=$as_save_IFS 2790 IFS=$as_save_IFS
2041 test -z "$as_dir" && as_dir=. 2791 test -z "$as_dir" && as_dir=.
2042 for ac_exec_ext in '' $ac_executable_extensions; do 2792 for ac_exec_ext in '' $ac_executable_extensions; do
2043 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 2793 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2044 ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 2794 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
2045 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2795 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2046 break 2 2796 break 2
2047 fi 2797 fi
2048done 2798done
2049done 2799 done
2050IFS=$as_save_IFS 2800IFS=$as_save_IFS
2051 2801
2052fi 2802fi
2053fi 2803fi
2054CC=$ac_cv_prog_CC 2804CC=$ac_cv_prog_CC
2055if test -n "$CC"; then 2805if test -n "$CC"; then
2056 { echo "$as_me:$LINENO: result: $CC" >&5 2806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
2057echo "${ECHO_T}$CC" >&6; } 2807$as_echo "$CC" >&6; }
2058else 2808else
2059 { echo "$as_me:$LINENO: result: no" >&5 2809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2060echo "${ECHO_T}no" >&6; } 2810$as_echo "no" >&6; }
2061fi 2811fi
2062 2812
2063 2813
@@ -2070,10 +2820,10 @@ if test -z "$CC"; then
2070do 2820do
2071 # Extract the first word of "$ac_prog", so it can be a program name with args. 2821 # Extract the first word of "$ac_prog", so it can be a program name with args.
2072set dummy $ac_prog; ac_word=$2 2822set dummy $ac_prog; ac_word=$2
2073{ echo "$as_me:$LINENO: checking for $ac_word" >&5 2823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2074echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 2824$as_echo_n "checking for $ac_word... " >&6; }
2075if test "${ac_cv_prog_ac_ct_CC+set}" = set; then 2825if ${ac_cv_prog_ac_ct_CC+:} false; then :
2076 echo $ECHO_N "(cached) $ECHO_C" >&6 2826 $as_echo_n "(cached) " >&6
2077else 2827else
2078 if test -n "$ac_ct_CC"; then 2828 if test -n "$ac_ct_CC"; then
2079 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 2829 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
@@ -2083,25 +2833,25 @@ for as_dir in $PATH
2083do 2833do
2084 IFS=$as_save_IFS 2834 IFS=$as_save_IFS
2085 test -z "$as_dir" && as_dir=. 2835 test -z "$as_dir" && as_dir=.
2086 for ac_exec_ext in '' $ac_executable_extensions; do 2836 for ac_exec_ext in '' $ac_executable_extensions; do
2087 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 2837 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
2088 ac_cv_prog_ac_ct_CC="$ac_prog" 2838 ac_cv_prog_ac_ct_CC="$ac_prog"
2089 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 2839 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2090 break 2 2840 break 2
2091 fi 2841 fi
2092done 2842done
2093done 2843 done
2094IFS=$as_save_IFS 2844IFS=$as_save_IFS
2095 2845
2096fi 2846fi
2097fi 2847fi
2098ac_ct_CC=$ac_cv_prog_ac_ct_CC 2848ac_ct_CC=$ac_cv_prog_ac_ct_CC
2099if test -n "$ac_ct_CC"; then 2849if test -n "$ac_ct_CC"; then
2100 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 2850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
2101echo "${ECHO_T}$ac_ct_CC" >&6; } 2851$as_echo "$ac_ct_CC" >&6; }
2102else 2852else
2103 { echo "$as_me:$LINENO: result: no" >&5 2853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2104echo "${ECHO_T}no" >&6; } 2854$as_echo "no" >&6; }
2105fi 2855fi
2106 2856
2107 2857
@@ -2113,12 +2863,8 @@ done
2113 else 2863 else
2114 case $cross_compiling:$ac_tool_warned in 2864 case $cross_compiling:$ac_tool_warned in
2115yes:) 2865yes:)
2116{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools 2866{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
2117whose name does not start with the host triplet. If you think this 2867$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
2118configuration is useful to you, please write to autoconf@gnu.org." >&5
2119echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
2120whose name does not start with the host triplet. If you think this
2121configuration is useful to you, please write to autoconf@gnu.org." >&2;}
2122ac_tool_warned=yes ;; 2868ac_tool_warned=yes ;;
2123esac 2869esac
2124 CC=$ac_ct_CC 2870 CC=$ac_ct_CC
@@ -2128,51 +2874,37 @@ fi
2128fi 2874fi
2129 2875
2130 2876
2131test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH 2877test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2132See \`config.log' for more details." >&5 2878$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2133echo "$as_me: error: no acceptable C compiler found in \$PATH 2879as_fn_error $? "no acceptable C compiler found in \$PATH
2134See \`config.log' for more details." >&2;} 2880See \`config.log' for more details" "$LINENO" 5; }
2135 { (exit 1); exit 1; }; }
2136 2881
2137# Provide some information about the compiler. 2882# Provide some information about the compiler.
2138echo "$as_me:$LINENO: checking for C compiler version" >&5 2883$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
2139ac_compiler=`set X $ac_compile; echo $2` 2884set X $ac_compile
2140{ (ac_try="$ac_compiler --version >&5" 2885ac_compiler=$2
2141case "(($ac_try" in 2886for ac_option in --version -v -V -qversion; do
2142 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2887 { { ac_try="$ac_compiler $ac_option >&5"
2143 *) ac_try_echo=$ac_try;;
2144esac
2145eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2146 (eval "$ac_compiler --version >&5") 2>&5
2147 ac_status=$?
2148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2149 (exit $ac_status); }
2150{ (ac_try="$ac_compiler -v >&5"
2151case "(($ac_try" in 2888case "(($ac_try" in
2152 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2153 *) ac_try_echo=$ac_try;; 2890 *) ac_try_echo=$ac_try;;
2154esac 2891esac
2155eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2892eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2156 (eval "$ac_compiler -v >&5") 2>&5 2893$as_echo "$ac_try_echo"; } >&5
2894 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
2157 ac_status=$? 2895 ac_status=$?
2158 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2896 if test -s conftest.err; then
2159 (exit $ac_status); } 2897 sed '10a\
2160{ (ac_try="$ac_compiler -V >&5" 2898... rest of stderr output deleted ...
2161case "(($ac_try" in 2899 10q' conftest.err >conftest.er1
2162 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2900 cat conftest.er1 >&5
2163 *) ac_try_echo=$ac_try;; 2901 fi
2164esac 2902 rm -f conftest.er1 conftest.err
2165eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2903 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2166 (eval "$ac_compiler -V >&5") 2>&5 2904 test $ac_status = 0; }
2167 ac_status=$? 2905done
2168 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2169 (exit $ac_status); }
2170 2906
2171cat >conftest.$ac_ext <<_ACEOF 2907cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2172/* confdefs.h. */
2173_ACEOF
2174cat confdefs.h >>conftest.$ac_ext
2175cat >>conftest.$ac_ext <<_ACEOF
2176/* end confdefs.h. */ 2908/* end confdefs.h. */
2177 2909
2178int 2910int
@@ -2184,42 +2916,38 @@ main ()
2184} 2916}
2185_ACEOF 2917_ACEOF
2186ac_clean_files_save=$ac_clean_files 2918ac_clean_files_save=$ac_clean_files
2187ac_clean_files="$ac_clean_files a.out a.exe b.out" 2919ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
2188# Try to create an executable without -o first, disregard a.out. 2920# Try to create an executable without -o first, disregard a.out.
2189# It will help us diagnose broken compilers, and finding out an intuition 2921# It will help us diagnose broken compilers, and finding out an intuition
2190# of exeext. 2922# of exeext.
2191{ echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 2923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
2192echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } 2924$as_echo_n "checking whether the C compiler works... " >&6; }
2193ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 2925ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
2194# 2926
2195# List of possible output files, starting from the most likely. 2927# The possible output files:
2196# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) 2928ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
2197# only as a last resort. b.out is created by i960 compilers. 2929
2198ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
2199#
2200# The IRIX 6 linker writes into existing files which may not be
2201# executable, retaining their permissions. Remove them first so a
2202# subsequent execution test works.
2203ac_rmfiles= 2930ac_rmfiles=
2204for ac_file in $ac_files 2931for ac_file in $ac_files
2205do 2932do
2206 case $ac_file in 2933 case $ac_file in
2207 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; 2934 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2208 * ) ac_rmfiles="$ac_rmfiles $ac_file";; 2935 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
2209 esac 2936 esac
2210done 2937done
2211rm -f $ac_rmfiles 2938rm -f $ac_rmfiles
2212 2939
2213if { (ac_try="$ac_link_default" 2940if { { ac_try="$ac_link_default"
2214case "(($ac_try" in 2941case "(($ac_try" in
2215 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2942 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2216 *) ac_try_echo=$ac_try;; 2943 *) ac_try_echo=$ac_try;;
2217esac 2944esac
2218eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 2945eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2946$as_echo "$ac_try_echo"; } >&5
2219 (eval "$ac_link_default") 2>&5 2947 (eval "$ac_link_default") 2>&5
2220 ac_status=$? 2948 ac_status=$?
2221 echo "$as_me:$LINENO: \$? = $ac_status" >&5 2949 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2222 (exit $ac_status); }; then 2950 test $ac_status = 0; }; then :
2223 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. 2951 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
2224# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' 2952# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
2225# in a Makefile. We should not override ac_cv_exeext if it was cached, 2953# in a Makefile. We should not override ac_cv_exeext if it was cached,
@@ -2229,14 +2957,14 @@ for ac_file in $ac_files ''
2229do 2957do
2230 test -f "$ac_file" || continue 2958 test -f "$ac_file" || continue
2231 case $ac_file in 2959 case $ac_file in
2232 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) 2960 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
2233 ;; 2961 ;;
2234 [ab].out ) 2962 [ab].out )
2235 # We found the default executable, but exeext='' is most 2963 # We found the default executable, but exeext='' is most
2236 # certainly right. 2964 # certainly right.
2237 break;; 2965 break;;
2238 *.* ) 2966 *.* )
2239 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; 2967 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
2240 then :; else 2968 then :; else
2241 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 2969 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2242 fi 2970 fi
@@ -2255,78 +2983,41 @@ test "$ac_cv_exeext" = no && ac_cv_exeext=
2255else 2983else
2256 ac_file='' 2984 ac_file=''
2257fi 2985fi
2258 2986if test -z "$ac_file"; then :
2259{ echo "$as_me:$LINENO: result: $ac_file" >&5 2987 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
2260echo "${ECHO_T}$ac_file" >&6; } 2988$as_echo "no" >&6; }
2261if test -z "$ac_file"; then 2989$as_echo "$as_me: failed program was:" >&5
2262 echo "$as_me: failed program was:" >&5
2263sed 's/^/| /' conftest.$ac_ext >&5 2990sed 's/^/| /' conftest.$ac_ext >&5
2264 2991
2265{ { echo "$as_me:$LINENO: error: C compiler cannot create executables 2992{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2266See \`config.log' for more details." >&5 2993$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2267echo "$as_me: error: C compiler cannot create executables 2994as_fn_error 77 "C compiler cannot create executables
2268See \`config.log' for more details." >&2;} 2995See \`config.log' for more details" "$LINENO" 5; }
2269 { (exit 77); exit 77; }; } 2996else
2997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
2998$as_echo "yes" >&6; }
2270fi 2999fi
2271 3000{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3001$as_echo_n "checking for C compiler default output file name... " >&6; }
3002{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3003$as_echo "$ac_file" >&6; }
2272ac_exeext=$ac_cv_exeext 3004ac_exeext=$ac_cv_exeext
2273 3005
2274# Check that the compiler produces executables we can run. If not, either 3006rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
2275# the compiler is broken, or we cross compile.
2276{ echo "$as_me:$LINENO: checking whether the C compiler works" >&5
2277echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; }
2278# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
2279# If not cross compiling, check that we can run a simple program.
2280if test "$cross_compiling" != yes; then
2281 if { ac_try='./$ac_file'
2282 { (case "(($ac_try" in
2283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2284 *) ac_try_echo=$ac_try;;
2285esac
2286eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2287 (eval "$ac_try") 2>&5
2288 ac_status=$?
2289 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2290 (exit $ac_status); }; }; then
2291 cross_compiling=no
2292 else
2293 if test "$cross_compiling" = maybe; then
2294 cross_compiling=yes
2295 else
2296 { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
2297If you meant to cross compile, use \`--host'.
2298See \`config.log' for more details." >&5
2299echo "$as_me: error: cannot run C compiled programs.
2300If you meant to cross compile, use \`--host'.
2301See \`config.log' for more details." >&2;}
2302 { (exit 1); exit 1; }; }
2303 fi
2304 fi
2305fi
2306{ echo "$as_me:$LINENO: result: yes" >&5
2307echo "${ECHO_T}yes" >&6; }
2308
2309rm -f a.out a.exe conftest$ac_cv_exeext b.out
2310ac_clean_files=$ac_clean_files_save 3007ac_clean_files=$ac_clean_files_save
2311# Check that the compiler produces executables we can run. If not, either 3008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
2312# the compiler is broken, or we cross compile. 3009$as_echo_n "checking for suffix of executables... " >&6; }
2313{ echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 3010if { { ac_try="$ac_link"
2314echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; }
2315{ echo "$as_me:$LINENO: result: $cross_compiling" >&5
2316echo "${ECHO_T}$cross_compiling" >&6; }
2317
2318{ echo "$as_me:$LINENO: checking for suffix of executables" >&5
2319echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; }
2320if { (ac_try="$ac_link"
2321case "(($ac_try" in 3011case "(($ac_try" in
2322 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3012 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2323 *) ac_try_echo=$ac_try;; 3013 *) ac_try_echo=$ac_try;;
2324esac 3014esac
2325eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3015eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3016$as_echo "$ac_try_echo"; } >&5
2326 (eval "$ac_link") 2>&5 3017 (eval "$ac_link") 2>&5
2327 ac_status=$? 3018 ac_status=$?
2328 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3019 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2329 (exit $ac_status); }; then 3020 test $ac_status = 0; }; then :
2330 # If both `conftest.exe' and `conftest' are `present' (well, observable) 3021 # If both `conftest.exe' and `conftest' are `present' (well, observable)
2331# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will 3022# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
2332# work properly (i.e., refer to `conftest.exe'), while it won't with 3023# work properly (i.e., refer to `conftest.exe'), while it won't with
@@ -2334,37 +3025,90 @@ eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2334for ac_file in conftest.exe conftest conftest.*; do 3025for ac_file in conftest.exe conftest conftest.*; do
2335 test -f "$ac_file" || continue 3026 test -f "$ac_file" || continue
2336 case $ac_file in 3027 case $ac_file in
2337 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; 3028 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
2338 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 3029 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
2339 break;; 3030 break;;
2340 * ) break;; 3031 * ) break;;
2341 esac 3032 esac
2342done 3033done
2343else 3034else
2344 { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link 3035 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2345See \`config.log' for more details." >&5 3036$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2346echo "$as_me: error: cannot compute suffix of executables: cannot compile and link 3037as_fn_error $? "cannot compute suffix of executables: cannot compile and link
2347See \`config.log' for more details." >&2;} 3038See \`config.log' for more details" "$LINENO" 5; }
2348 { (exit 1); exit 1; }; }
2349fi 3039fi
2350 3040rm -f conftest conftest$ac_cv_exeext
2351rm -f conftest$ac_cv_exeext 3041{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
2352{ echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 3042$as_echo "$ac_cv_exeext" >&6; }
2353echo "${ECHO_T}$ac_cv_exeext" >&6; }
2354 3043
2355rm -f conftest.$ac_ext 3044rm -f conftest.$ac_ext
2356EXEEXT=$ac_cv_exeext 3045EXEEXT=$ac_cv_exeext
2357ac_exeext=$EXEEXT 3046ac_exeext=$EXEEXT
2358{ echo "$as_me:$LINENO: checking for suffix of object files" >&5 3047cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2359echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } 3048/* end confdefs.h. */
2360if test "${ac_cv_objext+set}" = set; then 3049#include <stdio.h>
2361 echo $ECHO_N "(cached) $ECHO_C" >&6 3050int
2362else 3051main ()
2363 cat >conftest.$ac_ext <<_ACEOF 3052{
2364/* confdefs.h. */ 3053FILE *f = fopen ("conftest.out", "w");
3054 return ferror (f) || fclose (f) != 0;
3055
3056 ;
3057 return 0;
3058}
2365_ACEOF 3059_ACEOF
2366cat confdefs.h >>conftest.$ac_ext 3060ac_clean_files="$ac_clean_files conftest.out"
2367cat >>conftest.$ac_ext <<_ACEOF 3061# Check that the compiler produces executables we can run. If not, either
3062# the compiler is broken, or we cross compile.
3063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3064$as_echo_n "checking whether we are cross compiling... " >&6; }
3065if test "$cross_compiling" != yes; then
3066 { { ac_try="$ac_link"
3067case "(($ac_try" in
3068 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3069 *) ac_try_echo=$ac_try;;
3070esac
3071eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3072$as_echo "$ac_try_echo"; } >&5
3073 (eval "$ac_link") 2>&5
3074 ac_status=$?
3075 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3076 test $ac_status = 0; }
3077 if { ac_try='./conftest$ac_cv_exeext'
3078 { { case "(($ac_try" in
3079 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3080 *) ac_try_echo=$ac_try;;
3081esac
3082eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3083$as_echo "$ac_try_echo"; } >&5
3084 (eval "$ac_try") 2>&5
3085 ac_status=$?
3086 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3087 test $ac_status = 0; }; }; then
3088 cross_compiling=no
3089 else
3090 if test "$cross_compiling" = maybe; then
3091 cross_compiling=yes
3092 else
3093 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3094$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3095as_fn_error $? "cannot run C compiled programs.
3096If you meant to cross compile, use \`--host'.
3097See \`config.log' for more details" "$LINENO" 5; }
3098 fi
3099 fi
3100fi
3101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3102$as_echo "$cross_compiling" >&6; }
3103
3104rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3105ac_clean_files=$ac_clean_files_save
3106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3107$as_echo_n "checking for suffix of object files... " >&6; }
3108if ${ac_cv_objext+:} false; then :
3109 $as_echo_n "(cached) " >&6
3110else
3111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2368/* end confdefs.h. */ 3112/* end confdefs.h. */
2369 3113
2370int 3114int
@@ -2376,51 +3120,46 @@ main ()
2376} 3120}
2377_ACEOF 3121_ACEOF
2378rm -f conftest.o conftest.obj 3122rm -f conftest.o conftest.obj
2379if { (ac_try="$ac_compile" 3123if { { ac_try="$ac_compile"
2380case "(($ac_try" in 3124case "(($ac_try" in
2381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 3125 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2382 *) ac_try_echo=$ac_try;; 3126 *) ac_try_echo=$ac_try;;
2383esac 3127esac
2384eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 3128eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3129$as_echo "$ac_try_echo"; } >&5
2385 (eval "$ac_compile") 2>&5 3130 (eval "$ac_compile") 2>&5
2386 ac_status=$? 3131 ac_status=$?
2387 echo "$as_me:$LINENO: \$? = $ac_status" >&5 3132 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2388 (exit $ac_status); }; then 3133 test $ac_status = 0; }; then :
2389 for ac_file in conftest.o conftest.obj conftest.*; do 3134 for ac_file in conftest.o conftest.obj conftest.*; do
2390 test -f "$ac_file" || continue; 3135 test -f "$ac_file" || continue;
2391 case $ac_file in 3136 case $ac_file in
2392 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; 3137 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
2393 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 3138 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
2394 break;; 3139 break;;
2395 esac 3140 esac
2396done 3141done
2397else 3142else
2398 echo "$as_me: failed program was:" >&5 3143 $as_echo "$as_me: failed program was:" >&5
2399sed 's/^/| /' conftest.$ac_ext >&5 3144sed 's/^/| /' conftest.$ac_ext >&5
2400 3145
2401{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile 3146{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2402See \`config.log' for more details." >&5 3147$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2403echo "$as_me: error: cannot compute suffix of object files: cannot compile 3148as_fn_error $? "cannot compute suffix of object files: cannot compile
2404See \`config.log' for more details." >&2;} 3149See \`config.log' for more details" "$LINENO" 5; }
2405 { (exit 1); exit 1; }; }
2406fi 3150fi
2407
2408rm -f conftest.$ac_cv_objext conftest.$ac_ext 3151rm -f conftest.$ac_cv_objext conftest.$ac_ext
2409fi 3152fi
2410{ echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 3153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
2411echo "${ECHO_T}$ac_cv_objext" >&6; } 3154$as_echo "$ac_cv_objext" >&6; }
2412OBJEXT=$ac_cv_objext 3155OBJEXT=$ac_cv_objext
2413ac_objext=$OBJEXT 3156ac_objext=$OBJEXT
2414{ echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 3157{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
2415echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } 3158$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
2416if test "${ac_cv_c_compiler_gnu+set}" = set; then 3159if ${ac_cv_c_compiler_gnu+:} false; then :
2417 echo $ECHO_N "(cached) $ECHO_C" >&6 3160 $as_echo_n "(cached) " >&6
2418else 3161else
2419 cat >conftest.$ac_ext <<_ACEOF 3162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2420/* confdefs.h. */
2421_ACEOF
2422cat confdefs.h >>conftest.$ac_ext
2423cat >>conftest.$ac_ext <<_ACEOF
2424/* end confdefs.h. */ 3163/* end confdefs.h. */
2425 3164
2426int 3165int
@@ -2434,54 +3173,34 @@ main ()
2434 return 0; 3173 return 0;
2435} 3174}
2436_ACEOF 3175_ACEOF
2437rm -f conftest.$ac_objext 3176if ac_fn_c_try_compile "$LINENO"; then :
2438if { (ac_try="$ac_compile"
2439case "(($ac_try" in
2440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2441 *) ac_try_echo=$ac_try;;
2442esac
2443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2444 (eval "$ac_compile") 2>conftest.er1
2445 ac_status=$?
2446 grep -v '^ *+' conftest.er1 >conftest.err
2447 rm -f conftest.er1
2448 cat conftest.err >&5
2449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2450 (exit $ac_status); } && {
2451 test -z "$ac_c_werror_flag" ||
2452 test ! -s conftest.err
2453 } && test -s conftest.$ac_objext; then
2454 ac_compiler_gnu=yes 3177 ac_compiler_gnu=yes
2455else 3178else
2456 echo "$as_me: failed program was:" >&5 3179 ac_compiler_gnu=no
2457sed 's/^/| /' conftest.$ac_ext >&5
2458
2459 ac_compiler_gnu=no
2460fi 3180fi
2461
2462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3181rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2463ac_cv_c_compiler_gnu=$ac_compiler_gnu 3182ac_cv_c_compiler_gnu=$ac_compiler_gnu
2464 3183
2465fi 3184fi
2466{ echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 3185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
2467echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } 3186$as_echo "$ac_cv_c_compiler_gnu" >&6; }
2468GCC=`test $ac_compiler_gnu = yes && echo yes` 3187if test $ac_compiler_gnu = yes; then
3188 GCC=yes
3189else
3190 GCC=
3191fi
2469ac_test_CFLAGS=${CFLAGS+set} 3192ac_test_CFLAGS=${CFLAGS+set}
2470ac_save_CFLAGS=$CFLAGS 3193ac_save_CFLAGS=$CFLAGS
2471{ echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 3194{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
2472echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } 3195$as_echo_n "checking whether $CC accepts -g... " >&6; }
2473if test "${ac_cv_prog_cc_g+set}" = set; then 3196if ${ac_cv_prog_cc_g+:} false; then :
2474 echo $ECHO_N "(cached) $ECHO_C" >&6 3197 $as_echo_n "(cached) " >&6
2475else 3198else
2476 ac_save_c_werror_flag=$ac_c_werror_flag 3199 ac_save_c_werror_flag=$ac_c_werror_flag
2477 ac_c_werror_flag=yes 3200 ac_c_werror_flag=yes
2478 ac_cv_prog_cc_g=no 3201 ac_cv_prog_cc_g=no
2479 CFLAGS="-g" 3202 CFLAGS="-g"
2480 cat >conftest.$ac_ext <<_ACEOF 3203 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2481/* confdefs.h. */
2482_ACEOF
2483cat confdefs.h >>conftest.$ac_ext
2484cat >>conftest.$ac_ext <<_ACEOF
2485/* end confdefs.h. */ 3204/* end confdefs.h. */
2486 3205
2487int 3206int
@@ -2492,34 +3211,11 @@ main ()
2492 return 0; 3211 return 0;
2493} 3212}
2494_ACEOF 3213_ACEOF
2495rm -f conftest.$ac_objext 3214if ac_fn_c_try_compile "$LINENO"; then :
2496if { (ac_try="$ac_compile"
2497case "(($ac_try" in
2498 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2499 *) ac_try_echo=$ac_try;;
2500esac
2501eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2502 (eval "$ac_compile") 2>conftest.er1
2503 ac_status=$?
2504 grep -v '^ *+' conftest.er1 >conftest.err
2505 rm -f conftest.er1
2506 cat conftest.err >&5
2507 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2508 (exit $ac_status); } && {
2509 test -z "$ac_c_werror_flag" ||
2510 test ! -s conftest.err
2511 } && test -s conftest.$ac_objext; then
2512 ac_cv_prog_cc_g=yes 3215 ac_cv_prog_cc_g=yes
2513else 3216else
2514 echo "$as_me: failed program was:" >&5 3217 CFLAGS=""
2515sed 's/^/| /' conftest.$ac_ext >&5 3218 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2516
2517 CFLAGS=""
2518 cat >conftest.$ac_ext <<_ACEOF
2519/* confdefs.h. */
2520_ACEOF
2521cat confdefs.h >>conftest.$ac_ext
2522cat >>conftest.$ac_ext <<_ACEOF
2523/* end confdefs.h. */ 3219/* end confdefs.h. */
2524 3220
2525int 3221int
@@ -2530,35 +3226,12 @@ main ()
2530 return 0; 3226 return 0;
2531} 3227}
2532_ACEOF 3228_ACEOF
2533rm -f conftest.$ac_objext 3229if ac_fn_c_try_compile "$LINENO"; then :
2534if { (ac_try="$ac_compile"
2535case "(($ac_try" in
2536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2537 *) ac_try_echo=$ac_try;;
2538esac
2539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2540 (eval "$ac_compile") 2>conftest.er1
2541 ac_status=$?
2542 grep -v '^ *+' conftest.er1 >conftest.err
2543 rm -f conftest.er1
2544 cat conftest.err >&5
2545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2546 (exit $ac_status); } && {
2547 test -z "$ac_c_werror_flag" ||
2548 test ! -s conftest.err
2549 } && test -s conftest.$ac_objext; then
2550 :
2551else
2552 echo "$as_me: failed program was:" >&5
2553sed 's/^/| /' conftest.$ac_ext >&5
2554 3230
2555 ac_c_werror_flag=$ac_save_c_werror_flag 3231else
3232 ac_c_werror_flag=$ac_save_c_werror_flag
2556 CFLAGS="-g" 3233 CFLAGS="-g"
2557 cat >conftest.$ac_ext <<_ACEOF 3234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2558/* confdefs.h. */
2559_ACEOF
2560cat confdefs.h >>conftest.$ac_ext
2561cat >>conftest.$ac_ext <<_ACEOF
2562/* end confdefs.h. */ 3235/* end confdefs.h. */
2563 3236
2564int 3237int
@@ -2569,42 +3242,18 @@ main ()
2569 return 0; 3242 return 0;
2570} 3243}
2571_ACEOF 3244_ACEOF
2572rm -f conftest.$ac_objext 3245if ac_fn_c_try_compile "$LINENO"; then :
2573if { (ac_try="$ac_compile"
2574case "(($ac_try" in
2575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2576 *) ac_try_echo=$ac_try;;
2577esac
2578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2579 (eval "$ac_compile") 2>conftest.er1
2580 ac_status=$?
2581 grep -v '^ *+' conftest.er1 >conftest.err
2582 rm -f conftest.er1
2583 cat conftest.err >&5
2584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2585 (exit $ac_status); } && {
2586 test -z "$ac_c_werror_flag" ||
2587 test ! -s conftest.err
2588 } && test -s conftest.$ac_objext; then
2589 ac_cv_prog_cc_g=yes 3246 ac_cv_prog_cc_g=yes
2590else
2591 echo "$as_me: failed program was:" >&5
2592sed 's/^/| /' conftest.$ac_ext >&5
2593
2594
2595fi 3247fi
2596
2597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3248rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2598fi 3249fi
2599
2600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3250rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2601fi 3251fi
2602
2603rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3252rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2604 ac_c_werror_flag=$ac_save_c_werror_flag 3253 ac_c_werror_flag=$ac_save_c_werror_flag
2605fi 3254fi
2606{ echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 3255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
2607echo "${ECHO_T}$ac_cv_prog_cc_g" >&6; } 3256$as_echo "$ac_cv_prog_cc_g" >&6; }
2608if test "$ac_test_CFLAGS" = set; then 3257if test "$ac_test_CFLAGS" = set; then
2609 CFLAGS=$ac_save_CFLAGS 3258 CFLAGS=$ac_save_CFLAGS
2610elif test $ac_cv_prog_cc_g = yes; then 3259elif test $ac_cv_prog_cc_g = yes; then
@@ -2620,18 +3269,14 @@ else
2620 CFLAGS= 3269 CFLAGS=
2621 fi 3270 fi
2622fi 3271fi
2623{ echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 3272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
2624echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } 3273$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
2625if test "${ac_cv_prog_cc_c89+set}" = set; then 3274if ${ac_cv_prog_cc_c89+:} false; then :
2626 echo $ECHO_N "(cached) $ECHO_C" >&6 3275 $as_echo_n "(cached) " >&6
2627else 3276else
2628 ac_cv_prog_cc_c89=no 3277 ac_cv_prog_cc_c89=no
2629ac_save_CC=$CC 3278ac_save_CC=$CC
2630cat >conftest.$ac_ext <<_ACEOF 3279cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2631/* confdefs.h. */
2632_ACEOF
2633cat confdefs.h >>conftest.$ac_ext
2634cat >>conftest.$ac_ext <<_ACEOF
2635/* end confdefs.h. */ 3280/* end confdefs.h. */
2636#include <stdarg.h> 3281#include <stdarg.h>
2637#include <stdio.h> 3282#include <stdio.h>
@@ -2688,31 +3333,9 @@ for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
2688 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 3333 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2689do 3334do
2690 CC="$ac_save_CC $ac_arg" 3335 CC="$ac_save_CC $ac_arg"
2691 rm -f conftest.$ac_objext 3336 if ac_fn_c_try_compile "$LINENO"; then :
2692if { (ac_try="$ac_compile"
2693case "(($ac_try" in
2694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2695 *) ac_try_echo=$ac_try;;
2696esac
2697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2698 (eval "$ac_compile") 2>conftest.er1
2699 ac_status=$?
2700 grep -v '^ *+' conftest.er1 >conftest.err
2701 rm -f conftest.er1
2702 cat conftest.err >&5
2703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2704 (exit $ac_status); } && {
2705 test -z "$ac_c_werror_flag" ||
2706 test ! -s conftest.err
2707 } && test -s conftest.$ac_objext; then
2708 ac_cv_prog_cc_c89=$ac_arg 3337 ac_cv_prog_cc_c89=$ac_arg
2709else
2710 echo "$as_me: failed program was:" >&5
2711sed 's/^/| /' conftest.$ac_ext >&5
2712
2713
2714fi 3338fi
2715
2716rm -f core conftest.err conftest.$ac_objext 3339rm -f core conftest.err conftest.$ac_objext
2717 test "x$ac_cv_prog_cc_c89" != "xno" && break 3340 test "x$ac_cv_prog_cc_c89" != "xno" && break
2718done 3341done
@@ -2723,17 +3346,19 @@ fi
2723# AC_CACHE_VAL 3346# AC_CACHE_VAL
2724case "x$ac_cv_prog_cc_c89" in 3347case "x$ac_cv_prog_cc_c89" in
2725 x) 3348 x)
2726 { echo "$as_me:$LINENO: result: none needed" >&5 3349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
2727echo "${ECHO_T}none needed" >&6; } ;; 3350$as_echo "none needed" >&6; } ;;
2728 xno) 3351 xno)
2729 { echo "$as_me:$LINENO: result: unsupported" >&5 3352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
2730echo "${ECHO_T}unsupported" >&6; } ;; 3353$as_echo "unsupported" >&6; } ;;
2731 *) 3354 *)
2732 CC="$CC $ac_cv_prog_cc_c89" 3355 CC="$CC $ac_cv_prog_cc_c89"
2733 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 3356 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
2734echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; 3357$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
2735esac 3358esac
3359if test "x$ac_cv_prog_cc_c89" != xno; then :
2736 3360
3361fi
2737 3362
2738ac_ext=c 3363ac_ext=c
2739ac_cpp='$CPP $CPPFLAGS' 3364ac_cpp='$CPP $CPPFLAGS'
@@ -2758,9 +3383,7 @@ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
2758 fi 3383 fi
2759done 3384done
2760if test -z "$ac_aux_dir"; then 3385if test -z "$ac_aux_dir"; then
2761 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 3386 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
2762echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
2763 { (exit 1); exit 1; }; }
2764fi 3387fi
2765 3388
2766# These three variables are undocumented and unsupported, 3389# These three variables are undocumented and unsupported,
@@ -2774,35 +3397,27 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
2774 3397
2775# Make sure we can run config.sub. 3398# Make sure we can run config.sub.
2776$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 3399$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
2777 { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 3400 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
2778echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
2779 { (exit 1); exit 1; }; }
2780 3401
2781{ echo "$as_me:$LINENO: checking build system type" >&5 3402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
2782echo $ECHO_N "checking build system type... $ECHO_C" >&6; } 3403$as_echo_n "checking build system type... " >&6; }
2783if test "${ac_cv_build+set}" = set; then 3404if ${ac_cv_build+:} false; then :
2784 echo $ECHO_N "(cached) $ECHO_C" >&6 3405 $as_echo_n "(cached) " >&6
2785else 3406else
2786 ac_build_alias=$build_alias 3407 ac_build_alias=$build_alias
2787test "x$ac_build_alias" = x && 3408test "x$ac_build_alias" = x &&
2788 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 3409 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
2789test "x$ac_build_alias" = x && 3410test "x$ac_build_alias" = x &&
2790 { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 3411 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
2791echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
2792 { (exit 1); exit 1; }; }
2793ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || 3412ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
2794 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 3413 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
2795echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
2796 { (exit 1); exit 1; }; }
2797 3414
2798fi 3415fi
2799{ echo "$as_me:$LINENO: result: $ac_cv_build" >&5 3416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
2800echo "${ECHO_T}$ac_cv_build" >&6; } 3417$as_echo "$ac_cv_build" >&6; }
2801case $ac_cv_build in 3418case $ac_cv_build in
2802*-*-*) ;; 3419*-*-*) ;;
2803*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 3420*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
2804echo "$as_me: error: invalid value of canonical build" >&2;}
2805 { (exit 1); exit 1; }; };;
2806esac 3421esac
2807build=$ac_cv_build 3422build=$ac_cv_build
2808ac_save_IFS=$IFS; IFS='-' 3423ac_save_IFS=$IFS; IFS='-'
@@ -2818,28 +3433,24 @@ IFS=$ac_save_IFS
2818case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac 3433case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
2819 3434
2820 3435
2821{ echo "$as_me:$LINENO: checking host system type" >&5 3436{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
2822echo $ECHO_N "checking host system type... $ECHO_C" >&6; } 3437$as_echo_n "checking host system type... " >&6; }
2823if test "${ac_cv_host+set}" = set; then 3438if ${ac_cv_host+:} false; then :
2824 echo $ECHO_N "(cached) $ECHO_C" >&6 3439 $as_echo_n "(cached) " >&6
2825else 3440else
2826 if test "x$host_alias" = x; then 3441 if test "x$host_alias" = x; then
2827 ac_cv_host=$ac_cv_build 3442 ac_cv_host=$ac_cv_build
2828else 3443else
2829 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || 3444 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
2830 { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 3445 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
2831echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
2832 { (exit 1); exit 1; }; }
2833fi 3446fi
2834 3447
2835fi 3448fi
2836{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 3449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
2837echo "${ECHO_T}$ac_cv_host" >&6; } 3450$as_echo "$ac_cv_host" >&6; }
2838case $ac_cv_host in 3451case $ac_cv_host in
2839*-*-*) ;; 3452*-*-*) ;;
2840*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 3453*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
2841echo "$as_me: error: invalid value of canonical host" >&2;}
2842 { (exit 1); exit 1; }; };;
2843esac 3454esac
2844host=$ac_cv_host 3455host=$ac_cv_host
2845ac_save_IFS=$IFS; IFS='-' 3456ac_save_IFS=$IFS; IFS='-'
@@ -2861,15 +3472,15 @@ ac_cpp='$CPP $CPPFLAGS'
2861ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3472ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2862ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3473ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2863ac_compiler_gnu=$ac_cv_c_compiler_gnu 3474ac_compiler_gnu=$ac_cv_c_compiler_gnu
2864{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 3475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
2865echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } 3476$as_echo_n "checking how to run the C preprocessor... " >&6; }
2866# On Suns, sometimes $CPP names a directory. 3477# On Suns, sometimes $CPP names a directory.
2867if test -n "$CPP" && test -d "$CPP"; then 3478if test -n "$CPP" && test -d "$CPP"; then
2868 CPP= 3479 CPP=
2869fi 3480fi
2870if test -z "$CPP"; then 3481if test -z "$CPP"; then
2871 if test "${ac_cv_prog_CPP+set}" = set; then 3482 if ${ac_cv_prog_CPP+:} false; then :
2872 echo $ECHO_N "(cached) $ECHO_C" >&6 3483 $as_echo_n "(cached) " >&6
2873else 3484else
2874 # Double quotes because CPP needs to be expanded 3485 # Double quotes because CPP needs to be expanded
2875 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" 3486 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -2883,11 +3494,7 @@ do
2883 # <limits.h> exists even on freestanding compilers. 3494 # <limits.h> exists even on freestanding compilers.
2884 # On the NeXT, cc -E runs the code through the compiler's parser, 3495 # On the NeXT, cc -E runs the code through the compiler's parser,
2885 # not just through cpp. "Syntax error" is here to catch this case. 3496 # not just through cpp. "Syntax error" is here to catch this case.
2886 cat >conftest.$ac_ext <<_ACEOF 3497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2887/* confdefs.h. */
2888_ACEOF
2889cat confdefs.h >>conftest.$ac_ext
2890cat >>conftest.$ac_ext <<_ACEOF
2891/* end confdefs.h. */ 3498/* end confdefs.h. */
2892#ifdef __STDC__ 3499#ifdef __STDC__
2893# include <limits.h> 3500# include <limits.h>
@@ -2896,76 +3503,34 @@ cat >>conftest.$ac_ext <<_ACEOF
2896#endif 3503#endif
2897 Syntax error 3504 Syntax error
2898_ACEOF 3505_ACEOF
2899if { (ac_try="$ac_cpp conftest.$ac_ext" 3506if ac_fn_c_try_cpp "$LINENO"; then :
2900case "(($ac_try" in
2901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2902 *) ac_try_echo=$ac_try;;
2903esac
2904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2905 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2906 ac_status=$?
2907 grep -v '^ *+' conftest.er1 >conftest.err
2908 rm -f conftest.er1
2909 cat conftest.err >&5
2910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2911 (exit $ac_status); } >/dev/null && {
2912 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2913 test ! -s conftest.err
2914 }; then
2915 :
2916else
2917 echo "$as_me: failed program was:" >&5
2918sed 's/^/| /' conftest.$ac_ext >&5
2919 3507
3508else
2920 # Broken: fails on valid input. 3509 # Broken: fails on valid input.
2921continue 3510continue
2922fi 3511fi
2923 3512rm -f conftest.err conftest.i conftest.$ac_ext
2924rm -f conftest.err conftest.$ac_ext
2925 3513
2926 # OK, works on sane cases. Now check whether nonexistent headers 3514 # OK, works on sane cases. Now check whether nonexistent headers
2927 # can be detected and how. 3515 # can be detected and how.
2928 cat >conftest.$ac_ext <<_ACEOF 3516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2929/* confdefs.h. */
2930_ACEOF
2931cat confdefs.h >>conftest.$ac_ext
2932cat >>conftest.$ac_ext <<_ACEOF
2933/* end confdefs.h. */ 3517/* end confdefs.h. */
2934#include <ac_nonexistent.h> 3518#include <ac_nonexistent.h>
2935_ACEOF 3519_ACEOF
2936if { (ac_try="$ac_cpp conftest.$ac_ext" 3520if ac_fn_c_try_cpp "$LINENO"; then :
2937case "(($ac_try" in
2938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2939 *) ac_try_echo=$ac_try;;
2940esac
2941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
2942 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
2943 ac_status=$?
2944 grep -v '^ *+' conftest.er1 >conftest.err
2945 rm -f conftest.er1
2946 cat conftest.err >&5
2947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
2948 (exit $ac_status); } >/dev/null && {
2949 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2950 test ! -s conftest.err
2951 }; then
2952 # Broken: success on invalid input. 3521 # Broken: success on invalid input.
2953continue 3522continue
2954else 3523else
2955 echo "$as_me: failed program was:" >&5
2956sed 's/^/| /' conftest.$ac_ext >&5
2957
2958 # Passes both tests. 3524 # Passes both tests.
2959ac_preproc_ok=: 3525ac_preproc_ok=:
2960break 3526break
2961fi 3527fi
2962 3528rm -f conftest.err conftest.i conftest.$ac_ext
2963rm -f conftest.err conftest.$ac_ext
2964 3529
2965done 3530done
2966# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 3531# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2967rm -f conftest.err conftest.$ac_ext 3532rm -f conftest.i conftest.err conftest.$ac_ext
2968if $ac_preproc_ok; then 3533if $ac_preproc_ok; then :
2969 break 3534 break
2970fi 3535fi
2971 3536
@@ -2977,8 +3542,8 @@ fi
2977else 3542else
2978 ac_cv_prog_CPP=$CPP 3543 ac_cv_prog_CPP=$CPP
2979fi 3544fi
2980{ echo "$as_me:$LINENO: result: $CPP" >&5 3545{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
2981echo "${ECHO_T}$CPP" >&6; } 3546$as_echo "$CPP" >&6; }
2982ac_preproc_ok=false 3547ac_preproc_ok=false
2983for ac_c_preproc_warn_flag in '' yes 3548for ac_c_preproc_warn_flag in '' yes
2984do 3549do
@@ -2988,11 +3553,7 @@ do
2988 # <limits.h> exists even on freestanding compilers. 3553 # <limits.h> exists even on freestanding compilers.
2989 # On the NeXT, cc -E runs the code through the compiler's parser, 3554 # On the NeXT, cc -E runs the code through the compiler's parser,
2990 # not just through cpp. "Syntax error" is here to catch this case. 3555 # not just through cpp. "Syntax error" is here to catch this case.
2991 cat >conftest.$ac_ext <<_ACEOF 3556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2992/* confdefs.h. */
2993_ACEOF
2994cat confdefs.h >>conftest.$ac_ext
2995cat >>conftest.$ac_ext <<_ACEOF
2996/* end confdefs.h. */ 3557/* end confdefs.h. */
2997#ifdef __STDC__ 3558#ifdef __STDC__
2998# include <limits.h> 3559# include <limits.h>
@@ -3001,83 +3562,40 @@ cat >>conftest.$ac_ext <<_ACEOF
3001#endif 3562#endif
3002 Syntax error 3563 Syntax error
3003_ACEOF 3564_ACEOF
3004if { (ac_try="$ac_cpp conftest.$ac_ext" 3565if ac_fn_c_try_cpp "$LINENO"; then :
3005case "(($ac_try" in
3006 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3007 *) ac_try_echo=$ac_try;;
3008esac
3009eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3010 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3011 ac_status=$?
3012 grep -v '^ *+' conftest.er1 >conftest.err
3013 rm -f conftest.er1
3014 cat conftest.err >&5
3015 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3016 (exit $ac_status); } >/dev/null && {
3017 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3018 test ! -s conftest.err
3019 }; then
3020 :
3021else
3022 echo "$as_me: failed program was:" >&5
3023sed 's/^/| /' conftest.$ac_ext >&5
3024 3566
3567else
3025 # Broken: fails on valid input. 3568 # Broken: fails on valid input.
3026continue 3569continue
3027fi 3570fi
3028 3571rm -f conftest.err conftest.i conftest.$ac_ext
3029rm -f conftest.err conftest.$ac_ext
3030 3572
3031 # OK, works on sane cases. Now check whether nonexistent headers 3573 # OK, works on sane cases. Now check whether nonexistent headers
3032 # can be detected and how. 3574 # can be detected and how.
3033 cat >conftest.$ac_ext <<_ACEOF 3575 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3034/* confdefs.h. */
3035_ACEOF
3036cat confdefs.h >>conftest.$ac_ext
3037cat >>conftest.$ac_ext <<_ACEOF
3038/* end confdefs.h. */ 3576/* end confdefs.h. */
3039#include <ac_nonexistent.h> 3577#include <ac_nonexistent.h>
3040_ACEOF 3578_ACEOF
3041if { (ac_try="$ac_cpp conftest.$ac_ext" 3579if ac_fn_c_try_cpp "$LINENO"; then :
3042case "(($ac_try" in
3043 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3044 *) ac_try_echo=$ac_try;;
3045esac
3046eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3047 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3048 ac_status=$?
3049 grep -v '^ *+' conftest.er1 >conftest.err
3050 rm -f conftest.er1
3051 cat conftest.err >&5
3052 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3053 (exit $ac_status); } >/dev/null && {
3054 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3055 test ! -s conftest.err
3056 }; then
3057 # Broken: success on invalid input. 3580 # Broken: success on invalid input.
3058continue 3581continue
3059else 3582else
3060 echo "$as_me: failed program was:" >&5
3061sed 's/^/| /' conftest.$ac_ext >&5
3062
3063 # Passes both tests. 3583 # Passes both tests.
3064ac_preproc_ok=: 3584ac_preproc_ok=:
3065break 3585break
3066fi 3586fi
3067 3587rm -f conftest.err conftest.i conftest.$ac_ext
3068rm -f conftest.err conftest.$ac_ext
3069 3588
3070done 3589done
3071# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 3590# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3072rm -f conftest.err conftest.$ac_ext 3591rm -f conftest.i conftest.err conftest.$ac_ext
3073if $ac_preproc_ok; then 3592if $ac_preproc_ok; then :
3074 : 3593
3075else 3594else
3076 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check 3595 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3077See \`config.log' for more details." >&5 3596$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3078echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check 3597as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3079See \`config.log' for more details." >&2;} 3598See \`config.log' for more details" "$LINENO" 5; }
3080 { (exit 1); exit 1; }; }
3081fi 3599fi
3082 3600
3083ac_ext=c 3601ac_ext=c
@@ -3087,45 +3605,40 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
3087ac_compiler_gnu=$ac_cv_c_compiler_gnu 3605ac_compiler_gnu=$ac_cv_c_compiler_gnu
3088 3606
3089 3607
3090{ echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 3608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
3091echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } 3609$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
3092if test "${ac_cv_path_GREP+set}" = set; then 3610if ${ac_cv_path_GREP+:} false; then :
3093 echo $ECHO_N "(cached) $ECHO_C" >&6 3611 $as_echo_n "(cached) " >&6
3094else
3095 # Extract the first word of "grep ggrep" to use in msg output
3096if test -z "$GREP"; then
3097set dummy grep ggrep; ac_prog_name=$2
3098if test "${ac_cv_path_GREP+set}" = set; then
3099 echo $ECHO_N "(cached) $ECHO_C" >&6
3100else 3612else
3613 if test -z "$GREP"; then
3101 ac_path_GREP_found=false 3614 ac_path_GREP_found=false
3102# Loop through the user's path and test for each of PROGNAME-LIST 3615 # Loop through the user's path and test for each of PROGNAME-LIST
3103as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3616 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3104for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 3617for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3105do 3618do
3106 IFS=$as_save_IFS 3619 IFS=$as_save_IFS
3107 test -z "$as_dir" && as_dir=. 3620 test -z "$as_dir" && as_dir=.
3108 for ac_prog in grep ggrep; do 3621 for ac_prog in grep ggrep; do
3109 for ac_exec_ext in '' $ac_executable_extensions; do 3622 for ac_exec_ext in '' $ac_executable_extensions; do
3110 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" 3623 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
3111 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue 3624 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
3112 # Check for GNU ac_path_GREP and select it if it is found. 3625# Check for GNU ac_path_GREP and select it if it is found.
3113 # Check for GNU $ac_path_GREP 3626 # Check for GNU $ac_path_GREP
3114case `"$ac_path_GREP" --version 2>&1` in 3627case `"$ac_path_GREP" --version 2>&1` in
3115*GNU*) 3628*GNU*)
3116 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; 3629 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
3117*) 3630*)
3118 ac_count=0 3631 ac_count=0
3119 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" 3632 $as_echo_n 0123456789 >"conftest.in"
3120 while : 3633 while :
3121 do 3634 do
3122 cat "conftest.in" "conftest.in" >"conftest.tmp" 3635 cat "conftest.in" "conftest.in" >"conftest.tmp"
3123 mv "conftest.tmp" "conftest.in" 3636 mv "conftest.tmp" "conftest.in"
3124 cp "conftest.in" "conftest.nl" 3637 cp "conftest.in" "conftest.nl"
3125 echo 'GREP' >> "conftest.nl" 3638 $as_echo 'GREP' >> "conftest.nl"
3126 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break 3639 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3127 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 3640 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3128 ac_count=`expr $ac_count + 1` 3641 as_fn_arith $ac_count + 1 && ac_count=$as_val
3129 if test $ac_count -gt ${ac_path_GREP_max-0}; then 3642 if test $ac_count -gt ${ac_path_GREP_max-0}; then
3130 # Best one so far, save it but keep looking for a better one 3643 # Best one so far, save it but keep looking for a better one
3131 ac_cv_path_GREP="$ac_path_GREP" 3644 ac_cv_path_GREP="$ac_path_GREP"
@@ -3137,77 +3650,61 @@ case `"$ac_path_GREP" --version 2>&1` in
3137 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 3650 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3138esac 3651esac
3139 3652
3140 3653 $ac_path_GREP_found && break 3
3141 $ac_path_GREP_found && break 3 3654 done
3655 done
3142 done 3656 done
3143done
3144
3145done
3146IFS=$as_save_IFS 3657IFS=$as_save_IFS
3147 3658 if test -z "$ac_cv_path_GREP"; then
3148 3659 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3149fi 3660 fi
3150
3151GREP="$ac_cv_path_GREP"
3152if test -z "$GREP"; then
3153 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3154echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3155 { (exit 1); exit 1; }; }
3156fi
3157
3158else 3661else
3159 ac_cv_path_GREP=$GREP 3662 ac_cv_path_GREP=$GREP
3160fi 3663fi
3161 3664
3162
3163fi 3665fi
3164{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 3666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
3165echo "${ECHO_T}$ac_cv_path_GREP" >&6; } 3667$as_echo "$ac_cv_path_GREP" >&6; }
3166 GREP="$ac_cv_path_GREP" 3668 GREP="$ac_cv_path_GREP"
3167 3669
3168 3670
3169{ echo "$as_me:$LINENO: checking for egrep" >&5 3671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
3170echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } 3672$as_echo_n "checking for egrep... " >&6; }
3171if test "${ac_cv_path_EGREP+set}" = set; then 3673if ${ac_cv_path_EGREP+:} false; then :
3172 echo $ECHO_N "(cached) $ECHO_C" >&6 3674 $as_echo_n "(cached) " >&6
3173else 3675else
3174 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 3676 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3175 then ac_cv_path_EGREP="$GREP -E" 3677 then ac_cv_path_EGREP="$GREP -E"
3176 else 3678 else
3177 # Extract the first word of "egrep" to use in msg output 3679 if test -z "$EGREP"; then
3178if test -z "$EGREP"; then
3179set dummy egrep; ac_prog_name=$2
3180if test "${ac_cv_path_EGREP+set}" = set; then
3181 echo $ECHO_N "(cached) $ECHO_C" >&6
3182else
3183 ac_path_EGREP_found=false 3680 ac_path_EGREP_found=false
3184# Loop through the user's path and test for each of PROGNAME-LIST 3681 # Loop through the user's path and test for each of PROGNAME-LIST
3185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3682 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3186for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 3683for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
3187do 3684do
3188 IFS=$as_save_IFS 3685 IFS=$as_save_IFS
3189 test -z "$as_dir" && as_dir=. 3686 test -z "$as_dir" && as_dir=.
3190 for ac_prog in egrep; do 3687 for ac_prog in egrep; do
3191 for ac_exec_ext in '' $ac_executable_extensions; do 3688 for ac_exec_ext in '' $ac_executable_extensions; do
3192 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 3689 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
3193 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue 3690 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
3194 # Check for GNU ac_path_EGREP and select it if it is found. 3691# Check for GNU ac_path_EGREP and select it if it is found.
3195 # Check for GNU $ac_path_EGREP 3692 # Check for GNU $ac_path_EGREP
3196case `"$ac_path_EGREP" --version 2>&1` in 3693case `"$ac_path_EGREP" --version 2>&1` in
3197*GNU*) 3694*GNU*)
3198 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; 3695 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
3199*) 3696*)
3200 ac_count=0 3697 ac_count=0
3201 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" 3698 $as_echo_n 0123456789 >"conftest.in"
3202 while : 3699 while :
3203 do 3700 do
3204 cat "conftest.in" "conftest.in" >"conftest.tmp" 3701 cat "conftest.in" "conftest.in" >"conftest.tmp"
3205 mv "conftest.tmp" "conftest.in" 3702 mv "conftest.tmp" "conftest.in"
3206 cp "conftest.in" "conftest.nl" 3703 cp "conftest.in" "conftest.nl"
3207 echo 'EGREP' >> "conftest.nl" 3704 $as_echo 'EGREP' >> "conftest.nl"
3208 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break 3705 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
3209 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 3706 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
3210 ac_count=`expr $ac_count + 1` 3707 as_fn_arith $ac_count + 1 && ac_count=$as_val
3211 if test $ac_count -gt ${ac_path_EGREP_max-0}; then 3708 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
3212 # Best one so far, save it but keep looking for a better one 3709 # Best one so far, save it but keep looking for a better one
3213 ac_cv_path_EGREP="$ac_path_EGREP" 3710 ac_cv_path_EGREP="$ac_path_EGREP"
@@ -3219,46 +3716,31 @@ case `"$ac_path_EGREP" --version 2>&1` in
3219 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 3716 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
3220esac 3717esac
3221 3718
3222 3719 $ac_path_EGREP_found && break 3
3223 $ac_path_EGREP_found && break 3 3720 done
3721 done
3224 done 3722 done
3225done
3226
3227done
3228IFS=$as_save_IFS 3723IFS=$as_save_IFS
3229 3724 if test -z "$ac_cv_path_EGREP"; then
3230 3725 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
3231fi 3726 fi
3232
3233EGREP="$ac_cv_path_EGREP"
3234if test -z "$EGREP"; then
3235 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
3236echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
3237 { (exit 1); exit 1; }; }
3238fi
3239
3240else 3727else
3241 ac_cv_path_EGREP=$EGREP 3728 ac_cv_path_EGREP=$EGREP
3242fi 3729fi
3243 3730
3244
3245 fi 3731 fi
3246fi 3732fi
3247{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 3733{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
3248echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } 3734$as_echo "$ac_cv_path_EGREP" >&6; }
3249 EGREP="$ac_cv_path_EGREP" 3735 EGREP="$ac_cv_path_EGREP"
3250 3736
3251 3737
3252{ echo "$as_me:$LINENO: checking for ANSI C header files" >&5 3738{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
3253echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } 3739$as_echo_n "checking for ANSI C header files... " >&6; }
3254if test "${ac_cv_header_stdc+set}" = set; then 3740if ${ac_cv_header_stdc+:} false; then :
3255 echo $ECHO_N "(cached) $ECHO_C" >&6 3741 $as_echo_n "(cached) " >&6
3256else 3742else
3257 cat >conftest.$ac_ext <<_ACEOF 3743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3258/* confdefs.h. */
3259_ACEOF
3260cat confdefs.h >>conftest.$ac_ext
3261cat >>conftest.$ac_ext <<_ACEOF
3262/* end confdefs.h. */ 3744/* end confdefs.h. */
3263#include <stdlib.h> 3745#include <stdlib.h>
3264#include <stdarg.h> 3746#include <stdarg.h>
@@ -3273,47 +3755,23 @@ main ()
3273 return 0; 3755 return 0;
3274} 3756}
3275_ACEOF 3757_ACEOF
3276rm -f conftest.$ac_objext 3758if ac_fn_c_try_compile "$LINENO"; then :
3277if { (ac_try="$ac_compile"
3278case "(($ac_try" in
3279 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3280 *) ac_try_echo=$ac_try;;
3281esac
3282eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3283 (eval "$ac_compile") 2>conftest.er1
3284 ac_status=$?
3285 grep -v '^ *+' conftest.er1 >conftest.err
3286 rm -f conftest.er1
3287 cat conftest.err >&5
3288 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3289 (exit $ac_status); } && {
3290 test -z "$ac_c_werror_flag" ||
3291 test ! -s conftest.err
3292 } && test -s conftest.$ac_objext; then
3293 ac_cv_header_stdc=yes 3759 ac_cv_header_stdc=yes
3294else 3760else
3295 echo "$as_me: failed program was:" >&5 3761 ac_cv_header_stdc=no
3296sed 's/^/| /' conftest.$ac_ext >&5
3297
3298 ac_cv_header_stdc=no
3299fi 3762fi
3300
3301rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3763rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3302 3764
3303if test $ac_cv_header_stdc = yes; then 3765if test $ac_cv_header_stdc = yes; then
3304 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 3766 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
3305 cat >conftest.$ac_ext <<_ACEOF 3767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3306/* confdefs.h. */
3307_ACEOF
3308cat confdefs.h >>conftest.$ac_ext
3309cat >>conftest.$ac_ext <<_ACEOF
3310/* end confdefs.h. */ 3768/* end confdefs.h. */
3311#include <string.h> 3769#include <string.h>
3312 3770
3313_ACEOF 3771_ACEOF
3314if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 3772if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3315 $EGREP "memchr" >/dev/null 2>&1; then 3773 $EGREP "memchr" >/dev/null 2>&1; then :
3316 : 3774
3317else 3775else
3318 ac_cv_header_stdc=no 3776 ac_cv_header_stdc=no
3319fi 3777fi
@@ -3323,18 +3781,14 @@ fi
3323 3781
3324if test $ac_cv_header_stdc = yes; then 3782if test $ac_cv_header_stdc = yes; then
3325 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 3783 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
3326 cat >conftest.$ac_ext <<_ACEOF 3784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3327/* confdefs.h. */
3328_ACEOF
3329cat confdefs.h >>conftest.$ac_ext
3330cat >>conftest.$ac_ext <<_ACEOF
3331/* end confdefs.h. */ 3785/* end confdefs.h. */
3332#include <stdlib.h> 3786#include <stdlib.h>
3333 3787
3334_ACEOF 3788_ACEOF
3335if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 3789if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
3336 $EGREP "free" >/dev/null 2>&1; then 3790 $EGREP "free" >/dev/null 2>&1; then :
3337 : 3791
3338else 3792else
3339 ac_cv_header_stdc=no 3793 ac_cv_header_stdc=no
3340fi 3794fi
@@ -3344,14 +3798,10 @@ fi
3344 3798
3345if test $ac_cv_header_stdc = yes; then 3799if test $ac_cv_header_stdc = yes; then
3346 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 3800 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
3347 if test "$cross_compiling" = yes; then 3801 if test "$cross_compiling" = yes; then :
3348 : 3802 :
3349else 3803else
3350 cat >conftest.$ac_ext <<_ACEOF 3804 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3351/* confdefs.h. */
3352_ACEOF
3353cat confdefs.h >>conftest.$ac_ext
3354cat >>conftest.$ac_ext <<_ACEOF
3355/* end confdefs.h. */ 3805/* end confdefs.h. */
3356#include <ctype.h> 3806#include <ctype.h>
3357#include <stdlib.h> 3807#include <stdlib.h>
@@ -3378,113 +3828,35 @@ main ()
3378 return 0; 3828 return 0;
3379} 3829}
3380_ACEOF 3830_ACEOF
3381rm -f conftest$ac_exeext 3831if ac_fn_c_try_run "$LINENO"; then :
3382if { (ac_try="$ac_link"
3383case "(($ac_try" in
3384 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3385 *) ac_try_echo=$ac_try;;
3386esac
3387eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3388 (eval "$ac_link") 2>&5
3389 ac_status=$?
3390 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3391 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3392 { (case "(($ac_try" in
3393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3394 *) ac_try_echo=$ac_try;;
3395esac
3396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3397 (eval "$ac_try") 2>&5
3398 ac_status=$?
3399 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3400 (exit $ac_status); }; }; then
3401 :
3402else
3403 echo "$as_me: program exited with status $ac_status" >&5
3404echo "$as_me: failed program was:" >&5
3405sed 's/^/| /' conftest.$ac_ext >&5
3406 3832
3407( exit $ac_status ) 3833else
3408ac_cv_header_stdc=no 3834 ac_cv_header_stdc=no
3409fi 3835fi
3410rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 3836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
3837 conftest.$ac_objext conftest.beam conftest.$ac_ext
3411fi 3838fi
3412 3839
3413
3414fi 3840fi
3415fi 3841fi
3416{ echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 3842{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
3417echo "${ECHO_T}$ac_cv_header_stdc" >&6; } 3843$as_echo "$ac_cv_header_stdc" >&6; }
3418if test $ac_cv_header_stdc = yes; then 3844if test $ac_cv_header_stdc = yes; then
3419 3845
3420cat >>confdefs.h <<\_ACEOF 3846$as_echo "#define STDC_HEADERS 1" >>confdefs.h
3421#define STDC_HEADERS 1
3422_ACEOF
3423 3847
3424fi 3848fi
3425 3849
3426# On IRIX 5.3, sys/types and inttypes.h are conflicting. 3850# On IRIX 5.3, sys/types and inttypes.h are conflicting.
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ 3851for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
3437 inttypes.h stdint.h unistd.h 3852 inttypes.h stdint.h unistd.h
3438do 3853do :
3439as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 3854 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
3440{ echo "$as_me:$LINENO: checking for $ac_header" >&5 3855ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
3441echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } 3856"
3442if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 3857if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
3443 echo $ECHO_N "(cached) $ECHO_C" >&6
3444else
3445 cat >conftest.$ac_ext <<_ACEOF
3446/* confdefs.h. */
3447_ACEOF
3448cat confdefs.h >>conftest.$ac_ext
3449cat >>conftest.$ac_ext <<_ACEOF
3450/* end confdefs.h. */
3451$ac_includes_default
3452
3453#include <$ac_header>
3454_ACEOF
3455rm -f conftest.$ac_objext
3456if { (ac_try="$ac_compile"
3457case "(($ac_try" in
3458 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3459 *) ac_try_echo=$ac_try;;
3460esac
3461eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3462 (eval "$ac_compile") 2>conftest.er1
3463 ac_status=$?
3464 grep -v '^ *+' conftest.er1 >conftest.err
3465 rm -f conftest.er1
3466 cat conftest.err >&5
3467 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3468 (exit $ac_status); } && {
3469 test -z "$ac_c_werror_flag" ||
3470 test ! -s conftest.err
3471 } && test -s conftest.$ac_objext; then
3472 eval "$as_ac_Header=yes"
3473else
3474 echo "$as_me: failed program was:" >&5
3475sed 's/^/| /' conftest.$ac_ext >&5
3476
3477 eval "$as_ac_Header=no"
3478fi
3479
3480rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3481fi
3482ac_res=`eval echo '${'$as_ac_Header'}'`
3483 { echo "$as_me:$LINENO: result: $ac_res" >&5
3484echo "${ECHO_T}$ac_res" >&6; }
3485if test `eval echo '${'$as_ac_Header'}'` = yes; then
3486 cat >>confdefs.h <<_ACEOF 3858 cat >>confdefs.h <<_ACEOF
3487#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 3859#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
3488_ACEOF 3860_ACEOF
3489 3861
3490fi 3862fi
@@ -3492,241 +3864,229 @@ fi
3492done 3864done
3493 3865
3494 3866
3495{ echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 3867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
3496echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6; } 3868$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
3497if test "${ac_cv_c_bigendian+set}" = set; then 3869if ${ac_cv_c_bigendian+:} false; then :
3498 echo $ECHO_N "(cached) $ECHO_C" >&6 3870 $as_echo_n "(cached) " >&6
3499else 3871else
3500 # See if sys/param.h defines the BYTE_ORDER macro. 3872 ac_cv_c_bigendian=unknown
3501cat >conftest.$ac_ext <<_ACEOF 3873 # See if we're dealing with a universal compiler.
3502/* confdefs.h. */ 3874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3503_ACEOF 3875/* end confdefs.h. */
3504cat confdefs.h >>conftest.$ac_ext 3876#ifndef __APPLE_CC__
3505cat >>conftest.$ac_ext <<_ACEOF 3877 not a universal capable compiler
3878 #endif
3879 typedef int dummy;
3880
3881_ACEOF
3882if ac_fn_c_try_compile "$LINENO"; then :
3883
3884 # Check for potential -arch flags. It is not universal unless
3885 # there are at least two -arch flags with different values.
3886 ac_arch=
3887 ac_prev=
3888 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
3889 if test -n "$ac_prev"; then
3890 case $ac_word in
3891 i?86 | x86_64 | ppc | ppc64)
3892 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
3893 ac_arch=$ac_word
3894 else
3895 ac_cv_c_bigendian=universal
3896 break
3897 fi
3898 ;;
3899 esac
3900 ac_prev=
3901 elif test "x$ac_word" = "x-arch"; then
3902 ac_prev=arch
3903 fi
3904 done
3905fi
3906rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3907 if test $ac_cv_c_bigendian = unknown; then
3908 # See if sys/param.h defines the BYTE_ORDER macro.
3909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3506/* end confdefs.h. */ 3910/* end confdefs.h. */
3507#include <sys/types.h> 3911#include <sys/types.h>
3508#include <sys/param.h> 3912 #include <sys/param.h>
3509 3913
3510int 3914int
3511main () 3915main ()
3512{ 3916{
3513#if ! (defined BYTE_ORDER && defined BIG_ENDIAN && defined LITTLE_ENDIAN \ 3917#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
3514 && BYTE_ORDER && BIG_ENDIAN && LITTLE_ENDIAN) 3918 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
3515 bogus endian macros 3919 && LITTLE_ENDIAN)
3516#endif 3920 bogus endian macros
3921 #endif
3517 3922
3518 ; 3923 ;
3519 return 0; 3924 return 0;
3520} 3925}
3521_ACEOF 3926_ACEOF
3522rm -f conftest.$ac_objext 3927if ac_fn_c_try_compile "$LINENO"; then :
3523if { (ac_try="$ac_compile"
3524case "(($ac_try" in
3525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3526 *) ac_try_echo=$ac_try;;
3527esac
3528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3529 (eval "$ac_compile") 2>conftest.er1
3530 ac_status=$?
3531 grep -v '^ *+' conftest.er1 >conftest.err
3532 rm -f conftest.er1
3533 cat conftest.err >&5
3534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3535 (exit $ac_status); } && {
3536 test -z "$ac_c_werror_flag" ||
3537 test ! -s conftest.err
3538 } && test -s conftest.$ac_objext; then
3539 # It does; now see whether it defined to BIG_ENDIAN or not. 3928 # It does; now see whether it defined to BIG_ENDIAN or not.
3540cat >conftest.$ac_ext <<_ACEOF 3929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3541/* confdefs.h. */
3542_ACEOF
3543cat confdefs.h >>conftest.$ac_ext
3544cat >>conftest.$ac_ext <<_ACEOF
3545/* end confdefs.h. */ 3930/* end confdefs.h. */
3546#include <sys/types.h> 3931#include <sys/types.h>
3547#include <sys/param.h> 3932 #include <sys/param.h>
3548 3933
3549int 3934int
3550main () 3935main ()
3551{ 3936{
3552#if BYTE_ORDER != BIG_ENDIAN 3937#if BYTE_ORDER != BIG_ENDIAN
3553 not big endian 3938 not big endian
3554#endif 3939 #endif
3555 3940
3556 ; 3941 ;
3557 return 0; 3942 return 0;
3558} 3943}
3559_ACEOF 3944_ACEOF
3560rm -f conftest.$ac_objext 3945if ac_fn_c_try_compile "$LINENO"; then :
3561if { (ac_try="$ac_compile"
3562case "(($ac_try" in
3563 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3564 *) ac_try_echo=$ac_try;;
3565esac
3566eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3567 (eval "$ac_compile") 2>conftest.er1
3568 ac_status=$?
3569 grep -v '^ *+' conftest.er1 >conftest.err
3570 rm -f conftest.er1
3571 cat conftest.err >&5
3572 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3573 (exit $ac_status); } && {
3574 test -z "$ac_c_werror_flag" ||
3575 test ! -s conftest.err
3576 } && test -s conftest.$ac_objext; then
3577 ac_cv_c_bigendian=yes 3946 ac_cv_c_bigendian=yes
3578else 3947else
3579 echo "$as_me: failed program was:" >&5 3948 ac_cv_c_bigendian=no
3580sed 's/^/| /' conftest.$ac_ext >&5
3581
3582 ac_cv_c_bigendian=no
3583fi 3949fi
3584
3585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3950rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3586else 3951fi
3587 echo "$as_me: failed program was:" >&5 3952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3588sed 's/^/| /' conftest.$ac_ext >&5 3953 fi
3954 if test $ac_cv_c_bigendian = unknown; then
3955 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
3956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3957/* end confdefs.h. */
3958#include <limits.h>
3589 3959
3590 # It does not; compile a test program. 3960int
3591if test "$cross_compiling" = yes; then 3961main ()
3592 # try to guess the endianness by grepping values into an object file 3962{
3593 ac_cv_c_bigendian=unknown 3963#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
3594 cat >conftest.$ac_ext <<_ACEOF 3964 bogus endian macros
3595/* confdefs.h. */ 3965 #endif
3966
3967 ;
3968 return 0;
3969}
3596_ACEOF 3970_ACEOF
3597cat confdefs.h >>conftest.$ac_ext 3971if ac_fn_c_try_compile "$LINENO"; then :
3598cat >>conftest.$ac_ext <<_ACEOF 3972 # It does; now see whether it defined to _BIG_ENDIAN or not.
3973 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3599/* end confdefs.h. */ 3974/* end confdefs.h. */
3600short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; 3975#include <limits.h>
3601short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; 3976
3602void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
3603short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
3604short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
3605void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
3606int 3977int
3607main () 3978main ()
3608{ 3979{
3609 _ascii (); _ebcdic (); 3980#ifndef _BIG_ENDIAN
3981 not big endian
3982 #endif
3983
3610 ; 3984 ;
3611 return 0; 3985 return 0;
3612} 3986}
3613_ACEOF 3987_ACEOF
3614rm -f conftest.$ac_objext 3988if ac_fn_c_try_compile "$LINENO"; then :
3615if { (ac_try="$ac_compile"
3616case "(($ac_try" in
3617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3618 *) ac_try_echo=$ac_try;;
3619esac
3620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3621 (eval "$ac_compile") 2>conftest.er1
3622 ac_status=$?
3623 grep -v '^ *+' conftest.er1 >conftest.err
3624 rm -f conftest.er1
3625 cat conftest.err >&5
3626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3627 (exit $ac_status); } && {
3628 test -z "$ac_c_werror_flag" ||
3629 test ! -s conftest.err
3630 } && test -s conftest.$ac_objext; then
3631 if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
3632 ac_cv_c_bigendian=yes 3989 ac_cv_c_bigendian=yes
3990else
3991 ac_cv_c_bigendian=no
3633fi 3992fi
3634if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then 3993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3635 if test "$ac_cv_c_bigendian" = unknown; then
3636 ac_cv_c_bigendian=no
3637 else
3638 # finding both strings is unlikely to happen, but who knows?
3639 ac_cv_c_bigendian=unknown
3640 fi
3641fi 3994fi
3642else 3995rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3643 echo "$as_me: failed program was:" >&5 3996 fi
3644sed 's/^/| /' conftest.$ac_ext >&5 3997 if test $ac_cv_c_bigendian = unknown; then
3645 3998 # Compile a test program.
3999 if test "$cross_compiling" = yes; then :
4000 # Try to guess by grepping values from an object file.
4001 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4002/* end confdefs.h. */
4003short int ascii_mm[] =
4004 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
4005 short int ascii_ii[] =
4006 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
4007 int use_ascii (int i) {
4008 return ascii_mm[i] + ascii_ii[i];
4009 }
4010 short int ebcdic_ii[] =
4011 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
4012 short int ebcdic_mm[] =
4013 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
4014 int use_ebcdic (int i) {
4015 return ebcdic_mm[i] + ebcdic_ii[i];
4016 }
4017 extern int foo;
3646 4018
4019int
4020main ()
4021{
4022return use_ascii (foo) == use_ebcdic (foo);
4023 ;
4024 return 0;
4025}
4026_ACEOF
4027if ac_fn_c_try_compile "$LINENO"; then :
4028 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
4029 ac_cv_c_bigendian=yes
4030 fi
4031 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
4032 if test "$ac_cv_c_bigendian" = unknown; then
4033 ac_cv_c_bigendian=no
4034 else
4035 # finding both strings is unlikely to happen, but who knows?
4036 ac_cv_c_bigendian=unknown
4037 fi
4038 fi
3647fi 4039fi
3648
3649rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 4040rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3650else 4041else
3651 cat >conftest.$ac_ext <<_ACEOF 4042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3652/* confdefs.h. */
3653_ACEOF
3654cat confdefs.h >>conftest.$ac_ext
3655cat >>conftest.$ac_ext <<_ACEOF
3656/* end confdefs.h. */ 4043/* end confdefs.h. */
3657$ac_includes_default 4044$ac_includes_default
3658int 4045int
3659main () 4046main ()
3660{ 4047{
3661 4048
3662 /* Are we little or big endian? From Harbison&Steele. */ 4049 /* Are we little or big endian? From Harbison&Steele. */
3663 union 4050 union
3664 { 4051 {
3665 long int l; 4052 long int l;
3666 char c[sizeof (long int)]; 4053 char c[sizeof (long int)];
3667 } u; 4054 } u;
3668 u.l = 1; 4055 u.l = 1;
3669 return u.c[sizeof (long int) - 1] == 1; 4056 return u.c[sizeof (long int) - 1] == 1;
3670 4057
3671 ; 4058 ;
3672 return 0; 4059 return 0;
3673} 4060}
3674_ACEOF 4061_ACEOF
3675rm -f conftest$ac_exeext 4062if ac_fn_c_try_run "$LINENO"; then :
3676if { (ac_try="$ac_link"
3677case "(($ac_try" in
3678 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3679 *) ac_try_echo=$ac_try;;
3680esac
3681eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3682 (eval "$ac_link") 2>&5
3683 ac_status=$?
3684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3685 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
3686 { (case "(($ac_try" in
3687 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3688 *) ac_try_echo=$ac_try;;
3689esac
3690eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3691 (eval "$ac_try") 2>&5
3692 ac_status=$?
3693 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3694 (exit $ac_status); }; }; then
3695 ac_cv_c_bigendian=no 4063 ac_cv_c_bigendian=no
3696else 4064else
3697 echo "$as_me: program exited with status $ac_status" >&5 4065 ac_cv_c_bigendian=yes
3698echo "$as_me: failed program was:" >&5
3699sed 's/^/| /' conftest.$ac_ext >&5
3700
3701( exit $ac_status )
3702ac_cv_c_bigendian=yes
3703fi 4066fi
3704rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 4067rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4068 conftest.$ac_objext conftest.beam conftest.$ac_ext
3705fi 4069fi
3706 4070
3707 4071 fi
3708fi 4072fi
4073{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
4074$as_echo "$ac_cv_c_bigendian" >&6; }
4075 case $ac_cv_c_bigendian in #(
4076 yes)
4077 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
4078;; #(
4079 no)
4080 ;; #(
4081 universal)
3709 4082
3710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 4083$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
3711fi
3712{ echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
3713echo "${ECHO_T}$ac_cv_c_bigendian" >&6; }
3714case $ac_cv_c_bigendian in
3715 yes)
3716 4084
3717cat >>confdefs.h <<\_ACEOF 4085 ;; #(
3718#define WORDS_BIGENDIAN 1 4086 *)
3719_ACEOF 4087 as_fn_error $? "unknown endianness
3720 ;; 4088 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
3721 no) 4089 esac
3722 ;;
3723 *)
3724 { { echo "$as_me:$LINENO: error: unknown endianness
3725presetting ac_cv_c_bigendian=no (or yes) will help" >&5
3726echo "$as_me: error: unknown endianness
3727presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
3728 { (exit 1); exit 1; }; } ;;
3729esac
3730 4090
3731 4091
3732# Checks for programs. 4092# Checks for programs.
@@ -3734,10 +4094,10 @@ for ac_prog in gawk mawk nawk awk
3734do 4094do
3735 # Extract the first word of "$ac_prog", so it can be a program name with args. 4095 # Extract the first word of "$ac_prog", so it can be a program name with args.
3736set dummy $ac_prog; ac_word=$2 4096set dummy $ac_prog; ac_word=$2
3737{ echo "$as_me:$LINENO: checking for $ac_word" >&5 4097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3738echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 4098$as_echo_n "checking for $ac_word... " >&6; }
3739if test "${ac_cv_prog_AWK+set}" = set; then 4099if ${ac_cv_prog_AWK+:} false; then :
3740 echo $ECHO_N "(cached) $ECHO_C" >&6 4100 $as_echo_n "(cached) " >&6
3741else 4101else
3742 if test -n "$AWK"; then 4102 if test -n "$AWK"; then
3743 ac_cv_prog_AWK="$AWK" # Let the user override the test. 4103 ac_cv_prog_AWK="$AWK" # Let the user override the test.
@@ -3747,25 +4107,25 @@ for as_dir in $PATH
3747do 4107do
3748 IFS=$as_save_IFS 4108 IFS=$as_save_IFS
3749 test -z "$as_dir" && as_dir=. 4109 test -z "$as_dir" && as_dir=.
3750 for ac_exec_ext in '' $ac_executable_extensions; do 4110 for ac_exec_ext in '' $ac_executable_extensions; do
3751 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4111 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3752 ac_cv_prog_AWK="$ac_prog" 4112 ac_cv_prog_AWK="$ac_prog"
3753 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4113 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3754 break 2 4114 break 2
3755 fi 4115 fi
3756done 4116done
3757done 4117 done
3758IFS=$as_save_IFS 4118IFS=$as_save_IFS
3759 4119
3760fi 4120fi
3761fi 4121fi
3762AWK=$ac_cv_prog_AWK 4122AWK=$ac_cv_prog_AWK
3763if test -n "$AWK"; then 4123if test -n "$AWK"; then
3764 { echo "$as_me:$LINENO: result: $AWK" >&5 4124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3765echo "${ECHO_T}$AWK" >&6; } 4125$as_echo "$AWK" >&6; }
3766else 4126else
3767 { echo "$as_me:$LINENO: result: no" >&5 4127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3768echo "${ECHO_T}no" >&6; } 4128$as_echo "no" >&6; }
3769fi 4129fi
3770 4130
3771 4131
@@ -3777,15 +4137,15 @@ ac_cpp='$CPP $CPPFLAGS'
3777ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 4137ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3778ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 4138ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3779ac_compiler_gnu=$ac_cv_c_compiler_gnu 4139ac_compiler_gnu=$ac_cv_c_compiler_gnu
3780{ echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 4140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
3781echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } 4141$as_echo_n "checking how to run the C preprocessor... " >&6; }
3782# On Suns, sometimes $CPP names a directory. 4142# On Suns, sometimes $CPP names a directory.
3783if test -n "$CPP" && test -d "$CPP"; then 4143if test -n "$CPP" && test -d "$CPP"; then
3784 CPP= 4144 CPP=
3785fi 4145fi
3786if test -z "$CPP"; then 4146if test -z "$CPP"; then
3787 if test "${ac_cv_prog_CPP+set}" = set; then 4147 if ${ac_cv_prog_CPP+:} false; then :
3788 echo $ECHO_N "(cached) $ECHO_C" >&6 4148 $as_echo_n "(cached) " >&6
3789else 4149else
3790 # Double quotes because CPP needs to be expanded 4150 # Double quotes because CPP needs to be expanded
3791 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" 4151 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
@@ -3799,11 +4159,7 @@ do
3799 # <limits.h> exists even on freestanding compilers. 4159 # <limits.h> exists even on freestanding compilers.
3800 # On the NeXT, cc -E runs the code through the compiler's parser, 4160 # On the NeXT, cc -E runs the code through the compiler's parser,
3801 # not just through cpp. "Syntax error" is here to catch this case. 4161 # not just through cpp. "Syntax error" is here to catch this case.
3802 cat >conftest.$ac_ext <<_ACEOF 4162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3803/* confdefs.h. */
3804_ACEOF
3805cat confdefs.h >>conftest.$ac_ext
3806cat >>conftest.$ac_ext <<_ACEOF
3807/* end confdefs.h. */ 4163/* end confdefs.h. */
3808#ifdef __STDC__ 4164#ifdef __STDC__
3809# include <limits.h> 4165# include <limits.h>
@@ -3812,76 +4168,34 @@ cat >>conftest.$ac_ext <<_ACEOF
3812#endif 4168#endif
3813 Syntax error 4169 Syntax error
3814_ACEOF 4170_ACEOF
3815if { (ac_try="$ac_cpp conftest.$ac_ext" 4171if ac_fn_c_try_cpp "$LINENO"; then :
3816case "(($ac_try" in
3817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3818 *) ac_try_echo=$ac_try;;
3819esac
3820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3821 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3822 ac_status=$?
3823 grep -v '^ *+' conftest.er1 >conftest.err
3824 rm -f conftest.er1
3825 cat conftest.err >&5
3826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3827 (exit $ac_status); } >/dev/null && {
3828 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3829 test ! -s conftest.err
3830 }; then
3831 :
3832else
3833 echo "$as_me: failed program was:" >&5
3834sed 's/^/| /' conftest.$ac_ext >&5
3835 4172
4173else
3836 # Broken: fails on valid input. 4174 # Broken: fails on valid input.
3837continue 4175continue
3838fi 4176fi
3839 4177rm -f conftest.err conftest.i conftest.$ac_ext
3840rm -f conftest.err conftest.$ac_ext
3841 4178
3842 # OK, works on sane cases. Now check whether nonexistent headers 4179 # OK, works on sane cases. Now check whether nonexistent headers
3843 # can be detected and how. 4180 # can be detected and how.
3844 cat >conftest.$ac_ext <<_ACEOF 4181 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3845/* confdefs.h. */
3846_ACEOF
3847cat confdefs.h >>conftest.$ac_ext
3848cat >>conftest.$ac_ext <<_ACEOF
3849/* end confdefs.h. */ 4182/* end confdefs.h. */
3850#include <ac_nonexistent.h> 4183#include <ac_nonexistent.h>
3851_ACEOF 4184_ACEOF
3852if { (ac_try="$ac_cpp conftest.$ac_ext" 4185if ac_fn_c_try_cpp "$LINENO"; then :
3853case "(($ac_try" in
3854 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3855 *) ac_try_echo=$ac_try;;
3856esac
3857eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3858 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3859 ac_status=$?
3860 grep -v '^ *+' conftest.er1 >conftest.err
3861 rm -f conftest.er1
3862 cat conftest.err >&5
3863 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3864 (exit $ac_status); } >/dev/null && {
3865 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3866 test ! -s conftest.err
3867 }; then
3868 # Broken: success on invalid input. 4186 # Broken: success on invalid input.
3869continue 4187continue
3870else 4188else
3871 echo "$as_me: failed program was:" >&5
3872sed 's/^/| /' conftest.$ac_ext >&5
3873
3874 # Passes both tests. 4189 # Passes both tests.
3875ac_preproc_ok=: 4190ac_preproc_ok=:
3876break 4191break
3877fi 4192fi
3878 4193rm -f conftest.err conftest.i conftest.$ac_ext
3879rm -f conftest.err conftest.$ac_ext
3880 4194
3881done 4195done
3882# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 4196# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3883rm -f conftest.err conftest.$ac_ext 4197rm -f conftest.i conftest.err conftest.$ac_ext
3884if $ac_preproc_ok; then 4198if $ac_preproc_ok; then :
3885 break 4199 break
3886fi 4200fi
3887 4201
@@ -3893,8 +4207,8 @@ fi
3893else 4207else
3894 ac_cv_prog_CPP=$CPP 4208 ac_cv_prog_CPP=$CPP
3895fi 4209fi
3896{ echo "$as_me:$LINENO: result: $CPP" >&5 4210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
3897echo "${ECHO_T}$CPP" >&6; } 4211$as_echo "$CPP" >&6; }
3898ac_preproc_ok=false 4212ac_preproc_ok=false
3899for ac_c_preproc_warn_flag in '' yes 4213for ac_c_preproc_warn_flag in '' yes
3900do 4214do
@@ -3904,11 +4218,7 @@ do
3904 # <limits.h> exists even on freestanding compilers. 4218 # <limits.h> exists even on freestanding compilers.
3905 # On the NeXT, cc -E runs the code through the compiler's parser, 4219 # On the NeXT, cc -E runs the code through the compiler's parser,
3906 # not just through cpp. "Syntax error" is here to catch this case. 4220 # not just through cpp. "Syntax error" is here to catch this case.
3907 cat >conftest.$ac_ext <<_ACEOF 4221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3908/* confdefs.h. */
3909_ACEOF
3910cat confdefs.h >>conftest.$ac_ext
3911cat >>conftest.$ac_ext <<_ACEOF
3912/* end confdefs.h. */ 4222/* end confdefs.h. */
3913#ifdef __STDC__ 4223#ifdef __STDC__
3914# include <limits.h> 4224# include <limits.h>
@@ -3917,83 +4227,40 @@ cat >>conftest.$ac_ext <<_ACEOF
3917#endif 4227#endif
3918 Syntax error 4228 Syntax error
3919_ACEOF 4229_ACEOF
3920if { (ac_try="$ac_cpp conftest.$ac_ext" 4230if ac_fn_c_try_cpp "$LINENO"; then :
3921case "(($ac_try" in
3922 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3923 *) ac_try_echo=$ac_try;;
3924esac
3925eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3926 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3927 ac_status=$?
3928 grep -v '^ *+' conftest.er1 >conftest.err
3929 rm -f conftest.er1
3930 cat conftest.err >&5
3931 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3932 (exit $ac_status); } >/dev/null && {
3933 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3934 test ! -s conftest.err
3935 }; then
3936 :
3937else
3938 echo "$as_me: failed program was:" >&5
3939sed 's/^/| /' conftest.$ac_ext >&5
3940 4231
4232else
3941 # Broken: fails on valid input. 4233 # Broken: fails on valid input.
3942continue 4234continue
3943fi 4235fi
3944 4236rm -f conftest.err conftest.i conftest.$ac_ext
3945rm -f conftest.err conftest.$ac_ext
3946 4237
3947 # OK, works on sane cases. Now check whether nonexistent headers 4238 # OK, works on sane cases. Now check whether nonexistent headers
3948 # can be detected and how. 4239 # can be detected and how.
3949 cat >conftest.$ac_ext <<_ACEOF 4240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3950/* confdefs.h. */
3951_ACEOF
3952cat confdefs.h >>conftest.$ac_ext
3953cat >>conftest.$ac_ext <<_ACEOF
3954/* end confdefs.h. */ 4241/* end confdefs.h. */
3955#include <ac_nonexistent.h> 4242#include <ac_nonexistent.h>
3956_ACEOF 4243_ACEOF
3957if { (ac_try="$ac_cpp conftest.$ac_ext" 4244if ac_fn_c_try_cpp "$LINENO"; then :
3958case "(($ac_try" in
3959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3960 *) ac_try_echo=$ac_try;;
3961esac
3962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
3963 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
3964 ac_status=$?
3965 grep -v '^ *+' conftest.er1 >conftest.err
3966 rm -f conftest.er1
3967 cat conftest.err >&5
3968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
3969 (exit $ac_status); } >/dev/null && {
3970 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
3971 test ! -s conftest.err
3972 }; then
3973 # Broken: success on invalid input. 4245 # Broken: success on invalid input.
3974continue 4246continue
3975else 4247else
3976 echo "$as_me: failed program was:" >&5
3977sed 's/^/| /' conftest.$ac_ext >&5
3978
3979 # Passes both tests. 4248 # Passes both tests.
3980ac_preproc_ok=: 4249ac_preproc_ok=:
3981break 4250break
3982fi 4251fi
3983 4252rm -f conftest.err conftest.i conftest.$ac_ext
3984rm -f conftest.err conftest.$ac_ext
3985 4253
3986done 4254done
3987# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 4255# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
3988rm -f conftest.err conftest.$ac_ext 4256rm -f conftest.i conftest.err conftest.$ac_ext
3989if $ac_preproc_ok; then 4257if $ac_preproc_ok; then :
3990 : 4258
3991else 4259else
3992 { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check 4260 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3993See \`config.log' for more details." >&5 4261$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3994echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check 4262as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
3995See \`config.log' for more details." >&2;} 4263See \`config.log' for more details" "$LINENO" 5; }
3996 { (exit 1); exit 1; }; }
3997fi 4264fi
3998 4265
3999ac_ext=c 4266ac_ext=c
@@ -4005,10 +4272,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
4005if test -n "$ac_tool_prefix"; then 4272if test -n "$ac_tool_prefix"; then
4006 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 4273 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
4007set dummy ${ac_tool_prefix}ranlib; ac_word=$2 4274set dummy ${ac_tool_prefix}ranlib; ac_word=$2
4008{ echo "$as_me:$LINENO: checking for $ac_word" >&5 4275{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4009echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 4276$as_echo_n "checking for $ac_word... " >&6; }
4010if test "${ac_cv_prog_RANLIB+set}" = set; then 4277if ${ac_cv_prog_RANLIB+:} false; then :
4011 echo $ECHO_N "(cached) $ECHO_C" >&6 4278 $as_echo_n "(cached) " >&6
4012else 4279else
4013 if test -n "$RANLIB"; then 4280 if test -n "$RANLIB"; then
4014 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 4281 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
@@ -4018,25 +4285,25 @@ for as_dir in $PATH
4018do 4285do
4019 IFS=$as_save_IFS 4286 IFS=$as_save_IFS
4020 test -z "$as_dir" && as_dir=. 4287 test -z "$as_dir" && as_dir=.
4021 for ac_exec_ext in '' $ac_executable_extensions; do 4288 for ac_exec_ext in '' $ac_executable_extensions; do
4022 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4289 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4023 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 4290 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
4024 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4291 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4025 break 2 4292 break 2
4026 fi 4293 fi
4027done 4294done
4028done 4295 done
4029IFS=$as_save_IFS 4296IFS=$as_save_IFS
4030 4297
4031fi 4298fi
4032fi 4299fi
4033RANLIB=$ac_cv_prog_RANLIB 4300RANLIB=$ac_cv_prog_RANLIB
4034if test -n "$RANLIB"; then 4301if test -n "$RANLIB"; then
4035 { echo "$as_me:$LINENO: result: $RANLIB" >&5 4302 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
4036echo "${ECHO_T}$RANLIB" >&6; } 4303$as_echo "$RANLIB" >&6; }
4037else 4304else
4038 { echo "$as_me:$LINENO: result: no" >&5 4305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4039echo "${ECHO_T}no" >&6; } 4306$as_echo "no" >&6; }
4040fi 4307fi
4041 4308
4042 4309
@@ -4045,10 +4312,10 @@ if test -z "$ac_cv_prog_RANLIB"; then
4045 ac_ct_RANLIB=$RANLIB 4312 ac_ct_RANLIB=$RANLIB
4046 # Extract the first word of "ranlib", so it can be a program name with args. 4313 # Extract the first word of "ranlib", so it can be a program name with args.
4047set dummy ranlib; ac_word=$2 4314set dummy ranlib; ac_word=$2
4048{ echo "$as_me:$LINENO: checking for $ac_word" >&5 4315{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4049echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 4316$as_echo_n "checking for $ac_word... " >&6; }
4050if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then 4317if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
4051 echo $ECHO_N "(cached) $ECHO_C" >&6 4318 $as_echo_n "(cached) " >&6
4052else 4319else
4053 if test -n "$ac_ct_RANLIB"; then 4320 if test -n "$ac_ct_RANLIB"; then
4054 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. 4321 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
@@ -4058,25 +4325,25 @@ for as_dir in $PATH
4058do 4325do
4059 IFS=$as_save_IFS 4326 IFS=$as_save_IFS
4060 test -z "$as_dir" && as_dir=. 4327 test -z "$as_dir" && as_dir=.
4061 for ac_exec_ext in '' $ac_executable_extensions; do 4328 for ac_exec_ext in '' $ac_executable_extensions; do
4062 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4329 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4063 ac_cv_prog_ac_ct_RANLIB="ranlib" 4330 ac_cv_prog_ac_ct_RANLIB="ranlib"
4064 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4331 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4065 break 2 4332 break 2
4066 fi 4333 fi
4067done 4334done
4068done 4335 done
4069IFS=$as_save_IFS 4336IFS=$as_save_IFS
4070 4337
4071fi 4338fi
4072fi 4339fi
4073ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB 4340ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
4074if test -n "$ac_ct_RANLIB"; then 4341if test -n "$ac_ct_RANLIB"; then
4075 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 4342 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
4076echo "${ECHO_T}$ac_ct_RANLIB" >&6; } 4343$as_echo "$ac_ct_RANLIB" >&6; }
4077else 4344else
4078 { echo "$as_me:$LINENO: result: no" >&5 4345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4079echo "${ECHO_T}no" >&6; } 4346$as_echo "no" >&6; }
4080fi 4347fi
4081 4348
4082 if test "x$ac_ct_RANLIB" = x; then 4349 if test "x$ac_ct_RANLIB" = x; then
@@ -4084,12 +4351,8 @@ fi
4084 else 4351 else
4085 case $cross_compiling:$ac_tool_warned in 4352 case $cross_compiling:$ac_tool_warned in
4086yes:) 4353yes:)
4087{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools 4354{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4088whose name does not start with the host triplet. If you think this 4355$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4089configuration is useful to you, please write to autoconf@gnu.org." >&5
4090echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools
4091whose name does not start with the host triplet. If you think this
4092configuration is useful to you, please write to autoconf@gnu.org." >&2;}
4093ac_tool_warned=yes ;; 4356ac_tool_warned=yes ;;
4094esac 4357esac
4095 RANLIB=$ac_ct_RANLIB 4358 RANLIB=$ac_ct_RANLIB
@@ -4111,22 +4374,23 @@ fi
4111# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" 4374# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
4112# OS/2's system install, which has a completely different semantic 4375# OS/2's system install, which has a completely different semantic
4113# ./install, which can be erroneously created by make from ./install.sh. 4376# ./install, which can be erroneously created by make from ./install.sh.
4114{ echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 4377# Reject install programs that cannot install multiple files.
4115echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } 4378{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
4379$as_echo_n "checking for a BSD-compatible install... " >&6; }
4116if test -z "$INSTALL"; then 4380if test -z "$INSTALL"; then
4117if test "${ac_cv_path_install+set}" = set; then 4381if ${ac_cv_path_install+:} false; then :
4118 echo $ECHO_N "(cached) $ECHO_C" >&6 4382 $as_echo_n "(cached) " >&6
4119else 4383else
4120 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4384 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4121for as_dir in $PATH 4385for as_dir in $PATH
4122do 4386do
4123 IFS=$as_save_IFS 4387 IFS=$as_save_IFS
4124 test -z "$as_dir" && as_dir=. 4388 test -z "$as_dir" && as_dir=.
4125 # Account for people who put trailing slashes in PATH elements. 4389 # Account for people who put trailing slashes in PATH elements.
4126case $as_dir/ in 4390case $as_dir/ in #((
4127 ./ | .// | /cC/* | \ 4391 ./ | .// | /[cC]/* | \
4128 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ 4392 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
4129 ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ 4393 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
4130 /usr/ucb/* ) ;; 4394 /usr/ucb/* ) ;;
4131 *) 4395 *)
4132 # OSF1 and SCO ODT 3.0 have their own names for install. 4396 # OSF1 and SCO ODT 3.0 have their own names for install.
@@ -4144,17 +4408,29 @@ case $as_dir/ in
4144 # program-specific install script used by HP pwplus--don't use. 4408 # program-specific install script used by HP pwplus--don't use.
4145 : 4409 :
4146 else 4410 else
4147 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" 4411 rm -rf conftest.one conftest.two conftest.dir
4148 break 3 4412 echo one > conftest.one
4413 echo two > conftest.two
4414 mkdir conftest.dir
4415 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
4416 test -s conftest.one && test -s conftest.two &&
4417 test -s conftest.dir/conftest.one &&
4418 test -s conftest.dir/conftest.two
4419 then
4420 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
4421 break 3
4422 fi
4149 fi 4423 fi
4150 fi 4424 fi
4151 done 4425 done
4152 done 4426 done
4153 ;; 4427 ;;
4154esac 4428esac
4155done 4429
4430 done
4156IFS=$as_save_IFS 4431IFS=$as_save_IFS
4157 4432
4433rm -rf conftest.one conftest.two conftest.dir
4158 4434
4159fi 4435fi
4160 if test "${ac_cv_path_install+set}" = set; then 4436 if test "${ac_cv_path_install+set}" = set; then
@@ -4167,8 +4443,8 @@ fi
4167 INSTALL=$ac_install_sh 4443 INSTALL=$ac_install_sh
4168 fi 4444 fi
4169fi 4445fi
4170{ echo "$as_me:$LINENO: result: $INSTALL" >&5 4446{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
4171echo "${ECHO_T}$INSTALL" >&6; } 4447$as_echo "$INSTALL" >&6; }
4172 4448
4173# Use test -z because SunOS4 sh mishandles braces in ${var-val}. 4449# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
4174# It thinks the first close brace ends the variable substitution. 4450# It thinks the first close brace ends the variable substitution.
@@ -4178,48 +4454,43 @@ test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
4178 4454
4179test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 4455test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
4180 4456
4181{ echo "$as_me:$LINENO: checking for egrep" >&5 4457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4182echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } 4458$as_echo_n "checking for egrep... " >&6; }
4183if test "${ac_cv_path_EGREP+set}" = set; then 4459if ${ac_cv_path_EGREP+:} false; then :
4184 echo $ECHO_N "(cached) $ECHO_C" >&6 4460 $as_echo_n "(cached) " >&6
4185else 4461else
4186 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 4462 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4187 then ac_cv_path_EGREP="$GREP -E" 4463 then ac_cv_path_EGREP="$GREP -E"
4188 else 4464 else
4189 # Extract the first word of "egrep" to use in msg output 4465 if test -z "$EGREP"; then
4190if test -z "$EGREP"; then
4191set dummy egrep; ac_prog_name=$2
4192if test "${ac_cv_path_EGREP+set}" = set; then
4193 echo $ECHO_N "(cached) $ECHO_C" >&6
4194else
4195 ac_path_EGREP_found=false 4466 ac_path_EGREP_found=false
4196# Loop through the user's path and test for each of PROGNAME-LIST 4467 # Loop through the user's path and test for each of PROGNAME-LIST
4197as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4468 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4198for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 4469for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4199do 4470do
4200 IFS=$as_save_IFS 4471 IFS=$as_save_IFS
4201 test -z "$as_dir" && as_dir=. 4472 test -z "$as_dir" && as_dir=.
4202 for ac_prog in egrep; do 4473 for ac_prog in egrep; do
4203 for ac_exec_ext in '' $ac_executable_extensions; do 4474 for ac_exec_ext in '' $ac_executable_extensions; do
4204 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 4475 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4205 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue 4476 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
4206 # Check for GNU ac_path_EGREP and select it if it is found. 4477# Check for GNU ac_path_EGREP and select it if it is found.
4207 # Check for GNU $ac_path_EGREP 4478 # Check for GNU $ac_path_EGREP
4208case `"$ac_path_EGREP" --version 2>&1` in 4479case `"$ac_path_EGREP" --version 2>&1` in
4209*GNU*) 4480*GNU*)
4210 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; 4481 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4211*) 4482*)
4212 ac_count=0 4483 ac_count=0
4213 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" 4484 $as_echo_n 0123456789 >"conftest.in"
4214 while : 4485 while :
4215 do 4486 do
4216 cat "conftest.in" "conftest.in" >"conftest.tmp" 4487 cat "conftest.in" "conftest.in" >"conftest.tmp"
4217 mv "conftest.tmp" "conftest.in" 4488 mv "conftest.tmp" "conftest.in"
4218 cp "conftest.in" "conftest.nl" 4489 cp "conftest.in" "conftest.nl"
4219 echo 'EGREP' >> "conftest.nl" 4490 $as_echo 'EGREP' >> "conftest.nl"
4220 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break 4491 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4221 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 4492 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4222 ac_count=`expr $ac_count + 1` 4493 as_fn_arith $ac_count + 1 && ac_count=$as_val
4223 if test $ac_count -gt ${ac_path_EGREP_max-0}; then 4494 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4224 # Best one so far, save it but keep looking for a better one 4495 # Best one so far, save it but keep looking for a better one
4225 ac_cv_path_EGREP="$ac_path_EGREP" 4496 ac_cv_path_EGREP="$ac_path_EGREP"
@@ -4231,42 +4502,31 @@ case `"$ac_path_EGREP" --version 2>&1` in
4231 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 4502 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4232esac 4503esac
4233 4504
4234 4505 $ac_path_EGREP_found && break 3
4235 $ac_path_EGREP_found && break 3 4506 done
4507 done
4236 done 4508 done
4237done
4238
4239done
4240IFS=$as_save_IFS 4509IFS=$as_save_IFS
4241 4510 if test -z "$ac_cv_path_EGREP"; then
4242 4511 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4243fi 4512 fi
4244
4245EGREP="$ac_cv_path_EGREP"
4246if test -z "$EGREP"; then
4247 { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
4248echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
4249 { (exit 1); exit 1; }; }
4250fi
4251
4252else 4513else
4253 ac_cv_path_EGREP=$EGREP 4514 ac_cv_path_EGREP=$EGREP
4254fi 4515fi
4255 4516
4256
4257 fi 4517 fi
4258fi 4518fi
4259{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 4519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4260echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } 4520$as_echo "$ac_cv_path_EGREP" >&6; }
4261 EGREP="$ac_cv_path_EGREP" 4521 EGREP="$ac_cv_path_EGREP"
4262 4522
4263 4523
4264# Extract the first word of "ar", so it can be a program name with args. 4524# Extract the first word of "ar", so it can be a program name with args.
4265set dummy ar; ac_word=$2 4525set dummy ar; ac_word=$2
4266{ echo "$as_me:$LINENO: checking for $ac_word" >&5 4526{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4267echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 4527$as_echo_n "checking for $ac_word... " >&6; }
4268if test "${ac_cv_path_AR+set}" = set; then 4528if ${ac_cv_path_AR+:} false; then :
4269 echo $ECHO_N "(cached) $ECHO_C" >&6 4529 $as_echo_n "(cached) " >&6
4270else 4530else
4271 case $AR in 4531 case $AR in
4272 [\\/]* | ?:[\\/]*) 4532 [\\/]* | ?:[\\/]*)
@@ -4278,14 +4538,14 @@ for as_dir in $PATH
4278do 4538do
4279 IFS=$as_save_IFS 4539 IFS=$as_save_IFS
4280 test -z "$as_dir" && as_dir=. 4540 test -z "$as_dir" && as_dir=.
4281 for ac_exec_ext in '' $ac_executable_extensions; do 4541 for ac_exec_ext in '' $ac_executable_extensions; do
4282 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4542 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4283 ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" 4543 ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
4284 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4544 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4285 break 2 4545 break 2
4286 fi 4546 fi
4287done 4547done
4288done 4548 done
4289IFS=$as_save_IFS 4549IFS=$as_save_IFS
4290 4550
4291 ;; 4551 ;;
@@ -4293,20 +4553,20 @@ esac
4293fi 4553fi
4294AR=$ac_cv_path_AR 4554AR=$ac_cv_path_AR
4295if test -n "$AR"; then 4555if test -n "$AR"; then
4296 { echo "$as_me:$LINENO: result: $AR" >&5 4556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
4297echo "${ECHO_T}$AR" >&6; } 4557$as_echo "$AR" >&6; }
4298else 4558else
4299 { echo "$as_me:$LINENO: result: no" >&5 4559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4300echo "${ECHO_T}no" >&6; } 4560$as_echo "no" >&6; }
4301fi 4561fi
4302 4562
4303 4563
4304# Extract the first word of "cat", so it can be a program name with args. 4564# Extract the first word of "cat", so it can be a program name with args.
4305set dummy cat; ac_word=$2 4565set dummy cat; ac_word=$2
4306{ echo "$as_me:$LINENO: checking for $ac_word" >&5 4566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4307echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 4567$as_echo_n "checking for $ac_word... " >&6; }
4308if test "${ac_cv_path_CAT+set}" = set; then 4568if ${ac_cv_path_CAT+:} false; then :
4309 echo $ECHO_N "(cached) $ECHO_C" >&6 4569 $as_echo_n "(cached) " >&6
4310else 4570else
4311 case $CAT in 4571 case $CAT in
4312 [\\/]* | ?:[\\/]*) 4572 [\\/]* | ?:[\\/]*)
@@ -4318,14 +4578,14 @@ for as_dir in $PATH
4318do 4578do
4319 IFS=$as_save_IFS 4579 IFS=$as_save_IFS
4320 test -z "$as_dir" && as_dir=. 4580 test -z "$as_dir" && as_dir=.
4321 for ac_exec_ext in '' $ac_executable_extensions; do 4581 for ac_exec_ext in '' $ac_executable_extensions; do
4322 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4582 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4323 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext" 4583 ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
4324 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4584 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4325 break 2 4585 break 2
4326 fi 4586 fi
4327done 4587done
4328done 4588 done
4329IFS=$as_save_IFS 4589IFS=$as_save_IFS
4330 4590
4331 ;; 4591 ;;
@@ -4333,20 +4593,20 @@ esac
4333fi 4593fi
4334CAT=$ac_cv_path_CAT 4594CAT=$ac_cv_path_CAT
4335if test -n "$CAT"; then 4595if test -n "$CAT"; then
4336 { echo "$as_me:$LINENO: result: $CAT" >&5 4596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
4337echo "${ECHO_T}$CAT" >&6; } 4597$as_echo "$CAT" >&6; }
4338else 4598else
4339 { echo "$as_me:$LINENO: result: no" >&5 4599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4340echo "${ECHO_T}no" >&6; } 4600$as_echo "no" >&6; }
4341fi 4601fi
4342 4602
4343 4603
4344# Extract the first word of "kill", so it can be a program name with args. 4604# Extract the first word of "kill", so it can be a program name with args.
4345set dummy kill; ac_word=$2 4605set dummy kill; ac_word=$2
4346{ echo "$as_me:$LINENO: checking for $ac_word" >&5 4606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4347echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 4607$as_echo_n "checking for $ac_word... " >&6; }
4348if test "${ac_cv_path_KILL+set}" = set; then 4608if ${ac_cv_path_KILL+:} false; then :
4349 echo $ECHO_N "(cached) $ECHO_C" >&6 4609 $as_echo_n "(cached) " >&6
4350else 4610else
4351 case $KILL in 4611 case $KILL in
4352 [\\/]* | ?:[\\/]*) 4612 [\\/]* | ?:[\\/]*)
@@ -4358,14 +4618,14 @@ for as_dir in $PATH
4358do 4618do
4359 IFS=$as_save_IFS 4619 IFS=$as_save_IFS
4360 test -z "$as_dir" && as_dir=. 4620 test -z "$as_dir" && as_dir=.
4361 for ac_exec_ext in '' $ac_executable_extensions; do 4621 for ac_exec_ext in '' $ac_executable_extensions; do
4362 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4622 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4363 ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext" 4623 ac_cv_path_KILL="$as_dir/$ac_word$ac_exec_ext"
4364 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4624 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4365 break 2 4625 break 2
4366 fi 4626 fi
4367done 4627done
4368done 4628 done
4369IFS=$as_save_IFS 4629IFS=$as_save_IFS
4370 4630
4371 ;; 4631 ;;
@@ -4373,11 +4633,11 @@ esac
4373fi 4633fi
4374KILL=$ac_cv_path_KILL 4634KILL=$ac_cv_path_KILL
4375if test -n "$KILL"; then 4635if test -n "$KILL"; then
4376 { echo "$as_me:$LINENO: result: $KILL" >&5 4636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KILL" >&5
4377echo "${ECHO_T}$KILL" >&6; } 4637$as_echo "$KILL" >&6; }
4378else 4638else
4379 { echo "$as_me:$LINENO: result: no" >&5 4639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4380echo "${ECHO_T}no" >&6; } 4640$as_echo "no" >&6; }
4381fi 4641fi
4382 4642
4383 4643
@@ -4385,10 +4645,10 @@ for ac_prog in perl5 perl
4385do 4645do
4386 # Extract the first word of "$ac_prog", so it can be a program name with args. 4646 # Extract the first word of "$ac_prog", so it can be a program name with args.
4387set dummy $ac_prog; ac_word=$2 4647set dummy $ac_prog; ac_word=$2
4388{ echo "$as_me:$LINENO: checking for $ac_word" >&5 4648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4389echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 4649$as_echo_n "checking for $ac_word... " >&6; }
4390if test "${ac_cv_path_PERL+set}" = set; then 4650if ${ac_cv_path_PERL+:} false; then :
4391 echo $ECHO_N "(cached) $ECHO_C" >&6 4651 $as_echo_n "(cached) " >&6
4392else 4652else
4393 case $PERL in 4653 case $PERL in
4394 [\\/]* | ?:[\\/]*) 4654 [\\/]* | ?:[\\/]*)
@@ -4400,14 +4660,14 @@ for as_dir in $PATH
4400do 4660do
4401 IFS=$as_save_IFS 4661 IFS=$as_save_IFS
4402 test -z "$as_dir" && as_dir=. 4662 test -z "$as_dir" && as_dir=.
4403 for ac_exec_ext in '' $ac_executable_extensions; do 4663 for ac_exec_ext in '' $ac_executable_extensions; do
4404 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4664 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4405 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" 4665 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
4406 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4666 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4407 break 2 4667 break 2
4408 fi 4668 fi
4409done 4669done
4410done 4670 done
4411IFS=$as_save_IFS 4671IFS=$as_save_IFS
4412 4672
4413 ;; 4673 ;;
@@ -4415,11 +4675,11 @@ esac
4415fi 4675fi
4416PERL=$ac_cv_path_PERL 4676PERL=$ac_cv_path_PERL
4417if test -n "$PERL"; then 4677if test -n "$PERL"; then
4418 { echo "$as_me:$LINENO: result: $PERL" >&5 4678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
4419echo "${ECHO_T}$PERL" >&6; } 4679$as_echo "$PERL" >&6; }
4420else 4680else
4421 { echo "$as_me:$LINENO: result: no" >&5 4681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4422echo "${ECHO_T}no" >&6; } 4682$as_echo "no" >&6; }
4423fi 4683fi
4424 4684
4425 4685
@@ -4428,10 +4688,10 @@ done
4428 4688
4429# Extract the first word of "sed", so it can be a program name with args. 4689# Extract the first word of "sed", so it can be a program name with args.
4430set dummy sed; ac_word=$2 4690set dummy sed; ac_word=$2
4431{ echo "$as_me:$LINENO: checking for $ac_word" >&5 4691{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4432echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 4692$as_echo_n "checking for $ac_word... " >&6; }
4433if test "${ac_cv_path_SED+set}" = set; then 4693if ${ac_cv_path_SED+:} false; then :
4434 echo $ECHO_N "(cached) $ECHO_C" >&6 4694 $as_echo_n "(cached) " >&6
4435else 4695else
4436 case $SED in 4696 case $SED in
4437 [\\/]* | ?:[\\/]*) 4697 [\\/]* | ?:[\\/]*)
@@ -4443,14 +4703,14 @@ for as_dir in $PATH
4443do 4703do
4444 IFS=$as_save_IFS 4704 IFS=$as_save_IFS
4445 test -z "$as_dir" && as_dir=. 4705 test -z "$as_dir" && as_dir=.
4446 for ac_exec_ext in '' $ac_executable_extensions; do 4706 for ac_exec_ext in '' $ac_executable_extensions; do
4447 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4707 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4448 ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" 4708 ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
4449 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4709 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4450 break 2 4710 break 2
4451 fi 4711 fi
4452done 4712done
4453done 4713 done
4454IFS=$as_save_IFS 4714IFS=$as_save_IFS
4455 4715
4456 ;; 4716 ;;
@@ -4458,21 +4718,21 @@ esac
4458fi 4718fi
4459SED=$ac_cv_path_SED 4719SED=$ac_cv_path_SED
4460if test -n "$SED"; then 4720if test -n "$SED"; then
4461 { echo "$as_me:$LINENO: result: $SED" >&5 4721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
4462echo "${ECHO_T}$SED" >&6; } 4722$as_echo "$SED" >&6; }
4463else 4723else
4464 { echo "$as_me:$LINENO: result: no" >&5 4724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4465echo "${ECHO_T}no" >&6; } 4725$as_echo "no" >&6; }
4466fi 4726fi
4467 4727
4468 4728
4469 4729
4470# Extract the first word of "ent", so it can be a program name with args. 4730# Extract the first word of "ent", so it can be a program name with args.
4471set dummy ent; ac_word=$2 4731set dummy ent; ac_word=$2
4472{ echo "$as_me:$LINENO: checking for $ac_word" >&5 4732{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4473echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 4733$as_echo_n "checking for $ac_word... " >&6; }
4474if test "${ac_cv_path_ENT+set}" = set; then 4734if ${ac_cv_path_ENT+:} false; then :
4475 echo $ECHO_N "(cached) $ECHO_C" >&6 4735 $as_echo_n "(cached) " >&6
4476else 4736else
4477 case $ENT in 4737 case $ENT in
4478 [\\/]* | ?:[\\/]*) 4738 [\\/]* | ?:[\\/]*)
@@ -4484,14 +4744,14 @@ for as_dir in $PATH
4484do 4744do
4485 IFS=$as_save_IFS 4745 IFS=$as_save_IFS
4486 test -z "$as_dir" && as_dir=. 4746 test -z "$as_dir" && as_dir=.
4487 for ac_exec_ext in '' $ac_executable_extensions; do 4747 for ac_exec_ext in '' $ac_executable_extensions; do
4488 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4748 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4489 ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext" 4749 ac_cv_path_ENT="$as_dir/$ac_word$ac_exec_ext"
4490 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4750 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4491 break 2 4751 break 2
4492 fi 4752 fi
4493done 4753done
4494done 4754 done
4495IFS=$as_save_IFS 4755IFS=$as_save_IFS
4496 4756
4497 ;; 4757 ;;
@@ -4499,21 +4759,21 @@ esac
4499fi 4759fi
4500ENT=$ac_cv_path_ENT 4760ENT=$ac_cv_path_ENT
4501if test -n "$ENT"; then 4761if test -n "$ENT"; then
4502 { echo "$as_me:$LINENO: result: $ENT" >&5 4762 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENT" >&5
4503echo "${ECHO_T}$ENT" >&6; } 4763$as_echo "$ENT" >&6; }
4504else 4764else
4505 { echo "$as_me:$LINENO: result: no" >&5 4765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4506echo "${ECHO_T}no" >&6; } 4766$as_echo "no" >&6; }
4507fi 4767fi
4508 4768
4509 4769
4510 4770
4511# Extract the first word of "bash", so it can be a program name with args. 4771# Extract the first word of "bash", so it can be a program name with args.
4512set dummy bash; ac_word=$2 4772set dummy bash; ac_word=$2
4513{ echo "$as_me:$LINENO: checking for $ac_word" >&5 4773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4514echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 4774$as_echo_n "checking for $ac_word... " >&6; }
4515if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then 4775if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4516 echo $ECHO_N "(cached) $ECHO_C" >&6 4776 $as_echo_n "(cached) " >&6
4517else 4777else
4518 case $TEST_MINUS_S_SH in 4778 case $TEST_MINUS_S_SH in
4519 [\\/]* | ?:[\\/]*) 4779 [\\/]* | ?:[\\/]*)
@@ -4525,14 +4785,14 @@ for as_dir in $PATH
4525do 4785do
4526 IFS=$as_save_IFS 4786 IFS=$as_save_IFS
4527 test -z "$as_dir" && as_dir=. 4787 test -z "$as_dir" && as_dir=.
4528 for ac_exec_ext in '' $ac_executable_extensions; do 4788 for ac_exec_ext in '' $ac_executable_extensions; do
4529 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4789 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4530 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext" 4790 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4531 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4791 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4532 break 2 4792 break 2
4533 fi 4793 fi
4534done 4794done
4535done 4795 done
4536IFS=$as_save_IFS 4796IFS=$as_save_IFS
4537 4797
4538 ;; 4798 ;;
@@ -4540,20 +4800,20 @@ esac
4540fi 4800fi
4541TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH 4801TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4542if test -n "$TEST_MINUS_S_SH"; then 4802if test -n "$TEST_MINUS_S_SH"; then
4543 { echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5 4803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4544echo "${ECHO_T}$TEST_MINUS_S_SH" >&6; } 4804$as_echo "$TEST_MINUS_S_SH" >&6; }
4545else 4805else
4546 { echo "$as_me:$LINENO: result: no" >&5 4806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4547echo "${ECHO_T}no" >&6; } 4807$as_echo "no" >&6; }
4548fi 4808fi
4549 4809
4550 4810
4551# Extract the first word of "ksh", so it can be a program name with args. 4811# Extract the first word of "ksh", so it can be a program name with args.
4552set dummy ksh; ac_word=$2 4812set dummy ksh; ac_word=$2
4553{ echo "$as_me:$LINENO: checking for $ac_word" >&5 4813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4554echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 4814$as_echo_n "checking for $ac_word... " >&6; }
4555if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then 4815if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4556 echo $ECHO_N "(cached) $ECHO_C" >&6 4816 $as_echo_n "(cached) " >&6
4557else 4817else
4558 case $TEST_MINUS_S_SH in 4818 case $TEST_MINUS_S_SH in
4559 [\\/]* | ?:[\\/]*) 4819 [\\/]* | ?:[\\/]*)
@@ -4565,14 +4825,14 @@ for as_dir in $PATH
4565do 4825do
4566 IFS=$as_save_IFS 4826 IFS=$as_save_IFS
4567 test -z "$as_dir" && as_dir=. 4827 test -z "$as_dir" && as_dir=.
4568 for ac_exec_ext in '' $ac_executable_extensions; do 4828 for ac_exec_ext in '' $ac_executable_extensions; do
4569 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4829 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4570 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext" 4830 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4571 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4831 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4572 break 2 4832 break 2
4573 fi 4833 fi
4574done 4834done
4575done 4835 done
4576IFS=$as_save_IFS 4836IFS=$as_save_IFS
4577 4837
4578 ;; 4838 ;;
@@ -4580,20 +4840,20 @@ esac
4580fi 4840fi
4581TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH 4841TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4582if test -n "$TEST_MINUS_S_SH"; then 4842if test -n "$TEST_MINUS_S_SH"; then
4583 { echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5 4843 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4584echo "${ECHO_T}$TEST_MINUS_S_SH" >&6; } 4844$as_echo "$TEST_MINUS_S_SH" >&6; }
4585else 4845else
4586 { echo "$as_me:$LINENO: result: no" >&5 4846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4587echo "${ECHO_T}no" >&6; } 4847$as_echo "no" >&6; }
4588fi 4848fi
4589 4849
4590 4850
4591# Extract the first word of "sh", so it can be a program name with args. 4851# Extract the first word of "sh", so it can be a program name with args.
4592set dummy sh; ac_word=$2 4852set dummy sh; ac_word=$2
4593{ echo "$as_me:$LINENO: checking for $ac_word" >&5 4853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4594echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 4854$as_echo_n "checking for $ac_word... " >&6; }
4595if test "${ac_cv_path_TEST_MINUS_S_SH+set}" = set; then 4855if ${ac_cv_path_TEST_MINUS_S_SH+:} false; then :
4596 echo $ECHO_N "(cached) $ECHO_C" >&6 4856 $as_echo_n "(cached) " >&6
4597else 4857else
4598 case $TEST_MINUS_S_SH in 4858 case $TEST_MINUS_S_SH in
4599 [\\/]* | ?:[\\/]*) 4859 [\\/]* | ?:[\\/]*)
@@ -4605,14 +4865,14 @@ for as_dir in $PATH
4605do 4865do
4606 IFS=$as_save_IFS 4866 IFS=$as_save_IFS
4607 test -z "$as_dir" && as_dir=. 4867 test -z "$as_dir" && as_dir=.
4608 for ac_exec_ext in '' $ac_executable_extensions; do 4868 for ac_exec_ext in '' $ac_executable_extensions; do
4609 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4869 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4610 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext" 4870 ac_cv_path_TEST_MINUS_S_SH="$as_dir/$ac_word$ac_exec_ext"
4611 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4871 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4612 break 2 4872 break 2
4613 fi 4873 fi
4614done 4874done
4615done 4875 done
4616IFS=$as_save_IFS 4876IFS=$as_save_IFS
4617 4877
4618 ;; 4878 ;;
@@ -4620,20 +4880,20 @@ esac
4620fi 4880fi
4621TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH 4881TEST_MINUS_S_SH=$ac_cv_path_TEST_MINUS_S_SH
4622if test -n "$TEST_MINUS_S_SH"; then 4882if test -n "$TEST_MINUS_S_SH"; then
4623 { echo "$as_me:$LINENO: result: $TEST_MINUS_S_SH" >&5 4883 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEST_MINUS_S_SH" >&5
4624echo "${ECHO_T}$TEST_MINUS_S_SH" >&6; } 4884$as_echo "$TEST_MINUS_S_SH" >&6; }
4625else 4885else
4626 { echo "$as_me:$LINENO: result: no" >&5 4886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4627echo "${ECHO_T}no" >&6; } 4887$as_echo "no" >&6; }
4628fi 4888fi
4629 4889
4630 4890
4631# Extract the first word of "sh", so it can be a program name with args. 4891# Extract the first word of "sh", so it can be a program name with args.
4632set dummy sh; ac_word=$2 4892set dummy sh; ac_word=$2
4633{ echo "$as_me:$LINENO: checking for $ac_word" >&5 4893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4634echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 4894$as_echo_n "checking for $ac_word... " >&6; }
4635if test "${ac_cv_path_SH+set}" = set; then 4895if ${ac_cv_path_SH+:} false; then :
4636 echo $ECHO_N "(cached) $ECHO_C" >&6 4896 $as_echo_n "(cached) " >&6
4637else 4897else
4638 case $SH in 4898 case $SH in
4639 [\\/]* | ?:[\\/]*) 4899 [\\/]* | ?:[\\/]*)
@@ -4645,14 +4905,14 @@ for as_dir in $PATH
4645do 4905do
4646 IFS=$as_save_IFS 4906 IFS=$as_save_IFS
4647 test -z "$as_dir" && as_dir=. 4907 test -z "$as_dir" && as_dir=.
4648 for ac_exec_ext in '' $ac_executable_extensions; do 4908 for ac_exec_ext in '' $ac_executable_extensions; do
4649 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4909 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4650 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext" 4910 ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
4651 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4652 break 2 4912 break 2
4653 fi 4913 fi
4654done 4914done
4655done 4915 done
4656IFS=$as_save_IFS 4916IFS=$as_save_IFS
4657 4917
4658 ;; 4918 ;;
@@ -4660,20 +4920,20 @@ esac
4660fi 4920fi
4661SH=$ac_cv_path_SH 4921SH=$ac_cv_path_SH
4662if test -n "$SH"; then 4922if test -n "$SH"; then
4663 { echo "$as_me:$LINENO: result: $SH" >&5 4923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
4664echo "${ECHO_T}$SH" >&6; } 4924$as_echo "$SH" >&6; }
4665else 4925else
4666 { echo "$as_me:$LINENO: result: no" >&5 4926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4667echo "${ECHO_T}no" >&6; } 4927$as_echo "no" >&6; }
4668fi 4928fi
4669 4929
4670 4930
4671# Extract the first word of "groff", so it can be a program name with args. 4931# Extract the first word of "groff", so it can be a program name with args.
4672set dummy groff; ac_word=$2 4932set dummy groff; ac_word=$2
4673{ echo "$as_me:$LINENO: checking for $ac_word" >&5 4933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4674echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 4934$as_echo_n "checking for $ac_word... " >&6; }
4675if test "${ac_cv_path_GROFF+set}" = set; then 4935if ${ac_cv_path_GROFF+:} false; then :
4676 echo $ECHO_N "(cached) $ECHO_C" >&6 4936 $as_echo_n "(cached) " >&6
4677else 4937else
4678 case $GROFF in 4938 case $GROFF in
4679 [\\/]* | ?:[\\/]*) 4939 [\\/]* | ?:[\\/]*)
@@ -4685,14 +4945,14 @@ for as_dir in $PATH
4685do 4945do
4686 IFS=$as_save_IFS 4946 IFS=$as_save_IFS
4687 test -z "$as_dir" && as_dir=. 4947 test -z "$as_dir" && as_dir=.
4688 for ac_exec_ext in '' $ac_executable_extensions; do 4948 for ac_exec_ext in '' $ac_executable_extensions; do
4689 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4949 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4690 ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext" 4950 ac_cv_path_GROFF="$as_dir/$ac_word$ac_exec_ext"
4691 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4951 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4692 break 2 4952 break 2
4693 fi 4953 fi
4694done 4954done
4695done 4955 done
4696IFS=$as_save_IFS 4956IFS=$as_save_IFS
4697 4957
4698 ;; 4958 ;;
@@ -4700,20 +4960,20 @@ esac
4700fi 4960fi
4701GROFF=$ac_cv_path_GROFF 4961GROFF=$ac_cv_path_GROFF
4702if test -n "$GROFF"; then 4962if test -n "$GROFF"; then
4703 { echo "$as_me:$LINENO: result: $GROFF" >&5 4963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GROFF" >&5
4704echo "${ECHO_T}$GROFF" >&6; } 4964$as_echo "$GROFF" >&6; }
4705else 4965else
4706 { echo "$as_me:$LINENO: result: no" >&5 4966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4707echo "${ECHO_T}no" >&6; } 4967$as_echo "no" >&6; }
4708fi 4968fi
4709 4969
4710 4970
4711# Extract the first word of "nroff", so it can be a program name with args. 4971# Extract the first word of "nroff", so it can be a program name with args.
4712set dummy nroff; ac_word=$2 4972set dummy nroff; ac_word=$2
4713{ echo "$as_me:$LINENO: checking for $ac_word" >&5 4973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4714echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 4974$as_echo_n "checking for $ac_word... " >&6; }
4715if test "${ac_cv_path_NROFF+set}" = set; then 4975if ${ac_cv_path_NROFF+:} false; then :
4716 echo $ECHO_N "(cached) $ECHO_C" >&6 4976 $as_echo_n "(cached) " >&6
4717else 4977else
4718 case $NROFF in 4978 case $NROFF in
4719 [\\/]* | ?:[\\/]*) 4979 [\\/]* | ?:[\\/]*)
@@ -4725,14 +4985,14 @@ for as_dir in $PATH
4725do 4985do
4726 IFS=$as_save_IFS 4986 IFS=$as_save_IFS
4727 test -z "$as_dir" && as_dir=. 4987 test -z "$as_dir" && as_dir=.
4728 for ac_exec_ext in '' $ac_executable_extensions; do 4988 for ac_exec_ext in '' $ac_executable_extensions; do
4729 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 4989 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4730 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext" 4990 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
4731 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 4991 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4732 break 2 4992 break 2
4733 fi 4993 fi
4734done 4994done
4735done 4995 done
4736IFS=$as_save_IFS 4996IFS=$as_save_IFS
4737 4997
4738 ;; 4998 ;;
@@ -4740,20 +5000,20 @@ esac
4740fi 5000fi
4741NROFF=$ac_cv_path_NROFF 5001NROFF=$ac_cv_path_NROFF
4742if test -n "$NROFF"; then 5002if test -n "$NROFF"; then
4743 { echo "$as_me:$LINENO: result: $NROFF" >&5 5003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
4744echo "${ECHO_T}$NROFF" >&6; } 5004$as_echo "$NROFF" >&6; }
4745else 5005else
4746 { echo "$as_me:$LINENO: result: no" >&5 5006 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4747echo "${ECHO_T}no" >&6; } 5007$as_echo "no" >&6; }
4748fi 5008fi
4749 5009
4750 5010
4751# Extract the first word of "mandoc", so it can be a program name with args. 5011# Extract the first word of "mandoc", so it can be a program name with args.
4752set dummy mandoc; ac_word=$2 5012set dummy mandoc; ac_word=$2
4753{ echo "$as_me:$LINENO: checking for $ac_word" >&5 5013{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4754echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 5014$as_echo_n "checking for $ac_word... " >&6; }
4755if test "${ac_cv_path_MANDOC+set}" = set; then 5015if ${ac_cv_path_MANDOC+:} false; then :
4756 echo $ECHO_N "(cached) $ECHO_C" >&6 5016 $as_echo_n "(cached) " >&6
4757else 5017else
4758 case $MANDOC in 5018 case $MANDOC in
4759 [\\/]* | ?:[\\/]*) 5019 [\\/]* | ?:[\\/]*)
@@ -4765,14 +5025,14 @@ for as_dir in $PATH
4765do 5025do
4766 IFS=$as_save_IFS 5026 IFS=$as_save_IFS
4767 test -z "$as_dir" && as_dir=. 5027 test -z "$as_dir" && as_dir=.
4768 for ac_exec_ext in '' $ac_executable_extensions; do 5028 for ac_exec_ext in '' $ac_executable_extensions; do
4769 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5029 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4770 ac_cv_path_MANDOC="$as_dir/$ac_word$ac_exec_ext" 5030 ac_cv_path_MANDOC="$as_dir/$ac_word$ac_exec_ext"
4771 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 5031 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4772 break 2 5032 break 2
4773 fi 5033 fi
4774done 5034done
4775done 5035 done
4776IFS=$as_save_IFS 5036IFS=$as_save_IFS
4777 5037
4778 ;; 5038 ;;
@@ -4780,11 +5040,11 @@ esac
4780fi 5040fi
4781MANDOC=$ac_cv_path_MANDOC 5041MANDOC=$ac_cv_path_MANDOC
4782if test -n "$MANDOC"; then 5042if test -n "$MANDOC"; then
4783 { echo "$as_me:$LINENO: result: $MANDOC" >&5 5043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANDOC" >&5
4784echo "${ECHO_T}$MANDOC" >&6; } 5044$as_echo "$MANDOC" >&6; }
4785else 5045else
4786 { echo "$as_me:$LINENO: result: no" >&5 5046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4787echo "${ECHO_T}no" >&6; } 5047$as_echo "no" >&6; }
4788fi 5048fi
4789 5049
4790 5050
@@ -4798,18 +5058,18 @@ elif test "x$NROFF" != "x" ; then
4798elif test "x$GROFF" != "x" ; then 5058elif test "x$GROFF" != "x" ; then
4799 MANFMT="$GROFF -mandoc -Tascii" 5059 MANFMT="$GROFF -mandoc -Tascii"
4800else 5060else
4801 { echo "$as_me:$LINENO: WARNING: no manpage formatted found" >&5 5061 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no manpage formatted found" >&5
4802echo "$as_me: WARNING: no manpage formatted found" >&2;} 5062$as_echo "$as_me: WARNING: no manpage formatted found" >&2;}
4803 MANFMT="false" 5063 MANFMT="false"
4804fi 5064fi
4805 5065
4806 5066
4807# Extract the first word of "groupadd", so it can be a program name with args. 5067# Extract the first word of "groupadd", so it can be a program name with args.
4808set dummy groupadd; ac_word=$2 5068set dummy groupadd; ac_word=$2
4809{ echo "$as_me:$LINENO: checking for $ac_word" >&5 5069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4810echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 5070$as_echo_n "checking for $ac_word... " >&6; }
4811if test "${ac_cv_path_PATH_GROUPADD_PROG+set}" = set; then 5071if ${ac_cv_path_PATH_GROUPADD_PROG+:} false; then :
4812 echo $ECHO_N "(cached) $ECHO_C" >&6 5072 $as_echo_n "(cached) " >&6
4813else 5073else
4814 case $PATH_GROUPADD_PROG in 5074 case $PATH_GROUPADD_PROG in
4815 [\\/]* | ?:[\\/]*) 5075 [\\/]* | ?:[\\/]*)
@@ -4821,14 +5081,14 @@ for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
4821do 5081do
4822 IFS=$as_save_IFS 5082 IFS=$as_save_IFS
4823 test -z "$as_dir" && as_dir=. 5083 test -z "$as_dir" && as_dir=.
4824 for ac_exec_ext in '' $ac_executable_extensions; do 5084 for ac_exec_ext in '' $ac_executable_extensions; do
4825 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5085 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4826 ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext" 5086 ac_cv_path_PATH_GROUPADD_PROG="$as_dir/$ac_word$ac_exec_ext"
4827 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 5087 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4828 break 2 5088 break 2
4829 fi 5089 fi
4830done 5090done
4831done 5091 done
4832IFS=$as_save_IFS 5092IFS=$as_save_IFS
4833 5093
4834 test -z "$ac_cv_path_PATH_GROUPADD_PROG" && ac_cv_path_PATH_GROUPADD_PROG="groupadd" 5094 test -z "$ac_cv_path_PATH_GROUPADD_PROG" && ac_cv_path_PATH_GROUPADD_PROG="groupadd"
@@ -4837,20 +5097,20 @@ esac
4837fi 5097fi
4838PATH_GROUPADD_PROG=$ac_cv_path_PATH_GROUPADD_PROG 5098PATH_GROUPADD_PROG=$ac_cv_path_PATH_GROUPADD_PROG
4839if test -n "$PATH_GROUPADD_PROG"; then 5099if test -n "$PATH_GROUPADD_PROG"; then
4840 { echo "$as_me:$LINENO: result: $PATH_GROUPADD_PROG" >&5 5100 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_GROUPADD_PROG" >&5
4841echo "${ECHO_T}$PATH_GROUPADD_PROG" >&6; } 5101$as_echo "$PATH_GROUPADD_PROG" >&6; }
4842else 5102else
4843 { echo "$as_me:$LINENO: result: no" >&5 5103 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4844echo "${ECHO_T}no" >&6; } 5104$as_echo "no" >&6; }
4845fi 5105fi
4846 5106
4847 5107
4848# Extract the first word of "useradd", so it can be a program name with args. 5108# Extract the first word of "useradd", so it can be a program name with args.
4849set dummy useradd; ac_word=$2 5109set dummy useradd; ac_word=$2
4850{ echo "$as_me:$LINENO: checking for $ac_word" >&5 5110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4851echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 5111$as_echo_n "checking for $ac_word... " >&6; }
4852if test "${ac_cv_path_PATH_USERADD_PROG+set}" = set; then 5112if ${ac_cv_path_PATH_USERADD_PROG+:} false; then :
4853 echo $ECHO_N "(cached) $ECHO_C" >&6 5113 $as_echo_n "(cached) " >&6
4854else 5114else
4855 case $PATH_USERADD_PROG in 5115 case $PATH_USERADD_PROG in
4856 [\\/]* | ?:[\\/]*) 5116 [\\/]* | ?:[\\/]*)
@@ -4862,14 +5122,14 @@ for as_dir in /usr/sbin${PATH_SEPARATOR}/etc
4862do 5122do
4863 IFS=$as_save_IFS 5123 IFS=$as_save_IFS
4864 test -z "$as_dir" && as_dir=. 5124 test -z "$as_dir" && as_dir=.
4865 for ac_exec_ext in '' $ac_executable_extensions; do 5125 for ac_exec_ext in '' $ac_executable_extensions; do
4866 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5126 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4867 ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext" 5127 ac_cv_path_PATH_USERADD_PROG="$as_dir/$ac_word$ac_exec_ext"
4868 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 5128 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4869 break 2 5129 break 2
4870 fi 5130 fi
4871done 5131done
4872done 5132 done
4873IFS=$as_save_IFS 5133IFS=$as_save_IFS
4874 5134
4875 test -z "$ac_cv_path_PATH_USERADD_PROG" && ac_cv_path_PATH_USERADD_PROG="useradd" 5135 test -z "$ac_cv_path_PATH_USERADD_PROG" && ac_cv_path_PATH_USERADD_PROG="useradd"
@@ -4878,20 +5138,20 @@ esac
4878fi 5138fi
4879PATH_USERADD_PROG=$ac_cv_path_PATH_USERADD_PROG 5139PATH_USERADD_PROG=$ac_cv_path_PATH_USERADD_PROG
4880if test -n "$PATH_USERADD_PROG"; then 5140if test -n "$PATH_USERADD_PROG"; then
4881 { echo "$as_me:$LINENO: result: $PATH_USERADD_PROG" >&5 5141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_USERADD_PROG" >&5
4882echo "${ECHO_T}$PATH_USERADD_PROG" >&6; } 5142$as_echo "$PATH_USERADD_PROG" >&6; }
4883else 5143else
4884 { echo "$as_me:$LINENO: result: no" >&5 5144 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4885echo "${ECHO_T}no" >&6; } 5145$as_echo "no" >&6; }
4886fi 5146fi
4887 5147
4888 5148
4889# Extract the first word of "pkgmk", so it can be a program name with args. 5149# Extract the first word of "pkgmk", so it can be a program name with args.
4890set dummy pkgmk; ac_word=$2 5150set dummy pkgmk; ac_word=$2
4891{ echo "$as_me:$LINENO: checking for $ac_word" >&5 5151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4892echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 5152$as_echo_n "checking for $ac_word... " >&6; }
4893if test "${ac_cv_prog_MAKE_PACKAGE_SUPPORTED+set}" = set; then 5153if ${ac_cv_prog_MAKE_PACKAGE_SUPPORTED+:} false; then :
4894 echo $ECHO_N "(cached) $ECHO_C" >&6 5154 $as_echo_n "(cached) " >&6
4895else 5155else
4896 if test -n "$MAKE_PACKAGE_SUPPORTED"; then 5156 if test -n "$MAKE_PACKAGE_SUPPORTED"; then
4897 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="$MAKE_PACKAGE_SUPPORTED" # Let the user override the test. 5157 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="$MAKE_PACKAGE_SUPPORTED" # Let the user override the test.
@@ -4901,14 +5161,14 @@ for as_dir in $PATH
4901do 5161do
4902 IFS=$as_save_IFS 5162 IFS=$as_save_IFS
4903 test -z "$as_dir" && as_dir=. 5163 test -z "$as_dir" && as_dir=.
4904 for ac_exec_ext in '' $ac_executable_extensions; do 5164 for ac_exec_ext in '' $ac_executable_extensions; do
4905 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5165 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4906 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes" 5166 ac_cv_prog_MAKE_PACKAGE_SUPPORTED="yes"
4907 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 5167 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4908 break 2 5168 break 2
4909 fi 5169 fi
4910done 5170done
4911done 5171 done
4912IFS=$as_save_IFS 5172IFS=$as_save_IFS
4913 5173
4914 test -z "$ac_cv_prog_MAKE_PACKAGE_SUPPORTED" && ac_cv_prog_MAKE_PACKAGE_SUPPORTED="no" 5174 test -z "$ac_cv_prog_MAKE_PACKAGE_SUPPORTED" && ac_cv_prog_MAKE_PACKAGE_SUPPORTED="no"
@@ -4916,11 +5176,11 @@ fi
4916fi 5176fi
4917MAKE_PACKAGE_SUPPORTED=$ac_cv_prog_MAKE_PACKAGE_SUPPORTED 5177MAKE_PACKAGE_SUPPORTED=$ac_cv_prog_MAKE_PACKAGE_SUPPORTED
4918if test -n "$MAKE_PACKAGE_SUPPORTED"; then 5178if test -n "$MAKE_PACKAGE_SUPPORTED"; then
4919 { echo "$as_me:$LINENO: result: $MAKE_PACKAGE_SUPPORTED" >&5 5179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE_PACKAGE_SUPPORTED" >&5
4920echo "${ECHO_T}$MAKE_PACKAGE_SUPPORTED" >&6; } 5180$as_echo "$MAKE_PACKAGE_SUPPORTED" >&6; }
4921else 5181else
4922 { echo "$as_me:$LINENO: result: no" >&5 5182 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4923echo "${ECHO_T}no" >&6; } 5183$as_echo "no" >&6; }
4924fi 5184fi
4925 5185
4926 5186
@@ -4934,16 +5194,16 @@ fi
4934 5194
4935# System features 5195# System features
4936# Check whether --enable-largefile was given. 5196# Check whether --enable-largefile was given.
4937if test "${enable_largefile+set}" = set; then 5197if test "${enable_largefile+set}" = set; then :
4938 enableval=$enable_largefile; 5198 enableval=$enable_largefile;
4939fi 5199fi
4940 5200
4941if test "$enable_largefile" != no; then 5201if test "$enable_largefile" != no; then
4942 5202
4943 { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 5203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4944echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; } 5204$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4945if test "${ac_cv_sys_largefile_CC+set}" = set; then 5205if ${ac_cv_sys_largefile_CC+:} false; then :
4946 echo $ECHO_N "(cached) $ECHO_C" >&6 5206 $as_echo_n "(cached) " >&6
4947else 5207else
4948 ac_cv_sys_largefile_CC=no 5208 ac_cv_sys_largefile_CC=no
4949 if test "$GCC" != yes; then 5209 if test "$GCC" != yes; then
@@ -4951,11 +5211,7 @@ else
4951 while :; do 5211 while :; do
4952 # IRIX 6.2 and later do not support large files by default, 5212 # IRIX 6.2 and later do not support large files by default,
4953 # so use the C compiler's -n32 option if that helps. 5213 # so use the C compiler's -n32 option if that helps.
4954 cat >conftest.$ac_ext <<_ACEOF 5214 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4955/* confdefs.h. */
4956_ACEOF
4957cat confdefs.h >>conftest.$ac_ext
4958cat >>conftest.$ac_ext <<_ACEOF
4959/* end confdefs.h. */ 5215/* end confdefs.h. */
4960#include <sys/types.h> 5216#include <sys/types.h>
4961 /* Check that off_t can represent 2**63 - 1 correctly. 5217 /* Check that off_t can represent 2**63 - 1 correctly.
@@ -4974,58 +5230,14 @@ main ()
4974 return 0; 5230 return 0;
4975} 5231}
4976_ACEOF 5232_ACEOF
4977 rm -f conftest.$ac_objext 5233 if ac_fn_c_try_compile "$LINENO"; then :
4978if { (ac_try="$ac_compile"
4979case "(($ac_try" in
4980 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4981 *) ac_try_echo=$ac_try;;
4982esac
4983eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
4984 (eval "$ac_compile") 2>conftest.er1
4985 ac_status=$?
4986 grep -v '^ *+' conftest.er1 >conftest.err
4987 rm -f conftest.er1
4988 cat conftest.err >&5
4989 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4990 (exit $ac_status); } && {
4991 test -z "$ac_c_werror_flag" ||
4992 test ! -s conftest.err
4993 } && test -s conftest.$ac_objext; then
4994 break 5234 break
4995else
4996 echo "$as_me: failed program was:" >&5
4997sed 's/^/| /' conftest.$ac_ext >&5
4998
4999
5000fi 5235fi
5001
5002rm -f core conftest.err conftest.$ac_objext 5236rm -f core conftest.err conftest.$ac_objext
5003 CC="$CC -n32" 5237 CC="$CC -n32"
5004 rm -f conftest.$ac_objext 5238 if ac_fn_c_try_compile "$LINENO"; then :
5005if { (ac_try="$ac_compile"
5006case "(($ac_try" in
5007 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5008 *) ac_try_echo=$ac_try;;
5009esac
5010eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5011 (eval "$ac_compile") 2>conftest.er1
5012 ac_status=$?
5013 grep -v '^ *+' conftest.er1 >conftest.err
5014 rm -f conftest.er1
5015 cat conftest.err >&5
5016 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5017 (exit $ac_status); } && {
5018 test -z "$ac_c_werror_flag" ||
5019 test ! -s conftest.err
5020 } && test -s conftest.$ac_objext; then
5021 ac_cv_sys_largefile_CC=' -n32'; break 5239 ac_cv_sys_largefile_CC=' -n32'; break
5022else
5023 echo "$as_me: failed program was:" >&5
5024sed 's/^/| /' conftest.$ac_ext >&5
5025
5026
5027fi 5240fi
5028
5029rm -f core conftest.err conftest.$ac_objext 5241rm -f core conftest.err conftest.$ac_objext
5030 break 5242 break
5031 done 5243 done
@@ -5033,23 +5245,19 @@ rm -f core conftest.err conftest.$ac_objext
5033 rm -f conftest.$ac_ext 5245 rm -f conftest.$ac_ext
5034 fi 5246 fi
5035fi 5247fi
5036{ echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 5248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5037echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; } 5249$as_echo "$ac_cv_sys_largefile_CC" >&6; }
5038 if test "$ac_cv_sys_largefile_CC" != no; then 5250 if test "$ac_cv_sys_largefile_CC" != no; then
5039 CC=$CC$ac_cv_sys_largefile_CC 5251 CC=$CC$ac_cv_sys_largefile_CC
5040 fi 5252 fi
5041 5253
5042 { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 5254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5043echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; } 5255$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5044if test "${ac_cv_sys_file_offset_bits+set}" = set; then 5256if ${ac_cv_sys_file_offset_bits+:} false; then :
5045 echo $ECHO_N "(cached) $ECHO_C" >&6 5257 $as_echo_n "(cached) " >&6
5046else 5258else
5047 while :; do 5259 while :; do
5048 cat >conftest.$ac_ext <<_ACEOF 5260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5049/* confdefs.h. */
5050_ACEOF
5051cat confdefs.h >>conftest.$ac_ext
5052cat >>conftest.$ac_ext <<_ACEOF
5053/* end confdefs.h. */ 5261/* end confdefs.h. */
5054#include <sys/types.h> 5262#include <sys/types.h>
5055 /* Check that off_t can represent 2**63 - 1 correctly. 5263 /* Check that off_t can represent 2**63 - 1 correctly.
@@ -5068,37 +5276,11 @@ main ()
5068 return 0; 5276 return 0;
5069} 5277}
5070_ACEOF 5278_ACEOF
5071rm -f conftest.$ac_objext 5279if ac_fn_c_try_compile "$LINENO"; then :
5072if { (ac_try="$ac_compile"
5073case "(($ac_try" in
5074 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5075 *) ac_try_echo=$ac_try;;
5076esac
5077eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5078 (eval "$ac_compile") 2>conftest.er1
5079 ac_status=$?
5080 grep -v '^ *+' conftest.er1 >conftest.err
5081 rm -f conftest.er1
5082 cat conftest.err >&5
5083 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5084 (exit $ac_status); } && {
5085 test -z "$ac_c_werror_flag" ||
5086 test ! -s conftest.err
5087 } && test -s conftest.$ac_objext; then
5088 ac_cv_sys_file_offset_bits=no; break 5280 ac_cv_sys_file_offset_bits=no; break
5089else
5090 echo "$as_me: failed program was:" >&5
5091sed 's/^/| /' conftest.$ac_ext >&5
5092
5093
5094fi 5281fi
5095
5096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5282rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5097 cat >conftest.$ac_ext <<_ACEOF 5283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5098/* confdefs.h. */
5099_ACEOF
5100cat confdefs.h >>conftest.$ac_ext
5101cat >>conftest.$ac_ext <<_ACEOF
5102/* end confdefs.h. */ 5284/* end confdefs.h. */
5103#define _FILE_OFFSET_BITS 64 5285#define _FILE_OFFSET_BITS 64
5104#include <sys/types.h> 5286#include <sys/types.h>
@@ -5118,38 +5300,16 @@ main ()
5118 return 0; 5300 return 0;
5119} 5301}
5120_ACEOF 5302_ACEOF
5121rm -f conftest.$ac_objext 5303if ac_fn_c_try_compile "$LINENO"; then :
5122if { (ac_try="$ac_compile"
5123case "(($ac_try" in
5124 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5125 *) ac_try_echo=$ac_try;;
5126esac
5127eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5128 (eval "$ac_compile") 2>conftest.er1
5129 ac_status=$?
5130 grep -v '^ *+' conftest.er1 >conftest.err
5131 rm -f conftest.er1
5132 cat conftest.err >&5
5133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5134 (exit $ac_status); } && {
5135 test -z "$ac_c_werror_flag" ||
5136 test ! -s conftest.err
5137 } && test -s conftest.$ac_objext; then
5138 ac_cv_sys_file_offset_bits=64; break 5304 ac_cv_sys_file_offset_bits=64; break
5139else
5140 echo "$as_me: failed program was:" >&5
5141sed 's/^/| /' conftest.$ac_ext >&5
5142
5143
5144fi 5305fi
5145
5146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5306rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5147 ac_cv_sys_file_offset_bits=unknown 5307 ac_cv_sys_file_offset_bits=unknown
5148 break 5308 break
5149done 5309done
5150fi 5310fi
5151{ echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 5311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
5152echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; } 5312$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
5153case $ac_cv_sys_file_offset_bits in #( 5313case $ac_cv_sys_file_offset_bits in #(
5154 no | unknown) ;; 5314 no | unknown) ;;
5155 *) 5315 *)
@@ -5158,19 +5318,15 @@ cat >>confdefs.h <<_ACEOF
5158_ACEOF 5318_ACEOF
5159;; 5319;;
5160esac 5320esac
5161rm -f conftest* 5321rm -rf conftest*
5162 if test $ac_cv_sys_file_offset_bits = unknown; then 5322 if test $ac_cv_sys_file_offset_bits = unknown; then
5163 { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 5323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
5164echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; } 5324$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
5165if test "${ac_cv_sys_large_files+set}" = set; then 5325if ${ac_cv_sys_large_files+:} false; then :
5166 echo $ECHO_N "(cached) $ECHO_C" >&6 5326 $as_echo_n "(cached) " >&6
5167else 5327else
5168 while :; do 5328 while :; do
5169 cat >conftest.$ac_ext <<_ACEOF 5329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5170/* confdefs.h. */
5171_ACEOF
5172cat confdefs.h >>conftest.$ac_ext
5173cat >>conftest.$ac_ext <<_ACEOF
5174/* end confdefs.h. */ 5330/* end confdefs.h. */
5175#include <sys/types.h> 5331#include <sys/types.h>
5176 /* Check that off_t can represent 2**63 - 1 correctly. 5332 /* Check that off_t can represent 2**63 - 1 correctly.
@@ -5189,37 +5345,11 @@ main ()
5189 return 0; 5345 return 0;
5190} 5346}
5191_ACEOF 5347_ACEOF
5192rm -f conftest.$ac_objext 5348if ac_fn_c_try_compile "$LINENO"; then :
5193if { (ac_try="$ac_compile"
5194case "(($ac_try" in
5195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5196 *) ac_try_echo=$ac_try;;
5197esac
5198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5199 (eval "$ac_compile") 2>conftest.er1
5200 ac_status=$?
5201 grep -v '^ *+' conftest.er1 >conftest.err
5202 rm -f conftest.er1
5203 cat conftest.err >&5
5204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5205 (exit $ac_status); } && {
5206 test -z "$ac_c_werror_flag" ||
5207 test ! -s conftest.err
5208 } && test -s conftest.$ac_objext; then
5209 ac_cv_sys_large_files=no; break 5349 ac_cv_sys_large_files=no; break
5210else
5211 echo "$as_me: failed program was:" >&5
5212sed 's/^/| /' conftest.$ac_ext >&5
5213
5214
5215fi 5350fi
5216
5217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5351rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5218 cat >conftest.$ac_ext <<_ACEOF 5352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5219/* confdefs.h. */
5220_ACEOF
5221cat confdefs.h >>conftest.$ac_ext
5222cat >>conftest.$ac_ext <<_ACEOF
5223/* end confdefs.h. */ 5353/* end confdefs.h. */
5224#define _LARGE_FILES 1 5354#define _LARGE_FILES 1
5225#include <sys/types.h> 5355#include <sys/types.h>
@@ -5239,38 +5369,16 @@ main ()
5239 return 0; 5369 return 0;
5240} 5370}
5241_ACEOF 5371_ACEOF
5242rm -f conftest.$ac_objext 5372if ac_fn_c_try_compile "$LINENO"; then :
5243if { (ac_try="$ac_compile"
5244case "(($ac_try" in
5245 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5246 *) ac_try_echo=$ac_try;;
5247esac
5248eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5249 (eval "$ac_compile") 2>conftest.er1
5250 ac_status=$?
5251 grep -v '^ *+' conftest.er1 >conftest.err
5252 rm -f conftest.er1
5253 cat conftest.err >&5
5254 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5255 (exit $ac_status); } && {
5256 test -z "$ac_c_werror_flag" ||
5257 test ! -s conftest.err
5258 } && test -s conftest.$ac_objext; then
5259 ac_cv_sys_large_files=1; break 5373 ac_cv_sys_large_files=1; break
5260else
5261 echo "$as_me: failed program was:" >&5
5262sed 's/^/| /' conftest.$ac_ext >&5
5263
5264
5265fi 5374fi
5266
5267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5268 ac_cv_sys_large_files=unknown 5376 ac_cv_sys_large_files=unknown
5269 break 5377 break
5270done 5378done
5271fi 5379fi
5272{ echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 5380{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
5273echo "${ECHO_T}$ac_cv_sys_large_files" >&6; } 5381$as_echo "$ac_cv_sys_large_files" >&6; }
5274case $ac_cv_sys_large_files in #( 5382case $ac_cv_sys_large_files in #(
5275 no | unknown) ;; 5383 no | unknown) ;;
5276 *) 5384 *)
@@ -5279,15 +5387,13 @@ cat >>confdefs.h <<_ACEOF
5279_ACEOF 5387_ACEOF
5280;; 5388;;
5281esac 5389esac
5282rm -f conftest* 5390rm -rf conftest*
5283 fi 5391 fi
5284fi 5392fi
5285 5393
5286 5394
5287if test -z "$AR" ; then 5395if test -z "$AR" ; then
5288 { { echo "$as_me:$LINENO: error: *** 'ar' missing, please install or fix your \$PATH ***" >&5 5396 as_fn_error $? "*** 'ar' missing, please install or fix your \$PATH ***" "$LINENO" 5
5289echo "$as_me: error: *** 'ar' missing, please install or fix your \$PATH ***" >&2;}
5290 { (exit 1); exit 1; }; }
5291fi 5397fi
5292 5398
5293# Use LOGIN_PROGRAM from environment if possible 5399# Use LOGIN_PROGRAM from environment if possible
@@ -5301,10 +5407,10 @@ else
5301 # Search for login 5407 # Search for login
5302 # Extract the first word of "login", so it can be a program name with args. 5408 # Extract the first word of "login", so it can be a program name with args.
5303set dummy login; ac_word=$2 5409set dummy login; ac_word=$2
5304{ echo "$as_me:$LINENO: checking for $ac_word" >&5 5410{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5305echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 5411$as_echo_n "checking for $ac_word... " >&6; }
5306if test "${ac_cv_path_LOGIN_PROGRAM_FALLBACK+set}" = set; then 5412if ${ac_cv_path_LOGIN_PROGRAM_FALLBACK+:} false; then :
5307 echo $ECHO_N "(cached) $ECHO_C" >&6 5413 $as_echo_n "(cached) " >&6
5308else 5414else
5309 case $LOGIN_PROGRAM_FALLBACK in 5415 case $LOGIN_PROGRAM_FALLBACK in
5310 [\\/]* | ?:[\\/]*) 5416 [\\/]* | ?:[\\/]*)
@@ -5316,14 +5422,14 @@ for as_dir in $PATH
5316do 5422do
5317 IFS=$as_save_IFS 5423 IFS=$as_save_IFS
5318 test -z "$as_dir" && as_dir=. 5424 test -z "$as_dir" && as_dir=.
5319 for ac_exec_ext in '' $ac_executable_extensions; do 5425 for ac_exec_ext in '' $ac_executable_extensions; do
5320 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5426 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5321 ac_cv_path_LOGIN_PROGRAM_FALLBACK="$as_dir/$ac_word$ac_exec_ext" 5427 ac_cv_path_LOGIN_PROGRAM_FALLBACK="$as_dir/$ac_word$ac_exec_ext"
5322 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 5428 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5323 break 2 5429 break 2
5324 fi 5430 fi
5325done 5431done
5326done 5432 done
5327IFS=$as_save_IFS 5433IFS=$as_save_IFS
5328 5434
5329 ;; 5435 ;;
@@ -5331,11 +5437,11 @@ esac
5331fi 5437fi
5332LOGIN_PROGRAM_FALLBACK=$ac_cv_path_LOGIN_PROGRAM_FALLBACK 5438LOGIN_PROGRAM_FALLBACK=$ac_cv_path_LOGIN_PROGRAM_FALLBACK
5333if test -n "$LOGIN_PROGRAM_FALLBACK"; then 5439if test -n "$LOGIN_PROGRAM_FALLBACK"; then
5334 { echo "$as_me:$LINENO: result: $LOGIN_PROGRAM_FALLBACK" >&5 5440 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LOGIN_PROGRAM_FALLBACK" >&5
5335echo "${ECHO_T}$LOGIN_PROGRAM_FALLBACK" >&6; } 5441$as_echo "$LOGIN_PROGRAM_FALLBACK" >&6; }
5336else 5442else
5337 { echo "$as_me:$LINENO: result: no" >&5 5443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5338echo "${ECHO_T}no" >&6; } 5444$as_echo "no" >&6; }
5339fi 5445fi
5340 5446
5341 5447
@@ -5349,10 +5455,10 @@ fi
5349 5455
5350# Extract the first word of "passwd", so it can be a program name with args. 5456# Extract the first word of "passwd", so it can be a program name with args.
5351set dummy passwd; ac_word=$2 5457set dummy passwd; ac_word=$2
5352{ echo "$as_me:$LINENO: checking for $ac_word" >&5 5458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5353echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 5459$as_echo_n "checking for $ac_word... " >&6; }
5354if test "${ac_cv_path_PATH_PASSWD_PROG+set}" = set; then 5460if ${ac_cv_path_PATH_PASSWD_PROG+:} false; then :
5355 echo $ECHO_N "(cached) $ECHO_C" >&6 5461 $as_echo_n "(cached) " >&6
5356else 5462else
5357 case $PATH_PASSWD_PROG in 5463 case $PATH_PASSWD_PROG in
5358 [\\/]* | ?:[\\/]*) 5464 [\\/]* | ?:[\\/]*)
@@ -5364,14 +5470,14 @@ for as_dir in $PATH
5364do 5470do
5365 IFS=$as_save_IFS 5471 IFS=$as_save_IFS
5366 test -z "$as_dir" && as_dir=. 5472 test -z "$as_dir" && as_dir=.
5367 for ac_exec_ext in '' $ac_executable_extensions; do 5473 for ac_exec_ext in '' $ac_executable_extensions; do
5368 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 5474 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5369 ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext" 5475 ac_cv_path_PATH_PASSWD_PROG="$as_dir/$ac_word$ac_exec_ext"
5370 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 5476 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5371 break 2 5477 break 2
5372 fi 5478 fi
5373done 5479done
5374done 5480 done
5375IFS=$as_save_IFS 5481IFS=$as_save_IFS
5376 5482
5377 ;; 5483 ;;
@@ -5379,11 +5485,11 @@ esac
5379fi 5485fi
5380PATH_PASSWD_PROG=$ac_cv_path_PATH_PASSWD_PROG 5486PATH_PASSWD_PROG=$ac_cv_path_PATH_PASSWD_PROG
5381if test -n "$PATH_PASSWD_PROG"; then 5487if test -n "$PATH_PASSWD_PROG"; then
5382 { echo "$as_me:$LINENO: result: $PATH_PASSWD_PROG" >&5 5488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATH_PASSWD_PROG" >&5
5383echo "${ECHO_T}$PATH_PASSWD_PROG" >&6; } 5489$as_echo "$PATH_PASSWD_PROG" >&6; }
5384else 5490else
5385 { echo "$as_me:$LINENO: result: no" >&5 5491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5386echo "${ECHO_T}no" >&6; } 5492$as_echo "no" >&6; }
5387fi 5493fi
5388 5494
5389 5495
@@ -5400,18 +5506,14 @@ if test -z "$LD" ; then
5400fi 5506fi
5401 5507
5402 5508
5403{ echo "$as_me:$LINENO: checking for inline" >&5 5509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
5404echo $ECHO_N "checking for inline... $ECHO_C" >&6; } 5510$as_echo_n "checking for inline... " >&6; }
5405if test "${ac_cv_c_inline+set}" = set; then 5511if ${ac_cv_c_inline+:} false; then :
5406 echo $ECHO_N "(cached) $ECHO_C" >&6 5512 $as_echo_n "(cached) " >&6
5407else 5513else
5408 ac_cv_c_inline=no 5514 ac_cv_c_inline=no
5409for ac_kw in inline __inline__ __inline; do 5515for ac_kw in inline __inline__ __inline; do
5410 cat >conftest.$ac_ext <<_ACEOF 5516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5411/* confdefs.h. */
5412_ACEOF
5413cat confdefs.h >>conftest.$ac_ext
5414cat >>conftest.$ac_ext <<_ACEOF
5415/* end confdefs.h. */ 5517/* end confdefs.h. */
5416#ifndef __cplusplus 5518#ifndef __cplusplus
5417typedef int foo_t; 5519typedef int foo_t;
@@ -5420,39 +5522,16 @@ $ac_kw foo_t foo () {return 0; }
5420#endif 5522#endif
5421 5523
5422_ACEOF 5524_ACEOF
5423rm -f conftest.$ac_objext 5525if ac_fn_c_try_compile "$LINENO"; then :
5424if { (ac_try="$ac_compile"
5425case "(($ac_try" in
5426 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5427 *) ac_try_echo=$ac_try;;
5428esac
5429eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5430 (eval "$ac_compile") 2>conftest.er1
5431 ac_status=$?
5432 grep -v '^ *+' conftest.er1 >conftest.err
5433 rm -f conftest.er1
5434 cat conftest.err >&5
5435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5436 (exit $ac_status); } && {
5437 test -z "$ac_c_werror_flag" ||
5438 test ! -s conftest.err
5439 } && test -s conftest.$ac_objext; then
5440 ac_cv_c_inline=$ac_kw 5526 ac_cv_c_inline=$ac_kw
5441else
5442 echo "$as_me: failed program was:" >&5
5443sed 's/^/| /' conftest.$ac_ext >&5
5444
5445
5446fi 5527fi
5447
5448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5528rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5449 test "$ac_cv_c_inline" != no && break 5529 test "$ac_cv_c_inline" != no && break
5450done 5530done
5451 5531
5452fi 5532fi
5453{ echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 5533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
5454echo "${ECHO_T}$ac_cv_c_inline" >&6; } 5534$as_echo "$ac_cv_c_inline" >&6; }
5455
5456 5535
5457case $ac_cv_c_inline in 5536case $ac_cv_c_inline in
5458 inline | yes) ;; 5537 inline | yes) ;;
@@ -5470,68 +5549,38 @@ _ACEOF
5470esac 5549esac
5471 5550
5472 5551
5473{ echo "$as_me:$LINENO: checking whether LLONG_MAX is declared" >&5 5552ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
5474echo $ECHO_N "checking whether LLONG_MAX is declared... $ECHO_C" >&6; } 5553"
5475if test "${ac_cv_have_decl_LLONG_MAX+set}" = set; then 5554if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
5476 echo $ECHO_N "(cached) $ECHO_C" >&6 5555 have_llong_max=1
5477else 5556fi
5478 cat >conftest.$ac_ext <<_ACEOF
5479/* confdefs.h. */
5480_ACEOF
5481cat confdefs.h >>conftest.$ac_ext
5482cat >>conftest.$ac_ext <<_ACEOF
5483/* end confdefs.h. */
5484#include <limits.h>
5485
5486int
5487main ()
5488{
5489#ifndef LLONG_MAX
5490 (void) LLONG_MAX;
5491#endif
5492 5557
5493 ; 5558ac_fn_c_check_decl "$LINENO" "SYSTR_POLICY_KILL" "ac_cv_have_decl_SYSTR_POLICY_KILL" "
5494 return 0; 5559 #include <sys/types.h>
5495} 5560 #include <sys/param.h>
5496_ACEOF 5561 #include <dev/systrace.h>
5497rm -f conftest.$ac_objext
5498if { (ac_try="$ac_compile"
5499case "(($ac_try" in
5500 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5501 *) ac_try_echo=$ac_try;;
5502esac
5503eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5504 (eval "$ac_compile") 2>conftest.er1
5505 ac_status=$?
5506 grep -v '^ *+' conftest.er1 >conftest.err
5507 rm -f conftest.er1
5508 cat conftest.err >&5
5509 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5510 (exit $ac_status); } && {
5511 test -z "$ac_c_werror_flag" ||
5512 test ! -s conftest.err
5513 } && test -s conftest.$ac_objext; then
5514 ac_cv_have_decl_LLONG_MAX=yes
5515else
5516 echo "$as_me: failed program was:" >&5
5517sed 's/^/| /' conftest.$ac_ext >&5
5518 5562
5519 ac_cv_have_decl_LLONG_MAX=no 5563"
5564if test "x$ac_cv_have_decl_SYSTR_POLICY_KILL" = xyes; then :
5565 have_systr_policy_kill=1
5520fi 5566fi
5521 5567
5522rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5568ac_fn_c_check_decl "$LINENO" "RLIMIT_NPROC" "ac_cv_have_decl_RLIMIT_NPROC" "
5523fi 5569 #include <sys/types.h>
5524{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_LLONG_MAX" >&5 5570 #include <sys/resource.h>
5525echo "${ECHO_T}$ac_cv_have_decl_LLONG_MAX" >&6; } 5571
5526if test $ac_cv_have_decl_LLONG_MAX = yes; then 5572"
5527 have_llong_max=1 5573if test "x$ac_cv_have_decl_RLIMIT_NPROC" = xyes; then :
5574
5575$as_echo "#define HAVE_RLIMIT_NPROC /**/" >>confdefs.h
5576
5528fi 5577fi
5529 5578
5530 5579
5531use_stack_protector=1 5580use_stack_protector=1
5532 5581
5533# Check whether --with-stackprotect was given. 5582# Check whether --with-stackprotect was given.
5534if test "${with_stackprotect+set}" = set; then 5583if test "${with_stackprotect+set}" = set; then :
5535 withval=$with_stackprotect; 5584 withval=$with_stackprotect;
5536 if test "x$withval" = "xno"; then 5585 if test "x$withval" = "xno"; then
5537 use_stack_protector=0 5586 use_stack_protector=0
@@ -5542,319 +5591,191 @@ fi
5542 5591
5543if test "$GCC" = "yes" || test "$GCC" = "egcs"; then 5592if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
5544 { 5593 {
5545 { echo "$as_me:$LINENO: checking if $CC supports -Wall" >&5 5594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wall" >&5
5546echo $ECHO_N "checking if $CC supports -Wall... $ECHO_C" >&6; } 5595$as_echo_n "checking if $CC supports -Wall... " >&6; }
5547 saved_CFLAGS="$CFLAGS" 5596 saved_CFLAGS="$CFLAGS"
5548 CFLAGS="$CFLAGS -Wall" 5597 CFLAGS="$CFLAGS -Wall"
5549 cat >conftest.$ac_ext <<_ACEOF 5598 _define_flag=""
5550void main(void) { return 0; } 5599 test "x$_define_flag" = "x" && _define_flag="-Wall"
5600 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5601/* end confdefs.h. */
5602int main(void) { return 0; }
5551_ACEOF 5603_ACEOF
5552rm -f conftest.$ac_objext 5604if ac_fn_c_try_compile "$LINENO"; then :
5553if { (ac_try="$ac_compile" 5605 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5554case "(($ac_try" in 5606$as_echo "yes" >&6; }
5555 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5607 CFLAGS="$saved_CFLAGS $_define_flag"
5556 *) ac_try_echo=$ac_try;;
5557esac
5558eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5559 (eval "$ac_compile") 2>conftest.er1
5560 ac_status=$?
5561 grep -v '^ *+' conftest.er1 >conftest.err
5562 rm -f conftest.er1
5563 cat conftest.err >&5
5564 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5565 (exit $ac_status); } && {
5566 test -z "$ac_c_werror_flag" ||
5567 test ! -s conftest.err
5568 } && test -s conftest.$ac_objext; then
5569 { echo "$as_me:$LINENO: result: yes" >&5
5570echo "${ECHO_T}yes" >&6; }
5571else 5608else
5572 echo "$as_me: failed program was:" >&5 5609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5573sed 's/^/| /' conftest.$ac_ext >&5 5610$as_echo "no" >&6; }
5574
5575 { echo "$as_me:$LINENO: result: no" >&5
5576echo "${ECHO_T}no" >&6; }
5577 CFLAGS="$saved_CFLAGS" 5611 CFLAGS="$saved_CFLAGS"
5578 5612
5579fi 5613fi
5580
5581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5582} 5615}
5583 { 5616 {
5584 { echo "$as_me:$LINENO: checking if $CC supports -Wpointer-arith" >&5 5617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-arith" >&5
5585echo $ECHO_N "checking if $CC supports -Wpointer-arith... $ECHO_C" >&6; } 5618$as_echo_n "checking if $CC supports -Wpointer-arith... " >&6; }
5586 saved_CFLAGS="$CFLAGS" 5619 saved_CFLAGS="$CFLAGS"
5587 CFLAGS="$CFLAGS -Wpointer-arith" 5620 CFLAGS="$CFLAGS -Wpointer-arith"
5588 cat >conftest.$ac_ext <<_ACEOF 5621 _define_flag=""
5589void main(void) { return 0; } 5622 test "x$_define_flag" = "x" && _define_flag="-Wpointer-arith"
5623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5624/* end confdefs.h. */
5625int main(void) { return 0; }
5590_ACEOF 5626_ACEOF
5591rm -f conftest.$ac_objext 5627if ac_fn_c_try_compile "$LINENO"; then :
5592if { (ac_try="$ac_compile" 5628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5593case "(($ac_try" in 5629$as_echo "yes" >&6; }
5594 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5630 CFLAGS="$saved_CFLAGS $_define_flag"
5595 *) ac_try_echo=$ac_try;;
5596esac
5597eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5598 (eval "$ac_compile") 2>conftest.er1
5599 ac_status=$?
5600 grep -v '^ *+' conftest.er1 >conftest.err
5601 rm -f conftest.er1
5602 cat conftest.err >&5
5603 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5604 (exit $ac_status); } && {
5605 test -z "$ac_c_werror_flag" ||
5606 test ! -s conftest.err
5607 } && test -s conftest.$ac_objext; then
5608 { echo "$as_me:$LINENO: result: yes" >&5
5609echo "${ECHO_T}yes" >&6; }
5610else 5631else
5611 echo "$as_me: failed program was:" >&5 5632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5612sed 's/^/| /' conftest.$ac_ext >&5 5633$as_echo "no" >&6; }
5613
5614 { echo "$as_me:$LINENO: result: no" >&5
5615echo "${ECHO_T}no" >&6; }
5616 CFLAGS="$saved_CFLAGS" 5634 CFLAGS="$saved_CFLAGS"
5617 5635
5618fi 5636fi
5619
5620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5637rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5621} 5638}
5622 { 5639 {
5623 { echo "$as_me:$LINENO: checking if $CC supports -Wuninitialized" >&5 5640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wuninitialized" >&5
5624echo $ECHO_N "checking if $CC supports -Wuninitialized... $ECHO_C" >&6; } 5641$as_echo_n "checking if $CC supports -Wuninitialized... " >&6; }
5625 saved_CFLAGS="$CFLAGS" 5642 saved_CFLAGS="$CFLAGS"
5626 CFLAGS="$CFLAGS -Wuninitialized" 5643 CFLAGS="$CFLAGS -Wuninitialized"
5627 cat >conftest.$ac_ext <<_ACEOF 5644 _define_flag=""
5628void main(void) { return 0; } 5645 test "x$_define_flag" = "x" && _define_flag="-Wuninitialized"
5646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5647/* end confdefs.h. */
5648int main(void) { return 0; }
5629_ACEOF 5649_ACEOF
5630rm -f conftest.$ac_objext 5650if ac_fn_c_try_compile "$LINENO"; then :
5631if { (ac_try="$ac_compile" 5651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5632case "(($ac_try" in 5652$as_echo "yes" >&6; }
5633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5653 CFLAGS="$saved_CFLAGS $_define_flag"
5634 *) ac_try_echo=$ac_try;;
5635esac
5636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5637 (eval "$ac_compile") 2>conftest.er1
5638 ac_status=$?
5639 grep -v '^ *+' conftest.er1 >conftest.err
5640 rm -f conftest.er1
5641 cat conftest.err >&5
5642 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5643 (exit $ac_status); } && {
5644 test -z "$ac_c_werror_flag" ||
5645 test ! -s conftest.err
5646 } && test -s conftest.$ac_objext; then
5647 { echo "$as_me:$LINENO: result: yes" >&5
5648echo "${ECHO_T}yes" >&6; }
5649else 5654else
5650 echo "$as_me: failed program was:" >&5 5655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5651sed 's/^/| /' conftest.$ac_ext >&5 5656$as_echo "no" >&6; }
5652
5653 { echo "$as_me:$LINENO: result: no" >&5
5654echo "${ECHO_T}no" >&6; }
5655 CFLAGS="$saved_CFLAGS" 5657 CFLAGS="$saved_CFLAGS"
5656 5658
5657fi 5659fi
5658
5659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5660rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5660} 5661}
5661 { 5662 {
5662 { echo "$as_me:$LINENO: checking if $CC supports -Wsign-compare" >&5 5663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wsign-compare" >&5
5663echo $ECHO_N "checking if $CC supports -Wsign-compare... $ECHO_C" >&6; } 5664$as_echo_n "checking if $CC supports -Wsign-compare... " >&6; }
5664 saved_CFLAGS="$CFLAGS" 5665 saved_CFLAGS="$CFLAGS"
5665 CFLAGS="$CFLAGS -Wsign-compare" 5666 CFLAGS="$CFLAGS -Wsign-compare"
5666 cat >conftest.$ac_ext <<_ACEOF 5667 _define_flag=""
5667void main(void) { return 0; } 5668 test "x$_define_flag" = "x" && _define_flag="-Wsign-compare"
5669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5670/* end confdefs.h. */
5671int main(void) { return 0; }
5668_ACEOF 5672_ACEOF
5669rm -f conftest.$ac_objext 5673if ac_fn_c_try_compile "$LINENO"; then :
5670if { (ac_try="$ac_compile" 5674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5671case "(($ac_try" in 5675$as_echo "yes" >&6; }
5672 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5676 CFLAGS="$saved_CFLAGS $_define_flag"
5673 *) ac_try_echo=$ac_try;;
5674esac
5675eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5676 (eval "$ac_compile") 2>conftest.er1
5677 ac_status=$?
5678 grep -v '^ *+' conftest.er1 >conftest.err
5679 rm -f conftest.er1
5680 cat conftest.err >&5
5681 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5682 (exit $ac_status); } && {
5683 test -z "$ac_c_werror_flag" ||
5684 test ! -s conftest.err
5685 } && test -s conftest.$ac_objext; then
5686 { echo "$as_me:$LINENO: result: yes" >&5
5687echo "${ECHO_T}yes" >&6; }
5688else 5677else
5689 echo "$as_me: failed program was:" >&5 5678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5690sed 's/^/| /' conftest.$ac_ext >&5 5679$as_echo "no" >&6; }
5691
5692 { echo "$as_me:$LINENO: result: no" >&5
5693echo "${ECHO_T}no" >&6; }
5694 CFLAGS="$saved_CFLAGS" 5680 CFLAGS="$saved_CFLAGS"
5695 5681
5696fi 5682fi
5697
5698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5699} 5684}
5700 { 5685 {
5701 { echo "$as_me:$LINENO: checking if $CC supports -Wformat-security" >&5 5686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wformat-security" >&5
5702echo $ECHO_N "checking if $CC supports -Wformat-security... $ECHO_C" >&6; } 5687$as_echo_n "checking if $CC supports -Wformat-security... " >&6; }
5703 saved_CFLAGS="$CFLAGS" 5688 saved_CFLAGS="$CFLAGS"
5704 CFLAGS="$CFLAGS -Wformat-security" 5689 CFLAGS="$CFLAGS -Wformat-security"
5705 cat >conftest.$ac_ext <<_ACEOF 5690 _define_flag=""
5706void main(void) { return 0; } 5691 test "x$_define_flag" = "x" && _define_flag="-Wformat-security"
5692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5693/* end confdefs.h. */
5694int main(void) { return 0; }
5707_ACEOF 5695_ACEOF
5708rm -f conftest.$ac_objext 5696if ac_fn_c_try_compile "$LINENO"; then :
5709if { (ac_try="$ac_compile" 5697 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5710case "(($ac_try" in 5698$as_echo "yes" >&6; }
5711 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5699 CFLAGS="$saved_CFLAGS $_define_flag"
5712 *) ac_try_echo=$ac_try;;
5713esac
5714eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5715 (eval "$ac_compile") 2>conftest.er1
5716 ac_status=$?
5717 grep -v '^ *+' conftest.er1 >conftest.err
5718 rm -f conftest.er1
5719 cat conftest.err >&5
5720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5721 (exit $ac_status); } && {
5722 test -z "$ac_c_werror_flag" ||
5723 test ! -s conftest.err
5724 } && test -s conftest.$ac_objext; then
5725 { echo "$as_me:$LINENO: result: yes" >&5
5726echo "${ECHO_T}yes" >&6; }
5727else 5700else
5728 echo "$as_me: failed program was:" >&5 5701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5729sed 's/^/| /' conftest.$ac_ext >&5 5702$as_echo "no" >&6; }
5730
5731 { echo "$as_me:$LINENO: result: no" >&5
5732echo "${ECHO_T}no" >&6; }
5733 CFLAGS="$saved_CFLAGS" 5703 CFLAGS="$saved_CFLAGS"
5734 5704
5735fi 5705fi
5736
5737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5706rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5738} 5707}
5739 { 5708 {
5740 { echo "$as_me:$LINENO: checking if $CC supports -Wno-pointer-sign" >&5 5709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wpointer-sign" >&5
5741echo $ECHO_N "checking if $CC supports -Wno-pointer-sign... $ECHO_C" >&6; } 5710$as_echo_n "checking if $CC supports -Wpointer-sign... " >&6; }
5742 saved_CFLAGS="$CFLAGS" 5711 saved_CFLAGS="$CFLAGS"
5743 CFLAGS="$CFLAGS -Wno-pointer-sign" 5712 CFLAGS="$CFLAGS -Wpointer-sign"
5744 cat >conftest.$ac_ext <<_ACEOF 5713 _define_flag="-Wno-pointer-sign"
5745void main(void) { return 0; } 5714 test "x$_define_flag" = "x" && _define_flag="-Wpointer-sign"
5715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5716/* end confdefs.h. */
5717int main(void) { return 0; }
5746_ACEOF 5718_ACEOF
5747rm -f conftest.$ac_objext 5719if ac_fn_c_try_compile "$LINENO"; then :
5748if { (ac_try="$ac_compile" 5720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5749case "(($ac_try" in 5721$as_echo "yes" >&6; }
5750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5722 CFLAGS="$saved_CFLAGS $_define_flag"
5751 *) ac_try_echo=$ac_try;;
5752esac
5753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5754 (eval "$ac_compile") 2>conftest.er1
5755 ac_status=$?
5756 grep -v '^ *+' conftest.er1 >conftest.err
5757 rm -f conftest.er1
5758 cat conftest.err >&5
5759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5760 (exit $ac_status); } && {
5761 test -z "$ac_c_werror_flag" ||
5762 test ! -s conftest.err
5763 } && test -s conftest.$ac_objext; then
5764 { echo "$as_me:$LINENO: result: yes" >&5
5765echo "${ECHO_T}yes" >&6; }
5766else 5723else
5767 echo "$as_me: failed program was:" >&5 5724 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5768sed 's/^/| /' conftest.$ac_ext >&5 5725$as_echo "no" >&6; }
5769
5770 { echo "$as_me:$LINENO: result: no" >&5
5771echo "${ECHO_T}no" >&6; }
5772 CFLAGS="$saved_CFLAGS" 5726 CFLAGS="$saved_CFLAGS"
5773 5727
5774fi 5728fi
5775
5776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5729rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5777} 5730}
5778 { 5731 {
5779 { echo "$as_me:$LINENO: checking if $CC supports -Wno-unused-result" >&5 5732 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -Wunused-result" >&5
5780echo $ECHO_N "checking if $CC supports -Wno-unused-result... $ECHO_C" >&6; } 5733$as_echo_n "checking if $CC supports -Wunused-result... " >&6; }
5781 saved_CFLAGS="$CFLAGS" 5734 saved_CFLAGS="$CFLAGS"
5782 CFLAGS="$CFLAGS -Wno-unused-result" 5735 CFLAGS="$CFLAGS -Wunused-result"
5783 cat >conftest.$ac_ext <<_ACEOF 5736 _define_flag="-Wno-unused-result"
5784void main(void) { return 0; } 5737 test "x$_define_flag" = "x" && _define_flag="-Wunused-result"
5738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5739/* end confdefs.h. */
5740int main(void) { return 0; }
5785_ACEOF 5741_ACEOF
5786rm -f conftest.$ac_objext 5742if ac_fn_c_try_compile "$LINENO"; then :
5787if { (ac_try="$ac_compile" 5743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5788case "(($ac_try" in 5744$as_echo "yes" >&6; }
5789 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5745 CFLAGS="$saved_CFLAGS $_define_flag"
5790 *) ac_try_echo=$ac_try;;
5791esac
5792eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5793 (eval "$ac_compile") 2>conftest.er1
5794 ac_status=$?
5795 grep -v '^ *+' conftest.er1 >conftest.err
5796 rm -f conftest.er1
5797 cat conftest.err >&5
5798 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5799 (exit $ac_status); } && {
5800 test -z "$ac_c_werror_flag" ||
5801 test ! -s conftest.err
5802 } && test -s conftest.$ac_objext; then
5803 { echo "$as_me:$LINENO: result: yes" >&5
5804echo "${ECHO_T}yes" >&6; }
5805else 5746else
5806 echo "$as_me: failed program was:" >&5 5747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5807sed 's/^/| /' conftest.$ac_ext >&5 5748$as_echo "no" >&6; }
5808
5809 { echo "$as_me:$LINENO: result: no" >&5
5810echo "${ECHO_T}no" >&6; }
5811 CFLAGS="$saved_CFLAGS" 5749 CFLAGS="$saved_CFLAGS"
5812 5750
5813fi 5751fi
5814
5815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5816} 5753}
5817 { 5754 {
5818 { echo "$as_me:$LINENO: checking if $CC supports -fno-strict-aliasing" >&5 5755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports -fno-strict-aliasing" >&5
5819echo $ECHO_N "checking if $CC supports -fno-strict-aliasing... $ECHO_C" >&6; } 5756$as_echo_n "checking if $CC supports -fno-strict-aliasing... " >&6; }
5820 saved_CFLAGS="$CFLAGS" 5757 saved_CFLAGS="$CFLAGS"
5821 CFLAGS="$CFLAGS -fno-strict-aliasing" 5758 CFLAGS="$CFLAGS -fno-strict-aliasing"
5822 cat >conftest.$ac_ext <<_ACEOF 5759 _define_flag=""
5823void main(void) { return 0; } 5760 test "x$_define_flag" = "x" && _define_flag="-fno-strict-aliasing"
5761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5762/* end confdefs.h. */
5763int main(void) { return 0; }
5824_ACEOF 5764_ACEOF
5825rm -f conftest.$ac_objext 5765if ac_fn_c_try_compile "$LINENO"; then :
5826if { (ac_try="$ac_compile" 5766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5827case "(($ac_try" in 5767$as_echo "yes" >&6; }
5828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5768 CFLAGS="$saved_CFLAGS $_define_flag"
5829 *) ac_try_echo=$ac_try;;
5830esac
5831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5832 (eval "$ac_compile") 2>conftest.er1
5833 ac_status=$?
5834 grep -v '^ *+' conftest.er1 >conftest.err
5835 rm -f conftest.er1
5836 cat conftest.err >&5
5837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5838 (exit $ac_status); } && {
5839 test -z "$ac_c_werror_flag" ||
5840 test ! -s conftest.err
5841 } && test -s conftest.$ac_objext; then
5842 { echo "$as_me:$LINENO: result: yes" >&5
5843echo "${ECHO_T}yes" >&6; }
5844else 5769else
5845 echo "$as_me: failed program was:" >&5 5770 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5846sed 's/^/| /' conftest.$ac_ext >&5 5771$as_echo "no" >&6; }
5847
5848 { echo "$as_me:$LINENO: result: no" >&5
5849echo "${ECHO_T}no" >&6; }
5850 CFLAGS="$saved_CFLAGS" 5772 CFLAGS="$saved_CFLAGS"
5851 5773
5852fi 5774fi
5853
5854rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5855} 5776}
5856 { echo "$as_me:$LINENO: checking gcc version" >&5 5777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking gcc version" >&5
5857echo $ECHO_N "checking gcc version... $ECHO_C" >&6; } 5778$as_echo_n "checking gcc version... " >&6; }
5858 GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'` 5779 GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`
5859 case $GCC_VER in 5780 case $GCC_VER in
5860 1.*) no_attrib_nonnull=1 ;; 5781 1.*) no_attrib_nonnull=1 ;;
@@ -5864,168 +5785,108 @@ echo $ECHO_N "checking gcc version... $ECHO_C" >&6; }
5864 2.*) no_attrib_nonnull=1 ;; 5785 2.*) no_attrib_nonnull=1 ;;
5865 *) ;; 5786 *) ;;
5866 esac 5787 esac
5867 { echo "$as_me:$LINENO: result: $GCC_VER" >&5 5788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GCC_VER" >&5
5868echo "${ECHO_T}$GCC_VER" >&6; } 5789$as_echo "$GCC_VER" >&6; }
5869 5790
5870 { echo "$as_me:$LINENO: checking if $CC accepts -fno-builtin-memset" >&5 5791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC accepts -fno-builtin-memset" >&5
5871echo $ECHO_N "checking if $CC accepts -fno-builtin-memset... $ECHO_C" >&6; } 5792$as_echo_n "checking if $CC accepts -fno-builtin-memset... " >&6; }
5872 saved_CFLAGS="$CFLAGS" 5793 saved_CFLAGS="$CFLAGS"
5873 CFLAGS="$CFLAGS -fno-builtin-memset" 5794 CFLAGS="$CFLAGS -fno-builtin-memset"
5874 cat >conftest.$ac_ext <<_ACEOF 5795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5875/* confdefs.h. */
5876_ACEOF
5877cat confdefs.h >>conftest.$ac_ext
5878cat >>conftest.$ac_ext <<_ACEOF
5879/* end confdefs.h. */ 5796/* end confdefs.h. */
5880 5797 #include <string.h>
5881#include <string.h> 5798int
5882int main(void){char b[10]; memset(b, 0, sizeof(b));} 5799main ()
5883 5800{
5801 char b[10]; memset(b, 0, sizeof(b));
5802 ;
5803 return 0;
5804}
5884_ACEOF 5805_ACEOF
5885rm -f conftest.$ac_objext conftest$ac_exeext 5806if ac_fn_c_try_link "$LINENO"; then :
5886if { (ac_try="$ac_link" 5807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5887case "(($ac_try" in 5808$as_echo "yes" >&6; }
5888 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5889 *) ac_try_echo=$ac_try;;
5890esac
5891eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5892 (eval "$ac_link") 2>conftest.er1
5893 ac_status=$?
5894 grep -v '^ *+' conftest.er1 >conftest.err
5895 rm -f conftest.er1
5896 cat conftest.err >&5
5897 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5898 (exit $ac_status); } && {
5899 test -z "$ac_c_werror_flag" ||
5900 test ! -s conftest.err
5901 } && test -s conftest$ac_exeext &&
5902 $as_test_x conftest$ac_exeext; then
5903 { echo "$as_me:$LINENO: result: yes" >&5
5904echo "${ECHO_T}yes" >&6; }
5905else 5809else
5906 echo "$as_me: failed program was:" >&5 5810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5907sed 's/^/| /' conftest.$ac_ext >&5 5811$as_echo "no" >&6; }
5908
5909 { echo "$as_me:$LINENO: result: no" >&5
5910echo "${ECHO_T}no" >&6; }
5911 CFLAGS="$saved_CFLAGS" 5812 CFLAGS="$saved_CFLAGS"
5912 5813
5913fi 5814fi
5914 5815rm -f core conftest.err conftest.$ac_objext \
5915rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 5816 conftest$ac_exeext conftest.$ac_ext
5916 conftest$ac_exeext conftest.$ac_ext
5917 5817
5918 # -fstack-protector-all doesn't always work for some GCC versions 5818 # -fstack-protector-all doesn't always work for some GCC versions
5919 # and/or platforms, so we test if we can. If it's not supported 5819 # and/or platforms, so we test if we can. If it's not supported
5920 # on a given platform gcc will emit a warning so we use -Werror. 5820 # on a given platform gcc will emit a warning so we use -Werror.
5921 if test "x$use_stack_protector" = "x1"; then 5821 if test "x$use_stack_protector" = "x1"; then
5922 for t in -fstack-protector-all -fstack-protector; do 5822 for t in -fstack-protector-all -fstack-protector; do
5923 { echo "$as_me:$LINENO: checking if $CC supports $t" >&5 5823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC supports $t" >&5
5924echo $ECHO_N "checking if $CC supports $t... $ECHO_C" >&6; } 5824$as_echo_n "checking if $CC supports $t... " >&6; }
5925 saved_CFLAGS="$CFLAGS" 5825 saved_CFLAGS="$CFLAGS"
5926 saved_LDFLAGS="$LDFLAGS" 5826 saved_LDFLAGS="$LDFLAGS"
5927 CFLAGS="$CFLAGS $t -Werror" 5827 CFLAGS="$CFLAGS $t -Werror"
5928 LDFLAGS="$LDFLAGS $t -Werror" 5828 LDFLAGS="$LDFLAGS $t -Werror"
5929 cat >conftest.$ac_ext <<_ACEOF 5829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5930/* confdefs.h. */
5931_ACEOF
5932cat confdefs.h >>conftest.$ac_ext
5933cat >>conftest.$ac_ext <<_ACEOF
5934/* end confdefs.h. */ 5830/* end confdefs.h. */
5831 #include <stdio.h>
5832int
5833main ()
5834{
5935 5835
5936#include <stdio.h> 5836 char x[256];
5937int main(void){char x[256]; snprintf(x, sizeof(x), "XXX"); return 0;} 5837 snprintf(x, sizeof(x), "XXX");
5938 5838
5839 ;
5840 return 0;
5841}
5939_ACEOF 5842_ACEOF
5940rm -f conftest.$ac_objext conftest$ac_exeext 5843if ac_fn_c_try_link "$LINENO"; then :
5941if { (ac_try="$ac_link" 5844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5942case "(($ac_try" in 5845$as_echo "yes" >&6; }
5943 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5944 *) ac_try_echo=$ac_try;;
5945esac
5946eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5947 (eval "$ac_link") 2>conftest.er1
5948 ac_status=$?
5949 grep -v '^ *+' conftest.er1 >conftest.err
5950 rm -f conftest.er1
5951 cat conftest.err >&5
5952 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5953 (exit $ac_status); } && {
5954 test -z "$ac_c_werror_flag" ||
5955 test ! -s conftest.err
5956 } && test -s conftest$ac_exeext &&
5957 $as_test_x conftest$ac_exeext; then
5958 { echo "$as_me:$LINENO: result: yes" >&5
5959echo "${ECHO_T}yes" >&6; }
5960 CFLAGS="$saved_CFLAGS $t" 5846 CFLAGS="$saved_CFLAGS $t"
5961 LDFLAGS="$saved_LDFLAGS $t" 5847 LDFLAGS="$saved_LDFLAGS $t"
5962 { echo "$as_me:$LINENO: checking if $t works" >&5 5848 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $t works" >&5
5963echo $ECHO_N "checking if $t works... $ECHO_C" >&6; } 5849$as_echo_n "checking if $t works... " >&6; }
5964 if test "$cross_compiling" = yes; then 5850 if test "$cross_compiling" = yes; then :
5965 { echo "$as_me:$LINENO: WARNING: cross compiling: cannot test" >&5 5851 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: cannot test" >&5
5966echo "$as_me: WARNING: cross compiling: cannot test" >&2;} 5852$as_echo "$as_me: WARNING: cross compiling: cannot test" >&2;}
5967 break 5853 break
5968 5854
5969else 5855else
5970 cat >conftest.$ac_ext <<_ACEOF 5856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5971/* confdefs.h. */
5972_ACEOF
5973cat confdefs.h >>conftest.$ac_ext
5974cat >>conftest.$ac_ext <<_ACEOF
5975/* end confdefs.h. */ 5857/* end confdefs.h. */
5858 #include <stdio.h>
5859int
5860main ()
5861{
5976 5862
5977#include <stdio.h> 5863 char x[256];
5978int main(void){char x[256]; snprintf(x, sizeof(x), "XXX"); return 0;} 5864 snprintf(x, sizeof(x), "XXX");
5979 5865
5866 ;
5867 return 0;
5868}
5980_ACEOF 5869_ACEOF
5981rm -f conftest$ac_exeext 5870if ac_fn_c_try_run "$LINENO"; then :
5982if { (ac_try="$ac_link" 5871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5983case "(($ac_try" in 5872$as_echo "yes" >&6; }
5984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5985 *) ac_try_echo=$ac_try;;
5986esac
5987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5988 (eval "$ac_link") 2>&5
5989 ac_status=$?
5990 echo "$as_me:$LINENO: \$? = $ac_status" >&5
5991 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5992 { (case "(($ac_try" in
5993 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5994 *) ac_try_echo=$ac_try;;
5995esac
5996eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
5997 (eval "$ac_try") 2>&5
5998 ac_status=$?
5999 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6000 (exit $ac_status); }; }; then
6001 { echo "$as_me:$LINENO: result: yes" >&5
6002echo "${ECHO_T}yes" >&6; }
6003 break 5873 break
6004else 5874else
6005 echo "$as_me: program exited with status $ac_status" >&5 5875 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6006echo "$as_me: failed program was:" >&5 5876$as_echo "no" >&6; }
6007sed 's/^/| /' conftest.$ac_ext >&5
6008
6009( exit $ac_status )
6010 { echo "$as_me:$LINENO: result: no" >&5
6011echo "${ECHO_T}no" >&6; }
6012fi 5877fi
6013rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 5878rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5879 conftest.$ac_objext conftest.beam conftest.$ac_ext
6014fi 5880fi
6015 5881
6016 5882
6017
6018else 5883else
6019 echo "$as_me: failed program was:" >&5 5884 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6020sed 's/^/| /' conftest.$ac_ext >&5 5885$as_echo "no" >&6; }
6021
6022 { echo "$as_me:$LINENO: result: no" >&5
6023echo "${ECHO_T}no" >&6; }
6024 5886
6025fi 5887fi
6026 5888rm -f core conftest.err conftest.$ac_objext \
6027rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 5889 conftest$ac_exeext conftest.$ac_ext
6028 conftest$ac_exeext conftest.$ac_ext
6029 CFLAGS="$saved_CFLAGS" 5890 CFLAGS="$saved_CFLAGS"
6030 LDFLAGS="$saved_LDFLAGS" 5891 LDFLAGS="$saved_LDFLAGS"
6031 done 5892 done
@@ -6036,61 +5897,10 @@ rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6036 unset ac_cv_have_decl_LLONG_MAX 5897 unset ac_cv_have_decl_LLONG_MAX
6037 saved_CFLAGS="$CFLAGS" 5898 saved_CFLAGS="$CFLAGS"
6038 CFLAGS="$CFLAGS -std=gnu99" 5899 CFLAGS="$CFLAGS -std=gnu99"
6039 { echo "$as_me:$LINENO: checking whether LLONG_MAX is declared" >&5 5900 ac_fn_c_check_decl "$LINENO" "LLONG_MAX" "ac_cv_have_decl_LLONG_MAX" "#include <limits.h>
6040echo $ECHO_N "checking whether LLONG_MAX is declared... $ECHO_C" >&6; }
6041if test "${ac_cv_have_decl_LLONG_MAX+set}" = set; then
6042 echo $ECHO_N "(cached) $ECHO_C" >&6
6043else
6044 cat >conftest.$ac_ext <<_ACEOF
6045/* confdefs.h. */
6046_ACEOF
6047cat confdefs.h >>conftest.$ac_ext
6048cat >>conftest.$ac_ext <<_ACEOF
6049/* end confdefs.h. */
6050#include <limits.h>
6051 5901
6052 5902"
6053int 5903if test "x$ac_cv_have_decl_LLONG_MAX" = xyes; then :
6054main ()
6055{
6056#ifndef LLONG_MAX
6057 (void) LLONG_MAX;
6058#endif
6059
6060 ;
6061 return 0;
6062}
6063_ACEOF
6064rm -f conftest.$ac_objext
6065if { (ac_try="$ac_compile"
6066case "(($ac_try" in
6067 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6068 *) ac_try_echo=$ac_try;;
6069esac
6070eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6071 (eval "$ac_compile") 2>conftest.er1
6072 ac_status=$?
6073 grep -v '^ *+' conftest.er1 >conftest.err
6074 rm -f conftest.er1
6075 cat conftest.err >&5
6076 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6077 (exit $ac_status); } && {
6078 test -z "$ac_c_werror_flag" ||
6079 test ! -s conftest.err
6080 } && test -s conftest.$ac_objext; then
6081 ac_cv_have_decl_LLONG_MAX=yes
6082else
6083 echo "$as_me: failed program was:" >&5
6084sed 's/^/| /' conftest.$ac_ext >&5
6085
6086 ac_cv_have_decl_LLONG_MAX=no
6087fi
6088
6089rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6090fi
6091{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_LLONG_MAX" >&5
6092echo "${ECHO_T}$ac_cv_have_decl_LLONG_MAX" >&6; }
6093if test $ac_cv_have_decl_LLONG_MAX = yes; then
6094 have_llong_max=1 5904 have_llong_max=1
6095else 5905else
6096 CFLAGS="$saved_CFLAGS" 5906 CFLAGS="$saved_CFLAGS"
@@ -6101,15 +5911,13 @@ fi
6101 5911
6102if test "x$no_attrib_nonnull" != "x1" ; then 5912if test "x$no_attrib_nonnull" != "x1" ; then
6103 5913
6104cat >>confdefs.h <<\_ACEOF 5914$as_echo "#define HAVE_ATTRIBUTE__NONNULL__ 1" >>confdefs.h
6105#define HAVE_ATTRIBUTE__NONNULL__ 1
6106_ACEOF
6107 5915
6108fi 5916fi
6109 5917
6110 5918
6111# Check whether --with-rpath was given. 5919# Check whether --with-rpath was given.
6112if test "${with_rpath+set}" = set; then 5920if test "${with_rpath+set}" = set; then :
6113 withval=$with_rpath; 5921 withval=$with_rpath;
6114 if test "x$withval" = "xno" ; then 5922 if test "x$withval" = "xno" ; then
6115 need_dash_r="" 5923 need_dash_r=""
@@ -6125,7 +5933,7 @@ fi
6125# Allow user to specify flags 5933# Allow user to specify flags
6126 5934
6127# Check whether --with-cflags was given. 5935# Check whether --with-cflags was given.
6128if test "${with_cflags+set}" = set; then 5936if test "${with_cflags+set}" = set; then :
6129 withval=$with_cflags; 5937 withval=$with_cflags;
6130 if test -n "$withval" && test "x$withval" != "xno" && \ 5938 if test -n "$withval" && test "x$withval" != "xno" && \
6131 test "x${withval}" != "xyes"; then 5939 test "x${withval}" != "xyes"; then
@@ -6137,7 +5945,7 @@ fi
6137 5945
6138 5946
6139# Check whether --with-cppflags was given. 5947# Check whether --with-cppflags was given.
6140if test "${with_cppflags+set}" = set; then 5948if test "${with_cppflags+set}" = set; then :
6141 withval=$with_cppflags; 5949 withval=$with_cppflags;
6142 if test -n "$withval" && test "x$withval" != "xno" && \ 5950 if test -n "$withval" && test "x$withval" != "xno" && \
6143 test "x${withval}" != "xyes"; then 5951 test "x${withval}" != "xyes"; then
@@ -6149,7 +5957,7 @@ fi
6149 5957
6150 5958
6151# Check whether --with-ldflags was given. 5959# Check whether --with-ldflags was given.
6152if test "${with_ldflags+set}" = set; then 5960if test "${with_ldflags+set}" = set; then :
6153 withval=$with_ldflags; 5961 withval=$with_ldflags;
6154 if test -n "$withval" && test "x$withval" != "xno" && \ 5962 if test -n "$withval" && test "x$withval" != "xno" && \
6155 test "x${withval}" != "xyes"; then 5963 test "x${withval}" != "xyes"; then
@@ -6161,7 +5969,7 @@ fi
6161 5969
6162 5970
6163# Check whether --with-libs was given. 5971# Check whether --with-libs was given.
6164if test "${with_libs+set}" = set; then 5972if test "${with_libs+set}" = set; then :
6165 withval=$with_libs; 5973 withval=$with_libs;
6166 if test -n "$withval" && test "x$withval" != "xno" && \ 5974 if test -n "$withval" && test "x$withval" != "xno" && \
6167 test "x${withval}" != "xyes"; then 5975 test "x${withval}" != "xyes"; then
@@ -6173,7 +5981,7 @@ fi
6173 5981
6174 5982
6175# Check whether --with-Werror was given. 5983# Check whether --with-Werror was given.
6176if test "${with_Werror+set}" = set; then 5984if test "${with_Werror+set}" = set; then :
6177 withval=$with_Werror; 5985 withval=$with_Werror;
6178 if test -n "$withval" && test "x$withval" != "xno"; then 5986 if test -n "$withval" && test "x$withval" != "xno"; then
6179 werror_flags="-Werror" 5987 werror_flags="-Werror"
@@ -6186,70 +5994,7 @@ if test "${with_Werror+set}" = set; then
6186fi 5994fi
6187 5995
6188 5996
6189 5997for ac_header in \
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252for ac_header in \
6253 bstring.h \ 5998 bstring.h \
6254 crypt.h \ 5999 crypt.h \
6255 crypto/sha2.h \ 6000 crypto/sha2.h \
@@ -6314,143 +6059,12 @@ for ac_header in \
6314 utmpx.h \ 6059 utmpx.h \
6315 vis.h \ 6060 vis.h \
6316 6061
6317do 6062do :
6318as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 6063 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6319if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 6064ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
6320 { echo "$as_me:$LINENO: checking for $ac_header" >&5 6065if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6321echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6322if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6323 echo $ECHO_N "(cached) $ECHO_C" >&6
6324fi
6325ac_res=`eval echo '${'$as_ac_Header'}'`
6326 { echo "$as_me:$LINENO: result: $ac_res" >&5
6327echo "${ECHO_T}$ac_res" >&6; }
6328else
6329 # Is the header compilable?
6330{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
6331echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
6332cat >conftest.$ac_ext <<_ACEOF
6333/* confdefs.h. */
6334_ACEOF
6335cat confdefs.h >>conftest.$ac_ext
6336cat >>conftest.$ac_ext <<_ACEOF
6337/* end confdefs.h. */
6338$ac_includes_default
6339#include <$ac_header>
6340_ACEOF
6341rm -f conftest.$ac_objext
6342if { (ac_try="$ac_compile"
6343case "(($ac_try" in
6344 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6345 *) ac_try_echo=$ac_try;;
6346esac
6347eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6348 (eval "$ac_compile") 2>conftest.er1
6349 ac_status=$?
6350 grep -v '^ *+' conftest.er1 >conftest.err
6351 rm -f conftest.er1
6352 cat conftest.err >&5
6353 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6354 (exit $ac_status); } && {
6355 test -z "$ac_c_werror_flag" ||
6356 test ! -s conftest.err
6357 } && test -s conftest.$ac_objext; then
6358 ac_header_compiler=yes
6359else
6360 echo "$as_me: failed program was:" >&5
6361sed 's/^/| /' conftest.$ac_ext >&5
6362
6363 ac_header_compiler=no
6364fi
6365
6366rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6367{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
6368echo "${ECHO_T}$ac_header_compiler" >&6; }
6369
6370# Is the header present?
6371{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
6372echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
6373cat >conftest.$ac_ext <<_ACEOF
6374/* confdefs.h. */
6375_ACEOF
6376cat confdefs.h >>conftest.$ac_ext
6377cat >>conftest.$ac_ext <<_ACEOF
6378/* end confdefs.h. */
6379#include <$ac_header>
6380_ACEOF
6381if { (ac_try="$ac_cpp conftest.$ac_ext"
6382case "(($ac_try" in
6383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6384 *) ac_try_echo=$ac_try;;
6385esac
6386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6387 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
6388 ac_status=$?
6389 grep -v '^ *+' conftest.er1 >conftest.err
6390 rm -f conftest.er1
6391 cat conftest.err >&5
6392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6393 (exit $ac_status); } >/dev/null && {
6394 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
6395 test ! -s conftest.err
6396 }; then
6397 ac_header_preproc=yes
6398else
6399 echo "$as_me: failed program was:" >&5
6400sed 's/^/| /' conftest.$ac_ext >&5
6401
6402 ac_header_preproc=no
6403fi
6404
6405rm -f conftest.err conftest.$ac_ext
6406{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
6407echo "${ECHO_T}$ac_header_preproc" >&6; }
6408
6409# So? What about this header?
6410case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
6411 yes:no: )
6412 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
6413echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
6414 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
6415echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
6416 ac_header_preproc=yes
6417 ;;
6418 no:yes:* )
6419 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
6420echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
6421 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
6422echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
6423 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
6424echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
6425 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
6426echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
6427 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
6428echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
6429 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
6430echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
6431 ( cat <<\_ASBOX
6432## ------------------------------------------- ##
6433## Report this to openssh-unix-dev@mindrot.org ##
6434## ------------------------------------------- ##
6435_ASBOX
6436 ) | sed "s/^/$as_me: WARNING: /" >&2
6437 ;;
6438esac
6439{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6440echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6441if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6442 echo $ECHO_N "(cached) $ECHO_C" >&6
6443else
6444 eval "$as_ac_Header=\$ac_header_preproc"
6445fi
6446ac_res=`eval echo '${'$as_ac_Header'}'`
6447 { echo "$as_me:$LINENO: result: $ac_res" >&5
6448echo "${ECHO_T}$ac_res" >&6; }
6449
6450fi
6451if test `eval echo '${'$as_ac_Header'}'` = yes; then
6452 cat >>confdefs.h <<_ACEOF 6066 cat >>confdefs.h <<_ACEOF
6453#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 6067#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6454_ACEOF 6068_ACEOF
6455 6069
6456fi 6070fi
@@ -6459,62 +6073,17 @@ done
6459 6073
6460 6074
6461# lastlog.h requires sys/time.h to be included first on Solaris 6075# lastlog.h requires sys/time.h to be included first on Solaris
6462
6463for ac_header in lastlog.h 6076for ac_header in lastlog.h
6464do 6077do :
6465as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 6078 ac_fn_c_check_header_compile "$LINENO" "lastlog.h" "ac_cv_header_lastlog_h" "
6466{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6467echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6468if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6469 echo $ECHO_N "(cached) $ECHO_C" >&6
6470else
6471 cat >conftest.$ac_ext <<_ACEOF
6472/* confdefs.h. */
6473_ACEOF
6474cat confdefs.h >>conftest.$ac_ext
6475cat >>conftest.$ac_ext <<_ACEOF
6476/* end confdefs.h. */
6477
6478#ifdef HAVE_SYS_TIME_H 6079#ifdef HAVE_SYS_TIME_H
6479# include <sys/time.h> 6080# include <sys/time.h>
6480#endif 6081#endif
6481 6082
6482 6083"
6483#include <$ac_header> 6084if test "x$ac_cv_header_lastlog_h" = xyes; then :
6484_ACEOF
6485rm -f conftest.$ac_objext
6486if { (ac_try="$ac_compile"
6487case "(($ac_try" in
6488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6489 *) ac_try_echo=$ac_try;;
6490esac
6491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6492 (eval "$ac_compile") 2>conftest.er1
6493 ac_status=$?
6494 grep -v '^ *+' conftest.er1 >conftest.err
6495 rm -f conftest.er1
6496 cat conftest.err >&5
6497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6498 (exit $ac_status); } && {
6499 test -z "$ac_c_werror_flag" ||
6500 test ! -s conftest.err
6501 } && test -s conftest.$ac_objext; then
6502 eval "$as_ac_Header=yes"
6503else
6504 echo "$as_me: failed program was:" >&5
6505sed 's/^/| /' conftest.$ac_ext >&5
6506
6507 eval "$as_ac_Header=no"
6508fi
6509
6510rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6511fi
6512ac_res=`eval echo '${'$as_ac_Header'}'`
6513 { echo "$as_me:$LINENO: result: $ac_res" >&5
6514echo "${ECHO_T}$ac_res" >&6; }
6515if test `eval echo '${'$as_ac_Header'}'` = yes; then
6516 cat >>confdefs.h <<_ACEOF 6085 cat >>confdefs.h <<_ACEOF
6517#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 6086#define HAVE_LASTLOG_H 1
6518_ACEOF 6087_ACEOF
6519 6088
6520fi 6089fi
@@ -6523,62 +6092,17 @@ done
6523 6092
6524 6093
6525# sys/ptms.h requires sys/stream.h to be included first on Solaris 6094# sys/ptms.h requires sys/stream.h to be included first on Solaris
6526
6527for ac_header in sys/ptms.h 6095for ac_header in sys/ptms.h
6528do 6096do :
6529as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 6097 ac_fn_c_check_header_compile "$LINENO" "sys/ptms.h" "ac_cv_header_sys_ptms_h" "
6530{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6531echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6532if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6533 echo $ECHO_N "(cached) $ECHO_C" >&6
6534else
6535 cat >conftest.$ac_ext <<_ACEOF
6536/* confdefs.h. */
6537_ACEOF
6538cat confdefs.h >>conftest.$ac_ext
6539cat >>conftest.$ac_ext <<_ACEOF
6540/* end confdefs.h. */
6541
6542#ifdef HAVE_SYS_STREAM_H 6098#ifdef HAVE_SYS_STREAM_H
6543# include <sys/stream.h> 6099# include <sys/stream.h>
6544#endif 6100#endif
6545 6101
6546 6102"
6547#include <$ac_header> 6103if test "x$ac_cv_header_sys_ptms_h" = xyes; then :
6548_ACEOF
6549rm -f conftest.$ac_objext
6550if { (ac_try="$ac_compile"
6551case "(($ac_try" in
6552 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6553 *) ac_try_echo=$ac_try;;
6554esac
6555eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6556 (eval "$ac_compile") 2>conftest.er1
6557 ac_status=$?
6558 grep -v '^ *+' conftest.er1 >conftest.err
6559 rm -f conftest.er1
6560 cat conftest.err >&5
6561 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6562 (exit $ac_status); } && {
6563 test -z "$ac_c_werror_flag" ||
6564 test ! -s conftest.err
6565 } && test -s conftest.$ac_objext; then
6566 eval "$as_ac_Header=yes"
6567else
6568 echo "$as_me: failed program was:" >&5
6569sed 's/^/| /' conftest.$ac_ext >&5
6570
6571 eval "$as_ac_Header=no"
6572fi
6573
6574rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6575fi
6576ac_res=`eval echo '${'$as_ac_Header'}'`
6577 { echo "$as_me:$LINENO: result: $ac_res" >&5
6578echo "${ECHO_T}$ac_res" >&6; }
6579if test `eval echo '${'$as_ac_Header'}'` = yes; then
6580 cat >>confdefs.h <<_ACEOF 6104 cat >>confdefs.h <<_ACEOF
6581#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 6105#define HAVE_SYS_PTMS_H 1
6582_ACEOF 6106_ACEOF
6583 6107
6584fi 6108fi
@@ -6587,60 +6111,15 @@ done
6587 6111
6588 6112
6589# login_cap.h requires sys/types.h on NetBSD 6113# login_cap.h requires sys/types.h on NetBSD
6590
6591for ac_header in login_cap.h 6114for ac_header in login_cap.h
6592do 6115do :
6593as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 6116 ac_fn_c_check_header_compile "$LINENO" "login_cap.h" "ac_cv_header_login_cap_h" "
6594{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6595echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6596if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6597 echo $ECHO_N "(cached) $ECHO_C" >&6
6598else
6599 cat >conftest.$ac_ext <<_ACEOF
6600/* confdefs.h. */
6601_ACEOF
6602cat confdefs.h >>conftest.$ac_ext
6603cat >>conftest.$ac_ext <<_ACEOF
6604/* end confdefs.h. */
6605
6606#include <sys/types.h> 6117#include <sys/types.h>
6607 6118
6608 6119"
6609#include <$ac_header> 6120if test "x$ac_cv_header_login_cap_h" = xyes; then :
6610_ACEOF
6611rm -f conftest.$ac_objext
6612if { (ac_try="$ac_compile"
6613case "(($ac_try" in
6614 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6615 *) ac_try_echo=$ac_try;;
6616esac
6617eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6618 (eval "$ac_compile") 2>conftest.er1
6619 ac_status=$?
6620 grep -v '^ *+' conftest.er1 >conftest.err
6621 rm -f conftest.er1
6622 cat conftest.err >&5
6623 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6624 (exit $ac_status); } && {
6625 test -z "$ac_c_werror_flag" ||
6626 test ! -s conftest.err
6627 } && test -s conftest.$ac_objext; then
6628 eval "$as_ac_Header=yes"
6629else
6630 echo "$as_me: failed program was:" >&5
6631sed 's/^/| /' conftest.$ac_ext >&5
6632
6633 eval "$as_ac_Header=no"
6634fi
6635
6636rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6637fi
6638ac_res=`eval echo '${'$as_ac_Header'}'`
6639 { echo "$as_me:$LINENO: result: $ac_res" >&5
6640echo "${ECHO_T}$ac_res" >&6; }
6641if test `eval echo '${'$as_ac_Header'}'` = yes; then
6642 cat >>confdefs.h <<_ACEOF 6121 cat >>confdefs.h <<_ACEOF
6643#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 6122#define HAVE_LOGIN_CAP_H 1
6644_ACEOF 6123_ACEOF
6645 6124
6646fi 6125fi
@@ -6649,60 +6128,15 @@ done
6649 6128
6650 6129
6651# older BSDs need sys/param.h before sys/mount.h 6130# older BSDs need sys/param.h before sys/mount.h
6652
6653for ac_header in sys/mount.h 6131for ac_header in sys/mount.h
6654do 6132do :
6655as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 6133 ac_fn_c_check_header_compile "$LINENO" "sys/mount.h" "ac_cv_header_sys_mount_h" "
6656{ echo "$as_me:$LINENO: checking for $ac_header" >&5
6657echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
6658if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
6659 echo $ECHO_N "(cached) $ECHO_C" >&6
6660else
6661 cat >conftest.$ac_ext <<_ACEOF
6662/* confdefs.h. */
6663_ACEOF
6664cat confdefs.h >>conftest.$ac_ext
6665cat >>conftest.$ac_ext <<_ACEOF
6666/* end confdefs.h. */
6667
6668#include <sys/param.h> 6134#include <sys/param.h>
6669 6135
6670 6136"
6671#include <$ac_header> 6137if test "x$ac_cv_header_sys_mount_h" = xyes; then :
6672_ACEOF
6673rm -f conftest.$ac_objext
6674if { (ac_try="$ac_compile"
6675case "(($ac_try" in
6676 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6677 *) ac_try_echo=$ac_try;;
6678esac
6679eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6680 (eval "$ac_compile") 2>conftest.er1
6681 ac_status=$?
6682 grep -v '^ *+' conftest.er1 >conftest.err
6683 rm -f conftest.er1
6684 cat conftest.err >&5
6685 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6686 (exit $ac_status); } && {
6687 test -z "$ac_c_werror_flag" ||
6688 test ! -s conftest.err
6689 } && test -s conftest.$ac_objext; then
6690 eval "$as_ac_Header=yes"
6691else
6692 echo "$as_me: failed program was:" >&5
6693sed 's/^/| /' conftest.$ac_ext >&5
6694
6695 eval "$as_ac_Header=no"
6696fi
6697
6698rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6699fi
6700ac_res=`eval echo '${'$as_ac_Header'}'`
6701 { echo "$as_me:$LINENO: result: $ac_res" >&5
6702echo "${ECHO_T}$ac_res" >&6; }
6703if test `eval echo '${'$as_ac_Header'}'` = yes; then
6704 cat >>confdefs.h <<_ACEOF 6138 cat >>confdefs.h <<_ACEOF
6705#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 6139#define HAVE_SYS_MOUNT_H 1
6706_ACEOF 6140_ACEOF
6707 6141
6708fi 6142fi
@@ -6723,45 +6157,27 @@ case "$host" in
6723 # particularly with older versions of vac or xlc. 6157 # particularly with older versions of vac or xlc.
6724 # It also throws errors about null macro argments, but these are 6158 # It also throws errors about null macro argments, but these are
6725 # not fatal. 6159 # not fatal.
6726 { echo "$as_me:$LINENO: checking if compiler allows macro redefinitions" >&5 6160 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler allows macro redefinitions" >&5
6727echo $ECHO_N "checking if compiler allows macro redefinitions... $ECHO_C" >&6; } 6161$as_echo_n "checking if compiler allows macro redefinitions... " >&6; }
6728 cat >conftest.$ac_ext <<_ACEOF 6162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6729/* confdefs.h. */
6730_ACEOF
6731cat confdefs.h >>conftest.$ac_ext
6732cat >>conftest.$ac_ext <<_ACEOF
6733/* end confdefs.h. */ 6163/* end confdefs.h. */
6734 6164
6735#define testmacro foo 6165#define testmacro foo
6736#define testmacro bar 6166#define testmacro bar
6737int main(void) { exit(0); } 6167int
6738 6168main ()
6169{
6170 exit(0);
6171 ;
6172 return 0;
6173}
6739_ACEOF 6174_ACEOF
6740rm -f conftest.$ac_objext 6175if ac_fn_c_try_compile "$LINENO"; then :
6741if { (ac_try="$ac_compile" 6176 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6742case "(($ac_try" in 6177$as_echo "yes" >&6; }
6743 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6744 *) ac_try_echo=$ac_try;;
6745esac
6746eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6747 (eval "$ac_compile") 2>conftest.er1
6748 ac_status=$?
6749 grep -v '^ *+' conftest.er1 >conftest.err
6750 rm -f conftest.er1
6751 cat conftest.err >&5
6752 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6753 (exit $ac_status); } && {
6754 test -z "$ac_c_werror_flag" ||
6755 test ! -s conftest.err
6756 } && test -s conftest.$ac_objext; then
6757 { echo "$as_me:$LINENO: result: yes" >&5
6758echo "${ECHO_T}yes" >&6; }
6759else 6178else
6760 echo "$as_me: failed program was:" >&5 6179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6761sed 's/^/| /' conftest.$ac_ext >&5 6180$as_echo "no" >&6; }
6762
6763 { echo "$as_me:$LINENO: result: no" >&5
6764echo "${ECHO_T}no" >&6; }
6765 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`" 6181 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
6766 LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`" 6182 LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`"
6767 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`" 6183 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
@@ -6769,11 +6185,10 @@ echo "${ECHO_T}no" >&6; }
6769 6185
6770 6186
6771fi 6187fi
6772
6773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6774 6189
6775 { echo "$as_me:$LINENO: checking how to specify blibpath for linker ($LD)" >&5 6190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to specify blibpath for linker ($LD)" >&5
6776echo $ECHO_N "checking how to specify blibpath for linker ($LD)... $ECHO_C" >&6; } 6191$as_echo_n "checking how to specify blibpath for linker ($LD)... " >&6; }
6777 if (test -z "$blibpath"); then 6192 if (test -z "$blibpath"); then
6778 blibpath="/usr/lib:/lib" 6193 blibpath="/usr/lib:/lib"
6779 fi 6194 fi
@@ -6786,11 +6201,7 @@ echo $ECHO_N "checking how to specify blibpath for linker ($LD)... $ECHO_C" >&6;
6786 for tryflags in $flags ;do 6201 for tryflags in $flags ;do
6787 if (test -z "$blibflags"); then 6202 if (test -z "$blibflags"); then
6788 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath" 6203 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
6789 cat >conftest.$ac_ext <<_ACEOF 6204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6790/* confdefs.h. */
6791_ACEOF
6792cat confdefs.h >>conftest.$ac_ext
6793cat >>conftest.$ac_ext <<_ACEOF
6794/* end confdefs.h. */ 6205/* end confdefs.h. */
6795 6206
6796int 6207int
@@ -6801,147 +6212,36 @@ main ()
6801 return 0; 6212 return 0;
6802} 6213}
6803_ACEOF 6214_ACEOF
6804rm -f conftest.$ac_objext conftest$ac_exeext 6215if ac_fn_c_try_link "$LINENO"; then :
6805if { (ac_try="$ac_link"
6806case "(($ac_try" in
6807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6808 *) ac_try_echo=$ac_try;;
6809esac
6810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6811 (eval "$ac_link") 2>conftest.er1
6812 ac_status=$?
6813 grep -v '^ *+' conftest.er1 >conftest.err
6814 rm -f conftest.er1
6815 cat conftest.err >&5
6816 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6817 (exit $ac_status); } && {
6818 test -z "$ac_c_werror_flag" ||
6819 test ! -s conftest.err
6820 } && test -s conftest$ac_exeext &&
6821 $as_test_x conftest$ac_exeext; then
6822 blibflags=$tryflags 6216 blibflags=$tryflags
6823else
6824 echo "$as_me: failed program was:" >&5
6825sed 's/^/| /' conftest.$ac_ext >&5
6826
6827
6828fi 6217fi
6829 6218rm -f core conftest.err conftest.$ac_objext \
6830rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 6219 conftest$ac_exeext conftest.$ac_ext
6831 conftest$ac_exeext conftest.$ac_ext
6832 fi 6220 fi
6833 done 6221 done
6834 if (test -z "$blibflags"); then 6222 if (test -z "$blibflags"); then
6835 { echo "$as_me:$LINENO: result: not found" >&5 6223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6836echo "${ECHO_T}not found" >&6; } 6224$as_echo "not found" >&6; }
6837 { { echo "$as_me:$LINENO: error: *** must be able to specify blibpath on AIX - check config.log" >&5 6225 as_fn_error $? "*** must be able to specify blibpath on AIX - check config.log" "$LINENO" 5
6838echo "$as_me: error: *** must be able to specify blibpath on AIX - check config.log" >&2;}
6839 { (exit 1); exit 1; }; }
6840 else 6226 else
6841 { echo "$as_me:$LINENO: result: $blibflags" >&5 6227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $blibflags" >&5
6842echo "${ECHO_T}$blibflags" >&6; } 6228$as_echo "$blibflags" >&6; }
6843 fi 6229 fi
6844 LDFLAGS="$saved_LDFLAGS" 6230 LDFLAGS="$saved_LDFLAGS"
6845 { echo "$as_me:$LINENO: checking for authenticate" >&5 6231 ac_fn_c_check_func "$LINENO" "authenticate" "ac_cv_func_authenticate"
6846echo $ECHO_N "checking for authenticate... $ECHO_C" >&6; } 6232if test "x$ac_cv_func_authenticate" = xyes; then :
6847if test "${ac_cv_func_authenticate+set}" = set; then
6848 echo $ECHO_N "(cached) $ECHO_C" >&6
6849else
6850 cat >conftest.$ac_ext <<_ACEOF
6851/* confdefs.h. */
6852_ACEOF
6853cat confdefs.h >>conftest.$ac_ext
6854cat >>conftest.$ac_ext <<_ACEOF
6855/* end confdefs.h. */
6856/* Define authenticate to an innocuous variant, in case <limits.h> declares authenticate.
6857 For example, HP-UX 11i <limits.h> declares gettimeofday. */
6858#define authenticate innocuous_authenticate
6859
6860/* System header to define __stub macros and hopefully few prototypes,
6861 which can conflict with char authenticate (); below.
6862 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
6863 <limits.h> exists even on freestanding compilers. */
6864
6865#ifdef __STDC__
6866# include <limits.h>
6867#else
6868# include <assert.h>
6869#endif
6870 6233
6871#undef authenticate 6234$as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
6872
6873/* Override any GCC internal prototype to avoid an error.
6874 Use char because int might match the return type of a GCC
6875 builtin and then its argument prototype would still apply. */
6876#ifdef __cplusplus
6877extern "C"
6878#endif
6879char authenticate ();
6880/* The GNU C library defines this for functions which it implements
6881 to always fail with ENOSYS. Some functions are actually named
6882 something starting with __ and the normal name is an alias. */
6883#if defined __stub_authenticate || defined __stub___authenticate
6884choke me
6885#endif
6886
6887int
6888main ()
6889{
6890return authenticate ();
6891 ;
6892 return 0;
6893}
6894_ACEOF
6895rm -f conftest.$ac_objext conftest$ac_exeext
6896if { (ac_try="$ac_link"
6897case "(($ac_try" in
6898 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6899 *) ac_try_echo=$ac_try;;
6900esac
6901eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6902 (eval "$ac_link") 2>conftest.er1
6903 ac_status=$?
6904 grep -v '^ *+' conftest.er1 >conftest.err
6905 rm -f conftest.er1
6906 cat conftest.err >&5
6907 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6908 (exit $ac_status); } && {
6909 test -z "$ac_c_werror_flag" ||
6910 test ! -s conftest.err
6911 } && test -s conftest$ac_exeext &&
6912 $as_test_x conftest$ac_exeext; then
6913 ac_cv_func_authenticate=yes
6914else
6915 echo "$as_me: failed program was:" >&5
6916sed 's/^/| /' conftest.$ac_ext >&5
6917
6918 ac_cv_func_authenticate=no
6919fi
6920
6921rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
6922 conftest$ac_exeext conftest.$ac_ext
6923fi
6924{ echo "$as_me:$LINENO: result: $ac_cv_func_authenticate" >&5
6925echo "${ECHO_T}$ac_cv_func_authenticate" >&6; }
6926if test $ac_cv_func_authenticate = yes; then
6927
6928cat >>confdefs.h <<\_ACEOF
6929#define WITH_AIXAUTHENTICATE 1
6930_ACEOF
6931 6235
6932else 6236else
6933 { echo "$as_me:$LINENO: checking for authenticate in -ls" >&5 6237 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for authenticate in -ls" >&5
6934echo $ECHO_N "checking for authenticate in -ls... $ECHO_C" >&6; } 6238$as_echo_n "checking for authenticate in -ls... " >&6; }
6935if test "${ac_cv_lib_s_authenticate+set}" = set; then 6239if ${ac_cv_lib_s_authenticate+:} false; then :
6936 echo $ECHO_N "(cached) $ECHO_C" >&6 6240 $as_echo_n "(cached) " >&6
6937else 6241else
6938 ac_check_lib_save_LIBS=$LIBS 6242 ac_check_lib_save_LIBS=$LIBS
6939LIBS="-ls $LIBS" 6243LIBS="-ls $LIBS"
6940cat >conftest.$ac_ext <<_ACEOF 6244cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6941/* confdefs.h. */
6942_ACEOF
6943cat confdefs.h >>conftest.$ac_ext
6944cat >>conftest.$ac_ext <<_ACEOF
6945/* end confdefs.h. */ 6245/* end confdefs.h. */
6946 6246
6947/* Override any GCC internal prototype to avoid an error. 6247/* Override any GCC internal prototype to avoid an error.
@@ -6959,42 +6259,19 @@ return authenticate ();
6959 return 0; 6259 return 0;
6960} 6260}
6961_ACEOF 6261_ACEOF
6962rm -f conftest.$ac_objext conftest$ac_exeext 6262if ac_fn_c_try_link "$LINENO"; then :
6963if { (ac_try="$ac_link"
6964case "(($ac_try" in
6965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
6966 *) ac_try_echo=$ac_try;;
6967esac
6968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
6969 (eval "$ac_link") 2>conftest.er1
6970 ac_status=$?
6971 grep -v '^ *+' conftest.er1 >conftest.err
6972 rm -f conftest.er1
6973 cat conftest.err >&5
6974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
6975 (exit $ac_status); } && {
6976 test -z "$ac_c_werror_flag" ||
6977 test ! -s conftest.err
6978 } && test -s conftest$ac_exeext &&
6979 $as_test_x conftest$ac_exeext; then
6980 ac_cv_lib_s_authenticate=yes 6263 ac_cv_lib_s_authenticate=yes
6981else 6264else
6982 echo "$as_me: failed program was:" >&5 6265 ac_cv_lib_s_authenticate=no
6983sed 's/^/| /' conftest.$ac_ext >&5
6984
6985 ac_cv_lib_s_authenticate=no
6986fi 6266fi
6987 6267rm -f core conftest.err conftest.$ac_objext \
6988rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 6268 conftest$ac_exeext conftest.$ac_ext
6989 conftest$ac_exeext conftest.$ac_ext
6990LIBS=$ac_check_lib_save_LIBS 6269LIBS=$ac_check_lib_save_LIBS
6991fi 6270fi
6992{ echo "$as_me:$LINENO: result: $ac_cv_lib_s_authenticate" >&5 6271{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_s_authenticate" >&5
6993echo "${ECHO_T}$ac_cv_lib_s_authenticate" >&6; } 6272$as_echo "$ac_cv_lib_s_authenticate" >&6; }
6994if test $ac_cv_lib_s_authenticate = yes; then 6273if test "x$ac_cv_lib_s_authenticate" = xyes; then :
6995 cat >>confdefs.h <<\_ACEOF 6274 $as_echo "#define WITH_AIXAUTHENTICATE 1" >>confdefs.h
6996#define WITH_AIXAUTHENTICATE 1
6997_ACEOF
6998 6275
6999 LIBS="$LIBS -ls" 6276 LIBS="$LIBS -ls"
7000 6277
@@ -7003,807 +6280,232 @@ fi
7003 6280
7004fi 6281fi
7005 6282
7006 { echo "$as_me:$LINENO: checking whether authenticate is declared" >&5 6283 ac_fn_c_check_decl "$LINENO" "authenticate" "ac_cv_have_decl_authenticate" "#include <usersec.h>
7007echo $ECHO_N "checking whether authenticate is declared... $ECHO_C" >&6; } 6284"
7008if test "${ac_cv_have_decl_authenticate+set}" = set; then 6285if test "x$ac_cv_have_decl_authenticate" = xyes; then :
7009 echo $ECHO_N "(cached) $ECHO_C" >&6 6286 ac_have_decl=1
7010else
7011 cat >conftest.$ac_ext <<_ACEOF
7012/* confdefs.h. */
7013_ACEOF
7014cat confdefs.h >>conftest.$ac_ext
7015cat >>conftest.$ac_ext <<_ACEOF
7016/* end confdefs.h. */
7017#include <usersec.h>
7018
7019int
7020main ()
7021{
7022#ifndef authenticate
7023 (void) authenticate;
7024#endif
7025
7026 ;
7027 return 0;
7028}
7029_ACEOF
7030rm -f conftest.$ac_objext
7031if { (ac_try="$ac_compile"
7032case "(($ac_try" in
7033 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7034 *) ac_try_echo=$ac_try;;
7035esac
7036eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7037 (eval "$ac_compile") 2>conftest.er1
7038 ac_status=$?
7039 grep -v '^ *+' conftest.er1 >conftest.err
7040 rm -f conftest.er1
7041 cat conftest.err >&5
7042 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7043 (exit $ac_status); } && {
7044 test -z "$ac_c_werror_flag" ||
7045 test ! -s conftest.err
7046 } && test -s conftest.$ac_objext; then
7047 ac_cv_have_decl_authenticate=yes
7048else 6287else
7049 echo "$as_me: failed program was:" >&5 6288 ac_have_decl=0
7050sed 's/^/| /' conftest.$ac_ext >&5
7051
7052 ac_cv_have_decl_authenticate=no
7053fi 6289fi
7054 6290
7055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7056fi
7057{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_authenticate" >&5
7058echo "${ECHO_T}$ac_cv_have_decl_authenticate" >&6; }
7059if test $ac_cv_have_decl_authenticate = yes; then
7060
7061cat >>confdefs.h <<_ACEOF 6291cat >>confdefs.h <<_ACEOF
7062#define HAVE_DECL_AUTHENTICATE 1 6292#define HAVE_DECL_AUTHENTICATE $ac_have_decl
7063_ACEOF
7064
7065
7066else
7067 cat >>confdefs.h <<_ACEOF
7068#define HAVE_DECL_AUTHENTICATE 0
7069_ACEOF
7070
7071
7072fi
7073{ echo "$as_me:$LINENO: checking whether loginrestrictions is declared" >&5
7074echo $ECHO_N "checking whether loginrestrictions is declared... $ECHO_C" >&6; }
7075if test "${ac_cv_have_decl_loginrestrictions+set}" = set; then
7076 echo $ECHO_N "(cached) $ECHO_C" >&6
7077else
7078 cat >conftest.$ac_ext <<_ACEOF
7079/* confdefs.h. */
7080_ACEOF 6293_ACEOF
7081cat confdefs.h >>conftest.$ac_ext 6294ac_fn_c_check_decl "$LINENO" "loginrestrictions" "ac_cv_have_decl_loginrestrictions" "#include <usersec.h>
7082cat >>conftest.$ac_ext <<_ACEOF 6295"
7083/* end confdefs.h. */ 6296if test "x$ac_cv_have_decl_loginrestrictions" = xyes; then :
7084#include <usersec.h> 6297 ac_have_decl=1
7085
7086int
7087main ()
7088{
7089#ifndef loginrestrictions
7090 (void) loginrestrictions;
7091#endif
7092
7093 ;
7094 return 0;
7095}
7096_ACEOF
7097rm -f conftest.$ac_objext
7098if { (ac_try="$ac_compile"
7099case "(($ac_try" in
7100 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7101 *) ac_try_echo=$ac_try;;
7102esac
7103eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7104 (eval "$ac_compile") 2>conftest.er1
7105 ac_status=$?
7106 grep -v '^ *+' conftest.er1 >conftest.err
7107 rm -f conftest.er1
7108 cat conftest.err >&5
7109 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7110 (exit $ac_status); } && {
7111 test -z "$ac_c_werror_flag" ||
7112 test ! -s conftest.err
7113 } && test -s conftest.$ac_objext; then
7114 ac_cv_have_decl_loginrestrictions=yes
7115else 6298else
7116 echo "$as_me: failed program was:" >&5 6299 ac_have_decl=0
7117sed 's/^/| /' conftest.$ac_ext >&5
7118
7119 ac_cv_have_decl_loginrestrictions=no
7120fi
7121
7122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7123fi 6300fi
7124{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginrestrictions" >&5
7125echo "${ECHO_T}$ac_cv_have_decl_loginrestrictions" >&6; }
7126if test $ac_cv_have_decl_loginrestrictions = yes; then
7127 6301
7128cat >>confdefs.h <<_ACEOF 6302cat >>confdefs.h <<_ACEOF
7129#define HAVE_DECL_LOGINRESTRICTIONS 1 6303#define HAVE_DECL_LOGINRESTRICTIONS $ac_have_decl
7130_ACEOF
7131
7132
7133else
7134 cat >>confdefs.h <<_ACEOF
7135#define HAVE_DECL_LOGINRESTRICTIONS 0
7136_ACEOF
7137
7138
7139fi
7140{ echo "$as_me:$LINENO: checking whether loginsuccess is declared" >&5
7141echo $ECHO_N "checking whether loginsuccess is declared... $ECHO_C" >&6; }
7142if test "${ac_cv_have_decl_loginsuccess+set}" = set; then
7143 echo $ECHO_N "(cached) $ECHO_C" >&6
7144else
7145 cat >conftest.$ac_ext <<_ACEOF
7146/* confdefs.h. */
7147_ACEOF
7148cat confdefs.h >>conftest.$ac_ext
7149cat >>conftest.$ac_ext <<_ACEOF
7150/* end confdefs.h. */
7151#include <usersec.h>
7152
7153int
7154main ()
7155{
7156#ifndef loginsuccess
7157 (void) loginsuccess;
7158#endif
7159
7160 ;
7161 return 0;
7162}
7163_ACEOF 6304_ACEOF
7164rm -f conftest.$ac_objext 6305ac_fn_c_check_decl "$LINENO" "loginsuccess" "ac_cv_have_decl_loginsuccess" "#include <usersec.h>
7165if { (ac_try="$ac_compile" 6306"
7166case "(($ac_try" in 6307if test "x$ac_cv_have_decl_loginsuccess" = xyes; then :
7167 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6308 ac_have_decl=1
7168 *) ac_try_echo=$ac_try;;
7169esac
7170eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7171 (eval "$ac_compile") 2>conftest.er1
7172 ac_status=$?
7173 grep -v '^ *+' conftest.er1 >conftest.err
7174 rm -f conftest.er1
7175 cat conftest.err >&5
7176 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7177 (exit $ac_status); } && {
7178 test -z "$ac_c_werror_flag" ||
7179 test ! -s conftest.err
7180 } && test -s conftest.$ac_objext; then
7181 ac_cv_have_decl_loginsuccess=yes
7182else 6309else
7183 echo "$as_me: failed program was:" >&5 6310 ac_have_decl=0
7184sed 's/^/| /' conftest.$ac_ext >&5
7185
7186 ac_cv_have_decl_loginsuccess=no
7187fi
7188
7189rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7190fi 6311fi
7191{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginsuccess" >&5
7192echo "${ECHO_T}$ac_cv_have_decl_loginsuccess" >&6; }
7193if test $ac_cv_have_decl_loginsuccess = yes; then
7194 6312
7195cat >>confdefs.h <<_ACEOF 6313cat >>confdefs.h <<_ACEOF
7196#define HAVE_DECL_LOGINSUCCESS 1 6314#define HAVE_DECL_LOGINSUCCESS $ac_have_decl
7197_ACEOF 6315_ACEOF
7198 6316ac_fn_c_check_decl "$LINENO" "passwdexpired" "ac_cv_have_decl_passwdexpired" "#include <usersec.h>
7199 6317"
7200else 6318if test "x$ac_cv_have_decl_passwdexpired" = xyes; then :
7201 cat >>confdefs.h <<_ACEOF 6319 ac_have_decl=1
7202#define HAVE_DECL_LOGINSUCCESS 0
7203_ACEOF
7204
7205
7206fi
7207{ echo "$as_me:$LINENO: checking whether passwdexpired is declared" >&5
7208echo $ECHO_N "checking whether passwdexpired is declared... $ECHO_C" >&6; }
7209if test "${ac_cv_have_decl_passwdexpired+set}" = set; then
7210 echo $ECHO_N "(cached) $ECHO_C" >&6
7211else
7212 cat >conftest.$ac_ext <<_ACEOF
7213/* confdefs.h. */
7214_ACEOF
7215cat confdefs.h >>conftest.$ac_ext
7216cat >>conftest.$ac_ext <<_ACEOF
7217/* end confdefs.h. */
7218#include <usersec.h>
7219
7220int
7221main ()
7222{
7223#ifndef passwdexpired
7224 (void) passwdexpired;
7225#endif
7226
7227 ;
7228 return 0;
7229}
7230_ACEOF
7231rm -f conftest.$ac_objext
7232if { (ac_try="$ac_compile"
7233case "(($ac_try" in
7234 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7235 *) ac_try_echo=$ac_try;;
7236esac
7237eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7238 (eval "$ac_compile") 2>conftest.er1
7239 ac_status=$?
7240 grep -v '^ *+' conftest.er1 >conftest.err
7241 rm -f conftest.er1
7242 cat conftest.err >&5
7243 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7244 (exit $ac_status); } && {
7245 test -z "$ac_c_werror_flag" ||
7246 test ! -s conftest.err
7247 } && test -s conftest.$ac_objext; then
7248 ac_cv_have_decl_passwdexpired=yes
7249else 6320else
7250 echo "$as_me: failed program was:" >&5 6321 ac_have_decl=0
7251sed 's/^/| /' conftest.$ac_ext >&5
7252
7253 ac_cv_have_decl_passwdexpired=no
7254fi 6322fi
7255 6323
7256rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7257fi
7258{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_passwdexpired" >&5
7259echo "${ECHO_T}$ac_cv_have_decl_passwdexpired" >&6; }
7260if test $ac_cv_have_decl_passwdexpired = yes; then
7261
7262cat >>confdefs.h <<_ACEOF 6324cat >>confdefs.h <<_ACEOF
7263#define HAVE_DECL_PASSWDEXPIRED 1 6325#define HAVE_DECL_PASSWDEXPIRED $ac_have_decl
7264_ACEOF
7265
7266
7267else
7268 cat >>confdefs.h <<_ACEOF
7269#define HAVE_DECL_PASSWDEXPIRED 0
7270_ACEOF 6326_ACEOF
7271 6327ac_fn_c_check_decl "$LINENO" "setauthdb" "ac_cv_have_decl_setauthdb" "#include <usersec.h>
7272 6328"
7273fi 6329if test "x$ac_cv_have_decl_setauthdb" = xyes; then :
7274{ echo "$as_me:$LINENO: checking whether setauthdb is declared" >&5 6330 ac_have_decl=1
7275echo $ECHO_N "checking whether setauthdb is declared... $ECHO_C" >&6; }
7276if test "${ac_cv_have_decl_setauthdb+set}" = set; then
7277 echo $ECHO_N "(cached) $ECHO_C" >&6
7278else
7279 cat >conftest.$ac_ext <<_ACEOF
7280/* confdefs.h. */
7281_ACEOF
7282cat confdefs.h >>conftest.$ac_ext
7283cat >>conftest.$ac_ext <<_ACEOF
7284/* end confdefs.h. */
7285#include <usersec.h>
7286
7287int
7288main ()
7289{
7290#ifndef setauthdb
7291 (void) setauthdb;
7292#endif
7293
7294 ;
7295 return 0;
7296}
7297_ACEOF
7298rm -f conftest.$ac_objext
7299if { (ac_try="$ac_compile"
7300case "(($ac_try" in
7301 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7302 *) ac_try_echo=$ac_try;;
7303esac
7304eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7305 (eval "$ac_compile") 2>conftest.er1
7306 ac_status=$?
7307 grep -v '^ *+' conftest.er1 >conftest.err
7308 rm -f conftest.er1
7309 cat conftest.err >&5
7310 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7311 (exit $ac_status); } && {
7312 test -z "$ac_c_werror_flag" ||
7313 test ! -s conftest.err
7314 } && test -s conftest.$ac_objext; then
7315 ac_cv_have_decl_setauthdb=yes
7316else 6331else
7317 echo "$as_me: failed program was:" >&5 6332 ac_have_decl=0
7318sed 's/^/| /' conftest.$ac_ext >&5
7319
7320 ac_cv_have_decl_setauthdb=no
7321fi 6333fi
7322 6334
7323rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7324fi
7325{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_setauthdb" >&5
7326echo "${ECHO_T}$ac_cv_have_decl_setauthdb" >&6; }
7327if test $ac_cv_have_decl_setauthdb = yes; then
7328
7329cat >>confdefs.h <<_ACEOF 6335cat >>confdefs.h <<_ACEOF
7330#define HAVE_DECL_SETAUTHDB 1 6336#define HAVE_DECL_SETAUTHDB $ac_have_decl
7331_ACEOF 6337_ACEOF
7332 6338
6339 ac_fn_c_check_decl "$LINENO" "loginfailed" "ac_cv_have_decl_loginfailed" "#include <usersec.h>
7333 6340
6341"
6342if test "x$ac_cv_have_decl_loginfailed" = xyes; then :
6343 ac_have_decl=1
7334else 6344else
7335 cat >>confdefs.h <<_ACEOF 6345 ac_have_decl=0
7336#define HAVE_DECL_SETAUTHDB 0
7337_ACEOF
7338
7339
7340fi
7341
7342
7343 { echo "$as_me:$LINENO: checking whether loginfailed is declared" >&5
7344echo $ECHO_N "checking whether loginfailed is declared... $ECHO_C" >&6; }
7345if test "${ac_cv_have_decl_loginfailed+set}" = set; then
7346 echo $ECHO_N "(cached) $ECHO_C" >&6
7347else
7348 cat >conftest.$ac_ext <<_ACEOF
7349/* confdefs.h. */
7350_ACEOF
7351cat confdefs.h >>conftest.$ac_ext
7352cat >>conftest.$ac_ext <<_ACEOF
7353/* end confdefs.h. */
7354#include <usersec.h>
7355
7356
7357int
7358main ()
7359{
7360#ifndef loginfailed
7361 (void) loginfailed;
7362#endif
7363
7364 ;
7365 return 0;
7366}
7367_ACEOF
7368rm -f conftest.$ac_objext
7369if { (ac_try="$ac_compile"
7370case "(($ac_try" in
7371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7372 *) ac_try_echo=$ac_try;;
7373esac
7374eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7375 (eval "$ac_compile") 2>conftest.er1
7376 ac_status=$?
7377 grep -v '^ *+' conftest.er1 >conftest.err
7378 rm -f conftest.er1
7379 cat conftest.err >&5
7380 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7381 (exit $ac_status); } && {
7382 test -z "$ac_c_werror_flag" ||
7383 test ! -s conftest.err
7384 } && test -s conftest.$ac_objext; then
7385 ac_cv_have_decl_loginfailed=yes
7386else
7387 echo "$as_me: failed program was:" >&5
7388sed 's/^/| /' conftest.$ac_ext >&5
7389
7390 ac_cv_have_decl_loginfailed=no
7391fi 6346fi
7392 6347
7393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7394fi
7395{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_loginfailed" >&5
7396echo "${ECHO_T}$ac_cv_have_decl_loginfailed" >&6; }
7397if test $ac_cv_have_decl_loginfailed = yes; then
7398
7399cat >>confdefs.h <<_ACEOF 6348cat >>confdefs.h <<_ACEOF
7400#define HAVE_DECL_LOGINFAILED 1 6349#define HAVE_DECL_LOGINFAILED $ac_have_decl
7401_ACEOF
7402
7403{ echo "$as_me:$LINENO: checking if loginfailed takes 4 arguments" >&5
7404echo $ECHO_N "checking if loginfailed takes 4 arguments... $ECHO_C" >&6; }
7405 cat >conftest.$ac_ext <<_ACEOF
7406/* confdefs.h. */
7407_ACEOF 6350_ACEOF
7408cat confdefs.h >>conftest.$ac_ext 6351if test $ac_have_decl = 1; then :
7409cat >>conftest.$ac_ext <<_ACEOF 6352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if loginfailed takes 4 arguments" >&5
6353$as_echo_n "checking if loginfailed takes 4 arguments... " >&6; }
6354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7410/* end confdefs.h. */ 6355/* end confdefs.h. */
7411#include <usersec.h> 6356 #include <usersec.h>
7412int 6357int
7413main () 6358main ()
7414{ 6359{
7415(void)loginfailed("user","host","tty",0); 6360 (void)loginfailed("user","host","tty",0);
7416 ; 6361 ;
7417 return 0; 6362 return 0;
7418} 6363}
7419_ACEOF 6364_ACEOF
7420rm -f conftest.$ac_objext 6365if ac_fn_c_try_compile "$LINENO"; then :
7421if { (ac_try="$ac_compile" 6366 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7422case "(($ac_try" in 6367$as_echo "yes" >&6; }
7423 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7424 *) ac_try_echo=$ac_try;;
7425esac
7426eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7427 (eval "$ac_compile") 2>conftest.er1
7428 ac_status=$?
7429 grep -v '^ *+' conftest.er1 >conftest.err
7430 rm -f conftest.er1
7431 cat conftest.err >&5
7432 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7433 (exit $ac_status); } && {
7434 test -z "$ac_c_werror_flag" ||
7435 test ! -s conftest.err
7436 } && test -s conftest.$ac_objext; then
7437 { echo "$as_me:$LINENO: result: yes" >&5
7438echo "${ECHO_T}yes" >&6; }
7439 6368
7440cat >>confdefs.h <<\_ACEOF 6369$as_echo "#define AIX_LOGINFAILED_4ARG 1" >>confdefs.h
7441#define AIX_LOGINFAILED_4ARG 1
7442_ACEOF
7443 6370
7444else 6371else
7445 echo "$as_me: failed program was:" >&5 6372 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7446sed 's/^/| /' conftest.$ac_ext >&5 6373$as_echo "no" >&6; }
7447
7448 { echo "$as_me:$LINENO: result: no" >&5
7449echo "${ECHO_T}no" >&6; }
7450 6374
7451fi 6375fi
7452
7453rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6376rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7454else
7455 cat >>confdefs.h <<_ACEOF
7456#define HAVE_DECL_LOGINFAILED 0
7457_ACEOF
7458
7459
7460fi 6377fi
7461 6378
7462 6379 for ac_func in getgrset setauthdb
7463 6380do :
7464 6381 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7465for ac_func in getgrset setauthdb 6382ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
7466do 6383if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
7467as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
7468{ echo "$as_me:$LINENO: checking for $ac_func" >&5
7469echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
7470if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
7471 echo $ECHO_N "(cached) $ECHO_C" >&6
7472else
7473 cat >conftest.$ac_ext <<_ACEOF
7474/* confdefs.h. */
7475_ACEOF
7476cat confdefs.h >>conftest.$ac_ext
7477cat >>conftest.$ac_ext <<_ACEOF
7478/* end confdefs.h. */
7479/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
7480 For example, HP-UX 11i <limits.h> declares gettimeofday. */
7481#define $ac_func innocuous_$ac_func
7482
7483/* System header to define __stub macros and hopefully few prototypes,
7484 which can conflict with char $ac_func (); below.
7485 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
7486 <limits.h> exists even on freestanding compilers. */
7487
7488#ifdef __STDC__
7489# include <limits.h>
7490#else
7491# include <assert.h>
7492#endif
7493
7494#undef $ac_func
7495
7496/* Override any GCC internal prototype to avoid an error.
7497 Use char because int might match the return type of a GCC
7498 builtin and then its argument prototype would still apply. */
7499#ifdef __cplusplus
7500extern "C"
7501#endif
7502char $ac_func ();
7503/* The GNU C library defines this for functions which it implements
7504 to always fail with ENOSYS. Some functions are actually named
7505 something starting with __ and the normal name is an alias. */
7506#if defined __stub_$ac_func || defined __stub___$ac_func
7507choke me
7508#endif
7509
7510int
7511main ()
7512{
7513return $ac_func ();
7514 ;
7515 return 0;
7516}
7517_ACEOF
7518rm -f conftest.$ac_objext conftest$ac_exeext
7519if { (ac_try="$ac_link"
7520case "(($ac_try" in
7521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7522 *) ac_try_echo=$ac_try;;
7523esac
7524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7525 (eval "$ac_link") 2>conftest.er1
7526 ac_status=$?
7527 grep -v '^ *+' conftest.er1 >conftest.err
7528 rm -f conftest.er1
7529 cat conftest.err >&5
7530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7531 (exit $ac_status); } && {
7532 test -z "$ac_c_werror_flag" ||
7533 test ! -s conftest.err
7534 } && test -s conftest$ac_exeext &&
7535 $as_test_x conftest$ac_exeext; then
7536 eval "$as_ac_var=yes"
7537else
7538 echo "$as_me: failed program was:" >&5
7539sed 's/^/| /' conftest.$ac_ext >&5
7540
7541 eval "$as_ac_var=no"
7542fi
7543
7544rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
7545 conftest$ac_exeext conftest.$ac_ext
7546fi
7547ac_res=`eval echo '${'$as_ac_var'}'`
7548 { echo "$as_me:$LINENO: result: $ac_res" >&5
7549echo "${ECHO_T}$ac_res" >&6; }
7550if test `eval echo '${'$as_ac_var'}'` = yes; then
7551 cat >>confdefs.h <<_ACEOF 6384 cat >>confdefs.h <<_ACEOF
7552#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 6385#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7553_ACEOF 6386_ACEOF
7554 6387
7555fi 6388fi
7556done 6389done
7557 6390
7558 { echo "$as_me:$LINENO: checking whether F_CLOSEM is declared" >&5 6391 ac_fn_c_check_decl "$LINENO" "F_CLOSEM" "ac_cv_have_decl_F_CLOSEM" " #include <limits.h>
7559echo $ECHO_N "checking whether F_CLOSEM is declared... $ECHO_C" >&6; }
7560if test "${ac_cv_have_decl_F_CLOSEM+set}" = set; then
7561 echo $ECHO_N "(cached) $ECHO_C" >&6
7562else
7563 cat >conftest.$ac_ext <<_ACEOF
7564/* confdefs.h. */
7565_ACEOF
7566cat confdefs.h >>conftest.$ac_ext
7567cat >>conftest.$ac_ext <<_ACEOF
7568/* end confdefs.h. */
7569 #include <limits.h>
7570 #include <fcntl.h> 6392 #include <fcntl.h>
7571 6393
6394"
6395if test "x$ac_cv_have_decl_F_CLOSEM" = xyes; then :
7572 6396
7573int 6397$as_echo "#define HAVE_FCNTL_CLOSEM 1" >>confdefs.h
7574main ()
7575{
7576#ifndef F_CLOSEM
7577 (void) F_CLOSEM;
7578#endif
7579
7580 ;
7581 return 0;
7582}
7583_ACEOF
7584rm -f conftest.$ac_objext
7585if { (ac_try="$ac_compile"
7586case "(($ac_try" in
7587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7588 *) ac_try_echo=$ac_try;;
7589esac
7590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7591 (eval "$ac_compile") 2>conftest.er1
7592 ac_status=$?
7593 grep -v '^ *+' conftest.er1 >conftest.err
7594 rm -f conftest.er1
7595 cat conftest.err >&5
7596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7597 (exit $ac_status); } && {
7598 test -z "$ac_c_werror_flag" ||
7599 test ! -s conftest.err
7600 } && test -s conftest.$ac_objext; then
7601 ac_cv_have_decl_F_CLOSEM=yes
7602else
7603 echo "$as_me: failed program was:" >&5
7604sed 's/^/| /' conftest.$ac_ext >&5
7605
7606 ac_cv_have_decl_F_CLOSEM=no
7607fi
7608
7609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7610fi
7611{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_F_CLOSEM" >&5
7612echo "${ECHO_T}$ac_cv_have_decl_F_CLOSEM" >&6; }
7613if test $ac_cv_have_decl_F_CLOSEM = yes; then
7614
7615cat >>confdefs.h <<\_ACEOF
7616#define HAVE_FCNTL_CLOSEM 1
7617_ACEOF
7618 6398
7619fi 6399fi
7620 6400
7621 check_for_aix_broken_getaddrinfo=1 6401 check_for_aix_broken_getaddrinfo=1
7622 6402
7623cat >>confdefs.h <<\_ACEOF 6403$as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
7624#define BROKEN_REALPATH 1
7625_ACEOF
7626 6404
7627 6405
7628cat >>confdefs.h <<\_ACEOF 6406$as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7629#define SETEUID_BREAKS_SETUID 1
7630_ACEOF
7631 6407
7632 6408
7633cat >>confdefs.h <<\_ACEOF 6409$as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7634#define BROKEN_SETREUID 1
7635_ACEOF
7636 6410
7637 6411
7638cat >>confdefs.h <<\_ACEOF 6412$as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7639#define BROKEN_SETREGID 1
7640_ACEOF
7641 6413
7642 6414
7643cat >>confdefs.h <<\_ACEOF 6415$as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
7644#define DISABLE_LASTLOG 1
7645_ACEOF
7646 6416
7647 6417
7648cat >>confdefs.h <<\_ACEOF 6418$as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
7649#define LOGIN_NEEDS_UTMPX 1
7650_ACEOF
7651 6419
7652 6420
7653cat >>confdefs.h <<\_ACEOF 6421$as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
7654#define SPT_TYPE SPT_REUSEARGV
7655_ACEOF
7656 6422
7657 6423
7658cat >>confdefs.h <<\_ACEOF 6424$as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
7659#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1
7660_ACEOF
7661 6425
7662 6426
7663cat >>confdefs.h <<\_ACEOF 6427$as_echo "#define PTY_ZEROREAD 1" >>confdefs.h
7664#define PTY_ZEROREAD 1
7665_ACEOF
7666 6428
7667 ;; 6429 ;;
7668*-*-cygwin*) 6430*-*-cygwin*)
7669 check_for_libcrypt_later=1 6431 check_for_libcrypt_later=1
7670 LIBS="$LIBS /usr/lib/textreadmode.o" 6432 LIBS="$LIBS /usr/lib/textreadmode.o"
7671 6433
7672cat >>confdefs.h <<\_ACEOF 6434$as_echo "#define HAVE_CYGWIN 1" >>confdefs.h
7673#define HAVE_CYGWIN 1
7674_ACEOF
7675 6435
7676 6436
7677cat >>confdefs.h <<\_ACEOF 6437$as_echo "#define USE_PIPES 1" >>confdefs.h
7678#define USE_PIPES 1
7679_ACEOF
7680 6438
7681 6439
7682cat >>confdefs.h <<\_ACEOF 6440$as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
7683#define DISABLE_SHADOW 1
7684_ACEOF
7685 6441
7686 6442
7687cat >>confdefs.h <<\_ACEOF 6443$as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
7688#define NO_X11_UNIX_SOCKETS 1
7689_ACEOF
7690 6444
7691 6445
7692cat >>confdefs.h <<\_ACEOF 6446$as_echo "#define NO_IPPORT_RESERVED_CONCEPT 1" >>confdefs.h
7693#define NO_IPPORT_RESERVED_CONCEPT 1
7694_ACEOF
7695 6447
7696 6448
7697cat >>confdefs.h <<\_ACEOF 6449$as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
7698#define DISABLE_FD_PASSING 1
7699_ACEOF
7700 6450
7701 6451
7702cat >>confdefs.h <<\_ACEOF 6452$as_echo "#define SSH_IOBUFSZ 65535" >>confdefs.h
7703#define SSH_IOBUFSZ 65535
7704_ACEOF
7705 6453
7706 6454
7707cat >>confdefs.h <<\_ACEOF 6455$as_echo "#define FILESYSTEM_NO_BACKSLASH 1" >>confdefs.h
7708#define FILESYSTEM_NO_BACKSLASH 1
7709_ACEOF
7710 6456
7711 ;; 6457 ;;
7712*-*-dgux*) 6458*-*-dgux*)
7713 6459
7714cat >>confdefs.h <<\_ACEOF 6460$as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
7715#define IP_TOS_IS_BROKEN 1
7716_ACEOF
7717 6461
7718 cat >>confdefs.h <<\_ACEOF 6462 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7719#define SETEUID_BREAKS_SETUID 1
7720_ACEOF
7721 6463
7722 cat >>confdefs.h <<\_ACEOF 6464 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7723#define BROKEN_SETREUID 1
7724_ACEOF
7725 6465
7726 cat >>confdefs.h <<\_ACEOF 6466 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7727#define BROKEN_SETREGID 1
7728_ACEOF
7729 6467
7730 ;; 6468 ;;
7731*-*-darwin*) 6469*-*-darwin*)
7732 { echo "$as_me:$LINENO: checking if we have working getaddrinfo" >&5 6470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have working getaddrinfo" >&5
7733echo $ECHO_N "checking if we have working getaddrinfo... $ECHO_C" >&6; } 6471$as_echo_n "checking if we have working getaddrinfo... " >&6; }
7734 if test "$cross_compiling" = yes; then 6472 if test "$cross_compiling" = yes; then :
7735 { echo "$as_me:$LINENO: result: assume it is working" >&5 6473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: assume it is working" >&5
7736echo "${ECHO_T}assume it is working" >&6; } 6474$as_echo "assume it is working" >&6; }
7737else 6475else
7738 cat >conftest.$ac_ext <<_ACEOF 6476 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7739/* confdefs.h. */
7740_ACEOF
7741cat confdefs.h >>conftest.$ac_ext
7742cat >>conftest.$ac_ext <<_ACEOF
7743/* end confdefs.h. */ 6477/* end confdefs.h. */
7744#include <mach-o/dyld.h> 6478 #include <mach-o/dyld.h>
7745main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) 6479main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
7746 exit(0); 6480 exit(0);
7747 else 6481 else
7748 exit(1); 6482 exit(1);
7749} 6483}
6484
7750_ACEOF 6485_ACEOF
7751rm -f conftest$ac_exeext 6486if ac_fn_c_try_run "$LINENO"; then :
7752if { (ac_try="$ac_link" 6487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: working" >&5
7753case "(($ac_try" in 6488$as_echo "working" >&6; }
7754 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7755 *) ac_try_echo=$ac_try;;
7756esac
7757eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7758 (eval "$ac_link") 2>&5
7759 ac_status=$?
7760 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7761 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7762 { (case "(($ac_try" in
7763 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7764 *) ac_try_echo=$ac_try;;
7765esac
7766eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7767 (eval "$ac_try") 2>&5
7768 ac_status=$?
7769 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7770 (exit $ac_status); }; }; then
7771 { echo "$as_me:$LINENO: result: working" >&5
7772echo "${ECHO_T}working" >&6; }
7773else 6489else
7774 echo "$as_me: program exited with status $ac_status" >&5 6490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy" >&5
7775echo "$as_me: failed program was:" >&5 6491$as_echo "buggy" >&6; }
7776sed 's/^/| /' conftest.$ac_ext >&5
7777 6492
7778( exit $ac_status ) 6493$as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
7779{ echo "$as_me:$LINENO: result: buggy" >&5
7780echo "${ECHO_T}buggy" >&6; }
7781 6494
7782cat >>confdefs.h <<\_ACEOF
7783#define BROKEN_GETADDRINFO 1
7784_ACEOF
7785 6495
7786fi 6496fi
7787rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 6497rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6498 conftest.$ac_objext conftest.beam conftest.$ac_ext
7788fi 6499fi
7789 6500
6501 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
7790 6502
7791 cat >>confdefs.h <<\_ACEOF 6503 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
7792#define SETEUID_BREAKS_SETUID 1
7793_ACEOF
7794
7795 cat >>confdefs.h <<\_ACEOF
7796#define BROKEN_SETREUID 1
7797_ACEOF
7798 6504
7799 cat >>confdefs.h <<\_ACEOF 6505 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
7800#define BROKEN_SETREGID 1
7801_ACEOF
7802 6506
7803 6507
7804cat >>confdefs.h <<\_ACEOF 6508$as_echo "#define BROKEN_GLOB 1" >>confdefs.h
7805#define BROKEN_GLOB 1
7806_ACEOF
7807 6509
7808 6510
7809cat >>confdefs.h <<_ACEOF 6511cat >>confdefs.h <<_ACEOF
@@ -7811,109 +6513,126 @@ cat >>confdefs.h <<_ACEOF
7811_ACEOF 6513_ACEOF
7812 6514
7813 6515
7814cat >>confdefs.h <<\_ACEOF 6516$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
7815#define SSH_TUN_FREEBSD 1
7816_ACEOF
7817 6517
7818 6518
7819cat >>confdefs.h <<\_ACEOF 6519$as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
7820#define SSH_TUN_COMPAT_AF 1
7821_ACEOF
7822 6520
7823 6521
7824cat >>confdefs.h <<\_ACEOF 6522$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
7825#define SSH_TUN_PREPEND_AF 1 6523
6524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have the Security Authorization Session API" >&5
6525$as_echo_n "checking if we have the Security Authorization Session API... " >&6; }
6526 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6527/* end confdefs.h. */
6528#include <Security/AuthSession.h>
6529int
6530main ()
6531{
6532SessionCreate(0, 0);
6533 ;
6534 return 0;
6535}
7826_ACEOF 6536_ACEOF
6537if ac_fn_c_try_compile "$LINENO"; then :
6538 ac_cv_use_security_session_api="yes"
7827 6539
6540$as_echo "#define USE_SECURITY_SESSION_API 1" >>confdefs.h
7828 6541
7829 { echo "$as_me:$LINENO: checking whether AU_IPv4 is declared" >&5 6542 LIBS="$LIBS -framework Security"
7830echo $ECHO_N "checking whether AU_IPv4 is declared... $ECHO_C" >&6; } 6543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7831if test "${ac_cv_have_decl_AU_IPv4+set}" = set; then 6544$as_echo "yes" >&6; }
7832 echo $ECHO_N "(cached) $ECHO_C" >&6
7833else 6545else
7834 cat >conftest.$ac_ext <<_ACEOF 6546 ac_cv_use_security_session_api="no"
7835/* confdefs.h. */ 6547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7836_ACEOF 6548$as_echo "no" >&6; }
7837cat confdefs.h >>conftest.$ac_ext 6549fi
7838cat >>conftest.$ac_ext <<_ACEOF 6550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have an in-memory credentials cache" >&5
6552$as_echo_n "checking if we have an in-memory credentials cache... " >&6; }
6553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7839/* end confdefs.h. */ 6554/* end confdefs.h. */
7840$ac_includes_default 6555#include <Kerberos/Kerberos.h>
7841int 6556int
7842main () 6557main ()
7843{ 6558{
7844#ifndef AU_IPv4 6559cc_context_t c;
7845 (void) AU_IPv4; 6560 (void) cc_initialize (&c, 0, NULL, NULL);
7846#endif
7847
7848 ; 6561 ;
7849 return 0; 6562 return 0;
7850} 6563}
7851_ACEOF 6564_ACEOF
7852rm -f conftest.$ac_objext 6565if ac_fn_c_try_compile "$LINENO"; then :
7853if { (ac_try="$ac_compile" 6566
7854case "(($ac_try" in 6567$as_echo "#define USE_CCAPI 1" >>confdefs.h
7855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6568
7856 *) ac_try_echo=$ac_try;; 6569 LIBS="$LIBS -framework Security"
7857esac 6570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7858eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 6571$as_echo "yes" >&6; }
7859 (eval "$ac_compile") 2>conftest.er1 6572 if test "x$ac_cv_use_security_session_api" = "xno"; then
7860 ac_status=$? 6573 as_fn_error $? "*** Need a security framework to use the credentials cache API ***" "$LINENO" 5
7861 grep -v '^ *+' conftest.er1 >conftest.err 6574 fi
7862 rm -f conftest.er1
7863 cat conftest.err >&5
7864 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7865 (exit $ac_status); } && {
7866 test -z "$ac_c_werror_flag" ||
7867 test ! -s conftest.err
7868 } && test -s conftest.$ac_objext; then
7869 ac_cv_have_decl_AU_IPv4=yes
7870else 6575else
7871 echo "$as_me: failed program was:" >&5 6576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7872sed 's/^/| /' conftest.$ac_ext >&5 6577$as_echo "no" >&6; }
7873 6578
7874 ac_cv_have_decl_AU_IPv4=no
7875fi 6579fi
7876
7877rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6580rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7878fi 6581
7879{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_AU_IPv4" >&5 6582 ac_fn_c_check_decl "$LINENO" "AU_IPv4" "ac_cv_have_decl_AU_IPv4" "$ac_includes_default"
7880echo "${ECHO_T}$ac_cv_have_decl_AU_IPv4" >&6; } 6583if test "x$ac_cv_have_decl_AU_IPv4" = xyes; then :
7881if test $ac_cv_have_decl_AU_IPv4 = yes; then 6584
7882 :
7883else 6585else
7884 6586
7885cat >>confdefs.h <<\_ACEOF 6587$as_echo "#define AU_IPv4 0" >>confdefs.h
7886#define AU_IPv4 0
7887_ACEOF
7888 6588
7889 #include <bsm/audit.h> 6589 #include <bsm/audit.h>
7890 6590
7891cat >>confdefs.h <<\_ACEOF 6591$as_echo "#define LASTLOG_WRITE_PUTUTXLINE 1" >>confdefs.h
7892#define LASTLOG_WRITE_PUTUTXLINE 1 6592
6593
6594fi
6595
6596
6597$as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
6598
6599 for ac_func in sandbox_init
6600do :
6601 ac_fn_c_check_func "$LINENO" "sandbox_init" "ac_cv_func_sandbox_init"
6602if test "x$ac_cv_func_sandbox_init" = xyes; then :
6603 cat >>confdefs.h <<_ACEOF
6604#define HAVE_SANDBOX_INIT 1
7893_ACEOF 6605_ACEOF
7894 6606
6607fi
6608done
6609
6610 for ac_header in sandbox.h
6611do :
6612 ac_fn_c_check_header_mongrel "$LINENO" "sandbox.h" "ac_cv_header_sandbox_h" "$ac_includes_default"
6613if test "x$ac_cv_header_sandbox_h" = xyes; then :
6614 cat >>confdefs.h <<_ACEOF
6615#define HAVE_SANDBOX_H 1
6616_ACEOF
7895 6617
7896fi 6618fi
7897 6619
6620done
6621
7898 ;; 6622 ;;
7899*-*-dragonfly*) 6623*-*-dragonfly*)
7900 SSHDLIBS="$SSHDLIBS -lcrypt" 6624 SSHDLIBS="$SSHDLIBS -lcrypt"
7901 ;; 6625 ;;
7902*-*-haiku*) 6626*-*-haiku*)
7903 LIBS="$LIBS -lbsd " 6627 LIBS="$LIBS -lbsd "
7904 6628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lnetwork" >&5
7905{ echo "$as_me:$LINENO: checking for socket in -lnetwork" >&5 6629$as_echo_n "checking for socket in -lnetwork... " >&6; }
7906echo $ECHO_N "checking for socket in -lnetwork... $ECHO_C" >&6; } 6630if ${ac_cv_lib_network_socket+:} false; then :
7907if test "${ac_cv_lib_network_socket+set}" = set; then 6631 $as_echo_n "(cached) " >&6
7908 echo $ECHO_N "(cached) $ECHO_C" >&6
7909else 6632else
7910 ac_check_lib_save_LIBS=$LIBS 6633 ac_check_lib_save_LIBS=$LIBS
7911LIBS="-lnetwork $LIBS" 6634LIBS="-lnetwork $LIBS"
7912cat >conftest.$ac_ext <<_ACEOF 6635cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7913/* confdefs.h. */
7914_ACEOF
7915cat confdefs.h >>conftest.$ac_ext
7916cat >>conftest.$ac_ext <<_ACEOF
7917/* end confdefs.h. */ 6636/* end confdefs.h. */
7918 6637
7919/* Override any GCC internal prototype to avoid an error. 6638/* Override any GCC internal prototype to avoid an error.
@@ -7931,39 +6650,18 @@ return socket ();
7931 return 0; 6650 return 0;
7932} 6651}
7933_ACEOF 6652_ACEOF
7934rm -f conftest.$ac_objext conftest$ac_exeext 6653if ac_fn_c_try_link "$LINENO"; then :
7935if { (ac_try="$ac_link"
7936case "(($ac_try" in
7937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
7938 *) ac_try_echo=$ac_try;;
7939esac
7940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
7941 (eval "$ac_link") 2>conftest.er1
7942 ac_status=$?
7943 grep -v '^ *+' conftest.er1 >conftest.err
7944 rm -f conftest.er1
7945 cat conftest.err >&5
7946 echo "$as_me:$LINENO: \$? = $ac_status" >&5
7947 (exit $ac_status); } && {
7948 test -z "$ac_c_werror_flag" ||
7949 test ! -s conftest.err
7950 } && test -s conftest$ac_exeext &&
7951 $as_test_x conftest$ac_exeext; then
7952 ac_cv_lib_network_socket=yes 6654 ac_cv_lib_network_socket=yes
7953else 6655else
7954 echo "$as_me: failed program was:" >&5 6656 ac_cv_lib_network_socket=no
7955sed 's/^/| /' conftest.$ac_ext >&5
7956
7957 ac_cv_lib_network_socket=no
7958fi 6657fi
7959 6658rm -f core conftest.err conftest.$ac_objext \
7960rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 6659 conftest$ac_exeext conftest.$ac_ext
7961 conftest$ac_exeext conftest.$ac_ext
7962LIBS=$ac_check_lib_save_LIBS 6660LIBS=$ac_check_lib_save_LIBS
7963fi 6661fi
7964{ echo "$as_me:$LINENO: result: $ac_cv_lib_network_socket" >&5 6662{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_network_socket" >&5
7965echo "${ECHO_T}$ac_cv_lib_network_socket" >&6; } 6663$as_echo "$ac_cv_lib_network_socket" >&6; }
7966if test $ac_cv_lib_network_socket = yes; then 6664if test "x$ac_cv_lib_network_socket" = xyes; then :
7967 cat >>confdefs.h <<_ACEOF 6665 cat >>confdefs.h <<_ACEOF
7968#define HAVE_LIBNETWORK 1 6666#define HAVE_LIBNETWORK 1
7969_ACEOF 6667_ACEOF
@@ -7972,9 +6670,7 @@ _ACEOF
7972 6670
7973fi 6671fi
7974 6672
7975 cat >>confdefs.h <<\_ACEOF 6673 $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
7976#define HAVE_U_INT64_T 1
7977_ACEOF
7978 6674
7979 MANTYPE=man 6675 MANTYPE=man
7980 ;; 6676 ;;
@@ -7982,43 +6678,28 @@ _ACEOF
7982 # first we define all of the options common to all HP-UX releases 6678 # first we define all of the options common to all HP-UX releases
7983 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" 6679 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
7984 IPADDR_IN_DISPLAY=yes 6680 IPADDR_IN_DISPLAY=yes
7985 cat >>confdefs.h <<\_ACEOF 6681 $as_echo "#define USE_PIPES 1" >>confdefs.h
7986#define USE_PIPES 1
7987_ACEOF
7988 6682
7989 6683
7990cat >>confdefs.h <<\_ACEOF 6684$as_echo "#define LOGIN_NO_ENDOPT 1" >>confdefs.h
7991#define LOGIN_NO_ENDOPT 1
7992_ACEOF
7993 6685
7994 cat >>confdefs.h <<\_ACEOF 6686 $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
7995#define LOGIN_NEEDS_UTMPX 1
7996_ACEOF
7997 6687
7998 6688
7999cat >>confdefs.h <<\_ACEOF 6689$as_echo "#define LOCKED_PASSWD_STRING \"*\"" >>confdefs.h
8000#define LOCKED_PASSWD_STRING "*"
8001_ACEOF
8002 6690
8003 cat >>confdefs.h <<\_ACEOF 6691 $as_echo "#define SPT_TYPE SPT_PSTAT" >>confdefs.h
8004#define SPT_TYPE SPT_PSTAT
8005_ACEOF
8006 6692
8007 MAIL="/var/mail/username" 6693 maildir="/var/mail"
8008 LIBS="$LIBS -lsec" 6694 LIBS="$LIBS -lsec"
8009 6695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for t_error in -lxnet" >&5
8010{ echo "$as_me:$LINENO: checking for t_error in -lxnet" >&5 6696$as_echo_n "checking for t_error in -lxnet... " >&6; }
8011echo $ECHO_N "checking for t_error in -lxnet... $ECHO_C" >&6; } 6697if ${ac_cv_lib_xnet_t_error+:} false; then :
8012if test "${ac_cv_lib_xnet_t_error+set}" = set; then 6698 $as_echo_n "(cached) " >&6
8013 echo $ECHO_N "(cached) $ECHO_C" >&6
8014else 6699else
8015 ac_check_lib_save_LIBS=$LIBS 6700 ac_check_lib_save_LIBS=$LIBS
8016LIBS="-lxnet $LIBS" 6701LIBS="-lxnet $LIBS"
8017cat >conftest.$ac_ext <<_ACEOF 6702cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8018/* confdefs.h. */
8019_ACEOF
8020cat confdefs.h >>conftest.$ac_ext
8021cat >>conftest.$ac_ext <<_ACEOF
8022/* end confdefs.h. */ 6703/* end confdefs.h. */
8023 6704
8024/* Override any GCC internal prototype to avoid an error. 6705/* Override any GCC internal prototype to avoid an error.
@@ -8036,39 +6717,18 @@ return t_error ();
8036 return 0; 6717 return 0;
8037} 6718}
8038_ACEOF 6719_ACEOF
8039rm -f conftest.$ac_objext conftest$ac_exeext 6720if ac_fn_c_try_link "$LINENO"; then :
8040if { (ac_try="$ac_link"
8041case "(($ac_try" in
8042 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8043 *) ac_try_echo=$ac_try;;
8044esac
8045eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8046 (eval "$ac_link") 2>conftest.er1
8047 ac_status=$?
8048 grep -v '^ *+' conftest.er1 >conftest.err
8049 rm -f conftest.er1
8050 cat conftest.err >&5
8051 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8052 (exit $ac_status); } && {
8053 test -z "$ac_c_werror_flag" ||
8054 test ! -s conftest.err
8055 } && test -s conftest$ac_exeext &&
8056 $as_test_x conftest$ac_exeext; then
8057 ac_cv_lib_xnet_t_error=yes 6721 ac_cv_lib_xnet_t_error=yes
8058else 6722else
8059 echo "$as_me: failed program was:" >&5 6723 ac_cv_lib_xnet_t_error=no
8060sed 's/^/| /' conftest.$ac_ext >&5
8061
8062 ac_cv_lib_xnet_t_error=no
8063fi 6724fi
8064 6725rm -f core conftest.err conftest.$ac_objext \
8065rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 6726 conftest$ac_exeext conftest.$ac_ext
8066 conftest$ac_exeext conftest.$ac_ext
8067LIBS=$ac_check_lib_save_LIBS 6727LIBS=$ac_check_lib_save_LIBS
8068fi 6728fi
8069{ echo "$as_me:$LINENO: result: $ac_cv_lib_xnet_t_error" >&5 6729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_xnet_t_error" >&5
8070echo "${ECHO_T}$ac_cv_lib_xnet_t_error" >&6; } 6730$as_echo "$ac_cv_lib_xnet_t_error" >&6; }
8071if test $ac_cv_lib_xnet_t_error = yes; then 6731if test "x$ac_cv_lib_xnet_t_error" = xyes; then :
8072 cat >>confdefs.h <<_ACEOF 6732 cat >>confdefs.h <<_ACEOF
8073#define HAVE_LIBXNET 1 6733#define HAVE_LIBXNET 1
8074_ACEOF 6734_ACEOF
@@ -8076,9 +6736,7 @@ _ACEOF
8076 LIBS="-lxnet $LIBS" 6736 LIBS="-lxnet $LIBS"
8077 6737
8078else 6738else
8079 { { echo "$as_me:$LINENO: error: *** -lxnet needed on HP-UX - check config.log ***" >&5 6739 as_fn_error $? "*** -lxnet needed on HP-UX - check config.log ***" "$LINENO" 5
8080echo "$as_me: error: *** -lxnet needed on HP-UX - check config.log ***" >&2;}
8081 { (exit 1); exit 1; }; }
8082fi 6740fi
8083 6741
8084 6742
@@ -8091,19 +6749,13 @@ fi
8091 ;; 6749 ;;
8092 *-*-hpux11*) 6750 *-*-hpux11*)
8093 6751
8094cat >>confdefs.h <<\_ACEOF 6752$as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
8095#define PAM_SUN_CODEBASE 1
8096_ACEOF
8097 6753
8098 6754
8099cat >>confdefs.h <<\_ACEOF 6755$as_echo "#define DISABLE_UTMP 1" >>confdefs.h
8100#define DISABLE_UTMP 1
8101_ACEOF
8102 6756
8103 6757
8104cat >>confdefs.h <<\_ACEOF 6758$as_echo "#define USE_BTMP 1" >>confdefs.h
8105#define USE_BTMP 1
8106_ACEOF
8107 6759
8108 check_for_hpux_broken_getaddrinfo=1 6760 check_for_hpux_broken_getaddrinfo=1
8109 check_for_conflicting_getspnam=1 6761 check_for_conflicting_getspnam=1
@@ -8114,9 +6766,7 @@ _ACEOF
8114 case "$host" in 6766 case "$host" in
8115 *-*-hpux10.26) 6767 *-*-hpux10.26)
8116 6768
8117cat >>confdefs.h <<\_ACEOF 6769$as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
8118#define HAVE_SECUREWARE 1
8119_ACEOF
8120 6770
8121 disable_ptmx_check=yes 6771 disable_ptmx_check=yes
8122 LIBS="$LIBS -lsecpw" 6772 LIBS="$LIBS -lsecpw"
@@ -8126,191 +6776,67 @@ _ACEOF
8126*-*-irix5*) 6776*-*-irix5*)
8127 PATH="$PATH:/usr/etc" 6777 PATH="$PATH:/usr/etc"
8128 6778
8129cat >>confdefs.h <<\_ACEOF 6779$as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
8130#define BROKEN_INET_NTOA 1
8131_ACEOF
8132 6780
8133 cat >>confdefs.h <<\_ACEOF 6781 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8134#define SETEUID_BREAKS_SETUID 1
8135_ACEOF
8136 6782
8137 cat >>confdefs.h <<\_ACEOF 6783 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8138#define BROKEN_SETREUID 1
8139_ACEOF
8140 6784
8141 cat >>confdefs.h <<\_ACEOF 6785 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8142#define BROKEN_SETREGID 1
8143_ACEOF
8144 6786
8145 6787
8146cat >>confdefs.h <<\_ACEOF 6788$as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
8147#define WITH_ABBREV_NO_TTY 1
8148_ACEOF
8149 6789
8150 cat >>confdefs.h <<\_ACEOF 6790 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
8151#define LOCKED_PASSWD_STRING "*LK*"
8152_ACEOF
8153 6791
8154 ;; 6792 ;;
8155*-*-irix6*) 6793*-*-irix6*)
8156 PATH="$PATH:/usr/etc" 6794 PATH="$PATH:/usr/etc"
8157 6795
8158cat >>confdefs.h <<\_ACEOF 6796$as_echo "#define WITH_IRIX_ARRAY 1" >>confdefs.h
8159#define WITH_IRIX_ARRAY 1
8160_ACEOF
8161
8162
8163cat >>confdefs.h <<\_ACEOF
8164#define WITH_IRIX_PROJECT 1
8165_ACEOF
8166 6797
8167 6798
8168cat >>confdefs.h <<\_ACEOF 6799$as_echo "#define WITH_IRIX_PROJECT 1" >>confdefs.h
8169#define WITH_IRIX_AUDIT 1
8170_ACEOF
8171 6800
8172 { echo "$as_me:$LINENO: checking for jlimit_startjob" >&5
8173echo $ECHO_N "checking for jlimit_startjob... $ECHO_C" >&6; }
8174if test "${ac_cv_func_jlimit_startjob+set}" = set; then
8175 echo $ECHO_N "(cached) $ECHO_C" >&6
8176else
8177 cat >conftest.$ac_ext <<_ACEOF
8178/* confdefs.h. */
8179_ACEOF
8180cat confdefs.h >>conftest.$ac_ext
8181cat >>conftest.$ac_ext <<_ACEOF
8182/* end confdefs.h. */
8183/* Define jlimit_startjob to an innocuous variant, in case <limits.h> declares jlimit_startjob.
8184 For example, HP-UX 11i <limits.h> declares gettimeofday. */
8185#define jlimit_startjob innocuous_jlimit_startjob
8186 6801
8187/* System header to define __stub macros and hopefully few prototypes, 6802$as_echo "#define WITH_IRIX_AUDIT 1" >>confdefs.h
8188 which can conflict with char jlimit_startjob (); below.
8189 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
8190 <limits.h> exists even on freestanding compilers. */
8191 6803
8192#ifdef __STDC__ 6804 ac_fn_c_check_func "$LINENO" "jlimit_startjob" "ac_cv_func_jlimit_startjob"
8193# include <limits.h> 6805if test "x$ac_cv_func_jlimit_startjob" = xyes; then :
8194#else
8195# include <assert.h>
8196#endif
8197 6806
8198#undef jlimit_startjob 6807$as_echo "#define WITH_IRIX_JOBS 1" >>confdefs.h
8199 6808
8200/* Override any GCC internal prototype to avoid an error.
8201 Use char because int might match the return type of a GCC
8202 builtin and then its argument prototype would still apply. */
8203#ifdef __cplusplus
8204extern "C"
8205#endif
8206char jlimit_startjob ();
8207/* The GNU C library defines this for functions which it implements
8208 to always fail with ENOSYS. Some functions are actually named
8209 something starting with __ and the normal name is an alias. */
8210#if defined __stub_jlimit_startjob || defined __stub___jlimit_startjob
8211choke me
8212#endif
8213
8214int
8215main ()
8216{
8217return jlimit_startjob ();
8218 ;
8219 return 0;
8220}
8221_ACEOF
8222rm -f conftest.$ac_objext conftest$ac_exeext
8223if { (ac_try="$ac_link"
8224case "(($ac_try" in
8225 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8226 *) ac_try_echo=$ac_try;;
8227esac
8228eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8229 (eval "$ac_link") 2>conftest.er1
8230 ac_status=$?
8231 grep -v '^ *+' conftest.er1 >conftest.err
8232 rm -f conftest.er1
8233 cat conftest.err >&5
8234 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8235 (exit $ac_status); } && {
8236 test -z "$ac_c_werror_flag" ||
8237 test ! -s conftest.err
8238 } && test -s conftest$ac_exeext &&
8239 $as_test_x conftest$ac_exeext; then
8240 ac_cv_func_jlimit_startjob=yes
8241else
8242 echo "$as_me: failed program was:" >&5
8243sed 's/^/| /' conftest.$ac_ext >&5
8244
8245 ac_cv_func_jlimit_startjob=no
8246fi
8247
8248rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
8249 conftest$ac_exeext conftest.$ac_ext
8250fi 6809fi
8251{ echo "$as_me:$LINENO: result: $ac_cv_func_jlimit_startjob" >&5
8252echo "${ECHO_T}$ac_cv_func_jlimit_startjob" >&6; }
8253if test $ac_cv_func_jlimit_startjob = yes; then
8254 6810
8255cat >>confdefs.h <<\_ACEOF 6811 $as_echo "#define BROKEN_INET_NTOA 1" >>confdefs.h
8256#define WITH_IRIX_JOBS 1
8257_ACEOF
8258
8259fi
8260
8261 cat >>confdefs.h <<\_ACEOF
8262#define BROKEN_INET_NTOA 1
8263_ACEOF
8264 6812
8265 cat >>confdefs.h <<\_ACEOF 6813 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8266#define SETEUID_BREAKS_SETUID 1
8267_ACEOF
8268 6814
8269 cat >>confdefs.h <<\_ACEOF 6815 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8270#define BROKEN_SETREUID 1
8271_ACEOF
8272 6816
8273 cat >>confdefs.h <<\_ACEOF 6817 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8274#define BROKEN_SETREGID 1
8275_ACEOF
8276 6818
8277 6819
8278cat >>confdefs.h <<\_ACEOF 6820$as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
8279#define BROKEN_UPDWTMPX 1
8280_ACEOF
8281 6821
8282 cat >>confdefs.h <<\_ACEOF 6822 $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
8283#define WITH_ABBREV_NO_TTY 1
8284_ACEOF
8285 6823
8286 cat >>confdefs.h <<\_ACEOF 6824 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
8287#define LOCKED_PASSWD_STRING "*LK*"
8288_ACEOF
8289 6825
8290 ;; 6826 ;;
8291*-*-k*bsd*-gnu | *-*-kopensolaris*-gnu) 6827*-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
8292 check_for_libcrypt_later=1 6828 check_for_libcrypt_later=1
8293 cat >>confdefs.h <<\_ACEOF 6829 $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
8294#define PAM_TTY_KLUDGE 1
8295_ACEOF
8296 6830
8297 cat >>confdefs.h <<\_ACEOF 6831 $as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
8298#define LOCKED_PASSWD_PREFIX "!"
8299_ACEOF
8300 6832
8301 cat >>confdefs.h <<\_ACEOF 6833 $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
8302#define SPT_TYPE SPT_REUSEARGV
8303_ACEOF
8304 6834
8305 6835
8306cat >>confdefs.h <<\_ACEOF 6836$as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
8307#define _PATH_BTMP "/var/log/btmp"
8308_ACEOF
8309 6837
8310 6838
8311cat >>confdefs.h <<\_ACEOF 6839$as_echo "#define USE_BTMP 1" >>confdefs.h
8312#define USE_BTMP 1
8313_ACEOF
8314 6840
8315 ;; 6841 ;;
8316*-*-linux*) 6842*-*-linux*)
@@ -8318,188 +6844,39 @@ _ACEOF
8318 check_for_libcrypt_later=1 6844 check_for_libcrypt_later=1
8319 check_for_openpty_ctty_bug=1 6845 check_for_openpty_ctty_bug=1
8320 6846
8321cat >>confdefs.h <<\_ACEOF 6847$as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
8322#define PAM_TTY_KLUDGE 1
8323_ACEOF
8324 6848
8325 6849
8326cat >>confdefs.h <<\_ACEOF 6850$as_echo "#define LOCKED_PASSWD_PREFIX \"!\"" >>confdefs.h
8327#define LOCKED_PASSWD_PREFIX "!"
8328_ACEOF
8329 6851
8330 cat >>confdefs.h <<\_ACEOF 6852 $as_echo "#define SPT_TYPE SPT_REUSEARGV" >>confdefs.h
8331#define SPT_TYPE SPT_REUSEARGV
8332_ACEOF
8333 6853
8334 6854
8335cat >>confdefs.h <<\_ACEOF 6855$as_echo "#define LINK_OPNOTSUPP_ERRNO EPERM" >>confdefs.h
8336#define LINK_OPNOTSUPP_ERRNO EPERM
8337_ACEOF
8338 6856
8339 6857
8340cat >>confdefs.h <<\_ACEOF 6858$as_echo "#define _PATH_BTMP \"/var/log/btmp\"" >>confdefs.h
8341#define _PATH_BTMP "/var/log/btmp"
8342_ACEOF
8343 6859
8344 cat >>confdefs.h <<\_ACEOF 6860 $as_echo "#define USE_BTMP 1" >>confdefs.h
8345#define USE_BTMP 1
8346_ACEOF
8347 6861
8348 6862
8349cat >>confdefs.h <<\_ACEOF 6863$as_echo "#define LINUX_OOM_ADJUST 1" >>confdefs.h
8350#define LINUX_OOM_ADJUST 1
8351_ACEOF
8352 6864
8353 inet6_default_4in6=yes 6865 inet6_default_4in6=yes
8354 case `uname -r` in 6866 case `uname -r` in
8355 1.*|2.0.*) 6867 1.*|2.0.*)
8356 6868
8357cat >>confdefs.h <<\_ACEOF 6869$as_echo "#define BROKEN_CMSG_TYPE 1" >>confdefs.h
8358#define BROKEN_CMSG_TYPE 1
8359_ACEOF
8360 6870
8361 ;; 6871 ;;
8362 esac 6872 esac
8363 # tun(4) forwarding compat code 6873 # tun(4) forwarding compat code
8364 6874 for ac_header in linux/if_tun.h
8365for ac_header in linux/if_tun.h 6875do :
8366do 6876 ac_fn_c_check_header_mongrel "$LINENO" "linux/if_tun.h" "ac_cv_header_linux_if_tun_h" "$ac_includes_default"
8367as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 6877if test "x$ac_cv_header_linux_if_tun_h" = xyes; then :
8368if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8369 { echo "$as_me:$LINENO: checking for $ac_header" >&5
8370echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8371if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8372 echo $ECHO_N "(cached) $ECHO_C" >&6
8373fi
8374ac_res=`eval echo '${'$as_ac_Header'}'`
8375 { echo "$as_me:$LINENO: result: $ac_res" >&5
8376echo "${ECHO_T}$ac_res" >&6; }
8377else
8378 # Is the header compilable?
8379{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
8380echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
8381cat >conftest.$ac_ext <<_ACEOF
8382/* confdefs.h. */
8383_ACEOF
8384cat confdefs.h >>conftest.$ac_ext
8385cat >>conftest.$ac_ext <<_ACEOF
8386/* end confdefs.h. */
8387$ac_includes_default
8388#include <$ac_header>
8389_ACEOF
8390rm -f conftest.$ac_objext
8391if { (ac_try="$ac_compile"
8392case "(($ac_try" in
8393 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8394 *) ac_try_echo=$ac_try;;
8395esac
8396eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8397 (eval "$ac_compile") 2>conftest.er1
8398 ac_status=$?
8399 grep -v '^ *+' conftest.er1 >conftest.err
8400 rm -f conftest.er1
8401 cat conftest.err >&5
8402 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8403 (exit $ac_status); } && {
8404 test -z "$ac_c_werror_flag" ||
8405 test ! -s conftest.err
8406 } && test -s conftest.$ac_objext; then
8407 ac_header_compiler=yes
8408else
8409 echo "$as_me: failed program was:" >&5
8410sed 's/^/| /' conftest.$ac_ext >&5
8411
8412 ac_header_compiler=no
8413fi
8414
8415rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8416{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8417echo "${ECHO_T}$ac_header_compiler" >&6; }
8418
8419# Is the header present?
8420{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
8421echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
8422cat >conftest.$ac_ext <<_ACEOF
8423/* confdefs.h. */
8424_ACEOF
8425cat confdefs.h >>conftest.$ac_ext
8426cat >>conftest.$ac_ext <<_ACEOF
8427/* end confdefs.h. */
8428#include <$ac_header>
8429_ACEOF
8430if { (ac_try="$ac_cpp conftest.$ac_ext"
8431case "(($ac_try" in
8432 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8433 *) ac_try_echo=$ac_try;;
8434esac
8435eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8436 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8437 ac_status=$?
8438 grep -v '^ *+' conftest.er1 >conftest.err
8439 rm -f conftest.er1
8440 cat conftest.err >&5
8441 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8442 (exit $ac_status); } >/dev/null && {
8443 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8444 test ! -s conftest.err
8445 }; then
8446 ac_header_preproc=yes
8447else
8448 echo "$as_me: failed program was:" >&5
8449sed 's/^/| /' conftest.$ac_ext >&5
8450
8451 ac_header_preproc=no
8452fi
8453
8454rm -f conftest.err conftest.$ac_ext
8455{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8456echo "${ECHO_T}$ac_header_preproc" >&6; }
8457
8458# So? What about this header?
8459case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8460 yes:no: )
8461 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
8462echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
8463 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
8464echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
8465 ac_header_preproc=yes
8466 ;;
8467 no:yes:* )
8468 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
8469echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
8470 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
8471echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
8472 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
8473echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
8474 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
8475echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
8476 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
8477echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
8478 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
8479echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
8480 ( cat <<\_ASBOX
8481## ------------------------------------------- ##
8482## Report this to openssh-unix-dev@mindrot.org ##
8483## ------------------------------------------- ##
8484_ASBOX
8485 ) | sed "s/^/$as_me: WARNING: /" >&2
8486 ;;
8487esac
8488{ echo "$as_me:$LINENO: checking for $ac_header" >&5
8489echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
8490if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
8491 echo $ECHO_N "(cached) $ECHO_C" >&6
8492else
8493 eval "$as_ac_Header=\$ac_header_preproc"
8494fi
8495ac_res=`eval echo '${'$as_ac_Header'}'`
8496 { echo "$as_me:$LINENO: result: $ac_res" >&5
8497echo "${ECHO_T}$ac_res" >&6; }
8498
8499fi
8500if test `eval echo '${'$as_ac_Header'}'` = yes; then
8501 cat >>confdefs.h <<_ACEOF 6878 cat >>confdefs.h <<_ACEOF
8502#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 6879#define HAVE_LINUX_IF_TUN_H 1
8503_ACEOF 6880_ACEOF
8504 6881
8505fi 6882fi
@@ -8508,27 +6885,19 @@ done
8508 6885
8509 if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then 6886 if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then
8510 6887
8511cat >>confdefs.h <<\_ACEOF 6888$as_echo "#define SSH_TUN_LINUX 1" >>confdefs.h
8512#define SSH_TUN_LINUX 1
8513_ACEOF
8514 6889
8515 6890
8516cat >>confdefs.h <<\_ACEOF 6891$as_echo "#define SSH_TUN_COMPAT_AF 1" >>confdefs.h
8517#define SSH_TUN_COMPAT_AF 1
8518_ACEOF
8519 6892
8520 6893
8521cat >>confdefs.h <<\_ACEOF 6894$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
8522#define SSH_TUN_PREPEND_AF 1
8523_ACEOF
8524 6895
8525 fi 6896 fi
8526 ;; 6897 ;;
8527mips-sony-bsd|mips-sony-newsos4) 6898mips-sony-bsd|mips-sony-newsos4)
8528 6899
8529cat >>confdefs.h <<\_ACEOF 6900$as_echo "#define NEED_SETPGRP 1" >>confdefs.h
8530#define NEED_SETPGRP 1
8531_ACEOF
8532 6901
8533 SONY=1 6902 SONY=1
8534 ;; 6903 ;;
@@ -8538,460 +6907,140 @@ _ACEOF
8538 need_dash_r=1 6907 need_dash_r=1
8539 fi 6908 fi
8540 6909
8541cat >>confdefs.h <<\_ACEOF 6910$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
8542#define SSH_TUN_FREEBSD 1
8543_ACEOF
8544 6911
8545 if test "${ac_cv_header_net_if_tap_h+set}" = set; then 6912 ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
8546 { echo "$as_me:$LINENO: checking for net/if_tap.h" >&5 6913if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
8547echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
8548if test "${ac_cv_header_net_if_tap_h+set}" = set; then
8549 echo $ECHO_N "(cached) $ECHO_C" >&6
8550fi
8551{ echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5
8552echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
8553else
8554 # Is the header compilable?
8555{ echo "$as_me:$LINENO: checking net/if_tap.h usability" >&5
8556echo $ECHO_N "checking net/if_tap.h usability... $ECHO_C" >&6; }
8557cat >conftest.$ac_ext <<_ACEOF
8558/* confdefs.h. */
8559_ACEOF
8560cat confdefs.h >>conftest.$ac_ext
8561cat >>conftest.$ac_ext <<_ACEOF
8562/* end confdefs.h. */
8563$ac_includes_default
8564#include <net/if_tap.h>
8565_ACEOF
8566rm -f conftest.$ac_objext
8567if { (ac_try="$ac_compile"
8568case "(($ac_try" in
8569 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8570 *) ac_try_echo=$ac_try;;
8571esac
8572eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8573 (eval "$ac_compile") 2>conftest.er1
8574 ac_status=$?
8575 grep -v '^ *+' conftest.er1 >conftest.err
8576 rm -f conftest.er1
8577 cat conftest.err >&5
8578 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8579 (exit $ac_status); } && {
8580 test -z "$ac_c_werror_flag" ||
8581 test ! -s conftest.err
8582 } && test -s conftest.$ac_objext; then
8583 ac_header_compiler=yes
8584else
8585 echo "$as_me: failed program was:" >&5
8586sed 's/^/| /' conftest.$ac_ext >&5
8587
8588 ac_header_compiler=no
8589fi
8590
8591rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8592{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8593echo "${ECHO_T}$ac_header_compiler" >&6; }
8594
8595# Is the header present?
8596{ echo "$as_me:$LINENO: checking net/if_tap.h presence" >&5
8597echo $ECHO_N "checking net/if_tap.h presence... $ECHO_C" >&6; }
8598cat >conftest.$ac_ext <<_ACEOF
8599/* confdefs.h. */
8600_ACEOF
8601cat confdefs.h >>conftest.$ac_ext
8602cat >>conftest.$ac_ext <<_ACEOF
8603/* end confdefs.h. */
8604#include <net/if_tap.h>
8605_ACEOF
8606if { (ac_try="$ac_cpp conftest.$ac_ext"
8607case "(($ac_try" in
8608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8609 *) ac_try_echo=$ac_try;;
8610esac
8611eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8612 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8613 ac_status=$?
8614 grep -v '^ *+' conftest.er1 >conftest.err
8615 rm -f conftest.er1
8616 cat conftest.err >&5
8617 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8618 (exit $ac_status); } >/dev/null && {
8619 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8620 test ! -s conftest.err
8621 }; then
8622 ac_header_preproc=yes
8623else
8624 echo "$as_me: failed program was:" >&5
8625sed 's/^/| /' conftest.$ac_ext >&5
8626
8627 ac_header_preproc=no
8628fi
8629
8630rm -f conftest.err conftest.$ac_ext
8631{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8632echo "${ECHO_T}$ac_header_preproc" >&6; }
8633
8634# So? What about this header?
8635case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
8636 yes:no: )
8637 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: accepted by the compiler, rejected by the preprocessor!" >&5
8638echo "$as_me: WARNING: net/if_tap.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8639 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: proceeding with the compiler's result" >&5
8640echo "$as_me: WARNING: net/if_tap.h: proceeding with the compiler's result" >&2;}
8641 ac_header_preproc=yes
8642 ;;
8643 no:yes:* )
8644 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: present but cannot be compiled" >&5
8645echo "$as_me: WARNING: net/if_tap.h: present but cannot be compiled" >&2;}
8646 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: check for missing prerequisite headers?" >&5
8647echo "$as_me: WARNING: net/if_tap.h: check for missing prerequisite headers?" >&2;}
8648 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: see the Autoconf documentation" >&5
8649echo "$as_me: WARNING: net/if_tap.h: see the Autoconf documentation" >&2;}
8650 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: section \"Present But Cannot Be Compiled\"" >&5
8651echo "$as_me: WARNING: net/if_tap.h: section \"Present But Cannot Be Compiled\"" >&2;}
8652 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&5
8653echo "$as_me: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&2;}
8654 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&5
8655echo "$as_me: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&2;}
8656 ( cat <<\_ASBOX
8657## ------------------------------------------- ##
8658## Report this to openssh-unix-dev@mindrot.org ##
8659## ------------------------------------------- ##
8660_ASBOX
8661 ) | sed "s/^/$as_me: WARNING: /" >&2
8662 ;;
8663esac
8664{ echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
8665echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
8666if test "${ac_cv_header_net_if_tap_h+set}" = set; then
8667 echo $ECHO_N "(cached) $ECHO_C" >&6
8668else
8669 ac_cv_header_net_if_tap_h=$ac_header_preproc
8670fi
8671{ echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5
8672echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
8673 6914
8674fi
8675if test $ac_cv_header_net_if_tap_h = yes; then
8676 :
8677else 6915else
8678 6916
8679cat >>confdefs.h <<\_ACEOF 6917$as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
8680#define SSH_TUN_NO_L2 1
8681_ACEOF
8682 6918
8683fi 6919fi
8684 6920
8685 6921
8686 6922
8687cat >>confdefs.h <<\_ACEOF 6923$as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
8688#define SSH_TUN_PREPEND_AF 1
8689_ACEOF
8690 6924
8691 ;; 6925 ;;
8692*-*-freebsd*) 6926*-*-freebsd*)
8693 check_for_libcrypt_later=1 6927 check_for_libcrypt_later=1
8694 6928
8695cat >>confdefs.h <<\_ACEOF 6929$as_echo "#define LOCKED_PASSWD_PREFIX \"*LOCKED*\"" >>confdefs.h
8696#define LOCKED_PASSWD_PREFIX "*LOCKED*"
8697_ACEOF
8698
8699
8700cat >>confdefs.h <<\_ACEOF
8701#define SSH_TUN_FREEBSD 1
8702_ACEOF
8703
8704 if test "${ac_cv_header_net_if_tap_h+set}" = set; then
8705 { echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
8706echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
8707if test "${ac_cv_header_net_if_tap_h+set}" = set; then
8708 echo $ECHO_N "(cached) $ECHO_C" >&6
8709fi
8710{ echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5
8711echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
8712else
8713 # Is the header compilable?
8714{ echo "$as_me:$LINENO: checking net/if_tap.h usability" >&5
8715echo $ECHO_N "checking net/if_tap.h usability... $ECHO_C" >&6; }
8716cat >conftest.$ac_ext <<_ACEOF
8717/* confdefs.h. */
8718_ACEOF
8719cat confdefs.h >>conftest.$ac_ext
8720cat >>conftest.$ac_ext <<_ACEOF
8721/* end confdefs.h. */
8722$ac_includes_default
8723#include <net/if_tap.h>
8724_ACEOF
8725rm -f conftest.$ac_objext
8726if { (ac_try="$ac_compile"
8727case "(($ac_try" in
8728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8729 *) ac_try_echo=$ac_try;;
8730esac
8731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8732 (eval "$ac_compile") 2>conftest.er1
8733 ac_status=$?
8734 grep -v '^ *+' conftest.er1 >conftest.err
8735 rm -f conftest.er1
8736 cat conftest.err >&5
8737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8738 (exit $ac_status); } && {
8739 test -z "$ac_c_werror_flag" ||
8740 test ! -s conftest.err
8741 } && test -s conftest.$ac_objext; then
8742 ac_header_compiler=yes
8743else
8744 echo "$as_me: failed program was:" >&5
8745sed 's/^/| /' conftest.$ac_ext >&5
8746
8747 ac_header_compiler=no
8748fi
8749
8750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8751{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
8752echo "${ECHO_T}$ac_header_compiler" >&6; }
8753
8754# Is the header present?
8755{ echo "$as_me:$LINENO: checking net/if_tap.h presence" >&5
8756echo $ECHO_N "checking net/if_tap.h presence... $ECHO_C" >&6; }
8757cat >conftest.$ac_ext <<_ACEOF
8758/* confdefs.h. */
8759_ACEOF
8760cat confdefs.h >>conftest.$ac_ext
8761cat >>conftest.$ac_ext <<_ACEOF
8762/* end confdefs.h. */
8763#include <net/if_tap.h>
8764_ACEOF
8765if { (ac_try="$ac_cpp conftest.$ac_ext"
8766case "(($ac_try" in
8767 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
8768 *) ac_try_echo=$ac_try;;
8769esac
8770eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
8771 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
8772 ac_status=$?
8773 grep -v '^ *+' conftest.er1 >conftest.err
8774 rm -f conftest.er1
8775 cat conftest.err >&5
8776 echo "$as_me:$LINENO: \$? = $ac_status" >&5
8777 (exit $ac_status); } >/dev/null && {
8778 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
8779 test ! -s conftest.err
8780 }; then
8781 ac_header_preproc=yes
8782else
8783 echo "$as_me: failed program was:" >&5
8784sed 's/^/| /' conftest.$ac_ext >&5
8785 6930
8786 ac_header_preproc=no
8787fi
8788 6931
8789rm -f conftest.err conftest.$ac_ext 6932$as_echo "#define SSH_TUN_FREEBSD 1" >>confdefs.h
8790{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
8791echo "${ECHO_T}$ac_header_preproc" >&6; }
8792 6933
8793# So? What about this header? 6934 ac_fn_c_check_header_mongrel "$LINENO" "net/if_tap.h" "ac_cv_header_net_if_tap_h" "$ac_includes_default"
8794case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 6935if test "x$ac_cv_header_net_if_tap_h" = xyes; then :
8795 yes:no: )
8796 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: accepted by the compiler, rejected by the preprocessor!" >&5
8797echo "$as_me: WARNING: net/if_tap.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
8798 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: proceeding with the compiler's result" >&5
8799echo "$as_me: WARNING: net/if_tap.h: proceeding with the compiler's result" >&2;}
8800 ac_header_preproc=yes
8801 ;;
8802 no:yes:* )
8803 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: present but cannot be compiled" >&5
8804echo "$as_me: WARNING: net/if_tap.h: present but cannot be compiled" >&2;}
8805 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: check for missing prerequisite headers?" >&5
8806echo "$as_me: WARNING: net/if_tap.h: check for missing prerequisite headers?" >&2;}
8807 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: see the Autoconf documentation" >&5
8808echo "$as_me: WARNING: net/if_tap.h: see the Autoconf documentation" >&2;}
8809 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: section \"Present But Cannot Be Compiled\"" >&5
8810echo "$as_me: WARNING: net/if_tap.h: section \"Present But Cannot Be Compiled\"" >&2;}
8811 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&5
8812echo "$as_me: WARNING: net/if_tap.h: proceeding with the preprocessor's result" >&2;}
8813 { echo "$as_me:$LINENO: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&5
8814echo "$as_me: WARNING: net/if_tap.h: in the future, the compiler will take precedence" >&2;}
8815 ( cat <<\_ASBOX
8816## ------------------------------------------- ##
8817## Report this to openssh-unix-dev@mindrot.org ##
8818## ------------------------------------------- ##
8819_ASBOX
8820 ) | sed "s/^/$as_me: WARNING: /" >&2
8821 ;;
8822esac
8823{ echo "$as_me:$LINENO: checking for net/if_tap.h" >&5
8824echo $ECHO_N "checking for net/if_tap.h... $ECHO_C" >&6; }
8825if test "${ac_cv_header_net_if_tap_h+set}" = set; then
8826 echo $ECHO_N "(cached) $ECHO_C" >&6
8827else
8828 ac_cv_header_net_if_tap_h=$ac_header_preproc
8829fi
8830{ echo "$as_me:$LINENO: result: $ac_cv_header_net_if_tap_h" >&5
8831echo "${ECHO_T}$ac_cv_header_net_if_tap_h" >&6; }
8832 6936
8833fi
8834if test $ac_cv_header_net_if_tap_h = yes; then
8835 :
8836else 6937else
8837 6938
8838cat >>confdefs.h <<\_ACEOF 6939$as_echo "#define SSH_TUN_NO_L2 1" >>confdefs.h
8839#define SSH_TUN_NO_L2 1
8840_ACEOF
8841 6940
8842fi 6941fi
8843 6942
8844 6943
8845 6944
8846cat >>confdefs.h <<\_ACEOF 6945$as_echo "#define BROKEN_GLOB 1" >>confdefs.h
8847#define BROKEN_GLOB 1
8848_ACEOF
8849 6946
8850 ;; 6947 ;;
8851*-*-bsdi*) 6948*-*-bsdi*)
8852 cat >>confdefs.h <<\_ACEOF 6949 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
8853#define SETEUID_BREAKS_SETUID 1
8854_ACEOF
8855 6950
8856 cat >>confdefs.h <<\_ACEOF 6951 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
8857#define BROKEN_SETREUID 1
8858_ACEOF
8859 6952
8860 cat >>confdefs.h <<\_ACEOF 6953 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
8861#define BROKEN_SETREGID 1
8862_ACEOF
8863 6954
8864 ;; 6955 ;;
8865*-next-*) 6956*-next-*)
8866 conf_lastlog_location="/usr/adm/lastlog" 6957 conf_lastlog_location="/usr/adm/lastlog"
8867 conf_utmp_location=/etc/utmp 6958 conf_utmp_location=/etc/utmp
8868 conf_wtmp_location=/usr/adm/wtmp 6959 conf_wtmp_location=/usr/adm/wtmp
8869 MAIL=/usr/spool/mail 6960 maildir=/usr/spool/mail
8870 6961
8871cat >>confdefs.h <<\_ACEOF 6962$as_echo "#define HAVE_NEXT 1" >>confdefs.h
8872#define HAVE_NEXT 1
8873_ACEOF
8874 6963
8875 cat >>confdefs.h <<\_ACEOF 6964 $as_echo "#define BROKEN_REALPATH 1" >>confdefs.h
8876#define BROKEN_REALPATH 1
8877_ACEOF
8878 6965
8879 cat >>confdefs.h <<\_ACEOF 6966 $as_echo "#define USE_PIPES 1" >>confdefs.h
8880#define USE_PIPES 1
8881_ACEOF
8882 6967
8883 6968
8884cat >>confdefs.h <<\_ACEOF 6969$as_echo "#define BROKEN_SAVED_UIDS 1" >>confdefs.h
8885#define BROKEN_SAVED_UIDS 1
8886_ACEOF
8887 6970
8888 ;; 6971 ;;
8889*-*-openbsd*) 6972*-*-openbsd*)
8890 6973
8891cat >>confdefs.h <<\_ACEOF 6974$as_echo "#define HAVE_ATTRIBUTE__SENTINEL__ 1" >>confdefs.h
8892#define HAVE_ATTRIBUTE__SENTINEL__ 1
8893_ACEOF
8894 6975
8895 6976
8896cat >>confdefs.h <<\_ACEOF 6977$as_echo "#define HAVE_ATTRIBUTE__BOUNDED__ 1" >>confdefs.h
8897#define HAVE_ATTRIBUTE__BOUNDED__ 1
8898_ACEOF
8899 6978
8900 6979
8901cat >>confdefs.h <<\_ACEOF 6980$as_echo "#define SSH_TUN_OPENBSD 1" >>confdefs.h
8902#define SSH_TUN_OPENBSD 1
8903_ACEOF
8904 6981
8905 6982
8906cat >>confdefs.h <<\_ACEOF 6983$as_echo "#define SYSLOG_R_SAFE_IN_SIGHAND 1" >>confdefs.h
8907#define SYSLOG_R_SAFE_IN_SIGHAND 1
8908_ACEOF
8909 6984
8910 ;; 6985 ;;
8911*-*-solaris*) 6986*-*-solaris*)
8912 if test "x$withval" != "xno" ; then 6987 if test "x$withval" != "xno" ; then
8913 need_dash_r=1 6988 need_dash_r=1
8914 fi 6989 fi
8915 cat >>confdefs.h <<\_ACEOF 6990 $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
8916#define PAM_SUN_CODEBASE 1
8917_ACEOF
8918 6991
8919 cat >>confdefs.h <<\_ACEOF 6992 $as_echo "#define LOGIN_NEEDS_UTMPX 1" >>confdefs.h
8920#define LOGIN_NEEDS_UTMPX 1
8921_ACEOF
8922 6993
8923 6994
8924cat >>confdefs.h <<\_ACEOF 6995$as_echo "#define LOGIN_NEEDS_TERM 1" >>confdefs.h
8925#define LOGIN_NEEDS_TERM 1
8926_ACEOF
8927 6996
8928 cat >>confdefs.h <<\_ACEOF 6997 $as_echo "#define PAM_TTY_KLUDGE 1" >>confdefs.h
8929#define PAM_TTY_KLUDGE 1
8930_ACEOF
8931 6998
8932 6999
8933cat >>confdefs.h <<\_ACEOF 7000$as_echo "#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1" >>confdefs.h
8934#define SSHPAM_CHAUTHTOK_NEEDS_RUID 1
8935_ACEOF
8936 7001
8937 cat >>confdefs.h <<\_ACEOF 7002 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
8938#define LOCKED_PASSWD_STRING "*LK*"
8939_ACEOF
8940 7003
8941 # Pushing STREAMS modules will cause sshd to acquire a controlling tty. 7004 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
8942 7005
8943cat >>confdefs.h <<\_ACEOF 7006$as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
8944#define SSHD_ACQUIRES_CTTY 1
8945_ACEOF
8946 7007
8947 7008
8948cat >>confdefs.h <<\_ACEOF 7009$as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
8949#define PASSWD_NEEDS_USERNAME 1
8950_ACEOF
8951 7010
8952 7011
8953cat >>confdefs.h <<\_ACEOF 7012$as_echo "#define BROKEN_TCGETATTR_ICANON 1" >>confdefs.h
8954#define BROKEN_TCGETATTR_ICANON 1
8955_ACEOF
8956 7013
8957 external_path_file=/etc/default/login 7014 external_path_file=/etc/default/login
8958 # hardwire lastlog location (can't detect it on some versions) 7015 # hardwire lastlog location (can't detect it on some versions)
8959 conf_lastlog_location="/var/adm/lastlog" 7016 conf_lastlog_location="/var/adm/lastlog"
8960 { echo "$as_me:$LINENO: checking for obsolete utmp and wtmp in solaris2.x" >&5 7017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obsolete utmp and wtmp in solaris2.x" >&5
8961echo $ECHO_N "checking for obsolete utmp and wtmp in solaris2.x... $ECHO_C" >&6; } 7018$as_echo_n "checking for obsolete utmp and wtmp in solaris2.x... " >&6; }
8962 sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'` 7019 sol2ver=`echo "$host"| sed -e 's/.*[0-9]\.//'`
8963 if test "$sol2ver" -ge 8; then 7020 if test "$sol2ver" -ge 8; then
8964 { echo "$as_me:$LINENO: result: yes" >&5 7021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
8965echo "${ECHO_T}yes" >&6; } 7022$as_echo "yes" >&6; }
8966 cat >>confdefs.h <<\_ACEOF 7023 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
8967#define DISABLE_UTMP 1
8968_ACEOF
8969 7024
8970 7025
8971cat >>confdefs.h <<\_ACEOF 7026$as_echo "#define DISABLE_WTMP 1" >>confdefs.h
8972#define DISABLE_WTMP 1
8973_ACEOF
8974 7027
8975 else 7028 else
8976 { echo "$as_me:$LINENO: result: no" >&5 7029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8977echo "${ECHO_T}no" >&6; } 7030$as_echo "no" >&6; }
8978 fi 7031 fi
8979 7032
8980# Check whether --with-solaris-contracts was given. 7033# Check whether --with-solaris-contracts was given.
8981if test "${with_solaris_contracts+set}" = set; then 7034if test "${with_solaris_contracts+set}" = set; then :
8982 withval=$with_solaris_contracts; 7035 withval=$with_solaris_contracts;
8983 { echo "$as_me:$LINENO: checking for ct_tmpl_activate in -lcontract" >&5 7036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ct_tmpl_activate in -lcontract" >&5
8984echo $ECHO_N "checking for ct_tmpl_activate in -lcontract... $ECHO_C" >&6; } 7037$as_echo_n "checking for ct_tmpl_activate in -lcontract... " >&6; }
8985if test "${ac_cv_lib_contract_ct_tmpl_activate+set}" = set; then 7038if ${ac_cv_lib_contract_ct_tmpl_activate+:} false; then :
8986 echo $ECHO_N "(cached) $ECHO_C" >&6 7039 $as_echo_n "(cached) " >&6
8987else 7040else
8988 ac_check_lib_save_LIBS=$LIBS 7041 ac_check_lib_save_LIBS=$LIBS
8989LIBS="-lcontract $LIBS" 7042LIBS="-lcontract $LIBS"
8990cat >conftest.$ac_ext <<_ACEOF 7043cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8991/* confdefs.h. */
8992_ACEOF
8993cat confdefs.h >>conftest.$ac_ext
8994cat >>conftest.$ac_ext <<_ACEOF
8995/* end confdefs.h. */ 7044/* end confdefs.h. */
8996 7045
8997/* Override any GCC internal prototype to avoid an error. 7046/* Override any GCC internal prototype to avoid an error.
@@ -9009,43 +7058,20 @@ return ct_tmpl_activate ();
9009 return 0; 7058 return 0;
9010} 7059}
9011_ACEOF 7060_ACEOF
9012rm -f conftest.$ac_objext conftest$ac_exeext 7061if ac_fn_c_try_link "$LINENO"; then :
9013if { (ac_try="$ac_link"
9014case "(($ac_try" in
9015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9016 *) ac_try_echo=$ac_try;;
9017esac
9018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9019 (eval "$ac_link") 2>conftest.er1
9020 ac_status=$?
9021 grep -v '^ *+' conftest.er1 >conftest.err
9022 rm -f conftest.er1
9023 cat conftest.err >&5
9024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9025 (exit $ac_status); } && {
9026 test -z "$ac_c_werror_flag" ||
9027 test ! -s conftest.err
9028 } && test -s conftest$ac_exeext &&
9029 $as_test_x conftest$ac_exeext; then
9030 ac_cv_lib_contract_ct_tmpl_activate=yes 7062 ac_cv_lib_contract_ct_tmpl_activate=yes
9031else 7063else
9032 echo "$as_me: failed program was:" >&5 7064 ac_cv_lib_contract_ct_tmpl_activate=no
9033sed 's/^/| /' conftest.$ac_ext >&5
9034
9035 ac_cv_lib_contract_ct_tmpl_activate=no
9036fi 7065fi
9037 7066rm -f core conftest.err conftest.$ac_objext \
9038rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 7067 conftest$ac_exeext conftest.$ac_ext
9039 conftest$ac_exeext conftest.$ac_ext
9040LIBS=$ac_check_lib_save_LIBS 7068LIBS=$ac_check_lib_save_LIBS
9041fi 7069fi
9042{ echo "$as_me:$LINENO: result: $ac_cv_lib_contract_ct_tmpl_activate" >&5 7070{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_contract_ct_tmpl_activate" >&5
9043echo "${ECHO_T}$ac_cv_lib_contract_ct_tmpl_activate" >&6; } 7071$as_echo "$ac_cv_lib_contract_ct_tmpl_activate" >&6; }
9044if test $ac_cv_lib_contract_ct_tmpl_activate = yes; then 7072if test "x$ac_cv_lib_contract_ct_tmpl_activate" = xyes; then :
9045 7073
9046cat >>confdefs.h <<\_ACEOF 7074$as_echo "#define USE_SOLARIS_PROCESS_CONTRACTS 1" >>confdefs.h
9047#define USE_SOLARIS_PROCESS_CONTRACTS 1
9048_ACEOF
9049 7075
9050 SSHDLIBS="$SSHDLIBS -lcontract" 7076 SSHDLIBS="$SSHDLIBS -lcontract"
9051 SPC_MSG="yes" 7077 SPC_MSG="yes"
@@ -9056,20 +7082,16 @@ fi
9056 7082
9057 7083
9058# Check whether --with-solaris-projects was given. 7084# Check whether --with-solaris-projects was given.
9059if test "${with_solaris_projects+set}" = set; then 7085if test "${with_solaris_projects+set}" = set; then :
9060 withval=$with_solaris_projects; 7086 withval=$with_solaris_projects;
9061 { echo "$as_me:$LINENO: checking for setproject in -lproject" >&5 7087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproject in -lproject" >&5
9062echo $ECHO_N "checking for setproject in -lproject... $ECHO_C" >&6; } 7088$as_echo_n "checking for setproject in -lproject... " >&6; }
9063if test "${ac_cv_lib_project_setproject+set}" = set; then 7089if ${ac_cv_lib_project_setproject+:} false; then :
9064 echo $ECHO_N "(cached) $ECHO_C" >&6 7090 $as_echo_n "(cached) " >&6
9065else 7091else
9066 ac_check_lib_save_LIBS=$LIBS 7092 ac_check_lib_save_LIBS=$LIBS
9067LIBS="-lproject $LIBS" 7093LIBS="-lproject $LIBS"
9068cat >conftest.$ac_ext <<_ACEOF 7094cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9069/* confdefs.h. */
9070_ACEOF
9071cat confdefs.h >>conftest.$ac_ext
9072cat >>conftest.$ac_ext <<_ACEOF
9073/* end confdefs.h. */ 7095/* end confdefs.h. */
9074 7096
9075/* Override any GCC internal prototype to avoid an error. 7097/* Override any GCC internal prototype to avoid an error.
@@ -9087,43 +7109,20 @@ return setproject ();
9087 return 0; 7109 return 0;
9088} 7110}
9089_ACEOF 7111_ACEOF
9090rm -f conftest.$ac_objext conftest$ac_exeext 7112if ac_fn_c_try_link "$LINENO"; then :
9091if { (ac_try="$ac_link"
9092case "(($ac_try" in
9093 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9094 *) ac_try_echo=$ac_try;;
9095esac
9096eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9097 (eval "$ac_link") 2>conftest.er1
9098 ac_status=$?
9099 grep -v '^ *+' conftest.er1 >conftest.err
9100 rm -f conftest.er1
9101 cat conftest.err >&5
9102 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9103 (exit $ac_status); } && {
9104 test -z "$ac_c_werror_flag" ||
9105 test ! -s conftest.err
9106 } && test -s conftest$ac_exeext &&
9107 $as_test_x conftest$ac_exeext; then
9108 ac_cv_lib_project_setproject=yes 7113 ac_cv_lib_project_setproject=yes
9109else 7114else
9110 echo "$as_me: failed program was:" >&5 7115 ac_cv_lib_project_setproject=no
9111sed 's/^/| /' conftest.$ac_ext >&5
9112
9113 ac_cv_lib_project_setproject=no
9114fi 7116fi
9115 7117rm -f core conftest.err conftest.$ac_objext \
9116rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 7118 conftest$ac_exeext conftest.$ac_ext
9117 conftest$ac_exeext conftest.$ac_ext
9118LIBS=$ac_check_lib_save_LIBS 7119LIBS=$ac_check_lib_save_LIBS
9119fi 7120fi
9120{ echo "$as_me:$LINENO: result: $ac_cv_lib_project_setproject" >&5 7121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_project_setproject" >&5
9121echo "${ECHO_T}$ac_cv_lib_project_setproject" >&6; } 7122$as_echo "$ac_cv_lib_project_setproject" >&6; }
9122if test $ac_cv_lib_project_setproject = yes; then 7123if test "x$ac_cv_lib_project_setproject" = xyes; then :
9123 7124
9124cat >>confdefs.h <<\_ACEOF 7125$as_echo "#define USE_SOLARIS_PROJECTS 1" >>confdefs.h
9125#define USE_SOLARIS_PROJECTS 1
9126_ACEOF
9127 7126
9128 SSHDLIBS="$SSHDLIBS -lproject" 7127 SSHDLIBS="$SSHDLIBS -lproject"
9129 SP_MSG="yes" 7128 SP_MSG="yes"
@@ -9135,150 +7134,48 @@ fi
9135 ;; 7134 ;;
9136*-*-sunos4*) 7135*-*-sunos4*)
9137 CPPFLAGS="$CPPFLAGS -DSUNOS4" 7136 CPPFLAGS="$CPPFLAGS -DSUNOS4"
9138 7137 for ac_func in getpwanam
9139for ac_func in getpwanam 7138do :
9140do 7139 ac_fn_c_check_func "$LINENO" "getpwanam" "ac_cv_func_getpwanam"
9141as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 7140if test "x$ac_cv_func_getpwanam" = xyes; then :
9142{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9143echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9144if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9145 echo $ECHO_N "(cached) $ECHO_C" >&6
9146else
9147 cat >conftest.$ac_ext <<_ACEOF
9148/* confdefs.h. */
9149_ACEOF
9150cat confdefs.h >>conftest.$ac_ext
9151cat >>conftest.$ac_ext <<_ACEOF
9152/* end confdefs.h. */
9153/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9154 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9155#define $ac_func innocuous_$ac_func
9156
9157/* System header to define __stub macros and hopefully few prototypes,
9158 which can conflict with char $ac_func (); below.
9159 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9160 <limits.h> exists even on freestanding compilers. */
9161
9162#ifdef __STDC__
9163# include <limits.h>
9164#else
9165# include <assert.h>
9166#endif
9167
9168#undef $ac_func
9169
9170/* Override any GCC internal prototype to avoid an error.
9171 Use char because int might match the return type of a GCC
9172 builtin and then its argument prototype would still apply. */
9173#ifdef __cplusplus
9174extern "C"
9175#endif
9176char $ac_func ();
9177/* The GNU C library defines this for functions which it implements
9178 to always fail with ENOSYS. Some functions are actually named
9179 something starting with __ and the normal name is an alias. */
9180#if defined __stub_$ac_func || defined __stub___$ac_func
9181choke me
9182#endif
9183
9184int
9185main ()
9186{
9187return $ac_func ();
9188 ;
9189 return 0;
9190}
9191_ACEOF
9192rm -f conftest.$ac_objext conftest$ac_exeext
9193if { (ac_try="$ac_link"
9194case "(($ac_try" in
9195 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9196 *) ac_try_echo=$ac_try;;
9197esac
9198eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9199 (eval "$ac_link") 2>conftest.er1
9200 ac_status=$?
9201 grep -v '^ *+' conftest.er1 >conftest.err
9202 rm -f conftest.er1
9203 cat conftest.err >&5
9204 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9205 (exit $ac_status); } && {
9206 test -z "$ac_c_werror_flag" ||
9207 test ! -s conftest.err
9208 } && test -s conftest$ac_exeext &&
9209 $as_test_x conftest$ac_exeext; then
9210 eval "$as_ac_var=yes"
9211else
9212 echo "$as_me: failed program was:" >&5
9213sed 's/^/| /' conftest.$ac_ext >&5
9214
9215 eval "$as_ac_var=no"
9216fi
9217
9218rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9219 conftest$ac_exeext conftest.$ac_ext
9220fi
9221ac_res=`eval echo '${'$as_ac_var'}'`
9222 { echo "$as_me:$LINENO: result: $ac_res" >&5
9223echo "${ECHO_T}$ac_res" >&6; }
9224if test `eval echo '${'$as_ac_var'}'` = yes; then
9225 cat >>confdefs.h <<_ACEOF 7141 cat >>confdefs.h <<_ACEOF
9226#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 7142#define HAVE_GETPWANAM 1
9227_ACEOF 7143_ACEOF
9228 7144
9229fi 7145fi
9230done 7146done
9231 7147
9232 cat >>confdefs.h <<\_ACEOF 7148 $as_echo "#define PAM_SUN_CODEBASE 1" >>confdefs.h
9233#define PAM_SUN_CODEBASE 1
9234_ACEOF
9235 7149
9236 conf_utmp_location=/etc/utmp 7150 conf_utmp_location=/etc/utmp
9237 conf_wtmp_location=/var/adm/wtmp 7151 conf_wtmp_location=/var/adm/wtmp
9238 conf_lastlog_location=/var/adm/lastlog 7152 conf_lastlog_location=/var/adm/lastlog
9239 cat >>confdefs.h <<\_ACEOF 7153 $as_echo "#define USE_PIPES 1" >>confdefs.h
9240#define USE_PIPES 1
9241_ACEOF
9242 7154
9243 ;; 7155 ;;
9244*-ncr-sysv*) 7156*-ncr-sysv*)
9245 LIBS="$LIBS -lc89" 7157 LIBS="$LIBS -lc89"
9246 cat >>confdefs.h <<\_ACEOF 7158 $as_echo "#define USE_PIPES 1" >>confdefs.h
9247#define USE_PIPES 1
9248_ACEOF
9249 7159
9250 cat >>confdefs.h <<\_ACEOF 7160 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
9251#define SSHD_ACQUIRES_CTTY 1
9252_ACEOF
9253 7161
9254 cat >>confdefs.h <<\_ACEOF 7162 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
9255#define SETEUID_BREAKS_SETUID 1
9256_ACEOF
9257 7163
9258 cat >>confdefs.h <<\_ACEOF 7164 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
9259#define BROKEN_SETREUID 1
9260_ACEOF
9261 7165
9262 cat >>confdefs.h <<\_ACEOF 7166 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
9263#define BROKEN_SETREGID 1
9264_ACEOF
9265 7167
9266 ;; 7168 ;;
9267*-sni-sysv*) 7169*-sni-sysv*)
9268 # /usr/ucblib MUST NOT be searched on ReliantUNIX 7170 # /usr/ucblib MUST NOT be searched on ReliantUNIX
9269 7171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
9270{ echo "$as_me:$LINENO: checking for dlsym in -ldl" >&5 7172$as_echo_n "checking for dlsym in -ldl... " >&6; }
9271echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6; } 7173if ${ac_cv_lib_dl_dlsym+:} false; then :
9272if test "${ac_cv_lib_dl_dlsym+set}" = set; then 7174 $as_echo_n "(cached) " >&6
9273 echo $ECHO_N "(cached) $ECHO_C" >&6
9274else 7175else
9275 ac_check_lib_save_LIBS=$LIBS 7176 ac_check_lib_save_LIBS=$LIBS
9276LIBS="-ldl $LIBS" 7177LIBS="-ldl $LIBS"
9277cat >conftest.$ac_ext <<_ACEOF 7178cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9278/* confdefs.h. */
9279_ACEOF
9280cat confdefs.h >>conftest.$ac_ext
9281cat >>conftest.$ac_ext <<_ACEOF
9282/* end confdefs.h. */ 7179/* end confdefs.h. */
9283 7180
9284/* Override any GCC internal prototype to avoid an error. 7181/* Override any GCC internal prototype to avoid an error.
@@ -9296,39 +7193,18 @@ return dlsym ();
9296 return 0; 7193 return 0;
9297} 7194}
9298_ACEOF 7195_ACEOF
9299rm -f conftest.$ac_objext conftest$ac_exeext 7196if ac_fn_c_try_link "$LINENO"; then :
9300if { (ac_try="$ac_link"
9301case "(($ac_try" in
9302 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9303 *) ac_try_echo=$ac_try;;
9304esac
9305eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9306 (eval "$ac_link") 2>conftest.er1
9307 ac_status=$?
9308 grep -v '^ *+' conftest.er1 >conftest.err
9309 rm -f conftest.er1
9310 cat conftest.err >&5
9311 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9312 (exit $ac_status); } && {
9313 test -z "$ac_c_werror_flag" ||
9314 test ! -s conftest.err
9315 } && test -s conftest$ac_exeext &&
9316 $as_test_x conftest$ac_exeext; then
9317 ac_cv_lib_dl_dlsym=yes 7197 ac_cv_lib_dl_dlsym=yes
9318else 7198else
9319 echo "$as_me: failed program was:" >&5 7199 ac_cv_lib_dl_dlsym=no
9320sed 's/^/| /' conftest.$ac_ext >&5
9321
9322 ac_cv_lib_dl_dlsym=no
9323fi 7200fi
9324 7201rm -f core conftest.err conftest.$ac_objext \
9325rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 7202 conftest$ac_exeext conftest.$ac_ext
9326 conftest$ac_exeext conftest.$ac_ext
9327LIBS=$ac_check_lib_save_LIBS 7203LIBS=$ac_check_lib_save_LIBS
9328fi 7204fi
9329{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlsym" >&5 7205{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
9330echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6; } 7206$as_echo "$ac_cv_lib_dl_dlsym" >&6; }
9331if test $ac_cv_lib_dl_dlsym = yes; then 7207if test "x$ac_cv_lib_dl_dlsym" = xyes; then :
9332 cat >>confdefs.h <<_ACEOF 7208 cat >>confdefs.h <<_ACEOF
9333#define HAVE_LIBDL 1 7209#define HAVE_LIBDL 1
9334_ACEOF 7210_ACEOF
@@ -9338,18 +7214,14 @@ _ACEOF
9338fi 7214fi
9339 7215
9340 # -lresolv needs to be at the end of LIBS or DNS lookups break 7216 # -lresolv needs to be at the end of LIBS or DNS lookups break
9341 { echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5 7217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
9342echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6; } 7218$as_echo_n "checking for res_query in -lresolv... " >&6; }
9343if test "${ac_cv_lib_resolv_res_query+set}" = set; then 7219if ${ac_cv_lib_resolv_res_query+:} false; then :
9344 echo $ECHO_N "(cached) $ECHO_C" >&6 7220 $as_echo_n "(cached) " >&6
9345else 7221else
9346 ac_check_lib_save_LIBS=$LIBS 7222 ac_check_lib_save_LIBS=$LIBS
9347LIBS="-lresolv $LIBS" 7223LIBS="-lresolv $LIBS"
9348cat >conftest.$ac_ext <<_ACEOF 7224cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9349/* confdefs.h. */
9350_ACEOF
9351cat confdefs.h >>conftest.$ac_ext
9352cat >>conftest.$ac_ext <<_ACEOF
9353/* end confdefs.h. */ 7225/* end confdefs.h. */
9354 7226
9355/* Override any GCC internal prototype to avoid an error. 7227/* Override any GCC internal prototype to avoid an error.
@@ -9367,66 +7239,33 @@ return res_query ();
9367 return 0; 7239 return 0;
9368} 7240}
9369_ACEOF 7241_ACEOF
9370rm -f conftest.$ac_objext conftest$ac_exeext 7242if ac_fn_c_try_link "$LINENO"; then :
9371if { (ac_try="$ac_link"
9372case "(($ac_try" in
9373 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9374 *) ac_try_echo=$ac_try;;
9375esac
9376eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9377 (eval "$ac_link") 2>conftest.er1
9378 ac_status=$?
9379 grep -v '^ *+' conftest.er1 >conftest.err
9380 rm -f conftest.er1
9381 cat conftest.err >&5
9382 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9383 (exit $ac_status); } && {
9384 test -z "$ac_c_werror_flag" ||
9385 test ! -s conftest.err
9386 } && test -s conftest$ac_exeext &&
9387 $as_test_x conftest$ac_exeext; then
9388 ac_cv_lib_resolv_res_query=yes 7243 ac_cv_lib_resolv_res_query=yes
9389else 7244else
9390 echo "$as_me: failed program was:" >&5 7245 ac_cv_lib_resolv_res_query=no
9391sed 's/^/| /' conftest.$ac_ext >&5
9392
9393 ac_cv_lib_resolv_res_query=no
9394fi 7246fi
9395 7247rm -f core conftest.err conftest.$ac_objext \
9396rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 7248 conftest$ac_exeext conftest.$ac_ext
9397 conftest$ac_exeext conftest.$ac_ext
9398LIBS=$ac_check_lib_save_LIBS 7249LIBS=$ac_check_lib_save_LIBS
9399fi 7250fi
9400{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_query" >&5 7251{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_res_query" >&5
9401echo "${ECHO_T}$ac_cv_lib_resolv_res_query" >&6; } 7252$as_echo "$ac_cv_lib_resolv_res_query" >&6; }
9402if test $ac_cv_lib_resolv_res_query = yes; then 7253if test "x$ac_cv_lib_resolv_res_query" = xyes; then :
9403 LIBS="$LIBS -lresolv" 7254 LIBS="$LIBS -lresolv"
9404fi 7255fi
9405 7256
9406 IPADDR_IN_DISPLAY=yes 7257 IPADDR_IN_DISPLAY=yes
9407 cat >>confdefs.h <<\_ACEOF 7258 $as_echo "#define USE_PIPES 1" >>confdefs.h
9408#define USE_PIPES 1
9409_ACEOF
9410 7259
9411 cat >>confdefs.h <<\_ACEOF 7260 $as_echo "#define IP_TOS_IS_BROKEN 1" >>confdefs.h
9412#define IP_TOS_IS_BROKEN 1
9413_ACEOF
9414 7261
9415 cat >>confdefs.h <<\_ACEOF 7262 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
9416#define SETEUID_BREAKS_SETUID 1
9417_ACEOF
9418 7263
9419 cat >>confdefs.h <<\_ACEOF 7264 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
9420#define BROKEN_SETREUID 1
9421_ACEOF
9422 7265
9423 cat >>confdefs.h <<\_ACEOF 7266 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
9424#define BROKEN_SETREGID 1
9425_ACEOF
9426 7267
9427 cat >>confdefs.h <<\_ACEOF 7268 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
9428#define SSHD_ACQUIRES_CTTY 1
9429_ACEOF
9430 7269
9431 external_path_file=/etc/default/login 7270 external_path_file=/etc/default/login
9432 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX 7271 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
@@ -9435,88 +7274,55 @@ _ACEOF
9435 ;; 7274 ;;
9436# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel. 7275# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel.
9437*-*-sysv4.2*) 7276*-*-sysv4.2*)
9438 cat >>confdefs.h <<\_ACEOF 7277 $as_echo "#define USE_PIPES 1" >>confdefs.h
9439#define USE_PIPES 1
9440_ACEOF
9441 7278
9442 cat >>confdefs.h <<\_ACEOF 7279 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
9443#define SETEUID_BREAKS_SETUID 1
9444_ACEOF
9445 7280
9446 cat >>confdefs.h <<\_ACEOF 7281 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
9447#define BROKEN_SETREUID 1
9448_ACEOF
9449 7282
9450 cat >>confdefs.h <<\_ACEOF 7283 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
9451#define BROKEN_SETREGID 1
9452_ACEOF
9453 7284
9454 7285
9455cat >>confdefs.h <<\_ACEOF 7286$as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
9456#define PASSWD_NEEDS_USERNAME 1
9457_ACEOF
9458 7287
9459 cat >>confdefs.h <<\_ACEOF 7288 $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
9460#define LOCKED_PASSWD_STRING "*LK*"
9461_ACEOF
9462 7289
9463 ;; 7290 ;;
9464# UnixWare 7.x, OpenUNIX 8 7291# UnixWare 7.x, OpenUNIX 8
9465*-*-sysv5*) 7292*-*-sysv5*)
9466 CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf" 7293 CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf"
9467 7294
9468cat >>confdefs.h <<\_ACEOF 7295$as_echo "#define UNIXWARE_LONG_PASSWORDS 1" >>confdefs.h
9469#define UNIXWARE_LONG_PASSWORDS 1
9470_ACEOF
9471 7296
9472 cat >>confdefs.h <<\_ACEOF 7297 $as_echo "#define USE_PIPES 1" >>confdefs.h
9473#define USE_PIPES 1
9474_ACEOF
9475 7298
9476 cat >>confdefs.h <<\_ACEOF 7299 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
9477#define SETEUID_BREAKS_SETUID 1
9478_ACEOF
9479 7300
9480 cat >>confdefs.h <<\_ACEOF 7301 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
9481#define BROKEN_GETADDRINFO 1
9482_ACEOF
9483 7302
9484 cat >>confdefs.h <<\_ACEOF 7303 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
9485#define BROKEN_SETREUID 1
9486_ACEOF
9487 7304
9488 cat >>confdefs.h <<\_ACEOF 7305 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
9489#define BROKEN_SETREGID 1
9490_ACEOF
9491 7306
9492 cat >>confdefs.h <<\_ACEOF 7307 $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
9493#define PASSWD_NEEDS_USERNAME 1
9494_ACEOF
9495 7308
9496 case "$host" in 7309 case "$host" in
9497 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x 7310 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x
7311 maildir=/var/spool/mail
9498 TEST_SHELL=/u95/bin/sh 7312 TEST_SHELL=/u95/bin/sh
9499 7313
9500cat >>confdefs.h <<\_ACEOF 7314$as_echo "#define BROKEN_LIBIAF 1" >>confdefs.h
9501#define BROKEN_LIBIAF 1
9502_ACEOF
9503 7315
9504 cat >>confdefs.h <<\_ACEOF 7316 $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
9505#define BROKEN_UPDWTMPX 1
9506_ACEOF
9507 7317
9508 { echo "$as_me:$LINENO: checking for getluid in -lprot" >&5 7318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getluid in -lprot" >&5
9509echo $ECHO_N "checking for getluid in -lprot... $ECHO_C" >&6; } 7319$as_echo_n "checking for getluid in -lprot... " >&6; }
9510if test "${ac_cv_lib_prot_getluid+set}" = set; then 7320if ${ac_cv_lib_prot_getluid+:} false; then :
9511 echo $ECHO_N "(cached) $ECHO_C" >&6 7321 $as_echo_n "(cached) " >&6
9512else 7322else
9513 ac_check_lib_save_LIBS=$LIBS 7323 ac_check_lib_save_LIBS=$LIBS
9514LIBS="-lprot $LIBS" 7324LIBS="-lprot $LIBS"
9515cat >conftest.$ac_ext <<_ACEOF 7325cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9516/* confdefs.h. */
9517_ACEOF
9518cat confdefs.h >>conftest.$ac_ext
9519cat >>conftest.$ac_ext <<_ACEOF
9520/* end confdefs.h. */ 7326/* end confdefs.h. */
9521 7327
9522/* Override any GCC internal prototype to avoid an error. 7328/* Override any GCC internal prototype to avoid an error.
@@ -9534,150 +7340,40 @@ return getluid ();
9534 return 0; 7340 return 0;
9535} 7341}
9536_ACEOF 7342_ACEOF
9537rm -f conftest.$ac_objext conftest$ac_exeext 7343if ac_fn_c_try_link "$LINENO"; then :
9538if { (ac_try="$ac_link"
9539case "(($ac_try" in
9540 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9541 *) ac_try_echo=$ac_try;;
9542esac
9543eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9544 (eval "$ac_link") 2>conftest.er1
9545 ac_status=$?
9546 grep -v '^ *+' conftest.er1 >conftest.err
9547 rm -f conftest.er1
9548 cat conftest.err >&5
9549 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9550 (exit $ac_status); } && {
9551 test -z "$ac_c_werror_flag" ||
9552 test ! -s conftest.err
9553 } && test -s conftest$ac_exeext &&
9554 $as_test_x conftest$ac_exeext; then
9555 ac_cv_lib_prot_getluid=yes 7344 ac_cv_lib_prot_getluid=yes
9556else 7345else
9557 echo "$as_me: failed program was:" >&5 7346 ac_cv_lib_prot_getluid=no
9558sed 's/^/| /' conftest.$ac_ext >&5
9559
9560 ac_cv_lib_prot_getluid=no
9561fi 7347fi
9562 7348rm -f core conftest.err conftest.$ac_objext \
9563rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 7349 conftest$ac_exeext conftest.$ac_ext
9564 conftest$ac_exeext conftest.$ac_ext
9565LIBS=$ac_check_lib_save_LIBS 7350LIBS=$ac_check_lib_save_LIBS
9566fi 7351fi
9567{ echo "$as_me:$LINENO: result: $ac_cv_lib_prot_getluid" >&5 7352{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_prot_getluid" >&5
9568echo "${ECHO_T}$ac_cv_lib_prot_getluid" >&6; } 7353$as_echo "$ac_cv_lib_prot_getluid" >&6; }
9569if test $ac_cv_lib_prot_getluid = yes; then 7354if test "x$ac_cv_lib_prot_getluid" = xyes; then :
9570 LIBS="$LIBS -lprot" 7355 LIBS="$LIBS -lprot"
9571 7356 for ac_func in getluid setluid
9572 7357do :
9573for ac_func in getluid setluid 7358 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9574do 7359ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9575as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 7360if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9576{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9577echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9578if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9579 echo $ECHO_N "(cached) $ECHO_C" >&6
9580else
9581 cat >conftest.$ac_ext <<_ACEOF
9582/* confdefs.h. */
9583_ACEOF
9584cat confdefs.h >>conftest.$ac_ext
9585cat >>conftest.$ac_ext <<_ACEOF
9586/* end confdefs.h. */
9587/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9588 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9589#define $ac_func innocuous_$ac_func
9590
9591/* System header to define __stub macros and hopefully few prototypes,
9592 which can conflict with char $ac_func (); below.
9593 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9594 <limits.h> exists even on freestanding compilers. */
9595
9596#ifdef __STDC__
9597# include <limits.h>
9598#else
9599# include <assert.h>
9600#endif
9601
9602#undef $ac_func
9603
9604/* Override any GCC internal prototype to avoid an error.
9605 Use char because int might match the return type of a GCC
9606 builtin and then its argument prototype would still apply. */
9607#ifdef __cplusplus
9608extern "C"
9609#endif
9610char $ac_func ();
9611/* The GNU C library defines this for functions which it implements
9612 to always fail with ENOSYS. Some functions are actually named
9613 something starting with __ and the normal name is an alias. */
9614#if defined __stub_$ac_func || defined __stub___$ac_func
9615choke me
9616#endif
9617
9618int
9619main ()
9620{
9621return $ac_func ();
9622 ;
9623 return 0;
9624}
9625_ACEOF
9626rm -f conftest.$ac_objext conftest$ac_exeext
9627if { (ac_try="$ac_link"
9628case "(($ac_try" in
9629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9630 *) ac_try_echo=$ac_try;;
9631esac
9632eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9633 (eval "$ac_link") 2>conftest.er1
9634 ac_status=$?
9635 grep -v '^ *+' conftest.er1 >conftest.err
9636 rm -f conftest.er1
9637 cat conftest.err >&5
9638 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9639 (exit $ac_status); } && {
9640 test -z "$ac_c_werror_flag" ||
9641 test ! -s conftest.err
9642 } && test -s conftest$ac_exeext &&
9643 $as_test_x conftest$ac_exeext; then
9644 eval "$as_ac_var=yes"
9645else
9646 echo "$as_me: failed program was:" >&5
9647sed 's/^/| /' conftest.$ac_ext >&5
9648
9649 eval "$as_ac_var=no"
9650fi
9651
9652rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9653 conftest$ac_exeext conftest.$ac_ext
9654fi
9655ac_res=`eval echo '${'$as_ac_var'}'`
9656 { echo "$as_me:$LINENO: result: $ac_res" >&5
9657echo "${ECHO_T}$ac_res" >&6; }
9658if test `eval echo '${'$as_ac_var'}'` = yes; then
9659 cat >>confdefs.h <<_ACEOF 7361 cat >>confdefs.h <<_ACEOF
9660#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 7362#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9661_ACEOF 7363_ACEOF
9662 7364
9663fi 7365fi
9664done 7366done
9665 7367
9666 cat >>confdefs.h <<\_ACEOF 7368 $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
9667#define HAVE_SECUREWARE 1
9668_ACEOF
9669 7369
9670 cat >>confdefs.h <<\_ACEOF 7370 $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
9671#define DISABLE_SHADOW 1
9672_ACEOF
9673 7371
9674 7372
9675fi 7373fi
9676 7374
9677 ;; 7375 ;;
9678 *) cat >>confdefs.h <<\_ACEOF 7376 *) $as_echo "#define LOCKED_PASSWD_STRING \"*LK*\"" >>confdefs.h
9679#define LOCKED_PASSWD_STRING "*LK*"
9680_ACEOF
9681 7377
9682 check_for_libcrypt_later=1 7378 check_for_libcrypt_later=1
9683 ;; 7379 ;;
@@ -9687,9 +7383,7 @@ _ACEOF
9687 ;; 7383 ;;
9688# SCO UNIX and OEM versions of SCO UNIX 7384# SCO UNIX and OEM versions of SCO UNIX
9689*-*-sco3.2v4*) 7385*-*-sco3.2v4*)
9690 { { echo "$as_me:$LINENO: error: \"This Platform is no longer supported.\"" >&5 7386 as_fn_error $? "\"This Platform is no longer supported.\"" "$LINENO" 5
9691echo "$as_me: error: \"This Platform is no longer supported.\"" >&2;}
9692 { (exit 1); exit 1; }; }
9693 ;; 7387 ;;
9694# SCO OpenServer 5.x 7388# SCO OpenServer 5.x
9695*-*-sco3.2v5*) 7389*-*-sco3.2v5*)
@@ -9698,140 +7392,35 @@ echo "$as_me: error: \"This Platform is no longer supported.\"" >&2;}
9698 fi 7392 fi
9699 LIBS="$LIBS -lprot -lx -ltinfo -lm" 7393 LIBS="$LIBS -lprot -lx -ltinfo -lm"
9700 no_dev_ptmx=1 7394 no_dev_ptmx=1
9701 cat >>confdefs.h <<\_ACEOF 7395 $as_echo "#define USE_PIPES 1" >>confdefs.h
9702#define USE_PIPES 1
9703_ACEOF
9704
9705 cat >>confdefs.h <<\_ACEOF
9706#define HAVE_SECUREWARE 1
9707_ACEOF
9708
9709 cat >>confdefs.h <<\_ACEOF
9710#define DISABLE_SHADOW 1
9711_ACEOF
9712
9713 cat >>confdefs.h <<\_ACEOF
9714#define DISABLE_FD_PASSING 1
9715_ACEOF
9716
9717 cat >>confdefs.h <<\_ACEOF
9718#define SETEUID_BREAKS_SETUID 1
9719_ACEOF
9720 7396
9721 cat >>confdefs.h <<\_ACEOF 7397 $as_echo "#define HAVE_SECUREWARE 1" >>confdefs.h
9722#define BROKEN_GETADDRINFO 1
9723_ACEOF
9724 7398
9725 cat >>confdefs.h <<\_ACEOF 7399 $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
9726#define BROKEN_SETREUID 1
9727_ACEOF
9728 7400
9729 cat >>confdefs.h <<\_ACEOF 7401 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
9730#define BROKEN_SETREGID 1
9731_ACEOF
9732 7402
9733 cat >>confdefs.h <<\_ACEOF 7403 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
9734#define WITH_ABBREV_NO_TTY 1
9735_ACEOF
9736 7404
9737 cat >>confdefs.h <<\_ACEOF 7405 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
9738#define BROKEN_UPDWTMPX 1
9739_ACEOF
9740 7406
9741 cat >>confdefs.h <<\_ACEOF 7407 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
9742#define PASSWD_NEEDS_USERNAME 1
9743_ACEOF
9744 7408
7409 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
9745 7410
7411 $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
9746 7412
9747for ac_func in getluid setluid 7413 $as_echo "#define BROKEN_UPDWTMPX 1" >>confdefs.h
9748do
9749as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9750{ echo "$as_me:$LINENO: checking for $ac_func" >&5
9751echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
9752if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
9753 echo $ECHO_N "(cached) $ECHO_C" >&6
9754else
9755 cat >conftest.$ac_ext <<_ACEOF
9756/* confdefs.h. */
9757_ACEOF
9758cat confdefs.h >>conftest.$ac_ext
9759cat >>conftest.$ac_ext <<_ACEOF
9760/* end confdefs.h. */
9761/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
9762 For example, HP-UX 11i <limits.h> declares gettimeofday. */
9763#define $ac_func innocuous_$ac_func
9764
9765/* System header to define __stub macros and hopefully few prototypes,
9766 which can conflict with char $ac_func (); below.
9767 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
9768 <limits.h> exists even on freestanding compilers. */
9769 7414
9770#ifdef __STDC__ 7415 $as_echo "#define PASSWD_NEEDS_USERNAME 1" >>confdefs.h
9771# include <limits.h>
9772#else
9773# include <assert.h>
9774#endif
9775 7416
9776#undef $ac_func 7417 for ac_func in getluid setluid
9777 7418do :
9778/* Override any GCC internal prototype to avoid an error. 7419 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
9779 Use char because int might match the return type of a GCC 7420ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
9780 builtin and then its argument prototype would still apply. */ 7421if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
9781#ifdef __cplusplus
9782extern "C"
9783#endif
9784char $ac_func ();
9785/* The GNU C library defines this for functions which it implements
9786 to always fail with ENOSYS. Some functions are actually named
9787 something starting with __ and the normal name is an alias. */
9788#if defined __stub_$ac_func || defined __stub___$ac_func
9789choke me
9790#endif
9791
9792int
9793main ()
9794{
9795return $ac_func ();
9796 ;
9797 return 0;
9798}
9799_ACEOF
9800rm -f conftest.$ac_objext conftest$ac_exeext
9801if { (ac_try="$ac_link"
9802case "(($ac_try" in
9803 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
9804 *) ac_try_echo=$ac_try;;
9805esac
9806eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
9807 (eval "$ac_link") 2>conftest.er1
9808 ac_status=$?
9809 grep -v '^ *+' conftest.er1 >conftest.err
9810 rm -f conftest.er1
9811 cat conftest.err >&5
9812 echo "$as_me:$LINENO: \$? = $ac_status" >&5
9813 (exit $ac_status); } && {
9814 test -z "$ac_c_werror_flag" ||
9815 test ! -s conftest.err
9816 } && test -s conftest$ac_exeext &&
9817 $as_test_x conftest$ac_exeext; then
9818 eval "$as_ac_var=yes"
9819else
9820 echo "$as_me: failed program was:" >&5
9821sed 's/^/| /' conftest.$ac_ext >&5
9822
9823 eval "$as_ac_var=no"
9824fi
9825
9826rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
9827 conftest$ac_exeext conftest.$ac_ext
9828fi
9829ac_res=`eval echo '${'$as_ac_var'}'`
9830 { echo "$as_me:$LINENO: result: $ac_res" >&5
9831echo "${ECHO_T}$ac_res" >&6; }
9832if test `eval echo '${'$as_ac_var'}'` = yes; then
9833 cat >>confdefs.h <<_ACEOF 7422 cat >>confdefs.h <<_ACEOF
9834#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 7423#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
9835_ACEOF 7424_ACEOF
9836 7425
9837fi 7426fi
@@ -9842,103 +7431,67 @@ done
9842 ;; 7431 ;;
9843*-*-unicosmk*) 7432*-*-unicosmk*)
9844 7433
9845cat >>confdefs.h <<\_ACEOF 7434$as_echo "#define NO_SSH_LASTLOG 1" >>confdefs.h
9846#define NO_SSH_LASTLOG 1
9847_ACEOF
9848 7435
9849 cat >>confdefs.h <<\_ACEOF 7436 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
9850#define SETEUID_BREAKS_SETUID 1
9851_ACEOF
9852 7437
9853 cat >>confdefs.h <<\_ACEOF 7438 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
9854#define BROKEN_SETREUID 1
9855_ACEOF
9856 7439
9857 cat >>confdefs.h <<\_ACEOF 7440 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
9858#define BROKEN_SETREGID 1
9859_ACEOF
9860 7441
9861 cat >>confdefs.h <<\_ACEOF 7442 $as_echo "#define USE_PIPES 1" >>confdefs.h
9862#define USE_PIPES 1
9863_ACEOF
9864 7443
9865 cat >>confdefs.h <<\_ACEOF 7444 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
9866#define DISABLE_FD_PASSING 1
9867_ACEOF
9868 7445
9869 LDFLAGS="$LDFLAGS" 7446 LDFLAGS="$LDFLAGS"
9870 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" 7447 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
9871 MANTYPE=cat 7448 MANTYPE=cat
9872 ;; 7449 ;;
9873*-*-unicosmp*) 7450*-*-unicosmp*)
9874 cat >>confdefs.h <<\_ACEOF 7451 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
9875#define SETEUID_BREAKS_SETUID 1
9876_ACEOF
9877 7452
9878 cat >>confdefs.h <<\_ACEOF 7453 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
9879#define BROKEN_SETREUID 1
9880_ACEOF
9881 7454
9882 cat >>confdefs.h <<\_ACEOF 7455 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
9883#define BROKEN_SETREGID 1
9884_ACEOF
9885 7456
9886 cat >>confdefs.h <<\_ACEOF 7457 $as_echo "#define WITH_ABBREV_NO_TTY 1" >>confdefs.h
9887#define WITH_ABBREV_NO_TTY 1
9888_ACEOF
9889 7458
9890 cat >>confdefs.h <<\_ACEOF 7459 $as_echo "#define USE_PIPES 1" >>confdefs.h
9891#define USE_PIPES 1
9892_ACEOF
9893 7460
9894 cat >>confdefs.h <<\_ACEOF 7461 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
9895#define DISABLE_FD_PASSING 1
9896_ACEOF
9897 7462
9898 LDFLAGS="$LDFLAGS" 7463 LDFLAGS="$LDFLAGS"
9899 LIBS="$LIBS -lgen -lacid -ldb" 7464 LIBS="$LIBS -lgen -lacid -ldb"
9900 MANTYPE=cat 7465 MANTYPE=cat
9901 ;; 7466 ;;
9902*-*-unicos*) 7467*-*-unicos*)
9903 cat >>confdefs.h <<\_ACEOF 7468 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
9904#define SETEUID_BREAKS_SETUID 1
9905_ACEOF
9906 7469
9907 cat >>confdefs.h <<\_ACEOF 7470 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
9908#define BROKEN_SETREUID 1
9909_ACEOF
9910 7471
9911 cat >>confdefs.h <<\_ACEOF 7472 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
9912#define BROKEN_SETREGID 1
9913_ACEOF
9914 7473
9915 cat >>confdefs.h <<\_ACEOF 7474 $as_echo "#define USE_PIPES 1" >>confdefs.h
9916#define USE_PIPES 1
9917_ACEOF
9918 7475
9919 cat >>confdefs.h <<\_ACEOF 7476 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
9920#define DISABLE_FD_PASSING 1
9921_ACEOF
9922 7477
9923 cat >>confdefs.h <<\_ACEOF 7478 $as_echo "#define NO_SSH_LASTLOG 1" >>confdefs.h
9924#define NO_SSH_LASTLOG 1
9925_ACEOF
9926 7479
9927 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal" 7480 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal"
9928 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" 7481 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
9929 MANTYPE=cat 7482 MANTYPE=cat
9930 ;; 7483 ;;
9931*-dec-osf*) 7484*-dec-osf*)
9932 { echo "$as_me:$LINENO: checking for Digital Unix SIA" >&5 7485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Digital Unix SIA" >&5
9933echo $ECHO_N "checking for Digital Unix SIA... $ECHO_C" >&6; } 7486$as_echo_n "checking for Digital Unix SIA... " >&6; }
9934 no_osfsia="" 7487 no_osfsia=""
9935 7488
9936# Check whether --with-osfsia was given. 7489# Check whether --with-osfsia was given.
9937if test "${with_osfsia+set}" = set; then 7490if test "${with_osfsia+set}" = set; then :
9938 withval=$with_osfsia; 7491 withval=$with_osfsia;
9939 if test "x$withval" = "xno" ; then 7492 if test "x$withval" = "xno" ; then
9940 { echo "$as_me:$LINENO: result: disabled" >&5 7493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9941echo "${ECHO_T}disabled" >&6; } 7494$as_echo "disabled" >&6; }
9942 no_osfsia=1 7495 no_osfsia=1
9943 fi 7496 fi
9944 7497
@@ -9946,100 +7499,64 @@ fi
9946 7499
9947 if test -z "$no_osfsia" ; then 7500 if test -z "$no_osfsia" ; then
9948 if test -f /etc/sia/matrix.conf; then 7501 if test -f /etc/sia/matrix.conf; then
9949 { echo "$as_me:$LINENO: result: yes" >&5 7502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9950echo "${ECHO_T}yes" >&6; } 7503$as_echo "yes" >&6; }
9951 7504
9952cat >>confdefs.h <<\_ACEOF 7505$as_echo "#define HAVE_OSF_SIA 1" >>confdefs.h
9953#define HAVE_OSF_SIA 1
9954_ACEOF
9955 7506
9956 7507
9957cat >>confdefs.h <<\_ACEOF 7508$as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
9958#define DISABLE_LOGIN 1
9959_ACEOF
9960 7509
9961 cat >>confdefs.h <<\_ACEOF 7510 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
9962#define DISABLE_FD_PASSING 1
9963_ACEOF
9964 7511
9965 LIBS="$LIBS -lsecurity -ldb -lm -laud" 7512 LIBS="$LIBS -lsecurity -ldb -lm -laud"
9966 SIA_MSG="yes" 7513 SIA_MSG="yes"
9967 else 7514 else
9968 { echo "$as_me:$LINENO: result: no" >&5 7515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9969echo "${ECHO_T}no" >&6; } 7516$as_echo "no" >&6; }
9970 7517
9971cat >>confdefs.h <<\_ACEOF 7518$as_echo "#define LOCKED_PASSWD_SUBSTR \"Nologin\"" >>confdefs.h
9972#define LOCKED_PASSWD_SUBSTR "Nologin"
9973_ACEOF
9974 7519
9975 fi 7520 fi
9976 fi 7521 fi
9977 cat >>confdefs.h <<\_ACEOF 7522 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
9978#define BROKEN_GETADDRINFO 1
9979_ACEOF
9980 7523
9981 cat >>confdefs.h <<\_ACEOF 7524 $as_echo "#define SETEUID_BREAKS_SETUID 1" >>confdefs.h
9982#define SETEUID_BREAKS_SETUID 1
9983_ACEOF
9984 7525
9985 cat >>confdefs.h <<\_ACEOF 7526 $as_echo "#define BROKEN_SETREUID 1" >>confdefs.h
9986#define BROKEN_SETREUID 1
9987_ACEOF
9988 7527
9989 cat >>confdefs.h <<\_ACEOF 7528 $as_echo "#define BROKEN_SETREGID 1" >>confdefs.h
9990#define BROKEN_SETREGID 1
9991_ACEOF
9992 7529
9993 7530
9994cat >>confdefs.h <<\_ACEOF 7531$as_echo "#define BROKEN_READV_COMPARISON 1" >>confdefs.h
9995#define BROKEN_READV_COMPARISON 1
9996_ACEOF
9997 7532
9998 ;; 7533 ;;
9999 7534
10000*-*-nto-qnx*) 7535*-*-nto-qnx*)
10001 cat >>confdefs.h <<\_ACEOF 7536 $as_echo "#define USE_PIPES 1" >>confdefs.h
10002#define USE_PIPES 1
10003_ACEOF
10004 7537
10005 cat >>confdefs.h <<\_ACEOF 7538 $as_echo "#define NO_X11_UNIX_SOCKETS 1" >>confdefs.h
10006#define NO_X11_UNIX_SOCKETS 1
10007_ACEOF
10008 7539
10009 7540
10010cat >>confdefs.h <<\_ACEOF 7541$as_echo "#define MISSING_NFDBITS 1" >>confdefs.h
10011#define MISSING_NFDBITS 1
10012_ACEOF
10013 7542
10014 7543
10015cat >>confdefs.h <<\_ACEOF 7544$as_echo "#define MISSING_HOWMANY 1" >>confdefs.h
10016#define MISSING_HOWMANY 1
10017_ACEOF
10018 7545
10019 7546
10020cat >>confdefs.h <<\_ACEOF 7547$as_echo "#define MISSING_FD_MASK 1" >>confdefs.h
10021#define MISSING_FD_MASK 1
10022_ACEOF
10023 7548
10024 cat >>confdefs.h <<\_ACEOF 7549 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
10025#define DISABLE_LASTLOG 1
10026_ACEOF
10027 7550
10028 cat >>confdefs.h <<\_ACEOF 7551 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
10029#define SSHD_ACQUIRES_CTTY 1
10030_ACEOF
10031 7552
10032 7553
10033cat >>confdefs.h <<\_ACEOF 7554$as_echo "#define BROKEN_SHADOW_EXPIRE 1" >>confdefs.h
10034#define BROKEN_SHADOW_EXPIRE 1
10035_ACEOF
10036 7555
10037 enable_etc_default_login=no # has incompatible /etc/default/login 7556 enable_etc_default_login=no # has incompatible /etc/default/login
10038 case "$host" in 7557 case "$host" in
10039 *-*-nto-qnx6*) 7558 *-*-nto-qnx6*)
10040 cat >>confdefs.h <<\_ACEOF 7559 $as_echo "#define DISABLE_FD_PASSING 1" >>confdefs.h
10041#define DISABLE_FD_PASSING 1
10042_ACEOF
10043 7560
10044 ;; 7561 ;;
10045 esac 7562 esac
@@ -10047,197 +7564,74 @@ _ACEOF
10047 7564
10048*-*-ultrix*) 7565*-*-ultrix*)
10049 7566
10050cat >>confdefs.h <<\_ACEOF 7567$as_echo "#define BROKEN_GETGROUPS 1" >>confdefs.h
10051#define BROKEN_GETGROUPS 1
10052_ACEOF
10053 7568
10054 7569
10055cat >>confdefs.h <<\_ACEOF 7570$as_echo "#define BROKEN_MMAP 1" >>confdefs.h
10056#define BROKEN_MMAP 1
10057_ACEOF
10058 7571
10059 cat >>confdefs.h <<\_ACEOF 7572 $as_echo "#define NEED_SETPGRP 1" >>confdefs.h
10060#define NEED_SETPGRP 1
10061_ACEOF
10062 7573
10063 7574
10064cat >>confdefs.h <<\_ACEOF 7575$as_echo "#define HAVE_SYS_SYSLOG_H 1" >>confdefs.h
10065#define HAVE_SYS_SYSLOG_H 1
10066_ACEOF
10067 7576
10068 ;; 7577 ;;
10069 7578
10070*-*-lynxos) 7579*-*-lynxos)
10071 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__" 7580 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
10072 cat >>confdefs.h <<\_ACEOF 7581 $as_echo "#define MISSING_HOWMANY 1" >>confdefs.h
10073#define MISSING_HOWMANY 1
10074_ACEOF
10075 7582
10076 7583
10077cat >>confdefs.h <<\_ACEOF 7584$as_echo "#define BROKEN_SETVBUF 1" >>confdefs.h
10078#define BROKEN_SETVBUF 1
10079_ACEOF
10080 7585
10081 ;; 7586 ;;
10082esac 7587esac
10083 7588
10084{ echo "$as_me:$LINENO: checking compiler and flags for sanity" >&5 7589{ $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler and flags for sanity" >&5
10085echo $ECHO_N "checking compiler and flags for sanity... $ECHO_C" >&6; } 7590$as_echo_n "checking compiler and flags for sanity... " >&6; }
10086if test "$cross_compiling" = yes; then 7591if test "$cross_compiling" = yes; then :
10087 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking compiler sanity" >&5 7592 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking compiler sanity" >&5
10088echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;} 7593$as_echo "$as_me: WARNING: cross compiling: not checking compiler sanity" >&2;}
10089
10090else
10091 cat >conftest.$ac_ext <<_ACEOF
10092/* confdefs.h. */
10093_ACEOF
10094cat confdefs.h >>conftest.$ac_ext
10095cat >>conftest.$ac_ext <<_ACEOF
10096/* end confdefs.h. */
10097
10098#include <stdio.h>
10099int main(){exit(0);}
10100
10101_ACEOF
10102rm -f conftest$ac_exeext
10103if { (ac_try="$ac_link"
10104case "(($ac_try" in
10105 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10106 *) ac_try_echo=$ac_try;;
10107esac
10108eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10109 (eval "$ac_link") 2>&5
10110 ac_status=$?
10111 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10112 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10113 { (case "(($ac_try" in
10114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10115 *) ac_try_echo=$ac_try;;
10116esac
10117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10118 (eval "$ac_try") 2>&5
10119 ac_status=$?
10120 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10121 (exit $ac_status); }; }; then
10122 { echo "$as_me:$LINENO: result: yes" >&5
10123echo "${ECHO_T}yes" >&6; }
10124else
10125 echo "$as_me: program exited with status $ac_status" >&5
10126echo "$as_me: failed program was:" >&5
10127sed 's/^/| /' conftest.$ac_ext >&5
10128
10129( exit $ac_status )
10130
10131 { echo "$as_me:$LINENO: result: no" >&5
10132echo "${ECHO_T}no" >&6; }
10133 { { echo "$as_me:$LINENO: error: *** compiler cannot create working executables, check config.log ***" >&5
10134echo "$as_me: error: *** compiler cannot create working executables, check config.log ***" >&2;}
10135 { (exit 1); exit 1; }; }
10136
10137fi
10138rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
10139fi
10140
10141 7594
10142
10143# Checks for libraries.
10144{ echo "$as_me:$LINENO: checking for yp_match" >&5
10145echo $ECHO_N "checking for yp_match... $ECHO_C" >&6; }
10146if test "${ac_cv_func_yp_match+set}" = set; then
10147 echo $ECHO_N "(cached) $ECHO_C" >&6
10148else 7595else
10149 cat >conftest.$ac_ext <<_ACEOF 7596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10150/* confdefs.h. */
10151_ACEOF
10152cat confdefs.h >>conftest.$ac_ext
10153cat >>conftest.$ac_ext <<_ACEOF
10154/* end confdefs.h. */ 7597/* end confdefs.h. */
10155/* Define yp_match to an innocuous variant, in case <limits.h> declares yp_match. 7598 #include <stdio.h>
10156 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10157#define yp_match innocuous_yp_match
10158
10159/* System header to define __stub macros and hopefully few prototypes,
10160 which can conflict with char yp_match (); below.
10161 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10162 <limits.h> exists even on freestanding compilers. */
10163
10164#ifdef __STDC__
10165# include <limits.h>
10166#else
10167# include <assert.h>
10168#endif
10169
10170#undef yp_match
10171
10172/* Override any GCC internal prototype to avoid an error.
10173 Use char because int might match the return type of a GCC
10174 builtin and then its argument prototype would still apply. */
10175#ifdef __cplusplus
10176extern "C"
10177#endif
10178char yp_match ();
10179/* The GNU C library defines this for functions which it implements
10180 to always fail with ENOSYS. Some functions are actually named
10181 something starting with __ and the normal name is an alias. */
10182#if defined __stub_yp_match || defined __stub___yp_match
10183choke me
10184#endif
10185
10186int 7599int
10187main () 7600main ()
10188{ 7601{
10189return yp_match (); 7602 exit(0);
10190 ; 7603 ;
10191 return 0; 7604 return 0;
10192} 7605}
10193_ACEOF 7606_ACEOF
10194rm -f conftest.$ac_objext conftest$ac_exeext 7607if ac_fn_c_try_run "$LINENO"; then :
10195if { (ac_try="$ac_link" 7608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10196case "(($ac_try" in 7609$as_echo "yes" >&6; }
10197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10198 *) ac_try_echo=$ac_try;;
10199esac
10200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10201 (eval "$ac_link") 2>conftest.er1
10202 ac_status=$?
10203 grep -v '^ *+' conftest.er1 >conftest.err
10204 rm -f conftest.er1
10205 cat conftest.err >&5
10206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10207 (exit $ac_status); } && {
10208 test -z "$ac_c_werror_flag" ||
10209 test ! -s conftest.err
10210 } && test -s conftest$ac_exeext &&
10211 $as_test_x conftest$ac_exeext; then
10212 ac_cv_func_yp_match=yes
10213else 7610else
10214 echo "$as_me: failed program was:" >&5
10215sed 's/^/| /' conftest.$ac_ext >&5
10216 7611
10217 ac_cv_func_yp_match=no 7612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10218fi 7613$as_echo "no" >&6; }
7614 as_fn_error $? "*** compiler cannot create working executables, check config.log ***" "$LINENO" 5
10219 7615
10220rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10221 conftest$ac_exeext conftest.$ac_ext
10222fi 7616fi
10223{ echo "$as_me:$LINENO: result: $ac_cv_func_yp_match" >&5 7617rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10224echo "${ECHO_T}$ac_cv_func_yp_match" >&6; } 7618 conftest.$ac_objext conftest.beam conftest.$ac_ext
10225if test $ac_cv_func_yp_match = yes; then 7619fi
10226 : 7620
10227else 7621
7622# Checks for libraries.
7623ac_fn_c_check_func "$LINENO" "yp_match" "ac_cv_func_yp_match"
7624if test "x$ac_cv_func_yp_match" = xyes; then :
10228 7625
10229{ echo "$as_me:$LINENO: checking for yp_match in -lnsl" >&5 7626else
10230echo $ECHO_N "checking for yp_match in -lnsl... $ECHO_C" >&6; } 7627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yp_match in -lnsl" >&5
10231if test "${ac_cv_lib_nsl_yp_match+set}" = set; then 7628$as_echo_n "checking for yp_match in -lnsl... " >&6; }
10232 echo $ECHO_N "(cached) $ECHO_C" >&6 7629if ${ac_cv_lib_nsl_yp_match+:} false; then :
7630 $as_echo_n "(cached) " >&6
10233else 7631else
10234 ac_check_lib_save_LIBS=$LIBS 7632 ac_check_lib_save_LIBS=$LIBS
10235LIBS="-lnsl $LIBS" 7633LIBS="-lnsl $LIBS"
10236cat >conftest.$ac_ext <<_ACEOF 7634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10237/* confdefs.h. */
10238_ACEOF
10239cat confdefs.h >>conftest.$ac_ext
10240cat >>conftest.$ac_ext <<_ACEOF
10241/* end confdefs.h. */ 7635/* end confdefs.h. */
10242 7636
10243/* Override any GCC internal prototype to avoid an error. 7637/* Override any GCC internal prototype to avoid an error.
@@ -10255,39 +7649,18 @@ return yp_match ();
10255 return 0; 7649 return 0;
10256} 7650}
10257_ACEOF 7651_ACEOF
10258rm -f conftest.$ac_objext conftest$ac_exeext 7652if ac_fn_c_try_link "$LINENO"; then :
10259if { (ac_try="$ac_link"
10260case "(($ac_try" in
10261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10262 *) ac_try_echo=$ac_try;;
10263esac
10264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10265 (eval "$ac_link") 2>conftest.er1
10266 ac_status=$?
10267 grep -v '^ *+' conftest.er1 >conftest.err
10268 rm -f conftest.er1
10269 cat conftest.err >&5
10270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10271 (exit $ac_status); } && {
10272 test -z "$ac_c_werror_flag" ||
10273 test ! -s conftest.err
10274 } && test -s conftest$ac_exeext &&
10275 $as_test_x conftest$ac_exeext; then
10276 ac_cv_lib_nsl_yp_match=yes 7653 ac_cv_lib_nsl_yp_match=yes
10277else 7654else
10278 echo "$as_me: failed program was:" >&5 7655 ac_cv_lib_nsl_yp_match=no
10279sed 's/^/| /' conftest.$ac_ext >&5
10280
10281 ac_cv_lib_nsl_yp_match=no
10282fi 7656fi
10283 7657rm -f core conftest.err conftest.$ac_objext \
10284rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 7658 conftest$ac_exeext conftest.$ac_ext
10285 conftest$ac_exeext conftest.$ac_ext
10286LIBS=$ac_check_lib_save_LIBS 7659LIBS=$ac_check_lib_save_LIBS
10287fi 7660fi
10288{ echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_yp_match" >&5 7661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_yp_match" >&5
10289echo "${ECHO_T}$ac_cv_lib_nsl_yp_match" >&6; } 7662$as_echo "$ac_cv_lib_nsl_yp_match" >&6; }
10290if test $ac_cv_lib_nsl_yp_match = yes; then 7663if test "x$ac_cv_lib_nsl_yp_match" = xyes; then :
10291 cat >>confdefs.h <<_ACEOF 7664 cat >>confdefs.h <<_ACEOF
10292#define HAVE_LIBNSL 1 7665#define HAVE_LIBNSL 1
10293_ACEOF 7666_ACEOF
@@ -10298,103 +7671,18 @@ fi
10298 7671
10299fi 7672fi
10300 7673
10301{ echo "$as_me:$LINENO: checking for setsockopt" >&5 7674ac_fn_c_check_func "$LINENO" "setsockopt" "ac_cv_func_setsockopt"
10302echo $ECHO_N "checking for setsockopt... $ECHO_C" >&6; } 7675if test "x$ac_cv_func_setsockopt" = xyes; then :
10303if test "${ac_cv_func_setsockopt+set}" = set; then
10304 echo $ECHO_N "(cached) $ECHO_C" >&6
10305else
10306 cat >conftest.$ac_ext <<_ACEOF
10307/* confdefs.h. */
10308_ACEOF
10309cat confdefs.h >>conftest.$ac_ext
10310cat >>conftest.$ac_ext <<_ACEOF
10311/* end confdefs.h. */
10312/* Define setsockopt to an innocuous variant, in case <limits.h> declares setsockopt.
10313 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10314#define setsockopt innocuous_setsockopt
10315 7676
10316/* System header to define __stub macros and hopefully few prototypes,
10317 which can conflict with char setsockopt (); below.
10318 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10319 <limits.h> exists even on freestanding compilers. */
10320
10321#ifdef __STDC__
10322# include <limits.h>
10323#else
10324# include <assert.h>
10325#endif
10326
10327#undef setsockopt
10328
10329/* Override any GCC internal prototype to avoid an error.
10330 Use char because int might match the return type of a GCC
10331 builtin and then its argument prototype would still apply. */
10332#ifdef __cplusplus
10333extern "C"
10334#endif
10335char setsockopt ();
10336/* The GNU C library defines this for functions which it implements
10337 to always fail with ENOSYS. Some functions are actually named
10338 something starting with __ and the normal name is an alias. */
10339#if defined __stub_setsockopt || defined __stub___setsockopt
10340choke me
10341#endif
10342
10343int
10344main ()
10345{
10346return setsockopt ();
10347 ;
10348 return 0;
10349}
10350_ACEOF
10351rm -f conftest.$ac_objext conftest$ac_exeext
10352if { (ac_try="$ac_link"
10353case "(($ac_try" in
10354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10355 *) ac_try_echo=$ac_try;;
10356esac
10357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10358 (eval "$ac_link") 2>conftest.er1
10359 ac_status=$?
10360 grep -v '^ *+' conftest.er1 >conftest.err
10361 rm -f conftest.er1
10362 cat conftest.err >&5
10363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10364 (exit $ac_status); } && {
10365 test -z "$ac_c_werror_flag" ||
10366 test ! -s conftest.err
10367 } && test -s conftest$ac_exeext &&
10368 $as_test_x conftest$ac_exeext; then
10369 ac_cv_func_setsockopt=yes
10370else 7677else
10371 echo "$as_me: failed program was:" >&5 7678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setsockopt in -lsocket" >&5
10372sed 's/^/| /' conftest.$ac_ext >&5 7679$as_echo_n "checking for setsockopt in -lsocket... " >&6; }
10373 7680if ${ac_cv_lib_socket_setsockopt+:} false; then :
10374 ac_cv_func_setsockopt=no 7681 $as_echo_n "(cached) " >&6
10375fi
10376
10377rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10378 conftest$ac_exeext conftest.$ac_ext
10379fi
10380{ echo "$as_me:$LINENO: result: $ac_cv_func_setsockopt" >&5
10381echo "${ECHO_T}$ac_cv_func_setsockopt" >&6; }
10382if test $ac_cv_func_setsockopt = yes; then
10383 :
10384else
10385
10386{ echo "$as_me:$LINENO: checking for setsockopt in -lsocket" >&5
10387echo $ECHO_N "checking for setsockopt in -lsocket... $ECHO_C" >&6; }
10388if test "${ac_cv_lib_socket_setsockopt+set}" = set; then
10389 echo $ECHO_N "(cached) $ECHO_C" >&6
10390else 7682else
10391 ac_check_lib_save_LIBS=$LIBS 7683 ac_check_lib_save_LIBS=$LIBS
10392LIBS="-lsocket $LIBS" 7684LIBS="-lsocket $LIBS"
10393cat >conftest.$ac_ext <<_ACEOF 7685cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10394/* confdefs.h. */
10395_ACEOF
10396cat confdefs.h >>conftest.$ac_ext
10397cat >>conftest.$ac_ext <<_ACEOF
10398/* end confdefs.h. */ 7686/* end confdefs.h. */
10399 7687
10400/* Override any GCC internal prototype to avoid an error. 7688/* Override any GCC internal prototype to avoid an error.
@@ -10412,39 +7700,18 @@ return setsockopt ();
10412 return 0; 7700 return 0;
10413} 7701}
10414_ACEOF 7702_ACEOF
10415rm -f conftest.$ac_objext conftest$ac_exeext 7703if ac_fn_c_try_link "$LINENO"; then :
10416if { (ac_try="$ac_link"
10417case "(($ac_try" in
10418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10419 *) ac_try_echo=$ac_try;;
10420esac
10421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10422 (eval "$ac_link") 2>conftest.er1
10423 ac_status=$?
10424 grep -v '^ *+' conftest.er1 >conftest.err
10425 rm -f conftest.er1
10426 cat conftest.err >&5
10427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10428 (exit $ac_status); } && {
10429 test -z "$ac_c_werror_flag" ||
10430 test ! -s conftest.err
10431 } && test -s conftest$ac_exeext &&
10432 $as_test_x conftest$ac_exeext; then
10433 ac_cv_lib_socket_setsockopt=yes 7704 ac_cv_lib_socket_setsockopt=yes
10434else 7705else
10435 echo "$as_me: failed program was:" >&5 7706 ac_cv_lib_socket_setsockopt=no
10436sed 's/^/| /' conftest.$ac_ext >&5
10437
10438 ac_cv_lib_socket_setsockopt=no
10439fi 7707fi
10440 7708rm -f core conftest.err conftest.$ac_objext \
10441rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 7709 conftest$ac_exeext conftest.$ac_ext
10442 conftest$ac_exeext conftest.$ac_ext
10443LIBS=$ac_check_lib_save_LIBS 7710LIBS=$ac_check_lib_save_LIBS
10444fi 7711fi
10445{ echo "$as_me:$LINENO: result: $ac_cv_lib_socket_setsockopt" >&5 7712{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_setsockopt" >&5
10446echo "${ECHO_T}$ac_cv_lib_socket_setsockopt" >&6; } 7713$as_echo "$ac_cv_lib_socket_setsockopt" >&6; }
10447if test $ac_cv_lib_socket_setsockopt = yes; then 7714if test "x$ac_cv_lib_socket_setsockopt" = xyes; then :
10448 cat >>confdefs.h <<_ACEOF 7715 cat >>confdefs.h <<_ACEOF
10449#define HAVE_LIBSOCKET 1 7716#define HAVE_LIBSOCKET 1
10450_ACEOF 7717_ACEOF
@@ -10456,235 +7723,19 @@ fi
10456fi 7723fi
10457 7724
10458 7725
10459
10460for ac_func in dirname 7726for ac_func in dirname
10461do 7727do :
10462as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 7728 ac_fn_c_check_func "$LINENO" "dirname" "ac_cv_func_dirname"
10463{ echo "$as_me:$LINENO: checking for $ac_func" >&5 7729if test "x$ac_cv_func_dirname" = xyes; then :
10464echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
10465if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
10466 echo $ECHO_N "(cached) $ECHO_C" >&6
10467else
10468 cat >conftest.$ac_ext <<_ACEOF
10469/* confdefs.h. */
10470_ACEOF
10471cat confdefs.h >>conftest.$ac_ext
10472cat >>conftest.$ac_ext <<_ACEOF
10473/* end confdefs.h. */
10474/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
10475 For example, HP-UX 11i <limits.h> declares gettimeofday. */
10476#define $ac_func innocuous_$ac_func
10477
10478/* System header to define __stub macros and hopefully few prototypes,
10479 which can conflict with char $ac_func (); below.
10480 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
10481 <limits.h> exists even on freestanding compilers. */
10482
10483#ifdef __STDC__
10484# include <limits.h>
10485#else
10486# include <assert.h>
10487#endif
10488
10489#undef $ac_func
10490
10491/* Override any GCC internal prototype to avoid an error.
10492 Use char because int might match the return type of a GCC
10493 builtin and then its argument prototype would still apply. */
10494#ifdef __cplusplus
10495extern "C"
10496#endif
10497char $ac_func ();
10498/* The GNU C library defines this for functions which it implements
10499 to always fail with ENOSYS. Some functions are actually named
10500 something starting with __ and the normal name is an alias. */
10501#if defined __stub_$ac_func || defined __stub___$ac_func
10502choke me
10503#endif
10504
10505int
10506main ()
10507{
10508return $ac_func ();
10509 ;
10510 return 0;
10511}
10512_ACEOF
10513rm -f conftest.$ac_objext conftest$ac_exeext
10514if { (ac_try="$ac_link"
10515case "(($ac_try" in
10516 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10517 *) ac_try_echo=$ac_try;;
10518esac
10519eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10520 (eval "$ac_link") 2>conftest.er1
10521 ac_status=$?
10522 grep -v '^ *+' conftest.er1 >conftest.err
10523 rm -f conftest.er1
10524 cat conftest.err >&5
10525 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10526 (exit $ac_status); } && {
10527 test -z "$ac_c_werror_flag" ||
10528 test ! -s conftest.err
10529 } && test -s conftest$ac_exeext &&
10530 $as_test_x conftest$ac_exeext; then
10531 eval "$as_ac_var=yes"
10532else
10533 echo "$as_me: failed program was:" >&5
10534sed 's/^/| /' conftest.$ac_ext >&5
10535
10536 eval "$as_ac_var=no"
10537fi
10538
10539rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
10540 conftest$ac_exeext conftest.$ac_ext
10541fi
10542ac_res=`eval echo '${'$as_ac_var'}'`
10543 { echo "$as_me:$LINENO: result: $ac_res" >&5
10544echo "${ECHO_T}$ac_res" >&6; }
10545if test `eval echo '${'$as_ac_var'}'` = yes; then
10546 cat >>confdefs.h <<_ACEOF 7730 cat >>confdefs.h <<_ACEOF
10547#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 7731#define HAVE_DIRNAME 1
10548_ACEOF
10549
10550for ac_header in libgen.h
10551do
10552as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10553if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10554 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10555echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10556if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10557 echo $ECHO_N "(cached) $ECHO_C" >&6
10558fi
10559ac_res=`eval echo '${'$as_ac_Header'}'`
10560 { echo "$as_me:$LINENO: result: $ac_res" >&5
10561echo "${ECHO_T}$ac_res" >&6; }
10562else
10563 # Is the header compilable?
10564{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
10565echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10566cat >conftest.$ac_ext <<_ACEOF
10567/* confdefs.h. */
10568_ACEOF
10569cat confdefs.h >>conftest.$ac_ext
10570cat >>conftest.$ac_ext <<_ACEOF
10571/* end confdefs.h. */
10572$ac_includes_default
10573#include <$ac_header>
10574_ACEOF
10575rm -f conftest.$ac_objext
10576if { (ac_try="$ac_compile"
10577case "(($ac_try" in
10578 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10579 *) ac_try_echo=$ac_try;;
10580esac
10581eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10582 (eval "$ac_compile") 2>conftest.er1
10583 ac_status=$?
10584 grep -v '^ *+' conftest.er1 >conftest.err
10585 rm -f conftest.er1
10586 cat conftest.err >&5
10587 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10588 (exit $ac_status); } && {
10589 test -z "$ac_c_werror_flag" ||
10590 test ! -s conftest.err
10591 } && test -s conftest.$ac_objext; then
10592 ac_header_compiler=yes
10593else
10594 echo "$as_me: failed program was:" >&5
10595sed 's/^/| /' conftest.$ac_ext >&5
10596
10597 ac_header_compiler=no
10598fi
10599
10600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10601{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10602echo "${ECHO_T}$ac_header_compiler" >&6; }
10603
10604# Is the header present?
10605{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
10606echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10607cat >conftest.$ac_ext <<_ACEOF
10608/* confdefs.h. */
10609_ACEOF
10610cat confdefs.h >>conftest.$ac_ext
10611cat >>conftest.$ac_ext <<_ACEOF
10612/* end confdefs.h. */
10613#include <$ac_header>
10614_ACEOF 7732_ACEOF
10615if { (ac_try="$ac_cpp conftest.$ac_ext" 7733 for ac_header in libgen.h
10616case "(($ac_try" in 7734do :
10617 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 7735 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
10618 *) ac_try_echo=$ac_try;; 7736if test "x$ac_cv_header_libgen_h" = xyes; then :
10619esac
10620eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10621 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10622 ac_status=$?
10623 grep -v '^ *+' conftest.er1 >conftest.err
10624 rm -f conftest.er1
10625 cat conftest.err >&5
10626 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10627 (exit $ac_status); } >/dev/null && {
10628 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10629 test ! -s conftest.err
10630 }; then
10631 ac_header_preproc=yes
10632else
10633 echo "$as_me: failed program was:" >&5
10634sed 's/^/| /' conftest.$ac_ext >&5
10635
10636 ac_header_preproc=no
10637fi
10638
10639rm -f conftest.err conftest.$ac_ext
10640{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10641echo "${ECHO_T}$ac_header_preproc" >&6; }
10642
10643# So? What about this header?
10644case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
10645 yes:no: )
10646 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
10647echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10648 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10649echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10650 ac_header_preproc=yes
10651 ;;
10652 no:yes:* )
10653 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10654echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10655 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10656echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10657 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10658echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10659 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10660echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
10661 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10662echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10663 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10664echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10665 ( cat <<\_ASBOX
10666## ------------------------------------------- ##
10667## Report this to openssh-unix-dev@mindrot.org ##
10668## ------------------------------------------- ##
10669_ASBOX
10670 ) | sed "s/^/$as_me: WARNING: /" >&2
10671 ;;
10672esac
10673{ echo "$as_me:$LINENO: checking for $ac_header" >&5
10674echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10675if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10676 echo $ECHO_N "(cached) $ECHO_C" >&6
10677else
10678 eval "$as_ac_Header=\$ac_header_preproc"
10679fi
10680ac_res=`eval echo '${'$as_ac_Header'}'`
10681 { echo "$as_me:$LINENO: result: $ac_res" >&5
10682echo "${ECHO_T}$ac_res" >&6; }
10683
10684fi
10685if test `eval echo '${'$as_ac_Header'}'` = yes; then
10686 cat >>confdefs.h <<_ACEOF 7737 cat >>confdefs.h <<_ACEOF
10687#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 7738#define HAVE_LIBGEN_H 1
10688_ACEOF 7739_ACEOF
10689 7740
10690fi 7741fi
@@ -10693,18 +7744,14 @@ done
10693 7744
10694else 7745else
10695 7746
10696 { echo "$as_me:$LINENO: checking for dirname in -lgen" >&5 7747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dirname in -lgen" >&5
10697echo $ECHO_N "checking for dirname in -lgen... $ECHO_C" >&6; } 7748$as_echo_n "checking for dirname in -lgen... " >&6; }
10698if test "${ac_cv_lib_gen_dirname+set}" = set; then 7749if ${ac_cv_lib_gen_dirname+:} false; then :
10699 echo $ECHO_N "(cached) $ECHO_C" >&6 7750 $as_echo_n "(cached) " >&6
10700else 7751else
10701 ac_check_lib_save_LIBS=$LIBS 7752 ac_check_lib_save_LIBS=$LIBS
10702LIBS="-lgen $LIBS" 7753LIBS="-lgen $LIBS"
10703cat >conftest.$ac_ext <<_ACEOF 7754cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10704/* confdefs.h. */
10705_ACEOF
10706cat confdefs.h >>conftest.$ac_ext
10707cat >>conftest.$ac_ext <<_ACEOF
10708/* end confdefs.h. */ 7755/* end confdefs.h. */
10709 7756
10710/* Override any GCC internal prototype to avoid an error. 7757/* Override any GCC internal prototype to avoid an error.
@@ -10722,56 +7769,31 @@ return dirname ();
10722 return 0; 7769 return 0;
10723} 7770}
10724_ACEOF 7771_ACEOF
10725rm -f conftest.$ac_objext conftest$ac_exeext 7772if ac_fn_c_try_link "$LINENO"; then :
10726if { (ac_try="$ac_link"
10727case "(($ac_try" in
10728 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10729 *) ac_try_echo=$ac_try;;
10730esac
10731eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10732 (eval "$ac_link") 2>conftest.er1
10733 ac_status=$?
10734 grep -v '^ *+' conftest.er1 >conftest.err
10735 rm -f conftest.er1
10736 cat conftest.err >&5
10737 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10738 (exit $ac_status); } && {
10739 test -z "$ac_c_werror_flag" ||
10740 test ! -s conftest.err
10741 } && test -s conftest$ac_exeext &&
10742 $as_test_x conftest$ac_exeext; then
10743 ac_cv_lib_gen_dirname=yes 7773 ac_cv_lib_gen_dirname=yes
10744else 7774else
10745 echo "$as_me: failed program was:" >&5 7775 ac_cv_lib_gen_dirname=no
10746sed 's/^/| /' conftest.$ac_ext >&5
10747
10748 ac_cv_lib_gen_dirname=no
10749fi 7776fi
10750 7777rm -f core conftest.err conftest.$ac_objext \
10751rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 7778 conftest$ac_exeext conftest.$ac_ext
10752 conftest$ac_exeext conftest.$ac_ext
10753LIBS=$ac_check_lib_save_LIBS 7779LIBS=$ac_check_lib_save_LIBS
10754fi 7780fi
10755{ echo "$as_me:$LINENO: result: $ac_cv_lib_gen_dirname" >&5 7781{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_dirname" >&5
10756echo "${ECHO_T}$ac_cv_lib_gen_dirname" >&6; } 7782$as_echo "$ac_cv_lib_gen_dirname" >&6; }
10757if test $ac_cv_lib_gen_dirname = yes; then 7783if test "x$ac_cv_lib_gen_dirname" = xyes; then :
10758 7784
10759 { echo "$as_me:$LINENO: checking for broken dirname" >&5 7785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken dirname" >&5
10760echo $ECHO_N "checking for broken dirname... $ECHO_C" >&6; } 7786$as_echo_n "checking for broken dirname... " >&6; }
10761if test "${ac_cv_have_broken_dirname+set}" = set; then 7787if ${ac_cv_have_broken_dirname+:} false; then :
10762 echo $ECHO_N "(cached) $ECHO_C" >&6 7788 $as_echo_n "(cached) " >&6
10763else 7789else
10764 7790
10765 save_LIBS="$LIBS" 7791 save_LIBS="$LIBS"
10766 LIBS="$LIBS -lgen" 7792 LIBS="$LIBS -lgen"
10767 if test "$cross_compiling" = yes; then 7793 if test "$cross_compiling" = yes; then :
10768 ac_cv_have_broken_dirname="no" 7794 ac_cv_have_broken_dirname="no"
10769else 7795else
10770 cat >conftest.$ac_ext <<_ACEOF 7796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10771/* confdefs.h. */
10772_ACEOF
10773cat confdefs.h >>conftest.$ac_ext
10774cat >>conftest.$ac_ext <<_ACEOF
10775/* end confdefs.h. */ 7797/* end confdefs.h. */
10776 7798
10777#include <libgen.h> 7799#include <libgen.h>
@@ -10790,189 +7812,30 @@ int main(int argc, char **argv) {
10790} 7812}
10791 7813
10792_ACEOF 7814_ACEOF
10793rm -f conftest$ac_exeext 7815if ac_fn_c_try_run "$LINENO"; then :
10794if { (ac_try="$ac_link"
10795case "(($ac_try" in
10796 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10797 *) ac_try_echo=$ac_try;;
10798esac
10799eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10800 (eval "$ac_link") 2>&5
10801 ac_status=$?
10802 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10803 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
10804 { (case "(($ac_try" in
10805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10806 *) ac_try_echo=$ac_try;;
10807esac
10808eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10809 (eval "$ac_try") 2>&5
10810 ac_status=$?
10811 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10812 (exit $ac_status); }; }; then
10813 ac_cv_have_broken_dirname="no" 7816 ac_cv_have_broken_dirname="no"
10814else 7817else
10815 echo "$as_me: program exited with status $ac_status" >&5 7818 ac_cv_have_broken_dirname="yes"
10816echo "$as_me: failed program was:" >&5
10817sed 's/^/| /' conftest.$ac_ext >&5
10818
10819( exit $ac_status )
10820 ac_cv_have_broken_dirname="yes"
10821fi 7819fi
10822rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 7820rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7821 conftest.$ac_objext conftest.beam conftest.$ac_ext
10823fi 7822fi
10824 7823
10825
10826 LIBS="$save_LIBS" 7824 LIBS="$save_LIBS"
10827 7825
10828fi 7826fi
10829{ echo "$as_me:$LINENO: result: $ac_cv_have_broken_dirname" >&5 7827{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_broken_dirname" >&5
10830echo "${ECHO_T}$ac_cv_have_broken_dirname" >&6; } 7828$as_echo "$ac_cv_have_broken_dirname" >&6; }
10831 if test "x$ac_cv_have_broken_dirname" = "xno" ; then 7829 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
10832 LIBS="$LIBS -lgen" 7830 LIBS="$LIBS -lgen"
10833 cat >>confdefs.h <<\_ACEOF 7831 $as_echo "#define HAVE_DIRNAME 1" >>confdefs.h
10834#define HAVE_DIRNAME 1
10835_ACEOF
10836
10837
10838for ac_header in libgen.h
10839do
10840as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10841if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10842 { echo "$as_me:$LINENO: checking for $ac_header" >&5
10843echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10844if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10845 echo $ECHO_N "(cached) $ECHO_C" >&6
10846fi
10847ac_res=`eval echo '${'$as_ac_Header'}'`
10848 { echo "$as_me:$LINENO: result: $ac_res" >&5
10849echo "${ECHO_T}$ac_res" >&6; }
10850else
10851 # Is the header compilable?
10852{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
10853echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
10854cat >conftest.$ac_ext <<_ACEOF
10855/* confdefs.h. */
10856_ACEOF
10857cat confdefs.h >>conftest.$ac_ext
10858cat >>conftest.$ac_ext <<_ACEOF
10859/* end confdefs.h. */
10860$ac_includes_default
10861#include <$ac_header>
10862_ACEOF
10863rm -f conftest.$ac_objext
10864if { (ac_try="$ac_compile"
10865case "(($ac_try" in
10866 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10867 *) ac_try_echo=$ac_try;;
10868esac
10869eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10870 (eval "$ac_compile") 2>conftest.er1
10871 ac_status=$?
10872 grep -v '^ *+' conftest.er1 >conftest.err
10873 rm -f conftest.er1
10874 cat conftest.err >&5
10875 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10876 (exit $ac_status); } && {
10877 test -z "$ac_c_werror_flag" ||
10878 test ! -s conftest.err
10879 } && test -s conftest.$ac_objext; then
10880 ac_header_compiler=yes
10881else
10882 echo "$as_me: failed program was:" >&5
10883sed 's/^/| /' conftest.$ac_ext >&5
10884
10885 ac_header_compiler=no
10886fi
10887
10888rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10889{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
10890echo "${ECHO_T}$ac_header_compiler" >&6; }
10891
10892# Is the header present?
10893{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
10894echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
10895cat >conftest.$ac_ext <<_ACEOF
10896/* confdefs.h. */
10897_ACEOF
10898cat confdefs.h >>conftest.$ac_ext
10899cat >>conftest.$ac_ext <<_ACEOF
10900/* end confdefs.h. */
10901#include <$ac_header>
10902_ACEOF
10903if { (ac_try="$ac_cpp conftest.$ac_ext"
10904case "(($ac_try" in
10905 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
10906 *) ac_try_echo=$ac_try;;
10907esac
10908eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
10909 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
10910 ac_status=$?
10911 grep -v '^ *+' conftest.er1 >conftest.err
10912 rm -f conftest.er1
10913 cat conftest.err >&5
10914 echo "$as_me:$LINENO: \$? = $ac_status" >&5
10915 (exit $ac_status); } >/dev/null && {
10916 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
10917 test ! -s conftest.err
10918 }; then
10919 ac_header_preproc=yes
10920else
10921 echo "$as_me: failed program was:" >&5
10922sed 's/^/| /' conftest.$ac_ext >&5
10923
10924 ac_header_preproc=no
10925fi
10926
10927rm -f conftest.err conftest.$ac_ext
10928{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
10929echo "${ECHO_T}$ac_header_preproc" >&6; }
10930 7832
10931# So? What about this header? 7833 for ac_header in libgen.h
10932case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 7834do :
10933 yes:no: ) 7835 ac_fn_c_check_header_mongrel "$LINENO" "libgen.h" "ac_cv_header_libgen_h" "$ac_includes_default"
10934 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 7836if test "x$ac_cv_header_libgen_h" = xyes; then :
10935echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
10936 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
10937echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
10938 ac_header_preproc=yes
10939 ;;
10940 no:yes:* )
10941 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
10942echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
10943 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
10944echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
10945 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
10946echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
10947 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
10948echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
10949 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
10950echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
10951 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
10952echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
10953 ( cat <<\_ASBOX
10954## ------------------------------------------- ##
10955## Report this to openssh-unix-dev@mindrot.org ##
10956## ------------------------------------------- ##
10957_ASBOX
10958 ) | sed "s/^/$as_me: WARNING: /" >&2
10959 ;;
10960esac
10961{ echo "$as_me:$LINENO: checking for $ac_header" >&5
10962echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
10963if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
10964 echo $ECHO_N "(cached) $ECHO_C" >&6
10965else
10966 eval "$as_ac_Header=\$ac_header_preproc"
10967fi
10968ac_res=`eval echo '${'$as_ac_Header'}'`
10969 { echo "$as_me:$LINENO: result: $ac_res" >&5
10970echo "${ECHO_T}$ac_res" >&6; }
10971
10972fi
10973if test `eval echo '${'$as_ac_Header'}'` = yes; then
10974 cat >>confdefs.h <<_ACEOF 7837 cat >>confdefs.h <<_ACEOF
10975#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 7838#define HAVE_LIBGEN_H 1
10976_ACEOF 7839_ACEOF
10977 7840
10978fi 7841fi
@@ -10988,102 +7851,18 @@ fi
10988done 7851done
10989 7852
10990 7853
10991{ echo "$as_me:$LINENO: checking for getspnam" >&5 7854ac_fn_c_check_func "$LINENO" "getspnam" "ac_cv_func_getspnam"
10992echo $ECHO_N "checking for getspnam... $ECHO_C" >&6; } 7855if test "x$ac_cv_func_getspnam" = xyes; then :
10993if test "${ac_cv_func_getspnam+set}" = set; then
10994 echo $ECHO_N "(cached) $ECHO_C" >&6
10995else
10996 cat >conftest.$ac_ext <<_ACEOF
10997/* confdefs.h. */
10998_ACEOF
10999cat confdefs.h >>conftest.$ac_ext
11000cat >>conftest.$ac_ext <<_ACEOF
11001/* end confdefs.h. */
11002/* Define getspnam to an innocuous variant, in case <limits.h> declares getspnam.
11003 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11004#define getspnam innocuous_getspnam
11005
11006/* System header to define __stub macros and hopefully few prototypes,
11007 which can conflict with char getspnam (); below.
11008 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11009 <limits.h> exists even on freestanding compilers. */
11010
11011#ifdef __STDC__
11012# include <limits.h>
11013#else
11014# include <assert.h>
11015#endif
11016
11017#undef getspnam
11018
11019/* Override any GCC internal prototype to avoid an error.
11020 Use char because int might match the return type of a GCC
11021 builtin and then its argument prototype would still apply. */
11022#ifdef __cplusplus
11023extern "C"
11024#endif
11025char getspnam ();
11026/* The GNU C library defines this for functions which it implements
11027 to always fail with ENOSYS. Some functions are actually named
11028 something starting with __ and the normal name is an alias. */
11029#if defined __stub_getspnam || defined __stub___getspnam
11030choke me
11031#endif
11032
11033int
11034main ()
11035{
11036return getspnam ();
11037 ;
11038 return 0;
11039}
11040_ACEOF
11041rm -f conftest.$ac_objext conftest$ac_exeext
11042if { (ac_try="$ac_link"
11043case "(($ac_try" in
11044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11045 *) ac_try_echo=$ac_try;;
11046esac
11047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11048 (eval "$ac_link") 2>conftest.er1
11049 ac_status=$?
11050 grep -v '^ *+' conftest.er1 >conftest.err
11051 rm -f conftest.er1
11052 cat conftest.err >&5
11053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11054 (exit $ac_status); } && {
11055 test -z "$ac_c_werror_flag" ||
11056 test ! -s conftest.err
11057 } && test -s conftest$ac_exeext &&
11058 $as_test_x conftest$ac_exeext; then
11059 ac_cv_func_getspnam=yes
11060else
11061 echo "$as_me: failed program was:" >&5
11062sed 's/^/| /' conftest.$ac_ext >&5
11063
11064 ac_cv_func_getspnam=no
11065fi
11066 7856
11067rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11068 conftest$ac_exeext conftest.$ac_ext
11069fi
11070{ echo "$as_me:$LINENO: result: $ac_cv_func_getspnam" >&5
11071echo "${ECHO_T}$ac_cv_func_getspnam" >&6; }
11072if test $ac_cv_func_getspnam = yes; then
11073 :
11074else 7857else
11075 { echo "$as_me:$LINENO: checking for getspnam in -lgen" >&5 7858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getspnam in -lgen" >&5
11076echo $ECHO_N "checking for getspnam in -lgen... $ECHO_C" >&6; } 7859$as_echo_n "checking for getspnam in -lgen... " >&6; }
11077if test "${ac_cv_lib_gen_getspnam+set}" = set; then 7860if ${ac_cv_lib_gen_getspnam+:} false; then :
11078 echo $ECHO_N "(cached) $ECHO_C" >&6 7861 $as_echo_n "(cached) " >&6
11079else 7862else
11080 ac_check_lib_save_LIBS=$LIBS 7863 ac_check_lib_save_LIBS=$LIBS
11081LIBS="-lgen $LIBS" 7864LIBS="-lgen $LIBS"
11082cat >conftest.$ac_ext <<_ACEOF 7865cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11083/* confdefs.h. */
11084_ACEOF
11085cat confdefs.h >>conftest.$ac_ext
11086cat >>conftest.$ac_ext <<_ACEOF
11087/* end confdefs.h. */ 7866/* end confdefs.h. */
11088 7867
11089/* Override any GCC internal prototype to avoid an error. 7868/* Override any GCC internal prototype to avoid an error.
@@ -11101,55 +7880,30 @@ return getspnam ();
11101 return 0; 7880 return 0;
11102} 7881}
11103_ACEOF 7882_ACEOF
11104rm -f conftest.$ac_objext conftest$ac_exeext 7883if ac_fn_c_try_link "$LINENO"; then :
11105if { (ac_try="$ac_link"
11106case "(($ac_try" in
11107 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11108 *) ac_try_echo=$ac_try;;
11109esac
11110eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11111 (eval "$ac_link") 2>conftest.er1
11112 ac_status=$?
11113 grep -v '^ *+' conftest.er1 >conftest.err
11114 rm -f conftest.er1
11115 cat conftest.err >&5
11116 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11117 (exit $ac_status); } && {
11118 test -z "$ac_c_werror_flag" ||
11119 test ! -s conftest.err
11120 } && test -s conftest$ac_exeext &&
11121 $as_test_x conftest$ac_exeext; then
11122 ac_cv_lib_gen_getspnam=yes 7884 ac_cv_lib_gen_getspnam=yes
11123else 7885else
11124 echo "$as_me: failed program was:" >&5 7886 ac_cv_lib_gen_getspnam=no
11125sed 's/^/| /' conftest.$ac_ext >&5
11126
11127 ac_cv_lib_gen_getspnam=no
11128fi 7887fi
11129 7888rm -f core conftest.err conftest.$ac_objext \
11130rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 7889 conftest$ac_exeext conftest.$ac_ext
11131 conftest$ac_exeext conftest.$ac_ext
11132LIBS=$ac_check_lib_save_LIBS 7890LIBS=$ac_check_lib_save_LIBS
11133fi 7891fi
11134{ echo "$as_me:$LINENO: result: $ac_cv_lib_gen_getspnam" >&5 7892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gen_getspnam" >&5
11135echo "${ECHO_T}$ac_cv_lib_gen_getspnam" >&6; } 7893$as_echo "$ac_cv_lib_gen_getspnam" >&6; }
11136if test $ac_cv_lib_gen_getspnam = yes; then 7894if test "x$ac_cv_lib_gen_getspnam" = xyes; then :
11137 LIBS="$LIBS -lgen" 7895 LIBS="$LIBS -lgen"
11138fi 7896fi
11139 7897
11140fi 7898fi
11141 7899
11142{ echo "$as_me:$LINENO: checking for library containing basename" >&5 7900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing basename" >&5
11143echo $ECHO_N "checking for library containing basename... $ECHO_C" >&6; } 7901$as_echo_n "checking for library containing basename... " >&6; }
11144if test "${ac_cv_search_basename+set}" = set; then 7902if ${ac_cv_search_basename+:} false; then :
11145 echo $ECHO_N "(cached) $ECHO_C" >&6 7903 $as_echo_n "(cached) " >&6
11146else 7904else
11147 ac_func_search_save_LIBS=$LIBS 7905 ac_func_search_save_LIBS=$LIBS
11148cat >conftest.$ac_ext <<_ACEOF 7906cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11149/* confdefs.h. */
11150_ACEOF
11151cat confdefs.h >>conftest.$ac_ext
11152cat >>conftest.$ac_ext <<_ACEOF
11153/* end confdefs.h. */ 7907/* end confdefs.h. */
11154 7908
11155/* Override any GCC internal prototype to avoid an error. 7909/* Override any GCC internal prototype to avoid an error.
@@ -11174,66 +7928,39 @@ for ac_lib in '' gen; do
11174 ac_res=-l$ac_lib 7928 ac_res=-l$ac_lib
11175 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 7929 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
11176 fi 7930 fi
11177 rm -f conftest.$ac_objext conftest$ac_exeext 7931 if ac_fn_c_try_link "$LINENO"; then :
11178if { (ac_try="$ac_link"
11179case "(($ac_try" in
11180 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11181 *) ac_try_echo=$ac_try;;
11182esac
11183eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11184 (eval "$ac_link") 2>conftest.er1
11185 ac_status=$?
11186 grep -v '^ *+' conftest.er1 >conftest.err
11187 rm -f conftest.er1
11188 cat conftest.err >&5
11189 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11190 (exit $ac_status); } && {
11191 test -z "$ac_c_werror_flag" ||
11192 test ! -s conftest.err
11193 } && test -s conftest$ac_exeext &&
11194 $as_test_x conftest$ac_exeext; then
11195 ac_cv_search_basename=$ac_res 7932 ac_cv_search_basename=$ac_res
11196else
11197 echo "$as_me: failed program was:" >&5
11198sed 's/^/| /' conftest.$ac_ext >&5
11199
11200
11201fi 7933fi
11202 7934rm -f core conftest.err conftest.$ac_objext \
11203rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 7935 conftest$ac_exeext
11204 conftest$ac_exeext 7936 if ${ac_cv_search_basename+:} false; then :
11205 if test "${ac_cv_search_basename+set}" = set; then
11206 break 7937 break
11207fi 7938fi
11208done 7939done
11209if test "${ac_cv_search_basename+set}" = set; then 7940if ${ac_cv_search_basename+:} false; then :
11210 : 7941
11211else 7942else
11212 ac_cv_search_basename=no 7943 ac_cv_search_basename=no
11213fi 7944fi
11214rm conftest.$ac_ext 7945rm conftest.$ac_ext
11215LIBS=$ac_func_search_save_LIBS 7946LIBS=$ac_func_search_save_LIBS
11216fi 7947fi
11217{ echo "$as_me:$LINENO: result: $ac_cv_search_basename" >&5 7948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_basename" >&5
11218echo "${ECHO_T}$ac_cv_search_basename" >&6; } 7949$as_echo "$ac_cv_search_basename" >&6; }
11219ac_res=$ac_cv_search_basename 7950ac_res=$ac_cv_search_basename
11220if test "$ac_res" != no; then 7951if test "$ac_res" != no; then :
11221 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 7952 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
11222 7953
11223cat >>confdefs.h <<\_ACEOF 7954$as_echo "#define HAVE_BASENAME 1" >>confdefs.h
11224#define HAVE_BASENAME 1
11225_ACEOF
11226 7955
11227fi 7956fi
11228 7957
11229 7958
11230 7959
11231# Check whether --with-zlib was given. 7960# Check whether --with-zlib was given.
11232if test "${with_zlib+set}" = set; then 7961if test "${with_zlib+set}" = set; then :
11233 withval=$with_zlib; if test "x$withval" = "xno" ; then 7962 withval=$with_zlib; if test "x$withval" = "xno" ; then
11234 { { echo "$as_me:$LINENO: error: *** zlib is required ***" >&5 7963 as_fn_error $? "*** zlib is required ***" "$LINENO" 5
11235echo "$as_me: error: *** zlib is required ***" >&2;}
11236 { (exit 1); exit 1; }; }
11237 elif test "x$withval" != "xyes"; then 7964 elif test "x$withval" != "xyes"; then
11238 if test -d "$withval/lib"; then 7965 if test -d "$withval/lib"; then
11239 if test -n "${need_dash_r}"; then 7966 if test -n "${need_dash_r}"; then
@@ -11258,158 +7985,22 @@ echo "$as_me: error: *** zlib is required ***" >&2;}
11258fi 7985fi
11259 7986
11260 7987
11261if test "${ac_cv_header_zlib_h+set}" = set; then 7988ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default"
11262 { echo "$as_me:$LINENO: checking for zlib.h" >&5 7989if test "x$ac_cv_header_zlib_h" = xyes; then :
11263echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
11264if test "${ac_cv_header_zlib_h+set}" = set; then
11265 echo $ECHO_N "(cached) $ECHO_C" >&6
11266fi
11267{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
11268echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
11269else
11270 # Is the header compilable?
11271{ echo "$as_me:$LINENO: checking zlib.h usability" >&5
11272echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6; }
11273cat >conftest.$ac_ext <<_ACEOF
11274/* confdefs.h. */
11275_ACEOF
11276cat confdefs.h >>conftest.$ac_ext
11277cat >>conftest.$ac_ext <<_ACEOF
11278/* end confdefs.h. */
11279$ac_includes_default
11280#include <zlib.h>
11281_ACEOF
11282rm -f conftest.$ac_objext
11283if { (ac_try="$ac_compile"
11284case "(($ac_try" in
11285 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11286 *) ac_try_echo=$ac_try;;
11287esac
11288eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11289 (eval "$ac_compile") 2>conftest.er1
11290 ac_status=$?
11291 grep -v '^ *+' conftest.er1 >conftest.err
11292 rm -f conftest.er1
11293 cat conftest.err >&5
11294 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11295 (exit $ac_status); } && {
11296 test -z "$ac_c_werror_flag" ||
11297 test ! -s conftest.err
11298 } && test -s conftest.$ac_objext; then
11299 ac_header_compiler=yes
11300else
11301 echo "$as_me: failed program was:" >&5
11302sed 's/^/| /' conftest.$ac_ext >&5
11303 7990
11304 ac_header_compiler=no
11305fi
11306
11307rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11308{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
11309echo "${ECHO_T}$ac_header_compiler" >&6; }
11310
11311# Is the header present?
11312{ echo "$as_me:$LINENO: checking zlib.h presence" >&5
11313echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6; }
11314cat >conftest.$ac_ext <<_ACEOF
11315/* confdefs.h. */
11316_ACEOF
11317cat confdefs.h >>conftest.$ac_ext
11318cat >>conftest.$ac_ext <<_ACEOF
11319/* end confdefs.h. */
11320#include <zlib.h>
11321_ACEOF
11322if { (ac_try="$ac_cpp conftest.$ac_ext"
11323case "(($ac_try" in
11324 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11325 *) ac_try_echo=$ac_try;;
11326esac
11327eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11328 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
11329 ac_status=$?
11330 grep -v '^ *+' conftest.er1 >conftest.err
11331 rm -f conftest.er1
11332 cat conftest.err >&5
11333 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11334 (exit $ac_status); } >/dev/null && {
11335 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
11336 test ! -s conftest.err
11337 }; then
11338 ac_header_preproc=yes
11339else 7991else
11340 echo "$as_me: failed program was:" >&5 7992 as_fn_error $? "*** zlib.h missing - please install first or check config.log ***" "$LINENO" 5
11341sed 's/^/| /' conftest.$ac_ext >&5
11342
11343 ac_header_preproc=no
11344fi 7993fi
11345 7994
11346rm -f conftest.err conftest.$ac_ext
11347{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
11348echo "${ECHO_T}$ac_header_preproc" >&6; }
11349 7995
11350# So? What about this header? 7996{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5
11351case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in 7997$as_echo_n "checking for deflate in -lz... " >&6; }
11352 yes:no: ) 7998if ${ac_cv_lib_z_deflate+:} false; then :
11353 { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 7999 $as_echo_n "(cached) " >&6
11354echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
11355 { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5
11356echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;}
11357 ac_header_preproc=yes
11358 ;;
11359 no:yes:* )
11360 { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5
11361echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;}
11362 { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5
11363echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;}
11364 { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5
11365echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;}
11366 { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5
11367echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;}
11368 { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5
11369echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;}
11370 { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5
11371echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;}
11372 ( cat <<\_ASBOX
11373## ------------------------------------------- ##
11374## Report this to openssh-unix-dev@mindrot.org ##
11375## ------------------------------------------- ##
11376_ASBOX
11377 ) | sed "s/^/$as_me: WARNING: /" >&2
11378 ;;
11379esac
11380{ echo "$as_me:$LINENO: checking for zlib.h" >&5
11381echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6; }
11382if test "${ac_cv_header_zlib_h+set}" = set; then
11383 echo $ECHO_N "(cached) $ECHO_C" >&6
11384else
11385 ac_cv_header_zlib_h=$ac_header_preproc
11386fi
11387{ echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5
11388echo "${ECHO_T}$ac_cv_header_zlib_h" >&6; }
11389
11390fi
11391if test $ac_cv_header_zlib_h = yes; then
11392 :
11393else
11394 { { echo "$as_me:$LINENO: error: *** zlib.h missing - please install first or check config.log ***" >&5
11395echo "$as_me: error: *** zlib.h missing - please install first or check config.log ***" >&2;}
11396 { (exit 1); exit 1; }; }
11397fi
11398
11399
11400
11401{ echo "$as_me:$LINENO: checking for deflate in -lz" >&5
11402echo $ECHO_N "checking for deflate in -lz... $ECHO_C" >&6; }
11403if test "${ac_cv_lib_z_deflate+set}" = set; then
11404 echo $ECHO_N "(cached) $ECHO_C" >&6
11405else 8000else
11406 ac_check_lib_save_LIBS=$LIBS 8001 ac_check_lib_save_LIBS=$LIBS
11407LIBS="-lz $LIBS" 8002LIBS="-lz $LIBS"
11408cat >conftest.$ac_ext <<_ACEOF 8003cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11409/* confdefs.h. */
11410_ACEOF
11411cat confdefs.h >>conftest.$ac_ext
11412cat >>conftest.$ac_ext <<_ACEOF
11413/* end confdefs.h. */ 8004/* end confdefs.h. */
11414 8005
11415/* Override any GCC internal prototype to avoid an error. 8006/* Override any GCC internal prototype to avoid an error.
@@ -11427,39 +8018,18 @@ return deflate ();
11427 return 0; 8018 return 0;
11428} 8019}
11429_ACEOF 8020_ACEOF
11430rm -f conftest.$ac_objext conftest$ac_exeext 8021if ac_fn_c_try_link "$LINENO"; then :
11431if { (ac_try="$ac_link"
11432case "(($ac_try" in
11433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11434 *) ac_try_echo=$ac_try;;
11435esac
11436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11437 (eval "$ac_link") 2>conftest.er1
11438 ac_status=$?
11439 grep -v '^ *+' conftest.er1 >conftest.err
11440 rm -f conftest.er1
11441 cat conftest.err >&5
11442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11443 (exit $ac_status); } && {
11444 test -z "$ac_c_werror_flag" ||
11445 test ! -s conftest.err
11446 } && test -s conftest$ac_exeext &&
11447 $as_test_x conftest$ac_exeext; then
11448 ac_cv_lib_z_deflate=yes 8022 ac_cv_lib_z_deflate=yes
11449else 8023else
11450 echo "$as_me: failed program was:" >&5 8024 ac_cv_lib_z_deflate=no
11451sed 's/^/| /' conftest.$ac_ext >&5
11452
11453 ac_cv_lib_z_deflate=no
11454fi 8025fi
11455 8026rm -f core conftest.err conftest.$ac_objext \
11456rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8027 conftest$ac_exeext conftest.$ac_ext
11457 conftest$ac_exeext conftest.$ac_ext
11458LIBS=$ac_check_lib_save_LIBS 8028LIBS=$ac_check_lib_save_LIBS
11459fi 8029fi
11460{ echo "$as_me:$LINENO: result: $ac_cv_lib_z_deflate" >&5 8030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_deflate" >&5
11461echo "${ECHO_T}$ac_cv_lib_z_deflate" >&6; } 8031$as_echo "$ac_cv_lib_z_deflate" >&6; }
11462if test $ac_cv_lib_z_deflate = yes; then 8032if test "x$ac_cv_lib_z_deflate" = xyes; then :
11463 cat >>confdefs.h <<_ACEOF 8033 cat >>confdefs.h <<_ACEOF
11464#define HAVE_LIBZ 1 8034#define HAVE_LIBZ 1
11465_ACEOF 8035_ACEOF
@@ -11478,11 +8048,7 @@ else
11478 fi 8048 fi
11479 CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}" 8049 CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}"
11480 LIBS="$LIBS -lz" 8050 LIBS="$LIBS -lz"
11481 cat >conftest.$ac_ext <<_ACEOF 8051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11482/* confdefs.h. */
11483_ACEOF
11484cat confdefs.h >>conftest.$ac_ext
11485cat >>conftest.$ac_ext <<_ACEOF
11486/* end confdefs.h. */ 8052/* end confdefs.h. */
11487 8053
11488/* Override any GCC internal prototype to avoid an error. 8054/* Override any GCC internal prototype to avoid an error.
@@ -11500,42 +8066,17 @@ return deflate ();
11500 return 0; 8066 return 0;
11501} 8067}
11502_ACEOF 8068_ACEOF
11503rm -f conftest.$ac_objext conftest$ac_exeext 8069if ac_fn_c_try_link "$LINENO"; then :
11504if { (ac_try="$ac_link" 8070 $as_echo "#define HAVE_LIBZ 1" >>confdefs.h
11505case "(($ac_try" in
11506 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11507 *) ac_try_echo=$ac_try;;
11508esac
11509eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11510 (eval "$ac_link") 2>conftest.er1
11511 ac_status=$?
11512 grep -v '^ *+' conftest.er1 >conftest.err
11513 rm -f conftest.er1
11514 cat conftest.err >&5
11515 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11516 (exit $ac_status); } && {
11517 test -z "$ac_c_werror_flag" ||
11518 test ! -s conftest.err
11519 } && test -s conftest$ac_exeext &&
11520 $as_test_x conftest$ac_exeext; then
11521 cat >>confdefs.h <<\_ACEOF
11522#define HAVE_LIBZ 1
11523_ACEOF
11524 8071
11525else 8072else
11526 echo "$as_me: failed program was:" >&5
11527sed 's/^/| /' conftest.$ac_ext >&5
11528
11529 8073
11530 { { echo "$as_me:$LINENO: error: *** zlib missing - please install first or check config.log ***" >&5 8074 as_fn_error $? "*** zlib missing - please install first or check config.log ***" "$LINENO" 5
11531echo "$as_me: error: *** zlib missing - please install first or check config.log ***" >&2;}
11532 { (exit 1); exit 1; }; }
11533 8075
11534 8076
11535fi 8077fi
11536 8078rm -f core conftest.err conftest.$ac_objext \
11537rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8079 conftest$ac_exeext conftest.$ac_ext
11538 conftest$ac_exeext conftest.$ac_ext
11539 8080
11540 8081
11541fi 8082fi
@@ -11543,7 +8084,7 @@ fi
11543 8084
11544 8085
11545# Check whether --with-zlib-version-check was given. 8086# Check whether --with-zlib-version-check was given.
11546if test "${with_zlib_version_check+set}" = set; then 8087if test "${with_zlib_version_check+set}" = set; then :
11547 withval=$with_zlib_version_check; if test "x$withval" = "xno" ; then 8088 withval=$with_zlib_version_check; if test "x$withval" = "xno" ; then
11548 zlib_check_nonfatal=1 8089 zlib_check_nonfatal=1
11549 fi 8090 fi
@@ -11552,24 +8093,23 @@ if test "${with_zlib_version_check+set}" = set; then
11552fi 8093fi
11553 8094
11554 8095
11555{ echo "$as_me:$LINENO: checking for possibly buggy zlib" >&5 8096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for possibly buggy zlib" >&5
11556echo $ECHO_N "checking for possibly buggy zlib... $ECHO_C" >&6; } 8097$as_echo_n "checking for possibly buggy zlib... " >&6; }
11557if test "$cross_compiling" = yes; then 8098if test "$cross_compiling" = yes; then :
11558 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking zlib version" >&5 8099 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking zlib version" >&5
11559echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;} 8100$as_echo "$as_me: WARNING: cross compiling: not checking zlib version" >&2;}
11560 8101
11561else 8102else
11562 cat >conftest.$ac_ext <<_ACEOF 8103 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11563/* confdefs.h. */
11564_ACEOF
11565cat confdefs.h >>conftest.$ac_ext
11566cat >>conftest.$ac_ext <<_ACEOF
11567/* end confdefs.h. */ 8104/* end confdefs.h. */
11568 8105
11569#include <stdio.h> 8106#include <stdio.h>
11570#include <zlib.h> 8107#include <zlib.h>
11571int main() 8108
8109int
8110main ()
11572{ 8111{
8112
11573 int a=0, b=0, c=0, d=0, n, v; 8113 int a=0, b=0, c=0, d=0, n, v;
11574 n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d); 8114 n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
11575 if (n != 3 && n != 4) 8115 if (n != 3 && n != 4)
@@ -11586,162 +8126,48 @@ int main()
11586 exit(0); 8126 exit(0);
11587 8127
11588 exit(2); 8128 exit(2);
11589}
11590 8129
8130 ;
8131 return 0;
8132}
11591_ACEOF 8133_ACEOF
11592rm -f conftest$ac_exeext 8134if ac_fn_c_try_run "$LINENO"; then :
11593if { (ac_try="$ac_link" 8135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11594case "(($ac_try" in 8136$as_echo "no" >&6; }
11595 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11596 *) ac_try_echo=$ac_try;;
11597esac
11598eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11599 (eval "$ac_link") 2>&5
11600 ac_status=$?
11601 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11602 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11603 { (case "(($ac_try" in
11604 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11605 *) ac_try_echo=$ac_try;;
11606esac
11607eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11608 (eval "$ac_try") 2>&5
11609 ac_status=$?
11610 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11611 (exit $ac_status); }; }; then
11612 { echo "$as_me:$LINENO: result: no" >&5
11613echo "${ECHO_T}no" >&6; }
11614else 8137else
11615 echo "$as_me: program exited with status $ac_status" >&5 8138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11616echo "$as_me: failed program was:" >&5 8139$as_echo "yes" >&6; }
11617sed 's/^/| /' conftest.$ac_ext >&5
11618
11619( exit $ac_status )
11620 { echo "$as_me:$LINENO: result: yes" >&5
11621echo "${ECHO_T}yes" >&6; }
11622 if test -z "$zlib_check_nonfatal" ; then 8140 if test -z "$zlib_check_nonfatal" ; then
11623 { { echo "$as_me:$LINENO: error: *** zlib too old - check config.log *** 8141 as_fn_error $? "*** zlib too old - check config.log ***
11624Your reported zlib version has known security problems. It's possible your 8142Your reported zlib version has known security problems. It's possible your
11625vendor has fixed these problems without changing the version number. If you 8143vendor has fixed these problems without changing the version number. If you
11626are sure this is the case, you can disable the check by running 8144are sure this is the case, you can disable the check by running
11627\"./configure --without-zlib-version-check\". 8145\"./configure --without-zlib-version-check\".
11628If you are in doubt, upgrade zlib to version 1.2.3 or greater. 8146If you are in doubt, upgrade zlib to version 1.2.3 or greater.
11629See http://www.gzip.org/zlib/ for details." >&5 8147See http://www.gzip.org/zlib/ for details." "$LINENO" 5
11630echo "$as_me: error: *** zlib too old - check config.log ***
11631Your reported zlib version has known security problems. It's possible your
11632vendor has fixed these problems without changing the version number. If you
11633are sure this is the case, you can disable the check by running
11634\"./configure --without-zlib-version-check\".
11635If you are in doubt, upgrade zlib to version 1.2.3 or greater.
11636See http://www.gzip.org/zlib/ for details." >&2;}
11637 { (exit 1); exit 1; }; }
11638 else 8148 else
11639 { echo "$as_me:$LINENO: WARNING: zlib version may have security problems" >&5 8149 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: zlib version may have security problems" >&5
11640echo "$as_me: WARNING: zlib version may have security problems" >&2;} 8150$as_echo "$as_me: WARNING: zlib version may have security problems" >&2;}
11641 fi 8151 fi
11642 8152
11643fi 8153fi
11644rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 8154rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8155 conftest.$ac_objext conftest.beam conftest.$ac_ext
11645fi 8156fi
11646 8157
11647 8158
8159ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
8160if test "x$ac_cv_func_strcasecmp" = xyes; then :
11648 8161
11649{ echo "$as_me:$LINENO: checking for strcasecmp" >&5
11650echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6; }
11651if test "${ac_cv_func_strcasecmp+set}" = set; then
11652 echo $ECHO_N "(cached) $ECHO_C" >&6
11653else 8162else
11654 cat >conftest.$ac_ext <<_ACEOF 8163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strcasecmp in -lresolv" >&5
11655/* confdefs.h. */ 8164$as_echo_n "checking for strcasecmp in -lresolv... " >&6; }
11656_ACEOF 8165if ${ac_cv_lib_resolv_strcasecmp+:} false; then :
11657cat confdefs.h >>conftest.$ac_ext 8166 $as_echo_n "(cached) " >&6
11658cat >>conftest.$ac_ext <<_ACEOF
11659/* end confdefs.h. */
11660/* Define strcasecmp to an innocuous variant, in case <limits.h> declares strcasecmp.
11661 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11662#define strcasecmp innocuous_strcasecmp
11663
11664/* System header to define __stub macros and hopefully few prototypes,
11665 which can conflict with char strcasecmp (); below.
11666 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11667 <limits.h> exists even on freestanding compilers. */
11668
11669#ifdef __STDC__
11670# include <limits.h>
11671#else
11672# include <assert.h>
11673#endif
11674
11675#undef strcasecmp
11676
11677/* Override any GCC internal prototype to avoid an error.
11678 Use char because int might match the return type of a GCC
11679 builtin and then its argument prototype would still apply. */
11680#ifdef __cplusplus
11681extern "C"
11682#endif
11683char strcasecmp ();
11684/* The GNU C library defines this for functions which it implements
11685 to always fail with ENOSYS. Some functions are actually named
11686 something starting with __ and the normal name is an alias. */
11687#if defined __stub_strcasecmp || defined __stub___strcasecmp
11688choke me
11689#endif
11690
11691int
11692main ()
11693{
11694return strcasecmp ();
11695 ;
11696 return 0;
11697}
11698_ACEOF
11699rm -f conftest.$ac_objext conftest$ac_exeext
11700if { (ac_try="$ac_link"
11701case "(($ac_try" in
11702 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11703 *) ac_try_echo=$ac_try;;
11704esac
11705eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11706 (eval "$ac_link") 2>conftest.er1
11707 ac_status=$?
11708 grep -v '^ *+' conftest.er1 >conftest.err
11709 rm -f conftest.er1
11710 cat conftest.err >&5
11711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11712 (exit $ac_status); } && {
11713 test -z "$ac_c_werror_flag" ||
11714 test ! -s conftest.err
11715 } && test -s conftest$ac_exeext &&
11716 $as_test_x conftest$ac_exeext; then
11717 ac_cv_func_strcasecmp=yes
11718else
11719 echo "$as_me: failed program was:" >&5
11720sed 's/^/| /' conftest.$ac_ext >&5
11721
11722 ac_cv_func_strcasecmp=no
11723fi
11724
11725rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11726 conftest$ac_exeext conftest.$ac_ext
11727fi
11728{ echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5
11729echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6; }
11730if test $ac_cv_func_strcasecmp = yes; then
11731 :
11732else
11733 { echo "$as_me:$LINENO: checking for strcasecmp in -lresolv" >&5
11734echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6; }
11735if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then
11736 echo $ECHO_N "(cached) $ECHO_C" >&6
11737else 8167else
11738 ac_check_lib_save_LIBS=$LIBS 8168 ac_check_lib_save_LIBS=$LIBS
11739LIBS="-lresolv $LIBS" 8169LIBS="-lresolv $LIBS"
11740cat >conftest.$ac_ext <<_ACEOF 8170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11741/* confdefs.h. */
11742_ACEOF
11743cat confdefs.h >>conftest.$ac_ext
11744cat >>conftest.$ac_ext <<_ACEOF
11745/* end confdefs.h. */ 8171/* end confdefs.h. */
11746 8172
11747/* Override any GCC internal prototype to avoid an error. 8173/* Override any GCC internal prototype to avoid an error.
@@ -11759,149 +8185,41 @@ return strcasecmp ();
11759 return 0; 8185 return 0;
11760} 8186}
11761_ACEOF 8187_ACEOF
11762rm -f conftest.$ac_objext conftest$ac_exeext 8188if ac_fn_c_try_link "$LINENO"; then :
11763if { (ac_try="$ac_link"
11764case "(($ac_try" in
11765 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11766 *) ac_try_echo=$ac_try;;
11767esac
11768eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11769 (eval "$ac_link") 2>conftest.er1
11770 ac_status=$?
11771 grep -v '^ *+' conftest.er1 >conftest.err
11772 rm -f conftest.er1
11773 cat conftest.err >&5
11774 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11775 (exit $ac_status); } && {
11776 test -z "$ac_c_werror_flag" ||
11777 test ! -s conftest.err
11778 } && test -s conftest$ac_exeext &&
11779 $as_test_x conftest$ac_exeext; then
11780 ac_cv_lib_resolv_strcasecmp=yes 8189 ac_cv_lib_resolv_strcasecmp=yes
11781else 8190else
11782 echo "$as_me: failed program was:" >&5 8191 ac_cv_lib_resolv_strcasecmp=no
11783sed 's/^/| /' conftest.$ac_ext >&5
11784
11785 ac_cv_lib_resolv_strcasecmp=no
11786fi 8192fi
11787 8193rm -f core conftest.err conftest.$ac_objext \
11788rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8194 conftest$ac_exeext conftest.$ac_ext
11789 conftest$ac_exeext conftest.$ac_ext
11790LIBS=$ac_check_lib_save_LIBS 8195LIBS=$ac_check_lib_save_LIBS
11791fi 8196fi
11792{ echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_strcasecmp" >&5 8197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_resolv_strcasecmp" >&5
11793echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6; } 8198$as_echo "$ac_cv_lib_resolv_strcasecmp" >&6; }
11794if test $ac_cv_lib_resolv_strcasecmp = yes; then 8199if test "x$ac_cv_lib_resolv_strcasecmp" = xyes; then :
11795 LIBS="$LIBS -lresolv" 8200 LIBS="$LIBS -lresolv"
11796fi 8201fi
11797 8202
11798 8203
11799fi 8204fi
11800 8205
11801
11802for ac_func in utimes 8206for ac_func in utimes
11803do 8207do :
11804as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 8208 ac_fn_c_check_func "$LINENO" "utimes" "ac_cv_func_utimes"
11805{ echo "$as_me:$LINENO: checking for $ac_func" >&5 8209if test "x$ac_cv_func_utimes" = xyes; then :
11806echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
11807if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
11808 echo $ECHO_N "(cached) $ECHO_C" >&6
11809else
11810 cat >conftest.$ac_ext <<_ACEOF
11811/* confdefs.h. */
11812_ACEOF
11813cat confdefs.h >>conftest.$ac_ext
11814cat >>conftest.$ac_ext <<_ACEOF
11815/* end confdefs.h. */
11816/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
11817 For example, HP-UX 11i <limits.h> declares gettimeofday. */
11818#define $ac_func innocuous_$ac_func
11819
11820/* System header to define __stub macros and hopefully few prototypes,
11821 which can conflict with char $ac_func (); below.
11822 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
11823 <limits.h> exists even on freestanding compilers. */
11824
11825#ifdef __STDC__
11826# include <limits.h>
11827#else
11828# include <assert.h>
11829#endif
11830
11831#undef $ac_func
11832
11833/* Override any GCC internal prototype to avoid an error.
11834 Use char because int might match the return type of a GCC
11835 builtin and then its argument prototype would still apply. */
11836#ifdef __cplusplus
11837extern "C"
11838#endif
11839char $ac_func ();
11840/* The GNU C library defines this for functions which it implements
11841 to always fail with ENOSYS. Some functions are actually named
11842 something starting with __ and the normal name is an alias. */
11843#if defined __stub_$ac_func || defined __stub___$ac_func
11844choke me
11845#endif
11846
11847int
11848main ()
11849{
11850return $ac_func ();
11851 ;
11852 return 0;
11853}
11854_ACEOF
11855rm -f conftest.$ac_objext conftest$ac_exeext
11856if { (ac_try="$ac_link"
11857case "(($ac_try" in
11858 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11859 *) ac_try_echo=$ac_try;;
11860esac
11861eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11862 (eval "$ac_link") 2>conftest.er1
11863 ac_status=$?
11864 grep -v '^ *+' conftest.er1 >conftest.err
11865 rm -f conftest.er1
11866 cat conftest.err >&5
11867 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11868 (exit $ac_status); } && {
11869 test -z "$ac_c_werror_flag" ||
11870 test ! -s conftest.err
11871 } && test -s conftest$ac_exeext &&
11872 $as_test_x conftest$ac_exeext; then
11873 eval "$as_ac_var=yes"
11874else
11875 echo "$as_me: failed program was:" >&5
11876sed 's/^/| /' conftest.$ac_ext >&5
11877
11878 eval "$as_ac_var=no"
11879fi
11880
11881rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
11882 conftest$ac_exeext conftest.$ac_ext
11883fi
11884ac_res=`eval echo '${'$as_ac_var'}'`
11885 { echo "$as_me:$LINENO: result: $ac_res" >&5
11886echo "${ECHO_T}$ac_res" >&6; }
11887if test `eval echo '${'$as_ac_var'}'` = yes; then
11888 cat >>confdefs.h <<_ACEOF 8210 cat >>confdefs.h <<_ACEOF
11889#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 8211#define HAVE_UTIMES 1
11890_ACEOF 8212_ACEOF
11891 8213
11892else 8214else
11893 { echo "$as_me:$LINENO: checking for utimes in -lc89" >&5 8215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utimes in -lc89" >&5
11894echo $ECHO_N "checking for utimes in -lc89... $ECHO_C" >&6; } 8216$as_echo_n "checking for utimes in -lc89... " >&6; }
11895if test "${ac_cv_lib_c89_utimes+set}" = set; then 8217if ${ac_cv_lib_c89_utimes+:} false; then :
11896 echo $ECHO_N "(cached) $ECHO_C" >&6 8218 $as_echo_n "(cached) " >&6
11897else 8219else
11898 ac_check_lib_save_LIBS=$LIBS 8220 ac_check_lib_save_LIBS=$LIBS
11899LIBS="-lc89 $LIBS" 8221LIBS="-lc89 $LIBS"
11900cat >conftest.$ac_ext <<_ACEOF 8222cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11901/* confdefs.h. */
11902_ACEOF
11903cat confdefs.h >>conftest.$ac_ext
11904cat >>conftest.$ac_ext <<_ACEOF
11905/* end confdefs.h. */ 8223/* end confdefs.h. */
11906 8224
11907/* Override any GCC internal prototype to avoid an error. 8225/* Override any GCC internal prototype to avoid an error.
@@ -11919,42 +8237,19 @@ return utimes ();
11919 return 0; 8237 return 0;
11920} 8238}
11921_ACEOF 8239_ACEOF
11922rm -f conftest.$ac_objext conftest$ac_exeext 8240if ac_fn_c_try_link "$LINENO"; then :
11923if { (ac_try="$ac_link"
11924case "(($ac_try" in
11925 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11926 *) ac_try_echo=$ac_try;;
11927esac
11928eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
11929 (eval "$ac_link") 2>conftest.er1
11930 ac_status=$?
11931 grep -v '^ *+' conftest.er1 >conftest.err
11932 rm -f conftest.er1
11933 cat conftest.err >&5
11934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
11935 (exit $ac_status); } && {
11936 test -z "$ac_c_werror_flag" ||
11937 test ! -s conftest.err
11938 } && test -s conftest$ac_exeext &&
11939 $as_test_x conftest$ac_exeext; then
11940 ac_cv_lib_c89_utimes=yes 8241 ac_cv_lib_c89_utimes=yes
11941else 8242else
11942 echo "$as_me: failed program was:" >&5 8243 ac_cv_lib_c89_utimes=no
11943sed 's/^/| /' conftest.$ac_ext >&5
11944
11945 ac_cv_lib_c89_utimes=no
11946fi 8244fi
11947 8245rm -f core conftest.err conftest.$ac_objext \
11948rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8246 conftest$ac_exeext conftest.$ac_ext
11949 conftest$ac_exeext conftest.$ac_ext
11950LIBS=$ac_check_lib_save_LIBS 8247LIBS=$ac_check_lib_save_LIBS
11951fi 8248fi
11952{ echo "$as_me:$LINENO: result: $ac_cv_lib_c89_utimes" >&5 8249{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c89_utimes" >&5
11953echo "${ECHO_T}$ac_cv_lib_c89_utimes" >&6; } 8250$as_echo "$ac_cv_lib_c89_utimes" >&6; }
11954if test $ac_cv_lib_c89_utimes = yes; then 8251if test "x$ac_cv_lib_c89_utimes" = xyes; then :
11955 cat >>confdefs.h <<\_ACEOF 8252 $as_echo "#define HAVE_UTIMES 1" >>confdefs.h
11956#define HAVE_UTIMES 1
11957_ACEOF
11958 8253
11959 LIBS="$LIBS -lc89" 8254 LIBS="$LIBS -lc89"
11960fi 8255fi
@@ -11964,162 +8259,25 @@ fi
11964done 8259done
11965 8260
11966 8261
11967
11968for ac_header in libutil.h 8262for ac_header in libutil.h
11969do 8263do :
11970as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 8264 ac_fn_c_check_header_mongrel "$LINENO" "libutil.h" "ac_cv_header_libutil_h" "$ac_includes_default"
11971if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then 8265if test "x$ac_cv_header_libutil_h" = xyes; then :
11972 { echo "$as_me:$LINENO: checking for $ac_header" >&5
11973echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
11974if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
11975 echo $ECHO_N "(cached) $ECHO_C" >&6
11976fi
11977ac_res=`eval echo '${'$as_ac_Header'}'`
11978 { echo "$as_me:$LINENO: result: $ac_res" >&5
11979echo "${ECHO_T}$ac_res" >&6; }
11980else
11981 # Is the header compilable?
11982{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
11983echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
11984cat >conftest.$ac_ext <<_ACEOF
11985/* confdefs.h. */
11986_ACEOF
11987cat confdefs.h >>conftest.$ac_ext
11988cat >>conftest.$ac_ext <<_ACEOF
11989/* end confdefs.h. */
11990$ac_includes_default
11991#include <$ac_header>
11992_ACEOF
11993rm -f conftest.$ac_objext
11994if { (ac_try="$ac_compile"
11995case "(($ac_try" in
11996 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
11997 *) ac_try_echo=$ac_try;;
11998esac
11999eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12000 (eval "$ac_compile") 2>conftest.er1
12001 ac_status=$?
12002 grep -v '^ *+' conftest.er1 >conftest.err
12003 rm -f conftest.er1
12004 cat conftest.err >&5
12005 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12006 (exit $ac_status); } && {
12007 test -z "$ac_c_werror_flag" ||
12008 test ! -s conftest.err
12009 } && test -s conftest.$ac_objext; then
12010 ac_header_compiler=yes
12011else
12012 echo "$as_me: failed program was:" >&5
12013sed 's/^/| /' conftest.$ac_ext >&5
12014
12015 ac_header_compiler=no
12016fi
12017
12018rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12019{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
12020echo "${ECHO_T}$ac_header_compiler" >&6; }
12021
12022# Is the header present?
12023{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
12024echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
12025cat >conftest.$ac_ext <<_ACEOF
12026/* confdefs.h. */
12027_ACEOF
12028cat confdefs.h >>conftest.$ac_ext
12029cat >>conftest.$ac_ext <<_ACEOF
12030/* end confdefs.h. */
12031#include <$ac_header>
12032_ACEOF
12033if { (ac_try="$ac_cpp conftest.$ac_ext"
12034case "(($ac_try" in
12035 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12036 *) ac_try_echo=$ac_try;;
12037esac
12038eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12039 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
12040 ac_status=$?
12041 grep -v '^ *+' conftest.er1 >conftest.err
12042 rm -f conftest.er1
12043 cat conftest.err >&5
12044 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12045 (exit $ac_status); } >/dev/null && {
12046 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
12047 test ! -s conftest.err
12048 }; then
12049 ac_header_preproc=yes
12050else
12051 echo "$as_me: failed program was:" >&5
12052sed 's/^/| /' conftest.$ac_ext >&5
12053
12054 ac_header_preproc=no
12055fi
12056
12057rm -f conftest.err conftest.$ac_ext
12058{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
12059echo "${ECHO_T}$ac_header_preproc" >&6; }
12060
12061# So? What about this header?
12062case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
12063 yes:no: )
12064 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
12065echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
12066 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
12067echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
12068 ac_header_preproc=yes
12069 ;;
12070 no:yes:* )
12071 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
12072echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
12073 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
12074echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
12075 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
12076echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
12077 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
12078echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
12079 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
12080echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
12081 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
12082echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
12083 ( cat <<\_ASBOX
12084## ------------------------------------------- ##
12085## Report this to openssh-unix-dev@mindrot.org ##
12086## ------------------------------------------- ##
12087_ASBOX
12088 ) | sed "s/^/$as_me: WARNING: /" >&2
12089 ;;
12090esac
12091{ echo "$as_me:$LINENO: checking for $ac_header" >&5
12092echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
12093if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
12094 echo $ECHO_N "(cached) $ECHO_C" >&6
12095else
12096 eval "$as_ac_Header=\$ac_header_preproc"
12097fi
12098ac_res=`eval echo '${'$as_ac_Header'}'`
12099 { echo "$as_me:$LINENO: result: $ac_res" >&5
12100echo "${ECHO_T}$ac_res" >&6; }
12101
12102fi
12103if test `eval echo '${'$as_ac_Header'}'` = yes; then
12104 cat >>confdefs.h <<_ACEOF 8266 cat >>confdefs.h <<_ACEOF
12105#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 8267#define HAVE_LIBUTIL_H 1
12106_ACEOF 8268_ACEOF
12107 8269
12108fi 8270fi
12109 8271
12110done 8272done
12111 8273
12112{ echo "$as_me:$LINENO: checking for library containing login" >&5 8274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing login" >&5
12113echo $ECHO_N "checking for library containing login... $ECHO_C" >&6; } 8275$as_echo_n "checking for library containing login... " >&6; }
12114if test "${ac_cv_search_login+set}" = set; then 8276if ${ac_cv_search_login+:} false; then :
12115 echo $ECHO_N "(cached) $ECHO_C" >&6 8277 $as_echo_n "(cached) " >&6
12116else 8278else
12117 ac_func_search_save_LIBS=$LIBS 8279 ac_func_search_save_LIBS=$LIBS
12118cat >conftest.$ac_ext <<_ACEOF 8280cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12119/* confdefs.h. */
12120_ACEOF
12121cat confdefs.h >>conftest.$ac_ext
12122cat >>conftest.$ac_ext <<_ACEOF
12123/* end confdefs.h. */ 8281/* end confdefs.h. */
12124 8282
12125/* Override any GCC internal prototype to avoid an error. 8283/* Override any GCC internal prototype to avoid an error.
@@ -12144,261 +8302,64 @@ for ac_lib in '' util bsd; do
12144 ac_res=-l$ac_lib 8302 ac_res=-l$ac_lib
12145 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 8303 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12146 fi 8304 fi
12147 rm -f conftest.$ac_objext conftest$ac_exeext 8305 if ac_fn_c_try_link "$LINENO"; then :
12148if { (ac_try="$ac_link"
12149case "(($ac_try" in
12150 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12151 *) ac_try_echo=$ac_try;;
12152esac
12153eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12154 (eval "$ac_link") 2>conftest.er1
12155 ac_status=$?
12156 grep -v '^ *+' conftest.er1 >conftest.err
12157 rm -f conftest.er1
12158 cat conftest.err >&5
12159 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12160 (exit $ac_status); } && {
12161 test -z "$ac_c_werror_flag" ||
12162 test ! -s conftest.err
12163 } && test -s conftest$ac_exeext &&
12164 $as_test_x conftest$ac_exeext; then
12165 ac_cv_search_login=$ac_res 8306 ac_cv_search_login=$ac_res
12166else
12167 echo "$as_me: failed program was:" >&5
12168sed 's/^/| /' conftest.$ac_ext >&5
12169
12170
12171fi 8307fi
12172 8308rm -f core conftest.err conftest.$ac_objext \
12173rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8309 conftest$ac_exeext
12174 conftest$ac_exeext 8310 if ${ac_cv_search_login+:} false; then :
12175 if test "${ac_cv_search_login+set}" = set; then
12176 break 8311 break
12177fi 8312fi
12178done 8313done
12179if test "${ac_cv_search_login+set}" = set; then 8314if ${ac_cv_search_login+:} false; then :
12180 : 8315
12181else 8316else
12182 ac_cv_search_login=no 8317 ac_cv_search_login=no
12183fi 8318fi
12184rm conftest.$ac_ext 8319rm conftest.$ac_ext
12185LIBS=$ac_func_search_save_LIBS 8320LIBS=$ac_func_search_save_LIBS
12186fi 8321fi
12187{ echo "$as_me:$LINENO: result: $ac_cv_search_login" >&5 8322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_login" >&5
12188echo "${ECHO_T}$ac_cv_search_login" >&6; } 8323$as_echo "$ac_cv_search_login" >&6; }
12189ac_res=$ac_cv_search_login 8324ac_res=$ac_cv_search_login
12190if test "$ac_res" != no; then 8325if test "$ac_res" != no; then :
12191 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 8326 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12192 8327
12193cat >>confdefs.h <<\_ACEOF 8328$as_echo "#define HAVE_LOGIN 1" >>confdefs.h
12194#define HAVE_LOGIN 1
12195_ACEOF
12196 8329
12197fi 8330fi
12198 8331
12199
12200
12201
12202
12203for ac_func in fmt_scaled logout updwtmp logwtmp 8332for ac_func in fmt_scaled logout updwtmp logwtmp
12204do 8333do :
12205as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 8334 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12206{ echo "$as_me:$LINENO: checking for $ac_func" >&5 8335ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12207echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 8336if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12208if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12209 echo $ECHO_N "(cached) $ECHO_C" >&6
12210else
12211 cat >conftest.$ac_ext <<_ACEOF
12212/* confdefs.h. */
12213_ACEOF
12214cat confdefs.h >>conftest.$ac_ext
12215cat >>conftest.$ac_ext <<_ACEOF
12216/* end confdefs.h. */
12217/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
12218 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12219#define $ac_func innocuous_$ac_func
12220
12221/* System header to define __stub macros and hopefully few prototypes,
12222 which can conflict with char $ac_func (); below.
12223 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12224 <limits.h> exists even on freestanding compilers. */
12225
12226#ifdef __STDC__
12227# include <limits.h>
12228#else
12229# include <assert.h>
12230#endif
12231
12232#undef $ac_func
12233
12234/* Override any GCC internal prototype to avoid an error.
12235 Use char because int might match the return type of a GCC
12236 builtin and then its argument prototype would still apply. */
12237#ifdef __cplusplus
12238extern "C"
12239#endif
12240char $ac_func ();
12241/* The GNU C library defines this for functions which it implements
12242 to always fail with ENOSYS. Some functions are actually named
12243 something starting with __ and the normal name is an alias. */
12244#if defined __stub_$ac_func || defined __stub___$ac_func
12245choke me
12246#endif
12247
12248int
12249main ()
12250{
12251return $ac_func ();
12252 ;
12253 return 0;
12254}
12255_ACEOF
12256rm -f conftest.$ac_objext conftest$ac_exeext
12257if { (ac_try="$ac_link"
12258case "(($ac_try" in
12259 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12260 *) ac_try_echo=$ac_try;;
12261esac
12262eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12263 (eval "$ac_link") 2>conftest.er1
12264 ac_status=$?
12265 grep -v '^ *+' conftest.er1 >conftest.err
12266 rm -f conftest.er1
12267 cat conftest.err >&5
12268 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12269 (exit $ac_status); } && {
12270 test -z "$ac_c_werror_flag" ||
12271 test ! -s conftest.err
12272 } && test -s conftest$ac_exeext &&
12273 $as_test_x conftest$ac_exeext; then
12274 eval "$as_ac_var=yes"
12275else
12276 echo "$as_me: failed program was:" >&5
12277sed 's/^/| /' conftest.$ac_ext >&5
12278
12279 eval "$as_ac_var=no"
12280fi
12281
12282rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12283 conftest$ac_exeext conftest.$ac_ext
12284fi
12285ac_res=`eval echo '${'$as_ac_var'}'`
12286 { echo "$as_me:$LINENO: result: $ac_res" >&5
12287echo "${ECHO_T}$ac_res" >&6; }
12288if test `eval echo '${'$as_ac_var'}'` = yes; then
12289 cat >>confdefs.h <<_ACEOF 8337 cat >>confdefs.h <<_ACEOF
12290#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 8338#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12291_ACEOF 8339_ACEOF
12292 8340
12293fi 8341fi
12294done 8342done
12295 8343
12296 8344
12297
12298for ac_func in strftime 8345for ac_func in strftime
12299do 8346do :
12300as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 8347 ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
12301{ echo "$as_me:$LINENO: checking for $ac_func" >&5 8348if test "x$ac_cv_func_strftime" = xyes; then :
12302echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
12303if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
12304 echo $ECHO_N "(cached) $ECHO_C" >&6
12305else
12306 cat >conftest.$ac_ext <<_ACEOF
12307/* confdefs.h. */
12308_ACEOF
12309cat confdefs.h >>conftest.$ac_ext
12310cat >>conftest.$ac_ext <<_ACEOF
12311/* end confdefs.h. */
12312/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
12313 For example, HP-UX 11i <limits.h> declares gettimeofday. */
12314#define $ac_func innocuous_$ac_func
12315
12316/* System header to define __stub macros and hopefully few prototypes,
12317 which can conflict with char $ac_func (); below.
12318 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
12319 <limits.h> exists even on freestanding compilers. */
12320
12321#ifdef __STDC__
12322# include <limits.h>
12323#else
12324# include <assert.h>
12325#endif
12326
12327#undef $ac_func
12328
12329/* Override any GCC internal prototype to avoid an error.
12330 Use char because int might match the return type of a GCC
12331 builtin and then its argument prototype would still apply. */
12332#ifdef __cplusplus
12333extern "C"
12334#endif
12335char $ac_func ();
12336/* The GNU C library defines this for functions which it implements
12337 to always fail with ENOSYS. Some functions are actually named
12338 something starting with __ and the normal name is an alias. */
12339#if defined __stub_$ac_func || defined __stub___$ac_func
12340choke me
12341#endif
12342
12343int
12344main ()
12345{
12346return $ac_func ();
12347 ;
12348 return 0;
12349}
12350_ACEOF
12351rm -f conftest.$ac_objext conftest$ac_exeext
12352if { (ac_try="$ac_link"
12353case "(($ac_try" in
12354 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12355 *) ac_try_echo=$ac_try;;
12356esac
12357eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12358 (eval "$ac_link") 2>conftest.er1
12359 ac_status=$?
12360 grep -v '^ *+' conftest.er1 >conftest.err
12361 rm -f conftest.er1
12362 cat conftest.err >&5
12363 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12364 (exit $ac_status); } && {
12365 test -z "$ac_c_werror_flag" ||
12366 test ! -s conftest.err
12367 } && test -s conftest$ac_exeext &&
12368 $as_test_x conftest$ac_exeext; then
12369 eval "$as_ac_var=yes"
12370else
12371 echo "$as_me: failed program was:" >&5
12372sed 's/^/| /' conftest.$ac_ext >&5
12373
12374 eval "$as_ac_var=no"
12375fi
12376
12377rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
12378 conftest$ac_exeext conftest.$ac_ext
12379fi
12380ac_res=`eval echo '${'$as_ac_var'}'`
12381 { echo "$as_me:$LINENO: result: $ac_res" >&5
12382echo "${ECHO_T}$ac_res" >&6; }
12383if test `eval echo '${'$as_ac_var'}'` = yes; then
12384 cat >>confdefs.h <<_ACEOF 8349 cat >>confdefs.h <<_ACEOF
12385#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 8350#define HAVE_STRFTIME 1
12386_ACEOF 8351_ACEOF
12387 8352
12388else 8353else
12389 # strftime is in -lintl on SCO UNIX. 8354 # strftime is in -lintl on SCO UNIX.
12390{ echo "$as_me:$LINENO: checking for strftime in -lintl" >&5 8355{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
12391echo $ECHO_N "checking for strftime in -lintl... $ECHO_C" >&6; } 8356$as_echo_n "checking for strftime in -lintl... " >&6; }
12392if test "${ac_cv_lib_intl_strftime+set}" = set; then 8357if ${ac_cv_lib_intl_strftime+:} false; then :
12393 echo $ECHO_N "(cached) $ECHO_C" >&6 8358 $as_echo_n "(cached) " >&6
12394else 8359else
12395 ac_check_lib_save_LIBS=$LIBS 8360 ac_check_lib_save_LIBS=$LIBS
12396LIBS="-lintl $LIBS" 8361LIBS="-lintl $LIBS"
12397cat >conftest.$ac_ext <<_ACEOF 8362cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12398/* confdefs.h. */
12399_ACEOF
12400cat confdefs.h >>conftest.$ac_ext
12401cat >>conftest.$ac_ext <<_ACEOF
12402/* end confdefs.h. */ 8363/* end confdefs.h. */
12403 8364
12404/* Override any GCC internal prototype to avoid an error. 8365/* Override any GCC internal prototype to avoid an error.
@@ -12416,42 +8377,19 @@ return strftime ();
12416 return 0; 8377 return 0;
12417} 8378}
12418_ACEOF 8379_ACEOF
12419rm -f conftest.$ac_objext conftest$ac_exeext 8380if ac_fn_c_try_link "$LINENO"; then :
12420if { (ac_try="$ac_link"
12421case "(($ac_try" in
12422 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12423 *) ac_try_echo=$ac_try;;
12424esac
12425eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12426 (eval "$ac_link") 2>conftest.er1
12427 ac_status=$?
12428 grep -v '^ *+' conftest.er1 >conftest.err
12429 rm -f conftest.er1
12430 cat conftest.err >&5
12431 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12432 (exit $ac_status); } && {
12433 test -z "$ac_c_werror_flag" ||
12434 test ! -s conftest.err
12435 } && test -s conftest$ac_exeext &&
12436 $as_test_x conftest$ac_exeext; then
12437 ac_cv_lib_intl_strftime=yes 8381 ac_cv_lib_intl_strftime=yes
12438else 8382else
12439 echo "$as_me: failed program was:" >&5 8383 ac_cv_lib_intl_strftime=no
12440sed 's/^/| /' conftest.$ac_ext >&5
12441
12442 ac_cv_lib_intl_strftime=no
12443fi 8384fi
12444 8385rm -f core conftest.err conftest.$ac_objext \
12445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8386 conftest$ac_exeext conftest.$ac_ext
12446 conftest$ac_exeext conftest.$ac_ext
12447LIBS=$ac_check_lib_save_LIBS 8387LIBS=$ac_check_lib_save_LIBS
12448fi 8388fi
12449{ echo "$as_me:$LINENO: result: $ac_cv_lib_intl_strftime" >&5 8389{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
12450echo "${ECHO_T}$ac_cv_lib_intl_strftime" >&6; } 8390$as_echo "$ac_cv_lib_intl_strftime" >&6; }
12451if test $ac_cv_lib_intl_strftime = yes; then 8391if test "x$ac_cv_lib_intl_strftime" = xyes; then :
12452 cat >>confdefs.h <<\_ACEOF 8392 $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
12453#define HAVE_STRFTIME 1
12454_ACEOF
12455 8393
12456LIBS="-lintl $LIBS" 8394LIBS="-lintl $LIBS"
12457fi 8395fi
@@ -12461,13 +8399,9 @@ done
12461 8399
12462 8400
12463# Check for ALTDIRFUNC glob() extension 8401# Check for ALTDIRFUNC glob() extension
12464{ echo "$as_me:$LINENO: checking for GLOB_ALTDIRFUNC support" >&5 8402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GLOB_ALTDIRFUNC support" >&5
12465echo $ECHO_N "checking for GLOB_ALTDIRFUNC support... $ECHO_C" >&6; } 8403$as_echo_n "checking for GLOB_ALTDIRFUNC support... " >&6; }
12466cat >conftest.$ac_ext <<_ACEOF 8404cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12467/* confdefs.h. */
12468_ACEOF
12469cat confdefs.h >>conftest.$ac_ext
12470cat >>conftest.$ac_ext <<_ACEOF
12471/* end confdefs.h. */ 8405/* end confdefs.h. */
12472 8406
12473 #include <glob.h> 8407 #include <glob.h>
@@ -12477,20 +8411,18 @@ cat >>conftest.$ac_ext <<_ACEOF
12477 8411
12478_ACEOF 8412_ACEOF
12479if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 8413if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12480 $EGREP "FOUNDIT" >/dev/null 2>&1; then 8414 $EGREP "FOUNDIT" >/dev/null 2>&1; then :
12481 8415
12482 8416
12483cat >>confdefs.h <<\_ACEOF 8417$as_echo "#define GLOB_HAS_ALTDIRFUNC 1" >>confdefs.h
12484#define GLOB_HAS_ALTDIRFUNC 1
12485_ACEOF
12486 8418
12487 { echo "$as_me:$LINENO: result: yes" >&5 8419 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12488echo "${ECHO_T}yes" >&6; } 8420$as_echo "yes" >&6; }
12489 8421
12490else 8422else
12491 8423
12492 { echo "$as_me:$LINENO: result: no" >&5 8424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12493echo "${ECHO_T}no" >&6; } 8425$as_echo "no" >&6; }
12494 8426
12495 8427
12496fi 8428fi
@@ -12498,70 +8430,39 @@ rm -f conftest*
12498 8430
12499 8431
12500# Check for g.gl_matchc glob() extension 8432# Check for g.gl_matchc glob() extension
12501{ echo "$as_me:$LINENO: checking for gl_matchc field in glob_t" >&5 8433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_matchc field in glob_t" >&5
12502echo $ECHO_N "checking for gl_matchc field in glob_t... $ECHO_C" >&6; } 8434$as_echo_n "checking for gl_matchc field in glob_t... " >&6; }
12503cat >conftest.$ac_ext <<_ACEOF 8435cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12504/* confdefs.h. */
12505_ACEOF
12506cat confdefs.h >>conftest.$ac_ext
12507cat >>conftest.$ac_ext <<_ACEOF
12508/* end confdefs.h. */ 8436/* end confdefs.h. */
12509 #include <glob.h> 8437 #include <glob.h>
12510int 8438int
12511main () 8439main ()
12512{ 8440{
12513glob_t g; g.gl_matchc = 1; 8441 glob_t g; g.gl_matchc = 1;
12514 ; 8442 ;
12515 return 0; 8443 return 0;
12516} 8444}
12517_ACEOF 8445_ACEOF
12518rm -f conftest.$ac_objext 8446if ac_fn_c_try_compile "$LINENO"; then :
12519if { (ac_try="$ac_compile"
12520case "(($ac_try" in
12521 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12522 *) ac_try_echo=$ac_try;;
12523esac
12524eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12525 (eval "$ac_compile") 2>conftest.er1
12526 ac_status=$?
12527 grep -v '^ *+' conftest.er1 >conftest.err
12528 rm -f conftest.er1
12529 cat conftest.err >&5
12530 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12531 (exit $ac_status); } && {
12532 test -z "$ac_c_werror_flag" ||
12533 test ! -s conftest.err
12534 } && test -s conftest.$ac_objext; then
12535 8447
12536 8448
12537cat >>confdefs.h <<\_ACEOF 8449$as_echo "#define GLOB_HAS_GL_MATCHC 1" >>confdefs.h
12538#define GLOB_HAS_GL_MATCHC 1
12539_ACEOF
12540 8450
12541 { echo "$as_me:$LINENO: result: yes" >&5 8451 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12542echo "${ECHO_T}yes" >&6; } 8452$as_echo "yes" >&6; }
12543 8453
12544else 8454else
12545 echo "$as_me: failed program was:" >&5
12546sed 's/^/| /' conftest.$ac_ext >&5
12547
12548
12549 { echo "$as_me:$LINENO: result: no" >&5
12550echo "${ECHO_T}no" >&6; }
12551 8455
8456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8457$as_echo "no" >&6; }
12552 8458
12553fi 8459fi
12554
12555rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12556 8461
12557# Check for g.gl_statv glob() extension 8462# Check for g.gl_statv glob() extension
12558{ echo "$as_me:$LINENO: checking for gl_statv and GLOB_KEEPSTAT extensions for glob" >&5 8463{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gl_statv and GLOB_KEEPSTAT extensions for glob" >&5
12559echo $ECHO_N "checking for gl_statv and GLOB_KEEPSTAT extensions for glob... $ECHO_C" >&6; } 8464$as_echo_n "checking for gl_statv and GLOB_KEEPSTAT extensions for glob... " >&6; }
12560cat >conftest.$ac_ext <<_ACEOF 8465cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12561/* confdefs.h. */
12562_ACEOF
12563cat confdefs.h >>conftest.$ac_ext
12564cat >>conftest.$ac_ext <<_ACEOF
12565/* end confdefs.h. */ 8466/* end confdefs.h. */
12566 #include <glob.h> 8467 #include <glob.h>
12567int 8468int
@@ -12578,203 +8479,98 @@ g.gl_statv = NULL;
12578 return 0; 8479 return 0;
12579} 8480}
12580_ACEOF 8481_ACEOF
12581rm -f conftest.$ac_objext 8482if ac_fn_c_try_compile "$LINENO"; then :
12582if { (ac_try="$ac_compile"
12583case "(($ac_try" in
12584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12585 *) ac_try_echo=$ac_try;;
12586esac
12587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12588 (eval "$ac_compile") 2>conftest.er1
12589 ac_status=$?
12590 grep -v '^ *+' conftest.er1 >conftest.err
12591 rm -f conftest.er1
12592 cat conftest.err >&5
12593 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12594 (exit $ac_status); } && {
12595 test -z "$ac_c_werror_flag" ||
12596 test ! -s conftest.err
12597 } && test -s conftest.$ac_objext; then
12598 8483
12599 8484
12600cat >>confdefs.h <<\_ACEOF 8485$as_echo "#define GLOB_HAS_GL_STATV 1" >>confdefs.h
12601#define GLOB_HAS_GL_STATV 1
12602_ACEOF
12603 8486
12604 { echo "$as_me:$LINENO: result: yes" >&5 8487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12605echo "${ECHO_T}yes" >&6; } 8488$as_echo "yes" >&6; }
12606 8489
12607else 8490else
12608 echo "$as_me: failed program was:" >&5
12609sed 's/^/| /' conftest.$ac_ext >&5
12610 8491
12611 8492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12612 { echo "$as_me:$LINENO: result: no" >&5 8493$as_echo "no" >&6; }
12613echo "${ECHO_T}no" >&6; }
12614 8494
12615 8495
12616fi 8496fi
12617
12618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8497rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12619 8498
12620{ echo "$as_me:$LINENO: checking whether GLOB_NOMATCH is declared" >&5 8499ac_fn_c_check_decl "$LINENO" "GLOB_NOMATCH" "ac_cv_have_decl_GLOB_NOMATCH" "#include <glob.h>
12621echo $ECHO_N "checking whether GLOB_NOMATCH is declared... $ECHO_C" >&6; } 8500"
12622if test "${ac_cv_have_decl_GLOB_NOMATCH+set}" = set; then 8501if test "x$ac_cv_have_decl_GLOB_NOMATCH" = xyes; then :
12623 echo $ECHO_N "(cached) $ECHO_C" >&6 8502 ac_have_decl=1
12624else
12625 cat >conftest.$ac_ext <<_ACEOF
12626/* confdefs.h. */
12627_ACEOF
12628cat confdefs.h >>conftest.$ac_ext
12629cat >>conftest.$ac_ext <<_ACEOF
12630/* end confdefs.h. */
12631#include <glob.h>
12632
12633int
12634main ()
12635{
12636#ifndef GLOB_NOMATCH
12637 (void) GLOB_NOMATCH;
12638#endif
12639
12640 ;
12641 return 0;
12642}
12643_ACEOF
12644rm -f conftest.$ac_objext
12645if { (ac_try="$ac_compile"
12646case "(($ac_try" in
12647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12648 *) ac_try_echo=$ac_try;;
12649esac
12650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12651 (eval "$ac_compile") 2>conftest.er1
12652 ac_status=$?
12653 grep -v '^ *+' conftest.er1 >conftest.err
12654 rm -f conftest.er1
12655 cat conftest.err >&5
12656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12657 (exit $ac_status); } && {
12658 test -z "$ac_c_werror_flag" ||
12659 test ! -s conftest.err
12660 } && test -s conftest.$ac_objext; then
12661 ac_cv_have_decl_GLOB_NOMATCH=yes
12662else 8503else
12663 echo "$as_me: failed program was:" >&5 8504 ac_have_decl=0
12664sed 's/^/| /' conftest.$ac_ext >&5
12665
12666 ac_cv_have_decl_GLOB_NOMATCH=no
12667fi
12668
12669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12670fi 8505fi
12671{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_GLOB_NOMATCH" >&5
12672echo "${ECHO_T}$ac_cv_have_decl_GLOB_NOMATCH" >&6; }
12673if test $ac_cv_have_decl_GLOB_NOMATCH = yes; then
12674 8506
12675cat >>confdefs.h <<_ACEOF 8507cat >>confdefs.h <<_ACEOF
12676#define HAVE_DECL_GLOB_NOMATCH 1 8508#define HAVE_DECL_GLOB_NOMATCH $ac_have_decl
12677_ACEOF
12678
12679
12680else
12681 cat >>confdefs.h <<_ACEOF
12682#define HAVE_DECL_GLOB_NOMATCH 0
12683_ACEOF 8509_ACEOF
12684 8510
12685 8511
12686fi 8512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct dirent allocates space for d_name" >&5
12687 8513$as_echo_n "checking whether struct dirent allocates space for d_name... " >&6; }
12688 8514if test "$cross_compiling" = yes; then :
12689
12690{ echo "$as_me:$LINENO: checking whether struct dirent allocates space for d_name" >&5
12691echo $ECHO_N "checking whether struct dirent allocates space for d_name... $ECHO_C" >&6; }
12692if test "$cross_compiling" = yes; then
12693 8515
12694 { echo "$as_me:$LINENO: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&5 8516 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&5
12695echo "$as_me: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&2;} 8517$as_echo "$as_me: WARNING: cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME" >&2;}
12696 cat >>confdefs.h <<\_ACEOF 8518 $as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
12697#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1
12698_ACEOF
12699 8519
12700 8520
12701 8521
12702else 8522else
12703 cat >conftest.$ac_ext <<_ACEOF 8523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12704/* confdefs.h. */
12705_ACEOF
12706cat confdefs.h >>conftest.$ac_ext
12707cat >>conftest.$ac_ext <<_ACEOF
12708/* end confdefs.h. */ 8524/* end confdefs.h. */
12709 8525
12710#include <sys/types.h> 8526#include <sys/types.h>
12711#include <dirent.h> 8527#include <dirent.h>
12712int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));} 8528int
8529main ()
8530{
12713 8531
8532 struct dirent d;
8533 exit(sizeof(d.d_name)<=sizeof(char));
8534
8535 ;
8536 return 0;
8537}
12714_ACEOF 8538_ACEOF
12715rm -f conftest$ac_exeext 8539if ac_fn_c_try_run "$LINENO"; then :
12716if { (ac_try="$ac_link" 8540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12717case "(($ac_try" in 8541$as_echo "yes" >&6; }
12718 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12719 *) ac_try_echo=$ac_try;;
12720esac
12721eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12722 (eval "$ac_link") 2>&5
12723 ac_status=$?
12724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12725 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12726 { (case "(($ac_try" in
12727 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12728 *) ac_try_echo=$ac_try;;
12729esac
12730eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12731 (eval "$ac_try") 2>&5
12732 ac_status=$?
12733 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12734 (exit $ac_status); }; }; then
12735 { echo "$as_me:$LINENO: result: yes" >&5
12736echo "${ECHO_T}yes" >&6; }
12737else 8542else
12738 echo "$as_me: program exited with status $ac_status" >&5
12739echo "$as_me: failed program was:" >&5
12740sed 's/^/| /' conftest.$ac_ext >&5
12741
12742( exit $ac_status )
12743 8543
12744 { echo "$as_me:$LINENO: result: no" >&5 8544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12745echo "${ECHO_T}no" >&6; } 8545$as_echo "no" >&6; }
12746 8546
12747cat >>confdefs.h <<\_ACEOF 8547$as_echo "#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1" >>confdefs.h
12748#define BROKEN_ONE_BYTE_DIRENT_D_NAME 1
12749_ACEOF
12750 8548
12751 8549
12752fi 8550fi
12753rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 8551rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8552 conftest.$ac_objext conftest.beam conftest.$ac_ext
12754fi 8553fi
12755 8554
12756 8555
12757 8556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for /proc/pid/fd directory" >&5
12758{ echo "$as_me:$LINENO: checking for /proc/pid/fd directory" >&5 8557$as_echo_n "checking for /proc/pid/fd directory... " >&6; }
12759echo $ECHO_N "checking for /proc/pid/fd directory... $ECHO_C" >&6; }
12760if test -d "/proc/$$/fd" ; then 8558if test -d "/proc/$$/fd" ; then
12761 8559
12762cat >>confdefs.h <<\_ACEOF 8560$as_echo "#define HAVE_PROC_PID 1" >>confdefs.h
12763#define HAVE_PROC_PID 1
12764_ACEOF
12765 8561
12766 { echo "$as_me:$LINENO: result: yes" >&5 8562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12767echo "${ECHO_T}yes" >&6; } 8563$as_echo "yes" >&6; }
12768else 8564else
12769 { echo "$as_me:$LINENO: result: no" >&5 8565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12770echo "${ECHO_T}no" >&6; } 8566$as_echo "no" >&6; }
12771fi 8567fi
12772 8568
12773# Check whether user wants S/Key support 8569# Check whether user wants S/Key support
12774SKEY_MSG="no" 8570SKEY_MSG="no"
12775 8571
12776# Check whether --with-skey was given. 8572# Check whether --with-skey was given.
12777if test "${with_skey+set}" = set; then 8573if test "${with_skey+set}" = set; then :
12778 withval=$with_skey; 8574 withval=$with_skey;
12779 if test "x$withval" != "xno" ; then 8575 if test "x$withval" != "xno" ; then
12780 8576
@@ -12784,113 +8580,73 @@ if test "${with_skey+set}" = set; then
12784 fi 8580 fi
12785 8581
12786 8582
12787cat >>confdefs.h <<\_ACEOF 8583$as_echo "#define SKEY 1" >>confdefs.h
12788#define SKEY 1
12789_ACEOF
12790 8584
12791 LIBS="-lskey $LIBS" 8585 LIBS="-lskey $LIBS"
12792 SKEY_MSG="yes" 8586 SKEY_MSG="yes"
12793 8587
12794 { echo "$as_me:$LINENO: checking for s/key support" >&5 8588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for s/key support" >&5
12795echo $ECHO_N "checking for s/key support... $ECHO_C" >&6; } 8589$as_echo_n "checking for s/key support... " >&6; }
12796 cat >conftest.$ac_ext <<_ACEOF 8590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12797/* confdefs.h. */
12798_ACEOF
12799cat confdefs.h >>conftest.$ac_ext
12800cat >>conftest.$ac_ext <<_ACEOF
12801/* end confdefs.h. */ 8591/* end confdefs.h. */
12802 8592
12803#include <stdio.h> 8593#include <stdio.h>
12804#include <skey.h> 8594#include <skey.h>
12805int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); }
12806 8595
8596int
8597main ()
8598{
8599
8600 char *ff = skey_keyinfo(""); ff="";
8601 exit(0);
8602
8603 ;
8604 return 0;
8605}
12807_ACEOF 8606_ACEOF
12808rm -f conftest.$ac_objext conftest$ac_exeext 8607if ac_fn_c_try_link "$LINENO"; then :
12809if { (ac_try="$ac_link" 8608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12810case "(($ac_try" in 8609$as_echo "yes" >&6; }
12811 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12812 *) ac_try_echo=$ac_try;;
12813esac
12814eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12815 (eval "$ac_link") 2>conftest.er1
12816 ac_status=$?
12817 grep -v '^ *+' conftest.er1 >conftest.err
12818 rm -f conftest.er1
12819 cat conftest.err >&5
12820 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12821 (exit $ac_status); } && {
12822 test -z "$ac_c_werror_flag" ||
12823 test ! -s conftest.err
12824 } && test -s conftest$ac_exeext &&
12825 $as_test_x conftest$ac_exeext; then
12826 { echo "$as_me:$LINENO: result: yes" >&5
12827echo "${ECHO_T}yes" >&6; }
12828else 8610else
12829 echo "$as_me: failed program was:" >&5
12830sed 's/^/| /' conftest.$ac_ext >&5
12831 8611
12832 8612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12833 { echo "$as_me:$LINENO: result: no" >&5 8613$as_echo "no" >&6; }
12834echo "${ECHO_T}no" >&6; } 8614 as_fn_error $? "** Incomplete or missing s/key libraries." "$LINENO" 5
12835 { { echo "$as_me:$LINENO: error: ** Incomplete or missing s/key libraries." >&5
12836echo "$as_me: error: ** Incomplete or missing s/key libraries." >&2;}
12837 { (exit 1); exit 1; }; }
12838 8615
12839fi 8616fi
12840 8617rm -f core conftest.err conftest.$ac_objext \
12841rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8618 conftest$ac_exeext conftest.$ac_ext
12842 conftest$ac_exeext conftest.$ac_ext 8619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if skeychallenge takes 4 arguments" >&5
12843 { echo "$as_me:$LINENO: checking if skeychallenge takes 4 arguments" >&5 8620$as_echo_n "checking if skeychallenge takes 4 arguments... " >&6; }
12844echo $ECHO_N "checking if skeychallenge takes 4 arguments... $ECHO_C" >&6; } 8621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12845 cat >conftest.$ac_ext <<_ACEOF
12846/* confdefs.h. */
12847_ACEOF
12848cat confdefs.h >>conftest.$ac_ext
12849cat >>conftest.$ac_ext <<_ACEOF
12850/* end confdefs.h. */ 8622/* end confdefs.h. */
8623
12851#include <stdio.h> 8624#include <stdio.h>
12852 #include <skey.h> 8625#include <skey.h>
8626
12853int 8627int
12854main () 8628main ()
12855{ 8629{
12856(void)skeychallenge(NULL,"name","",0); 8630
8631 (void)skeychallenge(NULL,"name","",0);
8632
12857 ; 8633 ;
12858 return 0; 8634 return 0;
12859} 8635}
12860_ACEOF 8636_ACEOF
12861rm -f conftest.$ac_objext 8637if ac_fn_c_try_compile "$LINENO"; then :
12862if { (ac_try="$ac_compile"
12863case "(($ac_try" in
12864 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12865 *) ac_try_echo=$ac_try;;
12866esac
12867eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12868 (eval "$ac_compile") 2>conftest.er1
12869 ac_status=$?
12870 grep -v '^ *+' conftest.er1 >conftest.err
12871 rm -f conftest.er1
12872 cat conftest.err >&5
12873 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12874 (exit $ac_status); } && {
12875 test -z "$ac_c_werror_flag" ||
12876 test ! -s conftest.err
12877 } && test -s conftest.$ac_objext; then
12878 { echo "$as_me:$LINENO: result: yes" >&5
12879echo "${ECHO_T}yes" >&6; }
12880 8638
12881cat >>confdefs.h <<\_ACEOF 8639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12882#define SKEYCHALLENGE_4ARG 1 8640$as_echo "yes" >&6; }
12883_ACEOF 8641
8642$as_echo "#define SKEYCHALLENGE_4ARG 1" >>confdefs.h
12884 8643
12885else 8644else
12886 echo "$as_me: failed program was:" >&5
12887sed 's/^/| /' conftest.$ac_ext >&5
12888 8645
12889 { echo "$as_me:$LINENO: result: no" >&5 8646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12890echo "${ECHO_T}no" >&6; } 8647$as_echo "no" >&6; }
12891 8648
12892fi 8649fi
12893
12894rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12895 fi 8651 fi
12896 8652
@@ -12902,7 +8658,7 @@ fi
12902TCPW_MSG="no" 8658TCPW_MSG="no"
12903 8659
12904# Check whether --with-tcp-wrappers was given. 8660# Check whether --with-tcp-wrappers was given.
12905if test "${with_tcp_wrappers+set}" = set; then 8661if test "${with_tcp_wrappers+set}" = set; then :
12906 withval=$with_tcp_wrappers; 8662 withval=$with_tcp_wrappers;
12907 if test "x$withval" != "xno" ; then 8663 if test "x$withval" != "xno" ; then
12908 saved_LIBS="$LIBS" 8664 saved_LIBS="$LIBS"
@@ -12930,72 +8686,45 @@ if test "${with_tcp_wrappers+set}" = set; then
12930 fi 8686 fi
12931 fi 8687 fi
12932 LIBS="-lwrap $LIBS" 8688 LIBS="-lwrap $LIBS"
12933 { echo "$as_me:$LINENO: checking for libwrap" >&5 8689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libwrap" >&5
12934echo $ECHO_N "checking for libwrap... $ECHO_C" >&6; } 8690$as_echo_n "checking for libwrap... " >&6; }
12935 cat >conftest.$ac_ext <<_ACEOF 8691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12936/* confdefs.h. */
12937_ACEOF
12938cat confdefs.h >>conftest.$ac_ext
12939cat >>conftest.$ac_ext <<_ACEOF
12940/* end confdefs.h. */ 8692/* end confdefs.h. */
12941 8693
12942#include <sys/types.h> 8694#include <sys/types.h>
12943#include <sys/socket.h> 8695#include <sys/socket.h>
12944#include <netinet/in.h> 8696#include <netinet/in.h>
12945#include <tcpd.h> 8697#include <tcpd.h>
12946 int deny_severity = 0, allow_severity = 0; 8698int deny_severity = 0, allow_severity = 0;
12947 8699
12948int 8700int
12949main () 8701main ()
12950{ 8702{
12951hosts_access(0); 8703
8704 hosts_access(0);
8705
12952 ; 8706 ;
12953 return 0; 8707 return 0;
12954} 8708}
12955_ACEOF 8709_ACEOF
12956rm -f conftest.$ac_objext conftest$ac_exeext 8710if ac_fn_c_try_link "$LINENO"; then :
12957if { (ac_try="$ac_link"
12958case "(($ac_try" in
12959 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
12960 *) ac_try_echo=$ac_try;;
12961esac
12962eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
12963 (eval "$ac_link") 2>conftest.er1
12964 ac_status=$?
12965 grep -v '^ *+' conftest.er1 >conftest.err
12966 rm -f conftest.er1
12967 cat conftest.err >&5
12968 echo "$as_me:$LINENO: \$? = $ac_status" >&5
12969 (exit $ac_status); } && {
12970 test -z "$ac_c_werror_flag" ||
12971 test ! -s conftest.err
12972 } && test -s conftest$ac_exeext &&
12973 $as_test_x conftest$ac_exeext; then
12974 8711
12975 { echo "$as_me:$LINENO: result: yes" >&5 8712 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
12976echo "${ECHO_T}yes" >&6; } 8713$as_echo "yes" >&6; }
12977 8714
12978cat >>confdefs.h <<\_ACEOF 8715$as_echo "#define LIBWRAP 1" >>confdefs.h
12979#define LIBWRAP 1
12980_ACEOF
12981 8716
12982 SSHDLIBS="$SSHDLIBS -lwrap" 8717 SSHDLIBS="$SSHDLIBS -lwrap"
12983 TCPW_MSG="yes" 8718 TCPW_MSG="yes"
12984 8719
12985else 8720else
12986 echo "$as_me: failed program was:" >&5
12987sed 's/^/| /' conftest.$ac_ext >&5
12988 8721
12989 8722 as_fn_error $? "*** libwrap missing" "$LINENO" 5
12990 { { echo "$as_me:$LINENO: error: *** libwrap missing" >&5
12991echo "$as_me: error: *** libwrap missing" >&2;}
12992 { (exit 1); exit 1; }; }
12993 8723
12994 8724
12995fi 8725fi
12996 8726rm -f core conftest.err conftest.$ac_objext \
12997rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8727 conftest$ac_exeext conftest.$ac_ext
12998 conftest$ac_exeext conftest.$ac_ext
12999 LIBS="$saved_LIBS" 8728 LIBS="$saved_LIBS"
13000 fi 8729 fi
13001 8730
@@ -13007,15 +8736,15 @@ fi
13007LIBEDIT_MSG="no" 8736LIBEDIT_MSG="no"
13008 8737
13009# Check whether --with-libedit was given. 8738# Check whether --with-libedit was given.
13010if test "${with_libedit+set}" = set; then 8739if test "${with_libedit+set}" = set; then :
13011 withval=$with_libedit; if test "x$withval" != "xno" ; then 8740 withval=$with_libedit; if test "x$withval" != "xno" ; then
13012 if test "x$withval" = "xyes" ; then 8741 if test "x$withval" = "xyes" ; then
13013 # Extract the first word of "pkg-config", so it can be a program name with args. 8742 # Extract the first word of "pkg-config", so it can be a program name with args.
13014set dummy pkg-config; ac_word=$2 8743set dummy pkg-config; ac_word=$2
13015{ echo "$as_me:$LINENO: checking for $ac_word" >&5 8744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13016echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 8745$as_echo_n "checking for $ac_word... " >&6; }
13017if test "${ac_cv_path_PKGCONFIG+set}" = set; then 8746if ${ac_cv_path_PKGCONFIG+:} false; then :
13018 echo $ECHO_N "(cached) $ECHO_C" >&6 8747 $as_echo_n "(cached) " >&6
13019else 8748else
13020 case $PKGCONFIG in 8749 case $PKGCONFIG in
13021 [\\/]* | ?:[\\/]*) 8750 [\\/]* | ?:[\\/]*)
@@ -13027,14 +8756,14 @@ for as_dir in $PATH
13027do 8756do
13028 IFS=$as_save_IFS 8757 IFS=$as_save_IFS
13029 test -z "$as_dir" && as_dir=. 8758 test -z "$as_dir" && as_dir=.
13030 for ac_exec_ext in '' $ac_executable_extensions; do 8759 for ac_exec_ext in '' $ac_executable_extensions; do
13031 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 8760 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
13032 ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" 8761 ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext"
13033 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 8762 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13034 break 2 8763 break 2
13035 fi 8764 fi
13036done 8765done
13037done 8766 done
13038IFS=$as_save_IFS 8767IFS=$as_save_IFS
13039 8768
13040 test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no" 8769 test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no"
@@ -13043,24 +8772,24 @@ esac
13043fi 8772fi
13044PKGCONFIG=$ac_cv_path_PKGCONFIG 8773PKGCONFIG=$ac_cv_path_PKGCONFIG
13045if test -n "$PKGCONFIG"; then 8774if test -n "$PKGCONFIG"; then
13046 { echo "$as_me:$LINENO: result: $PKGCONFIG" >&5 8775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGCONFIG" >&5
13047echo "${ECHO_T}$PKGCONFIG" >&6; } 8776$as_echo "$PKGCONFIG" >&6; }
13048else 8777else
13049 { echo "$as_me:$LINENO: result: no" >&5 8778 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13050echo "${ECHO_T}no" >&6; } 8779$as_echo "no" >&6; }
13051fi 8780fi
13052 8781
13053 8782
13054 if test "x$PKGCONFIG" != "xno"; then 8783 if test "x$PKGCONFIG" != "xno"; then
13055 { echo "$as_me:$LINENO: checking if $PKGCONFIG knows about libedit" >&5 8784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $PKGCONFIG knows about libedit" >&5
13056echo $ECHO_N "checking if $PKGCONFIG knows about libedit... $ECHO_C" >&6; } 8785$as_echo_n "checking if $PKGCONFIG knows about libedit... " >&6; }
13057 if "$PKGCONFIG" libedit; then 8786 if "$PKGCONFIG" libedit; then
13058 { echo "$as_me:$LINENO: result: yes" >&5 8787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13059echo "${ECHO_T}yes" >&6; } 8788$as_echo "yes" >&6; }
13060 use_pkgconfig_for_libedit=yes 8789 use_pkgconfig_for_libedit=yes
13061 else 8790 else
13062 { echo "$as_me:$LINENO: result: no" >&5 8791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13063echo "${ECHO_T}no" >&6; } 8792$as_echo "no" >&6; }
13064 fi 8793 fi
13065 fi 8794 fi
13066 else 8795 else
@@ -13078,19 +8807,15 @@ echo "${ECHO_T}no" >&6; }
13078 LIBEDIT="-ledit -lcurses" 8807 LIBEDIT="-ledit -lcurses"
13079 fi 8808 fi
13080 OTHERLIBS=`echo $LIBEDIT | sed 's/-ledit//'` 8809 OTHERLIBS=`echo $LIBEDIT | sed 's/-ledit//'`
13081 { echo "$as_me:$LINENO: checking for el_init in -ledit" >&5 8810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for el_init in -ledit" >&5
13082echo $ECHO_N "checking for el_init in -ledit... $ECHO_C" >&6; } 8811$as_echo_n "checking for el_init in -ledit... " >&6; }
13083if test "${ac_cv_lib_edit_el_init+set}" = set; then 8812if ${ac_cv_lib_edit_el_init+:} false; then :
13084 echo $ECHO_N "(cached) $ECHO_C" >&6 8813 $as_echo_n "(cached) " >&6
13085else 8814else
13086 ac_check_lib_save_LIBS=$LIBS 8815 ac_check_lib_save_LIBS=$LIBS
13087LIBS="-ledit $OTHERLIBS 8816LIBS="-ledit $OTHERLIBS
13088 $LIBS" 8817 $LIBS"
13089cat >conftest.$ac_ext <<_ACEOF 8818cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13090/* confdefs.h. */
13091_ACEOF
13092cat confdefs.h >>conftest.$ac_ext
13093cat >>conftest.$ac_ext <<_ACEOF
13094/* end confdefs.h. */ 8819/* end confdefs.h. */
13095 8820
13096/* Override any GCC internal prototype to avoid an error. 8821/* Override any GCC internal prototype to avoid an error.
@@ -13108,102 +8833,54 @@ return el_init ();
13108 return 0; 8833 return 0;
13109} 8834}
13110_ACEOF 8835_ACEOF
13111rm -f conftest.$ac_objext conftest$ac_exeext 8836if ac_fn_c_try_link "$LINENO"; then :
13112if { (ac_try="$ac_link"
13113case "(($ac_try" in
13114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13115 *) ac_try_echo=$ac_try;;
13116esac
13117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13118 (eval "$ac_link") 2>conftest.er1
13119 ac_status=$?
13120 grep -v '^ *+' conftest.er1 >conftest.err
13121 rm -f conftest.er1
13122 cat conftest.err >&5
13123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13124 (exit $ac_status); } && {
13125 test -z "$ac_c_werror_flag" ||
13126 test ! -s conftest.err
13127 } && test -s conftest$ac_exeext &&
13128 $as_test_x conftest$ac_exeext; then
13129 ac_cv_lib_edit_el_init=yes 8837 ac_cv_lib_edit_el_init=yes
13130else 8838else
13131 echo "$as_me: failed program was:" >&5 8839 ac_cv_lib_edit_el_init=no
13132sed 's/^/| /' conftest.$ac_ext >&5
13133
13134 ac_cv_lib_edit_el_init=no
13135fi 8840fi
13136 8841rm -f core conftest.err conftest.$ac_objext \
13137rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8842 conftest$ac_exeext conftest.$ac_ext
13138 conftest$ac_exeext conftest.$ac_ext
13139LIBS=$ac_check_lib_save_LIBS 8843LIBS=$ac_check_lib_save_LIBS
13140fi 8844fi
13141{ echo "$as_me:$LINENO: result: $ac_cv_lib_edit_el_init" >&5 8845{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_edit_el_init" >&5
13142echo "${ECHO_T}$ac_cv_lib_edit_el_init" >&6; } 8846$as_echo "$ac_cv_lib_edit_el_init" >&6; }
13143if test $ac_cv_lib_edit_el_init = yes; then 8847if test "x$ac_cv_lib_edit_el_init" = xyes; then :
13144 8848
13145cat >>confdefs.h <<\_ACEOF 8849$as_echo "#define USE_LIBEDIT 1" >>confdefs.h
13146#define USE_LIBEDIT 1
13147_ACEOF
13148 8850
13149 LIBEDIT_MSG="yes" 8851 LIBEDIT_MSG="yes"
13150 8852
13151 8853
13152else 8854else
13153 { { echo "$as_me:$LINENO: error: libedit not found" >&5 8855 as_fn_error $? "libedit not found" "$LINENO" 5
13154echo "$as_me: error: libedit not found" >&2;}
13155 { (exit 1); exit 1; }; }
13156fi 8856fi
13157 8857
13158 { echo "$as_me:$LINENO: checking if libedit version is compatible" >&5 8858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libedit version is compatible" >&5
13159echo $ECHO_N "checking if libedit version is compatible... $ECHO_C" >&6; } 8859$as_echo_n "checking if libedit version is compatible... " >&6; }
13160 cat >conftest.$ac_ext <<_ACEOF 8860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13161/* confdefs.h. */
13162_ACEOF
13163cat confdefs.h >>conftest.$ac_ext
13164cat >>conftest.$ac_ext <<_ACEOF
13165/* end confdefs.h. */ 8861/* end confdefs.h. */
13166 8862 #include <histedit.h>
13167#include <histedit.h> 8863int
13168int main(void) 8864main ()
13169{ 8865{
8866
13170 int i = H_SETSIZE; 8867 int i = H_SETSIZE;
13171 el_init("", NULL, NULL, NULL); 8868 el_init("", NULL, NULL, NULL);
13172 exit(0); 8869 exit(0);
13173}
13174 8870
8871 ;
8872 return 0;
8873}
13175_ACEOF 8874_ACEOF
13176rm -f conftest.$ac_objext 8875if ac_fn_c_try_compile "$LINENO"; then :
13177if { (ac_try="$ac_compile" 8876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
13178case "(($ac_try" in 8877$as_echo "yes" >&6; }
13179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13180 *) ac_try_echo=$ac_try;;
13181esac
13182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13183 (eval "$ac_compile") 2>conftest.er1
13184 ac_status=$?
13185 grep -v '^ *+' conftest.er1 >conftest.err
13186 rm -f conftest.er1
13187 cat conftest.err >&5
13188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13189 (exit $ac_status); } && {
13190 test -z "$ac_c_werror_flag" ||
13191 test ! -s conftest.err
13192 } && test -s conftest.$ac_objext; then
13193 { echo "$as_me:$LINENO: result: yes" >&5
13194echo "${ECHO_T}yes" >&6; }
13195else 8878else
13196 echo "$as_me: failed program was:" >&5 8879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13197sed 's/^/| /' conftest.$ac_ext >&5 8880$as_echo "no" >&6; }
13198 8881 as_fn_error $? "libedit version is not compatible" "$LINENO" 5
13199 { echo "$as_me:$LINENO: result: no" >&5
13200echo "${ECHO_T}no" >&6; }
13201 { { echo "$as_me:$LINENO: error: libedit version is not compatible" >&5
13202echo "$as_me: error: libedit version is not compatible" >&2;}
13203 { (exit 1); exit 1; }; }
13204 8882
13205fi 8883fi
13206
13207rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8884rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13208 fi 8885 fi
13209 8886
@@ -13213,95 +8890,43 @@ fi
13213AUDIT_MODULE=none 8890AUDIT_MODULE=none
13214 8891
13215# Check whether --with-audit was given. 8892# Check whether --with-audit was given.
13216if test "${with_audit+set}" = set; then 8893if test "${with_audit+set}" = set; then :
13217 withval=$with_audit; 8894 withval=$with_audit;
13218 { echo "$as_me:$LINENO: checking for supported audit module" >&5 8895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for supported audit module" >&5
13219echo $ECHO_N "checking for supported audit module... $ECHO_C" >&6; } 8896$as_echo_n "checking for supported audit module... " >&6; }
13220 case "$withval" in 8897 case "$withval" in
13221 bsm) 8898 bsm)
13222 { echo "$as_me:$LINENO: result: bsm" >&5 8899 { $as_echo "$as_me:${as_lineno-$LINENO}: result: bsm" >&5
13223echo "${ECHO_T}bsm" >&6; } 8900$as_echo "bsm" >&6; }
13224 AUDIT_MODULE=bsm 8901 AUDIT_MODULE=bsm
13225 8902 for ac_header in bsm/audit.h
13226for ac_header in bsm/audit.h 8903do :
13227do 8904 ac_fn_c_check_header_compile "$LINENO" "bsm/audit.h" "ac_cv_header_bsm_audit_h" "
13228as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13229{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13230echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13231if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13232 echo $ECHO_N "(cached) $ECHO_C" >&6
13233else
13234 cat >conftest.$ac_ext <<_ACEOF
13235/* confdefs.h. */
13236_ACEOF
13237cat confdefs.h >>conftest.$ac_ext
13238cat >>conftest.$ac_ext <<_ACEOF
13239/* end confdefs.h. */
13240
13241#ifdef HAVE_TIME_H 8905#ifdef HAVE_TIME_H
13242# include <time.h> 8906# include <time.h>
13243#endif 8907#endif
13244 8908
13245 8909
13246 8910"
13247#include <$ac_header> 8911if test "x$ac_cv_header_bsm_audit_h" = xyes; then :
13248_ACEOF
13249rm -f conftest.$ac_objext
13250if { (ac_try="$ac_compile"
13251case "(($ac_try" in
13252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13253 *) ac_try_echo=$ac_try;;
13254esac
13255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13256 (eval "$ac_compile") 2>conftest.er1
13257 ac_status=$?
13258 grep -v '^ *+' conftest.er1 >conftest.err
13259 rm -f conftest.er1
13260 cat conftest.err >&5
13261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13262 (exit $ac_status); } && {
13263 test -z "$ac_c_werror_flag" ||
13264 test ! -s conftest.err
13265 } && test -s conftest.$ac_objext; then
13266 eval "$as_ac_Header=yes"
13267else
13268 echo "$as_me: failed program was:" >&5
13269sed 's/^/| /' conftest.$ac_ext >&5
13270
13271 eval "$as_ac_Header=no"
13272fi
13273
13274rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13275fi
13276ac_res=`eval echo '${'$as_ac_Header'}'`
13277 { echo "$as_me:$LINENO: result: $ac_res" >&5
13278echo "${ECHO_T}$ac_res" >&6; }
13279if test `eval echo '${'$as_ac_Header'}'` = yes; then
13280 cat >>confdefs.h <<_ACEOF 8912 cat >>confdefs.h <<_ACEOF
13281#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 8913#define HAVE_BSM_AUDIT_H 1
13282_ACEOF 8914_ACEOF
13283 8915
13284else 8916else
13285 { { echo "$as_me:$LINENO: error: BSM enabled and bsm/audit.h not found" >&5 8917 as_fn_error $? "BSM enabled and bsm/audit.h not found" "$LINENO" 5
13286echo "$as_me: error: BSM enabled and bsm/audit.h not found" >&2;}
13287 { (exit 1); exit 1; }; }
13288fi 8918fi
13289 8919
13290done 8920done
13291 8921
13292 8922 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaudit in -lbsm" >&5
13293{ echo "$as_me:$LINENO: checking for getaudit in -lbsm" >&5 8923$as_echo_n "checking for getaudit in -lbsm... " >&6; }
13294echo $ECHO_N "checking for getaudit in -lbsm... $ECHO_C" >&6; } 8924if ${ac_cv_lib_bsm_getaudit+:} false; then :
13295if test "${ac_cv_lib_bsm_getaudit+set}" = set; then 8925 $as_echo_n "(cached) " >&6
13296 echo $ECHO_N "(cached) $ECHO_C" >&6
13297else 8926else
13298 ac_check_lib_save_LIBS=$LIBS 8927 ac_check_lib_save_LIBS=$LIBS
13299LIBS="-lbsm $LIBS" 8928LIBS="-lbsm $LIBS"
13300cat >conftest.$ac_ext <<_ACEOF 8929cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13301/* confdefs.h. */
13302_ACEOF
13303cat confdefs.h >>conftest.$ac_ext
13304cat >>conftest.$ac_ext <<_ACEOF
13305/* end confdefs.h. */ 8930/* end confdefs.h. */
13306 8931
13307/* Override any GCC internal prototype to avoid an error. 8932/* Override any GCC internal prototype to avoid an error.
@@ -13319,39 +8944,18 @@ return getaudit ();
13319 return 0; 8944 return 0;
13320} 8945}
13321_ACEOF 8946_ACEOF
13322rm -f conftest.$ac_objext conftest$ac_exeext 8947if ac_fn_c_try_link "$LINENO"; then :
13323if { (ac_try="$ac_link"
13324case "(($ac_try" in
13325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13326 *) ac_try_echo=$ac_try;;
13327esac
13328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13329 (eval "$ac_link") 2>conftest.er1
13330 ac_status=$?
13331 grep -v '^ *+' conftest.er1 >conftest.err
13332 rm -f conftest.er1
13333 cat conftest.err >&5
13334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13335 (exit $ac_status); } && {
13336 test -z "$ac_c_werror_flag" ||
13337 test ! -s conftest.err
13338 } && test -s conftest$ac_exeext &&
13339 $as_test_x conftest$ac_exeext; then
13340 ac_cv_lib_bsm_getaudit=yes 8948 ac_cv_lib_bsm_getaudit=yes
13341else 8949else
13342 echo "$as_me: failed program was:" >&5 8950 ac_cv_lib_bsm_getaudit=no
13343sed 's/^/| /' conftest.$ac_ext >&5
13344
13345 ac_cv_lib_bsm_getaudit=no
13346fi 8951fi
13347 8952rm -f core conftest.err conftest.$ac_objext \
13348rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 8953 conftest$ac_exeext conftest.$ac_ext
13349 conftest$ac_exeext conftest.$ac_ext
13350LIBS=$ac_check_lib_save_LIBS 8954LIBS=$ac_check_lib_save_LIBS
13351fi 8955fi
13352{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsm_getaudit" >&5 8956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsm_getaudit" >&5
13353echo "${ECHO_T}$ac_cv_lib_bsm_getaudit" >&6; } 8957$as_echo "$ac_cv_lib_bsm_getaudit" >&6; }
13354if test $ac_cv_lib_bsm_getaudit = yes; then 8958if test "x$ac_cv_lib_bsm_getaudit" = xyes; then :
13355 cat >>confdefs.h <<_ACEOF 8959 cat >>confdefs.h <<_ACEOF
13356#define HAVE_LIBBSM 1 8960#define HAVE_LIBBSM 1
13357_ACEOF 8961_ACEOF
@@ -13359,354 +8963,49 @@ _ACEOF
13359 LIBS="-lbsm $LIBS" 8963 LIBS="-lbsm $LIBS"
13360 8964
13361else 8965else
13362 { { echo "$as_me:$LINENO: error: BSM enabled and required library not found" >&5 8966 as_fn_error $? "BSM enabled and required library not found" "$LINENO" 5
13363echo "$as_me: error: BSM enabled and required library not found" >&2;}
13364 { (exit 1); exit 1; }; }
13365fi 8967fi
13366 8968
13367 8969 for ac_func in getaudit
13368for ac_func in getaudit 8970do :
13369do 8971 ac_fn_c_check_func "$LINENO" "getaudit" "ac_cv_func_getaudit"
13370as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 8972if test "x$ac_cv_func_getaudit" = xyes; then :
13371{ echo "$as_me:$LINENO: checking for $ac_func" >&5
13372echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
13373if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13374 echo $ECHO_N "(cached) $ECHO_C" >&6
13375else
13376 cat >conftest.$ac_ext <<_ACEOF
13377/* confdefs.h. */
13378_ACEOF
13379cat confdefs.h >>conftest.$ac_ext
13380cat >>conftest.$ac_ext <<_ACEOF
13381/* end confdefs.h. */
13382/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13383 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13384#define $ac_func innocuous_$ac_func
13385
13386/* System header to define __stub macros and hopefully few prototypes,
13387 which can conflict with char $ac_func (); below.
13388 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13389 <limits.h> exists even on freestanding compilers. */
13390
13391#ifdef __STDC__
13392# include <limits.h>
13393#else
13394# include <assert.h>
13395#endif
13396
13397#undef $ac_func
13398
13399/* Override any GCC internal prototype to avoid an error.
13400 Use char because int might match the return type of a GCC
13401 builtin and then its argument prototype would still apply. */
13402#ifdef __cplusplus
13403extern "C"
13404#endif
13405char $ac_func ();
13406/* The GNU C library defines this for functions which it implements
13407 to always fail with ENOSYS. Some functions are actually named
13408 something starting with __ and the normal name is an alias. */
13409#if defined __stub_$ac_func || defined __stub___$ac_func
13410choke me
13411#endif
13412
13413int
13414main ()
13415{
13416return $ac_func ();
13417 ;
13418 return 0;
13419}
13420_ACEOF
13421rm -f conftest.$ac_objext conftest$ac_exeext
13422if { (ac_try="$ac_link"
13423case "(($ac_try" in
13424 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13425 *) ac_try_echo=$ac_try;;
13426esac
13427eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13428 (eval "$ac_link") 2>conftest.er1
13429 ac_status=$?
13430 grep -v '^ *+' conftest.er1 >conftest.err
13431 rm -f conftest.er1
13432 cat conftest.err >&5
13433 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13434 (exit $ac_status); } && {
13435 test -z "$ac_c_werror_flag" ||
13436 test ! -s conftest.err
13437 } && test -s conftest$ac_exeext &&
13438 $as_test_x conftest$ac_exeext; then
13439 eval "$as_ac_var=yes"
13440else
13441 echo "$as_me: failed program was:" >&5
13442sed 's/^/| /' conftest.$ac_ext >&5
13443
13444 eval "$as_ac_var=no"
13445fi
13446
13447rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13448 conftest$ac_exeext conftest.$ac_ext
13449fi
13450ac_res=`eval echo '${'$as_ac_var'}'`
13451 { echo "$as_me:$LINENO: result: $ac_res" >&5
13452echo "${ECHO_T}$ac_res" >&6; }
13453if test `eval echo '${'$as_ac_var'}'` = yes; then
13454 cat >>confdefs.h <<_ACEOF 8973 cat >>confdefs.h <<_ACEOF
13455#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 8974#define HAVE_GETAUDIT 1
13456_ACEOF 8975_ACEOF
13457 8976
13458else 8977else
13459 { { echo "$as_me:$LINENO: error: BSM enabled and required function not found" >&5 8978 as_fn_error $? "BSM enabled and required function not found" "$LINENO" 5
13460echo "$as_me: error: BSM enabled and required function not found" >&2;}
13461 { (exit 1); exit 1; }; }
13462fi 8979fi
13463done 8980done
13464 8981
13465 # These are optional 8982 # These are optional
13466 8983 for ac_func in getaudit_addr aug_get_machine
13467 8984do :
13468for ac_func in getaudit_addr aug_get_machine 8985 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13469do 8986ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13470as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 8987if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13471{ echo "$as_me:$LINENO: checking for $ac_func" >&5
13472echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
13473if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
13474 echo $ECHO_N "(cached) $ECHO_C" >&6
13475else
13476 cat >conftest.$ac_ext <<_ACEOF
13477/* confdefs.h. */
13478_ACEOF
13479cat confdefs.h >>conftest.$ac_ext
13480cat >>conftest.$ac_ext <<_ACEOF
13481/* end confdefs.h. */
13482/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13483 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13484#define $ac_func innocuous_$ac_func
13485
13486/* System header to define __stub macros and hopefully few prototypes,
13487 which can conflict with char $ac_func (); below.
13488 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13489 <limits.h> exists even on freestanding compilers. */
13490
13491#ifdef __STDC__
13492# include <limits.h>
13493#else
13494# include <assert.h>
13495#endif
13496
13497#undef $ac_func
13498
13499/* Override any GCC internal prototype to avoid an error.
13500 Use char because int might match the return type of a GCC
13501 builtin and then its argument prototype would still apply. */
13502#ifdef __cplusplus
13503extern "C"
13504#endif
13505char $ac_func ();
13506/* The GNU C library defines this for functions which it implements
13507 to always fail with ENOSYS. Some functions are actually named
13508 something starting with __ and the normal name is an alias. */
13509#if defined __stub_$ac_func || defined __stub___$ac_func
13510choke me
13511#endif
13512
13513int
13514main ()
13515{
13516return $ac_func ();
13517 ;
13518 return 0;
13519}
13520_ACEOF
13521rm -f conftest.$ac_objext conftest$ac_exeext
13522if { (ac_try="$ac_link"
13523case "(($ac_try" in
13524 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13525 *) ac_try_echo=$ac_try;;
13526esac
13527eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13528 (eval "$ac_link") 2>conftest.er1
13529 ac_status=$?
13530 grep -v '^ *+' conftest.er1 >conftest.err
13531 rm -f conftest.er1
13532 cat conftest.err >&5
13533 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13534 (exit $ac_status); } && {
13535 test -z "$ac_c_werror_flag" ||
13536 test ! -s conftest.err
13537 } && test -s conftest$ac_exeext &&
13538 $as_test_x conftest$ac_exeext; then
13539 eval "$as_ac_var=yes"
13540else
13541 echo "$as_me: failed program was:" >&5
13542sed 's/^/| /' conftest.$ac_ext >&5
13543
13544 eval "$as_ac_var=no"
13545fi
13546
13547rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
13548 conftest$ac_exeext conftest.$ac_ext
13549fi
13550ac_res=`eval echo '${'$as_ac_var'}'`
13551 { echo "$as_me:$LINENO: result: $ac_res" >&5
13552echo "${ECHO_T}$ac_res" >&6; }
13553if test `eval echo '${'$as_ac_var'}'` = yes; then
13554 cat >>confdefs.h <<_ACEOF 8988 cat >>confdefs.h <<_ACEOF
13555#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 8989#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13556_ACEOF 8990_ACEOF
13557 8991
13558fi 8992fi
13559done 8993done
13560 8994
13561 8995
13562cat >>confdefs.h <<\_ACEOF 8996$as_echo "#define USE_BSM_AUDIT 1" >>confdefs.h
13563#define USE_BSM_AUDIT 1
13564_ACEOF
13565 8997
13566 ;; 8998 ;;
13567 linux) 8999 linux)
13568 { echo "$as_me:$LINENO: result: linux" >&5 9000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: linux" >&5
13569echo "${ECHO_T}linux" >&6; } 9001$as_echo "linux" >&6; }
13570 AUDIT_MODULE=linux 9002 AUDIT_MODULE=linux
13571 9003 for ac_header in libaudit.h
13572for ac_header in libaudit.h 9004do :
13573do 9005 ac_fn_c_check_header_mongrel "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default"
13574as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 9006if test "x$ac_cv_header_libaudit_h" = xyes; then :
13575if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13576 { echo "$as_me:$LINENO: checking for $ac_header" >&5
13577echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13578if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13579 echo $ECHO_N "(cached) $ECHO_C" >&6
13580fi
13581ac_res=`eval echo '${'$as_ac_Header'}'`
13582 { echo "$as_me:$LINENO: result: $ac_res" >&5
13583echo "${ECHO_T}$ac_res" >&6; }
13584else
13585 # Is the header compilable?
13586{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
13587echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
13588cat >conftest.$ac_ext <<_ACEOF
13589/* confdefs.h. */
13590_ACEOF
13591cat confdefs.h >>conftest.$ac_ext
13592cat >>conftest.$ac_ext <<_ACEOF
13593/* end confdefs.h. */
13594$ac_includes_default
13595#include <$ac_header>
13596_ACEOF
13597rm -f conftest.$ac_objext
13598if { (ac_try="$ac_compile"
13599case "(($ac_try" in
13600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13601 *) ac_try_echo=$ac_try;;
13602esac
13603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13604 (eval "$ac_compile") 2>conftest.er1
13605 ac_status=$?
13606 grep -v '^ *+' conftest.er1 >conftest.err
13607 rm -f conftest.er1
13608 cat conftest.err >&5
13609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13610 (exit $ac_status); } && {
13611 test -z "$ac_c_werror_flag" ||
13612 test ! -s conftest.err
13613 } && test -s conftest.$ac_objext; then
13614 ac_header_compiler=yes
13615else
13616 echo "$as_me: failed program was:" >&5
13617sed 's/^/| /' conftest.$ac_ext >&5
13618
13619 ac_header_compiler=no
13620fi
13621
13622rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13623{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
13624echo "${ECHO_T}$ac_header_compiler" >&6; }
13625
13626# Is the header present?
13627{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
13628echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
13629cat >conftest.$ac_ext <<_ACEOF
13630/* confdefs.h. */
13631_ACEOF
13632cat confdefs.h >>conftest.$ac_ext
13633cat >>conftest.$ac_ext <<_ACEOF
13634/* end confdefs.h. */
13635#include <$ac_header>
13636_ACEOF
13637if { (ac_try="$ac_cpp conftest.$ac_ext"
13638case "(($ac_try" in
13639 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13640 *) ac_try_echo=$ac_try;;
13641esac
13642eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13643 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
13644 ac_status=$?
13645 grep -v '^ *+' conftest.er1 >conftest.err
13646 rm -f conftest.er1
13647 cat conftest.err >&5
13648 echo "$as_me:$LINENO: \$? = $ac_status" >&5
13649 (exit $ac_status); } >/dev/null && {
13650 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
13651 test ! -s conftest.err
13652 }; then
13653 ac_header_preproc=yes
13654else
13655 echo "$as_me: failed program was:" >&5
13656sed 's/^/| /' conftest.$ac_ext >&5
13657
13658 ac_header_preproc=no
13659fi
13660
13661rm -f conftest.err conftest.$ac_ext
13662{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
13663echo "${ECHO_T}$ac_header_preproc" >&6; }
13664
13665# So? What about this header?
13666case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
13667 yes:no: )
13668 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
13669echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
13670 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
13671echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
13672 ac_header_preproc=yes
13673 ;;
13674 no:yes:* )
13675 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
13676echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
13677 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
13678echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
13679 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
13680echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
13681 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
13682echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
13683 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
13684echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
13685 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
13686echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
13687 ( cat <<\_ASBOX
13688## ------------------------------------------- ##
13689## Report this to openssh-unix-dev@mindrot.org ##
13690## ------------------------------------------- ##
13691_ASBOX
13692 ) | sed "s/^/$as_me: WARNING: /" >&2
13693 ;;
13694esac
13695{ echo "$as_me:$LINENO: checking for $ac_header" >&5
13696echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
13697if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
13698 echo $ECHO_N "(cached) $ECHO_C" >&6
13699else
13700 eval "$as_ac_Header=\$ac_header_preproc"
13701fi
13702ac_res=`eval echo '${'$as_ac_Header'}'`
13703 { echo "$as_me:$LINENO: result: $ac_res" >&5
13704echo "${ECHO_T}$ac_res" >&6; }
13705
13706fi
13707if test `eval echo '${'$as_ac_Header'}'` = yes; then
13708 cat >>confdefs.h <<_ACEOF 9007 cat >>confdefs.h <<_ACEOF
13709#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 9008#define HAVE_LIBAUDIT_H 1
13710_ACEOF 9009_ACEOF
13711 9010
13712fi 9011fi
@@ -13715,131 +9014,30 @@ done
13715 9014
13716 SSHDLIBS="$SSHDLIBS -laudit" 9015 SSHDLIBS="$SSHDLIBS -laudit"
13717 9016
13718cat >>confdefs.h <<\_ACEOF 9017$as_echo "#define USE_LINUX_AUDIT 1" >>confdefs.h
13719#define USE_LINUX_AUDIT 1
13720_ACEOF
13721 9018
13722 ;; 9019 ;;
13723 debug) 9020 debug)
13724 AUDIT_MODULE=debug 9021 AUDIT_MODULE=debug
13725 { echo "$as_me:$LINENO: result: debug" >&5 9022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: debug" >&5
13726echo "${ECHO_T}debug" >&6; } 9023$as_echo "debug" >&6; }
13727 9024
13728cat >>confdefs.h <<\_ACEOF 9025$as_echo "#define SSH_AUDIT_EVENTS 1" >>confdefs.h
13729#define SSH_AUDIT_EVENTS 1
13730_ACEOF
13731 9026
13732 ;; 9027 ;;
13733 no) 9028 no)
13734 { echo "$as_me:$LINENO: result: no" >&5 9029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13735echo "${ECHO_T}no" >&6; } 9030$as_echo "no" >&6; }
13736 ;; 9031 ;;
13737 *) 9032 *)
13738 { { echo "$as_me:$LINENO: error: Unknown audit module $withval" >&5 9033 as_fn_error $? "Unknown audit module $withval" "$LINENO" 5
13739echo "$as_me: error: Unknown audit module $withval" >&2;}
13740 { (exit 1); exit 1; }; }
13741 ;; 9034 ;;
13742 esac 9035 esac
13743 9036
13744fi 9037fi
13745 9038
13746 9039
13747 9040for ac_func in \
13748
13749
13750
13751
13752
13753
13754
13755
13756
13757
13758
13759
13760
13761
13762
13763
13764
13765
13766
13767
13768
13769
13770
13771
13772
13773
13774
13775
13776
13777
13778
13779
13780
13781
13782
13783
13784
13785
13786
13787
13788
13789
13790
13791
13792
13793
13794
13795
13796
13797
13798
13799
13800
13801
13802
13803
13804
13805
13806
13807
13808
13809
13810
13811
13812
13813
13814
13815
13816
13817
13818
13819
13820
13821
13822
13823
13824
13825
13826
13827
13828
13829
13830
13831
13832
13833
13834
13835
13836
13837
13838
13839
13840
13841
13842for ac_func in \
13843 arc4random \ 9041 arc4random \
13844 arc4random_buf \ 9042 arc4random_buf \
13845 arc4random_uniform \ 9043 arc4random_uniform \
@@ -13936,154 +9134,46 @@ for ac_func in \
13936 vsnprintf \ 9134 vsnprintf \
13937 waitpid \ 9135 waitpid \
13938 9136
13939do 9137do :
13940as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 9138 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13941{ echo "$as_me:$LINENO: checking for $ac_func" >&5 9139ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
13942echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 9140if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13943if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 9141 cat >>confdefs.h <<_ACEOF
13944 echo $ECHO_N "(cached) $ECHO_C" >&6 9142#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13945else
13946 cat >conftest.$ac_ext <<_ACEOF
13947/* confdefs.h. */
13948_ACEOF 9143_ACEOF
13949cat confdefs.h >>conftest.$ac_ext
13950cat >>conftest.$ac_ext <<_ACEOF
13951/* end confdefs.h. */
13952/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
13953 For example, HP-UX 11i <limits.h> declares gettimeofday. */
13954#define $ac_func innocuous_$ac_func
13955
13956/* System header to define __stub macros and hopefully few prototypes,
13957 which can conflict with char $ac_func (); below.
13958 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
13959 <limits.h> exists even on freestanding compilers. */
13960 9144
13961#ifdef __STDC__ 9145fi
13962# include <limits.h> 9146done
13963#else
13964# include <assert.h>
13965#endif
13966
13967#undef $ac_func
13968 9147
13969/* Override any GCC internal prototype to avoid an error.
13970 Use char because int might match the return type of a GCC
13971 builtin and then its argument prototype would still apply. */
13972#ifdef __cplusplus
13973extern "C"
13974#endif
13975char $ac_func ();
13976/* The GNU C library defines this for functions which it implements
13977 to always fail with ENOSYS. Some functions are actually named
13978 something starting with __ and the normal name is an alias. */
13979#if defined __stub_$ac_func || defined __stub___$ac_func
13980choke me
13981#endif
13982 9148
9149cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9150/* end confdefs.h. */
9151 #include <ctype.h>
13983int 9152int
13984main () 9153main ()
13985{ 9154{
13986return $ac_func (); 9155 return (isblank('a'));
13987 ; 9156 ;
13988 return 0; 9157 return 0;
13989} 9158}
13990_ACEOF 9159_ACEOF
13991rm -f conftest.$ac_objext conftest$ac_exeext 9160if ac_fn_c_try_link "$LINENO"; then :
13992if { (ac_try="$ac_link"
13993case "(($ac_try" in
13994 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
13995 *) ac_try_echo=$ac_try;;
13996esac
13997eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
13998 (eval "$ac_link") 2>conftest.er1
13999 ac_status=$?
14000 grep -v '^ *+' conftest.er1 >conftest.err
14001 rm -f conftest.er1
14002 cat conftest.err >&5
14003 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14004 (exit $ac_status); } && {
14005 test -z "$ac_c_werror_flag" ||
14006 test ! -s conftest.err
14007 } && test -s conftest$ac_exeext &&
14008 $as_test_x conftest$ac_exeext; then
14009 eval "$as_ac_var=yes"
14010else
14011 echo "$as_me: failed program was:" >&5
14012sed 's/^/| /' conftest.$ac_ext >&5
14013
14014 eval "$as_ac_var=no"
14015fi
14016
14017rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14018 conftest$ac_exeext conftest.$ac_ext
14019fi
14020ac_res=`eval echo '${'$as_ac_var'}'`
14021 { echo "$as_me:$LINENO: result: $ac_res" >&5
14022echo "${ECHO_T}$ac_res" >&6; }
14023if test `eval echo '${'$as_ac_var'}'` = yes; then
14024 cat >>confdefs.h <<_ACEOF
14025#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14026_ACEOF
14027
14028fi
14029done
14030
14031
14032cat >conftest.$ac_ext <<_ACEOF
14033
14034#include <ctype.h>
14035int main(void)
14036{
14037 return (isblank('a'));
14038}
14039
14040_ACEOF
14041rm -f conftest.$ac_objext conftest$ac_exeext
14042if { (ac_try="$ac_link"
14043case "(($ac_try" in
14044 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14045 *) ac_try_echo=$ac_try;;
14046esac
14047eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14048 (eval "$ac_link") 2>conftest.er1
14049 ac_status=$?
14050 grep -v '^ *+' conftest.er1 >conftest.err
14051 rm -f conftest.er1
14052 cat conftest.err >&5
14053 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14054 (exit $ac_status); } && {
14055 test -z "$ac_c_werror_flag" ||
14056 test ! -s conftest.err
14057 } && test -s conftest$ac_exeext &&
14058 $as_test_x conftest$ac_exeext; then
14059
14060cat >>confdefs.h <<\_ACEOF
14061#define HAVE_ISBLANK 1
14062_ACEOF
14063
14064 9161
14065else 9162$as_echo "#define HAVE_ISBLANK 1" >>confdefs.h
14066 echo "$as_me: failed program was:" >&5
14067sed 's/^/| /' conftest.$ac_ext >&5
14068 9163
14069 9164
14070fi 9165fi
14071 9166rm -f core conftest.err conftest.$ac_objext \
14072rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9167 conftest$ac_exeext conftest.$ac_ext
14073 conftest$ac_exeext conftest.$ac_ext
14074 9168
14075# PKCS#11 support requires dlopen() and co 9169# PKCS#11 support requires dlopen() and co
14076{ echo "$as_me:$LINENO: checking for library containing dlopen" >&5 9170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
14077echo $ECHO_N "checking for library containing dlopen... $ECHO_C" >&6; } 9171$as_echo_n "checking for library containing dlopen... " >&6; }
14078if test "${ac_cv_search_dlopen+set}" = set; then 9172if ${ac_cv_search_dlopen+:} false; then :
14079 echo $ECHO_N "(cached) $ECHO_C" >&6 9173 $as_echo_n "(cached) " >&6
14080else 9174else
14081 ac_func_search_save_LIBS=$LIBS 9175 ac_func_search_save_LIBS=$LIBS
14082cat >conftest.$ac_ext <<_ACEOF 9176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14083/* confdefs.h. */
14084_ACEOF
14085cat confdefs.h >>conftest.$ac_ext
14086cat >>conftest.$ac_ext <<_ACEOF
14087/* end confdefs.h. */ 9177/* end confdefs.h. */
14088 9178
14089/* Override any GCC internal prototype to avoid an error. 9179/* Override any GCC internal prototype to avoid an error.
@@ -14108,161 +9198,47 @@ for ac_lib in '' dl; do
14108 ac_res=-l$ac_lib 9198 ac_res=-l$ac_lib
14109 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 9199 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14110 fi 9200 fi
14111 rm -f conftest.$ac_objext conftest$ac_exeext 9201 if ac_fn_c_try_link "$LINENO"; then :
14112if { (ac_try="$ac_link"
14113case "(($ac_try" in
14114 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14115 *) ac_try_echo=$ac_try;;
14116esac
14117eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14118 (eval "$ac_link") 2>conftest.er1
14119 ac_status=$?
14120 grep -v '^ *+' conftest.er1 >conftest.err
14121 rm -f conftest.er1
14122 cat conftest.err >&5
14123 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14124 (exit $ac_status); } && {
14125 test -z "$ac_c_werror_flag" ||
14126 test ! -s conftest.err
14127 } && test -s conftest$ac_exeext &&
14128 $as_test_x conftest$ac_exeext; then
14129 ac_cv_search_dlopen=$ac_res 9202 ac_cv_search_dlopen=$ac_res
14130else
14131 echo "$as_me: failed program was:" >&5
14132sed 's/^/| /' conftest.$ac_ext >&5
14133
14134
14135fi 9203fi
14136 9204rm -f core conftest.err conftest.$ac_objext \
14137rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9205 conftest$ac_exeext
14138 conftest$ac_exeext 9206 if ${ac_cv_search_dlopen+:} false; then :
14139 if test "${ac_cv_search_dlopen+set}" = set; then
14140 break 9207 break
14141fi 9208fi
14142done 9209done
14143if test "${ac_cv_search_dlopen+set}" = set; then 9210if ${ac_cv_search_dlopen+:} false; then :
14144 : 9211
14145else 9212else
14146 ac_cv_search_dlopen=no 9213 ac_cv_search_dlopen=no
14147fi 9214fi
14148rm conftest.$ac_ext 9215rm conftest.$ac_ext
14149LIBS=$ac_func_search_save_LIBS 9216LIBS=$ac_func_search_save_LIBS
14150fi 9217fi
14151{ echo "$as_me:$LINENO: result: $ac_cv_search_dlopen" >&5 9218{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
14152echo "${ECHO_T}$ac_cv_search_dlopen" >&6; } 9219$as_echo "$ac_cv_search_dlopen" >&6; }
14153ac_res=$ac_cv_search_dlopen 9220ac_res=$ac_cv_search_dlopen
14154if test "$ac_res" != no; then 9221if test "$ac_res" != no; then :
14155 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 9222 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14156 9223
14157cat >>confdefs.h <<\_ACEOF 9224$as_echo "#define ENABLE_PKCS11 /**/" >>confdefs.h
14158#define ENABLE_PKCS11
14159_ACEOF
14160 9225
14161 9226
14162fi 9227fi
14163 9228
14164 9229
14165# IRIX has a const char return value for gai_strerror() 9230# IRIX has a const char return value for gai_strerror()
14166
14167for ac_func in gai_strerror 9231for ac_func in gai_strerror
14168do 9232do :
14169as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 9233 ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror"
14170{ echo "$as_me:$LINENO: checking for $ac_func" >&5 9234if test "x$ac_cv_func_gai_strerror" = xyes; then :
14171echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14172if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
14173 echo $ECHO_N "(cached) $ECHO_C" >&6
14174else
14175 cat >conftest.$ac_ext <<_ACEOF
14176/* confdefs.h. */
14177_ACEOF
14178cat confdefs.h >>conftest.$ac_ext
14179cat >>conftest.$ac_ext <<_ACEOF
14180/* end confdefs.h. */
14181/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14182 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14183#define $ac_func innocuous_$ac_func
14184
14185/* System header to define __stub macros and hopefully few prototypes,
14186 which can conflict with char $ac_func (); below.
14187 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14188 <limits.h> exists even on freestanding compilers. */
14189
14190#ifdef __STDC__
14191# include <limits.h>
14192#else
14193# include <assert.h>
14194#endif
14195
14196#undef $ac_func
14197
14198/* Override any GCC internal prototype to avoid an error.
14199 Use char because int might match the return type of a GCC
14200 builtin and then its argument prototype would still apply. */
14201#ifdef __cplusplus
14202extern "C"
14203#endif
14204char $ac_func ();
14205/* The GNU C library defines this for functions which it implements
14206 to always fail with ENOSYS. Some functions are actually named
14207 something starting with __ and the normal name is an alias. */
14208#if defined __stub_$ac_func || defined __stub___$ac_func
14209choke me
14210#endif
14211
14212int
14213main ()
14214{
14215return $ac_func ();
14216 ;
14217 return 0;
14218}
14219_ACEOF
14220rm -f conftest.$ac_objext conftest$ac_exeext
14221if { (ac_try="$ac_link"
14222case "(($ac_try" in
14223 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14224 *) ac_try_echo=$ac_try;;
14225esac
14226eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14227 (eval "$ac_link") 2>conftest.er1
14228 ac_status=$?
14229 grep -v '^ *+' conftest.er1 >conftest.err
14230 rm -f conftest.er1
14231 cat conftest.err >&5
14232 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14233 (exit $ac_status); } && {
14234 test -z "$ac_c_werror_flag" ||
14235 test ! -s conftest.err
14236 } && test -s conftest$ac_exeext &&
14237 $as_test_x conftest$ac_exeext; then
14238 eval "$as_ac_var=yes"
14239else
14240 echo "$as_me: failed program was:" >&5
14241sed 's/^/| /' conftest.$ac_ext >&5
14242
14243 eval "$as_ac_var=no"
14244fi
14245
14246rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14247 conftest$ac_exeext conftest.$ac_ext
14248fi
14249ac_res=`eval echo '${'$as_ac_var'}'`
14250 { echo "$as_me:$LINENO: result: $ac_res" >&5
14251echo "${ECHO_T}$ac_res" >&6; }
14252if test `eval echo '${'$as_ac_var'}'` = yes; then
14253 cat >>confdefs.h <<_ACEOF 9235 cat >>confdefs.h <<_ACEOF
14254#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14255_ACEOF
14256
14257 cat >>confdefs.h <<\_ACEOF
14258#define HAVE_GAI_STRERROR 1 9236#define HAVE_GAI_STRERROR 1
14259_ACEOF 9237_ACEOF
14260 9238
14261 cat >conftest.$ac_ext <<_ACEOF 9239 $as_echo "#define HAVE_GAI_STRERROR 1" >>confdefs.h
14262/* confdefs.h. */ 9240
14263_ACEOF 9241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14264cat confdefs.h >>conftest.$ac_ext
14265cat >>conftest.$ac_ext <<_ACEOF
14266/* end confdefs.h. */ 9242/* end confdefs.h. */
14267 9243
14268#include <sys/types.h> 9244#include <sys/types.h>
@@ -14270,63 +9246,36 @@ cat >>conftest.$ac_ext <<_ACEOF
14270#include <netdb.h> 9246#include <netdb.h>
14271 9247
14272const char *gai_strerror(int); 9248const char *gai_strerror(int);
9249
14273int 9250int
14274main () 9251main ()
14275{ 9252{
14276 9253
14277char *str; 9254 char *str;
9255 str = gai_strerror(0);
14278 9256
14279str = gai_strerror(0);
14280 ; 9257 ;
14281 return 0; 9258 return 0;
14282} 9259}
14283_ACEOF 9260_ACEOF
14284rm -f conftest.$ac_objext 9261if ac_fn_c_try_compile "$LINENO"; then :
14285if { (ac_try="$ac_compile"
14286case "(($ac_try" in
14287 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14288 *) ac_try_echo=$ac_try;;
14289esac
14290eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14291 (eval "$ac_compile") 2>conftest.er1
14292 ac_status=$?
14293 grep -v '^ *+' conftest.er1 >conftest.err
14294 rm -f conftest.er1
14295 cat conftest.err >&5
14296 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14297 (exit $ac_status); } && {
14298 test -z "$ac_c_werror_flag" ||
14299 test ! -s conftest.err
14300 } && test -s conftest.$ac_objext; then
14301
14302
14303cat >>confdefs.h <<\_ACEOF
14304#define HAVE_CONST_GAI_STRERROR_PROTO 1
14305_ACEOF
14306 9262
14307else
14308 echo "$as_me: failed program was:" >&5
14309sed 's/^/| /' conftest.$ac_ext >&5
14310 9263
9264$as_echo "#define HAVE_CONST_GAI_STRERROR_PROTO 1" >>confdefs.h
14311 9265
14312fi 9266fi
14313
14314rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14315fi 9268fi
14316done 9269done
14317 9270
14318 9271
14319{ echo "$as_me:$LINENO: checking for library containing nanosleep" >&5 9272{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing nanosleep" >&5
14320echo $ECHO_N "checking for library containing nanosleep... $ECHO_C" >&6; } 9273$as_echo_n "checking for library containing nanosleep... " >&6; }
14321if test "${ac_cv_search_nanosleep+set}" = set; then 9274if ${ac_cv_search_nanosleep+:} false; then :
14322 echo $ECHO_N "(cached) $ECHO_C" >&6 9275 $as_echo_n "(cached) " >&6
14323else 9276else
14324 ac_func_search_save_LIBS=$LIBS 9277 ac_func_search_save_LIBS=$LIBS
14325cat >conftest.$ac_ext <<_ACEOF 9278cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14326/* confdefs.h. */
14327_ACEOF
14328cat confdefs.h >>conftest.$ac_ext
14329cat >>conftest.$ac_ext <<_ACEOF
14330/* end confdefs.h. */ 9279/* end confdefs.h. */
14331 9280
14332/* Override any GCC internal prototype to avoid an error. 9281/* Override any GCC internal prototype to avoid an error.
@@ -14351,201 +9300,42 @@ for ac_lib in '' rt posix4; do
14351 ac_res=-l$ac_lib 9300 ac_res=-l$ac_lib
14352 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 9301 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
14353 fi 9302 fi
14354 rm -f conftest.$ac_objext conftest$ac_exeext 9303 if ac_fn_c_try_link "$LINENO"; then :
14355if { (ac_try="$ac_link"
14356case "(($ac_try" in
14357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14358 *) ac_try_echo=$ac_try;;
14359esac
14360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14361 (eval "$ac_link") 2>conftest.er1
14362 ac_status=$?
14363 grep -v '^ *+' conftest.er1 >conftest.err
14364 rm -f conftest.er1
14365 cat conftest.err >&5
14366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14367 (exit $ac_status); } && {
14368 test -z "$ac_c_werror_flag" ||
14369 test ! -s conftest.err
14370 } && test -s conftest$ac_exeext &&
14371 $as_test_x conftest$ac_exeext; then
14372 ac_cv_search_nanosleep=$ac_res 9304 ac_cv_search_nanosleep=$ac_res
14373else
14374 echo "$as_me: failed program was:" >&5
14375sed 's/^/| /' conftest.$ac_ext >&5
14376
14377
14378fi 9305fi
14379 9306rm -f core conftest.err conftest.$ac_objext \
14380rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9307 conftest$ac_exeext
14381 conftest$ac_exeext 9308 if ${ac_cv_search_nanosleep+:} false; then :
14382 if test "${ac_cv_search_nanosleep+set}" = set; then
14383 break 9309 break
14384fi 9310fi
14385done 9311done
14386if test "${ac_cv_search_nanosleep+set}" = set; then 9312if ${ac_cv_search_nanosleep+:} false; then :
14387 : 9313
14388else 9314else
14389 ac_cv_search_nanosleep=no 9315 ac_cv_search_nanosleep=no
14390fi 9316fi
14391rm conftest.$ac_ext 9317rm conftest.$ac_ext
14392LIBS=$ac_func_search_save_LIBS 9318LIBS=$ac_func_search_save_LIBS
14393fi 9319fi
14394{ echo "$as_me:$LINENO: result: $ac_cv_search_nanosleep" >&5 9320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_nanosleep" >&5
14395echo "${ECHO_T}$ac_cv_search_nanosleep" >&6; } 9321$as_echo "$ac_cv_search_nanosleep" >&6; }
14396ac_res=$ac_cv_search_nanosleep 9322ac_res=$ac_cv_search_nanosleep
14397if test "$ac_res" != no; then 9323if test "$ac_res" != no; then :
14398 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 9324 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
14399 9325
14400cat >>confdefs.h <<\_ACEOF 9326$as_echo "#define HAVE_NANOSLEEP 1" >>confdefs.h
14401#define HAVE_NANOSLEEP 1
14402_ACEOF
14403 9327
14404fi 9328fi
14405 9329
14406 9330
14407{ echo "$as_me:$LINENO: checking whether getrusage is declared" >&5 9331ac_fn_c_check_decl "$LINENO" "getrusage" "ac_cv_have_decl_getrusage" "$ac_includes_default"
14408echo $ECHO_N "checking whether getrusage is declared... $ECHO_C" >&6; } 9332if test "x$ac_cv_have_decl_getrusage" = xyes; then :
14409if test "${ac_cv_have_decl_getrusage+set}" = set; then 9333 for ac_func in getrusage
14410 echo $ECHO_N "(cached) $ECHO_C" >&6 9334do :
14411else 9335 ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage"
14412 cat >conftest.$ac_ext <<_ACEOF 9336if test "x$ac_cv_func_getrusage" = xyes; then :
14413/* confdefs.h. */
14414_ACEOF
14415cat confdefs.h >>conftest.$ac_ext
14416cat >>conftest.$ac_ext <<_ACEOF
14417/* end confdefs.h. */
14418$ac_includes_default
14419int
14420main ()
14421{
14422#ifndef getrusage
14423 (void) getrusage;
14424#endif
14425
14426 ;
14427 return 0;
14428}
14429_ACEOF
14430rm -f conftest.$ac_objext
14431if { (ac_try="$ac_compile"
14432case "(($ac_try" in
14433 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14434 *) ac_try_echo=$ac_try;;
14435esac
14436eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14437 (eval "$ac_compile") 2>conftest.er1
14438 ac_status=$?
14439 grep -v '^ *+' conftest.er1 >conftest.err
14440 rm -f conftest.er1
14441 cat conftest.err >&5
14442 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14443 (exit $ac_status); } && {
14444 test -z "$ac_c_werror_flag" ||
14445 test ! -s conftest.err
14446 } && test -s conftest.$ac_objext; then
14447 ac_cv_have_decl_getrusage=yes
14448else
14449 echo "$as_me: failed program was:" >&5
14450sed 's/^/| /' conftest.$ac_ext >&5
14451
14452 ac_cv_have_decl_getrusage=no
14453fi
14454
14455rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14456fi
14457{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_getrusage" >&5
14458echo "${ECHO_T}$ac_cv_have_decl_getrusage" >&6; }
14459if test $ac_cv_have_decl_getrusage = yes; then
14460
14461for ac_func in getrusage
14462do
14463as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14464{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14465echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14466if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
14467 echo $ECHO_N "(cached) $ECHO_C" >&6
14468else
14469 cat >conftest.$ac_ext <<_ACEOF
14470/* confdefs.h. */
14471_ACEOF
14472cat confdefs.h >>conftest.$ac_ext
14473cat >>conftest.$ac_ext <<_ACEOF
14474/* end confdefs.h. */
14475/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14476 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14477#define $ac_func innocuous_$ac_func
14478
14479/* System header to define __stub macros and hopefully few prototypes,
14480 which can conflict with char $ac_func (); below.
14481 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14482 <limits.h> exists even on freestanding compilers. */
14483
14484#ifdef __STDC__
14485# include <limits.h>
14486#else
14487# include <assert.h>
14488#endif
14489
14490#undef $ac_func
14491
14492/* Override any GCC internal prototype to avoid an error.
14493 Use char because int might match the return type of a GCC
14494 builtin and then its argument prototype would still apply. */
14495#ifdef __cplusplus
14496extern "C"
14497#endif
14498char $ac_func ();
14499/* The GNU C library defines this for functions which it implements
14500 to always fail with ENOSYS. Some functions are actually named
14501 something starting with __ and the normal name is an alias. */
14502#if defined __stub_$ac_func || defined __stub___$ac_func
14503choke me
14504#endif
14505
14506int
14507main ()
14508{
14509return $ac_func ();
14510 ;
14511 return 0;
14512}
14513_ACEOF
14514rm -f conftest.$ac_objext conftest$ac_exeext
14515if { (ac_try="$ac_link"
14516case "(($ac_try" in
14517 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14518 *) ac_try_echo=$ac_try;;
14519esac
14520eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14521 (eval "$ac_link") 2>conftest.er1
14522 ac_status=$?
14523 grep -v '^ *+' conftest.er1 >conftest.err
14524 rm -f conftest.er1
14525 cat conftest.err >&5
14526 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14527 (exit $ac_status); } && {
14528 test -z "$ac_c_werror_flag" ||
14529 test ! -s conftest.err
14530 } && test -s conftest$ac_exeext &&
14531 $as_test_x conftest$ac_exeext; then
14532 eval "$as_ac_var=yes"
14533else
14534 echo "$as_me: failed program was:" >&5
14535sed 's/^/| /' conftest.$ac_ext >&5
14536
14537 eval "$as_ac_var=no"
14538fi
14539
14540rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14541 conftest$ac_exeext conftest.$ac_ext
14542fi
14543ac_res=`eval echo '${'$as_ac_var'}'`
14544 { echo "$as_me:$LINENO: result: $ac_res" >&5
14545echo "${ECHO_T}$ac_res" >&6; }
14546if test `eval echo '${'$as_ac_var'}'` = yes; then
14547 cat >>confdefs.h <<_ACEOF 9337 cat >>confdefs.h <<_ACEOF
14548#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 9338#define HAVE_GETRUSAGE 1
14549_ACEOF 9339_ACEOF
14550 9340
14551fi 9341fi
@@ -14553,153 +9343,19 @@ done
14553 9343
14554fi 9344fi
14555 9345
14556{ echo "$as_me:$LINENO: checking whether strsep is declared" >&5 9346ac_fn_c_check_decl "$LINENO" "strsep" "ac_cv_have_decl_strsep" "
14557echo $ECHO_N "checking whether strsep is declared... $ECHO_C" >&6; }
14558if test "${ac_cv_have_decl_strsep+set}" = set; then
14559 echo $ECHO_N "(cached) $ECHO_C" >&6
14560else
14561 cat >conftest.$ac_ext <<_ACEOF
14562/* confdefs.h. */
14563_ACEOF
14564cat confdefs.h >>conftest.$ac_ext
14565cat >>conftest.$ac_ext <<_ACEOF
14566/* end confdefs.h. */
14567
14568#ifdef HAVE_STRING_H 9347#ifdef HAVE_STRING_H
14569# include <string.h> 9348# include <string.h>
14570#endif 9349#endif
14571 9350
14572 9351"
14573int 9352if test "x$ac_cv_have_decl_strsep" = xyes; then :
14574main () 9353 for ac_func in strsep
14575{ 9354do :
14576#ifndef strsep 9355 ac_fn_c_check_func "$LINENO" "strsep" "ac_cv_func_strsep"
14577 (void) strsep; 9356if test "x$ac_cv_func_strsep" = xyes; then :
14578#endif
14579
14580 ;
14581 return 0;
14582}
14583_ACEOF
14584rm -f conftest.$ac_objext
14585if { (ac_try="$ac_compile"
14586case "(($ac_try" in
14587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14588 *) ac_try_echo=$ac_try;;
14589esac
14590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14591 (eval "$ac_compile") 2>conftest.er1
14592 ac_status=$?
14593 grep -v '^ *+' conftest.er1 >conftest.err
14594 rm -f conftest.er1
14595 cat conftest.err >&5
14596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14597 (exit $ac_status); } && {
14598 test -z "$ac_c_werror_flag" ||
14599 test ! -s conftest.err
14600 } && test -s conftest.$ac_objext; then
14601 ac_cv_have_decl_strsep=yes
14602else
14603 echo "$as_me: failed program was:" >&5
14604sed 's/^/| /' conftest.$ac_ext >&5
14605
14606 ac_cv_have_decl_strsep=no
14607fi
14608
14609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14610fi
14611{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_strsep" >&5
14612echo "${ECHO_T}$ac_cv_have_decl_strsep" >&6; }
14613if test $ac_cv_have_decl_strsep = yes; then
14614
14615for ac_func in strsep
14616do
14617as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14618{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14619echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14620if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
14621 echo $ECHO_N "(cached) $ECHO_C" >&6
14622else
14623 cat >conftest.$ac_ext <<_ACEOF
14624/* confdefs.h. */
14625_ACEOF
14626cat confdefs.h >>conftest.$ac_ext
14627cat >>conftest.$ac_ext <<_ACEOF
14628/* end confdefs.h. */
14629/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14630 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14631#define $ac_func innocuous_$ac_func
14632
14633/* System header to define __stub macros and hopefully few prototypes,
14634 which can conflict with char $ac_func (); below.
14635 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14636 <limits.h> exists even on freestanding compilers. */
14637
14638#ifdef __STDC__
14639# include <limits.h>
14640#else
14641# include <assert.h>
14642#endif
14643
14644#undef $ac_func
14645
14646/* Override any GCC internal prototype to avoid an error.
14647 Use char because int might match the return type of a GCC
14648 builtin and then its argument prototype would still apply. */
14649#ifdef __cplusplus
14650extern "C"
14651#endif
14652char $ac_func ();
14653/* The GNU C library defines this for functions which it implements
14654 to always fail with ENOSYS. Some functions are actually named
14655 something starting with __ and the normal name is an alias. */
14656#if defined __stub_$ac_func || defined __stub___$ac_func
14657choke me
14658#endif
14659
14660int
14661main ()
14662{
14663return $ac_func ();
14664 ;
14665 return 0;
14666}
14667_ACEOF
14668rm -f conftest.$ac_objext conftest$ac_exeext
14669if { (ac_try="$ac_link"
14670case "(($ac_try" in
14671 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14672 *) ac_try_echo=$ac_try;;
14673esac
14674eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14675 (eval "$ac_link") 2>conftest.er1
14676 ac_status=$?
14677 grep -v '^ *+' conftest.er1 >conftest.err
14678 rm -f conftest.er1
14679 cat conftest.err >&5
14680 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14681 (exit $ac_status); } && {
14682 test -z "$ac_c_werror_flag" ||
14683 test ! -s conftest.err
14684 } && test -s conftest$ac_exeext &&
14685 $as_test_x conftest$ac_exeext; then
14686 eval "$as_ac_var=yes"
14687else
14688 echo "$as_me: failed program was:" >&5
14689sed 's/^/| /' conftest.$ac_ext >&5
14690
14691 eval "$as_ac_var=no"
14692fi
14693
14694rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14695 conftest$ac_exeext conftest.$ac_ext
14696fi
14697ac_res=`eval echo '${'$as_ac_var'}'`
14698 { echo "$as_me:$LINENO: result: $ac_res" >&5
14699echo "${ECHO_T}$ac_res" >&6; }
14700if test `eval echo '${'$as_ac_var'}'` = yes; then
14701 cat >>confdefs.h <<_ACEOF 9357 cat >>confdefs.h <<_ACEOF
14702#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 9358#define HAVE_STRSEP 1
14703_ACEOF 9359_ACEOF
14704 9360
14705fi 9361fi
@@ -14708,155 +9364,19 @@ done
14708fi 9364fi
14709 9365
14710 9366
14711{ echo "$as_me:$LINENO: checking whether tcsendbreak is declared" >&5 9367ac_fn_c_check_decl "$LINENO" "tcsendbreak" "ac_cv_have_decl_tcsendbreak" "#include <termios.h>
14712echo $ECHO_N "checking whether tcsendbreak is declared... $ECHO_C" >&6; }
14713if test "${ac_cv_have_decl_tcsendbreak+set}" = set; then
14714 echo $ECHO_N "(cached) $ECHO_C" >&6
14715else
14716 cat >conftest.$ac_ext <<_ACEOF
14717/* confdefs.h. */
14718_ACEOF
14719cat confdefs.h >>conftest.$ac_ext
14720cat >>conftest.$ac_ext <<_ACEOF
14721/* end confdefs.h. */
14722#include <termios.h>
14723
14724
14725int
14726main ()
14727{
14728#ifndef tcsendbreak
14729 (void) tcsendbreak;
14730#endif
14731
14732 ;
14733 return 0;
14734}
14735_ACEOF
14736rm -f conftest.$ac_objext
14737if { (ac_try="$ac_compile"
14738case "(($ac_try" in
14739 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14740 *) ac_try_echo=$ac_try;;
14741esac
14742eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14743 (eval "$ac_compile") 2>conftest.er1
14744 ac_status=$?
14745 grep -v '^ *+' conftest.er1 >conftest.err
14746 rm -f conftest.er1
14747 cat conftest.err >&5
14748 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14749 (exit $ac_status); } && {
14750 test -z "$ac_c_werror_flag" ||
14751 test ! -s conftest.err
14752 } && test -s conftest.$ac_objext; then
14753 ac_cv_have_decl_tcsendbreak=yes
14754else
14755 echo "$as_me: failed program was:" >&5
14756sed 's/^/| /' conftest.$ac_ext >&5
14757
14758 ac_cv_have_decl_tcsendbreak=no
14759fi
14760
14761rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14762fi
14763{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_tcsendbreak" >&5
14764echo "${ECHO_T}$ac_cv_have_decl_tcsendbreak" >&6; }
14765if test $ac_cv_have_decl_tcsendbreak = yes; then
14766 cat >>confdefs.h <<\_ACEOF
14767#define HAVE_TCSENDBREAK 1
14768_ACEOF
14769
14770else
14771
14772for ac_func in tcsendbreak
14773do
14774as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14775{ echo "$as_me:$LINENO: checking for $ac_func" >&5
14776echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
14777if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
14778 echo $ECHO_N "(cached) $ECHO_C" >&6
14779else
14780 cat >conftest.$ac_ext <<_ACEOF
14781/* confdefs.h. */
14782_ACEOF
14783cat confdefs.h >>conftest.$ac_ext
14784cat >>conftest.$ac_ext <<_ACEOF
14785/* end confdefs.h. */
14786/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
14787 For example, HP-UX 11i <limits.h> declares gettimeofday. */
14788#define $ac_func innocuous_$ac_func
14789
14790/* System header to define __stub macros and hopefully few prototypes,
14791 which can conflict with char $ac_func (); below.
14792 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
14793 <limits.h> exists even on freestanding compilers. */
14794
14795#ifdef __STDC__
14796# include <limits.h>
14797#else
14798# include <assert.h>
14799#endif
14800
14801#undef $ac_func
14802 9368
14803/* Override any GCC internal prototype to avoid an error. 9369"
14804 Use char because int might match the return type of a GCC 9370if test "x$ac_cv_have_decl_tcsendbreak" = xyes; then :
14805 builtin and then its argument prototype would still apply. */ 9371 $as_echo "#define HAVE_TCSENDBREAK 1" >>confdefs.h
14806#ifdef __cplusplus
14807extern "C"
14808#endif
14809char $ac_func ();
14810/* The GNU C library defines this for functions which it implements
14811 to always fail with ENOSYS. Some functions are actually named
14812 something starting with __ and the normal name is an alias. */
14813#if defined __stub_$ac_func || defined __stub___$ac_func
14814choke me
14815#endif
14816 9372
14817int
14818main ()
14819{
14820return $ac_func ();
14821 ;
14822 return 0;
14823}
14824_ACEOF
14825rm -f conftest.$ac_objext conftest$ac_exeext
14826if { (ac_try="$ac_link"
14827case "(($ac_try" in
14828 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14829 *) ac_try_echo=$ac_try;;
14830esac
14831eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14832 (eval "$ac_link") 2>conftest.er1
14833 ac_status=$?
14834 grep -v '^ *+' conftest.er1 >conftest.err
14835 rm -f conftest.er1
14836 cat conftest.err >&5
14837 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14838 (exit $ac_status); } && {
14839 test -z "$ac_c_werror_flag" ||
14840 test ! -s conftest.err
14841 } && test -s conftest$ac_exeext &&
14842 $as_test_x conftest$ac_exeext; then
14843 eval "$as_ac_var=yes"
14844else 9373else
14845 echo "$as_me: failed program was:" >&5 9374 for ac_func in tcsendbreak
14846sed 's/^/| /' conftest.$ac_ext >&5 9375do :
14847 9376 ac_fn_c_check_func "$LINENO" "tcsendbreak" "ac_cv_func_tcsendbreak"
14848 eval "$as_ac_var=no" 9377if test "x$ac_cv_func_tcsendbreak" = xyes; then :
14849fi
14850
14851rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
14852 conftest$ac_exeext conftest.$ac_ext
14853fi
14854ac_res=`eval echo '${'$as_ac_var'}'`
14855 { echo "$as_me:$LINENO: result: $ac_res" >&5
14856echo "${ECHO_T}$ac_res" >&6; }
14857if test `eval echo '${'$as_ac_var'}'` = yes; then
14858 cat >>confdefs.h <<_ACEOF 9378 cat >>confdefs.h <<_ACEOF
14859#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 9379#define HAVE_TCSENDBREAK 1
14860_ACEOF 9380_ACEOF
14861 9381
14862fi 9382fi
@@ -14865,161 +9385,36 @@ done
14865fi 9385fi
14866 9386
14867 9387
14868{ echo "$as_me:$LINENO: checking whether h_errno is declared" >&5 9388ac_fn_c_check_decl "$LINENO" "h_errno" "ac_cv_have_decl_h_errno" "#include <netdb.h>
14869echo $ECHO_N "checking whether h_errno is declared... $ECHO_C" >&6; } 9389"
14870if test "${ac_cv_have_decl_h_errno+set}" = set; then 9390if test "x$ac_cv_have_decl_h_errno" = xyes; then :
14871 echo $ECHO_N "(cached) $ECHO_C" >&6 9391 ac_have_decl=1
14872else
14873 cat >conftest.$ac_ext <<_ACEOF
14874/* confdefs.h. */
14875_ACEOF
14876cat confdefs.h >>conftest.$ac_ext
14877cat >>conftest.$ac_ext <<_ACEOF
14878/* end confdefs.h. */
14879#include <netdb.h>
14880
14881int
14882main ()
14883{
14884#ifndef h_errno
14885 (void) h_errno;
14886#endif
14887
14888 ;
14889 return 0;
14890}
14891_ACEOF
14892rm -f conftest.$ac_objext
14893if { (ac_try="$ac_compile"
14894case "(($ac_try" in
14895 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14896 *) ac_try_echo=$ac_try;;
14897esac
14898eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14899 (eval "$ac_compile") 2>conftest.er1
14900 ac_status=$?
14901 grep -v '^ *+' conftest.er1 >conftest.err
14902 rm -f conftest.er1
14903 cat conftest.err >&5
14904 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14905 (exit $ac_status); } && {
14906 test -z "$ac_c_werror_flag" ||
14907 test ! -s conftest.err
14908 } && test -s conftest.$ac_objext; then
14909 ac_cv_have_decl_h_errno=yes
14910else 9392else
14911 echo "$as_me: failed program was:" >&5 9393 ac_have_decl=0
14912sed 's/^/| /' conftest.$ac_ext >&5
14913
14914 ac_cv_have_decl_h_errno=no
14915fi
14916
14917rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14918fi 9394fi
14919{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_h_errno" >&5
14920echo "${ECHO_T}$ac_cv_have_decl_h_errno" >&6; }
14921if test $ac_cv_have_decl_h_errno = yes; then
14922 9395
14923cat >>confdefs.h <<_ACEOF 9396cat >>confdefs.h <<_ACEOF
14924#define HAVE_DECL_H_ERRNO 1 9397#define HAVE_DECL_H_ERRNO $ac_have_decl
14925_ACEOF
14926
14927
14928else
14929 cat >>confdefs.h <<_ACEOF
14930#define HAVE_DECL_H_ERRNO 0
14931_ACEOF 9398_ACEOF
14932 9399
14933 9400
14934fi 9401ac_fn_c_check_decl "$LINENO" "SHUT_RD" "ac_cv_have_decl_SHUT_RD" "
14935
14936
14937
14938{ echo "$as_me:$LINENO: checking whether SHUT_RD is declared" >&5
14939echo $ECHO_N "checking whether SHUT_RD is declared... $ECHO_C" >&6; }
14940if test "${ac_cv_have_decl_SHUT_RD+set}" = set; then
14941 echo $ECHO_N "(cached) $ECHO_C" >&6
14942else
14943 cat >conftest.$ac_ext <<_ACEOF
14944/* confdefs.h. */
14945_ACEOF
14946cat confdefs.h >>conftest.$ac_ext
14947cat >>conftest.$ac_ext <<_ACEOF
14948/* end confdefs.h. */
14949
14950#include <sys/types.h> 9402#include <sys/types.h>
14951#include <sys/socket.h> 9403#include <sys/socket.h>
14952 9404
14953 9405"
14954int 9406if test "x$ac_cv_have_decl_SHUT_RD" = xyes; then :
14955main () 9407 ac_have_decl=1
14956{
14957#ifndef SHUT_RD
14958 (void) SHUT_RD;
14959#endif
14960
14961 ;
14962 return 0;
14963}
14964_ACEOF
14965rm -f conftest.$ac_objext
14966if { (ac_try="$ac_compile"
14967case "(($ac_try" in
14968 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
14969 *) ac_try_echo=$ac_try;;
14970esac
14971eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
14972 (eval "$ac_compile") 2>conftest.er1
14973 ac_status=$?
14974 grep -v '^ *+' conftest.er1 >conftest.err
14975 rm -f conftest.er1
14976 cat conftest.err >&5
14977 echo "$as_me:$LINENO: \$? = $ac_status" >&5
14978 (exit $ac_status); } && {
14979 test -z "$ac_c_werror_flag" ||
14980 test ! -s conftest.err
14981 } && test -s conftest.$ac_objext; then
14982 ac_cv_have_decl_SHUT_RD=yes
14983else 9408else
14984 echo "$as_me: failed program was:" >&5 9409 ac_have_decl=0
14985sed 's/^/| /' conftest.$ac_ext >&5
14986
14987 ac_cv_have_decl_SHUT_RD=no
14988fi
14989
14990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14991fi 9410fi
14992{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_SHUT_RD" >&5
14993echo "${ECHO_T}$ac_cv_have_decl_SHUT_RD" >&6; }
14994if test $ac_cv_have_decl_SHUT_RD = yes; then
14995 9411
14996cat >>confdefs.h <<_ACEOF 9412cat >>confdefs.h <<_ACEOF
14997#define HAVE_DECL_SHUT_RD 1 9413#define HAVE_DECL_SHUT_RD $ac_have_decl
14998_ACEOF
14999
15000
15001else
15002 cat >>confdefs.h <<_ACEOF
15003#define HAVE_DECL_SHUT_RD 0
15004_ACEOF 9414_ACEOF
15005 9415
15006 9416
15007fi 9417ac_fn_c_check_decl "$LINENO" "O_NONBLOCK" "ac_cv_have_decl_O_NONBLOCK" "
15008
15009
15010
15011{ echo "$as_me:$LINENO: checking whether O_NONBLOCK is declared" >&5
15012echo $ECHO_N "checking whether O_NONBLOCK is declared... $ECHO_C" >&6; }
15013if test "${ac_cv_have_decl_O_NONBLOCK+set}" = set; then
15014 echo $ECHO_N "(cached) $ECHO_C" >&6
15015else
15016 cat >conftest.$ac_ext <<_ACEOF
15017/* confdefs.h. */
15018_ACEOF
15019cat confdefs.h >>conftest.$ac_ext
15020cat >>conftest.$ac_ext <<_ACEOF
15021/* end confdefs.h. */
15022
15023#include <sys/types.h> 9418#include <sys/types.h>
15024#ifdef HAVE_SYS_STAT_H 9419#ifdef HAVE_SYS_STAT_H
15025# include <sys/stat.h> 9420# include <sys/stat.h>
@@ -15028,1270 +9423,260 @@ cat >>conftest.$ac_ext <<_ACEOF
15028# include <fcntl.h> 9423# include <fcntl.h>
15029#endif 9424#endif
15030 9425
15031 9426"
15032int 9427if test "x$ac_cv_have_decl_O_NONBLOCK" = xyes; then :
15033main () 9428 ac_have_decl=1
15034{
15035#ifndef O_NONBLOCK
15036 (void) O_NONBLOCK;
15037#endif
15038
15039 ;
15040 return 0;
15041}
15042_ACEOF
15043rm -f conftest.$ac_objext
15044if { (ac_try="$ac_compile"
15045case "(($ac_try" in
15046 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15047 *) ac_try_echo=$ac_try;;
15048esac
15049eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15050 (eval "$ac_compile") 2>conftest.er1
15051 ac_status=$?
15052 grep -v '^ *+' conftest.er1 >conftest.err
15053 rm -f conftest.er1
15054 cat conftest.err >&5
15055 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15056 (exit $ac_status); } && {
15057 test -z "$ac_c_werror_flag" ||
15058 test ! -s conftest.err
15059 } && test -s conftest.$ac_objext; then
15060 ac_cv_have_decl_O_NONBLOCK=yes
15061else 9429else
15062 echo "$as_me: failed program was:" >&5 9430 ac_have_decl=0
15063sed 's/^/| /' conftest.$ac_ext >&5
15064
15065 ac_cv_have_decl_O_NONBLOCK=no
15066fi 9431fi
15067 9432
15068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15069fi
15070{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_O_NONBLOCK" >&5
15071echo "${ECHO_T}$ac_cv_have_decl_O_NONBLOCK" >&6; }
15072if test $ac_cv_have_decl_O_NONBLOCK = yes; then
15073
15074cat >>confdefs.h <<_ACEOF 9433cat >>confdefs.h <<_ACEOF
15075#define HAVE_DECL_O_NONBLOCK 1 9434#define HAVE_DECL_O_NONBLOCK $ac_have_decl
15076_ACEOF
15077
15078
15079else
15080 cat >>confdefs.h <<_ACEOF
15081#define HAVE_DECL_O_NONBLOCK 0
15082_ACEOF 9435_ACEOF
15083 9436
15084 9437
15085fi 9438ac_fn_c_check_decl "$LINENO" "writev" "ac_cv_have_decl_writev" "
15086
15087
15088
15089{ echo "$as_me:$LINENO: checking whether writev is declared" >&5
15090echo $ECHO_N "checking whether writev is declared... $ECHO_C" >&6; }
15091if test "${ac_cv_have_decl_writev+set}" = set; then
15092 echo $ECHO_N "(cached) $ECHO_C" >&6
15093else
15094 cat >conftest.$ac_ext <<_ACEOF
15095/* confdefs.h. */
15096_ACEOF
15097cat confdefs.h >>conftest.$ac_ext
15098cat >>conftest.$ac_ext <<_ACEOF
15099/* end confdefs.h. */
15100
15101#include <sys/types.h> 9439#include <sys/types.h>
15102#include <sys/uio.h> 9440#include <sys/uio.h>
15103#include <unistd.h> 9441#include <unistd.h>
15104 9442
15105 9443"
15106int 9444if test "x$ac_cv_have_decl_writev" = xyes; then :
15107main () 9445 ac_have_decl=1
15108{
15109#ifndef writev
15110 (void) writev;
15111#endif
15112
15113 ;
15114 return 0;
15115}
15116_ACEOF
15117rm -f conftest.$ac_objext
15118if { (ac_try="$ac_compile"
15119case "(($ac_try" in
15120 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15121 *) ac_try_echo=$ac_try;;
15122esac
15123eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15124 (eval "$ac_compile") 2>conftest.er1
15125 ac_status=$?
15126 grep -v '^ *+' conftest.er1 >conftest.err
15127 rm -f conftest.er1
15128 cat conftest.err >&5
15129 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15130 (exit $ac_status); } && {
15131 test -z "$ac_c_werror_flag" ||
15132 test ! -s conftest.err
15133 } && test -s conftest.$ac_objext; then
15134 ac_cv_have_decl_writev=yes
15135else 9446else
15136 echo "$as_me: failed program was:" >&5 9447 ac_have_decl=0
15137sed 's/^/| /' conftest.$ac_ext >&5
15138
15139 ac_cv_have_decl_writev=no
15140fi
15141
15142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15143fi 9448fi
15144{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_writev" >&5
15145echo "${ECHO_T}$ac_cv_have_decl_writev" >&6; }
15146if test $ac_cv_have_decl_writev = yes; then
15147 9449
15148cat >>confdefs.h <<_ACEOF 9450cat >>confdefs.h <<_ACEOF
15149#define HAVE_DECL_WRITEV 1 9451#define HAVE_DECL_WRITEV $ac_have_decl
15150_ACEOF 9452_ACEOF
15151 9453
15152 9454
15153else 9455ac_fn_c_check_decl "$LINENO" "MAXSYMLINKS" "ac_cv_have_decl_MAXSYMLINKS" "
15154 cat >>confdefs.h <<_ACEOF
15155#define HAVE_DECL_WRITEV 0
15156_ACEOF
15157
15158
15159fi
15160
15161
15162
15163{ echo "$as_me:$LINENO: checking whether MAXSYMLINKS is declared" >&5
15164echo $ECHO_N "checking whether MAXSYMLINKS is declared... $ECHO_C" >&6; }
15165if test "${ac_cv_have_decl_MAXSYMLINKS+set}" = set; then
15166 echo $ECHO_N "(cached) $ECHO_C" >&6
15167else
15168 cat >conftest.$ac_ext <<_ACEOF
15169/* confdefs.h. */
15170_ACEOF
15171cat confdefs.h >>conftest.$ac_ext
15172cat >>conftest.$ac_ext <<_ACEOF
15173/* end confdefs.h. */
15174
15175#include <sys/param.h> 9456#include <sys/param.h>
15176 9457
15177 9458"
15178int 9459if test "x$ac_cv_have_decl_MAXSYMLINKS" = xyes; then :
15179main () 9460 ac_have_decl=1
15180{
15181#ifndef MAXSYMLINKS
15182 (void) MAXSYMLINKS;
15183#endif
15184
15185 ;
15186 return 0;
15187}
15188_ACEOF
15189rm -f conftest.$ac_objext
15190if { (ac_try="$ac_compile"
15191case "(($ac_try" in
15192 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15193 *) ac_try_echo=$ac_try;;
15194esac
15195eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15196 (eval "$ac_compile") 2>conftest.er1
15197 ac_status=$?
15198 grep -v '^ *+' conftest.er1 >conftest.err
15199 rm -f conftest.er1
15200 cat conftest.err >&5
15201 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15202 (exit $ac_status); } && {
15203 test -z "$ac_c_werror_flag" ||
15204 test ! -s conftest.err
15205 } && test -s conftest.$ac_objext; then
15206 ac_cv_have_decl_MAXSYMLINKS=yes
15207else 9461else
15208 echo "$as_me: failed program was:" >&5 9462 ac_have_decl=0
15209sed 's/^/| /' conftest.$ac_ext >&5
15210
15211 ac_cv_have_decl_MAXSYMLINKS=no
15212fi
15213
15214rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15215fi 9463fi
15216{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_MAXSYMLINKS" >&5
15217echo "${ECHO_T}$ac_cv_have_decl_MAXSYMLINKS" >&6; }
15218if test $ac_cv_have_decl_MAXSYMLINKS = yes; then
15219 9464
15220cat >>confdefs.h <<_ACEOF 9465cat >>confdefs.h <<_ACEOF
15221#define HAVE_DECL_MAXSYMLINKS 1 9466#define HAVE_DECL_MAXSYMLINKS $ac_have_decl
15222_ACEOF
15223
15224
15225else
15226 cat >>confdefs.h <<_ACEOF
15227#define HAVE_DECL_MAXSYMLINKS 0
15228_ACEOF 9467_ACEOF
15229 9468
15230 9469
15231fi 9470ac_fn_c_check_decl "$LINENO" "offsetof" "ac_cv_have_decl_offsetof" "
15232
15233
15234
15235{ echo "$as_me:$LINENO: checking whether offsetof is declared" >&5
15236echo $ECHO_N "checking whether offsetof is declared... $ECHO_C" >&6; }
15237if test "${ac_cv_have_decl_offsetof+set}" = set; then
15238 echo $ECHO_N "(cached) $ECHO_C" >&6
15239else
15240 cat >conftest.$ac_ext <<_ACEOF
15241/* confdefs.h. */
15242_ACEOF
15243cat confdefs.h >>conftest.$ac_ext
15244cat >>conftest.$ac_ext <<_ACEOF
15245/* end confdefs.h. */
15246
15247#include <stddef.h> 9471#include <stddef.h>
15248 9472
15249 9473"
15250int 9474if test "x$ac_cv_have_decl_offsetof" = xyes; then :
15251main () 9475 ac_have_decl=1
15252{
15253#ifndef offsetof
15254 (void) offsetof;
15255#endif
15256
15257 ;
15258 return 0;
15259}
15260_ACEOF
15261rm -f conftest.$ac_objext
15262if { (ac_try="$ac_compile"
15263case "(($ac_try" in
15264 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15265 *) ac_try_echo=$ac_try;;
15266esac
15267eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15268 (eval "$ac_compile") 2>conftest.er1
15269 ac_status=$?
15270 grep -v '^ *+' conftest.er1 >conftest.err
15271 rm -f conftest.er1
15272 cat conftest.err >&5
15273 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15274 (exit $ac_status); } && {
15275 test -z "$ac_c_werror_flag" ||
15276 test ! -s conftest.err
15277 } && test -s conftest.$ac_objext; then
15278 ac_cv_have_decl_offsetof=yes
15279else 9476else
15280 echo "$as_me: failed program was:" >&5 9477 ac_have_decl=0
15281sed 's/^/| /' conftest.$ac_ext >&5
15282
15283 ac_cv_have_decl_offsetof=no
15284fi 9478fi
15285 9479
15286rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15287fi
15288{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_offsetof" >&5
15289echo "${ECHO_T}$ac_cv_have_decl_offsetof" >&6; }
15290if test $ac_cv_have_decl_offsetof = yes; then
15291
15292cat >>confdefs.h <<_ACEOF 9480cat >>confdefs.h <<_ACEOF
15293#define HAVE_DECL_OFFSETOF 1 9481#define HAVE_DECL_OFFSETOF $ac_have_decl
15294_ACEOF 9482_ACEOF
15295 9483
15296 9484
15297else 9485for ac_func in setresuid
9486do :
9487 ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid"
9488if test "x$ac_cv_func_setresuid" = xyes; then :
15298 cat >>confdefs.h <<_ACEOF 9489 cat >>confdefs.h <<_ACEOF
15299#define HAVE_DECL_OFFSETOF 0 9490#define HAVE_SETRESUID 1
15300_ACEOF 9491_ACEOF
15301 9492
9493 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresuid seems to work" >&5
9494$as_echo_n "checking if setresuid seems to work... " >&6; }
9495 if test "$cross_compiling" = yes; then :
9496 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
9497$as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
15302 9498
15303fi
15304
15305
15306
15307
15308for ac_func in setresuid
15309do
15310as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15311{ echo "$as_me:$LINENO: checking for $ac_func" >&5
15312echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15313if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15314 echo $ECHO_N "(cached) $ECHO_C" >&6
15315else 9499else
15316 cat >conftest.$ac_ext <<_ACEOF 9500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15317/* confdefs.h. */
15318_ACEOF
15319cat confdefs.h >>conftest.$ac_ext
15320cat >>conftest.$ac_ext <<_ACEOF
15321/* end confdefs.h. */ 9501/* end confdefs.h. */
15322/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15323 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15324#define $ac_func innocuous_$ac_func
15325 9502
15326/* System header to define __stub macros and hopefully few prototypes, 9503#include <stdlib.h>
15327 which can conflict with char $ac_func (); below. 9504#include <errno.h>
15328 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15329 <limits.h> exists even on freestanding compilers. */
15330
15331#ifdef __STDC__
15332# include <limits.h>
15333#else
15334# include <assert.h>
15335#endif
15336
15337#undef $ac_func
15338
15339/* Override any GCC internal prototype to avoid an error.
15340 Use char because int might match the return type of a GCC
15341 builtin and then its argument prototype would still apply. */
15342#ifdef __cplusplus
15343extern "C"
15344#endif
15345char $ac_func ();
15346/* The GNU C library defines this for functions which it implements
15347 to always fail with ENOSYS. Some functions are actually named
15348 something starting with __ and the normal name is an alias. */
15349#if defined __stub_$ac_func || defined __stub___$ac_func
15350choke me
15351#endif
15352 9505
15353int 9506int
15354main () 9507main ()
15355{ 9508{
15356return $ac_func (); 9509
9510 errno=0;
9511 setresuid(0,0,0);
9512 if (errno==ENOSYS)
9513 exit(1);
9514 else
9515 exit(0);
9516
15357 ; 9517 ;
15358 return 0; 9518 return 0;
15359} 9519}
15360_ACEOF 9520_ACEOF
15361rm -f conftest.$ac_objext conftest$ac_exeext 9521if ac_fn_c_try_run "$LINENO"; then :
15362if { (ac_try="$ac_link" 9522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15363case "(($ac_try" in 9523$as_echo "yes" >&6; }
15364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15365 *) ac_try_echo=$ac_try;;
15366esac
15367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15368 (eval "$ac_link") 2>conftest.er1
15369 ac_status=$?
15370 grep -v '^ *+' conftest.er1 >conftest.err
15371 rm -f conftest.er1
15372 cat conftest.err >&5
15373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15374 (exit $ac_status); } && {
15375 test -z "$ac_c_werror_flag" ||
15376 test ! -s conftest.err
15377 } && test -s conftest$ac_exeext &&
15378 $as_test_x conftest$ac_exeext; then
15379 eval "$as_ac_var=yes"
15380else
15381 echo "$as_me: failed program was:" >&5
15382sed 's/^/| /' conftest.$ac_ext >&5
15383
15384 eval "$as_ac_var=no"
15385fi
15386
15387rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15388 conftest$ac_exeext conftest.$ac_ext
15389fi
15390ac_res=`eval echo '${'$as_ac_var'}'`
15391 { echo "$as_me:$LINENO: result: $ac_res" >&5
15392echo "${ECHO_T}$ac_res" >&6; }
15393if test `eval echo '${'$as_ac_var'}'` = yes; then
15394 cat >>confdefs.h <<_ACEOF
15395#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15396_ACEOF
15397
15398 { echo "$as_me:$LINENO: checking if setresuid seems to work" >&5
15399echo $ECHO_N "checking if setresuid seems to work... $ECHO_C" >&6; }
15400 if test "$cross_compiling" = yes; then
15401 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking setresuid" >&5
15402echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
15403
15404else
15405 cat >conftest.$ac_ext <<_ACEOF
15406/* confdefs.h. */
15407_ACEOF
15408cat confdefs.h >>conftest.$ac_ext
15409cat >>conftest.$ac_ext <<_ACEOF
15410/* end confdefs.h. */
15411
15412#include <stdlib.h>
15413#include <errno.h>
15414int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
15415
15416_ACEOF
15417rm -f conftest$ac_exeext
15418if { (ac_try="$ac_link"
15419case "(($ac_try" in
15420 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15421 *) ac_try_echo=$ac_try;;
15422esac
15423eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15424 (eval "$ac_link") 2>&5
15425 ac_status=$?
15426 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15427 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15428 { (case "(($ac_try" in
15429 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15430 *) ac_try_echo=$ac_try;;
15431esac
15432eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15433 (eval "$ac_try") 2>&5
15434 ac_status=$?
15435 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15436 (exit $ac_status); }; }; then
15437 { echo "$as_me:$LINENO: result: yes" >&5
15438echo "${ECHO_T}yes" >&6; }
15439else 9524else
15440 echo "$as_me: program exited with status $ac_status" >&5
15441echo "$as_me: failed program was:" >&5
15442sed 's/^/| /' conftest.$ac_ext >&5
15443 9525
15444( exit $ac_status ) 9526$as_echo "#define BROKEN_SETRESUID 1" >>confdefs.h
15445 9527
15446cat >>confdefs.h <<\_ACEOF 9528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
15447#define BROKEN_SETRESUID 1 9529$as_echo "not implemented" >&6; }
15448_ACEOF
15449
15450 { echo "$as_me:$LINENO: result: not implemented" >&5
15451echo "${ECHO_T}not implemented" >&6; }
15452fi 9530fi
15453rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 9531rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9532 conftest.$ac_objext conftest.beam conftest.$ac_ext
15454fi 9533fi
15455 9534
15456 9535
15457
15458fi 9536fi
15459done 9537done
15460 9538
15461 9539
15462
15463for ac_func in setresgid 9540for ac_func in setresgid
15464do 9541do :
15465as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 9542 ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid"
15466{ echo "$as_me:$LINENO: checking for $ac_func" >&5 9543if test "x$ac_cv_func_setresgid" = xyes; then :
15467echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 9544 cat >>confdefs.h <<_ACEOF
15468if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then 9545#define HAVE_SETRESGID 1
15469 echo $ECHO_N "(cached) $ECHO_C" >&6
15470else
15471 cat >conftest.$ac_ext <<_ACEOF
15472/* confdefs.h. */
15473_ACEOF 9546_ACEOF
15474cat confdefs.h >>conftest.$ac_ext
15475cat >>conftest.$ac_ext <<_ACEOF
15476/* end confdefs.h. */
15477/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15478 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15479#define $ac_func innocuous_$ac_func
15480
15481/* System header to define __stub macros and hopefully few prototypes,
15482 which can conflict with char $ac_func (); below.
15483 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15484 <limits.h> exists even on freestanding compilers. */
15485 9547
15486#ifdef __STDC__ 9548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if setresgid seems to work" >&5
15487# include <limits.h> 9549$as_echo_n "checking if setresgid seems to work... " >&6; }
15488#else 9550 if test "$cross_compiling" = yes; then :
15489# include <assert.h> 9551 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking setresuid" >&5
15490#endif 9552$as_echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
15491 9553
15492#undef $ac_func 9554else
9555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9556/* end confdefs.h. */
15493 9557
15494/* Override any GCC internal prototype to avoid an error. 9558#include <stdlib.h>
15495 Use char because int might match the return type of a GCC 9559#include <errno.h>
15496 builtin and then its argument prototype would still apply. */
15497#ifdef __cplusplus
15498extern "C"
15499#endif
15500char $ac_func ();
15501/* The GNU C library defines this for functions which it implements
15502 to always fail with ENOSYS. Some functions are actually named
15503 something starting with __ and the normal name is an alias. */
15504#if defined __stub_$ac_func || defined __stub___$ac_func
15505choke me
15506#endif
15507 9560
15508int 9561int
15509main () 9562main ()
15510{ 9563{
15511return $ac_func (); 9564
9565 errno=0;
9566 setresgid(0,0,0);
9567 if (errno==ENOSYS)
9568 exit(1);
9569 else
9570 exit(0);
9571
15512 ; 9572 ;
15513 return 0; 9573 return 0;
15514} 9574}
15515_ACEOF 9575_ACEOF
15516rm -f conftest.$ac_objext conftest$ac_exeext 9576if ac_fn_c_try_run "$LINENO"; then :
15517if { (ac_try="$ac_link" 9577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
15518case "(($ac_try" in 9578$as_echo "yes" >&6; }
15519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15520 *) ac_try_echo=$ac_try;;
15521esac
15522eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15523 (eval "$ac_link") 2>conftest.er1
15524 ac_status=$?
15525 grep -v '^ *+' conftest.er1 >conftest.err
15526 rm -f conftest.er1
15527 cat conftest.err >&5
15528 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15529 (exit $ac_status); } && {
15530 test -z "$ac_c_werror_flag" ||
15531 test ! -s conftest.err
15532 } && test -s conftest$ac_exeext &&
15533 $as_test_x conftest$ac_exeext; then
15534 eval "$as_ac_var=yes"
15535else 9579else
15536 echo "$as_me: failed program was:" >&5
15537sed 's/^/| /' conftest.$ac_ext >&5
15538 9580
15539 eval "$as_ac_var=no" 9581$as_echo "#define BROKEN_SETRESGID 1" >>confdefs.h
15540fi
15541 9582
15542rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not implemented" >&5
15543 conftest$ac_exeext conftest.$ac_ext 9584$as_echo "not implemented" >&6; }
15544fi 9585fi
15545ac_res=`eval echo '${'$as_ac_var'}'` 9586rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15546 { echo "$as_me:$LINENO: result: $ac_res" >&5 9587 conftest.$ac_objext conftest.beam conftest.$ac_ext
15547echo "${ECHO_T}$ac_res" >&6; }
15548if test `eval echo '${'$as_ac_var'}'` = yes; then
15549 cat >>confdefs.h <<_ACEOF
15550#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15551_ACEOF
15552
15553 { echo "$as_me:$LINENO: checking if setresgid seems to work" >&5
15554echo $ECHO_N "checking if setresgid seems to work... $ECHO_C" >&6; }
15555 if test "$cross_compiling" = yes; then
15556 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking setresuid" >&5
15557echo "$as_me: WARNING: cross compiling: not checking setresuid" >&2;}
15558
15559else
15560 cat >conftest.$ac_ext <<_ACEOF
15561/* confdefs.h. */
15562_ACEOF
15563cat confdefs.h >>conftest.$ac_ext
15564cat >>conftest.$ac_ext <<_ACEOF
15565/* end confdefs.h. */
15566
15567#include <stdlib.h>
15568#include <errno.h>
15569int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);}
15570
15571_ACEOF
15572rm -f conftest$ac_exeext
15573if { (ac_try="$ac_link"
15574case "(($ac_try" in
15575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15576 *) ac_try_echo=$ac_try;;
15577esac
15578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15579 (eval "$ac_link") 2>&5
15580 ac_status=$?
15581 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15582 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15583 { (case "(($ac_try" in
15584 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15585 *) ac_try_echo=$ac_try;;
15586esac
15587eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15588 (eval "$ac_try") 2>&5
15589 ac_status=$?
15590 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15591 (exit $ac_status); }; }; then
15592 { echo "$as_me:$LINENO: result: yes" >&5
15593echo "${ECHO_T}yes" >&6; }
15594else
15595 echo "$as_me: program exited with status $ac_status" >&5
15596echo "$as_me: failed program was:" >&5
15597sed 's/^/| /' conftest.$ac_ext >&5
15598
15599( exit $ac_status )
15600
15601cat >>confdefs.h <<\_ACEOF
15602#define BROKEN_SETRESGID 1
15603_ACEOF
15604
15605 { echo "$as_me:$LINENO: result: not implemented" >&5
15606echo "${ECHO_T}not implemented" >&6; }
15607fi
15608rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15609fi 9588fi
15610 9589
15611 9590
15612
15613fi 9591fi
15614done 9592done
15615 9593
15616 9594
15617
15618
15619for ac_func in gettimeofday time 9595for ac_func in gettimeofday time
15620do 9596do :
15621as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 9597 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15622{ echo "$as_me:$LINENO: checking for $ac_func" >&5 9598ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15623echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 9599if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15624if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15625 echo $ECHO_N "(cached) $ECHO_C" >&6
15626else
15627 cat >conftest.$ac_ext <<_ACEOF
15628/* confdefs.h. */
15629_ACEOF
15630cat confdefs.h >>conftest.$ac_ext
15631cat >>conftest.$ac_ext <<_ACEOF
15632/* end confdefs.h. */
15633/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15634 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15635#define $ac_func innocuous_$ac_func
15636
15637/* System header to define __stub macros and hopefully few prototypes,
15638 which can conflict with char $ac_func (); below.
15639 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15640 <limits.h> exists even on freestanding compilers. */
15641
15642#ifdef __STDC__
15643# include <limits.h>
15644#else
15645# include <assert.h>
15646#endif
15647
15648#undef $ac_func
15649
15650/* Override any GCC internal prototype to avoid an error.
15651 Use char because int might match the return type of a GCC
15652 builtin and then its argument prototype would still apply. */
15653#ifdef __cplusplus
15654extern "C"
15655#endif
15656char $ac_func ();
15657/* The GNU C library defines this for functions which it implements
15658 to always fail with ENOSYS. Some functions are actually named
15659 something starting with __ and the normal name is an alias. */
15660#if defined __stub_$ac_func || defined __stub___$ac_func
15661choke me
15662#endif
15663
15664int
15665main ()
15666{
15667return $ac_func ();
15668 ;
15669 return 0;
15670}
15671_ACEOF
15672rm -f conftest.$ac_objext conftest$ac_exeext
15673if { (ac_try="$ac_link"
15674case "(($ac_try" in
15675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15676 *) ac_try_echo=$ac_try;;
15677esac
15678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15679 (eval "$ac_link") 2>conftest.er1
15680 ac_status=$?
15681 grep -v '^ *+' conftest.er1 >conftest.err
15682 rm -f conftest.er1
15683 cat conftest.err >&5
15684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15685 (exit $ac_status); } && {
15686 test -z "$ac_c_werror_flag" ||
15687 test ! -s conftest.err
15688 } && test -s conftest$ac_exeext &&
15689 $as_test_x conftest$ac_exeext; then
15690 eval "$as_ac_var=yes"
15691else
15692 echo "$as_me: failed program was:" >&5
15693sed 's/^/| /' conftest.$ac_ext >&5
15694
15695 eval "$as_ac_var=no"
15696fi
15697
15698rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15699 conftest$ac_exeext conftest.$ac_ext
15700fi
15701ac_res=`eval echo '${'$as_ac_var'}'`
15702 { echo "$as_me:$LINENO: result: $ac_res" >&5
15703echo "${ECHO_T}$ac_res" >&6; }
15704if test `eval echo '${'$as_ac_var'}'` = yes; then
15705 cat >>confdefs.h <<_ACEOF 9600 cat >>confdefs.h <<_ACEOF
15706#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 9601#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15707_ACEOF 9602_ACEOF
15708 9603
15709fi 9604fi
15710done 9605done
15711 9606
15712
15713
15714
15715
15716
15717
15718for ac_func in endutent getutent getutid getutline pututline setutent 9607for ac_func in endutent getutent getutid getutline pututline setutent
15719do 9608do :
15720as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 9609 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15721{ echo "$as_me:$LINENO: checking for $ac_func" >&5 9610ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15722echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 9611if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15723if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15724 echo $ECHO_N "(cached) $ECHO_C" >&6
15725else
15726 cat >conftest.$ac_ext <<_ACEOF
15727/* confdefs.h. */
15728_ACEOF
15729cat confdefs.h >>conftest.$ac_ext
15730cat >>conftest.$ac_ext <<_ACEOF
15731/* end confdefs.h. */
15732/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15733 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15734#define $ac_func innocuous_$ac_func
15735
15736/* System header to define __stub macros and hopefully few prototypes,
15737 which can conflict with char $ac_func (); below.
15738 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15739 <limits.h> exists even on freestanding compilers. */
15740
15741#ifdef __STDC__
15742# include <limits.h>
15743#else
15744# include <assert.h>
15745#endif
15746
15747#undef $ac_func
15748
15749/* Override any GCC internal prototype to avoid an error.
15750 Use char because int might match the return type of a GCC
15751 builtin and then its argument prototype would still apply. */
15752#ifdef __cplusplus
15753extern "C"
15754#endif
15755char $ac_func ();
15756/* The GNU C library defines this for functions which it implements
15757 to always fail with ENOSYS. Some functions are actually named
15758 something starting with __ and the normal name is an alias. */
15759#if defined __stub_$ac_func || defined __stub___$ac_func
15760choke me
15761#endif
15762
15763int
15764main ()
15765{
15766return $ac_func ();
15767 ;
15768 return 0;
15769}
15770_ACEOF
15771rm -f conftest.$ac_objext conftest$ac_exeext
15772if { (ac_try="$ac_link"
15773case "(($ac_try" in
15774 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15775 *) ac_try_echo=$ac_try;;
15776esac
15777eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15778 (eval "$ac_link") 2>conftest.er1
15779 ac_status=$?
15780 grep -v '^ *+' conftest.er1 >conftest.err
15781 rm -f conftest.er1
15782 cat conftest.err >&5
15783 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15784 (exit $ac_status); } && {
15785 test -z "$ac_c_werror_flag" ||
15786 test ! -s conftest.err
15787 } && test -s conftest$ac_exeext &&
15788 $as_test_x conftest$ac_exeext; then
15789 eval "$as_ac_var=yes"
15790else
15791 echo "$as_me: failed program was:" >&5
15792sed 's/^/| /' conftest.$ac_ext >&5
15793
15794 eval "$as_ac_var=no"
15795fi
15796
15797rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15798 conftest$ac_exeext conftest.$ac_ext
15799fi
15800ac_res=`eval echo '${'$as_ac_var'}'`
15801 { echo "$as_me:$LINENO: result: $ac_res" >&5
15802echo "${ECHO_T}$ac_res" >&6; }
15803if test `eval echo '${'$as_ac_var'}'` = yes; then
15804 cat >>confdefs.h <<_ACEOF 9612 cat >>confdefs.h <<_ACEOF
15805#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 9613#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15806_ACEOF 9614_ACEOF
15807 9615
15808fi 9616fi
15809done 9617done
15810 9618
15811
15812for ac_func in utmpname 9619for ac_func in utmpname
15813do 9620do :
15814as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 9621 ac_fn_c_check_func "$LINENO" "utmpname" "ac_cv_func_utmpname"
15815{ echo "$as_me:$LINENO: checking for $ac_func" >&5 9622if test "x$ac_cv_func_utmpname" = xyes; then :
15816echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
15817if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15818 echo $ECHO_N "(cached) $ECHO_C" >&6
15819else
15820 cat >conftest.$ac_ext <<_ACEOF
15821/* confdefs.h. */
15822_ACEOF
15823cat confdefs.h >>conftest.$ac_ext
15824cat >>conftest.$ac_ext <<_ACEOF
15825/* end confdefs.h. */
15826/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15827 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15828#define $ac_func innocuous_$ac_func
15829
15830/* System header to define __stub macros and hopefully few prototypes,
15831 which can conflict with char $ac_func (); below.
15832 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15833 <limits.h> exists even on freestanding compilers. */
15834
15835#ifdef __STDC__
15836# include <limits.h>
15837#else
15838# include <assert.h>
15839#endif
15840
15841#undef $ac_func
15842
15843/* Override any GCC internal prototype to avoid an error.
15844 Use char because int might match the return type of a GCC
15845 builtin and then its argument prototype would still apply. */
15846#ifdef __cplusplus
15847extern "C"
15848#endif
15849char $ac_func ();
15850/* The GNU C library defines this for functions which it implements
15851 to always fail with ENOSYS. Some functions are actually named
15852 something starting with __ and the normal name is an alias. */
15853#if defined __stub_$ac_func || defined __stub___$ac_func
15854choke me
15855#endif
15856
15857int
15858main ()
15859{
15860return $ac_func ();
15861 ;
15862 return 0;
15863}
15864_ACEOF
15865rm -f conftest.$ac_objext conftest$ac_exeext
15866if { (ac_try="$ac_link"
15867case "(($ac_try" in
15868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15869 *) ac_try_echo=$ac_try;;
15870esac
15871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15872 (eval "$ac_link") 2>conftest.er1
15873 ac_status=$?
15874 grep -v '^ *+' conftest.er1 >conftest.err
15875 rm -f conftest.er1
15876 cat conftest.err >&5
15877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15878 (exit $ac_status); } && {
15879 test -z "$ac_c_werror_flag" ||
15880 test ! -s conftest.err
15881 } && test -s conftest$ac_exeext &&
15882 $as_test_x conftest$ac_exeext; then
15883 eval "$as_ac_var=yes"
15884else
15885 echo "$as_me: failed program was:" >&5
15886sed 's/^/| /' conftest.$ac_ext >&5
15887
15888 eval "$as_ac_var=no"
15889fi
15890
15891rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15892 conftest$ac_exeext conftest.$ac_ext
15893fi
15894ac_res=`eval echo '${'$as_ac_var'}'`
15895 { echo "$as_me:$LINENO: result: $ac_res" >&5
15896echo "${ECHO_T}$ac_res" >&6; }
15897if test `eval echo '${'$as_ac_var'}'` = yes; then
15898 cat >>confdefs.h <<_ACEOF 9623 cat >>confdefs.h <<_ACEOF
15899#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 9624#define HAVE_UTMPNAME 1
15900_ACEOF 9625_ACEOF
15901 9626
15902fi 9627fi
15903done 9628done
15904 9629
15905
15906
15907
15908
15909
15910
15911for ac_func in endutxent getutxent getutxid getutxline getutxuser pututxline 9630for ac_func in endutxent getutxent getutxid getutxline getutxuser pututxline
15912do 9631do :
15913as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 9632 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
15914{ echo "$as_me:$LINENO: checking for $ac_func" >&5 9633ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
15915echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 9634if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
15916if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
15917 echo $ECHO_N "(cached) $ECHO_C" >&6
15918else
15919 cat >conftest.$ac_ext <<_ACEOF
15920/* confdefs.h. */
15921_ACEOF
15922cat confdefs.h >>conftest.$ac_ext
15923cat >>conftest.$ac_ext <<_ACEOF
15924/* end confdefs.h. */
15925/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
15926 For example, HP-UX 11i <limits.h> declares gettimeofday. */
15927#define $ac_func innocuous_$ac_func
15928
15929/* System header to define __stub macros and hopefully few prototypes,
15930 which can conflict with char $ac_func (); below.
15931 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
15932 <limits.h> exists even on freestanding compilers. */
15933
15934#ifdef __STDC__
15935# include <limits.h>
15936#else
15937# include <assert.h>
15938#endif
15939
15940#undef $ac_func
15941
15942/* Override any GCC internal prototype to avoid an error.
15943 Use char because int might match the return type of a GCC
15944 builtin and then its argument prototype would still apply. */
15945#ifdef __cplusplus
15946extern "C"
15947#endif
15948char $ac_func ();
15949/* The GNU C library defines this for functions which it implements
15950 to always fail with ENOSYS. Some functions are actually named
15951 something starting with __ and the normal name is an alias. */
15952#if defined __stub_$ac_func || defined __stub___$ac_func
15953choke me
15954#endif
15955
15956int
15957main ()
15958{
15959return $ac_func ();
15960 ;
15961 return 0;
15962}
15963_ACEOF
15964rm -f conftest.$ac_objext conftest$ac_exeext
15965if { (ac_try="$ac_link"
15966case "(($ac_try" in
15967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
15968 *) ac_try_echo=$ac_try;;
15969esac
15970eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
15971 (eval "$ac_link") 2>conftest.er1
15972 ac_status=$?
15973 grep -v '^ *+' conftest.er1 >conftest.err
15974 rm -f conftest.er1
15975 cat conftest.err >&5
15976 echo "$as_me:$LINENO: \$? = $ac_status" >&5
15977 (exit $ac_status); } && {
15978 test -z "$ac_c_werror_flag" ||
15979 test ! -s conftest.err
15980 } && test -s conftest$ac_exeext &&
15981 $as_test_x conftest$ac_exeext; then
15982 eval "$as_ac_var=yes"
15983else
15984 echo "$as_me: failed program was:" >&5
15985sed 's/^/| /' conftest.$ac_ext >&5
15986
15987 eval "$as_ac_var=no"
15988fi
15989
15990rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
15991 conftest$ac_exeext conftest.$ac_ext
15992fi
15993ac_res=`eval echo '${'$as_ac_var'}'`
15994 { echo "$as_me:$LINENO: result: $ac_res" >&5
15995echo "${ECHO_T}$ac_res" >&6; }
15996if test `eval echo '${'$as_ac_var'}'` = yes; then
15997 cat >>confdefs.h <<_ACEOF 9635 cat >>confdefs.h <<_ACEOF
15998#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 9636#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
15999_ACEOF 9637_ACEOF
16000 9638
16001fi 9639fi
16002done 9640done
16003 9641
16004
16005
16006
16007for ac_func in setutxdb setutxent utmpxname 9642for ac_func in setutxdb setutxent utmpxname
16008do 9643do :
16009as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 9644 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16010{ echo "$as_me:$LINENO: checking for $ac_func" >&5 9645ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16011echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 9646if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16012if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16013 echo $ECHO_N "(cached) $ECHO_C" >&6
16014else
16015 cat >conftest.$ac_ext <<_ACEOF
16016/* confdefs.h. */
16017_ACEOF
16018cat confdefs.h >>conftest.$ac_ext
16019cat >>conftest.$ac_ext <<_ACEOF
16020/* end confdefs.h. */
16021/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16022 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16023#define $ac_func innocuous_$ac_func
16024
16025/* System header to define __stub macros and hopefully few prototypes,
16026 which can conflict with char $ac_func (); below.
16027 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16028 <limits.h> exists even on freestanding compilers. */
16029
16030#ifdef __STDC__
16031# include <limits.h>
16032#else
16033# include <assert.h>
16034#endif
16035
16036#undef $ac_func
16037
16038/* Override any GCC internal prototype to avoid an error.
16039 Use char because int might match the return type of a GCC
16040 builtin and then its argument prototype would still apply. */
16041#ifdef __cplusplus
16042extern "C"
16043#endif
16044char $ac_func ();
16045/* The GNU C library defines this for functions which it implements
16046 to always fail with ENOSYS. Some functions are actually named
16047 something starting with __ and the normal name is an alias. */
16048#if defined __stub_$ac_func || defined __stub___$ac_func
16049choke me
16050#endif
16051
16052int
16053main ()
16054{
16055return $ac_func ();
16056 ;
16057 return 0;
16058}
16059_ACEOF
16060rm -f conftest.$ac_objext conftest$ac_exeext
16061if { (ac_try="$ac_link"
16062case "(($ac_try" in
16063 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16064 *) ac_try_echo=$ac_try;;
16065esac
16066eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16067 (eval "$ac_link") 2>conftest.er1
16068 ac_status=$?
16069 grep -v '^ *+' conftest.er1 >conftest.err
16070 rm -f conftest.er1
16071 cat conftest.err >&5
16072 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16073 (exit $ac_status); } && {
16074 test -z "$ac_c_werror_flag" ||
16075 test ! -s conftest.err
16076 } && test -s conftest$ac_exeext &&
16077 $as_test_x conftest$ac_exeext; then
16078 eval "$as_ac_var=yes"
16079else
16080 echo "$as_me: failed program was:" >&5
16081sed 's/^/| /' conftest.$ac_ext >&5
16082
16083 eval "$as_ac_var=no"
16084fi
16085
16086rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16087 conftest$ac_exeext conftest.$ac_ext
16088fi
16089ac_res=`eval echo '${'$as_ac_var'}'`
16090 { echo "$as_me:$LINENO: result: $ac_res" >&5
16091echo "${ECHO_T}$ac_res" >&6; }
16092if test `eval echo '${'$as_ac_var'}'` = yes; then
16093 cat >>confdefs.h <<_ACEOF 9647 cat >>confdefs.h <<_ACEOF
16094#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 9648#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16095_ACEOF 9649_ACEOF
16096 9650
16097fi 9651fi
16098done 9652done
16099 9653
16100
16101for ac_func in getlastlogxbyname 9654for ac_func in getlastlogxbyname
16102do 9655do :
16103as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 9656 ac_fn_c_check_func "$LINENO" "getlastlogxbyname" "ac_cv_func_getlastlogxbyname"
16104{ echo "$as_me:$LINENO: checking for $ac_func" >&5 9657if test "x$ac_cv_func_getlastlogxbyname" = xyes; then :
16105echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
16106if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
16107 echo $ECHO_N "(cached) $ECHO_C" >&6
16108else
16109 cat >conftest.$ac_ext <<_ACEOF
16110/* confdefs.h. */
16111_ACEOF
16112cat confdefs.h >>conftest.$ac_ext
16113cat >>conftest.$ac_ext <<_ACEOF
16114/* end confdefs.h. */
16115/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
16116 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16117#define $ac_func innocuous_$ac_func
16118
16119/* System header to define __stub macros and hopefully few prototypes,
16120 which can conflict with char $ac_func (); below.
16121 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16122 <limits.h> exists even on freestanding compilers. */
16123
16124#ifdef __STDC__
16125# include <limits.h>
16126#else
16127# include <assert.h>
16128#endif
16129
16130#undef $ac_func
16131
16132/* Override any GCC internal prototype to avoid an error.
16133 Use char because int might match the return type of a GCC
16134 builtin and then its argument prototype would still apply. */
16135#ifdef __cplusplus
16136extern "C"
16137#endif
16138char $ac_func ();
16139/* The GNU C library defines this for functions which it implements
16140 to always fail with ENOSYS. Some functions are actually named
16141 something starting with __ and the normal name is an alias. */
16142#if defined __stub_$ac_func || defined __stub___$ac_func
16143choke me
16144#endif
16145
16146int
16147main ()
16148{
16149return $ac_func ();
16150 ;
16151 return 0;
16152}
16153_ACEOF
16154rm -f conftest.$ac_objext conftest$ac_exeext
16155if { (ac_try="$ac_link"
16156case "(($ac_try" in
16157 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16158 *) ac_try_echo=$ac_try;;
16159esac
16160eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16161 (eval "$ac_link") 2>conftest.er1
16162 ac_status=$?
16163 grep -v '^ *+' conftest.er1 >conftest.err
16164 rm -f conftest.er1
16165 cat conftest.err >&5
16166 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16167 (exit $ac_status); } && {
16168 test -z "$ac_c_werror_flag" ||
16169 test ! -s conftest.err
16170 } && test -s conftest$ac_exeext &&
16171 $as_test_x conftest$ac_exeext; then
16172 eval "$as_ac_var=yes"
16173else
16174 echo "$as_me: failed program was:" >&5
16175sed 's/^/| /' conftest.$ac_ext >&5
16176
16177 eval "$as_ac_var=no"
16178fi
16179
16180rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16181 conftest$ac_exeext conftest.$ac_ext
16182fi
16183ac_res=`eval echo '${'$as_ac_var'}'`
16184 { echo "$as_me:$LINENO: result: $ac_res" >&5
16185echo "${ECHO_T}$ac_res" >&6; }
16186if test `eval echo '${'$as_ac_var'}'` = yes; then
16187 cat >>confdefs.h <<_ACEOF 9658 cat >>confdefs.h <<_ACEOF
16188#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 9659#define HAVE_GETLASTLOGXBYNAME 1
16189_ACEOF 9660_ACEOF
16190 9661
16191fi 9662fi
16192done 9663done
16193 9664
16194 9665
16195{ echo "$as_me:$LINENO: checking for daemon" >&5 9666ac_fn_c_check_func "$LINENO" "daemon" "ac_cv_func_daemon"
16196echo $ECHO_N "checking for daemon... $ECHO_C" >&6; } 9667if test "x$ac_cv_func_daemon" = xyes; then :
16197if test "${ac_cv_func_daemon+set}" = set; then
16198 echo $ECHO_N "(cached) $ECHO_C" >&6
16199else
16200 cat >conftest.$ac_ext <<_ACEOF
16201/* confdefs.h. */
16202_ACEOF
16203cat confdefs.h >>conftest.$ac_ext
16204cat >>conftest.$ac_ext <<_ACEOF
16205/* end confdefs.h. */
16206/* Define daemon to an innocuous variant, in case <limits.h> declares daemon.
16207 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16208#define daemon innocuous_daemon
16209
16210/* System header to define __stub macros and hopefully few prototypes,
16211 which can conflict with char daemon (); below.
16212 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16213 <limits.h> exists even on freestanding compilers. */
16214
16215#ifdef __STDC__
16216# include <limits.h>
16217#else
16218# include <assert.h>
16219#endif
16220
16221#undef daemon
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
16227extern "C"
16228#endif
16229char daemon ();
16230/* The GNU C library defines this for functions which it implements
16231 to always fail with ENOSYS. Some functions are actually named
16232 something starting with __ and the normal name is an alias. */
16233#if defined __stub_daemon || defined __stub___daemon
16234choke me
16235#endif
16236 9668
16237int 9669$as_echo "#define HAVE_DAEMON 1" >>confdefs.h
16238main ()
16239{
16240return daemon ();
16241 ;
16242 return 0;
16243}
16244_ACEOF
16245rm -f conftest.$ac_objext conftest$ac_exeext
16246if { (ac_try="$ac_link"
16247case "(($ac_try" in
16248 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16249 *) ac_try_echo=$ac_try;;
16250esac
16251eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16252 (eval "$ac_link") 2>conftest.er1
16253 ac_status=$?
16254 grep -v '^ *+' conftest.er1 >conftest.err
16255 rm -f conftest.er1
16256 cat conftest.err >&5
16257 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16258 (exit $ac_status); } && {
16259 test -z "$ac_c_werror_flag" ||
16260 test ! -s conftest.err
16261 } && test -s conftest$ac_exeext &&
16262 $as_test_x conftest$ac_exeext; then
16263 ac_cv_func_daemon=yes
16264else
16265 echo "$as_me: failed program was:" >&5
16266sed 's/^/| /' conftest.$ac_ext >&5
16267
16268 ac_cv_func_daemon=no
16269fi
16270
16271rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16272 conftest$ac_exeext conftest.$ac_ext
16273fi
16274{ echo "$as_me:$LINENO: result: $ac_cv_func_daemon" >&5
16275echo "${ECHO_T}$ac_cv_func_daemon" >&6; }
16276if test $ac_cv_func_daemon = yes; then
16277
16278cat >>confdefs.h <<\_ACEOF
16279#define HAVE_DAEMON 1
16280_ACEOF
16281 9670
16282else 9671else
16283 { echo "$as_me:$LINENO: checking for daemon in -lbsd" >&5 9672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for daemon in -lbsd" >&5
16284echo $ECHO_N "checking for daemon in -lbsd... $ECHO_C" >&6; } 9673$as_echo_n "checking for daemon in -lbsd... " >&6; }
16285if test "${ac_cv_lib_bsd_daemon+set}" = set; then 9674if ${ac_cv_lib_bsd_daemon+:} false; then :
16286 echo $ECHO_N "(cached) $ECHO_C" >&6 9675 $as_echo_n "(cached) " >&6
16287else 9676else
16288 ac_check_lib_save_LIBS=$LIBS 9677 ac_check_lib_save_LIBS=$LIBS
16289LIBS="-lbsd $LIBS" 9678LIBS="-lbsd $LIBS"
16290cat >conftest.$ac_ext <<_ACEOF 9679cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16291/* confdefs.h. */
16292_ACEOF
16293cat confdefs.h >>conftest.$ac_ext
16294cat >>conftest.$ac_ext <<_ACEOF
16295/* end confdefs.h. */ 9680/* end confdefs.h. */
16296 9681
16297/* Override any GCC internal prototype to avoid an error. 9682/* Override any GCC internal prototype to avoid an error.
@@ -16309,42 +9694,19 @@ return daemon ();
16309 return 0; 9694 return 0;
16310} 9695}
16311_ACEOF 9696_ACEOF
16312rm -f conftest.$ac_objext conftest$ac_exeext 9697if ac_fn_c_try_link "$LINENO"; then :
16313if { (ac_try="$ac_link"
16314case "(($ac_try" in
16315 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16316 *) ac_try_echo=$ac_try;;
16317esac
16318eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16319 (eval "$ac_link") 2>conftest.er1
16320 ac_status=$?
16321 grep -v '^ *+' conftest.er1 >conftest.err
16322 rm -f conftest.er1
16323 cat conftest.err >&5
16324 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16325 (exit $ac_status); } && {
16326 test -z "$ac_c_werror_flag" ||
16327 test ! -s conftest.err
16328 } && test -s conftest$ac_exeext &&
16329 $as_test_x conftest$ac_exeext; then
16330 ac_cv_lib_bsd_daemon=yes 9698 ac_cv_lib_bsd_daemon=yes
16331else 9699else
16332 echo "$as_me: failed program was:" >&5 9700 ac_cv_lib_bsd_daemon=no
16333sed 's/^/| /' conftest.$ac_ext >&5
16334
16335 ac_cv_lib_bsd_daemon=no
16336fi 9701fi
16337 9702rm -f core conftest.err conftest.$ac_objext \
16338rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9703 conftest$ac_exeext conftest.$ac_ext
16339 conftest$ac_exeext conftest.$ac_ext
16340LIBS=$ac_check_lib_save_LIBS 9704LIBS=$ac_check_lib_save_LIBS
16341fi 9705fi
16342{ echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_daemon" >&5 9706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_daemon" >&5
16343echo "${ECHO_T}$ac_cv_lib_bsd_daemon" >&6; } 9707$as_echo "$ac_cv_lib_bsd_daemon" >&6; }
16344if test $ac_cv_lib_bsd_daemon = yes; then 9708if test "x$ac_cv_lib_bsd_daemon" = xyes; then :
16345 LIBS="$LIBS -lbsd"; cat >>confdefs.h <<\_ACEOF 9709 LIBS="$LIBS -lbsd"; $as_echo "#define HAVE_DAEMON 1" >>confdefs.h
16346#define HAVE_DAEMON 1
16347_ACEOF
16348 9710
16349fi 9711fi
16350 9712
@@ -16352,106 +9714,20 @@ fi
16352fi 9714fi
16353 9715
16354 9716
16355{ echo "$as_me:$LINENO: checking for getpagesize" >&5 9717ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
16356echo $ECHO_N "checking for getpagesize... $ECHO_C" >&6; } 9718if test "x$ac_cv_func_getpagesize" = xyes; then :
16357if test "${ac_cv_func_getpagesize+set}" = set; then
16358 echo $ECHO_N "(cached) $ECHO_C" >&6
16359else
16360 cat >conftest.$ac_ext <<_ACEOF
16361/* confdefs.h. */
16362_ACEOF
16363cat confdefs.h >>conftest.$ac_ext
16364cat >>conftest.$ac_ext <<_ACEOF
16365/* end confdefs.h. */
16366/* Define getpagesize to an innocuous variant, in case <limits.h> declares getpagesize.
16367 For example, HP-UX 11i <limits.h> declares gettimeofday. */
16368#define getpagesize innocuous_getpagesize
16369
16370/* System header to define __stub macros and hopefully few prototypes,
16371 which can conflict with char getpagesize (); below.
16372 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
16373 <limits.h> exists even on freestanding compilers. */
16374
16375#ifdef __STDC__
16376# include <limits.h>
16377#else
16378# include <assert.h>
16379#endif
16380
16381#undef getpagesize
16382
16383/* Override any GCC internal prototype to avoid an error.
16384 Use char because int might match the return type of a GCC
16385 builtin and then its argument prototype would still apply. */
16386#ifdef __cplusplus
16387extern "C"
16388#endif
16389char getpagesize ();
16390/* The GNU C library defines this for functions which it implements
16391 to always fail with ENOSYS. Some functions are actually named
16392 something starting with __ and the normal name is an alias. */
16393#if defined __stub_getpagesize || defined __stub___getpagesize
16394choke me
16395#endif
16396
16397int
16398main ()
16399{
16400return getpagesize ();
16401 ;
16402 return 0;
16403}
16404_ACEOF
16405rm -f conftest.$ac_objext conftest$ac_exeext
16406if { (ac_try="$ac_link"
16407case "(($ac_try" in
16408 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16409 *) ac_try_echo=$ac_try;;
16410esac
16411eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16412 (eval "$ac_link") 2>conftest.er1
16413 ac_status=$?
16414 grep -v '^ *+' conftest.er1 >conftest.err
16415 rm -f conftest.er1
16416 cat conftest.err >&5
16417 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16418 (exit $ac_status); } && {
16419 test -z "$ac_c_werror_flag" ||
16420 test ! -s conftest.err
16421 } && test -s conftest$ac_exeext &&
16422 $as_test_x conftest$ac_exeext; then
16423 ac_cv_func_getpagesize=yes
16424else
16425 echo "$as_me: failed program was:" >&5
16426sed 's/^/| /' conftest.$ac_ext >&5
16427
16428 ac_cv_func_getpagesize=no
16429fi
16430
16431rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
16432 conftest$ac_exeext conftest.$ac_ext
16433fi
16434{ echo "$as_me:$LINENO: result: $ac_cv_func_getpagesize" >&5
16435echo "${ECHO_T}$ac_cv_func_getpagesize" >&6; }
16436if test $ac_cv_func_getpagesize = yes; then
16437 9719
16438cat >>confdefs.h <<\_ACEOF 9720$as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
16439#define HAVE_GETPAGESIZE 1
16440_ACEOF
16441 9721
16442else 9722else
16443 { echo "$as_me:$LINENO: checking for getpagesize in -lucb" >&5 9723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize in -lucb" >&5
16444echo $ECHO_N "checking for getpagesize in -lucb... $ECHO_C" >&6; } 9724$as_echo_n "checking for getpagesize in -lucb... " >&6; }
16445if test "${ac_cv_lib_ucb_getpagesize+set}" = set; then 9725if ${ac_cv_lib_ucb_getpagesize+:} false; then :
16446 echo $ECHO_N "(cached) $ECHO_C" >&6 9726 $as_echo_n "(cached) " >&6
16447else 9727else
16448 ac_check_lib_save_LIBS=$LIBS 9728 ac_check_lib_save_LIBS=$LIBS
16449LIBS="-lucb $LIBS" 9729LIBS="-lucb $LIBS"
16450cat >conftest.$ac_ext <<_ACEOF 9730cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16451/* confdefs.h. */
16452_ACEOF
16453cat confdefs.h >>conftest.$ac_ext
16454cat >>conftest.$ac_ext <<_ACEOF
16455/* end confdefs.h. */ 9731/* end confdefs.h. */
16456 9732
16457/* Override any GCC internal prototype to avoid an error. 9733/* Override any GCC internal prototype to avoid an error.
@@ -16469,42 +9745,19 @@ return getpagesize ();
16469 return 0; 9745 return 0;
16470} 9746}
16471_ACEOF 9747_ACEOF
16472rm -f conftest.$ac_objext conftest$ac_exeext 9748if ac_fn_c_try_link "$LINENO"; then :
16473if { (ac_try="$ac_link"
16474case "(($ac_try" in
16475 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16476 *) ac_try_echo=$ac_try;;
16477esac
16478eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16479 (eval "$ac_link") 2>conftest.er1
16480 ac_status=$?
16481 grep -v '^ *+' conftest.er1 >conftest.err
16482 rm -f conftest.er1
16483 cat conftest.err >&5
16484 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16485 (exit $ac_status); } && {
16486 test -z "$ac_c_werror_flag" ||
16487 test ! -s conftest.err
16488 } && test -s conftest$ac_exeext &&
16489 $as_test_x conftest$ac_exeext; then
16490 ac_cv_lib_ucb_getpagesize=yes 9749 ac_cv_lib_ucb_getpagesize=yes
16491else 9750else
16492 echo "$as_me: failed program was:" >&5 9751 ac_cv_lib_ucb_getpagesize=no
16493sed 's/^/| /' conftest.$ac_ext >&5
16494
16495 ac_cv_lib_ucb_getpagesize=no
16496fi 9752fi
16497 9753rm -f core conftest.err conftest.$ac_objext \
16498rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 9754 conftest$ac_exeext conftest.$ac_ext
16499 conftest$ac_exeext conftest.$ac_ext
16500LIBS=$ac_check_lib_save_LIBS 9755LIBS=$ac_check_lib_save_LIBS
16501fi 9756fi
16502{ echo "$as_me:$LINENO: result: $ac_cv_lib_ucb_getpagesize" >&5 9757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ucb_getpagesize" >&5
16503echo "${ECHO_T}$ac_cv_lib_ucb_getpagesize" >&6; } 9758$as_echo "$ac_cv_lib_ucb_getpagesize" >&6; }
16504if test $ac_cv_lib_ucb_getpagesize = yes; then 9759if test "x$ac_cv_lib_ucb_getpagesize" = xyes; then :
16505 LIBS="$LIBS -lucb"; cat >>confdefs.h <<\_ACEOF 9760 LIBS="$LIBS -lucb"; $as_echo "#define HAVE_GETPAGESIZE 1" >>confdefs.h
16506#define HAVE_GETPAGESIZE 1
16507_ACEOF
16508 9761
16509fi 9762fi
16510 9763
@@ -16514,68 +9767,46 @@ fi
16514 9767
16515# Check for broken snprintf 9768# Check for broken snprintf
16516if test "x$ac_cv_func_snprintf" = "xyes" ; then 9769if test "x$ac_cv_func_snprintf" = "xyes" ; then
16517 { echo "$as_me:$LINENO: checking whether snprintf correctly terminates long strings" >&5 9770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf correctly terminates long strings" >&5
16518echo $ECHO_N "checking whether snprintf correctly terminates long strings... $ECHO_C" >&6; } 9771$as_echo_n "checking whether snprintf correctly terminates long strings... " >&6; }
16519 if test "$cross_compiling" = yes; then 9772 if test "$cross_compiling" = yes; then :
16520 { echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working snprintf()" >&5 9773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
16521echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;} 9774$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
16522 9775
16523else 9776else
16524 cat >conftest.$ac_ext <<_ACEOF 9777 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16525/* confdefs.h. */
16526_ACEOF
16527cat confdefs.h >>conftest.$ac_ext
16528cat >>conftest.$ac_ext <<_ACEOF
16529/* end confdefs.h. */ 9778/* end confdefs.h. */
9779 #include <stdio.h>
9780int
9781main ()
9782{
16530 9783
16531#include <stdio.h> 9784 char b[5];
16532int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');} 9785 snprintf(b,5,"123456789");
9786 exit(b[4]!='\0');
16533 9787
9788 ;
9789 return 0;
9790}
16534_ACEOF 9791_ACEOF
16535rm -f conftest$ac_exeext 9792if ac_fn_c_try_run "$LINENO"; then :
16536if { (ac_try="$ac_link" 9793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16537case "(($ac_try" in 9794$as_echo "yes" >&6; }
16538 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16539 *) ac_try_echo=$ac_try;;
16540esac
16541eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16542 (eval "$ac_link") 2>&5
16543 ac_status=$?
16544 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16545 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16546 { (case "(($ac_try" in
16547 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16548 *) ac_try_echo=$ac_try;;
16549esac
16550eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16551 (eval "$ac_try") 2>&5
16552 ac_status=$?
16553 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16554 (exit $ac_status); }; }; then
16555 { echo "$as_me:$LINENO: result: yes" >&5
16556echo "${ECHO_T}yes" >&6; }
16557else 9795else
16558 echo "$as_me: program exited with status $ac_status" >&5
16559echo "$as_me: failed program was:" >&5
16560sed 's/^/| /' conftest.$ac_ext >&5
16561 9796
16562( exit $ac_status ) 9797 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9798$as_echo "no" >&6; }
16563 9799
16564 { echo "$as_me:$LINENO: result: no" >&5 9800$as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
16565echo "${ECHO_T}no" >&6; }
16566 9801
16567cat >>confdefs.h <<\_ACEOF 9802 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
16568#define BROKEN_SNPRINTF 1 9803$as_echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
16569_ACEOF
16570
16571 { echo "$as_me:$LINENO: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&5
16572echo "$as_me: WARNING: ****** Your snprintf() function is broken, complain to your vendor" >&2;}
16573 9804
16574fi 9805fi
16575rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 9806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9807 conftest.$ac_objext conftest.beam conftest.$ac_ext
16576fi 9808fi
16577 9809
16578
16579fi 9810fi
16580 9811
16581# If we don't have a working asprintf, then we strongly depend on vsnprintf 9812# If we don't have a working asprintf, then we strongly depend on vsnprintf
@@ -16583,18 +9814,14 @@ fi
16583# create (as per SUSv3) 9814# create (as per SUSv3)
16584if test "x$ac_cv_func_asprintf" != "xyes" && \ 9815if test "x$ac_cv_func_asprintf" != "xyes" && \
16585 test "x$ac_cv_func_vsnprintf" = "xyes" ; then 9816 test "x$ac_cv_func_vsnprintf" = "xyes" ; then
16586 { echo "$as_me:$LINENO: checking whether vsnprintf returns correct values on overflow" >&5 9817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf returns correct values on overflow" >&5
16587echo $ECHO_N "checking whether vsnprintf returns correct values on overflow... $ECHO_C" >&6; } 9818$as_echo_n "checking whether vsnprintf returns correct values on overflow... " >&6; }
16588 if test "$cross_compiling" = yes; then 9819 if test "$cross_compiling" = yes; then :
16589 { echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working vsnprintf()" >&5 9820 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working vsnprintf()" >&5
16590echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;} 9821$as_echo "$as_me: WARNING: cross compiling: Assuming working vsnprintf()" >&2;}
16591 9822
16592else 9823else
16593 cat >conftest.$ac_ext <<_ACEOF 9824 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16594/* confdefs.h. */
16595_ACEOF
16596cat confdefs.h >>conftest.$ac_ext
16597cat >>conftest.$ac_ext <<_ACEOF
16598/* end confdefs.h. */ 9825/* end confdefs.h. */
16599 9826
16600#include <sys/types.h> 9827#include <sys/types.h>
@@ -16607,125 +9834,83 @@ int x_snprintf(char *str,size_t count,const char *fmt,...)
16607 va_start(ap, fmt); ret = vsnprintf(str, count, fmt, ap); va_end(ap); 9834 va_start(ap, fmt); ret = vsnprintf(str, count, fmt, ap); va_end(ap);
16608 return ret; 9835 return ret;
16609} 9836}
16610int main(void) 9837
9838int
9839main ()
16611{ 9840{
9841
16612 char x[1]; 9842 char x[1];
16613 exit(x_snprintf(x, 1, "%s %d", "hello", 12345) == 11 ? 0 : 1); 9843 exit(x_snprintf(x, 1, "%s %d", "hello", 12345) == 11 ? 0 : 1);
9844
9845 ;
9846 return 0;
16614} 9847}
16615_ACEOF 9848_ACEOF
16616rm -f conftest$ac_exeext 9849if ac_fn_c_try_run "$LINENO"; then :
16617if { (ac_try="$ac_link" 9850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16618case "(($ac_try" in 9851$as_echo "yes" >&6; }
16619 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16620 *) ac_try_echo=$ac_try;;
16621esac
16622eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16623 (eval "$ac_link") 2>&5
16624 ac_status=$?
16625 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16626 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16627 { (case "(($ac_try" in
16628 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16629 *) ac_try_echo=$ac_try;;
16630esac
16631eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16632 (eval "$ac_try") 2>&5
16633 ac_status=$?
16634 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16635 (exit $ac_status); }; }; then
16636 { echo "$as_me:$LINENO: result: yes" >&5
16637echo "${ECHO_T}yes" >&6; }
16638else 9852else
16639 echo "$as_me: program exited with status $ac_status" >&5
16640echo "$as_me: failed program was:" >&5
16641sed 's/^/| /' conftest.$ac_ext >&5
16642 9853
16643( exit $ac_status ) 9854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9855$as_echo "no" >&6; }
16644 9856
16645 { echo "$as_me:$LINENO: result: no" >&5 9857$as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
16646echo "${ECHO_T}no" >&6; }
16647 9858
16648cat >>confdefs.h <<\_ACEOF 9859 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&5
16649#define BROKEN_SNPRINTF 1 9860$as_echo "$as_me: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&2;}
16650_ACEOF
16651
16652 { echo "$as_me:$LINENO: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&5
16653echo "$as_me: WARNING: ****** Your vsnprintf() function is broken, complain to your vendor" >&2;}
16654 9861
16655fi 9862fi
16656rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 9863rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9864 conftest.$ac_objext conftest.beam conftest.$ac_ext
16657fi 9865fi
16658 9866
16659
16660fi 9867fi
16661 9868
16662# On systems where [v]snprintf is broken, but is declared in stdio, 9869# On systems where [v]snprintf is broken, but is declared in stdio,
16663# check that the fmt argument is const char * or just char *. 9870# check that the fmt argument is const char * or just char *.
16664# This is only useful for when BROKEN_SNPRINTF 9871# This is only useful for when BROKEN_SNPRINTF
16665{ echo "$as_me:$LINENO: checking whether snprintf can declare const char *fmt" >&5 9872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf can declare const char *fmt" >&5
16666echo $ECHO_N "checking whether snprintf can declare const char *fmt... $ECHO_C" >&6; } 9873$as_echo_n "checking whether snprintf can declare const char *fmt... " >&6; }
16667cat >conftest.$ac_ext <<_ACEOF 9874cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16668/* confdefs.h. */
16669_ACEOF
16670cat confdefs.h >>conftest.$ac_ext
16671cat >>conftest.$ac_ext <<_ACEOF
16672/* end confdefs.h. */ 9875/* end confdefs.h. */
9876
16673#include <stdio.h> 9877#include <stdio.h>
16674 int snprintf(char *a, size_t b, const char *c, ...) { return 0; } 9878int snprintf(char *a, size_t b, const char *c, ...) { return 0; }
16675 int main(void) { snprintf(0, 0, 0); }
16676 9879
16677_ACEOF 9880int
16678rm -f conftest.$ac_objext 9881main ()
16679if { (ac_try="$ac_compile" 9882{
16680case "(($ac_try" in
16681 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16682 *) ac_try_echo=$ac_try;;
16683esac
16684eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16685 (eval "$ac_compile") 2>conftest.er1
16686 ac_status=$?
16687 grep -v '^ *+' conftest.er1 >conftest.err
16688 rm -f conftest.er1
16689 cat conftest.err >&5
16690 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16691 (exit $ac_status); } && {
16692 test -z "$ac_c_werror_flag" ||
16693 test ! -s conftest.err
16694 } && test -s conftest.$ac_objext; then
16695 { echo "$as_me:$LINENO: result: yes" >&5
16696echo "${ECHO_T}yes" >&6; }
16697 9883
16698cat >>confdefs.h <<\_ACEOF 9884 snprintf(0, 0, 0);
16699#define SNPRINTF_CONST const 9885
9886 ;
9887 return 0;
9888}
16700_ACEOF 9889_ACEOF
9890if ac_fn_c_try_compile "$LINENO"; then :
9891 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9892$as_echo "yes" >&6; }
16701 9893
16702else 9894$as_echo "#define SNPRINTF_CONST const" >>confdefs.h
16703 echo "$as_me: failed program was:" >&5
16704sed 's/^/| /' conftest.$ac_ext >&5
16705 9895
16706 { echo "$as_me:$LINENO: result: no" >&5 9896else
16707echo "${ECHO_T}no" >&6; } 9897 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16708 cat >>confdefs.h <<\_ACEOF 9898$as_echo "no" >&6; }
16709#define SNPRINTF_CONST /* not const */ 9899 $as_echo "#define SNPRINTF_CONST /* not const */" >>confdefs.h
16710_ACEOF
16711 9900
16712fi 9901fi
16713
16714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16715 9903
16716# Check for missing getpeereid (or equiv) support 9904# Check for missing getpeereid (or equiv) support
16717NO_PEERCHECK="" 9905NO_PEERCHECK=""
16718if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then 9906if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then
16719 { echo "$as_me:$LINENO: checking whether system supports SO_PEERCRED getsockopt" >&5 9907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system supports SO_PEERCRED getsockopt" >&5
16720echo $ECHO_N "checking whether system supports SO_PEERCRED getsockopt... $ECHO_C" >&6; } 9908$as_echo_n "checking whether system supports SO_PEERCRED getsockopt... " >&6; }
16721 cat >conftest.$ac_ext <<_ACEOF 9909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16722/* confdefs.h. */
16723_ACEOF
16724cat confdefs.h >>conftest.$ac_ext
16725cat >>conftest.$ac_ext <<_ACEOF
16726/* end confdefs.h. */ 9910/* end confdefs.h. */
9911
16727#include <sys/types.h> 9912#include <sys/types.h>
16728 #include <sys/socket.h> 9913#include <sys/socket.h>
16729int 9914int
16730main () 9915main ()
16731{ 9916{
@@ -16734,134 +9919,84 @@ int i = SO_PEERCRED;
16734 return 0; 9919 return 0;
16735} 9920}
16736_ACEOF 9921_ACEOF
16737rm -f conftest.$ac_objext 9922if ac_fn_c_try_compile "$LINENO"; then :
16738if { (ac_try="$ac_compile" 9923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16739case "(($ac_try" in 9924$as_echo "yes" >&6; }
16740 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16741 *) ac_try_echo=$ac_try;;
16742esac
16743eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16744 (eval "$ac_compile") 2>conftest.er1
16745 ac_status=$?
16746 grep -v '^ *+' conftest.er1 >conftest.err
16747 rm -f conftest.er1
16748 cat conftest.err >&5
16749 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16750 (exit $ac_status); } && {
16751 test -z "$ac_c_werror_flag" ||
16752 test ! -s conftest.err
16753 } && test -s conftest.$ac_objext; then
16754 { echo "$as_me:$LINENO: result: yes" >&5
16755echo "${ECHO_T}yes" >&6; }
16756 9925
16757cat >>confdefs.h <<\_ACEOF 9926$as_echo "#define HAVE_SO_PEERCRED 1" >>confdefs.h
16758#define HAVE_SO_PEERCRED 1
16759_ACEOF
16760 9927
16761 9928
16762else 9929else
16763 echo "$as_me: failed program was:" >&5 9930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16764sed 's/^/| /' conftest.$ac_ext >&5 9931$as_echo "no" >&6; }
16765
16766 { echo "$as_me:$LINENO: result: no" >&5
16767echo "${ECHO_T}no" >&6; }
16768 NO_PEERCHECK=1 9932 NO_PEERCHECK=1
16769 9933
16770fi 9934fi
16771
16772rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16773fi 9936fi
16774 9937
16775if test "x$ac_cv_func_mkdtemp" = "xyes" ; then 9938if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
16776{ echo "$as_me:$LINENO: checking for (overly) strict mkstemp" >&5 9939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for (overly) strict mkstemp" >&5
16777echo $ECHO_N "checking for (overly) strict mkstemp... $ECHO_C" >&6; } 9940$as_echo_n "checking for (overly) strict mkstemp... " >&6; }
16778if test "$cross_compiling" = yes; then 9941if test "$cross_compiling" = yes; then :
16779 9942
16780 { echo "$as_me:$LINENO: result: yes" >&5 9943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16781echo "${ECHO_T}yes" >&6; } 9944$as_echo "yes" >&6; }
16782 cat >>confdefs.h <<\_ACEOF 9945 $as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
16783#define HAVE_STRICT_MKSTEMP 1
16784_ACEOF
16785 9946
16786 9947
16787 9948
16788else 9949else
16789 cat >conftest.$ac_ext <<_ACEOF 9950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16790/* confdefs.h. */
16791_ACEOF
16792cat confdefs.h >>conftest.$ac_ext
16793cat >>conftest.$ac_ext <<_ACEOF
16794/* end confdefs.h. */ 9951/* end confdefs.h. */
16795 9952
16796#include <stdlib.h> 9953#include <stdlib.h>
16797main() { char template[]="conftest.mkstemp-test";
16798if (mkstemp(template) == -1)
16799 exit(1);
16800unlink(template); exit(0);
16801}
16802 9954
9955int
9956main ()
9957{
9958
9959 char template[]="conftest.mkstemp-test";
9960 if (mkstemp(template) == -1)
9961 exit(1);
9962 unlink(template);
9963 exit(0);
9964
9965 ;
9966 return 0;
9967}
16803_ACEOF 9968_ACEOF
16804rm -f conftest$ac_exeext 9969if ac_fn_c_try_run "$LINENO"; then :
16805if { (ac_try="$ac_link"
16806case "(($ac_try" in
16807 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16808 *) ac_try_echo=$ac_try;;
16809esac
16810eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16811 (eval "$ac_link") 2>&5
16812 ac_status=$?
16813 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16814 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16815 { (case "(($ac_try" in
16816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16817 *) ac_try_echo=$ac_try;;
16818esac
16819eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16820 (eval "$ac_try") 2>&5
16821 ac_status=$?
16822 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16823 (exit $ac_status); }; }; then
16824 9970
16825 { echo "$as_me:$LINENO: result: no" >&5 9971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16826echo "${ECHO_T}no" >&6; } 9972$as_echo "no" >&6; }
16827 9973
16828else 9974else
16829 echo "$as_me: program exited with status $ac_status" >&5
16830echo "$as_me: failed program was:" >&5
16831sed 's/^/| /' conftest.$ac_ext >&5
16832 9975
16833( exit $ac_status ) 9976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
9977$as_echo "yes" >&6; }
16834 9978
16835 { echo "$as_me:$LINENO: result: yes" >&5 9979$as_echo "#define HAVE_STRICT_MKSTEMP 1" >>confdefs.h
16836echo "${ECHO_T}yes" >&6; }
16837
16838cat >>confdefs.h <<\_ACEOF
16839#define HAVE_STRICT_MKSTEMP 1
16840_ACEOF
16841 9980
16842 9981
16843fi 9982fi
16844rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 9983rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9984 conftest.$ac_objext conftest.beam conftest.$ac_ext
16845fi 9985fi
16846 9986
16847
16848fi 9987fi
16849 9988
16850if test ! -z "$check_for_openpty_ctty_bug"; then 9989if test ! -z "$check_for_openpty_ctty_bug"; then
16851 { echo "$as_me:$LINENO: checking if openpty correctly handles controlling tty" >&5 9990 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openpty correctly handles controlling tty" >&5
16852echo $ECHO_N "checking if openpty correctly handles controlling tty... $ECHO_C" >&6; } 9991$as_echo_n "checking if openpty correctly handles controlling tty... " >&6; }
16853 if test "$cross_compiling" = yes; then 9992 if test "$cross_compiling" = yes; then :
16854 9993
16855 { echo "$as_me:$LINENO: result: cross-compiling" >&5 9994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
16856echo "${ECHO_T}cross-compiling" >&6; } 9995$as_echo "cross-compiling, assuming yes" >&6; }
16857 9996
16858 9997
16859else 9998else
16860 cat >conftest.$ac_ext <<_ACEOF 9999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16861/* confdefs.h. */
16862_ACEOF
16863cat confdefs.h >>conftest.$ac_ext
16864cat >>conftest.$ac_ext <<_ACEOF
16865/* end confdefs.h. */ 10000/* end confdefs.h. */
16866 10001
16867#include <stdio.h> 10002#include <stdio.h>
@@ -16870,8 +10005,9 @@ cat >>conftest.$ac_ext <<_ACEOF
16870#include <sys/wait.h> 10005#include <sys/wait.h>
16871 10006
16872int 10007int
16873main() 10008main ()
16874{ 10009{
10010
16875 pid_t pid; 10011 pid_t pid;
16876 int fd, ptyfd, ttyfd, status; 10012 int fd, ptyfd, ttyfd, status;
16877 10013
@@ -16894,70 +10030,42 @@ main()
16894 else 10030 else
16895 exit(0); /* Did not acquire ctty: OK */ 10031 exit(0); /* Did not acquire ctty: OK */
16896 } 10032 }
16897}
16898 10033
10034 ;
10035 return 0;
10036}
16899_ACEOF 10037_ACEOF
16900rm -f conftest$ac_exeext 10038if ac_fn_c_try_run "$LINENO"; then :
16901if { (ac_try="$ac_link"
16902case "(($ac_try" in
16903 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16904 *) ac_try_echo=$ac_try;;
16905esac
16906eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16907 (eval "$ac_link") 2>&5
16908 ac_status=$?
16909 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16910 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16911 { (case "(($ac_try" in
16912 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
16913 *) ac_try_echo=$ac_try;;
16914esac
16915eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
16916 (eval "$ac_try") 2>&5
16917 ac_status=$?
16918 echo "$as_me:$LINENO: \$? = $ac_status" >&5
16919 (exit $ac_status); }; }; then
16920 10039
16921 { echo "$as_me:$LINENO: result: yes" >&5 10040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16922echo "${ECHO_T}yes" >&6; } 10041$as_echo "yes" >&6; }
16923 10042
16924else 10043else
16925 echo "$as_me: program exited with status $ac_status" >&5
16926echo "$as_me: failed program was:" >&5
16927sed 's/^/| /' conftest.$ac_ext >&5
16928
16929( exit $ac_status )
16930 10044
16931 { echo "$as_me:$LINENO: result: no" >&5 10045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16932echo "${ECHO_T}no" >&6; } 10046$as_echo "no" >&6; }
16933 cat >>confdefs.h <<\_ACEOF 10047 $as_echo "#define SSHD_ACQUIRES_CTTY 1" >>confdefs.h
16934#define SSHD_ACQUIRES_CTTY 1
16935_ACEOF
16936 10048
16937 10049
16938fi 10050fi
16939rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 10051rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10052 conftest.$ac_objext conftest.beam conftest.$ac_ext
16940fi 10053fi
16941 10054
16942
16943fi 10055fi
16944 10056
16945if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ 10057if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
16946 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then 10058 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
16947 { echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5 10059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
16948echo $ECHO_N "checking if getaddrinfo seems to work... $ECHO_C" >&6; } 10060$as_echo_n "checking if getaddrinfo seems to work... " >&6; }
16949 if test "$cross_compiling" = yes; then 10061 if test "$cross_compiling" = yes; then :
16950 10062
16951 { echo "$as_me:$LINENO: result: cross-compiling" >&5 10063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming yes" >&5
16952echo "${ECHO_T}cross-compiling" >&6; } 10064$as_echo "cross-compiling, assuming yes" >&6; }
16953 10065
16954 10066
16955else 10067else
16956 cat >conftest.$ac_ext <<_ACEOF 10068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16957/* confdefs.h. */
16958_ACEOF
16959cat confdefs.h >>conftest.$ac_ext
16960cat >>conftest.$ac_ext <<_ACEOF
16961/* end confdefs.h. */ 10069/* end confdefs.h. */
16962 10070
16963#include <stdio.h> 10071#include <stdio.h>
@@ -16969,8 +10077,9 @@ cat >>conftest.$ac_ext <<_ACEOF
16969#define TEST_PORT "2222" 10077#define TEST_PORT "2222"
16970 10078
16971int 10079int
16972main(void) 10080main ()
16973{ 10081{
10082
16974 int err, sock; 10083 int err, sock;
16975 struct addrinfo *gai_ai, *ai, hints; 10084 struct addrinfo *gai_ai, *ai, hints;
16976 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL; 10085 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
@@ -17012,70 +10121,42 @@ main(void)
17012 } 10121 }
17013 } 10122 }
17014 exit(0); 10123 exit(0);
17015}
17016 10124
10125 ;
10126 return 0;
10127}
17017_ACEOF 10128_ACEOF
17018rm -f conftest$ac_exeext 10129if ac_fn_c_try_run "$LINENO"; then :
17019if { (ac_try="$ac_link"
17020case "(($ac_try" in
17021 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17022 *) ac_try_echo=$ac_try;;
17023esac
17024eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17025 (eval "$ac_link") 2>&5
17026 ac_status=$?
17027 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17028 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17029 { (case "(($ac_try" in
17030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17031 *) ac_try_echo=$ac_try;;
17032esac
17033eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17034 (eval "$ac_try") 2>&5
17035 ac_status=$?
17036 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17037 (exit $ac_status); }; }; then
17038 10130
17039 { echo "$as_me:$LINENO: result: yes" >&5 10131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17040echo "${ECHO_T}yes" >&6; } 10132$as_echo "yes" >&6; }
17041 10133
17042else 10134else
17043 echo "$as_me: program exited with status $ac_status" >&5
17044echo "$as_me: failed program was:" >&5
17045sed 's/^/| /' conftest.$ac_ext >&5
17046 10135
17047( exit $ac_status ) 10136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17048 10137$as_echo "no" >&6; }
17049 { echo "$as_me:$LINENO: result: no" >&5 10138 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
17050echo "${ECHO_T}no" >&6; }
17051 cat >>confdefs.h <<\_ACEOF
17052#define BROKEN_GETADDRINFO 1
17053_ACEOF
17054 10139
17055 10140
17056fi 10141fi
17057rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 10142rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10143 conftest.$ac_objext conftest.beam conftest.$ac_ext
17058fi 10144fi
17059 10145
17060
17061fi 10146fi
17062 10147
17063if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ 10148if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
17064 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then 10149 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
17065 { echo "$as_me:$LINENO: checking if getaddrinfo seems to work" >&5 10150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if getaddrinfo seems to work" >&5
17066echo $ECHO_N "checking if getaddrinfo seems to work... $ECHO_C" >&6; } 10151$as_echo_n "checking if getaddrinfo seems to work... " >&6; }
17067 if test "$cross_compiling" = yes; then 10152 if test "$cross_compiling" = yes; then :
17068 10153
17069 { echo "$as_me:$LINENO: result: cross-compiling" >&5 10154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: cross-compiling, assuming no" >&5
17070echo "${ECHO_T}cross-compiling" >&6; } 10155$as_echo "cross-compiling, assuming no" >&6; }
17071 10156
17072 10157
17073else 10158else
17074 cat >conftest.$ac_ext <<_ACEOF 10159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17075/* confdefs.h. */
17076_ACEOF
17077cat confdefs.h >>conftest.$ac_ext
17078cat >>conftest.$ac_ext <<_ACEOF
17079/* end confdefs.h. */ 10160/* end confdefs.h. */
17080 10161
17081#include <stdio.h> 10162#include <stdio.h>
@@ -17087,8 +10168,9 @@ cat >>conftest.$ac_ext <<_ACEOF
17087#define TEST_PORT "2222" 10168#define TEST_PORT "2222"
17088 10169
17089int 10170int
17090main(void) 10171main ()
17091{ 10172{
10173
17092 int err, sock; 10174 int err, sock;
17093 struct addrinfo *gai_ai, *ai, hints; 10175 struct addrinfo *gai_ai, *ai, hints;
17094 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL; 10176 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
@@ -17118,119 +10200,72 @@ main(void)
17118 } 10200 }
17119 } 10201 }
17120 exit(0); 10202 exit(0);
17121}
17122 10203
10204 ;
10205 return 0;
10206}
17123_ACEOF 10207_ACEOF
17124rm -f conftest$ac_exeext 10208if ac_fn_c_try_run "$LINENO"; then :
17125if { (ac_try="$ac_link"
17126case "(($ac_try" in
17127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17128 *) ac_try_echo=$ac_try;;
17129esac
17130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17131 (eval "$ac_link") 2>&5
17132 ac_status=$?
17133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17134 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17135 { (case "(($ac_try" in
17136 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17137 *) ac_try_echo=$ac_try;;
17138esac
17139eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17140 (eval "$ac_try") 2>&5
17141 ac_status=$?
17142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17143 (exit $ac_status); }; }; then
17144 10209
17145 { echo "$as_me:$LINENO: result: yes" >&5 10210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17146echo "${ECHO_T}yes" >&6; } 10211$as_echo "yes" >&6; }
17147 10212
17148cat >>confdefs.h <<\_ACEOF 10213$as_echo "#define AIX_GETNAMEINFO_HACK 1" >>confdefs.h
17149#define AIX_GETNAMEINFO_HACK 1
17150_ACEOF
17151 10214
17152 10215
17153else 10216else
17154 echo "$as_me: program exited with status $ac_status" >&5
17155echo "$as_me: failed program was:" >&5
17156sed 's/^/| /' conftest.$ac_ext >&5
17157 10217
17158( exit $ac_status ) 10218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17159 10219$as_echo "no" >&6; }
17160 { echo "$as_me:$LINENO: result: no" >&5 10220 $as_echo "#define BROKEN_GETADDRINFO 1" >>confdefs.h
17161echo "${ECHO_T}no" >&6; }
17162 cat >>confdefs.h <<\_ACEOF
17163#define BROKEN_GETADDRINFO 1
17164_ACEOF
17165 10221
17166 10222
17167fi 10223fi
17168rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 10224rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10225 conftest.$ac_objext conftest.beam conftest.$ac_ext
17169fi 10226fi
17170 10227
17171
17172fi 10228fi
17173 10229
17174if test "x$check_for_conflicting_getspnam" = "x1"; then 10230if test "x$check_for_conflicting_getspnam" = "x1"; then
17175 { echo "$as_me:$LINENO: checking for conflicting getspnam in shadow.h" >&5 10231 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for conflicting getspnam in shadow.h" >&5
17176echo $ECHO_N "checking for conflicting getspnam in shadow.h... $ECHO_C" >&6; } 10232$as_echo_n "checking for conflicting getspnam in shadow.h... " >&6; }
17177 cat >conftest.$ac_ext <<_ACEOF 10233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17178 10234/* end confdefs.h. */
17179#include <shadow.h> 10235 #include <shadow.h>
17180int main(void) {exit(0);} 10236int
17181 10237main ()
10238{
10239 exit(0);
10240 ;
10241 return 0;
10242}
17182_ACEOF 10243_ACEOF
17183rm -f conftest.$ac_objext 10244if ac_fn_c_try_compile "$LINENO"; then :
17184if { (ac_try="$ac_compile"
17185case "(($ac_try" in
17186 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17187 *) ac_try_echo=$ac_try;;
17188esac
17189eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17190 (eval "$ac_compile") 2>conftest.er1
17191 ac_status=$?
17192 grep -v '^ *+' conftest.er1 >conftest.err
17193 rm -f conftest.er1
17194 cat conftest.err >&5
17195 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17196 (exit $ac_status); } && {
17197 test -z "$ac_c_werror_flag" ||
17198 test ! -s conftest.err
17199 } && test -s conftest.$ac_objext; then
17200 10245
17201 { echo "$as_me:$LINENO: result: no" >&5 10246 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17202echo "${ECHO_T}no" >&6; } 10247$as_echo "no" >&6; }
17203 10248
17204else 10249else
17205 echo "$as_me: failed program was:" >&5
17206sed 's/^/| /' conftest.$ac_ext >&5
17207 10250
10251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10252$as_echo "yes" >&6; }
17208 10253
17209 { echo "$as_me:$LINENO: result: yes" >&5 10254$as_echo "#define GETSPNAM_CONFLICTING_DEFS 1" >>confdefs.h
17210echo "${ECHO_T}yes" >&6; }
17211
17212cat >>confdefs.h <<\_ACEOF
17213#define GETSPNAM_CONFLICTING_DEFS 1
17214_ACEOF
17215 10255
17216 10256
17217 10257
17218fi 10258fi
17219
17220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17221fi 10260fi
17222 10261
17223{ echo "$as_me:$LINENO: checking whether getpgrp requires zero arguments" >&5 10262{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5
17224echo $ECHO_N "checking whether getpgrp requires zero arguments... $ECHO_C" >&6; } 10263$as_echo_n "checking whether getpgrp requires zero arguments... " >&6; }
17225if test "${ac_cv_func_getpgrp_void+set}" = set; then 10264if ${ac_cv_func_getpgrp_void+:} false; then :
17226 echo $ECHO_N "(cached) $ECHO_C" >&6 10265 $as_echo_n "(cached) " >&6
17227else 10266else
17228 # Use it with a single arg. 10267 # Use it with a single arg.
17229cat >conftest.$ac_ext <<_ACEOF 10268cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17230/* confdefs.h. */
17231_ACEOF
17232cat confdefs.h >>conftest.$ac_ext
17233cat >>conftest.$ac_ext <<_ACEOF
17234/* end confdefs.h. */ 10269/* end confdefs.h. */
17235$ac_includes_default 10270$ac_includes_default
17236int 10271int
@@ -17241,41 +10276,19 @@ getpgrp (0);
17241 return 0; 10276 return 0;
17242} 10277}
17243_ACEOF 10278_ACEOF
17244rm -f conftest.$ac_objext 10279if ac_fn_c_try_compile "$LINENO"; then :
17245if { (ac_try="$ac_compile"
17246case "(($ac_try" in
17247 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17248 *) ac_try_echo=$ac_try;;
17249esac
17250eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17251 (eval "$ac_compile") 2>conftest.er1
17252 ac_status=$?
17253 grep -v '^ *+' conftest.er1 >conftest.err
17254 rm -f conftest.er1
17255 cat conftest.err >&5
17256 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17257 (exit $ac_status); } && {
17258 test -z "$ac_c_werror_flag" ||
17259 test ! -s conftest.err
17260 } && test -s conftest.$ac_objext; then
17261 ac_cv_func_getpgrp_void=no 10280 ac_cv_func_getpgrp_void=no
17262else 10281else
17263 echo "$as_me: failed program was:" >&5 10282 ac_cv_func_getpgrp_void=yes
17264sed 's/^/| /' conftest.$ac_ext >&5
17265
17266 ac_cv_func_getpgrp_void=yes
17267fi 10283fi
17268
17269rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17270 10285
17271fi 10286fi
17272{ echo "$as_me:$LINENO: result: $ac_cv_func_getpgrp_void" >&5 10287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5
17273echo "${ECHO_T}$ac_cv_func_getpgrp_void" >&6; } 10288$as_echo "$ac_cv_func_getpgrp_void" >&6; }
17274if test $ac_cv_func_getpgrp_void = yes; then 10289if test $ac_cv_func_getpgrp_void = yes; then
17275 10290
17276cat >>confdefs.h <<\_ACEOF 10291$as_echo "#define GETPGRP_VOID 1" >>confdefs.h
17277#define GETPGRP_VOID 1
17278_ACEOF
17279 10292
17280fi 10293fi
17281 10294
@@ -17285,7 +10298,7 @@ saved_CPPFLAGS="$CPPFLAGS"
17285saved_LDFLAGS="$LDFLAGS" 10298saved_LDFLAGS="$LDFLAGS"
17286 10299
17287# Check whether --with-ssl-dir was given. 10300# Check whether --with-ssl-dir was given.
17288if test "${with_ssl_dir+set}" = set; then 10301if test "${with_ssl_dir+set}" = set; then :
17289 withval=$with_ssl_dir; 10302 withval=$with_ssl_dir;
17290 if test "x$withval" != "xno" ; then 10303 if test "x$withval" != "xno" ; then
17291 case "$withval" in 10304 case "$withval" in
@@ -17322,11 +10335,7 @@ if test "${with_ssl_dir+set}" = set; then
17322fi 10335fi
17323 10336
17324LIBS="-lcrypto $LIBS" 10337LIBS="-lcrypto $LIBS"
17325cat >conftest.$ac_ext <<_ACEOF 10338cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17326/* confdefs.h. */
17327_ACEOF
17328cat confdefs.h >>conftest.$ac_ext
17329cat >>conftest.$ac_ext <<_ACEOF
17330/* end confdefs.h. */ 10339/* end confdefs.h. */
17331 10340
17332/* Override any GCC internal prototype to avoid an error. 10341/* Override any GCC internal prototype to avoid an error.
@@ -17344,33 +10353,11 @@ return RAND_add ();
17344 return 0; 10353 return 0;
17345} 10354}
17346_ACEOF 10355_ACEOF
17347rm -f conftest.$ac_objext conftest$ac_exeext 10356if ac_fn_c_try_link "$LINENO"; then :
17348if { (ac_try="$ac_link"
17349case "(($ac_try" in
17350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17351 *) ac_try_echo=$ac_try;;
17352esac
17353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17354 (eval "$ac_link") 2>conftest.er1
17355 ac_status=$?
17356 grep -v '^ *+' conftest.er1 >conftest.err
17357 rm -f conftest.er1
17358 cat conftest.err >&5
17359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17360 (exit $ac_status); } && {
17361 test -z "$ac_c_werror_flag" ||
17362 test ! -s conftest.err
17363 } && test -s conftest$ac_exeext &&
17364 $as_test_x conftest$ac_exeext; then
17365 10357
17366cat >>confdefs.h <<\_ACEOF 10358$as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
17367#define HAVE_OPENSSL 1
17368_ACEOF
17369 10359
17370else 10360else
17371 echo "$as_me: failed program was:" >&5
17372sed 's/^/| /' conftest.$ac_ext >&5
17373
17374 10361
17375 if test -n "${need_dash_r}"; then 10362 if test -n "${need_dash_r}"; then
17376 LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}" 10363 LDFLAGS="-L/usr/local/ssl/lib -R/usr/local/ssl/lib ${saved_LDFLAGS}"
@@ -17378,150 +10365,15 @@ sed 's/^/| /' conftest.$ac_ext >&5
17378 LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}" 10365 LDFLAGS="-L/usr/local/ssl/lib ${saved_LDFLAGS}"
17379 fi 10366 fi
17380 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}" 10367 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
17381 if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then 10368 ac_fn_c_check_header_mongrel "$LINENO" "openssl/opensslv.h" "ac_cv_header_openssl_opensslv_h" "$ac_includes_default"
17382 { echo "$as_me:$LINENO: checking for openssl/opensslv.h" >&5 10369if test "x$ac_cv_header_openssl_opensslv_h" = xyes; then :
17383echo $ECHO_N "checking for openssl/opensslv.h... $ECHO_C" >&6; }
17384if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then
17385 echo $ECHO_N "(cached) $ECHO_C" >&6
17386fi
17387{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_opensslv_h" >&5
17388echo "${ECHO_T}$ac_cv_header_openssl_opensslv_h" >&6; }
17389else
17390 # Is the header compilable?
17391{ echo "$as_me:$LINENO: checking openssl/opensslv.h usability" >&5
17392echo $ECHO_N "checking openssl/opensslv.h usability... $ECHO_C" >&6; }
17393cat >conftest.$ac_ext <<_ACEOF
17394/* confdefs.h. */
17395_ACEOF
17396cat confdefs.h >>conftest.$ac_ext
17397cat >>conftest.$ac_ext <<_ACEOF
17398/* end confdefs.h. */
17399$ac_includes_default
17400#include <openssl/opensslv.h>
17401_ACEOF
17402rm -f conftest.$ac_objext
17403if { (ac_try="$ac_compile"
17404case "(($ac_try" in
17405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17406 *) ac_try_echo=$ac_try;;
17407esac
17408eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17409 (eval "$ac_compile") 2>conftest.er1
17410 ac_status=$?
17411 grep -v '^ *+' conftest.er1 >conftest.err
17412 rm -f conftest.er1
17413 cat conftest.err >&5
17414 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17415 (exit $ac_status); } && {
17416 test -z "$ac_c_werror_flag" ||
17417 test ! -s conftest.err
17418 } && test -s conftest.$ac_objext; then
17419 ac_header_compiler=yes
17420else
17421 echo "$as_me: failed program was:" >&5
17422sed 's/^/| /' conftest.$ac_ext >&5
17423
17424 ac_header_compiler=no
17425fi
17426
17427rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17428{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
17429echo "${ECHO_T}$ac_header_compiler" >&6; }
17430
17431# Is the header present?
17432{ echo "$as_me:$LINENO: checking openssl/opensslv.h presence" >&5
17433echo $ECHO_N "checking openssl/opensslv.h presence... $ECHO_C" >&6; }
17434cat >conftest.$ac_ext <<_ACEOF
17435/* confdefs.h. */
17436_ACEOF
17437cat confdefs.h >>conftest.$ac_ext
17438cat >>conftest.$ac_ext <<_ACEOF
17439/* end confdefs.h. */
17440#include <openssl/opensslv.h>
17441_ACEOF
17442if { (ac_try="$ac_cpp conftest.$ac_ext"
17443case "(($ac_try" in
17444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17445 *) ac_try_echo=$ac_try;;
17446esac
17447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17448 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
17449 ac_status=$?
17450 grep -v '^ *+' conftest.er1 >conftest.err
17451 rm -f conftest.er1
17452 cat conftest.err >&5
17453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17454 (exit $ac_status); } >/dev/null && {
17455 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
17456 test ! -s conftest.err
17457 }; then
17458 ac_header_preproc=yes
17459else
17460 echo "$as_me: failed program was:" >&5
17461sed 's/^/| /' conftest.$ac_ext >&5
17462
17463 ac_header_preproc=no
17464fi
17465 10370
17466rm -f conftest.err conftest.$ac_ext
17467{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
17468echo "${ECHO_T}$ac_header_preproc" >&6; }
17469
17470# So? What about this header?
17471case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
17472 yes:no: )
17473 { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: accepted by the compiler, rejected by the preprocessor!" >&5
17474echo "$as_me: WARNING: openssl/opensslv.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
17475 { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: proceeding with the compiler's result" >&5
17476echo "$as_me: WARNING: openssl/opensslv.h: proceeding with the compiler's result" >&2;}
17477 ac_header_preproc=yes
17478 ;;
17479 no:yes:* )
17480 { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: present but cannot be compiled" >&5
17481echo "$as_me: WARNING: openssl/opensslv.h: present but cannot be compiled" >&2;}
17482 { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: check for missing prerequisite headers?" >&5
17483echo "$as_me: WARNING: openssl/opensslv.h: check for missing prerequisite headers?" >&2;}
17484 { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: see the Autoconf documentation" >&5
17485echo "$as_me: WARNING: openssl/opensslv.h: see the Autoconf documentation" >&2;}
17486 { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: section \"Present But Cannot Be Compiled\"" >&5
17487echo "$as_me: WARNING: openssl/opensslv.h: section \"Present But Cannot Be Compiled\"" >&2;}
17488 { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: proceeding with the preprocessor's result" >&5
17489echo "$as_me: WARNING: openssl/opensslv.h: proceeding with the preprocessor's result" >&2;}
17490 { echo "$as_me:$LINENO: WARNING: openssl/opensslv.h: in the future, the compiler will take precedence" >&5
17491echo "$as_me: WARNING: openssl/opensslv.h: in the future, the compiler will take precedence" >&2;}
17492 ( cat <<\_ASBOX
17493## ------------------------------------------- ##
17494## Report this to openssh-unix-dev@mindrot.org ##
17495## ------------------------------------------- ##
17496_ASBOX
17497 ) | sed "s/^/$as_me: WARNING: /" >&2
17498 ;;
17499esac
17500{ echo "$as_me:$LINENO: checking for openssl/opensslv.h" >&5
17501echo $ECHO_N "checking for openssl/opensslv.h... $ECHO_C" >&6; }
17502if test "${ac_cv_header_openssl_opensslv_h+set}" = set; then
17503 echo $ECHO_N "(cached) $ECHO_C" >&6
17504else
17505 ac_cv_header_openssl_opensslv_h=$ac_header_preproc
17506fi
17507{ echo "$as_me:$LINENO: result: $ac_cv_header_openssl_opensslv_h" >&5
17508echo "${ECHO_T}$ac_cv_header_openssl_opensslv_h" >&6; }
17509
17510fi
17511if test $ac_cv_header_openssl_opensslv_h = yes; then
17512 :
17513else 10371else
17514 { { echo "$as_me:$LINENO: error: *** OpenSSL headers missing - please install first or check config.log ***" >&5 10372 as_fn_error $? "*** OpenSSL headers missing - please install first or check config.log ***" "$LINENO" 5
17515echo "$as_me: error: *** OpenSSL headers missing - please install first or check config.log ***" >&2;}
17516 { (exit 1); exit 1; }; }
17517fi 10373fi
17518 10374
17519 10375
17520 cat >conftest.$ac_ext <<_ACEOF 10376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17521/* confdefs.h. */
17522_ACEOF
17523cat confdefs.h >>conftest.$ac_ext
17524cat >>conftest.$ac_ext <<_ACEOF
17525/* end confdefs.h. */ 10377/* end confdefs.h. */
17526 10378
17527/* Override any GCC internal prototype to avoid an error. 10379/* Override any GCC internal prototype to avoid an error.
@@ -17539,71 +10391,45 @@ return RAND_add ();
17539 return 0; 10391 return 0;
17540} 10392}
17541_ACEOF 10393_ACEOF
17542rm -f conftest.$ac_objext conftest$ac_exeext 10394if ac_fn_c_try_link "$LINENO"; then :
17543if { (ac_try="$ac_link" 10395 $as_echo "#define HAVE_OPENSSL 1" >>confdefs.h
17544case "(($ac_try" in
17545 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17546 *) ac_try_echo=$ac_try;;
17547esac
17548eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17549 (eval "$ac_link") 2>conftest.er1
17550 ac_status=$?
17551 grep -v '^ *+' conftest.er1 >conftest.err
17552 rm -f conftest.er1
17553 cat conftest.err >&5
17554 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17555 (exit $ac_status); } && {
17556 test -z "$ac_c_werror_flag" ||
17557 test ! -s conftest.err
17558 } && test -s conftest$ac_exeext &&
17559 $as_test_x conftest$ac_exeext; then
17560 cat >>confdefs.h <<\_ACEOF
17561#define HAVE_OPENSSL 1
17562_ACEOF
17563 10396
17564else 10397else
17565 echo "$as_me: failed program was:" >&5
17566sed 's/^/| /' conftest.$ac_ext >&5
17567 10398
17568 10399 as_fn_error $? "*** Can't find recent OpenSSL libcrypto (see config.log for details) ***" "$LINENO" 5
17569 { { echo "$as_me:$LINENO: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***" >&5
17570echo "$as_me: error: *** Can't find recent OpenSSL libcrypto (see config.log for details) ***" >&2;}
17571 { (exit 1); exit 1; }; }
17572 10400
17573 10401
17574fi 10402fi
17575 10403rm -f core conftest.err conftest.$ac_objext \
17576rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10404 conftest$ac_exeext conftest.$ac_ext
17577 conftest$ac_exeext conftest.$ac_ext
17578 10405
17579 10406
17580fi 10407fi
17581 10408rm -f core conftest.err conftest.$ac_objext \
17582rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10409 conftest$ac_exeext conftest.$ac_ext
17583 conftest$ac_exeext conftest.$ac_ext
17584 10410
17585# Determine OpenSSL header version 10411# Determine OpenSSL header version
17586{ echo "$as_me:$LINENO: checking OpenSSL header version" >&5 10412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL header version" >&5
17587echo $ECHO_N "checking OpenSSL header version... $ECHO_C" >&6; } 10413$as_echo_n "checking OpenSSL header version... " >&6; }
17588if test "$cross_compiling" = yes; then 10414if test "$cross_compiling" = yes; then :
17589 10415
17590 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5 10416 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
17591echo "$as_me: WARNING: cross compiling: not checking" >&2;} 10417$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
17592 10418
17593 10419
17594else 10420else
17595 cat >conftest.$ac_ext <<_ACEOF 10421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17596/* confdefs.h. */
17597_ACEOF
17598cat confdefs.h >>conftest.$ac_ext
17599cat >>conftest.$ac_ext <<_ACEOF
17600/* end confdefs.h. */ 10422/* end confdefs.h. */
17601 10423
17602#include <stdio.h> 10424#include <stdio.h>
17603#include <string.h> 10425#include <string.h>
17604#include <openssl/opensslv.h> 10426#include <openssl/opensslv.h>
17605#define DATA "conftest.sslincver" 10427#define DATA "conftest.sslincver"
17606int main(void) { 10428
10429int
10430main ()
10431{
10432
17607 FILE *fd; 10433 FILE *fd;
17608 int rc; 10434 int rc;
17609 10435
@@ -17615,68 +10441,40 @@ int main(void) {
17615 exit(1); 10441 exit(1);
17616 10442
17617 exit(0); 10443 exit(0);
17618}
17619 10444
10445 ;
10446 return 0;
10447}
17620_ACEOF 10448_ACEOF
17621rm -f conftest$ac_exeext 10449if ac_fn_c_try_run "$LINENO"; then :
17622if { (ac_try="$ac_link"
17623case "(($ac_try" in
17624 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17625 *) ac_try_echo=$ac_try;;
17626esac
17627eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17628 (eval "$ac_link") 2>&5
17629 ac_status=$?
17630 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17631 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17632 { (case "(($ac_try" in
17633 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17634 *) ac_try_echo=$ac_try;;
17635esac
17636eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17637 (eval "$ac_try") 2>&5
17638 ac_status=$?
17639 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17640 (exit $ac_status); }; }; then
17641 10450
17642 ssl_header_ver=`cat conftest.sslincver` 10451 ssl_header_ver=`cat conftest.sslincver`
17643 { echo "$as_me:$LINENO: result: $ssl_header_ver" >&5 10452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_header_ver" >&5
17644echo "${ECHO_T}$ssl_header_ver" >&6; } 10453$as_echo "$ssl_header_ver" >&6; }
17645 10454
17646else 10455else
17647 echo "$as_me: program exited with status $ac_status" >&5
17648echo "$as_me: failed program was:" >&5
17649sed 's/^/| /' conftest.$ac_ext >&5
17650
17651( exit $ac_status )
17652 10456
17653 { echo "$as_me:$LINENO: result: not found" >&5 10457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17654echo "${ECHO_T}not found" >&6; } 10458$as_echo "not found" >&6; }
17655 { { echo "$as_me:$LINENO: error: OpenSSL version header not found." >&5 10459 as_fn_error $? "OpenSSL version header not found." "$LINENO" 5
17656echo "$as_me: error: OpenSSL version header not found." >&2;}
17657 { (exit 1); exit 1; }; }
17658 10460
17659fi 10461fi
17660rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 10462rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10463 conftest.$ac_objext conftest.beam conftest.$ac_ext
17661fi 10464fi
17662 10465
17663 10466
17664
17665# Determine OpenSSL library version 10467# Determine OpenSSL library version
17666{ echo "$as_me:$LINENO: checking OpenSSL library version" >&5 10468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking OpenSSL library version" >&5
17667echo $ECHO_N "checking OpenSSL library version... $ECHO_C" >&6; } 10469$as_echo_n "checking OpenSSL library version... " >&6; }
17668if test "$cross_compiling" = yes; then 10470if test "$cross_compiling" = yes; then :
17669 10471
17670 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5 10472 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
17671echo "$as_me: WARNING: cross compiling: not checking" >&2;} 10473$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
17672 10474
17673 10475
17674else 10476else
17675 cat >conftest.$ac_ext <<_ACEOF 10477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17676/* confdefs.h. */
17677_ACEOF
17678cat confdefs.h >>conftest.$ac_ext
17679cat >>conftest.$ac_ext <<_ACEOF
17680/* end confdefs.h. */ 10478/* end confdefs.h. */
17681 10479
17682#include <stdio.h> 10480#include <stdio.h>
@@ -17684,7 +10482,11 @@ cat >>conftest.$ac_ext <<_ACEOF
17684#include <openssl/opensslv.h> 10482#include <openssl/opensslv.h>
17685#include <openssl/crypto.h> 10483#include <openssl/crypto.h>
17686#define DATA "conftest.ssllibver" 10484#define DATA "conftest.ssllibver"
17687int main(void) { 10485
10486int
10487main ()
10488{
10489
17688 FILE *fd; 10490 FILE *fd;
17689 int rc; 10491 int rc;
17690 10492
@@ -17696,56 +10498,32 @@ int main(void) {
17696 exit(1); 10498 exit(1);
17697 10499
17698 exit(0); 10500 exit(0);
17699}
17700 10501
10502 ;
10503 return 0;
10504}
17701_ACEOF 10505_ACEOF
17702rm -f conftest$ac_exeext 10506if ac_fn_c_try_run "$LINENO"; then :
17703if { (ac_try="$ac_link"
17704case "(($ac_try" in
17705 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17706 *) ac_try_echo=$ac_try;;
17707esac
17708eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17709 (eval "$ac_link") 2>&5
17710 ac_status=$?
17711 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17712 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17713 { (case "(($ac_try" in
17714 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17715 *) ac_try_echo=$ac_try;;
17716esac
17717eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17718 (eval "$ac_try") 2>&5
17719 ac_status=$?
17720 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17721 (exit $ac_status); }; }; then
17722 10507
17723 ssl_library_ver=`cat conftest.ssllibver` 10508 ssl_library_ver=`cat conftest.ssllibver`
17724 { echo "$as_me:$LINENO: result: $ssl_library_ver" >&5 10509 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ssl_library_ver" >&5
17725echo "${ECHO_T}$ssl_library_ver" >&6; } 10510$as_echo "$ssl_library_ver" >&6; }
17726 10511
17727else 10512else
17728 echo "$as_me: program exited with status $ac_status" >&5
17729echo "$as_me: failed program was:" >&5
17730sed 's/^/| /' conftest.$ac_ext >&5
17731 10513
17732( exit $ac_status ) 10514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
17733 10515$as_echo "not found" >&6; }
17734 { echo "$as_me:$LINENO: result: not found" >&5 10516 as_fn_error $? "OpenSSL library not found." "$LINENO" 5
17735echo "${ECHO_T}not found" >&6; }
17736 { { echo "$as_me:$LINENO: error: OpenSSL library not found." >&5
17737echo "$as_me: error: OpenSSL library not found." >&2;}
17738 { (exit 1); exit 1; }; }
17739 10517
17740fi 10518fi
17741rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 10519rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10520 conftest.$ac_objext conftest.beam conftest.$ac_ext
17742fi 10521fi
17743 10522
17744 10523
17745 10524
17746
17747# Check whether --with-openssl-header-check was given. 10525# Check whether --with-openssl-header-check was given.
17748if test "${with_openssl_header_check+set}" = set; then 10526if test "${with_openssl_header_check+set}" = set; then :
17749 withval=$with_openssl_header_check; if test "x$withval" = "xno" ; then 10527 withval=$with_openssl_header_check; if test "x$withval" = "xno" ; then
17750 openssl_check_nonfatal=1 10528 openssl_check_nonfatal=1
17751 fi 10529 fi
@@ -17755,281 +10533,127 @@ fi
17755 10533
17756 10534
17757# Sanity check OpenSSL headers 10535# Sanity check OpenSSL headers
17758{ echo "$as_me:$LINENO: checking whether OpenSSL's headers match the library" >&5 10536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's headers match the library" >&5
17759echo $ECHO_N "checking whether OpenSSL's headers match the library... $ECHO_C" >&6; } 10537$as_echo_n "checking whether OpenSSL's headers match the library... " >&6; }
17760if test "$cross_compiling" = yes; then 10538if test "$cross_compiling" = yes; then :
17761 10539
17762 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5 10540 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
17763echo "$as_me: WARNING: cross compiling: not checking" >&2;} 10541$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
17764 10542
17765 10543
17766else 10544else
17767 cat >conftest.$ac_ext <<_ACEOF 10545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17768/* confdefs.h. */
17769_ACEOF
17770cat confdefs.h >>conftest.$ac_ext
17771cat >>conftest.$ac_ext <<_ACEOF
17772/* end confdefs.h. */ 10546/* end confdefs.h. */
17773 10547
17774#include <string.h> 10548#include <string.h>
17775#include <openssl/opensslv.h> 10549#include <openssl/opensslv.h>
17776int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); }
17777 10550
10551int
10552main ()
10553{
10554
10555 exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1);
10556
10557 ;
10558 return 0;
10559}
17778_ACEOF 10560_ACEOF
17779rm -f conftest$ac_exeext 10561if ac_fn_c_try_run "$LINENO"; then :
17780if { (ac_try="$ac_link"
17781case "(($ac_try" in
17782 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17783 *) ac_try_echo=$ac_try;;
17784esac
17785eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17786 (eval "$ac_link") 2>&5
17787 ac_status=$?
17788 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17789 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
17790 { (case "(($ac_try" in
17791 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17792 *) ac_try_echo=$ac_try;;
17793esac
17794eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17795 (eval "$ac_try") 2>&5
17796 ac_status=$?
17797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17798 (exit $ac_status); }; }; then
17799 10562
17800 { echo "$as_me:$LINENO: result: yes" >&5 10563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17801echo "${ECHO_T}yes" >&6; } 10564$as_echo "yes" >&6; }
17802 10565
17803else 10566else
17804 echo "$as_me: program exited with status $ac_status" >&5
17805echo "$as_me: failed program was:" >&5
17806sed 's/^/| /' conftest.$ac_ext >&5
17807
17808( exit $ac_status )
17809 10567
17810 { echo "$as_me:$LINENO: result: no" >&5 10568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17811echo "${ECHO_T}no" >&6; } 10569$as_echo "no" >&6; }
17812 if test "x$openssl_check_nonfatal" = "x"; then 10570 if test "x$openssl_check_nonfatal" = "x"; then
17813 { { echo "$as_me:$LINENO: error: Your OpenSSL headers do not match your 10571 as_fn_error $? "Your OpenSSL headers do not match your
17814library. Check config.log for details.
17815If you are sure your installation is consistent, you can disable the check
17816by running \"./configure --without-openssl-header-check\".
17817Also see contrib/findssl.sh for help identifying header/library mismatches.
17818" >&5
17819echo "$as_me: error: Your OpenSSL headers do not match your
17820library. Check config.log for details. 10572library. Check config.log for details.
17821If you are sure your installation is consistent, you can disable the check 10573If you are sure your installation is consistent, you can disable the check
17822by running \"./configure --without-openssl-header-check\". 10574by running \"./configure --without-openssl-header-check\".
17823Also see contrib/findssl.sh for help identifying header/library mismatches. 10575Also see contrib/findssl.sh for help identifying header/library mismatches.
17824" >&2;} 10576" "$LINENO" 5
17825 { (exit 1); exit 1; }; }
17826 else 10577 else
17827 { echo "$as_me:$LINENO: WARNING: Your OpenSSL headers do not match your 10578 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Your OpenSSL headers do not match your
17828library. Check config.log for details. 10579library. Check config.log for details.
17829Also see contrib/findssl.sh for help identifying header/library mismatches." >&5 10580Also see contrib/findssl.sh for help identifying header/library mismatches." >&5
17830echo "$as_me: WARNING: Your OpenSSL headers do not match your 10581$as_echo "$as_me: WARNING: Your OpenSSL headers do not match your
17831library. Check config.log for details. 10582library. Check config.log for details.
17832Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;} 10583Also see contrib/findssl.sh for help identifying header/library mismatches." >&2;}
17833 fi 10584 fi
17834 10585
17835fi 10586fi
17836rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 10587rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10588 conftest.$ac_objext conftest.beam conftest.$ac_ext
17837fi 10589fi
17838 10590
17839 10591
17840 10592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL functions will link" >&5
17841{ echo "$as_me:$LINENO: checking if programs using OpenSSL functions will link" >&5 10593$as_echo_n "checking if programs using OpenSSL functions will link... " >&6; }
17842echo $ECHO_N "checking if programs using OpenSSL functions will link... $ECHO_C" >&6; } 10594cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17843cat >conftest.$ac_ext <<_ACEOF
17844/* confdefs.h. */
17845_ACEOF
17846cat confdefs.h >>conftest.$ac_ext
17847cat >>conftest.$ac_ext <<_ACEOF
17848/* end confdefs.h. */ 10595/* end confdefs.h. */
17849 10596 #include <openssl/evp.h>
17850#include <openssl/evp.h> 10597int
17851int main(void) { SSLeay_add_all_algorithms(); } 10598main ()
17852 10599{
10600 SSLeay_add_all_algorithms();
10601 ;
10602 return 0;
10603}
17853_ACEOF 10604_ACEOF
17854rm -f conftest.$ac_objext conftest$ac_exeext 10605if ac_fn_c_try_link "$LINENO"; then :
17855if { (ac_try="$ac_link"
17856case "(($ac_try" in
17857 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17858 *) ac_try_echo=$ac_try;;
17859esac
17860eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17861 (eval "$ac_link") 2>conftest.er1
17862 ac_status=$?
17863 grep -v '^ *+' conftest.er1 >conftest.err
17864 rm -f conftest.er1
17865 cat conftest.err >&5
17866 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17867 (exit $ac_status); } && {
17868 test -z "$ac_c_werror_flag" ||
17869 test ! -s conftest.err
17870 } && test -s conftest$ac_exeext &&
17871 $as_test_x conftest$ac_exeext; then
17872 10606
17873 { echo "$as_me:$LINENO: result: yes" >&5 10607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17874echo "${ECHO_T}yes" >&6; } 10608$as_echo "yes" >&6; }
17875 10609
17876else 10610else
17877 echo "$as_me: failed program was:" >&5
17878sed 's/^/| /' conftest.$ac_ext >&5
17879
17880 10611
17881 { echo "$as_me:$LINENO: result: no" >&5 10612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17882echo "${ECHO_T}no" >&6; } 10613$as_echo "no" >&6; }
17883 saved_LIBS="$LIBS" 10614 saved_LIBS="$LIBS"
17884 LIBS="$LIBS -ldl" 10615 LIBS="$LIBS -ldl"
17885 { echo "$as_me:$LINENO: checking if programs using OpenSSL need -ldl" >&5 10616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if programs using OpenSSL need -ldl" >&5
17886echo $ECHO_N "checking if programs using OpenSSL need -ldl... $ECHO_C" >&6; } 10617$as_echo_n "checking if programs using OpenSSL need -ldl... " >&6; }
17887 cat >conftest.$ac_ext <<_ACEOF 10618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17888/* confdefs.h. */
17889_ACEOF
17890cat confdefs.h >>conftest.$ac_ext
17891cat >>conftest.$ac_ext <<_ACEOF
17892/* end confdefs.h. */ 10619/* end confdefs.h. */
17893 10620 #include <openssl/evp.h>
17894#include <openssl/evp.h> 10621int
17895int main(void) { SSLeay_add_all_algorithms(); } 10622main ()
17896 10623{
10624 SSLeay_add_all_algorithms();
10625 ;
10626 return 0;
10627}
17897_ACEOF 10628_ACEOF
17898rm -f conftest.$ac_objext conftest$ac_exeext 10629if ac_fn_c_try_link "$LINENO"; then :
17899if { (ac_try="$ac_link"
17900case "(($ac_try" in
17901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
17902 *) ac_try_echo=$ac_try;;
17903esac
17904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
17905 (eval "$ac_link") 2>conftest.er1
17906 ac_status=$?
17907 grep -v '^ *+' conftest.er1 >conftest.err
17908 rm -f conftest.er1
17909 cat conftest.err >&5
17910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
17911 (exit $ac_status); } && {
17912 test -z "$ac_c_werror_flag" ||
17913 test ! -s conftest.err
17914 } && test -s conftest$ac_exeext &&
17915 $as_test_x conftest$ac_exeext; then
17916 10630
17917 { echo "$as_me:$LINENO: result: yes" >&5 10631 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
17918echo "${ECHO_T}yes" >&6; } 10632$as_echo "yes" >&6; }
17919 10633
17920else 10634else
17921 echo "$as_me: failed program was:" >&5
17922sed 's/^/| /' conftest.$ac_ext >&5
17923 10635
17924 10636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17925 { echo "$as_me:$LINENO: result: no" >&5 10637$as_echo "no" >&6; }
17926echo "${ECHO_T}no" >&6; }
17927 LIBS="$saved_LIBS" 10638 LIBS="$saved_LIBS"
17928 10639
17929 10640
17930fi 10641fi
17931 10642rm -f core conftest.err conftest.$ac_objext \
17932rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10643 conftest$ac_exeext conftest.$ac_ext
17933 conftest$ac_exeext conftest.$ac_ext
17934 10644
17935 10645
17936fi 10646fi
17937 10647rm -f core conftest.err conftest.$ac_objext \
17938rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10648 conftest$ac_exeext conftest.$ac_ext
17939 conftest$ac_exeext conftest.$ac_ext
17940
17941
17942
17943
17944 10649
17945for ac_func in RSA_generate_key_ex DSA_generate_parameters_ex BN_is_prime_ex RSA_get_default_method 10650for ac_func in RSA_generate_key_ex DSA_generate_parameters_ex BN_is_prime_ex RSA_get_default_method
17946do 10651do :
17947as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 10652 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17948{ echo "$as_me:$LINENO: checking for $ac_func" >&5 10653ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17949echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 10654if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17950if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
17951 echo $ECHO_N "(cached) $ECHO_C" >&6
17952else
17953 cat >conftest.$ac_ext <<_ACEOF
17954/* confdefs.h. */
17955_ACEOF
17956cat confdefs.h >>conftest.$ac_ext
17957cat >>conftest.$ac_ext <<_ACEOF
17958/* end confdefs.h. */
17959/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
17960 For example, HP-UX 11i <limits.h> declares gettimeofday. */
17961#define $ac_func innocuous_$ac_func
17962
17963/* System header to define __stub macros and hopefully few prototypes,
17964 which can conflict with char $ac_func (); below.
17965 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
17966 <limits.h> exists even on freestanding compilers. */
17967
17968#ifdef __STDC__
17969# include <limits.h>
17970#else
17971# include <assert.h>
17972#endif
17973
17974#undef $ac_func
17975
17976/* Override any GCC internal prototype to avoid an error.
17977 Use char because int might match the return type of a GCC
17978 builtin and then its argument prototype would still apply. */
17979#ifdef __cplusplus
17980extern "C"
17981#endif
17982char $ac_func ();
17983/* The GNU C library defines this for functions which it implements
17984 to always fail with ENOSYS. Some functions are actually named
17985 something starting with __ and the normal name is an alias. */
17986#if defined __stub_$ac_func || defined __stub___$ac_func
17987choke me
17988#endif
17989
17990int
17991main ()
17992{
17993return $ac_func ();
17994 ;
17995 return 0;
17996}
17997_ACEOF
17998rm -f conftest.$ac_objext conftest$ac_exeext
17999if { (ac_try="$ac_link"
18000case "(($ac_try" in
18001 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18002 *) ac_try_echo=$ac_try;;
18003esac
18004eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18005 (eval "$ac_link") 2>conftest.er1
18006 ac_status=$?
18007 grep -v '^ *+' conftest.er1 >conftest.err
18008 rm -f conftest.er1
18009 cat conftest.err >&5
18010 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18011 (exit $ac_status); } && {
18012 test -z "$ac_c_werror_flag" ||
18013 test ! -s conftest.err
18014 } && test -s conftest$ac_exeext &&
18015 $as_test_x conftest$ac_exeext; then
18016 eval "$as_ac_var=yes"
18017else
18018 echo "$as_me: failed program was:" >&5
18019sed 's/^/| /' conftest.$ac_ext >&5
18020
18021 eval "$as_ac_var=no"
18022fi
18023
18024rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18025 conftest$ac_exeext conftest.$ac_ext
18026fi
18027ac_res=`eval echo '${'$as_ac_var'}'`
18028 { echo "$as_me:$LINENO: result: $ac_res" >&5
18029echo "${ECHO_T}$ac_res" >&6; }
18030if test `eval echo '${'$as_ac_var'}'` = yes; then
18031 cat >>confdefs.h <<_ACEOF 10655 cat >>confdefs.h <<_ACEOF
18032#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 10656#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18033_ACEOF 10657_ACEOF
18034 10658
18035fi 10659fi
@@ -18038,62 +10662,37 @@ done
18038 10662
18039 10663
18040# Check whether --with-ssl-engine was given. 10664# Check whether --with-ssl-engine was given.
18041if test "${with_ssl_engine+set}" = set; then 10665if test "${with_ssl_engine+set}" = set; then :
18042 withval=$with_ssl_engine; if test "x$withval" != "xno" ; then 10666 withval=$with_ssl_engine; if test "x$withval" != "xno" ; then
18043 { echo "$as_me:$LINENO: checking for OpenSSL ENGINE support" >&5 10667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OpenSSL ENGINE support" >&5
18044echo $ECHO_N "checking for OpenSSL ENGINE support... $ECHO_C" >&6; } 10668$as_echo_n "checking for OpenSSL ENGINE support... " >&6; }
18045 cat >conftest.$ac_ext <<_ACEOF 10669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18046/* confdefs.h. */
18047_ACEOF
18048cat confdefs.h >>conftest.$ac_ext
18049cat >>conftest.$ac_ext <<_ACEOF
18050/* end confdefs.h. */ 10670/* end confdefs.h. */
18051 #include <openssl/engine.h> 10671
10672#include <openssl/engine.h>
10673
18052int 10674int
18053main () 10675main ()
18054{ 10676{
18055 10677
18056ENGINE_load_builtin_engines();ENGINE_register_all_complete(); 10678 ENGINE_load_builtin_engines();
10679 ENGINE_register_all_complete();
18057 10680
18058 ; 10681 ;
18059 return 0; 10682 return 0;
18060} 10683}
18061_ACEOF 10684_ACEOF
18062rm -f conftest.$ac_objext 10685if ac_fn_c_try_compile "$LINENO"; then :
18063if { (ac_try="$ac_compile" 10686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18064case "(($ac_try" in 10687$as_echo "yes" >&6; }
18065 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18066 *) ac_try_echo=$ac_try;;
18067esac
18068eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18069 (eval "$ac_compile") 2>conftest.er1
18070 ac_status=$?
18071 grep -v '^ *+' conftest.er1 >conftest.err
18072 rm -f conftest.er1
18073 cat conftest.err >&5
18074 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18075 (exit $ac_status); } && {
18076 test -z "$ac_c_werror_flag" ||
18077 test ! -s conftest.err
18078 } && test -s conftest.$ac_objext; then
18079 { echo "$as_me:$LINENO: result: yes" >&5
18080echo "${ECHO_T}yes" >&6; }
18081 10688
18082cat >>confdefs.h <<\_ACEOF 10689$as_echo "#define USE_OPENSSL_ENGINE 1" >>confdefs.h
18083#define USE_OPENSSL_ENGINE 1
18084_ACEOF
18085 10690
18086 10691
18087else 10692else
18088 echo "$as_me: failed program was:" >&5 10693 as_fn_error $? "OpenSSL ENGINE support not found" "$LINENO" 5
18089sed 's/^/| /' conftest.$ac_ext >&5
18090
18091 { { echo "$as_me:$LINENO: error: OpenSSL ENGINE support not found" >&5
18092echo "$as_me: error: OpenSSL ENGINE support not found" >&2;}
18093 { (exit 1); exit 1; }; }
18094 10694
18095fi 10695fi
18096
18097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10696rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18098 fi 10697 fi
18099 10698
@@ -18101,132 +10700,90 @@ fi
18101 10700
18102 10701
18103# Check for OpenSSL without EVP_aes_{192,256}_cbc 10702# Check for OpenSSL without EVP_aes_{192,256}_cbc
18104{ echo "$as_me:$LINENO: checking whether OpenSSL has crippled AES support" >&5 10703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has crippled AES support" >&5
18105echo $ECHO_N "checking whether OpenSSL has crippled AES support... $ECHO_C" >&6; } 10704$as_echo_n "checking whether OpenSSL has crippled AES support... " >&6; }
18106cat >conftest.$ac_ext <<_ACEOF 10705cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18107/* confdefs.h. */
18108_ACEOF
18109cat confdefs.h >>conftest.$ac_ext
18110cat >>conftest.$ac_ext <<_ACEOF
18111/* end confdefs.h. */ 10706/* end confdefs.h. */
18112 10707
18113#include <string.h> 10708#include <string.h>
18114#include <openssl/evp.h> 10709#include <openssl/evp.h>
18115int main(void) { exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);}
18116 10710
10711int
10712main ()
10713{
10714
10715 exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);
10716
10717 ;
10718 return 0;
10719}
18117_ACEOF 10720_ACEOF
18118rm -f conftest.$ac_objext conftest$ac_exeext 10721if ac_fn_c_try_link "$LINENO"; then :
18119if { (ac_try="$ac_link"
18120case "(($ac_try" in
18121 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18122 *) ac_try_echo=$ac_try;;
18123esac
18124eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18125 (eval "$ac_link") 2>conftest.er1
18126 ac_status=$?
18127 grep -v '^ *+' conftest.er1 >conftest.err
18128 rm -f conftest.er1
18129 cat conftest.err >&5
18130 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18131 (exit $ac_status); } && {
18132 test -z "$ac_c_werror_flag" ||
18133 test ! -s conftest.err
18134 } && test -s conftest$ac_exeext &&
18135 $as_test_x conftest$ac_exeext; then
18136 10722
18137 { echo "$as_me:$LINENO: result: no" >&5 10723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18138echo "${ECHO_T}no" >&6; } 10724$as_echo "no" >&6; }
18139 10725
18140else 10726else
18141 echo "$as_me: failed program was:" >&5
18142sed 's/^/| /' conftest.$ac_ext >&5
18143 10727
10728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
10729$as_echo "yes" >&6; }
18144 10730
18145 { echo "$as_me:$LINENO: result: yes" >&5 10731$as_echo "#define OPENSSL_LOBOTOMISED_AES 1" >>confdefs.h
18146echo "${ECHO_T}yes" >&6; }
18147
18148cat >>confdefs.h <<\_ACEOF
18149#define OPENSSL_LOBOTOMISED_AES 1
18150_ACEOF
18151 10732
18152 10733
18153 10734
18154fi 10735fi
10736rm -f core conftest.err conftest.$ac_objext \
10737 conftest$ac_exeext conftest.$ac_ext
18155 10738
18156rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if EVP_DigestUpdate returns an int" >&5
18157 conftest$ac_exeext conftest.$ac_ext 10740$as_echo_n "checking if EVP_DigestUpdate returns an int... " >&6; }
18158 10741cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18159{ echo "$as_me:$LINENO: checking if EVP_DigestUpdate returns an int" >&5
18160echo $ECHO_N "checking if EVP_DigestUpdate returns an int... $ECHO_C" >&6; }
18161cat >conftest.$ac_ext <<_ACEOF
18162/* confdefs.h. */
18163_ACEOF
18164cat confdefs.h >>conftest.$ac_ext
18165cat >>conftest.$ac_ext <<_ACEOF
18166/* end confdefs.h. */ 10742/* end confdefs.h. */
18167 10743
18168#include <string.h> 10744#include <string.h>
18169#include <openssl/evp.h> 10745#include <openssl/evp.h>
18170int main(void) { if(EVP_DigestUpdate(NULL, NULL,0)) exit(0); }
18171 10746
10747int
10748main ()
10749{
10750
10751 if(EVP_DigestUpdate(NULL, NULL,0))
10752 exit(0);
10753
10754 ;
10755 return 0;
10756}
18172_ACEOF 10757_ACEOF
18173rm -f conftest.$ac_objext conftest$ac_exeext 10758if ac_fn_c_try_link "$LINENO"; then :
18174if { (ac_try="$ac_link"
18175case "(($ac_try" in
18176 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18177 *) ac_try_echo=$ac_try;;
18178esac
18179eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18180 (eval "$ac_link") 2>conftest.er1
18181 ac_status=$?
18182 grep -v '^ *+' conftest.er1 >conftest.err
18183 rm -f conftest.er1
18184 cat conftest.err >&5
18185 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18186 (exit $ac_status); } && {
18187 test -z "$ac_c_werror_flag" ||
18188 test ! -s conftest.err
18189 } && test -s conftest$ac_exeext &&
18190 $as_test_x conftest$ac_exeext; then
18191 10759
18192 { echo "$as_me:$LINENO: result: yes" >&5 10760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18193echo "${ECHO_T}yes" >&6; } 10761$as_echo "yes" >&6; }
18194 10762
18195else 10763else
18196 echo "$as_me: failed program was:" >&5
18197sed 's/^/| /' conftest.$ac_ext >&5
18198 10764
10765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10766$as_echo "no" >&6; }
18199 10767
18200 { echo "$as_me:$LINENO: result: no" >&5 10768$as_echo "#define OPENSSL_EVP_DIGESTUPDATE_VOID 1" >>confdefs.h
18201echo "${ECHO_T}no" >&6; }
18202
18203cat >>confdefs.h <<\_ACEOF
18204#define OPENSSL_EVP_DIGESTUPDATE_VOID 1
18205_ACEOF
18206 10769
18207 10770
18208 10771
18209fi 10772fi
18210 10773rm -f core conftest.err conftest.$ac_objext \
18211rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10774 conftest$ac_exeext conftest.$ac_ext
18212 conftest$ac_exeext conftest.$ac_ext
18213 10775
18214# Some systems want crypt() from libcrypt, *not* the version in OpenSSL, 10776# Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
18215# because the system crypt() is more featureful. 10777# because the system crypt() is more featureful.
18216if test "x$check_for_libcrypt_before" = "x1"; then 10778if test "x$check_for_libcrypt_before" = "x1"; then
18217 10779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
18218{ echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 10780$as_echo_n "checking for crypt in -lcrypt... " >&6; }
18219echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; } 10781if ${ac_cv_lib_crypt_crypt+:} false; then :
18220if test "${ac_cv_lib_crypt_crypt+set}" = set; then 10782 $as_echo_n "(cached) " >&6
18221 echo $ECHO_N "(cached) $ECHO_C" >&6
18222else 10783else
18223 ac_check_lib_save_LIBS=$LIBS 10784 ac_check_lib_save_LIBS=$LIBS
18224LIBS="-lcrypt $LIBS" 10785LIBS="-lcrypt $LIBS"
18225cat >conftest.$ac_ext <<_ACEOF 10786cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18226/* confdefs.h. */
18227_ACEOF
18228cat confdefs.h >>conftest.$ac_ext
18229cat >>conftest.$ac_ext <<_ACEOF
18230/* end confdefs.h. */ 10787/* end confdefs.h. */
18231 10788
18232/* Override any GCC internal prototype to avoid an error. 10789/* Override any GCC internal prototype to avoid an error.
@@ -18244,39 +10801,18 @@ return crypt ();
18244 return 0; 10801 return 0;
18245} 10802}
18246_ACEOF 10803_ACEOF
18247rm -f conftest.$ac_objext conftest$ac_exeext 10804if ac_fn_c_try_link "$LINENO"; then :
18248if { (ac_try="$ac_link"
18249case "(($ac_try" in
18250 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18251 *) ac_try_echo=$ac_try;;
18252esac
18253eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18254 (eval "$ac_link") 2>conftest.er1
18255 ac_status=$?
18256 grep -v '^ *+' conftest.er1 >conftest.err
18257 rm -f conftest.er1
18258 cat conftest.err >&5
18259 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18260 (exit $ac_status); } && {
18261 test -z "$ac_c_werror_flag" ||
18262 test ! -s conftest.err
18263 } && test -s conftest$ac_exeext &&
18264 $as_test_x conftest$ac_exeext; then
18265 ac_cv_lib_crypt_crypt=yes 10805 ac_cv_lib_crypt_crypt=yes
18266else 10806else
18267 echo "$as_me: failed program was:" >&5 10807 ac_cv_lib_crypt_crypt=no
18268sed 's/^/| /' conftest.$ac_ext >&5
18269
18270 ac_cv_lib_crypt_crypt=no
18271fi 10808fi
18272 10809rm -f core conftest.err conftest.$ac_objext \
18273rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10810 conftest$ac_exeext conftest.$ac_ext
18274 conftest$ac_exeext conftest.$ac_ext
18275LIBS=$ac_check_lib_save_LIBS 10811LIBS=$ac_check_lib_save_LIBS
18276fi 10812fi
18277{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 10813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
18278echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; } 10814$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
18279if test $ac_cv_lib_crypt_crypt = yes; then 10815if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
18280 cat >>confdefs.h <<_ACEOF 10816 cat >>confdefs.h <<_ACEOF
18281#define HAVE_LIBCRYPT 1 10817#define HAVE_LIBCRYPT 1
18282_ACEOF 10818_ACEOF
@@ -18290,18 +10826,14 @@ fi
18290# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the 10826# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
18291# version in OpenSSL. 10827# version in OpenSSL.
18292if test "x$check_for_libcrypt_later" = "x1"; then 10828if test "x$check_for_libcrypt_later" = "x1"; then
18293 { echo "$as_me:$LINENO: checking for crypt in -lcrypt" >&5 10829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5
18294echo $ECHO_N "checking for crypt in -lcrypt... $ECHO_C" >&6; } 10830$as_echo_n "checking for crypt in -lcrypt... " >&6; }
18295if test "${ac_cv_lib_crypt_crypt+set}" = set; then 10831if ${ac_cv_lib_crypt_crypt+:} false; then :
18296 echo $ECHO_N "(cached) $ECHO_C" >&6 10832 $as_echo_n "(cached) " >&6
18297else 10833else
18298 ac_check_lib_save_LIBS=$LIBS 10834 ac_check_lib_save_LIBS=$LIBS
18299LIBS="-lcrypt $LIBS" 10835LIBS="-lcrypt $LIBS"
18300cat >conftest.$ac_ext <<_ACEOF 10836cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18301/* confdefs.h. */
18302_ACEOF
18303cat confdefs.h >>conftest.$ac_ext
18304cat >>conftest.$ac_ext <<_ACEOF
18305/* end confdefs.h. */ 10837/* end confdefs.h. */
18306 10838
18307/* Override any GCC internal prototype to avoid an error. 10839/* Override any GCC internal prototype to avoid an error.
@@ -18319,135 +10851,31 @@ return crypt ();
18319 return 0; 10851 return 0;
18320} 10852}
18321_ACEOF 10853_ACEOF
18322rm -f conftest.$ac_objext conftest$ac_exeext 10854if ac_fn_c_try_link "$LINENO"; then :
18323if { (ac_try="$ac_link"
18324case "(($ac_try" in
18325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18326 *) ac_try_echo=$ac_try;;
18327esac
18328eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18329 (eval "$ac_link") 2>conftest.er1
18330 ac_status=$?
18331 grep -v '^ *+' conftest.er1 >conftest.err
18332 rm -f conftest.er1
18333 cat conftest.err >&5
18334 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18335 (exit $ac_status); } && {
18336 test -z "$ac_c_werror_flag" ||
18337 test ! -s conftest.err
18338 } && test -s conftest$ac_exeext &&
18339 $as_test_x conftest$ac_exeext; then
18340 ac_cv_lib_crypt_crypt=yes 10855 ac_cv_lib_crypt_crypt=yes
18341else 10856else
18342 echo "$as_me: failed program was:" >&5 10857 ac_cv_lib_crypt_crypt=no
18343sed 's/^/| /' conftest.$ac_ext >&5
18344
18345 ac_cv_lib_crypt_crypt=no
18346fi 10858fi
18347 10859rm -f core conftest.err conftest.$ac_objext \
18348rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10860 conftest$ac_exeext conftest.$ac_ext
18349 conftest$ac_exeext conftest.$ac_ext
18350LIBS=$ac_check_lib_save_LIBS 10861LIBS=$ac_check_lib_save_LIBS
18351fi 10862fi
18352{ echo "$as_me:$LINENO: result: $ac_cv_lib_crypt_crypt" >&5 10863{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5
18353echo "${ECHO_T}$ac_cv_lib_crypt_crypt" >&6; } 10864$as_echo "$ac_cv_lib_crypt_crypt" >&6; }
18354if test $ac_cv_lib_crypt_crypt = yes; then 10865if test "x$ac_cv_lib_crypt_crypt" = xyes; then :
18355 LIBS="$LIBS -lcrypt" 10866 LIBS="$LIBS -lcrypt"
18356fi 10867fi
18357 10868
18358fi 10869fi
18359 10870
18360# Search for SHA256 support in libc and/or OpenSSL 10871# Search for SHA256 support in libc and/or OpenSSL
18361
18362
18363for ac_func in SHA256_Update EVP_sha256 10872for ac_func in SHA256_Update EVP_sha256
18364do 10873do :
18365as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 10874 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18366{ echo "$as_me:$LINENO: checking for $ac_func" >&5 10875ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
18367echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 10876if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
18368if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18369 echo $ECHO_N "(cached) $ECHO_C" >&6
18370else
18371 cat >conftest.$ac_ext <<_ACEOF
18372/* confdefs.h. */
18373_ACEOF
18374cat confdefs.h >>conftest.$ac_ext
18375cat >>conftest.$ac_ext <<_ACEOF
18376/* end confdefs.h. */
18377/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18378 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18379#define $ac_func innocuous_$ac_func
18380
18381/* System header to define __stub macros and hopefully few prototypes,
18382 which can conflict with char $ac_func (); below.
18383 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18384 <limits.h> exists even on freestanding compilers. */
18385
18386#ifdef __STDC__
18387# include <limits.h>
18388#else
18389# include <assert.h>
18390#endif
18391
18392#undef $ac_func
18393
18394/* Override any GCC internal prototype to avoid an error.
18395 Use char because int might match the return type of a GCC
18396 builtin and then its argument prototype would still apply. */
18397#ifdef __cplusplus
18398extern "C"
18399#endif
18400char $ac_func ();
18401/* The GNU C library defines this for functions which it implements
18402 to always fail with ENOSYS. Some functions are actually named
18403 something starting with __ and the normal name is an alias. */
18404#if defined __stub_$ac_func || defined __stub___$ac_func
18405choke me
18406#endif
18407
18408int
18409main ()
18410{
18411return $ac_func ();
18412 ;
18413 return 0;
18414}
18415_ACEOF
18416rm -f conftest.$ac_objext conftest$ac_exeext
18417if { (ac_try="$ac_link"
18418case "(($ac_try" in
18419 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18420 *) ac_try_echo=$ac_try;;
18421esac
18422eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18423 (eval "$ac_link") 2>conftest.er1
18424 ac_status=$?
18425 grep -v '^ *+' conftest.er1 >conftest.err
18426 rm -f conftest.er1
18427 cat conftest.err >&5
18428 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18429 (exit $ac_status); } && {
18430 test -z "$ac_c_werror_flag" ||
18431 test ! -s conftest.err
18432 } && test -s conftest$ac_exeext &&
18433 $as_test_x conftest$ac_exeext; then
18434 eval "$as_ac_var=yes"
18435else
18436 echo "$as_me: failed program was:" >&5
18437sed 's/^/| /' conftest.$ac_ext >&5
18438
18439 eval "$as_ac_var=no"
18440fi
18441
18442rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18443 conftest$ac_exeext conftest.$ac_ext
18444fi
18445ac_res=`eval echo '${'$as_ac_var'}'`
18446 { echo "$as_me:$LINENO: result: $ac_res" >&5
18447echo "${ECHO_T}$ac_res" >&6; }
18448if test `eval echo '${'$as_ac_var'}'` = yes; then
18449 cat >>confdefs.h <<_ACEOF 10877 cat >>confdefs.h <<_ACEOF
18450#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 10878#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18451_ACEOF 10879_ACEOF
18452 TEST_SSH_SHA256=yes 10880 TEST_SSH_SHA256=yes
18453else 10881else
@@ -18458,13 +10886,9 @@ done
18458 10886
18459 10887
18460# Check complete ECC support in OpenSSL 10888# Check complete ECC support in OpenSSL
18461{ echo "$as_me:$LINENO: checking whether OpenSSL has complete ECC support" >&5 10889{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL has complete ECC support" >&5
18462echo $ECHO_N "checking whether OpenSSL has complete ECC support... $ECHO_C" >&6; } 10890$as_echo_n "checking whether OpenSSL has complete ECC support... " >&6; }
18463cat >conftest.$ac_ext <<_ACEOF 10891cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18464/* confdefs.h. */
18465_ACEOF
18466cat confdefs.h >>conftest.$ac_ext
18467cat >>conftest.$ac_ext <<_ACEOF
18468/* end confdefs.h. */ 10892/* end confdefs.h. */
18469 10893
18470#include <openssl/ec.h> 10894#include <openssl/ec.h>
@@ -18476,72 +10900,51 @@ cat >>conftest.$ac_ext <<_ACEOF
18476#if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */ 10900#if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */
18477# error "OpenSSL < 0.9.8g has unreliable ECC code" 10901# error "OpenSSL < 0.9.8g has unreliable ECC code"
18478#endif 10902#endif
18479int main(void) { 10903
10904int
10905main ()
10906{
10907
18480 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1); 10908 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
18481 const EVP_MD *m = EVP_sha512(); /* We need this too */ 10909 const EVP_MD *m = EVP_sha512(); /* We need this too */
18482}
18483 10910
10911 ;
10912 return 0;
10913}
18484_ACEOF 10914_ACEOF
18485rm -f conftest.$ac_objext conftest$ac_exeext 10915if ac_fn_c_try_link "$LINENO"; then :
18486if { (ac_try="$ac_link"
18487case "(($ac_try" in
18488 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18489 *) ac_try_echo=$ac_try;;
18490esac
18491eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18492 (eval "$ac_link") 2>conftest.er1
18493 ac_status=$?
18494 grep -v '^ *+' conftest.er1 >conftest.err
18495 rm -f conftest.er1
18496 cat conftest.err >&5
18497 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18498 (exit $ac_status); } && {
18499 test -z "$ac_c_werror_flag" ||
18500 test ! -s conftest.err
18501 } && test -s conftest$ac_exeext &&
18502 $as_test_x conftest$ac_exeext; then
18503 10916
18504 { echo "$as_me:$LINENO: result: yes" >&5 10917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18505echo "${ECHO_T}yes" >&6; } 10918$as_echo "yes" >&6; }
18506 10919
18507cat >>confdefs.h <<\_ACEOF 10920$as_echo "#define OPENSSL_HAS_ECC 1" >>confdefs.h
18508#define OPENSSL_HAS_ECC 1
18509_ACEOF
18510 10921
18511 TEST_SSH_ECC=yes 10922 TEST_SSH_ECC=yes
18512 COMMENT_OUT_ECC="" 10923 COMMENT_OUT_ECC=""
18513 10924
18514else 10925else
18515 echo "$as_me: failed program was:" >&5
18516sed 's/^/| /' conftest.$ac_ext >&5
18517
18518 10926
18519 { echo "$as_me:$LINENO: result: no" >&5 10927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18520echo "${ECHO_T}no" >&6; } 10928$as_echo "no" >&6; }
18521 TEST_SSH_ECC=no 10929 TEST_SSH_ECC=no
18522 COMMENT_OUT_ECC="#no ecc#" 10930 COMMENT_OUT_ECC="#no ecc#"
18523 10931
18524 10932
18525fi 10933fi
18526 10934rm -f core conftest.err conftest.$ac_objext \
18527rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10935 conftest$ac_exeext conftest.$ac_ext
18528 conftest$ac_exeext conftest.$ac_ext
18529 10936
18530 10937
18531 10938
18532saved_LIBS="$LIBS" 10939saved_LIBS="$LIBS"
18533{ echo "$as_me:$LINENO: checking for ia_openinfo in -liaf" >&5 10940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ia_openinfo in -liaf" >&5
18534echo $ECHO_N "checking for ia_openinfo in -liaf... $ECHO_C" >&6; } 10941$as_echo_n "checking for ia_openinfo in -liaf... " >&6; }
18535if test "${ac_cv_lib_iaf_ia_openinfo+set}" = set; then 10942if ${ac_cv_lib_iaf_ia_openinfo+:} false; then :
18536 echo $ECHO_N "(cached) $ECHO_C" >&6 10943 $as_echo_n "(cached) " >&6
18537else 10944else
18538 ac_check_lib_save_LIBS=$LIBS 10945 ac_check_lib_save_LIBS=$LIBS
18539LIBS="-liaf $LIBS" 10946LIBS="-liaf $LIBS"
18540cat >conftest.$ac_ext <<_ACEOF 10947cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18541/* confdefs.h. */
18542_ACEOF
18543cat confdefs.h >>conftest.$ac_ext
18544cat >>conftest.$ac_ext <<_ACEOF
18545/* end confdefs.h. */ 10948/* end confdefs.h. */
18546 10949
18547/* Override any GCC internal prototype to avoid an error. 10950/* Override any GCC internal prototype to avoid an error.
@@ -18559,245 +10962,216 @@ return ia_openinfo ();
18559 return 0; 10962 return 0;
18560} 10963}
18561_ACEOF 10964_ACEOF
18562rm -f conftest.$ac_objext conftest$ac_exeext 10965if ac_fn_c_try_link "$LINENO"; then :
18563if { (ac_try="$ac_link"
18564case "(($ac_try" in
18565 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18566 *) ac_try_echo=$ac_try;;
18567esac
18568eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18569 (eval "$ac_link") 2>conftest.er1
18570 ac_status=$?
18571 grep -v '^ *+' conftest.er1 >conftest.err
18572 rm -f conftest.er1
18573 cat conftest.err >&5
18574 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18575 (exit $ac_status); } && {
18576 test -z "$ac_c_werror_flag" ||
18577 test ! -s conftest.err
18578 } && test -s conftest$ac_exeext &&
18579 $as_test_x conftest$ac_exeext; then
18580 ac_cv_lib_iaf_ia_openinfo=yes 10966 ac_cv_lib_iaf_ia_openinfo=yes
18581else 10967else
18582 echo "$as_me: failed program was:" >&5 10968 ac_cv_lib_iaf_ia_openinfo=no
18583sed 's/^/| /' conftest.$ac_ext >&5
18584
18585 ac_cv_lib_iaf_ia_openinfo=no
18586fi 10969fi
18587 10970rm -f core conftest.err conftest.$ac_objext \
18588rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 10971 conftest$ac_exeext conftest.$ac_ext
18589 conftest$ac_exeext conftest.$ac_ext
18590LIBS=$ac_check_lib_save_LIBS 10972LIBS=$ac_check_lib_save_LIBS
18591fi 10973fi
18592{ echo "$as_me:$LINENO: result: $ac_cv_lib_iaf_ia_openinfo" >&5 10974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_iaf_ia_openinfo" >&5
18593echo "${ECHO_T}$ac_cv_lib_iaf_ia_openinfo" >&6; } 10975$as_echo "$ac_cv_lib_iaf_ia_openinfo" >&6; }
18594if test $ac_cv_lib_iaf_ia_openinfo = yes; then 10976if test "x$ac_cv_lib_iaf_ia_openinfo" = xyes; then :
18595 10977
18596 LIBS="$LIBS -liaf" 10978 LIBS="$LIBS -liaf"
18597 10979 for ac_func in set_id
18598for ac_func in set_id 10980do :
18599do 10981 ac_fn_c_check_func "$LINENO" "set_id" "ac_cv_func_set_id"
18600as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 10982if test "x$ac_cv_func_set_id" = xyes; then :
18601{ echo "$as_me:$LINENO: checking for $ac_func" >&5 10983 cat >>confdefs.h <<_ACEOF
18602echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } 10984#define HAVE_SET_ID 1
18603if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18604 echo $ECHO_N "(cached) $ECHO_C" >&6
18605else
18606 cat >conftest.$ac_ext <<_ACEOF
18607/* confdefs.h. */
18608_ACEOF 10985_ACEOF
18609cat confdefs.h >>conftest.$ac_ext 10986 SSHDLIBS="$SSHDLIBS -liaf"
18610cat >>conftest.$ac_ext <<_ACEOF
18611/* end confdefs.h. */
18612/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18613 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18614#define $ac_func innocuous_$ac_func
18615 10987
18616/* System header to define __stub macros and hopefully few prototypes, 10988$as_echo "#define HAVE_LIBIAF 1" >>confdefs.h
18617 which can conflict with char $ac_func (); below.
18618 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18619 <limits.h> exists even on freestanding compilers. */
18620 10989
18621#ifdef __STDC__
18622# include <limits.h>
18623#else
18624# include <assert.h>
18625#endif
18626 10990
18627#undef $ac_func 10991fi
10992done
18628 10993
18629/* Override any GCC internal prototype to avoid an error. 10994
18630 Use char because int might match the return type of a GCC 10995fi
18631 builtin and then its argument prototype would still apply. */ 10996
18632#ifdef __cplusplus 10997LIBS="$saved_LIBS"
18633extern "C" 10998
18634#endif 10999### Configure cryptographic random number support
18635char $ac_func (); 11000
18636/* The GNU C library defines this for functions which it implements 11001# Check wheter OpenSSL seeds itself
18637 to always fail with ENOSYS. Some functions are actually named 11002{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OpenSSL's PRNG is internally seeded" >&5
18638 something starting with __ and the normal name is an alias. */ 11003$as_echo_n "checking whether OpenSSL's PRNG is internally seeded... " >&6; }
18639#if defined __stub_$ac_func || defined __stub___$ac_func 11004if test "$cross_compiling" = yes; then :
18640choke me 11005
18641#endif 11006 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: assuming yes" >&5
11007$as_echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
11008 # This is safe, since we will fatal() at runtime if
11009 # OpenSSL is not seeded correctly.
11010 OPENSSL_SEEDS_ITSELF=yes
11011
11012
11013else
11014 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11015/* end confdefs.h. */
11016
11017#include <string.h>
11018#include <openssl/rand.h>
18642 11019
18643int 11020int
18644main () 11021main ()
18645{ 11022{
18646return $ac_func (); 11023
11024 exit(RAND_status() == 1 ? 0 : 1);
11025
18647 ; 11026 ;
18648 return 0; 11027 return 0;
18649} 11028}
18650_ACEOF 11029_ACEOF
18651rm -f conftest.$ac_objext conftest$ac_exeext 11030if ac_fn_c_try_run "$LINENO"; then :
18652if { (ac_try="$ac_link" 11031
18653case "(($ac_try" in 11032 OPENSSL_SEEDS_ITSELF=yes
18654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 11033 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
18655 *) ac_try_echo=$ac_try;; 11034$as_echo "yes" >&6; }
18656esac 11035
18657eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18658 (eval "$ac_link") 2>conftest.er1
18659 ac_status=$?
18660 grep -v '^ *+' conftest.er1 >conftest.err
18661 rm -f conftest.er1
18662 cat conftest.err >&5
18663 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18664 (exit $ac_status); } && {
18665 test -z "$ac_c_werror_flag" ||
18666 test ! -s conftest.err
18667 } && test -s conftest$ac_exeext &&
18668 $as_test_x conftest$ac_exeext; then
18669 eval "$as_ac_var=yes"
18670else 11036else
18671 echo "$as_me: failed program was:" >&5
18672sed 's/^/| /' conftest.$ac_ext >&5
18673 11037
18674 eval "$as_ac_var=no" 11038 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18675fi 11039$as_echo "no" >&6; }
18676 11040
18677rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
18678 conftest$ac_exeext conftest.$ac_ext
18679fi 11041fi
18680ac_res=`eval echo '${'$as_ac_var'}'` 11042rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18681 { echo "$as_me:$LINENO: result: $ac_res" >&5 11043 conftest.$ac_objext conftest.beam conftest.$ac_ext
18682echo "${ECHO_T}$ac_res" >&6; } 11044fi
18683if test `eval echo '${'$as_ac_var'}'` = yes; then
18684 cat >>confdefs.h <<_ACEOF
18685#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18686_ACEOF
18687 SSHDLIBS="$SSHDLIBS -liaf"
18688 11045
18689cat >>confdefs.h <<\_ACEOF
18690#define HAVE_LIBIAF 1
18691_ACEOF
18692 11046
11047# PRNGD TCP socket
18693 11048
18694fi 11049# Check whether --with-prngd-port was given.
18695done 11050if test "${with_prngd_port+set}" = set; then :
11051 withval=$with_prngd_port;
11052 case "$withval" in
11053 no)
11054 withval=""
11055 ;;
11056 [0-9]*)
11057 ;;
11058 *)
11059 as_fn_error $? "You must specify a numeric port number for --with-prngd-port" "$LINENO" 5
11060 ;;
11061 esac
11062 if test ! -z "$withval" ; then
11063 PRNGD_PORT="$withval"
18696 11064
11065cat >>confdefs.h <<_ACEOF
11066#define PRNGD_PORT $PRNGD_PORT
11067_ACEOF
18697 11068
18698fi 11069 fi
18699 11070
18700LIBS="$saved_LIBS"
18701 11071
18702### Configure cryptographic random number support 11072fi
18703 11073
18704# Check wheter OpenSSL seeds itself
18705{ echo "$as_me:$LINENO: checking whether OpenSSL's PRNG is internally seeded" >&5
18706echo $ECHO_N "checking whether OpenSSL's PRNG is internally seeded... $ECHO_C" >&6; }
18707if test "$cross_compiling" = yes; then
18708
18709 { echo "$as_me:$LINENO: WARNING: cross compiling: assuming yes" >&5
18710echo "$as_me: WARNING: cross compiling: assuming yes" >&2;}
18711 # This is safe, since all recent OpenSSL versions will
18712 # complain at runtime if not seeded correctly.
18713 OPENSSL_SEEDS_ITSELF=yes
18714 11074
11075# PRNGD Unix domain socket
18715 11076
18716else 11077# Check whether --with-prngd-socket was given.
18717 cat >conftest.$ac_ext <<_ACEOF 11078if test "${with_prngd_socket+set}" = set; then :
18718/* confdefs.h. */ 11079 withval=$with_prngd_socket;
18719_ACEOF 11080 case "$withval" in
18720cat confdefs.h >>conftest.$ac_ext 11081 yes)
18721cat >>conftest.$ac_ext <<_ACEOF 11082 withval="/var/run/egd-pool"
18722/* end confdefs.h. */ 11083 ;;
11084 no)
11085 withval=""
11086 ;;
11087 /*)
11088 ;;
11089 *)
11090 as_fn_error $? "You must specify an absolute path to the entropy socket" "$LINENO" 5
11091 ;;
11092 esac
18723 11093
18724#include <string.h> 11094 if test ! -z "$withval" ; then
18725#include <openssl/rand.h> 11095 if test ! -z "$PRNGD_PORT" ; then
18726int main(void) { exit(RAND_status() == 1 ? 0 : 1); } 11096 as_fn_error $? "You may not specify both a PRNGD/EGD port and socket" "$LINENO" 5
11097 fi
11098 if test ! -r "$withval" ; then
11099 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Entropy socket is not readable" >&5
11100$as_echo "$as_me: WARNING: Entropy socket is not readable" >&2;}
11101 fi
11102 PRNGD_SOCKET="$withval"
18727 11103
11104cat >>confdefs.h <<_ACEOF
11105#define PRNGD_SOCKET "$PRNGD_SOCKET"
18728_ACEOF 11106_ACEOF
18729rm -f conftest$ac_exeext
18730if { (ac_try="$ac_link"
18731case "(($ac_try" in
18732 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18733 *) ac_try_echo=$ac_try;;
18734esac
18735eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18736 (eval "$ac_link") 2>&5
18737 ac_status=$?
18738 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18739 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
18740 { (case "(($ac_try" in
18741 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18742 *) ac_try_echo=$ac_try;;
18743esac
18744eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18745 (eval "$ac_try") 2>&5
18746 ac_status=$?
18747 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18748 (exit $ac_status); }; }; then
18749 11107
18750 OPENSSL_SEEDS_ITSELF=yes 11108 fi
18751 { echo "$as_me:$LINENO: result: yes" >&5
18752echo "${ECHO_T}yes" >&6; }
18753 11109
18754else 11110else
18755 echo "$as_me: program exited with status $ac_status" >&5
18756echo "$as_me: failed program was:" >&5
18757sed 's/^/| /' conftest.$ac_ext >&5
18758 11111
18759( exit $ac_status ) 11112 # Check for existing socket only if we don't have a random device already
11113 if test "x$OPENSSL_SEEDS_ITSELF" != "xyes" ; then
11114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRNGD/EGD socket" >&5
11115$as_echo_n "checking for PRNGD/EGD socket... " >&6; }
11116 # Insert other locations here
11117 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
11118 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
11119 PRNGD_SOCKET="$sock"
11120 cat >>confdefs.h <<_ACEOF
11121#define PRNGD_SOCKET "$PRNGD_SOCKET"
11122_ACEOF
11123
11124 break;
11125 fi
11126 done
11127 if test ! -z "$PRNGD_SOCKET" ; then
11128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRNGD_SOCKET" >&5
11129$as_echo "$PRNGD_SOCKET" >&6; }
11130 else
11131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11132$as_echo "not found" >&6; }
11133 fi
11134 fi
18760 11135
18761 { echo "$as_me:$LINENO: result: no" >&5
18762echo "${ECHO_T}no" >&6; }
18763 # Default to use of the rand helper if OpenSSL doesn't
18764 # seed itself
18765 USE_RAND_HELPER=yes
18766 11136
18767fi 11137fi
18768rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
18769fi
18770 11138
18771 11139
11140# Which randomness source do we use?
11141if test ! -z "$PRNGD_PORT" ; then
11142 RAND_MSG="PRNGd port $PRNGD_PORT"
11143elif test ! -z "$PRNGD_SOCKET" ; then
11144 RAND_MSG="PRNGd socket $PRNGD_SOCKET"
11145elif test ! -z "$OPENSSL_SEEDS_ITSELF" ; then
11146
11147$as_echo "#define OPENSSL_PRNG_ONLY 1" >>confdefs.h
11148
11149 RAND_MSG="OpenSSL internal ONLY"
11150else
11151 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
11152fi
18772 11153
18773# Check for PAM libs 11154# Check for PAM libs
18774PAM_MSG="no" 11155PAM_MSG="no"
18775 11156
18776# Check whether --with-pam was given. 11157# Check whether --with-pam was given.
18777if test "${with_pam+set}" = set; then 11158if test "${with_pam+set}" = set; then :
18778 withval=$with_pam; 11159 withval=$with_pam;
18779 if test "x$withval" != "xno" ; then 11160 if test "x$withval" != "xno" ; then
18780 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \ 11161 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
18781 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then 11162 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
18782 { { echo "$as_me:$LINENO: error: PAM headers not found" >&5 11163 as_fn_error $? "PAM headers not found" "$LINENO" 5
18783echo "$as_me: error: PAM headers not found" >&2;}
18784 { (exit 1); exit 1; }; }
18785 fi 11164 fi
18786 11165
18787 saved_LIBS="$LIBS" 11166 saved_LIBS="$LIBS"
18788 11167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
18789{ echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 11168$as_echo_n "checking for dlopen in -ldl... " >&6; }
18790echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } 11169if ${ac_cv_lib_dl_dlopen+:} false; then :
18791if test "${ac_cv_lib_dl_dlopen+set}" = set; then 11170 $as_echo_n "(cached) " >&6
18792 echo $ECHO_N "(cached) $ECHO_C" >&6
18793else 11171else
18794 ac_check_lib_save_LIBS=$LIBS 11172 ac_check_lib_save_LIBS=$LIBS
18795LIBS="-ldl $LIBS" 11173LIBS="-ldl $LIBS"
18796cat >conftest.$ac_ext <<_ACEOF 11174cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18797/* confdefs.h. */
18798_ACEOF
18799cat confdefs.h >>conftest.$ac_ext
18800cat >>conftest.$ac_ext <<_ACEOF
18801/* end confdefs.h. */ 11175/* end confdefs.h. */
18802 11176
18803/* Override any GCC internal prototype to avoid an error. 11177/* Override any GCC internal prototype to avoid an error.
@@ -18815,39 +11189,18 @@ return dlopen ();
18815 return 0; 11189 return 0;
18816} 11190}
18817_ACEOF 11191_ACEOF
18818rm -f conftest.$ac_objext conftest$ac_exeext 11192if ac_fn_c_try_link "$LINENO"; then :
18819if { (ac_try="$ac_link"
18820case "(($ac_try" in
18821 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18822 *) ac_try_echo=$ac_try;;
18823esac
18824eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18825 (eval "$ac_link") 2>conftest.er1
18826 ac_status=$?
18827 grep -v '^ *+' conftest.er1 >conftest.err
18828 rm -f conftest.er1
18829 cat conftest.err >&5
18830 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18831 (exit $ac_status); } && {
18832 test -z "$ac_c_werror_flag" ||
18833 test ! -s conftest.err
18834 } && test -s conftest$ac_exeext &&
18835 $as_test_x conftest$ac_exeext; then
18836 ac_cv_lib_dl_dlopen=yes 11193 ac_cv_lib_dl_dlopen=yes
18837else 11194else
18838 echo "$as_me: failed program was:" >&5 11195 ac_cv_lib_dl_dlopen=no
18839sed 's/^/| /' conftest.$ac_ext >&5
18840
18841 ac_cv_lib_dl_dlopen=no
18842fi 11196fi
18843 11197rm -f core conftest.err conftest.$ac_objext \
18844rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11198 conftest$ac_exeext conftest.$ac_ext
18845 conftest$ac_exeext conftest.$ac_ext
18846LIBS=$ac_check_lib_save_LIBS 11199LIBS=$ac_check_lib_save_LIBS
18847fi 11200fi
18848{ echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 11201{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
18849echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } 11202$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
18850if test $ac_cv_lib_dl_dlopen = yes; then 11203if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
18851 cat >>confdefs.h <<_ACEOF 11204 cat >>confdefs.h <<_ACEOF
18852#define HAVE_LIBDL 1 11205#define HAVE_LIBDL 1
18853_ACEOF 11206_ACEOF
@@ -18856,19 +11209,14 @@ _ACEOF
18856 11209
18857fi 11210fi
18858 11211
18859 11212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam_set_item in -lpam" >&5
18860{ echo "$as_me:$LINENO: checking for pam_set_item in -lpam" >&5 11213$as_echo_n "checking for pam_set_item in -lpam... " >&6; }
18861echo $ECHO_N "checking for pam_set_item in -lpam... $ECHO_C" >&6; } 11214if ${ac_cv_lib_pam_pam_set_item+:} false; then :
18862if test "${ac_cv_lib_pam_pam_set_item+set}" = set; then 11215 $as_echo_n "(cached) " >&6
18863 echo $ECHO_N "(cached) $ECHO_C" >&6
18864else 11216else
18865 ac_check_lib_save_LIBS=$LIBS 11217 ac_check_lib_save_LIBS=$LIBS
18866LIBS="-lpam $LIBS" 11218LIBS="-lpam $LIBS"
18867cat >conftest.$ac_ext <<_ACEOF 11219cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18868/* confdefs.h. */
18869_ACEOF
18870cat confdefs.h >>conftest.$ac_ext
18871cat >>conftest.$ac_ext <<_ACEOF
18872/* end confdefs.h. */ 11220/* end confdefs.h. */
18873 11221
18874/* Override any GCC internal prototype to avoid an error. 11222/* Override any GCC internal prototype to avoid an error.
@@ -18886,39 +11234,18 @@ return pam_set_item ();
18886 return 0; 11234 return 0;
18887} 11235}
18888_ACEOF 11236_ACEOF
18889rm -f conftest.$ac_objext conftest$ac_exeext 11237if ac_fn_c_try_link "$LINENO"; then :
18890if { (ac_try="$ac_link"
18891case "(($ac_try" in
18892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18893 *) ac_try_echo=$ac_try;;
18894esac
18895eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18896 (eval "$ac_link") 2>conftest.er1
18897 ac_status=$?
18898 grep -v '^ *+' conftest.er1 >conftest.err
18899 rm -f conftest.er1
18900 cat conftest.err >&5
18901 echo "$as_me:$LINENO: \$? = $ac_status" >&5
18902 (exit $ac_status); } && {
18903 test -z "$ac_c_werror_flag" ||
18904 test ! -s conftest.err
18905 } && test -s conftest$ac_exeext &&
18906 $as_test_x conftest$ac_exeext; then
18907 ac_cv_lib_pam_pam_set_item=yes 11238 ac_cv_lib_pam_pam_set_item=yes
18908else 11239else
18909 echo "$as_me: failed program was:" >&5 11240 ac_cv_lib_pam_pam_set_item=no
18910sed 's/^/| /' conftest.$ac_ext >&5
18911
18912 ac_cv_lib_pam_pam_set_item=no
18913fi 11241fi
18914 11242rm -f core conftest.err conftest.$ac_objext \
18915rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11243 conftest$ac_exeext conftest.$ac_ext
18916 conftest$ac_exeext conftest.$ac_ext
18917LIBS=$ac_check_lib_save_LIBS 11244LIBS=$ac_check_lib_save_LIBS
18918fi 11245fi
18919{ echo "$as_me:$LINENO: result: $ac_cv_lib_pam_pam_set_item" >&5 11246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pam_pam_set_item" >&5
18920echo "${ECHO_T}$ac_cv_lib_pam_pam_set_item" >&6; } 11247$as_echo "$ac_cv_lib_pam_pam_set_item" >&6; }
18921if test $ac_cv_lib_pam_pam_set_item = yes; then 11248if test "x$ac_cv_lib_pam_pam_set_item" = xyes; then :
18922 cat >>confdefs.h <<_ACEOF 11249 cat >>confdefs.h <<_ACEOF
18923#define HAVE_LIBPAM 1 11250#define HAVE_LIBPAM 1
18924_ACEOF 11251_ACEOF
@@ -18926,194 +11253,26 @@ _ACEOF
18926 LIBS="-lpam $LIBS" 11253 LIBS="-lpam $LIBS"
18927 11254
18928else 11255else
18929 { { echo "$as_me:$LINENO: error: *** libpam missing" >&5 11256 as_fn_error $? "*** libpam missing" "$LINENO" 5
18930echo "$as_me: error: *** libpam missing" >&2;}
18931 { (exit 1); exit 1; }; }
18932fi
18933
18934
18935for ac_func in pam_getenvlist
18936do
18937as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18938{ echo "$as_me:$LINENO: checking for $ac_func" >&5
18939echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
18940if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
18941 echo $ECHO_N "(cached) $ECHO_C" >&6
18942else
18943 cat >conftest.$ac_ext <<_ACEOF
18944/* confdefs.h. */
18945_ACEOF
18946cat confdefs.h >>conftest.$ac_ext
18947cat >>conftest.$ac_ext <<_ACEOF
18948/* end confdefs.h. */
18949/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
18950 For example, HP-UX 11i <limits.h> declares gettimeofday. */
18951#define $ac_func innocuous_$ac_func
18952
18953/* System header to define __stub macros and hopefully few prototypes,
18954 which can conflict with char $ac_func (); below.
18955 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
18956 <limits.h> exists even on freestanding compilers. */
18957
18958#ifdef __STDC__
18959# include <limits.h>
18960#else
18961# include <assert.h>
18962#endif
18963
18964#undef $ac_func
18965
18966/* Override any GCC internal prototype to avoid an error.
18967 Use char because int might match the return type of a GCC
18968 builtin and then its argument prototype would still apply. */
18969#ifdef __cplusplus
18970extern "C"
18971#endif
18972char $ac_func ();
18973/* The GNU C library defines this for functions which it implements
18974 to always fail with ENOSYS. Some functions are actually named
18975 something starting with __ and the normal name is an alias. */
18976#if defined __stub_$ac_func || defined __stub___$ac_func
18977choke me
18978#endif
18979
18980int
18981main ()
18982{
18983return $ac_func ();
18984 ;
18985 return 0;
18986}
18987_ACEOF
18988rm -f conftest.$ac_objext conftest$ac_exeext
18989if { (ac_try="$ac_link"
18990case "(($ac_try" in
18991 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
18992 *) ac_try_echo=$ac_try;;
18993esac
18994eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
18995 (eval "$ac_link") 2>conftest.er1
18996 ac_status=$?
18997 grep -v '^ *+' conftest.er1 >conftest.err
18998 rm -f conftest.er1
18999 cat conftest.err >&5
19000 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19001 (exit $ac_status); } && {
19002 test -z "$ac_c_werror_flag" ||
19003 test ! -s conftest.err
19004 } && test -s conftest$ac_exeext &&
19005 $as_test_x conftest$ac_exeext; then
19006 eval "$as_ac_var=yes"
19007else
19008 echo "$as_me: failed program was:" >&5
19009sed 's/^/| /' conftest.$ac_ext >&5
19010
19011 eval "$as_ac_var=no"
19012fi 11257fi
19013 11258
19014rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 11259 for ac_func in pam_getenvlist
19015 conftest$ac_exeext conftest.$ac_ext 11260do :
19016fi 11261 ac_fn_c_check_func "$LINENO" "pam_getenvlist" "ac_cv_func_pam_getenvlist"
19017ac_res=`eval echo '${'$as_ac_var'}'` 11262if test "x$ac_cv_func_pam_getenvlist" = xyes; then :
19018 { echo "$as_me:$LINENO: result: $ac_res" >&5
19019echo "${ECHO_T}$ac_res" >&6; }
19020if test `eval echo '${'$as_ac_var'}'` = yes; then
19021 cat >>confdefs.h <<_ACEOF 11263 cat >>confdefs.h <<_ACEOF
19022#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 11264#define HAVE_PAM_GETENVLIST 1
19023_ACEOF 11265_ACEOF
19024 11266
19025fi 11267fi
19026done 11268done
19027 11269
19028 11270 for ac_func in pam_putenv
19029for ac_func in pam_putenv 11271do :
19030do 11272 ac_fn_c_check_func "$LINENO" "pam_putenv" "ac_cv_func_pam_putenv"
19031as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 11273if test "x$ac_cv_func_pam_putenv" = xyes; then :
19032{ echo "$as_me:$LINENO: checking for $ac_func" >&5
19033echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
19034if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
19035 echo $ECHO_N "(cached) $ECHO_C" >&6
19036else
19037 cat >conftest.$ac_ext <<_ACEOF
19038/* confdefs.h. */
19039_ACEOF
19040cat confdefs.h >>conftest.$ac_ext
19041cat >>conftest.$ac_ext <<_ACEOF
19042/* end confdefs.h. */
19043/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
19044 For example, HP-UX 11i <limits.h> declares gettimeofday. */
19045#define $ac_func innocuous_$ac_func
19046
19047/* System header to define __stub macros and hopefully few prototypes,
19048 which can conflict with char $ac_func (); below.
19049 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
19050 <limits.h> exists even on freestanding compilers. */
19051
19052#ifdef __STDC__
19053# include <limits.h>
19054#else
19055# include <assert.h>
19056#endif
19057
19058#undef $ac_func
19059
19060/* Override any GCC internal prototype to avoid an error.
19061 Use char because int might match the return type of a GCC
19062 builtin and then its argument prototype would still apply. */
19063#ifdef __cplusplus
19064extern "C"
19065#endif
19066char $ac_func ();
19067/* The GNU C library defines this for functions which it implements
19068 to always fail with ENOSYS. Some functions are actually named
19069 something starting with __ and the normal name is an alias. */
19070#if defined __stub_$ac_func || defined __stub___$ac_func
19071choke me
19072#endif
19073
19074int
19075main ()
19076{
19077return $ac_func ();
19078 ;
19079 return 0;
19080}
19081_ACEOF
19082rm -f conftest.$ac_objext conftest$ac_exeext
19083if { (ac_try="$ac_link"
19084case "(($ac_try" in
19085 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19086 *) ac_try_echo=$ac_try;;
19087esac
19088eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19089 (eval "$ac_link") 2>conftest.er1
19090 ac_status=$?
19091 grep -v '^ *+' conftest.er1 >conftest.err
19092 rm -f conftest.er1
19093 cat conftest.err >&5
19094 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19095 (exit $ac_status); } && {
19096 test -z "$ac_c_werror_flag" ||
19097 test ! -s conftest.err
19098 } && test -s conftest$ac_exeext &&
19099 $as_test_x conftest$ac_exeext; then
19100 eval "$as_ac_var=yes"
19101else
19102 echo "$as_me: failed program was:" >&5
19103sed 's/^/| /' conftest.$ac_ext >&5
19104
19105 eval "$as_ac_var=no"
19106fi
19107
19108rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
19109 conftest$ac_exeext conftest.$ac_ext
19110fi
19111ac_res=`eval echo '${'$as_ac_var'}'`
19112 { echo "$as_me:$LINENO: result: $ac_res" >&5
19113echo "${ECHO_T}$ac_res" >&6; }
19114if test `eval echo '${'$as_ac_var'}'` = yes; then
19115 cat >>confdefs.h <<_ACEOF 11274 cat >>confdefs.h <<_ACEOF
19116#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 11275#define HAVE_PAM_PUTENV 1
19117_ACEOF 11276_ACEOF
19118 11277
19119fi 11278fi
@@ -19125,9 +11284,7 @@ done
19125 11284
19126 SSHDLIBS="$SSHDLIBS -lpam" 11285 SSHDLIBS="$SSHDLIBS -lpam"
19127 11286
19128cat >>confdefs.h <<\_ACEOF 11287$as_echo "#define USE_PAM 1" >>confdefs.h
19129#define USE_PAM 1
19130_ACEOF
19131 11288
19132 11289
19133 if test $ac_cv_lib_dl_dlopen = yes; then 11290 if test $ac_cv_lib_dl_dlopen = yes; then
@@ -19149,13 +11306,9 @@ fi
19149# Check for older PAM 11306# Check for older PAM
19150if test "x$PAM_MSG" = "xyes" ; then 11307if test "x$PAM_MSG" = "xyes" ; then
19151 # Check PAM strerror arguments (old PAM) 11308 # Check PAM strerror arguments (old PAM)
19152 { echo "$as_me:$LINENO: checking whether pam_strerror takes only one argument" >&5 11309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pam_strerror takes only one argument" >&5
19153echo $ECHO_N "checking whether pam_strerror takes only one argument... $ECHO_C" >&6; } 11310$as_echo_n "checking whether pam_strerror takes only one argument... " >&6; }
19154 cat >conftest.$ac_ext <<_ACEOF 11311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19155/* confdefs.h. */
19156_ACEOF
19157cat confdefs.h >>conftest.$ac_ext
19158cat >>conftest.$ac_ext <<_ACEOF
19159/* end confdefs.h. */ 11312/* end confdefs.h. */
19160 11313
19161#include <stdlib.h> 11314#include <stdlib.h>
@@ -19168,213 +11321,34 @@ cat >>conftest.$ac_ext <<_ACEOF
19168int 11321int
19169main () 11322main ()
19170{ 11323{
11324
19171(void)pam_strerror((pam_handle_t *)NULL, -1); 11325(void)pam_strerror((pam_handle_t *)NULL, -1);
11326
19172 ; 11327 ;
19173 return 0; 11328 return 0;
19174} 11329}
19175_ACEOF 11330_ACEOF
19176rm -f conftest.$ac_objext 11331if ac_fn_c_try_compile "$LINENO"; then :
19177if { (ac_try="$ac_compile" 11332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19178case "(($ac_try" in 11333$as_echo "no" >&6; }
19179 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
19180 *) ac_try_echo=$ac_try;;
19181esac
19182eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
19183 (eval "$ac_compile") 2>conftest.er1
19184 ac_status=$?
19185 grep -v '^ *+' conftest.er1 >conftest.err
19186 rm -f conftest.er1
19187 cat conftest.err >&5
19188 echo "$as_me:$LINENO: \$? = $ac_status" >&5
19189 (exit $ac_status); } && {
19190 test -z "$ac_c_werror_flag" ||
19191 test ! -s conftest.err
19192 } && test -s conftest.$ac_objext; then
19193 { echo "$as_me:$LINENO: result: no" >&5
19194echo "${ECHO_T}no" >&6; }
19195else 11334else
19196 echo "$as_me: failed program was:" >&5
19197sed 's/^/| /' conftest.$ac_ext >&5
19198
19199 11335
19200 11336
19201cat >>confdefs.h <<\_ACEOF 11337$as_echo "#define HAVE_OLD_PAM 1" >>confdefs.h
19202#define HAVE_OLD_PAM 1
19203_ACEOF
19204 11338
19205 { echo "$as_me:$LINENO: result: yes" >&5 11339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
19206echo "${ECHO_T}yes" >&6; } 11340$as_echo "yes" >&6; }
19207 PAM_MSG="yes (old library)" 11341 PAM_MSG="yes (old library)"
19208 11342
19209 11343
19210fi 11344fi
19211
19212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19213fi 11346fi
19214 11347
19215# Do we want to force the use of the rand helper?
19216
19217# Check whether --with-rand-helper was given.
19218if test "${with_rand_helper+set}" = set; then
19219 withval=$with_rand_helper;
19220 if test "x$withval" = "xno" ; then
19221 # Force use of OpenSSL's internal RNG, even if
19222 # the previous test showed it to be unseeded.
19223 if test -z "$OPENSSL_SEEDS_ITSELF" ; then
19224 { echo "$as_me:$LINENO: WARNING: *** Forcing use of OpenSSL's non-self-seeding PRNG" >&5
19225echo "$as_me: WARNING: *** Forcing use of OpenSSL's non-self-seeding PRNG" >&2;}
19226 OPENSSL_SEEDS_ITSELF=yes
19227 USE_RAND_HELPER=""
19228 fi
19229 else
19230 USE_RAND_HELPER=yes
19231 fi
19232
19233fi
19234
19235
19236# Which randomness source do we use?
19237if test ! -z "$OPENSSL_SEEDS_ITSELF" && test -z "$USE_RAND_HELPER" ; then
19238 # OpenSSL only
19239
19240cat >>confdefs.h <<\_ACEOF
19241#define OPENSSL_PRNG_ONLY 1
19242_ACEOF
19243
19244 RAND_MSG="OpenSSL internal ONLY"
19245 INSTALL_SSH_RAND_HELPER=""
19246elif test ! -z "$USE_RAND_HELPER" ; then
19247 # install rand helper
19248 RAND_MSG="ssh-rand-helper"
19249 INSTALL_SSH_RAND_HELPER="yes"
19250fi
19251
19252
19253### Configuration of ssh-rand-helper
19254
19255# PRNGD TCP socket
19256
19257# Check whether --with-prngd-port was given.
19258if test "${with_prngd_port+set}" = set; then
19259 withval=$with_prngd_port;
19260 case "$withval" in
19261 no)
19262 withval=""
19263 ;;
19264 [0-9]*)
19265 ;;
19266 *)
19267 { { echo "$as_me:$LINENO: error: You must specify a numeric port number for --with-prngd-port" >&5
19268echo "$as_me: error: You must specify a numeric port number for --with-prngd-port" >&2;}
19269 { (exit 1); exit 1; }; }
19270 ;;
19271 esac
19272 if test ! -z "$withval" ; then
19273 PRNGD_PORT="$withval"
19274
19275cat >>confdefs.h <<_ACEOF
19276#define PRNGD_PORT $PRNGD_PORT
19277_ACEOF
19278
19279 fi
19280
19281
19282fi
19283
19284
19285# PRNGD Unix domain socket
19286
19287# Check whether --with-prngd-socket was given.
19288if test "${with_prngd_socket+set}" = set; then
19289 withval=$with_prngd_socket;
19290 case "$withval" in
19291 yes)
19292 withval="/var/run/egd-pool"
19293 ;;
19294 no)
19295 withval=""
19296 ;;
19297 /*)
19298 ;;
19299 *)
19300 { { echo "$as_me:$LINENO: error: You must specify an absolute path to the entropy socket" >&5
19301echo "$as_me: error: You must specify an absolute path to the entropy socket" >&2;}
19302 { (exit 1); exit 1; }; }
19303 ;;
19304 esac
19305
19306 if test ! -z "$withval" ; then
19307 if test ! -z "$PRNGD_PORT" ; then
19308 { { echo "$as_me:$LINENO: error: You may not specify both a PRNGD/EGD port and socket" >&5
19309echo "$as_me: error: You may not specify both a PRNGD/EGD port and socket" >&2;}
19310 { (exit 1); exit 1; }; }
19311 fi
19312 if test ! -r "$withval" ; then
19313 { echo "$as_me:$LINENO: WARNING: Entropy socket is not readable" >&5
19314echo "$as_me: WARNING: Entropy socket is not readable" >&2;}
19315 fi
19316 PRNGD_SOCKET="$withval"
19317
19318cat >>confdefs.h <<_ACEOF
19319#define PRNGD_SOCKET "$PRNGD_SOCKET"
19320_ACEOF
19321
19322 fi
19323
19324else
19325
19326 # Check for existing socket only if we don't have a random device already
19327 if test "$USE_RAND_HELPER" = yes ; then
19328 { echo "$as_me:$LINENO: checking for PRNGD/EGD socket" >&5
19329echo $ECHO_N "checking for PRNGD/EGD socket... $ECHO_C" >&6; }
19330 # Insert other locations here
19331 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
19332 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
19333 PRNGD_SOCKET="$sock"
19334 cat >>confdefs.h <<_ACEOF
19335#define PRNGD_SOCKET "$PRNGD_SOCKET"
19336_ACEOF
19337
19338 break;
19339 fi
19340 done
19341 if test ! -z "$PRNGD_SOCKET" ; then
19342 { echo "$as_me:$LINENO: result: $PRNGD_SOCKET" >&5
19343echo "${ECHO_T}$PRNGD_SOCKET" >&6; }
19344 else
19345 { echo "$as_me:$LINENO: result: not found" >&5
19346echo "${ECHO_T}not found" >&6; }
19347 fi
19348 fi
19349
19350
19351fi
19352
19353
19354# Change default command timeout for hashing entropy source
19355entropy_timeout=200
19356
19357# Check whether --with-entropy-timeout was given.
19358if test "${with_entropy_timeout+set}" = set; then
19359 withval=$with_entropy_timeout;
19360 if test -n "$withval" && test "x$withval" != "xno" && \
19361 test "x${withval}" != "xyes"; then
19362 entropy_timeout=$withval
19363 fi
19364
19365
19366fi
19367
19368
19369cat >>confdefs.h <<_ACEOF
19370#define ENTROPY_TIMEOUT_MSEC $entropy_timeout
19371_ACEOF
19372
19373
19374SSH_PRIVSEP_USER=sshd 11348SSH_PRIVSEP_USER=sshd
19375 11349
19376# Check whether --with-privsep-user was given. 11350# Check whether --with-privsep-user was given.
19377if test "${with_privsep_user+set}" = set; then 11351if test "${with_privsep_user+set}" = set; then :
19378 withval=$with_privsep_user; 11352 withval=$with_privsep_user;
19379 if test -n "$withval" && test "x$withval" != "xno" && \ 11353 if test -n "$withval" && test "x$withval" != "xno" && \
19380 test "x${withval}" != "xyes"; then 11354 test "x${withval}" != "xyes"; then
@@ -19391,836 +11365,65 @@ _ACEOF
19391 11365
19392 11366
19393 11367
19394# We do this little dance with the search path to insure 11368# Decide which sandbox style to use
19395# that programs that we select for use by installed programs 11369sandbox_arg=""
19396# (which may be run by the super-user) come from trusted
19397# locations before they come from the user's private area.
19398# This should help avoid accidentally configuring some
19399# random version of a program in someone's personal bin.
19400
19401OPATH=$PATH
19402PATH=/bin:/usr/bin
19403test -h /bin 2> /dev/null && PATH=/usr/bin
19404test -d /sbin && PATH=$PATH:/sbin
19405test -d /usr/sbin && PATH=$PATH:/usr/sbin
19406PATH=$PATH:/etc:$OPATH
19407
19408# These programs are used by the command hashing source to gather entropy
19409
19410 # Extract the first word of "ls", so it can be a program name with args.
19411set dummy ls; ac_word=$2
19412{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19413echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19414if test "${ac_cv_path_PROG_LS+set}" = set; then
19415 echo $ECHO_N "(cached) $ECHO_C" >&6
19416else
19417 case $PROG_LS in
19418 [\\/]* | ?:[\\/]*)
19419 ac_cv_path_PROG_LS="$PROG_LS" # Let the user override the test with a path.
19420 ;;
19421 *)
19422 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19423for as_dir in $PATH
19424do
19425 IFS=$as_save_IFS
19426 test -z "$as_dir" && as_dir=.
19427 for ac_exec_ext in '' $ac_executable_extensions; do
19428 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19429 ac_cv_path_PROG_LS="$as_dir/$ac_word$ac_exec_ext"
19430 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19431 break 2
19432 fi
19433done
19434done
19435IFS=$as_save_IFS
19436
19437 ;;
19438esac
19439fi
19440PROG_LS=$ac_cv_path_PROG_LS
19441if test -n "$PROG_LS"; then
19442 { echo "$as_me:$LINENO: result: $PROG_LS" >&5
19443echo "${ECHO_T}$PROG_LS" >&6; }
19444else
19445 { echo "$as_me:$LINENO: result: no" >&5
19446echo "${ECHO_T}no" >&6; }
19447fi
19448
19449
19450 if test -z "$PROG_LS" ; then
19451 PROG_LS="undef"
19452 fi
19453
19454
19455
19456 # Extract the first word of "netstat", so it can be a program name with args.
19457set dummy netstat; ac_word=$2
19458{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19459echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19460if test "${ac_cv_path_PROG_NETSTAT+set}" = set; then
19461 echo $ECHO_N "(cached) $ECHO_C" >&6
19462else
19463 case $PROG_NETSTAT in
19464 [\\/]* | ?:[\\/]*)
19465 ac_cv_path_PROG_NETSTAT="$PROG_NETSTAT" # Let the user override the test with a path.
19466 ;;
19467 *)
19468 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19469for as_dir in $PATH
19470do
19471 IFS=$as_save_IFS
19472 test -z "$as_dir" && as_dir=.
19473 for ac_exec_ext in '' $ac_executable_extensions; do
19474 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19475 ac_cv_path_PROG_NETSTAT="$as_dir/$ac_word$ac_exec_ext"
19476 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19477 break 2
19478 fi
19479done
19480done
19481IFS=$as_save_IFS
19482
19483 ;;
19484esac
19485fi
19486PROG_NETSTAT=$ac_cv_path_PROG_NETSTAT
19487if test -n "$PROG_NETSTAT"; then
19488 { echo "$as_me:$LINENO: result: $PROG_NETSTAT" >&5
19489echo "${ECHO_T}$PROG_NETSTAT" >&6; }
19490else
19491 { echo "$as_me:$LINENO: result: no" >&5
19492echo "${ECHO_T}no" >&6; }
19493fi
19494
19495
19496 if test -z "$PROG_NETSTAT" ; then
19497 PROG_NETSTAT="undef"
19498 fi
19499
19500
19501
19502 # Extract the first word of "arp", so it can be a program name with args.
19503set dummy arp; ac_word=$2
19504{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19505echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19506if test "${ac_cv_path_PROG_ARP+set}" = set; then
19507 echo $ECHO_N "(cached) $ECHO_C" >&6
19508else
19509 case $PROG_ARP in
19510 [\\/]* | ?:[\\/]*)
19511 ac_cv_path_PROG_ARP="$PROG_ARP" # Let the user override the test with a path.
19512 ;;
19513 *)
19514 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19515for as_dir in $PATH
19516do
19517 IFS=$as_save_IFS
19518 test -z "$as_dir" && as_dir=.
19519 for ac_exec_ext in '' $ac_executable_extensions; do
19520 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19521 ac_cv_path_PROG_ARP="$as_dir/$ac_word$ac_exec_ext"
19522 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19523 break 2
19524 fi
19525done
19526done
19527IFS=$as_save_IFS
19528
19529 ;;
19530esac
19531fi
19532PROG_ARP=$ac_cv_path_PROG_ARP
19533if test -n "$PROG_ARP"; then
19534 { echo "$as_me:$LINENO: result: $PROG_ARP" >&5
19535echo "${ECHO_T}$PROG_ARP" >&6; }
19536else
19537 { echo "$as_me:$LINENO: result: no" >&5
19538echo "${ECHO_T}no" >&6; }
19539fi
19540
19541
19542 if test -z "$PROG_ARP" ; then
19543 PROG_ARP="undef"
19544 fi
19545
19546
19547
19548 # Extract the first word of "ifconfig", so it can be a program name with args.
19549set dummy ifconfig; ac_word=$2
19550{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19551echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19552if test "${ac_cv_path_PROG_IFCONFIG+set}" = set; then
19553 echo $ECHO_N "(cached) $ECHO_C" >&6
19554else
19555 case $PROG_IFCONFIG in
19556 [\\/]* | ?:[\\/]*)
19557 ac_cv_path_PROG_IFCONFIG="$PROG_IFCONFIG" # Let the user override the test with a path.
19558 ;;
19559 *)
19560 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19561for as_dir in $PATH
19562do
19563 IFS=$as_save_IFS
19564 test -z "$as_dir" && as_dir=.
19565 for ac_exec_ext in '' $ac_executable_extensions; do
19566 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19567 ac_cv_path_PROG_IFCONFIG="$as_dir/$ac_word$ac_exec_ext"
19568 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19569 break 2
19570 fi
19571done
19572done
19573IFS=$as_save_IFS
19574
19575 ;;
19576esac
19577fi
19578PROG_IFCONFIG=$ac_cv_path_PROG_IFCONFIG
19579if test -n "$PROG_IFCONFIG"; then
19580 { echo "$as_me:$LINENO: result: $PROG_IFCONFIG" >&5
19581echo "${ECHO_T}$PROG_IFCONFIG" >&6; }
19582else
19583 { echo "$as_me:$LINENO: result: no" >&5
19584echo "${ECHO_T}no" >&6; }
19585fi
19586
19587
19588 if test -z "$PROG_IFCONFIG" ; then
19589 PROG_IFCONFIG="undef"
19590 fi
19591
19592
19593
19594 # Extract the first word of "jstat", so it can be a program name with args.
19595set dummy jstat; ac_word=$2
19596{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19597echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19598if test "${ac_cv_path_PROG_JSTAT+set}" = set; then
19599 echo $ECHO_N "(cached) $ECHO_C" >&6
19600else
19601 case $PROG_JSTAT in
19602 [\\/]* | ?:[\\/]*)
19603 ac_cv_path_PROG_JSTAT="$PROG_JSTAT" # Let the user override the test with a path.
19604 ;;
19605 *)
19606 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19607for as_dir in $PATH
19608do
19609 IFS=$as_save_IFS
19610 test -z "$as_dir" && as_dir=.
19611 for ac_exec_ext in '' $ac_executable_extensions; do
19612 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19613 ac_cv_path_PROG_JSTAT="$as_dir/$ac_word$ac_exec_ext"
19614 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19615 break 2
19616 fi
19617done
19618done
19619IFS=$as_save_IFS
19620
19621 ;;
19622esac
19623fi
19624PROG_JSTAT=$ac_cv_path_PROG_JSTAT
19625if test -n "$PROG_JSTAT"; then
19626 { echo "$as_me:$LINENO: result: $PROG_JSTAT" >&5
19627echo "${ECHO_T}$PROG_JSTAT" >&6; }
19628else
19629 { echo "$as_me:$LINENO: result: no" >&5
19630echo "${ECHO_T}no" >&6; }
19631fi
19632
19633
19634 if test -z "$PROG_JSTAT" ; then
19635 PROG_JSTAT="undef"
19636 fi
19637
19638
19639
19640 # Extract the first word of "ps", so it can be a program name with args.
19641set dummy ps; ac_word=$2
19642{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19643echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19644if test "${ac_cv_path_PROG_PS+set}" = set; then
19645 echo $ECHO_N "(cached) $ECHO_C" >&6
19646else
19647 case $PROG_PS in
19648 [\\/]* | ?:[\\/]*)
19649 ac_cv_path_PROG_PS="$PROG_PS" # Let the user override the test with a path.
19650 ;;
19651 *)
19652 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19653for as_dir in $PATH
19654do
19655 IFS=$as_save_IFS
19656 test -z "$as_dir" && as_dir=.
19657 for ac_exec_ext in '' $ac_executable_extensions; do
19658 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19659 ac_cv_path_PROG_PS="$as_dir/$ac_word$ac_exec_ext"
19660 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19661 break 2
19662 fi
19663done
19664done
19665IFS=$as_save_IFS
19666
19667 ;;
19668esac
19669fi
19670PROG_PS=$ac_cv_path_PROG_PS
19671if test -n "$PROG_PS"; then
19672 { echo "$as_me:$LINENO: result: $PROG_PS" >&5
19673echo "${ECHO_T}$PROG_PS" >&6; }
19674else
19675 { echo "$as_me:$LINENO: result: no" >&5
19676echo "${ECHO_T}no" >&6; }
19677fi
19678
19679
19680 if test -z "$PROG_PS" ; then
19681 PROG_PS="undef"
19682 fi
19683
19684
19685
19686 # Extract the first word of "sar", so it can be a program name with args.
19687set dummy sar; ac_word=$2
19688{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19689echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19690if test "${ac_cv_path_PROG_SAR+set}" = set; then
19691 echo $ECHO_N "(cached) $ECHO_C" >&6
19692else
19693 case $PROG_SAR in
19694 [\\/]* | ?:[\\/]*)
19695 ac_cv_path_PROG_SAR="$PROG_SAR" # Let the user override the test with a path.
19696 ;;
19697 *)
19698 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19699for as_dir in $PATH
19700do
19701 IFS=$as_save_IFS
19702 test -z "$as_dir" && as_dir=.
19703 for ac_exec_ext in '' $ac_executable_extensions; do
19704 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19705 ac_cv_path_PROG_SAR="$as_dir/$ac_word$ac_exec_ext"
19706 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19707 break 2
19708 fi
19709done
19710done
19711IFS=$as_save_IFS
19712
19713 ;;
19714esac
19715fi
19716PROG_SAR=$ac_cv_path_PROG_SAR
19717if test -n "$PROG_SAR"; then
19718 { echo "$as_me:$LINENO: result: $PROG_SAR" >&5
19719echo "${ECHO_T}$PROG_SAR" >&6; }
19720else
19721 { echo "$as_me:$LINENO: result: no" >&5
19722echo "${ECHO_T}no" >&6; }
19723fi
19724
19725
19726 if test -z "$PROG_SAR" ; then
19727 PROG_SAR="undef"
19728 fi
19729
19730
19731
19732 # Extract the first word of "w", so it can be a program name with args.
19733set dummy w; ac_word=$2
19734{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19735echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19736if test "${ac_cv_path_PROG_W+set}" = set; then
19737 echo $ECHO_N "(cached) $ECHO_C" >&6
19738else
19739 case $PROG_W in
19740 [\\/]* | ?:[\\/]*)
19741 ac_cv_path_PROG_W="$PROG_W" # Let the user override the test with a path.
19742 ;;
19743 *)
19744 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19745for as_dir in $PATH
19746do
19747 IFS=$as_save_IFS
19748 test -z "$as_dir" && as_dir=.
19749 for ac_exec_ext in '' $ac_executable_extensions; do
19750 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19751 ac_cv_path_PROG_W="$as_dir/$ac_word$ac_exec_ext"
19752 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19753 break 2
19754 fi
19755done
19756done
19757IFS=$as_save_IFS
19758
19759 ;;
19760esac
19761fi
19762PROG_W=$ac_cv_path_PROG_W
19763if test -n "$PROG_W"; then
19764 { echo "$as_me:$LINENO: result: $PROG_W" >&5
19765echo "${ECHO_T}$PROG_W" >&6; }
19766else
19767 { echo "$as_me:$LINENO: result: no" >&5
19768echo "${ECHO_T}no" >&6; }
19769fi
19770
19771
19772 if test -z "$PROG_W" ; then
19773 PROG_W="undef"
19774 fi
19775
19776
19777
19778 # Extract the first word of "who", so it can be a program name with args.
19779set dummy who; ac_word=$2
19780{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19781echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19782if test "${ac_cv_path_PROG_WHO+set}" = set; then
19783 echo $ECHO_N "(cached) $ECHO_C" >&6
19784else
19785 case $PROG_WHO in
19786 [\\/]* | ?:[\\/]*)
19787 ac_cv_path_PROG_WHO="$PROG_WHO" # Let the user override the test with a path.
19788 ;;
19789 *)
19790 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19791for as_dir in $PATH
19792do
19793 IFS=$as_save_IFS
19794 test -z "$as_dir" && as_dir=.
19795 for ac_exec_ext in '' $ac_executable_extensions; do
19796 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19797 ac_cv_path_PROG_WHO="$as_dir/$ac_word$ac_exec_ext"
19798 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19799 break 2
19800 fi
19801done
19802done
19803IFS=$as_save_IFS
19804
19805 ;;
19806esac
19807fi
19808PROG_WHO=$ac_cv_path_PROG_WHO
19809if test -n "$PROG_WHO"; then
19810 { echo "$as_me:$LINENO: result: $PROG_WHO" >&5
19811echo "${ECHO_T}$PROG_WHO" >&6; }
19812else
19813 { echo "$as_me:$LINENO: result: no" >&5
19814echo "${ECHO_T}no" >&6; }
19815fi
19816
19817
19818 if test -z "$PROG_WHO" ; then
19819 PROG_WHO="undef"
19820 fi
19821
19822
19823
19824 # Extract the first word of "last", so it can be a program name with args.
19825set dummy last; ac_word=$2
19826{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19827echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19828if test "${ac_cv_path_PROG_LAST+set}" = set; then
19829 echo $ECHO_N "(cached) $ECHO_C" >&6
19830else
19831 case $PROG_LAST in
19832 [\\/]* | ?:[\\/]*)
19833 ac_cv_path_PROG_LAST="$PROG_LAST" # Let the user override the test with a path.
19834 ;;
19835 *)
19836 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19837for as_dir in $PATH
19838do
19839 IFS=$as_save_IFS
19840 test -z "$as_dir" && as_dir=.
19841 for ac_exec_ext in '' $ac_executable_extensions; do
19842 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19843 ac_cv_path_PROG_LAST="$as_dir/$ac_word$ac_exec_ext"
19844 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19845 break 2
19846 fi
19847done
19848done
19849IFS=$as_save_IFS
19850
19851 ;;
19852esac
19853fi
19854PROG_LAST=$ac_cv_path_PROG_LAST
19855if test -n "$PROG_LAST"; then
19856 { echo "$as_me:$LINENO: result: $PROG_LAST" >&5
19857echo "${ECHO_T}$PROG_LAST" >&6; }
19858else
19859 { echo "$as_me:$LINENO: result: no" >&5
19860echo "${ECHO_T}no" >&6; }
19861fi
19862
19863
19864 if test -z "$PROG_LAST" ; then
19865 PROG_LAST="undef"
19866 fi
19867
19868
19869
19870 # Extract the first word of "lastlog", so it can be a program name with args.
19871set dummy lastlog; ac_word=$2
19872{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19873echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19874if test "${ac_cv_path_PROG_LASTLOG+set}" = set; then
19875 echo $ECHO_N "(cached) $ECHO_C" >&6
19876else
19877 case $PROG_LASTLOG in
19878 [\\/]* | ?:[\\/]*)
19879 ac_cv_path_PROG_LASTLOG="$PROG_LASTLOG" # Let the user override the test with a path.
19880 ;;
19881 *)
19882 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19883for as_dir in $PATH
19884do
19885 IFS=$as_save_IFS
19886 test -z "$as_dir" && as_dir=.
19887 for ac_exec_ext in '' $ac_executable_extensions; do
19888 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19889 ac_cv_path_PROG_LASTLOG="$as_dir/$ac_word$ac_exec_ext"
19890 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19891 break 2
19892 fi
19893done
19894done
19895IFS=$as_save_IFS
19896
19897 ;;
19898esac
19899fi
19900PROG_LASTLOG=$ac_cv_path_PROG_LASTLOG
19901if test -n "$PROG_LASTLOG"; then
19902 { echo "$as_me:$LINENO: result: $PROG_LASTLOG" >&5
19903echo "${ECHO_T}$PROG_LASTLOG" >&6; }
19904else
19905 { echo "$as_me:$LINENO: result: no" >&5
19906echo "${ECHO_T}no" >&6; }
19907fi
19908
19909
19910 if test -z "$PROG_LASTLOG" ; then
19911 PROG_LASTLOG="undef"
19912 fi
19913
19914
19915
19916 # Extract the first word of "df", so it can be a program name with args.
19917set dummy df; ac_word=$2
19918{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19919echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19920if test "${ac_cv_path_PROG_DF+set}" = set; then
19921 echo $ECHO_N "(cached) $ECHO_C" >&6
19922else
19923 case $PROG_DF in
19924 [\\/]* | ?:[\\/]*)
19925 ac_cv_path_PROG_DF="$PROG_DF" # Let the user override the test with a path.
19926 ;;
19927 *)
19928 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19929for as_dir in $PATH
19930do
19931 IFS=$as_save_IFS
19932 test -z "$as_dir" && as_dir=.
19933 for ac_exec_ext in '' $ac_executable_extensions; do
19934 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19935 ac_cv_path_PROG_DF="$as_dir/$ac_word$ac_exec_ext"
19936 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19937 break 2
19938 fi
19939done
19940done
19941IFS=$as_save_IFS
19942
19943 ;;
19944esac
19945fi
19946PROG_DF=$ac_cv_path_PROG_DF
19947if test -n "$PROG_DF"; then
19948 { echo "$as_me:$LINENO: result: $PROG_DF" >&5
19949echo "${ECHO_T}$PROG_DF" >&6; }
19950else
19951 { echo "$as_me:$LINENO: result: no" >&5
19952echo "${ECHO_T}no" >&6; }
19953fi
19954
19955
19956 if test -z "$PROG_DF" ; then
19957 PROG_DF="undef"
19958 fi
19959
19960
19961
19962 # Extract the first word of "vmstat", so it can be a program name with args.
19963set dummy vmstat; ac_word=$2
19964{ echo "$as_me:$LINENO: checking for $ac_word" >&5
19965echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
19966if test "${ac_cv_path_PROG_VMSTAT+set}" = set; then
19967 echo $ECHO_N "(cached) $ECHO_C" >&6
19968else
19969 case $PROG_VMSTAT in
19970 [\\/]* | ?:[\\/]*)
19971 ac_cv_path_PROG_VMSTAT="$PROG_VMSTAT" # Let the user override the test with a path.
19972 ;;
19973 *)
19974 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19975for as_dir in $PATH
19976do
19977 IFS=$as_save_IFS
19978 test -z "$as_dir" && as_dir=.
19979 for ac_exec_ext in '' $ac_executable_extensions; do
19980 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
19981 ac_cv_path_PROG_VMSTAT="$as_dir/$ac_word$ac_exec_ext"
19982 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
19983 break 2
19984 fi
19985done
19986done
19987IFS=$as_save_IFS
19988
19989 ;;
19990esac
19991fi
19992PROG_VMSTAT=$ac_cv_path_PROG_VMSTAT
19993if test -n "$PROG_VMSTAT"; then
19994 { echo "$as_me:$LINENO: result: $PROG_VMSTAT" >&5
19995echo "${ECHO_T}$PROG_VMSTAT" >&6; }
19996else
19997 { echo "$as_me:$LINENO: result: no" >&5
19998echo "${ECHO_T}no" >&6; }
19999fi
20000
20001
20002 if test -z "$PROG_VMSTAT" ; then
20003 PROG_VMSTAT="undef"
20004 fi
20005 11370
11371# Check whether --with-sandbox was given.
11372if test "${with_sandbox+set}" = set; then :
11373 withval=$with_sandbox;
11374 if test "x$withval" = "xyes" ; then
11375 sandbox_arg=""
11376 else
11377 sandbox_arg="$withval"
11378 fi
20006 11379
20007 11380
20008 # Extract the first word of "uptime", so it can be a program name with args.
20009set dummy uptime; ac_word=$2
20010{ echo "$as_me:$LINENO: checking for $ac_word" >&5
20011echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
20012if test "${ac_cv_path_PROG_UPTIME+set}" = set; then
20013 echo $ECHO_N "(cached) $ECHO_C" >&6
20014else
20015 case $PROG_UPTIME in
20016 [\\/]* | ?:[\\/]*)
20017 ac_cv_path_PROG_UPTIME="$PROG_UPTIME" # Let the user override the test with a path.
20018 ;;
20019 *)
20020 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20021for as_dir in $PATH
20022do
20023 IFS=$as_save_IFS
20024 test -z "$as_dir" && as_dir=.
20025 for ac_exec_ext in '' $ac_executable_extensions; do
20026 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20027 ac_cv_path_PROG_UPTIME="$as_dir/$ac_word$ac_exec_ext"
20028 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20029 break 2
20030 fi
20031done
20032done
20033IFS=$as_save_IFS
20034
20035 ;;
20036esac
20037fi
20038PROG_UPTIME=$ac_cv_path_PROG_UPTIME
20039if test -n "$PROG_UPTIME"; then
20040 { echo "$as_me:$LINENO: result: $PROG_UPTIME" >&5
20041echo "${ECHO_T}$PROG_UPTIME" >&6; }
20042else
20043 { echo "$as_me:$LINENO: result: no" >&5
20044echo "${ECHO_T}no" >&6; }
20045fi 11381fi
20046 11382
11383if test "x$sandbox_arg" = "xsystrace" || \
11384 ( test -z "$sandbox_arg" && test "x$have_systr_policy_kill" = "x1" ) ; then
11385 test "x$have_systr_policy_kill" != "x1" && \
11386 as_fn_error $? "systrace sandbox requires systrace headers and SYSTR_POLICY_KILL support" "$LINENO" 5
11387 SANDBOX_STYLE="systrace"
20047 11388
20048 if test -z "$PROG_UPTIME" ; then 11389$as_echo "#define SANDBOX_SYSTRACE 1" >>confdefs.h
20049 PROG_UPTIME="undef"
20050 fi
20051
20052
20053
20054 # Extract the first word of "ipcs", so it can be a program name with args.
20055set dummy ipcs; ac_word=$2
20056{ echo "$as_me:$LINENO: checking for $ac_word" >&5
20057echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
20058if test "${ac_cv_path_PROG_IPCS+set}" = set; then
20059 echo $ECHO_N "(cached) $ECHO_C" >&6
20060else
20061 case $PROG_IPCS in
20062 [\\/]* | ?:[\\/]*)
20063 ac_cv_path_PROG_IPCS="$PROG_IPCS" # Let the user override the test with a path.
20064 ;;
20065 *)
20066 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20067for as_dir in $PATH
20068do
20069 IFS=$as_save_IFS
20070 test -z "$as_dir" && as_dir=.
20071 for ac_exec_ext in '' $ac_executable_extensions; do
20072 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20073 ac_cv_path_PROG_IPCS="$as_dir/$ac_word$ac_exec_ext"
20074 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20075 break 2
20076 fi
20077done
20078done
20079IFS=$as_save_IFS
20080 11390
20081 ;; 11391elif test "x$sandbox_arg" = "xdarwin" || \
20082esac 11392 ( test -z "$sandbox_arg" && test "x$ac_cv_func_sandbox_init" = "xyes" && \
20083fi 11393 test "x$ac_cv_header_sandbox_h" = "xyes") ; then
20084PROG_IPCS=$ac_cv_path_PROG_IPCS 11394 test "x$ac_cv_func_sandbox_init" != "xyes" -o \
20085if test -n "$PROG_IPCS"; then 11395 "x$ac_cv_header_sandbox_h" != "xyes" && \
20086 { echo "$as_me:$LINENO: result: $PROG_IPCS" >&5 11396 as_fn_error $? "Darwin seatbelt sandbox requires sandbox.h and sandbox_init function" "$LINENO" 5
20087echo "${ECHO_T}$PROG_IPCS" >&6; } 11397 SANDBOX_STYLE="darwin"
20088else
20089 { echo "$as_me:$LINENO: result: no" >&5
20090echo "${ECHO_T}no" >&6; }
20091fi
20092 11398
11399$as_echo "#define SANDBOX_DARWIN 1" >>confdefs.h
20093 11400
20094 if test -z "$PROG_IPCS" ; then 11401elif test "x$sandbox_arg" = "xrlimit" || \
20095 PROG_IPCS="undef" 11402 ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" ) ; then
20096 fi 11403 test "x$ac_cv_func_setrlimit" != "xyes" && \
11404 as_fn_error $? "rlimit sandbox requires setrlimit function" "$LINENO" 5
11405 SANDBOX_STYLE="rlimit"
20097 11406
11407$as_echo "#define SANDBOX_RLIMIT 1" >>confdefs.h
20098 11408
11409elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \
11410 test "x$sandbox_arg" = "xnone" || test "x$sandbox_arg" = "xnull" ; then
11411 SANDBOX_STYLE="none"
20099 11412
20100 # Extract the first word of "tail", so it can be a program name with args. 11413$as_echo "#define SANDBOX_NULL 1" >>confdefs.h
20101set dummy tail; ac_word=$2
20102{ echo "$as_me:$LINENO: checking for $ac_word" >&5
20103echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; }
20104if test "${ac_cv_path_PROG_TAIL+set}" = set; then
20105 echo $ECHO_N "(cached) $ECHO_C" >&6
20106else
20107 case $PROG_TAIL in
20108 [\\/]* | ?:[\\/]*)
20109 ac_cv_path_PROG_TAIL="$PROG_TAIL" # Let the user override the test with a path.
20110 ;;
20111 *)
20112 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20113for as_dir in $PATH
20114do
20115 IFS=$as_save_IFS
20116 test -z "$as_dir" && as_dir=.
20117 for ac_exec_ext in '' $ac_executable_extensions; do
20118 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20119 ac_cv_path_PROG_TAIL="$as_dir/$ac_word$ac_exec_ext"
20120 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
20121 break 2
20122 fi
20123done
20124done
20125IFS=$as_save_IFS
20126 11414
20127 ;;
20128esac
20129fi
20130PROG_TAIL=$ac_cv_path_PROG_TAIL
20131if test -n "$PROG_TAIL"; then
20132 { echo "$as_me:$LINENO: result: $PROG_TAIL" >&5
20133echo "${ECHO_T}$PROG_TAIL" >&6; }
20134else 11415else
20135 { echo "$as_me:$LINENO: result: no" >&5 11416 as_fn_error $? "unsupported --with-sandbox" "$LINENO" 5
20136echo "${ECHO_T}no" >&6; }
20137fi
20138
20139
20140 if test -z "$PROG_TAIL" ; then
20141 PROG_TAIL="undef"
20142 fi
20143
20144
20145# restore PATH
20146PATH=$OPATH
20147
20148# Where does ssh-rand-helper get its randomness from?
20149INSTALL_SSH_PRNG_CMDS=""
20150if test ! -z "$INSTALL_SSH_RAND_HELPER" ; then
20151 if test ! -z "$PRNGD_PORT" ; then
20152 RAND_HELPER_MSG="TCP localhost:$PRNGD_PORT"
20153 elif test ! -z "$PRNGD_SOCKET" ; then
20154 RAND_HELPER_MSG="Unix domain socket \"$PRNGD_SOCKET\""
20155 else
20156 RAND_HELPER_MSG="Command hashing (timeout $entropy_timeout)"
20157 RAND_HELPER_CMDHASH=yes
20158 INSTALL_SSH_PRNG_CMDS="yes"
20159 fi
20160fi 11417fi
20161 11418
20162
20163
20164# Cheap hack to ensure NEWS-OS libraries are arranged right. 11419# Cheap hack to ensure NEWS-OS libraries are arranged right.
20165if test ! -z "$SONY" ; then 11420if test ! -z "$SONY" ; then
20166 LIBS="$LIBS -liberty"; 11421 LIBS="$LIBS -liberty";
20167fi 11422fi
20168 11423
20169# Check for long long datatypes 11424# Check for long long datatypes
20170{ echo "$as_me:$LINENO: checking for long long" >&5 11425ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
20171echo $ECHO_N "checking for long long... $ECHO_C" >&6; } 11426if test "x$ac_cv_type_long_long" = xyes; then :
20172if test "${ac_cv_type_long_long+set}" = set; then
20173 echo $ECHO_N "(cached) $ECHO_C" >&6
20174else
20175 cat >conftest.$ac_ext <<_ACEOF
20176/* confdefs.h. */
20177_ACEOF
20178cat confdefs.h >>conftest.$ac_ext
20179cat >>conftest.$ac_ext <<_ACEOF
20180/* end confdefs.h. */
20181$ac_includes_default
20182typedef long long ac__type_new_;
20183int
20184main ()
20185{
20186if ((ac__type_new_ *) 0)
20187 return 0;
20188if (sizeof (ac__type_new_))
20189 return 0;
20190 ;
20191 return 0;
20192}
20193_ACEOF
20194rm -f conftest.$ac_objext
20195if { (ac_try="$ac_compile"
20196case "(($ac_try" in
20197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20198 *) ac_try_echo=$ac_try;;
20199esac
20200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20201 (eval "$ac_compile") 2>conftest.er1
20202 ac_status=$?
20203 grep -v '^ *+' conftest.er1 >conftest.err
20204 rm -f conftest.er1
20205 cat conftest.err >&5
20206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20207 (exit $ac_status); } && {
20208 test -z "$ac_c_werror_flag" ||
20209 test ! -s conftest.err
20210 } && test -s conftest.$ac_objext; then
20211 ac_cv_type_long_long=yes
20212else
20213 echo "$as_me: failed program was:" >&5
20214sed 's/^/| /' conftest.$ac_ext >&5
20215
20216 ac_cv_type_long_long=no
20217fi
20218
20219rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20220fi
20221{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5
20222echo "${ECHO_T}$ac_cv_type_long_long" >&6; }
20223if test $ac_cv_type_long_long = yes; then
20224 11427
20225cat >>confdefs.h <<_ACEOF 11428cat >>confdefs.h <<_ACEOF
20226#define HAVE_LONG_LONG 1 11429#define HAVE_LONG_LONG 1
@@ -20228,60 +11431,8 @@ _ACEOF
20228 11431
20229 11432
20230fi 11433fi
20231{ echo "$as_me:$LINENO: checking for unsigned long long" >&5 11434ac_fn_c_check_type "$LINENO" "unsigned long long" "ac_cv_type_unsigned_long_long" "$ac_includes_default"
20232echo $ECHO_N "checking for unsigned long long... $ECHO_C" >&6; } 11435if test "x$ac_cv_type_unsigned_long_long" = xyes; then :
20233if test "${ac_cv_type_unsigned_long_long+set}" = set; then
20234 echo $ECHO_N "(cached) $ECHO_C" >&6
20235else
20236 cat >conftest.$ac_ext <<_ACEOF
20237/* confdefs.h. */
20238_ACEOF
20239cat confdefs.h >>conftest.$ac_ext
20240cat >>conftest.$ac_ext <<_ACEOF
20241/* end confdefs.h. */
20242$ac_includes_default
20243typedef unsigned long long ac__type_new_;
20244int
20245main ()
20246{
20247if ((ac__type_new_ *) 0)
20248 return 0;
20249if (sizeof (ac__type_new_))
20250 return 0;
20251 ;
20252 return 0;
20253}
20254_ACEOF
20255rm -f conftest.$ac_objext
20256if { (ac_try="$ac_compile"
20257case "(($ac_try" in
20258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20259 *) ac_try_echo=$ac_try;;
20260esac
20261eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20262 (eval "$ac_compile") 2>conftest.er1
20263 ac_status=$?
20264 grep -v '^ *+' conftest.er1 >conftest.err
20265 rm -f conftest.er1
20266 cat conftest.err >&5
20267 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20268 (exit $ac_status); } && {
20269 test -z "$ac_c_werror_flag" ||
20270 test ! -s conftest.err
20271 } && test -s conftest.$ac_objext; then
20272 ac_cv_type_unsigned_long_long=yes
20273else
20274 echo "$as_me: failed program was:" >&5
20275sed 's/^/| /' conftest.$ac_ext >&5
20276
20277 ac_cv_type_unsigned_long_long=no
20278fi
20279
20280rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20281fi
20282{ echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long_long" >&5
20283echo "${ECHO_T}$ac_cv_type_unsigned_long_long" >&6; }
20284if test $ac_cv_type_unsigned_long_long = yes; then
20285 11436
20286cat >>confdefs.h <<_ACEOF 11437cat >>confdefs.h <<_ACEOF
20287#define HAVE_UNSIGNED_LONG_LONG 1 11438#define HAVE_UNSIGNED_LONG_LONG 1
@@ -20289,60 +11440,8 @@ _ACEOF
20289 11440
20290 11441
20291fi 11442fi
20292{ echo "$as_me:$LINENO: checking for long double" >&5 11443ac_fn_c_check_type "$LINENO" "long double" "ac_cv_type_long_double" "$ac_includes_default"
20293echo $ECHO_N "checking for long double... $ECHO_C" >&6; } 11444if test "x$ac_cv_type_long_double" = xyes; then :
20294if test "${ac_cv_type_long_double+set}" = set; then
20295 echo $ECHO_N "(cached) $ECHO_C" >&6
20296else
20297 cat >conftest.$ac_ext <<_ACEOF
20298/* confdefs.h. */
20299_ACEOF
20300cat confdefs.h >>conftest.$ac_ext
20301cat >>conftest.$ac_ext <<_ACEOF
20302/* end confdefs.h. */
20303$ac_includes_default
20304typedef long double ac__type_new_;
20305int
20306main ()
20307{
20308if ((ac__type_new_ *) 0)
20309 return 0;
20310if (sizeof (ac__type_new_))
20311 return 0;
20312 ;
20313 return 0;
20314}
20315_ACEOF
20316rm -f conftest.$ac_objext
20317if { (ac_try="$ac_compile"
20318case "(($ac_try" in
20319 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20320 *) ac_try_echo=$ac_try;;
20321esac
20322eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20323 (eval "$ac_compile") 2>conftest.er1
20324 ac_status=$?
20325 grep -v '^ *+' conftest.er1 >conftest.err
20326 rm -f conftest.er1
20327 cat conftest.err >&5
20328 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20329 (exit $ac_status); } && {
20330 test -z "$ac_c_werror_flag" ||
20331 test ! -s conftest.err
20332 } && test -s conftest.$ac_objext; then
20333 ac_cv_type_long_double=yes
20334else
20335 echo "$as_me: failed program was:" >&5
20336sed 's/^/| /' conftest.$ac_ext >&5
20337
20338 ac_cv_type_long_double=no
20339fi
20340
20341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20342fi
20343{ echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
20344echo "${ECHO_T}$ac_cv_type_long_double" >&6; }
20345if test $ac_cv_type_long_double = yes; then
20346 11445
20347cat >>confdefs.h <<_ACEOF 11446cat >>confdefs.h <<_ACEOF
20348#define HAVE_LONG_DOUBLE 1 11447#define HAVE_LONG_DOUBLE 1
@@ -20353,403 +11452,31 @@ fi
20353 11452
20354 11453
20355# Check datatype sizes 11454# Check datatype sizes
20356{ echo "$as_me:$LINENO: checking for char" >&5
20357echo $ECHO_N "checking for char... $ECHO_C" >&6; }
20358if test "${ac_cv_type_char+set}" = set; then
20359 echo $ECHO_N "(cached) $ECHO_C" >&6
20360else
20361 cat >conftest.$ac_ext <<_ACEOF
20362/* confdefs.h. */
20363_ACEOF
20364cat confdefs.h >>conftest.$ac_ext
20365cat >>conftest.$ac_ext <<_ACEOF
20366/* end confdefs.h. */
20367$ac_includes_default
20368typedef char ac__type_new_;
20369int
20370main ()
20371{
20372if ((ac__type_new_ *) 0)
20373 return 0;
20374if (sizeof (ac__type_new_))
20375 return 0;
20376 ;
20377 return 0;
20378}
20379_ACEOF
20380rm -f conftest.$ac_objext
20381if { (ac_try="$ac_compile"
20382case "(($ac_try" in
20383 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20384 *) ac_try_echo=$ac_try;;
20385esac
20386eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20387 (eval "$ac_compile") 2>conftest.er1
20388 ac_status=$?
20389 grep -v '^ *+' conftest.er1 >conftest.err
20390 rm -f conftest.er1
20391 cat conftest.err >&5
20392 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20393 (exit $ac_status); } && {
20394 test -z "$ac_c_werror_flag" ||
20395 test ! -s conftest.err
20396 } && test -s conftest.$ac_objext; then
20397 ac_cv_type_char=yes
20398else
20399 echo "$as_me: failed program was:" >&5
20400sed 's/^/| /' conftest.$ac_ext >&5
20401
20402 ac_cv_type_char=no
20403fi
20404
20405rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20406fi
20407{ echo "$as_me:$LINENO: result: $ac_cv_type_char" >&5
20408echo "${ECHO_T}$ac_cv_type_char" >&6; }
20409
20410# The cast to long int works around a bug in the HP C Compiler 11455# The cast to long int works around a bug in the HP C Compiler
20411# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 11456# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20412# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 11457# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20413# This bug is HP SR number 8606223364. 11458# This bug is HP SR number 8606223364.
20414{ echo "$as_me:$LINENO: checking size of char" >&5 11459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of char" >&5
20415echo $ECHO_N "checking size of char... $ECHO_C" >&6; } 11460$as_echo_n "checking size of char... " >&6; }
20416if test "${ac_cv_sizeof_char+set}" = set; then 11461if ${ac_cv_sizeof_char+:} false; then :
20417 echo $ECHO_N "(cached) $ECHO_C" >&6 11462 $as_echo_n "(cached) " >&6
20418else
20419 if test "$cross_compiling" = yes; then
20420 # Depending upon the size, compute the lo and hi bounds.
20421cat >conftest.$ac_ext <<_ACEOF
20422/* confdefs.h. */
20423_ACEOF
20424cat confdefs.h >>conftest.$ac_ext
20425cat >>conftest.$ac_ext <<_ACEOF
20426/* end confdefs.h. */
20427$ac_includes_default
20428 typedef char ac__type_sizeof_;
20429int
20430main ()
20431{
20432static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
20433test_array [0] = 0
20434
20435 ;
20436 return 0;
20437}
20438_ACEOF
20439rm -f conftest.$ac_objext
20440if { (ac_try="$ac_compile"
20441case "(($ac_try" in
20442 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20443 *) ac_try_echo=$ac_try;;
20444esac
20445eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20446 (eval "$ac_compile") 2>conftest.er1
20447 ac_status=$?
20448 grep -v '^ *+' conftest.er1 >conftest.err
20449 rm -f conftest.er1
20450 cat conftest.err >&5
20451 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20452 (exit $ac_status); } && {
20453 test -z "$ac_c_werror_flag" ||
20454 test ! -s conftest.err
20455 } && test -s conftest.$ac_objext; then
20456 ac_lo=0 ac_mid=0
20457 while :; do
20458 cat >conftest.$ac_ext <<_ACEOF
20459/* confdefs.h. */
20460_ACEOF
20461cat confdefs.h >>conftest.$ac_ext
20462cat >>conftest.$ac_ext <<_ACEOF
20463/* end confdefs.h. */
20464$ac_includes_default
20465 typedef char ac__type_sizeof_;
20466int
20467main ()
20468{
20469static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20470test_array [0] = 0
20471
20472 ;
20473 return 0;
20474}
20475_ACEOF
20476rm -f conftest.$ac_objext
20477if { (ac_try="$ac_compile"
20478case "(($ac_try" in
20479 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20480 *) ac_try_echo=$ac_try;;
20481esac
20482eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20483 (eval "$ac_compile") 2>conftest.er1
20484 ac_status=$?
20485 grep -v '^ *+' conftest.er1 >conftest.err
20486 rm -f conftest.er1
20487 cat conftest.err >&5
20488 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20489 (exit $ac_status); } && {
20490 test -z "$ac_c_werror_flag" ||
20491 test ! -s conftest.err
20492 } && test -s conftest.$ac_objext; then
20493 ac_hi=$ac_mid; break
20494else
20495 echo "$as_me: failed program was:" >&5
20496sed 's/^/| /' conftest.$ac_ext >&5
20497
20498 ac_lo=`expr $ac_mid + 1`
20499 if test $ac_lo -le $ac_mid; then
20500 ac_lo= ac_hi=
20501 break
20502 fi
20503 ac_mid=`expr 2 '*' $ac_mid + 1`
20504fi
20505
20506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20507 done
20508else
20509 echo "$as_me: failed program was:" >&5
20510sed 's/^/| /' conftest.$ac_ext >&5
20511
20512 cat >conftest.$ac_ext <<_ACEOF
20513/* confdefs.h. */
20514_ACEOF
20515cat confdefs.h >>conftest.$ac_ext
20516cat >>conftest.$ac_ext <<_ACEOF
20517/* end confdefs.h. */
20518$ac_includes_default
20519 typedef char ac__type_sizeof_;
20520int
20521main ()
20522{
20523static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
20524test_array [0] = 0
20525
20526 ;
20527 return 0;
20528}
20529_ACEOF
20530rm -f conftest.$ac_objext
20531if { (ac_try="$ac_compile"
20532case "(($ac_try" in
20533 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20534 *) ac_try_echo=$ac_try;;
20535esac
20536eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20537 (eval "$ac_compile") 2>conftest.er1
20538 ac_status=$?
20539 grep -v '^ *+' conftest.er1 >conftest.err
20540 rm -f conftest.er1
20541 cat conftest.err >&5
20542 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20543 (exit $ac_status); } && {
20544 test -z "$ac_c_werror_flag" ||
20545 test ! -s conftest.err
20546 } && test -s conftest.$ac_objext; then
20547 ac_hi=-1 ac_mid=-1
20548 while :; do
20549 cat >conftest.$ac_ext <<_ACEOF
20550/* confdefs.h. */
20551_ACEOF
20552cat confdefs.h >>conftest.$ac_ext
20553cat >>conftest.$ac_ext <<_ACEOF
20554/* end confdefs.h. */
20555$ac_includes_default
20556 typedef char ac__type_sizeof_;
20557int
20558main ()
20559{
20560static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
20561test_array [0] = 0
20562
20563 ;
20564 return 0;
20565}
20566_ACEOF
20567rm -f conftest.$ac_objext
20568if { (ac_try="$ac_compile"
20569case "(($ac_try" in
20570 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20571 *) ac_try_echo=$ac_try;;
20572esac
20573eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20574 (eval "$ac_compile") 2>conftest.er1
20575 ac_status=$?
20576 grep -v '^ *+' conftest.er1 >conftest.err
20577 rm -f conftest.er1
20578 cat conftest.err >&5
20579 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20580 (exit $ac_status); } && {
20581 test -z "$ac_c_werror_flag" ||
20582 test ! -s conftest.err
20583 } && test -s conftest.$ac_objext; then
20584 ac_lo=$ac_mid; break
20585else
20586 echo "$as_me: failed program was:" >&5
20587sed 's/^/| /' conftest.$ac_ext >&5
20588
20589 ac_hi=`expr '(' $ac_mid ')' - 1`
20590 if test $ac_mid -le $ac_hi; then
20591 ac_lo= ac_hi=
20592 break
20593 fi
20594 ac_mid=`expr 2 '*' $ac_mid`
20595fi
20596
20597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20598 done
20599else
20600 echo "$as_me: failed program was:" >&5
20601sed 's/^/| /' conftest.$ac_ext >&5
20602
20603 ac_lo= ac_hi=
20604fi
20605
20606rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20607fi
20608
20609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20610# Binary search between lo and hi bounds.
20611while test "x$ac_lo" != "x$ac_hi"; do
20612 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
20613 cat >conftest.$ac_ext <<_ACEOF
20614/* confdefs.h. */
20615_ACEOF
20616cat confdefs.h >>conftest.$ac_ext
20617cat >>conftest.$ac_ext <<_ACEOF
20618/* end confdefs.h. */
20619$ac_includes_default
20620 typedef char ac__type_sizeof_;
20621int
20622main ()
20623{
20624static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20625test_array [0] = 0
20626
20627 ;
20628 return 0;
20629}
20630_ACEOF
20631rm -f conftest.$ac_objext
20632if { (ac_try="$ac_compile"
20633case "(($ac_try" in
20634 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20635 *) ac_try_echo=$ac_try;;
20636esac
20637eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20638 (eval "$ac_compile") 2>conftest.er1
20639 ac_status=$?
20640 grep -v '^ *+' conftest.er1 >conftest.err
20641 rm -f conftest.er1
20642 cat conftest.err >&5
20643 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20644 (exit $ac_status); } && {
20645 test -z "$ac_c_werror_flag" ||
20646 test ! -s conftest.err
20647 } && test -s conftest.$ac_objext; then
20648 ac_hi=$ac_mid
20649else 11463else
20650 echo "$as_me: failed program was:" >&5 11464 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default"; then :
20651sed 's/^/| /' conftest.$ac_ext >&5
20652
20653 ac_lo=`expr '(' $ac_mid ')' + 1`
20654fi
20655
20656rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20657done
20658case $ac_lo in
20659?*) ac_cv_sizeof_char=$ac_lo;;
20660'') if test "$ac_cv_type_char" = yes; then
20661 { { echo "$as_me:$LINENO: error: cannot compute sizeof (char)
20662See \`config.log' for more details." >&5
20663echo "$as_me: error: cannot compute sizeof (char)
20664See \`config.log' for more details." >&2;}
20665 { (exit 77); exit 77; }; }
20666 else
20667 ac_cv_sizeof_char=0
20668 fi ;;
20669esac
20670else
20671 cat >conftest.$ac_ext <<_ACEOF
20672/* confdefs.h. */
20673_ACEOF
20674cat confdefs.h >>conftest.$ac_ext
20675cat >>conftest.$ac_ext <<_ACEOF
20676/* end confdefs.h. */
20677$ac_includes_default
20678 typedef char ac__type_sizeof_;
20679static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
20680static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
20681#include <stdio.h>
20682#include <stdlib.h>
20683int
20684main ()
20685{
20686
20687 FILE *f = fopen ("conftest.val", "w");
20688 if (! f)
20689 return 1;
20690 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
20691 {
20692 long int i = longval ();
20693 if (i != ((long int) (sizeof (ac__type_sizeof_))))
20694 return 1;
20695 fprintf (f, "%ld\n", i);
20696 }
20697 else
20698 {
20699 unsigned long int i = ulongval ();
20700 if (i != ((long int) (sizeof (ac__type_sizeof_))))
20701 return 1;
20702 fprintf (f, "%lu\n", i);
20703 }
20704 return ferror (f) || fclose (f) != 0;
20705 11465
20706 ;
20707 return 0;
20708}
20709_ACEOF
20710rm -f conftest$ac_exeext
20711if { (ac_try="$ac_link"
20712case "(($ac_try" in
20713 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20714 *) ac_try_echo=$ac_try;;
20715esac
20716eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20717 (eval "$ac_link") 2>&5
20718 ac_status=$?
20719 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20720 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20721 { (case "(($ac_try" in
20722 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20723 *) ac_try_echo=$ac_try;;
20724esac
20725eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20726 (eval "$ac_try") 2>&5
20727 ac_status=$?
20728 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20729 (exit $ac_status); }; }; then
20730 ac_cv_sizeof_char=`cat conftest.val`
20731else 11466else
20732 echo "$as_me: program exited with status $ac_status" >&5 11467 if test "$ac_cv_type_char" = yes; then
20733echo "$as_me: failed program was:" >&5 11468 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20734sed 's/^/| /' conftest.$ac_ext >&5 11469$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20735 11470as_fn_error 77 "cannot compute sizeof (char)
20736( exit $ac_status ) 11471See \`config.log' for more details" "$LINENO" 5; }
20737if test "$ac_cv_type_char" = yes; then
20738 { { echo "$as_me:$LINENO: error: cannot compute sizeof (char)
20739See \`config.log' for more details." >&5
20740echo "$as_me: error: cannot compute sizeof (char)
20741See \`config.log' for more details." >&2;}
20742 { (exit 77); exit 77; }; }
20743 else 11472 else
20744 ac_cv_sizeof_char=0 11473 ac_cv_sizeof_char=0
20745 fi 11474 fi
20746fi 11475fi
20747rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 11476
20748fi
20749rm -f conftest.val
20750fi 11477fi
20751{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_char" >&5 11478{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5
20752echo "${ECHO_T}$ac_cv_sizeof_char" >&6; } 11479$as_echo "$ac_cv_sizeof_char" >&6; }
20753 11480
20754 11481
20755 11482
@@ -20758,403 +11485,31 @@ cat >>confdefs.h <<_ACEOF
20758_ACEOF 11485_ACEOF
20759 11486
20760 11487
20761{ echo "$as_me:$LINENO: checking for short int" >&5
20762echo $ECHO_N "checking for short int... $ECHO_C" >&6; }
20763if test "${ac_cv_type_short_int+set}" = set; then
20764 echo $ECHO_N "(cached) $ECHO_C" >&6
20765else
20766 cat >conftest.$ac_ext <<_ACEOF
20767/* confdefs.h. */
20768_ACEOF
20769cat confdefs.h >>conftest.$ac_ext
20770cat >>conftest.$ac_ext <<_ACEOF
20771/* end confdefs.h. */
20772$ac_includes_default
20773typedef short int ac__type_new_;
20774int
20775main ()
20776{
20777if ((ac__type_new_ *) 0)
20778 return 0;
20779if (sizeof (ac__type_new_))
20780 return 0;
20781 ;
20782 return 0;
20783}
20784_ACEOF
20785rm -f conftest.$ac_objext
20786if { (ac_try="$ac_compile"
20787case "(($ac_try" in
20788 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20789 *) ac_try_echo=$ac_try;;
20790esac
20791eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20792 (eval "$ac_compile") 2>conftest.er1
20793 ac_status=$?
20794 grep -v '^ *+' conftest.er1 >conftest.err
20795 rm -f conftest.er1
20796 cat conftest.err >&5
20797 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20798 (exit $ac_status); } && {
20799 test -z "$ac_c_werror_flag" ||
20800 test ! -s conftest.err
20801 } && test -s conftest.$ac_objext; then
20802 ac_cv_type_short_int=yes
20803else
20804 echo "$as_me: failed program was:" >&5
20805sed 's/^/| /' conftest.$ac_ext >&5
20806
20807 ac_cv_type_short_int=no
20808fi
20809
20810rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20811fi
20812{ echo "$as_me:$LINENO: result: $ac_cv_type_short_int" >&5
20813echo "${ECHO_T}$ac_cv_type_short_int" >&6; }
20814
20815# The cast to long int works around a bug in the HP C Compiler 11488# The cast to long int works around a bug in the HP C Compiler
20816# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 11489# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
20817# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 11490# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
20818# This bug is HP SR number 8606223364. 11491# This bug is HP SR number 8606223364.
20819{ echo "$as_me:$LINENO: checking size of short int" >&5 11492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of short int" >&5
20820echo $ECHO_N "checking size of short int... $ECHO_C" >&6; } 11493$as_echo_n "checking size of short int... " >&6; }
20821if test "${ac_cv_sizeof_short_int+set}" = set; then 11494if ${ac_cv_sizeof_short_int+:} false; then :
20822 echo $ECHO_N "(cached) $ECHO_C" >&6 11495 $as_echo_n "(cached) " >&6
20823else
20824 if test "$cross_compiling" = yes; then
20825 # Depending upon the size, compute the lo and hi bounds.
20826cat >conftest.$ac_ext <<_ACEOF
20827/* confdefs.h. */
20828_ACEOF
20829cat confdefs.h >>conftest.$ac_ext
20830cat >>conftest.$ac_ext <<_ACEOF
20831/* end confdefs.h. */
20832$ac_includes_default
20833 typedef short int ac__type_sizeof_;
20834int
20835main ()
20836{
20837static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
20838test_array [0] = 0
20839
20840 ;
20841 return 0;
20842}
20843_ACEOF
20844rm -f conftest.$ac_objext
20845if { (ac_try="$ac_compile"
20846case "(($ac_try" in
20847 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20848 *) ac_try_echo=$ac_try;;
20849esac
20850eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20851 (eval "$ac_compile") 2>conftest.er1
20852 ac_status=$?
20853 grep -v '^ *+' conftest.er1 >conftest.err
20854 rm -f conftest.er1
20855 cat conftest.err >&5
20856 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20857 (exit $ac_status); } && {
20858 test -z "$ac_c_werror_flag" ||
20859 test ! -s conftest.err
20860 } && test -s conftest.$ac_objext; then
20861 ac_lo=0 ac_mid=0
20862 while :; do
20863 cat >conftest.$ac_ext <<_ACEOF
20864/* confdefs.h. */
20865_ACEOF
20866cat confdefs.h >>conftest.$ac_ext
20867cat >>conftest.$ac_ext <<_ACEOF
20868/* end confdefs.h. */
20869$ac_includes_default
20870 typedef short int ac__type_sizeof_;
20871int
20872main ()
20873{
20874static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
20875test_array [0] = 0
20876
20877 ;
20878 return 0;
20879}
20880_ACEOF
20881rm -f conftest.$ac_objext
20882if { (ac_try="$ac_compile"
20883case "(($ac_try" in
20884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20885 *) ac_try_echo=$ac_try;;
20886esac
20887eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20888 (eval "$ac_compile") 2>conftest.er1
20889 ac_status=$?
20890 grep -v '^ *+' conftest.er1 >conftest.err
20891 rm -f conftest.er1
20892 cat conftest.err >&5
20893 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20894 (exit $ac_status); } && {
20895 test -z "$ac_c_werror_flag" ||
20896 test ! -s conftest.err
20897 } && test -s conftest.$ac_objext; then
20898 ac_hi=$ac_mid; break
20899else 11496else
20900 echo "$as_me: failed program was:" >&5 11497 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short int))" "ac_cv_sizeof_short_int" "$ac_includes_default"; then :
20901sed 's/^/| /' conftest.$ac_ext >&5
20902
20903 ac_lo=`expr $ac_mid + 1`
20904 if test $ac_lo -le $ac_mid; then
20905 ac_lo= ac_hi=
20906 break
20907 fi
20908 ac_mid=`expr 2 '*' $ac_mid + 1`
20909fi
20910 11498
20911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20912 done
20913else 11499else
20914 echo "$as_me: failed program was:" >&5 11500 if test "$ac_cv_type_short_int" = yes; then
20915sed 's/^/| /' conftest.$ac_ext >&5 11501 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
20916 11502$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
20917 cat >conftest.$ac_ext <<_ACEOF 11503as_fn_error 77 "cannot compute sizeof (short int)
20918/* confdefs.h. */ 11504See \`config.log' for more details" "$LINENO" 5; }
20919_ACEOF
20920cat confdefs.h >>conftest.$ac_ext
20921cat >>conftest.$ac_ext <<_ACEOF
20922/* end confdefs.h. */
20923$ac_includes_default
20924 typedef short int ac__type_sizeof_;
20925int
20926main ()
20927{
20928static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
20929test_array [0] = 0
20930
20931 ;
20932 return 0;
20933}
20934_ACEOF
20935rm -f conftest.$ac_objext
20936if { (ac_try="$ac_compile"
20937case "(($ac_try" in
20938 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20939 *) ac_try_echo=$ac_try;;
20940esac
20941eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20942 (eval "$ac_compile") 2>conftest.er1
20943 ac_status=$?
20944 grep -v '^ *+' conftest.er1 >conftest.err
20945 rm -f conftest.er1
20946 cat conftest.err >&5
20947 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20948 (exit $ac_status); } && {
20949 test -z "$ac_c_werror_flag" ||
20950 test ! -s conftest.err
20951 } && test -s conftest.$ac_objext; then
20952 ac_hi=-1 ac_mid=-1
20953 while :; do
20954 cat >conftest.$ac_ext <<_ACEOF
20955/* confdefs.h. */
20956_ACEOF
20957cat confdefs.h >>conftest.$ac_ext
20958cat >>conftest.$ac_ext <<_ACEOF
20959/* end confdefs.h. */
20960$ac_includes_default
20961 typedef short int ac__type_sizeof_;
20962int
20963main ()
20964{
20965static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
20966test_array [0] = 0
20967
20968 ;
20969 return 0;
20970}
20971_ACEOF
20972rm -f conftest.$ac_objext
20973if { (ac_try="$ac_compile"
20974case "(($ac_try" in
20975 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
20976 *) ac_try_echo=$ac_try;;
20977esac
20978eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
20979 (eval "$ac_compile") 2>conftest.er1
20980 ac_status=$?
20981 grep -v '^ *+' conftest.er1 >conftest.err
20982 rm -f conftest.er1
20983 cat conftest.err >&5
20984 echo "$as_me:$LINENO: \$? = $ac_status" >&5
20985 (exit $ac_status); } && {
20986 test -z "$ac_c_werror_flag" ||
20987 test ! -s conftest.err
20988 } && test -s conftest.$ac_objext; then
20989 ac_lo=$ac_mid; break
20990else
20991 echo "$as_me: failed program was:" >&5
20992sed 's/^/| /' conftest.$ac_ext >&5
20993
20994 ac_hi=`expr '(' $ac_mid ')' - 1`
20995 if test $ac_mid -le $ac_hi; then
20996 ac_lo= ac_hi=
20997 break
20998 fi
20999 ac_mid=`expr 2 '*' $ac_mid`
21000fi
21001
21002rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21003 done
21004else
21005 echo "$as_me: failed program was:" >&5
21006sed 's/^/| /' conftest.$ac_ext >&5
21007
21008 ac_lo= ac_hi=
21009fi
21010
21011rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21012fi
21013
21014rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21015# Binary search between lo and hi bounds.
21016while test "x$ac_lo" != "x$ac_hi"; do
21017 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21018 cat >conftest.$ac_ext <<_ACEOF
21019/* confdefs.h. */
21020_ACEOF
21021cat confdefs.h >>conftest.$ac_ext
21022cat >>conftest.$ac_ext <<_ACEOF
21023/* end confdefs.h. */
21024$ac_includes_default
21025 typedef short int ac__type_sizeof_;
21026int
21027main ()
21028{
21029static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
21030test_array [0] = 0
21031
21032 ;
21033 return 0;
21034}
21035_ACEOF
21036rm -f conftest.$ac_objext
21037if { (ac_try="$ac_compile"
21038case "(($ac_try" in
21039 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21040 *) ac_try_echo=$ac_try;;
21041esac
21042eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21043 (eval "$ac_compile") 2>conftest.er1
21044 ac_status=$?
21045 grep -v '^ *+' conftest.er1 >conftest.err
21046 rm -f conftest.er1
21047 cat conftest.err >&5
21048 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21049 (exit $ac_status); } && {
21050 test -z "$ac_c_werror_flag" ||
21051 test ! -s conftest.err
21052 } && test -s conftest.$ac_objext; then
21053 ac_hi=$ac_mid
21054else
21055 echo "$as_me: failed program was:" >&5
21056sed 's/^/| /' conftest.$ac_ext >&5
21057
21058 ac_lo=`expr '(' $ac_mid ')' + 1`
21059fi
21060
21061rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21062done
21063case $ac_lo in
21064?*) ac_cv_sizeof_short_int=$ac_lo;;
21065'') if test "$ac_cv_type_short_int" = yes; then
21066 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short int)
21067See \`config.log' for more details." >&5
21068echo "$as_me: error: cannot compute sizeof (short int)
21069See \`config.log' for more details." >&2;}
21070 { (exit 77); exit 77; }; }
21071 else
21072 ac_cv_sizeof_short_int=0
21073 fi ;;
21074esac
21075else
21076 cat >conftest.$ac_ext <<_ACEOF
21077/* confdefs.h. */
21078_ACEOF
21079cat confdefs.h >>conftest.$ac_ext
21080cat >>conftest.$ac_ext <<_ACEOF
21081/* end confdefs.h. */
21082$ac_includes_default
21083 typedef short int ac__type_sizeof_;
21084static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21085static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
21086#include <stdio.h>
21087#include <stdlib.h>
21088int
21089main ()
21090{
21091
21092 FILE *f = fopen ("conftest.val", "w");
21093 if (! f)
21094 return 1;
21095 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
21096 {
21097 long int i = longval ();
21098 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21099 return 1;
21100 fprintf (f, "%ld\n", i);
21101 }
21102 else
21103 {
21104 unsigned long int i = ulongval ();
21105 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21106 return 1;
21107 fprintf (f, "%lu\n", i);
21108 }
21109 return ferror (f) || fclose (f) != 0;
21110
21111 ;
21112 return 0;
21113}
21114_ACEOF
21115rm -f conftest$ac_exeext
21116if { (ac_try="$ac_link"
21117case "(($ac_try" in
21118 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21119 *) ac_try_echo=$ac_try;;
21120esac
21121eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21122 (eval "$ac_link") 2>&5
21123 ac_status=$?
21124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21125 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21126 { (case "(($ac_try" in
21127 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21128 *) ac_try_echo=$ac_try;;
21129esac
21130eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21131 (eval "$ac_try") 2>&5
21132 ac_status=$?
21133 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21134 (exit $ac_status); }; }; then
21135 ac_cv_sizeof_short_int=`cat conftest.val`
21136else
21137 echo "$as_me: program exited with status $ac_status" >&5
21138echo "$as_me: failed program was:" >&5
21139sed 's/^/| /' conftest.$ac_ext >&5
21140
21141( exit $ac_status )
21142if test "$ac_cv_type_short_int" = yes; then
21143 { { echo "$as_me:$LINENO: error: cannot compute sizeof (short int)
21144See \`config.log' for more details." >&5
21145echo "$as_me: error: cannot compute sizeof (short int)
21146See \`config.log' for more details." >&2;}
21147 { (exit 77); exit 77; }; }
21148 else 11505 else
21149 ac_cv_sizeof_short_int=0 11506 ac_cv_sizeof_short_int=0
21150 fi 11507 fi
21151fi 11508fi
21152rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 11509
21153fi
21154rm -f conftest.val
21155fi 11510fi
21156{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_short_int" >&5 11511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short_int" >&5
21157echo "${ECHO_T}$ac_cv_sizeof_short_int" >&6; } 11512$as_echo "$ac_cv_sizeof_short_int" >&6; }
21158 11513
21159 11514
21160 11515
@@ -21163,403 +11518,31 @@ cat >>confdefs.h <<_ACEOF
21163_ACEOF 11518_ACEOF
21164 11519
21165 11520
21166{ echo "$as_me:$LINENO: checking for int" >&5
21167echo $ECHO_N "checking for int... $ECHO_C" >&6; }
21168if test "${ac_cv_type_int+set}" = set; then
21169 echo $ECHO_N "(cached) $ECHO_C" >&6
21170else
21171 cat >conftest.$ac_ext <<_ACEOF
21172/* confdefs.h. */
21173_ACEOF
21174cat confdefs.h >>conftest.$ac_ext
21175cat >>conftest.$ac_ext <<_ACEOF
21176/* end confdefs.h. */
21177$ac_includes_default
21178typedef int ac__type_new_;
21179int
21180main ()
21181{
21182if ((ac__type_new_ *) 0)
21183 return 0;
21184if (sizeof (ac__type_new_))
21185 return 0;
21186 ;
21187 return 0;
21188}
21189_ACEOF
21190rm -f conftest.$ac_objext
21191if { (ac_try="$ac_compile"
21192case "(($ac_try" in
21193 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21194 *) ac_try_echo=$ac_try;;
21195esac
21196eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21197 (eval "$ac_compile") 2>conftest.er1
21198 ac_status=$?
21199 grep -v '^ *+' conftest.er1 >conftest.err
21200 rm -f conftest.er1
21201 cat conftest.err >&5
21202 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21203 (exit $ac_status); } && {
21204 test -z "$ac_c_werror_flag" ||
21205 test ! -s conftest.err
21206 } && test -s conftest.$ac_objext; then
21207 ac_cv_type_int=yes
21208else
21209 echo "$as_me: failed program was:" >&5
21210sed 's/^/| /' conftest.$ac_ext >&5
21211
21212 ac_cv_type_int=no
21213fi
21214
21215rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21216fi
21217{ echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5
21218echo "${ECHO_T}$ac_cv_type_int" >&6; }
21219
21220# The cast to long int works around a bug in the HP C Compiler 11521# The cast to long int works around a bug in the HP C Compiler
21221# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 11522# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21222# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 11523# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21223# This bug is HP SR number 8606223364. 11524# This bug is HP SR number 8606223364.
21224{ echo "$as_me:$LINENO: checking size of int" >&5 11525{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5
21225echo $ECHO_N "checking size of int... $ECHO_C" >&6; } 11526$as_echo_n "checking size of int... " >&6; }
21226if test "${ac_cv_sizeof_int+set}" = set; then 11527if ${ac_cv_sizeof_int+:} false; then :
21227 echo $ECHO_N "(cached) $ECHO_C" >&6 11528 $as_echo_n "(cached) " >&6
21228else
21229 if test "$cross_compiling" = yes; then
21230 # Depending upon the size, compute the lo and hi bounds.
21231cat >conftest.$ac_ext <<_ACEOF
21232/* confdefs.h. */
21233_ACEOF
21234cat confdefs.h >>conftest.$ac_ext
21235cat >>conftest.$ac_ext <<_ACEOF
21236/* end confdefs.h. */
21237$ac_includes_default
21238 typedef int ac__type_sizeof_;
21239int
21240main ()
21241{
21242static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
21243test_array [0] = 0
21244
21245 ;
21246 return 0;
21247}
21248_ACEOF
21249rm -f conftest.$ac_objext
21250if { (ac_try="$ac_compile"
21251case "(($ac_try" in
21252 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21253 *) ac_try_echo=$ac_try;;
21254esac
21255eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21256 (eval "$ac_compile") 2>conftest.er1
21257 ac_status=$?
21258 grep -v '^ *+' conftest.er1 >conftest.err
21259 rm -f conftest.er1
21260 cat conftest.err >&5
21261 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21262 (exit $ac_status); } && {
21263 test -z "$ac_c_werror_flag" ||
21264 test ! -s conftest.err
21265 } && test -s conftest.$ac_objext; then
21266 ac_lo=0 ac_mid=0
21267 while :; do
21268 cat >conftest.$ac_ext <<_ACEOF
21269/* confdefs.h. */
21270_ACEOF
21271cat confdefs.h >>conftest.$ac_ext
21272cat >>conftest.$ac_ext <<_ACEOF
21273/* end confdefs.h. */
21274$ac_includes_default
21275 typedef int ac__type_sizeof_;
21276int
21277main ()
21278{
21279static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
21280test_array [0] = 0
21281
21282 ;
21283 return 0;
21284}
21285_ACEOF
21286rm -f conftest.$ac_objext
21287if { (ac_try="$ac_compile"
21288case "(($ac_try" in
21289 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21290 *) ac_try_echo=$ac_try;;
21291esac
21292eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21293 (eval "$ac_compile") 2>conftest.er1
21294 ac_status=$?
21295 grep -v '^ *+' conftest.er1 >conftest.err
21296 rm -f conftest.er1
21297 cat conftest.err >&5
21298 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21299 (exit $ac_status); } && {
21300 test -z "$ac_c_werror_flag" ||
21301 test ! -s conftest.err
21302 } && test -s conftest.$ac_objext; then
21303 ac_hi=$ac_mid; break
21304else
21305 echo "$as_me: failed program was:" >&5
21306sed 's/^/| /' conftest.$ac_ext >&5
21307
21308 ac_lo=`expr $ac_mid + 1`
21309 if test $ac_lo -le $ac_mid; then
21310 ac_lo= ac_hi=
21311 break
21312 fi
21313 ac_mid=`expr 2 '*' $ac_mid + 1`
21314fi
21315
21316rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21317 done
21318else
21319 echo "$as_me: failed program was:" >&5
21320sed 's/^/| /' conftest.$ac_ext >&5
21321
21322 cat >conftest.$ac_ext <<_ACEOF
21323/* confdefs.h. */
21324_ACEOF
21325cat confdefs.h >>conftest.$ac_ext
21326cat >>conftest.$ac_ext <<_ACEOF
21327/* end confdefs.h. */
21328$ac_includes_default
21329 typedef int ac__type_sizeof_;
21330int
21331main ()
21332{
21333static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
21334test_array [0] = 0
21335
21336 ;
21337 return 0;
21338}
21339_ACEOF
21340rm -f conftest.$ac_objext
21341if { (ac_try="$ac_compile"
21342case "(($ac_try" in
21343 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21344 *) ac_try_echo=$ac_try;;
21345esac
21346eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21347 (eval "$ac_compile") 2>conftest.er1
21348 ac_status=$?
21349 grep -v '^ *+' conftest.er1 >conftest.err
21350 rm -f conftest.er1
21351 cat conftest.err >&5
21352 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21353 (exit $ac_status); } && {
21354 test -z "$ac_c_werror_flag" ||
21355 test ! -s conftest.err
21356 } && test -s conftest.$ac_objext; then
21357 ac_hi=-1 ac_mid=-1
21358 while :; do
21359 cat >conftest.$ac_ext <<_ACEOF
21360/* confdefs.h. */
21361_ACEOF
21362cat confdefs.h >>conftest.$ac_ext
21363cat >>conftest.$ac_ext <<_ACEOF
21364/* end confdefs.h. */
21365$ac_includes_default
21366 typedef int ac__type_sizeof_;
21367int
21368main ()
21369{
21370static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
21371test_array [0] = 0
21372
21373 ;
21374 return 0;
21375}
21376_ACEOF
21377rm -f conftest.$ac_objext
21378if { (ac_try="$ac_compile"
21379case "(($ac_try" in
21380 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21381 *) ac_try_echo=$ac_try;;
21382esac
21383eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21384 (eval "$ac_compile") 2>conftest.er1
21385 ac_status=$?
21386 grep -v '^ *+' conftest.er1 >conftest.err
21387 rm -f conftest.er1
21388 cat conftest.err >&5
21389 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21390 (exit $ac_status); } && {
21391 test -z "$ac_c_werror_flag" ||
21392 test ! -s conftest.err
21393 } && test -s conftest.$ac_objext; then
21394 ac_lo=$ac_mid; break
21395else 11529else
21396 echo "$as_me: failed program was:" >&5 11530 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then :
21397sed 's/^/| /' conftest.$ac_ext >&5
21398 11531
21399 ac_hi=`expr '(' $ac_mid ')' - 1`
21400 if test $ac_mid -le $ac_hi; then
21401 ac_lo= ac_hi=
21402 break
21403 fi
21404 ac_mid=`expr 2 '*' $ac_mid`
21405fi
21406
21407rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21408 done
21409else
21410 echo "$as_me: failed program was:" >&5
21411sed 's/^/| /' conftest.$ac_ext >&5
21412
21413 ac_lo= ac_hi=
21414fi
21415
21416rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21417fi
21418
21419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21420# Binary search between lo and hi bounds.
21421while test "x$ac_lo" != "x$ac_hi"; do
21422 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21423 cat >conftest.$ac_ext <<_ACEOF
21424/* confdefs.h. */
21425_ACEOF
21426cat confdefs.h >>conftest.$ac_ext
21427cat >>conftest.$ac_ext <<_ACEOF
21428/* end confdefs.h. */
21429$ac_includes_default
21430 typedef int ac__type_sizeof_;
21431int
21432main ()
21433{
21434static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
21435test_array [0] = 0
21436
21437 ;
21438 return 0;
21439}
21440_ACEOF
21441rm -f conftest.$ac_objext
21442if { (ac_try="$ac_compile"
21443case "(($ac_try" in
21444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21445 *) ac_try_echo=$ac_try;;
21446esac
21447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21448 (eval "$ac_compile") 2>conftest.er1
21449 ac_status=$?
21450 grep -v '^ *+' conftest.er1 >conftest.err
21451 rm -f conftest.er1
21452 cat conftest.err >&5
21453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21454 (exit $ac_status); } && {
21455 test -z "$ac_c_werror_flag" ||
21456 test ! -s conftest.err
21457 } && test -s conftest.$ac_objext; then
21458 ac_hi=$ac_mid
21459else 11532else
21460 echo "$as_me: failed program was:" >&5 11533 if test "$ac_cv_type_int" = yes; then
21461sed 's/^/| /' conftest.$ac_ext >&5 11534 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
21462 11535$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
21463 ac_lo=`expr '(' $ac_mid ')' + 1` 11536as_fn_error 77 "cannot compute sizeof (int)
21464fi 11537See \`config.log' for more details" "$LINENO" 5; }
21465
21466rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21467done
21468case $ac_lo in
21469?*) ac_cv_sizeof_int=$ac_lo;;
21470'') if test "$ac_cv_type_int" = yes; then
21471 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
21472See \`config.log' for more details." >&5
21473echo "$as_me: error: cannot compute sizeof (int)
21474See \`config.log' for more details." >&2;}
21475 { (exit 77); exit 77; }; }
21476 else
21477 ac_cv_sizeof_int=0
21478 fi ;;
21479esac
21480else
21481 cat >conftest.$ac_ext <<_ACEOF
21482/* confdefs.h. */
21483_ACEOF
21484cat confdefs.h >>conftest.$ac_ext
21485cat >>conftest.$ac_ext <<_ACEOF
21486/* end confdefs.h. */
21487$ac_includes_default
21488 typedef int ac__type_sizeof_;
21489static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21490static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
21491#include <stdio.h>
21492#include <stdlib.h>
21493int
21494main ()
21495{
21496
21497 FILE *f = fopen ("conftest.val", "w");
21498 if (! f)
21499 return 1;
21500 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
21501 {
21502 long int i = longval ();
21503 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21504 return 1;
21505 fprintf (f, "%ld\n", i);
21506 }
21507 else
21508 {
21509 unsigned long int i = ulongval ();
21510 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21511 return 1;
21512 fprintf (f, "%lu\n", i);
21513 }
21514 return ferror (f) || fclose (f) != 0;
21515
21516 ;
21517 return 0;
21518}
21519_ACEOF
21520rm -f conftest$ac_exeext
21521if { (ac_try="$ac_link"
21522case "(($ac_try" in
21523 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21524 *) ac_try_echo=$ac_try;;
21525esac
21526eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21527 (eval "$ac_link") 2>&5
21528 ac_status=$?
21529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21530 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21531 { (case "(($ac_try" in
21532 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21533 *) ac_try_echo=$ac_try;;
21534esac
21535eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21536 (eval "$ac_try") 2>&5
21537 ac_status=$?
21538 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21539 (exit $ac_status); }; }; then
21540 ac_cv_sizeof_int=`cat conftest.val`
21541else
21542 echo "$as_me: program exited with status $ac_status" >&5
21543echo "$as_me: failed program was:" >&5
21544sed 's/^/| /' conftest.$ac_ext >&5
21545
21546( exit $ac_status )
21547if test "$ac_cv_type_int" = yes; then
21548 { { echo "$as_me:$LINENO: error: cannot compute sizeof (int)
21549See \`config.log' for more details." >&5
21550echo "$as_me: error: cannot compute sizeof (int)
21551See \`config.log' for more details." >&2;}
21552 { (exit 77); exit 77; }; }
21553 else 11538 else
21554 ac_cv_sizeof_int=0 11539 ac_cv_sizeof_int=0
21555 fi 11540 fi
21556fi 11541fi
21557rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 11542
21558fi
21559rm -f conftest.val
21560fi 11543fi
21561{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 11544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5
21562echo "${ECHO_T}$ac_cv_sizeof_int" >&6; } 11545$as_echo "$ac_cv_sizeof_int" >&6; }
21563 11546
21564 11547
21565 11548
@@ -21568,403 +11551,31 @@ cat >>confdefs.h <<_ACEOF
21568_ACEOF 11551_ACEOF
21569 11552
21570 11553
21571{ echo "$as_me:$LINENO: checking for long int" >&5
21572echo $ECHO_N "checking for long int... $ECHO_C" >&6; }
21573if test "${ac_cv_type_long_int+set}" = set; then
21574 echo $ECHO_N "(cached) $ECHO_C" >&6
21575else
21576 cat >conftest.$ac_ext <<_ACEOF
21577/* confdefs.h. */
21578_ACEOF
21579cat confdefs.h >>conftest.$ac_ext
21580cat >>conftest.$ac_ext <<_ACEOF
21581/* end confdefs.h. */
21582$ac_includes_default
21583typedef long int ac__type_new_;
21584int
21585main ()
21586{
21587if ((ac__type_new_ *) 0)
21588 return 0;
21589if (sizeof (ac__type_new_))
21590 return 0;
21591 ;
21592 return 0;
21593}
21594_ACEOF
21595rm -f conftest.$ac_objext
21596if { (ac_try="$ac_compile"
21597case "(($ac_try" in
21598 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21599 *) ac_try_echo=$ac_try;;
21600esac
21601eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21602 (eval "$ac_compile") 2>conftest.er1
21603 ac_status=$?
21604 grep -v '^ *+' conftest.er1 >conftest.err
21605 rm -f conftest.er1
21606 cat conftest.err >&5
21607 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21608 (exit $ac_status); } && {
21609 test -z "$ac_c_werror_flag" ||
21610 test ! -s conftest.err
21611 } && test -s conftest.$ac_objext; then
21612 ac_cv_type_long_int=yes
21613else
21614 echo "$as_me: failed program was:" >&5
21615sed 's/^/| /' conftest.$ac_ext >&5
21616
21617 ac_cv_type_long_int=no
21618fi
21619
21620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21621fi
21622{ echo "$as_me:$LINENO: result: $ac_cv_type_long_int" >&5
21623echo "${ECHO_T}$ac_cv_type_long_int" >&6; }
21624
21625# The cast to long int works around a bug in the HP C Compiler 11554# The cast to long int works around a bug in the HP C Compiler
21626# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 11555# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
21627# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 11556# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
21628# This bug is HP SR number 8606223364. 11557# This bug is HP SR number 8606223364.
21629{ echo "$as_me:$LINENO: checking size of long int" >&5 11558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long int" >&5
21630echo $ECHO_N "checking size of long int... $ECHO_C" >&6; } 11559$as_echo_n "checking size of long int... " >&6; }
21631if test "${ac_cv_sizeof_long_int+set}" = set; then 11560if ${ac_cv_sizeof_long_int+:} false; then :
21632 echo $ECHO_N "(cached) $ECHO_C" >&6 11561 $as_echo_n "(cached) " >&6
21633else
21634 if test "$cross_compiling" = yes; then
21635 # Depending upon the size, compute the lo and hi bounds.
21636cat >conftest.$ac_ext <<_ACEOF
21637/* confdefs.h. */
21638_ACEOF
21639cat confdefs.h >>conftest.$ac_ext
21640cat >>conftest.$ac_ext <<_ACEOF
21641/* end confdefs.h. */
21642$ac_includes_default
21643 typedef long int ac__type_sizeof_;
21644int
21645main ()
21646{
21647static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
21648test_array [0] = 0
21649
21650 ;
21651 return 0;
21652}
21653_ACEOF
21654rm -f conftest.$ac_objext
21655if { (ac_try="$ac_compile"
21656case "(($ac_try" in
21657 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21658 *) ac_try_echo=$ac_try;;
21659esac
21660eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21661 (eval "$ac_compile") 2>conftest.er1
21662 ac_status=$?
21663 grep -v '^ *+' conftest.er1 >conftest.err
21664 rm -f conftest.er1
21665 cat conftest.err >&5
21666 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21667 (exit $ac_status); } && {
21668 test -z "$ac_c_werror_flag" ||
21669 test ! -s conftest.err
21670 } && test -s conftest.$ac_objext; then
21671 ac_lo=0 ac_mid=0
21672 while :; do
21673 cat >conftest.$ac_ext <<_ACEOF
21674/* confdefs.h. */
21675_ACEOF
21676cat confdefs.h >>conftest.$ac_ext
21677cat >>conftest.$ac_ext <<_ACEOF
21678/* end confdefs.h. */
21679$ac_includes_default
21680 typedef long int ac__type_sizeof_;
21681int
21682main ()
21683{
21684static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
21685test_array [0] = 0
21686
21687 ;
21688 return 0;
21689}
21690_ACEOF
21691rm -f conftest.$ac_objext
21692if { (ac_try="$ac_compile"
21693case "(($ac_try" in
21694 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21695 *) ac_try_echo=$ac_try;;
21696esac
21697eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21698 (eval "$ac_compile") 2>conftest.er1
21699 ac_status=$?
21700 grep -v '^ *+' conftest.er1 >conftest.err
21701 rm -f conftest.er1
21702 cat conftest.err >&5
21703 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21704 (exit $ac_status); } && {
21705 test -z "$ac_c_werror_flag" ||
21706 test ! -s conftest.err
21707 } && test -s conftest.$ac_objext; then
21708 ac_hi=$ac_mid; break
21709else
21710 echo "$as_me: failed program was:" >&5
21711sed 's/^/| /' conftest.$ac_ext >&5
21712
21713 ac_lo=`expr $ac_mid + 1`
21714 if test $ac_lo -le $ac_mid; then
21715 ac_lo= ac_hi=
21716 break
21717 fi
21718 ac_mid=`expr 2 '*' $ac_mid + 1`
21719fi
21720
21721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21722 done
21723else
21724 echo "$as_me: failed program was:" >&5
21725sed 's/^/| /' conftest.$ac_ext >&5
21726
21727 cat >conftest.$ac_ext <<_ACEOF
21728/* confdefs.h. */
21729_ACEOF
21730cat confdefs.h >>conftest.$ac_ext
21731cat >>conftest.$ac_ext <<_ACEOF
21732/* end confdefs.h. */
21733$ac_includes_default
21734 typedef long int ac__type_sizeof_;
21735int
21736main ()
21737{
21738static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
21739test_array [0] = 0
21740
21741 ;
21742 return 0;
21743}
21744_ACEOF
21745rm -f conftest.$ac_objext
21746if { (ac_try="$ac_compile"
21747case "(($ac_try" in
21748 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21749 *) ac_try_echo=$ac_try;;
21750esac
21751eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21752 (eval "$ac_compile") 2>conftest.er1
21753 ac_status=$?
21754 grep -v '^ *+' conftest.er1 >conftest.err
21755 rm -f conftest.er1
21756 cat conftest.err >&5
21757 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21758 (exit $ac_status); } && {
21759 test -z "$ac_c_werror_flag" ||
21760 test ! -s conftest.err
21761 } && test -s conftest.$ac_objext; then
21762 ac_hi=-1 ac_mid=-1
21763 while :; do
21764 cat >conftest.$ac_ext <<_ACEOF
21765/* confdefs.h. */
21766_ACEOF
21767cat confdefs.h >>conftest.$ac_ext
21768cat >>conftest.$ac_ext <<_ACEOF
21769/* end confdefs.h. */
21770$ac_includes_default
21771 typedef long int ac__type_sizeof_;
21772int
21773main ()
21774{
21775static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
21776test_array [0] = 0
21777
21778 ;
21779 return 0;
21780}
21781_ACEOF
21782rm -f conftest.$ac_objext
21783if { (ac_try="$ac_compile"
21784case "(($ac_try" in
21785 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21786 *) ac_try_echo=$ac_try;;
21787esac
21788eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21789 (eval "$ac_compile") 2>conftest.er1
21790 ac_status=$?
21791 grep -v '^ *+' conftest.er1 >conftest.err
21792 rm -f conftest.er1
21793 cat conftest.err >&5
21794 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21795 (exit $ac_status); } && {
21796 test -z "$ac_c_werror_flag" ||
21797 test ! -s conftest.err
21798 } && test -s conftest.$ac_objext; then
21799 ac_lo=$ac_mid; break
21800else
21801 echo "$as_me: failed program was:" >&5
21802sed 's/^/| /' conftest.$ac_ext >&5
21803
21804 ac_hi=`expr '(' $ac_mid ')' - 1`
21805 if test $ac_mid -le $ac_hi; then
21806 ac_lo= ac_hi=
21807 break
21808 fi
21809 ac_mid=`expr 2 '*' $ac_mid`
21810fi
21811
21812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21813 done
21814else
21815 echo "$as_me: failed program was:" >&5
21816sed 's/^/| /' conftest.$ac_ext >&5
21817
21818 ac_lo= ac_hi=
21819fi
21820
21821rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21822fi
21823
21824rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21825# Binary search between lo and hi bounds.
21826while test "x$ac_lo" != "x$ac_hi"; do
21827 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
21828 cat >conftest.$ac_ext <<_ACEOF
21829/* confdefs.h. */
21830_ACEOF
21831cat confdefs.h >>conftest.$ac_ext
21832cat >>conftest.$ac_ext <<_ACEOF
21833/* end confdefs.h. */
21834$ac_includes_default
21835 typedef long int ac__type_sizeof_;
21836int
21837main ()
21838{
21839static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
21840test_array [0] = 0
21841
21842 ;
21843 return 0;
21844}
21845_ACEOF
21846rm -f conftest.$ac_objext
21847if { (ac_try="$ac_compile"
21848case "(($ac_try" in
21849 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21850 *) ac_try_echo=$ac_try;;
21851esac
21852eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21853 (eval "$ac_compile") 2>conftest.er1
21854 ac_status=$?
21855 grep -v '^ *+' conftest.er1 >conftest.err
21856 rm -f conftest.er1
21857 cat conftest.err >&5
21858 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21859 (exit $ac_status); } && {
21860 test -z "$ac_c_werror_flag" ||
21861 test ! -s conftest.err
21862 } && test -s conftest.$ac_objext; then
21863 ac_hi=$ac_mid
21864else 11562else
21865 echo "$as_me: failed program was:" >&5 11563 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long int))" "ac_cv_sizeof_long_int" "$ac_includes_default"; then :
21866sed 's/^/| /' conftest.$ac_ext >&5
21867
21868 ac_lo=`expr '(' $ac_mid ')' + 1`
21869fi
21870
21871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21872done
21873case $ac_lo in
21874?*) ac_cv_sizeof_long_int=$ac_lo;;
21875'') if test "$ac_cv_type_long_int" = yes; then
21876 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int)
21877See \`config.log' for more details." >&5
21878echo "$as_me: error: cannot compute sizeof (long int)
21879See \`config.log' for more details." >&2;}
21880 { (exit 77); exit 77; }; }
21881 else
21882 ac_cv_sizeof_long_int=0
21883 fi ;;
21884esac
21885else
21886 cat >conftest.$ac_ext <<_ACEOF
21887/* confdefs.h. */
21888_ACEOF
21889cat confdefs.h >>conftest.$ac_ext
21890cat >>conftest.$ac_ext <<_ACEOF
21891/* end confdefs.h. */
21892$ac_includes_default
21893 typedef long int ac__type_sizeof_;
21894static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
21895static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
21896#include <stdio.h>
21897#include <stdlib.h>
21898int
21899main ()
21900{
21901
21902 FILE *f = fopen ("conftest.val", "w");
21903 if (! f)
21904 return 1;
21905 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
21906 {
21907 long int i = longval ();
21908 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21909 return 1;
21910 fprintf (f, "%ld\n", i);
21911 }
21912 else
21913 {
21914 unsigned long int i = ulongval ();
21915 if (i != ((long int) (sizeof (ac__type_sizeof_))))
21916 return 1;
21917 fprintf (f, "%lu\n", i);
21918 }
21919 return ferror (f) || fclose (f) != 0;
21920 11564
21921 ;
21922 return 0;
21923}
21924_ACEOF
21925rm -f conftest$ac_exeext
21926if { (ac_try="$ac_link"
21927case "(($ac_try" in
21928 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21929 *) ac_try_echo=$ac_try;;
21930esac
21931eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21932 (eval "$ac_link") 2>&5
21933 ac_status=$?
21934 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21935 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21936 { (case "(($ac_try" in
21937 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
21938 *) ac_try_echo=$ac_try;;
21939esac
21940eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
21941 (eval "$ac_try") 2>&5
21942 ac_status=$?
21943 echo "$as_me:$LINENO: \$? = $ac_status" >&5
21944 (exit $ac_status); }; }; then
21945 ac_cv_sizeof_long_int=`cat conftest.val`
21946else 11565else
21947 echo "$as_me: program exited with status $ac_status" >&5 11566 if test "$ac_cv_type_long_int" = yes; then
21948echo "$as_me: failed program was:" >&5 11567 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
21949sed 's/^/| /' conftest.$ac_ext >&5 11568$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
21950 11569as_fn_error 77 "cannot compute sizeof (long int)
21951( exit $ac_status ) 11570See \`config.log' for more details" "$LINENO" 5; }
21952if test "$ac_cv_type_long_int" = yes; then
21953 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long int)
21954See \`config.log' for more details." >&5
21955echo "$as_me: error: cannot compute sizeof (long int)
21956See \`config.log' for more details." >&2;}
21957 { (exit 77); exit 77; }; }
21958 else 11571 else
21959 ac_cv_sizeof_long_int=0 11572 ac_cv_sizeof_long_int=0
21960 fi 11573 fi
21961fi 11574fi
21962rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 11575
21963fi
21964rm -f conftest.val
21965fi 11576fi
21966{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_int" >&5 11577{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_int" >&5
21967echo "${ECHO_T}$ac_cv_sizeof_long_int" >&6; } 11578$as_echo "$ac_cv_sizeof_long_int" >&6; }
21968 11579
21969 11580
21970 11581
@@ -21973,403 +11584,31 @@ cat >>confdefs.h <<_ACEOF
21973_ACEOF 11584_ACEOF
21974 11585
21975 11586
21976{ echo "$as_me:$LINENO: checking for long long int" >&5
21977echo $ECHO_N "checking for long long int... $ECHO_C" >&6; }
21978if test "${ac_cv_type_long_long_int+set}" = set; then
21979 echo $ECHO_N "(cached) $ECHO_C" >&6
21980else
21981 cat >conftest.$ac_ext <<_ACEOF
21982/* confdefs.h. */
21983_ACEOF
21984cat confdefs.h >>conftest.$ac_ext
21985cat >>conftest.$ac_ext <<_ACEOF
21986/* end confdefs.h. */
21987$ac_includes_default
21988typedef long long int ac__type_new_;
21989int
21990main ()
21991{
21992if ((ac__type_new_ *) 0)
21993 return 0;
21994if (sizeof (ac__type_new_))
21995 return 0;
21996 ;
21997 return 0;
21998}
21999_ACEOF
22000rm -f conftest.$ac_objext
22001if { (ac_try="$ac_compile"
22002case "(($ac_try" in
22003 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22004 *) ac_try_echo=$ac_try;;
22005esac
22006eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22007 (eval "$ac_compile") 2>conftest.er1
22008 ac_status=$?
22009 grep -v '^ *+' conftest.er1 >conftest.err
22010 rm -f conftest.er1
22011 cat conftest.err >&5
22012 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22013 (exit $ac_status); } && {
22014 test -z "$ac_c_werror_flag" ||
22015 test ! -s conftest.err
22016 } && test -s conftest.$ac_objext; then
22017 ac_cv_type_long_long_int=yes
22018else
22019 echo "$as_me: failed program was:" >&5
22020sed 's/^/| /' conftest.$ac_ext >&5
22021
22022 ac_cv_type_long_long_int=no
22023fi
22024
22025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22026fi
22027{ echo "$as_me:$LINENO: result: $ac_cv_type_long_long_int" >&5
22028echo "${ECHO_T}$ac_cv_type_long_long_int" >&6; }
22029
22030# The cast to long int works around a bug in the HP C Compiler 11587# The cast to long int works around a bug in the HP C Compiler
22031# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects 11588# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
22032# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. 11589# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
22033# This bug is HP SR number 8606223364. 11590# This bug is HP SR number 8606223364.
22034{ echo "$as_me:$LINENO: checking size of long long int" >&5 11591{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5
22035echo $ECHO_N "checking size of long long int... $ECHO_C" >&6; } 11592$as_echo_n "checking size of long long int... " >&6; }
22036if test "${ac_cv_sizeof_long_long_int+set}" = set; then 11593if ${ac_cv_sizeof_long_long_int+:} false; then :
22037 echo $ECHO_N "(cached) $ECHO_C" >&6 11594 $as_echo_n "(cached) " >&6
22038else
22039 if test "$cross_compiling" = yes; then
22040 # Depending upon the size, compute the lo and hi bounds.
22041cat >conftest.$ac_ext <<_ACEOF
22042/* confdefs.h. */
22043_ACEOF
22044cat confdefs.h >>conftest.$ac_ext
22045cat >>conftest.$ac_ext <<_ACEOF
22046/* end confdefs.h. */
22047$ac_includes_default
22048 typedef long long int ac__type_sizeof_;
22049int
22050main ()
22051{
22052static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)];
22053test_array [0] = 0
22054
22055 ;
22056 return 0;
22057}
22058_ACEOF
22059rm -f conftest.$ac_objext
22060if { (ac_try="$ac_compile"
22061case "(($ac_try" in
22062 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22063 *) ac_try_echo=$ac_try;;
22064esac
22065eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22066 (eval "$ac_compile") 2>conftest.er1
22067 ac_status=$?
22068 grep -v '^ *+' conftest.er1 >conftest.err
22069 rm -f conftest.er1
22070 cat conftest.err >&5
22071 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22072 (exit $ac_status); } && {
22073 test -z "$ac_c_werror_flag" ||
22074 test ! -s conftest.err
22075 } && test -s conftest.$ac_objext; then
22076 ac_lo=0 ac_mid=0
22077 while :; do
22078 cat >conftest.$ac_ext <<_ACEOF
22079/* confdefs.h. */
22080_ACEOF
22081cat confdefs.h >>conftest.$ac_ext
22082cat >>conftest.$ac_ext <<_ACEOF
22083/* end confdefs.h. */
22084$ac_includes_default
22085 typedef long long int ac__type_sizeof_;
22086int
22087main ()
22088{
22089static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
22090test_array [0] = 0
22091
22092 ;
22093 return 0;
22094}
22095_ACEOF
22096rm -f conftest.$ac_objext
22097if { (ac_try="$ac_compile"
22098case "(($ac_try" in
22099 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22100 *) ac_try_echo=$ac_try;;
22101esac
22102eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22103 (eval "$ac_compile") 2>conftest.er1
22104 ac_status=$?
22105 grep -v '^ *+' conftest.er1 >conftest.err
22106 rm -f conftest.er1
22107 cat conftest.err >&5
22108 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22109 (exit $ac_status); } && {
22110 test -z "$ac_c_werror_flag" ||
22111 test ! -s conftest.err
22112 } && test -s conftest.$ac_objext; then
22113 ac_hi=$ac_mid; break
22114else
22115 echo "$as_me: failed program was:" >&5
22116sed 's/^/| /' conftest.$ac_ext >&5
22117
22118 ac_lo=`expr $ac_mid + 1`
22119 if test $ac_lo -le $ac_mid; then
22120 ac_lo= ac_hi=
22121 break
22122 fi
22123 ac_mid=`expr 2 '*' $ac_mid + 1`
22124fi
22125
22126rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22127 done
22128else
22129 echo "$as_me: failed program was:" >&5
22130sed 's/^/| /' conftest.$ac_ext >&5
22131
22132 cat >conftest.$ac_ext <<_ACEOF
22133/* confdefs.h. */
22134_ACEOF
22135cat confdefs.h >>conftest.$ac_ext
22136cat >>conftest.$ac_ext <<_ACEOF
22137/* end confdefs.h. */
22138$ac_includes_default
22139 typedef long long int ac__type_sizeof_;
22140int
22141main ()
22142{
22143static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)];
22144test_array [0] = 0
22145
22146 ;
22147 return 0;
22148}
22149_ACEOF
22150rm -f conftest.$ac_objext
22151if { (ac_try="$ac_compile"
22152case "(($ac_try" in
22153 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22154 *) ac_try_echo=$ac_try;;
22155esac
22156eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22157 (eval "$ac_compile") 2>conftest.er1
22158 ac_status=$?
22159 grep -v '^ *+' conftest.er1 >conftest.err
22160 rm -f conftest.er1
22161 cat conftest.err >&5
22162 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22163 (exit $ac_status); } && {
22164 test -z "$ac_c_werror_flag" ||
22165 test ! -s conftest.err
22166 } && test -s conftest.$ac_objext; then
22167 ac_hi=-1 ac_mid=-1
22168 while :; do
22169 cat >conftest.$ac_ext <<_ACEOF
22170/* confdefs.h. */
22171_ACEOF
22172cat confdefs.h >>conftest.$ac_ext
22173cat >>conftest.$ac_ext <<_ACEOF
22174/* end confdefs.h. */
22175$ac_includes_default
22176 typedef long long int ac__type_sizeof_;
22177int
22178main ()
22179{
22180static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)];
22181test_array [0] = 0
22182
22183 ;
22184 return 0;
22185}
22186_ACEOF
22187rm -f conftest.$ac_objext
22188if { (ac_try="$ac_compile"
22189case "(($ac_try" in
22190 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22191 *) ac_try_echo=$ac_try;;
22192esac
22193eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22194 (eval "$ac_compile") 2>conftest.er1
22195 ac_status=$?
22196 grep -v '^ *+' conftest.er1 >conftest.err
22197 rm -f conftest.er1
22198 cat conftest.err >&5
22199 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22200 (exit $ac_status); } && {
22201 test -z "$ac_c_werror_flag" ||
22202 test ! -s conftest.err
22203 } && test -s conftest.$ac_objext; then
22204 ac_lo=$ac_mid; break
22205else
22206 echo "$as_me: failed program was:" >&5
22207sed 's/^/| /' conftest.$ac_ext >&5
22208
22209 ac_hi=`expr '(' $ac_mid ')' - 1`
22210 if test $ac_mid -le $ac_hi; then
22211 ac_lo= ac_hi=
22212 break
22213 fi
22214 ac_mid=`expr 2 '*' $ac_mid`
22215fi
22216
22217rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22218 done
22219else
22220 echo "$as_me: failed program was:" >&5
22221sed 's/^/| /' conftest.$ac_ext >&5
22222
22223 ac_lo= ac_hi=
22224fi
22225
22226rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22227fi
22228
22229rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22230# Binary search between lo and hi bounds.
22231while test "x$ac_lo" != "x$ac_hi"; do
22232 ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
22233 cat >conftest.$ac_ext <<_ACEOF
22234/* confdefs.h. */
22235_ACEOF
22236cat confdefs.h >>conftest.$ac_ext
22237cat >>conftest.$ac_ext <<_ACEOF
22238/* end confdefs.h. */
22239$ac_includes_default
22240 typedef long long int ac__type_sizeof_;
22241int
22242main ()
22243{
22244static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)];
22245test_array [0] = 0
22246
22247 ;
22248 return 0;
22249}
22250_ACEOF
22251rm -f conftest.$ac_objext
22252if { (ac_try="$ac_compile"
22253case "(($ac_try" in
22254 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22255 *) ac_try_echo=$ac_try;;
22256esac
22257eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22258 (eval "$ac_compile") 2>conftest.er1
22259 ac_status=$?
22260 grep -v '^ *+' conftest.er1 >conftest.err
22261 rm -f conftest.er1
22262 cat conftest.err >&5
22263 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22264 (exit $ac_status); } && {
22265 test -z "$ac_c_werror_flag" ||
22266 test ! -s conftest.err
22267 } && test -s conftest.$ac_objext; then
22268 ac_hi=$ac_mid
22269else
22270 echo "$as_me: failed program was:" >&5
22271sed 's/^/| /' conftest.$ac_ext >&5
22272
22273 ac_lo=`expr '(' $ac_mid ')' + 1`
22274fi
22275
22276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22277done
22278case $ac_lo in
22279?*) ac_cv_sizeof_long_long_int=$ac_lo;;
22280'') if test "$ac_cv_type_long_long_int" = yes; then
22281 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int)
22282See \`config.log' for more details." >&5
22283echo "$as_me: error: cannot compute sizeof (long long int)
22284See \`config.log' for more details." >&2;}
22285 { (exit 77); exit 77; }; }
22286 else
22287 ac_cv_sizeof_long_long_int=0
22288 fi ;;
22289esac
22290else 11595else
22291 cat >conftest.$ac_ext <<_ACEOF 11596 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then :
22292/* confdefs.h. */
22293_ACEOF
22294cat confdefs.h >>conftest.$ac_ext
22295cat >>conftest.$ac_ext <<_ACEOF
22296/* end confdefs.h. */
22297$ac_includes_default
22298 typedef long long int ac__type_sizeof_;
22299static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); }
22300static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); }
22301#include <stdio.h>
22302#include <stdlib.h>
22303int
22304main ()
22305{
22306 11597
22307 FILE *f = fopen ("conftest.val", "w");
22308 if (! f)
22309 return 1;
22310 if (((long int) (sizeof (ac__type_sizeof_))) < 0)
22311 {
22312 long int i = longval ();
22313 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22314 return 1;
22315 fprintf (f, "%ld\n", i);
22316 }
22317 else
22318 {
22319 unsigned long int i = ulongval ();
22320 if (i != ((long int) (sizeof (ac__type_sizeof_))))
22321 return 1;
22322 fprintf (f, "%lu\n", i);
22323 }
22324 return ferror (f) || fclose (f) != 0;
22325
22326 ;
22327 return 0;
22328}
22329_ACEOF
22330rm -f conftest$ac_exeext
22331if { (ac_try="$ac_link"
22332case "(($ac_try" in
22333 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22334 *) ac_try_echo=$ac_try;;
22335esac
22336eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22337 (eval "$ac_link") 2>&5
22338 ac_status=$?
22339 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22340 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22341 { (case "(($ac_try" in
22342 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22343 *) ac_try_echo=$ac_try;;
22344esac
22345eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22346 (eval "$ac_try") 2>&5
22347 ac_status=$?
22348 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22349 (exit $ac_status); }; }; then
22350 ac_cv_sizeof_long_long_int=`cat conftest.val`
22351else 11598else
22352 echo "$as_me: program exited with status $ac_status" >&5 11599 if test "$ac_cv_type_long_long_int" = yes; then
22353echo "$as_me: failed program was:" >&5 11600 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
22354sed 's/^/| /' conftest.$ac_ext >&5 11601$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
22355 11602as_fn_error 77 "cannot compute sizeof (long long int)
22356( exit $ac_status ) 11603See \`config.log' for more details" "$LINENO" 5; }
22357if test "$ac_cv_type_long_long_int" = yes; then
22358 { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long int)
22359See \`config.log' for more details." >&5
22360echo "$as_me: error: cannot compute sizeof (long long int)
22361See \`config.log' for more details." >&2;}
22362 { (exit 77); exit 77; }; }
22363 else 11604 else
22364 ac_cv_sizeof_long_long_int=0 11605 ac_cv_sizeof_long_long_int=0
22365 fi 11606 fi
22366fi 11607fi
22367rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 11608
22368fi
22369rm -f conftest.val
22370fi 11609fi
22371{ echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long_int" >&5 11610{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long_int" >&5
22372echo "${ECHO_T}$ac_cv_sizeof_long_long_int" >&6; } 11611$as_echo "$ac_cv_sizeof_long_long_int" >&6; }
22373 11612
22374 11613
22375 11614
@@ -22386,20 +11625,16 @@ fi
22386 11625
22387# compute LLONG_MIN and LLONG_MAX if we don't know them. 11626# compute LLONG_MIN and LLONG_MAX if we don't know them.
22388if test -z "$have_llong_max"; then 11627if test -z "$have_llong_max"; then
22389 { echo "$as_me:$LINENO: checking for max value of long long" >&5 11628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for max value of long long" >&5
22390echo $ECHO_N "checking for max value of long long... $ECHO_C" >&6; } 11629$as_echo_n "checking for max value of long long... " >&6; }
22391 if test "$cross_compiling" = yes; then 11630 if test "$cross_compiling" = yes; then :
22392 11631
22393 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking" >&5 11632 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking" >&5
22394echo "$as_me: WARNING: cross compiling: not checking" >&2;} 11633$as_echo "$as_me: WARNING: cross compiling: not checking" >&2;}
22395 11634
22396 11635
22397else 11636else
22398 cat >conftest.$ac_ext <<_ACEOF 11637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22399/* confdefs.h. */
22400_ACEOF
22401cat confdefs.h >>conftest.$ac_ext
22402cat >>conftest.$ac_ext <<_ACEOF
22403/* end confdefs.h. */ 11638/* end confdefs.h. */
22404 11639
22405#include <stdio.h> 11640#include <stdio.h>
@@ -22438,7 +11673,10 @@ fprint_ll(FILE *f, long long n)
22438 return 0; 11673 return 0;
22439} 11674}
22440 11675
22441int main(void) { 11676int
11677main ()
11678{
11679
22442 FILE *f; 11680 FILE *f;
22443 long long i, llmin, llmax = 0; 11681 long long i, llmin, llmax = 0;
22444 11682
@@ -22472,44 +11710,27 @@ int main(void) {
22472 if (fclose(f) < 0) 11710 if (fclose(f) < 0)
22473 exit(5); 11711 exit(5);
22474 exit(0); 11712 exit(0);
22475}
22476 11713
11714 ;
11715 return 0;
11716}
22477_ACEOF 11717_ACEOF
22478rm -f conftest$ac_exeext 11718if ac_fn_c_try_run "$LINENO"; then :
22479if { (ac_try="$ac_link"
22480case "(($ac_try" in
22481 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22482 *) ac_try_echo=$ac_try;;
22483esac
22484eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22485 (eval "$ac_link") 2>&5
22486 ac_status=$?
22487 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22488 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
22489 { (case "(($ac_try" in
22490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22491 *) ac_try_echo=$ac_try;;
22492esac
22493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22494 (eval "$ac_try") 2>&5
22495 ac_status=$?
22496 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22497 (exit $ac_status); }; }; then
22498 11719
22499 llong_min=`$AWK '{print $1}' conftest.llminmax` 11720 llong_min=`$AWK '{print $1}' conftest.llminmax`
22500 llong_max=`$AWK '{print $2}' conftest.llminmax` 11721 llong_max=`$AWK '{print $2}' conftest.llminmax`
22501 11722
22502 { echo "$as_me:$LINENO: result: $llong_max" >&5 11723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_max" >&5
22503echo "${ECHO_T}$llong_max" >&6; } 11724$as_echo "$llong_max" >&6; }
22504 11725
22505cat >>confdefs.h <<_ACEOF 11726cat >>confdefs.h <<_ACEOF
22506#define LLONG_MAX ${llong_max}LL 11727#define LLONG_MAX ${llong_max}LL
22507_ACEOF 11728_ACEOF
22508 11729
22509 { echo "$as_me:$LINENO: checking for min value of long long" >&5 11730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for min value of long long" >&5
22510echo $ECHO_N "checking for min value of long long... $ECHO_C" >&6; } 11731$as_echo_n "checking for min value of long long... " >&6; }
22511 { echo "$as_me:$LINENO: result: $llong_min" >&5 11732 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $llong_min" >&5
22512echo "${ECHO_T}$llong_min" >&6; } 11733$as_echo "$llong_min" >&6; }
22513 11734
22514cat >>confdefs.h <<_ACEOF 11735cat >>confdefs.h <<_ACEOF
22515#define LLONG_MIN ${llong_min}LL 11736#define LLONG_MIN ${llong_min}LL
@@ -22517,35 +11738,26 @@ _ACEOF
22517 11738
22518 11739
22519else 11740else
22520 echo "$as_me: program exited with status $ac_status" >&5
22521echo "$as_me: failed program was:" >&5
22522sed 's/^/| /' conftest.$ac_ext >&5
22523
22524( exit $ac_status )
22525 11741
22526 { echo "$as_me:$LINENO: result: not found" >&5 11742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22527echo "${ECHO_T}not found" >&6; } 11743$as_echo "not found" >&6; }
22528 11744
22529fi 11745fi
22530rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 11746rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11747 conftest.$ac_objext conftest.beam conftest.$ac_ext
22531fi 11748fi
22532 11749
22533
22534fi 11750fi
22535 11751
22536 11752
22537# More checks for data types 11753# More checks for data types
22538{ echo "$as_me:$LINENO: checking for u_int type" >&5 11754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int type" >&5
22539echo $ECHO_N "checking for u_int type... $ECHO_C" >&6; } 11755$as_echo_n "checking for u_int type... " >&6; }
22540if test "${ac_cv_have_u_int+set}" = set; then 11756if ${ac_cv_have_u_int+:} false; then :
22541 echo $ECHO_N "(cached) $ECHO_C" >&6 11757 $as_echo_n "(cached) " >&6
22542else 11758else
22543 11759
22544 cat >conftest.$ac_ext <<_ACEOF 11760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22545/* confdefs.h. */
22546_ACEOF
22547cat confdefs.h >>conftest.$ac_ext
22548cat >>conftest.$ac_ext <<_ACEOF
22549/* end confdefs.h. */ 11761/* end confdefs.h. */
22550 #include <sys/types.h> 11762 #include <sys/types.h>
22551int 11763int
@@ -22556,57 +11768,31 @@ main ()
22556 return 0; 11768 return 0;
22557} 11769}
22558_ACEOF 11770_ACEOF
22559rm -f conftest.$ac_objext 11771if ac_fn_c_try_compile "$LINENO"; then :
22560if { (ac_try="$ac_compile"
22561case "(($ac_try" in
22562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22563 *) ac_try_echo=$ac_try;;
22564esac
22565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22566 (eval "$ac_compile") 2>conftest.er1
22567 ac_status=$?
22568 grep -v '^ *+' conftest.er1 >conftest.err
22569 rm -f conftest.er1
22570 cat conftest.err >&5
22571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22572 (exit $ac_status); } && {
22573 test -z "$ac_c_werror_flag" ||
22574 test ! -s conftest.err
22575 } && test -s conftest.$ac_objext; then
22576 ac_cv_have_u_int="yes" 11772 ac_cv_have_u_int="yes"
22577else 11773else
22578 echo "$as_me: failed program was:" >&5 11774 ac_cv_have_u_int="no"
22579sed 's/^/| /' conftest.$ac_ext >&5
22580
22581 ac_cv_have_u_int="no"
22582 11775
22583fi 11776fi
22584
22585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11777rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22586 11778
22587fi 11779fi
22588{ echo "$as_me:$LINENO: result: $ac_cv_have_u_int" >&5 11780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int" >&5
22589echo "${ECHO_T}$ac_cv_have_u_int" >&6; } 11781$as_echo "$ac_cv_have_u_int" >&6; }
22590if test "x$ac_cv_have_u_int" = "xyes" ; then 11782if test "x$ac_cv_have_u_int" = "xyes" ; then
22591 11783
22592cat >>confdefs.h <<\_ACEOF 11784$as_echo "#define HAVE_U_INT 1" >>confdefs.h
22593#define HAVE_U_INT 1
22594_ACEOF
22595 11785
22596 have_u_int=1 11786 have_u_int=1
22597fi 11787fi
22598 11788
22599{ echo "$as_me:$LINENO: checking for intXX_t types" >&5 11789{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types" >&5
22600echo $ECHO_N "checking for intXX_t types... $ECHO_C" >&6; } 11790$as_echo_n "checking for intXX_t types... " >&6; }
22601if test "${ac_cv_have_intxx_t+set}" = set; then 11791if ${ac_cv_have_intxx_t+:} false; then :
22602 echo $ECHO_N "(cached) $ECHO_C" >&6 11792 $as_echo_n "(cached) " >&6
22603else 11793else
22604 11794
22605 cat >conftest.$ac_ext <<_ACEOF 11795 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22606/* confdefs.h. */
22607_ACEOF
22608cat confdefs.h >>conftest.$ac_ext
22609cat >>conftest.$ac_ext <<_ACEOF
22610/* end confdefs.h. */ 11796/* end confdefs.h. */
22611 #include <sys/types.h> 11797 #include <sys/types.h>
22612int 11798int
@@ -22617,42 +11803,20 @@ main ()
22617 return 0; 11803 return 0;
22618} 11804}
22619_ACEOF 11805_ACEOF
22620rm -f conftest.$ac_objext 11806if ac_fn_c_try_compile "$LINENO"; then :
22621if { (ac_try="$ac_compile"
22622case "(($ac_try" in
22623 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22624 *) ac_try_echo=$ac_try;;
22625esac
22626eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22627 (eval "$ac_compile") 2>conftest.er1
22628 ac_status=$?
22629 grep -v '^ *+' conftest.er1 >conftest.err
22630 rm -f conftest.er1
22631 cat conftest.err >&5
22632 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22633 (exit $ac_status); } && {
22634 test -z "$ac_c_werror_flag" ||
22635 test ! -s conftest.err
22636 } && test -s conftest.$ac_objext; then
22637 ac_cv_have_intxx_t="yes" 11807 ac_cv_have_intxx_t="yes"
22638else 11808else
22639 echo "$as_me: failed program was:" >&5 11809 ac_cv_have_intxx_t="no"
22640sed 's/^/| /' conftest.$ac_ext >&5
22641
22642 ac_cv_have_intxx_t="no"
22643 11810
22644fi 11811fi
22645
22646rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22647 11813
22648fi 11814fi
22649{ echo "$as_me:$LINENO: result: $ac_cv_have_intxx_t" >&5 11815{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_intxx_t" >&5
22650echo "${ECHO_T}$ac_cv_have_intxx_t" >&6; } 11816$as_echo "$ac_cv_have_intxx_t" >&6; }
22651if test "x$ac_cv_have_intxx_t" = "xyes" ; then 11817if test "x$ac_cv_have_intxx_t" = "xyes" ; then
22652 11818
22653cat >>confdefs.h <<\_ACEOF 11819$as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
22654#define HAVE_INTXX_T 1
22655_ACEOF
22656 11820
22657 have_intxx_t=1 11821 have_intxx_t=1
22658fi 11822fi
@@ -22660,13 +11824,9 @@ fi
22660if (test -z "$have_intxx_t" && \ 11824if (test -z "$have_intxx_t" && \
22661 test "x$ac_cv_header_stdint_h" = "xyes") 11825 test "x$ac_cv_header_stdint_h" = "xyes")
22662then 11826then
22663 { echo "$as_me:$LINENO: checking for intXX_t types in stdint.h" >&5 11827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t types in stdint.h" >&5
22664echo $ECHO_N "checking for intXX_t types in stdint.h... $ECHO_C" >&6; } 11828$as_echo_n "checking for intXX_t types in stdint.h... " >&6; }
22665 cat >conftest.$ac_ext <<_ACEOF 11829 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22666/* confdefs.h. */
22667_ACEOF
22668cat confdefs.h >>conftest.$ac_ext
22669cat >>conftest.$ac_ext <<_ACEOF
22670/* end confdefs.h. */ 11830/* end confdefs.h. */
22671 #include <stdint.h> 11831 #include <stdint.h>
22672int 11832int
@@ -22677,54 +11837,28 @@ main ()
22677 return 0; 11837 return 0;
22678} 11838}
22679_ACEOF 11839_ACEOF
22680rm -f conftest.$ac_objext 11840if ac_fn_c_try_compile "$LINENO"; then :
22681if { (ac_try="$ac_compile"
22682case "(($ac_try" in
22683 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22684 *) ac_try_echo=$ac_try;;
22685esac
22686eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22687 (eval "$ac_compile") 2>conftest.er1
22688 ac_status=$?
22689 grep -v '^ *+' conftest.er1 >conftest.err
22690 rm -f conftest.er1
22691 cat conftest.err >&5
22692 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22693 (exit $ac_status); } && {
22694 test -z "$ac_c_werror_flag" ||
22695 test ! -s conftest.err
22696 } && test -s conftest.$ac_objext; then
22697 11841
22698 cat >>confdefs.h <<\_ACEOF 11842 $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
22699#define HAVE_INTXX_T 1
22700_ACEOF
22701 11843
22702 { echo "$as_me:$LINENO: result: yes" >&5 11844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22703echo "${ECHO_T}yes" >&6; } 11845$as_echo "yes" >&6; }
22704 11846
22705else 11847else
22706 echo "$as_me: failed program was:" >&5 11848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22707sed 's/^/| /' conftest.$ac_ext >&5 11849$as_echo "no" >&6; }
22708
22709 { echo "$as_me:$LINENO: result: no" >&5
22710echo "${ECHO_T}no" >&6; }
22711 11850
22712fi 11851fi
22713
22714rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22715fi 11853fi
22716 11854
22717{ echo "$as_me:$LINENO: checking for int64_t type" >&5 11855{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for int64_t type" >&5
22718echo $ECHO_N "checking for int64_t type... $ECHO_C" >&6; } 11856$as_echo_n "checking for int64_t type... " >&6; }
22719if test "${ac_cv_have_int64_t+set}" = set; then 11857if ${ac_cv_have_int64_t+:} false; then :
22720 echo $ECHO_N "(cached) $ECHO_C" >&6 11858 $as_echo_n "(cached) " >&6
22721else 11859else
22722 11860
22723 cat >conftest.$ac_ext <<_ACEOF 11861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22724/* confdefs.h. */
22725_ACEOF
22726cat confdefs.h >>conftest.$ac_ext
22727cat >>conftest.$ac_ext <<_ACEOF
22728/* end confdefs.h. */ 11862/* end confdefs.h. */
22729 11863
22730#include <sys/types.h> 11864#include <sys/types.h>
@@ -22739,61 +11873,37 @@ cat >>conftest.$ac_ext <<_ACEOF
22739int 11873int
22740main () 11874main ()
22741{ 11875{
22742 int64_t a; a = 1; 11876
11877int64_t a; a = 1;
11878
22743 ; 11879 ;
22744 return 0; 11880 return 0;
22745} 11881}
22746_ACEOF 11882_ACEOF
22747rm -f conftest.$ac_objext 11883if ac_fn_c_try_compile "$LINENO"; then :
22748if { (ac_try="$ac_compile"
22749case "(($ac_try" in
22750 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22751 *) ac_try_echo=$ac_try;;
22752esac
22753eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22754 (eval "$ac_compile") 2>conftest.er1
22755 ac_status=$?
22756 grep -v '^ *+' conftest.er1 >conftest.err
22757 rm -f conftest.er1
22758 cat conftest.err >&5
22759 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22760 (exit $ac_status); } && {
22761 test -z "$ac_c_werror_flag" ||
22762 test ! -s conftest.err
22763 } && test -s conftest.$ac_objext; then
22764 ac_cv_have_int64_t="yes" 11884 ac_cv_have_int64_t="yes"
22765else 11885else
22766 echo "$as_me: failed program was:" >&5 11886 ac_cv_have_int64_t="no"
22767sed 's/^/| /' conftest.$ac_ext >&5
22768
22769 ac_cv_have_int64_t="no"
22770 11887
22771fi 11888fi
22772
22773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22774 11890
22775fi 11891fi
22776{ echo "$as_me:$LINENO: result: $ac_cv_have_int64_t" >&5 11892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_int64_t" >&5
22777echo "${ECHO_T}$ac_cv_have_int64_t" >&6; } 11893$as_echo "$ac_cv_have_int64_t" >&6; }
22778if test "x$ac_cv_have_int64_t" = "xyes" ; then 11894if test "x$ac_cv_have_int64_t" = "xyes" ; then
22779 11895
22780cat >>confdefs.h <<\_ACEOF 11896$as_echo "#define HAVE_INT64_T 1" >>confdefs.h
22781#define HAVE_INT64_T 1
22782_ACEOF
22783 11897
22784fi 11898fi
22785 11899
22786{ echo "$as_me:$LINENO: checking for u_intXX_t types" >&5 11900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types" >&5
22787echo $ECHO_N "checking for u_intXX_t types... $ECHO_C" >&6; } 11901$as_echo_n "checking for u_intXX_t types... " >&6; }
22788if test "${ac_cv_have_u_intxx_t+set}" = set; then 11902if ${ac_cv_have_u_intxx_t+:} false; then :
22789 echo $ECHO_N "(cached) $ECHO_C" >&6 11903 $as_echo_n "(cached) " >&6
22790else 11904else
22791 11905
22792 cat >conftest.$ac_ext <<_ACEOF 11906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22793/* confdefs.h. */
22794_ACEOF
22795cat confdefs.h >>conftest.$ac_ext
22796cat >>conftest.$ac_ext <<_ACEOF
22797/* end confdefs.h. */ 11907/* end confdefs.h. */
22798 #include <sys/types.h> 11908 #include <sys/types.h>
22799int 11909int
@@ -22804,54 +11914,28 @@ main ()
22804 return 0; 11914 return 0;
22805} 11915}
22806_ACEOF 11916_ACEOF
22807rm -f conftest.$ac_objext 11917if ac_fn_c_try_compile "$LINENO"; then :
22808if { (ac_try="$ac_compile"
22809case "(($ac_try" in
22810 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22811 *) ac_try_echo=$ac_try;;
22812esac
22813eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22814 (eval "$ac_compile") 2>conftest.er1
22815 ac_status=$?
22816 grep -v '^ *+' conftest.er1 >conftest.err
22817 rm -f conftest.er1
22818 cat conftest.err >&5
22819 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22820 (exit $ac_status); } && {
22821 test -z "$ac_c_werror_flag" ||
22822 test ! -s conftest.err
22823 } && test -s conftest.$ac_objext; then
22824 ac_cv_have_u_intxx_t="yes" 11918 ac_cv_have_u_intxx_t="yes"
22825else 11919else
22826 echo "$as_me: failed program was:" >&5 11920 ac_cv_have_u_intxx_t="no"
22827sed 's/^/| /' conftest.$ac_ext >&5
22828
22829 ac_cv_have_u_intxx_t="no"
22830 11921
22831fi 11922fi
22832
22833rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22834 11924
22835fi 11925fi
22836{ echo "$as_me:$LINENO: result: $ac_cv_have_u_intxx_t" >&5 11926{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_intxx_t" >&5
22837echo "${ECHO_T}$ac_cv_have_u_intxx_t" >&6; } 11927$as_echo "$ac_cv_have_u_intxx_t" >&6; }
22838if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then 11928if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
22839 11929
22840cat >>confdefs.h <<\_ACEOF 11930$as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
22841#define HAVE_U_INTXX_T 1
22842_ACEOF
22843 11931
22844 have_u_intxx_t=1 11932 have_u_intxx_t=1
22845fi 11933fi
22846 11934
22847if test -z "$have_u_intxx_t" ; then 11935if test -z "$have_u_intxx_t" ; then
22848 { echo "$as_me:$LINENO: checking for u_intXX_t types in sys/socket.h" >&5 11936 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_intXX_t types in sys/socket.h" >&5
22849echo $ECHO_N "checking for u_intXX_t types in sys/socket.h... $ECHO_C" >&6; } 11937$as_echo_n "checking for u_intXX_t types in sys/socket.h... " >&6; }
22850 cat >conftest.$ac_ext <<_ACEOF 11938 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22851/* confdefs.h. */
22852_ACEOF
22853cat confdefs.h >>conftest.$ac_ext
22854cat >>conftest.$ac_ext <<_ACEOF
22855/* end confdefs.h. */ 11939/* end confdefs.h. */
22856 #include <sys/socket.h> 11940 #include <sys/socket.h>
22857int 11941int
@@ -22862,54 +11946,28 @@ main ()
22862 return 0; 11946 return 0;
22863} 11947}
22864_ACEOF 11948_ACEOF
22865rm -f conftest.$ac_objext 11949if ac_fn_c_try_compile "$LINENO"; then :
22866if { (ac_try="$ac_compile"
22867case "(($ac_try" in
22868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22869 *) ac_try_echo=$ac_try;;
22870esac
22871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22872 (eval "$ac_compile") 2>conftest.er1
22873 ac_status=$?
22874 grep -v '^ *+' conftest.er1 >conftest.err
22875 rm -f conftest.er1
22876 cat conftest.err >&5
22877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22878 (exit $ac_status); } && {
22879 test -z "$ac_c_werror_flag" ||
22880 test ! -s conftest.err
22881 } && test -s conftest.$ac_objext; then
22882 11950
22883 cat >>confdefs.h <<\_ACEOF 11951 $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
22884#define HAVE_U_INTXX_T 1
22885_ACEOF
22886 11952
22887 { echo "$as_me:$LINENO: result: yes" >&5 11953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
22888echo "${ECHO_T}yes" >&6; } 11954$as_echo "yes" >&6; }
22889 11955
22890else 11956else
22891 echo "$as_me: failed program was:" >&5 11957 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22892sed 's/^/| /' conftest.$ac_ext >&5 11958$as_echo "no" >&6; }
22893
22894 { echo "$as_me:$LINENO: result: no" >&5
22895echo "${ECHO_T}no" >&6; }
22896 11959
22897fi 11960fi
22898
22899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11961rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22900fi 11962fi
22901 11963
22902{ echo "$as_me:$LINENO: checking for u_int64_t types" >&5 11964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t types" >&5
22903echo $ECHO_N "checking for u_int64_t types... $ECHO_C" >&6; } 11965$as_echo_n "checking for u_int64_t types... " >&6; }
22904if test "${ac_cv_have_u_int64_t+set}" = set; then 11966if ${ac_cv_have_u_int64_t+:} false; then :
22905 echo $ECHO_N "(cached) $ECHO_C" >&6 11967 $as_echo_n "(cached) " >&6
22906else 11968else
22907 11969
22908 cat >conftest.$ac_ext <<_ACEOF 11970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22909/* confdefs.h. */
22910_ACEOF
22911cat confdefs.h >>conftest.$ac_ext
22912cat >>conftest.$ac_ext <<_ACEOF
22913/* end confdefs.h. */ 11971/* end confdefs.h. */
22914 #include <sys/types.h> 11972 #include <sys/types.h>
22915int 11973int
@@ -22920,54 +11978,28 @@ main ()
22920 return 0; 11978 return 0;
22921} 11979}
22922_ACEOF 11980_ACEOF
22923rm -f conftest.$ac_objext 11981if ac_fn_c_try_compile "$LINENO"; then :
22924if { (ac_try="$ac_compile"
22925case "(($ac_try" in
22926 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22927 *) ac_try_echo=$ac_try;;
22928esac
22929eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22930 (eval "$ac_compile") 2>conftest.er1
22931 ac_status=$?
22932 grep -v '^ *+' conftest.er1 >conftest.err
22933 rm -f conftest.er1
22934 cat conftest.err >&5
22935 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22936 (exit $ac_status); } && {
22937 test -z "$ac_c_werror_flag" ||
22938 test ! -s conftest.err
22939 } && test -s conftest.$ac_objext; then
22940 ac_cv_have_u_int64_t="yes" 11982 ac_cv_have_u_int64_t="yes"
22941else 11983else
22942 echo "$as_me: failed program was:" >&5 11984 ac_cv_have_u_int64_t="no"
22943sed 's/^/| /' conftest.$ac_ext >&5
22944
22945 ac_cv_have_u_int64_t="no"
22946 11985
22947fi 11986fi
22948
22949rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22950 11988
22951fi 11989fi
22952{ echo "$as_me:$LINENO: result: $ac_cv_have_u_int64_t" >&5 11990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_int64_t" >&5
22953echo "${ECHO_T}$ac_cv_have_u_int64_t" >&6; } 11991$as_echo "$ac_cv_have_u_int64_t" >&6; }
22954if test "x$ac_cv_have_u_int64_t" = "xyes" ; then 11992if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
22955 11993
22956cat >>confdefs.h <<\_ACEOF 11994$as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
22957#define HAVE_U_INT64_T 1
22958_ACEOF
22959 11995
22960 have_u_int64_t=1 11996 have_u_int64_t=1
22961fi 11997fi
22962 11998
22963if test -z "$have_u_int64_t" ; then 11999if test -z "$have_u_int64_t" ; then
22964 { echo "$as_me:$LINENO: checking for u_int64_t type in sys/bitypes.h" >&5 12000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_int64_t type in sys/bitypes.h" >&5
22965echo $ECHO_N "checking for u_int64_t type in sys/bitypes.h... $ECHO_C" >&6; } 12001$as_echo_n "checking for u_int64_t type in sys/bitypes.h... " >&6; }
22966 cat >conftest.$ac_ext <<_ACEOF 12002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22967/* confdefs.h. */
22968_ACEOF
22969cat confdefs.h >>conftest.$ac_ext
22970cat >>conftest.$ac_ext <<_ACEOF
22971/* end confdefs.h. */ 12003/* end confdefs.h. */
22972 #include <sys/bitypes.h> 12004 #include <sys/bitypes.h>
22973int 12005int
@@ -22978,55 +12010,29 @@ main ()
22978 return 0; 12010 return 0;
22979} 12011}
22980_ACEOF 12012_ACEOF
22981rm -f conftest.$ac_objext 12013if ac_fn_c_try_compile "$LINENO"; then :
22982if { (ac_try="$ac_compile"
22983case "(($ac_try" in
22984 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
22985 *) ac_try_echo=$ac_try;;
22986esac
22987eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
22988 (eval "$ac_compile") 2>conftest.er1
22989 ac_status=$?
22990 grep -v '^ *+' conftest.er1 >conftest.err
22991 rm -f conftest.er1
22992 cat conftest.err >&5
22993 echo "$as_me:$LINENO: \$? = $ac_status" >&5
22994 (exit $ac_status); } && {
22995 test -z "$ac_c_werror_flag" ||
22996 test ! -s conftest.err
22997 } && test -s conftest.$ac_objext; then
22998 12014
22999 cat >>confdefs.h <<\_ACEOF 12015 $as_echo "#define HAVE_U_INT64_T 1" >>confdefs.h
23000#define HAVE_U_INT64_T 1
23001_ACEOF
23002 12016
23003 { echo "$as_me:$LINENO: result: yes" >&5 12017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23004echo "${ECHO_T}yes" >&6; } 12018$as_echo "yes" >&6; }
23005 12019
23006else 12020else
23007 echo "$as_me: failed program was:" >&5 12021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23008sed 's/^/| /' conftest.$ac_ext >&5 12022$as_echo "no" >&6; }
23009
23010 { echo "$as_me:$LINENO: result: no" >&5
23011echo "${ECHO_T}no" >&6; }
23012 12023
23013fi 12024fi
23014
23015rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12025rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23016fi 12026fi
23017 12027
23018if test -z "$have_u_intxx_t" ; then 12028if test -z "$have_u_intxx_t" ; then
23019 { echo "$as_me:$LINENO: checking for uintXX_t types" >&5 12029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types" >&5
23020echo $ECHO_N "checking for uintXX_t types... $ECHO_C" >&6; } 12030$as_echo_n "checking for uintXX_t types... " >&6; }
23021if test "${ac_cv_have_uintxx_t+set}" = set; then 12031if ${ac_cv_have_uintxx_t+:} false; then :
23022 echo $ECHO_N "(cached) $ECHO_C" >&6 12032 $as_echo_n "(cached) " >&6
23023else 12033else
23024 12034
23025 cat >conftest.$ac_ext <<_ACEOF 12035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23026/* confdefs.h. */
23027_ACEOF
23028cat confdefs.h >>conftest.$ac_ext
23029cat >>conftest.$ac_ext <<_ACEOF
23030/* end confdefs.h. */ 12036/* end confdefs.h. */
23031 12037
23032#include <sys/types.h> 12038#include <sys/types.h>
@@ -23034,59 +12040,38 @@ cat >>conftest.$ac_ext <<_ACEOF
23034int 12040int
23035main () 12041main ()
23036{ 12042{
23037 uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; 12043
12044 uint8_t a;
12045 uint16_t b;
12046 uint32_t c;
12047 a = b = c = 1;
12048
23038 ; 12049 ;
23039 return 0; 12050 return 0;
23040} 12051}
23041_ACEOF 12052_ACEOF
23042rm -f conftest.$ac_objext 12053if ac_fn_c_try_compile "$LINENO"; then :
23043if { (ac_try="$ac_compile"
23044case "(($ac_try" in
23045 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23046 *) ac_try_echo=$ac_try;;
23047esac
23048eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23049 (eval "$ac_compile") 2>conftest.er1
23050 ac_status=$?
23051 grep -v '^ *+' conftest.er1 >conftest.err
23052 rm -f conftest.er1
23053 cat conftest.err >&5
23054 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23055 (exit $ac_status); } && {
23056 test -z "$ac_c_werror_flag" ||
23057 test ! -s conftest.err
23058 } && test -s conftest.$ac_objext; then
23059 ac_cv_have_uintxx_t="yes" 12054 ac_cv_have_uintxx_t="yes"
23060else 12055else
23061 echo "$as_me: failed program was:" >&5 12056 ac_cv_have_uintxx_t="no"
23062sed 's/^/| /' conftest.$ac_ext >&5
23063
23064 ac_cv_have_uintxx_t="no"
23065 12057
23066fi 12058fi
23067
23068rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12059rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23069 12060
23070fi 12061fi
23071{ echo "$as_me:$LINENO: result: $ac_cv_have_uintxx_t" >&5 12062{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_uintxx_t" >&5
23072echo "${ECHO_T}$ac_cv_have_uintxx_t" >&6; } 12063$as_echo "$ac_cv_have_uintxx_t" >&6; }
23073 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then 12064 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
23074 12065
23075cat >>confdefs.h <<\_ACEOF 12066$as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
23076#define HAVE_UINTXX_T 1
23077_ACEOF
23078 12067
23079 fi 12068 fi
23080fi 12069fi
23081 12070
23082if test -z "$have_uintxx_t" ; then 12071if test -z "$have_uintxx_t" ; then
23083 { echo "$as_me:$LINENO: checking for uintXX_t types in stdint.h" >&5 12072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uintXX_t types in stdint.h" >&5
23084echo $ECHO_N "checking for uintXX_t types in stdint.h... $ECHO_C" >&6; } 12073$as_echo_n "checking for uintXX_t types in stdint.h... " >&6; }
23085 cat >conftest.$ac_ext <<_ACEOF 12074 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23086/* confdefs.h. */
23087_ACEOF
23088cat confdefs.h >>conftest.$ac_ext
23089cat >>conftest.$ac_ext <<_ACEOF
23090/* end confdefs.h. */ 12075/* end confdefs.h. */
23091 #include <stdint.h> 12076 #include <stdint.h>
23092int 12077int
@@ -23097,53 +12082,27 @@ main ()
23097 return 0; 12082 return 0;
23098} 12083}
23099_ACEOF 12084_ACEOF
23100rm -f conftest.$ac_objext 12085if ac_fn_c_try_compile "$LINENO"; then :
23101if { (ac_try="$ac_compile"
23102case "(($ac_try" in
23103 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23104 *) ac_try_echo=$ac_try;;
23105esac
23106eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23107 (eval "$ac_compile") 2>conftest.er1
23108 ac_status=$?
23109 grep -v '^ *+' conftest.er1 >conftest.err
23110 rm -f conftest.er1
23111 cat conftest.err >&5
23112 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23113 (exit $ac_status); } && {
23114 test -z "$ac_c_werror_flag" ||
23115 test ! -s conftest.err
23116 } && test -s conftest.$ac_objext; then
23117 12086
23118 cat >>confdefs.h <<\_ACEOF 12087 $as_echo "#define HAVE_UINTXX_T 1" >>confdefs.h
23119#define HAVE_UINTXX_T 1
23120_ACEOF
23121 12088
23122 { echo "$as_me:$LINENO: result: yes" >&5 12089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23123echo "${ECHO_T}yes" >&6; } 12090$as_echo "yes" >&6; }
23124 12091
23125else 12092else
23126 echo "$as_me: failed program was:" >&5 12093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23127sed 's/^/| /' conftest.$ac_ext >&5 12094$as_echo "no" >&6; }
23128
23129 { echo "$as_me:$LINENO: result: no" >&5
23130echo "${ECHO_T}no" >&6; }
23131 12095
23132fi 12096fi
23133
23134rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12097rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23135fi 12098fi
23136 12099
23137if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ 12100if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
23138 test "x$ac_cv_header_sys_bitypes_h" = "xyes") 12101 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
23139then 12102then
23140 { echo "$as_me:$LINENO: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5 12103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intXX_t and u_intXX_t types in sys/bitypes.h" >&5
23141echo $ECHO_N "checking for intXX_t and u_intXX_t types in sys/bitypes.h... $ECHO_C" >&6; } 12104$as_echo_n "checking for intXX_t and u_intXX_t types in sys/bitypes.h... " >&6; }
23142 cat >conftest.$ac_ext <<_ACEOF 12105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23143/* confdefs.h. */
23144_ACEOF
23145cat confdefs.h >>conftest.$ac_ext
23146cat >>conftest.$ac_ext <<_ACEOF
23147/* end confdefs.h. */ 12106/* end confdefs.h. */
23148 12107
23149#include <sys/bitypes.h> 12108#include <sys/bitypes.h>
@@ -23160,63 +12119,33 @@ main ()
23160 return 0; 12119 return 0;
23161} 12120}
23162_ACEOF 12121_ACEOF
23163rm -f conftest.$ac_objext 12122if ac_fn_c_try_compile "$LINENO"; then :
23164if { (ac_try="$ac_compile"
23165case "(($ac_try" in
23166 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23167 *) ac_try_echo=$ac_try;;
23168esac
23169eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23170 (eval "$ac_compile") 2>conftest.er1
23171 ac_status=$?
23172 grep -v '^ *+' conftest.er1 >conftest.err
23173 rm -f conftest.er1
23174 cat conftest.err >&5
23175 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23176 (exit $ac_status); } && {
23177 test -z "$ac_c_werror_flag" ||
23178 test ! -s conftest.err
23179 } && test -s conftest.$ac_objext; then
23180 12123
23181 cat >>confdefs.h <<\_ACEOF 12124 $as_echo "#define HAVE_U_INTXX_T 1" >>confdefs.h
23182#define HAVE_U_INTXX_T 1
23183_ACEOF
23184 12125
23185 cat >>confdefs.h <<\_ACEOF 12126 $as_echo "#define HAVE_INTXX_T 1" >>confdefs.h
23186#define HAVE_INTXX_T 1
23187_ACEOF
23188 12127
23189 { echo "$as_me:$LINENO: result: yes" >&5 12128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23190echo "${ECHO_T}yes" >&6; } 12129$as_echo "yes" >&6; }
23191 12130
23192else 12131else
23193 echo "$as_me: failed program was:" >&5 12132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23194sed 's/^/| /' conftest.$ac_ext >&5 12133$as_echo "no" >&6; }
23195
23196 { echo "$as_me:$LINENO: result: no" >&5
23197echo "${ECHO_T}no" >&6; }
23198 12134
23199fi 12135fi
23200
23201rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12136rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23202fi 12137fi
23203 12138
23204 12139
23205{ echo "$as_me:$LINENO: checking for u_char" >&5 12140{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for u_char" >&5
23206echo $ECHO_N "checking for u_char... $ECHO_C" >&6; } 12141$as_echo_n "checking for u_char... " >&6; }
23207if test "${ac_cv_have_u_char+set}" = set; then 12142if ${ac_cv_have_u_char+:} false; then :
23208 echo $ECHO_N "(cached) $ECHO_C" >&6 12143 $as_echo_n "(cached) " >&6
23209else 12144else
23210 12145
23211 cat >conftest.$ac_ext <<_ACEOF 12146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23212/* confdefs.h. */
23213_ACEOF
23214cat confdefs.h >>conftest.$ac_ext
23215cat >>conftest.$ac_ext <<_ACEOF
23216/* end confdefs.h. */ 12147/* end confdefs.h. */
23217 12148 #include <sys/types.h>
23218#include <sys/types.h>
23219
23220int 12149int
23221main () 12150main ()
23222{ 12151{
@@ -23225,109 +12154,35 @@ main ()
23225 return 0; 12154 return 0;
23226} 12155}
23227_ACEOF 12156_ACEOF
23228rm -f conftest.$ac_objext 12157if ac_fn_c_try_compile "$LINENO"; then :
23229if { (ac_try="$ac_compile"
23230case "(($ac_try" in
23231 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23232 *) ac_try_echo=$ac_try;;
23233esac
23234eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23235 (eval "$ac_compile") 2>conftest.er1
23236 ac_status=$?
23237 grep -v '^ *+' conftest.er1 >conftest.err
23238 rm -f conftest.er1
23239 cat conftest.err >&5
23240 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23241 (exit $ac_status); } && {
23242 test -z "$ac_c_werror_flag" ||
23243 test ! -s conftest.err
23244 } && test -s conftest.$ac_objext; then
23245 ac_cv_have_u_char="yes" 12158 ac_cv_have_u_char="yes"
23246else 12159else
23247 echo "$as_me: failed program was:" >&5 12160 ac_cv_have_u_char="no"
23248sed 's/^/| /' conftest.$ac_ext >&5
23249
23250 ac_cv_have_u_char="no"
23251 12161
23252fi 12162fi
23253
23254rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12163rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23255 12164
23256fi 12165fi
23257{ echo "$as_me:$LINENO: result: $ac_cv_have_u_char" >&5 12166{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_u_char" >&5
23258echo "${ECHO_T}$ac_cv_have_u_char" >&6; } 12167$as_echo "$ac_cv_have_u_char" >&6; }
23259if test "x$ac_cv_have_u_char" = "xyes" ; then 12168if test "x$ac_cv_have_u_char" = "xyes" ; then
23260 12169
23261cat >>confdefs.h <<\_ACEOF 12170$as_echo "#define HAVE_U_CHAR 1" >>confdefs.h
23262#define HAVE_U_CHAR 1
23263_ACEOF
23264 12171
23265fi 12172fi
23266 12173
23267 12174
23268 { echo "$as_me:$LINENO: checking for socklen_t" >&5 12175 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
23269echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6; }
23270if test "${ac_cv_type_socklen_t+set}" = set; then
23271 echo $ECHO_N "(cached) $ECHO_C" >&6
23272else
23273 cat >conftest.$ac_ext <<_ACEOF
23274/* confdefs.h. */
23275_ACEOF
23276cat confdefs.h >>conftest.$ac_ext
23277cat >>conftest.$ac_ext <<_ACEOF
23278/* end confdefs.h. */
23279#include <sys/types.h>
23280#include <sys/socket.h> 12176#include <sys/socket.h>
12177"
12178if test "x$ac_cv_type_socklen_t" = xyes; then :
23281 12179
23282typedef socklen_t ac__type_new_;
23283int
23284main ()
23285{
23286if ((ac__type_new_ *) 0)
23287 return 0;
23288if (sizeof (ac__type_new_))
23289 return 0;
23290 ;
23291 return 0;
23292}
23293_ACEOF
23294rm -f conftest.$ac_objext
23295if { (ac_try="$ac_compile"
23296case "(($ac_try" in
23297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23298 *) ac_try_echo=$ac_try;;
23299esac
23300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23301 (eval "$ac_compile") 2>conftest.er1
23302 ac_status=$?
23303 grep -v '^ *+' conftest.er1 >conftest.err
23304 rm -f conftest.er1
23305 cat conftest.err >&5
23306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23307 (exit $ac_status); } && {
23308 test -z "$ac_c_werror_flag" ||
23309 test ! -s conftest.err
23310 } && test -s conftest.$ac_objext; then
23311 ac_cv_type_socklen_t=yes
23312else
23313 echo "$as_me: failed program was:" >&5
23314sed 's/^/| /' conftest.$ac_ext >&5
23315
23316 ac_cv_type_socklen_t=no
23317fi
23318
23319rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23320fi
23321{ echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
23322echo "${ECHO_T}$ac_cv_type_socklen_t" >&6; }
23323if test $ac_cv_type_socklen_t = yes; then
23324 :
23325else 12180else
23326 12181
23327 { echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5 12182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
23328echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6; } 12183$as_echo_n "checking for socklen_t equivalent... " >&6; }
23329 if test "${curl_cv_socklen_t_equiv+set}" = set; then 12184 if ${curl_cv_socklen_t_equiv+:} false; then :
23330 echo $ECHO_N "(cached) $ECHO_C" >&6 12185 $as_echo_n "(cached) " >&6
23331else 12186else
23332 12187
23333 # Systems have either "struct sockaddr *" or 12188 # Systems have either "struct sockaddr *" or
@@ -23335,11 +12190,7 @@ else
23335 curl_cv_socklen_t_equiv= 12190 curl_cv_socklen_t_equiv=
23336 for arg2 in "struct sockaddr" void; do 12191 for arg2 in "struct sockaddr" void; do
23337 for t in int size_t unsigned long "unsigned long"; do 12192 for t in int size_t unsigned long "unsigned long"; do
23338 cat >conftest.$ac_ext <<_ACEOF 12193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23339/* confdefs.h. */
23340_ACEOF
23341cat confdefs.h >>conftest.$ac_ext
23342cat >>conftest.$ac_ext <<_ACEOF
23343/* end confdefs.h. */ 12194/* end confdefs.h. */
23344 12195
23345 #include <sys/types.h> 12196 #include <sys/types.h>
@@ -23358,48 +12209,24 @@ main ()
23358 return 0; 12209 return 0;
23359} 12210}
23360_ACEOF 12211_ACEOF
23361rm -f conftest.$ac_objext 12212if ac_fn_c_try_compile "$LINENO"; then :
23362if { (ac_try="$ac_compile"
23363case "(($ac_try" in
23364 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23365 *) ac_try_echo=$ac_try;;
23366esac
23367eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23368 (eval "$ac_compile") 2>conftest.er1
23369 ac_status=$?
23370 grep -v '^ *+' conftest.er1 >conftest.err
23371 rm -f conftest.er1
23372 cat conftest.err >&5
23373 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23374 (exit $ac_status); } && {
23375 test -z "$ac_c_werror_flag" ||
23376 test ! -s conftest.err
23377 } && test -s conftest.$ac_objext; then
23378 12213
23379 curl_cv_socklen_t_equiv="$t" 12214 curl_cv_socklen_t_equiv="$t"
23380 break 12215 break
23381 12216
23382else
23383 echo "$as_me: failed program was:" >&5
23384sed 's/^/| /' conftest.$ac_ext >&5
23385
23386
23387fi 12217fi
23388
23389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12218rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23390 done 12219 done
23391 done 12220 done
23392 12221
23393 if test "x$curl_cv_socklen_t_equiv" = x; then 12222 if test "x$curl_cv_socklen_t_equiv" = x; then
23394 { { echo "$as_me:$LINENO: error: Cannot find a type to use in place of socklen_t" >&5 12223 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5
23395echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;}
23396 { (exit 1); exit 1; }; }
23397 fi 12224 fi
23398 12225
23399fi 12226fi
23400 12227
23401 { echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5 12228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $curl_cv_socklen_t_equiv" >&5
23402echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6; } 12229$as_echo "$curl_cv_socklen_t_equiv" >&6; }
23403 12230
23404cat >>confdefs.h <<_ACEOF 12231cat >>confdefs.h <<_ACEOF
23405#define socklen_t $curl_cv_socklen_t_equiv 12232#define socklen_t $curl_cv_socklen_t_equiv
@@ -23409,61 +12236,9 @@ fi
23409 12236
23410 12237
23411 12238
23412{ echo "$as_me:$LINENO: checking for sig_atomic_t" >&5 12239ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
23413echo $ECHO_N "checking for sig_atomic_t... $ECHO_C" >&6; } 12240"
23414if test "${ac_cv_type_sig_atomic_t+set}" = set; then 12241if test "x$ac_cv_type_sig_atomic_t" = xyes; then :
23415 echo $ECHO_N "(cached) $ECHO_C" >&6
23416else
23417 cat >conftest.$ac_ext <<_ACEOF
23418/* confdefs.h. */
23419_ACEOF
23420cat confdefs.h >>conftest.$ac_ext
23421cat >>conftest.$ac_ext <<_ACEOF
23422/* end confdefs.h. */
23423#include <signal.h>
23424
23425typedef sig_atomic_t ac__type_new_;
23426int
23427main ()
23428{
23429if ((ac__type_new_ *) 0)
23430 return 0;
23431if (sizeof (ac__type_new_))
23432 return 0;
23433 ;
23434 return 0;
23435}
23436_ACEOF
23437rm -f conftest.$ac_objext
23438if { (ac_try="$ac_compile"
23439case "(($ac_try" in
23440 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23441 *) ac_try_echo=$ac_try;;
23442esac
23443eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23444 (eval "$ac_compile") 2>conftest.er1
23445 ac_status=$?
23446 grep -v '^ *+' conftest.er1 >conftest.err
23447 rm -f conftest.er1
23448 cat conftest.err >&5
23449 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23450 (exit $ac_status); } && {
23451 test -z "$ac_c_werror_flag" ||
23452 test ! -s conftest.err
23453 } && test -s conftest.$ac_objext; then
23454 ac_cv_type_sig_atomic_t=yes
23455else
23456 echo "$as_me: failed program was:" >&5
23457sed 's/^/| /' conftest.$ac_ext >&5
23458
23459 ac_cv_type_sig_atomic_t=no
23460fi
23461
23462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23463fi
23464{ echo "$as_me:$LINENO: result: $ac_cv_type_sig_atomic_t" >&5
23465echo "${ECHO_T}$ac_cv_type_sig_atomic_t" >&6; }
23466if test $ac_cv_type_sig_atomic_t = yes; then
23467 12242
23468cat >>confdefs.h <<_ACEOF 12243cat >>confdefs.h <<_ACEOF
23469#define HAVE_SIG_ATOMIC_T 1 12244#define HAVE_SIG_ATOMIC_T 1
@@ -23472,18 +12247,7 @@ _ACEOF
23472 12247
23473fi 12248fi
23474 12249
23475{ echo "$as_me:$LINENO: checking for fsblkcnt_t" >&5 12250ac_fn_c_check_type "$LINENO" "fsblkcnt_t" "ac_cv_type_fsblkcnt_t" "
23476echo $ECHO_N "checking for fsblkcnt_t... $ECHO_C" >&6; }
23477if test "${ac_cv_type_fsblkcnt_t+set}" = set; then
23478 echo $ECHO_N "(cached) $ECHO_C" >&6
23479else
23480 cat >conftest.$ac_ext <<_ACEOF
23481/* confdefs.h. */
23482_ACEOF
23483cat confdefs.h >>conftest.$ac_ext
23484cat >>conftest.$ac_ext <<_ACEOF
23485/* end confdefs.h. */
23486
23487#include <sys/types.h> 12251#include <sys/types.h>
23488#ifdef HAVE_SYS_BITYPES_H 12252#ifdef HAVE_SYS_BITYPES_H
23489#include <sys/bitypes.h> 12253#include <sys/bitypes.h>
@@ -23495,49 +12259,8 @@ cat >>conftest.$ac_ext <<_ACEOF
23495#include <sys/statvfs.h> 12259#include <sys/statvfs.h>
23496#endif 12260#endif
23497 12261
23498 12262"
23499typedef fsblkcnt_t ac__type_new_; 12263if test "x$ac_cv_type_fsblkcnt_t" = xyes; then :
23500int
23501main ()
23502{
23503if ((ac__type_new_ *) 0)
23504 return 0;
23505if (sizeof (ac__type_new_))
23506 return 0;
23507 ;
23508 return 0;
23509}
23510_ACEOF
23511rm -f conftest.$ac_objext
23512if { (ac_try="$ac_compile"
23513case "(($ac_try" in
23514 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23515 *) ac_try_echo=$ac_try;;
23516esac
23517eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23518 (eval "$ac_compile") 2>conftest.er1
23519 ac_status=$?
23520 grep -v '^ *+' conftest.er1 >conftest.err
23521 rm -f conftest.er1
23522 cat conftest.err >&5
23523 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23524 (exit $ac_status); } && {
23525 test -z "$ac_c_werror_flag" ||
23526 test ! -s conftest.err
23527 } && test -s conftest.$ac_objext; then
23528 ac_cv_type_fsblkcnt_t=yes
23529else
23530 echo "$as_me: failed program was:" >&5
23531sed 's/^/| /' conftest.$ac_ext >&5
23532
23533 ac_cv_type_fsblkcnt_t=no
23534fi
23535
23536rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23537fi
23538{ echo "$as_me:$LINENO: result: $ac_cv_type_fsblkcnt_t" >&5
23539echo "${ECHO_T}$ac_cv_type_fsblkcnt_t" >&6; }
23540if test $ac_cv_type_fsblkcnt_t = yes; then
23541 12264
23542cat >>confdefs.h <<_ACEOF 12265cat >>confdefs.h <<_ACEOF
23543#define HAVE_FSBLKCNT_T 1 12266#define HAVE_FSBLKCNT_T 1
@@ -23545,18 +12268,7 @@ _ACEOF
23545 12268
23546 12269
23547fi 12270fi
23548{ echo "$as_me:$LINENO: checking for fsfilcnt_t" >&5 12271ac_fn_c_check_type "$LINENO" "fsfilcnt_t" "ac_cv_type_fsfilcnt_t" "
23549echo $ECHO_N "checking for fsfilcnt_t... $ECHO_C" >&6; }
23550if test "${ac_cv_type_fsfilcnt_t+set}" = set; then
23551 echo $ECHO_N "(cached) $ECHO_C" >&6
23552else
23553 cat >conftest.$ac_ext <<_ACEOF
23554/* confdefs.h. */
23555_ACEOF
23556cat confdefs.h >>conftest.$ac_ext
23557cat >>conftest.$ac_ext <<_ACEOF
23558/* end confdefs.h. */
23559
23560#include <sys/types.h> 12272#include <sys/types.h>
23561#ifdef HAVE_SYS_BITYPES_H 12273#ifdef HAVE_SYS_BITYPES_H
23562#include <sys/bitypes.h> 12274#include <sys/bitypes.h>
@@ -23568,49 +12280,8 @@ cat >>conftest.$ac_ext <<_ACEOF
23568#include <sys/statvfs.h> 12280#include <sys/statvfs.h>
23569#endif 12281#endif
23570 12282
23571 12283"
23572typedef fsfilcnt_t ac__type_new_; 12284if test "x$ac_cv_type_fsfilcnt_t" = xyes; then :
23573int
23574main ()
23575{
23576if ((ac__type_new_ *) 0)
23577 return 0;
23578if (sizeof (ac__type_new_))
23579 return 0;
23580 ;
23581 return 0;
23582}
23583_ACEOF
23584rm -f conftest.$ac_objext
23585if { (ac_try="$ac_compile"
23586case "(($ac_try" in
23587 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23588 *) ac_try_echo=$ac_try;;
23589esac
23590eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23591 (eval "$ac_compile") 2>conftest.er1
23592 ac_status=$?
23593 grep -v '^ *+' conftest.er1 >conftest.err
23594 rm -f conftest.er1
23595 cat conftest.err >&5
23596 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23597 (exit $ac_status); } && {
23598 test -z "$ac_c_werror_flag" ||
23599 test ! -s conftest.err
23600 } && test -s conftest.$ac_objext; then
23601 ac_cv_type_fsfilcnt_t=yes
23602else
23603 echo "$as_me: failed program was:" >&5
23604sed 's/^/| /' conftest.$ac_ext >&5
23605
23606 ac_cv_type_fsfilcnt_t=no
23607fi
23608
23609rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23610fi
23611{ echo "$as_me:$LINENO: result: $ac_cv_type_fsfilcnt_t" >&5
23612echo "${ECHO_T}$ac_cv_type_fsfilcnt_t" >&6; }
23613if test $ac_cv_type_fsfilcnt_t = yes; then
23614 12285
23615cat >>confdefs.h <<_ACEOF 12286cat >>confdefs.h <<_ACEOF
23616#define HAVE_FSFILCNT_T 1 12287#define HAVE_FSFILCNT_T 1
@@ -23620,62 +12291,10 @@ _ACEOF
23620fi 12291fi
23621 12292
23622 12293
23623{ echo "$as_me:$LINENO: checking for in_addr_t" >&5 12294ac_fn_c_check_type "$LINENO" "in_addr_t" "ac_cv_type_in_addr_t" "#include <sys/types.h>
23624echo $ECHO_N "checking for in_addr_t... $ECHO_C" >&6; }
23625if test "${ac_cv_type_in_addr_t+set}" = set; then
23626 echo $ECHO_N "(cached) $ECHO_C" >&6
23627else
23628 cat >conftest.$ac_ext <<_ACEOF
23629/* confdefs.h. */
23630_ACEOF
23631cat confdefs.h >>conftest.$ac_ext
23632cat >>conftest.$ac_ext <<_ACEOF
23633/* end confdefs.h. */
23634#include <sys/types.h>
23635#include <netinet/in.h> 12295#include <netinet/in.h>
23636 12296"
23637typedef in_addr_t ac__type_new_; 12297if test "x$ac_cv_type_in_addr_t" = xyes; then :
23638int
23639main ()
23640{
23641if ((ac__type_new_ *) 0)
23642 return 0;
23643if (sizeof (ac__type_new_))
23644 return 0;
23645 ;
23646 return 0;
23647}
23648_ACEOF
23649rm -f conftest.$ac_objext
23650if { (ac_try="$ac_compile"
23651case "(($ac_try" in
23652 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23653 *) ac_try_echo=$ac_try;;
23654esac
23655eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23656 (eval "$ac_compile") 2>conftest.er1
23657 ac_status=$?
23658 grep -v '^ *+' conftest.er1 >conftest.err
23659 rm -f conftest.er1
23660 cat conftest.err >&5
23661 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23662 (exit $ac_status); } && {
23663 test -z "$ac_c_werror_flag" ||
23664 test ! -s conftest.err
23665 } && test -s conftest.$ac_objext; then
23666 ac_cv_type_in_addr_t=yes
23667else
23668 echo "$as_me: failed program was:" >&5
23669sed 's/^/| /' conftest.$ac_ext >&5
23670
23671 ac_cv_type_in_addr_t=no
23672fi
23673
23674rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23675fi
23676{ echo "$as_me:$LINENO: result: $ac_cv_type_in_addr_t" >&5
23677echo "${ECHO_T}$ac_cv_type_in_addr_t" >&6; }
23678if test $ac_cv_type_in_addr_t = yes; then
23679 12298
23680cat >>confdefs.h <<_ACEOF 12299cat >>confdefs.h <<_ACEOF
23681#define HAVE_IN_ADDR_T 1 12300#define HAVE_IN_ADDR_T 1
@@ -23683,62 +12302,10 @@ _ACEOF
23683 12302
23684 12303
23685fi 12304fi
23686{ echo "$as_me:$LINENO: checking for in_port_t" >&5 12305ac_fn_c_check_type "$LINENO" "in_port_t" "ac_cv_type_in_port_t" "#include <sys/types.h>
23687echo $ECHO_N "checking for in_port_t... $ECHO_C" >&6; }
23688if test "${ac_cv_type_in_port_t+set}" = set; then
23689 echo $ECHO_N "(cached) $ECHO_C" >&6
23690else
23691 cat >conftest.$ac_ext <<_ACEOF
23692/* confdefs.h. */
23693_ACEOF
23694cat confdefs.h >>conftest.$ac_ext
23695cat >>conftest.$ac_ext <<_ACEOF
23696/* end confdefs.h. */
23697#include <sys/types.h>
23698#include <netinet/in.h> 12306#include <netinet/in.h>
23699 12307"
23700typedef in_port_t ac__type_new_; 12308if test "x$ac_cv_type_in_port_t" = xyes; then :
23701int
23702main ()
23703{
23704if ((ac__type_new_ *) 0)
23705 return 0;
23706if (sizeof (ac__type_new_))
23707 return 0;
23708 ;
23709 return 0;
23710}
23711_ACEOF
23712rm -f conftest.$ac_objext
23713if { (ac_try="$ac_compile"
23714case "(($ac_try" in
23715 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23716 *) ac_try_echo=$ac_try;;
23717esac
23718eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23719 (eval "$ac_compile") 2>conftest.er1
23720 ac_status=$?
23721 grep -v '^ *+' conftest.er1 >conftest.err
23722 rm -f conftest.er1
23723 cat conftest.err >&5
23724 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23725 (exit $ac_status); } && {
23726 test -z "$ac_c_werror_flag" ||
23727 test ! -s conftest.err
23728 } && test -s conftest.$ac_objext; then
23729 ac_cv_type_in_port_t=yes
23730else
23731 echo "$as_me: failed program was:" >&5
23732sed 's/^/| /' conftest.$ac_ext >&5
23733
23734 ac_cv_type_in_port_t=no
23735fi
23736
23737rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23738fi
23739{ echo "$as_me:$LINENO: result: $ac_cv_type_in_port_t" >&5
23740echo "${ECHO_T}$ac_cv_type_in_port_t" >&6; }
23741if test $ac_cv_type_in_port_t = yes; then
23742 12309
23743cat >>confdefs.h <<_ACEOF 12310cat >>confdefs.h <<_ACEOF
23744#define HAVE_IN_PORT_T 1 12311#define HAVE_IN_PORT_T 1
@@ -23748,21 +12315,15 @@ _ACEOF
23748fi 12315fi
23749 12316
23750 12317
23751{ echo "$as_me:$LINENO: checking for size_t" >&5 12318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for size_t" >&5
23752echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } 12319$as_echo_n "checking for size_t... " >&6; }
23753if test "${ac_cv_have_size_t+set}" = set; then 12320if ${ac_cv_have_size_t+:} false; then :
23754 echo $ECHO_N "(cached) $ECHO_C" >&6 12321 $as_echo_n "(cached) " >&6
23755else 12322else
23756 12323
23757 cat >conftest.$ac_ext <<_ACEOF 12324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23758/* confdefs.h. */
23759_ACEOF
23760cat confdefs.h >>conftest.$ac_ext
23761cat >>conftest.$ac_ext <<_ACEOF
23762/* end confdefs.h. */ 12325/* end confdefs.h. */
23763 12326 #include <sys/types.h>
23764#include <sys/types.h>
23765
23766int 12327int
23767main () 12328main ()
23768{ 12329{
@@ -23771,60 +12332,32 @@ main ()
23771 return 0; 12332 return 0;
23772} 12333}
23773_ACEOF 12334_ACEOF
23774rm -f conftest.$ac_objext 12335if ac_fn_c_try_compile "$LINENO"; then :
23775if { (ac_try="$ac_compile"
23776case "(($ac_try" in
23777 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23778 *) ac_try_echo=$ac_try;;
23779esac
23780eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23781 (eval "$ac_compile") 2>conftest.er1
23782 ac_status=$?
23783 grep -v '^ *+' conftest.er1 >conftest.err
23784 rm -f conftest.er1
23785 cat conftest.err >&5
23786 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23787 (exit $ac_status); } && {
23788 test -z "$ac_c_werror_flag" ||
23789 test ! -s conftest.err
23790 } && test -s conftest.$ac_objext; then
23791 ac_cv_have_size_t="yes" 12336 ac_cv_have_size_t="yes"
23792else 12337else
23793 echo "$as_me: failed program was:" >&5 12338 ac_cv_have_size_t="no"
23794sed 's/^/| /' conftest.$ac_ext >&5
23795
23796 ac_cv_have_size_t="no"
23797 12339
23798fi 12340fi
23799
23800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12341rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23801 12342
23802fi 12343fi
23803{ echo "$as_me:$LINENO: result: $ac_cv_have_size_t" >&5 12344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_size_t" >&5
23804echo "${ECHO_T}$ac_cv_have_size_t" >&6; } 12345$as_echo "$ac_cv_have_size_t" >&6; }
23805if test "x$ac_cv_have_size_t" = "xyes" ; then 12346if test "x$ac_cv_have_size_t" = "xyes" ; then
23806 12347
23807cat >>confdefs.h <<\_ACEOF 12348$as_echo "#define HAVE_SIZE_T 1" >>confdefs.h
23808#define HAVE_SIZE_T 1
23809_ACEOF
23810 12349
23811fi 12350fi
23812 12351
23813{ echo "$as_me:$LINENO: checking for ssize_t" >&5 12352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
23814echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6; } 12353$as_echo_n "checking for ssize_t... " >&6; }
23815if test "${ac_cv_have_ssize_t+set}" = set; then 12354if ${ac_cv_have_ssize_t+:} false; then :
23816 echo $ECHO_N "(cached) $ECHO_C" >&6 12355 $as_echo_n "(cached) " >&6
23817else 12356else
23818 12357
23819 cat >conftest.$ac_ext <<_ACEOF 12358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23820/* confdefs.h. */
23821_ACEOF
23822cat confdefs.h >>conftest.$ac_ext
23823cat >>conftest.$ac_ext <<_ACEOF
23824/* end confdefs.h. */ 12359/* end confdefs.h. */
23825 12360 #include <sys/types.h>
23826#include <sys/types.h>
23827
23828int 12361int
23829main () 12362main ()
23830{ 12363{
@@ -23833,60 +12366,32 @@ main ()
23833 return 0; 12366 return 0;
23834} 12367}
23835_ACEOF 12368_ACEOF
23836rm -f conftest.$ac_objext 12369if ac_fn_c_try_compile "$LINENO"; then :
23837if { (ac_try="$ac_compile"
23838case "(($ac_try" in
23839 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23840 *) ac_try_echo=$ac_try;;
23841esac
23842eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23843 (eval "$ac_compile") 2>conftest.er1
23844 ac_status=$?
23845 grep -v '^ *+' conftest.er1 >conftest.err
23846 rm -f conftest.er1
23847 cat conftest.err >&5
23848 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23849 (exit $ac_status); } && {
23850 test -z "$ac_c_werror_flag" ||
23851 test ! -s conftest.err
23852 } && test -s conftest.$ac_objext; then
23853 ac_cv_have_ssize_t="yes" 12370 ac_cv_have_ssize_t="yes"
23854else 12371else
23855 echo "$as_me: failed program was:" >&5 12372 ac_cv_have_ssize_t="no"
23856sed 's/^/| /' conftest.$ac_ext >&5
23857
23858 ac_cv_have_ssize_t="no"
23859 12373
23860fi 12374fi
23861
23862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23863 12376
23864fi 12377fi
23865{ echo "$as_me:$LINENO: result: $ac_cv_have_ssize_t" >&5 12378{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ssize_t" >&5
23866echo "${ECHO_T}$ac_cv_have_ssize_t" >&6; } 12379$as_echo "$ac_cv_have_ssize_t" >&6; }
23867if test "x$ac_cv_have_ssize_t" = "xyes" ; then 12380if test "x$ac_cv_have_ssize_t" = "xyes" ; then
23868 12381
23869cat >>confdefs.h <<\_ACEOF 12382$as_echo "#define HAVE_SSIZE_T 1" >>confdefs.h
23870#define HAVE_SSIZE_T 1
23871_ACEOF
23872 12383
23873fi 12384fi
23874 12385
23875{ echo "$as_me:$LINENO: checking for clock_t" >&5 12386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5
23876echo $ECHO_N "checking for clock_t... $ECHO_C" >&6; } 12387$as_echo_n "checking for clock_t... " >&6; }
23877if test "${ac_cv_have_clock_t+set}" = set; then 12388if ${ac_cv_have_clock_t+:} false; then :
23878 echo $ECHO_N "(cached) $ECHO_C" >&6 12389 $as_echo_n "(cached) " >&6
23879else 12390else
23880 12391
23881 cat >conftest.$ac_ext <<_ACEOF 12392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23882/* confdefs.h. */
23883_ACEOF
23884cat confdefs.h >>conftest.$ac_ext
23885cat >>conftest.$ac_ext <<_ACEOF
23886/* end confdefs.h. */ 12393/* end confdefs.h. */
23887 12394 #include <time.h>
23888#include <time.h>
23889
23890int 12395int
23891main () 12396main ()
23892{ 12397{
@@ -23895,56 +12400,30 @@ main ()
23895 return 0; 12400 return 0;
23896} 12401}
23897_ACEOF 12402_ACEOF
23898rm -f conftest.$ac_objext 12403if ac_fn_c_try_compile "$LINENO"; then :
23899if { (ac_try="$ac_compile"
23900case "(($ac_try" in
23901 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23902 *) ac_try_echo=$ac_try;;
23903esac
23904eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23905 (eval "$ac_compile") 2>conftest.er1
23906 ac_status=$?
23907 grep -v '^ *+' conftest.er1 >conftest.err
23908 rm -f conftest.er1
23909 cat conftest.err >&5
23910 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23911 (exit $ac_status); } && {
23912 test -z "$ac_c_werror_flag" ||
23913 test ! -s conftest.err
23914 } && test -s conftest.$ac_objext; then
23915 ac_cv_have_clock_t="yes" 12404 ac_cv_have_clock_t="yes"
23916else 12405else
23917 echo "$as_me: failed program was:" >&5 12406 ac_cv_have_clock_t="no"
23918sed 's/^/| /' conftest.$ac_ext >&5
23919
23920 ac_cv_have_clock_t="no"
23921 12407
23922fi 12408fi
23923
23924rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
23925 12410
23926fi 12411fi
23927{ echo "$as_me:$LINENO: result: $ac_cv_have_clock_t" >&5 12412{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_clock_t" >&5
23928echo "${ECHO_T}$ac_cv_have_clock_t" >&6; } 12413$as_echo "$ac_cv_have_clock_t" >&6; }
23929if test "x$ac_cv_have_clock_t" = "xyes" ; then 12414if test "x$ac_cv_have_clock_t" = "xyes" ; then
23930 12415
23931cat >>confdefs.h <<\_ACEOF 12416$as_echo "#define HAVE_CLOCK_T 1" >>confdefs.h
23932#define HAVE_CLOCK_T 1
23933_ACEOF
23934 12417
23935fi 12418fi
23936 12419
23937{ echo "$as_me:$LINENO: checking for sa_family_t" >&5 12420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sa_family_t" >&5
23938echo $ECHO_N "checking for sa_family_t... $ECHO_C" >&6; } 12421$as_echo_n "checking for sa_family_t... " >&6; }
23939if test "${ac_cv_have_sa_family_t+set}" = set; then 12422if ${ac_cv_have_sa_family_t+:} false; then :
23940 echo $ECHO_N "(cached) $ECHO_C" >&6 12423 $as_echo_n "(cached) " >&6
23941else 12424else
23942 12425
23943 cat >conftest.$ac_ext <<_ACEOF 12426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23944/* confdefs.h. */
23945_ACEOF
23946cat confdefs.h >>conftest.$ac_ext
23947cat >>conftest.$ac_ext <<_ACEOF
23948/* end confdefs.h. */ 12427/* end confdefs.h. */
23949 12428
23950#include <sys/types.h> 12429#include <sys/types.h>
@@ -23958,33 +12437,10 @@ main ()
23958 return 0; 12437 return 0;
23959} 12438}
23960_ACEOF 12439_ACEOF
23961rm -f conftest.$ac_objext 12440if ac_fn_c_try_compile "$LINENO"; then :
23962if { (ac_try="$ac_compile"
23963case "(($ac_try" in
23964 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
23965 *) ac_try_echo=$ac_try;;
23966esac
23967eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
23968 (eval "$ac_compile") 2>conftest.er1
23969 ac_status=$?
23970 grep -v '^ *+' conftest.er1 >conftest.err
23971 rm -f conftest.er1
23972 cat conftest.err >&5
23973 echo "$as_me:$LINENO: \$? = $ac_status" >&5
23974 (exit $ac_status); } && {
23975 test -z "$ac_c_werror_flag" ||
23976 test ! -s conftest.err
23977 } && test -s conftest.$ac_objext; then
23978 ac_cv_have_sa_family_t="yes" 12441 ac_cv_have_sa_family_t="yes"
23979else 12442else
23980 echo "$as_me: failed program was:" >&5 12443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23981sed 's/^/| /' conftest.$ac_ext >&5
23982
23983 cat >conftest.$ac_ext <<_ACEOF
23984/* confdefs.h. */
23985_ACEOF
23986cat confdefs.h >>conftest.$ac_ext
23987cat >>conftest.$ac_ext <<_ACEOF
23988/* end confdefs.h. */ 12444/* end confdefs.h. */
23989 12445
23990#include <sys/types.h> 12446#include <sys/types.h>
@@ -23999,64 +12455,35 @@ main ()
23999 return 0; 12455 return 0;
24000} 12456}
24001_ACEOF 12457_ACEOF
24002rm -f conftest.$ac_objext 12458if ac_fn_c_try_compile "$LINENO"; then :
24003if { (ac_try="$ac_compile"
24004case "(($ac_try" in
24005 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24006 *) ac_try_echo=$ac_try;;
24007esac
24008eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24009 (eval "$ac_compile") 2>conftest.er1
24010 ac_status=$?
24011 grep -v '^ *+' conftest.er1 >conftest.err
24012 rm -f conftest.er1
24013 cat conftest.err >&5
24014 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24015 (exit $ac_status); } && {
24016 test -z "$ac_c_werror_flag" ||
24017 test ! -s conftest.err
24018 } && test -s conftest.$ac_objext; then
24019 ac_cv_have_sa_family_t="yes" 12459 ac_cv_have_sa_family_t="yes"
24020else 12460else
24021 echo "$as_me: failed program was:" >&5 12461 ac_cv_have_sa_family_t="no"
24022sed 's/^/| /' conftest.$ac_ext >&5
24023
24024 ac_cv_have_sa_family_t="no"
24025 12462
24026fi 12463fi
24027
24028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24029 12465
24030fi 12466fi
24031
24032rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24033 12468
24034fi 12469fi
24035{ echo "$as_me:$LINENO: result: $ac_cv_have_sa_family_t" >&5 12470{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sa_family_t" >&5
24036echo "${ECHO_T}$ac_cv_have_sa_family_t" >&6; } 12471$as_echo "$ac_cv_have_sa_family_t" >&6; }
24037if test "x$ac_cv_have_sa_family_t" = "xyes" ; then 12472if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
24038 12473
24039cat >>confdefs.h <<\_ACEOF 12474$as_echo "#define HAVE_SA_FAMILY_T 1" >>confdefs.h
24040#define HAVE_SA_FAMILY_T 1
24041_ACEOF
24042 12475
24043fi 12476fi
24044 12477
24045{ echo "$as_me:$LINENO: checking for pid_t" >&5 12478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pid_t" >&5
24046echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } 12479$as_echo_n "checking for pid_t... " >&6; }
24047if test "${ac_cv_have_pid_t+set}" = set; then 12480if ${ac_cv_have_pid_t+:} false; then :
24048 echo $ECHO_N "(cached) $ECHO_C" >&6 12481 $as_echo_n "(cached) " >&6
24049else 12482else
24050 12483
24051 cat >conftest.$ac_ext <<_ACEOF 12484 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24052/* confdefs.h. */
24053_ACEOF
24054cat confdefs.h >>conftest.$ac_ext
24055cat >>conftest.$ac_ext <<_ACEOF
24056/* end confdefs.h. */ 12485/* end confdefs.h. */
24057 12486 #include <sys/types.h>
24058#include <sys/types.h>
24059
24060int 12487int
24061main () 12488main ()
24062{ 12489{
@@ -24065,60 +12492,32 @@ main ()
24065 return 0; 12492 return 0;
24066} 12493}
24067_ACEOF 12494_ACEOF
24068rm -f conftest.$ac_objext 12495if ac_fn_c_try_compile "$LINENO"; then :
24069if { (ac_try="$ac_compile"
24070case "(($ac_try" in
24071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24072 *) ac_try_echo=$ac_try;;
24073esac
24074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24075 (eval "$ac_compile") 2>conftest.er1
24076 ac_status=$?
24077 grep -v '^ *+' conftest.er1 >conftest.err
24078 rm -f conftest.er1
24079 cat conftest.err >&5
24080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24081 (exit $ac_status); } && {
24082 test -z "$ac_c_werror_flag" ||
24083 test ! -s conftest.err
24084 } && test -s conftest.$ac_objext; then
24085 ac_cv_have_pid_t="yes" 12496 ac_cv_have_pid_t="yes"
24086else 12497else
24087 echo "$as_me: failed program was:" >&5 12498 ac_cv_have_pid_t="no"
24088sed 's/^/| /' conftest.$ac_ext >&5
24089
24090 ac_cv_have_pid_t="no"
24091 12499
24092fi 12500fi
24093
24094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12501rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24095 12502
24096fi 12503fi
24097{ echo "$as_me:$LINENO: result: $ac_cv_have_pid_t" >&5 12504{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pid_t" >&5
24098echo "${ECHO_T}$ac_cv_have_pid_t" >&6; } 12505$as_echo "$ac_cv_have_pid_t" >&6; }
24099if test "x$ac_cv_have_pid_t" = "xyes" ; then 12506if test "x$ac_cv_have_pid_t" = "xyes" ; then
24100 12507
24101cat >>confdefs.h <<\_ACEOF 12508$as_echo "#define HAVE_PID_T 1" >>confdefs.h
24102#define HAVE_PID_T 1
24103_ACEOF
24104 12509
24105fi 12510fi
24106 12511
24107{ echo "$as_me:$LINENO: checking for mode_t" >&5 12512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for mode_t" >&5
24108echo $ECHO_N "checking for mode_t... $ECHO_C" >&6; } 12513$as_echo_n "checking for mode_t... " >&6; }
24109if test "${ac_cv_have_mode_t+set}" = set; then 12514if ${ac_cv_have_mode_t+:} false; then :
24110 echo $ECHO_N "(cached) $ECHO_C" >&6 12515 $as_echo_n "(cached) " >&6
24111else 12516else
24112 12517
24113 cat >conftest.$ac_ext <<_ACEOF 12518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24114/* confdefs.h. */
24115_ACEOF
24116cat confdefs.h >>conftest.$ac_ext
24117cat >>conftest.$ac_ext <<_ACEOF
24118/* end confdefs.h. */ 12519/* end confdefs.h. */
24119 12520 #include <sys/types.h>
24120#include <sys/types.h>
24121
24122int 12521int
24123main () 12522main ()
24124{ 12523{
@@ -24127,57 +12526,31 @@ main ()
24127 return 0; 12526 return 0;
24128} 12527}
24129_ACEOF 12528_ACEOF
24130rm -f conftest.$ac_objext 12529if ac_fn_c_try_compile "$LINENO"; then :
24131if { (ac_try="$ac_compile"
24132case "(($ac_try" in
24133 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24134 *) ac_try_echo=$ac_try;;
24135esac
24136eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24137 (eval "$ac_compile") 2>conftest.er1
24138 ac_status=$?
24139 grep -v '^ *+' conftest.er1 >conftest.err
24140 rm -f conftest.er1
24141 cat conftest.err >&5
24142 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24143 (exit $ac_status); } && {
24144 test -z "$ac_c_werror_flag" ||
24145 test ! -s conftest.err
24146 } && test -s conftest.$ac_objext; then
24147 ac_cv_have_mode_t="yes" 12530 ac_cv_have_mode_t="yes"
24148else 12531else
24149 echo "$as_me: failed program was:" >&5 12532 ac_cv_have_mode_t="no"
24150sed 's/^/| /' conftest.$ac_ext >&5
24151
24152 ac_cv_have_mode_t="no"
24153 12533
24154fi 12534fi
24155
24156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12535rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24157 12536
24158fi 12537fi
24159{ echo "$as_me:$LINENO: result: $ac_cv_have_mode_t" >&5 12538{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_mode_t" >&5
24160echo "${ECHO_T}$ac_cv_have_mode_t" >&6; } 12539$as_echo "$ac_cv_have_mode_t" >&6; }
24161if test "x$ac_cv_have_mode_t" = "xyes" ; then 12540if test "x$ac_cv_have_mode_t" = "xyes" ; then
24162 12541
24163cat >>confdefs.h <<\_ACEOF 12542$as_echo "#define HAVE_MODE_T 1" >>confdefs.h
24164#define HAVE_MODE_T 1
24165_ACEOF
24166 12543
24167fi 12544fi
24168 12545
24169 12546
24170{ echo "$as_me:$LINENO: checking for struct sockaddr_storage" >&5 12547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_storage" >&5
24171echo $ECHO_N "checking for struct sockaddr_storage... $ECHO_C" >&6; } 12548$as_echo_n "checking for struct sockaddr_storage... " >&6; }
24172if test "${ac_cv_have_struct_sockaddr_storage+set}" = set; then 12549if ${ac_cv_have_struct_sockaddr_storage+:} false; then :
24173 echo $ECHO_N "(cached) $ECHO_C" >&6 12550 $as_echo_n "(cached) " >&6
24174else 12551else
24175 12552
24176 cat >conftest.$ac_ext <<_ACEOF 12553 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24177/* confdefs.h. */
24178_ACEOF
24179cat confdefs.h >>conftest.$ac_ext
24180cat >>conftest.$ac_ext <<_ACEOF
24181/* end confdefs.h. */ 12554/* end confdefs.h. */
24182 12555
24183#include <sys/types.h> 12556#include <sys/types.h>
@@ -24191,56 +12564,30 @@ main ()
24191 return 0; 12564 return 0;
24192} 12565}
24193_ACEOF 12566_ACEOF
24194rm -f conftest.$ac_objext 12567if ac_fn_c_try_compile "$LINENO"; then :
24195if { (ac_try="$ac_compile"
24196case "(($ac_try" in
24197 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24198 *) ac_try_echo=$ac_try;;
24199esac
24200eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24201 (eval "$ac_compile") 2>conftest.er1
24202 ac_status=$?
24203 grep -v '^ *+' conftest.er1 >conftest.err
24204 rm -f conftest.er1
24205 cat conftest.err >&5
24206 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24207 (exit $ac_status); } && {
24208 test -z "$ac_c_werror_flag" ||
24209 test ! -s conftest.err
24210 } && test -s conftest.$ac_objext; then
24211 ac_cv_have_struct_sockaddr_storage="yes" 12568 ac_cv_have_struct_sockaddr_storage="yes"
24212else 12569else
24213 echo "$as_me: failed program was:" >&5 12570 ac_cv_have_struct_sockaddr_storage="no"
24214sed 's/^/| /' conftest.$ac_ext >&5
24215
24216 ac_cv_have_struct_sockaddr_storage="no"
24217 12571
24218fi 12572fi
24219
24220rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24221 12574
24222fi 12575fi
24223{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_storage" >&5 12576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_storage" >&5
24224echo "${ECHO_T}$ac_cv_have_struct_sockaddr_storage" >&6; } 12577$as_echo "$ac_cv_have_struct_sockaddr_storage" >&6; }
24225if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then 12578if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
24226 12579
24227cat >>confdefs.h <<\_ACEOF 12580$as_echo "#define HAVE_STRUCT_SOCKADDR_STORAGE 1" >>confdefs.h
24228#define HAVE_STRUCT_SOCKADDR_STORAGE 1
24229_ACEOF
24230 12581
24231fi 12582fi
24232 12583
24233{ echo "$as_me:$LINENO: checking for struct sockaddr_in6" >&5 12584{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct sockaddr_in6" >&5
24234echo $ECHO_N "checking for struct sockaddr_in6... $ECHO_C" >&6; } 12585$as_echo_n "checking for struct sockaddr_in6... " >&6; }
24235if test "${ac_cv_have_struct_sockaddr_in6+set}" = set; then 12586if ${ac_cv_have_struct_sockaddr_in6+:} false; then :
24236 echo $ECHO_N "(cached) $ECHO_C" >&6 12587 $as_echo_n "(cached) " >&6
24237else 12588else
24238 12589
24239 cat >conftest.$ac_ext <<_ACEOF 12590 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24240/* confdefs.h. */
24241_ACEOF
24242cat confdefs.h >>conftest.$ac_ext
24243cat >>conftest.$ac_ext <<_ACEOF
24244/* end confdefs.h. */ 12591/* end confdefs.h. */
24245 12592
24246#include <sys/types.h> 12593#include <sys/types.h>
@@ -24254,56 +12601,30 @@ main ()
24254 return 0; 12601 return 0;
24255} 12602}
24256_ACEOF 12603_ACEOF
24257rm -f conftest.$ac_objext 12604if ac_fn_c_try_compile "$LINENO"; then :
24258if { (ac_try="$ac_compile"
24259case "(($ac_try" in
24260 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24261 *) ac_try_echo=$ac_try;;
24262esac
24263eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24264 (eval "$ac_compile") 2>conftest.er1
24265 ac_status=$?
24266 grep -v '^ *+' conftest.er1 >conftest.err
24267 rm -f conftest.er1
24268 cat conftest.err >&5
24269 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24270 (exit $ac_status); } && {
24271 test -z "$ac_c_werror_flag" ||
24272 test ! -s conftest.err
24273 } && test -s conftest.$ac_objext; then
24274 ac_cv_have_struct_sockaddr_in6="yes" 12605 ac_cv_have_struct_sockaddr_in6="yes"
24275else 12606else
24276 echo "$as_me: failed program was:" >&5 12607 ac_cv_have_struct_sockaddr_in6="no"
24277sed 's/^/| /' conftest.$ac_ext >&5
24278
24279 ac_cv_have_struct_sockaddr_in6="no"
24280 12608
24281fi 12609fi
24282
24283rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12610rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24284 12611
24285fi 12612fi
24286{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_sockaddr_in6" >&5 12613{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_sockaddr_in6" >&5
24287echo "${ECHO_T}$ac_cv_have_struct_sockaddr_in6" >&6; } 12614$as_echo "$ac_cv_have_struct_sockaddr_in6" >&6; }
24288if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then 12615if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
24289 12616
24290cat >>confdefs.h <<\_ACEOF 12617$as_echo "#define HAVE_STRUCT_SOCKADDR_IN6 1" >>confdefs.h
24291#define HAVE_STRUCT_SOCKADDR_IN6 1
24292_ACEOF
24293 12618
24294fi 12619fi
24295 12620
24296{ echo "$as_me:$LINENO: checking for struct in6_addr" >&5 12621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct in6_addr" >&5
24297echo $ECHO_N "checking for struct in6_addr... $ECHO_C" >&6; } 12622$as_echo_n "checking for struct in6_addr... " >&6; }
24298if test "${ac_cv_have_struct_in6_addr+set}" = set; then 12623if ${ac_cv_have_struct_in6_addr+:} false; then :
24299 echo $ECHO_N "(cached) $ECHO_C" >&6 12624 $as_echo_n "(cached) " >&6
24300else 12625else
24301 12626
24302 cat >conftest.$ac_ext <<_ACEOF 12627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24303/* confdefs.h. */
24304_ACEOF
24305cat confdefs.h >>conftest.$ac_ext
24306cat >>conftest.$ac_ext <<_ACEOF
24307/* end confdefs.h. */ 12628/* end confdefs.h. */
24308 12629
24309#include <sys/types.h> 12630#include <sys/types.h>
@@ -24317,150 +12638,30 @@ main ()
24317 return 0; 12638 return 0;
24318} 12639}
24319_ACEOF 12640_ACEOF
24320rm -f conftest.$ac_objext 12641if ac_fn_c_try_compile "$LINENO"; then :
24321if { (ac_try="$ac_compile"
24322case "(($ac_try" in
24323 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24324 *) ac_try_echo=$ac_try;;
24325esac
24326eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24327 (eval "$ac_compile") 2>conftest.er1
24328 ac_status=$?
24329 grep -v '^ *+' conftest.er1 >conftest.err
24330 rm -f conftest.er1
24331 cat conftest.err >&5
24332 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24333 (exit $ac_status); } && {
24334 test -z "$ac_c_werror_flag" ||
24335 test ! -s conftest.err
24336 } && test -s conftest.$ac_objext; then
24337 ac_cv_have_struct_in6_addr="yes" 12642 ac_cv_have_struct_in6_addr="yes"
24338else 12643else
24339 echo "$as_me: failed program was:" >&5 12644 ac_cv_have_struct_in6_addr="no"
24340sed 's/^/| /' conftest.$ac_ext >&5
24341
24342 ac_cv_have_struct_in6_addr="no"
24343 12645
24344fi 12646fi
24345
24346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12647rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24347 12648
24348fi 12649fi
24349{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_in6_addr" >&5 12650{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_in6_addr" >&5
24350echo "${ECHO_T}$ac_cv_have_struct_in6_addr" >&6; } 12651$as_echo "$ac_cv_have_struct_in6_addr" >&6; }
24351if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then 12652if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
24352 12653
24353cat >>confdefs.h <<\_ACEOF 12654$as_echo "#define HAVE_STRUCT_IN6_ADDR 1" >>confdefs.h
24354#define HAVE_STRUCT_IN6_ADDR 1
24355_ACEOF
24356
24357 12655
24358 { echo "$as_me:$LINENO: checking for struct sockaddr_in6.sin6_scope_id" >&5
24359echo $ECHO_N "checking for struct sockaddr_in6.sin6_scope_id... $ECHO_C" >&6; }
24360if test "${ac_cv_member_struct_sockaddr_in6_sin6_scope_id+set}" = set; then
24361 echo $ECHO_N "(cached) $ECHO_C" >&6
24362else
24363 cat >conftest.$ac_ext <<_ACEOF
24364/* confdefs.h. */
24365_ACEOF
24366cat confdefs.h >>conftest.$ac_ext
24367cat >>conftest.$ac_ext <<_ACEOF
24368/* end confdefs.h. */
24369 12656
12657 ac_fn_c_check_member "$LINENO" "struct sockaddr_in6" "sin6_scope_id" "ac_cv_member_struct_sockaddr_in6_sin6_scope_id" "
24370#ifdef HAVE_SYS_TYPES_H 12658#ifdef HAVE_SYS_TYPES_H
24371#include <sys/types.h> 12659#include <sys/types.h>
24372#endif 12660#endif
24373#include <netinet/in.h> 12661#include <netinet/in.h>
24374 12662
24375 12663"
24376int 12664if test "x$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" = xyes; then :
24377main ()
24378{
24379static struct sockaddr_in6 ac_aggr;
24380if (ac_aggr.sin6_scope_id)
24381return 0;
24382 ;
24383 return 0;
24384}
24385_ACEOF
24386rm -f conftest.$ac_objext
24387if { (ac_try="$ac_compile"
24388case "(($ac_try" in
24389 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24390 *) ac_try_echo=$ac_try;;
24391esac
24392eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24393 (eval "$ac_compile") 2>conftest.er1
24394 ac_status=$?
24395 grep -v '^ *+' conftest.er1 >conftest.err
24396 rm -f conftest.er1
24397 cat conftest.err >&5
24398 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24399 (exit $ac_status); } && {
24400 test -z "$ac_c_werror_flag" ||
24401 test ! -s conftest.err
24402 } && test -s conftest.$ac_objext; then
24403 ac_cv_member_struct_sockaddr_in6_sin6_scope_id=yes
24404else
24405 echo "$as_me: failed program was:" >&5
24406sed 's/^/| /' conftest.$ac_ext >&5
24407
24408 cat >conftest.$ac_ext <<_ACEOF
24409/* confdefs.h. */
24410_ACEOF
24411cat confdefs.h >>conftest.$ac_ext
24412cat >>conftest.$ac_ext <<_ACEOF
24413/* end confdefs.h. */
24414
24415#ifdef HAVE_SYS_TYPES_H
24416#include <sys/types.h>
24417#endif
24418#include <netinet/in.h>
24419
24420
24421int
24422main ()
24423{
24424static struct sockaddr_in6 ac_aggr;
24425if (sizeof ac_aggr.sin6_scope_id)
24426return 0;
24427 ;
24428 return 0;
24429}
24430_ACEOF
24431rm -f conftest.$ac_objext
24432if { (ac_try="$ac_compile"
24433case "(($ac_try" in
24434 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24435 *) ac_try_echo=$ac_try;;
24436esac
24437eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24438 (eval "$ac_compile") 2>conftest.er1
24439 ac_status=$?
24440 grep -v '^ *+' conftest.er1 >conftest.err
24441 rm -f conftest.er1
24442 cat conftest.err >&5
24443 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24444 (exit $ac_status); } && {
24445 test -z "$ac_c_werror_flag" ||
24446 test ! -s conftest.err
24447 } && test -s conftest.$ac_objext; then
24448 ac_cv_member_struct_sockaddr_in6_sin6_scope_id=yes
24449else
24450 echo "$as_me: failed program was:" >&5
24451sed 's/^/| /' conftest.$ac_ext >&5
24452
24453 ac_cv_member_struct_sockaddr_in6_sin6_scope_id=no
24454fi
24455
24456rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24457fi
24458
24459rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24460fi
24461{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&5
24462echo "${ECHO_T}$ac_cv_member_struct_sockaddr_in6_sin6_scope_id" >&6; }
24463if test $ac_cv_member_struct_sockaddr_in6_sin6_scope_id = yes; then
24464 12665
24465cat >>confdefs.h <<_ACEOF 12666cat >>confdefs.h <<_ACEOF
24466#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1 12667#define HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID 1
@@ -24471,17 +12672,13 @@ fi
24471 12672
24472fi 12673fi
24473 12674
24474{ echo "$as_me:$LINENO: checking for struct addrinfo" >&5 12675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct addrinfo" >&5
24475echo $ECHO_N "checking for struct addrinfo... $ECHO_C" >&6; } 12676$as_echo_n "checking for struct addrinfo... " >&6; }
24476if test "${ac_cv_have_struct_addrinfo+set}" = set; then 12677if ${ac_cv_have_struct_addrinfo+:} false; then :
24477 echo $ECHO_N "(cached) $ECHO_C" >&6 12678 $as_echo_n "(cached) " >&6
24478else 12679else
24479 12680
24480 cat >conftest.$ac_ext <<_ACEOF 12681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24481/* confdefs.h. */
24482_ACEOF
24483cat confdefs.h >>conftest.$ac_ext
24484cat >>conftest.$ac_ext <<_ACEOF
24485/* end confdefs.h. */ 12682/* end confdefs.h. */
24486 12683
24487#include <sys/types.h> 12684#include <sys/types.h>
@@ -24496,56 +12693,30 @@ main ()
24496 return 0; 12693 return 0;
24497} 12694}
24498_ACEOF 12695_ACEOF
24499rm -f conftest.$ac_objext 12696if ac_fn_c_try_compile "$LINENO"; then :
24500if { (ac_try="$ac_compile"
24501case "(($ac_try" in
24502 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24503 *) ac_try_echo=$ac_try;;
24504esac
24505eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24506 (eval "$ac_compile") 2>conftest.er1
24507 ac_status=$?
24508 grep -v '^ *+' conftest.er1 >conftest.err
24509 rm -f conftest.er1
24510 cat conftest.err >&5
24511 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24512 (exit $ac_status); } && {
24513 test -z "$ac_c_werror_flag" ||
24514 test ! -s conftest.err
24515 } && test -s conftest.$ac_objext; then
24516 ac_cv_have_struct_addrinfo="yes" 12697 ac_cv_have_struct_addrinfo="yes"
24517else 12698else
24518 echo "$as_me: failed program was:" >&5 12699 ac_cv_have_struct_addrinfo="no"
24519sed 's/^/| /' conftest.$ac_ext >&5
24520
24521 ac_cv_have_struct_addrinfo="no"
24522 12700
24523fi 12701fi
24524
24525rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12702rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24526 12703
24527fi 12704fi
24528{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_addrinfo" >&5 12705{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_addrinfo" >&5
24529echo "${ECHO_T}$ac_cv_have_struct_addrinfo" >&6; } 12706$as_echo "$ac_cv_have_struct_addrinfo" >&6; }
24530if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then 12707if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
24531 12708
24532cat >>confdefs.h <<\_ACEOF 12709$as_echo "#define HAVE_STRUCT_ADDRINFO 1" >>confdefs.h
24533#define HAVE_STRUCT_ADDRINFO 1
24534_ACEOF
24535 12710
24536fi 12711fi
24537 12712
24538{ echo "$as_me:$LINENO: checking for struct timeval" >&5 12713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
24539echo $ECHO_N "checking for struct timeval... $ECHO_C" >&6; } 12714$as_echo_n "checking for struct timeval... " >&6; }
24540if test "${ac_cv_have_struct_timeval+set}" = set; then 12715if ${ac_cv_have_struct_timeval+:} false; then :
24541 echo $ECHO_N "(cached) $ECHO_C" >&6 12716 $as_echo_n "(cached) " >&6
24542else 12717else
24543 12718
24544 cat >conftest.$ac_ext <<_ACEOF 12719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24545/* confdefs.h. */
24546_ACEOF
24547cat confdefs.h >>conftest.$ac_ext
24548cat >>conftest.$ac_ext <<_ACEOF
24549/* end confdefs.h. */ 12720/* end confdefs.h. */
24550 #include <sys/time.h> 12721 #include <sys/time.h>
24551int 12722int
@@ -24556,100 +12727,26 @@ main ()
24556 return 0; 12727 return 0;
24557} 12728}
24558_ACEOF 12729_ACEOF
24559rm -f conftest.$ac_objext 12730if ac_fn_c_try_compile "$LINENO"; then :
24560if { (ac_try="$ac_compile"
24561case "(($ac_try" in
24562 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24563 *) ac_try_echo=$ac_try;;
24564esac
24565eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24566 (eval "$ac_compile") 2>conftest.er1
24567 ac_status=$?
24568 grep -v '^ *+' conftest.er1 >conftest.err
24569 rm -f conftest.er1
24570 cat conftest.err >&5
24571 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24572 (exit $ac_status); } && {
24573 test -z "$ac_c_werror_flag" ||
24574 test ! -s conftest.err
24575 } && test -s conftest.$ac_objext; then
24576 ac_cv_have_struct_timeval="yes" 12731 ac_cv_have_struct_timeval="yes"
24577else 12732else
24578 echo "$as_me: failed program was:" >&5 12733 ac_cv_have_struct_timeval="no"
24579sed 's/^/| /' conftest.$ac_ext >&5
24580
24581 ac_cv_have_struct_timeval="no"
24582 12734
24583fi 12735fi
24584
24585rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12736rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24586 12737
24587fi 12738fi
24588{ echo "$as_me:$LINENO: result: $ac_cv_have_struct_timeval" >&5 12739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_struct_timeval" >&5
24589echo "${ECHO_T}$ac_cv_have_struct_timeval" >&6; } 12740$as_echo "$ac_cv_have_struct_timeval" >&6; }
24590if test "x$ac_cv_have_struct_timeval" = "xyes" ; then 12741if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
24591 12742
24592cat >>confdefs.h <<\_ACEOF 12743$as_echo "#define HAVE_STRUCT_TIMEVAL 1" >>confdefs.h
24593#define HAVE_STRUCT_TIMEVAL 1
24594_ACEOF
24595 12744
24596 have_struct_timeval=1 12745 have_struct_timeval=1
24597fi 12746fi
24598 12747
24599{ echo "$as_me:$LINENO: checking for struct timespec" >&5 12748ac_fn_c_check_type "$LINENO" "struct timespec" "ac_cv_type_struct_timespec" "$ac_includes_default"
24600echo $ECHO_N "checking for struct timespec... $ECHO_C" >&6; } 12749if test "x$ac_cv_type_struct_timespec" = xyes; then :
24601if test "${ac_cv_type_struct_timespec+set}" = set; then
24602 echo $ECHO_N "(cached) $ECHO_C" >&6
24603else
24604 cat >conftest.$ac_ext <<_ACEOF
24605/* confdefs.h. */
24606_ACEOF
24607cat confdefs.h >>conftest.$ac_ext
24608cat >>conftest.$ac_ext <<_ACEOF
24609/* end confdefs.h. */
24610$ac_includes_default
24611typedef struct timespec ac__type_new_;
24612int
24613main ()
24614{
24615if ((ac__type_new_ *) 0)
24616 return 0;
24617if (sizeof (ac__type_new_))
24618 return 0;
24619 ;
24620 return 0;
24621}
24622_ACEOF
24623rm -f conftest.$ac_objext
24624if { (ac_try="$ac_compile"
24625case "(($ac_try" in
24626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24627 *) ac_try_echo=$ac_try;;
24628esac
24629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24630 (eval "$ac_compile") 2>conftest.er1
24631 ac_status=$?
24632 grep -v '^ *+' conftest.er1 >conftest.err
24633 rm -f conftest.er1
24634 cat conftest.err >&5
24635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24636 (exit $ac_status); } && {
24637 test -z "$ac_c_werror_flag" ||
24638 test ! -s conftest.err
24639 } && test -s conftest.$ac_objext; then
24640 ac_cv_type_struct_timespec=yes
24641else
24642 echo "$as_me: failed program was:" >&5
24643sed 's/^/| /' conftest.$ac_ext >&5
24644
24645 ac_cv_type_struct_timespec=no
24646fi
24647
24648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
24649fi
24650{ echo "$as_me:$LINENO: result: $ac_cv_type_struct_timespec" >&5
24651echo "${ECHO_T}$ac_cv_type_struct_timespec" >&6; }
24652if test $ac_cv_type_struct_timespec = yes; then
24653 12750
24654cat >>confdefs.h <<_ACEOF 12751cat >>confdefs.h <<_ACEOF
24655#define HAVE_STRUCT_TIMESPEC 1 12752#define HAVE_STRUCT_TIMESPEC 1
@@ -24668,16 +12765,12 @@ if test "x$ac_cv_have_int64_t" = "xno" && \
24668 echo "" 12765 echo ""
24669 exit 1; 12766 exit 1;
24670else 12767else
24671 if test "$cross_compiling" = yes; then 12768 if test "$cross_compiling" = yes; then :
24672 { echo "$as_me:$LINENO: WARNING: cross compiling: Assuming working snprintf()" >&5 12769 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Assuming working snprintf()" >&5
24673echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;} 12770$as_echo "$as_me: WARNING: cross compiling: Assuming working snprintf()" >&2;}
24674 12771
24675else 12772else
24676 cat >conftest.$ac_ext <<_ACEOF 12773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24677/* confdefs.h. */
24678_ACEOF
24679cat confdefs.h >>conftest.$ac_ext
24680cat >>conftest.$ac_ext <<_ACEOF
24681/* end confdefs.h. */ 12774/* end confdefs.h. */
24682 12775
24683#include <stdio.h> 12776#include <stdio.h>
@@ -24704,65 +12797,35 @@ main() { exit(0); }
24704#endif 12797#endif
24705 12798
24706_ACEOF 12799_ACEOF
24707rm -f conftest$ac_exeext 12800if ac_fn_c_try_run "$LINENO"; then :
24708if { (ac_try="$ac_link"
24709case "(($ac_try" in
24710 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24711 *) ac_try_echo=$ac_try;;
24712esac
24713eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24714 (eval "$ac_link") 2>&5
24715 ac_status=$?
24716 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24717 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
24718 { (case "(($ac_try" in
24719 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
24720 *) ac_try_echo=$ac_try;;
24721esac
24722eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
24723 (eval "$ac_try") 2>&5
24724 ac_status=$?
24725 echo "$as_me:$LINENO: \$? = $ac_status" >&5
24726 (exit $ac_status); }; }; then
24727 true 12801 true
24728else 12802else
24729 echo "$as_me: program exited with status $ac_status" >&5 12803 $as_echo "#define BROKEN_SNPRINTF 1" >>confdefs.h
24730echo "$as_me: failed program was:" >&5
24731sed 's/^/| /' conftest.$ac_ext >&5
24732
24733( exit $ac_status )
24734 cat >>confdefs.h <<\_ACEOF
24735#define BROKEN_SNPRINTF 1
24736_ACEOF
24737 12804
24738fi 12805fi
24739rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 12806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12807 conftest.$ac_objext conftest.beam conftest.$ac_ext
24740fi 12808fi
24741 12809
24742
24743fi 12810fi
24744 12811
24745 12812
24746# look for field 'ut_host' in header 'utmp.h' 12813# look for field 'ut_host' in header 'utmp.h'
24747 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 12814 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
24748 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host 12815 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
24749 { echo "$as_me:$LINENO: checking for ut_host field in utmp.h" >&5 12816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmp.h" >&5
24750echo $ECHO_N "checking for ut_host field in utmp.h... $ECHO_C" >&6; } 12817$as_echo_n "checking for ut_host field in utmp.h... " >&6; }
24751 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 12818 if eval \${$ossh_varname+:} false; then :
24752 echo $ECHO_N "(cached) $ECHO_C" >&6 12819 $as_echo_n "(cached) " >&6
24753else 12820else
24754 12821
24755 cat >conftest.$ac_ext <<_ACEOF 12822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24756/* confdefs.h. */
24757_ACEOF
24758cat confdefs.h >>conftest.$ac_ext
24759cat >>conftest.$ac_ext <<_ACEOF
24760/* end confdefs.h. */ 12823/* end confdefs.h. */
24761#include <utmp.h> 12824#include <utmp.h>
24762 12825
24763_ACEOF 12826_ACEOF
24764if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 12827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24765 $EGREP "ut_host" >/dev/null 2>&1; then 12828 $EGREP "ut_host" >/dev/null 2>&1; then :
24766 eval "$ossh_varname=yes" 12829 eval "$ossh_varname=yes"
24767else 12830else
24768 eval "$ossh_varname=no" 12831 eval "$ossh_varname=no"
@@ -24773,41 +12836,35 @@ fi
24773 12836
24774 ossh_result=`eval 'echo $'"$ossh_varname"` 12837 ossh_result=`eval 'echo $'"$ossh_varname"`
24775 if test -n "`echo $ossh_varname`"; then 12838 if test -n "`echo $ossh_varname`"; then
24776 { echo "$as_me:$LINENO: result: $ossh_result" >&5 12839 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
24777echo "${ECHO_T}$ossh_result" >&6; } 12840$as_echo "$ossh_result" >&6; }
24778 if test "x$ossh_result" = "xyes"; then 12841 if test "x$ossh_result" = "xyes"; then
24779 12842
24780cat >>confdefs.h <<\_ACEOF 12843$as_echo "#define HAVE_HOST_IN_UTMP 1" >>confdefs.h
24781#define HAVE_HOST_IN_UTMP 1
24782_ACEOF
24783 12844
24784 fi 12845 fi
24785 else 12846 else
24786 { echo "$as_me:$LINENO: result: no" >&5 12847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24787echo "${ECHO_T}no" >&6; } 12848$as_echo "no" >&6; }
24788 fi 12849 fi
24789 12850
24790 12851
24791# look for field 'ut_host' in header 'utmpx.h' 12852# look for field 'ut_host' in header 'utmpx.h'
24792 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 12853 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
24793 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host 12854 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_host
24794 { echo "$as_me:$LINENO: checking for ut_host field in utmpx.h" >&5 12855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_host field in utmpx.h" >&5
24795echo $ECHO_N "checking for ut_host field in utmpx.h... $ECHO_C" >&6; } 12856$as_echo_n "checking for ut_host field in utmpx.h... " >&6; }
24796 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 12857 if eval \${$ossh_varname+:} false; then :
24797 echo $ECHO_N "(cached) $ECHO_C" >&6 12858 $as_echo_n "(cached) " >&6
24798else 12859else
24799 12860
24800 cat >conftest.$ac_ext <<_ACEOF 12861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24801/* confdefs.h. */
24802_ACEOF
24803cat confdefs.h >>conftest.$ac_ext
24804cat >>conftest.$ac_ext <<_ACEOF
24805/* end confdefs.h. */ 12862/* end confdefs.h. */
24806#include <utmpx.h> 12863#include <utmpx.h>
24807 12864
24808_ACEOF 12865_ACEOF
24809if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 12866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24810 $EGREP "ut_host" >/dev/null 2>&1; then 12867 $EGREP "ut_host" >/dev/null 2>&1; then :
24811 eval "$ossh_varname=yes" 12868 eval "$ossh_varname=yes"
24812else 12869else
24813 eval "$ossh_varname=no" 12870 eval "$ossh_varname=no"
@@ -24818,41 +12875,35 @@ fi
24818 12875
24819 ossh_result=`eval 'echo $'"$ossh_varname"` 12876 ossh_result=`eval 'echo $'"$ossh_varname"`
24820 if test -n "`echo $ossh_varname`"; then 12877 if test -n "`echo $ossh_varname`"; then
24821 { echo "$as_me:$LINENO: result: $ossh_result" >&5 12878 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
24822echo "${ECHO_T}$ossh_result" >&6; } 12879$as_echo "$ossh_result" >&6; }
24823 if test "x$ossh_result" = "xyes"; then 12880 if test "x$ossh_result" = "xyes"; then
24824 12881
24825cat >>confdefs.h <<\_ACEOF 12882$as_echo "#define HAVE_HOST_IN_UTMPX 1" >>confdefs.h
24826#define HAVE_HOST_IN_UTMPX 1
24827_ACEOF
24828 12883
24829 fi 12884 fi
24830 else 12885 else
24831 { echo "$as_me:$LINENO: result: no" >&5 12886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24832echo "${ECHO_T}no" >&6; } 12887$as_echo "no" >&6; }
24833 fi 12888 fi
24834 12889
24835 12890
24836# look for field 'syslen' in header 'utmpx.h' 12891# look for field 'syslen' in header 'utmpx.h'
24837 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 12892 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
24838 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen 12893 ossh_varname="ossh_cv_$ossh_safe""_has_"syslen
24839 { echo "$as_me:$LINENO: checking for syslen field in utmpx.h" >&5 12894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for syslen field in utmpx.h" >&5
24840echo $ECHO_N "checking for syslen field in utmpx.h... $ECHO_C" >&6; } 12895$as_echo_n "checking for syslen field in utmpx.h... " >&6; }
24841 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 12896 if eval \${$ossh_varname+:} false; then :
24842 echo $ECHO_N "(cached) $ECHO_C" >&6 12897 $as_echo_n "(cached) " >&6
24843else 12898else
24844 12899
24845 cat >conftest.$ac_ext <<_ACEOF 12900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24846/* confdefs.h. */
24847_ACEOF
24848cat confdefs.h >>conftest.$ac_ext
24849cat >>conftest.$ac_ext <<_ACEOF
24850/* end confdefs.h. */ 12901/* end confdefs.h. */
24851#include <utmpx.h> 12902#include <utmpx.h>
24852 12903
24853_ACEOF 12904_ACEOF
24854if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 12905if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24855 $EGREP "syslen" >/dev/null 2>&1; then 12906 $EGREP "syslen" >/dev/null 2>&1; then :
24856 eval "$ossh_varname=yes" 12907 eval "$ossh_varname=yes"
24857else 12908else
24858 eval "$ossh_varname=no" 12909 eval "$ossh_varname=no"
@@ -24863,41 +12914,35 @@ fi
24863 12914
24864 ossh_result=`eval 'echo $'"$ossh_varname"` 12915 ossh_result=`eval 'echo $'"$ossh_varname"`
24865 if test -n "`echo $ossh_varname`"; then 12916 if test -n "`echo $ossh_varname`"; then
24866 { echo "$as_me:$LINENO: result: $ossh_result" >&5 12917 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
24867echo "${ECHO_T}$ossh_result" >&6; } 12918$as_echo "$ossh_result" >&6; }
24868 if test "x$ossh_result" = "xyes"; then 12919 if test "x$ossh_result" = "xyes"; then
24869 12920
24870cat >>confdefs.h <<\_ACEOF 12921$as_echo "#define HAVE_SYSLEN_IN_UTMPX 1" >>confdefs.h
24871#define HAVE_SYSLEN_IN_UTMPX 1
24872_ACEOF
24873 12922
24874 fi 12923 fi
24875 else 12924 else
24876 { echo "$as_me:$LINENO: result: no" >&5 12925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24877echo "${ECHO_T}no" >&6; } 12926$as_echo "no" >&6; }
24878 fi 12927 fi
24879 12928
24880 12929
24881# look for field 'ut_pid' in header 'utmp.h' 12930# look for field 'ut_pid' in header 'utmp.h'
24882 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 12931 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
24883 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid 12932 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_pid
24884 { echo "$as_me:$LINENO: checking for ut_pid field in utmp.h" >&5 12933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_pid field in utmp.h" >&5
24885echo $ECHO_N "checking for ut_pid field in utmp.h... $ECHO_C" >&6; } 12934$as_echo_n "checking for ut_pid field in utmp.h... " >&6; }
24886 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 12935 if eval \${$ossh_varname+:} false; then :
24887 echo $ECHO_N "(cached) $ECHO_C" >&6 12936 $as_echo_n "(cached) " >&6
24888else 12937else
24889 12938
24890 cat >conftest.$ac_ext <<_ACEOF 12939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24891/* confdefs.h. */
24892_ACEOF
24893cat confdefs.h >>conftest.$ac_ext
24894cat >>conftest.$ac_ext <<_ACEOF
24895/* end confdefs.h. */ 12940/* end confdefs.h. */
24896#include <utmp.h> 12941#include <utmp.h>
24897 12942
24898_ACEOF 12943_ACEOF
24899if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 12944if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24900 $EGREP "ut_pid" >/dev/null 2>&1; then 12945 $EGREP "ut_pid" >/dev/null 2>&1; then :
24901 eval "$ossh_varname=yes" 12946 eval "$ossh_varname=yes"
24902else 12947else
24903 eval "$ossh_varname=no" 12948 eval "$ossh_varname=no"
@@ -24908,41 +12953,35 @@ fi
24908 12953
24909 ossh_result=`eval 'echo $'"$ossh_varname"` 12954 ossh_result=`eval 'echo $'"$ossh_varname"`
24910 if test -n "`echo $ossh_varname`"; then 12955 if test -n "`echo $ossh_varname`"; then
24911 { echo "$as_me:$LINENO: result: $ossh_result" >&5 12956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
24912echo "${ECHO_T}$ossh_result" >&6; } 12957$as_echo "$ossh_result" >&6; }
24913 if test "x$ossh_result" = "xyes"; then 12958 if test "x$ossh_result" = "xyes"; then
24914 12959
24915cat >>confdefs.h <<\_ACEOF 12960$as_echo "#define HAVE_PID_IN_UTMP 1" >>confdefs.h
24916#define HAVE_PID_IN_UTMP 1
24917_ACEOF
24918 12961
24919 fi 12962 fi
24920 else 12963 else
24921 { echo "$as_me:$LINENO: result: no" >&5 12964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24922echo "${ECHO_T}no" >&6; } 12965$as_echo "no" >&6; }
24923 fi 12966 fi
24924 12967
24925 12968
24926# look for field 'ut_type' in header 'utmp.h' 12969# look for field 'ut_type' in header 'utmp.h'
24927 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 12970 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
24928 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type 12971 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
24929 { echo "$as_me:$LINENO: checking for ut_type field in utmp.h" >&5 12972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmp.h" >&5
24930echo $ECHO_N "checking for ut_type field in utmp.h... $ECHO_C" >&6; } 12973$as_echo_n "checking for ut_type field in utmp.h... " >&6; }
24931 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 12974 if eval \${$ossh_varname+:} false; then :
24932 echo $ECHO_N "(cached) $ECHO_C" >&6 12975 $as_echo_n "(cached) " >&6
24933else 12976else
24934 12977
24935 cat >conftest.$ac_ext <<_ACEOF 12978 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24936/* confdefs.h. */
24937_ACEOF
24938cat confdefs.h >>conftest.$ac_ext
24939cat >>conftest.$ac_ext <<_ACEOF
24940/* end confdefs.h. */ 12979/* end confdefs.h. */
24941#include <utmp.h> 12980#include <utmp.h>
24942 12981
24943_ACEOF 12982_ACEOF
24944if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 12983if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24945 $EGREP "ut_type" >/dev/null 2>&1; then 12984 $EGREP "ut_type" >/dev/null 2>&1; then :
24946 eval "$ossh_varname=yes" 12985 eval "$ossh_varname=yes"
24947else 12986else
24948 eval "$ossh_varname=no" 12987 eval "$ossh_varname=no"
@@ -24953,41 +12992,35 @@ fi
24953 12992
24954 ossh_result=`eval 'echo $'"$ossh_varname"` 12993 ossh_result=`eval 'echo $'"$ossh_varname"`
24955 if test -n "`echo $ossh_varname`"; then 12994 if test -n "`echo $ossh_varname`"; then
24956 { echo "$as_me:$LINENO: result: $ossh_result" >&5 12995 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
24957echo "${ECHO_T}$ossh_result" >&6; } 12996$as_echo "$ossh_result" >&6; }
24958 if test "x$ossh_result" = "xyes"; then 12997 if test "x$ossh_result" = "xyes"; then
24959 12998
24960cat >>confdefs.h <<\_ACEOF 12999$as_echo "#define HAVE_TYPE_IN_UTMP 1" >>confdefs.h
24961#define HAVE_TYPE_IN_UTMP 1
24962_ACEOF
24963 13000
24964 fi 13001 fi
24965 else 13002 else
24966 { echo "$as_me:$LINENO: result: no" >&5 13003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24967echo "${ECHO_T}no" >&6; } 13004$as_echo "no" >&6; }
24968 fi 13005 fi
24969 13006
24970 13007
24971# look for field 'ut_type' in header 'utmpx.h' 13008# look for field 'ut_type' in header 'utmpx.h'
24972 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 13009 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
24973 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type 13010 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_type
24974 { echo "$as_me:$LINENO: checking for ut_type field in utmpx.h" >&5 13011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_type field in utmpx.h" >&5
24975echo $ECHO_N "checking for ut_type field in utmpx.h... $ECHO_C" >&6; } 13012$as_echo_n "checking for ut_type field in utmpx.h... " >&6; }
24976 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 13013 if eval \${$ossh_varname+:} false; then :
24977 echo $ECHO_N "(cached) $ECHO_C" >&6 13014 $as_echo_n "(cached) " >&6
24978else 13015else
24979 13016
24980 cat >conftest.$ac_ext <<_ACEOF 13017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24981/* confdefs.h. */
24982_ACEOF
24983cat confdefs.h >>conftest.$ac_ext
24984cat >>conftest.$ac_ext <<_ACEOF
24985/* end confdefs.h. */ 13018/* end confdefs.h. */
24986#include <utmpx.h> 13019#include <utmpx.h>
24987 13020
24988_ACEOF 13021_ACEOF
24989if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 13022if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24990 $EGREP "ut_type" >/dev/null 2>&1; then 13023 $EGREP "ut_type" >/dev/null 2>&1; then :
24991 eval "$ossh_varname=yes" 13024 eval "$ossh_varname=yes"
24992else 13025else
24993 eval "$ossh_varname=no" 13026 eval "$ossh_varname=no"
@@ -24998,41 +13031,35 @@ fi
24998 13031
24999 ossh_result=`eval 'echo $'"$ossh_varname"` 13032 ossh_result=`eval 'echo $'"$ossh_varname"`
25000 if test -n "`echo $ossh_varname`"; then 13033 if test -n "`echo $ossh_varname`"; then
25001 { echo "$as_me:$LINENO: result: $ossh_result" >&5 13034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
25002echo "${ECHO_T}$ossh_result" >&6; } 13035$as_echo "$ossh_result" >&6; }
25003 if test "x$ossh_result" = "xyes"; then 13036 if test "x$ossh_result" = "xyes"; then
25004 13037
25005cat >>confdefs.h <<\_ACEOF 13038$as_echo "#define HAVE_TYPE_IN_UTMPX 1" >>confdefs.h
25006#define HAVE_TYPE_IN_UTMPX 1
25007_ACEOF
25008 13039
25009 fi 13040 fi
25010 else 13041 else
25011 { echo "$as_me:$LINENO: result: no" >&5 13042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25012echo "${ECHO_T}no" >&6; } 13043$as_echo "no" >&6; }
25013 fi 13044 fi
25014 13045
25015 13046
25016# look for field 'ut_tv' in header 'utmp.h' 13047# look for field 'ut_tv' in header 'utmp.h'
25017 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 13048 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
25018 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv 13049 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
25019 { echo "$as_me:$LINENO: checking for ut_tv field in utmp.h" >&5 13050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmp.h" >&5
25020echo $ECHO_N "checking for ut_tv field in utmp.h... $ECHO_C" >&6; } 13051$as_echo_n "checking for ut_tv field in utmp.h... " >&6; }
25021 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 13052 if eval \${$ossh_varname+:} false; then :
25022 echo $ECHO_N "(cached) $ECHO_C" >&6 13053 $as_echo_n "(cached) " >&6
25023else 13054else
25024 13055
25025 cat >conftest.$ac_ext <<_ACEOF 13056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25026/* confdefs.h. */
25027_ACEOF
25028cat confdefs.h >>conftest.$ac_ext
25029cat >>conftest.$ac_ext <<_ACEOF
25030/* end confdefs.h. */ 13057/* end confdefs.h. */
25031#include <utmp.h> 13058#include <utmp.h>
25032 13059
25033_ACEOF 13060_ACEOF
25034if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 13061if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25035 $EGREP "ut_tv" >/dev/null 2>&1; then 13062 $EGREP "ut_tv" >/dev/null 2>&1; then :
25036 eval "$ossh_varname=yes" 13063 eval "$ossh_varname=yes"
25037else 13064else
25038 eval "$ossh_varname=no" 13065 eval "$ossh_varname=no"
@@ -25043,41 +13070,35 @@ fi
25043 13070
25044 ossh_result=`eval 'echo $'"$ossh_varname"` 13071 ossh_result=`eval 'echo $'"$ossh_varname"`
25045 if test -n "`echo $ossh_varname`"; then 13072 if test -n "`echo $ossh_varname`"; then
25046 { echo "$as_me:$LINENO: result: $ossh_result" >&5 13073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
25047echo "${ECHO_T}$ossh_result" >&6; } 13074$as_echo "$ossh_result" >&6; }
25048 if test "x$ossh_result" = "xyes"; then 13075 if test "x$ossh_result" = "xyes"; then
25049 13076
25050cat >>confdefs.h <<\_ACEOF 13077$as_echo "#define HAVE_TV_IN_UTMP 1" >>confdefs.h
25051#define HAVE_TV_IN_UTMP 1
25052_ACEOF
25053 13078
25054 fi 13079 fi
25055 else 13080 else
25056 { echo "$as_me:$LINENO: result: no" >&5 13081 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25057echo "${ECHO_T}no" >&6; } 13082$as_echo "no" >&6; }
25058 fi 13083 fi
25059 13084
25060 13085
25061# look for field 'ut_id' in header 'utmp.h' 13086# look for field 'ut_id' in header 'utmp.h'
25062 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 13087 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
25063 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id 13088 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
25064 { echo "$as_me:$LINENO: checking for ut_id field in utmp.h" >&5 13089 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmp.h" >&5
25065echo $ECHO_N "checking for ut_id field in utmp.h... $ECHO_C" >&6; } 13090$as_echo_n "checking for ut_id field in utmp.h... " >&6; }
25066 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 13091 if eval \${$ossh_varname+:} false; then :
25067 echo $ECHO_N "(cached) $ECHO_C" >&6 13092 $as_echo_n "(cached) " >&6
25068else 13093else
25069 13094
25070 cat >conftest.$ac_ext <<_ACEOF 13095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25071/* confdefs.h. */
25072_ACEOF
25073cat confdefs.h >>conftest.$ac_ext
25074cat >>conftest.$ac_ext <<_ACEOF
25075/* end confdefs.h. */ 13096/* end confdefs.h. */
25076#include <utmp.h> 13097#include <utmp.h>
25077 13098
25078_ACEOF 13099_ACEOF
25079if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 13100if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25080 $EGREP "ut_id" >/dev/null 2>&1; then 13101 $EGREP "ut_id" >/dev/null 2>&1; then :
25081 eval "$ossh_varname=yes" 13102 eval "$ossh_varname=yes"
25082else 13103else
25083 eval "$ossh_varname=no" 13104 eval "$ossh_varname=no"
@@ -25088,41 +13109,35 @@ fi
25088 13109
25089 ossh_result=`eval 'echo $'"$ossh_varname"` 13110 ossh_result=`eval 'echo $'"$ossh_varname"`
25090 if test -n "`echo $ossh_varname`"; then 13111 if test -n "`echo $ossh_varname`"; then
25091 { echo "$as_me:$LINENO: result: $ossh_result" >&5 13112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
25092echo "${ECHO_T}$ossh_result" >&6; } 13113$as_echo "$ossh_result" >&6; }
25093 if test "x$ossh_result" = "xyes"; then 13114 if test "x$ossh_result" = "xyes"; then
25094 13115
25095cat >>confdefs.h <<\_ACEOF 13116$as_echo "#define HAVE_ID_IN_UTMP 1" >>confdefs.h
25096#define HAVE_ID_IN_UTMP 1
25097_ACEOF
25098 13117
25099 fi 13118 fi
25100 else 13119 else
25101 { echo "$as_me:$LINENO: result: no" >&5 13120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25102echo "${ECHO_T}no" >&6; } 13121$as_echo "no" >&6; }
25103 fi 13122 fi
25104 13123
25105 13124
25106# look for field 'ut_id' in header 'utmpx.h' 13125# look for field 'ut_id' in header 'utmpx.h'
25107 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 13126 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
25108 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id 13127 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_id
25109 { echo "$as_me:$LINENO: checking for ut_id field in utmpx.h" >&5 13128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_id field in utmpx.h" >&5
25110echo $ECHO_N "checking for ut_id field in utmpx.h... $ECHO_C" >&6; } 13129$as_echo_n "checking for ut_id field in utmpx.h... " >&6; }
25111 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 13130 if eval \${$ossh_varname+:} false; then :
25112 echo $ECHO_N "(cached) $ECHO_C" >&6 13131 $as_echo_n "(cached) " >&6
25113else 13132else
25114 13133
25115 cat >conftest.$ac_ext <<_ACEOF 13134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25116/* confdefs.h. */
25117_ACEOF
25118cat confdefs.h >>conftest.$ac_ext
25119cat >>conftest.$ac_ext <<_ACEOF
25120/* end confdefs.h. */ 13135/* end confdefs.h. */
25121#include <utmpx.h> 13136#include <utmpx.h>
25122 13137
25123_ACEOF 13138_ACEOF
25124if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 13139if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25125 $EGREP "ut_id" >/dev/null 2>&1; then 13140 $EGREP "ut_id" >/dev/null 2>&1; then :
25126 eval "$ossh_varname=yes" 13141 eval "$ossh_varname=yes"
25127else 13142else
25128 eval "$ossh_varname=no" 13143 eval "$ossh_varname=no"
@@ -25133,41 +13148,35 @@ fi
25133 13148
25134 ossh_result=`eval 'echo $'"$ossh_varname"` 13149 ossh_result=`eval 'echo $'"$ossh_varname"`
25135 if test -n "`echo $ossh_varname`"; then 13150 if test -n "`echo $ossh_varname`"; then
25136 { echo "$as_me:$LINENO: result: $ossh_result" >&5 13151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
25137echo "${ECHO_T}$ossh_result" >&6; } 13152$as_echo "$ossh_result" >&6; }
25138 if test "x$ossh_result" = "xyes"; then 13153 if test "x$ossh_result" = "xyes"; then
25139 13154
25140cat >>confdefs.h <<\_ACEOF 13155$as_echo "#define HAVE_ID_IN_UTMPX 1" >>confdefs.h
25141#define HAVE_ID_IN_UTMPX 1
25142_ACEOF
25143 13156
25144 fi 13157 fi
25145 else 13158 else
25146 { echo "$as_me:$LINENO: result: no" >&5 13159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25147echo "${ECHO_T}no" >&6; } 13160$as_echo "no" >&6; }
25148 fi 13161 fi
25149 13162
25150 13163
25151# look for field 'ut_addr' in header 'utmp.h' 13164# look for field 'ut_addr' in header 'utmp.h'
25152 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 13165 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
25153 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr 13166 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
25154 { echo "$as_me:$LINENO: checking for ut_addr field in utmp.h" >&5 13167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmp.h" >&5
25155echo $ECHO_N "checking for ut_addr field in utmp.h... $ECHO_C" >&6; } 13168$as_echo_n "checking for ut_addr field in utmp.h... " >&6; }
25156 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 13169 if eval \${$ossh_varname+:} false; then :
25157 echo $ECHO_N "(cached) $ECHO_C" >&6 13170 $as_echo_n "(cached) " >&6
25158else 13171else
25159 13172
25160 cat >conftest.$ac_ext <<_ACEOF 13173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25161/* confdefs.h. */
25162_ACEOF
25163cat confdefs.h >>conftest.$ac_ext
25164cat >>conftest.$ac_ext <<_ACEOF
25165/* end confdefs.h. */ 13174/* end confdefs.h. */
25166#include <utmp.h> 13175#include <utmp.h>
25167 13176
25168_ACEOF 13177_ACEOF
25169if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 13178if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25170 $EGREP "ut_addr" >/dev/null 2>&1; then 13179 $EGREP "ut_addr" >/dev/null 2>&1; then :
25171 eval "$ossh_varname=yes" 13180 eval "$ossh_varname=yes"
25172else 13181else
25173 eval "$ossh_varname=no" 13182 eval "$ossh_varname=no"
@@ -25178,41 +13187,35 @@ fi
25178 13187
25179 ossh_result=`eval 'echo $'"$ossh_varname"` 13188 ossh_result=`eval 'echo $'"$ossh_varname"`
25180 if test -n "`echo $ossh_varname`"; then 13189 if test -n "`echo $ossh_varname`"; then
25181 { echo "$as_me:$LINENO: result: $ossh_result" >&5 13190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
25182echo "${ECHO_T}$ossh_result" >&6; } 13191$as_echo "$ossh_result" >&6; }
25183 if test "x$ossh_result" = "xyes"; then 13192 if test "x$ossh_result" = "xyes"; then
25184 13193
25185cat >>confdefs.h <<\_ACEOF 13194$as_echo "#define HAVE_ADDR_IN_UTMP 1" >>confdefs.h
25186#define HAVE_ADDR_IN_UTMP 1
25187_ACEOF
25188 13195
25189 fi 13196 fi
25190 else 13197 else
25191 { echo "$as_me:$LINENO: result: no" >&5 13198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25192echo "${ECHO_T}no" >&6; } 13199$as_echo "no" >&6; }
25193 fi 13200 fi
25194 13201
25195 13202
25196# look for field 'ut_addr' in header 'utmpx.h' 13203# look for field 'ut_addr' in header 'utmpx.h'
25197 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 13204 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
25198 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr 13205 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr
25199 { echo "$as_me:$LINENO: checking for ut_addr field in utmpx.h" >&5 13206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr field in utmpx.h" >&5
25200echo $ECHO_N "checking for ut_addr field in utmpx.h... $ECHO_C" >&6; } 13207$as_echo_n "checking for ut_addr field in utmpx.h... " >&6; }
25201 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 13208 if eval \${$ossh_varname+:} false; then :
25202 echo $ECHO_N "(cached) $ECHO_C" >&6 13209 $as_echo_n "(cached) " >&6
25203else 13210else
25204 13211
25205 cat >conftest.$ac_ext <<_ACEOF 13212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25206/* confdefs.h. */
25207_ACEOF
25208cat confdefs.h >>conftest.$ac_ext
25209cat >>conftest.$ac_ext <<_ACEOF
25210/* end confdefs.h. */ 13213/* end confdefs.h. */
25211#include <utmpx.h> 13214#include <utmpx.h>
25212 13215
25213_ACEOF 13216_ACEOF
25214if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 13217if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25215 $EGREP "ut_addr" >/dev/null 2>&1; then 13218 $EGREP "ut_addr" >/dev/null 2>&1; then :
25216 eval "$ossh_varname=yes" 13219 eval "$ossh_varname=yes"
25217else 13220else
25218 eval "$ossh_varname=no" 13221 eval "$ossh_varname=no"
@@ -25223,41 +13226,35 @@ fi
25223 13226
25224 ossh_result=`eval 'echo $'"$ossh_varname"` 13227 ossh_result=`eval 'echo $'"$ossh_varname"`
25225 if test -n "`echo $ossh_varname`"; then 13228 if test -n "`echo $ossh_varname`"; then
25226 { echo "$as_me:$LINENO: result: $ossh_result" >&5 13229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
25227echo "${ECHO_T}$ossh_result" >&6; } 13230$as_echo "$ossh_result" >&6; }
25228 if test "x$ossh_result" = "xyes"; then 13231 if test "x$ossh_result" = "xyes"; then
25229 13232
25230cat >>confdefs.h <<\_ACEOF 13233$as_echo "#define HAVE_ADDR_IN_UTMPX 1" >>confdefs.h
25231#define HAVE_ADDR_IN_UTMPX 1
25232_ACEOF
25233 13234
25234 fi 13235 fi
25235 else 13236 else
25236 { echo "$as_me:$LINENO: result: no" >&5 13237 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25237echo "${ECHO_T}no" >&6; } 13238$as_echo "no" >&6; }
25238 fi 13239 fi
25239 13240
25240 13241
25241# look for field 'ut_addr_v6' in header 'utmp.h' 13242# look for field 'ut_addr_v6' in header 'utmp.h'
25242 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 13243 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
25243 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6 13244 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
25244 { echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmp.h" >&5 13245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmp.h" >&5
25245echo $ECHO_N "checking for ut_addr_v6 field in utmp.h... $ECHO_C" >&6; } 13246$as_echo_n "checking for ut_addr_v6 field in utmp.h... " >&6; }
25246 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 13247 if eval \${$ossh_varname+:} false; then :
25247 echo $ECHO_N "(cached) $ECHO_C" >&6 13248 $as_echo_n "(cached) " >&6
25248else 13249else
25249 13250
25250 cat >conftest.$ac_ext <<_ACEOF 13251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25251/* confdefs.h. */
25252_ACEOF
25253cat confdefs.h >>conftest.$ac_ext
25254cat >>conftest.$ac_ext <<_ACEOF
25255/* end confdefs.h. */ 13252/* end confdefs.h. */
25256#include <utmp.h> 13253#include <utmp.h>
25257 13254
25258_ACEOF 13255_ACEOF
25259if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 13256if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25260 $EGREP "ut_addr_v6" >/dev/null 2>&1; then 13257 $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
25261 eval "$ossh_varname=yes" 13258 eval "$ossh_varname=yes"
25262else 13259else
25263 eval "$ossh_varname=no" 13260 eval "$ossh_varname=no"
@@ -25268,41 +13265,35 @@ fi
25268 13265
25269 ossh_result=`eval 'echo $'"$ossh_varname"` 13266 ossh_result=`eval 'echo $'"$ossh_varname"`
25270 if test -n "`echo $ossh_varname`"; then 13267 if test -n "`echo $ossh_varname`"; then
25271 { echo "$as_me:$LINENO: result: $ossh_result" >&5 13268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
25272echo "${ECHO_T}$ossh_result" >&6; } 13269$as_echo "$ossh_result" >&6; }
25273 if test "x$ossh_result" = "xyes"; then 13270 if test "x$ossh_result" = "xyes"; then
25274 13271
25275cat >>confdefs.h <<\_ACEOF 13272$as_echo "#define HAVE_ADDR_V6_IN_UTMP 1" >>confdefs.h
25276#define HAVE_ADDR_V6_IN_UTMP 1
25277_ACEOF
25278 13273
25279 fi 13274 fi
25280 else 13275 else
25281 { echo "$as_me:$LINENO: result: no" >&5 13276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25282echo "${ECHO_T}no" >&6; } 13277$as_echo "no" >&6; }
25283 fi 13278 fi
25284 13279
25285 13280
25286# look for field 'ut_addr_v6' in header 'utmpx.h' 13281# look for field 'ut_addr_v6' in header 'utmpx.h'
25287 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 13282 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
25288 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6 13283 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_addr_v6
25289 { echo "$as_me:$LINENO: checking for ut_addr_v6 field in utmpx.h" >&5 13284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_addr_v6 field in utmpx.h" >&5
25290echo $ECHO_N "checking for ut_addr_v6 field in utmpx.h... $ECHO_C" >&6; } 13285$as_echo_n "checking for ut_addr_v6 field in utmpx.h... " >&6; }
25291 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 13286 if eval \${$ossh_varname+:} false; then :
25292 echo $ECHO_N "(cached) $ECHO_C" >&6 13287 $as_echo_n "(cached) " >&6
25293else 13288else
25294 13289
25295 cat >conftest.$ac_ext <<_ACEOF 13290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25296/* confdefs.h. */
25297_ACEOF
25298cat confdefs.h >>conftest.$ac_ext
25299cat >>conftest.$ac_ext <<_ACEOF
25300/* end confdefs.h. */ 13291/* end confdefs.h. */
25301#include <utmpx.h> 13292#include <utmpx.h>
25302 13293
25303_ACEOF 13294_ACEOF
25304if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 13295if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25305 $EGREP "ut_addr_v6" >/dev/null 2>&1; then 13296 $EGREP "ut_addr_v6" >/dev/null 2>&1; then :
25306 eval "$ossh_varname=yes" 13297 eval "$ossh_varname=yes"
25307else 13298else
25308 eval "$ossh_varname=no" 13299 eval "$ossh_varname=no"
@@ -25313,41 +13304,35 @@ fi
25313 13304
25314 ossh_result=`eval 'echo $'"$ossh_varname"` 13305 ossh_result=`eval 'echo $'"$ossh_varname"`
25315 if test -n "`echo $ossh_varname`"; then 13306 if test -n "`echo $ossh_varname`"; then
25316 { echo "$as_me:$LINENO: result: $ossh_result" >&5 13307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
25317echo "${ECHO_T}$ossh_result" >&6; } 13308$as_echo "$ossh_result" >&6; }
25318 if test "x$ossh_result" = "xyes"; then 13309 if test "x$ossh_result" = "xyes"; then
25319 13310
25320cat >>confdefs.h <<\_ACEOF 13311$as_echo "#define HAVE_ADDR_V6_IN_UTMPX 1" >>confdefs.h
25321#define HAVE_ADDR_V6_IN_UTMPX 1
25322_ACEOF
25323 13312
25324 fi 13313 fi
25325 else 13314 else
25326 { echo "$as_me:$LINENO: result: no" >&5 13315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25327echo "${ECHO_T}no" >&6; } 13316$as_echo "no" >&6; }
25328 fi 13317 fi
25329 13318
25330 13319
25331# look for field 'ut_exit' in header 'utmp.h' 13320# look for field 'ut_exit' in header 'utmp.h'
25332 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 13321 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
25333 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit 13322 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_exit
25334 { echo "$as_me:$LINENO: checking for ut_exit field in utmp.h" >&5 13323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_exit field in utmp.h" >&5
25335echo $ECHO_N "checking for ut_exit field in utmp.h... $ECHO_C" >&6; } 13324$as_echo_n "checking for ut_exit field in utmp.h... " >&6; }
25336 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 13325 if eval \${$ossh_varname+:} false; then :
25337 echo $ECHO_N "(cached) $ECHO_C" >&6 13326 $as_echo_n "(cached) " >&6
25338else 13327else
25339 13328
25340 cat >conftest.$ac_ext <<_ACEOF 13329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25341/* confdefs.h. */
25342_ACEOF
25343cat confdefs.h >>conftest.$ac_ext
25344cat >>conftest.$ac_ext <<_ACEOF
25345/* end confdefs.h. */ 13330/* end confdefs.h. */
25346#include <utmp.h> 13331#include <utmp.h>
25347 13332
25348_ACEOF 13333_ACEOF
25349if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 13334if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25350 $EGREP "ut_exit" >/dev/null 2>&1; then 13335 $EGREP "ut_exit" >/dev/null 2>&1; then :
25351 eval "$ossh_varname=yes" 13336 eval "$ossh_varname=yes"
25352else 13337else
25353 eval "$ossh_varname=no" 13338 eval "$ossh_varname=no"
@@ -25358,41 +13343,35 @@ fi
25358 13343
25359 ossh_result=`eval 'echo $'"$ossh_varname"` 13344 ossh_result=`eval 'echo $'"$ossh_varname"`
25360 if test -n "`echo $ossh_varname`"; then 13345 if test -n "`echo $ossh_varname`"; then
25361 { echo "$as_me:$LINENO: result: $ossh_result" >&5 13346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
25362echo "${ECHO_T}$ossh_result" >&6; } 13347$as_echo "$ossh_result" >&6; }
25363 if test "x$ossh_result" = "xyes"; then 13348 if test "x$ossh_result" = "xyes"; then
25364 13349
25365cat >>confdefs.h <<\_ACEOF 13350$as_echo "#define HAVE_EXIT_IN_UTMP 1" >>confdefs.h
25366#define HAVE_EXIT_IN_UTMP 1
25367_ACEOF
25368 13351
25369 fi 13352 fi
25370 else 13353 else
25371 { echo "$as_me:$LINENO: result: no" >&5 13354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25372echo "${ECHO_T}no" >&6; } 13355$as_echo "no" >&6; }
25373 fi 13356 fi
25374 13357
25375 13358
25376# look for field 'ut_time' in header 'utmp.h' 13359# look for field 'ut_time' in header 'utmp.h'
25377 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'` 13360 ossh_safe=`echo "utmp.h" | sed 'y%./+-%__p_%'`
25378 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time 13361 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
25379 { echo "$as_me:$LINENO: checking for ut_time field in utmp.h" >&5 13362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmp.h" >&5
25380echo $ECHO_N "checking for ut_time field in utmp.h... $ECHO_C" >&6; } 13363$as_echo_n "checking for ut_time field in utmp.h... " >&6; }
25381 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 13364 if eval \${$ossh_varname+:} false; then :
25382 echo $ECHO_N "(cached) $ECHO_C" >&6 13365 $as_echo_n "(cached) " >&6
25383else 13366else
25384 13367
25385 cat >conftest.$ac_ext <<_ACEOF 13368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25386/* confdefs.h. */
25387_ACEOF
25388cat confdefs.h >>conftest.$ac_ext
25389cat >>conftest.$ac_ext <<_ACEOF
25390/* end confdefs.h. */ 13369/* end confdefs.h. */
25391#include <utmp.h> 13370#include <utmp.h>
25392 13371
25393_ACEOF 13372_ACEOF
25394if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 13373if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25395 $EGREP "ut_time" >/dev/null 2>&1; then 13374 $EGREP "ut_time" >/dev/null 2>&1; then :
25396 eval "$ossh_varname=yes" 13375 eval "$ossh_varname=yes"
25397else 13376else
25398 eval "$ossh_varname=no" 13377 eval "$ossh_varname=no"
@@ -25403,41 +13382,35 @@ fi
25403 13382
25404 ossh_result=`eval 'echo $'"$ossh_varname"` 13383 ossh_result=`eval 'echo $'"$ossh_varname"`
25405 if test -n "`echo $ossh_varname`"; then 13384 if test -n "`echo $ossh_varname`"; then
25406 { echo "$as_me:$LINENO: result: $ossh_result" >&5 13385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
25407echo "${ECHO_T}$ossh_result" >&6; } 13386$as_echo "$ossh_result" >&6; }
25408 if test "x$ossh_result" = "xyes"; then 13387 if test "x$ossh_result" = "xyes"; then
25409 13388
25410cat >>confdefs.h <<\_ACEOF 13389$as_echo "#define HAVE_TIME_IN_UTMP 1" >>confdefs.h
25411#define HAVE_TIME_IN_UTMP 1
25412_ACEOF
25413 13390
25414 fi 13391 fi
25415 else 13392 else
25416 { echo "$as_me:$LINENO: result: no" >&5 13393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25417echo "${ECHO_T}no" >&6; } 13394$as_echo "no" >&6; }
25418 fi 13395 fi
25419 13396
25420 13397
25421# look for field 'ut_time' in header 'utmpx.h' 13398# look for field 'ut_time' in header 'utmpx.h'
25422 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 13399 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
25423 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time 13400 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_time
25424 { echo "$as_me:$LINENO: checking for ut_time field in utmpx.h" >&5 13401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_time field in utmpx.h" >&5
25425echo $ECHO_N "checking for ut_time field in utmpx.h... $ECHO_C" >&6; } 13402$as_echo_n "checking for ut_time field in utmpx.h... " >&6; }
25426 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 13403 if eval \${$ossh_varname+:} false; then :
25427 echo $ECHO_N "(cached) $ECHO_C" >&6 13404 $as_echo_n "(cached) " >&6
25428else 13405else
25429 13406
25430 cat >conftest.$ac_ext <<_ACEOF 13407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25431/* confdefs.h. */
25432_ACEOF
25433cat confdefs.h >>conftest.$ac_ext
25434cat >>conftest.$ac_ext <<_ACEOF
25435/* end confdefs.h. */ 13408/* end confdefs.h. */
25436#include <utmpx.h> 13409#include <utmpx.h>
25437 13410
25438_ACEOF 13411_ACEOF
25439if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 13412if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25440 $EGREP "ut_time" >/dev/null 2>&1; then 13413 $EGREP "ut_time" >/dev/null 2>&1; then :
25441 eval "$ossh_varname=yes" 13414 eval "$ossh_varname=yes"
25442else 13415else
25443 eval "$ossh_varname=no" 13416 eval "$ossh_varname=no"
@@ -25448,41 +13421,35 @@ fi
25448 13421
25449 ossh_result=`eval 'echo $'"$ossh_varname"` 13422 ossh_result=`eval 'echo $'"$ossh_varname"`
25450 if test -n "`echo $ossh_varname`"; then 13423 if test -n "`echo $ossh_varname`"; then
25451 { echo "$as_me:$LINENO: result: $ossh_result" >&5 13424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
25452echo "${ECHO_T}$ossh_result" >&6; } 13425$as_echo "$ossh_result" >&6; }
25453 if test "x$ossh_result" = "xyes"; then 13426 if test "x$ossh_result" = "xyes"; then
25454 13427
25455cat >>confdefs.h <<\_ACEOF 13428$as_echo "#define HAVE_TIME_IN_UTMPX 1" >>confdefs.h
25456#define HAVE_TIME_IN_UTMPX 1
25457_ACEOF
25458 13429
25459 fi 13430 fi
25460 else 13431 else
25461 { echo "$as_me:$LINENO: result: no" >&5 13432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25462echo "${ECHO_T}no" >&6; } 13433$as_echo "no" >&6; }
25463 fi 13434 fi
25464 13435
25465 13436
25466# look for field 'ut_tv' in header 'utmpx.h' 13437# look for field 'ut_tv' in header 'utmpx.h'
25467 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'` 13438 ossh_safe=`echo "utmpx.h" | sed 'y%./+-%__p_%'`
25468 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv 13439 ossh_varname="ossh_cv_$ossh_safe""_has_"ut_tv
25469 { echo "$as_me:$LINENO: checking for ut_tv field in utmpx.h" >&5 13440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ut_tv field in utmpx.h" >&5
25470echo $ECHO_N "checking for ut_tv field in utmpx.h... $ECHO_C" >&6; } 13441$as_echo_n "checking for ut_tv field in utmpx.h... " >&6; }
25471 if { as_var=$ossh_varname; eval "test \"\${$as_var+set}\" = set"; }; then 13442 if eval \${$ossh_varname+:} false; then :
25472 echo $ECHO_N "(cached) $ECHO_C" >&6 13443 $as_echo_n "(cached) " >&6
25473else 13444else
25474 13445
25475 cat >conftest.$ac_ext <<_ACEOF 13446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25476/* confdefs.h. */
25477_ACEOF
25478cat confdefs.h >>conftest.$ac_ext
25479cat >>conftest.$ac_ext <<_ACEOF
25480/* end confdefs.h. */ 13447/* end confdefs.h. */
25481#include <utmpx.h> 13448#include <utmpx.h>
25482 13449
25483_ACEOF 13450_ACEOF
25484if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 13451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25485 $EGREP "ut_tv" >/dev/null 2>&1; then 13452 $EGREP "ut_tv" >/dev/null 2>&1; then :
25486 eval "$ossh_varname=yes" 13453 eval "$ossh_varname=yes"
25487else 13454else
25488 eval "$ossh_varname=no" 13455 eval "$ossh_varname=no"
@@ -25493,115 +13460,21 @@ fi
25493 13460
25494 ossh_result=`eval 'echo $'"$ossh_varname"` 13461 ossh_result=`eval 'echo $'"$ossh_varname"`
25495 if test -n "`echo $ossh_varname`"; then 13462 if test -n "`echo $ossh_varname`"; then
25496 { echo "$as_me:$LINENO: result: $ossh_result" >&5 13463 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ossh_result" >&5
25497echo "${ECHO_T}$ossh_result" >&6; } 13464$as_echo "$ossh_result" >&6; }
25498 if test "x$ossh_result" = "xyes"; then 13465 if test "x$ossh_result" = "xyes"; then
25499 13466
25500cat >>confdefs.h <<\_ACEOF 13467$as_echo "#define HAVE_TV_IN_UTMPX 1" >>confdefs.h
25501#define HAVE_TV_IN_UTMPX 1
25502_ACEOF
25503 13468
25504 fi 13469 fi
25505 else 13470 else
25506 { echo "$as_me:$LINENO: result: no" >&5 13471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25507echo "${ECHO_T}no" >&6; } 13472$as_echo "no" >&6; }
25508 fi 13473 fi
25509 13474
25510 13475
25511{ echo "$as_me:$LINENO: checking for struct stat.st_blksize" >&5 13476ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
25512echo $ECHO_N "checking for struct stat.st_blksize... $ECHO_C" >&6; } 13477if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
25513if test "${ac_cv_member_struct_stat_st_blksize+set}" = set; then
25514 echo $ECHO_N "(cached) $ECHO_C" >&6
25515else
25516 cat >conftest.$ac_ext <<_ACEOF
25517/* confdefs.h. */
25518_ACEOF
25519cat confdefs.h >>conftest.$ac_ext
25520cat >>conftest.$ac_ext <<_ACEOF
25521/* end confdefs.h. */
25522$ac_includes_default
25523int
25524main ()
25525{
25526static struct stat ac_aggr;
25527if (ac_aggr.st_blksize)
25528return 0;
25529 ;
25530 return 0;
25531}
25532_ACEOF
25533rm -f conftest.$ac_objext
25534if { (ac_try="$ac_compile"
25535case "(($ac_try" in
25536 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25537 *) ac_try_echo=$ac_try;;
25538esac
25539eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25540 (eval "$ac_compile") 2>conftest.er1
25541 ac_status=$?
25542 grep -v '^ *+' conftest.er1 >conftest.err
25543 rm -f conftest.er1
25544 cat conftest.err >&5
25545 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25546 (exit $ac_status); } && {
25547 test -z "$ac_c_werror_flag" ||
25548 test ! -s conftest.err
25549 } && test -s conftest.$ac_objext; then
25550 ac_cv_member_struct_stat_st_blksize=yes
25551else
25552 echo "$as_me: failed program was:" >&5
25553sed 's/^/| /' conftest.$ac_ext >&5
25554
25555 cat >conftest.$ac_ext <<_ACEOF
25556/* confdefs.h. */
25557_ACEOF
25558cat confdefs.h >>conftest.$ac_ext
25559cat >>conftest.$ac_ext <<_ACEOF
25560/* end confdefs.h. */
25561$ac_includes_default
25562int
25563main ()
25564{
25565static struct stat ac_aggr;
25566if (sizeof ac_aggr.st_blksize)
25567return 0;
25568 ;
25569 return 0;
25570}
25571_ACEOF
25572rm -f conftest.$ac_objext
25573if { (ac_try="$ac_compile"
25574case "(($ac_try" in
25575 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25576 *) ac_try_echo=$ac_try;;
25577esac
25578eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25579 (eval "$ac_compile") 2>conftest.er1
25580 ac_status=$?
25581 grep -v '^ *+' conftest.er1 >conftest.err
25582 rm -f conftest.er1
25583 cat conftest.err >&5
25584 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25585 (exit $ac_status); } && {
25586 test -z "$ac_c_werror_flag" ||
25587 test ! -s conftest.err
25588 } && test -s conftest.$ac_objext; then
25589 ac_cv_member_struct_stat_st_blksize=yes
25590else
25591 echo "$as_me: failed program was:" >&5
25592sed 's/^/| /' conftest.$ac_ext >&5
25593
25594 ac_cv_member_struct_stat_st_blksize=no
25595fi
25596
25597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25598fi
25599
25600rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25601fi
25602{ echo "$as_me:$LINENO: result: $ac_cv_member_struct_stat_st_blksize" >&5
25603echo "${ECHO_T}$ac_cv_member_struct_stat_st_blksize" >&6; }
25604if test $ac_cv_member_struct_stat_st_blksize = yes; then
25605 13478
25606cat >>confdefs.h <<_ACEOF 13479cat >>confdefs.h <<_ACEOF
25607#define HAVE_STRUCT_STAT_ST_BLKSIZE 1 13480#define HAVE_STRUCT_STAT_ST_BLKSIZE 1
@@ -25610,66 +13483,7 @@ _ACEOF
25610 13483
25611fi 13484fi
25612 13485
25613{ echo "$as_me:$LINENO: checking for struct __res_state.retrans" >&5 13486ac_fn_c_check_member "$LINENO" "struct __res_state" "retrans" "ac_cv_member_struct___res_state_retrans" "
25614echo $ECHO_N "checking for struct __res_state.retrans... $ECHO_C" >&6; }
25615if test "${ac_cv_member_struct___res_state_retrans+set}" = set; then
25616 echo $ECHO_N "(cached) $ECHO_C" >&6
25617else
25618 cat >conftest.$ac_ext <<_ACEOF
25619/* confdefs.h. */
25620_ACEOF
25621cat confdefs.h >>conftest.$ac_ext
25622cat >>conftest.$ac_ext <<_ACEOF
25623/* end confdefs.h. */
25624
25625#include <stdio.h>
25626#if HAVE_SYS_TYPES_H
25627# include <sys/types.h>
25628#endif
25629#include <netinet/in.h>
25630#include <arpa/nameser.h>
25631#include <resolv.h>
25632
25633
25634int
25635main ()
25636{
25637static struct __res_state ac_aggr;
25638if (ac_aggr.retrans)
25639return 0;
25640 ;
25641 return 0;
25642}
25643_ACEOF
25644rm -f conftest.$ac_objext
25645if { (ac_try="$ac_compile"
25646case "(($ac_try" in
25647 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25648 *) ac_try_echo=$ac_try;;
25649esac
25650eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25651 (eval "$ac_compile") 2>conftest.er1
25652 ac_status=$?
25653 grep -v '^ *+' conftest.er1 >conftest.err
25654 rm -f conftest.er1
25655 cat conftest.err >&5
25656 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25657 (exit $ac_status); } && {
25658 test -z "$ac_c_werror_flag" ||
25659 test ! -s conftest.err
25660 } && test -s conftest.$ac_objext; then
25661 ac_cv_member_struct___res_state_retrans=yes
25662else
25663 echo "$as_me: failed program was:" >&5
25664sed 's/^/| /' conftest.$ac_ext >&5
25665
25666 cat >conftest.$ac_ext <<_ACEOF
25667/* confdefs.h. */
25668_ACEOF
25669cat confdefs.h >>conftest.$ac_ext
25670cat >>conftest.$ac_ext <<_ACEOF
25671/* end confdefs.h. */
25672
25673#include <stdio.h> 13487#include <stdio.h>
25674#if HAVE_SYS_TYPES_H 13488#if HAVE_SYS_TYPES_H
25675# include <sys/types.h> 13489# include <sys/types.h>
@@ -25678,71 +13492,23 @@ cat >>conftest.$ac_ext <<_ACEOF
25678#include <arpa/nameser.h> 13492#include <arpa/nameser.h>
25679#include <resolv.h> 13493#include <resolv.h>
25680 13494
13495"
13496if test "x$ac_cv_member_struct___res_state_retrans" = xyes; then :
25681 13497
25682int
25683main ()
25684{
25685static struct __res_state ac_aggr;
25686if (sizeof ac_aggr.retrans)
25687return 0;
25688 ;
25689 return 0;
25690}
25691_ACEOF
25692rm -f conftest.$ac_objext
25693if { (ac_try="$ac_compile"
25694case "(($ac_try" in
25695 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25696 *) ac_try_echo=$ac_try;;
25697esac
25698eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25699 (eval "$ac_compile") 2>conftest.er1
25700 ac_status=$?
25701 grep -v '^ *+' conftest.er1 >conftest.err
25702 rm -f conftest.er1
25703 cat conftest.err >&5
25704 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25705 (exit $ac_status); } && {
25706 test -z "$ac_c_werror_flag" ||
25707 test ! -s conftest.err
25708 } && test -s conftest.$ac_objext; then
25709 ac_cv_member_struct___res_state_retrans=yes
25710else
25711 echo "$as_me: failed program was:" >&5
25712sed 's/^/| /' conftest.$ac_ext >&5
25713
25714 ac_cv_member_struct___res_state_retrans=no
25715fi
25716
25717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25718fi
25719
25720rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25721fi
25722{ echo "$as_me:$LINENO: result: $ac_cv_member_struct___res_state_retrans" >&5
25723echo "${ECHO_T}$ac_cv_member_struct___res_state_retrans" >&6; }
25724if test $ac_cv_member_struct___res_state_retrans = yes; then
25725 :
25726else 13498else
25727 13499
25728cat >>confdefs.h <<\_ACEOF 13500$as_echo "#define __res_state state" >>confdefs.h
25729#define __res_state state
25730_ACEOF
25731 13501
25732fi 13502fi
25733 13503
25734 13504
25735{ echo "$as_me:$LINENO: checking for ss_family field in struct sockaddr_storage" >&5 13505{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ss_family field in struct sockaddr_storage" >&5
25736echo $ECHO_N "checking for ss_family field in struct sockaddr_storage... $ECHO_C" >&6; } 13506$as_echo_n "checking for ss_family field in struct sockaddr_storage... " >&6; }
25737if test "${ac_cv_have_ss_family_in_struct_ss+set}" = set; then 13507if ${ac_cv_have_ss_family_in_struct_ss+:} false; then :
25738 echo $ECHO_N "(cached) $ECHO_C" >&6 13508 $as_echo_n "(cached) " >&6
25739else 13509else
25740 13510
25741 cat >conftest.$ac_ext <<_ACEOF 13511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25742/* confdefs.h. */
25743_ACEOF
25744cat confdefs.h >>conftest.$ac_ext
25745cat >>conftest.$ac_ext <<_ACEOF
25746/* end confdefs.h. */ 13512/* end confdefs.h. */
25747 13513
25748#include <sys/types.h> 13514#include <sys/types.h>
@@ -25756,55 +13522,29 @@ main ()
25756 return 0; 13522 return 0;
25757} 13523}
25758_ACEOF 13524_ACEOF
25759rm -f conftest.$ac_objext 13525if ac_fn_c_try_compile "$LINENO"; then :
25760if { (ac_try="$ac_compile"
25761case "(($ac_try" in
25762 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25763 *) ac_try_echo=$ac_try;;
25764esac
25765eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25766 (eval "$ac_compile") 2>conftest.er1
25767 ac_status=$?
25768 grep -v '^ *+' conftest.er1 >conftest.err
25769 rm -f conftest.er1
25770 cat conftest.err >&5
25771 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25772 (exit $ac_status); } && {
25773 test -z "$ac_c_werror_flag" ||
25774 test ! -s conftest.err
25775 } && test -s conftest.$ac_objext; then
25776 ac_cv_have_ss_family_in_struct_ss="yes" 13526 ac_cv_have_ss_family_in_struct_ss="yes"
25777else 13527else
25778 echo "$as_me: failed program was:" >&5 13528 ac_cv_have_ss_family_in_struct_ss="no"
25779sed 's/^/| /' conftest.$ac_ext >&5
25780
25781 ac_cv_have_ss_family_in_struct_ss="no"
25782fi 13529fi
25783
25784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13530rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25785 13531
25786fi 13532fi
25787{ echo "$as_me:$LINENO: result: $ac_cv_have_ss_family_in_struct_ss" >&5 13533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_ss_family_in_struct_ss" >&5
25788echo "${ECHO_T}$ac_cv_have_ss_family_in_struct_ss" >&6; } 13534$as_echo "$ac_cv_have_ss_family_in_struct_ss" >&6; }
25789if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then 13535if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
25790 13536
25791cat >>confdefs.h <<\_ACEOF 13537$as_echo "#define HAVE_SS_FAMILY_IN_SS 1" >>confdefs.h
25792#define HAVE_SS_FAMILY_IN_SS 1
25793_ACEOF
25794 13538
25795fi 13539fi
25796 13540
25797{ echo "$as_me:$LINENO: checking for __ss_family field in struct sockaddr_storage" >&5 13541{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for __ss_family field in struct sockaddr_storage" >&5
25798echo $ECHO_N "checking for __ss_family field in struct sockaddr_storage... $ECHO_C" >&6; } 13542$as_echo_n "checking for __ss_family field in struct sockaddr_storage... " >&6; }
25799if test "${ac_cv_have___ss_family_in_struct_ss+set}" = set; then 13543if ${ac_cv_have___ss_family_in_struct_ss+:} false; then :
25800 echo $ECHO_N "(cached) $ECHO_C" >&6 13544 $as_echo_n "(cached) " >&6
25801else 13545else
25802 13546
25803 cat >conftest.$ac_ext <<_ACEOF 13547 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25804/* confdefs.h. */
25805_ACEOF
25806cat confdefs.h >>conftest.$ac_ext
25807cat >>conftest.$ac_ext <<_ACEOF
25808/* end confdefs.h. */ 13548/* end confdefs.h. */
25809 13549
25810#include <sys/types.h> 13550#include <sys/types.h>
@@ -25818,60 +13558,32 @@ main ()
25818 return 0; 13558 return 0;
25819} 13559}
25820_ACEOF 13560_ACEOF
25821rm -f conftest.$ac_objext 13561if ac_fn_c_try_compile "$LINENO"; then :
25822if { (ac_try="$ac_compile"
25823case "(($ac_try" in
25824 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25825 *) ac_try_echo=$ac_try;;
25826esac
25827eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25828 (eval "$ac_compile") 2>conftest.er1
25829 ac_status=$?
25830 grep -v '^ *+' conftest.er1 >conftest.err
25831 rm -f conftest.er1
25832 cat conftest.err >&5
25833 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25834 (exit $ac_status); } && {
25835 test -z "$ac_c_werror_flag" ||
25836 test ! -s conftest.err
25837 } && test -s conftest.$ac_objext; then
25838 ac_cv_have___ss_family_in_struct_ss="yes" 13562 ac_cv_have___ss_family_in_struct_ss="yes"
25839else 13563else
25840 echo "$as_me: failed program was:" >&5 13564 ac_cv_have___ss_family_in_struct_ss="no"
25841sed 's/^/| /' conftest.$ac_ext >&5
25842
25843 ac_cv_have___ss_family_in_struct_ss="no"
25844 13565
25845fi 13566fi
25846
25847rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13567rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25848 13568
25849fi 13569fi
25850{ echo "$as_me:$LINENO: result: $ac_cv_have___ss_family_in_struct_ss" >&5 13570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___ss_family_in_struct_ss" >&5
25851echo "${ECHO_T}$ac_cv_have___ss_family_in_struct_ss" >&6; } 13571$as_echo "$ac_cv_have___ss_family_in_struct_ss" >&6; }
25852if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then 13572if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
25853 13573
25854cat >>confdefs.h <<\_ACEOF 13574$as_echo "#define HAVE___SS_FAMILY_IN_SS 1" >>confdefs.h
25855#define HAVE___SS_FAMILY_IN_SS 1
25856_ACEOF
25857 13575
25858fi 13576fi
25859 13577
25860{ echo "$as_me:$LINENO: checking for pw_class field in struct passwd" >&5 13578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pw_class field in struct passwd" >&5
25861echo $ECHO_N "checking for pw_class field in struct passwd... $ECHO_C" >&6; } 13579$as_echo_n "checking for pw_class field in struct passwd... " >&6; }
25862if test "${ac_cv_have_pw_class_in_struct_passwd+set}" = set; then 13580if ${ac_cv_have_pw_class_in_struct_passwd+:} false; then :
25863 echo $ECHO_N "(cached) $ECHO_C" >&6 13581 $as_echo_n "(cached) " >&6
25864else 13582else
25865 13583
25866 cat >conftest.$ac_ext <<_ACEOF 13584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25867/* confdefs.h. */
25868_ACEOF
25869cat confdefs.h >>conftest.$ac_ext
25870cat >>conftest.$ac_ext <<_ACEOF
25871/* end confdefs.h. */ 13585/* end confdefs.h. */
25872 13586 #include <pwd.h>
25873#include <pwd.h>
25874
25875int 13587int
25876main () 13588main ()
25877{ 13589{
@@ -25880,60 +13592,32 @@ main ()
25880 return 0; 13592 return 0;
25881} 13593}
25882_ACEOF 13594_ACEOF
25883rm -f conftest.$ac_objext 13595if ac_fn_c_try_compile "$LINENO"; then :
25884if { (ac_try="$ac_compile"
25885case "(($ac_try" in
25886 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25887 *) ac_try_echo=$ac_try;;
25888esac
25889eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25890 (eval "$ac_compile") 2>conftest.er1
25891 ac_status=$?
25892 grep -v '^ *+' conftest.er1 >conftest.err
25893 rm -f conftest.er1
25894 cat conftest.err >&5
25895 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25896 (exit $ac_status); } && {
25897 test -z "$ac_c_werror_flag" ||
25898 test ! -s conftest.err
25899 } && test -s conftest.$ac_objext; then
25900 ac_cv_have_pw_class_in_struct_passwd="yes" 13596 ac_cv_have_pw_class_in_struct_passwd="yes"
25901else 13597else
25902 echo "$as_me: failed program was:" >&5 13598 ac_cv_have_pw_class_in_struct_passwd="no"
25903sed 's/^/| /' conftest.$ac_ext >&5
25904
25905 ac_cv_have_pw_class_in_struct_passwd="no"
25906 13599
25907fi 13600fi
25908
25909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25910 13602
25911fi 13603fi
25912{ echo "$as_me:$LINENO: result: $ac_cv_have_pw_class_in_struct_passwd" >&5 13604{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pw_class_in_struct_passwd" >&5
25913echo "${ECHO_T}$ac_cv_have_pw_class_in_struct_passwd" >&6; } 13605$as_echo "$ac_cv_have_pw_class_in_struct_passwd" >&6; }
25914if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then 13606if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
25915 13607
25916cat >>confdefs.h <<\_ACEOF 13608$as_echo "#define HAVE_PW_CLASS_IN_PASSWD 1" >>confdefs.h
25917#define HAVE_PW_CLASS_IN_PASSWD 1
25918_ACEOF
25919 13609
25920fi 13610fi
25921 13611
25922{ echo "$as_me:$LINENO: checking for pw_expire field in struct passwd" >&5 13612{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pw_expire field in struct passwd" >&5
25923echo $ECHO_N "checking for pw_expire field in struct passwd... $ECHO_C" >&6; } 13613$as_echo_n "checking for pw_expire field in struct passwd... " >&6; }
25924if test "${ac_cv_have_pw_expire_in_struct_passwd+set}" = set; then 13614if ${ac_cv_have_pw_expire_in_struct_passwd+:} false; then :
25925 echo $ECHO_N "(cached) $ECHO_C" >&6 13615 $as_echo_n "(cached) " >&6
25926else 13616else
25927 13617
25928 cat >conftest.$ac_ext <<_ACEOF 13618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25929/* confdefs.h. */
25930_ACEOF
25931cat confdefs.h >>conftest.$ac_ext
25932cat >>conftest.$ac_ext <<_ACEOF
25933/* end confdefs.h. */ 13619/* end confdefs.h. */
25934 13620 #include <pwd.h>
25935#include <pwd.h>
25936
25937int 13621int
25938main () 13622main ()
25939{ 13623{
@@ -25942,60 +13626,32 @@ main ()
25942 return 0; 13626 return 0;
25943} 13627}
25944_ACEOF 13628_ACEOF
25945rm -f conftest.$ac_objext 13629if ac_fn_c_try_compile "$LINENO"; then :
25946if { (ac_try="$ac_compile"
25947case "(($ac_try" in
25948 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
25949 *) ac_try_echo=$ac_try;;
25950esac
25951eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
25952 (eval "$ac_compile") 2>conftest.er1
25953 ac_status=$?
25954 grep -v '^ *+' conftest.er1 >conftest.err
25955 rm -f conftest.er1
25956 cat conftest.err >&5
25957 echo "$as_me:$LINENO: \$? = $ac_status" >&5
25958 (exit $ac_status); } && {
25959 test -z "$ac_c_werror_flag" ||
25960 test ! -s conftest.err
25961 } && test -s conftest.$ac_objext; then
25962 ac_cv_have_pw_expire_in_struct_passwd="yes" 13630 ac_cv_have_pw_expire_in_struct_passwd="yes"
25963else 13631else
25964 echo "$as_me: failed program was:" >&5 13632 ac_cv_have_pw_expire_in_struct_passwd="no"
25965sed 's/^/| /' conftest.$ac_ext >&5
25966
25967 ac_cv_have_pw_expire_in_struct_passwd="no"
25968 13633
25969fi 13634fi
25970
25971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13635rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25972 13636
25973fi 13637fi
25974{ echo "$as_me:$LINENO: result: $ac_cv_have_pw_expire_in_struct_passwd" >&5 13638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pw_expire_in_struct_passwd" >&5
25975echo "${ECHO_T}$ac_cv_have_pw_expire_in_struct_passwd" >&6; } 13639$as_echo "$ac_cv_have_pw_expire_in_struct_passwd" >&6; }
25976if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then 13640if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
25977 13641
25978cat >>confdefs.h <<\_ACEOF 13642$as_echo "#define HAVE_PW_EXPIRE_IN_PASSWD 1" >>confdefs.h
25979#define HAVE_PW_EXPIRE_IN_PASSWD 1
25980_ACEOF
25981 13643
25982fi 13644fi
25983 13645
25984{ echo "$as_me:$LINENO: checking for pw_change field in struct passwd" >&5 13646{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for pw_change field in struct passwd" >&5
25985echo $ECHO_N "checking for pw_change field in struct passwd... $ECHO_C" >&6; } 13647$as_echo_n "checking for pw_change field in struct passwd... " >&6; }
25986if test "${ac_cv_have_pw_change_in_struct_passwd+set}" = set; then 13648if ${ac_cv_have_pw_change_in_struct_passwd+:} false; then :
25987 echo $ECHO_N "(cached) $ECHO_C" >&6 13649 $as_echo_n "(cached) " >&6
25988else 13650else
25989 13651
25990 cat >conftest.$ac_ext <<_ACEOF 13652 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25991/* confdefs.h. */
25992_ACEOF
25993cat confdefs.h >>conftest.$ac_ext
25994cat >>conftest.$ac_ext <<_ACEOF
25995/* end confdefs.h. */ 13653/* end confdefs.h. */
25996 13654 #include <pwd.h>
25997#include <pwd.h>
25998
25999int 13655int
26000main () 13656main ()
26001{ 13657{
@@ -26004,57 +13660,40 @@ main ()
26004 return 0; 13660 return 0;
26005} 13661}
26006_ACEOF 13662_ACEOF
26007rm -f conftest.$ac_objext 13663if ac_fn_c_try_compile "$LINENO"; then :
26008if { (ac_try="$ac_compile"
26009case "(($ac_try" in
26010 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26011 *) ac_try_echo=$ac_try;;
26012esac
26013eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26014 (eval "$ac_compile") 2>conftest.er1
26015 ac_status=$?
26016 grep -v '^ *+' conftest.er1 >conftest.err
26017 rm -f conftest.er1
26018 cat conftest.err >&5
26019 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26020 (exit $ac_status); } && {
26021 test -z "$ac_c_werror_flag" ||
26022 test ! -s conftest.err
26023 } && test -s conftest.$ac_objext; then
26024 ac_cv_have_pw_change_in_struct_passwd="yes" 13664 ac_cv_have_pw_change_in_struct_passwd="yes"
26025else 13665else
26026 echo "$as_me: failed program was:" >&5 13666 ac_cv_have_pw_change_in_struct_passwd="no"
26027sed 's/^/| /' conftest.$ac_ext >&5
26028
26029 ac_cv_have_pw_change_in_struct_passwd="no"
26030 13667
26031fi 13668fi
26032
26033rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13669rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26034 13670
26035fi 13671fi
26036{ echo "$as_me:$LINENO: result: $ac_cv_have_pw_change_in_struct_passwd" >&5 13672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pw_change_in_struct_passwd" >&5
26037echo "${ECHO_T}$ac_cv_have_pw_change_in_struct_passwd" >&6; } 13673$as_echo "$ac_cv_have_pw_change_in_struct_passwd" >&6; }
26038if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then 13674if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
26039 13675
26040cat >>confdefs.h <<\_ACEOF 13676$as_echo "#define HAVE_PW_CHANGE_IN_PASSWD 1" >>confdefs.h
26041#define HAVE_PW_CHANGE_IN_PASSWD 1
26042_ACEOF
26043 13677
26044fi 13678fi
26045 13679
26046{ echo "$as_me:$LINENO: checking for msg_accrights field in struct msghdr" >&5 13680{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_accrights field in struct msghdr" >&5
26047echo $ECHO_N "checking for msg_accrights field in struct msghdr... $ECHO_C" >&6; } 13681$as_echo_n "checking for msg_accrights field in struct msghdr... " >&6; }
26048if test "${ac_cv_have_accrights_in_msghdr+set}" = set; then 13682if ${ac_cv_have_accrights_in_msghdr+:} false; then :
26049 echo $ECHO_N "(cached) $ECHO_C" >&6 13683 $as_echo_n "(cached) " >&6
26050else 13684else
26051 13685
26052 cat >conftest.$ac_ext <<_ACEOF 13686 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13687/* end confdefs.h. */
26053 13688
26054#include <sys/types.h> 13689#include <sys/types.h>
26055#include <sys/socket.h> 13690#include <sys/socket.h>
26056#include <sys/uio.h> 13691#include <sys/uio.h>
26057int main() { 13692
13693int
13694main ()
13695{
13696
26058#ifdef msg_accrights 13697#ifdef msg_accrights
26059#error "msg_accrights is a macro" 13698#error "msg_accrights is a macro"
26060exit(1); 13699exit(1);
@@ -26062,55 +13701,31 @@ exit(1);
26062struct msghdr m; 13701struct msghdr m;
26063m.msg_accrights = 0; 13702m.msg_accrights = 0;
26064exit(0); 13703exit(0);
26065}
26066 13704
13705 ;
13706 return 0;
13707}
26067_ACEOF 13708_ACEOF
26068rm -f conftest.$ac_objext 13709if ac_fn_c_try_compile "$LINENO"; then :
26069if { (ac_try="$ac_compile"
26070case "(($ac_try" in
26071 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26072 *) ac_try_echo=$ac_try;;
26073esac
26074eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26075 (eval "$ac_compile") 2>conftest.er1
26076 ac_status=$?
26077 grep -v '^ *+' conftest.er1 >conftest.err
26078 rm -f conftest.er1
26079 cat conftest.err >&5
26080 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26081 (exit $ac_status); } && {
26082 test -z "$ac_c_werror_flag" ||
26083 test ! -s conftest.err
26084 } && test -s conftest.$ac_objext; then
26085 ac_cv_have_accrights_in_msghdr="yes" 13710 ac_cv_have_accrights_in_msghdr="yes"
26086else 13711else
26087 echo "$as_me: failed program was:" >&5 13712 ac_cv_have_accrights_in_msghdr="no"
26088sed 's/^/| /' conftest.$ac_ext >&5
26089
26090 ac_cv_have_accrights_in_msghdr="no"
26091 13713
26092fi 13714fi
26093
26094rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26095 13716
26096fi 13717fi
26097{ echo "$as_me:$LINENO: result: $ac_cv_have_accrights_in_msghdr" >&5 13718{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_accrights_in_msghdr" >&5
26098echo "${ECHO_T}$ac_cv_have_accrights_in_msghdr" >&6; } 13719$as_echo "$ac_cv_have_accrights_in_msghdr" >&6; }
26099if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then 13720if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
26100 13721
26101cat >>confdefs.h <<\_ACEOF 13722$as_echo "#define HAVE_ACCRIGHTS_IN_MSGHDR 1" >>confdefs.h
26102#define HAVE_ACCRIGHTS_IN_MSGHDR 1
26103_ACEOF
26104 13723
26105fi 13724fi
26106 13725
26107{ echo "$as_me:$LINENO: checking if struct statvfs.f_fsid is integral type" >&5 13726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct statvfs.f_fsid is integral type" >&5
26108echo $ECHO_N "checking if struct statvfs.f_fsid is integral type... $ECHO_C" >&6; } 13727$as_echo_n "checking if struct statvfs.f_fsid is integral type... " >&6; }
26109cat >conftest.$ac_ext <<_ACEOF 13728cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26110/* confdefs.h. */
26111_ACEOF
26112cat confdefs.h >>conftest.$ac_ext
26113cat >>conftest.$ac_ext <<_ACEOF
26114/* end confdefs.h. */ 13729/* end confdefs.h. */
26115 13730
26116#include <sys/types.h> 13731#include <sys/types.h>
@@ -26128,159 +13743,94 @@ cat >>conftest.$ac_ext <<_ACEOF
26128int 13743int
26129main () 13744main ()
26130{ 13745{
26131struct statvfs s; s.f_fsid = 0; 13746 struct statvfs s; s.f_fsid = 0;
26132 ; 13747 ;
26133 return 0; 13748 return 0;
26134} 13749}
26135_ACEOF 13750_ACEOF
26136rm -f conftest.$ac_objext 13751if ac_fn_c_try_compile "$LINENO"; then :
26137if { (ac_try="$ac_compile" 13752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26138case "(($ac_try" in 13753$as_echo "yes" >&6; }
26139 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26140 *) ac_try_echo=$ac_try;;
26141esac
26142eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26143 (eval "$ac_compile") 2>conftest.er1
26144 ac_status=$?
26145 grep -v '^ *+' conftest.er1 >conftest.err
26146 rm -f conftest.er1
26147 cat conftest.err >&5
26148 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26149 (exit $ac_status); } && {
26150 test -z "$ac_c_werror_flag" ||
26151 test ! -s conftest.err
26152 } && test -s conftest.$ac_objext; then
26153 { echo "$as_me:$LINENO: result: yes" >&5
26154echo "${ECHO_T}yes" >&6; }
26155else 13754else
26156 echo "$as_me: failed program was:" >&5 13755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26157sed 's/^/| /' conftest.$ac_ext >&5 13756$as_echo "no" >&6; }
26158
26159 { echo "$as_me:$LINENO: result: no" >&5
26160echo "${ECHO_T}no" >&6; }
26161 13757
26162 { echo "$as_me:$LINENO: checking if fsid_t has member val" >&5 13758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fsid_t has member val" >&5
26163echo $ECHO_N "checking if fsid_t has member val... $ECHO_C" >&6; } 13759$as_echo_n "checking if fsid_t has member val... " >&6; }
26164 cat >conftest.$ac_ext <<_ACEOF 13760 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26165/* confdefs.h. */
26166_ACEOF
26167cat confdefs.h >>conftest.$ac_ext
26168cat >>conftest.$ac_ext <<_ACEOF
26169/* end confdefs.h. */ 13761/* end confdefs.h. */
26170 13762
26171#include <sys/types.h> 13763#include <sys/types.h>
26172#include <sys/statvfs.h> 13764#include <sys/statvfs.h>
13765
26173int 13766int
26174main () 13767main ()
26175{ 13768{
26176fsid_t t; t.val[0] = 0; 13769 fsid_t t; t.val[0] = 0;
26177 ; 13770 ;
26178 return 0; 13771 return 0;
26179} 13772}
26180_ACEOF 13773_ACEOF
26181rm -f conftest.$ac_objext 13774if ac_fn_c_try_compile "$LINENO"; then :
26182if { (ac_try="$ac_compile" 13775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26183case "(($ac_try" in 13776$as_echo "yes" >&6; }
26184 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26185 *) ac_try_echo=$ac_try;;
26186esac
26187eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26188 (eval "$ac_compile") 2>conftest.er1
26189 ac_status=$?
26190 grep -v '^ *+' conftest.er1 >conftest.err
26191 rm -f conftest.er1
26192 cat conftest.err >&5
26193 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26194 (exit $ac_status); } && {
26195 test -z "$ac_c_werror_flag" ||
26196 test ! -s conftest.err
26197 } && test -s conftest.$ac_objext; then
26198 { echo "$as_me:$LINENO: result: yes" >&5
26199echo "${ECHO_T}yes" >&6; }
26200 13777
26201cat >>confdefs.h <<\_ACEOF 13778$as_echo "#define FSID_HAS_VAL 1" >>confdefs.h
26202#define FSID_HAS_VAL 1
26203_ACEOF
26204 13779
26205else 13780else
26206 echo "$as_me: failed program was:" >&5 13781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26207sed 's/^/| /' conftest.$ac_ext >&5 13782$as_echo "no" >&6; }
26208
26209 { echo "$as_me:$LINENO: result: no" >&5
26210echo "${ECHO_T}no" >&6; }
26211fi 13783fi
26212
26213rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13784rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26214 13785
26215 { echo "$as_me:$LINENO: checking if f_fsid has member __val" >&5 13786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if f_fsid has member __val" >&5
26216echo $ECHO_N "checking if f_fsid has member __val... $ECHO_C" >&6; } 13787$as_echo_n "checking if f_fsid has member __val... " >&6; }
26217 cat >conftest.$ac_ext <<_ACEOF 13788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26218/* confdefs.h. */
26219_ACEOF
26220cat confdefs.h >>conftest.$ac_ext
26221cat >>conftest.$ac_ext <<_ACEOF
26222/* end confdefs.h. */ 13789/* end confdefs.h. */
26223 13790
26224#include <sys/types.h> 13791#include <sys/types.h>
26225#include <sys/statvfs.h> 13792#include <sys/statvfs.h>
13793
26226int 13794int
26227main () 13795main ()
26228{ 13796{
26229fsid_t t; t.__val[0] = 0; 13797 fsid_t t; t.__val[0] = 0;
26230 ; 13798 ;
26231 return 0; 13799 return 0;
26232} 13800}
26233_ACEOF 13801_ACEOF
26234rm -f conftest.$ac_objext 13802if ac_fn_c_try_compile "$LINENO"; then :
26235if { (ac_try="$ac_compile" 13803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
26236case "(($ac_try" in 13804$as_echo "yes" >&6; }
26237 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26238 *) ac_try_echo=$ac_try;;
26239esac
26240eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26241 (eval "$ac_compile") 2>conftest.er1
26242 ac_status=$?
26243 grep -v '^ *+' conftest.er1 >conftest.err
26244 rm -f conftest.er1
26245 cat conftest.err >&5
26246 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26247 (exit $ac_status); } && {
26248 test -z "$ac_c_werror_flag" ||
26249 test ! -s conftest.err
26250 } && test -s conftest.$ac_objext; then
26251 { echo "$as_me:$LINENO: result: yes" >&5
26252echo "${ECHO_T}yes" >&6; }
26253 13805
26254cat >>confdefs.h <<\_ACEOF 13806$as_echo "#define FSID_HAS___VAL 1" >>confdefs.h
26255#define FSID_HAS___VAL 1
26256_ACEOF
26257 13807
26258else 13808else
26259 echo "$as_me: failed program was:" >&5 13809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26260sed 's/^/| /' conftest.$ac_ext >&5 13810$as_echo "no" >&6; }
26261
26262 { echo "$as_me:$LINENO: result: no" >&5
26263echo "${ECHO_T}no" >&6; }
26264fi 13811fi
26265
26266rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26267 13813
26268fi 13814fi
26269
26270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13815rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26271 13816
26272{ echo "$as_me:$LINENO: checking for msg_control field in struct msghdr" >&5 13817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for msg_control field in struct msghdr" >&5
26273echo $ECHO_N "checking for msg_control field in struct msghdr... $ECHO_C" >&6; } 13818$as_echo_n "checking for msg_control field in struct msghdr... " >&6; }
26274if test "${ac_cv_have_control_in_msghdr+set}" = set; then 13819if ${ac_cv_have_control_in_msghdr+:} false; then :
26275 echo $ECHO_N "(cached) $ECHO_C" >&6 13820 $as_echo_n "(cached) " >&6
26276else 13821else
26277 13822
26278 cat >conftest.$ac_ext <<_ACEOF 13823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13824/* end confdefs.h. */
26279 13825
26280#include <sys/types.h> 13826#include <sys/types.h>
26281#include <sys/socket.h> 13827#include <sys/socket.h>
26282#include <sys/uio.h> 13828#include <sys/uio.h>
26283int main() { 13829
13830int
13831main ()
13832{
13833
26284#ifdef msg_control 13834#ifdef msg_control
26285#error "msg_control is a macro" 13835#error "msg_control is a macro"
26286exit(1); 13836exit(1);
@@ -26288,59 +13838,35 @@ exit(1);
26288struct msghdr m; 13838struct msghdr m;
26289m.msg_control = 0; 13839m.msg_control = 0;
26290exit(0); 13840exit(0);
26291}
26292 13841
13842 ;
13843 return 0;
13844}
26293_ACEOF 13845_ACEOF
26294rm -f conftest.$ac_objext 13846if ac_fn_c_try_compile "$LINENO"; then :
26295if { (ac_try="$ac_compile"
26296case "(($ac_try" in
26297 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26298 *) ac_try_echo=$ac_try;;
26299esac
26300eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26301 (eval "$ac_compile") 2>conftest.er1
26302 ac_status=$?
26303 grep -v '^ *+' conftest.er1 >conftest.err
26304 rm -f conftest.er1
26305 cat conftest.err >&5
26306 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26307 (exit $ac_status); } && {
26308 test -z "$ac_c_werror_flag" ||
26309 test ! -s conftest.err
26310 } && test -s conftest.$ac_objext; then
26311 ac_cv_have_control_in_msghdr="yes" 13847 ac_cv_have_control_in_msghdr="yes"
26312else 13848else
26313 echo "$as_me: failed program was:" >&5 13849 ac_cv_have_control_in_msghdr="no"
26314sed 's/^/| /' conftest.$ac_ext >&5
26315
26316 ac_cv_have_control_in_msghdr="no"
26317 13850
26318fi 13851fi
26319
26320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
26321 13853
26322fi 13854fi
26323{ echo "$as_me:$LINENO: result: $ac_cv_have_control_in_msghdr" >&5 13855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_control_in_msghdr" >&5
26324echo "${ECHO_T}$ac_cv_have_control_in_msghdr" >&6; } 13856$as_echo "$ac_cv_have_control_in_msghdr" >&6; }
26325if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then 13857if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
26326 13858
26327cat >>confdefs.h <<\_ACEOF 13859$as_echo "#define HAVE_CONTROL_IN_MSGHDR 1" >>confdefs.h
26328#define HAVE_CONTROL_IN_MSGHDR 1
26329_ACEOF
26330 13860
26331fi 13861fi
26332 13862
26333{ echo "$as_me:$LINENO: checking if libc defines __progname" >&5 13863{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines __progname" >&5
26334echo $ECHO_N "checking if libc defines __progname... $ECHO_C" >&6; } 13864$as_echo_n "checking if libc defines __progname... " >&6; }
26335if test "${ac_cv_libc_defines___progname+set}" = set; then 13865if ${ac_cv_libc_defines___progname+:} false; then :
26336 echo $ECHO_N "(cached) $ECHO_C" >&6 13866 $as_echo_n "(cached) " >&6
26337else 13867else
26338 13868
26339 cat >conftest.$ac_ext <<_ACEOF 13869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26340/* confdefs.h. */
26341_ACEOF
26342cat confdefs.h >>conftest.$ac_ext
26343cat >>conftest.$ac_ext <<_ACEOF
26344/* end confdefs.h. */ 13870/* end confdefs.h. */
26345 13871
26346int 13872int
@@ -26351,62 +13877,33 @@ main ()
26351 return 0; 13877 return 0;
26352} 13878}
26353_ACEOF 13879_ACEOF
26354rm -f conftest.$ac_objext conftest$ac_exeext 13880if ac_fn_c_try_link "$LINENO"; then :
26355if { (ac_try="$ac_link"
26356case "(($ac_try" in
26357 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26358 *) ac_try_echo=$ac_try;;
26359esac
26360eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26361 (eval "$ac_link") 2>conftest.er1
26362 ac_status=$?
26363 grep -v '^ *+' conftest.er1 >conftest.err
26364 rm -f conftest.er1
26365 cat conftest.err >&5
26366 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26367 (exit $ac_status); } && {
26368 test -z "$ac_c_werror_flag" ||
26369 test ! -s conftest.err
26370 } && test -s conftest$ac_exeext &&
26371 $as_test_x conftest$ac_exeext; then
26372 ac_cv_libc_defines___progname="yes" 13881 ac_cv_libc_defines___progname="yes"
26373else 13882else
26374 echo "$as_me: failed program was:" >&5 13883 ac_cv_libc_defines___progname="no"
26375sed 's/^/| /' conftest.$ac_ext >&5
26376
26377 ac_cv_libc_defines___progname="no"
26378 13884
26379fi 13885fi
26380 13886rm -f core conftest.err conftest.$ac_objext \
26381rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 13887 conftest$ac_exeext conftest.$ac_ext
26382 conftest$ac_exeext conftest.$ac_ext
26383 13888
26384fi 13889fi
26385{ echo "$as_me:$LINENO: result: $ac_cv_libc_defines___progname" >&5 13890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines___progname" >&5
26386echo "${ECHO_T}$ac_cv_libc_defines___progname" >&6; } 13891$as_echo "$ac_cv_libc_defines___progname" >&6; }
26387if test "x$ac_cv_libc_defines___progname" = "xyes" ; then 13892if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
26388 13893
26389cat >>confdefs.h <<\_ACEOF 13894$as_echo "#define HAVE___PROGNAME 1" >>confdefs.h
26390#define HAVE___PROGNAME 1
26391_ACEOF
26392 13895
26393fi 13896fi
26394 13897
26395{ echo "$as_me:$LINENO: checking whether $CC implements __FUNCTION__" >&5 13898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __FUNCTION__" >&5
26396echo $ECHO_N "checking whether $CC implements __FUNCTION__... $ECHO_C" >&6; } 13899$as_echo_n "checking whether $CC implements __FUNCTION__... " >&6; }
26397if test "${ac_cv_cc_implements___FUNCTION__+set}" = set; then 13900if ${ac_cv_cc_implements___FUNCTION__+:} false; then :
26398 echo $ECHO_N "(cached) $ECHO_C" >&6 13901 $as_echo_n "(cached) " >&6
26399else 13902else
26400 13903
26401 cat >conftest.$ac_ext <<_ACEOF 13904 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26402/* confdefs.h. */
26403_ACEOF
26404cat confdefs.h >>conftest.$ac_ext
26405cat >>conftest.$ac_ext <<_ACEOF
26406/* end confdefs.h. */ 13905/* end confdefs.h. */
26407 13906 #include <stdio.h>
26408#include <stdio.h>
26409
26410int 13907int
26411main () 13908main ()
26412{ 13909{
@@ -26415,62 +13912,33 @@ main ()
26415 return 0; 13912 return 0;
26416} 13913}
26417_ACEOF 13914_ACEOF
26418rm -f conftest.$ac_objext conftest$ac_exeext 13915if ac_fn_c_try_link "$LINENO"; then :
26419if { (ac_try="$ac_link"
26420case "(($ac_try" in
26421 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26422 *) ac_try_echo=$ac_try;;
26423esac
26424eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26425 (eval "$ac_link") 2>conftest.er1
26426 ac_status=$?
26427 grep -v '^ *+' conftest.er1 >conftest.err
26428 rm -f conftest.er1
26429 cat conftest.err >&5
26430 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26431 (exit $ac_status); } && {
26432 test -z "$ac_c_werror_flag" ||
26433 test ! -s conftest.err
26434 } && test -s conftest$ac_exeext &&
26435 $as_test_x conftest$ac_exeext; then
26436 ac_cv_cc_implements___FUNCTION__="yes" 13916 ac_cv_cc_implements___FUNCTION__="yes"
26437else 13917else
26438 echo "$as_me: failed program was:" >&5 13918 ac_cv_cc_implements___FUNCTION__="no"
26439sed 's/^/| /' conftest.$ac_ext >&5
26440
26441 ac_cv_cc_implements___FUNCTION__="no"
26442 13919
26443fi 13920fi
26444 13921rm -f core conftest.err conftest.$ac_objext \
26445rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 13922 conftest$ac_exeext conftest.$ac_ext
26446 conftest$ac_exeext conftest.$ac_ext
26447 13923
26448fi 13924fi
26449{ echo "$as_me:$LINENO: result: $ac_cv_cc_implements___FUNCTION__" >&5 13925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___FUNCTION__" >&5
26450echo "${ECHO_T}$ac_cv_cc_implements___FUNCTION__" >&6; } 13926$as_echo "$ac_cv_cc_implements___FUNCTION__" >&6; }
26451if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then 13927if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
26452 13928
26453cat >>confdefs.h <<\_ACEOF 13929$as_echo "#define HAVE___FUNCTION__ 1" >>confdefs.h
26454#define HAVE___FUNCTION__ 1
26455_ACEOF
26456 13930
26457fi 13931fi
26458 13932
26459{ echo "$as_me:$LINENO: checking whether $CC implements __func__" >&5 13933{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implements __func__" >&5
26460echo $ECHO_N "checking whether $CC implements __func__... $ECHO_C" >&6; } 13934$as_echo_n "checking whether $CC implements __func__... " >&6; }
26461if test "${ac_cv_cc_implements___func__+set}" = set; then 13935if ${ac_cv_cc_implements___func__+:} false; then :
26462 echo $ECHO_N "(cached) $ECHO_C" >&6 13936 $as_echo_n "(cached) " >&6
26463else 13937else
26464 13938
26465 cat >conftest.$ac_ext <<_ACEOF 13939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26466/* confdefs.h. */
26467_ACEOF
26468cat confdefs.h >>conftest.$ac_ext
26469cat >>conftest.$ac_ext <<_ACEOF
26470/* end confdefs.h. */ 13940/* end confdefs.h. */
26471 13941 #include <stdio.h>
26472#include <stdio.h>
26473
26474int 13942int
26475main () 13943main ()
26476{ 13944{
@@ -26479,188 +13947,109 @@ main ()
26479 return 0; 13947 return 0;
26480} 13948}
26481_ACEOF 13949_ACEOF
26482rm -f conftest.$ac_objext conftest$ac_exeext 13950if ac_fn_c_try_link "$LINENO"; then :
26483if { (ac_try="$ac_link"
26484case "(($ac_try" in
26485 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26486 *) ac_try_echo=$ac_try;;
26487esac
26488eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26489 (eval "$ac_link") 2>conftest.er1
26490 ac_status=$?
26491 grep -v '^ *+' conftest.er1 >conftest.err
26492 rm -f conftest.er1
26493 cat conftest.err >&5
26494 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26495 (exit $ac_status); } && {
26496 test -z "$ac_c_werror_flag" ||
26497 test ! -s conftest.err
26498 } && test -s conftest$ac_exeext &&
26499 $as_test_x conftest$ac_exeext; then
26500 ac_cv_cc_implements___func__="yes" 13951 ac_cv_cc_implements___func__="yes"
26501else 13952else
26502 echo "$as_me: failed program was:" >&5 13953 ac_cv_cc_implements___func__="no"
26503sed 's/^/| /' conftest.$ac_ext >&5
26504
26505 ac_cv_cc_implements___func__="no"
26506 13954
26507fi 13955fi
26508 13956rm -f core conftest.err conftest.$ac_objext \
26509rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 13957 conftest$ac_exeext conftest.$ac_ext
26510 conftest$ac_exeext conftest.$ac_ext
26511 13958
26512fi 13959fi
26513{ echo "$as_me:$LINENO: result: $ac_cv_cc_implements___func__" >&5 13960{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_implements___func__" >&5
26514echo "${ECHO_T}$ac_cv_cc_implements___func__" >&6; } 13961$as_echo "$ac_cv_cc_implements___func__" >&6; }
26515if test "x$ac_cv_cc_implements___func__" = "xyes" ; then 13962if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
26516 13963
26517cat >>confdefs.h <<\_ACEOF 13964$as_echo "#define HAVE___func__ 1" >>confdefs.h
26518#define HAVE___func__ 1
26519_ACEOF
26520 13965
26521fi 13966fi
26522 13967
26523{ echo "$as_me:$LINENO: checking whether va_copy exists" >&5 13968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether va_copy exists" >&5
26524echo $ECHO_N "checking whether va_copy exists... $ECHO_C" >&6; } 13969$as_echo_n "checking whether va_copy exists... " >&6; }
26525if test "${ac_cv_have_va_copy+set}" = set; then 13970if ${ac_cv_have_va_copy+:} false; then :
26526 echo $ECHO_N "(cached) $ECHO_C" >&6 13971 $as_echo_n "(cached) " >&6
26527else 13972else
26528 13973
26529 cat >conftest.$ac_ext <<_ACEOF 13974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26530/* confdefs.h. */
26531_ACEOF
26532cat confdefs.h >>conftest.$ac_ext
26533cat >>conftest.$ac_ext <<_ACEOF
26534/* end confdefs.h. */ 13975/* end confdefs.h. */
13976
26535#include <stdarg.h> 13977#include <stdarg.h>
26536 va_list x,y; 13978va_list x,y;
13979
26537int 13980int
26538main () 13981main ()
26539{ 13982{
26540va_copy(x,y); 13983 va_copy(x,y);
26541 ; 13984 ;
26542 return 0; 13985 return 0;
26543} 13986}
26544_ACEOF 13987_ACEOF
26545rm -f conftest.$ac_objext conftest$ac_exeext 13988if ac_fn_c_try_link "$LINENO"; then :
26546if { (ac_try="$ac_link"
26547case "(($ac_try" in
26548 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26549 *) ac_try_echo=$ac_try;;
26550esac
26551eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26552 (eval "$ac_link") 2>conftest.er1
26553 ac_status=$?
26554 grep -v '^ *+' conftest.er1 >conftest.err
26555 rm -f conftest.er1
26556 cat conftest.err >&5
26557 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26558 (exit $ac_status); } && {
26559 test -z "$ac_c_werror_flag" ||
26560 test ! -s conftest.err
26561 } && test -s conftest$ac_exeext &&
26562 $as_test_x conftest$ac_exeext; then
26563 ac_cv_have_va_copy="yes" 13989 ac_cv_have_va_copy="yes"
26564else 13990else
26565 echo "$as_me: failed program was:" >&5 13991 ac_cv_have_va_copy="no"
26566sed 's/^/| /' conftest.$ac_ext >&5
26567
26568 ac_cv_have_va_copy="no"
26569 13992
26570fi 13993fi
26571 13994rm -f core conftest.err conftest.$ac_objext \
26572rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 13995 conftest$ac_exeext conftest.$ac_ext
26573 conftest$ac_exeext conftest.$ac_ext
26574 13996
26575fi 13997fi
26576{ echo "$as_me:$LINENO: result: $ac_cv_have_va_copy" >&5 13998{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_va_copy" >&5
26577echo "${ECHO_T}$ac_cv_have_va_copy" >&6; } 13999$as_echo "$ac_cv_have_va_copy" >&6; }
26578if test "x$ac_cv_have_va_copy" = "xyes" ; then 14000if test "x$ac_cv_have_va_copy" = "xyes" ; then
26579 14001
26580cat >>confdefs.h <<\_ACEOF 14002$as_echo "#define HAVE_VA_COPY 1" >>confdefs.h
26581#define HAVE_VA_COPY 1
26582_ACEOF
26583 14003
26584fi 14004fi
26585 14005
26586{ echo "$as_me:$LINENO: checking whether __va_copy exists" >&5 14006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __va_copy exists" >&5
26587echo $ECHO_N "checking whether __va_copy exists... $ECHO_C" >&6; } 14007$as_echo_n "checking whether __va_copy exists... " >&6; }
26588if test "${ac_cv_have___va_copy+set}" = set; then 14008if ${ac_cv_have___va_copy+:} false; then :
26589 echo $ECHO_N "(cached) $ECHO_C" >&6 14009 $as_echo_n "(cached) " >&6
26590else 14010else
26591 14011
26592 cat >conftest.$ac_ext <<_ACEOF 14012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26593/* confdefs.h. */
26594_ACEOF
26595cat confdefs.h >>conftest.$ac_ext
26596cat >>conftest.$ac_ext <<_ACEOF
26597/* end confdefs.h. */ 14013/* end confdefs.h. */
14014
26598#include <stdarg.h> 14015#include <stdarg.h>
26599 va_list x,y; 14016va_list x,y;
14017
26600int 14018int
26601main () 14019main ()
26602{ 14020{
26603__va_copy(x,y); 14021 __va_copy(x,y);
26604 ; 14022 ;
26605 return 0; 14023 return 0;
26606} 14024}
26607_ACEOF 14025_ACEOF
26608rm -f conftest.$ac_objext conftest$ac_exeext 14026if ac_fn_c_try_link "$LINENO"; then :
26609if { (ac_try="$ac_link"
26610case "(($ac_try" in
26611 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26612 *) ac_try_echo=$ac_try;;
26613esac
26614eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26615 (eval "$ac_link") 2>conftest.er1
26616 ac_status=$?
26617 grep -v '^ *+' conftest.er1 >conftest.err
26618 rm -f conftest.er1
26619 cat conftest.err >&5
26620 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26621 (exit $ac_status); } && {
26622 test -z "$ac_c_werror_flag" ||
26623 test ! -s conftest.err
26624 } && test -s conftest$ac_exeext &&
26625 $as_test_x conftest$ac_exeext; then
26626 ac_cv_have___va_copy="yes" 14027 ac_cv_have___va_copy="yes"
26627else 14028else
26628 echo "$as_me: failed program was:" >&5 14029 ac_cv_have___va_copy="no"
26629sed 's/^/| /' conftest.$ac_ext >&5
26630
26631 ac_cv_have___va_copy="no"
26632 14030
26633fi 14031fi
26634 14032rm -f core conftest.err conftest.$ac_objext \
26635rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14033 conftest$ac_exeext conftest.$ac_ext
26636 conftest$ac_exeext conftest.$ac_ext
26637 14034
26638fi 14035fi
26639{ echo "$as_me:$LINENO: result: $ac_cv_have___va_copy" >&5 14036{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have___va_copy" >&5
26640echo "${ECHO_T}$ac_cv_have___va_copy" >&6; } 14037$as_echo "$ac_cv_have___va_copy" >&6; }
26641if test "x$ac_cv_have___va_copy" = "xyes" ; then 14038if test "x$ac_cv_have___va_copy" = "xyes" ; then
26642 14039
26643cat >>confdefs.h <<\_ACEOF 14040$as_echo "#define HAVE___VA_COPY 1" >>confdefs.h
26644#define HAVE___VA_COPY 1
26645_ACEOF
26646 14041
26647fi 14042fi
26648 14043
26649{ echo "$as_me:$LINENO: checking whether getopt has optreset support" >&5 14044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt has optreset support" >&5
26650echo $ECHO_N "checking whether getopt has optreset support... $ECHO_C" >&6; } 14045$as_echo_n "checking whether getopt has optreset support... " >&6; }
26651if test "${ac_cv_have_getopt_optreset+set}" = set; then 14046if ${ac_cv_have_getopt_optreset+:} false; then :
26652 echo $ECHO_N "(cached) $ECHO_C" >&6 14047 $as_echo_n "(cached) " >&6
26653else 14048else
26654 14049
26655 cat >conftest.$ac_ext <<_ACEOF 14050 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26656/* confdefs.h. */
26657_ACEOF
26658cat confdefs.h >>conftest.$ac_ext
26659cat >>conftest.$ac_ext <<_ACEOF
26660/* end confdefs.h. */ 14051/* end confdefs.h. */
26661 14052 #include <getopt.h>
26662#include <getopt.h>
26663
26664int 14053int
26665main () 14054main ()
26666{ 14055{
@@ -26669,58 +14058,31 @@ main ()
26669 return 0; 14058 return 0;
26670} 14059}
26671_ACEOF 14060_ACEOF
26672rm -f conftest.$ac_objext conftest$ac_exeext 14061if ac_fn_c_try_link "$LINENO"; then :
26673if { (ac_try="$ac_link"
26674case "(($ac_try" in
26675 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26676 *) ac_try_echo=$ac_try;;
26677esac
26678eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26679 (eval "$ac_link") 2>conftest.er1
26680 ac_status=$?
26681 grep -v '^ *+' conftest.er1 >conftest.err
26682 rm -f conftest.er1
26683 cat conftest.err >&5
26684 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26685 (exit $ac_status); } && {
26686 test -z "$ac_c_werror_flag" ||
26687 test ! -s conftest.err
26688 } && test -s conftest$ac_exeext &&
26689 $as_test_x conftest$ac_exeext; then
26690 ac_cv_have_getopt_optreset="yes" 14062 ac_cv_have_getopt_optreset="yes"
26691else 14063else
26692 echo "$as_me: failed program was:" >&5 14064 ac_cv_have_getopt_optreset="no"
26693sed 's/^/| /' conftest.$ac_ext >&5
26694
26695 ac_cv_have_getopt_optreset="no"
26696 14065
26697fi 14066fi
26698 14067rm -f core conftest.err conftest.$ac_objext \
26699rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14068 conftest$ac_exeext conftest.$ac_ext
26700 conftest$ac_exeext conftest.$ac_ext
26701 14069
26702fi 14070fi
26703{ echo "$as_me:$LINENO: result: $ac_cv_have_getopt_optreset" >&5 14071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_getopt_optreset" >&5
26704echo "${ECHO_T}$ac_cv_have_getopt_optreset" >&6; } 14072$as_echo "$ac_cv_have_getopt_optreset" >&6; }
26705if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then 14073if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
26706 14074
26707cat >>confdefs.h <<\_ACEOF 14075$as_echo "#define HAVE_GETOPT_OPTRESET 1" >>confdefs.h
26708#define HAVE_GETOPT_OPTRESET 1
26709_ACEOF
26710 14076
26711fi 14077fi
26712 14078
26713{ echo "$as_me:$LINENO: checking if libc defines sys_errlist" >&5 14079{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_errlist" >&5
26714echo $ECHO_N "checking if libc defines sys_errlist... $ECHO_C" >&6; } 14080$as_echo_n "checking if libc defines sys_errlist... " >&6; }
26715if test "${ac_cv_libc_defines_sys_errlist+set}" = set; then 14081if ${ac_cv_libc_defines_sys_errlist+:} false; then :
26716 echo $ECHO_N "(cached) $ECHO_C" >&6 14082 $as_echo_n "(cached) " >&6
26717else 14083else
26718 14084
26719 cat >conftest.$ac_ext <<_ACEOF 14085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26720/* confdefs.h. */
26721_ACEOF
26722cat confdefs.h >>conftest.$ac_ext
26723cat >>conftest.$ac_ext <<_ACEOF
26724/* end confdefs.h. */ 14086/* end confdefs.h. */
26725 14087
26726int 14088int
@@ -26731,59 +14093,32 @@ main ()
26731 return 0; 14093 return 0;
26732} 14094}
26733_ACEOF 14095_ACEOF
26734rm -f conftest.$ac_objext conftest$ac_exeext 14096if ac_fn_c_try_link "$LINENO"; then :
26735if { (ac_try="$ac_link"
26736case "(($ac_try" in
26737 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26738 *) ac_try_echo=$ac_try;;
26739esac
26740eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26741 (eval "$ac_link") 2>conftest.er1
26742 ac_status=$?
26743 grep -v '^ *+' conftest.er1 >conftest.err
26744 rm -f conftest.er1
26745 cat conftest.err >&5
26746 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26747 (exit $ac_status); } && {
26748 test -z "$ac_c_werror_flag" ||
26749 test ! -s conftest.err
26750 } && test -s conftest$ac_exeext &&
26751 $as_test_x conftest$ac_exeext; then
26752 ac_cv_libc_defines_sys_errlist="yes" 14097 ac_cv_libc_defines_sys_errlist="yes"
26753else 14098else
26754 echo "$as_me: failed program was:" >&5 14099 ac_cv_libc_defines_sys_errlist="no"
26755sed 's/^/| /' conftest.$ac_ext >&5
26756
26757 ac_cv_libc_defines_sys_errlist="no"
26758 14100
26759fi 14101fi
26760 14102rm -f core conftest.err conftest.$ac_objext \
26761rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14103 conftest$ac_exeext conftest.$ac_ext
26762 conftest$ac_exeext conftest.$ac_ext
26763 14104
26764fi 14105fi
26765{ echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_errlist" >&5 14106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_errlist" >&5
26766echo "${ECHO_T}$ac_cv_libc_defines_sys_errlist" >&6; } 14107$as_echo "$ac_cv_libc_defines_sys_errlist" >&6; }
26767if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then 14108if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
26768 14109
26769cat >>confdefs.h <<\_ACEOF 14110$as_echo "#define HAVE_SYS_ERRLIST 1" >>confdefs.h
26770#define HAVE_SYS_ERRLIST 1
26771_ACEOF
26772 14111
26773fi 14112fi
26774 14113
26775 14114
26776{ echo "$as_me:$LINENO: checking if libc defines sys_nerr" >&5 14115{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if libc defines sys_nerr" >&5
26777echo $ECHO_N "checking if libc defines sys_nerr... $ECHO_C" >&6; } 14116$as_echo_n "checking if libc defines sys_nerr... " >&6; }
26778if test "${ac_cv_libc_defines_sys_nerr+set}" = set; then 14117if ${ac_cv_libc_defines_sys_nerr+:} false; then :
26779 echo $ECHO_N "(cached) $ECHO_C" >&6 14118 $as_echo_n "(cached) " >&6
26780else 14119else
26781 14120
26782 cat >conftest.$ac_ext <<_ACEOF 14121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26783/* confdefs.h. */
26784_ACEOF
26785cat confdefs.h >>conftest.$ac_ext
26786cat >>conftest.$ac_ext <<_ACEOF
26787/* end confdefs.h. */ 14122/* end confdefs.h. */
26788 14123
26789int 14124int
@@ -26794,59 +14129,32 @@ main ()
26794 return 0; 14129 return 0;
26795} 14130}
26796_ACEOF 14131_ACEOF
26797rm -f conftest.$ac_objext conftest$ac_exeext 14132if ac_fn_c_try_link "$LINENO"; then :
26798if { (ac_try="$ac_link"
26799case "(($ac_try" in
26800 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26801 *) ac_try_echo=$ac_try;;
26802esac
26803eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26804 (eval "$ac_link") 2>conftest.er1
26805 ac_status=$?
26806 grep -v '^ *+' conftest.er1 >conftest.err
26807 rm -f conftest.er1
26808 cat conftest.err >&5
26809 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26810 (exit $ac_status); } && {
26811 test -z "$ac_c_werror_flag" ||
26812 test ! -s conftest.err
26813 } && test -s conftest$ac_exeext &&
26814 $as_test_x conftest$ac_exeext; then
26815 ac_cv_libc_defines_sys_nerr="yes" 14133 ac_cv_libc_defines_sys_nerr="yes"
26816else 14134else
26817 echo "$as_me: failed program was:" >&5 14135 ac_cv_libc_defines_sys_nerr="no"
26818sed 's/^/| /' conftest.$ac_ext >&5
26819
26820 ac_cv_libc_defines_sys_nerr="no"
26821 14136
26822fi 14137fi
26823 14138rm -f core conftest.err conftest.$ac_objext \
26824rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14139 conftest$ac_exeext conftest.$ac_ext
26825 conftest$ac_exeext conftest.$ac_ext
26826 14140
26827fi 14141fi
26828{ echo "$as_me:$LINENO: result: $ac_cv_libc_defines_sys_nerr" >&5 14142{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libc_defines_sys_nerr" >&5
26829echo "${ECHO_T}$ac_cv_libc_defines_sys_nerr" >&6; } 14143$as_echo "$ac_cv_libc_defines_sys_nerr" >&6; }
26830if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then 14144if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
26831 14145
26832cat >>confdefs.h <<\_ACEOF 14146$as_echo "#define HAVE_SYS_NERR 1" >>confdefs.h
26833#define HAVE_SYS_NERR 1
26834_ACEOF
26835 14147
26836fi 14148fi
26837 14149
26838# Check libraries needed by DNS fingerprint support 14150# Check libraries needed by DNS fingerprint support
26839{ echo "$as_me:$LINENO: checking for library containing getrrsetbyname" >&5 14151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing getrrsetbyname" >&5
26840echo $ECHO_N "checking for library containing getrrsetbyname... $ECHO_C" >&6; } 14152$as_echo_n "checking for library containing getrrsetbyname... " >&6; }
26841if test "${ac_cv_search_getrrsetbyname+set}" = set; then 14153if ${ac_cv_search_getrrsetbyname+:} false; then :
26842 echo $ECHO_N "(cached) $ECHO_C" >&6 14154 $as_echo_n "(cached) " >&6
26843else 14155else
26844 ac_func_search_save_LIBS=$LIBS 14156 ac_func_search_save_LIBS=$LIBS
26845cat >conftest.$ac_ext <<_ACEOF 14157cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26846/* confdefs.h. */
26847_ACEOF
26848cat confdefs.h >>conftest.$ac_ext
26849cat >>conftest.$ac_ext <<_ACEOF
26850/* end confdefs.h. */ 14158/* end confdefs.h. */
26851 14159
26852/* Override any GCC internal prototype to avoid an error. 14160/* Override any GCC internal prototype to avoid an error.
@@ -26871,70 +14179,41 @@ for ac_lib in '' resolv; do
26871 ac_res=-l$ac_lib 14179 ac_res=-l$ac_lib
26872 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 14180 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
26873 fi 14181 fi
26874 rm -f conftest.$ac_objext conftest$ac_exeext 14182 if ac_fn_c_try_link "$LINENO"; then :
26875if { (ac_try="$ac_link"
26876case "(($ac_try" in
26877 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26878 *) ac_try_echo=$ac_try;;
26879esac
26880eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26881 (eval "$ac_link") 2>conftest.er1
26882 ac_status=$?
26883 grep -v '^ *+' conftest.er1 >conftest.err
26884 rm -f conftest.er1
26885 cat conftest.err >&5
26886 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26887 (exit $ac_status); } && {
26888 test -z "$ac_c_werror_flag" ||
26889 test ! -s conftest.err
26890 } && test -s conftest$ac_exeext &&
26891 $as_test_x conftest$ac_exeext; then
26892 ac_cv_search_getrrsetbyname=$ac_res 14183 ac_cv_search_getrrsetbyname=$ac_res
26893else
26894 echo "$as_me: failed program was:" >&5
26895sed 's/^/| /' conftest.$ac_ext >&5
26896
26897
26898fi 14184fi
26899 14185rm -f core conftest.err conftest.$ac_objext \
26900rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14186 conftest$ac_exeext
26901 conftest$ac_exeext 14187 if ${ac_cv_search_getrrsetbyname+:} false; then :
26902 if test "${ac_cv_search_getrrsetbyname+set}" = set; then
26903 break 14188 break
26904fi 14189fi
26905done 14190done
26906if test "${ac_cv_search_getrrsetbyname+set}" = set; then 14191if ${ac_cv_search_getrrsetbyname+:} false; then :
26907 : 14192
26908else 14193else
26909 ac_cv_search_getrrsetbyname=no 14194 ac_cv_search_getrrsetbyname=no
26910fi 14195fi
26911rm conftest.$ac_ext 14196rm conftest.$ac_ext
26912LIBS=$ac_func_search_save_LIBS 14197LIBS=$ac_func_search_save_LIBS
26913fi 14198fi
26914{ echo "$as_me:$LINENO: result: $ac_cv_search_getrrsetbyname" >&5 14199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_getrrsetbyname" >&5
26915echo "${ECHO_T}$ac_cv_search_getrrsetbyname" >&6; } 14200$as_echo "$ac_cv_search_getrrsetbyname" >&6; }
26916ac_res=$ac_cv_search_getrrsetbyname 14201ac_res=$ac_cv_search_getrrsetbyname
26917if test "$ac_res" != no; then 14202if test "$ac_res" != no; then :
26918 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 14203 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
26919 14204
26920cat >>confdefs.h <<\_ACEOF 14205$as_echo "#define HAVE_GETRRSETBYNAME 1" >>confdefs.h
26921#define HAVE_GETRRSETBYNAME 1
26922_ACEOF
26923 14206
26924else 14207else
26925 14208
26926 # Needed by our getrrsetbyname() 14209 # Needed by our getrrsetbyname()
26927 { echo "$as_me:$LINENO: checking for library containing res_query" >&5 14210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing res_query" >&5
26928echo $ECHO_N "checking for library containing res_query... $ECHO_C" >&6; } 14211$as_echo_n "checking for library containing res_query... " >&6; }
26929if test "${ac_cv_search_res_query+set}" = set; then 14212if ${ac_cv_search_res_query+:} false; then :
26930 echo $ECHO_N "(cached) $ECHO_C" >&6 14213 $as_echo_n "(cached) " >&6
26931else 14214else
26932 ac_func_search_save_LIBS=$LIBS 14215 ac_func_search_save_LIBS=$LIBS
26933cat >conftest.$ac_ext <<_ACEOF 14216cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26934/* confdefs.h. */
26935_ACEOF
26936cat confdefs.h >>conftest.$ac_ext
26937cat >>conftest.$ac_ext <<_ACEOF
26938/* end confdefs.h. */ 14217/* end confdefs.h. */
26939 14218
26940/* Override any GCC internal prototype to avoid an error. 14219/* Override any GCC internal prototype to avoid an error.
@@ -26959,65 +14238,38 @@ for ac_lib in '' resolv; do
26959 ac_res=-l$ac_lib 14238 ac_res=-l$ac_lib
26960 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 14239 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
26961 fi 14240 fi
26962 rm -f conftest.$ac_objext conftest$ac_exeext 14241 if ac_fn_c_try_link "$LINENO"; then :
26963if { (ac_try="$ac_link"
26964case "(($ac_try" in
26965 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
26966 *) ac_try_echo=$ac_try;;
26967esac
26968eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
26969 (eval "$ac_link") 2>conftest.er1
26970 ac_status=$?
26971 grep -v '^ *+' conftest.er1 >conftest.err
26972 rm -f conftest.er1
26973 cat conftest.err >&5
26974 echo "$as_me:$LINENO: \$? = $ac_status" >&5
26975 (exit $ac_status); } && {
26976 test -z "$ac_c_werror_flag" ||
26977 test ! -s conftest.err
26978 } && test -s conftest$ac_exeext &&
26979 $as_test_x conftest$ac_exeext; then
26980 ac_cv_search_res_query=$ac_res 14242 ac_cv_search_res_query=$ac_res
26981else
26982 echo "$as_me: failed program was:" >&5
26983sed 's/^/| /' conftest.$ac_ext >&5
26984
26985
26986fi 14243fi
26987 14244rm -f core conftest.err conftest.$ac_objext \
26988rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14245 conftest$ac_exeext
26989 conftest$ac_exeext 14246 if ${ac_cv_search_res_query+:} false; then :
26990 if test "${ac_cv_search_res_query+set}" = set; then
26991 break 14247 break
26992fi 14248fi
26993done 14249done
26994if test "${ac_cv_search_res_query+set}" = set; then 14250if ${ac_cv_search_res_query+:} false; then :
26995 : 14251
26996else 14252else
26997 ac_cv_search_res_query=no 14253 ac_cv_search_res_query=no
26998fi 14254fi
26999rm conftest.$ac_ext 14255rm conftest.$ac_ext
27000LIBS=$ac_func_search_save_LIBS 14256LIBS=$ac_func_search_save_LIBS
27001fi 14257fi
27002{ echo "$as_me:$LINENO: result: $ac_cv_search_res_query" >&5 14258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_res_query" >&5
27003echo "${ECHO_T}$ac_cv_search_res_query" >&6; } 14259$as_echo "$ac_cv_search_res_query" >&6; }
27004ac_res=$ac_cv_search_res_query 14260ac_res=$ac_cv_search_res_query
27005if test "$ac_res" != no; then 14261if test "$ac_res" != no; then :
27006 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 14262 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27007 14263
27008fi 14264fi
27009 14265
27010 { echo "$as_me:$LINENO: checking for library containing dn_expand" >&5 14266 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
27011echo $ECHO_N "checking for library containing dn_expand... $ECHO_C" >&6; } 14267$as_echo_n "checking for library containing dn_expand... " >&6; }
27012if test "${ac_cv_search_dn_expand+set}" = set; then 14268if ${ac_cv_search_dn_expand+:} false; then :
27013 echo $ECHO_N "(cached) $ECHO_C" >&6 14269 $as_echo_n "(cached) " >&6
27014else 14270else
27015 ac_func_search_save_LIBS=$LIBS 14271 ac_func_search_save_LIBS=$LIBS
27016cat >conftest.$ac_ext <<_ACEOF 14272cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27017/* confdefs.h. */
27018_ACEOF
27019cat confdefs.h >>conftest.$ac_ext
27020cat >>conftest.$ac_ext <<_ACEOF
27021/* end confdefs.h. */ 14273/* end confdefs.h. */
27022 14274
27023/* Override any GCC internal prototype to avoid an error. 14275/* Override any GCC internal prototype to avoid an error.
@@ -27042,485 +14294,137 @@ for ac_lib in '' resolv; do
27042 ac_res=-l$ac_lib 14294 ac_res=-l$ac_lib
27043 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 14295 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
27044 fi 14296 fi
27045 rm -f conftest.$ac_objext conftest$ac_exeext 14297 if ac_fn_c_try_link "$LINENO"; then :
27046if { (ac_try="$ac_link"
27047case "(($ac_try" in
27048 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27049 *) ac_try_echo=$ac_try;;
27050esac
27051eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27052 (eval "$ac_link") 2>conftest.er1
27053 ac_status=$?
27054 grep -v '^ *+' conftest.er1 >conftest.err
27055 rm -f conftest.er1
27056 cat conftest.err >&5
27057 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27058 (exit $ac_status); } && {
27059 test -z "$ac_c_werror_flag" ||
27060 test ! -s conftest.err
27061 } && test -s conftest$ac_exeext &&
27062 $as_test_x conftest$ac_exeext; then
27063 ac_cv_search_dn_expand=$ac_res 14298 ac_cv_search_dn_expand=$ac_res
27064else
27065 echo "$as_me: failed program was:" >&5
27066sed 's/^/| /' conftest.$ac_ext >&5
27067
27068
27069fi 14299fi
27070 14300rm -f core conftest.err conftest.$ac_objext \
27071rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14301 conftest$ac_exeext
27072 conftest$ac_exeext 14302 if ${ac_cv_search_dn_expand+:} false; then :
27073 if test "${ac_cv_search_dn_expand+set}" = set; then
27074 break 14303 break
27075fi 14304fi
27076done 14305done
27077if test "${ac_cv_search_dn_expand+set}" = set; then 14306if ${ac_cv_search_dn_expand+:} false; then :
27078 : 14307
27079else 14308else
27080 ac_cv_search_dn_expand=no 14309 ac_cv_search_dn_expand=no
27081fi 14310fi
27082rm conftest.$ac_ext 14311rm conftest.$ac_ext
27083LIBS=$ac_func_search_save_LIBS 14312LIBS=$ac_func_search_save_LIBS
27084fi 14313fi
27085{ echo "$as_me:$LINENO: result: $ac_cv_search_dn_expand" >&5 14314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
27086echo "${ECHO_T}$ac_cv_search_dn_expand" >&6; } 14315$as_echo "$ac_cv_search_dn_expand" >&6; }
27087ac_res=$ac_cv_search_dn_expand 14316ac_res=$ac_cv_search_dn_expand
27088if test "$ac_res" != no; then 14317if test "$ac_res" != no; then :
27089 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 14318 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
27090 14319
27091fi 14320fi
27092 14321
27093 { echo "$as_me:$LINENO: checking if res_query will link" >&5 14322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if res_query will link" >&5
27094echo $ECHO_N "checking if res_query will link... $ECHO_C" >&6; } 14323$as_echo_n "checking if res_query will link... " >&6; }
27095 cat >conftest.$ac_ext <<_ACEOF 14324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14325/* end confdefs.h. */
27096 14326
27097#include "confdefs.h"
27098#include <sys/types.h> 14327#include <sys/types.h>
27099#include <netinet/in.h> 14328#include <netinet/in.h>
27100#include <arpa/nameser.h> 14329#include <arpa/nameser.h>
27101#include <netdb.h> 14330#include <netdb.h>
27102#include <resolv.h> 14331#include <resolv.h>
27103int main() 14332
14333int
14334main ()
27104{ 14335{
14336
27105 res_query (0, 0, 0, 0, 0); 14337 res_query (0, 0, 0, 0, 0);
27106 return 0;
27107}
27108 14338
14339 ;
14340 return 0;
14341}
27109_ACEOF 14342_ACEOF
27110rm -f conftest.$ac_objext conftest$ac_exeext 14343if ac_fn_c_try_link "$LINENO"; then :
27111if { (ac_try="$ac_link" 14344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27112case "(($ac_try" in 14345$as_echo "yes" >&6; }
27113 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27114 *) ac_try_echo=$ac_try;;
27115esac
27116eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27117 (eval "$ac_link") 2>conftest.er1
27118 ac_status=$?
27119 grep -v '^ *+' conftest.er1 >conftest.err
27120 rm -f conftest.er1
27121 cat conftest.err >&5
27122 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27123 (exit $ac_status); } && {
27124 test -z "$ac_c_werror_flag" ||
27125 test ! -s conftest.err
27126 } && test -s conftest$ac_exeext &&
27127 $as_test_x conftest$ac_exeext; then
27128 { echo "$as_me:$LINENO: result: yes" >&5
27129echo "${ECHO_T}yes" >&6; }
27130else 14346else
27131 echo "$as_me: failed program was:" >&5 14347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27132sed 's/^/| /' conftest.$ac_ext >&5 14348$as_echo "no" >&6; }
27133
27134 { echo "$as_me:$LINENO: result: no" >&5
27135echo "${ECHO_T}no" >&6; }
27136 saved_LIBS="$LIBS" 14349 saved_LIBS="$LIBS"
27137 LIBS="$LIBS -lresolv" 14350 LIBS="$LIBS -lresolv"
27138 { echo "$as_me:$LINENO: checking for res_query in -lresolv" >&5 14351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_query in -lresolv" >&5
27139echo $ECHO_N "checking for res_query in -lresolv... $ECHO_C" >&6; } 14352$as_echo_n "checking for res_query in -lresolv... " >&6; }
27140 cat >conftest.$ac_ext <<_ACEOF 14353 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14354/* end confdefs.h. */
27141 14355
27142#include "confdefs.h"
27143#include <sys/types.h> 14356#include <sys/types.h>
27144#include <netinet/in.h> 14357#include <netinet/in.h>
27145#include <arpa/nameser.h> 14358#include <arpa/nameser.h>
27146#include <netdb.h> 14359#include <netdb.h>
27147#include <resolv.h> 14360#include <resolv.h>
27148int main()
27149{
27150 res_query (0, 0, 0, 0, 0);
27151 return 0;
27152}
27153
27154_ACEOF
27155rm -f conftest.$ac_objext conftest$ac_exeext
27156if { (ac_try="$ac_link"
27157case "(($ac_try" in
27158 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27159 *) ac_try_echo=$ac_try;;
27160esac
27161eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27162 (eval "$ac_link") 2>conftest.er1
27163 ac_status=$?
27164 grep -v '^ *+' conftest.er1 >conftest.err
27165 rm -f conftest.er1
27166 cat conftest.err >&5
27167 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27168 (exit $ac_status); } && {
27169 test -z "$ac_c_werror_flag" ||
27170 test ! -s conftest.err
27171 } && test -s conftest$ac_exeext &&
27172 $as_test_x conftest$ac_exeext; then
27173 { echo "$as_me:$LINENO: result: yes" >&5
27174echo "${ECHO_T}yes" >&6; }
27175else
27176 echo "$as_me: failed program was:" >&5
27177sed 's/^/| /' conftest.$ac_ext >&5
27178
27179 LIBS="$saved_LIBS"
27180 { echo "$as_me:$LINENO: result: no" >&5
27181echo "${ECHO_T}no" >&6; }
27182fi
27183
27184rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27185 conftest$ac_exeext conftest.$ac_ext
27186
27187fi
27188
27189rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27190 conftest$ac_exeext conftest.$ac_ext
27191
27192
27193for ac_func in _getshort _getlong
27194do
27195as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
27196{ echo "$as_me:$LINENO: checking for $ac_func" >&5
27197echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
27198if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
27199 echo $ECHO_N "(cached) $ECHO_C" >&6
27200else
27201 cat >conftest.$ac_ext <<_ACEOF
27202/* confdefs.h. */
27203_ACEOF
27204cat confdefs.h >>conftest.$ac_ext
27205cat >>conftest.$ac_ext <<_ACEOF
27206/* end confdefs.h. */
27207/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
27208 For example, HP-UX 11i <limits.h> declares gettimeofday. */
27209#define $ac_func innocuous_$ac_func
27210
27211/* System header to define __stub macros and hopefully few prototypes,
27212 which can conflict with char $ac_func (); below.
27213 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27214 <limits.h> exists even on freestanding compilers. */
27215
27216#ifdef __STDC__
27217# include <limits.h>
27218#else
27219# include <assert.h>
27220#endif
27221
27222#undef $ac_func
27223
27224/* Override any GCC internal prototype to avoid an error.
27225 Use char because int might match the return type of a GCC
27226 builtin and then its argument prototype would still apply. */
27227#ifdef __cplusplus
27228extern "C"
27229#endif
27230char $ac_func ();
27231/* The GNU C library defines this for functions which it implements
27232 to always fail with ENOSYS. Some functions are actually named
27233 something starting with __ and the normal name is an alias. */
27234#if defined __stub_$ac_func || defined __stub___$ac_func
27235choke me
27236#endif
27237 14361
27238int 14362int
27239main () 14363main ()
27240{ 14364{
27241return $ac_func (); 14365
14366 res_query (0, 0, 0, 0, 0);
14367
27242 ; 14368 ;
27243 return 0; 14369 return 0;
27244} 14370}
27245_ACEOF 14371_ACEOF
27246rm -f conftest.$ac_objext conftest$ac_exeext 14372if ac_fn_c_try_link "$LINENO"; then :
27247if { (ac_try="$ac_link" 14373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27248case "(($ac_try" in 14374$as_echo "yes" >&6; }
27249 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27250 *) ac_try_echo=$ac_try;;
27251esac
27252eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27253 (eval "$ac_link") 2>conftest.er1
27254 ac_status=$?
27255 grep -v '^ *+' conftest.er1 >conftest.err
27256 rm -f conftest.er1
27257 cat conftest.err >&5
27258 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27259 (exit $ac_status); } && {
27260 test -z "$ac_c_werror_flag" ||
27261 test ! -s conftest.err
27262 } && test -s conftest$ac_exeext &&
27263 $as_test_x conftest$ac_exeext; then
27264 eval "$as_ac_var=yes"
27265else 14375else
27266 echo "$as_me: failed program was:" >&5 14376 LIBS="$saved_LIBS"
27267sed 's/^/| /' conftest.$ac_ext >&5 14377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27268 14378$as_echo "no" >&6; }
27269 eval "$as_ac_var=no"
27270fi 14379fi
14380rm -f core conftest.err conftest.$ac_objext \
14381 conftest$ac_exeext conftest.$ac_ext
27271 14382
27272rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27273 conftest$ac_exeext conftest.$ac_ext
27274fi 14383fi
27275ac_res=`eval echo '${'$as_ac_var'}'` 14384rm -f core conftest.err conftest.$ac_objext \
27276 { echo "$as_me:$LINENO: result: $ac_res" >&5 14385 conftest$ac_exeext conftest.$ac_ext
27277echo "${ECHO_T}$ac_res" >&6; } 14386 for ac_func in _getshort _getlong
27278if test `eval echo '${'$as_ac_var'}'` = yes; then 14387do :
14388 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
14389ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
14390if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
27279 cat >>confdefs.h <<_ACEOF 14391 cat >>confdefs.h <<_ACEOF
27280#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 14392#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
27281_ACEOF 14393_ACEOF
27282 14394
27283fi 14395fi
27284done 14396done
27285 14397
27286 { echo "$as_me:$LINENO: checking whether _getshort is declared" >&5 14398 ac_fn_c_check_decl "$LINENO" "_getshort" "ac_cv_have_decl__getshort" "#include <sys/types.h>
27287echo $ECHO_N "checking whether _getshort is declared... $ECHO_C" >&6; }
27288if test "${ac_cv_have_decl__getshort+set}" = set; then
27289 echo $ECHO_N "(cached) $ECHO_C" >&6
27290else
27291 cat >conftest.$ac_ext <<_ACEOF
27292/* confdefs.h. */
27293_ACEOF
27294cat confdefs.h >>conftest.$ac_ext
27295cat >>conftest.$ac_ext <<_ACEOF
27296/* end confdefs.h. */
27297#include <sys/types.h>
27298 #include <arpa/nameser.h> 14399 #include <arpa/nameser.h>
27299 14400"
27300int 14401if test "x$ac_cv_have_decl__getshort" = xyes; then :
27301main () 14402 ac_have_decl=1
27302{
27303#ifndef _getshort
27304 (void) _getshort;
27305#endif
27306
27307 ;
27308 return 0;
27309}
27310_ACEOF
27311rm -f conftest.$ac_objext
27312if { (ac_try="$ac_compile"
27313case "(($ac_try" in
27314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27315 *) ac_try_echo=$ac_try;;
27316esac
27317eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27318 (eval "$ac_compile") 2>conftest.er1
27319 ac_status=$?
27320 grep -v '^ *+' conftest.er1 >conftest.err
27321 rm -f conftest.er1
27322 cat conftest.err >&5
27323 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27324 (exit $ac_status); } && {
27325 test -z "$ac_c_werror_flag" ||
27326 test ! -s conftest.err
27327 } && test -s conftest.$ac_objext; then
27328 ac_cv_have_decl__getshort=yes
27329else 14403else
27330 echo "$as_me: failed program was:" >&5 14404 ac_have_decl=0
27331sed 's/^/| /' conftest.$ac_ext >&5
27332
27333 ac_cv_have_decl__getshort=no
27334fi 14405fi
27335 14406
27336rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27337fi
27338{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__getshort" >&5
27339echo "${ECHO_T}$ac_cv_have_decl__getshort" >&6; }
27340if test $ac_cv_have_decl__getshort = yes; then
27341
27342cat >>confdefs.h <<_ACEOF 14407cat >>confdefs.h <<_ACEOF
27343#define HAVE_DECL__GETSHORT 1 14408#define HAVE_DECL__GETSHORT $ac_have_decl
27344_ACEOF
27345
27346
27347else
27348 cat >>confdefs.h <<_ACEOF
27349#define HAVE_DECL__GETSHORT 0
27350_ACEOF
27351
27352
27353fi
27354{ echo "$as_me:$LINENO: checking whether _getlong is declared" >&5
27355echo $ECHO_N "checking whether _getlong is declared... $ECHO_C" >&6; }
27356if test "${ac_cv_have_decl__getlong+set}" = set; then
27357 echo $ECHO_N "(cached) $ECHO_C" >&6
27358else
27359 cat >conftest.$ac_ext <<_ACEOF
27360/* confdefs.h. */
27361_ACEOF 14409_ACEOF
27362cat confdefs.h >>conftest.$ac_ext 14410ac_fn_c_check_decl "$LINENO" "_getlong" "ac_cv_have_decl__getlong" "#include <sys/types.h>
27363cat >>conftest.$ac_ext <<_ACEOF
27364/* end confdefs.h. */
27365#include <sys/types.h>
27366 #include <arpa/nameser.h> 14411 #include <arpa/nameser.h>
27367 14412"
27368int 14413if test "x$ac_cv_have_decl__getlong" = xyes; then :
27369main () 14414 ac_have_decl=1
27370{
27371#ifndef _getlong
27372 (void) _getlong;
27373#endif
27374
27375 ;
27376 return 0;
27377}
27378_ACEOF
27379rm -f conftest.$ac_objext
27380if { (ac_try="$ac_compile"
27381case "(($ac_try" in
27382 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27383 *) ac_try_echo=$ac_try;;
27384esac
27385eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27386 (eval "$ac_compile") 2>conftest.er1
27387 ac_status=$?
27388 grep -v '^ *+' conftest.er1 >conftest.err
27389 rm -f conftest.er1
27390 cat conftest.err >&5
27391 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27392 (exit $ac_status); } && {
27393 test -z "$ac_c_werror_flag" ||
27394 test ! -s conftest.err
27395 } && test -s conftest.$ac_objext; then
27396 ac_cv_have_decl__getlong=yes
27397else 14415else
27398 echo "$as_me: failed program was:" >&5 14416 ac_have_decl=0
27399sed 's/^/| /' conftest.$ac_ext >&5
27400
27401 ac_cv_have_decl__getlong=no
27402fi
27403
27404rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27405fi 14417fi
27406{ echo "$as_me:$LINENO: result: $ac_cv_have_decl__getlong" >&5
27407echo "${ECHO_T}$ac_cv_have_decl__getlong" >&6; }
27408if test $ac_cv_have_decl__getlong = yes; then
27409 14418
27410cat >>confdefs.h <<_ACEOF 14419cat >>confdefs.h <<_ACEOF
27411#define HAVE_DECL__GETLONG 1 14420#define HAVE_DECL__GETLONG $ac_have_decl
27412_ACEOF
27413
27414
27415else
27416 cat >>confdefs.h <<_ACEOF
27417#define HAVE_DECL__GETLONG 0
27418_ACEOF 14421_ACEOF
27419 14422
14423 ac_fn_c_check_member "$LINENO" "HEADER" "ad" "ac_cv_member_HEADER_ad" "#include <arpa/nameser.h>
14424"
14425if test "x$ac_cv_member_HEADER_ad" = xyes; then :
27420 14426
27421fi 14427$as_echo "#define HAVE_HEADER_AD 1" >>confdefs.h
27422
27423
27424 { echo "$as_me:$LINENO: checking for HEADER.ad" >&5
27425echo $ECHO_N "checking for HEADER.ad... $ECHO_C" >&6; }
27426if test "${ac_cv_member_HEADER_ad+set}" = set; then
27427 echo $ECHO_N "(cached) $ECHO_C" >&6
27428else
27429 cat >conftest.$ac_ext <<_ACEOF
27430/* confdefs.h. */
27431_ACEOF
27432cat confdefs.h >>conftest.$ac_ext
27433cat >>conftest.$ac_ext <<_ACEOF
27434/* end confdefs.h. */
27435#include <arpa/nameser.h>
27436
27437int
27438main ()
27439{
27440static HEADER ac_aggr;
27441if (ac_aggr.ad)
27442return 0;
27443 ;
27444 return 0;
27445}
27446_ACEOF
27447rm -f conftest.$ac_objext
27448if { (ac_try="$ac_compile"
27449case "(($ac_try" in
27450 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27451 *) ac_try_echo=$ac_try;;
27452esac
27453eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27454 (eval "$ac_compile") 2>conftest.er1
27455 ac_status=$?
27456 grep -v '^ *+' conftest.er1 >conftest.err
27457 rm -f conftest.er1
27458 cat conftest.err >&5
27459 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27460 (exit $ac_status); } && {
27461 test -z "$ac_c_werror_flag" ||
27462 test ! -s conftest.err
27463 } && test -s conftest.$ac_objext; then
27464 ac_cv_member_HEADER_ad=yes
27465else
27466 echo "$as_me: failed program was:" >&5
27467sed 's/^/| /' conftest.$ac_ext >&5
27468
27469 cat >conftest.$ac_ext <<_ACEOF
27470/* confdefs.h. */
27471_ACEOF
27472cat confdefs.h >>conftest.$ac_ext
27473cat >>conftest.$ac_ext <<_ACEOF
27474/* end confdefs.h. */
27475#include <arpa/nameser.h>
27476
27477int
27478main ()
27479{
27480static HEADER ac_aggr;
27481if (sizeof ac_aggr.ad)
27482return 0;
27483 ;
27484 return 0;
27485}
27486_ACEOF
27487rm -f conftest.$ac_objext
27488if { (ac_try="$ac_compile"
27489case "(($ac_try" in
27490 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27491 *) ac_try_echo=$ac_try;;
27492esac
27493eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27494 (eval "$ac_compile") 2>conftest.er1
27495 ac_status=$?
27496 grep -v '^ *+' conftest.er1 >conftest.err
27497 rm -f conftest.er1
27498 cat conftest.err >&5
27499 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27500 (exit $ac_status); } && {
27501 test -z "$ac_c_werror_flag" ||
27502 test ! -s conftest.err
27503 } && test -s conftest.$ac_objext; then
27504 ac_cv_member_HEADER_ad=yes
27505else
27506 echo "$as_me: failed program was:" >&5
27507sed 's/^/| /' conftest.$ac_ext >&5
27508
27509 ac_cv_member_HEADER_ad=no
27510fi
27511
27512rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27513fi
27514
27515rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27516fi
27517{ echo "$as_me:$LINENO: result: $ac_cv_member_HEADER_ad" >&5
27518echo "${ECHO_T}$ac_cv_member_HEADER_ad" >&6; }
27519if test $ac_cv_member_HEADER_ad = yes; then
27520
27521cat >>confdefs.h <<\_ACEOF
27522#define HAVE_HEADER_AD 1
27523_ACEOF
27524 14428
27525fi 14429fi
27526 14430
@@ -27528,9 +14432,10 @@ fi
27528fi 14432fi
27529 14433
27530 14434
27531{ echo "$as_me:$LINENO: checking if struct __res_state _res is an extern" >&5 14435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if struct __res_state _res is an extern" >&5
27532echo $ECHO_N "checking if struct __res_state _res is an extern... $ECHO_C" >&6; } 14436$as_echo_n "checking if struct __res_state _res is an extern... " >&6; }
27533cat >conftest.$ac_ext <<_ACEOF 14437cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14438/* end confdefs.h. */
27534 14439
27535#include <stdio.h> 14440#include <stdio.h>
27536#if HAVE_SYS_TYPES_H 14441#if HAVE_SYS_TYPES_H
@@ -27540,212 +14445,58 @@ cat >conftest.$ac_ext <<_ACEOF
27540#include <arpa/nameser.h> 14445#include <arpa/nameser.h>
27541#include <resolv.h> 14446#include <resolv.h>
27542extern struct __res_state _res; 14447extern struct __res_state _res;
27543int main() { return 0; }
27544 14448
27545_ACEOF 14449int
27546rm -f conftest.$ac_objext conftest$ac_exeext 14450main ()
27547if { (ac_try="$ac_link" 14451{
27548case "(($ac_try" in
27549 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27550 *) ac_try_echo=$ac_try;;
27551esac
27552eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27553 (eval "$ac_link") 2>conftest.er1
27554 ac_status=$?
27555 grep -v '^ *+' conftest.er1 >conftest.err
27556 rm -f conftest.er1
27557 cat conftest.err >&5
27558 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27559 (exit $ac_status); } && {
27560 test -z "$ac_c_werror_flag" ||
27561 test ! -s conftest.err
27562 } && test -s conftest$ac_exeext &&
27563 $as_test_x conftest$ac_exeext; then
27564 { echo "$as_me:$LINENO: result: yes" >&5
27565echo "${ECHO_T}yes" >&6; }
27566 14452
27567cat >>confdefs.h <<\_ACEOF 14453 ;
27568#define HAVE__RES_EXTERN 1 14454 return 0;
14455}
27569_ACEOF 14456_ACEOF
14457if ac_fn_c_try_link "$LINENO"; then :
14458 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
14459$as_echo "yes" >&6; }
27570 14460
14461$as_echo "#define HAVE__RES_EXTERN 1" >>confdefs.h
27571 14462
27572else
27573 echo "$as_me: failed program was:" >&5
27574sed 's/^/| /' conftest.$ac_ext >&5
27575 14463
27576 { echo "$as_me:$LINENO: result: no" >&5 14464else
27577echo "${ECHO_T}no" >&6; } 14465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14466$as_echo "no" >&6; }
27578 14467
27579fi 14468fi
27580 14469rm -f core conftest.err conftest.$ac_objext \
27581rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14470 conftest$ac_exeext conftest.$ac_ext
27582 conftest$ac_exeext conftest.$ac_ext
27583 14471
27584# Check whether user wants SELinux support 14472# Check whether user wants SELinux support
27585SELINUX_MSG="no" 14473SELINUX_MSG="no"
27586LIBSELINUX="" 14474LIBSELINUX=""
27587 14475
27588# Check whether --with-selinux was given. 14476# Check whether --with-selinux was given.
27589if test "${with_selinux+set}" = set; then 14477if test "${with_selinux+set}" = set; then :
27590 withval=$with_selinux; if test "x$withval" != "xno" ; then 14478 withval=$with_selinux; if test "x$withval" != "xno" ; then
27591 save_LIBS="$LIBS" 14479 save_LIBS="$LIBS"
27592 14480
27593cat >>confdefs.h <<\_ACEOF 14481$as_echo "#define WITH_SELINUX 1" >>confdefs.h
27594#define WITH_SELINUX 1
27595_ACEOF
27596 14482
27597 SELINUX_MSG="yes" 14483 SELINUX_MSG="yes"
27598 if test "${ac_cv_header_selinux_selinux_h+set}" = set; then 14484 ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
27599 { echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5 14485if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
27600echo $ECHO_N "checking for selinux/selinux.h... $ECHO_C" >&6; }
27601if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
27602 echo $ECHO_N "(cached) $ECHO_C" >&6
27603fi
27604{ echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5
27605echo "${ECHO_T}$ac_cv_header_selinux_selinux_h" >&6; }
27606else
27607 # Is the header compilable?
27608{ echo "$as_me:$LINENO: checking selinux/selinux.h usability" >&5
27609echo $ECHO_N "checking selinux/selinux.h usability... $ECHO_C" >&6; }
27610cat >conftest.$ac_ext <<_ACEOF
27611/* confdefs.h. */
27612_ACEOF
27613cat confdefs.h >>conftest.$ac_ext
27614cat >>conftest.$ac_ext <<_ACEOF
27615/* end confdefs.h. */
27616$ac_includes_default
27617#include <selinux/selinux.h>
27618_ACEOF
27619rm -f conftest.$ac_objext
27620if { (ac_try="$ac_compile"
27621case "(($ac_try" in
27622 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27623 *) ac_try_echo=$ac_try;;
27624esac
27625eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27626 (eval "$ac_compile") 2>conftest.er1
27627 ac_status=$?
27628 grep -v '^ *+' conftest.er1 >conftest.err
27629 rm -f conftest.er1
27630 cat conftest.err >&5
27631 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27632 (exit $ac_status); } && {
27633 test -z "$ac_c_werror_flag" ||
27634 test ! -s conftest.err
27635 } && test -s conftest.$ac_objext; then
27636 ac_header_compiler=yes
27637else
27638 echo "$as_me: failed program was:" >&5
27639sed 's/^/| /' conftest.$ac_ext >&5
27640
27641 ac_header_compiler=no
27642fi
27643
27644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27645{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
27646echo "${ECHO_T}$ac_header_compiler" >&6; }
27647
27648# Is the header present?
27649{ echo "$as_me:$LINENO: checking selinux/selinux.h presence" >&5
27650echo $ECHO_N "checking selinux/selinux.h presence... $ECHO_C" >&6; }
27651cat >conftest.$ac_ext <<_ACEOF
27652/* confdefs.h. */
27653_ACEOF
27654cat confdefs.h >>conftest.$ac_ext
27655cat >>conftest.$ac_ext <<_ACEOF
27656/* end confdefs.h. */
27657#include <selinux/selinux.h>
27658_ACEOF
27659if { (ac_try="$ac_cpp conftest.$ac_ext"
27660case "(($ac_try" in
27661 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27662 *) ac_try_echo=$ac_try;;
27663esac
27664eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27665 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
27666 ac_status=$?
27667 grep -v '^ *+' conftest.er1 >conftest.err
27668 rm -f conftest.er1
27669 cat conftest.err >&5
27670 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27671 (exit $ac_status); } >/dev/null && {
27672 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
27673 test ! -s conftest.err
27674 }; then
27675 ac_header_preproc=yes
27676else
27677 echo "$as_me: failed program was:" >&5
27678sed 's/^/| /' conftest.$ac_ext >&5
27679
27680 ac_header_preproc=no
27681fi
27682
27683rm -f conftest.err conftest.$ac_ext
27684{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
27685echo "${ECHO_T}$ac_header_preproc" >&6; }
27686
27687# So? What about this header?
27688case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
27689 yes:no: )
27690 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&5
27691echo "$as_me: WARNING: selinux/selinux.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
27692 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&5
27693echo "$as_me: WARNING: selinux/selinux.h: proceeding with the compiler's result" >&2;}
27694 ac_header_preproc=yes
27695 ;;
27696 no:yes:* )
27697 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: present but cannot be compiled" >&5
27698echo "$as_me: WARNING: selinux/selinux.h: present but cannot be compiled" >&2;}
27699 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&5
27700echo "$as_me: WARNING: selinux/selinux.h: check for missing prerequisite headers?" >&2;}
27701 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: see the Autoconf documentation" >&5
27702echo "$as_me: WARNING: selinux/selinux.h: see the Autoconf documentation" >&2;}
27703 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&5
27704echo "$as_me: WARNING: selinux/selinux.h: section \"Present But Cannot Be Compiled\"" >&2;}
27705 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&5
27706echo "$as_me: WARNING: selinux/selinux.h: proceeding with the preprocessor's result" >&2;}
27707 { echo "$as_me:$LINENO: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&5
27708echo "$as_me: WARNING: selinux/selinux.h: in the future, the compiler will take precedence" >&2;}
27709 ( cat <<\_ASBOX
27710## ------------------------------------------- ##
27711## Report this to openssh-unix-dev@mindrot.org ##
27712## ------------------------------------------- ##
27713_ASBOX
27714 ) | sed "s/^/$as_me: WARNING: /" >&2
27715 ;;
27716esac
27717{ echo "$as_me:$LINENO: checking for selinux/selinux.h" >&5
27718echo $ECHO_N "checking for selinux/selinux.h... $ECHO_C" >&6; }
27719if test "${ac_cv_header_selinux_selinux_h+set}" = set; then
27720 echo $ECHO_N "(cached) $ECHO_C" >&6
27721else
27722 ac_cv_header_selinux_selinux_h=$ac_header_preproc
27723fi
27724{ echo "$as_me:$LINENO: result: $ac_cv_header_selinux_selinux_h" >&5
27725echo "${ECHO_T}$ac_cv_header_selinux_selinux_h" >&6; }
27726 14486
27727fi
27728if test $ac_cv_header_selinux_selinux_h = yes; then
27729 :
27730else 14487else
27731 { { echo "$as_me:$LINENO: error: SELinux support requires selinux.h header" >&5 14488 as_fn_error $? "SELinux support requires selinux.h header" "$LINENO" 5
27732echo "$as_me: error: SELinux support requires selinux.h header" >&2;}
27733 { (exit 1); exit 1; }; }
27734fi 14489fi
27735 14490
27736 14491
27737 { echo "$as_me:$LINENO: checking for setexeccon in -lselinux" >&5 14492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setexeccon in -lselinux" >&5
27738echo $ECHO_N "checking for setexeccon in -lselinux... $ECHO_C" >&6; } 14493$as_echo_n "checking for setexeccon in -lselinux... " >&6; }
27739if test "${ac_cv_lib_selinux_setexeccon+set}" = set; then 14494if ${ac_cv_lib_selinux_setexeccon+:} false; then :
27740 echo $ECHO_N "(cached) $ECHO_C" >&6 14495 $as_echo_n "(cached) " >&6
27741else 14496else
27742 ac_check_lib_save_LIBS=$LIBS 14497 ac_check_lib_save_LIBS=$LIBS
27743LIBS="-lselinux $LIBS" 14498LIBS="-lselinux $LIBS"
27744cat >conftest.$ac_ext <<_ACEOF 14499cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27745/* confdefs.h. */
27746_ACEOF
27747cat confdefs.h >>conftest.$ac_ext
27748cat >>conftest.$ac_ext <<_ACEOF
27749/* end confdefs.h. */ 14500/* end confdefs.h. */
27750 14501
27751/* Override any GCC internal prototype to avoid an error. 14502/* Override any GCC internal prototype to avoid an error.
@@ -27763,140 +14514,34 @@ return setexeccon ();
27763 return 0; 14514 return 0;
27764} 14515}
27765_ACEOF 14516_ACEOF
27766rm -f conftest.$ac_objext conftest$ac_exeext 14517if ac_fn_c_try_link "$LINENO"; then :
27767if { (ac_try="$ac_link"
27768case "(($ac_try" in
27769 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27770 *) ac_try_echo=$ac_try;;
27771esac
27772eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27773 (eval "$ac_link") 2>conftest.er1
27774 ac_status=$?
27775 grep -v '^ *+' conftest.er1 >conftest.err
27776 rm -f conftest.er1
27777 cat conftest.err >&5
27778 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27779 (exit $ac_status); } && {
27780 test -z "$ac_c_werror_flag" ||
27781 test ! -s conftest.err
27782 } && test -s conftest$ac_exeext &&
27783 $as_test_x conftest$ac_exeext; then
27784 ac_cv_lib_selinux_setexeccon=yes 14518 ac_cv_lib_selinux_setexeccon=yes
27785else 14519else
27786 echo "$as_me: failed program was:" >&5 14520 ac_cv_lib_selinux_setexeccon=no
27787sed 's/^/| /' conftest.$ac_ext >&5
27788
27789 ac_cv_lib_selinux_setexeccon=no
27790fi 14521fi
27791 14522rm -f core conftest.err conftest.$ac_objext \
27792rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14523 conftest$ac_exeext conftest.$ac_ext
27793 conftest$ac_exeext conftest.$ac_ext
27794LIBS=$ac_check_lib_save_LIBS 14524LIBS=$ac_check_lib_save_LIBS
27795fi 14525fi
27796{ echo "$as_me:$LINENO: result: $ac_cv_lib_selinux_setexeccon" >&5 14526{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_selinux_setexeccon" >&5
27797echo "${ECHO_T}$ac_cv_lib_selinux_setexeccon" >&6; } 14527$as_echo "$ac_cv_lib_selinux_setexeccon" >&6; }
27798if test $ac_cv_lib_selinux_setexeccon = yes; then 14528if test "x$ac_cv_lib_selinux_setexeccon" = xyes; then :
27799 LIBSELINUX="-lselinux" 14529 LIBSELINUX="-lselinux"
27800 LIBS="$LIBS -lselinux" 14530 LIBS="$LIBS -lselinux"
27801 14531
27802else 14532else
27803 { { echo "$as_me:$LINENO: error: SELinux support requires libselinux library" >&5 14533 as_fn_error $? "SELinux support requires libselinux library" "$LINENO" 5
27804echo "$as_me: error: SELinux support requires libselinux library" >&2;}
27805 { (exit 1); exit 1; }; }
27806fi 14534fi
27807 14535
27808 SSHLIBS="$SSHLIBS $LIBSELINUX" 14536 SSHLIBS="$SSHLIBS $LIBSELINUX"
27809 SSHDLIBS="$SSHDLIBS $LIBSELINUX" 14537 SSHDLIBS="$SSHDLIBS $LIBSELINUX"
27810 14538 for ac_func in getseuserbyname get_default_context_with_level
27811 14539do :
27812for ac_func in getseuserbyname get_default_context_with_level 14540 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
27813do 14541ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
27814as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` 14542if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
27815{ echo "$as_me:$LINENO: checking for $ac_func" >&5
27816echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; }
27817if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
27818 echo $ECHO_N "(cached) $ECHO_C" >&6
27819else
27820 cat >conftest.$ac_ext <<_ACEOF
27821/* confdefs.h. */
27822_ACEOF
27823cat confdefs.h >>conftest.$ac_ext
27824cat >>conftest.$ac_ext <<_ACEOF
27825/* end confdefs.h. */
27826/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
27827 For example, HP-UX 11i <limits.h> declares gettimeofday. */
27828#define $ac_func innocuous_$ac_func
27829
27830/* System header to define __stub macros and hopefully few prototypes,
27831 which can conflict with char $ac_func (); below.
27832 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
27833 <limits.h> exists even on freestanding compilers. */
27834
27835#ifdef __STDC__
27836# include <limits.h>
27837#else
27838# include <assert.h>
27839#endif
27840
27841#undef $ac_func
27842
27843/* Override any GCC internal prototype to avoid an error.
27844 Use char because int might match the return type of a GCC
27845 builtin and then its argument prototype would still apply. */
27846#ifdef __cplusplus
27847extern "C"
27848#endif
27849char $ac_func ();
27850/* The GNU C library defines this for functions which it implements
27851 to always fail with ENOSYS. Some functions are actually named
27852 something starting with __ and the normal name is an alias. */
27853#if defined __stub_$ac_func || defined __stub___$ac_func
27854choke me
27855#endif
27856
27857int
27858main ()
27859{
27860return $ac_func ();
27861 ;
27862 return 0;
27863}
27864_ACEOF
27865rm -f conftest.$ac_objext conftest$ac_exeext
27866if { (ac_try="$ac_link"
27867case "(($ac_try" in
27868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
27869 *) ac_try_echo=$ac_try;;
27870esac
27871eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
27872 (eval "$ac_link") 2>conftest.er1
27873 ac_status=$?
27874 grep -v '^ *+' conftest.er1 >conftest.err
27875 rm -f conftest.er1
27876 cat conftest.err >&5
27877 echo "$as_me:$LINENO: \$? = $ac_status" >&5
27878 (exit $ac_status); } && {
27879 test -z "$ac_c_werror_flag" ||
27880 test ! -s conftest.err
27881 } && test -s conftest$ac_exeext &&
27882 $as_test_x conftest$ac_exeext; then
27883 eval "$as_ac_var=yes"
27884else
27885 echo "$as_me: failed program was:" >&5
27886sed 's/^/| /' conftest.$ac_ext >&5
27887
27888 eval "$as_ac_var=no"
27889fi
27890
27891rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
27892 conftest$ac_exeext conftest.$ac_ext
27893fi
27894ac_res=`eval echo '${'$as_ac_var'}'`
27895 { echo "$as_me:$LINENO: result: $ac_res" >&5
27896echo "${ECHO_T}$ac_res" >&6; }
27897if test `eval echo '${'$as_ac_var'}'` = yes; then
27898 cat >>confdefs.h <<_ACEOF 14543 cat >>confdefs.h <<_ACEOF
27899#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 14544#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
27900_ACEOF 14545_ACEOF
27901 14546
27902fi 14547fi
@@ -27914,7 +14559,7 @@ fi
27914KRB5_MSG="no" 14559KRB5_MSG="no"
27915 14560
27916# Check whether --with-kerberos5 was given. 14561# Check whether --with-kerberos5 was given.
27917if test "${with_kerberos5+set}" = set; then 14562if test "${with_kerberos5+set}" = set; then :
27918 withval=$with_kerberos5; if test "x$withval" != "xno" ; then 14563 withval=$with_kerberos5; if test "x$withval" != "xno" ; then
27919 if test "x$withval" = "xyes" ; then 14564 if test "x$withval" = "xyes" ; then
27920 KRB5ROOT="/usr/local" 14565 KRB5ROOT="/usr/local"
@@ -27923,18 +14568,16 @@ if test "${with_kerberos5+set}" = set; then
27923 fi 14568 fi
27924 14569
27925 14570
27926cat >>confdefs.h <<\_ACEOF 14571$as_echo "#define KRB5 1" >>confdefs.h
27927#define KRB5 1
27928_ACEOF
27929 14572
27930 KRB5_MSG="yes" 14573 KRB5_MSG="yes"
27931 14574
27932 # Extract the first word of "krb5-config", so it can be a program name with args. 14575 # Extract the first word of "krb5-config", so it can be a program name with args.
27933set dummy krb5-config; ac_word=$2 14576set dummy krb5-config; ac_word=$2
27934{ echo "$as_me:$LINENO: checking for $ac_word" >&5 14577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
27935echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 14578$as_echo_n "checking for $ac_word... " >&6; }
27936if test "${ac_cv_path_KRB5CONF+set}" = set; then 14579if ${ac_cv_path_KRB5CONF+:} false; then :
27937 echo $ECHO_N "(cached) $ECHO_C" >&6 14580 $as_echo_n "(cached) " >&6
27938else 14581else
27939 case $KRB5CONF in 14582 case $KRB5CONF in
27940 [\\/]* | ?:[\\/]*) 14583 [\\/]* | ?:[\\/]*)
@@ -27947,14 +14590,14 @@ for as_dir in $as_dummy
27947do 14590do
27948 IFS=$as_save_IFS 14591 IFS=$as_save_IFS
27949 test -z "$as_dir" && as_dir=. 14592 test -z "$as_dir" && as_dir=.
27950 for ac_exec_ext in '' $ac_executable_extensions; do 14593 for ac_exec_ext in '' $ac_executable_extensions; do
27951 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 14594 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
27952 ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext" 14595 ac_cv_path_KRB5CONF="$as_dir/$ac_word$ac_exec_ext"
27953 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 14596 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
27954 break 2 14597 break 2
27955 fi 14598 fi
27956done 14599done
27957done 14600 done
27958IFS=$as_save_IFS 14601IFS=$as_save_IFS
27959 14602
27960 test -z "$ac_cv_path_KRB5CONF" && ac_cv_path_KRB5CONF="$KRB5ROOT/bin/krb5-config" 14603 test -z "$ac_cv_path_KRB5CONF" && ac_cv_path_KRB5CONF="$KRB5ROOT/bin/krb5-config"
@@ -27963,44 +14606,39 @@ esac
27963fi 14606fi
27964KRB5CONF=$ac_cv_path_KRB5CONF 14607KRB5CONF=$ac_cv_path_KRB5CONF
27965if test -n "$KRB5CONF"; then 14608if test -n "$KRB5CONF"; then
27966 { echo "$as_me:$LINENO: result: $KRB5CONF" >&5 14609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $KRB5CONF" >&5
27967echo "${ECHO_T}$KRB5CONF" >&6; } 14610$as_echo "$KRB5CONF" >&6; }
27968else 14611else
27969 { echo "$as_me:$LINENO: result: no" >&5 14612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27970echo "${ECHO_T}no" >&6; } 14613$as_echo "no" >&6; }
27971fi 14614fi
27972 14615
27973 14616
27974 if test -x $KRB5CONF ; then 14617 if test -x $KRB5CONF ; then
27975 14618
27976 { echo "$as_me:$LINENO: checking for gssapi support" >&5 14619 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gssapi support" >&5
27977echo $ECHO_N "checking for gssapi support... $ECHO_C" >&6; } 14620$as_echo_n "checking for gssapi support... " >&6; }
27978 if $KRB5CONF | grep gssapi >/dev/null ; then 14621 if $KRB5CONF | grep gssapi >/dev/null ; then
27979 { echo "$as_me:$LINENO: result: yes" >&5 14622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
27980echo "${ECHO_T}yes" >&6; } 14623$as_echo "yes" >&6; }
27981 14624
27982cat >>confdefs.h <<\_ACEOF 14625$as_echo "#define GSSAPI 1" >>confdefs.h
27983#define GSSAPI 1
27984_ACEOF
27985 14626
27986 k5confopts=gssapi 14627 k5confopts=gssapi
27987 else 14628 else
27988 { echo "$as_me:$LINENO: result: no" >&5 14629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
27989echo "${ECHO_T}no" >&6; } 14630$as_echo "no" >&6; }
27990 k5confopts="" 14631 k5confopts=""
27991 fi 14632 fi
27992 K5CFLAGS="`$KRB5CONF --cflags $k5confopts`" 14633 K5CFLAGS="`$KRB5CONF --cflags $k5confopts`"
27993 K5LIBS="`$KRB5CONF --libs $k5confopts`" 14634 K5LIBS="`$KRB5CONF --libs $k5confopts`"
27994 CPPFLAGS="$CPPFLAGS $K5CFLAGS" 14635 CPPFLAGS="$CPPFLAGS $K5CFLAGS"
27995 { echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5 14636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
27996echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6; } 14637$as_echo_n "checking whether we are using Heimdal... " >&6; }
27997 cat >conftest.$ac_ext <<_ACEOF 14638 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27998/* confdefs.h. */
27999_ACEOF
28000cat confdefs.h >>conftest.$ac_ext
28001cat >>conftest.$ac_ext <<_ACEOF
28002/* end confdefs.h. */ 14639/* end confdefs.h. */
28003 #include <krb5.h> 14640 #include <krb5.h>
14641
28004int 14642int
28005main () 14643main ()
28006{ 14644{
@@ -28009,52 +14647,27 @@ main ()
28009 return 0; 14647 return 0;
28010} 14648}
28011_ACEOF 14649_ACEOF
28012rm -f conftest.$ac_objext 14650if ac_fn_c_try_compile "$LINENO"; then :
28013if { (ac_try="$ac_compile" 14651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28014case "(($ac_try" in 14652$as_echo "yes" >&6; }
28015 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28016 *) ac_try_echo=$ac_try;;
28017esac
28018eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28019 (eval "$ac_compile") 2>conftest.er1
28020 ac_status=$?
28021 grep -v '^ *+' conftest.er1 >conftest.err
28022 rm -f conftest.er1
28023 cat conftest.err >&5
28024 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28025 (exit $ac_status); } && {
28026 test -z "$ac_c_werror_flag" ||
28027 test ! -s conftest.err
28028 } && test -s conftest.$ac_objext; then
28029 { echo "$as_me:$LINENO: result: yes" >&5
28030echo "${ECHO_T}yes" >&6; }
28031 14653
28032cat >>confdefs.h <<\_ACEOF 14654$as_echo "#define HEIMDAL 1" >>confdefs.h
28033#define HEIMDAL 1
28034_ACEOF
28035 14655
28036else 14656else
28037 echo "$as_me: failed program was:" >&5 14657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28038sed 's/^/| /' conftest.$ac_ext >&5 14658$as_echo "no" >&6; }
28039
28040 { echo "$as_me:$LINENO: result: no" >&5
28041echo "${ECHO_T}no" >&6; }
28042 14659
28043fi 14660fi
28044
28045rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28046 else 14662 else
28047 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include" 14663 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
28048 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib" 14664 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
28049 { echo "$as_me:$LINENO: checking whether we are using Heimdal" >&5 14665 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using Heimdal" >&5
28050echo $ECHO_N "checking whether we are using Heimdal... $ECHO_C" >&6; } 14666$as_echo_n "checking whether we are using Heimdal... " >&6; }
28051 cat >conftest.$ac_ext <<_ACEOF 14667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28052/* confdefs.h. */
28053_ACEOF
28054cat confdefs.h >>conftest.$ac_ext
28055cat >>conftest.$ac_ext <<_ACEOF
28056/* end confdefs.h. */ 14668/* end confdefs.h. */
28057 #include <krb5.h> 14669 #include <krb5.h>
14670
28058int 14671int
28059main () 14672main ()
28060{ 14673{
@@ -28063,43 +14676,21 @@ main ()
28063 return 0; 14676 return 0;
28064} 14677}
28065_ACEOF 14678_ACEOF
28066rm -f conftest.$ac_objext 14679if ac_fn_c_try_compile "$LINENO"; then :
28067if { (ac_try="$ac_compile" 14680 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
28068case "(($ac_try" in 14681$as_echo "yes" >&6; }
28069 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 14682 $as_echo "#define HEIMDAL 1" >>confdefs.h
28070 *) ac_try_echo=$ac_try;;
28071esac
28072eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28073 (eval "$ac_compile") 2>conftest.er1
28074 ac_status=$?
28075 grep -v '^ *+' conftest.er1 >conftest.err
28076 rm -f conftest.er1
28077 cat conftest.err >&5
28078 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28079 (exit $ac_status); } && {
28080 test -z "$ac_c_werror_flag" ||
28081 test ! -s conftest.err
28082 } && test -s conftest.$ac_objext; then
28083 { echo "$as_me:$LINENO: result: yes" >&5
28084echo "${ECHO_T}yes" >&6; }
28085 cat >>confdefs.h <<\_ACEOF
28086#define HEIMDAL 1
28087_ACEOF
28088 14683
28089 K5LIBS="-lkrb5" 14684 K5LIBS="-lkrb5"
28090 K5LIBS="$K5LIBS -lcom_err -lasn1" 14685 K5LIBS="$K5LIBS -lcom_err -lasn1"
28091 { echo "$as_me:$LINENO: checking for net_write in -lroken" >&5 14686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for net_write in -lroken" >&5
28092echo $ECHO_N "checking for net_write in -lroken... $ECHO_C" >&6; } 14687$as_echo_n "checking for net_write in -lroken... " >&6; }
28093if test "${ac_cv_lib_roken_net_write+set}" = set; then 14688if ${ac_cv_lib_roken_net_write+:} false; then :
28094 echo $ECHO_N "(cached) $ECHO_C" >&6 14689 $as_echo_n "(cached) " >&6
28095else 14690else
28096 ac_check_lib_save_LIBS=$LIBS 14691 ac_check_lib_save_LIBS=$LIBS
28097LIBS="-lroken $LIBS" 14692LIBS="-lroken $LIBS"
28098cat >conftest.$ac_ext <<_ACEOF 14693cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28099/* confdefs.h. */
28100_ACEOF
28101cat confdefs.h >>conftest.$ac_ext
28102cat >>conftest.$ac_ext <<_ACEOF
28103/* end confdefs.h. */ 14694/* end confdefs.h. */
28104 14695
28105/* Override any GCC internal prototype to avoid an error. 14696/* Override any GCC internal prototype to avoid an error.
@@ -28117,54 +14708,29 @@ return net_write ();
28117 return 0; 14708 return 0;
28118} 14709}
28119_ACEOF 14710_ACEOF
28120rm -f conftest.$ac_objext conftest$ac_exeext 14711if ac_fn_c_try_link "$LINENO"; then :
28121if { (ac_try="$ac_link"
28122case "(($ac_try" in
28123 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28124 *) ac_try_echo=$ac_try;;
28125esac
28126eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28127 (eval "$ac_link") 2>conftest.er1
28128 ac_status=$?
28129 grep -v '^ *+' conftest.er1 >conftest.err
28130 rm -f conftest.er1
28131 cat conftest.err >&5
28132 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28133 (exit $ac_status); } && {
28134 test -z "$ac_c_werror_flag" ||
28135 test ! -s conftest.err
28136 } && test -s conftest$ac_exeext &&
28137 $as_test_x conftest$ac_exeext; then
28138 ac_cv_lib_roken_net_write=yes 14712 ac_cv_lib_roken_net_write=yes
28139else 14713else
28140 echo "$as_me: failed program was:" >&5 14714 ac_cv_lib_roken_net_write=no
28141sed 's/^/| /' conftest.$ac_ext >&5
28142
28143 ac_cv_lib_roken_net_write=no
28144fi 14715fi
28145 14716rm -f core conftest.err conftest.$ac_objext \
28146rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14717 conftest$ac_exeext conftest.$ac_ext
28147 conftest$ac_exeext conftest.$ac_ext
28148LIBS=$ac_check_lib_save_LIBS 14718LIBS=$ac_check_lib_save_LIBS
28149fi 14719fi
28150{ echo "$as_me:$LINENO: result: $ac_cv_lib_roken_net_write" >&5 14720{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_roken_net_write" >&5
28151echo "${ECHO_T}$ac_cv_lib_roken_net_write" >&6; } 14721$as_echo "$ac_cv_lib_roken_net_write" >&6; }
28152if test $ac_cv_lib_roken_net_write = yes; then 14722if test "x$ac_cv_lib_roken_net_write" = xyes; then :
28153 K5LIBS="$K5LIBS -lroken" 14723 K5LIBS="$K5LIBS -lroken"
28154fi 14724fi
28155 14725
28156 { echo "$as_me:$LINENO: checking for des_cbc_encrypt in -ldes" >&5 14726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_cbc_encrypt in -ldes" >&5
28157echo $ECHO_N "checking for des_cbc_encrypt in -ldes... $ECHO_C" >&6; } 14727$as_echo_n "checking for des_cbc_encrypt in -ldes... " >&6; }
28158if test "${ac_cv_lib_des_des_cbc_encrypt+set}" = set; then 14728if ${ac_cv_lib_des_des_cbc_encrypt+:} false; then :
28159 echo $ECHO_N "(cached) $ECHO_C" >&6 14729 $as_echo_n "(cached) " >&6
28160else 14730else
28161 ac_check_lib_save_LIBS=$LIBS 14731 ac_check_lib_save_LIBS=$LIBS
28162LIBS="-ldes $LIBS" 14732LIBS="-ldes $LIBS"
28163cat >conftest.$ac_ext <<_ACEOF 14733cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28164/* confdefs.h. */
28165_ACEOF
28166cat confdefs.h >>conftest.$ac_ext
28167cat >>conftest.$ac_ext <<_ACEOF
28168/* end confdefs.h. */ 14734/* end confdefs.h. */
28169 14735
28170/* Override any GCC internal prototype to avoid an error. 14736/* Override any GCC internal prototype to avoid an error.
@@ -28182,66 +14748,37 @@ return des_cbc_encrypt ();
28182 return 0; 14748 return 0;
28183} 14749}
28184_ACEOF 14750_ACEOF
28185rm -f conftest.$ac_objext conftest$ac_exeext 14751if ac_fn_c_try_link "$LINENO"; then :
28186if { (ac_try="$ac_link"
28187case "(($ac_try" in
28188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28189 *) ac_try_echo=$ac_try;;
28190esac
28191eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28192 (eval "$ac_link") 2>conftest.er1
28193 ac_status=$?
28194 grep -v '^ *+' conftest.er1 >conftest.err
28195 rm -f conftest.er1
28196 cat conftest.err >&5
28197 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28198 (exit $ac_status); } && {
28199 test -z "$ac_c_werror_flag" ||
28200 test ! -s conftest.err
28201 } && test -s conftest$ac_exeext &&
28202 $as_test_x conftest$ac_exeext; then
28203 ac_cv_lib_des_des_cbc_encrypt=yes 14752 ac_cv_lib_des_des_cbc_encrypt=yes
28204else 14753else
28205 echo "$as_me: failed program was:" >&5 14754 ac_cv_lib_des_des_cbc_encrypt=no
28206sed 's/^/| /' conftest.$ac_ext >&5
28207
28208 ac_cv_lib_des_des_cbc_encrypt=no
28209fi 14755fi
28210 14756rm -f core conftest.err conftest.$ac_objext \
28211rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14757 conftest$ac_exeext conftest.$ac_ext
28212 conftest$ac_exeext conftest.$ac_ext
28213LIBS=$ac_check_lib_save_LIBS 14758LIBS=$ac_check_lib_save_LIBS
28214fi 14759fi
28215{ echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_cbc_encrypt" >&5 14760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_des_des_cbc_encrypt" >&5
28216echo "${ECHO_T}$ac_cv_lib_des_des_cbc_encrypt" >&6; } 14761$as_echo "$ac_cv_lib_des_des_cbc_encrypt" >&6; }
28217if test $ac_cv_lib_des_des_cbc_encrypt = yes; then 14762if test "x$ac_cv_lib_des_des_cbc_encrypt" = xyes; then :
28218 K5LIBS="$K5LIBS -ldes" 14763 K5LIBS="$K5LIBS -ldes"
28219fi 14764fi
28220 14765
28221 14766
28222else 14767else
28223 echo "$as_me: failed program was:" >&5 14768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
28224sed 's/^/| /' conftest.$ac_ext >&5 14769$as_echo "no" >&6; }
28225
28226 { echo "$as_me:$LINENO: result: no" >&5
28227echo "${ECHO_T}no" >&6; }
28228 K5LIBS="-lkrb5 -lk5crypto -lcom_err" 14770 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
28229 14771
28230 14772
28231fi 14773fi
28232
28233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14774rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28234 { echo "$as_me:$LINENO: checking for library containing dn_expand" >&5 14775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dn_expand" >&5
28235echo $ECHO_N "checking for library containing dn_expand... $ECHO_C" >&6; } 14776$as_echo_n "checking for library containing dn_expand... " >&6; }
28236if test "${ac_cv_search_dn_expand+set}" = set; then 14777if ${ac_cv_search_dn_expand+:} false; then :
28237 echo $ECHO_N "(cached) $ECHO_C" >&6 14778 $as_echo_n "(cached) " >&6
28238else 14779else
28239 ac_func_search_save_LIBS=$LIBS 14780 ac_func_search_save_LIBS=$LIBS
28240cat >conftest.$ac_ext <<_ACEOF 14781cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28241/* confdefs.h. */
28242_ACEOF
28243cat confdefs.h >>conftest.$ac_ext
28244cat >>conftest.$ac_ext <<_ACEOF
28245/* end confdefs.h. */ 14782/* end confdefs.h. */
28246 14783
28247/* Override any GCC internal prototype to avoid an error. 14784/* Override any GCC internal prototype to avoid an error.
@@ -28266,67 +14803,40 @@ for ac_lib in '' resolv; do
28266 ac_res=-l$ac_lib 14803 ac_res=-l$ac_lib
28267 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 14804 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
28268 fi 14805 fi
28269 rm -f conftest.$ac_objext conftest$ac_exeext 14806 if ac_fn_c_try_link "$LINENO"; then :
28270if { (ac_try="$ac_link"
28271case "(($ac_try" in
28272 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28273 *) ac_try_echo=$ac_try;;
28274esac
28275eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28276 (eval "$ac_link") 2>conftest.er1
28277 ac_status=$?
28278 grep -v '^ *+' conftest.er1 >conftest.err
28279 rm -f conftest.er1
28280 cat conftest.err >&5
28281 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28282 (exit $ac_status); } && {
28283 test -z "$ac_c_werror_flag" ||
28284 test ! -s conftest.err
28285 } && test -s conftest$ac_exeext &&
28286 $as_test_x conftest$ac_exeext; then
28287 ac_cv_search_dn_expand=$ac_res 14807 ac_cv_search_dn_expand=$ac_res
28288else
28289 echo "$as_me: failed program was:" >&5
28290sed 's/^/| /' conftest.$ac_ext >&5
28291
28292
28293fi 14808fi
28294 14809rm -f core conftest.err conftest.$ac_objext \
28295rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14810 conftest$ac_exeext
28296 conftest$ac_exeext 14811 if ${ac_cv_search_dn_expand+:} false; then :
28297 if test "${ac_cv_search_dn_expand+set}" = set; then
28298 break 14812 break
28299fi 14813fi
28300done 14814done
28301if test "${ac_cv_search_dn_expand+set}" = set; then 14815if ${ac_cv_search_dn_expand+:} false; then :
28302 : 14816
28303else 14817else
28304 ac_cv_search_dn_expand=no 14818 ac_cv_search_dn_expand=no
28305fi 14819fi
28306rm conftest.$ac_ext 14820rm conftest.$ac_ext
28307LIBS=$ac_func_search_save_LIBS 14821LIBS=$ac_func_search_save_LIBS
28308fi 14822fi
28309{ echo "$as_me:$LINENO: result: $ac_cv_search_dn_expand" >&5 14823{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dn_expand" >&5
28310echo "${ECHO_T}$ac_cv_search_dn_expand" >&6; } 14824$as_echo "$ac_cv_search_dn_expand" >&6; }
28311ac_res=$ac_cv_search_dn_expand 14825ac_res=$ac_cv_search_dn_expand
28312if test "$ac_res" != no; then 14826if test "$ac_res" != no; then :
28313 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 14827 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
28314 14828
28315fi 14829fi
28316 14830
28317 14831
28318 { echo "$as_me:$LINENO: checking for gss_init_sec_context in -lgssapi_krb5" >&5 14832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi_krb5" >&5
28319echo $ECHO_N "checking for gss_init_sec_context in -lgssapi_krb5... $ECHO_C" >&6; } 14833$as_echo_n "checking for gss_init_sec_context in -lgssapi_krb5... " >&6; }
28320if test "${ac_cv_lib_gssapi_krb5_gss_init_sec_context+set}" = set; then 14834if ${ac_cv_lib_gssapi_krb5_gss_init_sec_context+:} false; then :
28321 echo $ECHO_N "(cached) $ECHO_C" >&6 14835 $as_echo_n "(cached) " >&6
28322else 14836else
28323 ac_check_lib_save_LIBS=$LIBS 14837 ac_check_lib_save_LIBS=$LIBS
28324LIBS="-lgssapi_krb5 $K5LIBS $LIBS" 14838LIBS="-lgssapi_krb5 $K5LIBS $LIBS"
28325cat >conftest.$ac_ext <<_ACEOF 14839cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28326/* confdefs.h. */
28327_ACEOF
28328cat confdefs.h >>conftest.$ac_ext
28329cat >>conftest.$ac_ext <<_ACEOF
28330/* end confdefs.h. */ 14840/* end confdefs.h. */
28331 14841
28332/* Override any GCC internal prototype to avoid an error. 14842/* Override any GCC internal prototype to avoid an error.
@@ -28344,57 +14854,30 @@ return gss_init_sec_context ();
28344 return 0; 14854 return 0;
28345} 14855}
28346_ACEOF 14856_ACEOF
28347rm -f conftest.$ac_objext conftest$ac_exeext 14857if ac_fn_c_try_link "$LINENO"; then :
28348if { (ac_try="$ac_link"
28349case "(($ac_try" in
28350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28351 *) ac_try_echo=$ac_try;;
28352esac
28353eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28354 (eval "$ac_link") 2>conftest.er1
28355 ac_status=$?
28356 grep -v '^ *+' conftest.er1 >conftest.err
28357 rm -f conftest.er1
28358 cat conftest.err >&5
28359 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28360 (exit $ac_status); } && {
28361 test -z "$ac_c_werror_flag" ||
28362 test ! -s conftest.err
28363 } && test -s conftest$ac_exeext &&
28364 $as_test_x conftest$ac_exeext; then
28365 ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes 14858 ac_cv_lib_gssapi_krb5_gss_init_sec_context=yes
28366else 14859else
28367 echo "$as_me: failed program was:" >&5 14860 ac_cv_lib_gssapi_krb5_gss_init_sec_context=no
28368sed 's/^/| /' conftest.$ac_ext >&5
28369
28370 ac_cv_lib_gssapi_krb5_gss_init_sec_context=no
28371fi 14861fi
28372 14862rm -f core conftest.err conftest.$ac_objext \
28373rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14863 conftest$ac_exeext conftest.$ac_ext
28374 conftest$ac_exeext conftest.$ac_ext
28375LIBS=$ac_check_lib_save_LIBS 14864LIBS=$ac_check_lib_save_LIBS
28376fi 14865fi
28377{ echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5 14866{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&5
28378echo "${ECHO_T}$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6; } 14867$as_echo "$ac_cv_lib_gssapi_krb5_gss_init_sec_context" >&6; }
28379if test $ac_cv_lib_gssapi_krb5_gss_init_sec_context = yes; then 14868if test "x$ac_cv_lib_gssapi_krb5_gss_init_sec_context" = xyes; then :
28380 cat >>confdefs.h <<\_ACEOF 14869 $as_echo "#define GSSAPI 1" >>confdefs.h
28381#define GSSAPI 1
28382_ACEOF
28383 14870
28384 K5LIBS="-lgssapi_krb5 $K5LIBS" 14871 K5LIBS="-lgssapi_krb5 $K5LIBS"
28385else 14872else
28386 { echo "$as_me:$LINENO: checking for gss_init_sec_context in -lgssapi" >&5 14873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_init_sec_context in -lgssapi" >&5
28387echo $ECHO_N "checking for gss_init_sec_context in -lgssapi... $ECHO_C" >&6; } 14874$as_echo_n "checking for gss_init_sec_context in -lgssapi... " >&6; }
28388if test "${ac_cv_lib_gssapi_gss_init_sec_context+set}" = set; then 14875if ${ac_cv_lib_gssapi_gss_init_sec_context+:} false; then :
28389 echo $ECHO_N "(cached) $ECHO_C" >&6 14876 $as_echo_n "(cached) " >&6
28390else 14877else
28391 ac_check_lib_save_LIBS=$LIBS 14878 ac_check_lib_save_LIBS=$LIBS
28392LIBS="-lgssapi $K5LIBS $LIBS" 14879LIBS="-lgssapi $K5LIBS $LIBS"
28393cat >conftest.$ac_ext <<_ACEOF 14880cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28394/* confdefs.h. */
28395_ACEOF
28396cat confdefs.h >>conftest.$ac_ext
28397cat >>conftest.$ac_ext <<_ACEOF
28398/* end confdefs.h. */ 14881/* end confdefs.h. */
28399 14882
28400/* Override any GCC internal prototype to avoid an error. 14883/* Override any GCC internal prototype to avoid an error.
@@ -28412,332 +14895,47 @@ return gss_init_sec_context ();
28412 return 0; 14895 return 0;
28413} 14896}
28414_ACEOF 14897_ACEOF
28415rm -f conftest.$ac_objext conftest$ac_exeext 14898if ac_fn_c_try_link "$LINENO"; then :
28416if { (ac_try="$ac_link"
28417case "(($ac_try" in
28418 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28419 *) ac_try_echo=$ac_try;;
28420esac
28421eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28422 (eval "$ac_link") 2>conftest.er1
28423 ac_status=$?
28424 grep -v '^ *+' conftest.er1 >conftest.err
28425 rm -f conftest.er1
28426 cat conftest.err >&5
28427 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28428 (exit $ac_status); } && {
28429 test -z "$ac_c_werror_flag" ||
28430 test ! -s conftest.err
28431 } && test -s conftest$ac_exeext &&
28432 $as_test_x conftest$ac_exeext; then
28433 ac_cv_lib_gssapi_gss_init_sec_context=yes 14899 ac_cv_lib_gssapi_gss_init_sec_context=yes
28434else 14900else
28435 echo "$as_me: failed program was:" >&5 14901 ac_cv_lib_gssapi_gss_init_sec_context=no
28436sed 's/^/| /' conftest.$ac_ext >&5
28437
28438 ac_cv_lib_gssapi_gss_init_sec_context=no
28439fi 14902fi
28440 14903rm -f core conftest.err conftest.$ac_objext \
28441rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 14904 conftest$ac_exeext conftest.$ac_ext
28442 conftest$ac_exeext conftest.$ac_ext
28443LIBS=$ac_check_lib_save_LIBS 14905LIBS=$ac_check_lib_save_LIBS
28444fi 14906fi
28445{ echo "$as_me:$LINENO: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5 14907{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gssapi_gss_init_sec_context" >&5
28446echo "${ECHO_T}$ac_cv_lib_gssapi_gss_init_sec_context" >&6; } 14908$as_echo "$ac_cv_lib_gssapi_gss_init_sec_context" >&6; }
28447if test $ac_cv_lib_gssapi_gss_init_sec_context = yes; then 14909if test "x$ac_cv_lib_gssapi_gss_init_sec_context" = xyes; then :
28448 cat >>confdefs.h <<\_ACEOF 14910 $as_echo "#define GSSAPI 1" >>confdefs.h
28449#define GSSAPI 1
28450_ACEOF
28451 14911
28452 K5LIBS="-lgssapi $K5LIBS" 14912 K5LIBS="-lgssapi $K5LIBS"
28453else 14913else
28454 { echo "$as_me:$LINENO: WARNING: Cannot find any suitable gss-api library - build may fail" >&5 14914 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api library - build may fail" >&5
28455echo "$as_me: WARNING: Cannot find any suitable gss-api library - build may fail" >&2;} 14915$as_echo "$as_me: WARNING: Cannot find any suitable gss-api library - build may fail" >&2;}
28456fi 14916fi
28457 14917
28458 14918
28459fi 14919fi
28460 14920
28461 14921
28462 if test "${ac_cv_header_gssapi_h+set}" = set; then 14922 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
28463 { echo "$as_me:$LINENO: checking for gssapi.h" >&5 14923if test "x$ac_cv_header_gssapi_h" = xyes; then :
28464echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6; }
28465if test "${ac_cv_header_gssapi_h+set}" = set; then
28466 echo $ECHO_N "(cached) $ECHO_C" >&6
28467fi
28468{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
28469echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6; }
28470else
28471 # Is the header compilable?
28472{ echo "$as_me:$LINENO: checking gssapi.h usability" >&5
28473echo $ECHO_N "checking gssapi.h usability... $ECHO_C" >&6; }
28474cat >conftest.$ac_ext <<_ACEOF
28475/* confdefs.h. */
28476_ACEOF
28477cat confdefs.h >>conftest.$ac_ext
28478cat >>conftest.$ac_ext <<_ACEOF
28479/* end confdefs.h. */
28480$ac_includes_default
28481#include <gssapi.h>
28482_ACEOF
28483rm -f conftest.$ac_objext
28484if { (ac_try="$ac_compile"
28485case "(($ac_try" in
28486 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28487 *) ac_try_echo=$ac_try;;
28488esac
28489eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28490 (eval "$ac_compile") 2>conftest.er1
28491 ac_status=$?
28492 grep -v '^ *+' conftest.er1 >conftest.err
28493 rm -f conftest.er1
28494 cat conftest.err >&5
28495 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28496 (exit $ac_status); } && {
28497 test -z "$ac_c_werror_flag" ||
28498 test ! -s conftest.err
28499 } && test -s conftest.$ac_objext; then
28500 ac_header_compiler=yes
28501else
28502 echo "$as_me: failed program was:" >&5
28503sed 's/^/| /' conftest.$ac_ext >&5
28504
28505 ac_header_compiler=no
28506fi
28507
28508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28509{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28510echo "${ECHO_T}$ac_header_compiler" >&6; }
28511
28512# Is the header present?
28513{ echo "$as_me:$LINENO: checking gssapi.h presence" >&5
28514echo $ECHO_N "checking gssapi.h presence... $ECHO_C" >&6; }
28515cat >conftest.$ac_ext <<_ACEOF
28516/* confdefs.h. */
28517_ACEOF
28518cat confdefs.h >>conftest.$ac_ext
28519cat >>conftest.$ac_ext <<_ACEOF
28520/* end confdefs.h. */
28521#include <gssapi.h>
28522_ACEOF
28523if { (ac_try="$ac_cpp conftest.$ac_ext"
28524case "(($ac_try" in
28525 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28526 *) ac_try_echo=$ac_try;;
28527esac
28528eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28529 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28530 ac_status=$?
28531 grep -v '^ *+' conftest.er1 >conftest.err
28532 rm -f conftest.er1
28533 cat conftest.err >&5
28534 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28535 (exit $ac_status); } >/dev/null && {
28536 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28537 test ! -s conftest.err
28538 }; then
28539 ac_header_preproc=yes
28540else
28541 echo "$as_me: failed program was:" >&5
28542sed 's/^/| /' conftest.$ac_ext >&5
28543
28544 ac_header_preproc=no
28545fi
28546
28547rm -f conftest.err conftest.$ac_ext
28548{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28549echo "${ECHO_T}$ac_header_preproc" >&6; }
28550
28551# So? What about this header?
28552case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
28553 yes:no: )
28554 { echo "$as_me:$LINENO: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&5
28555echo "$as_me: WARNING: gssapi.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
28556 { echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the compiler's result" >&5
28557echo "$as_me: WARNING: gssapi.h: proceeding with the compiler's result" >&2;}
28558 ac_header_preproc=yes
28559 ;;
28560 no:yes:* )
28561 { echo "$as_me:$LINENO: WARNING: gssapi.h: present but cannot be compiled" >&5
28562echo "$as_me: WARNING: gssapi.h: present but cannot be compiled" >&2;}
28563 { echo "$as_me:$LINENO: WARNING: gssapi.h: check for missing prerequisite headers?" >&5
28564echo "$as_me: WARNING: gssapi.h: check for missing prerequisite headers?" >&2;}
28565 { echo "$as_me:$LINENO: WARNING: gssapi.h: see the Autoconf documentation" >&5
28566echo "$as_me: WARNING: gssapi.h: see the Autoconf documentation" >&2;}
28567 { echo "$as_me:$LINENO: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&5
28568echo "$as_me: WARNING: gssapi.h: section \"Present But Cannot Be Compiled\"" >&2;}
28569 { echo "$as_me:$LINENO: WARNING: gssapi.h: proceeding with the preprocessor's result" >&5
28570echo "$as_me: WARNING: gssapi.h: proceeding with the preprocessor's result" >&2;}
28571 { echo "$as_me:$LINENO: WARNING: gssapi.h: in the future, the compiler will take precedence" >&5
28572echo "$as_me: WARNING: gssapi.h: in the future, the compiler will take precedence" >&2;}
28573 ( cat <<\_ASBOX
28574## ------------------------------------------- ##
28575## Report this to openssh-unix-dev@mindrot.org ##
28576## ------------------------------------------- ##
28577_ASBOX
28578 ) | sed "s/^/$as_me: WARNING: /" >&2
28579 ;;
28580esac
28581{ echo "$as_me:$LINENO: checking for gssapi.h" >&5
28582echo $ECHO_N "checking for gssapi.h... $ECHO_C" >&6; }
28583if test "${ac_cv_header_gssapi_h+set}" = set; then
28584 echo $ECHO_N "(cached) $ECHO_C" >&6
28585else
28586 ac_cv_header_gssapi_h=$ac_header_preproc
28587fi
28588{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_h" >&5
28589echo "${ECHO_T}$ac_cv_header_gssapi_h" >&6; }
28590 14924
28591fi
28592if test $ac_cv_header_gssapi_h = yes; then
28593 :
28594else 14925else
28595 unset ac_cv_header_gssapi_h 14926 unset ac_cv_header_gssapi_h
28596 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi" 14927 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
28597 14928 for ac_header in gssapi.h
28598for ac_header in gssapi.h 14929do :
28599do 14930 ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default"
28600as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 14931if test "x$ac_cv_header_gssapi_h" = xyes; then :
28601if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
28602 { echo "$as_me:$LINENO: checking for $ac_header" >&5
28603echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
28604if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
28605 echo $ECHO_N "(cached) $ECHO_C" >&6
28606fi
28607ac_res=`eval echo '${'$as_ac_Header'}'`
28608 { echo "$as_me:$LINENO: result: $ac_res" >&5
28609echo "${ECHO_T}$ac_res" >&6; }
28610else
28611 # Is the header compilable?
28612{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
28613echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
28614cat >conftest.$ac_ext <<_ACEOF
28615/* confdefs.h. */
28616_ACEOF
28617cat confdefs.h >>conftest.$ac_ext
28618cat >>conftest.$ac_ext <<_ACEOF
28619/* end confdefs.h. */
28620$ac_includes_default
28621#include <$ac_header>
28622_ACEOF
28623rm -f conftest.$ac_objext
28624if { (ac_try="$ac_compile"
28625case "(($ac_try" in
28626 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28627 *) ac_try_echo=$ac_try;;
28628esac
28629eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28630 (eval "$ac_compile") 2>conftest.er1
28631 ac_status=$?
28632 grep -v '^ *+' conftest.er1 >conftest.err
28633 rm -f conftest.er1
28634 cat conftest.err >&5
28635 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28636 (exit $ac_status); } && {
28637 test -z "$ac_c_werror_flag" ||
28638 test ! -s conftest.err
28639 } && test -s conftest.$ac_objext; then
28640 ac_header_compiler=yes
28641else
28642 echo "$as_me: failed program was:" >&5
28643sed 's/^/| /' conftest.$ac_ext >&5
28644
28645 ac_header_compiler=no
28646fi
28647
28648rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28649{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28650echo "${ECHO_T}$ac_header_compiler" >&6; }
28651
28652# Is the header present?
28653{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
28654echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
28655cat >conftest.$ac_ext <<_ACEOF
28656/* confdefs.h. */
28657_ACEOF
28658cat confdefs.h >>conftest.$ac_ext
28659cat >>conftest.$ac_ext <<_ACEOF
28660/* end confdefs.h. */
28661#include <$ac_header>
28662_ACEOF
28663if { (ac_try="$ac_cpp conftest.$ac_ext"
28664case "(($ac_try" in
28665 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28666 *) ac_try_echo=$ac_try;;
28667esac
28668eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28669 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28670 ac_status=$?
28671 grep -v '^ *+' conftest.er1 >conftest.err
28672 rm -f conftest.er1
28673 cat conftest.err >&5
28674 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28675 (exit $ac_status); } >/dev/null && {
28676 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28677 test ! -s conftest.err
28678 }; then
28679 ac_header_preproc=yes
28680else
28681 echo "$as_me: failed program was:" >&5
28682sed 's/^/| /' conftest.$ac_ext >&5
28683
28684 ac_header_preproc=no
28685fi
28686
28687rm -f conftest.err conftest.$ac_ext
28688{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28689echo "${ECHO_T}$ac_header_preproc" >&6; }
28690
28691# So? What about this header?
28692case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
28693 yes:no: )
28694 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
28695echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
28696 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
28697echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
28698 ac_header_preproc=yes
28699 ;;
28700 no:yes:* )
28701 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
28702echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
28703 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
28704echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
28705 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
28706echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
28707 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
28708echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
28709 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
28710echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
28711 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
28712echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
28713 ( cat <<\_ASBOX
28714## ------------------------------------------- ##
28715## Report this to openssh-unix-dev@mindrot.org ##
28716## ------------------------------------------- ##
28717_ASBOX
28718 ) | sed "s/^/$as_me: WARNING: /" >&2
28719 ;;
28720esac
28721{ echo "$as_me:$LINENO: checking for $ac_header" >&5
28722echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
28723if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
28724 echo $ECHO_N "(cached) $ECHO_C" >&6
28725else
28726 eval "$as_ac_Header=\$ac_header_preproc"
28727fi
28728ac_res=`eval echo '${'$as_ac_Header'}'`
28729 { echo "$as_me:$LINENO: result: $ac_res" >&5
28730echo "${ECHO_T}$ac_res" >&6; }
28731
28732fi
28733if test `eval echo '${'$as_ac_Header'}'` = yes; then
28734 cat >>confdefs.h <<_ACEOF 14932 cat >>confdefs.h <<_ACEOF
28735#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 14933#define HAVE_GSSAPI_H 1
28736_ACEOF 14934_ACEOF
28737 14935
28738else 14936else
28739 { echo "$as_me:$LINENO: WARNING: Cannot find any suitable gss-api header - build may fail" >&5 14937 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot find any suitable gss-api header - build may fail" >&5
28740echo "$as_me: WARNING: Cannot find any suitable gss-api header - build may fail" >&2;} 14938$as_echo "$as_me: WARNING: Cannot find any suitable gss-api header - build may fail" >&2;}
28741 14939
28742fi 14940fi
28743 14941
@@ -28751,138 +14949,9 @@ fi
28751 14949
28752 oldCPP="$CPPFLAGS" 14950 oldCPP="$CPPFLAGS"
28753 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi" 14951 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
28754 if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then 14952 ac_fn_c_check_header_mongrel "$LINENO" "gssapi_krb5.h" "ac_cv_header_gssapi_krb5_h" "$ac_includes_default"
28755 { echo "$as_me:$LINENO: checking for gssapi_krb5.h" >&5 14953if test "x$ac_cv_header_gssapi_krb5_h" = xyes; then :
28756echo $ECHO_N "checking for gssapi_krb5.h... $ECHO_C" >&6; }
28757if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then
28758 echo $ECHO_N "(cached) $ECHO_C" >&6
28759fi
28760{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_krb5_h" >&5
28761echo "${ECHO_T}$ac_cv_header_gssapi_krb5_h" >&6; }
28762else
28763 # Is the header compilable?
28764{ echo "$as_me:$LINENO: checking gssapi_krb5.h usability" >&5
28765echo $ECHO_N "checking gssapi_krb5.h usability... $ECHO_C" >&6; }
28766cat >conftest.$ac_ext <<_ACEOF
28767/* confdefs.h. */
28768_ACEOF
28769cat confdefs.h >>conftest.$ac_ext
28770cat >>conftest.$ac_ext <<_ACEOF
28771/* end confdefs.h. */
28772$ac_includes_default
28773#include <gssapi_krb5.h>
28774_ACEOF
28775rm -f conftest.$ac_objext
28776if { (ac_try="$ac_compile"
28777case "(($ac_try" in
28778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28779 *) ac_try_echo=$ac_try;;
28780esac
28781eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28782 (eval "$ac_compile") 2>conftest.er1
28783 ac_status=$?
28784 grep -v '^ *+' conftest.er1 >conftest.err
28785 rm -f conftest.er1
28786 cat conftest.err >&5
28787 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28788 (exit $ac_status); } && {
28789 test -z "$ac_c_werror_flag" ||
28790 test ! -s conftest.err
28791 } && test -s conftest.$ac_objext; then
28792 ac_header_compiler=yes
28793else
28794 echo "$as_me: failed program was:" >&5
28795sed 's/^/| /' conftest.$ac_ext >&5
28796
28797 ac_header_compiler=no
28798fi
28799
28800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28801{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28802echo "${ECHO_T}$ac_header_compiler" >&6; }
28803
28804# Is the header present?
28805{ echo "$as_me:$LINENO: checking gssapi_krb5.h presence" >&5
28806echo $ECHO_N "checking gssapi_krb5.h presence... $ECHO_C" >&6; }
28807cat >conftest.$ac_ext <<_ACEOF
28808/* confdefs.h. */
28809_ACEOF
28810cat confdefs.h >>conftest.$ac_ext
28811cat >>conftest.$ac_ext <<_ACEOF
28812/* end confdefs.h. */
28813#include <gssapi_krb5.h>
28814_ACEOF
28815if { (ac_try="$ac_cpp conftest.$ac_ext"
28816case "(($ac_try" in
28817 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28818 *) ac_try_echo=$ac_try;;
28819esac
28820eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28821 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28822 ac_status=$?
28823 grep -v '^ *+' conftest.er1 >conftest.err
28824 rm -f conftest.er1
28825 cat conftest.err >&5
28826 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28827 (exit $ac_status); } >/dev/null && {
28828 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28829 test ! -s conftest.err
28830 }; then
28831 ac_header_preproc=yes
28832else
28833 echo "$as_me: failed program was:" >&5
28834sed 's/^/| /' conftest.$ac_ext >&5
28835
28836 ac_header_preproc=no
28837fi
28838
28839rm -f conftest.err conftest.$ac_ext
28840{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28841echo "${ECHO_T}$ac_header_preproc" >&6; }
28842
28843# So? What about this header?
28844case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
28845 yes:no: )
28846 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: accepted by the compiler, rejected by the preprocessor!" >&5
28847echo "$as_me: WARNING: gssapi_krb5.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
28848 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: proceeding with the compiler's result" >&5
28849echo "$as_me: WARNING: gssapi_krb5.h: proceeding with the compiler's result" >&2;}
28850 ac_header_preproc=yes
28851 ;;
28852 no:yes:* )
28853 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: present but cannot be compiled" >&5
28854echo "$as_me: WARNING: gssapi_krb5.h: present but cannot be compiled" >&2;}
28855 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: check for missing prerequisite headers?" >&5
28856echo "$as_me: WARNING: gssapi_krb5.h: check for missing prerequisite headers?" >&2;}
28857 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: see the Autoconf documentation" >&5
28858echo "$as_me: WARNING: gssapi_krb5.h: see the Autoconf documentation" >&2;}
28859 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: section \"Present But Cannot Be Compiled\"" >&5
28860echo "$as_me: WARNING: gssapi_krb5.h: section \"Present But Cannot Be Compiled\"" >&2;}
28861 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: proceeding with the preprocessor's result" >&5
28862echo "$as_me: WARNING: gssapi_krb5.h: proceeding with the preprocessor's result" >&2;}
28863 { echo "$as_me:$LINENO: WARNING: gssapi_krb5.h: in the future, the compiler will take precedence" >&5
28864echo "$as_me: WARNING: gssapi_krb5.h: in the future, the compiler will take precedence" >&2;}
28865 ( cat <<\_ASBOX
28866## ------------------------------------------- ##
28867## Report this to openssh-unix-dev@mindrot.org ##
28868## ------------------------------------------- ##
28869_ASBOX
28870 ) | sed "s/^/$as_me: WARNING: /" >&2
28871 ;;
28872esac
28873{ echo "$as_me:$LINENO: checking for gssapi_krb5.h" >&5
28874echo $ECHO_N "checking for gssapi_krb5.h... $ECHO_C" >&6; }
28875if test "${ac_cv_header_gssapi_krb5_h+set}" = set; then
28876 echo $ECHO_N "(cached) $ECHO_C" >&6
28877else
28878 ac_cv_header_gssapi_krb5_h=$ac_header_preproc
28879fi
28880{ echo "$as_me:$LINENO: result: $ac_cv_header_gssapi_krb5_h" >&5
28881echo "${ECHO_T}$ac_cv_header_gssapi_krb5_h" >&6; }
28882 14954
28883fi
28884if test $ac_cv_header_gssapi_krb5_h = yes; then
28885 :
28886else 14955else
28887 CPPFLAGS="$oldCPP" 14956 CPPFLAGS="$oldCPP"
28888fi 14957fi
@@ -28897,438 +14966,39 @@ fi
28897 blibpath="$blibpath:${KRB5ROOT}/lib" 14966 blibpath="$blibpath:${KRB5ROOT}/lib"
28898 fi 14967 fi
28899 14968
28900 14969 for ac_header in gssapi.h gssapi/gssapi.h
28901 14970do :
28902for ac_header in gssapi.h gssapi/gssapi.h 14971 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
28903do 14972ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
28904as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 14973if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
28905if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
28906 { echo "$as_me:$LINENO: checking for $ac_header" >&5
28907echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
28908if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
28909 echo $ECHO_N "(cached) $ECHO_C" >&6
28910fi
28911ac_res=`eval echo '${'$as_ac_Header'}'`
28912 { echo "$as_me:$LINENO: result: $ac_res" >&5
28913echo "${ECHO_T}$ac_res" >&6; }
28914else
28915 # Is the header compilable?
28916{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
28917echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
28918cat >conftest.$ac_ext <<_ACEOF
28919/* confdefs.h. */
28920_ACEOF
28921cat confdefs.h >>conftest.$ac_ext
28922cat >>conftest.$ac_ext <<_ACEOF
28923/* end confdefs.h. */
28924$ac_includes_default
28925#include <$ac_header>
28926_ACEOF
28927rm -f conftest.$ac_objext
28928if { (ac_try="$ac_compile"
28929case "(($ac_try" in
28930 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28931 *) ac_try_echo=$ac_try;;
28932esac
28933eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28934 (eval "$ac_compile") 2>conftest.er1
28935 ac_status=$?
28936 grep -v '^ *+' conftest.er1 >conftest.err
28937 rm -f conftest.er1
28938 cat conftest.err >&5
28939 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28940 (exit $ac_status); } && {
28941 test -z "$ac_c_werror_flag" ||
28942 test ! -s conftest.err
28943 } && test -s conftest.$ac_objext; then
28944 ac_header_compiler=yes
28945else
28946 echo "$as_me: failed program was:" >&5
28947sed 's/^/| /' conftest.$ac_ext >&5
28948
28949 ac_header_compiler=no
28950fi
28951
28952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28953{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
28954echo "${ECHO_T}$ac_header_compiler" >&6; }
28955
28956# Is the header present?
28957{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
28958echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
28959cat >conftest.$ac_ext <<_ACEOF
28960/* confdefs.h. */
28961_ACEOF
28962cat confdefs.h >>conftest.$ac_ext
28963cat >>conftest.$ac_ext <<_ACEOF
28964/* end confdefs.h. */
28965#include <$ac_header>
28966_ACEOF
28967if { (ac_try="$ac_cpp conftest.$ac_ext"
28968case "(($ac_try" in
28969 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
28970 *) ac_try_echo=$ac_try;;
28971esac
28972eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
28973 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
28974 ac_status=$?
28975 grep -v '^ *+' conftest.er1 >conftest.err
28976 rm -f conftest.er1
28977 cat conftest.err >&5
28978 echo "$as_me:$LINENO: \$? = $ac_status" >&5
28979 (exit $ac_status); } >/dev/null && {
28980 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
28981 test ! -s conftest.err
28982 }; then
28983 ac_header_preproc=yes
28984else
28985 echo "$as_me: failed program was:" >&5
28986sed 's/^/| /' conftest.$ac_ext >&5
28987
28988 ac_header_preproc=no
28989fi
28990
28991rm -f conftest.err conftest.$ac_ext
28992{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
28993echo "${ECHO_T}$ac_header_preproc" >&6; }
28994
28995# So? What about this header?
28996case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
28997 yes:no: )
28998 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
28999echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
29000 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
29001echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
29002 ac_header_preproc=yes
29003 ;;
29004 no:yes:* )
29005 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
29006echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
29007 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
29008echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
29009 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
29010echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
29011 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
29012echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
29013 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
29014echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
29015 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
29016echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
29017 ( cat <<\_ASBOX
29018## ------------------------------------------- ##
29019## Report this to openssh-unix-dev@mindrot.org ##
29020## ------------------------------------------- ##
29021_ASBOX
29022 ) | sed "s/^/$as_me: WARNING: /" >&2
29023 ;;
29024esac
29025{ echo "$as_me:$LINENO: checking for $ac_header" >&5
29026echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29027if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29028 echo $ECHO_N "(cached) $ECHO_C" >&6
29029else
29030 eval "$as_ac_Header=\$ac_header_preproc"
29031fi
29032ac_res=`eval echo '${'$as_ac_Header'}'`
29033 { echo "$as_me:$LINENO: result: $ac_res" >&5
29034echo "${ECHO_T}$ac_res" >&6; }
29035
29036fi
29037if test `eval echo '${'$as_ac_Header'}'` = yes; then
29038 cat >>confdefs.h <<_ACEOF 14974 cat >>confdefs.h <<_ACEOF
29039#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 14975#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29040_ACEOF 14976_ACEOF
29041 14977
29042fi 14978fi
29043 14979
29044done 14980done
29045 14981
29046 14982 for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h
29047 14983do :
29048for ac_header in gssapi_krb5.h gssapi/gssapi_krb5.h 14984 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29049do 14985ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29050as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 14986if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29051if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29052 { echo "$as_me:$LINENO: checking for $ac_header" >&5
29053echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29054if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29055 echo $ECHO_N "(cached) $ECHO_C" >&6
29056fi
29057ac_res=`eval echo '${'$as_ac_Header'}'`
29058 { echo "$as_me:$LINENO: result: $ac_res" >&5
29059echo "${ECHO_T}$ac_res" >&6; }
29060else
29061 # Is the header compilable?
29062{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
29063echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
29064cat >conftest.$ac_ext <<_ACEOF
29065/* confdefs.h. */
29066_ACEOF
29067cat confdefs.h >>conftest.$ac_ext
29068cat >>conftest.$ac_ext <<_ACEOF
29069/* end confdefs.h. */
29070$ac_includes_default
29071#include <$ac_header>
29072_ACEOF
29073rm -f conftest.$ac_objext
29074if { (ac_try="$ac_compile"
29075case "(($ac_try" in
29076 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29077 *) ac_try_echo=$ac_try;;
29078esac
29079eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29080 (eval "$ac_compile") 2>conftest.er1
29081 ac_status=$?
29082 grep -v '^ *+' conftest.er1 >conftest.err
29083 rm -f conftest.er1
29084 cat conftest.err >&5
29085 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29086 (exit $ac_status); } && {
29087 test -z "$ac_c_werror_flag" ||
29088 test ! -s conftest.err
29089 } && test -s conftest.$ac_objext; then
29090 ac_header_compiler=yes
29091else
29092 echo "$as_me: failed program was:" >&5
29093sed 's/^/| /' conftest.$ac_ext >&5
29094
29095 ac_header_compiler=no
29096fi
29097
29098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29099{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29100echo "${ECHO_T}$ac_header_compiler" >&6; }
29101
29102# Is the header present?
29103{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
29104echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
29105cat >conftest.$ac_ext <<_ACEOF
29106/* confdefs.h. */
29107_ACEOF
29108cat confdefs.h >>conftest.$ac_ext
29109cat >>conftest.$ac_ext <<_ACEOF
29110/* end confdefs.h. */
29111#include <$ac_header>
29112_ACEOF
29113if { (ac_try="$ac_cpp conftest.$ac_ext"
29114case "(($ac_try" in
29115 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29116 *) ac_try_echo=$ac_try;;
29117esac
29118eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29119 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29120 ac_status=$?
29121 grep -v '^ *+' conftest.er1 >conftest.err
29122 rm -f conftest.er1
29123 cat conftest.err >&5
29124 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29125 (exit $ac_status); } >/dev/null && {
29126 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29127 test ! -s conftest.err
29128 }; then
29129 ac_header_preproc=yes
29130else
29131 echo "$as_me: failed program was:" >&5
29132sed 's/^/| /' conftest.$ac_ext >&5
29133
29134 ac_header_preproc=no
29135fi
29136
29137rm -f conftest.err conftest.$ac_ext
29138{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29139echo "${ECHO_T}$ac_header_preproc" >&6; }
29140
29141# So? What about this header?
29142case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
29143 yes:no: )
29144 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
29145echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
29146 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
29147echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
29148 ac_header_preproc=yes
29149 ;;
29150 no:yes:* )
29151 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
29152echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
29153 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
29154echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
29155 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
29156echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
29157 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
29158echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
29159 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
29160echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
29161 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
29162echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
29163 ( cat <<\_ASBOX
29164## ------------------------------------------- ##
29165## Report this to openssh-unix-dev@mindrot.org ##
29166## ------------------------------------------- ##
29167_ASBOX
29168 ) | sed "s/^/$as_me: WARNING: /" >&2
29169 ;;
29170esac
29171{ echo "$as_me:$LINENO: checking for $ac_header" >&5
29172echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29173if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29174 echo $ECHO_N "(cached) $ECHO_C" >&6
29175else
29176 eval "$as_ac_Header=\$ac_header_preproc"
29177fi
29178ac_res=`eval echo '${'$as_ac_Header'}'`
29179 { echo "$as_me:$LINENO: result: $ac_res" >&5
29180echo "${ECHO_T}$ac_res" >&6; }
29181
29182fi
29183if test `eval echo '${'$as_ac_Header'}'` = yes; then
29184 cat >>confdefs.h <<_ACEOF 14987 cat >>confdefs.h <<_ACEOF
29185#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 14988#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29186_ACEOF 14989_ACEOF
29187 14990
29188fi 14991fi
29189 14992
29190done 14993done
29191 14994
29192 14995 for ac_header in gssapi_generic.h gssapi/gssapi_generic.h
29193 14996do :
29194for ac_header in gssapi_generic.h gssapi/gssapi_generic.h 14997 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
29195do 14998ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
29196as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` 14999if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
29197if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29198 { echo "$as_me:$LINENO: checking for $ac_header" >&5
29199echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29200if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29201 echo $ECHO_N "(cached) $ECHO_C" >&6
29202fi
29203ac_res=`eval echo '${'$as_ac_Header'}'`
29204 { echo "$as_me:$LINENO: result: $ac_res" >&5
29205echo "${ECHO_T}$ac_res" >&6; }
29206else
29207 # Is the header compilable?
29208{ echo "$as_me:$LINENO: checking $ac_header usability" >&5
29209echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; }
29210cat >conftest.$ac_ext <<_ACEOF
29211/* confdefs.h. */
29212_ACEOF
29213cat confdefs.h >>conftest.$ac_ext
29214cat >>conftest.$ac_ext <<_ACEOF
29215/* end confdefs.h. */
29216$ac_includes_default
29217#include <$ac_header>
29218_ACEOF
29219rm -f conftest.$ac_objext
29220if { (ac_try="$ac_compile"
29221case "(($ac_try" in
29222 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29223 *) ac_try_echo=$ac_try;;
29224esac
29225eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29226 (eval "$ac_compile") 2>conftest.er1
29227 ac_status=$?
29228 grep -v '^ *+' conftest.er1 >conftest.err
29229 rm -f conftest.er1
29230 cat conftest.err >&5
29231 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29232 (exit $ac_status); } && {
29233 test -z "$ac_c_werror_flag" ||
29234 test ! -s conftest.err
29235 } && test -s conftest.$ac_objext; then
29236 ac_header_compiler=yes
29237else
29238 echo "$as_me: failed program was:" >&5
29239sed 's/^/| /' conftest.$ac_ext >&5
29240
29241 ac_header_compiler=no
29242fi
29243
29244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29245{ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
29246echo "${ECHO_T}$ac_header_compiler" >&6; }
29247
29248# Is the header present?
29249{ echo "$as_me:$LINENO: checking $ac_header presence" >&5
29250echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; }
29251cat >conftest.$ac_ext <<_ACEOF
29252/* confdefs.h. */
29253_ACEOF
29254cat confdefs.h >>conftest.$ac_ext
29255cat >>conftest.$ac_ext <<_ACEOF
29256/* end confdefs.h. */
29257#include <$ac_header>
29258_ACEOF
29259if { (ac_try="$ac_cpp conftest.$ac_ext"
29260case "(($ac_try" in
29261 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29262 *) ac_try_echo=$ac_try;;
29263esac
29264eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29265 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
29266 ac_status=$?
29267 grep -v '^ *+' conftest.er1 >conftest.err
29268 rm -f conftest.er1
29269 cat conftest.err >&5
29270 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29271 (exit $ac_status); } >/dev/null && {
29272 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
29273 test ! -s conftest.err
29274 }; then
29275 ac_header_preproc=yes
29276else
29277 echo "$as_me: failed program was:" >&5
29278sed 's/^/| /' conftest.$ac_ext >&5
29279
29280 ac_header_preproc=no
29281fi
29282
29283rm -f conftest.err conftest.$ac_ext
29284{ echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
29285echo "${ECHO_T}$ac_header_preproc" >&6; }
29286
29287# So? What about this header?
29288case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
29289 yes:no: )
29290 { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
29291echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
29292 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
29293echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
29294 ac_header_preproc=yes
29295 ;;
29296 no:yes:* )
29297 { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
29298echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
29299 { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
29300echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
29301 { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
29302echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
29303 { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
29304echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
29305 { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
29306echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
29307 { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
29308echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
29309 ( cat <<\_ASBOX
29310## ------------------------------------------- ##
29311## Report this to openssh-unix-dev@mindrot.org ##
29312## ------------------------------------------- ##
29313_ASBOX
29314 ) | sed "s/^/$as_me: WARNING: /" >&2
29315 ;;
29316esac
29317{ echo "$as_me:$LINENO: checking for $ac_header" >&5
29318echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; }
29319if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
29320 echo $ECHO_N "(cached) $ECHO_C" >&6
29321else
29322 eval "$as_ac_Header=\$ac_header_preproc"
29323fi
29324ac_res=`eval echo '${'$as_ac_Header'}'`
29325 { echo "$as_me:$LINENO: result: $ac_res" >&5
29326echo "${ECHO_T}$ac_res" >&6; }
29327
29328fi
29329if test `eval echo '${'$as_ac_Header'}'` = yes; then
29330 cat >>confdefs.h <<_ACEOF 15000 cat >>confdefs.h <<_ACEOF
29331#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 15001#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
29332_ACEOF 15002_ACEOF
29333 15003
29334fi 15004fi
@@ -29337,17 +15007,13 @@ done
29337 15007
29338 15008
29339 LIBS="$LIBS $K5LIBS" 15009 LIBS="$LIBS $K5LIBS"
29340 { echo "$as_me:$LINENO: checking for library containing k_hasafs" >&5 15010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing k_hasafs" >&5
29341echo $ECHO_N "checking for library containing k_hasafs... $ECHO_C" >&6; } 15011$as_echo_n "checking for library containing k_hasafs... " >&6; }
29342if test "${ac_cv_search_k_hasafs+set}" = set; then 15012if ${ac_cv_search_k_hasafs+:} false; then :
29343 echo $ECHO_N "(cached) $ECHO_C" >&6 15013 $as_echo_n "(cached) " >&6
29344else 15014else
29345 ac_func_search_save_LIBS=$LIBS 15015 ac_func_search_save_LIBS=$LIBS
29346cat >conftest.$ac_ext <<_ACEOF 15016cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29347/* confdefs.h. */
29348_ACEOF
29349cat confdefs.h >>conftest.$ac_ext
29350cat >>conftest.$ac_ext <<_ACEOF
29351/* end confdefs.h. */ 15017/* end confdefs.h. */
29352 15018
29353/* Override any GCC internal prototype to avoid an error. 15019/* Override any GCC internal prototype to avoid an error.
@@ -29372,55 +15038,30 @@ for ac_lib in '' kafs; do
29372 ac_res=-l$ac_lib 15038 ac_res=-l$ac_lib
29373 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 15039 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
29374 fi 15040 fi
29375 rm -f conftest.$ac_objext conftest$ac_exeext 15041 if ac_fn_c_try_link "$LINENO"; then :
29376if { (ac_try="$ac_link"
29377case "(($ac_try" in
29378 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29379 *) ac_try_echo=$ac_try;;
29380esac
29381eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29382 (eval "$ac_link") 2>conftest.er1
29383 ac_status=$?
29384 grep -v '^ *+' conftest.er1 >conftest.err
29385 rm -f conftest.er1
29386 cat conftest.err >&5
29387 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29388 (exit $ac_status); } && {
29389 test -z "$ac_c_werror_flag" ||
29390 test ! -s conftest.err
29391 } && test -s conftest$ac_exeext &&
29392 $as_test_x conftest$ac_exeext; then
29393 ac_cv_search_k_hasafs=$ac_res 15042 ac_cv_search_k_hasafs=$ac_res
29394else
29395 echo "$as_me: failed program was:" >&5
29396sed 's/^/| /' conftest.$ac_ext >&5
29397
29398
29399fi 15043fi
29400 15044rm -f core conftest.err conftest.$ac_objext \
29401rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ 15045 conftest$ac_exeext
29402 conftest$ac_exeext 15046 if ${ac_cv_search_k_hasafs+:} false; then :
29403 if test "${ac_cv_search_k_hasafs+set}" = set; then
29404 break 15047 break
29405fi 15048fi
29406done 15049done
29407if test "${ac_cv_search_k_hasafs+set}" = set; then 15050if ${ac_cv_search_k_hasafs+:} false; then :
29408 : 15051
29409else 15052else
29410 ac_cv_search_k_hasafs=no 15053 ac_cv_search_k_hasafs=no
29411fi 15054fi
29412rm conftest.$ac_ext 15055rm conftest.$ac_ext
29413LIBS=$ac_func_search_save_LIBS 15056LIBS=$ac_func_search_save_LIBS
29414fi 15057fi
29415{ echo "$as_me:$LINENO: result: $ac_cv_search_k_hasafs" >&5 15058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_k_hasafs" >&5
29416echo "${ECHO_T}$ac_cv_search_k_hasafs" >&6; } 15059$as_echo "$ac_cv_search_k_hasafs" >&6; }
29417ac_res=$ac_cv_search_k_hasafs 15060ac_res=$ac_cv_search_k_hasafs
29418if test "$ac_res" != no; then 15061if test "$ac_res" != no; then :
29419 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 15062 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
29420 15063
29421cat >>confdefs.h <<\_ACEOF 15064$as_echo "#define USE_AFS 1" >>confdefs.h
29422#define USE_AFS 1
29423_ACEOF
29424 15065
29425fi 15066fi
29426 15067
@@ -29435,7 +15076,7 @@ fi
29435PRIVSEP_PATH=/var/empty 15076PRIVSEP_PATH=/var/empty
29436 15077
29437# Check whether --with-privsep-path was given. 15078# Check whether --with-privsep-path was given.
29438if test "${with_privsep_path+set}" = set; then 15079if test "${with_privsep_path+set}" = set; then :
29439 withval=$with_privsep_path; 15080 withval=$with_privsep_path;
29440 if test -n "$withval" && test "x$withval" != "xno" && \ 15081 if test -n "$withval" && test "x$withval" != "xno" && \
29441 test "x${withval}" != "xyes"; then 15082 test "x${withval}" != "xyes"; then
@@ -29449,7 +15090,7 @@ fi
29449 15090
29450 15091
29451# Check whether --with-xauth was given. 15092# Check whether --with-xauth was given.
29452if test "${with_xauth+set}" = set; then 15093if test "${with_xauth+set}" = set; then :
29453 withval=$with_xauth; 15094 withval=$with_xauth;
29454 if test -n "$withval" && test "x$withval" != "xno" && \ 15095 if test -n "$withval" && test "x$withval" != "xno" && \
29455 test "x${withval}" != "xyes"; then 15096 test "x${withval}" != "xyes"; then
@@ -29465,10 +15106,10 @@ else
29465 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin" 15106 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
29466 # Extract the first word of "xauth", so it can be a program name with args. 15107 # Extract the first word of "xauth", so it can be a program name with args.
29467set dummy xauth; ac_word=$2 15108set dummy xauth; ac_word=$2
29468{ echo "$as_me:$LINENO: checking for $ac_word" >&5 15109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29469echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 15110$as_echo_n "checking for $ac_word... " >&6; }
29470if test "${ac_cv_path_xauth_path+set}" = set; then 15111if ${ac_cv_path_xauth_path+:} false; then :
29471 echo $ECHO_N "(cached) $ECHO_C" >&6 15112 $as_echo_n "(cached) " >&6
29472else 15113else
29473 case $xauth_path in 15114 case $xauth_path in
29474 [\\/]* | ?:[\\/]*) 15115 [\\/]* | ?:[\\/]*)
@@ -29480,14 +15121,14 @@ for as_dir in $TestPath
29480do 15121do
29481 IFS=$as_save_IFS 15122 IFS=$as_save_IFS
29482 test -z "$as_dir" && as_dir=. 15123 test -z "$as_dir" && as_dir=.
29483 for ac_exec_ext in '' $ac_executable_extensions; do 15124 for ac_exec_ext in '' $ac_executable_extensions; do
29484 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 15125 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29485 ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext" 15126 ac_cv_path_xauth_path="$as_dir/$ac_word$ac_exec_ext"
29486 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 15127 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29487 break 2 15128 break 2
29488 fi 15129 fi
29489done 15130done
29490done 15131 done
29491IFS=$as_save_IFS 15132IFS=$as_save_IFS
29492 15133
29493 ;; 15134 ;;
@@ -29495,11 +15136,11 @@ esac
29495fi 15136fi
29496xauth_path=$ac_cv_path_xauth_path 15137xauth_path=$ac_cv_path_xauth_path
29497if test -n "$xauth_path"; then 15138if test -n "$xauth_path"; then
29498 { echo "$as_me:$LINENO: result: $xauth_path" >&5 15139 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xauth_path" >&5
29499echo "${ECHO_T}$xauth_path" >&6; } 15140$as_echo "$xauth_path" >&6; }
29500else 15141else
29501 { echo "$as_me:$LINENO: result: no" >&5 15142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29502echo "${ECHO_T}no" >&6; } 15143$as_echo "no" >&6; }
29503fi 15144fi
29504 15145
29505 15146
@@ -29513,7 +15154,7 @@ fi
29513 15154
29514STRIP_OPT=-s 15155STRIP_OPT=-s
29515# Check whether --enable-strip was given. 15156# Check whether --enable-strip was given.
29516if test "${enable_strip+set}" = set; then 15157if test "${enable_strip+set}" = set; then :
29517 enableval=$enable_strip; 15158 enableval=$enable_strip;
29518 if test "x$enableval" = "xno" ; then 15159 if test "x$enableval" = "xno" ; then
29519 STRIP_OPT= 15160 STRIP_OPT=
@@ -29537,41 +15178,145 @@ _ACEOF
29537 15178
29538fi 15179fi
29539 15180
29540# Check for mail directory (last resort if we cannot get it from headers) 15181# Check for mail directory
29541if test ! -z "$MAIL" ; then 15182
29542 maildir=`dirname $MAIL` 15183# Check whether --with-maildir was given.
15184if test "${with_maildir+set}" = set; then :
15185 withval=$with_maildir;
15186 if test "X$withval" != X && test "x$withval" != xno && \
15187 test "x${withval}" != xyes; then
29543 15188
29544cat >>confdefs.h <<_ACEOF 15189cat >>confdefs.h <<_ACEOF
15190#define MAIL_DIRECTORY "$withval"
15191_ACEOF
15192
15193 fi
15194
15195else
15196
15197 if test "X$maildir" != "X"; then
15198 cat >>confdefs.h <<_ACEOF
15199#define MAIL_DIRECTORY "$maildir"
15200_ACEOF
15201
15202 else
15203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking Discovering system mail directory" >&5
15204$as_echo_n "checking Discovering system mail directory... " >&6; }
15205 if test "$cross_compiling" = yes; then :
15206
15207 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&5
15208$as_echo "$as_me: WARNING: cross compiling: use --with-maildir=/path/to/mail" >&2;}
15209
15210
15211else
15212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15213/* end confdefs.h. */
15214
15215#include <stdio.h>
15216#include <string.h>
15217#ifdef HAVE_PATHS_H
15218#include <paths.h>
15219#endif
15220#ifdef HAVE_MAILLOCK_H
15221#include <maillock.h>
15222#endif
15223#define DATA "conftest.maildir"
15224
15225int
15226main ()
15227{
15228
15229 FILE *fd;
15230 int rc;
15231
15232 fd = fopen(DATA,"w");
15233 if(fd == NULL)
15234 exit(1);
15235
15236#if defined (_PATH_MAILDIR)
15237 if ((rc = fprintf(fd ,"_PATH_MAILDIR:%s\n", _PATH_MAILDIR)) <0)
15238 exit(1);
15239#elif defined (MAILDIR)
15240 if ((rc = fprintf(fd ,"MAILDIR:%s\n", MAILDIR)) <0)
15241 exit(1);
15242#elif defined (_PATH_MAIL)
15243 if ((rc = fprintf(fd ,"_PATH_MAIL:%s\n", _PATH_MAIL)) <0)
15244 exit(1);
15245#else
15246 exit (2);
15247#endif
15248
15249 exit(0);
15250
15251 ;
15252 return 0;
15253}
15254_ACEOF
15255if ac_fn_c_try_run "$LINENO"; then :
15256
15257 maildir_what=`awk -F: '{print $1}' conftest.maildir`
15258 maildir=`awk -F: '{print $2}' conftest.maildir \
15259 | sed 's|/$||'`
15260 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: $maildir from $maildir_what" >&5
15261$as_echo "Using: $maildir from $maildir_what" >&6; }
15262 if test "x$maildir_what" != "x_PATH_MAILDIR"; then
15263 cat >>confdefs.h <<_ACEOF
29545#define MAIL_DIRECTORY "$maildir" 15264#define MAIL_DIRECTORY "$maildir"
29546_ACEOF 15265_ACEOF
29547 15266
15267 fi
15268
15269else
15270
15271 if test "X$ac_status" = "X2";then
15272# our test program didn't find it. Default to /var/spool/mail
15273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Using: default value of /var/spool/mail" >&5
15274$as_echo "Using: default value of /var/spool/mail" >&6; }
15275 cat >>confdefs.h <<_ACEOF
15276#define MAIL_DIRECTORY "/var/spool/mail"
15277_ACEOF
15278
15279 else
15280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: *** not found ***" >&5
15281$as_echo "*** not found ***" >&6; }
15282 fi
15283
15284fi
15285rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15286 conftest.$ac_objext conftest.beam conftest.$ac_ext
29548fi 15287fi
29549 15288
15289 fi
15290
15291
15292fi
15293 # maildir
15294
29550if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then 15295if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
29551 { echo "$as_me:$LINENO: WARNING: cross compiling: Disabling /dev/ptmx test" >&5 15296 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptmx test" >&5
29552echo "$as_me: WARNING: cross compiling: Disabling /dev/ptmx test" >&2;} 15297$as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptmx test" >&2;}
29553 disable_ptmx_check=yes 15298 disable_ptmx_check=yes
29554fi 15299fi
29555if test -z "$no_dev_ptmx" ; then 15300if test -z "$no_dev_ptmx" ; then
29556 if test "x$disable_ptmx_check" != "xyes" ; then 15301 if test "x$disable_ptmx_check" != "xyes" ; then
29557 { echo "$as_me:$LINENO: checking for \"/dev/ptmx\"" >&5 15302 as_ac_File=`$as_echo "ac_cv_file_"/dev/ptmx"" | $as_tr_sh`
29558echo $ECHO_N "checking for \"/dev/ptmx\"... $ECHO_C" >&6; } 15303{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptmx\"" >&5
29559if test "${ac_cv_file___dev_ptmx_+set}" = set; then 15304$as_echo_n "checking for \"/dev/ptmx\"... " >&6; }
29560 echo $ECHO_N "(cached) $ECHO_C" >&6 15305if eval \${$as_ac_File+:} false; then :
15306 $as_echo_n "(cached) " >&6
29561else 15307else
29562 test "$cross_compiling" = yes && 15308 test "$cross_compiling" = yes &&
29563 { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 15309 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
29564echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
29565 { (exit 1); exit 1; }; }
29566if test -r ""/dev/ptmx""; then 15310if test -r ""/dev/ptmx""; then
29567 ac_cv_file___dev_ptmx_=yes 15311 eval "$as_ac_File=yes"
29568else 15312else
29569 ac_cv_file___dev_ptmx_=no 15313 eval "$as_ac_File=no"
29570fi 15314fi
29571fi 15315fi
29572{ echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptmx_" >&5 15316eval ac_res=\$$as_ac_File
29573echo "${ECHO_T}$ac_cv_file___dev_ptmx_" >&6; } 15317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29574if test $ac_cv_file___dev_ptmx_ = yes; then 15318$as_echo "$ac_res" >&6; }
15319if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
29575 15320
29576 15321
29577cat >>confdefs.h <<_ACEOF 15322cat >>confdefs.h <<_ACEOF
@@ -29587,24 +15332,24 @@ fi
29587fi 15332fi
29588 15333
29589if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then 15334if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
29590 { echo "$as_me:$LINENO: checking for \"/dev/ptc\"" >&5 15335 as_ac_File=`$as_echo "ac_cv_file_"/dev/ptc"" | $as_tr_sh`
29591echo $ECHO_N "checking for \"/dev/ptc\"... $ECHO_C" >&6; } 15336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/dev/ptc\"" >&5
29592if test "${ac_cv_file___dev_ptc_+set}" = set; then 15337$as_echo_n "checking for \"/dev/ptc\"... " >&6; }
29593 echo $ECHO_N "(cached) $ECHO_C" >&6 15338if eval \${$as_ac_File+:} false; then :
15339 $as_echo_n "(cached) " >&6
29594else 15340else
29595 test "$cross_compiling" = yes && 15341 test "$cross_compiling" = yes &&
29596 { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 15342 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
29597echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
29598 { (exit 1); exit 1; }; }
29599if test -r ""/dev/ptc""; then 15343if test -r ""/dev/ptc""; then
29600 ac_cv_file___dev_ptc_=yes 15344 eval "$as_ac_File=yes"
29601else 15345else
29602 ac_cv_file___dev_ptc_=no 15346 eval "$as_ac_File=no"
29603fi 15347fi
29604fi 15348fi
29605{ echo "$as_me:$LINENO: result: $ac_cv_file___dev_ptc_" >&5 15349eval ac_res=\$$as_ac_File
29606echo "${ECHO_T}$ac_cv_file___dev_ptc_" >&6; } 15350 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29607if test $ac_cv_file___dev_ptc_ = yes; then 15351$as_echo "$ac_res" >&6; }
15352if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
29608 15353
29609 15354
29610cat >>confdefs.h <<_ACEOF 15355cat >>confdefs.h <<_ACEOF
@@ -29617,23 +15362,21 @@ _ACEOF
29617fi 15362fi
29618 15363
29619else 15364else
29620 { echo "$as_me:$LINENO: WARNING: cross compiling: Disabling /dev/ptc test" >&5 15365 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: Disabling /dev/ptc test" >&5
29621echo "$as_me: WARNING: cross compiling: Disabling /dev/ptc test" >&2;} 15366$as_echo "$as_me: WARNING: cross compiling: Disabling /dev/ptc test" >&2;}
29622fi 15367fi
29623 15368
29624# Options from here on. Some of these are preset by platform above 15369# Options from here on. Some of these are preset by platform above
29625 15370
29626# Check whether --with-mantype was given. 15371# Check whether --with-mantype was given.
29627if test "${with_mantype+set}" = set; then 15372if test "${with_mantype+set}" = set; then :
29628 withval=$with_mantype; 15373 withval=$with_mantype;
29629 case "$withval" in 15374 case "$withval" in
29630 man|cat|doc) 15375 man|cat|doc)
29631 MANTYPE=$withval 15376 MANTYPE=$withval
29632 ;; 15377 ;;
29633 *) 15378 *)
29634 { { echo "$as_me:$LINENO: error: invalid man type: $withval" >&5 15379 as_fn_error $? "invalid man type: $withval" "$LINENO" 5
29635echo "$as_me: error: invalid man type: $withval" >&2;}
29636 { (exit 1); exit 1; }; }
29637 ;; 15380 ;;
29638 esac 15381 esac
29639 15382
@@ -29646,10 +15389,10 @@ if test -z "$MANTYPE"; then
29646do 15389do
29647 # Extract the first word of "$ac_prog", so it can be a program name with args. 15390 # Extract the first word of "$ac_prog", so it can be a program name with args.
29648set dummy $ac_prog; ac_word=$2 15391set dummy $ac_prog; ac_word=$2
29649{ echo "$as_me:$LINENO: checking for $ac_word" >&5 15392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29650echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } 15393$as_echo_n "checking for $ac_word... " >&6; }
29651if test "${ac_cv_path_NROFF+set}" = set; then 15394if ${ac_cv_path_NROFF+:} false; then :
29652 echo $ECHO_N "(cached) $ECHO_C" >&6 15395 $as_echo_n "(cached) " >&6
29653else 15396else
29654 case $NROFF in 15397 case $NROFF in
29655 [\\/]* | ?:[\\/]*) 15398 [\\/]* | ?:[\\/]*)
@@ -29661,14 +15404,14 @@ for as_dir in $TestPath
29661do 15404do
29662 IFS=$as_save_IFS 15405 IFS=$as_save_IFS
29663 test -z "$as_dir" && as_dir=. 15406 test -z "$as_dir" && as_dir=.
29664 for ac_exec_ext in '' $ac_executable_extensions; do 15407 for ac_exec_ext in '' $ac_executable_extensions; do
29665 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then 15408 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
29666 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext" 15409 ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext"
29667 echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 15410 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29668 break 2 15411 break 2
29669 fi 15412 fi
29670done 15413done
29671done 15414 done
29672IFS=$as_save_IFS 15415IFS=$as_save_IFS
29673 15416
29674 ;; 15417 ;;
@@ -29676,11 +15419,11 @@ esac
29676fi 15419fi
29677NROFF=$ac_cv_path_NROFF 15420NROFF=$ac_cv_path_NROFF
29678if test -n "$NROFF"; then 15421if test -n "$NROFF"; then
29679 { echo "$as_me:$LINENO: result: $NROFF" >&5 15422 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NROFF" >&5
29680echo "${ECHO_T}$NROFF" >&6; } 15423$as_echo "$NROFF" >&6; }
29681else 15424else
29682 { echo "$as_me:$LINENO: result: no" >&5 15425 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29683echo "${ECHO_T}no" >&6; } 15426$as_echo "no" >&6; }
29684fi 15427fi
29685 15428
29686 15429
@@ -29708,13 +15451,11 @@ fi
29708MD5_MSG="no" 15451MD5_MSG="no"
29709 15452
29710# Check whether --with-md5-passwords was given. 15453# Check whether --with-md5-passwords was given.
29711if test "${with_md5_passwords+set}" = set; then 15454if test "${with_md5_passwords+set}" = set; then :
29712 withval=$with_md5_passwords; 15455 withval=$with_md5_passwords;
29713 if test "x$withval" != "xno" ; then 15456 if test "x$withval" != "xno" ; then
29714 15457
29715cat >>confdefs.h <<\_ACEOF 15458$as_echo "#define HAVE_MD5_PASSWORDS 1" >>confdefs.h
29716#define HAVE_MD5_PASSWORDS 1
29717_ACEOF
29718 15459
29719 MD5_MSG="yes" 15460 MD5_MSG="yes"
29720 fi 15461 fi
@@ -29726,12 +15467,10 @@ fi
29726# Whether to disable shadow password support 15467# Whether to disable shadow password support
29727 15468
29728# Check whether --with-shadow was given. 15469# Check whether --with-shadow was given.
29729if test "${with_shadow+set}" = set; then 15470if test "${with_shadow+set}" = set; then :
29730 withval=$with_shadow; 15471 withval=$with_shadow;
29731 if test "x$withval" = "xno" ; then 15472 if test "x$withval" = "xno" ; then
29732 cat >>confdefs.h <<\_ACEOF 15473 $as_echo "#define DISABLE_SHADOW 1" >>confdefs.h
29733#define DISABLE_SHADOW 1
29734_ACEOF
29735 15474
29736 disable_shadow=yes 15475 disable_shadow=yes
29737 fi 15476 fi
@@ -29741,18 +15480,14 @@ fi
29741 15480
29742 15481
29743if test -z "$disable_shadow" ; then 15482if test -z "$disable_shadow" ; then
29744 { echo "$as_me:$LINENO: checking if the systems has expire shadow information" >&5 15483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the systems has expire shadow information" >&5
29745echo $ECHO_N "checking if the systems has expire shadow information... $ECHO_C" >&6; } 15484$as_echo_n "checking if the systems has expire shadow information... " >&6; }
29746 cat >conftest.$ac_ext <<_ACEOF 15485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29747/* confdefs.h. */
29748_ACEOF
29749cat confdefs.h >>conftest.$ac_ext
29750cat >>conftest.$ac_ext <<_ACEOF
29751/* end confdefs.h. */ 15486/* end confdefs.h. */
29752 15487
29753#include <sys/types.h> 15488#include <sys/types.h>
29754#include <shadow.h> 15489#include <shadow.h>
29755 struct spwd sp; 15490struct spwd sp;
29756 15491
29757int 15492int
29758main () 15493main ()
@@ -29762,45 +15497,20 @@ main ()
29762 return 0; 15497 return 0;
29763} 15498}
29764_ACEOF 15499_ACEOF
29765rm -f conftest.$ac_objext 15500if ac_fn_c_try_compile "$LINENO"; then :
29766if { (ac_try="$ac_compile"
29767case "(($ac_try" in
29768 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29769 *) ac_try_echo=$ac_try;;
29770esac
29771eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29772 (eval "$ac_compile") 2>conftest.er1
29773 ac_status=$?
29774 grep -v '^ *+' conftest.er1 >conftest.err
29775 rm -f conftest.er1
29776 cat conftest.err >&5
29777 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29778 (exit $ac_status); } && {
29779 test -z "$ac_c_werror_flag" ||
29780 test ! -s conftest.err
29781 } && test -s conftest.$ac_objext; then
29782 sp_expire_available=yes 15501 sp_expire_available=yes
29783else
29784 echo "$as_me: failed program was:" >&5
29785sed 's/^/| /' conftest.$ac_ext >&5
29786
29787
29788
29789fi 15502fi
29790
29791rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 15503rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29792 15504
29793 if test "x$sp_expire_available" = "xyes" ; then 15505 if test "x$sp_expire_available" = "xyes" ; then
29794 { echo "$as_me:$LINENO: result: yes" >&5 15506 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
29795echo "${ECHO_T}yes" >&6; } 15507$as_echo "yes" >&6; }
29796 15508
29797cat >>confdefs.h <<\_ACEOF 15509$as_echo "#define HAS_SHADOW_EXPIRE 1" >>confdefs.h
29798#define HAS_SHADOW_EXPIRE 1
29799_ACEOF
29800 15510
29801 else 15511 else
29802 { echo "$as_me:$LINENO: result: no" >&5 15512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29803echo "${ECHO_T}no" >&6; } 15513$as_echo "no" >&6; }
29804 fi 15514 fi
29805fi 15515fi
29806 15516
@@ -29808,20 +15518,16 @@ fi
29808if test ! -z "$IPADDR_IN_DISPLAY" ; then 15518if test ! -z "$IPADDR_IN_DISPLAY" ; then
29809 DISPLAY_HACK_MSG="yes" 15519 DISPLAY_HACK_MSG="yes"
29810 15520
29811cat >>confdefs.h <<\_ACEOF 15521$as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
29812#define IPADDR_IN_DISPLAY 1
29813_ACEOF
29814 15522
29815else 15523else
29816 DISPLAY_HACK_MSG="no" 15524 DISPLAY_HACK_MSG="no"
29817 15525
29818# Check whether --with-ipaddr-display was given. 15526# Check whether --with-ipaddr-display was given.
29819if test "${with_ipaddr_display+set}" = set; then 15527if test "${with_ipaddr_display+set}" = set; then :
29820 withval=$with_ipaddr_display; 15528 withval=$with_ipaddr_display;
29821 if test "x$withval" != "xno" ; then 15529 if test "x$withval" != "xno" ; then
29822 cat >>confdefs.h <<\_ACEOF 15530 $as_echo "#define IPADDR_IN_DISPLAY 1" >>confdefs.h
29823#define IPADDR_IN_DISPLAY 1
29824_ACEOF
29825 15531
29826 DISPLAY_HACK_MSG="yes" 15532 DISPLAY_HACK_MSG="yes"
29827 fi 15533 fi
@@ -29833,10 +15539,10 @@ fi
29833 15539
29834# check for /etc/default/login and use it if present. 15540# check for /etc/default/login and use it if present.
29835# Check whether --enable-etc-default-login was given. 15541# Check whether --enable-etc-default-login was given.
29836if test "${enable_etc_default_login+set}" = set; then 15542if test "${enable_etc_default_login+set}" = set; then :
29837 enableval=$enable_etc_default_login; if test "x$enableval" = "xno"; then 15543 enableval=$enable_etc_default_login; if test "x$enableval" = "xno"; then
29838 { echo "$as_me:$LINENO: /etc/default/login handling disabled" >&5 15544 { $as_echo "$as_me:${as_lineno-$LINENO}: /etc/default/login handling disabled" >&5
29839echo "$as_me: /etc/default/login handling disabled" >&6;} 15545$as_echo "$as_me: /etc/default/login handling disabled" >&6;}
29840 etc_default_login=no 15546 etc_default_login=no
29841 else 15547 else
29842 etc_default_login=yes 15548 etc_default_login=yes
@@ -29844,8 +15550,8 @@ echo "$as_me: /etc/default/login handling disabled" >&6;}
29844else 15550else
29845 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; 15551 if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes";
29846 then 15552 then
29847 { echo "$as_me:$LINENO: WARNING: cross compiling: not checking /etc/default/login" >&5 15553 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cross compiling: not checking /etc/default/login" >&5
29848echo "$as_me: WARNING: cross compiling: not checking /etc/default/login" >&2;} 15554$as_echo "$as_me: WARNING: cross compiling: not checking /etc/default/login" >&2;}
29849 etc_default_login=no 15555 etc_default_login=no
29850 else 15556 else
29851 etc_default_login=yes 15557 etc_default_login=yes
@@ -29855,32 +15561,30 @@ fi
29855 15561
29856 15562
29857if test "x$etc_default_login" != "xno"; then 15563if test "x$etc_default_login" != "xno"; then
29858 { echo "$as_me:$LINENO: checking for \"/etc/default/login\"" >&5 15564 as_ac_File=`$as_echo "ac_cv_file_"/etc/default/login"" | $as_tr_sh`
29859echo $ECHO_N "checking for \"/etc/default/login\"... $ECHO_C" >&6; } 15565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for \"/etc/default/login\"" >&5
29860if test "${ac_cv_file___etc_default_login_+set}" = set; then 15566$as_echo_n "checking for \"/etc/default/login\"... " >&6; }
29861 echo $ECHO_N "(cached) $ECHO_C" >&6 15567if eval \${$as_ac_File+:} false; then :
15568 $as_echo_n "(cached) " >&6
29862else 15569else
29863 test "$cross_compiling" = yes && 15570 test "$cross_compiling" = yes &&
29864 { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 15571 as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5
29865echo "$as_me: error: cannot check for file existence when cross compiling" >&2;}
29866 { (exit 1); exit 1; }; }
29867if test -r ""/etc/default/login""; then 15572if test -r ""/etc/default/login""; then
29868 ac_cv_file___etc_default_login_=yes 15573 eval "$as_ac_File=yes"
29869else 15574else
29870 ac_cv_file___etc_default_login_=no 15575 eval "$as_ac_File=no"
29871fi 15576fi
29872fi 15577fi
29873{ echo "$as_me:$LINENO: result: $ac_cv_file___etc_default_login_" >&5 15578eval ac_res=\$$as_ac_File
29874echo "${ECHO_T}$ac_cv_file___etc_default_login_" >&6; } 15579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29875if test $ac_cv_file___etc_default_login_ = yes; then 15580$as_echo "$ac_res" >&6; }
15581if eval test \"x\$"$as_ac_File"\" = x"yes"; then :
29876 external_path_file=/etc/default/login 15582 external_path_file=/etc/default/login
29877fi 15583fi
29878 15584
29879 if test "x$external_path_file" = "x/etc/default/login"; then 15585 if test "x$external_path_file" = "x/etc/default/login"; then
29880 15586
29881cat >>confdefs.h <<\_ACEOF 15587$as_echo "#define HAVE_ETC_DEFAULT_LOGIN 1" >>confdefs.h
29882#define HAVE_ETC_DEFAULT_LOGIN 1
29883_ACEOF
29884 15588
29885 fi 15589 fi
29886fi 15590fi
@@ -29894,21 +15598,21 @@ fi
29894SERVER_PATH_MSG="(default)" 15598SERVER_PATH_MSG="(default)"
29895 15599
29896# Check whether --with-default-path was given. 15600# Check whether --with-default-path was given.
29897if test "${with_default_path+set}" = set; then 15601if test "${with_default_path+set}" = set; then :
29898 withval=$with_default_path; 15602 withval=$with_default_path;
29899 if test "x$external_path_file" = "x/etc/login.conf" ; then 15603 if test "x$external_path_file" = "x/etc/login.conf" ; then
29900 { echo "$as_me:$LINENO: WARNING: 15604 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
29901--with-default-path=PATH has no effect on this system. 15605--with-default-path=PATH has no effect on this system.
29902Edit /etc/login.conf instead." >&5 15606Edit /etc/login.conf instead." >&5
29903echo "$as_me: WARNING: 15607$as_echo "$as_me: WARNING:
29904--with-default-path=PATH has no effect on this system. 15608--with-default-path=PATH has no effect on this system.
29905Edit /etc/login.conf instead." >&2;} 15609Edit /etc/login.conf instead." >&2;}
29906 elif test "x$withval" != "xno" ; then 15610 elif test "x$withval" != "xno" ; then
29907 if test ! -z "$external_path_file" ; then 15611 if test ! -z "$external_path_file" ; then
29908 { echo "$as_me:$LINENO: WARNING: 15612 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
29909--with-default-path=PATH will only be used if PATH is not defined in 15613--with-default-path=PATH will only be used if PATH is not defined in
29910$external_path_file ." >&5 15614$external_path_file ." >&5
29911echo "$as_me: WARNING: 15615$as_echo "$as_me: WARNING:
29912--with-default-path=PATH will only be used if PATH is not defined in 15616--with-default-path=PATH will only be used if PATH is not defined in
29913$external_path_file ." >&2;} 15617$external_path_file ." >&2;}
29914 fi 15618 fi
@@ -29918,26 +15622,22 @@ $external_path_file ." >&2;}
29918 15622
29919else 15623else
29920 if test "x$external_path_file" = "x/etc/login.conf" ; then 15624 if test "x$external_path_file" = "x/etc/login.conf" ; then
29921 { echo "$as_me:$LINENO: WARNING: Make sure the path to scp is in /etc/login.conf" >&5 15625 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Make sure the path to scp is in /etc/login.conf" >&5
29922echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;} 15626$as_echo "$as_me: WARNING: Make sure the path to scp is in /etc/login.conf" >&2;}
29923 else 15627 else
29924 if test ! -z "$external_path_file" ; then 15628 if test ! -z "$external_path_file" ; then
29925 { echo "$as_me:$LINENO: WARNING: 15629 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
29926If PATH is defined in $external_path_file, ensure the path to scp is included, 15630If PATH is defined in $external_path_file, ensure the path to scp is included,
29927otherwise scp will not work." >&5 15631otherwise scp will not work." >&5
29928echo "$as_me: WARNING: 15632$as_echo "$as_me: WARNING:
29929If PATH is defined in $external_path_file, ensure the path to scp is included, 15633If PATH is defined in $external_path_file, ensure the path to scp is included,
29930otherwise scp will not work." >&2;} 15634otherwise scp will not work." >&2;}
29931 fi 15635 fi
29932 if test "$cross_compiling" = yes; then 15636 if test "$cross_compiling" = yes; then :
29933 user_path="/usr/bin:/bin:/usr/sbin:/sbin" 15637 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
29934 15638
29935else 15639else
29936 cat >conftest.$ac_ext <<_ACEOF 15640 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29937/* confdefs.h. */
29938_ACEOF
29939cat confdefs.h >>conftest.$ac_ext
29940cat >>conftest.$ac_ext <<_ACEOF
29941/* end confdefs.h. */ 15641/* end confdefs.h. */
29942 15642
29943/* find out what STDPATH is */ 15643/* find out what STDPATH is */
@@ -29957,8 +15657,10 @@ cat >>conftest.$ac_ext <<_ACEOF
29957#include <fcntl.h> 15657#include <fcntl.h>
29958#define DATA "conftest.stdpath" 15658#define DATA "conftest.stdpath"
29959 15659
29960main() 15660int
15661main ()
29961{ 15662{
15663
29962 FILE *fd; 15664 FILE *fd;
29963 int rc; 15665 int rc;
29964 15666
@@ -29970,42 +15672,20 @@ main()
29970 exit(1); 15672 exit(1);
29971 15673
29972 exit(0); 15674 exit(0);
29973}
29974 15675
15676 ;
15677 return 0;
15678}
29975_ACEOF 15679_ACEOF
29976rm -f conftest$ac_exeext 15680if ac_fn_c_try_run "$LINENO"; then :
29977if { (ac_try="$ac_link"
29978case "(($ac_try" in
29979 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29980 *) ac_try_echo=$ac_try;;
29981esac
29982eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29983 (eval "$ac_link") 2>&5
29984 ac_status=$?
29985 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29986 (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
29987 { (case "(($ac_try" in
29988 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
29989 *) ac_try_echo=$ac_try;;
29990esac
29991eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
29992 (eval "$ac_try") 2>&5
29993 ac_status=$?
29994 echo "$as_me:$LINENO: \$? = $ac_status" >&5
29995 (exit $ac_status); }; }; then
29996 user_path=`cat conftest.stdpath` 15681 user_path=`cat conftest.stdpath`
29997else 15682else
29998 echo "$as_me: program exited with status $ac_status" >&5 15683 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
29999echo "$as_me: failed program was:" >&5
30000sed 's/^/| /' conftest.$ac_ext >&5
30001
30002( exit $ac_status )
30003 user_path="/usr/bin:/bin:/usr/sbin:/sbin"
30004fi 15684fi
30005rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext 15685rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15686 conftest.$ac_objext conftest.beam conftest.$ac_ext
30006fi 15687fi
30007 15688
30008
30009# make sure $bindir is in USER_PATH so scp will work 15689# make sure $bindir is in USER_PATH so scp will work
30010 t_bindir=`eval echo ${bindir}` 15690 t_bindir=`eval echo ${bindir}`
30011 case $t_bindir in 15691 case $t_bindir in
@@ -30019,8 +15699,8 @@ fi
30019 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1 15699 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
30020 if test $? -ne 0 ; then 15700 if test $? -ne 0 ; then
30021 user_path=$user_path:$t_bindir 15701 user_path=$user_path:$t_bindir
30022 { echo "$as_me:$LINENO: result: Adding $t_bindir to USER_PATH so scp will work" >&5 15702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: Adding $t_bindir to USER_PATH so scp will work" >&5
30023echo "${ECHO_T}Adding $t_bindir to USER_PATH so scp will work" >&6; } 15703$as_echo "Adding $t_bindir to USER_PATH so scp will work" >&6; }
30024 fi 15704 fi
30025 fi 15705 fi
30026 fi 15706 fi
@@ -30039,7 +15719,7 @@ fi
30039# Set superuser path separately to user path 15719# Set superuser path separately to user path
30040 15720
30041# Check whether --with-superuser-path was given. 15721# Check whether --with-superuser-path was given.
30042if test "${with_superuser_path+set}" = set; then 15722if test "${with_superuser_path+set}" = set; then :
30043 withval=$with_superuser_path; 15723 withval=$with_superuser_path;
30044 if test -n "$withval" && test "x$withval" != "xno" && \ 15724 if test -n "$withval" && test "x$withval" != "xno" && \
30045 test "x${withval}" != "xyes"; then 15725 test "x${withval}" != "xyes"; then
@@ -30056,40 +15736,36 @@ fi
30056 15736
30057 15737
30058 15738
30059{ echo "$as_me:$LINENO: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5 15739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if we need to convert IPv4 in IPv6-mapped addresses" >&5
30060echo $ECHO_N "checking if we need to convert IPv4 in IPv6-mapped addresses... $ECHO_C" >&6; } 15740$as_echo_n "checking if we need to convert IPv4 in IPv6-mapped addresses... " >&6; }
30061IPV4_IN6_HACK_MSG="no" 15741IPV4_IN6_HACK_MSG="no"
30062 15742
30063# Check whether --with-4in6 was given. 15743# Check whether --with-4in6 was given.
30064if test "${with_4in6+set}" = set; then 15744if test "${with_4in6+set}" = set; then :
30065 withval=$with_4in6; 15745 withval=$with_4in6;
30066 if test "x$withval" != "xno" ; then 15746 if test "x$withval" != "xno" ; then
30067 { echo "$as_me:$LINENO: result: yes" >&5 15747 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30068echo "${ECHO_T}yes" >&6; } 15748$as_echo "yes" >&6; }
30069 15749
30070cat >>confdefs.h <<\_ACEOF 15750$as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
30071#define IPV4_IN_IPV6 1
30072_ACEOF
30073 15751
30074 IPV4_IN6_HACK_MSG="yes" 15752 IPV4_IN6_HACK_MSG="yes"
30075 else 15753 else
30076 { echo "$as_me:$LINENO: result: no" >&5 15754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30077echo "${ECHO_T}no" >&6; } 15755$as_echo "no" >&6; }
30078 fi 15756 fi
30079 15757
30080else 15758else
30081 15759
30082 if test "x$inet6_default_4in6" = "xyes"; then 15760 if test "x$inet6_default_4in6" = "xyes"; then
30083 { echo "$as_me:$LINENO: result: yes (default)" >&5 15761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
30084echo "${ECHO_T}yes (default)" >&6; } 15762$as_echo "yes (default)" >&6; }
30085 cat >>confdefs.h <<\_ACEOF 15763 $as_echo "#define IPV4_IN_IPV6 1" >>confdefs.h
30086#define IPV4_IN_IPV6 1
30087_ACEOF
30088 15764
30089 IPV4_IN6_HACK_MSG="yes" 15765 IPV4_IN6_HACK_MSG="yes"
30090 else 15766 else
30091 { echo "$as_me:$LINENO: result: no (default)" >&5 15767 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no (default)" >&5
30092echo "${ECHO_T}no (default)" >&6; } 15768$as_echo "no (default)" >&6; }
30093 fi 15769 fi
30094 15770
30095 15771
@@ -30100,13 +15776,11 @@ fi
30100BSD_AUTH_MSG=no 15776BSD_AUTH_MSG=no
30101 15777
30102# Check whether --with-bsd-auth was given. 15778# Check whether --with-bsd-auth was given.
30103if test "${with_bsd_auth+set}" = set; then 15779if test "${with_bsd_auth+set}" = set; then :
30104 withval=$with_bsd_auth; 15780 withval=$with_bsd_auth;
30105 if test "x$withval" != "xno" ; then 15781 if test "x$withval" != "xno" ; then
30106 15782
30107cat >>confdefs.h <<\_ACEOF 15783$as_echo "#define BSD_AUTH 1" >>confdefs.h
30108#define BSD_AUTH 1
30109_ACEOF
30110 15784
30111 BSD_AUTH_MSG=yes 15785 BSD_AUTH_MSG=yes
30112 fi 15786 fi
@@ -30127,14 +15801,14 @@ fi
30127 15801
30128 15802
30129# Check whether --with-pid-dir was given. 15803# Check whether --with-pid-dir was given.
30130if test "${with_pid_dir+set}" = set; then 15804if test "${with_pid_dir+set}" = set; then :
30131 withval=$with_pid_dir; 15805 withval=$with_pid_dir;
30132 if test -n "$withval" && test "x$withval" != "xno" && \ 15806 if test -n "$withval" && test "x$withval" != "xno" && \
30133 test "x${withval}" != "xyes"; then 15807 test "x${withval}" != "xyes"; then
30134 piddir=$withval 15808 piddir=$withval
30135 if test ! -d $piddir ; then 15809 if test ! -d $piddir ; then
30136 { echo "$as_me:$LINENO: WARNING: ** no $piddir directory on this system **" >&5 15810 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** no $piddir directory on this system **" >&5
30137echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;} 15811$as_echo "$as_me: WARNING: ** no $piddir directory on this system **" >&2;}
30138 fi 15812 fi
30139 fi 15813 fi
30140 15814
@@ -30150,12 +15824,10 @@ _ACEOF
30150 15824
30151 15825
30152# Check whether --enable-lastlog was given. 15826# Check whether --enable-lastlog was given.
30153if test "${enable_lastlog+set}" = set; then 15827if test "${enable_lastlog+set}" = set; then :
30154 enableval=$enable_lastlog; 15828 enableval=$enable_lastlog;
30155 if test "x$enableval" = "xno" ; then 15829 if test "x$enableval" = "xno" ; then
30156 cat >>confdefs.h <<\_ACEOF 15830 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
30157#define DISABLE_LASTLOG 1
30158_ACEOF
30159 15831
30160 fi 15832 fi
30161 15833
@@ -30163,12 +15835,10 @@ _ACEOF
30163fi 15835fi
30164 15836
30165# Check whether --enable-utmp was given. 15837# Check whether --enable-utmp was given.
30166if test "${enable_utmp+set}" = set; then 15838if test "${enable_utmp+set}" = set; then :
30167 enableval=$enable_utmp; 15839 enableval=$enable_utmp;
30168 if test "x$enableval" = "xno" ; then 15840 if test "x$enableval" = "xno" ; then
30169 cat >>confdefs.h <<\_ACEOF 15841 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
30170#define DISABLE_UTMP 1
30171_ACEOF
30172 15842
30173 fi 15843 fi
30174 15844
@@ -30176,13 +15846,11 @@ _ACEOF
30176fi 15846fi
30177 15847
30178# Check whether --enable-utmpx was given. 15848# Check whether --enable-utmpx was given.
30179if test "${enable_utmpx+set}" = set; then 15849if test "${enable_utmpx+set}" = set; then :
30180 enableval=$enable_utmpx; 15850 enableval=$enable_utmpx;
30181 if test "x$enableval" = "xno" ; then 15851 if test "x$enableval" = "xno" ; then
30182 15852
30183cat >>confdefs.h <<\_ACEOF 15853$as_echo "#define DISABLE_UTMPX 1" >>confdefs.h
30184#define DISABLE_UTMPX 1
30185_ACEOF
30186 15854
30187 fi 15855 fi
30188 15856
@@ -30190,12 +15858,10 @@ _ACEOF
30190fi 15858fi
30191 15859
30192# Check whether --enable-wtmp was given. 15860# Check whether --enable-wtmp was given.
30193if test "${enable_wtmp+set}" = set; then 15861if test "${enable_wtmp+set}" = set; then :
30194 enableval=$enable_wtmp; 15862 enableval=$enable_wtmp;
30195 if test "x$enableval" = "xno" ; then 15863 if test "x$enableval" = "xno" ; then
30196 cat >>confdefs.h <<\_ACEOF 15864 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
30197#define DISABLE_WTMP 1
30198_ACEOF
30199 15865
30200 fi 15866 fi
30201 15867
@@ -30203,13 +15869,11 @@ _ACEOF
30203fi 15869fi
30204 15870
30205# Check whether --enable-wtmpx was given. 15871# Check whether --enable-wtmpx was given.
30206if test "${enable_wtmpx+set}" = set; then 15872if test "${enable_wtmpx+set}" = set; then :
30207 enableval=$enable_wtmpx; 15873 enableval=$enable_wtmpx;
30208 if test "x$enableval" = "xno" ; then 15874 if test "x$enableval" = "xno" ; then
30209 15875
30210cat >>confdefs.h <<\_ACEOF 15876$as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
30211#define DISABLE_WTMPX 1
30212_ACEOF
30213 15877
30214 fi 15878 fi
30215 15879
@@ -30217,12 +15881,10 @@ _ACEOF
30217fi 15881fi
30218 15882
30219# Check whether --enable-libutil was given. 15883# Check whether --enable-libutil was given.
30220if test "${enable_libutil+set}" = set; then 15884if test "${enable_libutil+set}" = set; then :
30221 enableval=$enable_libutil; 15885 enableval=$enable_libutil;
30222 if test "x$enableval" = "xno" ; then 15886 if test "x$enableval" = "xno" ; then
30223 cat >>confdefs.h <<\_ACEOF 15887 $as_echo "#define DISABLE_LOGIN 1" >>confdefs.h
30224#define DISABLE_LOGIN 1
30225_ACEOF
30226 15888
30227 fi 15889 fi
30228 15890
@@ -30230,13 +15892,11 @@ _ACEOF
30230fi 15892fi
30231 15893
30232# Check whether --enable-pututline was given. 15894# Check whether --enable-pututline was given.
30233if test "${enable_pututline+set}" = set; then 15895if test "${enable_pututline+set}" = set; then :
30234 enableval=$enable_pututline; 15896 enableval=$enable_pututline;
30235 if test "x$enableval" = "xno" ; then 15897 if test "x$enableval" = "xno" ; then
30236 15898
30237cat >>confdefs.h <<\_ACEOF 15899$as_echo "#define DISABLE_PUTUTLINE 1" >>confdefs.h
30238#define DISABLE_PUTUTLINE 1
30239_ACEOF
30240 15900
30241 fi 15901 fi
30242 15902
@@ -30244,13 +15904,11 @@ _ACEOF
30244fi 15904fi
30245 15905
30246# Check whether --enable-pututxline was given. 15906# Check whether --enable-pututxline was given.
30247if test "${enable_pututxline+set}" = set; then 15907if test "${enable_pututxline+set}" = set; then :
30248 enableval=$enable_pututxline; 15908 enableval=$enable_pututxline;
30249 if test "x$enableval" = "xno" ; then 15909 if test "x$enableval" = "xno" ; then
30250 15910
30251cat >>confdefs.h <<\_ACEOF 15911$as_echo "#define DISABLE_PUTUTXLINE 1" >>confdefs.h
30252#define DISABLE_PUTUTXLINE 1
30253_ACEOF
30254 15912
30255 fi 15913 fi
30256 15914
@@ -30259,12 +15917,10 @@ fi
30259 15917
30260 15918
30261# Check whether --with-lastlog was given. 15919# Check whether --with-lastlog was given.
30262if test "${with_lastlog+set}" = set; then 15920if test "${with_lastlog+set}" = set; then :
30263 withval=$with_lastlog; 15921 withval=$with_lastlog;
30264 if test "x$withval" = "xno" ; then 15922 if test "x$withval" = "xno" ; then
30265 cat >>confdefs.h <<\_ACEOF 15923 $as_echo "#define DISABLE_LASTLOG 1" >>confdefs.h
30266#define DISABLE_LASTLOG 1
30267_ACEOF
30268 15924
30269 elif test -n "$withval" && test "x${withval}" != "xyes"; then 15925 elif test -n "$withval" && test "x${withval}" != "xyes"; then
30270 conf_lastlog_location=$withval 15926 conf_lastlog_location=$withval
@@ -30275,13 +15931,9 @@ fi
30275 15931
30276 15932
30277 15933
30278{ echo "$as_me:$LINENO: checking if your system defines LASTLOG_FILE" >&5 15934{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines LASTLOG_FILE" >&5
30279echo $ECHO_N "checking if your system defines LASTLOG_FILE... $ECHO_C" >&6; } 15935$as_echo_n "checking if your system defines LASTLOG_FILE... " >&6; }
30280cat >conftest.$ac_ext <<_ACEOF 15936cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30281/* confdefs.h. */
30282_ACEOF
30283cat confdefs.h >>conftest.$ac_ext
30284cat >>conftest.$ac_ext <<_ACEOF
30285/* end confdefs.h. */ 15937/* end confdefs.h. */
30286 15938
30287#include <sys/types.h> 15939#include <sys/types.h>
@@ -30304,39 +15956,16 @@ main ()
30304 return 0; 15956 return 0;
30305} 15957}
30306_ACEOF 15958_ACEOF
30307rm -f conftest.$ac_objext 15959if ac_fn_c_try_compile "$LINENO"; then :
30308if { (ac_try="$ac_compile" 15960 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30309case "(($ac_try" in 15961$as_echo "yes" >&6; }
30310 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30311 *) ac_try_echo=$ac_try;;
30312esac
30313eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30314 (eval "$ac_compile") 2>conftest.er1
30315 ac_status=$?
30316 grep -v '^ *+' conftest.er1 >conftest.err
30317 rm -f conftest.er1
30318 cat conftest.err >&5
30319 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30320 (exit $ac_status); } && {
30321 test -z "$ac_c_werror_flag" ||
30322 test ! -s conftest.err
30323 } && test -s conftest.$ac_objext; then
30324 { echo "$as_me:$LINENO: result: yes" >&5
30325echo "${ECHO_T}yes" >&6; }
30326else 15962else
30327 echo "$as_me: failed program was:" >&5
30328sed 's/^/| /' conftest.$ac_ext >&5
30329
30330 15963
30331 { echo "$as_me:$LINENO: result: no" >&5 15964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30332echo "${ECHO_T}no" >&6; } 15965$as_echo "no" >&6; }
30333 { echo "$as_me:$LINENO: checking if your system defines _PATH_LASTLOG" >&5 15966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines _PATH_LASTLOG" >&5
30334echo $ECHO_N "checking if your system defines _PATH_LASTLOG... $ECHO_C" >&6; } 15967$as_echo_n "checking if your system defines _PATH_LASTLOG... " >&6; }
30335 cat >conftest.$ac_ext <<_ACEOF 15968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30336/* confdefs.h. */
30337_ACEOF
30338cat confdefs.h >>conftest.$ac_ext
30339cat >>conftest.$ac_ext <<_ACEOF
30340/* end confdefs.h. */ 15969/* end confdefs.h. */
30341 15970
30342#include <sys/types.h> 15971#include <sys/types.h>
@@ -30356,41 +15985,19 @@ main ()
30356 return 0; 15985 return 0;
30357} 15986}
30358_ACEOF 15987_ACEOF
30359rm -f conftest.$ac_objext 15988if ac_fn_c_try_compile "$LINENO"; then :
30360if { (ac_try="$ac_compile" 15989 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30361case "(($ac_try" in 15990$as_echo "yes" >&6; }
30362 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30363 *) ac_try_echo=$ac_try;;
30364esac
30365eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30366 (eval "$ac_compile") 2>conftest.er1
30367 ac_status=$?
30368 grep -v '^ *+' conftest.er1 >conftest.err
30369 rm -f conftest.er1
30370 cat conftest.err >&5
30371 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30372 (exit $ac_status); } && {
30373 test -z "$ac_c_werror_flag" ||
30374 test ! -s conftest.err
30375 } && test -s conftest.$ac_objext; then
30376 { echo "$as_me:$LINENO: result: yes" >&5
30377echo "${ECHO_T}yes" >&6; }
30378else 15991else
30379 echo "$as_me: failed program was:" >&5
30380sed 's/^/| /' conftest.$ac_ext >&5
30381
30382 15992
30383 { echo "$as_me:$LINENO: result: no" >&5 15993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30384echo "${ECHO_T}no" >&6; } 15994$as_echo "no" >&6; }
30385 system_lastlog_path=no 15995 system_lastlog_path=no
30386 15996
30387fi 15997fi
30388
30389rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 15998rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30390 15999
30391
30392fi 16000fi
30393
30394rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16001rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30395 16002
30396if test -z "$conf_lastlog_location"; then 16003if test -z "$conf_lastlog_location"; then
@@ -30401,8 +16008,8 @@ if test -z "$conf_lastlog_location"; then
30401 fi 16008 fi
30402 done 16009 done
30403 if test -z "$conf_lastlog_location"; then 16010 if test -z "$conf_lastlog_location"; then
30404 { echo "$as_me:$LINENO: WARNING: ** Cannot find lastlog **" >&5 16011 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ** Cannot find lastlog **" >&5
30405echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;} 16012$as_echo "$as_me: WARNING: ** Cannot find lastlog **" >&2;}
30406 fi 16013 fi
30407 fi 16014 fi
30408fi 16015fi
@@ -30415,13 +16022,9 @@ _ACEOF
30415 16022
30416fi 16023fi
30417 16024
30418{ echo "$as_me:$LINENO: checking if your system defines UTMP_FILE" >&5 16025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines UTMP_FILE" >&5
30419echo $ECHO_N "checking if your system defines UTMP_FILE... $ECHO_C" >&6; } 16026$as_echo_n "checking if your system defines UTMP_FILE... " >&6; }
30420cat >conftest.$ac_ext <<_ACEOF 16027cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30421/* confdefs.h. */
30422_ACEOF
30423cat confdefs.h >>conftest.$ac_ext
30424cat >>conftest.$ac_ext <<_ACEOF
30425/* end confdefs.h. */ 16028/* end confdefs.h. */
30426 16029
30427#include <sys/types.h> 16030#include <sys/types.h>
@@ -30438,35 +16041,15 @@ main ()
30438 return 0; 16041 return 0;
30439} 16042}
30440_ACEOF 16043_ACEOF
30441rm -f conftest.$ac_objext 16044if ac_fn_c_try_compile "$LINENO"; then :
30442if { (ac_try="$ac_compile" 16045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30443case "(($ac_try" in 16046$as_echo "yes" >&6; }
30444 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30445 *) ac_try_echo=$ac_try;;
30446esac
30447eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30448 (eval "$ac_compile") 2>conftest.er1
30449 ac_status=$?
30450 grep -v '^ *+' conftest.er1 >conftest.err
30451 rm -f conftest.er1
30452 cat conftest.err >&5
30453 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30454 (exit $ac_status); } && {
30455 test -z "$ac_c_werror_flag" ||
30456 test ! -s conftest.err
30457 } && test -s conftest.$ac_objext; then
30458 { echo "$as_me:$LINENO: result: yes" >&5
30459echo "${ECHO_T}yes" >&6; }
30460else 16047else
30461 echo "$as_me: failed program was:" >&5 16048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30462sed 's/^/| /' conftest.$ac_ext >&5 16049$as_echo "no" >&6; }
30463
30464 { echo "$as_me:$LINENO: result: no" >&5
30465echo "${ECHO_T}no" >&6; }
30466 system_utmp_path=no 16050 system_utmp_path=no
30467 16051
30468fi 16052fi
30469
30470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30471if test -z "$conf_utmp_location"; then 16054if test -z "$conf_utmp_location"; then
30472 if test x"$system_utmp_path" = x"no" ; then 16055 if test x"$system_utmp_path" = x"no" ; then
@@ -30476,9 +16059,7 @@ if test -z "$conf_utmp_location"; then
30476 fi 16059 fi
30477 done 16060 done
30478 if test -z "$conf_utmp_location"; then 16061 if test -z "$conf_utmp_location"; then
30479 cat >>confdefs.h <<\_ACEOF 16062 $as_echo "#define DISABLE_UTMP 1" >>confdefs.h
30480#define DISABLE_UTMP 1
30481_ACEOF
30482 16063
30483 fi 16064 fi
30484 fi 16065 fi
@@ -30491,13 +16072,9 @@ _ACEOF
30491 16072
30492fi 16073fi
30493 16074
30494{ echo "$as_me:$LINENO: checking if your system defines WTMP_FILE" >&5 16075{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMP_FILE" >&5
30495echo $ECHO_N "checking if your system defines WTMP_FILE... $ECHO_C" >&6; } 16076$as_echo_n "checking if your system defines WTMP_FILE... " >&6; }
30496cat >conftest.$ac_ext <<_ACEOF 16077cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30497/* confdefs.h. */
30498_ACEOF
30499cat confdefs.h >>conftest.$ac_ext
30500cat >>conftest.$ac_ext <<_ACEOF
30501/* end confdefs.h. */ 16078/* end confdefs.h. */
30502 16079
30503#include <sys/types.h> 16080#include <sys/types.h>
@@ -30514,35 +16091,15 @@ main ()
30514 return 0; 16091 return 0;
30515} 16092}
30516_ACEOF 16093_ACEOF
30517rm -f conftest.$ac_objext 16094if ac_fn_c_try_compile "$LINENO"; then :
30518if { (ac_try="$ac_compile" 16095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30519case "(($ac_try" in 16096$as_echo "yes" >&6; }
30520 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30521 *) ac_try_echo=$ac_try;;
30522esac
30523eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30524 (eval "$ac_compile") 2>conftest.er1
30525 ac_status=$?
30526 grep -v '^ *+' conftest.er1 >conftest.err
30527 rm -f conftest.er1
30528 cat conftest.err >&5
30529 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30530 (exit $ac_status); } && {
30531 test -z "$ac_c_werror_flag" ||
30532 test ! -s conftest.err
30533 } && test -s conftest.$ac_objext; then
30534 { echo "$as_me:$LINENO: result: yes" >&5
30535echo "${ECHO_T}yes" >&6; }
30536else 16097else
30537 echo "$as_me: failed program was:" >&5 16098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30538sed 's/^/| /' conftest.$ac_ext >&5 16099$as_echo "no" >&6; }
30539
30540 { echo "$as_me:$LINENO: result: no" >&5
30541echo "${ECHO_T}no" >&6; }
30542 system_wtmp_path=no 16100 system_wtmp_path=no
30543 16101
30544fi 16102fi
30545
30546rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16103rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30547if test -z "$conf_wtmp_location"; then 16104if test -z "$conf_wtmp_location"; then
30548 if test x"$system_wtmp_path" = x"no" ; then 16105 if test x"$system_wtmp_path" = x"no" ; then
@@ -30552,9 +16109,7 @@ if test -z "$conf_wtmp_location"; then
30552 fi 16109 fi
30553 done 16110 done
30554 if test -z "$conf_wtmp_location"; then 16111 if test -z "$conf_wtmp_location"; then
30555 cat >>confdefs.h <<\_ACEOF 16112 $as_echo "#define DISABLE_WTMP 1" >>confdefs.h
30556#define DISABLE_WTMP 1
30557_ACEOF
30558 16113
30559 fi 16114 fi
30560 fi 16115 fi
@@ -30568,13 +16123,9 @@ _ACEOF
30568fi 16123fi
30569 16124
30570 16125
30571{ echo "$as_me:$LINENO: checking if your system defines WTMPX_FILE" >&5 16126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if your system defines WTMPX_FILE" >&5
30572echo $ECHO_N "checking if your system defines WTMPX_FILE... $ECHO_C" >&6; } 16127$as_echo_n "checking if your system defines WTMPX_FILE... " >&6; }
30573cat >conftest.$ac_ext <<_ACEOF 16128cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30574/* confdefs.h. */
30575_ACEOF
30576cat confdefs.h >>conftest.$ac_ext
30577cat >>conftest.$ac_ext <<_ACEOF
30578/* end confdefs.h. */ 16129/* end confdefs.h. */
30579 16130
30580#include <sys/types.h> 16131#include <sys/types.h>
@@ -30594,41 +16145,19 @@ main ()
30594 return 0; 16145 return 0;
30595} 16146}
30596_ACEOF 16147_ACEOF
30597rm -f conftest.$ac_objext 16148if ac_fn_c_try_compile "$LINENO"; then :
30598if { (ac_try="$ac_compile" 16149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30599case "(($ac_try" in 16150$as_echo "yes" >&6; }
30600 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30601 *) ac_try_echo=$ac_try;;
30602esac
30603eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30604 (eval "$ac_compile") 2>conftest.er1
30605 ac_status=$?
30606 grep -v '^ *+' conftest.er1 >conftest.err
30607 rm -f conftest.er1
30608 cat conftest.err >&5
30609 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30610 (exit $ac_status); } && {
30611 test -z "$ac_c_werror_flag" ||
30612 test ! -s conftest.err
30613 } && test -s conftest.$ac_objext; then
30614 { echo "$as_me:$LINENO: result: yes" >&5
30615echo "${ECHO_T}yes" >&6; }
30616else 16151else
30617 echo "$as_me: failed program was:" >&5 16152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30618sed 's/^/| /' conftest.$ac_ext >&5 16153$as_echo "no" >&6; }
30619
30620 { echo "$as_me:$LINENO: result: no" >&5
30621echo "${ECHO_T}no" >&6; }
30622 system_wtmpx_path=no 16154 system_wtmpx_path=no
30623 16155
30624fi 16156fi
30625
30626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16157rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30627if test -z "$conf_wtmpx_location"; then 16158if test -z "$conf_wtmpx_location"; then
30628 if test x"$system_wtmpx_path" = x"no" ; then 16159 if test x"$system_wtmpx_path" = x"no" ; then
30629 cat >>confdefs.h <<\_ACEOF 16160 $as_echo "#define DISABLE_WTMPX 1" >>confdefs.h
30630#define DISABLE_WTMPX 1
30631_ACEOF
30632 16161
30633 fi 16162 fi
30634else 16163else
@@ -30642,8 +16171,8 @@ fi
30642 16171
30643if test ! -z "$blibpath" ; then 16172if test ! -z "$blibpath" ; then
30644 LDFLAGS="$LDFLAGS $blibflags$blibpath" 16173 LDFLAGS="$LDFLAGS $blibflags$blibpath"
30645 { echo "$as_me:$LINENO: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&5 16174 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&5
30646echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;} 16175$as_echo "$as_me: WARNING: Please check and edit blibpath in LDFLAGS in Makefile" >&2;}
30647fi 16176fi
30648 16177
30649CFLAGS="$CFLAGS $werror_flags" 16178CFLAGS="$CFLAGS $werror_flags"
@@ -30653,59 +16182,8 @@ if test "x$ac_cv_func_getaddrinfo" != "xyes" ; then
30653else 16182else
30654 TEST_SSH_IPV6=yes 16183 TEST_SSH_IPV6=yes
30655fi 16184fi
30656{ echo "$as_me:$LINENO: checking whether BROKEN_GETADDRINFO is declared" >&5 16185ac_fn_c_check_decl "$LINENO" "BROKEN_GETADDRINFO" "ac_cv_have_decl_BROKEN_GETADDRINFO" "$ac_includes_default"
30657echo $ECHO_N "checking whether BROKEN_GETADDRINFO is declared... $ECHO_C" >&6; } 16186if test "x$ac_cv_have_decl_BROKEN_GETADDRINFO" = xyes; then :
30658if test "${ac_cv_have_decl_BROKEN_GETADDRINFO+set}" = set; then
30659 echo $ECHO_N "(cached) $ECHO_C" >&6
30660else
30661 cat >conftest.$ac_ext <<_ACEOF
30662/* confdefs.h. */
30663_ACEOF
30664cat confdefs.h >>conftest.$ac_ext
30665cat >>conftest.$ac_ext <<_ACEOF
30666/* end confdefs.h. */
30667$ac_includes_default
30668int
30669main ()
30670{
30671#ifndef BROKEN_GETADDRINFO
30672 (void) BROKEN_GETADDRINFO;
30673#endif
30674
30675 ;
30676 return 0;
30677}
30678_ACEOF
30679rm -f conftest.$ac_objext
30680if { (ac_try="$ac_compile"
30681case "(($ac_try" in
30682 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
30683 *) ac_try_echo=$ac_try;;
30684esac
30685eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5
30686 (eval "$ac_compile") 2>conftest.er1
30687 ac_status=$?
30688 grep -v '^ *+' conftest.er1 >conftest.err
30689 rm -f conftest.er1
30690 cat conftest.err >&5
30691 echo "$as_me:$LINENO: \$? = $ac_status" >&5
30692 (exit $ac_status); } && {
30693 test -z "$ac_c_werror_flag" ||
30694 test ! -s conftest.err
30695 } && test -s conftest.$ac_objext; then
30696 ac_cv_have_decl_BROKEN_GETADDRINFO=yes
30697else
30698 echo "$as_me: failed program was:" >&5
30699sed 's/^/| /' conftest.$ac_ext >&5
30700
30701 ac_cv_have_decl_BROKEN_GETADDRINFO=no
30702fi
30703
30704rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30705fi
30706{ echo "$as_me:$LINENO: result: $ac_cv_have_decl_BROKEN_GETADDRINFO" >&5
30707echo "${ECHO_T}$ac_cv_have_decl_BROKEN_GETADDRINFO" >&6; }
30708if test $ac_cv_have_decl_BROKEN_GETADDRINFO = yes; then
30709 TEST_SSH_IPV6=no 16187 TEST_SSH_IPV6=no
30710fi 16188fi
30711 16189
@@ -30713,7 +16191,7 @@ TEST_SSH_IPV6=$TEST_SSH_IPV6
30713 16191
30714 16192
30715 16193
30716ac_config_files="$ac_config_files Makefile buildpkg.sh opensshd.init openssh.xml openbsd-compat/Makefile openbsd-compat/regress/Makefile ssh_prng_cmds survey.sh" 16194ac_config_files="$ac_config_files Makefile buildpkg.sh opensshd.init openssh.xml openbsd-compat/Makefile openbsd-compat/regress/Makefile survey.sh"
30717 16195
30718cat >confcache <<\_ACEOF 16196cat >confcache <<\_ACEOF
30719# This file is a shell script that caches the results of configure 16197# This file is a shell script that caches the results of configure
@@ -30742,12 +16220,13 @@ _ACEOF
30742 case $ac_val in #( 16220 case $ac_val in #(
30743 *${as_nl}*) 16221 *${as_nl}*)
30744 case $ac_var in #( 16222 case $ac_var in #(
30745 *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 16223 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
30746echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; 16224$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
30747 esac 16225 esac
30748 case $ac_var in #( 16226 case $ac_var in #(
30749 _ | IFS | as_nl) ;; #( 16227 _ | IFS | as_nl) ;; #(
30750 *) $as_unset $ac_var ;; 16228 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
16229 *) { eval $ac_var=; unset $ac_var;} ;;
30751 esac ;; 16230 esac ;;
30752 esac 16231 esac
30753 done 16232 done
@@ -30755,8 +16234,8 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
30755 (set) 2>&1 | 16234 (set) 2>&1 |
30756 case $as_nl`(ac_space=' '; set) 2>&1` in #( 16235 case $as_nl`(ac_space=' '; set) 2>&1` in #(
30757 *${as_nl}ac_space=\ *) 16236 *${as_nl}ac_space=\ *)
30758 # `set' does not quote correctly, so add quotes (double-quote 16237 # `set' does not quote correctly, so add quotes: double-quote
30759 # substitution turns \\\\ into \\, and sed turns \\ into \). 16238 # substitution turns \\\\ into \\, and sed turns \\ into \.
30760 sed -n \ 16239 sed -n \
30761 "s/'/'\\\\''/g; 16240 "s/'/'\\\\''/g;
30762 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 16241 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
@@ -30778,13 +16257,24 @@ echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;;
30778 :end' >>confcache 16257 :end' >>confcache
30779if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 16258if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
30780 if test -w "$cache_file"; then 16259 if test -w "$cache_file"; then
30781 test "x$cache_file" != "x/dev/null" && 16260 if test "x$cache_file" != "x/dev/null"; then
30782 { echo "$as_me:$LINENO: updating cache $cache_file" >&5 16261 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
30783echo "$as_me: updating cache $cache_file" >&6;} 16262$as_echo "$as_me: updating cache $cache_file" >&6;}
30784 cat confcache >$cache_file 16263 if test ! -f "$cache_file" || test -h "$cache_file"; then
16264 cat confcache >"$cache_file"
16265 else
16266 case $cache_file in #(
16267 */* | ?:*)
16268 mv -f confcache "$cache_file"$$ &&
16269 mv -f "$cache_file"$$ "$cache_file" ;; #(
16270 *)
16271 mv -f confcache "$cache_file" ;;
16272 esac
16273 fi
16274 fi
30785 else 16275 else
30786 { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 16276 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
30787echo "$as_me: not updating unwritable cache $cache_file" >&6;} 16277$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
30788 fi 16278 fi
30789fi 16279fi
30790rm -f confcache 16280rm -f confcache
@@ -30797,14 +16287,15 @@ DEFS=-DHAVE_CONFIG_H
30797 16287
30798ac_libobjs= 16288ac_libobjs=
30799ac_ltlibobjs= 16289ac_ltlibobjs=
16290U=
30800for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 16291for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
30801 # 1. Remove the extension, and $U if already installed. 16292 # 1. Remove the extension, and $U if already installed.
30802 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 16293 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
30803 ac_i=`echo "$ac_i" | sed "$ac_script"` 16294 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
30804 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 16295 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
30805 # will be set to the directory where LIBOBJS objects are built. 16296 # will be set to the directory where LIBOBJS objects are built.
30806 ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" 16297 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
30807 ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' 16298 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
30808done 16299done
30809LIBOBJS=$ac_libobjs 16300LIBOBJS=$ac_libobjs
30810 16301
@@ -30812,12 +16303,15 @@ LTLIBOBJS=$ac_ltlibobjs
30812 16303
30813 16304
30814 16305
30815: ${CONFIG_STATUS=./config.status} 16306
16307: "${CONFIG_STATUS=./config.status}"
16308ac_write_fail=0
30816ac_clean_files_save=$ac_clean_files 16309ac_clean_files_save=$ac_clean_files
30817ac_clean_files="$ac_clean_files $CONFIG_STATUS" 16310ac_clean_files="$ac_clean_files $CONFIG_STATUS"
30818{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 16311{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
30819echo "$as_me: creating $CONFIG_STATUS" >&6;} 16312$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
30820cat >$CONFIG_STATUS <<_ACEOF 16313as_write_fail=0
16314cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
30821#! $SHELL 16315#! $SHELL
30822# Generated by $as_me. 16316# Generated by $as_me.
30823# Run this file to recreate the current configuration. 16317# Run this file to recreate the current configuration.
@@ -30827,59 +16321,79 @@ cat >$CONFIG_STATUS <<_ACEOF
30827debug=false 16321debug=false
30828ac_cs_recheck=false 16322ac_cs_recheck=false
30829ac_cs_silent=false 16323ac_cs_silent=false
30830SHELL=\${CONFIG_SHELL-$SHELL}
30831_ACEOF
30832 16324
30833cat >>$CONFIG_STATUS <<\_ACEOF 16325SHELL=\${CONFIG_SHELL-$SHELL}
30834## --------------------- ## 16326export SHELL
30835## M4sh Initialization. ## 16327_ASEOF
30836## --------------------- ## 16328cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
16329## -------------------- ##
16330## M4sh Initialization. ##
16331## -------------------- ##
30837 16332
30838# Be more Bourne compatible 16333# Be more Bourne compatible
30839DUALCASE=1; export DUALCASE # for MKS sh 16334DUALCASE=1; export DUALCASE # for MKS sh
30840if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then 16335if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
30841 emulate sh 16336 emulate sh
30842 NULLCMD=: 16337 NULLCMD=:
30843 # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which 16338 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
30844 # is contrary to our usage. Disable this feature. 16339 # is contrary to our usage. Disable this feature.
30845 alias -g '${1+"$@"}'='"$@"' 16340 alias -g '${1+"$@"}'='"$@"'
30846 setopt NO_GLOB_SUBST 16341 setopt NO_GLOB_SUBST
30847else 16342else
30848 case `(set -o) 2>/dev/null` in 16343 case `(set -o) 2>/dev/null` in #(
30849 *posix*) set -o posix ;; 16344 *posix*) :
16345 set -o posix ;; #(
16346 *) :
16347 ;;
30850esac 16348esac
30851
30852fi 16349fi
30853 16350
30854 16351
30855 16352as_nl='
30856 16353'
30857# PATH needs CR 16354export as_nl
30858# Avoid depending upon Character Ranges. 16355# Printing a long string crashes Solaris 7 /usr/bin/printf.
30859as_cr_letters='abcdefghijklmnopqrstuvwxyz' 16356as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
30860as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 16357as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
30861as_cr_Letters=$as_cr_letters$as_cr_LETTERS 16358as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
30862as_cr_digits='0123456789' 16359# Prefer a ksh shell builtin over an external printf program on Solaris,
30863as_cr_alnum=$as_cr_Letters$as_cr_digits 16360# but without wasting forks for bash or zsh.
30864 16361if test -z "$BASH_VERSION$ZSH_VERSION" \
30865# The user is always right. 16362 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
30866if test "${PATH_SEPARATOR+set}" != set; then 16363 as_echo='print -r --'
30867 echo "#! /bin/sh" >conf$$.sh 16364 as_echo_n='print -rn --'
30868 echo "exit 0" >>conf$$.sh 16365elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
30869 chmod +x conf$$.sh 16366 as_echo='printf %s\n'
30870 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then 16367 as_echo_n='printf %s'
30871 PATH_SEPARATOR=';' 16368else
16369 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
16370 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
16371 as_echo_n='/usr/ucb/echo -n'
30872 else 16372 else
30873 PATH_SEPARATOR=: 16373 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
16374 as_echo_n_body='eval
16375 arg=$1;
16376 case $arg in #(
16377 *"$as_nl"*)
16378 expr "X$arg" : "X\\(.*\\)$as_nl";
16379 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
16380 esac;
16381 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
16382 '
16383 export as_echo_n_body
16384 as_echo_n='sh -c $as_echo_n_body as_echo'
30874 fi 16385 fi
30875 rm -f conf$$.sh 16386 export as_echo_body
16387 as_echo='sh -c $as_echo_body as_echo'
30876fi 16388fi
30877 16389
30878# Support unset when possible. 16390# The user is always right.
30879if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then 16391if test "${PATH_SEPARATOR+set}" != set; then
30880 as_unset=unset 16392 PATH_SEPARATOR=:
30881else 16393 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
30882 as_unset=false 16394 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
16395 PATH_SEPARATOR=';'
16396 }
30883fi 16397fi
30884 16398
30885 16399
@@ -30888,20 +16402,19 @@ fi
30888# there to prevent editors from complaining about space-tab. 16402# there to prevent editors from complaining about space-tab.
30889# (If _AS_PATH_WALK were called with IFS unset, it would disable word 16403# (If _AS_PATH_WALK were called with IFS unset, it would disable word
30890# splitting by setting IFS to empty value.) 16404# splitting by setting IFS to empty value.)
30891as_nl='
30892'
30893IFS=" "" $as_nl" 16405IFS=" "" $as_nl"
30894 16406
30895# Find who we are. Look in the path if we contain no directory separator. 16407# Find who we are. Look in the path if we contain no directory separator.
30896case $0 in 16408as_myself=
16409case $0 in #((
30897 *[\\/]* ) as_myself=$0 ;; 16410 *[\\/]* ) as_myself=$0 ;;
30898 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 16411 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30899for as_dir in $PATH 16412for as_dir in $PATH
30900do 16413do
30901 IFS=$as_save_IFS 16414 IFS=$as_save_IFS
30902 test -z "$as_dir" && as_dir=. 16415 test -z "$as_dir" && as_dir=.
30903 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 16416 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
30904done 16417 done
30905IFS=$as_save_IFS 16418IFS=$as_save_IFS
30906 16419
30907 ;; 16420 ;;
@@ -30912,32 +16425,111 @@ if test "x$as_myself" = x; then
30912 as_myself=$0 16425 as_myself=$0
30913fi 16426fi
30914if test ! -f "$as_myself"; then 16427if test ! -f "$as_myself"; then
30915 echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 16428 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
30916 { (exit 1); exit 1; } 16429 exit 1
30917fi 16430fi
30918 16431
30919# Work around bugs in pre-3.0 UWIN ksh. 16432# Unset variables that we do not need and which cause bugs (e.g. in
30920for as_var in ENV MAIL MAILPATH 16433# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
30921do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var 16434# suppresses any "Segmentation fault" message there. '((' could
16435# trigger a bug in pdksh 5.2.14.
16436for as_var in BASH_ENV ENV MAIL MAILPATH
16437do eval test x\${$as_var+set} = xset \
16438 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
30922done 16439done
30923PS1='$ ' 16440PS1='$ '
30924PS2='> ' 16441PS2='> '
30925PS4='+ ' 16442PS4='+ '
30926 16443
30927# NLS nuisances. 16444# NLS nuisances.
30928for as_var in \ 16445LC_ALL=C
30929 LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ 16446export LC_ALL
30930 LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ 16447LANGUAGE=C
30931 LC_TELEPHONE LC_TIME 16448export LANGUAGE
30932do 16449
30933 if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then 16450# CDPATH.
30934 eval $as_var=C; export $as_var 16451(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
30935 else 16452
30936 ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var 16453
16454# as_fn_error STATUS ERROR [LINENO LOG_FD]
16455# ----------------------------------------
16456# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
16457# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
16458# script with STATUS, using 1 if that was 0.
16459as_fn_error ()
16460{
16461 as_status=$1; test $as_status -eq 0 && as_status=1
16462 if test "$4"; then
16463 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
16464 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
30937 fi 16465 fi
30938done 16466 $as_echo "$as_me: error: $2" >&2
16467 as_fn_exit $as_status
16468} # as_fn_error
16469
16470
16471# as_fn_set_status STATUS
16472# -----------------------
16473# Set $? to STATUS, without forking.
16474as_fn_set_status ()
16475{
16476 return $1
16477} # as_fn_set_status
16478
16479# as_fn_exit STATUS
16480# -----------------
16481# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
16482as_fn_exit ()
16483{
16484 set +e
16485 as_fn_set_status $1
16486 exit $1
16487} # as_fn_exit
16488
16489# as_fn_unset VAR
16490# ---------------
16491# Portably unset VAR.
16492as_fn_unset ()
16493{
16494 { eval $1=; unset $1;}
16495}
16496as_unset=as_fn_unset
16497# as_fn_append VAR VALUE
16498# ----------------------
16499# Append the text in VALUE to the end of the definition contained in VAR. Take
16500# advantage of any shell optimizations that allow amortized linear growth over
16501# repeated appends, instead of the typical quadratic growth present in naive
16502# implementations.
16503if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
16504 eval 'as_fn_append ()
16505 {
16506 eval $1+=\$2
16507 }'
16508else
16509 as_fn_append ()
16510 {
16511 eval $1=\$$1\$2
16512 }
16513fi # as_fn_append
16514
16515# as_fn_arith ARG...
16516# ------------------
16517# Perform arithmetic evaluation on the ARGs, and store the result in the
16518# global $as_val. Take advantage of shells that can avoid forks. The arguments
16519# must be portable across $(()) and expr.
16520if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
16521 eval 'as_fn_arith ()
16522 {
16523 as_val=$(( $* ))
16524 }'
16525else
16526 as_fn_arith ()
16527 {
16528 as_val=`expr "$@" || test $? -eq 1`
16529 }
16530fi # as_fn_arith
16531
30939 16532
30940# Required to use basename.
30941if expr a : '\(a\)' >/dev/null 2>&1 && 16533if expr a : '\(a\)' >/dev/null 2>&1 &&
30942 test "X`expr 00001 : '.*\(...\)'`" = X001; then 16534 test "X`expr 00001 : '.*\(...\)'`" = X001; then
30943 as_expr=expr 16535 as_expr=expr
@@ -30951,13 +16543,17 @@ else
30951 as_basename=false 16543 as_basename=false
30952fi 16544fi
30953 16545
16546if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
16547 as_dirname=dirname
16548else
16549 as_dirname=false
16550fi
30954 16551
30955# Name of the executable.
30956as_me=`$as_basename -- "$0" || 16552as_me=`$as_basename -- "$0" ||
30957$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 16553$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
30958 X"$0" : 'X\(//\)$' \| \ 16554 X"$0" : 'X\(//\)$' \| \
30959 X"$0" : 'X\(/\)' \| . 2>/dev/null || 16555 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
30960echo X/"$0" | 16556$as_echo X/"$0" |
30961 sed '/^.*\/\([^/][^/]*\)\/*$/{ 16557 sed '/^.*\/\([^/][^/]*\)\/*$/{
30962 s//\1/ 16558 s//\1/
30963 q 16559 q
@@ -30972,104 +16568,103 @@ echo X/"$0" |
30972 } 16568 }
30973 s/.*/./; q'` 16569 s/.*/./; q'`
30974 16570
30975# CDPATH. 16571# Avoid depending upon Character Ranges.
30976$as_unset CDPATH 16572as_cr_letters='abcdefghijklmnopqrstuvwxyz'
30977 16573as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
30978 16574as_cr_Letters=$as_cr_letters$as_cr_LETTERS
30979 16575as_cr_digits='0123456789'
30980 as_lineno_1=$LINENO 16576as_cr_alnum=$as_cr_Letters$as_cr_digits
30981 as_lineno_2=$LINENO
30982 test "x$as_lineno_1" != "x$as_lineno_2" &&
30983 test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
30984
30985 # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
30986 # uniformly replaced by the line number. The first 'sed' inserts a
30987 # line-number line after each line using $LINENO; the second 'sed'
30988 # does the real work. The second script uses 'N' to pair each
30989 # line-number line with the line containing $LINENO, and appends
30990 # trailing '-' during substitution so that $LINENO is not a special
30991 # case at line end.
30992 # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
30993 # scripts with optimization help from Paolo Bonzini. Blame Lee
30994 # E. McMahon (1931-1989) for sed's syntax. :-)
30995 sed -n '
30996 p
30997 /[$]LINENO/=
30998 ' <$as_myself |
30999 sed '
31000 s/[$]LINENO.*/&-/
31001 t lineno
31002 b
31003 :lineno
31004 N
31005 :loop
31006 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
31007 t loop
31008 s/-\n.*//
31009 ' >$as_me.lineno &&
31010 chmod +x "$as_me.lineno" ||
31011 { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
31012 { (exit 1); exit 1; }; }
31013
31014 # Don't try to exec as it changes $[0], causing all sort of problems
31015 # (the dirname of $[0] is not the place where we might find the
31016 # original and so on. Autoconf is especially sensitive to this).
31017 . "./$as_me.lineno"
31018 # Exit status is that of the last command.
31019 exit
31020}
31021
31022
31023if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
31024 as_dirname=dirname
31025else
31026 as_dirname=false
31027fi
31028 16577
31029ECHO_C= ECHO_N= ECHO_T= 16578ECHO_C= ECHO_N= ECHO_T=
31030case `echo -n x` in 16579case `echo -n x` in #(((((
31031-n*) 16580-n*)
31032 case `echo 'x\c'` in 16581 case `echo 'xy\c'` in
31033 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 16582 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
31034 *) ECHO_C='\c';; 16583 xy) ECHO_C='\c';;
16584 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
16585 ECHO_T=' ';;
31035 esac;; 16586 esac;;
31036*) 16587*)
31037 ECHO_N='-n';; 16588 ECHO_N='-n';;
31038esac 16589esac
31039 16590
31040if expr a : '\(a\)' >/dev/null 2>&1 &&
31041 test "X`expr 00001 : '.*\(...\)'`" = X001; then
31042 as_expr=expr
31043else
31044 as_expr=false
31045fi
31046
31047rm -f conf$$ conf$$.exe conf$$.file 16591rm -f conf$$ conf$$.exe conf$$.file
31048if test -d conf$$.dir; then 16592if test -d conf$$.dir; then
31049 rm -f conf$$.dir/conf$$.file 16593 rm -f conf$$.dir/conf$$.file
31050else 16594else
31051 rm -f conf$$.dir 16595 rm -f conf$$.dir
31052 mkdir conf$$.dir 16596 mkdir conf$$.dir 2>/dev/null
31053fi 16597fi
31054echo >conf$$.file 16598if (echo >conf$$.file) 2>/dev/null; then
31055if ln -s conf$$.file conf$$ 2>/dev/null; then 16599 if ln -s conf$$.file conf$$ 2>/dev/null; then
31056 as_ln_s='ln -s' 16600 as_ln_s='ln -s'
31057 # ... but there are two gotchas: 16601 # ... but there are two gotchas:
31058 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 16602 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
31059 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 16603 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
31060 # In both cases, we have to default to `cp -p'. 16604 # In both cases, we have to default to `cp -p'.
31061 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 16605 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
16606 as_ln_s='cp -p'
16607 elif ln conf$$.file conf$$ 2>/dev/null; then
16608 as_ln_s=ln
16609 else
31062 as_ln_s='cp -p' 16610 as_ln_s='cp -p'
31063elif ln conf$$.file conf$$ 2>/dev/null; then 16611 fi
31064 as_ln_s=ln
31065else 16612else
31066 as_ln_s='cp -p' 16613 as_ln_s='cp -p'
31067fi 16614fi
31068rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 16615rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
31069rmdir conf$$.dir 2>/dev/null 16616rmdir conf$$.dir 2>/dev/null
31070 16617
16618
16619# as_fn_mkdir_p
16620# -------------
16621# Create "$as_dir" as a directory, including parents if necessary.
16622as_fn_mkdir_p ()
16623{
16624
16625 case $as_dir in #(
16626 -*) as_dir=./$as_dir;;
16627 esac
16628 test -d "$as_dir" || eval $as_mkdir_p || {
16629 as_dirs=
16630 while :; do
16631 case $as_dir in #(
16632 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
16633 *) as_qdir=$as_dir;;
16634 esac
16635 as_dirs="'$as_qdir' $as_dirs"
16636 as_dir=`$as_dirname -- "$as_dir" ||
16637$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
16638 X"$as_dir" : 'X\(//\)[^/]' \| \
16639 X"$as_dir" : 'X\(//\)$' \| \
16640 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
16641$as_echo X"$as_dir" |
16642 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
16643 s//\1/
16644 q
16645 }
16646 /^X\(\/\/\)[^/].*/{
16647 s//\1/
16648 q
16649 }
16650 /^X\(\/\/\)$/{
16651 s//\1/
16652 q
16653 }
16654 /^X\(\/\).*/{
16655 s//\1/
16656 q
16657 }
16658 s/.*/./; q'`
16659 test -d "$as_dir" && break
16660 done
16661 test -z "$as_dirs" || eval "mkdir $as_dirs"
16662 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
16663
16664
16665} # as_fn_mkdir_p
31071if mkdir -p . 2>/dev/null; then 16666if mkdir -p . 2>/dev/null; then
31072 as_mkdir_p=: 16667 as_mkdir_p='mkdir -p "$as_dir"'
31073else 16668else
31074 test -d ./-p && rmdir ./-p 16669 test -d ./-p && rmdir ./-p
31075 as_mkdir_p=false 16670 as_mkdir_p=false
@@ -31086,12 +16681,12 @@ else
31086 as_test_x=' 16681 as_test_x='
31087 eval sh -c '\'' 16682 eval sh -c '\''
31088 if test -d "$1"; then 16683 if test -d "$1"; then
31089 test -d "$1/."; 16684 test -d "$1/.";
31090 else 16685 else
31091 case $1 in 16686 case $1 in #(
31092 -*)set "./$1";; 16687 -*)set "./$1";;
31093 esac; 16688 esac;
31094 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in 16689 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
31095 ???[sx]*):;;*)false;;esac;fi 16690 ???[sx]*):;;*)false;;esac;fi
31096 '\'' sh 16691 '\'' sh
31097 ' 16692 '
@@ -31106,13 +16701,19 @@ as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
31106 16701
31107 16702
31108exec 6>&1 16703exec 6>&1
16704## ----------------------------------- ##
16705## Main body of $CONFIG_STATUS script. ##
16706## ----------------------------------- ##
16707_ASEOF
16708test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
31109 16709
31110# Save the log message, to keep $[0] and so on meaningful, and to 16710cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
16711# Save the log message, to keep $0 and so on meaningful, and to
31111# report actual input values of CONFIG_FILES etc. instead of their 16712# report actual input values of CONFIG_FILES etc. instead of their
31112# values after options handling. 16713# values after options handling.
31113ac_log=" 16714ac_log="
31114This file was extended by OpenSSH $as_me Portable, which was 16715This file was extended by OpenSSH $as_me Portable, which was
31115generated by GNU Autoconf 2.61. Invocation command line was 16716generated by GNU Autoconf 2.68. Invocation command line was
31116 16717
31117 CONFIG_FILES = $CONFIG_FILES 16718 CONFIG_FILES = $CONFIG_FILES
31118 CONFIG_HEADERS = $CONFIG_HEADERS 16719 CONFIG_HEADERS = $CONFIG_HEADERS
@@ -31125,29 +16726,41 @@ on `(hostname || uname -n) 2>/dev/null | sed 1q`
31125 16726
31126_ACEOF 16727_ACEOF
31127 16728
31128cat >>$CONFIG_STATUS <<_ACEOF 16729case $ac_config_files in *"
16730"*) set x $ac_config_files; shift; ac_config_files=$*;;
16731esac
16732
16733case $ac_config_headers in *"
16734"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
16735esac
16736
16737
16738cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31129# Files that config.status was made for. 16739# Files that config.status was made for.
31130config_files="$ac_config_files" 16740config_files="$ac_config_files"
31131config_headers="$ac_config_headers" 16741config_headers="$ac_config_headers"
31132 16742
31133_ACEOF 16743_ACEOF
31134 16744
31135cat >>$CONFIG_STATUS <<\_ACEOF 16745cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31136ac_cs_usage="\ 16746ac_cs_usage="\
31137\`$as_me' instantiates files from templates according to the 16747\`$as_me' instantiates files and other configuration actions
31138current configuration. 16748from templates according to the current configuration. Unless the files
16749and actions are specified as TAGs, all are instantiated by default.
31139 16750
31140Usage: $0 [OPTIONS] [FILE]... 16751Usage: $0 [OPTION]... [TAG]...
31141 16752
31142 -h, --help print this help, then exit 16753 -h, --help print this help, then exit
31143 -V, --version print version number and configuration settings, then exit 16754 -V, --version print version number and configuration settings, then exit
31144 -q, --quiet do not print progress messages 16755 --config print configuration, then exit
16756 -q, --quiet, --silent
16757 do not print progress messages
31145 -d, --debug don't remove temporary files 16758 -d, --debug don't remove temporary files
31146 --recheck update $as_me by reconfiguring in the same conditions 16759 --recheck update $as_me by reconfiguring in the same conditions
31147 --file=FILE[:TEMPLATE] 16760 --file=FILE[:TEMPLATE]
31148 instantiate the configuration file FILE 16761 instantiate the configuration file FILE
31149 --header=FILE[:TEMPLATE] 16762 --header=FILE[:TEMPLATE]
31150 instantiate the configuration header FILE 16763 instantiate the configuration header FILE
31151 16764
31152Configuration files: 16765Configuration files:
31153$config_files 16766$config_files
@@ -31155,36 +16768,43 @@ $config_files
31155Configuration headers: 16768Configuration headers:
31156$config_headers 16769$config_headers
31157 16770
31158Report bugs to <bug-autoconf@gnu.org>." 16771Report bugs to <openssh-unix-dev@mindrot.org>."
31159 16772
31160_ACEOF 16773_ACEOF
31161cat >>$CONFIG_STATUS <<_ACEOF 16774cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16775ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
31162ac_cs_version="\\ 16776ac_cs_version="\\
31163OpenSSH config.status Portable 16777OpenSSH config.status Portable
31164configured by $0, generated by GNU Autoconf 2.61, 16778configured by $0, generated by GNU Autoconf 2.68,
31165 with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" 16779 with options \\"\$ac_cs_config\\"
31166 16780
31167Copyright (C) 2006 Free Software Foundation, Inc. 16781Copyright (C) 2010 Free Software Foundation, Inc.
31168This config.status script is free software; the Free Software Foundation 16782This config.status script is free software; the Free Software Foundation
31169gives unlimited permission to copy, distribute and modify it." 16783gives unlimited permission to copy, distribute and modify it."
31170 16784
31171ac_pwd='$ac_pwd' 16785ac_pwd='$ac_pwd'
31172srcdir='$srcdir' 16786srcdir='$srcdir'
31173INSTALL='$INSTALL' 16787INSTALL='$INSTALL'
16788AWK='$AWK'
16789test -n "\$AWK" || AWK=awk
31174_ACEOF 16790_ACEOF
31175 16791
31176cat >>$CONFIG_STATUS <<\_ACEOF 16792cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31177# If no file are specified by the user, then we need to provide default 16793# The default lists apply if the user does not specify any file.
31178# value. By we need to know if files were specified by the user.
31179ac_need_defaults=: 16794ac_need_defaults=:
31180while test $# != 0 16795while test $# != 0
31181do 16796do
31182 case $1 in 16797 case $1 in
31183 --*=*) 16798 --*=?*)
31184 ac_option=`expr "X$1" : 'X\([^=]*\)='` 16799 ac_option=`expr "X$1" : 'X\([^=]*\)='`
31185 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 16800 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
31186 ac_shift=: 16801 ac_shift=:
31187 ;; 16802 ;;
16803 --*=)
16804 ac_option=`expr "X$1" : 'X\([^=]*\)='`
16805 ac_optarg=
16806 ac_shift=:
16807 ;;
31188 *) 16808 *)
31189 ac_option=$1 16809 ac_option=$1
31190 ac_optarg=$2 16810 ac_optarg=$2
@@ -31197,34 +16817,41 @@ do
31197 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 16817 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
31198 ac_cs_recheck=: ;; 16818 ac_cs_recheck=: ;;
31199 --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 16819 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
31200 echo "$ac_cs_version"; exit ;; 16820 $as_echo "$ac_cs_version"; exit ;;
16821 --config | --confi | --conf | --con | --co | --c )
16822 $as_echo "$ac_cs_config"; exit ;;
31201 --debug | --debu | --deb | --de | --d | -d ) 16823 --debug | --debu | --deb | --de | --d | -d )
31202 debug=: ;; 16824 debug=: ;;
31203 --file | --fil | --fi | --f ) 16825 --file | --fil | --fi | --f )
31204 $ac_shift 16826 $ac_shift
31205 CONFIG_FILES="$CONFIG_FILES $ac_optarg" 16827 case $ac_optarg in
16828 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16829 '') as_fn_error $? "missing file argument" ;;
16830 esac
16831 as_fn_append CONFIG_FILES " '$ac_optarg'"
31206 ac_need_defaults=false;; 16832 ac_need_defaults=false;;
31207 --header | --heade | --head | --hea ) 16833 --header | --heade | --head | --hea )
31208 $ac_shift 16834 $ac_shift
31209 CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" 16835 case $ac_optarg in
16836 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
16837 esac
16838 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
31210 ac_need_defaults=false;; 16839 ac_need_defaults=false;;
31211 --he | --h) 16840 --he | --h)
31212 # Conflict between --help and --header 16841 # Conflict between --help and --header
31213 { echo "$as_me: error: ambiguous option: $1 16842 as_fn_error $? "ambiguous option: \`$1'
31214Try \`$0 --help' for more information." >&2 16843Try \`$0 --help' for more information.";;
31215 { (exit 1); exit 1; }; };;
31216 --help | --hel | -h ) 16844 --help | --hel | -h )
31217 echo "$ac_cs_usage"; exit ;; 16845 $as_echo "$ac_cs_usage"; exit ;;
31218 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 16846 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
31219 | -silent | --silent | --silen | --sile | --sil | --si | --s) 16847 | -silent | --silent | --silen | --sile | --sil | --si | --s)
31220 ac_cs_silent=: ;; 16848 ac_cs_silent=: ;;
31221 16849
31222 # This is an error. 16850 # This is an error.
31223 -*) { echo "$as_me: error: unrecognized option: $1 16851 -*) as_fn_error $? "unrecognized option: \`$1'
31224Try \`$0 --help' for more information." >&2 16852Try \`$0 --help' for more information." ;;
31225 { (exit 1); exit 1; }; } ;;
31226 16853
31227 *) ac_config_targets="$ac_config_targets $1" 16854 *) as_fn_append ac_config_targets " $1"
31228 ac_need_defaults=false ;; 16855 ac_need_defaults=false ;;
31229 16856
31230 esac 16857 esac
@@ -31239,30 +16866,32 @@ if $ac_cs_silent; then
31239fi 16866fi
31240 16867
31241_ACEOF 16868_ACEOF
31242cat >>$CONFIG_STATUS <<_ACEOF 16869cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31243if \$ac_cs_recheck; then 16870if \$ac_cs_recheck; then
31244 echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 16871 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
31245 CONFIG_SHELL=$SHELL 16872 shift
16873 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
16874 CONFIG_SHELL='$SHELL'
31246 export CONFIG_SHELL 16875 export CONFIG_SHELL
31247 exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 16876 exec "\$@"
31248fi 16877fi
31249 16878
31250_ACEOF 16879_ACEOF
31251cat >>$CONFIG_STATUS <<\_ACEOF 16880cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31252exec 5>>config.log 16881exec 5>>config.log
31253{ 16882{
31254 echo 16883 echo
31255 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 16884 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
31256## Running $as_me. ## 16885## Running $as_me. ##
31257_ASBOX 16886_ASBOX
31258 echo "$ac_log" 16887 $as_echo "$ac_log"
31259} >&5 16888} >&5
31260 16889
31261_ACEOF 16890_ACEOF
31262cat >>$CONFIG_STATUS <<_ACEOF 16891cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31263_ACEOF 16892_ACEOF
31264 16893
31265cat >>$CONFIG_STATUS <<\_ACEOF 16894cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31266 16895
31267# Handling of arguments. 16896# Handling of arguments.
31268for ac_config_target in $ac_config_targets 16897for ac_config_target in $ac_config_targets
@@ -31275,12 +16904,9 @@ do
31275 "openssh.xml") CONFIG_FILES="$CONFIG_FILES openssh.xml" ;; 16904 "openssh.xml") CONFIG_FILES="$CONFIG_FILES openssh.xml" ;;
31276 "openbsd-compat/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;; 16905 "openbsd-compat/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/Makefile" ;;
31277 "openbsd-compat/regress/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/regress/Makefile" ;; 16906 "openbsd-compat/regress/Makefile") CONFIG_FILES="$CONFIG_FILES openbsd-compat/regress/Makefile" ;;
31278 "ssh_prng_cmds") CONFIG_FILES="$CONFIG_FILES ssh_prng_cmds" ;;
31279 "survey.sh") CONFIG_FILES="$CONFIG_FILES survey.sh" ;; 16907 "survey.sh") CONFIG_FILES="$CONFIG_FILES survey.sh" ;;
31280 16908
31281 *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 16909 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
31282echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
31283 { (exit 1); exit 1; }; };;
31284 esac 16910 esac
31285done 16911done
31286 16912
@@ -31302,270 +16928,302 @@ fi
31302# after its creation but before its name has been assigned to `$tmp'. 16928# after its creation but before its name has been assigned to `$tmp'.
31303$debug || 16929$debug ||
31304{ 16930{
31305 tmp= 16931 tmp= ac_tmp=
31306 trap 'exit_status=$? 16932 trap 'exit_status=$?
31307 { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status 16933 : "${ac_tmp:=$tmp}"
16934 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
31308' 0 16935' 0
31309 trap '{ (exit 1); exit 1; }' 1 2 13 15 16936 trap 'as_fn_exit 1' 1 2 13 15
31310} 16937}
31311# Create a (secure) tmp directory for tmp files. 16938# Create a (secure) tmp directory for tmp files.
31312 16939
31313{ 16940{
31314 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && 16941 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
31315 test -n "$tmp" && test -d "$tmp" 16942 test -d "$tmp"
31316} || 16943} ||
31317{ 16944{
31318 tmp=./conf$$-$RANDOM 16945 tmp=./conf$$-$RANDOM
31319 (umask 077 && mkdir "$tmp") 16946 (umask 077 && mkdir "$tmp")
31320} || 16947} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
31321{ 16948ac_tmp=$tmp
31322 echo "$me: cannot create a temporary directory in ." >&2
31323 { (exit 1); exit 1; }
31324}
31325
31326#
31327# Set up the sed scripts for CONFIG_FILES section.
31328#
31329 16949
31330# No need to generate the scripts if there are no CONFIG_FILES. 16950# Set up the scripts for CONFIG_FILES section.
31331# This happens for instance when ./config.status config.h 16951# No need to generate them if there are no CONFIG_FILES.
16952# This happens for instance with `./config.status config.h'.
31332if test -n "$CONFIG_FILES"; then 16953if test -n "$CONFIG_FILES"; then
31333 16954
31334_ACEOF
31335 16955
16956ac_cr=`echo X | tr X '\015'`
16957# On cygwin, bash can eat \r inside `` if the user requested igncr.
16958# But we know of no other shell where ac_cr would be empty at this
16959# point, so we can use a bashism as a fallback.
16960if test "x$ac_cr" = x; then
16961 eval ac_cr=\$\'\\r\'
16962fi
16963ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
16964if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
16965 ac_cs_awk_cr='\\r'
16966else
16967 ac_cs_awk_cr=$ac_cr
16968fi
16969
16970echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
16971_ACEOF
31336 16972
31337 16973
16974{
16975 echo "cat >conf$$subs.awk <<_ACEOF" &&
16976 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
16977 echo "_ACEOF"
16978} >conf$$subs.sh ||
16979 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
16980ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
31338ac_delim='%!_!# ' 16981ac_delim='%!_!# '
31339for ac_last_try in false false false false false :; do 16982for ac_last_try in false false false false false :; do
31340 cat >conf$$subs.sed <<_ACEOF 16983 . ./conf$$subs.sh ||
31341SHELL!$SHELL$ac_delim 16984 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31342PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim 16985
31343PACKAGE_NAME!$PACKAGE_NAME$ac_delim 16986 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
31344PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim 16987 if test $ac_delim_n = $ac_delim_num; then
31345PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim
31346PACKAGE_STRING!$PACKAGE_STRING$ac_delim
31347PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim
31348exec_prefix!$exec_prefix$ac_delim
31349prefix!$prefix$ac_delim
31350program_transform_name!$program_transform_name$ac_delim
31351bindir!$bindir$ac_delim
31352sbindir!$sbindir$ac_delim
31353libexecdir!$libexecdir$ac_delim
31354datarootdir!$datarootdir$ac_delim
31355datadir!$datadir$ac_delim
31356sysconfdir!$sysconfdir$ac_delim
31357sharedstatedir!$sharedstatedir$ac_delim
31358localstatedir!$localstatedir$ac_delim
31359includedir!$includedir$ac_delim
31360oldincludedir!$oldincludedir$ac_delim
31361docdir!$docdir$ac_delim
31362infodir!$infodir$ac_delim
31363htmldir!$htmldir$ac_delim
31364dvidir!$dvidir$ac_delim
31365pdfdir!$pdfdir$ac_delim
31366psdir!$psdir$ac_delim
31367libdir!$libdir$ac_delim
31368localedir!$localedir$ac_delim
31369mandir!$mandir$ac_delim
31370DEFS!$DEFS$ac_delim
31371ECHO_C!$ECHO_C$ac_delim
31372ECHO_N!$ECHO_N$ac_delim
31373ECHO_T!$ECHO_T$ac_delim
31374LIBS!$LIBS$ac_delim
31375build_alias!$build_alias$ac_delim
31376host_alias!$host_alias$ac_delim
31377target_alias!$target_alias$ac_delim
31378CC!$CC$ac_delim
31379CFLAGS!$CFLAGS$ac_delim
31380LDFLAGS!$LDFLAGS$ac_delim
31381CPPFLAGS!$CPPFLAGS$ac_delim
31382ac_ct_CC!$ac_ct_CC$ac_delim
31383EXEEXT!$EXEEXT$ac_delim
31384OBJEXT!$OBJEXT$ac_delim
31385build!$build$ac_delim
31386build_cpu!$build_cpu$ac_delim
31387build_vendor!$build_vendor$ac_delim
31388build_os!$build_os$ac_delim
31389host!$host$ac_delim
31390host_cpu!$host_cpu$ac_delim
31391host_vendor!$host_vendor$ac_delim
31392host_os!$host_os$ac_delim
31393CPP!$CPP$ac_delim
31394GREP!$GREP$ac_delim
31395EGREP!$EGREP$ac_delim
31396AWK!$AWK$ac_delim
31397RANLIB!$RANLIB$ac_delim
31398INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim
31399INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim
31400INSTALL_DATA!$INSTALL_DATA$ac_delim
31401AR!$AR$ac_delim
31402CAT!$CAT$ac_delim
31403KILL!$KILL$ac_delim
31404PERL!$PERL$ac_delim
31405SED!$SED$ac_delim
31406ENT!$ENT$ac_delim
31407TEST_MINUS_S_SH!$TEST_MINUS_S_SH$ac_delim
31408SH!$SH$ac_delim
31409GROFF!$GROFF$ac_delim
31410NROFF!$NROFF$ac_delim
31411MANDOC!$MANDOC$ac_delim
31412TEST_SHELL!$TEST_SHELL$ac_delim
31413MANFMT!$MANFMT$ac_delim
31414PATH_GROUPADD_PROG!$PATH_GROUPADD_PROG$ac_delim
31415PATH_USERADD_PROG!$PATH_USERADD_PROG$ac_delim
31416MAKE_PACKAGE_SUPPORTED!$MAKE_PACKAGE_SUPPORTED$ac_delim
31417STARTUP_SCRIPT_SHELL!$STARTUP_SCRIPT_SHELL$ac_delim
31418LOGIN_PROGRAM_FALLBACK!$LOGIN_PROGRAM_FALLBACK$ac_delim
31419PATH_PASSWD_PROG!$PATH_PASSWD_PROG$ac_delim
31420LD!$LD$ac_delim
31421PKGCONFIG!$PKGCONFIG$ac_delim
31422LIBEDIT!$LIBEDIT$ac_delim
31423TEST_SSH_SHA256!$TEST_SSH_SHA256$ac_delim
31424TEST_SSH_ECC!$TEST_SSH_ECC$ac_delim
31425COMMENT_OUT_ECC!$COMMENT_OUT_ECC$ac_delim
31426INSTALL_SSH_RAND_HELPER!$INSTALL_SSH_RAND_HELPER$ac_delim
31427SSH_PRIVSEP_USER!$SSH_PRIVSEP_USER$ac_delim
31428PROG_LS!$PROG_LS$ac_delim
31429PROG_NETSTAT!$PROG_NETSTAT$ac_delim
31430PROG_ARP!$PROG_ARP$ac_delim
31431PROG_IFCONFIG!$PROG_IFCONFIG$ac_delim
31432PROG_JSTAT!$PROG_JSTAT$ac_delim
31433PROG_PS!$PROG_PS$ac_delim
31434PROG_SAR!$PROG_SAR$ac_delim
31435PROG_W!$PROG_W$ac_delim
31436PROG_WHO!$PROG_WHO$ac_delim
31437PROG_LAST!$PROG_LAST$ac_delim
31438_ACEOF
31439
31440 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
31441 break 16988 break
31442 elif $ac_last_try; then 16989 elif $ac_last_try; then
31443 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 16990 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
31444echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
31445 { (exit 1); exit 1; }; }
31446 else 16991 else
31447 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 16992 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31448 fi 16993 fi
31449done 16994done
16995rm -f conf$$subs.sh
16996
16997cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
16998cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
16999_ACEOF
17000sed -n '
17001h
17002s/^/S["/; s/!.*/"]=/
17003p
17004g
17005s/^[^!]*!//
17006:repl
17007t repl
17008s/'"$ac_delim"'$//
17009t delim
17010:nl
17011h
17012s/\(.\{148\}\)..*/\1/
17013t more1
17014s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
17015p
17016n
17017b repl
17018:more1
17019s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17020p
17021g
17022s/.\{148\}//
17023t nl
17024:delim
17025h
17026s/\(.\{148\}\)..*/\1/
17027t more2
17028s/["\\]/\\&/g; s/^/"/; s/$/"/
17029p
17030b
17031:more2
17032s/["\\]/\\&/g; s/^/"/; s/$/"\\/
17033p
17034g
17035s/.\{148\}//
17036t delim
17037' <conf$$subs.awk | sed '
17038/^[^""]/{
17039 N
17040 s/\n//
17041}
17042' >>$CONFIG_STATUS || ac_write_fail=1
17043rm -f conf$$subs.awk
17044cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17045_ACAWK
17046cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
17047 for (key in S) S_is_set[key] = 1
17048 FS = ""
31450 17049
31451ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` 17050}
31452if test -n "$ac_eof"; then 17051{
31453 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` 17052 line = $ 0
31454 ac_eof=`expr $ac_eof + 1` 17053 nfields = split(line, field, "@")
17054 substed = 0
17055 len = length(field[1])
17056 for (i = 2; i < nfields; i++) {
17057 key = field[i]
17058 keylen = length(key)
17059 if (S_is_set[key]) {
17060 value = S[key]
17061 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
17062 len += length(value) + length(field[++i])
17063 substed = 1
17064 } else
17065 len += 1 + keylen
17066 }
17067
17068 print line
17069}
17070
17071_ACAWK
17072_ACEOF
17073cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17074if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
17075 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
17076else
17077 cat
17078fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
17079 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
17080_ACEOF
17081
17082# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
17083# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
17084# trailing colons and then remove the whole line if VPATH becomes empty
17085# (actually we leave an empty line to preserve line numbers).
17086if test "x$srcdir" = x.; then
17087 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
17088h
17089s///
17090s/^/:/
17091s/[ ]*$/:/
17092s/:\$(srcdir):/:/g
17093s/:\${srcdir}:/:/g
17094s/:@srcdir@:/:/g
17095s/^:*//
17096s/:*$//
17097x
17098s/\(=[ ]*\).*/\1/
17099G
17100s/\n//
17101s/^[^=]*=[ ]*$//
17102}'
31455fi 17103fi
31456 17104
31457cat >>$CONFIG_STATUS <<_ACEOF 17105cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31458cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof 17106fi # test -n "$CONFIG_FILES"
31459/@[a-zA-Z_][a-zA-Z_0-9]*@/!b 17107
31460_ACEOF 17108# Set up the scripts for CONFIG_HEADERS section.
31461sed ' 17109# No need to generate them if there are no CONFIG_HEADERS.
31462s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g 17110# This happens for instance with `./config.status Makefile'.
31463s/^/s,@/; s/!/@,|#_!!_#|/ 17111if test -n "$CONFIG_HEADERS"; then
31464:n 17112cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
31465t n 17113BEGIN {
31466s/'"$ac_delim"'$/,g/; t
31467s/$/\\/; p
31468N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n
31469' >>$CONFIG_STATUS <conf$$subs.sed
31470rm -f conf$$subs.sed
31471cat >>$CONFIG_STATUS <<_ACEOF
31472CEOF$ac_eof
31473_ACEOF 17114_ACEOF
31474 17115
17116# Transform confdefs.h into an awk script `defines.awk', embedded as
17117# here-document in config.status, that substitutes the proper values into
17118# config.h.in to produce config.h.
31475 17119
17120# Create a delimiter string that does not exist in confdefs.h, to ease
17121# handling of long lines.
31476ac_delim='%!_!# ' 17122ac_delim='%!_!# '
31477for ac_last_try in false false false false false :; do 17123for ac_last_try in false false :; do
31478 cat >conf$$subs.sed <<_ACEOF 17124 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
31479PROG_LASTLOG!$PROG_LASTLOG$ac_delim 17125 if test -z "$ac_tt"; then
31480PROG_DF!$PROG_DF$ac_delim
31481PROG_VMSTAT!$PROG_VMSTAT$ac_delim
31482PROG_UPTIME!$PROG_UPTIME$ac_delim
31483PROG_IPCS!$PROG_IPCS$ac_delim
31484PROG_TAIL!$PROG_TAIL$ac_delim
31485INSTALL_SSH_PRNG_CMDS!$INSTALL_SSH_PRNG_CMDS$ac_delim
31486SSHLIBS!$SSHLIBS$ac_delim
31487SSHDLIBS!$SSHDLIBS$ac_delim
31488KRB5CONF!$KRB5CONF$ac_delim
31489PRIVSEP_PATH!$PRIVSEP_PATH$ac_delim
31490xauth_path!$xauth_path$ac_delim
31491STRIP_OPT!$STRIP_OPT$ac_delim
31492XAUTH_PATH!$XAUTH_PATH$ac_delim
31493MANTYPE!$MANTYPE$ac_delim
31494mansubdir!$mansubdir$ac_delim
31495user_path!$user_path$ac_delim
31496piddir!$piddir$ac_delim
31497TEST_SSH_IPV6!$TEST_SSH_IPV6$ac_delim
31498LIBOBJS!$LIBOBJS$ac_delim
31499LTLIBOBJS!$LTLIBOBJS$ac_delim
31500_ACEOF
31501
31502 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 21; then
31503 break 17126 break
31504 elif $ac_last_try; then 17127 elif $ac_last_try; then
31505 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 17128 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
31506echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
31507 { (exit 1); exit 1; }; }
31508 else 17129 else
31509 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 17130 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
31510 fi 17131 fi
31511done 17132done
31512 17133
31513ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` 17134# For the awk script, D is an array of macro values keyed by name,
31514if test -n "$ac_eof"; then 17135# likewise P contains macro parameters if any. Preserve backslash
31515 ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` 17136# newline sequences.
31516 ac_eof=`expr $ac_eof + 1`
31517fi
31518 17137
31519cat >>$CONFIG_STATUS <<_ACEOF 17138ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31520cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof 17139sed -n '
31521/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end 17140s/.\{148\}/&'"$ac_delim"'/g
31522_ACEOF 17141t rset
31523sed ' 17142:rset
31524s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g 17143s/^[ ]*#[ ]*define[ ][ ]*/ /
31525s/^/s,@/; s/!/@,|#_!!_#|/ 17144t def
31526:n 17145d
31527t n 17146:def
31528s/'"$ac_delim"'$/,g/; t 17147s/\\$//
31529s/$/\\/; p 17148t bsnl
31530N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n 17149s/["\\]/\\&/g
31531' >>$CONFIG_STATUS <conf$$subs.sed 17150s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
31532rm -f conf$$subs.sed 17151D["\1"]=" \3"/p
31533cat >>$CONFIG_STATUS <<_ACEOF 17152s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
31534:end 17153d
31535s/|#_!!_#|//g 17154:bsnl
31536CEOF$ac_eof 17155s/["\\]/\\&/g
17156s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
17157D["\1"]=" \3\\\\\\n"\\/p
17158t cont
17159s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
17160t cont
17161d
17162:cont
17163n
17164s/.\{148\}/&'"$ac_delim"'/g
17165t clear
17166:clear
17167s/\\$//
17168t bsnlc
17169s/["\\]/\\&/g; s/^/"/; s/$/"/p
17170d
17171:bsnlc
17172s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
17173b cont
17174' <confdefs.h | sed '
17175s/'"$ac_delim"'/"\\\
17176"/g' >>$CONFIG_STATUS || ac_write_fail=1
17177
17178cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
17179 for (key in D) D_is_set[key] = 1
17180 FS = ""
17181}
17182/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
17183 line = \$ 0
17184 split(line, arg, " ")
17185 if (arg[1] == "#") {
17186 defundef = arg[2]
17187 mac1 = arg[3]
17188 } else {
17189 defundef = substr(arg[1], 2)
17190 mac1 = arg[2]
17191 }
17192 split(mac1, mac2, "(") #)
17193 macro = mac2[1]
17194 prefix = substr(line, 1, index(line, defundef) - 1)
17195 if (D_is_set[macro]) {
17196 # Preserve the white space surrounding the "#".
17197 print prefix "define", macro P[macro] D[macro]
17198 next
17199 } else {
17200 # Replace #undef with comments. This is necessary, for example,
17201 # in the case of _POSIX_SOURCE, which is predefined and required
17202 # on some systems where configure will not decide to define it.
17203 if (defundef == "undef") {
17204 print "/*", prefix defundef, macro, "*/"
17205 next
17206 }
17207 }
17208}
17209{ print }
17210_ACAWK
31537_ACEOF 17211_ACEOF
17212cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
17213 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
17214fi # test -n "$CONFIG_HEADERS"
31538 17215
31539 17216
31540# VPATH may cause trouble with some makes, so we remove $(srcdir), 17217eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS "
31541# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and 17218shift
31542# trailing colons and then remove the whole line if VPATH becomes empty 17219for ac_tag
31543# (actually we leave an empty line to preserve line numbers).
31544if test "x$srcdir" = x.; then
31545 ac_vpsub='/^[ ]*VPATH[ ]*=/{
31546s/:*\$(srcdir):*/:/
31547s/:*\${srcdir}:*/:/
31548s/:*@srcdir@:*/:/
31549s/^\([^=]*=[ ]*\):*/\1/
31550s/:*$//
31551s/^[^=]*=[ ]*$//
31552}'
31553fi
31554
31555cat >>$CONFIG_STATUS <<\_ACEOF
31556fi # test -n "$CONFIG_FILES"
31557
31558
31559for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS
31560do 17220do
31561 case $ac_tag in 17221 case $ac_tag in
31562 :[FHLC]) ac_mode=$ac_tag; continue;; 17222 :[FHLC]) ac_mode=$ac_tag; continue;;
31563 esac 17223 esac
31564 case $ac_mode$ac_tag in 17224 case $ac_mode$ac_tag in
31565 :[FHL]*:*);; 17225 :[FHL]*:*);;
31566 :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 17226 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
31567echo "$as_me: error: Invalid tag $ac_tag." >&2;}
31568 { (exit 1); exit 1; }; };;
31569 :[FH]-) ac_tag=-:-;; 17227 :[FH]-) ac_tag=-:-;;
31570 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 17228 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
31571 esac 17229 esac
@@ -31584,7 +17242,7 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
31584 for ac_f 17242 for ac_f
31585 do 17243 do
31586 case $ac_f in 17244 case $ac_f in
31587 -) ac_f="$tmp/stdin";; 17245 -) ac_f="$ac_tmp/stdin";;
31588 *) # Look for the file first in the build tree, then in the source tree 17246 *) # Look for the file first in the build tree, then in the source tree
31589 # (if the path is not absolute). The absolute path cannot be DOS-style, 17247 # (if the path is not absolute). The absolute path cannot be DOS-style,
31590 # because $ac_f cannot contain `:'. 17248 # because $ac_f cannot contain `:'.
@@ -31593,26 +17251,34 @@ echo "$as_me: error: Invalid tag $ac_tag." >&2;}
31593 [\\/$]*) false;; 17251 [\\/$]*) false;;
31594 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 17252 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
31595 esac || 17253 esac ||
31596 { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 17254 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
31597echo "$as_me: error: cannot find input file: $ac_f" >&2;}
31598 { (exit 1); exit 1; }; };;
31599 esac 17255 esac
31600 ac_file_inputs="$ac_file_inputs $ac_f" 17256 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
17257 as_fn_append ac_file_inputs " '$ac_f'"
31601 done 17258 done
31602 17259
31603 # Let's still pretend it is `configure' which instantiates (i.e., don't 17260 # Let's still pretend it is `configure' which instantiates (i.e., don't
31604 # use $as_me), people would be surprised to read: 17261 # use $as_me), people would be surprised to read:
31605 # /* config.h. Generated by config.status. */ 17262 # /* config.h. Generated by config.status. */
31606 configure_input="Generated from "`IFS=: 17263 configure_input='Generated from '`
31607 echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." 17264 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
17265 `' by configure.'
31608 if test x"$ac_file" != x-; then 17266 if test x"$ac_file" != x-; then
31609 configure_input="$ac_file. $configure_input" 17267 configure_input="$ac_file. $configure_input"
31610 { echo "$as_me:$LINENO: creating $ac_file" >&5 17268 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
31611echo "$as_me: creating $ac_file" >&6;} 17269$as_echo "$as_me: creating $ac_file" >&6;}
31612 fi 17270 fi
17271 # Neutralize special characters interpreted by sed in replacement strings.
17272 case $configure_input in #(
17273 *\&* | *\|* | *\\* )
17274 ac_sed_conf_input=`$as_echo "$configure_input" |
17275 sed 's/[\\\\&|]/\\\\&/g'`;; #(
17276 *) ac_sed_conf_input=$configure_input;;
17277 esac
31613 17278
31614 case $ac_tag in 17279 case $ac_tag in
31615 *:-:* | *:-) cat >"$tmp/stdin";; 17280 *:-:* | *:-) cat >"$ac_tmp/stdin" \
17281 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
31616 esac 17282 esac
31617 ;; 17283 ;;
31618 esac 17284 esac
@@ -31622,7 +17288,7 @@ $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31622 X"$ac_file" : 'X\(//\)[^/]' \| \ 17288 X"$ac_file" : 'X\(//\)[^/]' \| \
31623 X"$ac_file" : 'X\(//\)$' \| \ 17289 X"$ac_file" : 'X\(//\)$' \| \
31624 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 17290 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
31625echo X"$ac_file" | 17291$as_echo X"$ac_file" |
31626 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 17292 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31627 s//\1/ 17293 s//\1/
31628 q 17294 q
@@ -31640,55 +17306,15 @@ echo X"$ac_file" |
31640 q 17306 q
31641 } 17307 }
31642 s/.*/./; q'` 17308 s/.*/./; q'`
31643 { as_dir="$ac_dir" 17309 as_dir="$ac_dir"; as_fn_mkdir_p
31644 case $as_dir in #(
31645 -*) as_dir=./$as_dir;;
31646 esac
31647 test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
31648 as_dirs=
31649 while :; do
31650 case $as_dir in #(
31651 *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #(
31652 *) as_qdir=$as_dir;;
31653 esac
31654 as_dirs="'$as_qdir' $as_dirs"
31655 as_dir=`$as_dirname -- "$as_dir" ||
31656$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
31657 X"$as_dir" : 'X\(//\)[^/]' \| \
31658 X"$as_dir" : 'X\(//\)$' \| \
31659 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
31660echo X"$as_dir" |
31661 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
31662 s//\1/
31663 q
31664 }
31665 /^X\(\/\/\)[^/].*/{
31666 s//\1/
31667 q
31668 }
31669 /^X\(\/\/\)$/{
31670 s//\1/
31671 q
31672 }
31673 /^X\(\/\).*/{
31674 s//\1/
31675 q
31676 }
31677 s/.*/./; q'`
31678 test -d "$as_dir" && break
31679 done
31680 test -z "$as_dirs" || eval "mkdir $as_dirs"
31681 } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
31682echo "$as_me: error: cannot create directory $as_dir" >&2;}
31683 { (exit 1); exit 1; }; }; }
31684 ac_builddir=. 17310 ac_builddir=.
31685 17311
31686case "$ac_dir" in 17312case "$ac_dir" in
31687.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 17313.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
31688*) 17314*)
31689 ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` 17315 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
31690 # A ".." for each directory in $ac_dir_suffix. 17316 # A ".." for each directory in $ac_dir_suffix.
31691 ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` 17317 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
31692 case $ac_top_builddir_sub in 17318 case $ac_top_builddir_sub in
31693 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 17319 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
31694 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 17320 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
@@ -31728,12 +17354,12 @@ ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
31728 esac 17354 esac
31729_ACEOF 17355_ACEOF
31730 17356
31731cat >>$CONFIG_STATUS <<\_ACEOF 17357cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31732# If the template does not know about datarootdir, expand it. 17358# If the template does not know about datarootdir, expand it.
31733# FIXME: This hack should be removed a few years after 2.60. 17359# FIXME: This hack should be removed a few years after 2.60.
31734ac_datarootdir_hack=; ac_datarootdir_seen= 17360ac_datarootdir_hack=; ac_datarootdir_seen=
31735 17361ac_sed_dataroot='
31736case `sed -n '/datarootdir/ { 17362/datarootdir/ {
31737 p 17363 p
31738 q 17364 q
31739} 17365}
@@ -31741,36 +17367,37 @@ case `sed -n '/datarootdir/ {
31741/@docdir@/p 17367/@docdir@/p
31742/@infodir@/p 17368/@infodir@/p
31743/@localedir@/p 17369/@localedir@/p
31744/@mandir@/p 17370/@mandir@/p'
31745' $ac_file_inputs` in 17371case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
31746*datarootdir*) ac_datarootdir_seen=yes;; 17372*datarootdir*) ac_datarootdir_seen=yes;;
31747*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 17373*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
31748 { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 17374 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
31749echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 17375$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
31750_ACEOF 17376_ACEOF
31751cat >>$CONFIG_STATUS <<_ACEOF 17377cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31752 ac_datarootdir_hack=' 17378 ac_datarootdir_hack='
31753 s&@datadir@&$datadir&g 17379 s&@datadir@&$datadir&g
31754 s&@docdir@&$docdir&g 17380 s&@docdir@&$docdir&g
31755 s&@infodir@&$infodir&g 17381 s&@infodir@&$infodir&g
31756 s&@localedir@&$localedir&g 17382 s&@localedir@&$localedir&g
31757 s&@mandir@&$mandir&g 17383 s&@mandir@&$mandir&g
31758 s&\\\${datarootdir}&$datarootdir&g' ;; 17384 s&\\\${datarootdir}&$datarootdir&g' ;;
31759esac 17385esac
31760_ACEOF 17386_ACEOF
31761 17387
31762# Neutralize VPATH when `$srcdir' = `.'. 17388# Neutralize VPATH when `$srcdir' = `.'.
31763# Shell code in configure.ac might set extrasub. 17389# Shell code in configure.ac might set extrasub.
31764# FIXME: do we really want to maintain this feature? 17390# FIXME: do we really want to maintain this feature?
31765cat >>$CONFIG_STATUS <<_ACEOF 17391cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
31766 sed "$ac_vpsub 17392ac_sed_extra="$ac_vpsub
31767$extrasub 17393$extrasub
31768_ACEOF 17394_ACEOF
31769cat >>$CONFIG_STATUS <<\_ACEOF 17395cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
31770:t 17396:t
31771/@[a-zA-Z_][a-zA-Z_0-9]*@/!b 17397/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
31772s&@configure_input@&$configure_input&;t t 17398s|@configure_input@|$ac_sed_conf_input|;t t
31773s&@top_builddir@&$ac_top_builddir_sub&;t t 17399s&@top_builddir@&$ac_top_builddir_sub&;t t
17400s&@top_build_prefix@&$ac_top_build_prefix&;t t
31774s&@srcdir@&$ac_srcdir&;t t 17401s&@srcdir@&$ac_srcdir&;t t
31775s&@abs_srcdir@&$ac_abs_srcdir&;t t 17402s&@abs_srcdir@&$ac_abs_srcdir&;t t
31776s&@top_srcdir@&$ac_top_srcdir&;t t 17403s&@top_srcdir@&$ac_top_srcdir&;t t
@@ -31780,119 +17407,49 @@ s&@abs_builddir@&$ac_abs_builddir&;t t
31780s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 17407s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
31781s&@INSTALL@&$ac_INSTALL&;t t 17408s&@INSTALL@&$ac_INSTALL&;t t
31782$ac_datarootdir_hack 17409$ac_datarootdir_hack
31783" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out 17410"
17411eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
17412 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31784 17413
31785test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 17414test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
31786 { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && 17415 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
31787 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && 17416 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
31788 { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' 17417 "$ac_tmp/out"`; test -z "$ac_out"; } &&
31789which seems to be undefined. Please make sure it is defined." >&5 17418 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31790echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 17419which seems to be undefined. Please make sure it is defined" >&5
31791which seems to be undefined. Please make sure it is defined." >&2;} 17420$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
31792 17421which seems to be undefined. Please make sure it is defined" >&2;}
31793 rm -f "$tmp/stdin" 17422
17423 rm -f "$ac_tmp/stdin"
31794 case $ac_file in 17424 case $ac_file in
31795 -) cat "$tmp/out"; rm -f "$tmp/out";; 17425 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
31796 *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; 17426 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
31797 esac 17427 esac \
17428 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31798 ;; 17429 ;;
31799 :H) 17430 :H)
31800 # 17431 #
31801 # CONFIG_HEADER 17432 # CONFIG_HEADER
31802 # 17433 #
31803_ACEOF
31804
31805# Transform confdefs.h into a sed script `conftest.defines', that
31806# substitutes the proper values into config.h.in to produce config.h.
31807rm -f conftest.defines conftest.tail
31808# First, append a space to every undef/define line, to ease matching.
31809echo 's/$/ /' >conftest.defines
31810# Then, protect against being on the right side of a sed subst, or in
31811# an unquoted here document, in config.status. If some macros were
31812# called several times there might be several #defines for the same
31813# symbol, which is useless. But do not sort them, since the last
31814# AC_DEFINE must be honored.
31815ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
31816# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where
31817# NAME is the cpp macro being defined, VALUE is the value it is being given.
31818# PARAMS is the parameter list in the macro definition--in most cases, it's
31819# just an empty string.
31820ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*'
31821ac_dB='\\)[ (].*,\\1define\\2'
31822ac_dC=' '
31823ac_dD=' ,'
31824
31825uniq confdefs.h |
31826 sed -n '
31827 t rset
31828 :rset
31829 s/^[ ]*#[ ]*define[ ][ ]*//
31830 t ok
31831 d
31832 :ok
31833 s/[\\&,]/\\&/g
31834 s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p
31835 s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p
31836 ' >>conftest.defines
31837
31838# Remove the space that was appended to ease matching.
31839# Then replace #undef with comments. This is necessary, for
31840# example, in the case of _POSIX_SOURCE, which is predefined and required
31841# on some systems where configure will not decide to define it.
31842# (The regexp can be short, since the line contains either #define or #undef.)
31843echo 's/ $//
31844s,^[ #]*u.*,/* & */,' >>conftest.defines
31845
31846# Break up conftest.defines:
31847ac_max_sed_lines=50
31848
31849# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1"
31850# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2"
31851# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1"
31852# et cetera.
31853ac_in='$ac_file_inputs'
31854ac_out='"$tmp/out1"'
31855ac_nxt='"$tmp/out2"'
31856
31857while :
31858do
31859 # Write a here document:
31860 cat >>$CONFIG_STATUS <<_ACEOF
31861 # First, check the format of the line:
31862 cat >"\$tmp/defines.sed" <<\\CEOF
31863/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def
31864/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def
31865b
31866:def
31867_ACEOF
31868 sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS
31869 echo 'CEOF
31870 sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS
31871 ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in
31872 sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail
31873 grep . conftest.tail >/dev/null || break
31874 rm -f conftest.defines
31875 mv conftest.tail conftest.defines
31876done
31877rm -f conftest.defines conftest.tail
31878
31879echo "ac_result=$ac_in" >>$CONFIG_STATUS
31880cat >>$CONFIG_STATUS <<\_ACEOF
31881 if test x"$ac_file" != x-; then 17434 if test x"$ac_file" != x-; then
31882 echo "/* $configure_input */" >"$tmp/config.h" 17435 {
31883 cat "$ac_result" >>"$tmp/config.h" 17436 $as_echo "/* $configure_input */" \
31884 if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then 17437 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
31885 { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 17438 } >"$ac_tmp/config.h" \
31886echo "$as_me: $ac_file is unchanged" >&6;} 17439 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
17440 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
17441 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
17442$as_echo "$as_me: $ac_file is unchanged" >&6;}
31887 else 17443 else
31888 rm -f $ac_file 17444 rm -f "$ac_file"
31889 mv "$tmp/config.h" $ac_file 17445 mv "$ac_tmp/config.h" "$ac_file" \
17446 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
31890 fi 17447 fi
31891 else 17448 else
31892 echo "/* $configure_input */" 17449 $as_echo "/* $configure_input */" \
31893 cat "$ac_result" 17450 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
17451 || as_fn_error $? "could not create -" "$LINENO" 5
31894 fi 17452 fi
31895 rm -f "$tmp/out12"
31896 ;; 17453 ;;
31897 17454
31898 17455
@@ -31901,11 +17458,13 @@ echo "$as_me: $ac_file is unchanged" >&6;}
31901done # for ac_tag 17458done # for ac_tag
31902 17459
31903 17460
31904{ (exit 0); exit 0; } 17461as_fn_exit 0
31905_ACEOF 17462_ACEOF
31906chmod +x $CONFIG_STATUS
31907ac_clean_files=$ac_clean_files_save 17463ac_clean_files=$ac_clean_files_save
31908 17464
17465test $ac_write_fail = 0 ||
17466 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
17467
31909 17468
31910# configure is writing to config.log, and then calls config.status. 17469# configure is writing to config.log, and then calls config.status.
31911# config.status does its own redirection, appending to config.log. 17470# config.status does its own redirection, appending to config.log.
@@ -31925,7 +17484,11 @@ if test "$no_create" != yes; then
31925 exec 5>>config.log 17484 exec 5>>config.log
31926 # Use ||, not &&, to avoid exiting from the if with $? = 1, which 17485 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
31927 # would make configure fail if this is the last instruction. 17486 # would make configure fail if this is the last instruction.
31928 $ac_cs_success || { (exit 1); exit 1; } 17487 $ac_cs_success || as_fn_exit 1
17488fi
17489if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
17490 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
17491$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
31929fi 17492fi
31930 17493
31931 17494
@@ -31981,9 +17544,7 @@ echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
31981echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" 17544echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
31982echo " BSD Auth support: $BSD_AUTH_MSG" 17545echo " BSD Auth support: $BSD_AUTH_MSG"
31983echo " Random number source: $RAND_MSG" 17546echo " Random number source: $RAND_MSG"
31984if test ! -z "$USE_RAND_HELPER" ; then 17547echo " Privsep sandbox style: $SANDBOX_STYLE"
31985echo " ssh-rand-helper collects from: $RAND_HELPER_MSG"
31986fi
31987 17548
31988echo "" 17549echo ""
31989 17550
@@ -32015,14 +17576,6 @@ if test "x$PAM_MSG" = "xyes" ; then
32015 echo "" 17576 echo ""
32016fi 17577fi
32017 17578
32018if test ! -z "$RAND_HELPER_CMDHASH" ; then
32019 echo "WARNING: you are using the builtin random number collection "
32020 echo "service. Please read WARNING.RNG and request that your OS "
32021 echo "vendor includes kernel-based random number collection in "
32022 echo "future versions of your OS."
32023 echo ""
32024fi
32025
32026if test ! -z "$NO_PEERCHECK" ; then 17579if test ! -z "$NO_PEERCHECK" ; then
32027 echo "WARNING: the operating system that you are using does not" 17580 echo "WARNING: the operating system that you are using does not"
32028 echo "appear to support getpeereid(), getpeerucred() or the" 17581 echo "appear to support getpeereid(), getpeerucred() or the"
diff --git a/configure.ac b/configure.ac
index ad3c4ab0f..58da1f167 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
1# $Id: configure.ac,v 1.469.4.1 2011/02/04 00:42:14 djm Exp $ 1# $Id: configure.ac,v 1.480 2011/08/18 04:48:24 tim Exp $
2# 2#
3# Copyright (c) 1999-2004 Damien Miller 3# Copyright (c) 1999-2004 Damien Miller
4# 4#
@@ -14,23 +14,12 @@
14# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 16
17AC_INIT(OpenSSH, Portable, openssh-unix-dev@mindrot.org) 17AC_INIT([OpenSSH], [Portable], [openssh-unix-dev@mindrot.org])
18AC_REVISION($Revision: 1.469.4.1 $) 18AC_REVISION($Revision: 1.480 $)
19AC_CONFIG_SRCDIR([ssh.c]) 19AC_CONFIG_SRCDIR([ssh.c])
20AC_LANG([C])
20 21
21# local macros 22AC_CONFIG_HEADER([config.h])
22AC_DEFUN([OPENSSH_CHECK_CFLAG_COMPILE], [{
23 AC_MSG_CHECKING([if $CC supports $1])
24 saved_CFLAGS="$CFLAGS"
25 CFLAGS="$CFLAGS $1"
26 AC_COMPILE_IFELSE([void main(void) { return 0; }],
27 [ AC_MSG_RESULT(yes) ],
28 [ AC_MSG_RESULT(no)
29 CFLAGS="$saved_CFLAGS" ]
30 )
31}])
32
33AC_CONFIG_HEADER(config.h)
34AC_PROG_CC 23AC_PROG_CC
35AC_CANONICAL_HOST 24AC_CANONICAL_HOST
36AC_C_BIGENDIAN 25AC_C_BIGENDIAN
@@ -41,22 +30,22 @@ AC_PROG_CPP
41AC_PROG_RANLIB 30AC_PROG_RANLIB
42AC_PROG_INSTALL 31AC_PROG_INSTALL
43AC_PROG_EGREP 32AC_PROG_EGREP
44AC_PATH_PROG(AR, ar) 33AC_PATH_PROG([AR], [ar])
45AC_PATH_PROG(CAT, cat) 34AC_PATH_PROG([CAT], [cat])
46AC_PATH_PROG(KILL, kill) 35AC_PATH_PROG([KILL], [kill])
47AC_PATH_PROGS(PERL, perl5 perl) 36AC_PATH_PROGS([PERL], [perl5 perl])
48AC_PATH_PROG(SED, sed) 37AC_PATH_PROG([SED], [sed])
49AC_SUBST(PERL) 38AC_SUBST([PERL])
50AC_PATH_PROG(ENT, ent) 39AC_PATH_PROG([ENT], [ent])
51AC_SUBST(ENT) 40AC_SUBST([ENT])
52AC_PATH_PROG(TEST_MINUS_S_SH, bash) 41AC_PATH_PROG([TEST_MINUS_S_SH], [bash])
53AC_PATH_PROG(TEST_MINUS_S_SH, ksh) 42AC_PATH_PROG([TEST_MINUS_S_SH], [ksh])
54AC_PATH_PROG(TEST_MINUS_S_SH, sh) 43AC_PATH_PROG([TEST_MINUS_S_SH], [sh])
55AC_PATH_PROG(SH, sh) 44AC_PATH_PROG([SH], [sh])
56AC_PATH_PROG(GROFF, groff) 45AC_PATH_PROG([GROFF], [groff])
57AC_PATH_PROG(NROFF, nroff) 46AC_PATH_PROG([NROFF], [nroff])
58AC_PATH_PROG(MANDOC, mandoc) 47AC_PATH_PROG([MANDOC], [mandoc])
59AC_SUBST(TEST_SHELL,sh) 48AC_SUBST([TEST_SHELL], [sh])
60 49
61dnl select manpage formatter 50dnl select manpage formatter
62if test "x$MANDOC" != "x" ; then 51if test "x$MANDOC" != "x" ; then
@@ -69,18 +58,18 @@ else
69 AC_MSG_WARN([no manpage formatted found]) 58 AC_MSG_WARN([no manpage formatted found])
70 MANFMT="false" 59 MANFMT="false"
71fi 60fi
72AC_SUBST(MANFMT) 61AC_SUBST([MANFMT])
73 62
74dnl for buildpkg.sh 63dnl for buildpkg.sh
75AC_PATH_PROG(PATH_GROUPADD_PROG, groupadd, groupadd, 64AC_PATH_PROG([PATH_GROUPADD_PROG], [groupadd], [groupadd],
76 [/usr/sbin${PATH_SEPARATOR}/etc]) 65 [/usr/sbin${PATH_SEPARATOR}/etc])
77AC_PATH_PROG(PATH_USERADD_PROG, useradd, useradd, 66AC_PATH_PROG([PATH_USERADD_PROG], [useradd], [useradd],
78 [/usr/sbin${PATH_SEPARATOR}/etc]) 67 [/usr/sbin${PATH_SEPARATOR}/etc])
79AC_CHECK_PROG(MAKE_PACKAGE_SUPPORTED, pkgmk, yes, no) 68AC_CHECK_PROG([MAKE_PACKAGE_SUPPORTED], [pkgmk], [yes], [no])
80if test -x /sbin/sh; then 69if test -x /sbin/sh; then
81 AC_SUBST(STARTUP_SCRIPT_SHELL,/sbin/sh) 70 AC_SUBST([STARTUP_SCRIPT_SHELL], [/sbin/sh])
82else 71else
83 AC_SUBST(STARTUP_SCRIPT_SHELL,/bin/sh) 72 AC_SUBST([STARTUP_SCRIPT_SHELL], [/bin/sh])
84fi 73fi
85 74
86# System features 75# System features
@@ -92,34 +81,44 @@ fi
92 81
93# Use LOGIN_PROGRAM from environment if possible 82# Use LOGIN_PROGRAM from environment if possible
94if test ! -z "$LOGIN_PROGRAM" ; then 83if test ! -z "$LOGIN_PROGRAM" ; then
95 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM", 84 AC_DEFINE_UNQUOTED([LOGIN_PROGRAM_FALLBACK], ["$LOGIN_PROGRAM"],
96 [If your header files don't define LOGIN_PROGRAM, 85 [If your header files don't define LOGIN_PROGRAM,
97 then use this (detected) from environment and PATH]) 86 then use this (detected) from environment and PATH])
98else 87else
99 # Search for login 88 # Search for login
100 AC_PATH_PROG(LOGIN_PROGRAM_FALLBACK, login) 89 AC_PATH_PROG([LOGIN_PROGRAM_FALLBACK], [login])
101 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then 90 if test ! -z "$LOGIN_PROGRAM_FALLBACK" ; then
102 AC_DEFINE_UNQUOTED(LOGIN_PROGRAM_FALLBACK, "$LOGIN_PROGRAM_FALLBACK") 91 AC_DEFINE_UNQUOTED([LOGIN_PROGRAM_FALLBACK], ["$LOGIN_PROGRAM_FALLBACK"])
103 fi 92 fi
104fi 93fi
105 94
106AC_PATH_PROG(PATH_PASSWD_PROG, passwd) 95AC_PATH_PROG([PATH_PASSWD_PROG], [passwd])
107if test ! -z "$PATH_PASSWD_PROG" ; then 96if test ! -z "$PATH_PASSWD_PROG" ; then
108 AC_DEFINE_UNQUOTED(_PATH_PASSWD_PROG, "$PATH_PASSWD_PROG", 97 AC_DEFINE_UNQUOTED([_PATH_PASSWD_PROG], ["$PATH_PASSWD_PROG"],
109 [Full path of your "passwd" program]) 98 [Full path of your "passwd" program])
110fi 99fi
111 100
112if test -z "$LD" ; then 101if test -z "$LD" ; then
113 LD=$CC 102 LD=$CC
114fi 103fi
115AC_SUBST(LD) 104AC_SUBST([LD])
116 105
117AC_C_INLINE 106AC_C_INLINE
118 107
119AC_CHECK_DECL(LLONG_MAX, have_llong_max=1, , [#include <limits.h>]) 108AC_CHECK_DECL([LLONG_MAX], [have_llong_max=1], , [#include <limits.h>])
109AC_CHECK_DECL([SYSTR_POLICY_KILL], [have_systr_policy_kill=1], , [
110 #include <sys/types.h>
111 #include <sys/param.h>
112 #include <dev/systrace.h>
113])
114AC_CHECK_DECL([RLIMIT_NPROC],
115 [AC_DEFINE([HAVE_RLIMIT_NPROC], [], [sys/resource.h has RLIMIT_NPROC])], , [
116 #include <sys/types.h>
117 #include <sys/resource.h>
118])
120 119
121use_stack_protector=1 120use_stack_protector=1
122AC_ARG_WITH(stackprotect, 121AC_ARG_WITH([stackprotect],
123 [ --without-stackprotect Don't use compiler's stack protection], [ 122 [ --without-stackprotect Don't use compiler's stack protection], [
124 if test "x$withval" = "xno"; then 123 if test "x$withval" = "xno"; then
125 use_stack_protector=0 124 use_stack_protector=0
@@ -127,15 +126,15 @@ AC_ARG_WITH(stackprotect,
127 126
128 127
129if test "$GCC" = "yes" || test "$GCC" = "egcs"; then 128if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
130 OPENSSH_CHECK_CFLAG_COMPILE([-Wall]) 129 OSSH_CHECK_CFLAG_COMPILE([-Wall])
131 OPENSSH_CHECK_CFLAG_COMPILE([-Wpointer-arith]) 130 OSSH_CHECK_CFLAG_COMPILE([-Wpointer-arith])
132 OPENSSH_CHECK_CFLAG_COMPILE([-Wuninitialized]) 131 OSSH_CHECK_CFLAG_COMPILE([-Wuninitialized])
133 OPENSSH_CHECK_CFLAG_COMPILE([-Wsign-compare]) 132 OSSH_CHECK_CFLAG_COMPILE([-Wsign-compare])
134 OPENSSH_CHECK_CFLAG_COMPILE([-Wformat-security]) 133 OSSH_CHECK_CFLAG_COMPILE([-Wformat-security])
135 OPENSSH_CHECK_CFLAG_COMPILE([-Wno-pointer-sign]) 134 OSSH_CHECK_CFLAG_COMPILE([-Wpointer-sign], [-Wno-pointer-sign])
136 OPENSSH_CHECK_CFLAG_COMPILE([-Wno-unused-result]) 135 OSSH_CHECK_CFLAG_COMPILE([-Wunused-result], [-Wno-unused-result])
137 OPENSSH_CHECK_CFLAG_COMPILE([-fno-strict-aliasing]) 136 OSSH_CHECK_CFLAG_COMPILE([-fno-strict-aliasing])
138 AC_MSG_CHECKING(gcc version) 137 AC_MSG_CHECKING([gcc version])
139 GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'` 138 GCC_VER=`$CC -v 2>&1 | $AWK '/gcc version /{print $3}'`
140 case $GCC_VER in 139 case $GCC_VER in
141 1.*) no_attrib_nonnull=1 ;; 140 1.*) no_attrib_nonnull=1 ;;
@@ -145,52 +144,52 @@ if test "$GCC" = "yes" || test "$GCC" = "egcs"; then
145 2.*) no_attrib_nonnull=1 ;; 144 2.*) no_attrib_nonnull=1 ;;
146 *) ;; 145 *) ;;
147 esac 146 esac
148 AC_MSG_RESULT($GCC_VER) 147 AC_MSG_RESULT([$GCC_VER])
149 148
150 AC_MSG_CHECKING(if $CC accepts -fno-builtin-memset) 149 AC_MSG_CHECKING([if $CC accepts -fno-builtin-memset])
151 saved_CFLAGS="$CFLAGS" 150 saved_CFLAGS="$CFLAGS"
152 CFLAGS="$CFLAGS -fno-builtin-memset" 151 CFLAGS="$CFLAGS -fno-builtin-memset"
153 AC_LINK_IFELSE( [AC_LANG_SOURCE([[ 152 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <string.h> ]],
154#include <string.h> 153 [[ char b[10]; memset(b, 0, sizeof(b)); ]])],
155int main(void){char b[10]; memset(b, 0, sizeof(b));} 154 [ AC_MSG_RESULT([yes]) ],
156 ]])], 155 [ AC_MSG_RESULT([no])
157 [ AC_MSG_RESULT(yes) ],
158 [ AC_MSG_RESULT(no)
159 CFLAGS="$saved_CFLAGS" ] 156 CFLAGS="$saved_CFLAGS" ]
160) 157 )
161 158
162 # -fstack-protector-all doesn't always work for some GCC versions 159 # -fstack-protector-all doesn't always work for some GCC versions
163 # and/or platforms, so we test if we can. If it's not supported 160 # and/or platforms, so we test if we can. If it's not supported
164 # on a given platform gcc will emit a warning so we use -Werror. 161 # on a given platform gcc will emit a warning so we use -Werror.
165 if test "x$use_stack_protector" = "x1"; then 162 if test "x$use_stack_protector" = "x1"; then
166 for t in -fstack-protector-all -fstack-protector; do 163 for t in -fstack-protector-all -fstack-protector; do
167 AC_MSG_CHECKING(if $CC supports $t) 164 AC_MSG_CHECKING([if $CC supports $t])
168 saved_CFLAGS="$CFLAGS" 165 saved_CFLAGS="$CFLAGS"
169 saved_LDFLAGS="$LDFLAGS" 166 saved_LDFLAGS="$LDFLAGS"
170 CFLAGS="$CFLAGS $t -Werror" 167 CFLAGS="$CFLAGS $t -Werror"
171 LDFLAGS="$LDFLAGS $t -Werror" 168 LDFLAGS="$LDFLAGS $t -Werror"
172 AC_LINK_IFELSE( 169 AC_LINK_IFELSE(
173 [AC_LANG_SOURCE([ 170 [AC_LANG_PROGRAM([[ #include <stdio.h> ]],
174#include <stdio.h> 171 [[
175int main(void){char x[[256]]; snprintf(x, sizeof(x), "XXX"); return 0;} 172 char x[256];
176 ])], 173 snprintf(x, sizeof(x), "XXX");
177 [ AC_MSG_RESULT(yes) 174 ]])],
175 [ AC_MSG_RESULT([yes])
178 CFLAGS="$saved_CFLAGS $t" 176 CFLAGS="$saved_CFLAGS $t"
179 LDFLAGS="$saved_LDFLAGS $t" 177 LDFLAGS="$saved_LDFLAGS $t"
180 AC_MSG_CHECKING(if $t works) 178 AC_MSG_CHECKING([if $t works])
181 AC_RUN_IFELSE( 179 AC_RUN_IFELSE(
182 [AC_LANG_SOURCE([ 180 [AC_LANG_PROGRAM([[ #include <stdio.h> ]],
183#include <stdio.h> 181 [[
184int main(void){char x[[256]]; snprintf(x, sizeof(x), "XXX"); return 0;} 182 char x[256];
185 ])], 183 snprintf(x, sizeof(x), "XXX");
186 [ AC_MSG_RESULT(yes) 184 ]])],
185 [ AC_MSG_RESULT([yes])
187 break ], 186 break ],
188 [ AC_MSG_RESULT(no) ], 187 [ AC_MSG_RESULT([no]) ],
189 [ AC_MSG_WARN([cross compiling: cannot test]) 188 [ AC_MSG_WARN([cross compiling: cannot test])
190 break ] 189 break ]
191 ) 190 )
192 ], 191 ],
193 [ AC_MSG_RESULT(no) ] 192 [ AC_MSG_RESULT([no]) ]
194 ) 193 )
195 CFLAGS="$saved_CFLAGS" 194 CFLAGS="$saved_CFLAGS"
196 LDFLAGS="$saved_LDFLAGS" 195 LDFLAGS="$saved_LDFLAGS"
@@ -202,7 +201,7 @@ int main(void){char x[[256]]; snprintf(x, sizeof(x), "XXX"); return 0;}
202 unset ac_cv_have_decl_LLONG_MAX 201 unset ac_cv_have_decl_LLONG_MAX
203 saved_CFLAGS="$CFLAGS" 202 saved_CFLAGS="$CFLAGS"
204 CFLAGS="$CFLAGS -std=gnu99" 203 CFLAGS="$CFLAGS -std=gnu99"
205 AC_CHECK_DECL(LLONG_MAX, 204 AC_CHECK_DECL([LLONG_MAX],
206 [have_llong_max=1], 205 [have_llong_max=1],
207 [CFLAGS="$saved_CFLAGS"], 206 [CFLAGS="$saved_CFLAGS"],
208 [#include <limits.h>] 207 [#include <limits.h>]
@@ -211,10 +210,10 @@ int main(void){char x[[256]]; snprintf(x, sizeof(x), "XXX"); return 0;}
211fi 210fi
212 211
213if test "x$no_attrib_nonnull" != "x1" ; then 212if test "x$no_attrib_nonnull" != "x1" ; then
214 AC_DEFINE(HAVE_ATTRIBUTE__NONNULL__, 1, [Have attribute nonnull]) 213 AC_DEFINE([HAVE_ATTRIBUTE__NONNULL__], [1], [Have attribute nonnull])
215fi 214fi
216 215
217AC_ARG_WITH(rpath, 216AC_ARG_WITH([rpath],
218 [ --without-rpath Disable auto-added -R linker paths], 217 [ --without-rpath Disable auto-added -R linker paths],
219 [ 218 [
220 if test "x$withval" = "xno" ; then 219 if test "x$withval" = "xno" ; then
@@ -227,7 +226,7 @@ AC_ARG_WITH(rpath,
227) 226)
228 227
229# Allow user to specify flags 228# Allow user to specify flags
230AC_ARG_WITH(cflags, 229AC_ARG_WITH([cflags],
231 [ --with-cflags Specify additional flags to pass to compiler], 230 [ --with-cflags Specify additional flags to pass to compiler],
232 [ 231 [
233 if test -n "$withval" && test "x$withval" != "xno" && \ 232 if test -n "$withval" && test "x$withval" != "xno" && \
@@ -236,7 +235,7 @@ AC_ARG_WITH(cflags,
236 fi 235 fi
237 ] 236 ]
238) 237)
239AC_ARG_WITH(cppflags, 238AC_ARG_WITH([cppflags],
240 [ --with-cppflags Specify additional flags to pass to preprocessor] , 239 [ --with-cppflags Specify additional flags to pass to preprocessor] ,
241 [ 240 [
242 if test -n "$withval" && test "x$withval" != "xno" && \ 241 if test -n "$withval" && test "x$withval" != "xno" && \
@@ -245,7 +244,7 @@ AC_ARG_WITH(cppflags,
245 fi 244 fi
246 ] 245 ]
247) 246)
248AC_ARG_WITH(ldflags, 247AC_ARG_WITH([ldflags],
249 [ --with-ldflags Specify additional flags to pass to linker], 248 [ --with-ldflags Specify additional flags to pass to linker],
250 [ 249 [
251 if test -n "$withval" && test "x$withval" != "xno" && \ 250 if test -n "$withval" && test "x$withval" != "xno" && \
@@ -254,7 +253,7 @@ AC_ARG_WITH(ldflags,
254 fi 253 fi
255 ] 254 ]
256) 255)
257AC_ARG_WITH(libs, 256AC_ARG_WITH([libs],
258 [ --with-libs Specify additional libraries to link with], 257 [ --with-libs Specify additional libraries to link with],
259 [ 258 [
260 if test -n "$withval" && test "x$withval" != "xno" && \ 259 if test -n "$withval" && test "x$withval" != "xno" && \
@@ -263,7 +262,7 @@ AC_ARG_WITH(libs,
263 fi 262 fi
264 ] 263 ]
265) 264)
266AC_ARG_WITH(Werror, 265AC_ARG_WITH([Werror],
267 [ --with-Werror Build main code with -Werror], 266 [ --with-Werror Build main code with -Werror],
268 [ 267 [
269 if test -n "$withval" && test "x$withval" != "xno"; then 268 if test -n "$withval" && test "x$withval" != "xno"; then
@@ -275,7 +274,7 @@ AC_ARG_WITH(Werror,
275 ] 274 ]
276) 275)
277 276
278AC_CHECK_HEADERS( \ 277AC_CHECK_HEADERS([ \
279 bstring.h \ 278 bstring.h \
280 crypt.h \ 279 crypt.h \
281 crypto/sha2.h \ 280 crypto/sha2.h \
@@ -339,29 +338,29 @@ AC_CHECK_HEADERS( \
339 utmp.h \ 338 utmp.h \
340 utmpx.h \ 339 utmpx.h \
341 vis.h \ 340 vis.h \
342) 341])
343 342
344# lastlog.h requires sys/time.h to be included first on Solaris 343# lastlog.h requires sys/time.h to be included first on Solaris
345AC_CHECK_HEADERS(lastlog.h, [], [], [ 344AC_CHECK_HEADERS([lastlog.h], [], [], [
346#ifdef HAVE_SYS_TIME_H 345#ifdef HAVE_SYS_TIME_H
347# include <sys/time.h> 346# include <sys/time.h>
348#endif 347#endif
349]) 348])
350 349
351# sys/ptms.h requires sys/stream.h to be included first on Solaris 350# sys/ptms.h requires sys/stream.h to be included first on Solaris
352AC_CHECK_HEADERS(sys/ptms.h, [], [], [ 351AC_CHECK_HEADERS([sys/ptms.h], [], [], [
353#ifdef HAVE_SYS_STREAM_H 352#ifdef HAVE_SYS_STREAM_H
354# include <sys/stream.h> 353# include <sys/stream.h>
355#endif 354#endif
356]) 355])
357 356
358# login_cap.h requires sys/types.h on NetBSD 357# login_cap.h requires sys/types.h on NetBSD
359AC_CHECK_HEADERS(login_cap.h, [], [], [ 358AC_CHECK_HEADERS([login_cap.h], [], [], [
360#include <sys/types.h> 359#include <sys/types.h>
361]) 360])
362 361
363# older BSDs need sys/param.h before sys/mount.h 362# older BSDs need sys/param.h before sys/mount.h
364AC_CHECK_HEADERS(sys/mount.h, [], [], [ 363AC_CHECK_HEADERS([sys/mount.h], [], [], [
365#include <sys/param.h> 364#include <sys/param.h>
366]) 365])
367 366
@@ -378,15 +377,14 @@ case "$host" in
378 # particularly with older versions of vac or xlc. 377 # particularly with older versions of vac or xlc.
379 # It also throws errors about null macro argments, but these are 378 # It also throws errors about null macro argments, but these are
380 # not fatal. 379 # not fatal.
381 AC_MSG_CHECKING(if compiler allows macro redefinitions) 380 AC_MSG_CHECKING([if compiler allows macro redefinitions])
382 AC_COMPILE_IFELSE( 381 AC_COMPILE_IFELSE(
383 [AC_LANG_SOURCE([[ 382 [AC_LANG_PROGRAM([[
384#define testmacro foo 383#define testmacro foo
385#define testmacro bar 384#define testmacro bar]],
386int main(void) { exit(0); } 385 [[ exit(0); ]])],
387 ]])], 386 [ AC_MSG_RESULT([yes]) ],
388 [ AC_MSG_RESULT(yes) ], 387 [ AC_MSG_RESULT([no])
389 [ AC_MSG_RESULT(no)
390 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`" 388 CC="`echo $CC | sed 's/-qlanglvl\=ansi//g'`"
391 LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`" 389 LD="`echo $LD | sed 's/-qlanglvl\=ansi//g'`"
392 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`" 390 CFLAGS="`echo $CFLAGS | sed 's/-qlanglvl\=ansi//g'`"
@@ -407,21 +405,22 @@ int main(void) { exit(0); }
407 for tryflags in $flags ;do 405 for tryflags in $flags ;do
408 if (test -z "$blibflags"); then 406 if (test -z "$blibflags"); then
409 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath" 407 LDFLAGS="$saved_LDFLAGS $tryflags$blibpath"
410 AC_TRY_LINK([], [], [blibflags=$tryflags]) 408 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
409 [blibflags=$tryflags], [])
411 fi 410 fi
412 done 411 done
413 if (test -z "$blibflags"); then 412 if (test -z "$blibflags"); then
414 AC_MSG_RESULT(not found) 413 AC_MSG_RESULT([not found])
415 AC_MSG_ERROR([*** must be able to specify blibpath on AIX - check config.log]) 414 AC_MSG_ERROR([*** must be able to specify blibpath on AIX - check config.log])
416 else 415 else
417 AC_MSG_RESULT($blibflags) 416 AC_MSG_RESULT([$blibflags])
418 fi 417 fi
419 LDFLAGS="$saved_LDFLAGS" 418 LDFLAGS="$saved_LDFLAGS"
420 dnl Check for authenticate. Might be in libs.a on older AIXes 419 dnl Check for authenticate. Might be in libs.a on older AIXes
421 AC_CHECK_FUNC(authenticate, [AC_DEFINE(WITH_AIXAUTHENTICATE, 1, 420 AC_CHECK_FUNC([authenticate], [AC_DEFINE([WITH_AIXAUTHENTICATE], [1],
422 [Define if you want to enable AIX4's authenticate function])], 421 [Define if you want to enable AIX4's authenticate function])],
423 [AC_CHECK_LIB(s,authenticate, 422 [AC_CHECK_LIB([s], [authenticate],
424 [ AC_DEFINE(WITH_AIXAUTHENTICATE) 423 [ AC_DEFINE([WITH_AIXAUTHENTICATE])
425 LIBS="$LIBS -ls" 424 LIBS="$LIBS -ls"
426 ]) 425 ])
427 ]) 426 ])
@@ -429,147 +428,154 @@ int main(void) { exit(0); }
429 AC_CHECK_DECLS([authenticate, loginrestrictions, loginsuccess, 428 AC_CHECK_DECLS([authenticate, loginrestrictions, loginsuccess,
430 passwdexpired, setauthdb], , , [#include <usersec.h>]) 429 passwdexpired, setauthdb], , , [#include <usersec.h>])
431 dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2) 430 dnl Check if loginfailed is declared and takes 4 arguments (AIX >= 5.2)
432 AC_CHECK_DECLS(loginfailed, 431 AC_CHECK_DECLS([loginfailed],
433 [AC_MSG_CHECKING(if loginfailed takes 4 arguments) 432 [AC_MSG_CHECKING([if loginfailed takes 4 arguments])
434 AC_TRY_COMPILE( 433 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <usersec.h> ]],
435 [#include <usersec.h>], 434 [[ (void)loginfailed("user","host","tty",0); ]])],
436 [(void)loginfailed("user","host","tty",0);], 435 [AC_MSG_RESULT([yes])
437 [AC_MSG_RESULT(yes) 436 AC_DEFINE([AIX_LOGINFAILED_4ARG], [1],
438 AC_DEFINE(AIX_LOGINFAILED_4ARG, 1, 437 [Define if your AIX loginfailed() function
439 [Define if your AIX loginfailed() function 438 takes 4 arguments (AIX >= 5.2)])], [AC_MSG_RESULT([no])
440 takes 4 arguments (AIX >= 5.2)])], 439 ])],
441 [AC_MSG_RESULT(no)] 440 [],
442 )], 441 [#include <usersec.h>]
443 [],
444 [#include <usersec.h>]
445 ) 442 )
446 AC_CHECK_FUNCS(getgrset setauthdb) 443 AC_CHECK_FUNCS([getgrset setauthdb])
447 AC_CHECK_DECL(F_CLOSEM, 444 AC_CHECK_DECL([F_CLOSEM],
448 AC_DEFINE(HAVE_FCNTL_CLOSEM, 1, [Use F_CLOSEM fcntl for closefrom]), 445 AC_DEFINE([HAVE_FCNTL_CLOSEM], [1], [Use F_CLOSEM fcntl for closefrom]),
449 [], 446 [],
450 [ #include <limits.h> 447 [ #include <limits.h>
451 #include <fcntl.h> ] 448 #include <fcntl.h> ]
452 ) 449 )
453 check_for_aix_broken_getaddrinfo=1 450 check_for_aix_broken_getaddrinfo=1
454 AC_DEFINE(BROKEN_REALPATH, 1, [Define if you have a broken realpath.]) 451 AC_DEFINE([BROKEN_REALPATH], [1], [Define if you have a broken realpath.])
455 AC_DEFINE(SETEUID_BREAKS_SETUID, 1, 452 AC_DEFINE([SETEUID_BREAKS_SETUID], [1],
456 [Define if your platform breaks doing a seteuid before a setuid]) 453 [Define if your platform breaks doing a seteuid before a setuid])
457 AC_DEFINE(BROKEN_SETREUID, 1, [Define if your setreuid() is broken]) 454 AC_DEFINE([BROKEN_SETREUID], [1], [Define if your setreuid() is broken])
458 AC_DEFINE(BROKEN_SETREGID, 1, [Define if your setregid() is broken]) 455 AC_DEFINE([BROKEN_SETREGID], [1], [Define if your setregid() is broken])
459 dnl AIX handles lastlog as part of its login message 456 dnl AIX handles lastlog as part of its login message
460 AC_DEFINE(DISABLE_LASTLOG, 1, [Define if you don't want to use lastlog]) 457 AC_DEFINE([DISABLE_LASTLOG], [1], [Define if you don't want to use lastlog])
461 AC_DEFINE(LOGIN_NEEDS_UTMPX, 1, 458 AC_DEFINE([LOGIN_NEEDS_UTMPX], [1],
462 [Some systems need a utmpx entry for /bin/login to work]) 459 [Some systems need a utmpx entry for /bin/login to work])
463 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV, 460 AC_DEFINE([SPT_TYPE], [SPT_REUSEARGV],
464 [Define to a Set Process Title type if your system is 461 [Define to a Set Process Title type if your system is
465 supported by bsd-setproctitle.c]) 462 supported by bsd-setproctitle.c])
466 AC_DEFINE(SSHPAM_CHAUTHTOK_NEEDS_RUID, 1, 463 AC_DEFINE([SSHPAM_CHAUTHTOK_NEEDS_RUID], [1],
467 [AIX 5.2 and 5.3 (and presumably newer) require this]) 464 [AIX 5.2 and 5.3 (and presumably newer) require this])
468 AC_DEFINE(PTY_ZEROREAD, 1, [read(1) can return 0 for a non-closed fd]) 465 AC_DEFINE([PTY_ZEROREAD], [1], [read(1) can return 0 for a non-closed fd])
469 ;; 466 ;;
470*-*-cygwin*) 467*-*-cygwin*)
471 check_for_libcrypt_later=1 468 check_for_libcrypt_later=1
472 LIBS="$LIBS /usr/lib/textreadmode.o" 469 LIBS="$LIBS /usr/lib/textreadmode.o"
473 AC_DEFINE(HAVE_CYGWIN, 1, [Define if you are on Cygwin]) 470 AC_DEFINE([HAVE_CYGWIN], [1], [Define if you are on Cygwin])
474 AC_DEFINE(USE_PIPES, 1, [Use PIPES instead of a socketpair()]) 471 AC_DEFINE([USE_PIPES], [1], [Use PIPES instead of a socketpair()])
475 AC_DEFINE(DISABLE_SHADOW, 1, 472 AC_DEFINE([DISABLE_SHADOW], [1],
476 [Define if you want to disable shadow passwords]) 473 [Define if you want to disable shadow passwords])
477 AC_DEFINE(NO_X11_UNIX_SOCKETS, 1, 474 AC_DEFINE([NO_X11_UNIX_SOCKETS], [1],
478 [Define if X11 doesn't support AF_UNIX sockets on that system]) 475 [Define if X11 doesn't support AF_UNIX sockets on that system])
479 AC_DEFINE(NO_IPPORT_RESERVED_CONCEPT, 1, 476 AC_DEFINE([NO_IPPORT_RESERVED_CONCEPT], [1],
480 [Define if the concept of ports only accessible to 477 [Define if the concept of ports only accessible to
481 superusers isn't known]) 478 superusers isn't known])
482 AC_DEFINE(DISABLE_FD_PASSING, 1, 479 AC_DEFINE([DISABLE_FD_PASSING], [1],
483 [Define if your platform needs to skip post auth 480 [Define if your platform needs to skip post auth
484 file descriptor passing]) 481 file descriptor passing])
485 AC_DEFINE(SSH_IOBUFSZ, 65535, [Windows is sensitive to read buffer size]) 482 AC_DEFINE([SSH_IOBUFSZ], [65535], [Windows is sensitive to read buffer size])
486 AC_DEFINE(FILESYSTEM_NO_BACKSLASH, 1, [File names may not contain backslash characters]) 483 AC_DEFINE([FILESYSTEM_NO_BACKSLASH], [1], [File names may not contain backslash characters])
487 ;; 484 ;;
488*-*-dgux*) 485*-*-dgux*)
489 AC_DEFINE(IP_TOS_IS_BROKEN, 1, 486 AC_DEFINE([IP_TOS_IS_BROKEN], [1],
490 [Define if your system choked on IP TOS setting]) 487 [Define if your system choked on IP TOS setting])
491 AC_DEFINE(SETEUID_BREAKS_SETUID) 488 AC_DEFINE([SETEUID_BREAKS_SETUID])
492 AC_DEFINE(BROKEN_SETREUID) 489 AC_DEFINE([BROKEN_SETREUID])
493 AC_DEFINE(BROKEN_SETREGID) 490 AC_DEFINE([BROKEN_SETREGID])
494 ;; 491 ;;
495*-*-darwin*) 492*-*-darwin*)
496 AC_MSG_CHECKING(if we have working getaddrinfo) 493 AC_MSG_CHECKING([if we have working getaddrinfo])
497 AC_TRY_RUN([#include <mach-o/dyld.h> 494 AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include <mach-o/dyld.h>
498main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16)) 495main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
499 exit(0); 496 exit(0);
500 else 497 else
501 exit(1); 498 exit(1);
502}], [AC_MSG_RESULT(working)], 499}
503 [AC_MSG_RESULT(buggy) 500 ]])],
504 AC_DEFINE(BROKEN_GETADDRINFO, 1, [getaddrinfo is broken (if present)])], 501 [AC_MSG_RESULT([working])],
505 [AC_MSG_RESULT(assume it is working)]) 502 [AC_MSG_RESULT([buggy])
506 AC_DEFINE(SETEUID_BREAKS_SETUID) 503 AC_DEFINE([BROKEN_GETADDRINFO], [1],
507 AC_DEFINE(BROKEN_SETREUID) 504 [getaddrinfo is broken (if present)])
508 AC_DEFINE(BROKEN_SETREGID) 505 ],
509 AC_DEFINE(BROKEN_GLOB, 1, [OS X glob does not do what we expect]) 506 [AC_MSG_RESULT([assume it is working])])
510 AC_DEFINE_UNQUOTED(BIND_8_COMPAT, 1, 507 AC_DEFINE([SETEUID_BREAKS_SETUID])
508 AC_DEFINE([BROKEN_SETREUID])
509 AC_DEFINE([BROKEN_SETREGID])
510 AC_DEFINE([BROKEN_GLOB], [1], [OS X glob does not do what we expect])
511 AC_DEFINE_UNQUOTED([BIND_8_COMPAT], [1],
511 [Define if your resolver libs need this for getrrsetbyname]) 512 [Define if your resolver libs need this for getrrsetbyname])
512 AC_DEFINE(SSH_TUN_FREEBSD, 1, [Open tunnel devices the FreeBSD way]) 513 AC_DEFINE([SSH_TUN_FREEBSD], [1], [Open tunnel devices the FreeBSD way])
513 AC_DEFINE(SSH_TUN_COMPAT_AF, 1, 514 AC_DEFINE([SSH_TUN_COMPAT_AF], [1],
514 [Use tunnel device compatibility to OpenBSD]) 515 [Use tunnel device compatibility to OpenBSD])
515 AC_DEFINE(SSH_TUN_PREPEND_AF, 1, 516 AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
516 [Prepend the address family to IP tunnel traffic]) 517 [Prepend the address family to IP tunnel traffic])
517 AC_MSG_CHECKING(if we have the Security Authorization Session API) 518 AC_MSG_CHECKING([if we have the Security Authorization Session API])
518 AC_TRY_COMPILE([#include <Security/AuthSession.h>], 519 AC_TRY_COMPILE([#include <Security/AuthSession.h>],
519 [SessionCreate(0, 0);], 520 [SessionCreate(0, 0);],
520 [ac_cv_use_security_session_api="yes" 521 [ac_cv_use_security_session_api="yes"
521 AC_DEFINE(USE_SECURITY_SESSION_API, 1, 522 AC_DEFINE([USE_SECURITY_SESSION_API], [1],
522 [platform has the Security Authorization Session API]) 523 [platform has the Security Authorization Session API])
523 LIBS="$LIBS -framework Security" 524 LIBS="$LIBS -framework Security"
524 AC_MSG_RESULT(yes)], 525 AC_MSG_RESULT([yes])],
525 [ac_cv_use_security_session_api="no" 526 [ac_cv_use_security_session_api="no"
526 AC_MSG_RESULT(no)]) 527 AC_MSG_RESULT([no])])
527 AC_MSG_CHECKING(if we have an in-memory credentials cache) 528 AC_MSG_CHECKING([if we have an in-memory credentials cache])
528 AC_TRY_COMPILE( 529 AC_TRY_COMPILE(
529 [#include <Kerberos/Kerberos.h>], 530 [#include <Kerberos/Kerberos.h>],
530 [cc_context_t c; 531 [cc_context_t c;
531 (void) cc_initialize (&c, 0, NULL, NULL);], 532 (void) cc_initialize (&c, 0, NULL, NULL);],
532 [AC_DEFINE(USE_CCAPI, 1, 533 [AC_DEFINE([USE_CCAPI], [1],
533 [platform uses an in-memory credentials cache]) 534 [platform uses an in-memory credentials cache])
534 LIBS="$LIBS -framework Security" 535 LIBS="$LIBS -framework Security"
535 AC_MSG_RESULT(yes) 536 AC_MSG_RESULT([yes])
536 if test "x$ac_cv_use_security_session_api" = "xno"; then 537 if test "x$ac_cv_use_security_session_api" = "xno"; then
537 AC_MSG_ERROR(*** Need a security framework to use the credentials cache API ***) 538 AC_MSG_ERROR([*** Need a security framework to use the credentials cache API ***])
538 fi], 539 fi],
539 [AC_MSG_RESULT(no)] 540 [AC_MSG_RESULT([no])]
540 ) 541 )
541 m4_pattern_allow(AU_IPv) 542 m4_pattern_allow([AU_IPv])
542 AC_CHECK_DECL(AU_IPv4, [], 543 AC_CHECK_DECL([AU_IPv4], [],
543 AC_DEFINE(AU_IPv4, 0, [System only supports IPv4 audit records]) 544 AC_DEFINE([AU_IPv4], [0], [System only supports IPv4 audit records])
544 [#include <bsm/audit.h>] 545 [#include <bsm/audit.h>]
545 AC_DEFINE(LASTLOG_WRITE_PUTUTXLINE, 1, 546 AC_DEFINE([LASTLOG_WRITE_PUTUTXLINE], [1],
546 [Define if pututxline updates lastlog too]) 547 [Define if pututxline updates lastlog too])
547 ) 548 )
549 AC_DEFINE([SPT_TYPE], [SPT_REUSEARGV],
550 [Define to a Set Process Title type if your system is
551 supported by bsd-setproctitle.c])
552 AC_CHECK_FUNCS([sandbox_init])
553 AC_CHECK_HEADERS([sandbox.h])
548 ;; 554 ;;
549*-*-dragonfly*) 555*-*-dragonfly*)
550 SSHDLIBS="$SSHDLIBS -lcrypt" 556 SSHDLIBS="$SSHDLIBS -lcrypt"
551 ;; 557 ;;
552*-*-haiku*) 558*-*-haiku*)
553 LIBS="$LIBS -lbsd " 559 LIBS="$LIBS -lbsd "
554 AC_CHECK_LIB(network, socket) 560 AC_CHECK_LIB([network], [socket])
555 AC_DEFINE(HAVE_U_INT64_T) 561 AC_DEFINE([HAVE_U_INT64_T])
556 MANTYPE=man 562 MANTYPE=man
557 ;; 563 ;;
558*-*-hpux*) 564*-*-hpux*)
559 # first we define all of the options common to all HP-UX releases 565 # first we define all of the options common to all HP-UX releases
560 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1" 566 CPPFLAGS="$CPPFLAGS -D_HPUX_SOURCE -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED=1"
561 IPADDR_IN_DISPLAY=yes 567 IPADDR_IN_DISPLAY=yes
562 AC_DEFINE(USE_PIPES) 568 AC_DEFINE([USE_PIPES])
563 AC_DEFINE(LOGIN_NO_ENDOPT, 1, 569 AC_DEFINE([LOGIN_NO_ENDOPT], [1],
564 [Define if your login program cannot handle end of options ("--")]) 570 [Define if your login program cannot handle end of options ("--")])
565 AC_DEFINE(LOGIN_NEEDS_UTMPX) 571 AC_DEFINE([LOGIN_NEEDS_UTMPX])
566 AC_DEFINE(LOCKED_PASSWD_STRING, "*", 572 AC_DEFINE([LOCKED_PASSWD_STRING], ["*"],
567 [String used in /etc/passwd to denote locked account]) 573 [String used in /etc/passwd to denote locked account])
568 AC_DEFINE(SPT_TYPE,SPT_PSTAT) 574 AC_DEFINE([SPT_TYPE], [SPT_PSTAT])
569 MAIL="/var/mail/username" 575 maildir="/var/mail"
570 LIBS="$LIBS -lsec" 576 LIBS="$LIBS -lsec"
571 AC_CHECK_LIB(xnet, t_error, , 577 AC_CHECK_LIB([xnet], [t_error], ,
572 AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])) 578 [AC_MSG_ERROR([*** -lxnet needed on HP-UX - check config.log ***])])
573 579
574 # next, we define all of the options specific to major releases 580 # next, we define all of the options specific to major releases
575 case "$host" in 581 case "$host" in
@@ -579,13 +585,13 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
579 fi 585 fi
580 ;; 586 ;;
581 *-*-hpux11*) 587 *-*-hpux11*)
582 AC_DEFINE(PAM_SUN_CODEBASE, 1, 588 AC_DEFINE([PAM_SUN_CODEBASE], [1],
583 [Define if you are using Solaris-derived PAM which 589 [Define if you are using Solaris-derived PAM which
584 passes pam_messages to the conversation function 590 passes pam_messages to the conversation function
585 with an extra level of indirection]) 591 with an extra level of indirection])
586 AC_DEFINE(DISABLE_UTMP, 1, 592 AC_DEFINE([DISABLE_UTMP], [1],
587 [Define if you don't want to use utmp]) 593 [Define if you don't want to use utmp])
588 AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins]) 594 AC_DEFINE([USE_BTMP], [1], [Use btmp to log bad logins])
589 check_for_hpux_broken_getaddrinfo=1 595 check_for_hpux_broken_getaddrinfo=1
590 check_for_conflicting_getspnam=1 596 check_for_conflicting_getspnam=1
591 ;; 597 ;;
@@ -594,7 +600,7 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
594 # lastly, we define options specific to minor releases 600 # lastly, we define options specific to minor releases
595 case "$host" in 601 case "$host" in
596 *-*-hpux10.26) 602 *-*-hpux10.26)
597 AC_DEFINE(HAVE_SECUREWARE, 1, 603 AC_DEFINE([HAVE_SECUREWARE], [1],
598 [Define if you have SecureWare-based 604 [Define if you have SecureWare-based
599 protected password database]) 605 protected password database])
600 disable_ptmx_check=yes 606 disable_ptmx_check=yes
@@ -604,79 +610,79 @@ main() { if (NSVersionOfRunTimeLibrary("System") >= (60 << 16))
604 ;; 610 ;;
605*-*-irix5*) 611*-*-irix5*)
606 PATH="$PATH:/usr/etc" 612 PATH="$PATH:/usr/etc"
607 AC_DEFINE(BROKEN_INET_NTOA, 1, 613 AC_DEFINE([BROKEN_INET_NTOA], [1],
608 [Define if you system's inet_ntoa is busted 614 [Define if you system's inet_ntoa is busted
609 (e.g. Irix gcc issue)]) 615 (e.g. Irix gcc issue)])
610 AC_DEFINE(SETEUID_BREAKS_SETUID) 616 AC_DEFINE([SETEUID_BREAKS_SETUID])
611 AC_DEFINE(BROKEN_SETREUID) 617 AC_DEFINE([BROKEN_SETREUID])
612 AC_DEFINE(BROKEN_SETREGID) 618 AC_DEFINE([BROKEN_SETREGID])
613 AC_DEFINE(WITH_ABBREV_NO_TTY, 1, 619 AC_DEFINE([WITH_ABBREV_NO_TTY], [1],
614 [Define if you shouldn't strip 'tty' from your 620 [Define if you shouldn't strip 'tty' from your
615 ttyname in [uw]tmp]) 621 ttyname in [uw]tmp])
616 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 622 AC_DEFINE([LOCKED_PASSWD_STRING], ["*LK*"])
617 ;; 623 ;;
618*-*-irix6*) 624*-*-irix6*)
619 PATH="$PATH:/usr/etc" 625 PATH="$PATH:/usr/etc"
620 AC_DEFINE(WITH_IRIX_ARRAY, 1, 626 AC_DEFINE([WITH_IRIX_ARRAY], [1],
621 [Define if you have/want arrays 627 [Define if you have/want arrays
622 (cluster-wide session managment, not C arrays)]) 628 (cluster-wide session managment, not C arrays)])
623 AC_DEFINE(WITH_IRIX_PROJECT, 1, 629 AC_DEFINE([WITH_IRIX_PROJECT], [1],
624 [Define if you want IRIX project management]) 630 [Define if you want IRIX project management])
625 AC_DEFINE(WITH_IRIX_AUDIT, 1, 631 AC_DEFINE([WITH_IRIX_AUDIT], [1],
626 [Define if you want IRIX audit trails]) 632 [Define if you want IRIX audit trails])
627 AC_CHECK_FUNC(jlimit_startjob, [AC_DEFINE(WITH_IRIX_JOBS, 1, 633 AC_CHECK_FUNC([jlimit_startjob], [AC_DEFINE([WITH_IRIX_JOBS], [1],
628 [Define if you want IRIX kernel jobs])]) 634 [Define if you want IRIX kernel jobs])])
629 AC_DEFINE(BROKEN_INET_NTOA) 635 AC_DEFINE([BROKEN_INET_NTOA])
630 AC_DEFINE(SETEUID_BREAKS_SETUID) 636 AC_DEFINE([SETEUID_BREAKS_SETUID])
631 AC_DEFINE(BROKEN_SETREUID) 637 AC_DEFINE([BROKEN_SETREUID])
632 AC_DEFINE(BROKEN_SETREGID) 638 AC_DEFINE([BROKEN_SETREGID])
633 AC_DEFINE(BROKEN_UPDWTMPX, 1, [updwtmpx is broken (if present)]) 639 AC_DEFINE([BROKEN_UPDWTMPX], [1], [updwtmpx is broken (if present)])
634 AC_DEFINE(WITH_ABBREV_NO_TTY) 640 AC_DEFINE([WITH_ABBREV_NO_TTY])
635 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 641 AC_DEFINE([LOCKED_PASSWD_STRING], ["*LK*"])
636 ;; 642 ;;
637*-*-k*bsd*-gnu | *-*-kopensolaris*-gnu) 643*-*-k*bsd*-gnu | *-*-kopensolaris*-gnu)
638 check_for_libcrypt_later=1 644 check_for_libcrypt_later=1
639 AC_DEFINE(PAM_TTY_KLUDGE) 645 AC_DEFINE([PAM_TTY_KLUDGE])
640 AC_DEFINE(LOCKED_PASSWD_PREFIX, "!") 646 AC_DEFINE([LOCKED_PASSWD_PREFIX], ["!"])
641 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV) 647 AC_DEFINE([SPT_TYPE], [SPT_REUSEARGV])
642 AC_DEFINE(_PATH_BTMP, "/var/log/btmp", [log for bad login attempts]) 648 AC_DEFINE([_PATH_BTMP], ["/var/log/btmp"], [log for bad login attempts])
643 AC_DEFINE(USE_BTMP, 1, [Use btmp to log bad logins]) 649 AC_DEFINE([USE_BTMP], [1], [Use btmp to log bad logins])
644 ;; 650 ;;
645*-*-linux*) 651*-*-linux*)
646 no_dev_ptmx=1 652 no_dev_ptmx=1
647 check_for_libcrypt_later=1 653 check_for_libcrypt_later=1
648 check_for_openpty_ctty_bug=1 654 check_for_openpty_ctty_bug=1
649 AC_DEFINE(PAM_TTY_KLUDGE, 1, 655 AC_DEFINE([PAM_TTY_KLUDGE], [1],
650 [Work around problematic Linux PAM modules handling of PAM_TTY]) 656 [Work around problematic Linux PAM modules handling of PAM_TTY])
651 AC_DEFINE(LOCKED_PASSWD_PREFIX, "!", 657 AC_DEFINE([LOCKED_PASSWD_PREFIX], ["!"],
652 [String used in /etc/passwd to denote locked account]) 658 [String used in /etc/passwd to denote locked account])
653 AC_DEFINE(SPT_TYPE,SPT_REUSEARGV) 659 AC_DEFINE([SPT_TYPE], [SPT_REUSEARGV])
654 AC_DEFINE(LINK_OPNOTSUPP_ERRNO, EPERM, 660 AC_DEFINE([LINK_OPNOTSUPP_ERRNO], [EPERM],
655 [Define to whatever link() returns for "not supported" 661 [Define to whatever link() returns for "not supported"
656 if it doesn't return EOPNOTSUPP.]) 662 if it doesn't return EOPNOTSUPP.])
657 AC_DEFINE(_PATH_BTMP, "/var/log/btmp", [log for bad login attempts]) 663 AC_DEFINE([_PATH_BTMP], ["/var/log/btmp"], [log for bad login attempts])
658 AC_DEFINE(USE_BTMP) 664 AC_DEFINE([USE_BTMP])
659 AC_DEFINE(LINUX_OOM_ADJUST, 1, [Adjust Linux out-of-memory killer]) 665 AC_DEFINE([LINUX_OOM_ADJUST], [1], [Adjust Linux out-of-memory killer])
660 inet6_default_4in6=yes 666 inet6_default_4in6=yes
661 case `uname -r` in 667 case `uname -r` in
662 1.*|2.0.*) 668 1.*|2.0.*)
663 AC_DEFINE(BROKEN_CMSG_TYPE, 1, 669 AC_DEFINE([BROKEN_CMSG_TYPE], [1],
664 [Define if cmsg_type is not passed correctly]) 670 [Define if cmsg_type is not passed correctly])
665 ;; 671 ;;
666 esac 672 esac
667 # tun(4) forwarding compat code 673 # tun(4) forwarding compat code
668 AC_CHECK_HEADERS(linux/if_tun.h) 674 AC_CHECK_HEADERS([linux/if_tun.h])
669 if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then 675 if test "x$ac_cv_header_linux_if_tun_h" = "xyes" ; then
670 AC_DEFINE(SSH_TUN_LINUX, 1, 676 AC_DEFINE([SSH_TUN_LINUX], [1],
671 [Open tunnel devices the Linux tun/tap way]) 677 [Open tunnel devices the Linux tun/tap way])
672 AC_DEFINE(SSH_TUN_COMPAT_AF, 1, 678 AC_DEFINE([SSH_TUN_COMPAT_AF], [1],
673 [Use tunnel device compatibility to OpenBSD]) 679 [Use tunnel device compatibility to OpenBSD])
674 AC_DEFINE(SSH_TUN_PREPEND_AF, 1, 680 AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
675 [Prepend the address family to IP tunnel traffic]) 681 [Prepend the address family to IP tunnel traffic])
676 fi 682 fi
677 ;; 683 ;;
678mips-sony-bsd|mips-sony-newsos4) 684mips-sony-bsd|mips-sony-newsos4)
679 AC_DEFINE(NEED_SETPGRP, 1, [Need setpgrp to acquire controlling tty]) 685 AC_DEFINE([NEED_SETPGRP], [1], [Need setpgrp to acquire controlling tty])
680 SONY=1 686 SONY=1
681 ;; 687 ;;
682*-*-netbsd*) 688*-*-netbsd*)
@@ -684,91 +690,91 @@ mips-sony-bsd|mips-sony-newsos4)
684 if test "x$withval" != "xno" ; then 690 if test "x$withval" != "xno" ; then
685 need_dash_r=1 691 need_dash_r=1
686 fi 692 fi
687 AC_DEFINE(SSH_TUN_FREEBSD, 1, [Open tunnel devices the FreeBSD way]) 693 AC_DEFINE([SSH_TUN_FREEBSD], [1], [Open tunnel devices the FreeBSD way])
688 AC_CHECK_HEADER([net/if_tap.h], , 694 AC_CHECK_HEADER([net/if_tap.h], ,
689 AC_DEFINE(SSH_TUN_NO_L2, 1, [No layer 2 tunnel support])) 695 AC_DEFINE([SSH_TUN_NO_L2], [1], [No layer 2 tunnel support]))
690 AC_DEFINE(SSH_TUN_PREPEND_AF, 1, 696 AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
691 [Prepend the address family to IP tunnel traffic]) 697 [Prepend the address family to IP tunnel traffic])
692 ;; 698 ;;
693*-*-freebsd*) 699*-*-freebsd*)
694 check_for_libcrypt_later=1 700 check_for_libcrypt_later=1
695 AC_DEFINE(LOCKED_PASSWD_PREFIX, "*LOCKED*", [Account locked with pw(1)]) 701 AC_DEFINE([LOCKED_PASSWD_PREFIX], ["*LOCKED*"], [Account locked with pw(1)])
696 AC_DEFINE(SSH_TUN_FREEBSD, 1, [Open tunnel devices the FreeBSD way]) 702 AC_DEFINE([SSH_TUN_FREEBSD], [1], [Open tunnel devices the FreeBSD way])
697 AC_CHECK_HEADER([net/if_tap.h], , 703 AC_CHECK_HEADER([net/if_tap.h], ,
698 AC_DEFINE(SSH_TUN_NO_L2, 1, [No layer 2 tunnel support])) 704 AC_DEFINE([SSH_TUN_NO_L2], [1], [No layer 2 tunnel support]))
699 AC_DEFINE(BROKEN_GLOB, 1, [FreeBSD glob does not do what we need]) 705 AC_DEFINE([BROKEN_GLOB], [1], [FreeBSD glob does not do what we need])
700 ;; 706 ;;
701*-*-bsdi*) 707*-*-bsdi*)
702 AC_DEFINE(SETEUID_BREAKS_SETUID) 708 AC_DEFINE([SETEUID_BREAKS_SETUID])
703 AC_DEFINE(BROKEN_SETREUID) 709 AC_DEFINE([BROKEN_SETREUID])
704 AC_DEFINE(BROKEN_SETREGID) 710 AC_DEFINE([BROKEN_SETREGID])
705 ;; 711 ;;
706*-next-*) 712*-next-*)
707 conf_lastlog_location="/usr/adm/lastlog" 713 conf_lastlog_location="/usr/adm/lastlog"
708 conf_utmp_location=/etc/utmp 714 conf_utmp_location=/etc/utmp
709 conf_wtmp_location=/usr/adm/wtmp 715 conf_wtmp_location=/usr/adm/wtmp
710 MAIL=/usr/spool/mail 716 maildir=/usr/spool/mail
711 AC_DEFINE(HAVE_NEXT, 1, [Define if you are on NeXT]) 717 AC_DEFINE([HAVE_NEXT], [1], [Define if you are on NeXT])
712 AC_DEFINE(BROKEN_REALPATH) 718 AC_DEFINE([BROKEN_REALPATH])
713 AC_DEFINE(USE_PIPES) 719 AC_DEFINE([USE_PIPES])
714 AC_DEFINE(BROKEN_SAVED_UIDS, 1, [Needed for NeXT]) 720 AC_DEFINE([BROKEN_SAVED_UIDS], [1], [Needed for NeXT])
715 ;; 721 ;;
716*-*-openbsd*) 722*-*-openbsd*)
717 AC_DEFINE(HAVE_ATTRIBUTE__SENTINEL__, 1, [OpenBSD's gcc has sentinel]) 723 AC_DEFINE([HAVE_ATTRIBUTE__SENTINEL__], [1], [OpenBSD's gcc has sentinel])
718 AC_DEFINE(HAVE_ATTRIBUTE__BOUNDED__, 1, [OpenBSD's gcc has bounded]) 724 AC_DEFINE([HAVE_ATTRIBUTE__BOUNDED__], [1], [OpenBSD's gcc has bounded])
719 AC_DEFINE(SSH_TUN_OPENBSD, 1, [Open tunnel devices the OpenBSD way]) 725 AC_DEFINE([SSH_TUN_OPENBSD], [1], [Open tunnel devices the OpenBSD way])
720 AC_DEFINE(SYSLOG_R_SAFE_IN_SIGHAND, 1, 726 AC_DEFINE([SYSLOG_R_SAFE_IN_SIGHAND], [1],
721 [syslog_r function is safe to use in in a signal handler]) 727 [syslog_r function is safe to use in in a signal handler])
722 ;; 728 ;;
723*-*-solaris*) 729*-*-solaris*)
724 if test "x$withval" != "xno" ; then 730 if test "x$withval" != "xno" ; then
725 need_dash_r=1 731 need_dash_r=1
726 fi 732 fi
727 AC_DEFINE(PAM_SUN_CODEBASE) 733 AC_DEFINE([PAM_SUN_CODEBASE])
728 AC_DEFINE(LOGIN_NEEDS_UTMPX) 734 AC_DEFINE([LOGIN_NEEDS_UTMPX])
729 AC_DEFINE(LOGIN_NEEDS_TERM, 1, 735 AC_DEFINE([LOGIN_NEEDS_TERM], [1],
730 [Some versions of /bin/login need the TERM supplied 736 [Some versions of /bin/login need the TERM supplied
731 on the commandline]) 737 on the commandline])
732 AC_DEFINE(PAM_TTY_KLUDGE) 738 AC_DEFINE([PAM_TTY_KLUDGE])
733 AC_DEFINE(SSHPAM_CHAUTHTOK_NEEDS_RUID, 1, 739 AC_DEFINE([SSHPAM_CHAUTHTOK_NEEDS_RUID], [1],
734 [Define if pam_chauthtok wants real uid set 740 [Define if pam_chauthtok wants real uid set
735 to the unpriv'ed user]) 741 to the unpriv'ed user])
736 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 742 AC_DEFINE([LOCKED_PASSWD_STRING], ["*LK*"])
737 # Pushing STREAMS modules will cause sshd to acquire a controlling tty. 743 # Pushing STREAMS modules will cause sshd to acquire a controlling tty.
738 AC_DEFINE(SSHD_ACQUIRES_CTTY, 1, 744 AC_DEFINE([SSHD_ACQUIRES_CTTY], [1],
739 [Define if sshd somehow reacquires a controlling TTY 745 [Define if sshd somehow reacquires a controlling TTY
740 after setsid()]) 746 after setsid()])
741 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd 747 AC_DEFINE([PASSWD_NEEDS_USERNAME], [1], [must supply username to passwd
742 in case the name is longer than 8 chars]) 748 in case the name is longer than 8 chars])
743 AC_DEFINE(BROKEN_TCGETATTR_ICANON, 1, [tcgetattr with ICANON may hang]) 749 AC_DEFINE([BROKEN_TCGETATTR_ICANON], [1], [tcgetattr with ICANON may hang])
744 external_path_file=/etc/default/login 750 external_path_file=/etc/default/login
745 # hardwire lastlog location (can't detect it on some versions) 751 # hardwire lastlog location (can't detect it on some versions)
746 conf_lastlog_location="/var/adm/lastlog" 752 conf_lastlog_location="/var/adm/lastlog"
747 AC_MSG_CHECKING(for obsolete utmp and wtmp in solaris2.x) 753 AC_MSG_CHECKING([for obsolete utmp and wtmp in solaris2.x])
748 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'` 754 sol2ver=`echo "$host"| sed -e 's/.*[[0-9]]\.//'`
749 if test "$sol2ver" -ge 8; then 755 if test "$sol2ver" -ge 8; then
750 AC_MSG_RESULT(yes) 756 AC_MSG_RESULT([yes])
751 AC_DEFINE(DISABLE_UTMP) 757 AC_DEFINE([DISABLE_UTMP])
752 AC_DEFINE(DISABLE_WTMP, 1, 758 AC_DEFINE([DISABLE_WTMP], [1],
753 [Define if you don't want to use wtmp]) 759 [Define if you don't want to use wtmp])
754 else 760 else
755 AC_MSG_RESULT(no) 761 AC_MSG_RESULT([no])
756 fi 762 fi
757 AC_ARG_WITH(solaris-contracts, 763 AC_ARG_WITH([solaris-contracts],
758 [ --with-solaris-contracts Enable Solaris process contracts (experimental)], 764 [ --with-solaris-contracts Enable Solaris process contracts (experimental)],
759 [ 765 [
760 AC_CHECK_LIB(contract, ct_tmpl_activate, 766 AC_CHECK_LIB([contract], [ct_tmpl_activate],
761 [ AC_DEFINE(USE_SOLARIS_PROCESS_CONTRACTS, 1, 767 [ AC_DEFINE([USE_SOLARIS_PROCESS_CONTRACTS], [1],
762 [Define if you have Solaris process contracts]) 768 [Define if you have Solaris process contracts])
763 SSHDLIBS="$SSHDLIBS -lcontract" 769 SSHDLIBS="$SSHDLIBS -lcontract"
764 SPC_MSG="yes" ], ) 770 SPC_MSG="yes" ], )
765 ], 771 ],
766 ) 772 )
767 AC_ARG_WITH(solaris-projects, 773 AC_ARG_WITH([solaris-projects],
768 [ --with-solaris-projects Enable Solaris projects (experimental)], 774 [ --with-solaris-projects Enable Solaris projects (experimental)],
769 [ 775 [
770 AC_CHECK_LIB(project, setproject, 776 AC_CHECK_LIB([project], [setproject],
771 [ AC_DEFINE(USE_SOLARIS_PROJECTS, 1, 777 [ AC_DEFINE([USE_SOLARIS_PROJECTS], [1],
772 [Define if you have Solaris projects]) 778 [Define if you have Solaris projects])
773 SSHDLIBS="$SSHDLIBS -lproject" 779 SSHDLIBS="$SSHDLIBS -lproject"
774 SP_MSG="yes" ], ) 780 SP_MSG="yes" ], )
@@ -777,33 +783,33 @@ mips-sony-bsd|mips-sony-newsos4)
777 ;; 783 ;;
778*-*-sunos4*) 784*-*-sunos4*)
779 CPPFLAGS="$CPPFLAGS -DSUNOS4" 785 CPPFLAGS="$CPPFLAGS -DSUNOS4"
780 AC_CHECK_FUNCS(getpwanam) 786 AC_CHECK_FUNCS([getpwanam])
781 AC_DEFINE(PAM_SUN_CODEBASE) 787 AC_DEFINE([PAM_SUN_CODEBASE])
782 conf_utmp_location=/etc/utmp 788 conf_utmp_location=/etc/utmp
783 conf_wtmp_location=/var/adm/wtmp 789 conf_wtmp_location=/var/adm/wtmp
784 conf_lastlog_location=/var/adm/lastlog 790 conf_lastlog_location=/var/adm/lastlog
785 AC_DEFINE(USE_PIPES) 791 AC_DEFINE([USE_PIPES])
786 ;; 792 ;;
787*-ncr-sysv*) 793*-ncr-sysv*)
788 LIBS="$LIBS -lc89" 794 LIBS="$LIBS -lc89"
789 AC_DEFINE(USE_PIPES) 795 AC_DEFINE([USE_PIPES])
790 AC_DEFINE(SSHD_ACQUIRES_CTTY) 796 AC_DEFINE([SSHD_ACQUIRES_CTTY])
791 AC_DEFINE(SETEUID_BREAKS_SETUID) 797 AC_DEFINE([SETEUID_BREAKS_SETUID])
792 AC_DEFINE(BROKEN_SETREUID) 798 AC_DEFINE([BROKEN_SETREUID])
793 AC_DEFINE(BROKEN_SETREGID) 799 AC_DEFINE([BROKEN_SETREGID])
794 ;; 800 ;;
795*-sni-sysv*) 801*-sni-sysv*)
796 # /usr/ucblib MUST NOT be searched on ReliantUNIX 802 # /usr/ucblib MUST NOT be searched on ReliantUNIX
797 AC_CHECK_LIB(dl, dlsym, ,) 803 AC_CHECK_LIB([dl], [dlsym], ,)
798 # -lresolv needs to be at the end of LIBS or DNS lookups break 804 # -lresolv needs to be at the end of LIBS or DNS lookups break
799 AC_CHECK_LIB(resolv, res_query, [ LIBS="$LIBS -lresolv" ]) 805 AC_CHECK_LIB([resolv], [res_query], [ LIBS="$LIBS -lresolv" ])
800 IPADDR_IN_DISPLAY=yes 806 IPADDR_IN_DISPLAY=yes
801 AC_DEFINE(USE_PIPES) 807 AC_DEFINE([USE_PIPES])
802 AC_DEFINE(IP_TOS_IS_BROKEN) 808 AC_DEFINE([IP_TOS_IS_BROKEN])
803 AC_DEFINE(SETEUID_BREAKS_SETUID) 809 AC_DEFINE([SETEUID_BREAKS_SETUID])
804 AC_DEFINE(BROKEN_SETREUID) 810 AC_DEFINE([BROKEN_SETREUID])
805 AC_DEFINE(BROKEN_SETREGID) 811 AC_DEFINE([BROKEN_SETREGID])
806 AC_DEFINE(SSHD_ACQUIRES_CTTY) 812 AC_DEFINE([SSHD_ACQUIRES_CTTY])
807 external_path_file=/etc/default/login 813 external_path_file=/etc/default/login
808 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX 814 # /usr/ucblib/libucb.a no longer needed on ReliantUNIX
809 # Attention: always take care to bind libsocket and libnsl before libc, 815 # Attention: always take care to bind libsocket and libnsl before libc,
@@ -811,36 +817,37 @@ mips-sony-bsd|mips-sony-newsos4)
811 ;; 817 ;;
812# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel. 818# UnixWare 1.x, UnixWare 2.x, and others based on code from Univel.
813*-*-sysv4.2*) 819*-*-sysv4.2*)
814 AC_DEFINE(USE_PIPES) 820 AC_DEFINE([USE_PIPES])
815 AC_DEFINE(SETEUID_BREAKS_SETUID) 821 AC_DEFINE([SETEUID_BREAKS_SETUID])
816 AC_DEFINE(BROKEN_SETREUID) 822 AC_DEFINE([BROKEN_SETREUID])
817 AC_DEFINE(BROKEN_SETREGID) 823 AC_DEFINE([BROKEN_SETREGID])
818 AC_DEFINE(PASSWD_NEEDS_USERNAME, 1, [must supply username to passwd]) 824 AC_DEFINE([PASSWD_NEEDS_USERNAME], [1], [must supply username to passwd])
819 AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 825 AC_DEFINE([LOCKED_PASSWD_STRING], ["*LK*"])
820 ;; 826 ;;
821# UnixWare 7.x, OpenUNIX 8 827# UnixWare 7.x, OpenUNIX 8
822*-*-sysv5*) 828*-*-sysv5*)
823 CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf" 829 CPPFLAGS="$CPPFLAGS -Dvsnprintf=_xvsnprintf -Dsnprintf=_xsnprintf"
824 AC_DEFINE(UNIXWARE_LONG_PASSWORDS, 1, [Support passwords > 8 chars]) 830 AC_DEFINE([UNIXWARE_LONG_PASSWORDS], [1], [Support passwords > 8 chars])
825 AC_DEFINE(USE_PIPES) 831 AC_DEFINE([USE_PIPES])
826 AC_DEFINE(SETEUID_BREAKS_SETUID) 832 AC_DEFINE([SETEUID_BREAKS_SETUID])
827 AC_DEFINE(BROKEN_GETADDRINFO) 833 AC_DEFINE([BROKEN_GETADDRINFO])
828 AC_DEFINE(BROKEN_SETREUID) 834 AC_DEFINE([BROKEN_SETREUID])
829 AC_DEFINE(BROKEN_SETREGID) 835 AC_DEFINE([BROKEN_SETREGID])
830 AC_DEFINE(PASSWD_NEEDS_USERNAME) 836 AC_DEFINE([PASSWD_NEEDS_USERNAME])
831 case "$host" in 837 case "$host" in
832 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x 838 *-*-sysv5SCO_SV*) # SCO OpenServer 6.x
839 maildir=/var/spool/mail
833 TEST_SHELL=/u95/bin/sh 840 TEST_SHELL=/u95/bin/sh
834 AC_DEFINE(BROKEN_LIBIAF, 1, 841 AC_DEFINE([BROKEN_LIBIAF], [1],
835 [ia_uinfo routines not supported by OS yet]) 842 [ia_uinfo routines not supported by OS yet])
836 AC_DEFINE(BROKEN_UPDWTMPX) 843 AC_DEFINE([BROKEN_UPDWTMPX])
837 AC_CHECK_LIB(prot, getluid,[ LIBS="$LIBS -lprot" 844 AC_CHECK_LIB([prot], [getluid], [ LIBS="$LIBS -lprot"
838 AC_CHECK_FUNCS(getluid setluid,,,-lprot) 845 AC_CHECK_FUNCS([getluid setluid], , , [-lprot])
839 AC_DEFINE(HAVE_SECUREWARE) 846 AC_DEFINE([HAVE_SECUREWARE])
840 AC_DEFINE(DISABLE_SHADOW) 847 AC_DEFINE([DISABLE_SHADOW])
841 ],,) 848 ], , )
842 ;; 849 ;;
843 *) AC_DEFINE(LOCKED_PASSWD_STRING, "*LK*") 850 *) AC_DEFINE([LOCKED_PASSWD_STRING], ["*LK*"])
844 check_for_libcrypt_later=1 851 check_for_libcrypt_later=1
845 ;; 852 ;;
846 esac 853 esac
@@ -858,132 +865,128 @@ mips-sony-bsd|mips-sony-newsos4)
858 fi 865 fi
859 LIBS="$LIBS -lprot -lx -ltinfo -lm" 866 LIBS="$LIBS -lprot -lx -ltinfo -lm"
860 no_dev_ptmx=1 867 no_dev_ptmx=1
861 AC_DEFINE(USE_PIPES) 868 AC_DEFINE([USE_PIPES])
862 AC_DEFINE(HAVE_SECUREWARE) 869 AC_DEFINE([HAVE_SECUREWARE])
863 AC_DEFINE(DISABLE_SHADOW) 870 AC_DEFINE([DISABLE_SHADOW])
864 AC_DEFINE(DISABLE_FD_PASSING) 871 AC_DEFINE([DISABLE_FD_PASSING])
865 AC_DEFINE(SETEUID_BREAKS_SETUID) 872 AC_DEFINE([SETEUID_BREAKS_SETUID])
866 AC_DEFINE(BROKEN_GETADDRINFO) 873 AC_DEFINE([BROKEN_GETADDRINFO])
867 AC_DEFINE(BROKEN_SETREUID) 874 AC_DEFINE([BROKEN_SETREUID])
868 AC_DEFINE(BROKEN_SETREGID) 875 AC_DEFINE([BROKEN_SETREGID])
869 AC_DEFINE(WITH_ABBREV_NO_TTY) 876 AC_DEFINE([WITH_ABBREV_NO_TTY])
870 AC_DEFINE(BROKEN_UPDWTMPX) 877 AC_DEFINE([BROKEN_UPDWTMPX])
871 AC_DEFINE(PASSWD_NEEDS_USERNAME) 878 AC_DEFINE([PASSWD_NEEDS_USERNAME])
872 AC_CHECK_FUNCS(getluid setluid) 879 AC_CHECK_FUNCS([getluid setluid])
873 MANTYPE=man 880 MANTYPE=man
874 TEST_SHELL=ksh 881 TEST_SHELL=ksh
875 ;; 882 ;;
876*-*-unicosmk*) 883*-*-unicosmk*)
877 AC_DEFINE(NO_SSH_LASTLOG, 1, 884 AC_DEFINE([NO_SSH_LASTLOG], [1],
878 [Define if you don't want to use lastlog in session.c]) 885 [Define if you don't want to use lastlog in session.c])
879 AC_DEFINE(SETEUID_BREAKS_SETUID) 886 AC_DEFINE([SETEUID_BREAKS_SETUID])
880 AC_DEFINE(BROKEN_SETREUID) 887 AC_DEFINE([BROKEN_SETREUID])
881 AC_DEFINE(BROKEN_SETREGID) 888 AC_DEFINE([BROKEN_SETREGID])
882 AC_DEFINE(USE_PIPES) 889 AC_DEFINE([USE_PIPES])
883 AC_DEFINE(DISABLE_FD_PASSING) 890 AC_DEFINE([DISABLE_FD_PASSING])
884 LDFLAGS="$LDFLAGS" 891 LDFLAGS="$LDFLAGS"
885 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" 892 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
886 MANTYPE=cat 893 MANTYPE=cat
887 ;; 894 ;;
888*-*-unicosmp*) 895*-*-unicosmp*)
889 AC_DEFINE(SETEUID_BREAKS_SETUID) 896 AC_DEFINE([SETEUID_BREAKS_SETUID])
890 AC_DEFINE(BROKEN_SETREUID) 897 AC_DEFINE([BROKEN_SETREUID])
891 AC_DEFINE(BROKEN_SETREGID) 898 AC_DEFINE([BROKEN_SETREGID])
892 AC_DEFINE(WITH_ABBREV_NO_TTY) 899 AC_DEFINE([WITH_ABBREV_NO_TTY])
893 AC_DEFINE(USE_PIPES) 900 AC_DEFINE([USE_PIPES])
894 AC_DEFINE(DISABLE_FD_PASSING) 901 AC_DEFINE([DISABLE_FD_PASSING])
895 LDFLAGS="$LDFLAGS" 902 LDFLAGS="$LDFLAGS"
896 LIBS="$LIBS -lgen -lacid -ldb" 903 LIBS="$LIBS -lgen -lacid -ldb"
897 MANTYPE=cat 904 MANTYPE=cat
898 ;; 905 ;;
899*-*-unicos*) 906*-*-unicos*)
900 AC_DEFINE(SETEUID_BREAKS_SETUID) 907 AC_DEFINE([SETEUID_BREAKS_SETUID])
901 AC_DEFINE(BROKEN_SETREUID) 908 AC_DEFINE([BROKEN_SETREUID])
902 AC_DEFINE(BROKEN_SETREGID) 909 AC_DEFINE([BROKEN_SETREGID])
903 AC_DEFINE(USE_PIPES) 910 AC_DEFINE([USE_PIPES])
904 AC_DEFINE(DISABLE_FD_PASSING) 911 AC_DEFINE([DISABLE_FD_PASSING])
905 AC_DEFINE(NO_SSH_LASTLOG) 912 AC_DEFINE([NO_SSH_LASTLOG])
906 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal" 913 LDFLAGS="$LDFLAGS -Wl,-Dmsglevel=334:fatal"
907 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm" 914 LIBS="$LIBS -lgen -lrsc -lshare -luex -lacm"
908 MANTYPE=cat 915 MANTYPE=cat
909 ;; 916 ;;
910*-dec-osf*) 917*-dec-osf*)
911 AC_MSG_CHECKING(for Digital Unix SIA) 918 AC_MSG_CHECKING([for Digital Unix SIA])
912 no_osfsia="" 919 no_osfsia=""
913 AC_ARG_WITH(osfsia, 920 AC_ARG_WITH([osfsia],
914 [ --with-osfsia Enable Digital Unix SIA], 921 [ --with-osfsia Enable Digital Unix SIA],
915 [ 922 [
916 if test "x$withval" = "xno" ; then 923 if test "x$withval" = "xno" ; then
917 AC_MSG_RESULT(disabled) 924 AC_MSG_RESULT([disabled])
918 no_osfsia=1 925 no_osfsia=1
919 fi 926 fi
920 ], 927 ],
921 ) 928 )
922 if test -z "$no_osfsia" ; then 929 if test -z "$no_osfsia" ; then
923 if test -f /etc/sia/matrix.conf; then 930 if test -f /etc/sia/matrix.conf; then
924 AC_MSG_RESULT(yes) 931 AC_MSG_RESULT([yes])
925 AC_DEFINE(HAVE_OSF_SIA, 1, 932 AC_DEFINE([HAVE_OSF_SIA], [1],
926 [Define if you have Digital Unix Security 933 [Define if you have Digital Unix Security
927 Integration Architecture]) 934 Integration Architecture])
928 AC_DEFINE(DISABLE_LOGIN, 1, 935 AC_DEFINE([DISABLE_LOGIN], [1],
929 [Define if you don't want to use your 936 [Define if you don't want to use your
930 system's login() call]) 937 system's login() call])
931 AC_DEFINE(DISABLE_FD_PASSING) 938 AC_DEFINE([DISABLE_FD_PASSING])
932 LIBS="$LIBS -lsecurity -ldb -lm -laud" 939 LIBS="$LIBS -lsecurity -ldb -lm -laud"
933 SIA_MSG="yes" 940 SIA_MSG="yes"
934 else 941 else
935 AC_MSG_RESULT(no) 942 AC_MSG_RESULT([no])
936 AC_DEFINE(LOCKED_PASSWD_SUBSTR, "Nologin", 943 AC_DEFINE([LOCKED_PASSWD_SUBSTR], ["Nologin"],
937 [String used in /etc/passwd to denote locked account]) 944 [String used in /etc/passwd to denote locked account])
938 fi 945 fi
939 fi 946 fi
940 AC_DEFINE(BROKEN_GETADDRINFO) 947 AC_DEFINE([BROKEN_GETADDRINFO])
941 AC_DEFINE(SETEUID_BREAKS_SETUID) 948 AC_DEFINE([SETEUID_BREAKS_SETUID])
942 AC_DEFINE(BROKEN_SETREUID) 949 AC_DEFINE([BROKEN_SETREUID])
943 AC_DEFINE(BROKEN_SETREGID) 950 AC_DEFINE([BROKEN_SETREGID])
944 AC_DEFINE(BROKEN_READV_COMPARISON, 1, [Can't do comparisons on readv]) 951 AC_DEFINE([BROKEN_READV_COMPARISON], [1], [Can't do comparisons on readv])
945 ;; 952 ;;
946 953
947*-*-nto-qnx*) 954*-*-nto-qnx*)
948 AC_DEFINE(USE_PIPES) 955 AC_DEFINE([USE_PIPES])
949 AC_DEFINE(NO_X11_UNIX_SOCKETS) 956 AC_DEFINE([NO_X11_UNIX_SOCKETS])
950 AC_DEFINE(MISSING_NFDBITS, 1, [Define on *nto-qnx systems]) 957 AC_DEFINE([MISSING_NFDBITS], [1], [Define on *nto-qnx systems])
951 AC_DEFINE(MISSING_HOWMANY, 1, [Define on *nto-qnx systems]) 958 AC_DEFINE([MISSING_HOWMANY], [1], [Define on *nto-qnx systems])
952 AC_DEFINE(MISSING_FD_MASK, 1, [Define on *nto-qnx systems]) 959 AC_DEFINE([MISSING_FD_MASK], [1], [Define on *nto-qnx systems])
953 AC_DEFINE(DISABLE_LASTLOG) 960 AC_DEFINE([DISABLE_LASTLOG])
954 AC_DEFINE(SSHD_ACQUIRES_CTTY) 961 AC_DEFINE([SSHD_ACQUIRES_CTTY])
955 AC_DEFINE(BROKEN_SHADOW_EXPIRE, 1, [QNX shadow support is broken]) 962 AC_DEFINE([BROKEN_SHADOW_EXPIRE], [1], [QNX shadow support is broken])
956 enable_etc_default_login=no # has incompatible /etc/default/login 963 enable_etc_default_login=no # has incompatible /etc/default/login
957 case "$host" in 964 case "$host" in
958 *-*-nto-qnx6*) 965 *-*-nto-qnx6*)
959 AC_DEFINE(DISABLE_FD_PASSING) 966 AC_DEFINE([DISABLE_FD_PASSING])
960 ;; 967 ;;
961 esac 968 esac
962 ;; 969 ;;
963 970
964*-*-ultrix*) 971*-*-ultrix*)
965 AC_DEFINE(BROKEN_GETGROUPS, 1, [getgroups(0,NULL) will return -1]) 972 AC_DEFINE([BROKEN_GETGROUPS], [1], [getgroups(0,NULL) will return -1])
966 AC_DEFINE(BROKEN_MMAP, 1, [Ultrix mmap can't map files]) 973 AC_DEFINE([BROKEN_MMAP], [1], [Ultrix mmap can't map files])
967 AC_DEFINE(NEED_SETPGRP) 974 AC_DEFINE([NEED_SETPGRP])
968 AC_DEFINE(HAVE_SYS_SYSLOG_H, 1, [Force use of sys/syslog.h on Ultrix]) 975 AC_DEFINE([HAVE_SYS_SYSLOG_H], [1], [Force use of sys/syslog.h on Ultrix])
969 ;; 976 ;;
970 977
971*-*-lynxos) 978*-*-lynxos)
972 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__" 979 CFLAGS="$CFLAGS -D__NO_INCLUDE_WARN__"
973 AC_DEFINE(MISSING_HOWMANY) 980 AC_DEFINE([MISSING_HOWMANY])
974 AC_DEFINE(BROKEN_SETVBUF, 1, [LynxOS has broken setvbuf() implementation]) 981 AC_DEFINE([BROKEN_SETVBUF], [1], [LynxOS has broken setvbuf() implementation])
975 ;; 982 ;;
976esac 983esac
977 984
978AC_MSG_CHECKING(compiler and flags for sanity) 985AC_MSG_CHECKING([compiler and flags for sanity])
979AC_RUN_IFELSE( 986AC_RUN_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]], [[ exit(0); ]])],
980 [AC_LANG_SOURCE([ 987 [ AC_MSG_RESULT([yes]) ],
981#include <stdio.h>
982int main(){exit(0);}
983 ])],
984 [ AC_MSG_RESULT(yes) ],
985 [ 988 [
986 AC_MSG_RESULT(no) 989 AC_MSG_RESULT([no])
987 AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***]) 990 AC_MSG_ERROR([*** compiler cannot create working executables, check config.log ***])
988 ], 991 ],
989 [ AC_MSG_WARN([cross compiling: not checking compiler sanity]) ] 992 [ AC_MSG_WARN([cross compiling: not checking compiler sanity]) ]
@@ -991,12 +994,12 @@ int main(){exit(0);}
991 994
992dnl Checks for header files. 995dnl Checks for header files.
993# Checks for libraries. 996# Checks for libraries.
994AC_CHECK_FUNC(yp_match, , AC_CHECK_LIB(nsl, yp_match)) 997AC_CHECK_FUNC([yp_match], , [AC_CHECK_LIB([nsl], [yp_match])])
995AC_CHECK_FUNC(setsockopt, , AC_CHECK_LIB(socket, setsockopt)) 998AC_CHECK_FUNC([setsockopt], , [AC_CHECK_LIB([socket], [setsockopt])])
996 999
997dnl IRIX and Solaris 2.5.1 have dirname() in libgen 1000dnl IRIX and Solaris 2.5.1 have dirname() in libgen
998AC_CHECK_FUNCS(dirname, [AC_CHECK_HEADERS(libgen.h)] ,[ 1001AC_CHECK_FUNCS([dirname], [AC_CHECK_HEADERS([libgen.h])] , [
999 AC_CHECK_LIB(gen, dirname,[ 1002 AC_CHECK_LIB([gen], [dirname], [
1000 AC_CACHE_CHECK([for broken dirname], 1003 AC_CACHE_CHECK([for broken dirname],
1001 ac_cv_have_broken_dirname, [ 1004 ac_cv_have_broken_dirname, [
1002 save_LIBS="$LIBS" 1005 save_LIBS="$LIBS"
@@ -1026,19 +1029,19 @@ int main(int argc, char **argv) {
1026 ]) 1029 ])
1027 if test "x$ac_cv_have_broken_dirname" = "xno" ; then 1030 if test "x$ac_cv_have_broken_dirname" = "xno" ; then
1028 LIBS="$LIBS -lgen" 1031 LIBS="$LIBS -lgen"
1029 AC_DEFINE(HAVE_DIRNAME) 1032 AC_DEFINE([HAVE_DIRNAME])
1030 AC_CHECK_HEADERS(libgen.h) 1033 AC_CHECK_HEADERS([libgen.h])
1031 fi 1034 fi
1032 ]) 1035 ])
1033]) 1036])
1034 1037
1035AC_CHECK_FUNC(getspnam, , 1038AC_CHECK_FUNC([getspnam], ,
1036 AC_CHECK_LIB(gen, getspnam, LIBS="$LIBS -lgen")) 1039 [AC_CHECK_LIB([gen], [getspnam], [LIBS="$LIBS -lgen"])])
1037AC_SEARCH_LIBS(basename, gen, AC_DEFINE(HAVE_BASENAME, 1, 1040AC_SEARCH_LIBS([basename], [gen], [AC_DEFINE([HAVE_BASENAME], [1],
1038 [Define if you have the basename function.])) 1041 [Define if you have the basename function.])])
1039 1042
1040dnl zlib is required 1043dnl zlib is required
1041AC_ARG_WITH(zlib, 1044AC_ARG_WITH([zlib],
1042 [ --with-zlib=PATH Use zlib in PATH], 1045 [ --with-zlib=PATH Use zlib in PATH],
1043 [ if test "x$withval" = "xno" ; then 1046 [ if test "x$withval" = "xno" ; then
1044 AC_MSG_ERROR([*** zlib is required ***]) 1047 AC_MSG_ERROR([*** zlib is required ***])
@@ -1064,8 +1067,8 @@ AC_ARG_WITH(zlib,
1064 fi ] 1067 fi ]
1065) 1068)
1066 1069
1067AC_CHECK_HEADER([zlib.h], ,AC_MSG_ERROR([*** zlib.h missing - please install first or check config.log ***])) 1070AC_CHECK_HEADER([zlib.h], ,[AC_MSG_ERROR([*** zlib.h missing - please install first or check config.log ***])])
1068AC_CHECK_LIB(z, deflate, , 1071AC_CHECK_LIB([z], [deflate], ,
1069 [ 1072 [
1070 saved_CPPFLAGS="$CPPFLAGS" 1073 saved_CPPFLAGS="$CPPFLAGS"
1071 saved_LDFLAGS="$LDFLAGS" 1074 saved_LDFLAGS="$LDFLAGS"
@@ -1078,7 +1081,7 @@ AC_CHECK_LIB(z, deflate, ,
1078 fi 1081 fi
1079 CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}" 1082 CPPFLAGS="-I/usr/local/include ${saved_CPPFLAGS}"
1080 LIBS="$LIBS -lz" 1083 LIBS="$LIBS -lz"
1081 AC_TRY_LINK_FUNC(deflate, AC_DEFINE(HAVE_LIBZ), 1084 AC_TRY_LINK_FUNC([deflate], [AC_DEFINE([HAVE_LIBZ])],
1082 [ 1085 [
1083 AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***]) 1086 AC_MSG_ERROR([*** zlib missing - please install first or check config.log ***])
1084 ] 1087 ]
@@ -1086,7 +1089,7 @@ AC_CHECK_LIB(z, deflate, ,
1086 ] 1089 ]
1087) 1090)
1088 1091
1089AC_ARG_WITH(zlib-version-check, 1092AC_ARG_WITH([zlib-version-check],
1090 [ --without-zlib-version-check Disable zlib version check], 1093 [ --without-zlib-version-check Disable zlib version check],
1091 [ if test "x$withval" = "xno" ; then 1094 [ if test "x$withval" = "xno" ; then
1092 zlib_check_nonfatal=1 1095 zlib_check_nonfatal=1
@@ -1094,12 +1097,12 @@ AC_ARG_WITH(zlib-version-check,
1094 ] 1097 ]
1095) 1098)
1096 1099
1097AC_MSG_CHECKING(for possibly buggy zlib) 1100AC_MSG_CHECKING([for possibly buggy zlib])
1098AC_RUN_IFELSE([AC_LANG_SOURCE([[ 1101AC_RUN_IFELSE([AC_LANG_PROGRAM([[
1099#include <stdio.h> 1102#include <stdio.h>
1100#include <zlib.h> 1103#include <zlib.h>
1101int main() 1104 ]],
1102{ 1105 [[
1103 int a=0, b=0, c=0, d=0, n, v; 1106 int a=0, b=0, c=0, d=0, n, v;
1104 n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d); 1107 n = sscanf(ZLIB_VERSION, "%d.%d.%d.%d", &a, &b, &c, &d);
1105 if (n != 3 && n != 4) 1108 if (n != 3 && n != 4)
@@ -1116,10 +1119,9 @@ int main()
1116 exit(0); 1119 exit(0);
1117 1120
1118 exit(2); 1121 exit(2);
1119}
1120 ]])], 1122 ]])],
1121 AC_MSG_RESULT(no), 1123 AC_MSG_RESULT([no]),
1122 [ AC_MSG_RESULT(yes) 1124 [ AC_MSG_RESULT([yes])
1123 if test -z "$zlib_check_nonfatal" ; then 1125 if test -z "$zlib_check_nonfatal" ; then
1124 AC_MSG_ERROR([*** zlib too old - check config.log *** 1126 AC_MSG_ERROR([*** zlib too old - check config.log ***
1125Your reported zlib version has known security problems. It's possible your 1127Your reported zlib version has known security problems. It's possible your
@@ -1136,25 +1138,25 @@ See http://www.gzip.org/zlib/ for details.])
1136) 1138)
1137 1139
1138dnl UnixWare 2.x 1140dnl UnixWare 2.x
1139AC_CHECK_FUNC(strcasecmp, 1141AC_CHECK_FUNC([strcasecmp],
1140 [], [ AC_CHECK_LIB(resolv, strcasecmp, LIBS="$LIBS -lresolv") ] 1142 [], [ AC_CHECK_LIB([resolv], [strcasecmp], [LIBS="$LIBS -lresolv"]) ]
1141) 1143)
1142AC_CHECK_FUNCS(utimes, 1144AC_CHECK_FUNCS([utimes],
1143 [], [ AC_CHECK_LIB(c89, utimes, [AC_DEFINE(HAVE_UTIMES) 1145 [], [ AC_CHECK_LIB([c89], [utimes], [AC_DEFINE([HAVE_UTIMES])
1144 LIBS="$LIBS -lc89"]) ] 1146 LIBS="$LIBS -lc89"]) ]
1145) 1147)
1146 1148
1147dnl Checks for libutil functions 1149dnl Checks for libutil functions
1148AC_CHECK_HEADERS(libutil.h) 1150AC_CHECK_HEADERS([libutil.h])
1149AC_SEARCH_LIBS(login, util bsd, [AC_DEFINE(HAVE_LOGIN, 1, 1151AC_SEARCH_LIBS([login], [util bsd], [AC_DEFINE([HAVE_LOGIN], [1],
1150 [Define if your libraries define login()])]) 1152 [Define if your libraries define login()])])
1151AC_CHECK_FUNCS(fmt_scaled logout updwtmp logwtmp) 1153AC_CHECK_FUNCS([fmt_scaled logout updwtmp logwtmp])
1152 1154
1153AC_FUNC_STRFTIME 1155AC_FUNC_STRFTIME
1154 1156
1155# Check for ALTDIRFUNC glob() extension 1157# Check for ALTDIRFUNC glob() extension
1156AC_MSG_CHECKING(for GLOB_ALTDIRFUNC support) 1158AC_MSG_CHECKING([for GLOB_ALTDIRFUNC support])
1157AC_EGREP_CPP(FOUNDIT, 1159AC_EGREP_CPP([FOUNDIT],
1158 [ 1160 [
1159 #include <glob.h> 1161 #include <glob.h>
1160 #ifdef GLOB_ALTDIRFUNC 1162 #ifdef GLOB_ALTDIRFUNC
@@ -1162,87 +1164,83 @@ AC_EGREP_CPP(FOUNDIT,
1162 #endif 1164 #endif
1163 ], 1165 ],
1164 [ 1166 [
1165 AC_DEFINE(GLOB_HAS_ALTDIRFUNC, 1, 1167 AC_DEFINE([GLOB_HAS_ALTDIRFUNC], [1],
1166 [Define if your system glob() function has 1168 [Define if your system glob() function has
1167 the GLOB_ALTDIRFUNC extension]) 1169 the GLOB_ALTDIRFUNC extension])
1168 AC_MSG_RESULT(yes) 1170 AC_MSG_RESULT([yes])
1169 ], 1171 ],
1170 [ 1172 [
1171 AC_MSG_RESULT(no) 1173 AC_MSG_RESULT([no])
1172 ] 1174 ]
1173) 1175)
1174 1176
1175# Check for g.gl_matchc glob() extension 1177# Check for g.gl_matchc glob() extension
1176AC_MSG_CHECKING(for gl_matchc field in glob_t) 1178AC_MSG_CHECKING([for gl_matchc field in glob_t])
1177AC_TRY_COMPILE( 1179AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <glob.h> ]],
1178 [ #include <glob.h> ], 1180 [[ glob_t g; g.gl_matchc = 1; ]])],
1179 [glob_t g; g.gl_matchc = 1;],
1180 [ 1181 [
1181 AC_DEFINE(GLOB_HAS_GL_MATCHC, 1, 1182 AC_DEFINE([GLOB_HAS_GL_MATCHC], [1],
1182 [Define if your system glob() function has 1183 [Define if your system glob() function has
1183 gl_matchc options in glob_t]) 1184 gl_matchc options in glob_t])
1184 AC_MSG_RESULT(yes) 1185 AC_MSG_RESULT([yes])
1185 ], 1186 ], [
1186 [ 1187 AC_MSG_RESULT([no])
1187 AC_MSG_RESULT(no) 1188])
1188 ]
1189)
1190 1189
1191# Check for g.gl_statv glob() extension 1190# Check for g.gl_statv glob() extension
1192AC_MSG_CHECKING(for gl_statv and GLOB_KEEPSTAT extensions for glob) 1191AC_MSG_CHECKING([for gl_statv and GLOB_KEEPSTAT extensions for glob])
1193AC_TRY_COMPILE( 1192AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <glob.h> ]], [[
1194 [ #include <glob.h> ],
1195 [
1196#ifndef GLOB_KEEPSTAT 1193#ifndef GLOB_KEEPSTAT
1197#error "glob does not support GLOB_KEEPSTAT extension" 1194#error "glob does not support GLOB_KEEPSTAT extension"
1198#endif 1195#endif
1199glob_t g; 1196glob_t g;
1200g.gl_statv = NULL; 1197g.gl_statv = NULL;
1201], 1198]])],
1202 [ 1199 [
1203 AC_DEFINE(GLOB_HAS_GL_STATV, 1, 1200 AC_DEFINE([GLOB_HAS_GL_STATV], [1],
1204 [Define if your system glob() function has 1201 [Define if your system glob() function has
1205 gl_statv options in glob_t]) 1202 gl_statv options in glob_t])
1206 AC_MSG_RESULT(yes) 1203 AC_MSG_RESULT([yes])
1207 ], 1204 ], [
1208 [ 1205 AC_MSG_RESULT([no])
1209 AC_MSG_RESULT(no) 1206
1210 ] 1207])
1211)
1212 1208
1213AC_CHECK_DECLS(GLOB_NOMATCH, , , [#include <glob.h>]) 1209AC_CHECK_DECLS([GLOB_NOMATCH], , , [#include <glob.h>])
1214 1210
1215AC_MSG_CHECKING([whether struct dirent allocates space for d_name]) 1211AC_MSG_CHECKING([whether struct dirent allocates space for d_name])
1216AC_RUN_IFELSE( 1212AC_RUN_IFELSE(
1217 [AC_LANG_SOURCE([[ 1213 [AC_LANG_PROGRAM([[
1218#include <sys/types.h> 1214#include <sys/types.h>
1219#include <dirent.h> 1215#include <dirent.h>]],
1220int main(void){struct dirent d;exit(sizeof(d.d_name)<=sizeof(char));} 1216 [[
1217 struct dirent d;
1218 exit(sizeof(d.d_name)<=sizeof(char));
1221 ]])], 1219 ]])],
1222 [AC_MSG_RESULT(yes)], 1220 [AC_MSG_RESULT([yes])],
1223 [ 1221 [
1224 AC_MSG_RESULT(no) 1222 AC_MSG_RESULT([no])
1225 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME, 1, 1223 AC_DEFINE([BROKEN_ONE_BYTE_DIRENT_D_NAME], [1],
1226 [Define if your struct dirent expects you to 1224 [Define if your struct dirent expects you to
1227 allocate extra space for d_name]) 1225 allocate extra space for d_name])
1228 ], 1226 ],
1229 [ 1227 [
1230 AC_MSG_WARN([cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME]) 1228 AC_MSG_WARN([cross compiling: assuming BROKEN_ONE_BYTE_DIRENT_D_NAME])
1231 AC_DEFINE(BROKEN_ONE_BYTE_DIRENT_D_NAME) 1229 AC_DEFINE([BROKEN_ONE_BYTE_DIRENT_D_NAME])
1232 ] 1230 ]
1233) 1231)
1234 1232
1235AC_MSG_CHECKING([for /proc/pid/fd directory]) 1233AC_MSG_CHECKING([for /proc/pid/fd directory])
1236if test -d "/proc/$$/fd" ; then 1234if test -d "/proc/$$/fd" ; then
1237 AC_DEFINE(HAVE_PROC_PID, 1, [Define if you have /proc/$pid/fd]) 1235 AC_DEFINE([HAVE_PROC_PID], [1], [Define if you have /proc/$pid/fd])
1238 AC_MSG_RESULT(yes) 1236 AC_MSG_RESULT([yes])
1239else 1237else
1240 AC_MSG_RESULT(no) 1238 AC_MSG_RESULT([no])
1241fi 1239fi
1242 1240
1243# Check whether user wants S/Key support 1241# Check whether user wants S/Key support
1244SKEY_MSG="no" 1242SKEY_MSG="no"
1245AC_ARG_WITH(skey, 1243AC_ARG_WITH([skey],
1246 [ --with-skey[[=PATH]] Enable S/Key support (optionally in PATH)], 1244 [ --with-skey[[=PATH]] Enable S/Key support (optionally in PATH)],
1247 [ 1245 [
1248 if test "x$withval" != "xno" ; then 1246 if test "x$withval" != "xno" ; then
@@ -1252,40 +1250,46 @@ AC_ARG_WITH(skey,
1252 LDFLAGS="$LDFLAGS -L${withval}/lib" 1250 LDFLAGS="$LDFLAGS -L${withval}/lib"
1253 fi 1251 fi
1254 1252
1255 AC_DEFINE(SKEY, 1, [Define if you want S/Key support]) 1253 AC_DEFINE([SKEY], [1], [Define if you want S/Key support])
1256 LIBS="-lskey $LIBS" 1254 LIBS="-lskey $LIBS"
1257 SKEY_MSG="yes" 1255 SKEY_MSG="yes"
1258 1256
1259 AC_MSG_CHECKING([for s/key support]) 1257 AC_MSG_CHECKING([for s/key support])
1260 AC_LINK_IFELSE( 1258 AC_LINK_IFELSE(
1261 [AC_LANG_SOURCE([[ 1259 [AC_LANG_PROGRAM([[
1262#include <stdio.h> 1260#include <stdio.h>
1263#include <skey.h> 1261#include <skey.h>
1264int main() { char *ff = skey_keyinfo(""); ff=""; exit(0); } 1262 ]], [[
1263 char *ff = skey_keyinfo(""); ff="";
1264 exit(0);
1265 ]])], 1265 ]])],
1266 [AC_MSG_RESULT(yes)], 1266 [AC_MSG_RESULT([yes])],
1267 [ 1267 [
1268 AC_MSG_RESULT(no) 1268 AC_MSG_RESULT([no])
1269 AC_MSG_ERROR([** Incomplete or missing s/key libraries.]) 1269 AC_MSG_ERROR([** Incomplete or missing s/key libraries.])
1270 ]) 1270 ])
1271 AC_MSG_CHECKING(if skeychallenge takes 4 arguments) 1271 AC_MSG_CHECKING([if skeychallenge takes 4 arguments])
1272 AC_TRY_COMPILE( 1272 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1273 [#include <stdio.h> 1273#include <stdio.h>
1274 #include <skey.h>], 1274#include <skey.h>
1275 [(void)skeychallenge(NULL,"name","",0);], 1275 ]], [[
1276 [AC_MSG_RESULT(yes) 1276 (void)skeychallenge(NULL,"name","",0);
1277 AC_DEFINE(SKEYCHALLENGE_4ARG, 1, 1277 ]])],
1278 [
1279 AC_MSG_RESULT([yes])
1280 AC_DEFINE([SKEYCHALLENGE_4ARG], [1],
1278 [Define if your skeychallenge() 1281 [Define if your skeychallenge()
1279 function takes 4 arguments (NetBSD)])], 1282 function takes 4 arguments (NetBSD)])],
1280 [AC_MSG_RESULT(no)] 1283 [
1281 ) 1284 AC_MSG_RESULT([no])
1285 ])
1282 fi 1286 fi
1283 ] 1287 ]
1284) 1288)
1285 1289
1286# Check whether user wants TCP wrappers support 1290# Check whether user wants TCP wrappers support
1287TCPW_MSG="no" 1291TCPW_MSG="no"
1288AC_ARG_WITH(tcp-wrappers, 1292AC_ARG_WITH([tcp-wrappers],
1289 [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support (optionally in PATH)], 1293 [ --with-tcp-wrappers[[=PATH]] Enable tcpwrappers support (optionally in PATH)],
1290 [ 1294 [
1291 if test "x$withval" != "xno" ; then 1295 if test "x$withval" != "xno" ; then
@@ -1314,28 +1318,26 @@ AC_ARG_WITH(tcp-wrappers,
1314 fi 1318 fi
1315 fi 1319 fi
1316 LIBS="-lwrap $LIBS" 1320 LIBS="-lwrap $LIBS"
1317 AC_MSG_CHECKING(for libwrap) 1321 AC_MSG_CHECKING([for libwrap])
1318 AC_TRY_LINK( 1322 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
1319 [
1320#include <sys/types.h> 1323#include <sys/types.h>
1321#include <sys/socket.h> 1324#include <sys/socket.h>
1322#include <netinet/in.h> 1325#include <netinet/in.h>
1323#include <tcpd.h> 1326#include <tcpd.h>
1324 int deny_severity = 0, allow_severity = 0; 1327int deny_severity = 0, allow_severity = 0;
1325 ], 1328 ]], [[
1326 [hosts_access(0);], 1329 hosts_access(0);
1327 [ 1330 ]])], [
1328 AC_MSG_RESULT(yes) 1331 AC_MSG_RESULT([yes])
1329 AC_DEFINE(LIBWRAP, 1, 1332 AC_DEFINE([LIBWRAP], [1],
1330 [Define if you want 1333 [Define if you want
1331 TCP Wrappers support]) 1334 TCP Wrappers support])
1332 SSHDLIBS="$SSHDLIBS -lwrap" 1335 SSHDLIBS="$SSHDLIBS -lwrap"
1333 TCPW_MSG="yes" 1336 TCPW_MSG="yes"
1334 ], 1337 ], [
1335 [
1336 AC_MSG_ERROR([*** libwrap missing]) 1338 AC_MSG_ERROR([*** libwrap missing])
1337 ] 1339
1338 ) 1340 ])
1339 LIBS="$saved_LIBS" 1341 LIBS="$saved_LIBS"
1340 fi 1342 fi
1341 ] 1343 ]
@@ -1343,18 +1345,18 @@ AC_ARG_WITH(tcp-wrappers,
1343 1345
1344# Check whether user wants libedit support 1346# Check whether user wants libedit support
1345LIBEDIT_MSG="no" 1347LIBEDIT_MSG="no"
1346AC_ARG_WITH(libedit, 1348AC_ARG_WITH([libedit],
1347 [ --with-libedit[[=PATH]] Enable libedit support for sftp], 1349 [ --with-libedit[[=PATH]] Enable libedit support for sftp],
1348 [ if test "x$withval" != "xno" ; then 1350 [ if test "x$withval" != "xno" ; then
1349 if test "x$withval" = "xyes" ; then 1351 if test "x$withval" = "xyes" ; then
1350 AC_PATH_PROG(PKGCONFIG, pkg-config, no) 1352 AC_PATH_PROG([PKGCONFIG], [pkg-config], [no])
1351 if test "x$PKGCONFIG" != "xno"; then 1353 if test "x$PKGCONFIG" != "xno"; then
1352 AC_MSG_CHECKING(if $PKGCONFIG knows about libedit) 1354 AC_MSG_CHECKING([if $PKGCONFIG knows about libedit])
1353 if "$PKGCONFIG" libedit; then 1355 if "$PKGCONFIG" libedit; then
1354 AC_MSG_RESULT(yes) 1356 AC_MSG_RESULT([yes])
1355 use_pkgconfig_for_libedit=yes 1357 use_pkgconfig_for_libedit=yes
1356 else 1358 else
1357 AC_MSG_RESULT(no) 1359 AC_MSG_RESULT([no])
1358 fi 1360 fi
1359 fi 1361 fi
1360 else 1362 else
@@ -1372,73 +1374,70 @@ AC_ARG_WITH(libedit,
1372 LIBEDIT="-ledit -lcurses" 1374 LIBEDIT="-ledit -lcurses"
1373 fi 1375 fi
1374 OTHERLIBS=`echo $LIBEDIT | sed 's/-ledit//'` 1376 OTHERLIBS=`echo $LIBEDIT | sed 's/-ledit//'`
1375 AC_CHECK_LIB(edit, el_init, 1377 AC_CHECK_LIB([edit], [el_init],
1376 [ AC_DEFINE(USE_LIBEDIT, 1, [Use libedit for sftp]) 1378 [ AC_DEFINE([USE_LIBEDIT], [1], [Use libedit for sftp])
1377 LIBEDIT_MSG="yes" 1379 LIBEDIT_MSG="yes"
1378 AC_SUBST(LIBEDIT) 1380 AC_SUBST([LIBEDIT])
1379 ], 1381 ],
1380 [ AC_MSG_ERROR(libedit not found) ], 1382 [ AC_MSG_ERROR([libedit not found]) ],
1381 [ $OTHERLIBS ] 1383 [ $OTHERLIBS ]
1382 ) 1384 )
1383 AC_MSG_CHECKING(if libedit version is compatible) 1385 AC_MSG_CHECKING([if libedit version is compatible])
1384 AC_COMPILE_IFELSE( 1386 AC_COMPILE_IFELSE(
1385 [AC_LANG_SOURCE([[ 1387 [AC_LANG_PROGRAM([[ #include <histedit.h> ]],
1386#include <histedit.h> 1388 [[
1387int main(void)
1388{
1389 int i = H_SETSIZE; 1389 int i = H_SETSIZE;
1390 el_init("", NULL, NULL, NULL); 1390 el_init("", NULL, NULL, NULL);
1391 exit(0); 1391 exit(0);
1392}
1393 ]])], 1392 ]])],
1394 [ AC_MSG_RESULT(yes) ], 1393 [ AC_MSG_RESULT([yes]) ],
1395 [ AC_MSG_RESULT(no) 1394 [ AC_MSG_RESULT([no])
1396 AC_MSG_ERROR(libedit version is not compatible) ] 1395 AC_MSG_ERROR([libedit version is not compatible]) ]
1397 ) 1396 )
1398 fi ] 1397 fi ]
1399) 1398)
1400 1399
1401AUDIT_MODULE=none 1400AUDIT_MODULE=none
1402AC_ARG_WITH(audit, 1401AC_ARG_WITH([audit],
1403 [ --with-audit=module Enable audit support (modules=debug,bsm,linux)], 1402 [ --with-audit=module Enable audit support (modules=debug,bsm,linux)],
1404 [ 1403 [
1405 AC_MSG_CHECKING(for supported audit module) 1404 AC_MSG_CHECKING([for supported audit module])
1406 case "$withval" in 1405 case "$withval" in
1407 bsm) 1406 bsm)
1408 AC_MSG_RESULT(bsm) 1407 AC_MSG_RESULT([bsm])
1409 AUDIT_MODULE=bsm 1408 AUDIT_MODULE=bsm
1410 dnl Checks for headers, libs and functions 1409 dnl Checks for headers, libs and functions
1411 AC_CHECK_HEADERS(bsm/audit.h, [], 1410 AC_CHECK_HEADERS([bsm/audit.h], [],
1412 [AC_MSG_ERROR(BSM enabled and bsm/audit.h not found)], 1411 [AC_MSG_ERROR([BSM enabled and bsm/audit.h not found])],
1413 [ 1412 [
1414#ifdef HAVE_TIME_H 1413#ifdef HAVE_TIME_H
1415# include <time.h> 1414# include <time.h>
1416#endif 1415#endif
1417 ] 1416 ]
1418) 1417)
1419 AC_CHECK_LIB(bsm, getaudit, [], 1418 AC_CHECK_LIB([bsm], [getaudit], [],
1420 [AC_MSG_ERROR(BSM enabled and required library not found)]) 1419 [AC_MSG_ERROR([BSM enabled and required library not found])])
1421 AC_CHECK_FUNCS(getaudit, [], 1420 AC_CHECK_FUNCS([getaudit], [],
1422 [AC_MSG_ERROR(BSM enabled and required function not found)]) 1421 [AC_MSG_ERROR([BSM enabled and required function not found])])
1423 # These are optional 1422 # These are optional
1424 AC_CHECK_FUNCS(getaudit_addr aug_get_machine) 1423 AC_CHECK_FUNCS([getaudit_addr aug_get_machine])
1425 AC_DEFINE(USE_BSM_AUDIT, 1, [Use BSM audit module]) 1424 AC_DEFINE([USE_BSM_AUDIT], [1], [Use BSM audit module])
1426 ;; 1425 ;;
1427 linux) 1426 linux)
1428 AC_MSG_RESULT(linux) 1427 AC_MSG_RESULT([linux])
1429 AUDIT_MODULE=linux 1428 AUDIT_MODULE=linux
1430 dnl Checks for headers, libs and functions 1429 dnl Checks for headers, libs and functions
1431 AC_CHECK_HEADERS(libaudit.h) 1430 AC_CHECK_HEADERS([libaudit.h])
1432 SSHDLIBS="$SSHDLIBS -laudit" 1431 SSHDLIBS="$SSHDLIBS -laudit"
1433 AC_DEFINE(USE_LINUX_AUDIT, 1, [Use Linux audit module]) 1432 AC_DEFINE([USE_LINUX_AUDIT], [1], [Use Linux audit module])
1434 ;; 1433 ;;
1435 debug) 1434 debug)
1436 AUDIT_MODULE=debug 1435 AUDIT_MODULE=debug
1437 AC_MSG_RESULT(debug) 1436 AC_MSG_RESULT([debug])
1438 AC_DEFINE(SSH_AUDIT_EVENTS, 1, [Use audit debugging module]) 1437 AC_DEFINE([SSH_AUDIT_EVENTS], [1], [Use audit debugging module])
1439 ;; 1438 ;;
1440 no) 1439 no)
1441 AC_MSG_RESULT(no) 1440 AC_MSG_RESULT([no])
1442 ;; 1441 ;;
1443 *) 1442 *)
1444 AC_MSG_ERROR([Unknown audit module $withval]) 1443 AC_MSG_ERROR([Unknown audit module $withval])
@@ -1447,7 +1446,7 @@ AC_ARG_WITH(audit,
1447) 1446)
1448 1447
1449dnl Checks for library functions. Please keep in alphabetical order 1448dnl Checks for library functions. Please keep in alphabetical order
1450AC_CHECK_FUNCS( \ 1449AC_CHECK_FUNCS([ \
1451 arc4random \ 1450 arc4random \
1452 arc4random_buf \ 1451 arc4random_buf \
1453 arc4random_uniform \ 1452 arc4random_uniform \
@@ -1543,46 +1542,43 @@ AC_CHECK_FUNCS( \
1543 vhangup \ 1542 vhangup \
1544 vsnprintf \ 1543 vsnprintf \
1545 waitpid \ 1544 waitpid \
1546) 1545])
1547 1546
1548AC_LINK_IFELSE( 1547AC_LINK_IFELSE(
1549[ 1548 [AC_LANG_PROGRAM(
1550#include <ctype.h> 1549 [[ #include <ctype.h> ]],
1551int main(void) 1550 [[ return (isblank('a')); ]])],
1552{ 1551 [AC_DEFINE([HAVE_ISBLANK], [1], [Define if you have isblank(3C).])
1553 return (isblank('a'));
1554}
1555],
1556 [AC_DEFINE(HAVE_ISBLANK, 1, [Define if you have isblank(3C).])
1557]) 1552])
1558 1553
1559# PKCS#11 support requires dlopen() and co 1554# PKCS#11 support requires dlopen() and co
1560AC_SEARCH_LIBS(dlopen, dl, 1555AC_SEARCH_LIBS([dlopen], [dl],
1561 AC_DEFINE([ENABLE_PKCS11], [], [Enable for PKCS#11 support]) 1556 [AC_DEFINE([ENABLE_PKCS11], [], [Enable for PKCS#11 support])]
1562) 1557)
1563 1558
1564# IRIX has a const char return value for gai_strerror() 1559# IRIX has a const char return value for gai_strerror()
1565AC_CHECK_FUNCS(gai_strerror,[ 1560AC_CHECK_FUNCS([gai_strerror], [
1566 AC_DEFINE(HAVE_GAI_STRERROR) 1561 AC_DEFINE([HAVE_GAI_STRERROR])
1567 AC_TRY_COMPILE([ 1562 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1568#include <sys/types.h> 1563#include <sys/types.h>
1569#include <sys/socket.h> 1564#include <sys/socket.h>
1570#include <netdb.h> 1565#include <netdb.h>
1571 1566
1572const char *gai_strerror(int);],[ 1567const char *gai_strerror(int);
1573char *str; 1568 ]], [[
1574 1569 char *str;
1575str = gai_strerror(0);],[ 1570 str = gai_strerror(0);
1576 AC_DEFINE(HAVE_CONST_GAI_STRERROR_PROTO, 1, 1571 ]])], [
1577 [Define if gai_strerror() returns const char *])])]) 1572 AC_DEFINE([HAVE_CONST_GAI_STRERROR_PROTO], [1],
1573 [Define if gai_strerror() returns const char *])], [])])
1578 1574
1579AC_SEARCH_LIBS(nanosleep, rt posix4, AC_DEFINE(HAVE_NANOSLEEP, 1, 1575AC_SEARCH_LIBS([nanosleep], [rt posix4], [AC_DEFINE([HAVE_NANOSLEEP], [1],
1580 [Some systems put nanosleep outside of libc])) 1576 [Some systems put nanosleep outside of libc])])
1581 1577
1582dnl Make sure prototypes are defined for these before using them. 1578dnl Make sure prototypes are defined for these before using them.
1583AC_CHECK_DECL(getrusage, [AC_CHECK_FUNCS(getrusage)]) 1579AC_CHECK_DECL([getrusage], [AC_CHECK_FUNCS([getrusage])])
1584AC_CHECK_DECL(strsep, 1580AC_CHECK_DECL([strsep],
1585 [AC_CHECK_FUNCS(strsep)], 1581 [AC_CHECK_FUNCS([strsep])],
1586 [], 1582 [],
1587 [ 1583 [
1588#ifdef HAVE_STRING_H 1584#ifdef HAVE_STRING_H
@@ -1591,21 +1587,21 @@ AC_CHECK_DECL(strsep,
1591 ]) 1587 ])
1592 1588
1593dnl tcsendbreak might be a macro 1589dnl tcsendbreak might be a macro
1594AC_CHECK_DECL(tcsendbreak, 1590AC_CHECK_DECL([tcsendbreak],
1595 [AC_DEFINE(HAVE_TCSENDBREAK)], 1591 [AC_DEFINE([HAVE_TCSENDBREAK])],
1596 [AC_CHECK_FUNCS(tcsendbreak)], 1592 [AC_CHECK_FUNCS([tcsendbreak])],
1597 [#include <termios.h>] 1593 [#include <termios.h>]
1598) 1594)
1599 1595
1600AC_CHECK_DECLS(h_errno, , ,[#include <netdb.h>]) 1596AC_CHECK_DECLS([h_errno], , ,[#include <netdb.h>])
1601 1597
1602AC_CHECK_DECLS(SHUT_RD, , , 1598AC_CHECK_DECLS([SHUT_RD], , ,
1603 [ 1599 [
1604#include <sys/types.h> 1600#include <sys/types.h>
1605#include <sys/socket.h> 1601#include <sys/socket.h>
1606 ]) 1602 ])
1607 1603
1608AC_CHECK_DECLS(O_NONBLOCK, , , 1604AC_CHECK_DECLS([O_NONBLOCK], , ,
1609 [ 1605 [
1610#include <sys/types.h> 1606#include <sys/types.h>
1611#ifdef HAVE_SYS_STAT_H 1607#ifdef HAVE_SYS_STAT_H
@@ -1616,90 +1612,104 @@ AC_CHECK_DECLS(O_NONBLOCK, , ,
1616#endif 1612#endif
1617 ]) 1613 ])
1618 1614
1619AC_CHECK_DECLS(writev, , , [ 1615AC_CHECK_DECLS([writev], , , [
1620#include <sys/types.h> 1616#include <sys/types.h>
1621#include <sys/uio.h> 1617#include <sys/uio.h>
1622#include <unistd.h> 1618#include <unistd.h>
1623 ]) 1619 ])
1624 1620
1625AC_CHECK_DECLS(MAXSYMLINKS, , , [ 1621AC_CHECK_DECLS([MAXSYMLINKS], , , [
1626#include <sys/param.h> 1622#include <sys/param.h>
1627 ]) 1623 ])
1628 1624
1629AC_CHECK_DECLS(offsetof, , , [ 1625AC_CHECK_DECLS([offsetof], , , [
1630#include <stddef.h> 1626#include <stddef.h>
1631 ]) 1627 ])
1632 1628
1633AC_CHECK_FUNCS(setresuid, [ 1629AC_CHECK_FUNCS([setresuid], [
1634 dnl Some platorms have setresuid that isn't implemented, test for this 1630 dnl Some platorms have setresuid that isn't implemented, test for this
1635 AC_MSG_CHECKING(if setresuid seems to work) 1631 AC_MSG_CHECKING([if setresuid seems to work])
1636 AC_RUN_IFELSE( 1632 AC_RUN_IFELSE(
1637 [AC_LANG_SOURCE([[ 1633 [AC_LANG_PROGRAM([[
1638#include <stdlib.h> 1634#include <stdlib.h>
1639#include <errno.h> 1635#include <errno.h>
1640int main(){errno=0; setresuid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} 1636 ]], [[
1637 errno=0;
1638 setresuid(0,0,0);
1639 if (errno==ENOSYS)
1640 exit(1);
1641 else
1642 exit(0);
1641 ]])], 1643 ]])],
1642 [AC_MSG_RESULT(yes)], 1644 [AC_MSG_RESULT([yes])],
1643 [AC_DEFINE(BROKEN_SETRESUID, 1, 1645 [AC_DEFINE([BROKEN_SETRESUID], [1],
1644 [Define if your setresuid() is broken]) 1646 [Define if your setresuid() is broken])
1645 AC_MSG_RESULT(not implemented)], 1647 AC_MSG_RESULT([not implemented])],
1646 [AC_MSG_WARN([cross compiling: not checking setresuid])] 1648 [AC_MSG_WARN([cross compiling: not checking setresuid])]
1647 ) 1649 )
1648]) 1650])
1649 1651
1650AC_CHECK_FUNCS(setresgid, [ 1652AC_CHECK_FUNCS([setresgid], [
1651 dnl Some platorms have setresgid that isn't implemented, test for this 1653 dnl Some platorms have setresgid that isn't implemented, test for this
1652 AC_MSG_CHECKING(if setresgid seems to work) 1654 AC_MSG_CHECKING([if setresgid seems to work])
1653 AC_RUN_IFELSE( 1655 AC_RUN_IFELSE(
1654 [AC_LANG_SOURCE([[ 1656 [AC_LANG_PROGRAM([[
1655#include <stdlib.h> 1657#include <stdlib.h>
1656#include <errno.h> 1658#include <errno.h>
1657int main(){errno=0; setresgid(0,0,0); if (errno==ENOSYS) exit(1); else exit(0);} 1659 ]], [[
1660 errno=0;
1661 setresgid(0,0,0);
1662 if (errno==ENOSYS)
1663 exit(1);
1664 else
1665 exit(0);
1658 ]])], 1666 ]])],
1659 [AC_MSG_RESULT(yes)], 1667 [AC_MSG_RESULT([yes])],
1660 [AC_DEFINE(BROKEN_SETRESGID, 1, 1668 [AC_DEFINE([BROKEN_SETRESGID], [1],
1661 [Define if your setresgid() is broken]) 1669 [Define if your setresgid() is broken])
1662 AC_MSG_RESULT(not implemented)], 1670 AC_MSG_RESULT([not implemented])],
1663 [AC_MSG_WARN([cross compiling: not checking setresuid])] 1671 [AC_MSG_WARN([cross compiling: not checking setresuid])]
1664 ) 1672 )
1665]) 1673])
1666 1674
1667dnl Checks for time functions 1675dnl Checks for time functions
1668AC_CHECK_FUNCS(gettimeofday time) 1676AC_CHECK_FUNCS([gettimeofday time])
1669dnl Checks for utmp functions 1677dnl Checks for utmp functions
1670AC_CHECK_FUNCS(endutent getutent getutid getutline pututline setutent) 1678AC_CHECK_FUNCS([endutent getutent getutid getutline pututline setutent])
1671AC_CHECK_FUNCS(utmpname) 1679AC_CHECK_FUNCS([utmpname])
1672dnl Checks for utmpx functions 1680dnl Checks for utmpx functions
1673AC_CHECK_FUNCS(endutxent getutxent getutxid getutxline getutxuser pututxline) 1681AC_CHECK_FUNCS([endutxent getutxent getutxid getutxline getutxuser pututxline])
1674AC_CHECK_FUNCS(setutxdb setutxent utmpxname) 1682AC_CHECK_FUNCS([setutxdb setutxent utmpxname])
1675dnl Checks for lastlog functions 1683dnl Checks for lastlog functions
1676AC_CHECK_FUNCS(getlastlogxbyname) 1684AC_CHECK_FUNCS([getlastlogxbyname])
1677 1685
1678AC_CHECK_FUNC(daemon, 1686AC_CHECK_FUNC([daemon],
1679 [AC_DEFINE(HAVE_DAEMON, 1, [Define if your libraries define daemon()])], 1687 [AC_DEFINE([HAVE_DAEMON], [1], [Define if your libraries define daemon()])],
1680 [AC_CHECK_LIB(bsd, daemon, 1688 [AC_CHECK_LIB([bsd], [daemon],
1681 [LIBS="$LIBS -lbsd"; AC_DEFINE(HAVE_DAEMON)])] 1689 [LIBS="$LIBS -lbsd"; AC_DEFINE([HAVE_DAEMON])])]
1682) 1690)
1683 1691
1684AC_CHECK_FUNC(getpagesize, 1692AC_CHECK_FUNC([getpagesize],
1685 [AC_DEFINE(HAVE_GETPAGESIZE, 1, 1693 [AC_DEFINE([HAVE_GETPAGESIZE], [1],
1686 [Define if your libraries define getpagesize()])], 1694 [Define if your libraries define getpagesize()])],
1687 [AC_CHECK_LIB(ucb, getpagesize, 1695 [AC_CHECK_LIB([ucb], [getpagesize],
1688 [LIBS="$LIBS -lucb"; AC_DEFINE(HAVE_GETPAGESIZE)])] 1696 [LIBS="$LIBS -lucb"; AC_DEFINE([HAVE_GETPAGESIZE])])]
1689) 1697)
1690 1698
1691# Check for broken snprintf 1699# Check for broken snprintf
1692if test "x$ac_cv_func_snprintf" = "xyes" ; then 1700if test "x$ac_cv_func_snprintf" = "xyes" ; then
1693 AC_MSG_CHECKING([whether snprintf correctly terminates long strings]) 1701 AC_MSG_CHECKING([whether snprintf correctly terminates long strings])
1694 AC_RUN_IFELSE( 1702 AC_RUN_IFELSE(
1695 [AC_LANG_SOURCE([[ 1703 [AC_LANG_PROGRAM([[ #include <stdio.h> ]],
1696#include <stdio.h> 1704 [[
1697int main(void){char b[5];snprintf(b,5,"123456789");exit(b[4]!='\0');} 1705 char b[5];
1706 snprintf(b,5,"123456789");
1707 exit(b[4]!='\0');
1698 ]])], 1708 ]])],
1699 [AC_MSG_RESULT(yes)], 1709 [AC_MSG_RESULT([yes])],
1700 [ 1710 [
1701 AC_MSG_RESULT(no) 1711 AC_MSG_RESULT([no])
1702 AC_DEFINE(BROKEN_SNPRINTF, 1, 1712 AC_DEFINE([BROKEN_SNPRINTF], [1],
1703 [Define if your snprintf is busted]) 1713 [Define if your snprintf is busted])
1704 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor]) 1714 AC_MSG_WARN([****** Your snprintf() function is broken, complain to your vendor])
1705 ], 1715 ],
@@ -1714,7 +1724,7 @@ if test "x$ac_cv_func_asprintf" != "xyes" && \
1714 test "x$ac_cv_func_vsnprintf" = "xyes" ; then 1724 test "x$ac_cv_func_vsnprintf" = "xyes" ; then
1715 AC_MSG_CHECKING([whether vsnprintf returns correct values on overflow]) 1725 AC_MSG_CHECKING([whether vsnprintf returns correct values on overflow])
1716 AC_RUN_IFELSE( 1726 AC_RUN_IFELSE(
1717 [AC_LANG_SOURCE([[ 1727 [AC_LANG_PROGRAM([[
1718#include <sys/types.h> 1728#include <sys/types.h>
1719#include <stdio.h> 1729#include <stdio.h>
1720#include <stdarg.h> 1730#include <stdarg.h>
@@ -1725,15 +1735,14 @@ int x_snprintf(char *str,size_t count,const char *fmt,...)
1725 va_start(ap, fmt); ret = vsnprintf(str, count, fmt, ap); va_end(ap); 1735 va_start(ap, fmt); ret = vsnprintf(str, count, fmt, ap); va_end(ap);
1726 return ret; 1736 return ret;
1727} 1737}
1728int main(void) 1738 ]], [[
1729{
1730 char x[1]; 1739 char x[1];
1731 exit(x_snprintf(x, 1, "%s %d", "hello", 12345) == 11 ? 0 : 1); 1740 exit(x_snprintf(x, 1, "%s %d", "hello", 12345) == 11 ? 0 : 1);
1732} ]])], 1741 ]])],
1733 [AC_MSG_RESULT(yes)], 1742 [AC_MSG_RESULT([yes])],
1734 [ 1743 [
1735 AC_MSG_RESULT(no) 1744 AC_MSG_RESULT([no])
1736 AC_DEFINE(BROKEN_SNPRINTF, 1, 1745 AC_DEFINE([BROKEN_SNPRINTF], [1],
1737 [Define if your snprintf is busted]) 1746 [Define if your snprintf is busted])
1738 AC_MSG_WARN([****** Your vsnprintf() function is broken, complain to your vendor]) 1747 AC_MSG_WARN([****** Your vsnprintf() function is broken, complain to your vendor])
1739 ], 1748 ],
@@ -1745,71 +1754,69 @@ fi
1745# check that the fmt argument is const char * or just char *. 1754# check that the fmt argument is const char * or just char *.
1746# This is only useful for when BROKEN_SNPRINTF 1755# This is only useful for when BROKEN_SNPRINTF
1747AC_MSG_CHECKING([whether snprintf can declare const char *fmt]) 1756AC_MSG_CHECKING([whether snprintf can declare const char *fmt])
1748AC_COMPILE_IFELSE([AC_LANG_SOURCE([[#include <stdio.h> 1757AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1749 int snprintf(char *a, size_t b, const char *c, ...) { return 0; } 1758#include <stdio.h>
1750 int main(void) { snprintf(0, 0, 0); } 1759int snprintf(char *a, size_t b, const char *c, ...) { return 0; }
1751 ]])], 1760 ]], [[
1752 [AC_MSG_RESULT(yes) 1761 snprintf(0, 0, 0);
1753 AC_DEFINE(SNPRINTF_CONST, [const], 1762 ]])],
1763 [AC_MSG_RESULT([yes])
1764 AC_DEFINE([SNPRINTF_CONST], [const],
1754 [Define as const if snprintf() can declare const char *fmt])], 1765 [Define as const if snprintf() can declare const char *fmt])],
1755 [AC_MSG_RESULT(no) 1766 [AC_MSG_RESULT([no])
1756 AC_DEFINE(SNPRINTF_CONST, [/* not const */])]) 1767 AC_DEFINE([SNPRINTF_CONST], [/* not const */])])
1757 1768
1758# Check for missing getpeereid (or equiv) support 1769# Check for missing getpeereid (or equiv) support
1759NO_PEERCHECK="" 1770NO_PEERCHECK=""
1760if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then 1771if test "x$ac_cv_func_getpeereid" != "xyes" -a "x$ac_cv_func_getpeerucred" != "xyes"; then
1761 AC_MSG_CHECKING([whether system supports SO_PEERCRED getsockopt]) 1772 AC_MSG_CHECKING([whether system supports SO_PEERCRED getsockopt])
1762 AC_TRY_COMPILE( 1773 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
1763 [#include <sys/types.h> 1774#include <sys/types.h>
1764 #include <sys/socket.h>], 1775#include <sys/socket.h>]], [[int i = SO_PEERCRED;]])],
1765 [int i = SO_PEERCRED;], 1776 [ AC_MSG_RESULT([yes])
1766 [ AC_MSG_RESULT(yes) 1777 AC_DEFINE([HAVE_SO_PEERCRED], [1], [Have PEERCRED socket option])
1767 AC_DEFINE(HAVE_SO_PEERCRED, 1, [Have PEERCRED socket option]) 1778 ], [AC_MSG_RESULT([no])
1768 ], 1779 NO_PEERCHECK=1
1769 [AC_MSG_RESULT(no) 1780 ])
1770 NO_PEERCHECK=1]
1771 )
1772fi 1781fi
1773 1782
1774dnl see whether mkstemp() requires XXXXXX 1783dnl see whether mkstemp() requires XXXXXX
1775if test "x$ac_cv_func_mkdtemp" = "xyes" ; then 1784if test "x$ac_cv_func_mkdtemp" = "xyes" ; then
1776AC_MSG_CHECKING([for (overly) strict mkstemp]) 1785AC_MSG_CHECKING([for (overly) strict mkstemp])
1777AC_RUN_IFELSE( 1786AC_RUN_IFELSE(
1778 [AC_LANG_SOURCE([[ 1787 [AC_LANG_PROGRAM([[
1779#include <stdlib.h> 1788#include <stdlib.h>
1780main() { char template[]="conftest.mkstemp-test"; 1789 ]], [[
1781if (mkstemp(template) == -1) 1790 char template[]="conftest.mkstemp-test";
1782 exit(1); 1791 if (mkstemp(template) == -1)
1783unlink(template); exit(0); 1792 exit(1);
1784} 1793 unlink(template);
1794 exit(0);
1785 ]])], 1795 ]])],
1786 [ 1796 [
1787 AC_MSG_RESULT(no) 1797 AC_MSG_RESULT([no])
1788 ], 1798 ],
1789 [ 1799 [
1790 AC_MSG_RESULT(yes) 1800 AC_MSG_RESULT([yes])
1791 AC_DEFINE(HAVE_STRICT_MKSTEMP, 1, [Silly mkstemp()]) 1801 AC_DEFINE([HAVE_STRICT_MKSTEMP], [1], [Silly mkstemp()])
1792 ], 1802 ],
1793 [ 1803 [
1794 AC_MSG_RESULT(yes) 1804 AC_MSG_RESULT([yes])
1795 AC_DEFINE(HAVE_STRICT_MKSTEMP) 1805 AC_DEFINE([HAVE_STRICT_MKSTEMP])
1796 ] 1806 ]
1797) 1807)
1798fi 1808fi
1799 1809
1800dnl make sure that openpty does not reacquire controlling terminal 1810dnl make sure that openpty does not reacquire controlling terminal
1801if test ! -z "$check_for_openpty_ctty_bug"; then 1811if test ! -z "$check_for_openpty_ctty_bug"; then
1802 AC_MSG_CHECKING(if openpty correctly handles controlling tty) 1812 AC_MSG_CHECKING([if openpty correctly handles controlling tty])
1803 AC_RUN_IFELSE( 1813 AC_RUN_IFELSE(
1804 [AC_LANG_SOURCE([[ 1814 [AC_LANG_PROGRAM([[
1805#include <stdio.h> 1815#include <stdio.h>
1806#include <sys/fcntl.h> 1816#include <sys/fcntl.h>
1807#include <sys/types.h> 1817#include <sys/types.h>
1808#include <sys/wait.h> 1818#include <sys/wait.h>
1809 1819 ]], [[
1810int
1811main()
1812{
1813 pid_t pid; 1820 pid_t pid;
1814 int fd, ptyfd, ttyfd, status; 1821 int fd, ptyfd, ttyfd, status;
1815 1822
@@ -1832,26 +1839,25 @@ main()
1832 else 1839 else
1833 exit(0); /* Did not acquire ctty: OK */ 1840 exit(0); /* Did not acquire ctty: OK */
1834 } 1841 }
1835}
1836 ]])], 1842 ]])],
1837 [ 1843 [
1838 AC_MSG_RESULT(yes) 1844 AC_MSG_RESULT([yes])
1839 ], 1845 ],
1840 [ 1846 [
1841 AC_MSG_RESULT(no) 1847 AC_MSG_RESULT([no])
1842 AC_DEFINE(SSHD_ACQUIRES_CTTY) 1848 AC_DEFINE([SSHD_ACQUIRES_CTTY])
1843 ], 1849 ],
1844 [ 1850 [
1845 AC_MSG_RESULT(cross-compiling, assuming yes) 1851 AC_MSG_RESULT([cross-compiling, assuming yes])
1846 ] 1852 ]
1847 ) 1853 )
1848fi 1854fi
1849 1855
1850if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ 1856if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
1851 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then 1857 test "x$check_for_hpux_broken_getaddrinfo" = "x1"; then
1852 AC_MSG_CHECKING(if getaddrinfo seems to work) 1858 AC_MSG_CHECKING([if getaddrinfo seems to work])
1853 AC_RUN_IFELSE( 1859 AC_RUN_IFELSE(
1854 [AC_LANG_SOURCE([[ 1860 [AC_LANG_PROGRAM([[
1855#include <stdio.h> 1861#include <stdio.h>
1856#include <sys/socket.h> 1862#include <sys/socket.h>
1857#include <netdb.h> 1863#include <netdb.h>
@@ -1859,10 +1865,7 @@ if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
1859#include <netinet/in.h> 1865#include <netinet/in.h>
1860 1866
1861#define TEST_PORT "2222" 1867#define TEST_PORT "2222"
1862 1868 ]], [[
1863int
1864main(void)
1865{
1866 int err, sock; 1869 int err, sock;
1867 struct addrinfo *gai_ai, *ai, hints; 1870 struct addrinfo *gai_ai, *ai, hints;
1868 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL; 1871 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
@@ -1904,26 +1907,25 @@ main(void)
1904 } 1907 }
1905 } 1908 }
1906 exit(0); 1909 exit(0);
1907}
1908 ]])], 1910 ]])],
1909 [ 1911 [
1910 AC_MSG_RESULT(yes) 1912 AC_MSG_RESULT([yes])
1911 ], 1913 ],
1912 [ 1914 [
1913 AC_MSG_RESULT(no) 1915 AC_MSG_RESULT([no])
1914 AC_DEFINE(BROKEN_GETADDRINFO) 1916 AC_DEFINE([BROKEN_GETADDRINFO])
1915 ], 1917 ],
1916 [ 1918 [
1917 AC_MSG_RESULT(cross-compiling, assuming yes) 1919 AC_MSG_RESULT([cross-compiling, assuming yes])
1918 ] 1920 ]
1919 ) 1921 )
1920fi 1922fi
1921 1923
1922if test "x$ac_cv_func_getaddrinfo" = "xyes" && \ 1924if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
1923 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then 1925 test "x$check_for_aix_broken_getaddrinfo" = "x1"; then
1924 AC_MSG_CHECKING(if getaddrinfo seems to work) 1926 AC_MSG_CHECKING([if getaddrinfo seems to work])
1925 AC_RUN_IFELSE( 1927 AC_RUN_IFELSE(
1926 [AC_LANG_SOURCE([[ 1928 [AC_LANG_PROGRAM([[
1927#include <stdio.h> 1929#include <stdio.h>
1928#include <sys/socket.h> 1930#include <sys/socket.h>
1929#include <netdb.h> 1931#include <netdb.h>
@@ -1931,10 +1933,7 @@ if test "x$ac_cv_func_getaddrinfo" = "xyes" && \
1931#include <netinet/in.h> 1933#include <netinet/in.h>
1932 1934
1933#define TEST_PORT "2222" 1935#define TEST_PORT "2222"
1934 1936 ]], [[
1935int
1936main(void)
1937{
1938 int err, sock; 1937 int err, sock;
1939 struct addrinfo *gai_ai, *ai, hints; 1938 struct addrinfo *gai_ai, *ai, hints;
1940 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL; 1939 char ntop[NI_MAXHOST], strport[NI_MAXSERV], *name = NULL;
@@ -1964,37 +1963,33 @@ main(void)
1964 } 1963 }
1965 } 1964 }
1966 exit(0); 1965 exit(0);
1967}
1968 ]])], 1966 ]])],
1969 [ 1967 [
1970 AC_MSG_RESULT(yes) 1968 AC_MSG_RESULT([yes])
1971 AC_DEFINE(AIX_GETNAMEINFO_HACK, 1, 1969 AC_DEFINE([AIX_GETNAMEINFO_HACK], [1],
1972 [Define if you have a getaddrinfo that fails 1970 [Define if you have a getaddrinfo that fails
1973 for the all-zeros IPv6 address]) 1971 for the all-zeros IPv6 address])
1974 ], 1972 ],
1975 [ 1973 [
1976 AC_MSG_RESULT(no) 1974 AC_MSG_RESULT([no])
1977 AC_DEFINE(BROKEN_GETADDRINFO) 1975 AC_DEFINE([BROKEN_GETADDRINFO])
1978 ], 1976 ],
1979 [ 1977 [
1980 AC_MSG_RESULT(cross-compiling, assuming no) 1978 AC_MSG_RESULT([cross-compiling, assuming no])
1981 ] 1979 ]
1982 ) 1980 )
1983fi 1981fi
1984 1982
1985if test "x$check_for_conflicting_getspnam" = "x1"; then 1983if test "x$check_for_conflicting_getspnam" = "x1"; then
1986 AC_MSG_CHECKING(for conflicting getspnam in shadow.h) 1984 AC_MSG_CHECKING([for conflicting getspnam in shadow.h])
1987 AC_COMPILE_IFELSE( 1985 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <shadow.h> ]],
1986 [[ exit(0); ]])],
1988 [ 1987 [
1989#include <shadow.h> 1988 AC_MSG_RESULT([no])
1990int main(void) {exit(0);}
1991 ],
1992 [
1993 AC_MSG_RESULT(no)
1994 ], 1989 ],
1995 [ 1990 [
1996 AC_MSG_RESULT(yes) 1991 AC_MSG_RESULT([yes])
1997 AC_DEFINE(GETSPNAM_CONFLICTING_DEFS, 1, 1992 AC_DEFINE([GETSPNAM_CONFLICTING_DEFS], [1],
1998 [Conflicting defs for getspnam]) 1993 [Conflicting defs for getspnam])
1999 ] 1994 ]
2000 ) 1995 )
@@ -2005,7 +2000,7 @@ AC_FUNC_GETPGRP
2005# Search for OpenSSL 2000# Search for OpenSSL
2006saved_CPPFLAGS="$CPPFLAGS" 2001saved_CPPFLAGS="$CPPFLAGS"
2007saved_LDFLAGS="$LDFLAGS" 2002saved_LDFLAGS="$LDFLAGS"
2008AC_ARG_WITH(ssl-dir, 2003AC_ARG_WITH([ssl-dir],
2009 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ], 2004 [ --with-ssl-dir=PATH Specify path to OpenSSL installation ],
2010 [ 2005 [
2011 if test "x$withval" != "xno" ; then 2006 if test "x$withval" != "xno" ; then
@@ -2041,9 +2036,9 @@ AC_ARG_WITH(ssl-dir,
2041 ] 2036 ]
2042) 2037)
2043LIBS="-lcrypto $LIBS" 2038LIBS="-lcrypto $LIBS"
2044AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL, 1, 2039AC_TRY_LINK_FUNC([RAND_add], [AC_DEFINE([HAVE_OPENSSL], [1],
2045 [Define if your ssl headers are included 2040 [Define if your ssl headers are included
2046 with #include <openssl/header.h>]), 2041 with #include <openssl/header.h>])],
2047 [ 2042 [
2048 dnl Check default openssl install dir 2043 dnl Check default openssl install dir
2049 if test -n "${need_dash_r}"; then 2044 if test -n "${need_dash_r}"; then
@@ -2053,8 +2048,8 @@ AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL, 1,
2053 fi 2048 fi
2054 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}" 2049 CPPFLAGS="-I/usr/local/ssl/include ${saved_CPPFLAGS}"
2055 AC_CHECK_HEADER([openssl/opensslv.h], , 2050 AC_CHECK_HEADER([openssl/opensslv.h], ,
2056 AC_MSG_ERROR([*** OpenSSL headers missing - please install first or check config.log ***])) 2051 [AC_MSG_ERROR([*** OpenSSL headers missing - please install first or check config.log ***])])
2057 AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL), 2052 AC_TRY_LINK_FUNC([RAND_add], [AC_DEFINE([HAVE_OPENSSL])],
2058 [ 2053 [
2059 AC_MSG_ERROR([*** Can't find recent OpenSSL libcrypto (see config.log for details) ***]) 2054 AC_MSG_ERROR([*** Can't find recent OpenSSL libcrypto (see config.log for details) ***])
2060 ] 2055 ]
@@ -2065,12 +2060,12 @@ AC_TRY_LINK_FUNC(RAND_add, AC_DEFINE(HAVE_OPENSSL, 1,
2065# Determine OpenSSL header version 2060# Determine OpenSSL header version
2066AC_MSG_CHECKING([OpenSSL header version]) 2061AC_MSG_CHECKING([OpenSSL header version])
2067AC_RUN_IFELSE( 2062AC_RUN_IFELSE(
2068 [AC_LANG_SOURCE([[ 2063 [AC_LANG_PROGRAM([[
2069#include <stdio.h> 2064#include <stdio.h>
2070#include <string.h> 2065#include <string.h>
2071#include <openssl/opensslv.h> 2066#include <openssl/opensslv.h>
2072#define DATA "conftest.sslincver" 2067#define DATA "conftest.sslincver"
2073int main(void) { 2068 ]], [[
2074 FILE *fd; 2069 FILE *fd;
2075 int rc; 2070 int rc;
2076 2071
@@ -2082,15 +2077,14 @@ int main(void) {
2082 exit(1); 2077 exit(1);
2083 2078
2084 exit(0); 2079 exit(0);
2085}
2086 ]])], 2080 ]])],
2087 [ 2081 [
2088 ssl_header_ver=`cat conftest.sslincver` 2082 ssl_header_ver=`cat conftest.sslincver`
2089 AC_MSG_RESULT($ssl_header_ver) 2083 AC_MSG_RESULT([$ssl_header_ver])
2090 ], 2084 ],
2091 [ 2085 [
2092 AC_MSG_RESULT(not found) 2086 AC_MSG_RESULT([not found])
2093 AC_MSG_ERROR(OpenSSL version header not found.) 2087 AC_MSG_ERROR([OpenSSL version header not found.])
2094 ], 2088 ],
2095 [ 2089 [
2096 AC_MSG_WARN([cross compiling: not checking]) 2090 AC_MSG_WARN([cross compiling: not checking])
@@ -2100,13 +2094,13 @@ int main(void) {
2100# Determine OpenSSL library version 2094# Determine OpenSSL library version
2101AC_MSG_CHECKING([OpenSSL library version]) 2095AC_MSG_CHECKING([OpenSSL library version])
2102AC_RUN_IFELSE( 2096AC_RUN_IFELSE(
2103 [AC_LANG_SOURCE([[ 2097 [AC_LANG_PROGRAM([[
2104#include <stdio.h> 2098#include <stdio.h>
2105#include <string.h> 2099#include <string.h>
2106#include <openssl/opensslv.h> 2100#include <openssl/opensslv.h>
2107#include <openssl/crypto.h> 2101#include <openssl/crypto.h>
2108#define DATA "conftest.ssllibver" 2102#define DATA "conftest.ssllibver"
2109int main(void) { 2103 ]], [[
2110 FILE *fd; 2104 FILE *fd;
2111 int rc; 2105 int rc;
2112 2106
@@ -2118,22 +2112,21 @@ int main(void) {
2118 exit(1); 2112 exit(1);
2119 2113
2120 exit(0); 2114 exit(0);
2121}
2122 ]])], 2115 ]])],
2123 [ 2116 [
2124 ssl_library_ver=`cat conftest.ssllibver` 2117 ssl_library_ver=`cat conftest.ssllibver`
2125 AC_MSG_RESULT($ssl_library_ver) 2118 AC_MSG_RESULT([$ssl_library_ver])
2126 ], 2119 ],
2127 [ 2120 [
2128 AC_MSG_RESULT(not found) 2121 AC_MSG_RESULT([not found])
2129 AC_MSG_ERROR(OpenSSL library not found.) 2122 AC_MSG_ERROR([OpenSSL library not found.])
2130 ], 2123 ],
2131 [ 2124 [
2132 AC_MSG_WARN([cross compiling: not checking]) 2125 AC_MSG_WARN([cross compiling: not checking])
2133 ] 2126 ]
2134) 2127)
2135 2128
2136AC_ARG_WITH(openssl-header-check, 2129AC_ARG_WITH([openssl-header-check],
2137 [ --without-openssl-header-check Disable OpenSSL version consistency check], 2130 [ --without-openssl-header-check Disable OpenSSL version consistency check],
2138 [ if test "x$withval" = "xno" ; then 2131 [ if test "x$withval" = "xno" ; then
2139 openssl_check_nonfatal=1 2132 openssl_check_nonfatal=1
@@ -2144,16 +2137,17 @@ AC_ARG_WITH(openssl-header-check,
2144# Sanity check OpenSSL headers 2137# Sanity check OpenSSL headers
2145AC_MSG_CHECKING([whether OpenSSL's headers match the library]) 2138AC_MSG_CHECKING([whether OpenSSL's headers match the library])
2146AC_RUN_IFELSE( 2139AC_RUN_IFELSE(
2147 [AC_LANG_SOURCE([[ 2140 [AC_LANG_PROGRAM([[
2148#include <string.h> 2141#include <string.h>
2149#include <openssl/opensslv.h> 2142#include <openssl/opensslv.h>
2150int main(void) { exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1); } 2143 ]], [[
2144 exit(SSLeay() == OPENSSL_VERSION_NUMBER ? 0 : 1);
2151 ]])], 2145 ]])],
2152 [ 2146 [
2153 AC_MSG_RESULT(yes) 2147 AC_MSG_RESULT([yes])
2154 ], 2148 ],
2155 [ 2149 [
2156 AC_MSG_RESULT(no) 2150 AC_MSG_RESULT([no])
2157 if test "x$openssl_check_nonfatal" = "x"; then 2151 if test "x$openssl_check_nonfatal" = "x"; then
2158 AC_MSG_ERROR([Your OpenSSL headers do not match your 2152 AC_MSG_ERROR([Your OpenSSL headers do not match your
2159library. Check config.log for details. 2153library. Check config.log for details.
@@ -2174,85 +2168,84 @@ Also see contrib/findssl.sh for help identifying header/library mismatches.])
2174 2168
2175AC_MSG_CHECKING([if programs using OpenSSL functions will link]) 2169AC_MSG_CHECKING([if programs using OpenSSL functions will link])
2176AC_LINK_IFELSE( 2170AC_LINK_IFELSE(
2177 [AC_LANG_SOURCE([[ 2171 [AC_LANG_PROGRAM([[ #include <openssl/evp.h> ]],
2178#include <openssl/evp.h> 2172 [[ SSLeay_add_all_algorithms(); ]])],
2179int main(void) { SSLeay_add_all_algorithms(); }
2180 ]])],
2181 [ 2173 [
2182 AC_MSG_RESULT(yes) 2174 AC_MSG_RESULT([yes])
2183 ], 2175 ],
2184 [ 2176 [
2185 AC_MSG_RESULT(no) 2177 AC_MSG_RESULT([no])
2186 saved_LIBS="$LIBS" 2178 saved_LIBS="$LIBS"
2187 LIBS="$LIBS -ldl" 2179 LIBS="$LIBS -ldl"
2188 AC_MSG_CHECKING([if programs using OpenSSL need -ldl]) 2180 AC_MSG_CHECKING([if programs using OpenSSL need -ldl])
2189 AC_LINK_IFELSE( 2181 AC_LINK_IFELSE(
2190 [AC_LANG_SOURCE([[ 2182 [AC_LANG_PROGRAM([[ #include <openssl/evp.h> ]],
2191#include <openssl/evp.h> 2183 [[ SSLeay_add_all_algorithms(); ]])],
2192int main(void) { SSLeay_add_all_algorithms(); }
2193 ]])],
2194 [ 2184 [
2195 AC_MSG_RESULT(yes) 2185 AC_MSG_RESULT([yes])
2196 ], 2186 ],
2197 [ 2187 [
2198 AC_MSG_RESULT(no) 2188 AC_MSG_RESULT([no])
2199 LIBS="$saved_LIBS" 2189 LIBS="$saved_LIBS"
2200 ] 2190 ]
2201 ) 2191 )
2202 ] 2192 ]
2203) 2193)
2204 2194
2205AC_CHECK_FUNCS(RSA_generate_key_ex DSA_generate_parameters_ex BN_is_prime_ex RSA_get_default_method) 2195AC_CHECK_FUNCS([RSA_generate_key_ex DSA_generate_parameters_ex BN_is_prime_ex RSA_get_default_method])
2206 2196
2207AC_ARG_WITH(ssl-engine, 2197AC_ARG_WITH([ssl-engine],
2208 [ --with-ssl-engine Enable OpenSSL (hardware) ENGINE support ], 2198 [ --with-ssl-engine Enable OpenSSL (hardware) ENGINE support ],
2209 [ if test "x$withval" != "xno" ; then 2199 [ if test "x$withval" != "xno" ; then
2210 AC_MSG_CHECKING(for OpenSSL ENGINE support) 2200 AC_MSG_CHECKING([for OpenSSL ENGINE support])
2211 AC_TRY_COMPILE( 2201 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2212 [ #include <openssl/engine.h>], 2202#include <openssl/engine.h>
2213 [ 2203 ]], [[
2214ENGINE_load_builtin_engines();ENGINE_register_all_complete(); 2204 ENGINE_load_builtin_engines();
2215 ], 2205 ENGINE_register_all_complete();
2216 [ AC_MSG_RESULT(yes) 2206 ]])],
2217 AC_DEFINE(USE_OPENSSL_ENGINE, 1, 2207 [ AC_MSG_RESULT([yes])
2208 AC_DEFINE([USE_OPENSSL_ENGINE], [1],
2218 [Enable OpenSSL engine support]) 2209 [Enable OpenSSL engine support])
2219 ], 2210 ], [ AC_MSG_ERROR([OpenSSL ENGINE support not found])
2220 [ AC_MSG_ERROR(OpenSSL ENGINE support not found)] 2211 ])
2221 )
2222 fi ] 2212 fi ]
2223) 2213)
2224 2214
2225# Check for OpenSSL without EVP_aes_{192,256}_cbc 2215# Check for OpenSSL without EVP_aes_{192,256}_cbc
2226AC_MSG_CHECKING([whether OpenSSL has crippled AES support]) 2216AC_MSG_CHECKING([whether OpenSSL has crippled AES support])
2227AC_LINK_IFELSE( 2217AC_LINK_IFELSE(
2228 [AC_LANG_SOURCE([[ 2218 [AC_LANG_PROGRAM([[
2229#include <string.h> 2219#include <string.h>
2230#include <openssl/evp.h> 2220#include <openssl/evp.h>
2231int main(void) { exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);} 2221 ]], [[
2222 exit(EVP_aes_192_cbc() == NULL || EVP_aes_256_cbc() == NULL);
2232 ]])], 2223 ]])],
2233 [ 2224 [
2234 AC_MSG_RESULT(no) 2225 AC_MSG_RESULT([no])
2235 ], 2226 ],
2236 [ 2227 [
2237 AC_MSG_RESULT(yes) 2228 AC_MSG_RESULT([yes])
2238 AC_DEFINE(OPENSSL_LOBOTOMISED_AES, 1, 2229 AC_DEFINE([OPENSSL_LOBOTOMISED_AES], [1],
2239 [libcrypto is missing AES 192 and 256 bit functions]) 2230 [libcrypto is missing AES 192 and 256 bit functions])
2240 ] 2231 ]
2241) 2232)
2242 2233
2243AC_MSG_CHECKING([if EVP_DigestUpdate returns an int]) 2234AC_MSG_CHECKING([if EVP_DigestUpdate returns an int])
2244AC_LINK_IFELSE( 2235AC_LINK_IFELSE(
2245 [AC_LANG_SOURCE([[ 2236 [AC_LANG_PROGRAM([[
2246#include <string.h> 2237#include <string.h>
2247#include <openssl/evp.h> 2238#include <openssl/evp.h>
2248int main(void) { if(EVP_DigestUpdate(NULL, NULL,0)) exit(0); } 2239 ]], [[
2240 if(EVP_DigestUpdate(NULL, NULL,0))
2241 exit(0);
2249 ]])], 2242 ]])],
2250 [ 2243 [
2251 AC_MSG_RESULT(yes) 2244 AC_MSG_RESULT([yes])
2252 ], 2245 ],
2253 [ 2246 [
2254 AC_MSG_RESULT(no) 2247 AC_MSG_RESULT([no])
2255 AC_DEFINE(OPENSSL_EVP_DIGESTUPDATE_VOID, 1, 2248 AC_DEFINE([OPENSSL_EVP_DIGESTUPDATE_VOID], [1],
2256 [Define if EVP_DigestUpdate returns void]) 2249 [Define if EVP_DigestUpdate returns void])
2257 ] 2250 ]
2258) 2251)
@@ -2260,24 +2253,24 @@ int main(void) { if(EVP_DigestUpdate(NULL, NULL,0)) exit(0); }
2260# Some systems want crypt() from libcrypt, *not* the version in OpenSSL, 2253# Some systems want crypt() from libcrypt, *not* the version in OpenSSL,
2261# because the system crypt() is more featureful. 2254# because the system crypt() is more featureful.
2262if test "x$check_for_libcrypt_before" = "x1"; then 2255if test "x$check_for_libcrypt_before" = "x1"; then
2263 AC_CHECK_LIB(crypt, crypt) 2256 AC_CHECK_LIB([crypt], [crypt])
2264fi 2257fi
2265 2258
2266# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the 2259# Some Linux systems (Slackware) need crypt() from libcrypt, *not* the
2267# version in OpenSSL. 2260# version in OpenSSL.
2268if test "x$check_for_libcrypt_later" = "x1"; then 2261if test "x$check_for_libcrypt_later" = "x1"; then
2269 AC_CHECK_LIB(crypt, crypt, LIBS="$LIBS -lcrypt") 2262 AC_CHECK_LIB([crypt], [crypt], [LIBS="$LIBS -lcrypt"])
2270fi 2263fi
2271 2264
2272# Search for SHA256 support in libc and/or OpenSSL 2265# Search for SHA256 support in libc and/or OpenSSL
2273AC_CHECK_FUNCS(SHA256_Update EVP_sha256, [TEST_SSH_SHA256=yes], 2266AC_CHECK_FUNCS([SHA256_Update EVP_sha256], [TEST_SSH_SHA256=yes],
2274 [TEST_SSH_SHA256=no]) 2267 [TEST_SSH_SHA256=no])
2275AC_SUBST(TEST_SSH_SHA256) 2268AC_SUBST([TEST_SSH_SHA256])
2276 2269
2277# Check complete ECC support in OpenSSL 2270# Check complete ECC support in OpenSSL
2278AC_MSG_CHECKING([whether OpenSSL has complete ECC support]) 2271AC_MSG_CHECKING([whether OpenSSL has complete ECC support])
2279AC_LINK_IFELSE( 2272AC_LINK_IFELSE(
2280 [AC_LANG_SOURCE([[ 2273 [AC_LANG_PROGRAM([[
2281#include <openssl/ec.h> 2274#include <openssl/ec.h>
2282#include <openssl/ecdh.h> 2275#include <openssl/ecdh.h>
2283#include <openssl/ecdsa.h> 2276#include <openssl/ecdsa.h>
@@ -2287,32 +2280,31 @@ AC_LINK_IFELSE(
2287#if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */ 2280#if OPENSSL_VERSION_NUMBER < 0x0090807f /* 0.9.8g */
2288# error "OpenSSL < 0.9.8g has unreliable ECC code" 2281# error "OpenSSL < 0.9.8g has unreliable ECC code"
2289#endif 2282#endif
2290int main(void) { 2283 ]], [[
2291 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1); 2284 EC_KEY *e = EC_KEY_new_by_curve_name(NID_secp521r1);
2292 const EVP_MD *m = EVP_sha512(); /* We need this too */ 2285 const EVP_MD *m = EVP_sha512(); /* We need this too */
2293}
2294 ]])], 2286 ]])],
2295 [ 2287 [
2296 AC_MSG_RESULT(yes) 2288 AC_MSG_RESULT([yes])
2297 AC_DEFINE(OPENSSL_HAS_ECC, 1, 2289 AC_DEFINE([OPENSSL_HAS_ECC], [1],
2298 [libcrypto includes complete ECC support]) 2290 [libcrypto includes complete ECC support])
2299 TEST_SSH_ECC=yes 2291 TEST_SSH_ECC=yes
2300 COMMENT_OUT_ECC="" 2292 COMMENT_OUT_ECC=""
2301 ], 2293 ],
2302 [ 2294 [
2303 AC_MSG_RESULT(no) 2295 AC_MSG_RESULT([no])
2304 TEST_SSH_ECC=no 2296 TEST_SSH_ECC=no
2305 COMMENT_OUT_ECC="#no ecc#" 2297 COMMENT_OUT_ECC="#no ecc#"
2306 ] 2298 ]
2307) 2299)
2308AC_SUBST(TEST_SSH_ECC) 2300AC_SUBST([TEST_SSH_ECC])
2309AC_SUBST(COMMENT_OUT_ECC) 2301AC_SUBST([COMMENT_OUT_ECC])
2310 2302
2311saved_LIBS="$LIBS" 2303saved_LIBS="$LIBS"
2312AC_CHECK_LIB(iaf, ia_openinfo, [ 2304AC_CHECK_LIB([iaf], [ia_openinfo], [
2313 LIBS="$LIBS -liaf" 2305 LIBS="$LIBS -liaf"
2314 AC_CHECK_FUNCS(set_id, [SSHDLIBS="$SSHDLIBS -liaf" 2306 AC_CHECK_FUNCS([set_id], [SSHDLIBS="$SSHDLIBS -liaf"
2315 AC_DEFINE(HAVE_LIBIAF, 1, 2307 AC_DEFINE([HAVE_LIBIAF], [1],
2316 [Define if system has libiaf that supports set_id]) 2308 [Define if system has libiaf that supports set_id])
2317 ]) 2309 ])
2318]) 2310])
@@ -2323,128 +2315,29 @@ LIBS="$saved_LIBS"
2323# Check wheter OpenSSL seeds itself 2315# Check wheter OpenSSL seeds itself
2324AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded]) 2316AC_MSG_CHECKING([whether OpenSSL's PRNG is internally seeded])
2325AC_RUN_IFELSE( 2317AC_RUN_IFELSE(
2326 [AC_LANG_SOURCE([[ 2318 [AC_LANG_PROGRAM([[
2327#include <string.h> 2319#include <string.h>
2328#include <openssl/rand.h> 2320#include <openssl/rand.h>
2329int main(void) { exit(RAND_status() == 1 ? 0 : 1); } 2321 ]], [[
2322 exit(RAND_status() == 1 ? 0 : 1);
2330 ]])], 2323 ]])],
2331 [ 2324 [
2332 OPENSSL_SEEDS_ITSELF=yes 2325 OPENSSL_SEEDS_ITSELF=yes
2333 AC_MSG_RESULT(yes) 2326 AC_MSG_RESULT([yes])
2334 ], 2327 ],
2335 [ 2328 [
2336 AC_MSG_RESULT(no) 2329 AC_MSG_RESULT([no])
2337 # Default to use of the rand helper if OpenSSL doesn't
2338 # seed itself
2339 USE_RAND_HELPER=yes
2340 ], 2330 ],
2341 [ 2331 [
2342 AC_MSG_WARN([cross compiling: assuming yes]) 2332 AC_MSG_WARN([cross compiling: assuming yes])
2343 # This is safe, since all recent OpenSSL versions will 2333 # This is safe, since we will fatal() at runtime if
2344 # complain at runtime if not seeded correctly. 2334 # OpenSSL is not seeded correctly.
2345 OPENSSL_SEEDS_ITSELF=yes 2335 OPENSSL_SEEDS_ITSELF=yes
2346 ] 2336 ]
2347) 2337)
2348 2338
2349# Check for PAM libs
2350PAM_MSG="no"
2351AC_ARG_WITH(pam,
2352 [ --with-pam Enable PAM support ],
2353 [
2354 if test "x$withval" != "xno" ; then
2355 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
2356 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
2357 AC_MSG_ERROR([PAM headers not found])
2358 fi
2359
2360 saved_LIBS="$LIBS"
2361 AC_CHECK_LIB(dl, dlopen, , )
2362 AC_CHECK_LIB(pam, pam_set_item, , AC_MSG_ERROR([*** libpam missing]))
2363 AC_CHECK_FUNCS(pam_getenvlist)
2364 AC_CHECK_FUNCS(pam_putenv)
2365 LIBS="$saved_LIBS"
2366
2367 PAM_MSG="yes"
2368
2369 SSHDLIBS="$SSHDLIBS -lpam"
2370 AC_DEFINE(USE_PAM, 1,
2371 [Define if you want to enable PAM support])
2372
2373 if test $ac_cv_lib_dl_dlopen = yes; then
2374 case "$LIBS" in
2375 *-ldl*)
2376 # libdl already in LIBS
2377 ;;
2378 *)
2379 SSHDLIBS="$SSHDLIBS -ldl"
2380 ;;
2381 esac
2382 fi
2383 fi
2384 ]
2385)
2386
2387# Check for older PAM
2388if test "x$PAM_MSG" = "xyes" ; then
2389 # Check PAM strerror arguments (old PAM)
2390 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
2391 AC_TRY_COMPILE(
2392 [
2393#include <stdlib.h>
2394#if defined(HAVE_SECURITY_PAM_APPL_H)
2395#include <security/pam_appl.h>
2396#elif defined (HAVE_PAM_PAM_APPL_H)
2397#include <pam/pam_appl.h>
2398#endif
2399 ],
2400 [(void)pam_strerror((pam_handle_t *)NULL, -1);],
2401 [AC_MSG_RESULT(no)],
2402 [
2403 AC_DEFINE(HAVE_OLD_PAM, 1,
2404 [Define if you have an old version of PAM
2405 which takes only one argument to pam_strerror])
2406 AC_MSG_RESULT(yes)
2407 PAM_MSG="yes (old library)"
2408 ]
2409 )
2410fi
2411
2412# Do we want to force the use of the rand helper?
2413AC_ARG_WITH(rand-helper,
2414 [ --with-rand-helper Use subprocess to gather strong randomness ],
2415 [
2416 if test "x$withval" = "xno" ; then
2417 # Force use of OpenSSL's internal RNG, even if
2418 # the previous test showed it to be unseeded.
2419 if test -z "$OPENSSL_SEEDS_ITSELF" ; then
2420 AC_MSG_WARN([*** Forcing use of OpenSSL's non-self-seeding PRNG])
2421 OPENSSL_SEEDS_ITSELF=yes
2422 USE_RAND_HELPER=""
2423 fi
2424 else
2425 USE_RAND_HELPER=yes
2426 fi
2427 ],
2428)
2429
2430# Which randomness source do we use?
2431if test ! -z "$OPENSSL_SEEDS_ITSELF" && test -z "$USE_RAND_HELPER" ; then
2432 # OpenSSL only
2433 AC_DEFINE(OPENSSL_PRNG_ONLY, 1,
2434 [Define if you want OpenSSL's internally seeded PRNG only])
2435 RAND_MSG="OpenSSL internal ONLY"
2436 INSTALL_SSH_RAND_HELPER=""
2437elif test ! -z "$USE_RAND_HELPER" ; then
2438 # install rand helper
2439 RAND_MSG="ssh-rand-helper"
2440 INSTALL_SSH_RAND_HELPER="yes"
2441fi
2442AC_SUBST(INSTALL_SSH_RAND_HELPER)
2443
2444### Configuration of ssh-rand-helper
2445
2446# PRNGD TCP socket 2339# PRNGD TCP socket
2447AC_ARG_WITH(prngd-port, 2340AC_ARG_WITH([prngd-port],
2448 [ --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT], 2341 [ --with-prngd-port=PORT read entropy from PRNGD/EGD TCP localhost:PORT],
2449 [ 2342 [
2450 case "$withval" in 2343 case "$withval" in
@@ -2454,19 +2347,19 @@ AC_ARG_WITH(prngd-port,
2454 [[0-9]]*) 2347 [[0-9]]*)
2455 ;; 2348 ;;
2456 *) 2349 *)
2457 AC_MSG_ERROR(You must specify a numeric port number for --with-prngd-port) 2350 AC_MSG_ERROR([You must specify a numeric port number for --with-prngd-port])
2458 ;; 2351 ;;
2459 esac 2352 esac
2460 if test ! -z "$withval" ; then 2353 if test ! -z "$withval" ; then
2461 PRNGD_PORT="$withval" 2354 PRNGD_PORT="$withval"
2462 AC_DEFINE_UNQUOTED(PRNGD_PORT, $PRNGD_PORT, 2355 AC_DEFINE_UNQUOTED([PRNGD_PORT], [$PRNGD_PORT],
2463 [Port number of PRNGD/EGD random number socket]) 2356 [Port number of PRNGD/EGD random number socket])
2464 fi 2357 fi
2465 ] 2358 ]
2466) 2359)
2467 2360
2468# PRNGD Unix domain socket 2361# PRNGD Unix domain socket
2469AC_ARG_WITH(prngd-socket, 2362AC_ARG_WITH([prngd-socket],
2470 [ --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)], 2363 [ --with-prngd-socket=FILE read entropy from PRNGD/EGD socket FILE (default=/var/run/egd-pool)],
2471 [ 2364 [
2472 case "$withval" in 2365 case "$withval" in
@@ -2479,59 +2372,119 @@ AC_ARG_WITH(prngd-socket,
2479 /*) 2372 /*)
2480 ;; 2373 ;;
2481 *) 2374 *)
2482 AC_MSG_ERROR(You must specify an absolute path to the entropy socket) 2375 AC_MSG_ERROR([You must specify an absolute path to the entropy socket])
2483 ;; 2376 ;;
2484 esac 2377 esac
2485 2378
2486 if test ! -z "$withval" ; then 2379 if test ! -z "$withval" ; then
2487 if test ! -z "$PRNGD_PORT" ; then 2380 if test ! -z "$PRNGD_PORT" ; then
2488 AC_MSG_ERROR(You may not specify both a PRNGD/EGD port and socket) 2381 AC_MSG_ERROR([You may not specify both a PRNGD/EGD port and socket])
2489 fi 2382 fi
2490 if test ! -r "$withval" ; then 2383 if test ! -r "$withval" ; then
2491 AC_MSG_WARN(Entropy socket is not readable) 2384 AC_MSG_WARN([Entropy socket is not readable])
2492 fi 2385 fi
2493 PRNGD_SOCKET="$withval" 2386 PRNGD_SOCKET="$withval"
2494 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET", 2387 AC_DEFINE_UNQUOTED([PRNGD_SOCKET], ["$PRNGD_SOCKET"],
2495 [Location of PRNGD/EGD random number socket]) 2388 [Location of PRNGD/EGD random number socket])
2496 fi 2389 fi
2497 ], 2390 ],
2498 [ 2391 [
2499 # Check for existing socket only if we don't have a random device already 2392 # Check for existing socket only if we don't have a random device already
2500 if test "$USE_RAND_HELPER" = yes ; then 2393 if test "x$OPENSSL_SEEDS_ITSELF" != "xyes" ; then
2501 AC_MSG_CHECKING(for PRNGD/EGD socket) 2394 AC_MSG_CHECKING([for PRNGD/EGD socket])
2502 # Insert other locations here 2395 # Insert other locations here
2503 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do 2396 for sock in /var/run/egd-pool /dev/egd-pool /etc/entropy; do
2504 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then 2397 if test -r $sock && $TEST_MINUS_S_SH -c "test -S $sock -o -p $sock" ; then
2505 PRNGD_SOCKET="$sock" 2398 PRNGD_SOCKET="$sock"
2506 AC_DEFINE_UNQUOTED(PRNGD_SOCKET, "$PRNGD_SOCKET") 2399 AC_DEFINE_UNQUOTED([PRNGD_SOCKET], ["$PRNGD_SOCKET"])
2507 break; 2400 break;
2508 fi 2401 fi
2509 done 2402 done
2510 if test ! -z "$PRNGD_SOCKET" ; then 2403 if test ! -z "$PRNGD_SOCKET" ; then
2511 AC_MSG_RESULT($PRNGD_SOCKET) 2404 AC_MSG_RESULT([$PRNGD_SOCKET])
2512 else 2405 else
2513 AC_MSG_RESULT(not found) 2406 AC_MSG_RESULT([not found])
2514 fi 2407 fi
2515 fi 2408 fi
2516 ] 2409 ]
2517) 2410)
2518 2411
2519# Change default command timeout for hashing entropy source 2412# Which randomness source do we use?
2520entropy_timeout=200 2413if test ! -z "$PRNGD_PORT" ; then
2521AC_ARG_WITH(entropy-timeout, 2414 RAND_MSG="PRNGd port $PRNGD_PORT"
2522 [ --with-entropy-timeout Specify entropy gathering command timeout (msec)], 2415elif test ! -z "$PRNGD_SOCKET" ; then
2416 RAND_MSG="PRNGd socket $PRNGD_SOCKET"
2417elif test ! -z "$OPENSSL_SEEDS_ITSELF" ; then
2418 AC_DEFINE([OPENSSL_PRNG_ONLY], [1],
2419 [Define if you want OpenSSL's internally seeded PRNG only])
2420 RAND_MSG="OpenSSL internal ONLY"
2421else
2422 AC_MSG_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])
2423fi
2424
2425# Check for PAM libs
2426PAM_MSG="no"
2427AC_ARG_WITH([pam],
2428 [ --with-pam Enable PAM support ],
2523 [ 2429 [
2524 if test -n "$withval" && test "x$withval" != "xno" && \ 2430 if test "x$withval" != "xno" ; then
2525 test "x${withval}" != "xyes"; then 2431 if test "x$ac_cv_header_security_pam_appl_h" != "xyes" && \
2526 entropy_timeout=$withval 2432 test "x$ac_cv_header_pam_pam_appl_h" != "xyes" ; then
2433 AC_MSG_ERROR([PAM headers not found])
2434 fi
2435
2436 saved_LIBS="$LIBS"
2437 AC_CHECK_LIB([dl], [dlopen], , )
2438 AC_CHECK_LIB([pam], [pam_set_item], , [AC_MSG_ERROR([*** libpam missing])])
2439 AC_CHECK_FUNCS([pam_getenvlist])
2440 AC_CHECK_FUNCS([pam_putenv])
2441 LIBS="$saved_LIBS"
2442
2443 PAM_MSG="yes"
2444
2445 SSHDLIBS="$SSHDLIBS -lpam"
2446 AC_DEFINE([USE_PAM], [1],
2447 [Define if you want to enable PAM support])
2448
2449 if test $ac_cv_lib_dl_dlopen = yes; then
2450 case "$LIBS" in
2451 *-ldl*)
2452 # libdl already in LIBS
2453 ;;
2454 *)
2455 SSHDLIBS="$SSHDLIBS -ldl"
2456 ;;
2457 esac
2458 fi
2527 fi 2459 fi
2528 ] 2460 ]
2529) 2461)
2530AC_DEFINE_UNQUOTED(ENTROPY_TIMEOUT_MSEC, $entropy_timeout, 2462
2531 [Builtin PRNG command timeout]) 2463# Check for older PAM
2464if test "x$PAM_MSG" = "xyes" ; then
2465 # Check PAM strerror arguments (old PAM)
2466 AC_MSG_CHECKING([whether pam_strerror takes only one argument])
2467 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2468#include <stdlib.h>
2469#if defined(HAVE_SECURITY_PAM_APPL_H)
2470#include <security/pam_appl.h>
2471#elif defined (HAVE_PAM_PAM_APPL_H)
2472#include <pam/pam_appl.h>
2473#endif
2474 ]], [[
2475(void)pam_strerror((pam_handle_t *)NULL, -1);
2476 ]])], [AC_MSG_RESULT([no])], [
2477 AC_DEFINE([HAVE_OLD_PAM], [1],
2478 [Define if you have an old version of PAM
2479 which takes only one argument to pam_strerror])
2480 AC_MSG_RESULT([yes])
2481 PAM_MSG="yes (old library)"
2482
2483 ])
2484fi
2532 2485
2533SSH_PRIVSEP_USER=sshd 2486SSH_PRIVSEP_USER=sshd
2534AC_ARG_WITH(privsep-user, 2487AC_ARG_WITH([privsep-user],
2535 [ --with-privsep-user=user Specify non-privileged user for privilege separation], 2488 [ --with-privsep-user=user Specify non-privileged user for privilege separation],
2536 [ 2489 [
2537 if test -n "$withval" && test "x$withval" != "xno" && \ 2490 if test -n "$withval" && test "x$withval" != "xno" && \
@@ -2540,59 +2493,49 @@ AC_ARG_WITH(privsep-user,
2540 fi 2493 fi
2541 ] 2494 ]
2542) 2495)
2543AC_DEFINE_UNQUOTED(SSH_PRIVSEP_USER, "$SSH_PRIVSEP_USER", 2496AC_DEFINE_UNQUOTED([SSH_PRIVSEP_USER], ["$SSH_PRIVSEP_USER"],
2544 [non-privileged user for privilege separation]) 2497 [non-privileged user for privilege separation])
2545AC_SUBST(SSH_PRIVSEP_USER) 2498AC_SUBST([SSH_PRIVSEP_USER])
2546
2547# We do this little dance with the search path to insure
2548# that programs that we select for use by installed programs
2549# (which may be run by the super-user) come from trusted
2550# locations before they come from the user's private area.
2551# This should help avoid accidentally configuring some
2552# random version of a program in someone's personal bin.
2553
2554OPATH=$PATH
2555PATH=/bin:/usr/bin
2556test -h /bin 2> /dev/null && PATH=/usr/bin
2557test -d /sbin && PATH=$PATH:/sbin
2558test -d /usr/sbin && PATH=$PATH:/usr/sbin
2559PATH=$PATH:/etc:$OPATH
2560
2561# These programs are used by the command hashing source to gather entropy
2562OSSH_PATH_ENTROPY_PROG(PROG_LS, ls)
2563OSSH_PATH_ENTROPY_PROG(PROG_NETSTAT, netstat)
2564OSSH_PATH_ENTROPY_PROG(PROG_ARP, arp)
2565OSSH_PATH_ENTROPY_PROG(PROG_IFCONFIG, ifconfig)
2566OSSH_PATH_ENTROPY_PROG(PROG_JSTAT, jstat)
2567OSSH_PATH_ENTROPY_PROG(PROG_PS, ps)
2568OSSH_PATH_ENTROPY_PROG(PROG_SAR, sar)
2569OSSH_PATH_ENTROPY_PROG(PROG_W, w)
2570OSSH_PATH_ENTROPY_PROG(PROG_WHO, who)
2571OSSH_PATH_ENTROPY_PROG(PROG_LAST, last)
2572OSSH_PATH_ENTROPY_PROG(PROG_LASTLOG, lastlog)
2573OSSH_PATH_ENTROPY_PROG(PROG_DF, df)
2574OSSH_PATH_ENTROPY_PROG(PROG_VMSTAT, vmstat)
2575OSSH_PATH_ENTROPY_PROG(PROG_UPTIME, uptime)
2576OSSH_PATH_ENTROPY_PROG(PROG_IPCS, ipcs)
2577OSSH_PATH_ENTROPY_PROG(PROG_TAIL, tail)
2578# restore PATH
2579PATH=$OPATH
2580
2581# Where does ssh-rand-helper get its randomness from?
2582INSTALL_SSH_PRNG_CMDS=""
2583if test ! -z "$INSTALL_SSH_RAND_HELPER" ; then
2584 if test ! -z "$PRNGD_PORT" ; then
2585 RAND_HELPER_MSG="TCP localhost:$PRNGD_PORT"
2586 elif test ! -z "$PRNGD_SOCKET" ; then
2587 RAND_HELPER_MSG="Unix domain socket \"$PRNGD_SOCKET\""
2588 else
2589 RAND_HELPER_MSG="Command hashing (timeout $entropy_timeout)"
2590 RAND_HELPER_CMDHASH=yes
2591 INSTALL_SSH_PRNG_CMDS="yes"
2592 fi
2593fi
2594AC_SUBST(INSTALL_SSH_PRNG_CMDS)
2595 2499
2500# Decide which sandbox style to use
2501sandbox_arg=""
2502AC_ARG_WITH([sandbox],
2503 [ --with-sandbox=style Specify privilege separation sandbox (no, darwin, rlimit, systrace)],
2504 [
2505 if test "x$withval" = "xyes" ; then
2506 sandbox_arg=""
2507 else
2508 sandbox_arg="$withval"
2509 fi
2510 ]
2511)
2512if test "x$sandbox_arg" = "xsystrace" || \
2513 ( test -z "$sandbox_arg" && test "x$have_systr_policy_kill" = "x1" ) ; then
2514 test "x$have_systr_policy_kill" != "x1" && \
2515 AC_MSG_ERROR([systrace sandbox requires systrace headers and SYSTR_POLICY_KILL support])
2516 SANDBOX_STYLE="systrace"
2517 AC_DEFINE([SANDBOX_SYSTRACE], [1], [Sandbox using systrace(4)])
2518elif test "x$sandbox_arg" = "xdarwin" || \
2519 ( test -z "$sandbox_arg" && test "x$ac_cv_func_sandbox_init" = "xyes" && \
2520 test "x$ac_cv_header_sandbox_h" = "xyes") ; then
2521 test "x$ac_cv_func_sandbox_init" != "xyes" -o \
2522 "x$ac_cv_header_sandbox_h" != "xyes" && \
2523 AC_MSG_ERROR([Darwin seatbelt sandbox requires sandbox.h and sandbox_init function])
2524 SANDBOX_STYLE="darwin"
2525 AC_DEFINE([SANDBOX_DARWIN], [1], [Sandbox using Darwin sandbox_init(3)])
2526elif test "x$sandbox_arg" = "xrlimit" || \
2527 ( test -z "$sandbox_arg" && test "x$ac_cv_func_setrlimit" = "xyes" ) ; then
2528 test "x$ac_cv_func_setrlimit" != "xyes" && \
2529 AC_MSG_ERROR([rlimit sandbox requires setrlimit function])
2530 SANDBOX_STYLE="rlimit"
2531 AC_DEFINE([SANDBOX_RLIMIT], [1], [Sandbox using setrlimit(2)])
2532elif test -z "$sandbox_arg" || test "x$sandbox_arg" = "xno" || \
2533 test "x$sandbox_arg" = "xnone" || test "x$sandbox_arg" = "xnull" ; then
2534 SANDBOX_STYLE="none"
2535 AC_DEFINE([SANDBOX_NULL], [1], [no privsep sandboxing])
2536else
2537 AC_MSG_ERROR([unsupported --with-sandbox])
2538fi
2596 2539
2597# Cheap hack to ensure NEWS-OS libraries are arranged right. 2540# Cheap hack to ensure NEWS-OS libraries are arranged right.
2598if test ! -z "$SONY" ; then 2541if test ! -z "$SONY" ; then
@@ -2603,11 +2546,11 @@ fi
2603AC_CHECK_TYPES([long long, unsigned long long, long double]) 2546AC_CHECK_TYPES([long long, unsigned long long, long double])
2604 2547
2605# Check datatype sizes 2548# Check datatype sizes
2606AC_CHECK_SIZEOF(char, 1) 2549AC_CHECK_SIZEOF([char], [1])
2607AC_CHECK_SIZEOF(short int, 2) 2550AC_CHECK_SIZEOF([short int], [2])
2608AC_CHECK_SIZEOF(int, 4) 2551AC_CHECK_SIZEOF([int], [4])
2609AC_CHECK_SIZEOF(long int, 4) 2552AC_CHECK_SIZEOF([long int], [4])
2610AC_CHECK_SIZEOF(long long int, 8) 2553AC_CHECK_SIZEOF([long long int], [8])
2611 2554
2612# Sanity check long long for some platforms (AIX) 2555# Sanity check long long for some platforms (AIX)
2613if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then 2556if test "x$ac_cv_sizeof_long_long_int" = "x4" ; then
@@ -2618,7 +2561,7 @@ fi
2618if test -z "$have_llong_max"; then 2561if test -z "$have_llong_max"; then
2619 AC_MSG_CHECKING([for max value of long long]) 2562 AC_MSG_CHECKING([for max value of long long])
2620 AC_RUN_IFELSE( 2563 AC_RUN_IFELSE(
2621 [AC_LANG_SOURCE([[ 2564 [AC_LANG_PROGRAM([[
2622#include <stdio.h> 2565#include <stdio.h>
2623/* Why is this so damn hard? */ 2566/* Why is this so damn hard? */
2624#ifdef __GNUC__ 2567#ifdef __GNUC__
@@ -2654,8 +2597,7 @@ fprint_ll(FILE *f, long long n)
2654 return -1; 2597 return -1;
2655 return 0; 2598 return 0;
2656} 2599}
2657 2600 ]], [[
2658int main(void) {
2659 FILE *f; 2601 FILE *f;
2660 long long i, llmin, llmax = 0; 2602 long long i, llmin, llmax = 0;
2661 2603
@@ -2689,22 +2631,21 @@ int main(void) {
2689 if (fclose(f) < 0) 2631 if (fclose(f) < 0)
2690 exit(5); 2632 exit(5);
2691 exit(0); 2633 exit(0);
2692}
2693 ]])], 2634 ]])],
2694 [ 2635 [
2695 llong_min=`$AWK '{print $1}' conftest.llminmax` 2636 llong_min=`$AWK '{print $1}' conftest.llminmax`
2696 llong_max=`$AWK '{print $2}' conftest.llminmax` 2637 llong_max=`$AWK '{print $2}' conftest.llminmax`
2697 2638
2698 AC_MSG_RESULT($llong_max) 2639 AC_MSG_RESULT([$llong_max])
2699 AC_DEFINE_UNQUOTED(LLONG_MAX, [${llong_max}LL], 2640 AC_DEFINE_UNQUOTED([LLONG_MAX], [${llong_max}LL],
2700 [max value of long long calculated by configure]) 2641 [max value of long long calculated by configure])
2701 AC_MSG_CHECKING([for min value of long long]) 2642 AC_MSG_CHECKING([for min value of long long])
2702 AC_MSG_RESULT($llong_min) 2643 AC_MSG_RESULT([$llong_min])
2703 AC_DEFINE_UNQUOTED(LLONG_MIN, [${llong_min}LL], 2644 AC_DEFINE_UNQUOTED([LLONG_MIN], [${llong_min}LL],
2704 [min value of long long calculated by configure]) 2645 [min value of long long calculated by configure])
2705 ], 2646 ],
2706 [ 2647 [
2707 AC_MSG_RESULT(not found) 2648 AC_MSG_RESULT([not found])
2708 ], 2649 ],
2709 [ 2650 [
2710 AC_MSG_WARN([cross compiling: not checking]) 2651 AC_MSG_WARN([cross compiling: not checking])
@@ -2715,28 +2656,24 @@ fi
2715 2656
2716# More checks for data types 2657# More checks for data types
2717AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [ 2658AC_CACHE_CHECK([for u_int type], ac_cv_have_u_int, [
2718 AC_TRY_COMPILE( 2659 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
2719 [ #include <sys/types.h> ], 2660 [[ u_int a; a = 1;]])],
2720 [ u_int a; a = 1;], 2661 [ ac_cv_have_u_int="yes" ], [ ac_cv_have_u_int="no"
2721 [ ac_cv_have_u_int="yes" ], 2662 ])
2722 [ ac_cv_have_u_int="no" ]
2723 )
2724]) 2663])
2725if test "x$ac_cv_have_u_int" = "xyes" ; then 2664if test "x$ac_cv_have_u_int" = "xyes" ; then
2726 AC_DEFINE(HAVE_U_INT, 1, [define if you have u_int data type]) 2665 AC_DEFINE([HAVE_U_INT], [1], [define if you have u_int data type])
2727 have_u_int=1 2666 have_u_int=1
2728fi 2667fi
2729 2668
2730AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [ 2669AC_CACHE_CHECK([for intXX_t types], ac_cv_have_intxx_t, [
2731 AC_TRY_COMPILE( 2670 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
2732 [ #include <sys/types.h> ], 2671 [[ int8_t a; int16_t b; int32_t c; a = b = c = 1;]])],
2733 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;], 2672 [ ac_cv_have_intxx_t="yes" ], [ ac_cv_have_intxx_t="no"
2734 [ ac_cv_have_intxx_t="yes" ], 2673 ])
2735 [ ac_cv_have_intxx_t="no" ]
2736 )
2737]) 2674])
2738if test "x$ac_cv_have_intxx_t" = "xyes" ; then 2675if test "x$ac_cv_have_intxx_t" = "xyes" ; then
2739 AC_DEFINE(HAVE_INTXX_T, 1, [define if you have intxx_t data type]) 2676 AC_DEFINE([HAVE_INTXX_T], [1], [define if you have intxx_t data type])
2740 have_intxx_t=1 2677 have_intxx_t=1
2741fi 2678fi
2742 2679
@@ -2744,20 +2681,17 @@ if (test -z "$have_intxx_t" && \
2744 test "x$ac_cv_header_stdint_h" = "xyes") 2681 test "x$ac_cv_header_stdint_h" = "xyes")
2745then 2682then
2746 AC_MSG_CHECKING([for intXX_t types in stdint.h]) 2683 AC_MSG_CHECKING([for intXX_t types in stdint.h])
2747 AC_TRY_COMPILE( 2684 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <stdint.h> ]],
2748 [ #include <stdint.h> ], 2685 [[ int8_t a; int16_t b; int32_t c; a = b = c = 1;]])],
2749 [ int8_t a; int16_t b; int32_t c; a = b = c = 1;],
2750 [ 2686 [
2751 AC_DEFINE(HAVE_INTXX_T) 2687 AC_DEFINE([HAVE_INTXX_T])
2752 AC_MSG_RESULT(yes) 2688 AC_MSG_RESULT([yes])
2753 ], 2689 ], [ AC_MSG_RESULT([no])
2754 [ AC_MSG_RESULT(no) ] 2690 ])
2755 )
2756fi 2691fi
2757 2692
2758AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [ 2693AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
2759 AC_TRY_COMPILE( 2694 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2760 [
2761#include <sys/types.h> 2695#include <sys/types.h>
2762#ifdef HAVE_STDINT_H 2696#ifdef HAVE_STDINT_H
2763# include <stdint.h> 2697# include <stdint.h>
@@ -2766,139 +2700,124 @@ AC_CACHE_CHECK([for int64_t type], ac_cv_have_int64_t, [
2766#ifdef HAVE_SYS_BITYPES_H 2700#ifdef HAVE_SYS_BITYPES_H
2767# include <sys/bitypes.h> 2701# include <sys/bitypes.h>
2768#endif 2702#endif
2769 ], 2703 ]], [[
2770 [ int64_t a; a = 1;], 2704int64_t a; a = 1;
2771 [ ac_cv_have_int64_t="yes" ], 2705 ]])],
2772 [ ac_cv_have_int64_t="no" ] 2706 [ ac_cv_have_int64_t="yes" ], [ ac_cv_have_int64_t="no"
2773 ) 2707 ])
2774]) 2708])
2775if test "x$ac_cv_have_int64_t" = "xyes" ; then 2709if test "x$ac_cv_have_int64_t" = "xyes" ; then
2776 AC_DEFINE(HAVE_INT64_T, 1, [define if you have int64_t data type]) 2710 AC_DEFINE([HAVE_INT64_T], [1], [define if you have int64_t data type])
2777fi 2711fi
2778 2712
2779AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [ 2713AC_CACHE_CHECK([for u_intXX_t types], ac_cv_have_u_intxx_t, [
2780 AC_TRY_COMPILE( 2714 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
2781 [ #include <sys/types.h> ], 2715 [[ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;]])],
2782 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;], 2716 [ ac_cv_have_u_intxx_t="yes" ], [ ac_cv_have_u_intxx_t="no"
2783 [ ac_cv_have_u_intxx_t="yes" ], 2717 ])
2784 [ ac_cv_have_u_intxx_t="no" ]
2785 )
2786]) 2718])
2787if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then 2719if test "x$ac_cv_have_u_intxx_t" = "xyes" ; then
2788 AC_DEFINE(HAVE_U_INTXX_T, 1, [define if you have u_intxx_t data type]) 2720 AC_DEFINE([HAVE_U_INTXX_T], [1], [define if you have u_intxx_t data type])
2789 have_u_intxx_t=1 2721 have_u_intxx_t=1
2790fi 2722fi
2791 2723
2792if test -z "$have_u_intxx_t" ; then 2724if test -z "$have_u_intxx_t" ; then
2793 AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h]) 2725 AC_MSG_CHECKING([for u_intXX_t types in sys/socket.h])
2794 AC_TRY_COMPILE( 2726 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/socket.h> ]],
2795 [ #include <sys/socket.h> ], 2727 [[ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;]])],
2796 [ u_int8_t a; u_int16_t b; u_int32_t c; a = b = c = 1;],
2797 [ 2728 [
2798 AC_DEFINE(HAVE_U_INTXX_T) 2729 AC_DEFINE([HAVE_U_INTXX_T])
2799 AC_MSG_RESULT(yes) 2730 AC_MSG_RESULT([yes])
2800 ], 2731 ], [ AC_MSG_RESULT([no])
2801 [ AC_MSG_RESULT(no) ] 2732 ])
2802 )
2803fi 2733fi
2804 2734
2805AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [ 2735AC_CACHE_CHECK([for u_int64_t types], ac_cv_have_u_int64_t, [
2806 AC_TRY_COMPILE( 2736 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
2807 [ #include <sys/types.h> ], 2737 [[ u_int64_t a; a = 1;]])],
2808 [ u_int64_t a; a = 1;], 2738 [ ac_cv_have_u_int64_t="yes" ], [ ac_cv_have_u_int64_t="no"
2809 [ ac_cv_have_u_int64_t="yes" ], 2739 ])
2810 [ ac_cv_have_u_int64_t="no" ]
2811 )
2812]) 2740])
2813if test "x$ac_cv_have_u_int64_t" = "xyes" ; then 2741if test "x$ac_cv_have_u_int64_t" = "xyes" ; then
2814 AC_DEFINE(HAVE_U_INT64_T, 1, [define if you have u_int64_t data type]) 2742 AC_DEFINE([HAVE_U_INT64_T], [1], [define if you have u_int64_t data type])
2815 have_u_int64_t=1 2743 have_u_int64_t=1
2816fi 2744fi
2817 2745
2818if test -z "$have_u_int64_t" ; then 2746if test -z "$have_u_int64_t" ; then
2819 AC_MSG_CHECKING([for u_int64_t type in sys/bitypes.h]) 2747 AC_MSG_CHECKING([for u_int64_t type in sys/bitypes.h])
2820 AC_TRY_COMPILE( 2748 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/bitypes.h> ]],
2821 [ #include <sys/bitypes.h> ], 2749 [[ u_int64_t a; a = 1]])],
2822 [ u_int64_t a; a = 1],
2823 [ 2750 [
2824 AC_DEFINE(HAVE_U_INT64_T) 2751 AC_DEFINE([HAVE_U_INT64_T])
2825 AC_MSG_RESULT(yes) 2752 AC_MSG_RESULT([yes])
2826 ], 2753 ], [ AC_MSG_RESULT([no])
2827 [ AC_MSG_RESULT(no) ] 2754 ])
2828 )
2829fi 2755fi
2830 2756
2831if test -z "$have_u_intxx_t" ; then 2757if test -z "$have_u_intxx_t" ; then
2832 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [ 2758 AC_CACHE_CHECK([for uintXX_t types], ac_cv_have_uintxx_t, [
2833 AC_TRY_COMPILE( 2759 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2834 [
2835#include <sys/types.h> 2760#include <sys/types.h>
2836 ], 2761 ]], [[
2837 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1; ], 2762 uint8_t a;
2838 [ ac_cv_have_uintxx_t="yes" ], 2763 uint16_t b;
2839 [ ac_cv_have_uintxx_t="no" ] 2764 uint32_t c;
2840 ) 2765 a = b = c = 1;
2766 ]])],
2767 [ ac_cv_have_uintxx_t="yes" ], [ ac_cv_have_uintxx_t="no"
2768 ])
2841 ]) 2769 ])
2842 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then 2770 if test "x$ac_cv_have_uintxx_t" = "xyes" ; then
2843 AC_DEFINE(HAVE_UINTXX_T, 1, 2771 AC_DEFINE([HAVE_UINTXX_T], [1],
2844 [define if you have uintxx_t data type]) 2772 [define if you have uintxx_t data type])
2845 fi 2773 fi
2846fi 2774fi
2847 2775
2848if test -z "$have_uintxx_t" ; then 2776if test -z "$have_uintxx_t" ; then
2849 AC_MSG_CHECKING([for uintXX_t types in stdint.h]) 2777 AC_MSG_CHECKING([for uintXX_t types in stdint.h])
2850 AC_TRY_COMPILE( 2778 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <stdint.h> ]],
2851 [ #include <stdint.h> ], 2779 [[ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;]])],
2852 [ uint8_t a; uint16_t b; uint32_t c; a = b = c = 1;],
2853 [ 2780 [
2854 AC_DEFINE(HAVE_UINTXX_T) 2781 AC_DEFINE([HAVE_UINTXX_T])
2855 AC_MSG_RESULT(yes) 2782 AC_MSG_RESULT([yes])
2856 ], 2783 ], [ AC_MSG_RESULT([no])
2857 [ AC_MSG_RESULT(no) ] 2784 ])
2858 )
2859fi 2785fi
2860 2786
2861if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \ 2787if (test -z "$have_u_intxx_t" || test -z "$have_intxx_t" && \
2862 test "x$ac_cv_header_sys_bitypes_h" = "xyes") 2788 test "x$ac_cv_header_sys_bitypes_h" = "xyes")
2863then 2789then
2864 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h]) 2790 AC_MSG_CHECKING([for intXX_t and u_intXX_t types in sys/bitypes.h])
2865 AC_TRY_COMPILE( 2791 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2866 [
2867#include <sys/bitypes.h> 2792#include <sys/bitypes.h>
2868 ], 2793 ]], [[
2869 [
2870 int8_t a; int16_t b; int32_t c; 2794 int8_t a; int16_t b; int32_t c;
2871 u_int8_t e; u_int16_t f; u_int32_t g; 2795 u_int8_t e; u_int16_t f; u_int32_t g;
2872 a = b = c = e = f = g = 1; 2796 a = b = c = e = f = g = 1;
2873 ], 2797 ]])],
2874 [ 2798 [
2875 AC_DEFINE(HAVE_U_INTXX_T) 2799 AC_DEFINE([HAVE_U_INTXX_T])
2876 AC_DEFINE(HAVE_INTXX_T) 2800 AC_DEFINE([HAVE_INTXX_T])
2877 AC_MSG_RESULT(yes) 2801 AC_MSG_RESULT([yes])
2878 ], 2802 ], [AC_MSG_RESULT([no])
2879 [AC_MSG_RESULT(no)] 2803 ])
2880 )
2881fi 2804fi
2882 2805
2883 2806
2884AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [ 2807AC_CACHE_CHECK([for u_char], ac_cv_have_u_char, [
2885 AC_TRY_COMPILE( 2808 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
2886 [ 2809 [[ u_char foo; foo = 125; ]])],
2887#include <sys/types.h> 2810 [ ac_cv_have_u_char="yes" ], [ ac_cv_have_u_char="no"
2888 ], 2811 ])
2889 [ u_char foo; foo = 125; ],
2890 [ ac_cv_have_u_char="yes" ],
2891 [ ac_cv_have_u_char="no" ]
2892 )
2893]) 2812])
2894if test "x$ac_cv_have_u_char" = "xyes" ; then 2813if test "x$ac_cv_have_u_char" = "xyes" ; then
2895 AC_DEFINE(HAVE_U_CHAR, 1, [define if you have u_char data type]) 2814 AC_DEFINE([HAVE_U_CHAR], [1], [define if you have u_char data type])
2896fi 2815fi
2897 2816
2898TYPE_SOCKLEN_T 2817TYPE_SOCKLEN_T
2899 2818
2900AC_CHECK_TYPES(sig_atomic_t,,,[#include <signal.h>]) 2819AC_CHECK_TYPES([sig_atomic_t], , , [#include <signal.h>])
2901AC_CHECK_TYPES([fsblkcnt_t, fsfilcnt_t],,,[ 2820AC_CHECK_TYPES([fsblkcnt_t, fsfilcnt_t], , , [
2902#include <sys/types.h> 2821#include <sys/types.h>
2903#ifdef HAVE_SYS_BITYPES_H 2822#ifdef HAVE_SYS_BITYPES_H
2904#include <sys/bitypes.h> 2823#include <sys/bitypes.h>
@@ -2911,156 +2830,125 @@ AC_CHECK_TYPES([fsblkcnt_t, fsfilcnt_t],,,[
2911#endif 2830#endif
2912]) 2831])
2913 2832
2914AC_CHECK_TYPES([in_addr_t, in_port_t],,, 2833AC_CHECK_TYPES([in_addr_t, in_port_t], , ,
2915[#include <sys/types.h> 2834[#include <sys/types.h>
2916#include <netinet/in.h>]) 2835#include <netinet/in.h>])
2917 2836
2918AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [ 2837AC_CACHE_CHECK([for size_t], ac_cv_have_size_t, [
2919 AC_TRY_COMPILE( 2838 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
2920 [ 2839 [[ size_t foo; foo = 1235; ]])],
2921#include <sys/types.h> 2840 [ ac_cv_have_size_t="yes" ], [ ac_cv_have_size_t="no"
2922 ], 2841 ])
2923 [ size_t foo; foo = 1235; ],
2924 [ ac_cv_have_size_t="yes" ],
2925 [ ac_cv_have_size_t="no" ]
2926 )
2927]) 2842])
2928if test "x$ac_cv_have_size_t" = "xyes" ; then 2843if test "x$ac_cv_have_size_t" = "xyes" ; then
2929 AC_DEFINE(HAVE_SIZE_T, 1, [define if you have size_t data type]) 2844 AC_DEFINE([HAVE_SIZE_T], [1], [define if you have size_t data type])
2930fi 2845fi
2931 2846
2932AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [ 2847AC_CACHE_CHECK([for ssize_t], ac_cv_have_ssize_t, [
2933 AC_TRY_COMPILE( 2848 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
2934 [ 2849 [[ ssize_t foo; foo = 1235; ]])],
2935#include <sys/types.h> 2850 [ ac_cv_have_ssize_t="yes" ], [ ac_cv_have_ssize_t="no"
2936 ], 2851 ])
2937 [ ssize_t foo; foo = 1235; ],
2938 [ ac_cv_have_ssize_t="yes" ],
2939 [ ac_cv_have_ssize_t="no" ]
2940 )
2941]) 2852])
2942if test "x$ac_cv_have_ssize_t" = "xyes" ; then 2853if test "x$ac_cv_have_ssize_t" = "xyes" ; then
2943 AC_DEFINE(HAVE_SSIZE_T, 1, [define if you have ssize_t data type]) 2854 AC_DEFINE([HAVE_SSIZE_T], [1], [define if you have ssize_t data type])
2944fi 2855fi
2945 2856
2946AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [ 2857AC_CACHE_CHECK([for clock_t], ac_cv_have_clock_t, [
2947 AC_TRY_COMPILE( 2858 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <time.h> ]],
2948 [ 2859 [[ clock_t foo; foo = 1235; ]])],
2949#include <time.h> 2860 [ ac_cv_have_clock_t="yes" ], [ ac_cv_have_clock_t="no"
2950 ], 2861 ])
2951 [ clock_t foo; foo = 1235; ],
2952 [ ac_cv_have_clock_t="yes" ],
2953 [ ac_cv_have_clock_t="no" ]
2954 )
2955]) 2862])
2956if test "x$ac_cv_have_clock_t" = "xyes" ; then 2863if test "x$ac_cv_have_clock_t" = "xyes" ; then
2957 AC_DEFINE(HAVE_CLOCK_T, 1, [define if you have clock_t data type]) 2864 AC_DEFINE([HAVE_CLOCK_T], [1], [define if you have clock_t data type])
2958fi 2865fi
2959 2866
2960AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [ 2867AC_CACHE_CHECK([for sa_family_t], ac_cv_have_sa_family_t, [
2961 AC_TRY_COMPILE( 2868 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2962 [
2963#include <sys/types.h> 2869#include <sys/types.h>
2964#include <sys/socket.h> 2870#include <sys/socket.h>
2965 ], 2871 ]], [[ sa_family_t foo; foo = 1235; ]])],
2966 [ sa_family_t foo; foo = 1235; ], 2872 [ ac_cv_have_sa_family_t="yes" ],
2967 [ ac_cv_have_sa_family_t="yes" ], 2873 [ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
2968 [ AC_TRY_COMPILE(
2969 [
2970#include <sys/types.h> 2874#include <sys/types.h>
2971#include <sys/socket.h> 2875#include <sys/socket.h>
2972#include <netinet/in.h> 2876#include <netinet/in.h>
2973 ], 2877 ]], [[ sa_family_t foo; foo = 1235; ]])],
2974 [ sa_family_t foo; foo = 1235; ],
2975 [ ac_cv_have_sa_family_t="yes" ], 2878 [ ac_cv_have_sa_family_t="yes" ],
2976
2977 [ ac_cv_have_sa_family_t="no" ] 2879 [ ac_cv_have_sa_family_t="no" ]
2978 )]
2979 ) 2880 )
2881 ])
2980]) 2882])
2981if test "x$ac_cv_have_sa_family_t" = "xyes" ; then 2883if test "x$ac_cv_have_sa_family_t" = "xyes" ; then
2982 AC_DEFINE(HAVE_SA_FAMILY_T, 1, 2884 AC_DEFINE([HAVE_SA_FAMILY_T], [1],
2983 [define if you have sa_family_t data type]) 2885 [define if you have sa_family_t data type])
2984fi 2886fi
2985 2887
2986AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [ 2888AC_CACHE_CHECK([for pid_t], ac_cv_have_pid_t, [
2987 AC_TRY_COMPILE( 2889 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
2988 [ 2890 [[ pid_t foo; foo = 1235; ]])],
2989#include <sys/types.h> 2891 [ ac_cv_have_pid_t="yes" ], [ ac_cv_have_pid_t="no"
2990 ], 2892 ])
2991 [ pid_t foo; foo = 1235; ],
2992 [ ac_cv_have_pid_t="yes" ],
2993 [ ac_cv_have_pid_t="no" ]
2994 )
2995]) 2893])
2996if test "x$ac_cv_have_pid_t" = "xyes" ; then 2894if test "x$ac_cv_have_pid_t" = "xyes" ; then
2997 AC_DEFINE(HAVE_PID_T, 1, [define if you have pid_t data type]) 2895 AC_DEFINE([HAVE_PID_T], [1], [define if you have pid_t data type])
2998fi 2896fi
2999 2897
3000AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [ 2898AC_CACHE_CHECK([for mode_t], ac_cv_have_mode_t, [
3001 AC_TRY_COMPILE( 2899 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/types.h> ]],
3002 [ 2900 [[ mode_t foo; foo = 1235; ]])],
3003#include <sys/types.h> 2901 [ ac_cv_have_mode_t="yes" ], [ ac_cv_have_mode_t="no"
3004 ], 2902 ])
3005 [ mode_t foo; foo = 1235; ],
3006 [ ac_cv_have_mode_t="yes" ],
3007 [ ac_cv_have_mode_t="no" ]
3008 )
3009]) 2903])
3010if test "x$ac_cv_have_mode_t" = "xyes" ; then 2904if test "x$ac_cv_have_mode_t" = "xyes" ; then
3011 AC_DEFINE(HAVE_MODE_T, 1, [define if you have mode_t data type]) 2905 AC_DEFINE([HAVE_MODE_T], [1], [define if you have mode_t data type])
3012fi 2906fi
3013 2907
3014 2908
3015AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [ 2909AC_CACHE_CHECK([for struct sockaddr_storage], ac_cv_have_struct_sockaddr_storage, [
3016 AC_TRY_COMPILE( 2910 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3017 [
3018#include <sys/types.h> 2911#include <sys/types.h>
3019#include <sys/socket.h> 2912#include <sys/socket.h>
3020 ], 2913 ]], [[ struct sockaddr_storage s; ]])],
3021 [ struct sockaddr_storage s; ], 2914 [ ac_cv_have_struct_sockaddr_storage="yes" ],
3022 [ ac_cv_have_struct_sockaddr_storage="yes" ], 2915 [ ac_cv_have_struct_sockaddr_storage="no"
3023 [ ac_cv_have_struct_sockaddr_storage="no" ] 2916 ])
3024 )
3025]) 2917])
3026if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then 2918if test "x$ac_cv_have_struct_sockaddr_storage" = "xyes" ; then
3027 AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE, 1, 2919 AC_DEFINE([HAVE_STRUCT_SOCKADDR_STORAGE], [1],
3028 [define if you have struct sockaddr_storage data type]) 2920 [define if you have struct sockaddr_storage data type])
3029fi 2921fi
3030 2922
3031AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [ 2923AC_CACHE_CHECK([for struct sockaddr_in6], ac_cv_have_struct_sockaddr_in6, [
3032 AC_TRY_COMPILE( 2924 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3033 [
3034#include <sys/types.h> 2925#include <sys/types.h>
3035#include <netinet/in.h> 2926#include <netinet/in.h>
3036 ], 2927 ]], [[ struct sockaddr_in6 s; s.sin6_family = 0; ]])],
3037 [ struct sockaddr_in6 s; s.sin6_family = 0; ], 2928 [ ac_cv_have_struct_sockaddr_in6="yes" ],
3038 [ ac_cv_have_struct_sockaddr_in6="yes" ], 2929 [ ac_cv_have_struct_sockaddr_in6="no"
3039 [ ac_cv_have_struct_sockaddr_in6="no" ] 2930 ])
3040 )
3041]) 2931])
3042if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then 2932if test "x$ac_cv_have_struct_sockaddr_in6" = "xyes" ; then
3043 AC_DEFINE(HAVE_STRUCT_SOCKADDR_IN6, 1, 2933 AC_DEFINE([HAVE_STRUCT_SOCKADDR_IN6], [1],
3044 [define if you have struct sockaddr_in6 data type]) 2934 [define if you have struct sockaddr_in6 data type])
3045fi 2935fi
3046 2936
3047AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [ 2937AC_CACHE_CHECK([for struct in6_addr], ac_cv_have_struct_in6_addr, [
3048 AC_TRY_COMPILE( 2938 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3049 [
3050#include <sys/types.h> 2939#include <sys/types.h>
3051#include <netinet/in.h> 2940#include <netinet/in.h>
3052 ], 2941 ]], [[ struct in6_addr s; s.s6_addr[0] = 0; ]])],
3053 [ struct in6_addr s; s.s6_addr[0] = 0; ], 2942 [ ac_cv_have_struct_in6_addr="yes" ],
3054 [ ac_cv_have_struct_in6_addr="yes" ], 2943 [ ac_cv_have_struct_in6_addr="no"
3055 [ ac_cv_have_struct_in6_addr="no" ] 2944 ])
3056 )
3057]) 2945])
3058if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then 2946if test "x$ac_cv_have_struct_in6_addr" = "xyes" ; then
3059 AC_DEFINE(HAVE_STRUCT_IN6_ADDR, 1, 2947 AC_DEFINE([HAVE_STRUCT_IN6_ADDR], [1],
3060 [define if you have struct in6_addr data type]) 2948 [define if you have struct in6_addr data type])
3061 2949
3062dnl Now check for sin6_scope_id 2950dnl Now check for sin6_scope_id
3063 AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id],,, 2951 AC_CHECK_MEMBERS([struct sockaddr_in6.sin6_scope_id], , ,
3064 [ 2952 [
3065#ifdef HAVE_SYS_TYPES_H 2953#ifdef HAVE_SYS_TYPES_H
3066#include <sys/types.h> 2954#include <sys/types.h>
@@ -3070,36 +2958,33 @@ dnl Now check for sin6_scope_id
3070fi 2958fi
3071 2959
3072AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [ 2960AC_CACHE_CHECK([for struct addrinfo], ac_cv_have_struct_addrinfo, [
3073 AC_TRY_COMPILE( 2961 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3074 [
3075#include <sys/types.h> 2962#include <sys/types.h>
3076#include <sys/socket.h> 2963#include <sys/socket.h>
3077#include <netdb.h> 2964#include <netdb.h>
3078 ], 2965 ]], [[ struct addrinfo s; s.ai_flags = AI_PASSIVE; ]])],
3079 [ struct addrinfo s; s.ai_flags = AI_PASSIVE; ], 2966 [ ac_cv_have_struct_addrinfo="yes" ],
3080 [ ac_cv_have_struct_addrinfo="yes" ], 2967 [ ac_cv_have_struct_addrinfo="no"
3081 [ ac_cv_have_struct_addrinfo="no" ] 2968 ])
3082 )
3083]) 2969])
3084if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then 2970if test "x$ac_cv_have_struct_addrinfo" = "xyes" ; then
3085 AC_DEFINE(HAVE_STRUCT_ADDRINFO, 1, 2971 AC_DEFINE([HAVE_STRUCT_ADDRINFO], [1],
3086 [define if you have struct addrinfo data type]) 2972 [define if you have struct addrinfo data type])
3087fi 2973fi
3088 2974
3089AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [ 2975AC_CACHE_CHECK([for struct timeval], ac_cv_have_struct_timeval, [
3090 AC_TRY_COMPILE( 2976 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <sys/time.h> ]],
3091 [ #include <sys/time.h> ], 2977 [[ struct timeval tv; tv.tv_sec = 1;]])],
3092 [ struct timeval tv; tv.tv_sec = 1;], 2978 [ ac_cv_have_struct_timeval="yes" ],
3093 [ ac_cv_have_struct_timeval="yes" ], 2979 [ ac_cv_have_struct_timeval="no"
3094 [ ac_cv_have_struct_timeval="no" ] 2980 ])
3095 )
3096]) 2981])
3097if test "x$ac_cv_have_struct_timeval" = "xyes" ; then 2982if test "x$ac_cv_have_struct_timeval" = "xyes" ; then
3098 AC_DEFINE(HAVE_STRUCT_TIMEVAL, 1, [define if you have struct timeval]) 2983 AC_DEFINE([HAVE_STRUCT_TIMEVAL], [1], [define if you have struct timeval])
3099 have_struct_timeval=1 2984 have_struct_timeval=1
3100fi 2985fi
3101 2986
3102AC_CHECK_TYPES(struct timespec) 2987AC_CHECK_TYPES([struct timespec])
3103 2988
3104# We need int64_t or else certian parts of the compile will fail. 2989# We need int64_t or else certian parts of the compile will fail.
3105if test "x$ac_cv_have_int64_t" = "xno" && \ 2990if test "x$ac_cv_have_int64_t" = "xno" && \
@@ -3135,32 +3020,32 @@ main()
3135#else 3020#else
3136main() { exit(0); } 3021main() { exit(0); }
3137#endif 3022#endif
3138 ]])], [ true ], [ AC_DEFINE(BROKEN_SNPRINTF) ], 3023 ]])], [ true ], [ AC_DEFINE([BROKEN_SNPRINTF]) ],
3139 AC_MSG_WARN([cross compiling: Assuming working snprintf()]) 3024 AC_MSG_WARN([cross compiling: Assuming working snprintf()])
3140 ) 3025 )
3141fi 3026fi
3142 3027
3143dnl Checks for structure members 3028dnl Checks for structure members
3144OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmp.h, HAVE_HOST_IN_UTMP) 3029OSSH_CHECK_HEADER_FOR_FIELD([ut_host], [utmp.h], [HAVE_HOST_IN_UTMP])
3145OSSH_CHECK_HEADER_FOR_FIELD(ut_host, utmpx.h, HAVE_HOST_IN_UTMPX) 3030OSSH_CHECK_HEADER_FOR_FIELD([ut_host], [utmpx.h], [HAVE_HOST_IN_UTMPX])
3146OSSH_CHECK_HEADER_FOR_FIELD(syslen, utmpx.h, HAVE_SYSLEN_IN_UTMPX) 3031OSSH_CHECK_HEADER_FOR_FIELD([syslen], [utmpx.h], [HAVE_SYSLEN_IN_UTMPX])
3147OSSH_CHECK_HEADER_FOR_FIELD(ut_pid, utmp.h, HAVE_PID_IN_UTMP) 3032OSSH_CHECK_HEADER_FOR_FIELD([ut_pid], [utmp.h], [HAVE_PID_IN_UTMP])
3148OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmp.h, HAVE_TYPE_IN_UTMP) 3033OSSH_CHECK_HEADER_FOR_FIELD([ut_type], [utmp.h], [HAVE_TYPE_IN_UTMP])
3149OSSH_CHECK_HEADER_FOR_FIELD(ut_type, utmpx.h, HAVE_TYPE_IN_UTMPX) 3034OSSH_CHECK_HEADER_FOR_FIELD([ut_type], [utmpx.h], [HAVE_TYPE_IN_UTMPX])
3150OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmp.h, HAVE_TV_IN_UTMP) 3035OSSH_CHECK_HEADER_FOR_FIELD([ut_tv], [utmp.h], [HAVE_TV_IN_UTMP])
3151OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmp.h, HAVE_ID_IN_UTMP) 3036OSSH_CHECK_HEADER_FOR_FIELD([ut_id], [utmp.h], [HAVE_ID_IN_UTMP])
3152OSSH_CHECK_HEADER_FOR_FIELD(ut_id, utmpx.h, HAVE_ID_IN_UTMPX) 3037OSSH_CHECK_HEADER_FOR_FIELD([ut_id], [utmpx.h], [HAVE_ID_IN_UTMPX])
3153OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmp.h, HAVE_ADDR_IN_UTMP) 3038OSSH_CHECK_HEADER_FOR_FIELD([ut_addr], [utmp.h], [HAVE_ADDR_IN_UTMP])
3154OSSH_CHECK_HEADER_FOR_FIELD(ut_addr, utmpx.h, HAVE_ADDR_IN_UTMPX) 3039OSSH_CHECK_HEADER_FOR_FIELD([ut_addr], [utmpx.h], [HAVE_ADDR_IN_UTMPX])
3155OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmp.h, HAVE_ADDR_V6_IN_UTMP) 3040OSSH_CHECK_HEADER_FOR_FIELD([ut_addr_v6], [utmp.h], [HAVE_ADDR_V6_IN_UTMP])
3156OSSH_CHECK_HEADER_FOR_FIELD(ut_addr_v6, utmpx.h, HAVE_ADDR_V6_IN_UTMPX) 3041OSSH_CHECK_HEADER_FOR_FIELD([ut_addr_v6], [utmpx.h], [HAVE_ADDR_V6_IN_UTMPX])
3157OSSH_CHECK_HEADER_FOR_FIELD(ut_exit, utmp.h, HAVE_EXIT_IN_UTMP) 3042OSSH_CHECK_HEADER_FOR_FIELD([ut_exit], [utmp.h], [HAVE_EXIT_IN_UTMP])
3158OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmp.h, HAVE_TIME_IN_UTMP) 3043OSSH_CHECK_HEADER_FOR_FIELD([ut_time], [utmp.h], [HAVE_TIME_IN_UTMP])
3159OSSH_CHECK_HEADER_FOR_FIELD(ut_time, utmpx.h, HAVE_TIME_IN_UTMPX) 3044OSSH_CHECK_HEADER_FOR_FIELD([ut_time], [utmpx.h], [HAVE_TIME_IN_UTMPX])
3160OSSH_CHECK_HEADER_FOR_FIELD(ut_tv, utmpx.h, HAVE_TV_IN_UTMPX) 3045OSSH_CHECK_HEADER_FOR_FIELD([ut_tv], [utmpx.h], [HAVE_TV_IN_UTMPX])
3161 3046
3162AC_CHECK_MEMBERS([struct stat.st_blksize]) 3047AC_CHECK_MEMBERS([struct stat.st_blksize])
3163AC_CHECK_MEMBER([struct __res_state.retrans], [], [AC_DEFINE(__res_state, state, 3048AC_CHECK_MEMBER([struct __res_state.retrans], [], [AC_DEFINE([__res_state], [state],
3164 [Define if we don't have struct __res_state in resolv.h])], 3049 [Define if we don't have struct __res_state in resolv.h])],
3165[ 3050[
3166#include <stdio.h> 3051#include <stdio.h>
@@ -3174,94 +3059,79 @@ AC_CHECK_MEMBER([struct __res_state.retrans], [], [AC_DEFINE(__res_state, state,
3174 3059
3175AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage], 3060AC_CACHE_CHECK([for ss_family field in struct sockaddr_storage],
3176 ac_cv_have_ss_family_in_struct_ss, [ 3061 ac_cv_have_ss_family_in_struct_ss, [
3177 AC_TRY_COMPILE( 3062 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3178 [
3179#include <sys/types.h> 3063#include <sys/types.h>
3180#include <sys/socket.h> 3064#include <sys/socket.h>
3181 ], 3065 ]], [[ struct sockaddr_storage s; s.ss_family = 1; ]])],
3182 [ struct sockaddr_storage s; s.ss_family = 1; ], 3066 [ ac_cv_have_ss_family_in_struct_ss="yes" ],
3183 [ ac_cv_have_ss_family_in_struct_ss="yes" ], 3067 [ ac_cv_have_ss_family_in_struct_ss="no" ])
3184 [ ac_cv_have_ss_family_in_struct_ss="no" ],
3185 )
3186]) 3068])
3187if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then 3069if test "x$ac_cv_have_ss_family_in_struct_ss" = "xyes" ; then
3188 AC_DEFINE(HAVE_SS_FAMILY_IN_SS, 1, [Fields in struct sockaddr_storage]) 3070 AC_DEFINE([HAVE_SS_FAMILY_IN_SS], [1], [Fields in struct sockaddr_storage])
3189fi 3071fi
3190 3072
3191AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage], 3073AC_CACHE_CHECK([for __ss_family field in struct sockaddr_storage],
3192 ac_cv_have___ss_family_in_struct_ss, [ 3074 ac_cv_have___ss_family_in_struct_ss, [
3193 AC_TRY_COMPILE( 3075 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3194 [
3195#include <sys/types.h> 3076#include <sys/types.h>
3196#include <sys/socket.h> 3077#include <sys/socket.h>
3197 ], 3078 ]], [[ struct sockaddr_storage s; s.__ss_family = 1; ]])],
3198 [ struct sockaddr_storage s; s.__ss_family = 1; ], 3079 [ ac_cv_have___ss_family_in_struct_ss="yes" ],
3199 [ ac_cv_have___ss_family_in_struct_ss="yes" ], 3080 [ ac_cv_have___ss_family_in_struct_ss="no"
3200 [ ac_cv_have___ss_family_in_struct_ss="no" ] 3081 ])
3201 )
3202]) 3082])
3203if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then 3083if test "x$ac_cv_have___ss_family_in_struct_ss" = "xyes" ; then
3204 AC_DEFINE(HAVE___SS_FAMILY_IN_SS, 1, 3084 AC_DEFINE([HAVE___SS_FAMILY_IN_SS], [1],
3205 [Fields in struct sockaddr_storage]) 3085 [Fields in struct sockaddr_storage])
3206fi 3086fi
3207 3087
3208AC_CACHE_CHECK([for pw_class field in struct passwd], 3088AC_CACHE_CHECK([for pw_class field in struct passwd],
3209 ac_cv_have_pw_class_in_struct_passwd, [ 3089 ac_cv_have_pw_class_in_struct_passwd, [
3210 AC_TRY_COMPILE( 3090 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <pwd.h> ]],
3211 [ 3091 [[ struct passwd p; p.pw_class = 0; ]])],
3212#include <pwd.h> 3092 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
3213 ], 3093 [ ac_cv_have_pw_class_in_struct_passwd="no"
3214 [ struct passwd p; p.pw_class = 0; ], 3094 ])
3215 [ ac_cv_have_pw_class_in_struct_passwd="yes" ],
3216 [ ac_cv_have_pw_class_in_struct_passwd="no" ]
3217 )
3218]) 3095])
3219if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then 3096if test "x$ac_cv_have_pw_class_in_struct_passwd" = "xyes" ; then
3220 AC_DEFINE(HAVE_PW_CLASS_IN_PASSWD, 1, 3097 AC_DEFINE([HAVE_PW_CLASS_IN_PASSWD], [1],
3221 [Define if your password has a pw_class field]) 3098 [Define if your password has a pw_class field])
3222fi 3099fi
3223 3100
3224AC_CACHE_CHECK([for pw_expire field in struct passwd], 3101AC_CACHE_CHECK([for pw_expire field in struct passwd],
3225 ac_cv_have_pw_expire_in_struct_passwd, [ 3102 ac_cv_have_pw_expire_in_struct_passwd, [
3226 AC_TRY_COMPILE( 3103 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <pwd.h> ]],
3227 [ 3104 [[ struct passwd p; p.pw_expire = 0; ]])],
3228#include <pwd.h> 3105 [ ac_cv_have_pw_expire_in_struct_passwd="yes" ],
3229 ], 3106 [ ac_cv_have_pw_expire_in_struct_passwd="no"
3230 [ struct passwd p; p.pw_expire = 0; ], 3107 ])
3231 [ ac_cv_have_pw_expire_in_struct_passwd="yes" ],
3232 [ ac_cv_have_pw_expire_in_struct_passwd="no" ]
3233 )
3234]) 3108])
3235if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then 3109if test "x$ac_cv_have_pw_expire_in_struct_passwd" = "xyes" ; then
3236 AC_DEFINE(HAVE_PW_EXPIRE_IN_PASSWD, 1, 3110 AC_DEFINE([HAVE_PW_EXPIRE_IN_PASSWD], [1],
3237 [Define if your password has a pw_expire field]) 3111 [Define if your password has a pw_expire field])
3238fi 3112fi
3239 3113
3240AC_CACHE_CHECK([for pw_change field in struct passwd], 3114AC_CACHE_CHECK([for pw_change field in struct passwd],
3241 ac_cv_have_pw_change_in_struct_passwd, [ 3115 ac_cv_have_pw_change_in_struct_passwd, [
3242 AC_TRY_COMPILE( 3116 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <pwd.h> ]],
3243 [ 3117 [[ struct passwd p; p.pw_change = 0; ]])],
3244#include <pwd.h> 3118 [ ac_cv_have_pw_change_in_struct_passwd="yes" ],
3245 ], 3119 [ ac_cv_have_pw_change_in_struct_passwd="no"
3246 [ struct passwd p; p.pw_change = 0; ], 3120 ])
3247 [ ac_cv_have_pw_change_in_struct_passwd="yes" ],
3248 [ ac_cv_have_pw_change_in_struct_passwd="no" ]
3249 )
3250]) 3121])
3251if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then 3122if test "x$ac_cv_have_pw_change_in_struct_passwd" = "xyes" ; then
3252 AC_DEFINE(HAVE_PW_CHANGE_IN_PASSWD, 1, 3123 AC_DEFINE([HAVE_PW_CHANGE_IN_PASSWD], [1],
3253 [Define if your password has a pw_change field]) 3124 [Define if your password has a pw_change field])
3254fi 3125fi
3255 3126
3256dnl make sure we're using the real structure members and not defines 3127dnl make sure we're using the real structure members and not defines
3257AC_CACHE_CHECK([for msg_accrights field in struct msghdr], 3128AC_CACHE_CHECK([for msg_accrights field in struct msghdr],
3258 ac_cv_have_accrights_in_msghdr, [ 3129 ac_cv_have_accrights_in_msghdr, [
3259 AC_COMPILE_IFELSE( 3130 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3260 [
3261#include <sys/types.h> 3131#include <sys/types.h>
3262#include <sys/socket.h> 3132#include <sys/socket.h>
3263#include <sys/uio.h> 3133#include <sys/uio.h>
3264int main() { 3134 ]], [[
3265#ifdef msg_accrights 3135#ifdef msg_accrights
3266#error "msg_accrights is a macro" 3136#error "msg_accrights is a macro"
3267exit(1); 3137exit(1);
@@ -3269,20 +3139,19 @@ exit(1);
3269struct msghdr m; 3139struct msghdr m;
3270m.msg_accrights = 0; 3140m.msg_accrights = 0;
3271exit(0); 3141exit(0);
3272} 3142 ]])],
3273 ],
3274 [ ac_cv_have_accrights_in_msghdr="yes" ], 3143 [ ac_cv_have_accrights_in_msghdr="yes" ],
3275 [ ac_cv_have_accrights_in_msghdr="no" ] 3144 [ ac_cv_have_accrights_in_msghdr="no" ]
3276 ) 3145 )
3277]) 3146])
3278if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then 3147if test "x$ac_cv_have_accrights_in_msghdr" = "xyes" ; then
3279 AC_DEFINE(HAVE_ACCRIGHTS_IN_MSGHDR, 1, 3148 AC_DEFINE([HAVE_ACCRIGHTS_IN_MSGHDR], [1],
3280 [Define if your system uses access rights style 3149 [Define if your system uses access rights style
3281 file descriptor passing]) 3150 file descriptor passing])
3282fi 3151fi
3283 3152
3284AC_MSG_CHECKING(if struct statvfs.f_fsid is integral type) 3153AC_MSG_CHECKING([if struct statvfs.f_fsid is integral type])
3285AC_TRY_COMPILE([ 3154AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3286#include <sys/types.h> 3155#include <sys/types.h>
3287#include <sys/stat.h> 3156#include <sys/stat.h>
3288#ifdef HAVE_SYS_TIME_H 3157#ifdef HAVE_SYS_TIME_H
@@ -3294,37 +3163,36 @@ AC_TRY_COMPILE([
3294#ifdef HAVE_SYS_STATVFS_H 3163#ifdef HAVE_SYS_STATVFS_H
3295#include <sys/statvfs.h> 3164#include <sys/statvfs.h>
3296#endif 3165#endif
3297], [struct statvfs s; s.f_fsid = 0;], 3166 ]], [[ struct statvfs s; s.f_fsid = 0; ]])],
3298[ AC_MSG_RESULT(yes) ], 3167 [ AC_MSG_RESULT([yes]) ],
3299[ AC_MSG_RESULT(no) 3168 [ AC_MSG_RESULT([no])
3300 3169
3301 AC_MSG_CHECKING(if fsid_t has member val) 3170 AC_MSG_CHECKING([if fsid_t has member val])
3302 AC_TRY_COMPILE([ 3171 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3303#include <sys/types.h> 3172#include <sys/types.h>
3304#include <sys/statvfs.h>], 3173#include <sys/statvfs.h>
3305 [fsid_t t; t.val[0] = 0;], 3174 ]], [[ fsid_t t; t.val[0] = 0; ]])],
3306 [ AC_MSG_RESULT(yes) 3175 [ AC_MSG_RESULT([yes])
3307 AC_DEFINE(FSID_HAS_VAL, 1, fsid_t has member val) ], 3176 AC_DEFINE([FSID_HAS_VAL], [1], [fsid_t has member val]) ],
3308 [ AC_MSG_RESULT(no) ]) 3177 [ AC_MSG_RESULT([no]) ])
3309 3178
3310 AC_MSG_CHECKING(if f_fsid has member __val) 3179 AC_MSG_CHECKING([if f_fsid has member __val])
3311 AC_TRY_COMPILE([ 3180 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3312#include <sys/types.h> 3181#include <sys/types.h>
3313#include <sys/statvfs.h>], 3182#include <sys/statvfs.h>
3314 [fsid_t t; t.__val[0] = 0;], 3183 ]], [[ fsid_t t; t.__val[0] = 0; ]])],
3315 [ AC_MSG_RESULT(yes) 3184 [ AC_MSG_RESULT([yes])
3316 AC_DEFINE(FSID_HAS___VAL, 1, fsid_t has member __val) ], 3185 AC_DEFINE([FSID_HAS___VAL], [1], [fsid_t has member __val]) ],
3317 [ AC_MSG_RESULT(no) ]) 3186 [ AC_MSG_RESULT([no]) ])
3318]) 3187])
3319 3188
3320AC_CACHE_CHECK([for msg_control field in struct msghdr], 3189AC_CACHE_CHECK([for msg_control field in struct msghdr],
3321 ac_cv_have_control_in_msghdr, [ 3190 ac_cv_have_control_in_msghdr, [
3322 AC_COMPILE_IFELSE( 3191 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3323 [
3324#include <sys/types.h> 3192#include <sys/types.h>
3325#include <sys/socket.h> 3193#include <sys/socket.h>
3326#include <sys/uio.h> 3194#include <sys/uio.h>
3327int main() { 3195 ]], [[
3328#ifdef msg_control 3196#ifdef msg_control
3329#error "msg_control is a macro" 3197#error "msg_control is a macro"
3330exit(1); 3198exit(1);
@@ -3332,178 +3200,161 @@ exit(1);
3332struct msghdr m; 3200struct msghdr m;
3333m.msg_control = 0; 3201m.msg_control = 0;
3334exit(0); 3202exit(0);
3335} 3203 ]])],
3336 ],
3337 [ ac_cv_have_control_in_msghdr="yes" ], 3204 [ ac_cv_have_control_in_msghdr="yes" ],
3338 [ ac_cv_have_control_in_msghdr="no" ] 3205 [ ac_cv_have_control_in_msghdr="no" ]
3339 ) 3206 )
3340]) 3207])
3341if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then 3208if test "x$ac_cv_have_control_in_msghdr" = "xyes" ; then
3342 AC_DEFINE(HAVE_CONTROL_IN_MSGHDR, 1, 3209 AC_DEFINE([HAVE_CONTROL_IN_MSGHDR], [1],
3343 [Define if your system uses ancillary data style 3210 [Define if your system uses ancillary data style
3344 file descriptor passing]) 3211 file descriptor passing])
3345fi 3212fi
3346 3213
3347AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [ 3214AC_CACHE_CHECK([if libc defines __progname], ac_cv_libc_defines___progname, [
3348 AC_TRY_LINK([], 3215 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
3349 [ extern char *__progname; printf("%s", __progname); ], 3216 [[ extern char *__progname; printf("%s", __progname); ]])],
3350 [ ac_cv_libc_defines___progname="yes" ], 3217 [ ac_cv_libc_defines___progname="yes" ],
3351 [ ac_cv_libc_defines___progname="no" ] 3218 [ ac_cv_libc_defines___progname="no"
3352 ) 3219 ])
3353]) 3220])
3354if test "x$ac_cv_libc_defines___progname" = "xyes" ; then 3221if test "x$ac_cv_libc_defines___progname" = "xyes" ; then
3355 AC_DEFINE(HAVE___PROGNAME, 1, [Define if libc defines __progname]) 3222 AC_DEFINE([HAVE___PROGNAME], [1], [Define if libc defines __progname])
3356fi 3223fi
3357 3224
3358AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [ 3225AC_CACHE_CHECK([whether $CC implements __FUNCTION__], ac_cv_cc_implements___FUNCTION__, [
3359 AC_TRY_LINK([ 3226 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]],
3360#include <stdio.h> 3227 [[ printf("%s", __FUNCTION__); ]])],
3361], 3228 [ ac_cv_cc_implements___FUNCTION__="yes" ],
3362 [ printf("%s", __FUNCTION__); ], 3229 [ ac_cv_cc_implements___FUNCTION__="no"
3363 [ ac_cv_cc_implements___FUNCTION__="yes" ], 3230 ])
3364 [ ac_cv_cc_implements___FUNCTION__="no" ]
3365 )
3366]) 3231])
3367if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then 3232if test "x$ac_cv_cc_implements___FUNCTION__" = "xyes" ; then
3368 AC_DEFINE(HAVE___FUNCTION__, 1, 3233 AC_DEFINE([HAVE___FUNCTION__], [1],
3369 [Define if compiler implements __FUNCTION__]) 3234 [Define if compiler implements __FUNCTION__])
3370fi 3235fi
3371 3236
3372AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [ 3237AC_CACHE_CHECK([whether $CC implements __func__], ac_cv_cc_implements___func__, [
3373 AC_TRY_LINK([ 3238 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <stdio.h> ]],
3374#include <stdio.h> 3239 [[ printf("%s", __func__); ]])],
3375], 3240 [ ac_cv_cc_implements___func__="yes" ],
3376 [ printf("%s", __func__); ], 3241 [ ac_cv_cc_implements___func__="no"
3377 [ ac_cv_cc_implements___func__="yes" ], 3242 ])
3378 [ ac_cv_cc_implements___func__="no" ]
3379 )
3380]) 3243])
3381if test "x$ac_cv_cc_implements___func__" = "xyes" ; then 3244if test "x$ac_cv_cc_implements___func__" = "xyes" ; then
3382 AC_DEFINE(HAVE___func__, 1, [Define if compiler implements __func__]) 3245 AC_DEFINE([HAVE___func__], [1], [Define if compiler implements __func__])
3383fi 3246fi
3384 3247
3385AC_CACHE_CHECK([whether va_copy exists], ac_cv_have_va_copy, [ 3248AC_CACHE_CHECK([whether va_copy exists], ac_cv_have_va_copy, [
3386 AC_TRY_LINK( 3249 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
3387 [#include <stdarg.h> 3250#include <stdarg.h>
3388 va_list x,y;], 3251va_list x,y;
3389 [va_copy(x,y);], 3252 ]], [[ va_copy(x,y); ]])],
3390 [ ac_cv_have_va_copy="yes" ], 3253 [ ac_cv_have_va_copy="yes" ],
3391 [ ac_cv_have_va_copy="no" ] 3254 [ ac_cv_have_va_copy="no"
3392 ) 3255 ])
3393]) 3256])
3394if test "x$ac_cv_have_va_copy" = "xyes" ; then 3257if test "x$ac_cv_have_va_copy" = "xyes" ; then
3395 AC_DEFINE(HAVE_VA_COPY, 1, [Define if va_copy exists]) 3258 AC_DEFINE([HAVE_VA_COPY], [1], [Define if va_copy exists])
3396fi 3259fi
3397 3260
3398AC_CACHE_CHECK([whether __va_copy exists], ac_cv_have___va_copy, [ 3261AC_CACHE_CHECK([whether __va_copy exists], ac_cv_have___va_copy, [
3399 AC_TRY_LINK( 3262 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
3400 [#include <stdarg.h> 3263#include <stdarg.h>
3401 va_list x,y;], 3264va_list x,y;
3402 [__va_copy(x,y);], 3265 ]], [[ __va_copy(x,y); ]])],
3403 [ ac_cv_have___va_copy="yes" ], 3266 [ ac_cv_have___va_copy="yes" ], [ ac_cv_have___va_copy="no"
3404 [ ac_cv_have___va_copy="no" ] 3267 ])
3405 )
3406]) 3268])
3407if test "x$ac_cv_have___va_copy" = "xyes" ; then 3269if test "x$ac_cv_have___va_copy" = "xyes" ; then
3408 AC_DEFINE(HAVE___VA_COPY, 1, [Define if __va_copy exists]) 3270 AC_DEFINE([HAVE___VA_COPY], [1], [Define if __va_copy exists])
3409fi 3271fi
3410 3272
3411AC_CACHE_CHECK([whether getopt has optreset support], 3273AC_CACHE_CHECK([whether getopt has optreset support],
3412 ac_cv_have_getopt_optreset, [ 3274 ac_cv_have_getopt_optreset, [
3413 AC_TRY_LINK( 3275 AC_LINK_IFELSE([AC_LANG_PROGRAM([[ #include <getopt.h> ]],
3414 [ 3276 [[ extern int optreset; optreset = 0; ]])],
3415#include <getopt.h> 3277 [ ac_cv_have_getopt_optreset="yes" ],
3416 ], 3278 [ ac_cv_have_getopt_optreset="no"
3417 [ extern int optreset; optreset = 0; ], 3279 ])
3418 [ ac_cv_have_getopt_optreset="yes" ],
3419 [ ac_cv_have_getopt_optreset="no" ]
3420 )
3421]) 3280])
3422if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then 3281if test "x$ac_cv_have_getopt_optreset" = "xyes" ; then
3423 AC_DEFINE(HAVE_GETOPT_OPTRESET, 1, 3282 AC_DEFINE([HAVE_GETOPT_OPTRESET], [1],
3424 [Define if your getopt(3) defines and uses optreset]) 3283 [Define if your getopt(3) defines and uses optreset])
3425fi 3284fi
3426 3285
3427AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [ 3286AC_CACHE_CHECK([if libc defines sys_errlist], ac_cv_libc_defines_sys_errlist, [
3428 AC_TRY_LINK([], 3287 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
3429 [ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);], 3288[[ extern const char *const sys_errlist[]; printf("%s", sys_errlist[0]);]])],
3430 [ ac_cv_libc_defines_sys_errlist="yes" ], 3289 [ ac_cv_libc_defines_sys_errlist="yes" ],
3431 [ ac_cv_libc_defines_sys_errlist="no" ] 3290 [ ac_cv_libc_defines_sys_errlist="no"
3432 ) 3291 ])
3433]) 3292])
3434if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then 3293if test "x$ac_cv_libc_defines_sys_errlist" = "xyes" ; then
3435 AC_DEFINE(HAVE_SYS_ERRLIST, 1, 3294 AC_DEFINE([HAVE_SYS_ERRLIST], [1],
3436 [Define if your system defines sys_errlist[]]) 3295 [Define if your system defines sys_errlist[]])
3437fi 3296fi
3438 3297
3439 3298
3440AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [ 3299AC_CACHE_CHECK([if libc defines sys_nerr], ac_cv_libc_defines_sys_nerr, [
3441 AC_TRY_LINK([], 3300 AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],
3442 [ extern int sys_nerr; printf("%i", sys_nerr);], 3301[[ extern int sys_nerr; printf("%i", sys_nerr);]])],
3443 [ ac_cv_libc_defines_sys_nerr="yes" ], 3302 [ ac_cv_libc_defines_sys_nerr="yes" ],
3444 [ ac_cv_libc_defines_sys_nerr="no" ] 3303 [ ac_cv_libc_defines_sys_nerr="no"
3445 ) 3304 ])
3446]) 3305])
3447if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then 3306if test "x$ac_cv_libc_defines_sys_nerr" = "xyes" ; then
3448 AC_DEFINE(HAVE_SYS_NERR, 1, [Define if your system defines sys_nerr]) 3307 AC_DEFINE([HAVE_SYS_NERR], [1], [Define if your system defines sys_nerr])
3449fi 3308fi
3450 3309
3451# Check libraries needed by DNS fingerprint support 3310# Check libraries needed by DNS fingerprint support
3452AC_SEARCH_LIBS(getrrsetbyname, resolv, 3311AC_SEARCH_LIBS([getrrsetbyname], [resolv],
3453 [AC_DEFINE(HAVE_GETRRSETBYNAME, 1, 3312 [AC_DEFINE([HAVE_GETRRSETBYNAME], [1],
3454 [Define if getrrsetbyname() exists])], 3313 [Define if getrrsetbyname() exists])],
3455 [ 3314 [
3456 # Needed by our getrrsetbyname() 3315 # Needed by our getrrsetbyname()
3457 AC_SEARCH_LIBS(res_query, resolv) 3316 AC_SEARCH_LIBS([res_query], [resolv])
3458 AC_SEARCH_LIBS(dn_expand, resolv) 3317 AC_SEARCH_LIBS([dn_expand], [resolv])
3459 AC_MSG_CHECKING(if res_query will link) 3318 AC_MSG_CHECKING([if res_query will link])
3460 AC_LINK_IFELSE([ 3319 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
3461#include "confdefs.h"
3462#include <sys/types.h> 3320#include <sys/types.h>
3463#include <netinet/in.h> 3321#include <netinet/in.h>
3464#include <arpa/nameser.h> 3322#include <arpa/nameser.h>
3465#include <netdb.h> 3323#include <netdb.h>
3466#include <resolv.h> 3324#include <resolv.h>
3467int main() 3325 ]], [[
3468{
3469 res_query (0, 0, 0, 0, 0); 3326 res_query (0, 0, 0, 0, 0);
3470 return 0; 3327 ]])],
3471} 3328 AC_MSG_RESULT([yes]),
3472 ], 3329 [AC_MSG_RESULT([no])
3473 AC_MSG_RESULT(yes),
3474 [AC_MSG_RESULT(no)
3475 saved_LIBS="$LIBS" 3330 saved_LIBS="$LIBS"
3476 LIBS="$LIBS -lresolv" 3331 LIBS="$LIBS -lresolv"
3477 AC_MSG_CHECKING(for res_query in -lresolv) 3332 AC_MSG_CHECKING([for res_query in -lresolv])
3478 AC_LINK_IFELSE([ 3333 AC_LINK_IFELSE([AC_LANG_PROGRAM([[
3479#include "confdefs.h"
3480#include <sys/types.h> 3334#include <sys/types.h>
3481#include <netinet/in.h> 3335#include <netinet/in.h>
3482#include <arpa/nameser.h> 3336#include <arpa/nameser.h>
3483#include <netdb.h> 3337#include <netdb.h>
3484#include <resolv.h> 3338#include <resolv.h>
3485int main() 3339 ]], [[
3486{
3487 res_query (0, 0, 0, 0, 0); 3340 res_query (0, 0, 0, 0, 0);
3488 return 0; 3341 ]])],
3489} 3342 [AC_MSG_RESULT([yes])],
3490 ],
3491 [AC_MSG_RESULT(yes)],
3492 [LIBS="$saved_LIBS" 3343 [LIBS="$saved_LIBS"
3493 AC_MSG_RESULT(no)]) 3344 AC_MSG_RESULT([no])])
3494 ]) 3345 ])
3495 AC_CHECK_FUNCS(_getshort _getlong) 3346 AC_CHECK_FUNCS([_getshort _getlong])
3496 AC_CHECK_DECLS([_getshort, _getlong], , , 3347 AC_CHECK_DECLS([_getshort, _getlong], , ,
3497 [#include <sys/types.h> 3348 [#include <sys/types.h>
3498 #include <arpa/nameser.h>]) 3349 #include <arpa/nameser.h>])
3499 AC_CHECK_MEMBER(HEADER.ad, 3350 AC_CHECK_MEMBER([HEADER.ad],
3500 [AC_DEFINE(HAVE_HEADER_AD, 1, 3351 [AC_DEFINE([HAVE_HEADER_AD], [1],
3501 [Define if HEADER.ad exists in arpa/nameser.h])],, 3352 [Define if HEADER.ad exists in arpa/nameser.h])], ,
3502 [#include <arpa/nameser.h>]) 3353 [#include <arpa/nameser.h>])
3503 ]) 3354 ])
3504 3355
3505AC_MSG_CHECKING(if struct __res_state _res is an extern) 3356AC_MSG_CHECKING([if struct __res_state _res is an extern])
3506AC_LINK_IFELSE([ 3357AC_LINK_IFELSE([AC_LANG_PROGRAM([[
3507#include <stdio.h> 3358#include <stdio.h>
3508#if HAVE_SYS_TYPES_H 3359#if HAVE_SYS_TYPES_H
3509# include <sys/types.h> 3360# include <sys/types.h>
@@ -3512,43 +3363,43 @@ AC_LINK_IFELSE([
3512#include <arpa/nameser.h> 3363#include <arpa/nameser.h>
3513#include <resolv.h> 3364#include <resolv.h>
3514extern struct __res_state _res; 3365extern struct __res_state _res;
3515int main() { return 0; } 3366 ]], [[ ]])],
3516 ], 3367 [AC_MSG_RESULT([yes])
3517 [AC_MSG_RESULT(yes) 3368 AC_DEFINE([HAVE__RES_EXTERN], [1],
3518 AC_DEFINE(HAVE__RES_EXTERN, 1,
3519 [Define if you have struct __res_state _res as an extern]) 3369 [Define if you have struct __res_state _res as an extern])
3520 ], 3370 ],
3521 [ AC_MSG_RESULT(no) ] 3371 [ AC_MSG_RESULT([no]) ]
3522) 3372)
3523 3373
3524# Check whether user wants SELinux support 3374# Check whether user wants SELinux support
3525SELINUX_MSG="no" 3375SELINUX_MSG="no"
3526LIBSELINUX="" 3376LIBSELINUX=""
3527AC_ARG_WITH(selinux, 3377AC_ARG_WITH([selinux],
3528 [ --with-selinux Enable SELinux support], 3378 [ --with-selinux Enable SELinux support],
3529 [ if test "x$withval" != "xno" ; then 3379 [ if test "x$withval" != "xno" ; then
3530 save_LIBS="$LIBS" 3380 save_LIBS="$LIBS"
3531 AC_DEFINE(WITH_SELINUX,1,[Define if you want SELinux support.]) 3381 AC_DEFINE([WITH_SELINUX], [1],
3382 [Define if you want SELinux support.])
3532 SELINUX_MSG="yes" 3383 SELINUX_MSG="yes"
3533 AC_CHECK_HEADER([selinux/selinux.h], , 3384 AC_CHECK_HEADER([selinux/selinux.h], ,
3534 AC_MSG_ERROR(SELinux support requires selinux.h header)) 3385 AC_MSG_ERROR([SELinux support requires selinux.h header]))
3535 AC_CHECK_LIB(selinux, setexeccon, 3386 AC_CHECK_LIB([selinux], [setexeccon],
3536 [ LIBSELINUX="-lselinux" 3387 [ LIBSELINUX="-lselinux"
3537 LIBS="$LIBS -lselinux" 3388 LIBS="$LIBS -lselinux"
3538 ], 3389 ],
3539 AC_MSG_ERROR(SELinux support requires libselinux library)) 3390 AC_MSG_ERROR([SELinux support requires libselinux library]))
3540 SSHLIBS="$SSHLIBS $LIBSELINUX" 3391 SSHLIBS="$SSHLIBS $LIBSELINUX"
3541 SSHDLIBS="$SSHDLIBS $LIBSELINUX" 3392 SSHDLIBS="$SSHDLIBS $LIBSELINUX"
3542 AC_CHECK_FUNCS(getseuserbyname get_default_context_with_level) 3393 AC_CHECK_FUNCS([getseuserbyname get_default_context_with_level])
3543 LIBS="$save_LIBS" 3394 LIBS="$save_LIBS"
3544 fi ] 3395 fi ]
3545) 3396)
3546AC_SUBST(SSHLIBS) 3397AC_SUBST([SSHLIBS])
3547AC_SUBST(SSHDLIBS) 3398AC_SUBST([SSHDLIBS])
3548 3399
3549# Check whether user wants Kerberos 5 support 3400# Check whether user wants Kerberos 5 support
3550KRB5_MSG="no" 3401KRB5_MSG="no"
3551AC_ARG_WITH(kerberos5, 3402AC_ARG_WITH([kerberos5],
3552 [ --with-kerberos5=PATH Enable Kerberos 5 support], 3403 [ --with-kerberos5=PATH Enable Kerberos 5 support],
3553 [ if test "x$withval" != "xno" ; then 3404 [ if test "x$withval" != "xno" ; then
3554 if test "x$withval" = "xyes" ; then 3405 if test "x$withval" = "xyes" ; then
@@ -3557,73 +3408,72 @@ AC_ARG_WITH(kerberos5,
3557 KRB5ROOT=${withval} 3408 KRB5ROOT=${withval}
3558 fi 3409 fi
3559 3410
3560 AC_DEFINE(KRB5, 1, [Define if you want Kerberos 5 support]) 3411 AC_DEFINE([KRB5], [1], [Define if you want Kerberos 5 support])
3561 KRB5_MSG="yes" 3412 KRB5_MSG="yes"
3562 3413
3563 AC_PATH_PROG([KRB5CONF],[krb5-config], 3414 AC_PATH_PROG([KRB5CONF], [krb5-config],
3564 [$KRB5ROOT/bin/krb5-config], 3415 [$KRB5ROOT/bin/krb5-config],
3565 [$KRB5ROOT/bin:$PATH]) 3416 [$KRB5ROOT/bin:$PATH])
3566 if test -x $KRB5CONF ; then 3417 if test -x $KRB5CONF ; then
3567 3418
3568 AC_MSG_CHECKING(for gssapi support) 3419 AC_MSG_CHECKING([for gssapi support])
3569 if $KRB5CONF | grep gssapi >/dev/null ; then 3420 if $KRB5CONF | grep gssapi >/dev/null ; then
3570 AC_MSG_RESULT(yes) 3421 AC_MSG_RESULT([yes])
3571 AC_DEFINE(GSSAPI, 1, 3422 AC_DEFINE([GSSAPI], [1],
3572 [Define this if you want GSSAPI 3423 [Define this if you want GSSAPI
3573 support in the version 2 protocol]) 3424 support in the version 2 protocol])
3574 k5confopts=gssapi 3425 k5confopts=gssapi
3575 else 3426 else
3576 AC_MSG_RESULT(no) 3427 AC_MSG_RESULT([no])
3577 k5confopts="" 3428 k5confopts=""
3578 fi 3429 fi
3579 K5CFLAGS="`$KRB5CONF --cflags $k5confopts`" 3430 K5CFLAGS="`$KRB5CONF --cflags $k5confopts`"
3580 K5LIBS="`$KRB5CONF --libs $k5confopts`" 3431 K5LIBS="`$KRB5CONF --libs $k5confopts`"
3581 CPPFLAGS="$CPPFLAGS $K5CFLAGS" 3432 CPPFLAGS="$CPPFLAGS $K5CFLAGS"
3582 AC_MSG_CHECKING(whether we are using Heimdal) 3433 AC_MSG_CHECKING([whether we are using Heimdal])
3583 AC_TRY_COMPILE([ #include <krb5.h> ], 3434 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <krb5.h>
3584 [ char *tmp = heimdal_version; ], 3435 ]], [[ char *tmp = heimdal_version; ]])],
3585 [ AC_MSG_RESULT(yes) 3436 [ AC_MSG_RESULT([yes])
3586 AC_DEFINE(HEIMDAL, 1, 3437 AC_DEFINE([HEIMDAL], [1],
3587 [Define this if you are using the 3438 [Define this if you are using the Heimdal
3588 Heimdal version of Kerberos V5]) ], 3439 version of Kerberos V5]) ],
3589 AC_MSG_RESULT(no) 3440 [AC_MSG_RESULT([no])
3590 ) 3441 ])
3591 else 3442 else
3592 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include" 3443 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include"
3593 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib" 3444 LDFLAGS="$LDFLAGS -L${KRB5ROOT}/lib"
3594 AC_MSG_CHECKING(whether we are using Heimdal) 3445 AC_MSG_CHECKING([whether we are using Heimdal])
3595 AC_TRY_COMPILE([ #include <krb5.h> ], 3446 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ #include <krb5.h>
3596 [ char *tmp = heimdal_version; ], 3447 ]], [[ char *tmp = heimdal_version; ]])],
3597 [ AC_MSG_RESULT(yes) 3448 [ AC_MSG_RESULT([yes])
3598 AC_DEFINE(HEIMDAL) 3449 AC_DEFINE([HEIMDAL])
3599 K5LIBS="-lkrb5" 3450 K5LIBS="-lkrb5"
3600 K5LIBS="$K5LIBS -lcom_err -lasn1" 3451 K5LIBS="$K5LIBS -lcom_err -lasn1"
3601 AC_CHECK_LIB(roken, net_write, 3452 AC_CHECK_LIB([roken], [net_write],
3602 [K5LIBS="$K5LIBS -lroken"]) 3453 [K5LIBS="$K5LIBS -lroken"])
3603 AC_CHECK_LIB(des, des_cbc_encrypt, 3454 AC_CHECK_LIB([des], [des_cbc_encrypt],
3604 [K5LIBS="$K5LIBS -ldes"]) 3455 [K5LIBS="$K5LIBS -ldes"])
3605 ], 3456 ], [ AC_MSG_RESULT([no])
3606 [ AC_MSG_RESULT(no)
3607 K5LIBS="-lkrb5 -lk5crypto -lcom_err" 3457 K5LIBS="-lkrb5 -lk5crypto -lcom_err"
3608 ] 3458
3609 ) 3459 ])
3610 AC_SEARCH_LIBS(dn_expand, resolv) 3460 AC_SEARCH_LIBS([dn_expand], [resolv])
3611 3461
3612 AC_CHECK_LIB(gssapi_krb5, gss_init_sec_context, 3462 AC_CHECK_LIB([gssapi_krb5], [gss_init_sec_context],
3613 [ AC_DEFINE(GSSAPI) 3463 [ AC_DEFINE([GSSAPI])
3614 K5LIBS="-lgssapi_krb5 $K5LIBS" ], 3464 K5LIBS="-lgssapi_krb5 $K5LIBS" ],
3615 [ AC_CHECK_LIB(gssapi, gss_init_sec_context, 3465 [ AC_CHECK_LIB([gssapi], [gss_init_sec_context],
3616 [ AC_DEFINE(GSSAPI) 3466 [ AC_DEFINE([GSSAPI])
3617 K5LIBS="-lgssapi $K5LIBS" ], 3467 K5LIBS="-lgssapi $K5LIBS" ],
3618 AC_MSG_WARN([Cannot find any suitable gss-api library - build may fail]), 3468 AC_MSG_WARN([Cannot find any suitable gss-api library - build may fail]),
3619 $K5LIBS) 3469 $K5LIBS)
3620 ], 3470 ],
3621 $K5LIBS) 3471 $K5LIBS)
3622 3472
3623 AC_CHECK_HEADER(gssapi.h, , 3473 AC_CHECK_HEADER([gssapi.h], ,
3624 [ unset ac_cv_header_gssapi_h 3474 [ unset ac_cv_header_gssapi_h
3625 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi" 3475 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
3626 AC_CHECK_HEADERS(gssapi.h, , 3476 AC_CHECK_HEADERS([gssapi.h], ,
3627 AC_MSG_WARN([Cannot find any suitable gss-api header - build may fail]) 3477 AC_MSG_WARN([Cannot find any suitable gss-api header - build may fail])
3628 ) 3478 )
3629 ] 3479 ]
@@ -3631,7 +3481,7 @@ AC_ARG_WITH(kerberos5,
3631 3481
3632 oldCPP="$CPPFLAGS" 3482 oldCPP="$CPPFLAGS"
3633 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi" 3483 CPPFLAGS="$CPPFLAGS -I${KRB5ROOT}/include/gssapi"
3634 AC_CHECK_HEADER(gssapi_krb5.h, , 3484 AC_CHECK_HEADER([gssapi_krb5.h], ,
3635 [ CPPFLAGS="$oldCPP" ]) 3485 [ CPPFLAGS="$oldCPP" ])
3636 3486
3637 fi 3487 fi
@@ -3642,13 +3492,13 @@ AC_ARG_WITH(kerberos5,
3642 blibpath="$blibpath:${KRB5ROOT}/lib" 3492 blibpath="$blibpath:${KRB5ROOT}/lib"
3643 fi 3493 fi
3644 3494
3645 AC_CHECK_HEADERS(gssapi.h gssapi/gssapi.h) 3495 AC_CHECK_HEADERS([gssapi.h gssapi/gssapi.h])
3646 AC_CHECK_HEADERS(gssapi_krb5.h gssapi/gssapi_krb5.h) 3496 AC_CHECK_HEADERS([gssapi_krb5.h gssapi/gssapi_krb5.h])
3647 AC_CHECK_HEADERS(gssapi_generic.h gssapi/gssapi_generic.h) 3497 AC_CHECK_HEADERS([gssapi_generic.h gssapi/gssapi_generic.h])
3648 3498
3649 LIBS="$LIBS $K5LIBS" 3499 LIBS="$LIBS $K5LIBS"
3650 AC_SEARCH_LIBS(k_hasafs, kafs, AC_DEFINE(USE_AFS, 1, 3500 AC_SEARCH_LIBS([k_hasafs], [kafs], [AC_DEFINE([USE_AFS], [1],
3651 [Define this if you want to use libkafs' AFS support])) 3501 [Define this if you want to use libkafs' AFS support])])
3652 fi 3502 fi
3653 ] 3503 ]
3654) 3504)
@@ -3656,7 +3506,7 @@ AC_ARG_WITH(kerberos5,
3656# Looking for programs, paths and files 3506# Looking for programs, paths and files
3657 3507
3658PRIVSEP_PATH=/var/empty 3508PRIVSEP_PATH=/var/empty
3659AC_ARG_WITH(privsep-path, 3509AC_ARG_WITH([privsep-path],
3660 [ --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)], 3510 [ --with-privsep-path=xxx Path for privilege separation chroot (default=/var/empty)],
3661 [ 3511 [
3662 if test -n "$withval" && test "x$withval" != "xno" && \ 3512 if test -n "$withval" && test "x$withval" != "xno" && \
@@ -3665,9 +3515,9 @@ AC_ARG_WITH(privsep-path,
3665 fi 3515 fi
3666 ] 3516 ]
3667) 3517)
3668AC_SUBST(PRIVSEP_PATH) 3518AC_SUBST([PRIVSEP_PATH])
3669 3519
3670AC_ARG_WITH(xauth, 3520AC_ARG_WITH([xauth],
3671 [ --with-xauth=PATH Specify path to xauth program ], 3521 [ --with-xauth=PATH Specify path to xauth program ],
3672 [ 3522 [
3673 if test -n "$withval" && test "x$withval" != "xno" && \ 3523 if test -n "$withval" && test "x$withval" != "xno" && \
@@ -3681,7 +3531,7 @@ AC_ARG_WITH(xauth,
3681 TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11" 3531 TestPath="${TestPath}${PATH_SEPARATOR}/usr/bin/X11"
3682 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin" 3532 TestPath="${TestPath}${PATH_SEPARATOR}/usr/X11R6/bin"
3683 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin" 3533 TestPath="${TestPath}${PATH_SEPARATOR}/usr/openwin/bin"
3684 AC_PATH_PROG(xauth_path, xauth, , $TestPath) 3534 AC_PATH_PROG([xauth_path], [xauth], , [$TestPath])
3685 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then 3535 if (test ! -z "$xauth_path" && test -x "/usr/openwin/bin/xauth") ; then
3686 xauth_path="/usr/openwin/bin/xauth" 3536 xauth_path="/usr/openwin/bin/xauth"
3687 fi 3537 fi
@@ -3689,7 +3539,7 @@ AC_ARG_WITH(xauth,
3689) 3539)
3690 3540
3691STRIP_OPT=-s 3541STRIP_OPT=-s
3692AC_ARG_ENABLE(strip, 3542AC_ARG_ENABLE([strip],
3693 [ --disable-strip Disable calling strip(1) on install], 3543 [ --disable-strip Disable calling strip(1) on install],
3694 [ 3544 [
3695 if test "x$enableval" = "xno" ; then 3545 if test "x$enableval" = "xno" ; then
@@ -3697,24 +3547,99 @@ AC_ARG_ENABLE(strip,
3697 fi 3547 fi
3698 ] 3548 ]
3699) 3549)
3700AC_SUBST(STRIP_OPT) 3550AC_SUBST([STRIP_OPT])
3701 3551
3702if test -z "$xauth_path" ; then 3552if test -z "$xauth_path" ; then
3703 XAUTH_PATH="undefined" 3553 XAUTH_PATH="undefined"
3704 AC_SUBST(XAUTH_PATH) 3554 AC_SUBST([XAUTH_PATH])
3705else 3555else
3706 AC_DEFINE_UNQUOTED(XAUTH_PATH, "$xauth_path", 3556 AC_DEFINE_UNQUOTED([XAUTH_PATH], ["$xauth_path"],
3707 [Define if xauth is found in your path]) 3557 [Define if xauth is found in your path])
3708 XAUTH_PATH=$xauth_path 3558 XAUTH_PATH=$xauth_path
3709 AC_SUBST(XAUTH_PATH) 3559 AC_SUBST([XAUTH_PATH])
3710fi 3560fi
3711 3561
3712# Check for mail directory (last resort if we cannot get it from headers) 3562dnl # --with-maildir=/path/to/mail gets top priority.
3713if test ! -z "$MAIL" ; then 3563dnl # if maildir is set in the platform case statement above we use that.
3714 maildir=`dirname $MAIL` 3564dnl # Otherwise we run a program to get the dir from system headers.
3715 AC_DEFINE_UNQUOTED(MAIL_DIRECTORY, "$maildir", 3565dnl # We first look for _PATH_MAILDIR then MAILDIR then _PATH_MAIL
3716 [Set this to your mail directory if you don't have maillock.h]) 3566dnl # If we find _PATH_MAILDIR we do nothing because that is what
3717fi 3567dnl # session.c expects anyway. Otherwise we set to the value found
3568dnl # stripping any trailing slash. If for some strage reason our program
3569dnl # does not find what it needs, we default to /var/spool/mail.
3570# Check for mail directory
3571AC_ARG_WITH([maildir],
3572 [ --with-maildir=/path/to/mail Specify your system mail directory],
3573 [
3574 if test "X$withval" != X && test "x$withval" != xno && \
3575 test "x${withval}" != xyes; then
3576 AC_DEFINE_UNQUOTED([MAIL_DIRECTORY], ["$withval"],
3577 [Set this to your mail directory if you do not have _PATH_MAILDIR])
3578 fi
3579 ],[
3580 if test "X$maildir" != "X"; then
3581 AC_DEFINE_UNQUOTED([MAIL_DIRECTORY], ["$maildir"])
3582 else
3583 AC_MSG_CHECKING([Discovering system mail directory])
3584 AC_RUN_IFELSE(
3585 [AC_LANG_PROGRAM([[
3586#include <stdio.h>
3587#include <string.h>
3588#ifdef HAVE_PATHS_H
3589#include <paths.h>
3590#endif
3591#ifdef HAVE_MAILLOCK_H
3592#include <maillock.h>
3593#endif
3594#define DATA "conftest.maildir"
3595 ]], [[
3596 FILE *fd;
3597 int rc;
3598
3599 fd = fopen(DATA,"w");
3600 if(fd == NULL)
3601 exit(1);
3602
3603#if defined (_PATH_MAILDIR)
3604 if ((rc = fprintf(fd ,"_PATH_MAILDIR:%s\n", _PATH_MAILDIR)) <0)
3605 exit(1);
3606#elif defined (MAILDIR)
3607 if ((rc = fprintf(fd ,"MAILDIR:%s\n", MAILDIR)) <0)
3608 exit(1);
3609#elif defined (_PATH_MAIL)
3610 if ((rc = fprintf(fd ,"_PATH_MAIL:%s\n", _PATH_MAIL)) <0)
3611 exit(1);
3612#else
3613 exit (2);
3614#endif
3615
3616 exit(0);
3617 ]])],
3618 [
3619 maildir_what=`awk -F: '{print $1}' conftest.maildir`
3620 maildir=`awk -F: '{print $2}' conftest.maildir \
3621 | sed 's|/$||'`
3622 AC_MSG_RESULT([Using: $maildir from $maildir_what])
3623 if test "x$maildir_what" != "x_PATH_MAILDIR"; then
3624 AC_DEFINE_UNQUOTED([MAIL_DIRECTORY], ["$maildir"])
3625 fi
3626 ],
3627 [
3628 if test "X$ac_status" = "X2";then
3629# our test program didn't find it. Default to /var/spool/mail
3630 AC_MSG_RESULT([Using: default value of /var/spool/mail])
3631 AC_DEFINE_UNQUOTED([MAIL_DIRECTORY], ["/var/spool/mail"])
3632 else
3633 AC_MSG_RESULT([*** not found ***])
3634 fi
3635 ],
3636 [
3637 AC_MSG_WARN([cross compiling: use --with-maildir=/path/to/mail])
3638 ]
3639 )
3640 fi
3641 ]
3642) # maildir
3718 3643
3719if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then 3644if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
3720 AC_MSG_WARN([cross compiling: Disabling /dev/ptmx test]) 3645 AC_MSG_WARN([cross compiling: Disabling /dev/ptmx test])
@@ -3722,9 +3647,9 @@ if test ! -z "$cross_compiling" && test "x$cross_compiling" = "xyes"; then
3722fi 3647fi
3723if test -z "$no_dev_ptmx" ; then 3648if test -z "$no_dev_ptmx" ; then
3724 if test "x$disable_ptmx_check" != "xyes" ; then 3649 if test "x$disable_ptmx_check" != "xyes" ; then
3725 AC_CHECK_FILE("/dev/ptmx", 3650 AC_CHECK_FILE(["/dev/ptmx"],
3726 [ 3651 [
3727 AC_DEFINE_UNQUOTED(HAVE_DEV_PTMX, 1, 3652 AC_DEFINE_UNQUOTED([HAVE_DEV_PTMX], [1],
3728 [Define if you have /dev/ptmx]) 3653 [Define if you have /dev/ptmx])
3729 have_dev_ptmx=1 3654 have_dev_ptmx=1
3730 ] 3655 ]
@@ -3733,9 +3658,9 @@ if test -z "$no_dev_ptmx" ; then
3733fi 3658fi
3734 3659
3735if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then 3660if test ! -z "$cross_compiling" && test "x$cross_compiling" != "xyes"; then
3736 AC_CHECK_FILE("/dev/ptc", 3661 AC_CHECK_FILE(["/dev/ptc"],
3737 [ 3662 [
3738 AC_DEFINE_UNQUOTED(HAVE_DEV_PTS_AND_PTC, 1, 3663 AC_DEFINE_UNQUOTED([HAVE_DEV_PTS_AND_PTC], [1],
3739 [Define if you have /dev/ptc]) 3664 [Define if you have /dev/ptc])
3740 have_dev_ptc=1 3665 have_dev_ptc=1
3741 ] 3666 ]
@@ -3745,7 +3670,7 @@ else
3745fi 3670fi
3746 3671
3747# Options from here on. Some of these are preset by platform above 3672# Options from here on. Some of these are preset by platform above
3748AC_ARG_WITH(mantype, 3673AC_ARG_WITH([mantype],
3749 [ --with-mantype=man|cat|doc Set man page type], 3674 [ --with-mantype=man|cat|doc Set man page type],
3750 [ 3675 [
3751 case "$withval" in 3676 case "$withval" in
@@ -3753,14 +3678,14 @@ AC_ARG_WITH(mantype,
3753 MANTYPE=$withval 3678 MANTYPE=$withval
3754 ;; 3679 ;;
3755 *) 3680 *)
3756 AC_MSG_ERROR(invalid man type: $withval) 3681 AC_MSG_ERROR([invalid man type: $withval])
3757 ;; 3682 ;;
3758 esac 3683 esac
3759 ] 3684 ]
3760) 3685)
3761if test -z "$MANTYPE"; then 3686if test -z "$MANTYPE"; then
3762 TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb" 3687 TestPath="/usr/bin${PATH_SEPARATOR}/usr/ucb"
3763 AC_PATH_PROGS(NROFF, nroff awf, /bin/false, $TestPath) 3688 AC_PATH_PROGS([NROFF], [nroff awf], [/bin/false], [$TestPath])
3764 if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then 3689 if ${NROFF} -mdoc ${srcdir}/ssh.1 >/dev/null 2>&1; then
3765 MANTYPE=doc 3690 MANTYPE=doc
3766 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then 3691 elif ${NROFF} -man ${srcdir}/ssh.1 >/dev/null 2>&1; then
@@ -3769,21 +3694,21 @@ if test -z "$MANTYPE"; then
3769 MANTYPE=cat 3694 MANTYPE=cat
3770 fi 3695 fi
3771fi 3696fi
3772AC_SUBST(MANTYPE) 3697AC_SUBST([MANTYPE])
3773if test "$MANTYPE" = "doc"; then 3698if test "$MANTYPE" = "doc"; then
3774 mansubdir=man; 3699 mansubdir=man;
3775else 3700else
3776 mansubdir=$MANTYPE; 3701 mansubdir=$MANTYPE;
3777fi 3702fi
3778AC_SUBST(mansubdir) 3703AC_SUBST([mansubdir])
3779 3704
3780# Check whether to enable MD5 passwords 3705# Check whether to enable MD5 passwords
3781MD5_MSG="no" 3706MD5_MSG="no"
3782AC_ARG_WITH(md5-passwords, 3707AC_ARG_WITH([md5-passwords],
3783 [ --with-md5-passwords Enable use of MD5 passwords], 3708 [ --with-md5-passwords Enable use of MD5 passwords],
3784 [ 3709 [
3785 if test "x$withval" != "xno" ; then 3710 if test "x$withval" != "xno" ; then
3786 AC_DEFINE(HAVE_MD5_PASSWORDS, 1, 3711 AC_DEFINE([HAVE_MD5_PASSWORDS], [1],
3787 [Define if you want to allow MD5 passwords]) 3712 [Define if you want to allow MD5 passwords])
3788 MD5_MSG="yes" 3713 MD5_MSG="yes"
3789 fi 3714 fi
@@ -3791,11 +3716,11 @@ AC_ARG_WITH(md5-passwords,
3791) 3716)
3792 3717
3793# Whether to disable shadow password support 3718# Whether to disable shadow password support
3794AC_ARG_WITH(shadow, 3719AC_ARG_WITH([shadow],
3795 [ --without-shadow Disable shadow password support], 3720 [ --without-shadow Disable shadow password support],
3796 [ 3721 [
3797 if test "x$withval" = "xno" ; then 3722 if test "x$withval" = "xno" ; then
3798 AC_DEFINE(DISABLE_SHADOW) 3723 AC_DEFINE([DISABLE_SHADOW])
3799 disable_shadow=yes 3724 disable_shadow=yes
3800 fi 3725 fi
3801 ] 3726 ]
@@ -3803,37 +3728,36 @@ AC_ARG_WITH(shadow,
3803 3728
3804if test -z "$disable_shadow" ; then 3729if test -z "$disable_shadow" ; then
3805 AC_MSG_CHECKING([if the systems has expire shadow information]) 3730 AC_MSG_CHECKING([if the systems has expire shadow information])
3806 AC_TRY_COMPILE( 3731 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
3807 [
3808#include <sys/types.h> 3732#include <sys/types.h>
3809#include <shadow.h> 3733#include <shadow.h>
3810 struct spwd sp; 3734struct spwd sp;
3811 ],[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ], 3735 ]], [[ sp.sp_expire = sp.sp_lstchg = sp.sp_inact = 0; ]])],
3812 [ sp_expire_available=yes ], [] 3736 [ sp_expire_available=yes ], [
3813 ) 3737 ])
3814 3738
3815 if test "x$sp_expire_available" = "xyes" ; then 3739 if test "x$sp_expire_available" = "xyes" ; then
3816 AC_MSG_RESULT(yes) 3740 AC_MSG_RESULT([yes])
3817 AC_DEFINE(HAS_SHADOW_EXPIRE, 1, 3741 AC_DEFINE([HAS_SHADOW_EXPIRE], [1],
3818 [Define if you want to use shadow password expire field]) 3742 [Define if you want to use shadow password expire field])
3819 else 3743 else
3820 AC_MSG_RESULT(no) 3744 AC_MSG_RESULT([no])
3821 fi 3745 fi
3822fi 3746fi
3823 3747
3824# Use ip address instead of hostname in $DISPLAY 3748# Use ip address instead of hostname in $DISPLAY
3825if test ! -z "$IPADDR_IN_DISPLAY" ; then 3749if test ! -z "$IPADDR_IN_DISPLAY" ; then
3826 DISPLAY_HACK_MSG="yes" 3750 DISPLAY_HACK_MSG="yes"
3827 AC_DEFINE(IPADDR_IN_DISPLAY, 1, 3751 AC_DEFINE([IPADDR_IN_DISPLAY], [1],
3828 [Define if you need to use IP address 3752 [Define if you need to use IP address
3829 instead of hostname in $DISPLAY]) 3753 instead of hostname in $DISPLAY])
3830else 3754else
3831 DISPLAY_HACK_MSG="no" 3755 DISPLAY_HACK_MSG="no"
3832 AC_ARG_WITH(ipaddr-display, 3756 AC_ARG_WITH([ipaddr-display],
3833 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY], 3757 [ --with-ipaddr-display Use ip address instead of hostname in \$DISPLAY],
3834 [ 3758 [
3835 if test "x$withval" != "xno" ; then 3759 if test "x$withval" != "xno" ; then
3836 AC_DEFINE(IPADDR_IN_DISPLAY) 3760 AC_DEFINE([IPADDR_IN_DISPLAY])
3837 DISPLAY_HACK_MSG="yes" 3761 DISPLAY_HACK_MSG="yes"
3838 fi 3762 fi
3839 ] 3763 ]
@@ -3841,7 +3765,7 @@ else
3841fi 3765fi
3842 3766
3843# check for /etc/default/login and use it if present. 3767# check for /etc/default/login and use it if present.
3844AC_ARG_ENABLE(etc-default-login, 3768AC_ARG_ENABLE([etc-default-login],
3845 [ --disable-etc-default-login Disable using PATH from /etc/default/login [no]], 3769 [ --disable-etc-default-login Disable using PATH from /etc/default/login [no]],
3846 [ if test "x$enableval" = "xno"; then 3770 [ if test "x$enableval" = "xno"; then
3847 AC_MSG_NOTICE([/etc/default/login handling disabled]) 3771 AC_MSG_NOTICE([/etc/default/login handling disabled])
@@ -3859,10 +3783,10 @@ AC_ARG_ENABLE(etc-default-login,
3859) 3783)
3860 3784
3861if test "x$etc_default_login" != "xno"; then 3785if test "x$etc_default_login" != "xno"; then
3862 AC_CHECK_FILE("/etc/default/login", 3786 AC_CHECK_FILE(["/etc/default/login"],
3863 [ external_path_file=/etc/default/login ]) 3787 [ external_path_file=/etc/default/login ])
3864 if test "x$external_path_file" = "x/etc/default/login"; then 3788 if test "x$external_path_file" = "x/etc/default/login"; then
3865 AC_DEFINE(HAVE_ETC_DEFAULT_LOGIN, 1, 3789 AC_DEFINE([HAVE_ETC_DEFAULT_LOGIN], [1],
3866 [Define if your system has /etc/default/login]) 3790 [Define if your system has /etc/default/login])
3867 fi 3791 fi
3868fi 3792fi
@@ -3875,7 +3799,7 @@ fi
3875 3799
3876# Whether to mess with the default path 3800# Whether to mess with the default path
3877SERVER_PATH_MSG="(default)" 3801SERVER_PATH_MSG="(default)"
3878AC_ARG_WITH(default-path, 3802AC_ARG_WITH([default-path],
3879 [ --with-default-path= Specify default \$PATH environment for server], 3803 [ --with-default-path= Specify default \$PATH environment for server],
3880 [ 3804 [
3881 if test "x$external_path_file" = "x/etc/login.conf" ; then 3805 if test "x$external_path_file" = "x/etc/login.conf" ; then
@@ -3901,7 +3825,7 @@ If PATH is defined in $external_path_file, ensure the path to scp is included,
3901otherwise scp will not work.]) 3825otherwise scp will not work.])
3902 fi 3826 fi
3903 AC_RUN_IFELSE( 3827 AC_RUN_IFELSE(
3904 [AC_LANG_SOURCE([[ 3828 [AC_LANG_PROGRAM([[
3905/* find out what STDPATH is */ 3829/* find out what STDPATH is */
3906#include <stdio.h> 3830#include <stdio.h>
3907#ifdef HAVE_PATHS_H 3831#ifdef HAVE_PATHS_H
@@ -3918,9 +3842,7 @@ otherwise scp will not work.])
3918#include <sys/stat.h> 3842#include <sys/stat.h>
3919#include <fcntl.h> 3843#include <fcntl.h>
3920#define DATA "conftest.stdpath" 3844#define DATA "conftest.stdpath"
3921 3845 ]], [[
3922main()
3923{
3924 FILE *fd; 3846 FILE *fd;
3925 int rc; 3847 int rc;
3926 3848
@@ -3932,7 +3854,6 @@ main()
3932 exit(1); 3854 exit(1);
3933 3855
3934 exit(0); 3856 exit(0);
3935}
3936 ]])], 3857 ]])],
3937 [ user_path=`cat conftest.stdpath` ], 3858 [ user_path=`cat conftest.stdpath` ],
3938 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ], 3859 [ user_path="/usr/bin:/bin:/usr/sbin:/sbin" ],
@@ -3951,23 +3872,23 @@ main()
3951 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1 3872 echo $user_path | grep "^$t_bindir" > /dev/null 2>&1
3952 if test $? -ne 0 ; then 3873 if test $? -ne 0 ; then
3953 user_path=$user_path:$t_bindir 3874 user_path=$user_path:$t_bindir
3954 AC_MSG_RESULT(Adding $t_bindir to USER_PATH so scp will work) 3875 AC_MSG_RESULT([Adding $t_bindir to USER_PATH so scp will work])
3955 fi 3876 fi
3956 fi 3877 fi
3957 fi ] 3878 fi ]
3958) 3879)
3959if test "x$external_path_file" != "x/etc/login.conf" ; then 3880if test "x$external_path_file" != "x/etc/login.conf" ; then
3960 AC_DEFINE_UNQUOTED(USER_PATH, "$user_path", [Specify default $PATH]) 3881 AC_DEFINE_UNQUOTED([USER_PATH], ["$user_path"], [Specify default $PATH])
3961 AC_SUBST(user_path) 3882 AC_SUBST([user_path])
3962fi 3883fi
3963 3884
3964# Set superuser path separately to user path 3885# Set superuser path separately to user path
3965AC_ARG_WITH(superuser-path, 3886AC_ARG_WITH([superuser-path],
3966 [ --with-superuser-path= Specify different path for super-user], 3887 [ --with-superuser-path= Specify different path for super-user],
3967 [ 3888 [
3968 if test -n "$withval" && test "x$withval" != "xno" && \ 3889 if test -n "$withval" && test "x$withval" != "xno" && \
3969 test "x${withval}" != "xyes"; then 3890 test "x${withval}" != "xyes"; then
3970 AC_DEFINE_UNQUOTED(SUPERUSER_PATH, "$withval", 3891 AC_DEFINE_UNQUOTED([SUPERUSER_PATH], ["$withval"],
3971 [Define if you want a different $PATH 3892 [Define if you want a different $PATH
3972 for the superuser]) 3893 for the superuser])
3973 superuser_path=$withval 3894 superuser_path=$withval
@@ -3982,18 +3903,18 @@ AC_ARG_WITH(4in6,
3982 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses], 3903 [ --with-4in6 Check for and convert IPv4 in IPv6 mapped addresses],
3983 [ 3904 [
3984 if test "x$withval" != "xno" ; then 3905 if test "x$withval" != "xno" ; then
3985 AC_MSG_RESULT(yes) 3906 AC_MSG_RESULT([yes])
3986 AC_DEFINE(IPV4_IN_IPV6, 1, 3907 AC_DEFINE([IPV4_IN_IPV6], [1],
3987 [Detect IPv4 in IPv6 mapped addresses 3908 [Detect IPv4 in IPv6 mapped addresses
3988 and treat as IPv4]) 3909 and treat as IPv4])
3989 IPV4_IN6_HACK_MSG="yes" 3910 IPV4_IN6_HACK_MSG="yes"
3990 else 3911 else
3991 AC_MSG_RESULT(no) 3912 AC_MSG_RESULT([no])
3992 fi 3913 fi
3993 ],[ 3914 ], [
3994 if test "x$inet6_default_4in6" = "xyes"; then 3915 if test "x$inet6_default_4in6" = "xyes"; then
3995 AC_MSG_RESULT([yes (default)]) 3916 AC_MSG_RESULT([yes (default)])
3996 AC_DEFINE(IPV4_IN_IPV6) 3917 AC_DEFINE([IPV4_IN_IPV6])
3997 IPV4_IN6_HACK_MSG="yes" 3918 IPV4_IN6_HACK_MSG="yes"
3998 else 3919 else
3999 AC_MSG_RESULT([no (default)]) 3920 AC_MSG_RESULT([no (default)])
@@ -4003,11 +3924,11 @@ AC_ARG_WITH(4in6,
4003 3924
4004# Whether to enable BSD auth support 3925# Whether to enable BSD auth support
4005BSD_AUTH_MSG=no 3926BSD_AUTH_MSG=no
4006AC_ARG_WITH(bsd-auth, 3927AC_ARG_WITH([bsd-auth],
4007 [ --with-bsd-auth Enable BSD auth support], 3928 [ --with-bsd-auth Enable BSD auth support],
4008 [ 3929 [
4009 if test "x$withval" != "xno" ; then 3930 if test "x$withval" != "xno" ; then
4010 AC_DEFINE(BSD_AUTH, 1, 3931 AC_DEFINE([BSD_AUTH], [1],
4011 [Define if you have BSD auth support]) 3932 [Define if you have BSD auth support])
4012 BSD_AUTH_MSG=yes 3933 BSD_AUTH_MSG=yes
4013 fi 3934 fi
@@ -4024,7 +3945,7 @@ if test ! -d $piddir ; then
4024 esac 3945 esac
4025fi 3946fi
4026 3947
4027AC_ARG_WITH(pid-dir, 3948AC_ARG_WITH([pid-dir],
4028 [ --with-pid-dir=PATH Specify location of ssh.pid file], 3949 [ --with-pid-dir=PATH Specify location of ssh.pid file],
4029 [ 3950 [
4030 if test -n "$withval" && test "x$withval" != "xno" && \ 3951 if test -n "$withval" && test "x$withval" != "xno" && \
@@ -4037,85 +3958,86 @@ AC_ARG_WITH(pid-dir,
4037 ] 3958 ]
4038) 3959)
4039 3960
4040AC_DEFINE_UNQUOTED(_PATH_SSH_PIDDIR, "$piddir", [Specify location of ssh.pid]) 3961AC_DEFINE_UNQUOTED([_PATH_SSH_PIDDIR], ["$piddir"],
4041AC_SUBST(piddir) 3962 [Specify location of ssh.pid])
3963AC_SUBST([piddir])
4042 3964
4043dnl allow user to disable some login recording features 3965dnl allow user to disable some login recording features
4044AC_ARG_ENABLE(lastlog, 3966AC_ARG_ENABLE([lastlog],
4045 [ --disable-lastlog disable use of lastlog even if detected [no]], 3967 [ --disable-lastlog disable use of lastlog even if detected [no]],
4046 [ 3968 [
4047 if test "x$enableval" = "xno" ; then 3969 if test "x$enableval" = "xno" ; then
4048 AC_DEFINE(DISABLE_LASTLOG) 3970 AC_DEFINE([DISABLE_LASTLOG])
4049 fi 3971 fi
4050 ] 3972 ]
4051) 3973)
4052AC_ARG_ENABLE(utmp, 3974AC_ARG_ENABLE([utmp],
4053 [ --disable-utmp disable use of utmp even if detected [no]], 3975 [ --disable-utmp disable use of utmp even if detected [no]],
4054 [ 3976 [
4055 if test "x$enableval" = "xno" ; then 3977 if test "x$enableval" = "xno" ; then
4056 AC_DEFINE(DISABLE_UTMP) 3978 AC_DEFINE([DISABLE_UTMP])
4057 fi 3979 fi
4058 ] 3980 ]
4059) 3981)
4060AC_ARG_ENABLE(utmpx, 3982AC_ARG_ENABLE([utmpx],
4061 [ --disable-utmpx disable use of utmpx even if detected [no]], 3983 [ --disable-utmpx disable use of utmpx even if detected [no]],
4062 [ 3984 [
4063 if test "x$enableval" = "xno" ; then 3985 if test "x$enableval" = "xno" ; then
4064 AC_DEFINE(DISABLE_UTMPX, 1, 3986 AC_DEFINE([DISABLE_UTMPX], [1],
4065 [Define if you don't want to use utmpx]) 3987 [Define if you don't want to use utmpx])
4066 fi 3988 fi
4067 ] 3989 ]
4068) 3990)
4069AC_ARG_ENABLE(wtmp, 3991AC_ARG_ENABLE([wtmp],
4070 [ --disable-wtmp disable use of wtmp even if detected [no]], 3992 [ --disable-wtmp disable use of wtmp even if detected [no]],
4071 [ 3993 [
4072 if test "x$enableval" = "xno" ; then 3994 if test "x$enableval" = "xno" ; then
4073 AC_DEFINE(DISABLE_WTMP) 3995 AC_DEFINE([DISABLE_WTMP])
4074 fi 3996 fi
4075 ] 3997 ]
4076) 3998)
4077AC_ARG_ENABLE(wtmpx, 3999AC_ARG_ENABLE([wtmpx],
4078 [ --disable-wtmpx disable use of wtmpx even if detected [no]], 4000 [ --disable-wtmpx disable use of wtmpx even if detected [no]],
4079 [ 4001 [
4080 if test "x$enableval" = "xno" ; then 4002 if test "x$enableval" = "xno" ; then
4081 AC_DEFINE(DISABLE_WTMPX, 1, 4003 AC_DEFINE([DISABLE_WTMPX], [1],
4082 [Define if you don't want to use wtmpx]) 4004 [Define if you don't want to use wtmpx])
4083 fi 4005 fi
4084 ] 4006 ]
4085) 4007)
4086AC_ARG_ENABLE(libutil, 4008AC_ARG_ENABLE([libutil],
4087 [ --disable-libutil disable use of libutil (login() etc.) [no]], 4009 [ --disable-libutil disable use of libutil (login() etc.) [no]],
4088 [ 4010 [
4089 if test "x$enableval" = "xno" ; then 4011 if test "x$enableval" = "xno" ; then
4090 AC_DEFINE(DISABLE_LOGIN) 4012 AC_DEFINE([DISABLE_LOGIN])
4091 fi 4013 fi
4092 ] 4014 ]
4093) 4015)
4094AC_ARG_ENABLE(pututline, 4016AC_ARG_ENABLE([pututline],
4095 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]], 4017 [ --disable-pututline disable use of pututline() etc. ([uw]tmp) [no]],
4096 [ 4018 [
4097 if test "x$enableval" = "xno" ; then 4019 if test "x$enableval" = "xno" ; then
4098 AC_DEFINE(DISABLE_PUTUTLINE, 1, 4020 AC_DEFINE([DISABLE_PUTUTLINE], [1],
4099 [Define if you don't want to use pututline() 4021 [Define if you don't want to use pututline()
4100 etc. to write [uw]tmp]) 4022 etc. to write [uw]tmp])
4101 fi 4023 fi
4102 ] 4024 ]
4103) 4025)
4104AC_ARG_ENABLE(pututxline, 4026AC_ARG_ENABLE([pututxline],
4105 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]], 4027 [ --disable-pututxline disable use of pututxline() etc. ([uw]tmpx) [no]],
4106 [ 4028 [
4107 if test "x$enableval" = "xno" ; then 4029 if test "x$enableval" = "xno" ; then
4108 AC_DEFINE(DISABLE_PUTUTXLINE, 1, 4030 AC_DEFINE([DISABLE_PUTUTXLINE], [1],
4109 [Define if you don't want to use pututxline() 4031 [Define if you don't want to use pututxline()
4110 etc. to write [uw]tmpx]) 4032 etc. to write [uw]tmpx])
4111 fi 4033 fi
4112 ] 4034 ]
4113) 4035)
4114AC_ARG_WITH(lastlog, 4036AC_ARG_WITH([lastlog],
4115 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]], 4037 [ --with-lastlog=FILE|DIR specify lastlog location [common locations]],
4116 [ 4038 [
4117 if test "x$withval" = "xno" ; then 4039 if test "x$withval" = "xno" ; then
4118 AC_DEFINE(DISABLE_LASTLOG) 4040 AC_DEFINE([DISABLE_LASTLOG])
4119 elif test -n "$withval" && test "x${withval}" != "xyes"; then 4041 elif test -n "$withval" && test "x${withval}" != "xyes"; then
4120 conf_lastlog_location=$withval 4042 conf_lastlog_location=$withval
4121 fi 4043 fi
@@ -4130,7 +4052,7 @@ dnl lastlog and [uw]tmp are subject to a file search if all else fails
4130dnl lastlog detection 4052dnl lastlog detection
4131dnl NOTE: the code itself will detect if lastlog is a directory 4053dnl NOTE: the code itself will detect if lastlog is a directory
4132AC_MSG_CHECKING([if your system defines LASTLOG_FILE]) 4054AC_MSG_CHECKING([if your system defines LASTLOG_FILE])
4133AC_TRY_COMPILE([ 4055AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4134#include <sys/types.h> 4056#include <sys/types.h>
4135#include <utmp.h> 4057#include <utmp.h>
4136#ifdef HAVE_LASTLOG_H 4058#ifdef HAVE_LASTLOG_H
@@ -4142,13 +4064,12 @@ AC_TRY_COMPILE([
4142#ifdef HAVE_LOGIN_H 4064#ifdef HAVE_LOGIN_H
4143# include <login.h> 4065# include <login.h>
4144#endif 4066#endif
4145 ], 4067 ]], [[ char *lastlog = LASTLOG_FILE; ]])],
4146 [ char *lastlog = LASTLOG_FILE; ], 4068 [ AC_MSG_RESULT([yes]) ],
4147 [ AC_MSG_RESULT(yes) ], 4069 [
4148 [ 4070 AC_MSG_RESULT([no])
4149 AC_MSG_RESULT(no)
4150 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG]) 4071 AC_MSG_CHECKING([if your system defines _PATH_LASTLOG])
4151 AC_TRY_COMPILE([ 4072 AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4152#include <sys/types.h> 4073#include <sys/types.h>
4153#include <utmp.h> 4074#include <utmp.h>
4154#ifdef HAVE_LASTLOG_H 4075#ifdef HAVE_LASTLOG_H
@@ -4157,15 +4078,13 @@ AC_TRY_COMPILE([
4157#ifdef HAVE_PATHS_H 4078#ifdef HAVE_PATHS_H
4158# include <paths.h> 4079# include <paths.h>
4159#endif 4080#endif
4160 ], 4081 ]], [[ char *lastlog = _PATH_LASTLOG; ]])],
4161 [ char *lastlog = _PATH_LASTLOG; ], 4082 [ AC_MSG_RESULT([yes]) ],
4162 [ AC_MSG_RESULT(yes) ],
4163 [ 4083 [
4164 AC_MSG_RESULT(no) 4084 AC_MSG_RESULT([no])
4165 system_lastlog_path=no 4085 system_lastlog_path=no
4166 ]) 4086 ])
4167 ] 4087])
4168)
4169 4088
4170if test -z "$conf_lastlog_location"; then 4089if test -z "$conf_lastlog_location"; then
4171 if test x"$system_lastlog_path" = x"no" ; then 4090 if test x"$system_lastlog_path" = x"no" ; then
@@ -4182,24 +4101,23 @@ if test -z "$conf_lastlog_location"; then
4182fi 4101fi
4183 4102
4184if test -n "$conf_lastlog_location"; then 4103if test -n "$conf_lastlog_location"; then
4185 AC_DEFINE_UNQUOTED(CONF_LASTLOG_FILE, "$conf_lastlog_location", 4104 AC_DEFINE_UNQUOTED([CONF_LASTLOG_FILE], ["$conf_lastlog_location"],
4186 [Define if you want to specify the path to your lastlog file]) 4105 [Define if you want to specify the path to your lastlog file])
4187fi 4106fi
4188 4107
4189dnl utmp detection 4108dnl utmp detection
4190AC_MSG_CHECKING([if your system defines UTMP_FILE]) 4109AC_MSG_CHECKING([if your system defines UTMP_FILE])
4191AC_TRY_COMPILE([ 4110AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4192#include <sys/types.h> 4111#include <sys/types.h>
4193#include <utmp.h> 4112#include <utmp.h>
4194#ifdef HAVE_PATHS_H 4113#ifdef HAVE_PATHS_H
4195# include <paths.h> 4114# include <paths.h>
4196#endif 4115#endif
4197 ], 4116 ]], [[ char *utmp = UTMP_FILE; ]])],
4198 [ char *utmp = UTMP_FILE; ], 4117 [ AC_MSG_RESULT([yes]) ],
4199 [ AC_MSG_RESULT(yes) ], 4118 [ AC_MSG_RESULT([no])
4200 [ AC_MSG_RESULT(no) 4119 system_utmp_path=no
4201 system_utmp_path=no ] 4120])
4202)
4203if test -z "$conf_utmp_location"; then 4121if test -z "$conf_utmp_location"; then
4204 if test x"$system_utmp_path" = x"no" ; then 4122 if test x"$system_utmp_path" = x"no" ; then
4205 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do 4123 for f in /etc/utmp /usr/adm/utmp /var/run/utmp; do
@@ -4208,29 +4126,28 @@ if test -z "$conf_utmp_location"; then
4208 fi 4126 fi
4209 done 4127 done
4210 if test -z "$conf_utmp_location"; then 4128 if test -z "$conf_utmp_location"; then
4211 AC_DEFINE(DISABLE_UTMP) 4129 AC_DEFINE([DISABLE_UTMP])
4212 fi 4130 fi
4213 fi 4131 fi
4214fi 4132fi
4215if test -n "$conf_utmp_location"; then 4133if test -n "$conf_utmp_location"; then
4216 AC_DEFINE_UNQUOTED(CONF_UTMP_FILE, "$conf_utmp_location", 4134 AC_DEFINE_UNQUOTED([CONF_UTMP_FILE], ["$conf_utmp_location"],
4217 [Define if you want to specify the path to your utmp file]) 4135 [Define if you want to specify the path to your utmp file])
4218fi 4136fi
4219 4137
4220dnl wtmp detection 4138dnl wtmp detection
4221AC_MSG_CHECKING([if your system defines WTMP_FILE]) 4139AC_MSG_CHECKING([if your system defines WTMP_FILE])
4222AC_TRY_COMPILE([ 4140AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4223#include <sys/types.h> 4141#include <sys/types.h>
4224#include <utmp.h> 4142#include <utmp.h>
4225#ifdef HAVE_PATHS_H 4143#ifdef HAVE_PATHS_H
4226# include <paths.h> 4144# include <paths.h>
4227#endif 4145#endif
4228 ], 4146 ]], [[ char *wtmp = WTMP_FILE; ]])],
4229 [ char *wtmp = WTMP_FILE; ], 4147 [ AC_MSG_RESULT([yes]) ],
4230 [ AC_MSG_RESULT(yes) ], 4148 [ AC_MSG_RESULT([no])
4231 [ AC_MSG_RESULT(no) 4149 system_wtmp_path=no
4232 system_wtmp_path=no ] 4150])
4233)
4234if test -z "$conf_wtmp_location"; then 4151if test -z "$conf_wtmp_location"; then
4235 if test x"$system_wtmp_path" = x"no" ; then 4152 if test x"$system_wtmp_path" = x"no" ; then
4236 for f in /usr/adm/wtmp /var/log/wtmp; do 4153 for f in /usr/adm/wtmp /var/log/wtmp; do
@@ -4239,19 +4156,19 @@ if test -z "$conf_wtmp_location"; then
4239 fi 4156 fi
4240 done 4157 done
4241 if test -z "$conf_wtmp_location"; then 4158 if test -z "$conf_wtmp_location"; then
4242 AC_DEFINE(DISABLE_WTMP) 4159 AC_DEFINE([DISABLE_WTMP])
4243 fi 4160 fi
4244 fi 4161 fi
4245fi 4162fi
4246if test -n "$conf_wtmp_location"; then 4163if test -n "$conf_wtmp_location"; then
4247 AC_DEFINE_UNQUOTED(CONF_WTMP_FILE, "$conf_wtmp_location", 4164 AC_DEFINE_UNQUOTED([CONF_WTMP_FILE], ["$conf_wtmp_location"],
4248 [Define if you want to specify the path to your wtmp file]) 4165 [Define if you want to specify the path to your wtmp file])
4249fi 4166fi
4250 4167
4251 4168
4252dnl wtmpx detection 4169dnl wtmpx detection
4253AC_MSG_CHECKING([if your system defines WTMPX_FILE]) 4170AC_MSG_CHECKING([if your system defines WTMPX_FILE])
4254AC_TRY_COMPILE([ 4171AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
4255#include <sys/types.h> 4172#include <sys/types.h>
4256#include <utmp.h> 4173#include <utmp.h>
4257#ifdef HAVE_UTMPX_H 4174#ifdef HAVE_UTMPX_H
@@ -4260,18 +4177,17 @@ AC_TRY_COMPILE([
4260#ifdef HAVE_PATHS_H 4177#ifdef HAVE_PATHS_H
4261# include <paths.h> 4178# include <paths.h>
4262#endif 4179#endif
4263 ], 4180 ]], [[ char *wtmpx = WTMPX_FILE; ]])],
4264 [ char *wtmpx = WTMPX_FILE; ], 4181 [ AC_MSG_RESULT([yes]) ],
4265 [ AC_MSG_RESULT(yes) ], 4182 [ AC_MSG_RESULT([no])
4266 [ AC_MSG_RESULT(no) 4183 system_wtmpx_path=no
4267 system_wtmpx_path=no ] 4184])
4268)
4269if test -z "$conf_wtmpx_location"; then 4185if test -z "$conf_wtmpx_location"; then
4270 if test x"$system_wtmpx_path" = x"no" ; then 4186 if test x"$system_wtmpx_path" = x"no" ; then
4271 AC_DEFINE(DISABLE_WTMPX) 4187 AC_DEFINE([DISABLE_WTMPX])
4272 fi 4188 fi
4273else 4189else
4274 AC_DEFINE_UNQUOTED(CONF_WTMPX_FILE, "$conf_wtmpx_location", 4190 AC_DEFINE_UNQUOTED([CONF_WTMPX_FILE], ["$conf_wtmpx_location"],
4275 [Define if you want to specify the path to your wtmpx file]) 4191 [Define if you want to specify the path to your wtmpx file])
4276fi 4192fi
4277 4193
@@ -4290,13 +4206,13 @@ if test "x$ac_cv_func_getaddrinfo" != "xyes" ; then
4290else 4206else
4291 TEST_SSH_IPV6=yes 4207 TEST_SSH_IPV6=yes
4292fi 4208fi
4293AC_CHECK_DECL(BROKEN_GETADDRINFO, TEST_SSH_IPV6=no) 4209AC_CHECK_DECL([BROKEN_GETADDRINFO], [TEST_SSH_IPV6=no])
4294AC_SUBST(TEST_SSH_IPV6, $TEST_SSH_IPV6) 4210AC_SUBST([TEST_SSH_IPV6], [$TEST_SSH_IPV6])
4295 4211
4296AC_EXEEXT 4212AC_EXEEXT
4297AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openssh.xml \ 4213AC_CONFIG_FILES([Makefile buildpkg.sh opensshd.init openssh.xml \
4298 openbsd-compat/Makefile openbsd-compat/regress/Makefile \ 4214 openbsd-compat/Makefile openbsd-compat/regress/Makefile \
4299 ssh_prng_cmds survey.sh]) 4215 survey.sh])
4300AC_OUTPUT 4216AC_OUTPUT
4301 4217
4302# Print summary of options 4218# Print summary of options
@@ -4351,9 +4267,7 @@ echo " IP address in \$DISPLAY hack: $DISPLAY_HACK_MSG"
4351echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG" 4267echo " Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
4352echo " BSD Auth support: $BSD_AUTH_MSG" 4268echo " BSD Auth support: $BSD_AUTH_MSG"
4353echo " Random number source: $RAND_MSG" 4269echo " Random number source: $RAND_MSG"
4354if test ! -z "$USE_RAND_HELPER" ; then 4270echo " Privsep sandbox style: $SANDBOX_STYLE"
4355echo " ssh-rand-helper collects from: $RAND_HELPER_MSG"
4356fi
4357 4271
4358echo "" 4272echo ""
4359 4273
@@ -4385,14 +4299,6 @@ if test "x$PAM_MSG" = "xyes" ; then
4385 echo "" 4299 echo ""
4386fi 4300fi
4387 4301
4388if test ! -z "$RAND_HELPER_CMDHASH" ; then
4389 echo "WARNING: you are using the builtin random number collection "
4390 echo "service. Please read WARNING.RNG and request that your OS "
4391 echo "vendor includes kernel-based random number collection in "
4392 echo "future versions of your OS."
4393 echo ""
4394fi
4395
4396if test ! -z "$NO_PEERCHECK" ; then 4302if test ! -z "$NO_PEERCHECK" ; then
4397 echo "WARNING: the operating system that you are using does not" 4303 echo "WARNING: the operating system that you are using does not"
4398 echo "appear to support getpeereid(), getpeerucred() or the" 4304 echo "appear to support getpeereid(), getpeerucred() or the"
diff --git a/contrib/aix/buildbff.sh b/contrib/aix/buildbff.sh
index ca4bf0210..81d8cc301 100755
--- a/contrib/aix/buildbff.sh
+++ b/contrib/aix/buildbff.sh
@@ -1,7 +1,7 @@
1#!/bin/sh 1#!/bin/sh
2# 2#
3# buildbff.sh: Create AIX SMIT-installable OpenSSH packages 3# buildbff.sh: Create AIX SMIT-installable OpenSSH packages
4# $Id: buildbff.sh,v 1.12 2010/04/18 03:35:00 dtucker Exp $ 4# $Id: buildbff.sh,v 1.13 2011/05/05 03:48:41 djm Exp $
5# 5#
6# Author: Darren Tucker (dtucker at zip dot com dot au) 6# Author: Darren Tucker (dtucker at zip dot com dot au)
7# This file is placed in the public domain and comes with absolutely 7# This file is placed in the public domain and comes with absolutely
@@ -156,13 +156,6 @@ do
156 mv $FAKE_ROOT/$sysconfdir/$cfgfile $FAKE_ROOT/$sysconfdir/$cfgfile.default 156 mv $FAKE_ROOT/$sysconfdir/$cfgfile $FAKE_ROOT/$sysconfdir/$cfgfile.default
157done 157done
158 158
159# AIX 5.3 and newer have /dev/random and don't create ssh_prng_cmds
160if [ -f $FAKE_ROOT/$sysconfdir/ssh_prng_cmds ]
161then
162 mv $FAKE_ROOT/$sysconfdir/ssh_prng_cmds \
163 $FAKE_ROOT/$sysconfdir/ssh_prng_cmds.default
164fi
165
166# 159#
167# Generate lpp control files. 160# Generate lpp control files.
168# working dir is $FAKE_ROOT but files are generated in dir above 161# working dir is $FAKE_ROOT but files are generated in dir above
@@ -197,7 +190,7 @@ cat <<EOF >>../openssh.post_i
197#!/bin/sh 190#!/bin/sh
198 191
199echo Creating configs from defaults if necessary. 192echo Creating configs from defaults if necessary.
200for cfgfile in ssh_config sshd_config ssh_prng_cmds 193for cfgfile in ssh_config sshd_config
201do 194do
202 if [ ! -f $sysconfdir/\$cfgfile ] 195 if [ ! -f $sysconfdir/\$cfgfile ]
203 then 196 then
diff --git a/contrib/caldera/openssh.spec b/contrib/caldera/openssh.spec
index 435003a2a..73d441d0c 100644
--- a/contrib/caldera/openssh.spec
+++ b/contrib/caldera/openssh.spec
@@ -16,7 +16,7 @@
16 16
17#old cvs stuff. please update before use. may be deprecated. 17#old cvs stuff. please update before use. may be deprecated.
18%define use_stable 1 18%define use_stable 1
19%define version 5.8p1 19%define version 5.9p1
20%if %{use_stable} 20%if %{use_stable}
21 %define cvs %{nil} 21 %define cvs %{nil}
22 %define release 1 22 %define release 1
@@ -363,4 +363,4 @@ fi
363* Mon Jan 01 1998 ... 363* Mon Jan 01 1998 ...
364Template Version: 1.31 364Template Version: 1.31
365 365
366$Id: openssh.spec,v 1.73.4.1 2011/02/04 00:57:54 djm Exp $ 366$Id: openssh.spec,v 1.75.2.1 2011/09/05 00:28:11 djm Exp $
diff --git a/contrib/cygwin/ssh-host-config b/contrib/cygwin/ssh-host-config
index d968d4619..3ac39a621 100644
--- a/contrib/cygwin/ssh-host-config
+++ b/contrib/cygwin/ssh-host-config
@@ -1,6 +1,6 @@
1#!/bin/bash 1#!/bin/bash
2# 2#
3# ssh-host-config, Copyright 2000-2009 Red Hat Inc. 3# ssh-host-config, Copyright 2000-2011 Red Hat Inc.
4# 4#
5# This file is part of the Cygwin port of OpenSSH. 5# This file is part of the Cygwin port of OpenSSH.
6# 6#
@@ -19,12 +19,39 @@
19# ====================================================================== 19# ======================================================================
20# Initialization 20# Initialization
21# ====================================================================== 21# ======================================================================
22PROGNAME=$(basename $0)
23_tdir=$(dirname $0)
24PROGDIR=$(cd $_tdir && pwd)
25 22
26CSIH_SCRIPT=/usr/share/csih/cygwin-service-installation-helper.sh 23CSIH_SCRIPT=/usr/share/csih/cygwin-service-installation-helper.sh
27 24
25# List of apps used. This is checkad for existance in csih_sanity_check
26# Don't use *any* transient commands before sourcing the csih helper script,
27# otherwise the sanity checks are short-circuited.
28declare -a csih_required_commands=(
29 /usr/bin/basename coreutils
30 /usr/bin/cat coreutils
31 /usr/bin/chmod coreutils
32 /usr/bin/dirname coreutils
33 /usr/bin/id coreutils
34 /usr/bin/mv coreutils
35 /usr/bin/rm coreutils
36 /usr/bin/cygpath cygwin
37 /usr/bin/mount cygwin
38 /usr/bin/ps cygwin
39 /usr/bin/setfacl cygwin
40 /usr/bin/umount cygwin
41 /usr/bin/cmp diffutils
42 /usr/bin/grep grep
43 /usr/bin/awk gawk
44 /usr/bin/ssh-keygen openssh
45 /usr/sbin/sshd openssh
46 /usr/bin/sed sed
47)
48csih_sanity_check_server=yes
49source ${CSIH_SCRIPT}
50
51PROGNAME=$(/usr/bin/basename $0)
52_tdir=$(/usr/bin/dirname $0)
53PROGDIR=$(cd $_tdir && pwd)
54
28# Subdirectory where the new package is being installed 55# Subdirectory where the new package is being installed
29PREFIX=/usr 56PREFIX=/usr
30 57
@@ -32,8 +59,6 @@ PREFIX=/usr
32SYSCONFDIR=/etc 59SYSCONFDIR=/etc
33LOCALSTATEDIR=/var 60LOCALSTATEDIR=/var
34 61
35source ${CSIH_SCRIPT}
36
37port_number=22 62port_number=22
38privsep_configured=no 63privsep_configured=no
39privsep_used=yes 64privsep_used=yes
@@ -46,23 +71,48 @@ opt_force=no
46# Routine: create_host_keys 71# Routine: create_host_keys
47# ====================================================================== 72# ======================================================================
48create_host_keys() { 73create_host_keys() {
74 local ret=0
75
49 if [ ! -f "${SYSCONFDIR}/ssh_host_key" ] 76 if [ ! -f "${SYSCONFDIR}/ssh_host_key" ]
50 then 77 then
51 csih_inform "Generating ${SYSCONFDIR}/ssh_host_key" 78 csih_inform "Generating ${SYSCONFDIR}/ssh_host_key"
52 ssh-keygen -t rsa1 -f ${SYSCONFDIR}/ssh_host_key -N '' > /dev/null 79 if ! /usr/bin/ssh-keygen -t rsa1 -f ${SYSCONFDIR}/ssh_host_key -N '' > /dev/null
80 then
81 csih_warning "Generating ${SYSCONFDIR}/ssh_host_key failed!"
82 let ++ret
83 fi
53 fi 84 fi
54 85
55 if [ ! -f "${SYSCONFDIR}/ssh_host_rsa_key" ] 86 if [ ! -f "${SYSCONFDIR}/ssh_host_rsa_key" ]
56 then 87 then
57 csih_inform "Generating ${SYSCONFDIR}/ssh_host_rsa_key" 88 csih_inform "Generating ${SYSCONFDIR}/ssh_host_rsa_key"
58 ssh-keygen -t rsa -f ${SYSCONFDIR}/ssh_host_rsa_key -N '' > /dev/null 89 if ! /usr/bin/ssh-keygen -t rsa -f ${SYSCONFDIR}/ssh_host_rsa_key -N '' > /dev/null
90 then
91 csih_warning "Generating ${SYSCONFDIR}/ssh_host_key failed!"
92 let ++ret
93 fi
59 fi 94 fi
60 95
61 if [ ! -f "${SYSCONFDIR}/ssh_host_dsa_key" ] 96 if [ ! -f "${SYSCONFDIR}/ssh_host_dsa_key" ]
62 then 97 then
63 csih_inform "Generating ${SYSCONFDIR}/ssh_host_dsa_key" 98 csih_inform "Generating ${SYSCONFDIR}/ssh_host_dsa_key"
64 ssh-keygen -t dsa -f ${SYSCONFDIR}/ssh_host_dsa_key -N '' > /dev/null 99 if ! /usr/bin/ssh-keygen -t dsa -f ${SYSCONFDIR}/ssh_host_dsa_key -N '' > /dev/null
100 then
101 csih_warning "Generating ${SYSCONFDIR}/ssh_host_key failed!"
102 let ++ret
103 fi
65 fi 104 fi
105
106 if [ ! -f "${SYSCONFDIR}/ssh_host_ecdsa_key" ]
107 then
108 csih_inform "Generating ${SYSCONFDIR}/ssh_host_ecdsa_key"
109 if ! /usr/bin/ssh-keygen -t ecdsa -f ${SYSCONFDIR}/ssh_host_ecdsa_key -N '' > /dev/null
110 then
111 csih_warning "Generating ${SYSCONFDIR}/ssh_host_key failed!"
112 let ++ret
113 fi
114 fi
115 return $ret
66} # --- End of create_host_keys --- # 116} # --- End of create_host_keys --- #
67 117
68# ====================================================================== 118# ======================================================================
@@ -75,61 +125,58 @@ update_services_file() {
75 local _spaces 125 local _spaces
76 local _serv_tmp 126 local _serv_tmp
77 local _wservices 127 local _wservices
128 local ret=0
78 129
79 if csih_is_nt 130 _win_etcdir="${SYSTEMROOT}\\system32\\drivers\\etc"
80 then 131 _services="${_my_etcdir}/services"
81 _win_etcdir="${SYSTEMROOT}\\system32\\drivers\\etc" 132 _spaces=" #"
82 _services="${_my_etcdir}/services"
83 # On NT, 27 spaces, no space after the hash
84 _spaces=" #"
85 else
86 _win_etcdir="${WINDIR}"
87 _services="${_my_etcdir}/SERVICES"
88 # On 9x, 18 spaces (95 is very touchy), a space after the hash
89 _spaces=" # "
90 fi
91 _serv_tmp="${_my_etcdir}/srv.out.$$" 133 _serv_tmp="${_my_etcdir}/srv.out.$$"
92 134
93 mount -o text,posix=0,noacl -f "${_win_etcdir}" "${_my_etcdir}" 135 /usr/bin/mount -o text,posix=0,noacl -f "${_win_etcdir}" "${_my_etcdir}"
94 136
95 # Depends on the above mount 137 # Depends on the above mount
96 _wservices=`cygpath -w "${_services}"` 138 _wservices=`cygpath -w "${_services}"`
97 139
98 # Remove sshd 22/port from services 140 # Remove sshd 22/port from services
99 if [ `grep -q 'sshd[ \t][ \t]*22' "${_services}"; echo $?` -eq 0 ] 141 if [ `/usr/bin/grep -q 'sshd[ \t][ \t]*22' "${_services}"; echo $?` -eq 0 ]
100 then 142 then
101 grep -v 'sshd[ \t][ \t]*22' "${_services}" > "${_serv_tmp}" 143 /usr/bin/grep -v 'sshd[ \t][ \t]*22' "${_services}" > "${_serv_tmp}"
102 if [ -f "${_serv_tmp}" ] 144 if [ -f "${_serv_tmp}" ]
103 then 145 then
104 if mv "${_serv_tmp}" "${_services}" 146 if /usr/bin/mv "${_serv_tmp}" "${_services}"
105 then 147 then
106 csih_inform "Removing sshd from ${_wservices}" 148 csih_inform "Removing sshd from ${_wservices}"
107 else 149 else
108 csih_warning "Removing sshd from ${_wservices} failed!" 150 csih_warning "Removing sshd from ${_wservices} failed!"
151 let ++ret
109 fi 152 fi
110 rm -f "${_serv_tmp}" 153 /usr/bin/rm -f "${_serv_tmp}"
111 else 154 else
112 csih_warning "Removing sshd from ${_wservices} failed!" 155 csih_warning "Removing sshd from ${_wservices} failed!"
156 let ++ret
113 fi 157 fi
114 fi 158 fi
115 159
116 # Add ssh 22/tcp and ssh 22/udp to services 160 # Add ssh 22/tcp and ssh 22/udp to services
117 if [ `grep -q 'ssh[ \t][ \t]*22' "${_services}"; echo $?` -ne 0 ] 161 if [ `/usr/bin/grep -q 'ssh[ \t][ \t]*22' "${_services}"; echo $?` -ne 0 ]
118 then 162 then
119 if awk '{ if ( $2 ~ /^23\/tcp/ ) print "ssh 22/tcp'"${_spaces}"'SSH Remote Login Protocol\nssh 22/udp'"${_spaces}"'SSH Remote Login Protocol"; print $0; }' < "${_services}" > "${_serv_tmp}" 163 if /usr/bin/awk '{ if ( $2 ~ /^23\/tcp/ ) print "ssh 22/tcp'"${_spaces}"'SSH Remote Login Protocol\nssh 22/udp'"${_spaces}"'SSH Remote Login Protocol"; print $0; }' < "${_services}" > "${_serv_tmp}"
120 then 164 then
121 if mv "${_serv_tmp}" "${_services}" 165 if /usr/bin/mv "${_serv_tmp}" "${_services}"
122 then 166 then
123 csih_inform "Added ssh to ${_wservices}" 167 csih_inform "Added ssh to ${_wservices}"
124 else 168 else
125 csih_warning "Adding ssh to ${_wservices} failed!" 169 csih_warning "Adding ssh to ${_wservices} failed!"
170 let ++ret
126 fi 171 fi
127 rm -f "${_serv_tmp}" 172 /usr/bin/rm -f "${_serv_tmp}"
128 else 173 else
129 csih_warning "Adding ssh to ${_wservices} failed!" 174 csih_warning "Adding ssh to ${_wservices} failed!"
175 let ++ret
130 fi 176 fi
131 fi 177 fi
132 umount "${_my_etcdir}" 178 /usr/bin/umount "${_my_etcdir}"
179 return $ret
133} # --- End of update_services_file --- # 180} # --- End of update_services_file --- #
134 181
135# ====================================================================== 182# ======================================================================
@@ -138,51 +185,57 @@ update_services_file() {
138# ====================================================================== 185# ======================================================================
139sshd_privsep() { 186sshd_privsep() {
140 local sshdconfig_tmp 187 local sshdconfig_tmp
188 local ret=0
141 189
142 if [ "${privsep_configured}" != "yes" ] 190 if [ "${privsep_configured}" != "yes" ]
143 then 191 then
144 if csih_is_nt 192 csih_inform "Privilege separation is set to yes by default since OpenSSH 3.3."
193 csih_inform "However, this requires a non-privileged account called 'sshd'."
194 csih_inform "For more info on privilege separation read /usr/share/doc/openssh/README.privsep."
195 if csih_request "Should privilege separation be used?"
145 then 196 then
146 csih_inform "Privilege separation is set to yes by default since OpenSSH 3.3." 197 privsep_used=yes
147 csih_inform "However, this requires a non-privileged account called 'sshd'." 198 if ! csih_create_unprivileged_user sshd
148 csih_inform "For more info on privilege separation read /usr/share/doc/openssh/README.privsep."
149 if csih_request "Should privilege separation be used?"
150 then 199 then
151 privsep_used=yes 200 csih_error_recoverable "Couldn't create user 'sshd'!"
152 if ! csih_create_unprivileged_user sshd 201 csih_error_recoverable "Privilege separation set to 'no' again!"
153 then 202 csih_error_recoverable "Check your ${SYSCONFDIR}/sshd_config file!"
154 csih_warning "Couldn't create user 'sshd'!" 203 let ++ret
155 csih_warning "Privilege separation set to 'no' again!"
156 csih_warning "Check your ${SYSCONFDIR}/sshd_config file!"
157 privsep_used=no
158 fi
159 else
160 privsep_used=no 204 privsep_used=no
161 fi 205 fi
162 else 206 else
163 # On 9x don't use privilege separation. Since security isn't
164 # available it just adds useless additional processes.
165 privsep_used=no 207 privsep_used=no
166 fi 208 fi
167 fi 209 fi
168 210
169 # Create default sshd_config from skeleton files in /etc/defaults/etc or 211 # Create default sshd_config from skeleton files in /etc/defaults/etc or
170 # modify to add the missing privsep configuration option 212 # modify to add the missing privsep configuration option
171 if cmp "${SYSCONFDIR}/sshd_config" "${SYSCONFDIR}/defaults/${SYSCONFDIR}/sshd_config" >/dev/null 2>&1 213 if /usr/bin/cmp "${SYSCONFDIR}/sshd_config" "${SYSCONFDIR}/defaults/${SYSCONFDIR}/sshd_config" >/dev/null 2>&1
172 then 214 then
173 csih_inform "Updating ${SYSCONFDIR}/sshd_config file" 215 csih_inform "Updating ${SYSCONFDIR}/sshd_config file"
174 sshdconfig_tmp=${SYSCONFDIR}/sshd_config.$$ 216 sshdconfig_tmp=${SYSCONFDIR}/sshd_config.$$
175 sed -e "s/^#UsePrivilegeSeparation yes/UsePrivilegeSeparation ${privsep_used}/ 217 /usr/bin/sed -e "s/^#UsePrivilegeSeparation yes/UsePrivilegeSeparation ${privsep_used}/
176 s/^#Port 22/Port ${port_number}/ 218 s/^#Port 22/Port ${port_number}/
177 s/^#StrictModes yes/StrictModes no/" \ 219 s/^#StrictModes yes/StrictModes no/" \
178 < ${SYSCONFDIR}/sshd_config \ 220 < ${SYSCONFDIR}/sshd_config \
179 > "${sshdconfig_tmp}" 221 > "${sshdconfig_tmp}"
180 mv "${sshdconfig_tmp}" ${SYSCONFDIR}/sshd_config 222 if ! /usr/bin/mv "${sshdconfig_tmp}" ${SYSCONFDIR}/sshd_config
223 then
224 csih_warning "Setting privilege separation to 'yes' failed!"
225 csih_warning "Check your ${SYSCONFDIR}/sshd_config file!"
226 let ++ret
227 fi
181 elif [ "${privsep_configured}" != "yes" ] 228 elif [ "${privsep_configured}" != "yes" ]
182 then 229 then
183 echo >> ${SYSCONFDIR}/sshd_config 230 echo >> ${SYSCONFDIR}/sshd_config
184 echo "UsePrivilegeSeparation ${privsep_used}" >> ${SYSCONFDIR}/sshd_config 231 if ! echo "UsePrivilegeSeparation ${privsep_used}" >> ${SYSCONFDIR}/sshd_config
232 then
233 csih_warning "Setting privilege separation to 'yes' failed!"
234 csih_warning "Check your ${SYSCONFDIR}/sshd_config file!"
235 let ++ret
236 fi
185 fi 237 fi
238 return $ret
186} # --- End of sshd_privsep --- # 239} # --- End of sshd_privsep --- #
187 240
188# ====================================================================== 241# ======================================================================
@@ -195,72 +248,82 @@ update_inetd_conf() {
195 local _sshd_inetd_conf="${_inetcnf_dir}/sshd-inetd" 248 local _sshd_inetd_conf="${_inetcnf_dir}/sshd-inetd"
196 local _sshd_inetd_conf_tmp="${_inetcnf_dir}/sshd-inetd.$$" 249 local _sshd_inetd_conf_tmp="${_inetcnf_dir}/sshd-inetd.$$"
197 local _with_comment=1 250 local _with_comment=1
251 local ret=0
198 252
199 if [ -d "${_inetcnf_dir}" ] 253 if [ -d "${_inetcnf_dir}" ]
200 then 254 then
201 # we have inetutils-1.5 inetd.d support 255 # we have inetutils-1.5 inetd.d support
202 if [ -f "${_inetcnf}" ] 256 if [ -f "${_inetcnf}" ]
203 then 257 then
204 grep -q '^[ \t]*ssh' "${_inetcnf}" && _with_comment=0 258 /usr/bin/grep -q '^[ \t]*ssh' "${_inetcnf}" && _with_comment=0
205 259
206 # check for sshd OR ssh in top-level inetd.conf file, and remove 260 # check for sshd OR ssh in top-level inetd.conf file, and remove
207 # will be replaced by a file in inetd.d/ 261 # will be replaced by a file in inetd.d/
208 if [ `grep -q '^[# \t]*ssh' "${_inetcnf}"; echo $?` -eq 0 ] 262 if [ `/usr/bin/grep -q '^[# \t]*ssh' "${_inetcnf}"; echo $?` -eq 0 ]
209 then 263 then
210 grep -v '^[# \t]*ssh' "${_inetcnf}" >> "${_inetcnf_tmp}" 264 /usr/bin/grep -v '^[# \t]*ssh' "${_inetcnf}" >> "${_inetcnf_tmp}"
211 if [ -f "${_inetcnf_tmp}" ] 265 if [ -f "${_inetcnf_tmp}" ]
212 then 266 then
213 if mv "${_inetcnf_tmp}" "${_inetcnf}" 267 if /usr/bin/mv "${_inetcnf_tmp}" "${_inetcnf}"
214 then 268 then
215 csih_inform "Removed ssh[d] from ${_inetcnf}" 269 csih_inform "Removed ssh[d] from ${_inetcnf}"
216 else 270 else
217 csih_warning "Removing ssh[d] from ${_inetcnf} failed!" 271 csih_warning "Removing ssh[d] from ${_inetcnf} failed!"
272 let ++ret
218 fi 273 fi
219 rm -f "${_inetcnf_tmp}" 274 /usr/bin/rm -f "${_inetcnf_tmp}"
220 else 275 else
221 csih_warning "Removing ssh[d] from ${_inetcnf} failed!" 276 csih_warning "Removing ssh[d] from ${_inetcnf} failed!"
277 let ++ret
222 fi 278 fi
223 fi 279 fi
224 fi 280 fi
225 281
226 csih_install_config "${_sshd_inetd_conf}" "${SYSCONFDIR}/defaults" 282 csih_install_config "${_sshd_inetd_conf}" "${SYSCONFDIR}/defaults"
227 if cmp "${SYSCONFDIR}/defaults${_sshd_inetd_conf}" "${_sshd_inetd_conf}" >/dev/null 2>&1 283 if /usr/bin/cmp "${SYSCONFDIR}/defaults${_sshd_inetd_conf}" "${_sshd_inetd_conf}" >/dev/null 2>&1
228 then 284 then
229 if [ "${_with_comment}" -eq 0 ] 285 if [ "${_with_comment}" -eq 0 ]
230 then 286 then
231 sed -e 's/@COMMENT@[ \t]*//' < "${_sshd_inetd_conf}" > "${_sshd_inetd_conf_tmp}" 287 /usr/bin/sed -e 's/@COMMENT@[ \t]*//' < "${_sshd_inetd_conf}" > "${_sshd_inetd_conf_tmp}"
232 else 288 else
233 sed -e 's/@COMMENT@[ \t]*/# /' < "${_sshd_inetd_conf}" > "${_sshd_inetd_conf_tmp}" 289 /usr/bin/sed -e 's/@COMMENT@[ \t]*/# /' < "${_sshd_inetd_conf}" > "${_sshd_inetd_conf_tmp}"
290 fi
291 if /usr/bin/mv "${_sshd_inetd_conf_tmp}" "${_sshd_inetd_conf}"
292 then
293 csih_inform "Updated ${_sshd_inetd_conf}"
294 else
295 csih_warning "Updating ${_sshd_inetd_conf} failed!"
296 let ++ret
234 fi 297 fi
235 mv "${_sshd_inetd_conf_tmp}" "${_sshd_inetd_conf}"
236 csih_inform "Updated ${_sshd_inetd_conf}"
237 fi 298 fi
238 299
239 elif [ -f "${_inetcnf}" ] 300 elif [ -f "${_inetcnf}" ]
240 then 301 then
241 grep -q '^[ \t]*sshd' "${_inetcnf}" && _with_comment=0 302 /usr/bin/grep -q '^[ \t]*sshd' "${_inetcnf}" && _with_comment=0
242 303
243 # check for sshd in top-level inetd.conf file, and remove 304 # check for sshd in top-level inetd.conf file, and remove
244 # will be replaced by a file in inetd.d/ 305 # will be replaced by a file in inetd.d/
245 if [ `grep -q '^[# \t]*sshd' "${_inetcnf}"; echo $?` -eq 0 ] 306 if [ `/usr/bin/grep -q '^[# \t]*sshd' "${_inetcnf}"; echo $?` -eq 0 ]
246 then 307 then
247 grep -v '^[# \t]*sshd' "${_inetcnf}" >> "${_inetcnf_tmp}" 308 /usr/bin/grep -v '^[# \t]*sshd' "${_inetcnf}" >> "${_inetcnf_tmp}"
248 if [ -f "${_inetcnf_tmp}" ] 309 if [ -f "${_inetcnf_tmp}" ]
249 then 310 then
250 if mv "${_inetcnf_tmp}" "${_inetcnf}" 311 if /usr/bin/mv "${_inetcnf_tmp}" "${_inetcnf}"
251 then 312 then
252 csih_inform "Removed sshd from ${_inetcnf}" 313 csih_inform "Removed sshd from ${_inetcnf}"
253 else 314 else
254 csih_warning "Removing sshd from ${_inetcnf} failed!" 315 csih_warning "Removing sshd from ${_inetcnf} failed!"
316 let ++ret
255 fi 317 fi
256 rm -f "${_inetcnf_tmp}" 318 /usr/bin/rm -f "${_inetcnf_tmp}"
257 else 319 else
258 csih_warning "Removing sshd from ${_inetcnf} failed!" 320 csih_warning "Removing sshd from ${_inetcnf} failed!"
321 let ++ret
259 fi 322 fi
260 fi 323 fi
261 324
262 # Add ssh line to inetd.conf 325 # Add ssh line to inetd.conf
263 if [ `grep -q '^[# \t]*ssh' "${_inetcnf}"; echo $?` -ne 0 ] 326 if [ `/usr/bin/grep -q '^[# \t]*ssh' "${_inetcnf}"; echo $?` -ne 0 ]
264 then 327 then
265 if [ "${_with_comment}" -eq 0 ] 328 if [ "${_with_comment}" -eq 0 ]
266 then 329 then
@@ -268,115 +331,186 @@ update_inetd_conf() {
268 else 331 else
269 echo '# ssh stream tcp nowait root /usr/sbin/sshd sshd -i' >> "${_inetcnf}" 332 echo '# ssh stream tcp nowait root /usr/sbin/sshd sshd -i' >> "${_inetcnf}"
270 fi 333 fi
271 csih_inform "Added ssh to ${_inetcnf}" 334 if [ $? -eq 0 ]
335 then
336 csih_inform "Added ssh to ${_inetcnf}"
337 else
338 csih_warning "Adding ssh to ${_inetcnf} failed!"
339 let ++ret
340 fi
272 fi 341 fi
273 fi 342 fi
343 return $ret
274} # --- End of update_inetd_conf --- # 344} # --- End of update_inetd_conf --- #
275 345
276# ====================================================================== 346# ======================================================================
347# Routine: check_service_files_ownership
348# Checks that the files in /etc and /var belong to the right owner
349# ======================================================================
350check_service_files_ownership() {
351 local run_service_as=$1
352 local ret=0
353
354 if [ -z "${run_service_as}" ]
355 then
356 accnt_name=$(/usr/bin/cygrunsrv -VQ sshd | /usr/bin/sed -ne 's/^Account *: *//gp')
357 if [ "${accnt_name}" = "LocalSystem" ]
358 then
359 # Convert "LocalSystem" to "SYSTEM" as is the correct account name
360 accnt_name="SYSTEM:"
361 elif [[ "${accnt_name}" =~ ^\.\\ ]]
362 then
363 # Convert "." domain to local machine name
364 accnt_name="U-${COMPUTERNAME}${accnt_name#.},"
365 fi
366 run_service_as=$(/usr/bin/grep -Fi "${accnt_name}" /etc/passwd | /usr/bin/awk -F: '{print $1;}')
367 if [ -z "${run_service_as}" ]
368 then
369 csih_warning "Couldn't determine name of user running sshd service from /etc/passwd!"
370 csih_warning "As a result, this script cannot make sure that the files used"
371 csih_warning "by the sshd service belong to the user running the service."
372 csih_warning "Please re-run the mkpasswd tool to make sure the /etc/passwd"
373 csih_warning "file is in a good shape."
374 return 1
375 fi
376 fi
377 for i in "${SYSCONFDIR}"/ssh_config "${SYSCONFDIR}"/sshd_config "${SYSCONFDIR}"/ssh_host_*key "${SYSCONFDIR}"/ssh_host_*key.pub
378 do
379 if [ -f "$i" ]
380 then
381 if ! chown "${run_service_as}".544 "$i" >/dev/null 2>&1
382 then
383 csih_warning "Couldn't change owner of $i!"
384 let ++ret
385 fi
386 fi
387 done
388 if ! chown "${run_service_as}".544 ${LOCALSTATEDIR}/empty >/dev/null 2>&1
389 then
390 csih_warning "Couldn't change owner of ${LOCALSTATEDIR}/empty!"
391 let ++ret
392 fi
393 if ! chown "${run_service_as}".544 ${LOCALSTATEDIR}/log/lastlog >/dev/null 2>&1
394 then
395 csih_warning "Couldn't change owner of ${LOCALSTATEDIR}/log/lastlog!"
396 let ++ret
397 fi
398 if [ -f ${LOCALSTATEDIR}/log/sshd.log ]
399 then
400 if ! chown "${run_service_as}".544 ${LOCALSTATEDIR}/log/sshd.log >/dev/null 2>&1
401 then
402 csih_warning "Couldn't change owner of ${LOCALSTATEDIR}/log/sshd.log!"
403 let ++ret
404 fi
405 fi
406 if [ $ret -ne 0 ]
407 then
408 csih_warning "Couldn't change owner of important files to ${run_service_as}!"
409 csih_warning "This may cause the sshd service to fail! Please make sure that"
410 csih_warning "you have suufficient permissions to change the ownership of files"
411 csih_warning "and try to run the ssh-host-config script again."
412 fi
413 return $ret
414} # --- End of check_service_files_ownership --- #
415
416# ======================================================================
277# Routine: install_service 417# Routine: install_service
278# Install sshd as a service 418# Install sshd as a service
279# ====================================================================== 419# ======================================================================
280install_service() { 420install_service() {
281 local run_service_as 421 local run_service_as
282 local password 422 local password
423 local ret=0
283 424
284 if csih_is_nt 425 echo
426 if /usr/bin/cygrunsrv -Q sshd >/dev/null 2>&1
285 then 427 then
286 if ! cygrunsrv -Q sshd >/dev/null 2>&1 428 csih_inform "Sshd service is already installed."
429 check_service_files_ownership "" || let ret+=$?
430 else
431 echo -e "${_csih_QUERY_STR} Do you want to install sshd as a service?"
432 if csih_request "(Say \"no\" if it is already installed as a service)"
287 then 433 then
288 echo 434 csih_get_cygenv "${cygwin_value}"
289 echo
290 csih_warning "The following functions require administrator privileges!"
291 echo
292 echo -e "${_csih_QUERY_STR} Do you want to install sshd as a service?"
293 if csih_request "(Say \"no\" if it is already installed as a service)"
294 then
295 csih_get_cygenv "${cygwin_value}"
296 435
297 if ( csih_is_nt2003 || [ "$csih_FORCE_PRIVILEGED_USER" = "yes" ] ) 436 if ( csih_is_nt2003 || [ "$csih_FORCE_PRIVILEGED_USER" = "yes" ] )
298 then 437 then
299 csih_inform "On Windows Server 2003, Windows Vista, and above, the" 438 csih_inform "On Windows Server 2003, Windows Vista, and above, the"
300 csih_inform "SYSTEM account cannot setuid to other users -- a capability" 439 csih_inform "SYSTEM account cannot setuid to other users -- a capability"
301 csih_inform "sshd requires. You need to have or to create a privileged" 440 csih_inform "sshd requires. You need to have or to create a privileged"
302 csih_inform "account. This script will help you do so." 441 csih_inform "account. This script will help you do so."
303 echo 442 echo
304 443
305 [ "${opt_force}" = "yes" ] && opt_f=-f 444 [ "${opt_force}" = "yes" ] && opt_f=-f
306 [ -n "${user_account}" ] && opt_u="-u ""${user_account}""" 445 [ -n "${user_account}" ] && opt_u="-u ""${user_account}"""
307 csih_select_privileged_username ${opt_f} ${opt_u} sshd 446 csih_select_privileged_username ${opt_f} ${opt_u} sshd
308 447
309 if ! csih_create_privileged_user "${password_value}" 448 if ! csih_create_privileged_user "${password_value}"
310 then 449 then
311 csih_error_recoverable "There was a serious problem creating a privileged user." 450 csih_error_recoverable "There was a serious problem creating a privileged user."
312 csih_request "Do you want to proceed anyway?" || exit 1 451 csih_request "Do you want to proceed anyway?" || exit 1
313 fi 452 let ++ret
314 fi 453 fi
454 fi
315 455
316 # never returns empty if NT or above 456 # Never returns empty if NT or above
317 run_service_as=$(csih_service_should_run_as) 457 run_service_as=$(csih_service_should_run_as)
318 458
319 if [ "${run_service_as}" = "${csih_PRIVILEGED_USERNAME}" ] 459 if [ "${run_service_as}" = "${csih_PRIVILEGED_USERNAME}" ]
460 then
461 password="${csih_PRIVILEGED_PASSWORD}"
462 if [ -z "${password}" ]
320 then 463 then
321 password="${csih_PRIVILEGED_PASSWORD}" 464 csih_get_value "Please enter the password for user '${run_service_as}':" "-s"
322 if [ -z "${password}" ] 465 password="${csih_value}"
323 then
324 csih_get_value "Please enter the password for user '${run_service_as}':" "-s"
325 password="${csih_value}"
326 fi
327 fi 466 fi
467 fi
328 468
329 # at this point, we either have $run_service_as = "system" and $password is empty, 469 # At this point, we either have $run_service_as = "system" and
330 # or $run_service_as is some privileged user and (hopefully) $password contains 470 # $password is empty, or $run_service_as is some privileged user and
331 # the correct password. So, from here out, we use '-z "${password}"' to discriminate 471 # (hopefully) $password contains the correct password. So, from here
332 # the two cases. 472 # out, we use '-z "${password}"' to discriminate the two cases.
333 473
334 csih_check_user "${run_service_as}" 474 csih_check_user "${run_service_as}"
335 475
336 if [ -n "${csih_cygenv}" ] 476 if [ -n "${csih_cygenv}" ]
477 then
478 cygwin_env=( -e "CYGWIN=${csih_cygenv}" )
479 fi
480 if [ -z "${password}" ]
481 then
482 if /usr/bin/cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd \
483 -a "-D" -y tcpip "${cygwin_env[@]}"
337 then 484 then
338 cygwin_env=( -e "CYGWIN=${csih_cygenv}" ) 485 echo
486 csih_inform "The sshd service has been installed under the LocalSystem"
487 csih_inform "account (also known as SYSTEM). To start the service now, call"
488 csih_inform "\`net start sshd' or \`cygrunsrv -S sshd'. Otherwise, it"
489 csih_inform "will start automatically after the next reboot."
339 fi 490 fi
340 if [ -z "${password}" ] 491 else
492 if /usr/bin/cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd \
493 -a "-D" -y tcpip "${cygwin_env[@]}" \
494 -u "${run_service_as}" -w "${password}"
341 then 495 then
342 if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd \ 496 echo
343 -a "-D" -y tcpip "${cygwin_env[@]}" 497 csih_inform "The sshd service has been installed under the '${run_service_as}'"
344 then 498 csih_inform "account. To start the service now, call \`net start sshd' or"
345 echo 499 csih_inform "\`cygrunsrv -S sshd'. Otherwise, it will start automatically"
346 csih_inform "The sshd service has been installed under the LocalSystem" 500 csih_inform "after the next reboot."
347 csih_inform "account (also known as SYSTEM). To start the service now, call"
348 csih_inform "\`net start sshd' or \`cygrunsrv -S sshd'. Otherwise, it"
349 csih_inform "will start automatically after the next reboot."
350 fi
351 else
352 if cygrunsrv -I sshd -d "CYGWIN sshd" -p /usr/sbin/sshd \
353 -a "-D" -y tcpip "${cygwin_env[@]}" \
354 -u "${run_service_as}" -w "${password}"
355 then
356 echo
357 csih_inform "The sshd service has been installed under the '${run_service_as}'"
358 csih_inform "account. To start the service now, call \`net start sshd' or"
359 csih_inform "\`cygrunsrv -S sshd'. Otherwise, it will start automatically"
360 csih_inform "after the next reboot."
361 fi
362 fi 501 fi
502 fi
363 503
364 # now, if successfully installed, set ownership of the affected files 504 if /usr/bin/cygrunsrv -Q sshd >/dev/null 2>&1
365 if cygrunsrv -Q sshd >/dev/null 2>&1 505 then
366 then 506 check_service_files_ownership "${run_service_as}" || let ret+=$?
367 chown "${run_service_as}" ${SYSCONFDIR}/ssh* 507 else
368 chown "${run_service_as}".544 ${LOCALSTATEDIR}/empty 508 csih_error_recoverable "Installing sshd as a service failed!"
369 chown "${run_service_as}".544 ${LOCALSTATEDIR}/log/lastlog 509 let ++ret
370 if [ -f ${LOCALSTATEDIR}/log/sshd.log ] 510 fi
371 then 511 fi # user allowed us to install as service
372 chown "${run_service_as}".544 ${LOCALSTATEDIR}/log/sshd.log 512 fi # service not yet installed
373 fi 513 return $ret
374 else
375 csih_warning "Something went wrong installing the sshd service."
376 fi
377 fi # user allowed us to install as service
378 fi # service not yet installed
379 fi # csih_is_nt
380} # --- End of install_service --- # 514} # --- End of install_service --- #
381 515
382# ====================================================================== 516# ======================================================================
@@ -488,21 +622,71 @@ done
488 622
489# Check for running ssh/sshd processes first. Refuse to do anything while 623# Check for running ssh/sshd processes first. Refuse to do anything while
490# some ssh processes are still running 624# some ssh processes are still running
491if ps -ef | grep -q '/sshd\?$' 625if /usr/bin/ps -ef | /usr/bin/grep -q '/sshd\?$'
492then 626then
493 echo 627 echo
494 csih_error "There are still ssh processes running. Please shut them down first." 628 csih_error "There are still ssh processes running. Please shut them down first."
495fi 629fi
496 630
631# Make sure the user is running in an administrative context
632admin=$(/usr/bin/id -G | /usr/bin/grep -Eq '\<544\>' && echo yes || echo no)
633if [ "${admin}" != "yes" ]
634then
635 echo
636 csih_warning "Running this script typically requires administrator privileges!"
637 csih_warning "However, it seems your account does not have these privileges."
638 csih_warning "Here's the list of groups in your user token:"
639 echo
640 for i in $(/usr/bin/id -G)
641 do
642 /usr/bin/awk -F: "/[^:]*:[^:]*:$i:/{ print \" \" \$1; }" /etc/group
643 done
644 echo
645 csih_warning "This usually means you're running this script from a non-admin"
646 csih_warning "desktop session, or in a non-elevated shell under UAC control."
647 echo
648 csih_warning "Make sure you have the appropriate privileges right now,"
649 csih_warning "otherwise parts of this script will probably fail!"
650 echo
651 echo -e "${_csih_QUERY_STR} Are you sure you want to continue? (Say \"no\" if you're not sure"
652 if ! csih_request "you have the required privileges)"
653 then
654 echo
655 csih_inform "Ok. Exiting. Make sure to switch to an administrative account"
656 csih_inform "or to start this script from an elevated shell."
657 exit 1
658 fi
659fi
660
661echo
662
663warning_cnt=0
664
497# Check for ${SYSCONFDIR} directory 665# Check for ${SYSCONFDIR} directory
498csih_make_dir "${SYSCONFDIR}" "Cannot create global configuration files." 666csih_make_dir "${SYSCONFDIR}" "Cannot create global configuration files."
499chmod 775 "${SYSCONFDIR}" 667if ! /usr/bin/chmod 775 "${SYSCONFDIR}" >/dev/null 2>&1
500setfacl -m u:system:rwx "${SYSCONFDIR}" 668then
669 csih_warning "Can't set permissions on ${SYSCONFDIR}!"
670 let ++warning_cnt
671fi
672if ! /usr/bin/setfacl -m u:system:rwx "${SYSCONFDIR}" >/dev/null 2>&1
673then
674 csih_warning "Can't set extended permissions on ${SYSCONFDIR}!"
675 let ++warning_cnt
676fi
501 677
502# Check for /var/log directory 678# Check for /var/log directory
503csih_make_dir "${LOCALSTATEDIR}/log" "Cannot create log directory." 679csih_make_dir "${LOCALSTATEDIR}/log" "Cannot create log directory."
504chmod 775 "${LOCALSTATEDIR}/log" 680if ! /usr/bin/chmod 775 "${LOCALSTATEDIR}/log" >/dev/null 2>&1
505setfacl -m u:system:rwx "${LOCALSTATEDIR}/log" 681then
682 csih_warning "Can't set permissions on ${LOCALSTATEDIR}/log!"
683 let ++warning_cnt
684fi
685if ! /usr/bin/setfacl -m u:system:rwx "${LOCALSTATEDIR}/log" >/dev/null 2>&1
686then
687 csih_warning "Can't set extended permissions on ${LOCALSTATEDIR}/log!"
688 let ++warning_cnt
689fi
506 690
507# Create /var/log/lastlog if not already exists 691# Create /var/log/lastlog if not already exists
508if [ -e ${LOCALSTATEDIR}/log/lastlog -a ! -f ${LOCALSTATEDIR}/log/lastlog ] 692if [ -e ${LOCALSTATEDIR}/log/lastlog -a ! -f ${LOCALSTATEDIR}/log/lastlog ]
@@ -513,26 +697,33 @@ then
513fi 697fi
514if [ ! -e ${LOCALSTATEDIR}/log/lastlog ] 698if [ ! -e ${LOCALSTATEDIR}/log/lastlog ]
515then 699then
516 cat /dev/null > ${LOCALSTATEDIR}/log/lastlog 700 /usr/bin/cat /dev/null > ${LOCALSTATEDIR}/log/lastlog
517 chmod 644 ${LOCALSTATEDIR}/log/lastlog 701 if ! /usr/bin/chmod 644 ${LOCALSTATEDIR}/log/lastlog >/dev/null 2>&1
702 then
703 csih_warning "Can't set permissions on ${LOCALSTATEDIR}/log/lastlog!"
704 let ++warning_cnt
705 fi
518fi 706fi
519 707
520# Create /var/empty file used as chroot jail for privilege separation 708# Create /var/empty file used as chroot jail for privilege separation
521csih_make_dir "${LOCALSTATEDIR}/empty" "Cannot create ${LOCALSTATEDIR}/empty directory." 709csih_make_dir "${LOCALSTATEDIR}/empty" "Cannot create ${LOCALSTATEDIR}/empty directory."
522chmod 755 "${LOCALSTATEDIR}/empty" 710if ! /usr/bin/chmod 755 "${LOCALSTATEDIR}/empty" >/dev/null 2>&1
523setfacl -m u:system:rwx "${LOCALSTATEDIR}/empty" 711then
712 csih_warning "Can't set permissions on ${LOCALSTATEDIR}/empty!"
713 let ++warning_cnt
714fi
715if ! /usr/bin/setfacl -m u:system:rwx "${LOCALSTATEDIR}/empty" >/dev/null 2>&1
716then
717 csih_warning "Can't set extended permissions on ${LOCALSTATEDIR}/empty!"
718 let ++warning_cnt
719fi
524 720
525# host keys 721# host keys
526create_host_keys 722create_host_keys || let warning_cnt+=$?
527
528# use 'cmp' program to determine if a config file is identical
529# to the default version of that config file
530csih_check_program_or_error cmp diffutils
531
532 723
533# handle ssh_config 724# handle ssh_config
534csih_install_config "${SYSCONFDIR}/ssh_config" "${SYSCONFDIR}/defaults" 725csih_install_config "${SYSCONFDIR}/ssh_config" "${SYSCONFDIR}/defaults" || let ++warning_cnt
535if cmp "${SYSCONFDIR}/ssh_config" "${SYSCONFDIR}/defaults/${SYSCONFDIR}/ssh_config" >/dev/null 2>&1 726if /usr/bin/cmp "${SYSCONFDIR}/ssh_config" "${SYSCONFDIR}/defaults/${SYSCONFDIR}/ssh_config" >/dev/null 2>&1
536then 727then
537 if [ "${port_number}" != "22" ] 728 if [ "${port_number}" != "22" ]
538 then 729 then
@@ -543,19 +734,24 @@ then
543fi 734fi
544 735
545# handle sshd_config (and privsep) 736# handle sshd_config (and privsep)
546csih_install_config "${SYSCONFDIR}/sshd_config" "${SYSCONFDIR}/defaults" 737csih_install_config "${SYSCONFDIR}/sshd_config" "${SYSCONFDIR}/defaults" || let ++warning_cnt
547if ! cmp "${SYSCONFDIR}/sshd_config" "${SYSCONFDIR}/defaults/${SYSCONFDIR}/sshd_config" >/dev/null 2>&1 738if ! /usr/bin/cmp "${SYSCONFDIR}/sshd_config" "${SYSCONFDIR}/defaults/${SYSCONFDIR}/sshd_config" >/dev/null 2>&1
548then 739then
549 grep -q UsePrivilegeSeparation ${SYSCONFDIR}/sshd_config && privsep_configured=yes 740 /usr/bin/grep -q UsePrivilegeSeparation ${SYSCONFDIR}/sshd_config && privsep_configured=yes
550fi 741fi
551sshd_privsep 742sshd_privsep || let warning_cnt+=$?
552
553 743
554 744update_services_file || let warning_cnt+=$?
555update_services_file 745update_inetd_conf || let warning_cnt+=$?
556update_inetd_conf 746install_service || let warning_cnt+=$?
557install_service
558 747
559echo 748echo
560csih_inform "Host configuration finished. Have fun!" 749if [ $warning_cnt -eq 0 ]
561 750then
751 csih_inform "Host configuration finished. Have fun!"
752else
753 csih_warning "Host configuration exited with ${warning_cnt} errors or warnings!"
754 csih_warning "Make sure that all problems reported are fixed,"
755 csih_warning "then re-run ssh-host-config."
756fi
757exit $warning_cnt
diff --git a/contrib/cygwin/ssh-user-config b/contrib/cygwin/ssh-user-config
index f1a001a93..027ae6032 100644
--- a/contrib/cygwin/ssh-user-config
+++ b/contrib/cygwin/ssh-user-config
@@ -39,85 +39,34 @@ pwdhome=
39with_passphrase= 39with_passphrase=
40 40
41# ====================================================================== 41# ======================================================================
42# Routine: create_ssh1_identity 42# Routine: create_identity
43# optionally create ~/.ssh/identity[.pub] 43# optionally create identity of type argument in ~/.ssh
44# optionally add result to ~/.ssh/authorized_keys 44# optionally add result to ~/.ssh/authorized_keys
45# ====================================================================== 45# ======================================================================
46create_ssh1_identity() { 46create_identity() {
47 if [ ! -f "${pwdhome}/.ssh/identity" ] 47 local file="$1"
48 local type="$2"
49 local name="$3"
50 if [ ! -f "${pwdhome}/.ssh/${file}" ]
48 then 51 then
49 if csih_request "Shall I create an SSH1 RSA identity file for you?" 52 if csih_request "Shall I create a ${name} identity file for you?"
50 then 53 then
51 csih_inform "Generating ${pwdhome}/.ssh/identity" 54 csih_inform "Generating ${pwdhome}/.ssh/${file}"
52 if [ "${with_passphrase}" = "yes" ] 55 if [ "${with_passphrase}" = "yes" ]
53 then 56 then
54 ssh-keygen -t rsa1 -N "${passphrase}" -f "${pwdhome}/.ssh/identity" > /dev/null 57 ssh-keygen -t "${type}" -N "${passphrase}" -f "${pwdhome}/.ssh/${file}" > /dev/null
55 else 58 else
56 ssh-keygen -t rsa1 -f "${pwdhome}/.ssh/identity" > /dev/null 59 ssh-keygen -t "${type}" -f "${pwdhome}/.ssh/${file}" > /dev/null
57 fi 60 fi
58 if csih_request "Do you want to use this identity to login to this machine?" 61 if csih_request "Do you want to use this identity to login to this machine?"
59 then 62 then
60 csih_inform "Adding to ${pwdhome}/.ssh/authorized_keys" 63 csih_inform "Adding to ${pwdhome}/.ssh/authorized_keys"
61 cat "${pwdhome}/.ssh/identity.pub" >> "${pwdhome}/.ssh/authorized_keys" 64 cat "${pwdhome}/.ssh/${file}.pub" >> "${pwdhome}/.ssh/authorized_keys"
62 fi 65 fi
63 fi 66 fi
64 fi 67 fi
65} # === End of create_ssh1_identity() === # 68} # === End of create_ssh1_identity() === #
66readonly -f create_ssh1_identity 69readonly -f create_identity
67
68# ======================================================================
69# Routine: create_ssh2_rsa_identity
70# optionally create ~/.ssh/id_rsa[.pub]
71# optionally add result to ~/.ssh/authorized_keys
72# ======================================================================
73create_ssh2_rsa_identity() {
74 if [ ! -f "${pwdhome}/.ssh/id_rsa" ]
75 then
76 if csih_request "Shall I create an SSH2 RSA identity file for you?"
77 then
78 csih_inform "Generating ${pwdhome}/.ssh/id_rsa"
79 if [ "${with_passphrase}" = "yes" ]
80 then
81 ssh-keygen -t rsa -N "${passphrase}" -f "${pwdhome}/.ssh/id_rsa" > /dev/null
82 else
83 ssh-keygen -t rsa -f "${pwdhome}/.ssh/id_rsa" > /dev/null
84 fi
85 if csih_request "Do you want to use this identity to login to this machine?"
86 then
87 csih_inform "Adding to ${pwdhome}/.ssh/authorized_keys"
88 cat "${pwdhome}/.ssh/id_rsa.pub" >> "${pwdhome}/.ssh/authorized_keys"
89 fi
90 fi
91 fi
92} # === End of create_ssh2_rsa_identity() === #
93readonly -f create_ssh2_rsa_identity
94
95# ======================================================================
96# Routine: create_ssh2_dsa_identity
97# optionally create ~/.ssh/id_dsa[.pub]
98# optionally add result to ~/.ssh/authorized_keys
99# ======================================================================
100create_ssh2_dsa_identity() {
101 if [ ! -f "${pwdhome}/.ssh/id_dsa" ]
102 then
103 if csih_request "Shall I create an SSH2 DSA identity file for you?"
104 then
105 csih_inform "Generating ${pwdhome}/.ssh/id_dsa"
106 if [ "${with_passphrase}" = "yes" ]
107 then
108 ssh-keygen -t dsa -N "${passphrase}" -f "${pwdhome}/.ssh/id_dsa" > /dev/null
109 else
110 ssh-keygen -t dsa -f "${pwdhome}/.ssh/id_dsa" > /dev/null
111 fi
112 if csih_request "Do you want to use this identity to login to this machine?"
113 then
114 csih_inform "Adding to ${pwdhome}/.ssh/authorized_keys"
115 cat "${pwdhome}/.ssh/id_dsa.pub" >> "${pwdhome}/.ssh/authorized_keys"
116 fi
117 fi
118 fi
119} # === End of create_ssh2_dsa_identity() === #
120readonly -f create_ssh2_dsa_identity
121 70
122# ====================================================================== 71# ======================================================================
123# Routine: check_user_homedir 72# Routine: check_user_homedir
@@ -311,9 +260,10 @@ fi
311 260
312check_user_homedir 261check_user_homedir
313check_user_dot_ssh_dir 262check_user_dot_ssh_dir
314create_ssh1_identity 263create_identity id_rsa rsa "SSH2 RSA"
315create_ssh2_rsa_identity 264create_identity id_dsa dsa "SSH2 DSA"
316create_ssh2_dsa_identity 265create_identity id_ecdsa ecdsa "SSH2 ECDSA"
266create_identity identity rsa1 "(deprecated) SSH1 RSA"
317fix_authorized_keys_perms 267fix_authorized_keys_perms
318 268
319echo 269echo
diff --git a/contrib/redhat/openssh.spec b/contrib/redhat/openssh.spec
index e99e33d0f..be6de088c 100644
--- a/contrib/redhat/openssh.spec
+++ b/contrib/redhat/openssh.spec
@@ -1,4 +1,4 @@
1%define ver 5.8p1 1%define ver 5.9p1
2%define rel 1 2%define rel 1
3 3
4# OpenSSH privilege separation requires a user & group ID 4# OpenSSH privilege separation requires a user & group ID
@@ -84,24 +84,24 @@ Obsoletes: ssh
84%if %{build6x} 84%if %{build6x}
85PreReq: initscripts >= 5.00 85PreReq: initscripts >= 5.00
86%else 86%else
87PreReq: initscripts >= 5.20 87Requires: initscripts >= 5.20
88%endif 88%endif
89BuildPreReq: perl, openssl-devel, tcp_wrappers 89BuildRequires: perl, openssl-devel, tcp_wrappers
90BuildPreReq: /bin/login 90BuildRequires: /bin/login
91%if ! %{build6x} 91%if ! %{build6x}
92BuildPreReq: glibc-devel, pam 92BuildPreReq: glibc-devel, pam
93%else 93%else
94BuildPreReq: /usr/include/security/pam_appl.h 94BuildRequires: /usr/include/security/pam_appl.h
95%endif 95%endif
96%if ! %{no_x11_askpass} 96%if ! %{no_x11_askpass}
97BuildPreReq: /usr/include/X11/Xlib.h 97BuildRequires: /usr/include/X11/Xlib.h
98%endif 98%endif
99%if ! %{no_gnome_askpass} 99%if ! %{no_gnome_askpass}
100BuildPreReq: pkgconfig 100BuildRequires: pkgconfig
101%endif 101%endif
102%if %{kerberos5} 102%if %{kerberos5}
103BuildPreReq: krb5-devel 103BuildRequires: krb5-devel
104BuildPreReq: krb5-libs 104BuildRequires: krb5-libs
105%endif 105%endif
106 106
107%package clients 107%package clients
@@ -114,7 +114,7 @@ Obsoletes: ssh-clients
114Summary: The OpenSSH server daemon. 114Summary: The OpenSSH server daemon.
115Group: System Environment/Daemons 115Group: System Environment/Daemons
116Obsoletes: ssh-server 116Obsoletes: ssh-server
117PreReq: openssh = %{version}-%{release}, chkconfig >= 0.9 117Requires: openssh = %{version}-%{release}, chkconfig >= 0.9
118%if ! %{build6x} 118%if ! %{build6x}
119Requires: /etc/pam.d/system-auth 119Requires: /etc/pam.d/system-auth
120%endif 120%endif
@@ -712,7 +712,7 @@ fi
712 it generates. 712 it generates.
713 713
714* Thu Oct 5 2000 Nalin Dahyabhai <nalin@redhat.com> 714* Thu Oct 5 2000 Nalin Dahyabhai <nalin@redhat.com>
715- Add BuildPreReq on /usr/include/security/pam_appl.h to be sure we always 715- Add BuildRequires on /usr/include/security/pam_appl.h to be sure we always
716 build PAM authentication in. 716 build PAM authentication in.
717- Try setting SSH_ASKPASS if gnome-ssh-askpass is installed. 717- Try setting SSH_ASKPASS if gnome-ssh-askpass is installed.
718- Clean out no-longer-used patches. 718- Clean out no-longer-used patches.
@@ -721,7 +721,7 @@ fi
721 721
722* Mon Oct 2 2000 Nalin Dahyabhai <nalin@redhat.com> 722* Mon Oct 2 2000 Nalin Dahyabhai <nalin@redhat.com>
723- Update x11-askpass to 1.0.2. (#17835) 723- Update x11-askpass to 1.0.2. (#17835)
724- Add BuildPreReqs for /bin/login and /usr/bin/rsh so that configure will 724- Add BuildRequiress for /bin/login and /usr/bin/rsh so that configure will
725 always find them in the right place. (#17909) 725 always find them in the right place. (#17909)
726- Set the default path to be the same as the one supplied by /bin/login, but 726- Set the default path to be the same as the one supplied by /bin/login, but
727 add /usr/X11R6/bin. (#17909) 727 add /usr/X11R6/bin. (#17909)
diff --git a/contrib/redhat/sshd.init b/contrib/redhat/sshd.init
index 854aff665..2334d8142 100755
--- a/contrib/redhat/sshd.init
+++ b/contrib/redhat/sshd.init
@@ -22,70 +22,9 @@ RETVAL=0
22prog="sshd" 22prog="sshd"
23 23
24# Some functions to make the below more readable 24# Some functions to make the below more readable
25KEYGEN=/usr/bin/ssh-keygen
26SSHD=/usr/sbin/sshd 25SSHD=/usr/sbin/sshd
27RSA1_KEY=/etc/ssh/ssh_host_key
28RSA_KEY=/etc/ssh/ssh_host_rsa_key
29DSA_KEY=/etc/ssh/ssh_host_dsa_key
30PID_FILE=/var/run/sshd.pid 26PID_FILE=/var/run/sshd.pid
31 27
32do_rsa1_keygen() {
33 if [ ! -s $RSA1_KEY ]; then
34 echo -n $"Generating SSH1 RSA host key: "
35 if $KEYGEN -q -t rsa1 -f $RSA1_KEY -C '' -N '' >&/dev/null; then
36 chmod 600 $RSA1_KEY
37 chmod 644 $RSA1_KEY.pub
38 if [ -x /sbin/restorecon ]; then
39 /sbin/restorecon $RSA1_KEY.pub
40 fi
41 success $"RSA1 key generation"
42 echo
43 else
44 failure $"RSA1 key generation"
45 echo
46 exit 1
47 fi
48 fi
49}
50
51do_rsa_keygen() {
52 if [ ! -s $RSA_KEY ]; then
53 echo -n $"Generating SSH2 RSA host key: "
54 if $KEYGEN -q -t rsa -f $RSA_KEY -C '' -N '' >&/dev/null; then
55 chmod 600 $RSA_KEY
56 chmod 644 $RSA_KEY.pub
57 if [ -x /sbin/restorecon ]; then
58 /sbin/restorecon $RSA_KEY.pub
59 fi
60 success $"RSA key generation"
61 echo
62 else
63 failure $"RSA key generation"
64 echo
65 exit 1
66 fi
67 fi
68}
69
70do_dsa_keygen() {
71 if [ ! -s $DSA_KEY ]; then
72 echo -n $"Generating SSH2 DSA host key: "
73 if $KEYGEN -q -t dsa -f $DSA_KEY -C '' -N '' >&/dev/null; then
74 chmod 600 $DSA_KEY
75 chmod 644 $DSA_KEY.pub
76 if [ -x /sbin/restorecon ]; then
77 /sbin/restorecon $DSA_KEY.pub
78 fi
79 success $"DSA key generation"
80 echo
81 else
82 failure $"DSA key generation"
83 echo
84 exit 1
85 fi
86 fi
87}
88
89do_restart_sanity_check() 28do_restart_sanity_check()
90{ 29{
91 $SSHD -t 30 $SSHD -t
@@ -99,9 +38,13 @@ do_restart_sanity_check()
99start() 38start()
100{ 39{
101 # Create keys if necessary 40 # Create keys if necessary
102 do_rsa1_keygen 41 /usr/bin/ssh-keygen -A
103 do_rsa_keygen 42 if [ -x /sbin/restorecon ]; then
104 do_dsa_keygen 43 /sbin/restorcon /etc/ssh/ssh_host_key.pub
44 /sbin/restorcon /etc/ssh/ssh_host_rsa_key.pub
45 /sbin/restorcon /etc/ssh/ssh_host_dsa_key.pub
46 /sbin/restorcon /etc/ssh/ssh_host_ecdsa_key.pub
47 fi
105 48
106 echo -n $"Starting $prog:" 49 echo -n $"Starting $prog:"
107 $SSHD $OPTIONS && success || failure 50 $SSHD $OPTIONS && success || failure
diff --git a/contrib/ssh-copy-id b/contrib/ssh-copy-id
index 368645cb4..9451aceec 100644
--- a/contrib/ssh-copy-id
+++ b/contrib/ssh-copy-id
@@ -25,7 +25,7 @@ else
25fi 25fi
26 26
27if [ -z "`eval $GET_ID`" ] && [ -r "${ID_FILE}" ] ; then 27if [ -z "`eval $GET_ID`" ] && [ -r "${ID_FILE}" ] ; then
28 GET_ID="cat ${ID_FILE}" 28 GET_ID="cat \"${ID_FILE}\""
29fi 29fi
30 30
31if [ -z "`eval $GET_ID`" ]; then 31if [ -z "`eval $GET_ID`" ]; then
diff --git a/contrib/suse/openssh.spec b/contrib/suse/openssh.spec
index 6afdcc4b4..3a4dfea37 100644
--- a/contrib/suse/openssh.spec
+++ b/contrib/suse/openssh.spec
@@ -13,7 +13,7 @@
13 13
14Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation 14Summary: OpenSSH, a free Secure Shell (SSH) protocol implementation
15Name: openssh 15Name: openssh
16Version: 5.8p1 16Version: 5.9p1
17URL: http://www.openssh.com/ 17URL: http://www.openssh.com/
18Release: 1 18Release: 1
19Source0: openssh-%{version}.tar.gz 19Source0: openssh-%{version}.tar.gz
@@ -28,11 +28,12 @@ Provides: ssh
28# (Build[ing] Prereq[uisites] only work for RPM 2.95 and newer.) 28# (Build[ing] Prereq[uisites] only work for RPM 2.95 and newer.)
29# building prerequisites -- stuff for 29# building prerequisites -- stuff for
30# OpenSSL (openssl-devel), 30# OpenSSL (openssl-devel),
31# TCP Wrappers (nkitb), 31# TCP Wrappers (tcpd-devel),
32# and Gnome (glibdev, gtkdev, and gnlibsd) 32# and Gnome (glibdev, gtkdev, and gnlibsd)
33# 33#
34BuildPrereq: openssl 34BuildPrereq: openssl
35BuildPrereq: nkitb 35BuildPrereq: tcpd-devel
36BuildPrereq: zlib-devel
36#BuildPrereq: glibdev 37#BuildPrereq: glibdev
37#BuildPrereq: gtkdev 38#BuildPrereq: gtkdev
38#BuildPrereq: gnlibsd 39#BuildPrereq: gnlibsd
@@ -177,15 +178,8 @@ rm -rf $RPM_BUILD_ROOT
177/usr/sbin/useradd -r -o -g sshd -u %{sshd_uid} -s /bin/false -c "SSH Privilege Separation User" -d /var/lib/sshd sshd 2> /dev/null || : 178/usr/sbin/useradd -r -o -g sshd -u %{sshd_uid} -s /bin/false -c "SSH Privilege Separation User" -d /var/lib/sshd sshd 2> /dev/null || :
178 179
179%post 180%post
180if [ ! -f /etc/ssh/ssh_host_key -o ! -s /etc/ssh/ssh_host_key ]; then 181/usr/bin/ssh-keygen -A
181 echo "Generating SSH RSA host key..." 182%{fillup_and_insserv -n -y ssh sshd}
182 /usr/bin/ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N '' >&2
183fi
184if [ ! -f /etc/ssh/ssh_host_dsa_key -o ! -s /etc/ssh/ssh_host_dsa_key ]; then
185 echo "Generating SSH DSA host key..."
186 /usr/bin/ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N '' >&2
187fi
188%{fillup_and_insserv -n -s -y ssh sshd START_SSHD}
189%run_permissions 183%run_permissions
190 184
191%verifyscript 185%verifyscript
diff --git a/contrib/suse/rc.sshd b/contrib/suse/rc.sshd
index 4d4880d7e..4a3bc41db 100644
--- a/contrib/suse/rc.sshd
+++ b/contrib/suse/rc.sshd
@@ -43,20 +43,8 @@ rc_reset
43 43
44case "$1" in 44case "$1" in
45 start) 45 start)
46 if ! test -f /etc/ssh/ssh_host_key ; then 46 # Generate any missing host keys
47 echo Generating /etc/ssh/ssh_host_key. 47 ssh-keygen -A
48 ssh-keygen -t rsa1 -f /etc/ssh/ssh_host_key -N ''
49 fi
50 if ! test -f /etc/ssh/ssh_host_dsa_key ; then
51 echo Generating /etc/ssh/ssh_host_dsa_key.
52
53 ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''
54 fi
55 if ! test -f /etc/ssh/ssh_host_rsa_key ; then
56 echo Generating /etc/ssh/ssh_host_rsa_key.
57
58 ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''
59 fi
60 echo -n "Starting SSH daemon" 48 echo -n "Starting SSH daemon"
61 ## Start daemon with startproc(8). If this fails 49 ## Start daemon with startproc(8). If this fails
62 ## the echo return value is set appropriate. 50 ## the echo return value is set appropriate.
diff --git a/debian/changelog b/debian/changelog
index 4ab7d8955..108d915bb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,30 @@
1openssh (1:5.9p1-1) UNRELEASED; urgency=low
2
3 * New upstream release (http://www.openssh.org/txt/release-5.9).
4 - Introduce sandboxing of the pre-auth privsep child using an optional
5 sshd_config(5) "UsePrivilegeSeparation=sandbox" mode that enables
6 mandatory restrictions on the syscalls the privsep child can perform.
7 - Add new SHA256-based HMAC transport integrity modes from
8 http://www.ietf.org/id/draft-dbider-sha2-mac-for-ssh-02.txt.
9 - The pre-authentication sshd(8) privilege separation slave process now
10 logs via a socket shared with the master process, avoiding the need to
11 maintain /dev/log inside the chroot (closes: #75043, #429243,
12 #599240).
13 - ssh(1) now warns when a server refuses X11 forwarding (closes:
14 #504757).
15 - sshd_config(5)'s AuthorizedKeysFile now accepts multiple paths,
16 separated by whitespace (closes: #76312). The authorized_keys2
17 fallback is deprecated but documented (closes: #560156).
18 - ssh(1) and sshd(8): set IPv6 traffic class from IPQoS, as well as IPv4
19 ToS/DSCP (closes: #498297).
20 - ssh-add(1) now accepts keys piped from standard input. E.g. "ssh-add
21 - < /path/to/key" (closes: #229124).
22 - Clean up lost-passphrase text in ssh-keygen(1) (closes: #444691).
23 - Say "required" rather than "recommended" in unprotected-private-key
24 warning (LP: #663455).
25
26 -- Colin Watson <cjwatson@debian.org> Tue, 06 Sep 2011 10:16:33 +0100
27
1openssh (1:5.8p1-7) unstable; urgency=low 28openssh (1:5.8p1-7) unstable; urgency=low
2 29
3 * Only recommend ssh-import-id when built on Ubuntu (closes: #635887). 30 * Only recommend ssh-import-id when built on Ubuntu (closes: #635887).
diff --git a/debian/patches/auth-log-verbosity.patch b/debian/patches/auth-log-verbosity.patch
index 7aea6690d..da940d9fa 100644
--- a/debian/patches/auth-log-verbosity.patch
+++ b/debian/patches/auth-log-verbosity.patch
@@ -83,9 +83,9 @@ Index: b/auth-rsa.c
83=================================================================== 83===================================================================
84--- a/auth-rsa.c 84--- a/auth-rsa.c
85+++ b/auth-rsa.c 85+++ b/auth-rsa.c
86@@ -193,6 +193,8 @@ 86@@ -175,6 +175,8 @@
87 87 if ((f = auth_openkeyfile(file, pw, options.strict_modes)) == NULL)
88 key = key_new(KEY_RSA1); 88 return 0;
89 89
90+ auth_start_parse_options(); 90+ auth_start_parse_options();
91+ 91+
diff --git a/debian/patches/authorized-keys-man-symlink.patch b/debian/patches/authorized-keys-man-symlink.patch
index 13b3b6561..a9ca85407 100644
--- a/debian/patches/authorized-keys-man-symlink.patch
+++ b/debian/patches/authorized-keys-man-symlink.patch
@@ -8,11 +8,11 @@ Index: b/Makefile.in
8=================================================================== 8===================================================================
9--- a/Makefile.in 9--- a/Makefile.in
10+++ b/Makefile.in 10+++ b/Makefile.in
11@@ -289,6 +289,7 @@ 11@@ -275,6 +275,7 @@
12 $(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5 12 $(INSTALL) -m 644 sshd_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/sshd_config.5
13 $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5 13 $(INSTALL) -m 644 ssh_config.5.out $(DESTDIR)$(mandir)/$(mansubdir)5/ssh_config.5
14 $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8 14 $(INSTALL) -m 644 sshd.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
15+ ln -s ../$(mansubdir)8/sshd.8 $(DESTDIR)$(mandir)/$(mansubdir)5/authorized_keys.5 15+ ln -s ../$(mansubdir)8/sshd.8 $(DESTDIR)$(mandir)/$(mansubdir)5/authorized_keys.5
16 if [ ! -z "$(INSTALL_SSH_RAND_HELPER)" ]; then \ 16 $(INSTALL) -m 644 sftp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
17 $(INSTALL) -m 644 ssh-rand-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8 ; \ 17 $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
18 fi 18 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
diff --git a/debian/patches/debian-banner.patch b/debian/patches/debian-banner.patch
index 32251397d..57ca35e87 100644
--- a/debian/patches/debian-banner.patch
+++ b/debian/patches/debian-banner.patch
@@ -10,7 +10,7 @@ Index: b/servconf.c
10=================================================================== 10===================================================================
11--- a/servconf.c 11--- a/servconf.c
12+++ b/servconf.c 12+++ b/servconf.c
13@@ -143,6 +143,7 @@ 13@@ -142,6 +142,7 @@
14 options->authorized_principals_file = NULL; 14 options->authorized_principals_file = NULL;
15 options->ip_qos_interactive = -1; 15 options->ip_qos_interactive = -1;
16 options->ip_qos_bulk = -1; 16 options->ip_qos_bulk = -1;
@@ -18,7 +18,7 @@ Index: b/servconf.c
18 } 18 }
19 19
20 void 20 void
21@@ -293,6 +294,8 @@ 21@@ -289,6 +290,8 @@
22 options->ip_qos_interactive = IPTOS_LOWDELAY; 22 options->ip_qos_interactive = IPTOS_LOWDELAY;
23 if (options->ip_qos_bulk == -1) 23 if (options->ip_qos_bulk == -1)
24 options->ip_qos_bulk = IPTOS_THROUGHPUT; 24 options->ip_qos_bulk = IPTOS_THROUGHPUT;
@@ -27,7 +27,7 @@ Index: b/servconf.c
27 27
28 /* Turn privilege separation on by default */ 28 /* Turn privilege separation on by default */
29 if (use_privsep == -1) 29 if (use_privsep == -1)
30@@ -342,6 +345,7 @@ 30@@ -338,6 +341,7 @@
31 sZeroKnowledgePasswordAuthentication, sHostCertificate, 31 sZeroKnowledgePasswordAuthentication, sHostCertificate,
32 sRevokedKeys, sTrustedUserCAKeys, sAuthorizedPrincipalsFile, 32 sRevokedKeys, sTrustedUserCAKeys, sAuthorizedPrincipalsFile,
33 sKexAlgorithms, sIPQoS, 33 sKexAlgorithms, sIPQoS,
@@ -35,7 +35,7 @@ Index: b/servconf.c
35 sDeprecated, sUnsupported 35 sDeprecated, sUnsupported
36 } ServerOpCodes; 36 } ServerOpCodes;
37 37
38@@ -477,6 +481,7 @@ 38@@ -473,6 +477,7 @@
39 { "authorizedprincipalsfile", sAuthorizedPrincipalsFile, SSHCFG_ALL }, 39 { "authorizedprincipalsfile", sAuthorizedPrincipalsFile, SSHCFG_ALL },
40 { "kexalgorithms", sKexAlgorithms, SSHCFG_GLOBAL }, 40 { "kexalgorithms", sKexAlgorithms, SSHCFG_GLOBAL },
41 { "ipqos", sIPQoS, SSHCFG_ALL }, 41 { "ipqos", sIPQoS, SSHCFG_ALL },
@@ -43,7 +43,7 @@ Index: b/servconf.c
43 { NULL, sBadOption, 0 } 43 { NULL, sBadOption, 0 }
44 }; 44 };
45 45
46@@ -1439,6 +1444,10 @@ 46@@ -1436,6 +1441,10 @@
47 } 47 }
48 break; 48 break;
49 49
@@ -58,7 +58,7 @@ Index: b/servconf.h
58=================================================================== 58===================================================================
59--- a/servconf.h 59--- a/servconf.h
60+++ b/servconf.h 60+++ b/servconf.h
61@@ -160,6 +160,8 @@ 61@@ -166,6 +166,8 @@
62 62
63 int num_permitted_opens; 63 int num_permitted_opens;
64 64
@@ -71,7 +71,7 @@ Index: b/sshd.c
71=================================================================== 71===================================================================
72--- a/sshd.c 72--- a/sshd.c
73+++ b/sshd.c 73+++ b/sshd.c
74@@ -422,7 +422,8 @@ 74@@ -423,7 +423,8 @@
75 minor = PROTOCOL_MINOR_1; 75 minor = PROTOCOL_MINOR_1;
76 } 76 }
77 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", major, minor, 77 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", major, minor,
@@ -85,7 +85,7 @@ Index: b/sshd_config.5
85=================================================================== 85===================================================================
86--- a/sshd_config.5 86--- a/sshd_config.5
87+++ b/sshd_config.5 87+++ b/sshd_config.5
88@@ -339,6 +339,11 @@ 88@@ -340,6 +340,11 @@
89 .Dq no . 89 .Dq no .
90 The default is 90 The default is
91 .Dq delayed . 91 .Dq delayed .
diff --git a/debian/patches/debian-config.patch b/debian/patches/debian-config.patch
index e804aa526..74aa53ecc 100644
--- a/debian/patches/debian-config.patch
+++ b/debian/patches/debian-config.patch
@@ -24,7 +24,7 @@ Index: b/readconf.c
24=================================================================== 24===================================================================
25--- a/readconf.c 25--- a/readconf.c
26+++ b/readconf.c 26+++ b/readconf.c
27@@ -1223,7 +1223,7 @@ 27@@ -1268,7 +1268,7 @@
28 if (options->forward_x11 == -1) 28 if (options->forward_x11 == -1)
29 options->forward_x11 = 0; 29 options->forward_x11 = 0;
30 if (options->forward_x11_trusted == -1) 30 if (options->forward_x11_trusted == -1)
@@ -84,7 +84,7 @@ Index: b/ssh_config.5
84 The configuration file has the following format: 84 The configuration file has the following format:
85 .Pp 85 .Pp
86 Empty lines and lines starting with 86 Empty lines and lines starting with
87@@ -482,7 +498,8 @@ 87@@ -499,7 +515,8 @@
88 Remote clients will be refused access after this time. 88 Remote clients will be refused access after this time.
89 .Pp 89 .Pp
90 The default is 90 The default is
diff --git a/debian/patches/doc-hash-tab-completion.patch b/debian/patches/doc-hash-tab-completion.patch
index 5cf8aa46b..cec6f6639 100644
--- a/debian/patches/doc-hash-tab-completion.patch
+++ b/debian/patches/doc-hash-tab-completion.patch
@@ -8,7 +8,7 @@ Index: b/ssh_config.5
8=================================================================== 8===================================================================
9--- a/ssh_config.5 9--- a/ssh_config.5
10+++ b/ssh_config.5 10+++ b/ssh_config.5
11@@ -566,6 +566,9 @@ 11@@ -585,6 +585,9 @@
12 will not be converted automatically, 12 will not be converted automatically,
13 but may be manually hashed using 13 but may be manually hashed using
14 .Xr ssh-keygen 1 . 14 .Xr ssh-keygen 1 .
diff --git a/debian/patches/gssapi-autoconf.patch b/debian/patches/gssapi-autoconf.patch
deleted file mode 100644
index 51d8a8e72..000000000
--- a/debian/patches/gssapi-autoconf.patch
+++ /dev/null
@@ -1,29 +0,0 @@
1Description: Update config.h.in following GSSAPI patch
2Author: Colin Watson <cjwatson@debian.org>
3Forwarded: not-needed
4Last-Updated: 2010-02-27
5
6Index: b/config.h.in
7===================================================================
8--- a/config.h.in
9+++ b/config.h.in
10@@ -1417,6 +1417,9 @@
11 /* Use btmp to log bad logins */
12 #undef USE_BTMP
13
14+/* platform uses an in-memory credentials cache */
15+#undef USE_CCAPI
16+
17 /* Use libedit for sftp */
18 #undef USE_LIBEDIT
19
20@@ -1432,6 +1435,9 @@
21 /* Use PIPES instead of a socketpair() */
22 #undef USE_PIPES
23
24+/* platform has the Security Authorization Session API */
25+#undef USE_SECURITY_SESSION_API
26+
27 /* Define if you have Solaris process contracts */
28 #undef USE_SOLARIS_PROCESS_CONTRACTS
29
diff --git a/debian/patches/gssapi.patch b/debian/patches/gssapi.patch
index c123bf7b9..dc293683e 100644
--- a/debian/patches/gssapi.patch
+++ b/debian/patches/gssapi.patch
@@ -137,7 +137,7 @@ Index: b/Makefile.in
137=================================================================== 137===================================================================
138--- a/Makefile.in 138--- a/Makefile.in
139+++ b/Makefile.in 139+++ b/Makefile.in
140@@ -75,6 +75,7 @@ 140@@ -70,6 +70,7 @@
141 atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \ 141 atomicio.o key.o dispatch.o kex.o mac.o uidswap.o uuencode.o misc.o \
142 monitor_fdpass.o rijndael.o ssh-dss.o ssh-ecdsa.o ssh-rsa.o dh.o \ 142 monitor_fdpass.o rijndael.o ssh-dss.o ssh-ecdsa.o ssh-rsa.o dh.o \
143 kexdh.o kexgex.o kexdhc.o kexgexc.o bufec.o kexecdh.o kexecdhc.o \ 143 kexdh.o kexgex.o kexdhc.o kexgexc.o bufec.o kexecdh.o kexecdhc.o \
@@ -145,7 +145,7 @@ Index: b/Makefile.in
145 msg.o progressmeter.o dns.o entropy.o gss-genr.o umac.o jpake.o \ 145 msg.o progressmeter.o dns.o entropy.o gss-genr.o umac.o jpake.o \
146 schnorr.o ssh-pkcs11.o 146 schnorr.o ssh-pkcs11.o
147 147
148@@ -91,7 +92,7 @@ 148@@ -86,7 +87,7 @@
149 auth2-none.o auth2-passwd.o auth2-pubkey.o auth2-jpake.o \ 149 auth2-none.o auth2-passwd.o auth2-pubkey.o auth2-jpake.o \
150 monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o kexecdhs.o \ 150 monitor_mm.o monitor.o monitor_wrap.o kexdhs.o kexgexs.o kexecdhs.o \
151 auth-krb5.o \ 151 auth-krb5.o \
@@ -153,7 +153,7 @@ Index: b/Makefile.in
153+ auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o\ 153+ auth2-gss.o gss-serv.o gss-serv-krb5.o kexgsss.o\
154 loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \ 154 loginrec.o auth-pam.o auth-shadow.o auth-sia.o md5crypt.o \
155 sftp-server.o sftp-common.o \ 155 sftp-server.o sftp-common.o \
156 roaming_common.o roaming_serv.o 156 roaming_common.o roaming_serv.o \
157Index: b/auth-krb5.c 157Index: b/auth-krb5.c
158=================================================================== 158===================================================================
159--- a/auth-krb5.c 159--- a/auth-krb5.c
@@ -205,24 +205,12 @@ Index: b/auth-krb5.c
205 205
206 return (krb5_cc_resolve(ctx, ccname, ccache)); 206 return (krb5_cc_resolve(ctx, ccname, ccache));
207 } 207 }
208Index: b/auth.h
209===================================================================
210--- a/auth.h
211+++ b/auth.h
212@@ -53,6 +53,7 @@
213 int valid; /* user exists and is allowed to login */
214 int attempt;
215 int failures;
216+ int server_caused_failure;
217 int force_pwchange;
218 char *user; /* username sent by the client */
219 char *service;
220Index: b/auth2-gss.c 208Index: b/auth2-gss.c
221=================================================================== 209===================================================================
222--- a/auth2-gss.c 210--- a/auth2-gss.c
223+++ b/auth2-gss.c 211+++ b/auth2-gss.c
224@@ -1,7 +1,7 @@ 212@@ -1,7 +1,7 @@
225 /* $OpenBSD: auth2-gss.c,v 1.16 2007/10/29 00:52:45 dtucker Exp $ */ 213 /* $OpenBSD: auth2-gss.c,v 1.17 2011/03/10 02:52:57 djm Exp $ */
226 214
227 /* 215 /*
228- * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. 216- * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
@@ -271,23 +259,7 @@ Index: b/auth2-gss.c
271 /* 259 /*
272 * We only support those mechanisms that we know about (ie ones that we know 260 * We only support those mechanisms that we know about (ie ones that we know
273 * how to check local user kuserok and the like) 261 * how to check local user kuserok and the like)
274@@ -102,6 +136,7 @@ 262@@ -244,7 +278,8 @@
275
276 if (!present) {
277 xfree(doid);
278+ authctxt->server_caused_failure = 1;
279 return (0);
280 }
281
282@@ -109,6 +144,7 @@
283 if (ctxt != NULL)
284 ssh_gssapi_delete_ctx(&ctxt);
285 xfree(doid);
286+ authctxt->server_caused_failure = 1;
287 return (0);
288 }
289
290@@ -242,7 +278,8 @@
291 263
292 packet_check_eom(); 264 packet_check_eom();
293 265
@@ -297,7 +269,7 @@ Index: b/auth2-gss.c
297 269
298 authctxt->postponed = 0; 270 authctxt->postponed = 0;
299 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL); 271 dispatch_set(SSH2_MSG_USERAUTH_GSSAPI_TOKEN, NULL);
300@@ -277,7 +314,8 @@ 272@@ -279,7 +314,8 @@
301 gssbuf.length = buffer_len(&b); 273 gssbuf.length = buffer_len(&b);
302 274
303 if (!GSS_ERROR(PRIVSEP(ssh_gssapi_checkmic(gssctxt, &gssbuf, &mic)))) 275 if (!GSS_ERROR(PRIVSEP(ssh_gssapi_checkmic(gssctxt, &gssbuf, &mic))))
@@ -307,7 +279,7 @@ Index: b/auth2-gss.c
307 else 279 else
308 logit("GSSAPI MIC check failed"); 280 logit("GSSAPI MIC check failed");
309 281
310@@ -292,6 +330,12 @@ 282@@ -294,6 +330,12 @@
311 userauth_finish(authctxt, authenticated, "gssapi-with-mic"); 283 userauth_finish(authctxt, authenticated, "gssapi-with-mic");
312 } 284 }
313 285
@@ -340,24 +312,6 @@ Index: b/auth2.c
340 &method_gssapi, 312 &method_gssapi,
341 #endif 313 #endif
342 #ifdef JPAKE 314 #ifdef JPAKE
343@@ -274,6 +276,7 @@
344 #endif
345
346 authctxt->postponed = 0;
347+ authctxt->server_caused_failure = 0;
348
349 /* try to authenticate user */
350 m = authmethod_lookup(method);
351@@ -346,7 +349,8 @@
352 } else {
353
354 /* Allow initial try of "none" auth without failure penalty */
355- if (authctxt->attempt > 1 || strcmp(method, "none") != 0)
356+ if (!authctxt->server_caused_failure &&
357+ (authctxt->attempt > 1 || strcmp(method, "none") != 0))
358 authctxt->failures++;
359 if (authctxt->failures >= options.max_authtries) {
360 #ifdef SSH_AUDIT_EVENTS
361Index: b/clientloop.c 315Index: b/clientloop.c
362=================================================================== 316===================================================================
363--- a/clientloop.c 317--- a/clientloop.c
@@ -373,7 +327,7 @@ Index: b/clientloop.c
373 /* import options */ 327 /* import options */
374 extern Options options; 328 extern Options options;
375 329
376@@ -1483,6 +1487,15 @@ 330@@ -1508,6 +1512,15 @@
377 /* Do channel operations unless rekeying in progress. */ 331 /* Do channel operations unless rekeying in progress. */
378 if (!rekeying) { 332 if (!rekeying) {
379 channel_after_select(readset, writeset); 333 channel_after_select(readset, writeset);
@@ -389,41 +343,133 @@ Index: b/clientloop.c
389 if (need_rekeying || packet_need_rekeying()) { 343 if (need_rekeying || packet_need_rekeying()) {
390 debug("need rekeying"); 344 debug("need rekeying");
391 xxx_kex->done = 0; 345 xxx_kex->done = 0;
346Index: b/config.h.in
347===================================================================
348--- a/config.h.in
349+++ b/config.h.in
350@@ -1441,6 +1441,9 @@
351 /* Use btmp to log bad logins */
352 #undef USE_BTMP
353
354+/* platform uses an in-memory credentials cache */
355+#undef USE_CCAPI
356+
357 /* Use libedit for sftp */
358 #undef USE_LIBEDIT
359
360@@ -1456,6 +1459,9 @@
361 /* Use PIPES instead of a socketpair() */
362 #undef USE_PIPES
363
364+/* platform has the Security Authorization Session API */
365+#undef USE_SECURITY_SESSION_API
366+
367 /* Define if you have Solaris process contracts */
368 #undef USE_SOLARIS_PROCESS_CONTRACTS
369
370Index: b/configure
371===================================================================
372--- a/configure
373+++ b/configure
374@@ -6521,6 +6521,63 @@
375
376 $as_echo "#define SSH_TUN_PREPEND_AF 1" >>confdefs.h
377
378+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have the Security Authorization Session API" >&5
379+$as_echo_n "checking if we have the Security Authorization Session API... " >&6; }
380+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
381+/* end confdefs.h. */
382+#include <Security/AuthSession.h>
383+int
384+main ()
385+{
386+SessionCreate(0, 0);
387+ ;
388+ return 0;
389+}
390+_ACEOF
391+if ac_fn_c_try_compile "$LINENO"; then :
392+ ac_cv_use_security_session_api="yes"
393+
394+$as_echo "#define USE_SECURITY_SESSION_API 1" >>confdefs.h
395+
396+ LIBS="$LIBS -framework Security"
397+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
398+$as_echo "yes" >&6; }
399+else
400+ ac_cv_use_security_session_api="no"
401+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
402+$as_echo "no" >&6; }
403+fi
404+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
405+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we have an in-memory credentials cache" >&5
406+$as_echo_n "checking if we have an in-memory credentials cache... " >&6; }
407+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
408+/* end confdefs.h. */
409+#include <Kerberos/Kerberos.h>
410+int
411+main ()
412+{
413+cc_context_t c;
414+ (void) cc_initialize (&c, 0, NULL, NULL);
415+ ;
416+ return 0;
417+}
418+_ACEOF
419+if ac_fn_c_try_compile "$LINENO"; then :
420+
421+$as_echo "#define USE_CCAPI 1" >>confdefs.h
422+
423+ LIBS="$LIBS -framework Security"
424+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
425+$as_echo "yes" >&6; }
426+ if test "x$ac_cv_use_security_session_api" = "xno"; then
427+ as_fn_error $? "*** Need a security framework to use the credentials cache API ***" "$LINENO" 5
428+ fi
429+else
430+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
431+$as_echo "no" >&6; }
432+
433+fi
434+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
435
436 ac_fn_c_check_decl "$LINENO" "AU_IPv4" "ac_cv_have_decl_AU_IPv4" "$ac_includes_default"
437 if test "x$ac_cv_have_decl_AU_IPv4" = xyes; then :
392Index: b/configure.ac 438Index: b/configure.ac
393=================================================================== 439===================================================================
394--- a/configure.ac 440--- a/configure.ac
395+++ b/configure.ac 441+++ b/configure.ac
396@@ -514,6 +514,30 @@ 442@@ -515,6 +515,30 @@
397 [Use tunnel device compatibility to OpenBSD]) 443 [Use tunnel device compatibility to OpenBSD])
398 AC_DEFINE(SSH_TUN_PREPEND_AF, 1, 444 AC_DEFINE([SSH_TUN_PREPEND_AF], [1],
399 [Prepend the address family to IP tunnel traffic]) 445 [Prepend the address family to IP tunnel traffic])
400+ AC_MSG_CHECKING(if we have the Security Authorization Session API) 446+ AC_MSG_CHECKING([if we have the Security Authorization Session API])
401+ AC_TRY_COMPILE([#include <Security/AuthSession.h>], 447+ AC_TRY_COMPILE([#include <Security/AuthSession.h>],
402+ [SessionCreate(0, 0);], 448+ [SessionCreate(0, 0);],
403+ [ac_cv_use_security_session_api="yes" 449+ [ac_cv_use_security_session_api="yes"
404+ AC_DEFINE(USE_SECURITY_SESSION_API, 1, 450+ AC_DEFINE([USE_SECURITY_SESSION_API], [1],
405+ [platform has the Security Authorization Session API]) 451+ [platform has the Security Authorization Session API])
406+ LIBS="$LIBS -framework Security" 452+ LIBS="$LIBS -framework Security"
407+ AC_MSG_RESULT(yes)], 453+ AC_MSG_RESULT([yes])],
408+ [ac_cv_use_security_session_api="no" 454+ [ac_cv_use_security_session_api="no"
409+ AC_MSG_RESULT(no)]) 455+ AC_MSG_RESULT([no])])
410+ AC_MSG_CHECKING(if we have an in-memory credentials cache) 456+ AC_MSG_CHECKING([if we have an in-memory credentials cache])
411+ AC_TRY_COMPILE( 457+ AC_TRY_COMPILE(
412+ [#include <Kerberos/Kerberos.h>], 458+ [#include <Kerberos/Kerberos.h>],
413+ [cc_context_t c; 459+ [cc_context_t c;
414+ (void) cc_initialize (&c, 0, NULL, NULL);], 460+ (void) cc_initialize (&c, 0, NULL, NULL);],
415+ [AC_DEFINE(USE_CCAPI, 1, 461+ [AC_DEFINE([USE_CCAPI], [1],
416+ [platform uses an in-memory credentials cache]) 462+ [platform uses an in-memory credentials cache])
417+ LIBS="$LIBS -framework Security" 463+ LIBS="$LIBS -framework Security"
418+ AC_MSG_RESULT(yes) 464+ AC_MSG_RESULT([yes])
419+ if test "x$ac_cv_use_security_session_api" = "xno"; then 465+ if test "x$ac_cv_use_security_session_api" = "xno"; then
420+ AC_MSG_ERROR(*** Need a security framework to use the credentials cache API ***) 466+ AC_MSG_ERROR([*** Need a security framework to use the credentials cache API ***])
421+ fi], 467+ fi],
422+ [AC_MSG_RESULT(no)] 468+ [AC_MSG_RESULT([no])]
423+ ) 469+ )
424 m4_pattern_allow(AU_IPv) 470 m4_pattern_allow([AU_IPv])
425 AC_CHECK_DECL(AU_IPv4, [], 471 AC_CHECK_DECL([AU_IPv4], [],
426 AC_DEFINE(AU_IPv4, 0, [System only supports IPv4 audit records]) 472 AC_DEFINE([AU_IPv4], [0], [System only supports IPv4 audit records])
427Index: b/gss-genr.c 473Index: b/gss-genr.c
428=================================================================== 474===================================================================
429--- a/gss-genr.c 475--- a/gss-genr.c
@@ -904,7 +950,7 @@ Index: b/gss-serv.c
904--- a/gss-serv.c 950--- a/gss-serv.c
905+++ b/gss-serv.c 951+++ b/gss-serv.c
906@@ -1,7 +1,7 @@ 952@@ -1,7 +1,7 @@
907 /* $OpenBSD: gss-serv.c,v 1.22 2008/05/08 12:02:23 djm Exp $ */ 953 /* $OpenBSD: gss-serv.c,v 1.23 2011/08/01 19:18:15 markus Exp $ */
908 954
909 /* 955 /*
910- * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved. 956- * Copyright (c) 2001-2003 Simon Wilkinson. All rights reserved.
@@ -1023,7 +1069,7 @@ Index: b/gss-serv.c
1023 1069
1024 while (supported_mechs[i]->name != NULL) { 1070 while (supported_mechs[i]->name != NULL) {
1025 if (GSS_ERROR(gss_test_oid_set_member(&min_status, 1071 if (GSS_ERROR(gss_test_oid_set_member(&min_status,
1026@@ -247,8 +284,48 @@ 1072@@ -249,8 +286,48 @@
1027 ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client) 1073 ssh_gssapi_getclient(Gssctxt *ctx, ssh_gssapi_client *client)
1028 { 1074 {
1029 int i = 0; 1075 int i = 0;
@@ -1073,7 +1119,7 @@ Index: b/gss-serv.c
1073 1119
1074 client->mech = NULL; 1120 client->mech = NULL;
1075 1121
1076@@ -263,6 +340,13 @@ 1122@@ -265,6 +342,13 @@
1077 if (client->mech == NULL) 1123 if (client->mech == NULL)
1078 return GSS_S_FAILURE; 1124 return GSS_S_FAILURE;
1079 1125
@@ -1087,7 +1133,7 @@ Index: b/gss-serv.c
1087 if ((ctx->major = gss_display_name(&ctx->minor, ctx->client, 1133 if ((ctx->major = gss_display_name(&ctx->minor, ctx->client,
1088 &client->displayname, NULL))) { 1134 &client->displayname, NULL))) {
1089 ssh_gssapi_error(ctx); 1135 ssh_gssapi_error(ctx);
1090@@ -280,6 +364,8 @@ 1136@@ -282,6 +366,8 @@
1091 return (ctx->major); 1137 return (ctx->major);
1092 } 1138 }
1093 1139
@@ -1096,7 +1142,7 @@ Index: b/gss-serv.c
1096 /* We can't copy this structure, so we just move the pointer to it */ 1142 /* We can't copy this structure, so we just move the pointer to it */
1097 client->creds = ctx->client_creds; 1143 client->creds = ctx->client_creds;
1098 ctx->client_creds = GSS_C_NO_CREDENTIAL; 1144 ctx->client_creds = GSS_C_NO_CREDENTIAL;
1099@@ -327,7 +413,7 @@ 1145@@ -329,7 +415,7 @@
1100 1146
1101 /* Privileged */ 1147 /* Privileged */
1102 int 1148 int
@@ -1105,7 +1151,7 @@ Index: b/gss-serv.c
1105 { 1151 {
1106 OM_uint32 lmin; 1152 OM_uint32 lmin;
1107 1153
1108@@ -337,9 +423,11 @@ 1154@@ -339,9 +425,11 @@
1109 return 0; 1155 return 0;
1110 } 1156 }
1111 if (gssapi_client.mech && gssapi_client.mech->userok) 1157 if (gssapi_client.mech && gssapi_client.mech->userok)
@@ -1119,7 +1165,7 @@ Index: b/gss-serv.c
1119 /* Destroy delegated credentials if userok fails */ 1165 /* Destroy delegated credentials if userok fails */
1120 gss_release_buffer(&lmin, &gssapi_client.displayname); 1166 gss_release_buffer(&lmin, &gssapi_client.displayname);
1121 gss_release_buffer(&lmin, &gssapi_client.exportedname); 1167 gss_release_buffer(&lmin, &gssapi_client.exportedname);
1122@@ -352,14 +440,90 @@ 1168@@ -354,14 +442,90 @@
1123 return (0); 1169 return (0);
1124 } 1170 }
1125 1171
@@ -1961,7 +2007,7 @@ Index: b/monitor.c
1961=================================================================== 2007===================================================================
1962--- a/monitor.c 2008--- a/monitor.c
1963+++ b/monitor.c 2009+++ b/monitor.c
1964@@ -172,6 +172,8 @@ 2010@@ -180,6 +180,8 @@
1965 int mm_answer_gss_accept_ctx(int, Buffer *); 2011 int mm_answer_gss_accept_ctx(int, Buffer *);
1966 int mm_answer_gss_userok(int, Buffer *); 2012 int mm_answer_gss_userok(int, Buffer *);
1967 int mm_answer_gss_checkmic(int, Buffer *); 2013 int mm_answer_gss_checkmic(int, Buffer *);
@@ -1970,7 +2016,7 @@ Index: b/monitor.c
1970 #endif 2016 #endif
1971 2017
1972 #ifdef SSH_AUDIT_EVENTS 2018 #ifdef SSH_AUDIT_EVENTS
1973@@ -241,6 +243,7 @@ 2019@@ -251,6 +253,7 @@
1974 {MONITOR_REQ_GSSSTEP, MON_ISAUTH, mm_answer_gss_accept_ctx}, 2020 {MONITOR_REQ_GSSSTEP, MON_ISAUTH, mm_answer_gss_accept_ctx},
1975 {MONITOR_REQ_GSSUSEROK, MON_AUTH, mm_answer_gss_userok}, 2021 {MONITOR_REQ_GSSUSEROK, MON_AUTH, mm_answer_gss_userok},
1976 {MONITOR_REQ_GSSCHECKMIC, MON_ISAUTH, mm_answer_gss_checkmic}, 2022 {MONITOR_REQ_GSSCHECKMIC, MON_ISAUTH, mm_answer_gss_checkmic},
@@ -1978,7 +2024,7 @@ Index: b/monitor.c
1978 #endif 2024 #endif
1979 #ifdef JPAKE 2025 #ifdef JPAKE
1980 {MONITOR_REQ_JPAKE_GET_PWDATA, MON_ONCE, mm_answer_jpake_get_pwdata}, 2026 {MONITOR_REQ_JPAKE_GET_PWDATA, MON_ONCE, mm_answer_jpake_get_pwdata},
1981@@ -253,6 +256,12 @@ 2027@@ -263,6 +266,12 @@
1982 }; 2028 };
1983 2029
1984 struct mon_table mon_dispatch_postauth20[] = { 2030 struct mon_table mon_dispatch_postauth20[] = {
@@ -1991,7 +2037,7 @@ Index: b/monitor.c
1991 {MONITOR_REQ_MODULI, 0, mm_answer_moduli}, 2037 {MONITOR_REQ_MODULI, 0, mm_answer_moduli},
1992 {MONITOR_REQ_SIGN, 0, mm_answer_sign}, 2038 {MONITOR_REQ_SIGN, 0, mm_answer_sign},
1993 {MONITOR_REQ_PTY, 0, mm_answer_pty}, 2039 {MONITOR_REQ_PTY, 0, mm_answer_pty},
1994@@ -357,6 +366,10 @@ 2040@@ -371,6 +380,10 @@
1995 /* Permit requests for moduli and signatures */ 2041 /* Permit requests for moduli and signatures */
1996 monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1); 2042 monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1);
1997 monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1); 2043 monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1);
@@ -2002,7 +2048,7 @@ Index: b/monitor.c
2002 } else { 2048 } else {
2003 mon_dispatch = mon_dispatch_proto15; 2049 mon_dispatch = mon_dispatch_proto15;
2004 2050
2005@@ -443,6 +456,10 @@ 2051@@ -468,6 +481,10 @@
2006 monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1); 2052 monitor_permit(mon_dispatch, MONITOR_REQ_MODULI, 1);
2007 monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1); 2053 monitor_permit(mon_dispatch, MONITOR_REQ_SIGN, 1);
2008 monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1); 2054 monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1);
@@ -2013,7 +2059,7 @@ Index: b/monitor.c
2013 } else { 2059 } else {
2014 mon_dispatch = mon_dispatch_postauth15; 2060 mon_dispatch = mon_dispatch_postauth15;
2015 monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1); 2061 monitor_permit(mon_dispatch, MONITOR_REQ_TERM, 1);
2016@@ -1692,6 +1709,13 @@ 2062@@ -1802,6 +1819,13 @@
2017 kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; 2063 kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
2018 kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; 2064 kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
2019 kex->kex[KEX_ECDH_SHA2] = kexecdh_server; 2065 kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
@@ -2027,7 +2073,7 @@ Index: b/monitor.c
2027 kex->server = 1; 2073 kex->server = 1;
2028 kex->hostkey_type = buffer_get_int(m); 2074 kex->hostkey_type = buffer_get_int(m);
2029 kex->kex_type = buffer_get_int(m); 2075 kex->kex_type = buffer_get_int(m);
2030@@ -1898,6 +1922,9 @@ 2076@@ -2008,6 +2032,9 @@
2031 OM_uint32 major; 2077 OM_uint32 major;
2032 u_int len; 2078 u_int len;
2033 2079
@@ -2037,7 +2083,7 @@ Index: b/monitor.c
2037 goid.elements = buffer_get_string(m, &len); 2083 goid.elements = buffer_get_string(m, &len);
2038 goid.length = len; 2084 goid.length = len;
2039 2085
2040@@ -1925,6 +1952,9 @@ 2086@@ -2035,6 +2062,9 @@
2041 OM_uint32 flags = 0; /* GSI needs this */ 2087 OM_uint32 flags = 0; /* GSI needs this */
2042 u_int len; 2088 u_int len;
2043 2089
@@ -2047,7 +2093,7 @@ Index: b/monitor.c
2047 in.value = buffer_get_string(m, &len); 2093 in.value = buffer_get_string(m, &len);
2048 in.length = len; 2094 in.length = len;
2049 major = ssh_gssapi_accept_ctx(gsscontext, &in, &out, &flags); 2095 major = ssh_gssapi_accept_ctx(gsscontext, &in, &out, &flags);
2050@@ -1942,6 +1972,7 @@ 2096@@ -2052,6 +2082,7 @@
2051 monitor_permit(mon_dispatch, MONITOR_REQ_GSSSTEP, 0); 2097 monitor_permit(mon_dispatch, MONITOR_REQ_GSSSTEP, 0);
2052 monitor_permit(mon_dispatch, MONITOR_REQ_GSSUSEROK, 1); 2098 monitor_permit(mon_dispatch, MONITOR_REQ_GSSUSEROK, 1);
2053 monitor_permit(mon_dispatch, MONITOR_REQ_GSSCHECKMIC, 1); 2099 monitor_permit(mon_dispatch, MONITOR_REQ_GSSCHECKMIC, 1);
@@ -2055,7 +2101,7 @@ Index: b/monitor.c
2055 } 2101 }
2056 return (0); 2102 return (0);
2057 } 2103 }
2058@@ -1953,6 +1984,9 @@ 2104@@ -2063,6 +2094,9 @@
2059 OM_uint32 ret; 2105 OM_uint32 ret;
2060 u_int len; 2106 u_int len;
2061 2107
@@ -2065,7 +2111,7 @@ Index: b/monitor.c
2065 gssbuf.value = buffer_get_string(m, &len); 2111 gssbuf.value = buffer_get_string(m, &len);
2066 gssbuf.length = len; 2112 gssbuf.length = len;
2067 mic.value = buffer_get_string(m, &len); 2113 mic.value = buffer_get_string(m, &len);
2068@@ -1979,7 +2013,11 @@ 2114@@ -2089,7 +2123,11 @@
2069 { 2115 {
2070 int authenticated; 2116 int authenticated;
2071 2117
@@ -2078,7 +2124,7 @@ Index: b/monitor.c
2078 2124
2079 buffer_clear(m); 2125 buffer_clear(m);
2080 buffer_put_int(m, authenticated); 2126 buffer_put_int(m, authenticated);
2081@@ -1992,6 +2030,74 @@ 2127@@ -2102,6 +2140,74 @@
2082 /* Monitor loop will terminate if authenticated */ 2128 /* Monitor loop will terminate if authenticated */
2083 return (authenticated); 2129 return (authenticated);
2084 } 2130 }
@@ -2170,7 +2216,7 @@ Index: b/monitor_wrap.c
2170=================================================================== 2216===================================================================
2171--- a/monitor_wrap.c 2217--- a/monitor_wrap.c
2172+++ b/monitor_wrap.c 2218+++ b/monitor_wrap.c
2173@@ -1232,7 +1232,7 @@ 2219@@ -1270,7 +1270,7 @@
2174 } 2220 }
2175 2221
2176 int 2222 int
@@ -2179,7 +2225,7 @@ Index: b/monitor_wrap.c
2179 { 2225 {
2180 Buffer m; 2226 Buffer m;
2181 int authenticated = 0; 2227 int authenticated = 0;
2182@@ -1249,6 +1249,51 @@ 2228@@ -1287,6 +1287,51 @@
2183 debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not "); 2229 debug3("%s: user %sauthenticated",__func__, authenticated ? "" : "not ");
2184 return (authenticated); 2230 return (authenticated);
2185 } 2231 }
@@ -2235,7 +2281,7 @@ Index: b/monitor_wrap.h
2235=================================================================== 2281===================================================================
2236--- a/monitor_wrap.h 2282--- a/monitor_wrap.h
2237+++ b/monitor_wrap.h 2283+++ b/monitor_wrap.h
2238@@ -57,8 +57,10 @@ 2284@@ -58,8 +58,10 @@
2239 OM_uint32 mm_ssh_gssapi_server_ctx(Gssctxt **, gss_OID); 2285 OM_uint32 mm_ssh_gssapi_server_ctx(Gssctxt **, gss_OID);
2240 OM_uint32 mm_ssh_gssapi_accept_ctx(Gssctxt *, 2286 OM_uint32 mm_ssh_gssapi_accept_ctx(Gssctxt *,
2241 gss_buffer_desc *, gss_buffer_desc *, OM_uint32 *); 2287 gss_buffer_desc *, gss_buffer_desc *, OM_uint32 *);
@@ -2280,7 +2326,7 @@ Index: b/readconf.c
2280 #endif 2326 #endif
2281 { "fallbacktorsh", oDeprecated }, 2327 { "fallbacktorsh", oDeprecated },
2282 { "usersh", oDeprecated }, 2328 { "usersh", oDeprecated },
2283@@ -479,10 +490,30 @@ 2329@@ -482,10 +493,30 @@
2284 intptr = &options->gss_authentication; 2330 intptr = &options->gss_authentication;
2285 goto parse_flag; 2331 goto parse_flag;
2286 2332
@@ -2311,7 +2357,7 @@ Index: b/readconf.c
2311 case oBatchMode: 2357 case oBatchMode:
2312 intptr = &options->batch_mode; 2358 intptr = &options->batch_mode;
2313 goto parse_flag; 2359 goto parse_flag;
2314@@ -1092,7 +1123,12 @@ 2360@@ -1138,7 +1169,12 @@
2315 options->pubkey_authentication = -1; 2361 options->pubkey_authentication = -1;
2316 options->challenge_response_authentication = -1; 2362 options->challenge_response_authentication = -1;
2317 options->gss_authentication = -1; 2363 options->gss_authentication = -1;
@@ -2324,7 +2370,7 @@ Index: b/readconf.c
2324 options->password_authentication = -1; 2370 options->password_authentication = -1;
2325 options->kbd_interactive_authentication = -1; 2371 options->kbd_interactive_authentication = -1;
2326 options->kbd_interactive_devices = NULL; 2372 options->kbd_interactive_devices = NULL;
2327@@ -1193,8 +1229,14 @@ 2373@@ -1238,8 +1274,14 @@
2328 options->challenge_response_authentication = 1; 2374 options->challenge_response_authentication = 1;
2329 if (options->gss_authentication == -1) 2375 if (options->gss_authentication == -1)
2330 options->gss_authentication = 0; 2376 options->gss_authentication = 0;
@@ -2343,7 +2389,7 @@ Index: b/readconf.h
2343=================================================================== 2389===================================================================
2344--- a/readconf.h 2390--- a/readconf.h
2345+++ b/readconf.h 2391+++ b/readconf.h
2346@@ -46,7 +46,12 @@ 2392@@ -47,7 +47,12 @@
2347 int challenge_response_authentication; 2393 int challenge_response_authentication;
2348 /* Try S/Key or TIS, authentication. */ 2394 /* Try S/Key or TIS, authentication. */
2349 int gss_authentication; /* Try GSS authentication */ 2395 int gss_authentication; /* Try GSS authentication */
@@ -2371,7 +2417,7 @@ Index: b/servconf.c
2371 options->password_authentication = -1; 2417 options->password_authentication = -1;
2372 options->kbd_interactive_authentication = -1; 2418 options->kbd_interactive_authentication = -1;
2373 options->challenge_response_authentication = -1; 2419 options->challenge_response_authentication = -1;
2374@@ -226,8 +229,14 @@ 2420@@ -225,8 +228,14 @@
2375 options->kerberos_get_afs_token = 0; 2421 options->kerberos_get_afs_token = 0;
2376 if (options->gss_authentication == -1) 2422 if (options->gss_authentication == -1)
2377 options->gss_authentication = 0; 2423 options->gss_authentication = 0;
@@ -2386,10 +2432,10 @@ Index: b/servconf.c
2386 if (options->password_authentication == -1) 2432 if (options->password_authentication == -1)
2387 options->password_authentication = 1; 2433 options->password_authentication = 1;
2388 if (options->kbd_interactive_authentication == -1) 2434 if (options->kbd_interactive_authentication == -1)
2389@@ -322,7 +331,9 @@ 2435@@ -318,7 +327,9 @@
2390 sBanner, sUseDNS, sHostbasedAuthentication, 2436 sBanner, sUseDNS, sHostbasedAuthentication,
2391 sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, 2437 sHostbasedUsesNameFromPacketOnly, sClientAliveInterval,
2392 sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, 2438 sClientAliveCountMax, sAuthorizedKeysFile,
2393- sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel, 2439- sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel,
2394+ sGssAuthentication, sGssCleanupCreds, sGssStrictAcceptor, 2440+ sGssAuthentication, sGssCleanupCreds, sGssStrictAcceptor,
2395+ sGssKeyEx, sGssStoreRekey, 2441+ sGssKeyEx, sGssStoreRekey,
@@ -2397,7 +2443,7 @@ Index: b/servconf.c
2397 sMatch, sPermitOpen, sForceCommand, sChrootDirectory, 2443 sMatch, sPermitOpen, sForceCommand, sChrootDirectory,
2398 sUsePrivilegeSeparation, sAllowAgentForwarding, 2444 sUsePrivilegeSeparation, sAllowAgentForwarding,
2399 sZeroKnowledgePasswordAuthentication, sHostCertificate, 2445 sZeroKnowledgePasswordAuthentication, sHostCertificate,
2400@@ -386,10 +397,20 @@ 2446@@ -382,10 +393,20 @@
2401 #ifdef GSSAPI 2447 #ifdef GSSAPI
2402 { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL }, 2448 { "gssapiauthentication", sGssAuthentication, SSHCFG_ALL },
2403 { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL }, 2449 { "gssapicleanupcredentials", sGssCleanupCreds, SSHCFG_GLOBAL },
@@ -2418,7 +2464,7 @@ Index: b/servconf.c
2418 { "passwordauthentication", sPasswordAuthentication, SSHCFG_ALL }, 2464 { "passwordauthentication", sPasswordAuthentication, SSHCFG_ALL },
2419 { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_ALL }, 2465 { "kbdinteractiveauthentication", sKbdInteractiveAuthentication, SSHCFG_ALL },
2420 { "challengeresponseauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL }, 2466 { "challengeresponseauthentication", sChallengeResponseAuthentication, SSHCFG_GLOBAL },
2421@@ -944,10 +965,22 @@ 2467@@ -962,10 +983,22 @@
2422 intptr = &options->gss_authentication; 2468 intptr = &options->gss_authentication;
2423 goto parse_flag; 2469 goto parse_flag;
2424 2470
@@ -2441,7 +2487,7 @@ Index: b/servconf.c
2441 case sPasswordAuthentication: 2487 case sPasswordAuthentication:
2442 intptr = &options->password_authentication; 2488 intptr = &options->password_authentication;
2443 goto parse_flag; 2489 goto parse_flag;
2444@@ -1704,7 +1737,10 @@ 2490@@ -1720,7 +1753,10 @@
2445 #endif 2491 #endif
2446 #ifdef GSSAPI 2492 #ifdef GSSAPI
2447 dump_cfg_fmtint(sGssAuthentication, o->gss_authentication); 2493 dump_cfg_fmtint(sGssAuthentication, o->gss_authentication);
@@ -2456,7 +2502,7 @@ Index: b/servconf.h
2456=================================================================== 2502===================================================================
2457--- a/servconf.h 2503--- a/servconf.h
2458+++ b/servconf.h 2504+++ b/servconf.h
2459@@ -97,7 +97,10 @@ 2505@@ -103,7 +103,10 @@
2460 int kerberos_get_afs_token; /* If true, try to get AFS token if 2506 int kerberos_get_afs_token; /* If true, try to get AFS token if
2461 * authenticated with Kerberos. */ 2507 * authenticated with Kerberos. */
2462 int gss_authentication; /* If true, permit GSSAPI authentication */ 2508 int gss_authentication; /* If true, permit GSSAPI authentication */
@@ -2585,7 +2631,7 @@ Index: b/ssh_config.5
2585=================================================================== 2631===================================================================
2586--- a/ssh_config.5 2632--- a/ssh_config.5
2587+++ b/ssh_config.5 2633+++ b/ssh_config.5
2588@@ -508,11 +508,43 @@ 2634@@ -527,11 +527,43 @@
2589 The default is 2635 The default is
2590 .Dq no . 2636 .Dq no .
2591 Note that this option applies to protocol version 2 only. 2637 Note that this option applies to protocol version 2 only.
@@ -2634,7 +2680,7 @@ Index: b/sshconnect2.c
2634=================================================================== 2680===================================================================
2635--- a/sshconnect2.c 2681--- a/sshconnect2.c
2636+++ b/sshconnect2.c 2682+++ b/sshconnect2.c
2637@@ -159,9 +159,34 @@ 2683@@ -160,9 +160,34 @@
2638 { 2684 {
2639 Kex *kex; 2685 Kex *kex;
2640 2686
@@ -2669,7 +2715,7 @@ Index: b/sshconnect2.c
2669 if (options.ciphers == (char *)-1) { 2715 if (options.ciphers == (char *)-1) {
2670 logit("No valid ciphers for protocol version 2 given, using defaults."); 2716 logit("No valid ciphers for protocol version 2 given, using defaults.");
2671 options.ciphers = NULL; 2717 options.ciphers = NULL;
2672@@ -196,6 +221,17 @@ 2718@@ -197,6 +222,17 @@
2673 if (options.kex_algorithms != NULL) 2719 if (options.kex_algorithms != NULL)
2674 myproposal[PROPOSAL_KEX_ALGS] = options.kex_algorithms; 2720 myproposal[PROPOSAL_KEX_ALGS] = options.kex_algorithms;
2675 2721
@@ -2687,7 +2733,7 @@ Index: b/sshconnect2.c
2687 if (options.rekey_limit) 2733 if (options.rekey_limit)
2688 packet_set_rekey_limit((u_int32_t)options.rekey_limit); 2734 packet_set_rekey_limit((u_int32_t)options.rekey_limit);
2689 2735
2690@@ -206,10 +242,30 @@ 2736@@ -207,10 +243,30 @@
2691 kex->kex[KEX_DH_GEX_SHA1] = kexgex_client; 2737 kex->kex[KEX_DH_GEX_SHA1] = kexgex_client;
2692 kex->kex[KEX_DH_GEX_SHA256] = kexgex_client; 2738 kex->kex[KEX_DH_GEX_SHA256] = kexgex_client;
2693 kex->kex[KEX_ECDH_SHA2] = kexecdh_client; 2739 kex->kex[KEX_ECDH_SHA2] = kexecdh_client;
@@ -2718,7 +2764,7 @@ Index: b/sshconnect2.c
2718 xxx_kex = kex; 2764 xxx_kex = kex;
2719 2765
2720 dispatch_run(DISPATCH_BLOCK, &kex->done, kex); 2766 dispatch_run(DISPATCH_BLOCK, &kex->done, kex);
2721@@ -304,6 +360,7 @@ 2767@@ -305,6 +361,7 @@
2722 void input_gssapi_hash(int type, u_int32_t, void *); 2768 void input_gssapi_hash(int type, u_int32_t, void *);
2723 void input_gssapi_error(int, u_int32_t, void *); 2769 void input_gssapi_error(int, u_int32_t, void *);
2724 void input_gssapi_errtok(int, u_int32_t, void *); 2770 void input_gssapi_errtok(int, u_int32_t, void *);
@@ -2726,7 +2772,7 @@ Index: b/sshconnect2.c
2726 #endif 2772 #endif
2727 2773
2728 void userauth(Authctxt *, char *); 2774 void userauth(Authctxt *, char *);
2729@@ -319,6 +376,11 @@ 2775@@ -320,6 +377,11 @@
2730 2776
2731 Authmethod authmethods[] = { 2777 Authmethod authmethods[] = {
2732 #ifdef GSSAPI 2778 #ifdef GSSAPI
@@ -2738,7 +2784,7 @@ Index: b/sshconnect2.c
2738 {"gssapi-with-mic", 2784 {"gssapi-with-mic",
2739 userauth_gssapi, 2785 userauth_gssapi,
2740 NULL, 2786 NULL,
2741@@ -625,19 +687,31 @@ 2787@@ -626,19 +688,31 @@
2742 static u_int mech = 0; 2788 static u_int mech = 0;
2743 OM_uint32 min; 2789 OM_uint32 min;
2744 int ok = 0; 2790 int ok = 0;
@@ -2772,7 +2818,7 @@ Index: b/sshconnect2.c
2772 ok = 1; /* Mechanism works */ 2818 ok = 1; /* Mechanism works */
2773 } else { 2819 } else {
2774 mech++; 2820 mech++;
2775@@ -734,8 +808,8 @@ 2821@@ -735,8 +809,8 @@
2776 { 2822 {
2777 Authctxt *authctxt = ctxt; 2823 Authctxt *authctxt = ctxt;
2778 Gssctxt *gssctxt; 2824 Gssctxt *gssctxt;
@@ -2783,7 +2829,7 @@ Index: b/sshconnect2.c
2783 2829
2784 if (authctxt == NULL) 2830 if (authctxt == NULL)
2785 fatal("input_gssapi_response: no authentication context"); 2831 fatal("input_gssapi_response: no authentication context");
2786@@ -845,6 +919,48 @@ 2832@@ -846,6 +920,48 @@
2787 xfree(msg); 2833 xfree(msg);
2788 xfree(lang); 2834 xfree(lang);
2789 } 2835 }
@@ -2836,8 +2882,8 @@ Index: b/sshd.c
2836=================================================================== 2882===================================================================
2837--- a/sshd.c 2883--- a/sshd.c
2838+++ b/sshd.c 2884+++ b/sshd.c
2839@@ -120,6 +120,10 @@ 2885@@ -121,6 +121,10 @@
2840 #include "roaming.h" 2886 #include "ssh-sandbox.h"
2841 #include "version.h" 2887 #include "version.h"
2842 2888
2843+#ifdef USE_SECURITY_SESSION_API 2889+#ifdef USE_SECURITY_SESSION_API
@@ -2847,7 +2893,7 @@ Index: b/sshd.c
2847 #ifdef LIBWRAP 2893 #ifdef LIBWRAP
2848 #include <tcpd.h> 2894 #include <tcpd.h>
2849 #include <syslog.h> 2895 #include <syslog.h>
2850@@ -1590,10 +1594,13 @@ 2896@@ -1612,10 +1616,13 @@
2851 logit("Disabling protocol version 1. Could not load host key"); 2897 logit("Disabling protocol version 1. Could not load host key");
2852 options.protocol &= ~SSH_PROTO_1; 2898 options.protocol &= ~SSH_PROTO_1;
2853 } 2899 }
@@ -2861,7 +2907,7 @@ Index: b/sshd.c
2861 if (!(options.protocol & (SSH_PROTO_1|SSH_PROTO_2))) { 2907 if (!(options.protocol & (SSH_PROTO_1|SSH_PROTO_2))) {
2862 logit("sshd: no hostkeys available -- exiting."); 2908 logit("sshd: no hostkeys available -- exiting.");
2863 exit(1); 2909 exit(1);
2864@@ -1922,6 +1929,60 @@ 2910@@ -1944,6 +1951,60 @@
2865 /* Log the connection. */ 2911 /* Log the connection. */
2866 verbose("Connection from %.500s port %d", remote_ip, remote_port); 2912 verbose("Connection from %.500s port %d", remote_ip, remote_port);
2867 2913
@@ -2922,7 +2968,7 @@ Index: b/sshd.c
2922 /* 2968 /*
2923 * We don't want to listen forever unless the other side 2969 * We don't want to listen forever unless the other side
2924 * successfully authenticates itself. So we set up an alarm which is 2970 * successfully authenticates itself. So we set up an alarm which is
2925@@ -2303,6 +2364,48 @@ 2971@@ -2325,6 +2386,48 @@
2926 2972
2927 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types(); 2973 myproposal[PROPOSAL_SERVER_HOST_KEY_ALGS] = list_hostkey_types();
2928 2974
@@ -2971,7 +3017,7 @@ Index: b/sshd.c
2971 /* start key exchange */ 3017 /* start key exchange */
2972 kex = kex_setup(myproposal); 3018 kex = kex_setup(myproposal);
2973 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server; 3019 kex->kex[KEX_DH_GRP1_SHA1] = kexdh_server;
2974@@ -2310,6 +2413,13 @@ 3020@@ -2332,6 +2435,13 @@
2975 kex->kex[KEX_DH_GEX_SHA1] = kexgex_server; 3021 kex->kex[KEX_DH_GEX_SHA1] = kexgex_server;
2976 kex->kex[KEX_DH_GEX_SHA256] = kexgex_server; 3022 kex->kex[KEX_DH_GEX_SHA256] = kexgex_server;
2977 kex->kex[KEX_ECDH_SHA2] = kexecdh_server; 3023 kex->kex[KEX_ECDH_SHA2] = kexecdh_server;
@@ -2989,7 +3035,7 @@ Index: b/sshd_config
2989=================================================================== 3035===================================================================
2990--- a/sshd_config 3036--- a/sshd_config
2991+++ b/sshd_config 3037+++ b/sshd_config
2992@@ -72,6 +72,8 @@ 3038@@ -75,6 +75,8 @@
2993 # GSSAPI options 3039 # GSSAPI options
2994 #GSSAPIAuthentication no 3040 #GSSAPIAuthentication no
2995 #GSSAPICleanupCredentials yes 3041 #GSSAPICleanupCredentials yes
@@ -3002,7 +3048,7 @@ Index: b/sshd_config.5
3002=================================================================== 3048===================================================================
3003--- a/sshd_config.5 3049--- a/sshd_config.5
3004+++ b/sshd_config.5 3050+++ b/sshd_config.5
3005@@ -423,12 +423,40 @@ 3051@@ -424,12 +424,40 @@
3006 The default is 3052 The default is
3007 .Dq no . 3053 .Dq no .
3008 Note that this option applies to protocol version 2 only. 3054 Note that this option applies to protocol version 2 only.
diff --git a/debian/patches/hostbased-ecdsa.patch b/debian/patches/hostbased-ecdsa.patch
deleted file mode 100644
index fb618940a..000000000
--- a/debian/patches/hostbased-ecdsa.patch
+++ /dev/null
@@ -1,71 +0,0 @@
1Description: Make hostbased auth with ECDSA keys work correctly
2Author: Harv <harvey.eneman@oracle.com>
3Author: Damien Miller <djm@mindrot.org>
4Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1858
5Bug-Debian: http://bugs.debian.org/633368
6Origin: upstream, http://bazaar.launchpad.net/~vcs-imports/openssh/main/revision/6327
7Applied-Upstream: yes
8Forwarded: not-needed
9Last-Update: 2011-07-17
10
11Index: b/ssh-keysign.c
12===================================================================
13--- a/ssh-keysign.c
14+++ b/ssh-keysign.c
15@@ -150,9 +150,10 @@
16 {
17 Buffer b;
18 Options options;
19- Key *keys[2], *key = NULL;
20+#define NUM_KEYTYPES 3
21+ Key *keys[NUM_KEYTYPES], *key = NULL;
22 struct passwd *pw;
23- int key_fd[2], i, found, version = 2, fd;
24+ int key_fd[NUM_KEYTYPES], i, found, version = 2, fd;
25 u_char *signature, *data;
26 char *host;
27 u_int slen, dlen;
28@@ -165,8 +166,10 @@
29 if (fd > 2)
30 close(fd);
31
32- key_fd[0] = open(_PATH_HOST_RSA_KEY_FILE, O_RDONLY);
33- key_fd[1] = open(_PATH_HOST_DSA_KEY_FILE, O_RDONLY);
34+ i = 0;
35+ key_fd[i++] = open(_PATH_HOST_DSA_KEY_FILE, O_RDONLY);
36+ key_fd[i++] = open(_PATH_HOST_ECDSA_KEY_FILE, O_RDONLY);
37+ key_fd[i++] = open(_PATH_HOST_RSA_KEY_FILE, O_RDONLY);
38
39 original_real_uid = getuid(); /* XXX readconf.c needs this */
40 if ((pw = getpwuid(original_real_uid)) == NULL)
41@@ -191,7 +194,11 @@
42 fatal("ssh-keysign not enabled in %s",
43 _PATH_HOST_CONFIG_FILE);
44
45- if (key_fd[0] == -1 && key_fd[1] == -1)
46+ for (i = found = 0; i < NUM_KEYTYPES; i++) {
47+ if (key_fd[i] != -1)
48+ found = 1;
49+ }
50+ if (found == 0)
51 fatal("could not open any host key");
52
53 OpenSSL_add_all_algorithms();
54@@ -200,7 +207,7 @@
55 RAND_seed(rnd, sizeof(rnd));
56
57 found = 0;
58- for (i = 0; i < 2; i++) {
59+ for (i = 0; i < NUM_KEYTYPES; i++) {
60 keys[i] = NULL;
61 if (key_fd[i] == -1)
62 continue;
63@@ -230,7 +237,7 @@
64 xfree(host);
65
66 found = 0;
67- for (i = 0; i < 2; i++) {
68+ for (i = 0; i < NUM_KEYTYPES; i++) {
69 if (keys[i] != NULL &&
70 key_equal_public(key, keys[i])) {
71 found = 1;
diff --git a/debian/patches/keepalive-extensions.patch b/debian/patches/keepalive-extensions.patch
index 89011cfb7..d8362de70 100644
--- a/debian/patches/keepalive-extensions.patch
+++ b/debian/patches/keepalive-extensions.patch
@@ -21,21 +21,21 @@ Index: b/readconf.c
21@@ -138,6 +138,7 @@ 21@@ -138,6 +138,7 @@
22 oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand, 22 oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand,
23 oVisualHostKey, oUseRoaming, oZeroKnowledgePasswordAuthentication, 23 oVisualHostKey, oUseRoaming, oZeroKnowledgePasswordAuthentication,
24 oKexAlgorithms, oIPQoS, 24 oKexAlgorithms, oIPQoS, oRequestTTY,
25+ oProtocolKeepAlives, oSetupTimeOut, 25+ oProtocolKeepAlives, oSetupTimeOut,
26 oDeprecated, oUnsupported 26 oDeprecated, oUnsupported
27 } OpCodes; 27 } OpCodes;
28 28
29@@ -258,6 +259,8 @@ 29@@ -259,6 +260,8 @@
30 #endif
31 { "kexalgorithms", oKexAlgorithms }, 30 { "kexalgorithms", oKexAlgorithms },
32 { "ipqos", oIPQoS }, 31 { "ipqos", oIPQoS },
32 { "requesttty", oRequestTTY },
33+ { "protocolkeepalives", oProtocolKeepAlives }, 33+ { "protocolkeepalives", oProtocolKeepAlives },
34+ { "setuptimeout", oSetupTimeOut }, 34+ { "setuptimeout", oSetupTimeOut },
35 35
36 { NULL, oBadOption } 36 { NULL, oBadOption }
37 }; 37 };
38@@ -888,6 +891,8 @@ 38@@ -914,6 +917,8 @@
39 goto parse_flag; 39 goto parse_flag;
40 40
41 case oServerAliveInterval: 41 case oServerAliveInterval:
@@ -44,7 +44,7 @@ Index: b/readconf.c
44 intptr = &options->server_alive_interval; 44 intptr = &options->server_alive_interval;
45 goto parse_time; 45 goto parse_time;
46 46
47@@ -1336,8 +1341,13 @@ 47@@ -1385,8 +1390,13 @@
48 options->rekey_limit = 0; 48 options->rekey_limit = 0;
49 if (options->verify_host_key_dns == -1) 49 if (options->verify_host_key_dns == -1)
50 options->verify_host_key_dns = 0; 50 options->verify_host_key_dns = 0;
@@ -64,7 +64,7 @@ Index: b/ssh_config.5
64=================================================================== 64===================================================================
65--- a/ssh_config.5 65--- a/ssh_config.5
66+++ b/ssh_config.5 66+++ b/ssh_config.5
67@@ -127,8 +127,12 @@ 67@@ -136,8 +136,12 @@
68 If set to 68 If set to
69 .Dq yes , 69 .Dq yes ,
70 passphrase/password querying will be disabled. 70 passphrase/password querying will be disabled.
@@ -78,7 +78,7 @@ Index: b/ssh_config.5
78 The argument must be 78 The argument must be
79 .Dq yes 79 .Dq yes
80 or 80 or
81@@ -1058,8 +1062,15 @@ 81@@ -1100,8 +1104,15 @@
82 will send a message through the encrypted 82 will send a message through the encrypted
83 channel to request a response from the server. 83 channel to request a response from the server.
84 The default 84 The default
@@ -95,7 +95,7 @@ Index: b/ssh_config.5
95 .It Cm StrictHostKeyChecking 95 .It Cm StrictHostKeyChecking
96 If this flag is set to 96 If this flag is set to
97 .Dq yes , 97 .Dq yes ,
98@@ -1098,6 +1109,12 @@ 98@@ -1140,6 +1151,12 @@
99 other side. 99 other side.
100 If they are sent, death of the connection or crash of one 100 If they are sent, death of the connection or crash of one
101 of the machines will be properly noticed. 101 of the machines will be properly noticed.
@@ -112,7 +112,7 @@ Index: b/sshd_config.5
112=================================================================== 112===================================================================
113--- a/sshd_config.5 113--- a/sshd_config.5
114+++ b/sshd_config.5 114+++ b/sshd_config.5
115@@ -1034,6 +1034,9 @@ 115@@ -1037,6 +1037,9 @@
116 .Pp 116 .Pp
117 To disable TCP keepalive messages, the value should be set to 117 To disable TCP keepalive messages, the value should be set to
118 .Dq no . 118 .Dq no .
diff --git a/debian/patches/lintian-symlink-pickiness.patch b/debian/patches/lintian-symlink-pickiness.patch
index 6e161f451..7ee91cce8 100644
--- a/debian/patches/lintian-symlink-pickiness.patch
+++ b/debian/patches/lintian-symlink-pickiness.patch
@@ -9,7 +9,7 @@ Index: b/Makefile.in
9=================================================================== 9===================================================================
10--- a/Makefile.in 10--- a/Makefile.in
11+++ b/Makefile.in 11+++ b/Makefile.in
12@@ -299,9 +299,9 @@ 12@@ -282,9 +282,9 @@
13 $(INSTALL) -m 644 ssh-pkcs11-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8 13 $(INSTALL) -m 644 ssh-pkcs11-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
14 $(INSTALL) -m 644 ssh-vulnkey.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-vulnkey.1 14 $(INSTALL) -m 644 ssh-vulnkey.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-vulnkey.1
15 -rm -f $(DESTDIR)$(bindir)/slogin 15 -rm -f $(DESTDIR)$(bindir)/slogin
diff --git a/debian/patches/openbsd-docs.patch b/debian/patches/openbsd-docs.patch
index fc07e8861..bda5f0c24 100644
--- a/debian/patches/openbsd-docs.patch
+++ b/debian/patches/openbsd-docs.patch
@@ -13,28 +13,28 @@ Index: b/moduli.5
13--- a/moduli.5 13--- a/moduli.5
14+++ b/moduli.5 14+++ b/moduli.5
15@@ -21,7 +21,7 @@ 15@@ -21,7 +21,7 @@
16 .Nd Diffie Hellman moduli 16 .Nd Diffie-Hellman moduli
17 .Sh DESCRIPTION 17 .Sh DESCRIPTION
18 The 18 The
19-.Pa /etc/moduli 19-.Pa /etc/moduli
20+.Pa /etc/ssh/moduli 20+.Pa /etc/ssh/moduli
21 file contains prime numbers and generators for use by 21 file contains prime numbers and generators for use by
22 .Xr sshd 8 22 .Xr sshd 8
23 in the Diffie-Hellman Group Exchange key exchange method. 23 in the Diffie-Hellman Group Exchange key exchange method.
24@@ -111,7 +111,7 @@ 24@@ -110,7 +110,7 @@
25 Diffie Hellman output to sufficiently key the selected symmetric cipher. 25 Diffie-Hellman output to sufficiently key the selected symmetric cipher.
26 .Xr sshd 8 26 .Xr sshd 8
27 then randomly selects a modulus from 27 then randomly selects a modulus from
28-.Fa /etc/moduli 28-.Fa /etc/moduli
29+.Fa /etc/ssh/moduli 29+.Fa /etc/ssh/moduli
30 that best meets the size requirement. 30 that best meets the size requirement.
31 .Pp
32 .Sh SEE ALSO 31 .Sh SEE ALSO
32 .Xr ssh-keygen 1 ,
33Index: b/ssh-keygen.1 33Index: b/ssh-keygen.1
34=================================================================== 34===================================================================
35--- a/ssh-keygen.1 35--- a/ssh-keygen.1
36+++ b/ssh-keygen.1 36+++ b/ssh-keygen.1
37@@ -147,9 +147,7 @@ 37@@ -149,9 +149,7 @@
38 .Pa ~/.ssh/id_dsa 38 .Pa ~/.ssh/id_dsa
39 or 39 or
40 .Pa ~/.ssh/id_rsa . 40 .Pa ~/.ssh/id_rsa .
@@ -45,22 +45,40 @@ Index: b/ssh-keygen.1
45 .Pp 45 .Pp
46 Normally this program generates the key and asks for a file in which 46 Normally this program generates the key and asks for a file in which
47 to store the private key. 47 to store the private key.
48@@ -393,9 +391,7 @@ 48@@ -197,9 +195,7 @@
49 .It Fl q 49 For each of the key types (rsa1, rsa, dsa and ecdsa) for which host keys
50 Silence 50 do not exist, generate the host keys with the default key file path,
51 .Nm ssh-keygen . 51 an empty passphrase, default bits for the key type, and default comment.
52-Used by 52-This is used by
53-.Pa /etc/rc 53-.Pa /etc/rc
54-when creating a new key. 54-to generate new host keys.
55+Used by system administration scripts when creating a new key. 55+This is used by system administration scripts to generate new host keys.
56 .It Fl R Ar hostname 56 .It Fl a Ar trials
57 Removes all keys belonging to 57 Specifies the number of primality tests to perform when screening DH-GEX
58 .Ar hostname 58 candidates using the
59@@ -535,7 +531,7 @@
60 Valid generator values are 2, 3, and 5.
61 .Pp
62 Screened DH groups may be installed in
63-.Pa /etc/moduli .
64+.Pa /etc/ssh/moduli .
65 It is important that this file contains moduli of a range of bit lengths and
66 that both ends of a connection share common moduli.
67 .Sh CERTIFICATES
68@@ -661,7 +657,7 @@
69 where the user wishes to log in using public key authentication.
70 There is no need to keep the contents of this file secret.
71 .Pp
72-.It Pa /etc/moduli
73+.It Pa /etc/ssh/moduli
74 Contains Diffie-Hellman groups used for DH-GEX.
75 The file format is described in
76 .Xr moduli 5 .
59Index: b/ssh.1 77Index: b/ssh.1
60=================================================================== 78===================================================================
61--- a/ssh.1 79--- a/ssh.1
62+++ b/ssh.1 80+++ b/ssh.1
63@@ -726,6 +726,10 @@ 81@@ -731,6 +731,10 @@
64 .Sx HISTORY 82 .Sx HISTORY
65 section of 83 section of
66 .Xr ssl 8 84 .Xr ssl 8
@@ -84,7 +102,7 @@ Index: b/sshd.8
84 It forks a new 102 It forks a new
85 daemon for each incoming connection. 103 daemon for each incoming connection.
86 The forked daemons handle 104 The forked daemons handle
87@@ -850,7 +850,7 @@ 105@@ -853,7 +853,7 @@
88 .Xr ssh 1 ) . 106 .Xr ssh 1 ) .
89 It should only be writable by root. 107 It should only be writable by root.
90 .Pp 108 .Pp
@@ -93,7 +111,7 @@ Index: b/sshd.8
93 Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange". 111 Contains Diffie-Hellman groups used for the "Diffie-Hellman Group Exchange".
94 The file format is described in 112 The file format is described in
95 .Xr moduli 5 . 113 .Xr moduli 5 .
96@@ -948,7 +948,6 @@ 114@@ -951,7 +951,6 @@
97 .Xr ssh-vulnkey 1 , 115 .Xr ssh-vulnkey 1 ,
98 .Xr chroot 2 , 116 .Xr chroot 2 ,
99 .Xr hosts_access 5 , 117 .Xr hosts_access 5 ,
@@ -105,7 +123,7 @@ Index: b/sshd_config.5
105=================================================================== 123===================================================================
106--- a/sshd_config.5 124--- a/sshd_config.5
107+++ b/sshd_config.5 125+++ b/sshd_config.5
108@@ -221,8 +221,7 @@ 126@@ -222,8 +222,7 @@
109 By default, no banner is displayed. 127 By default, no banner is displayed.
110 .It Cm ChallengeResponseAuthentication 128 .It Cm ChallengeResponseAuthentication
111 Specifies whether challenge-response authentication is allowed (e.g. via 129 Specifies whether challenge-response authentication is allowed (e.g. via
diff --git a/debian/patches/package-versioning.patch b/debian/patches/package-versioning.patch
index 0bcc7ed3b..6dd0cf78d 100644
--- a/debian/patches/package-versioning.patch
+++ b/debian/patches/package-versioning.patch
@@ -24,7 +24,7 @@ Index: b/sshd.c
24=================================================================== 24===================================================================
25--- a/sshd.c 25--- a/sshd.c
26+++ b/sshd.c 26+++ b/sshd.c
27@@ -422,7 +422,7 @@ 27@@ -423,7 +423,7 @@
28 minor = PROTOCOL_MINOR_1; 28 minor = PROTOCOL_MINOR_1;
29 } 29 }
30 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", major, minor, 30 snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s%s", major, minor,
@@ -38,9 +38,9 @@ Index: b/version.h
38--- a/version.h 38--- a/version.h
39+++ b/version.h 39+++ b/version.h
40@@ -3,4 +3,9 @@ 40@@ -3,4 +3,9 @@
41 #define SSH_VERSION "OpenSSH_5.8" 41 #define SSH_VERSION "OpenSSH_5.9"
42 42
43 #define SSH_PORTABLE "p1" 43 #define SSH_PORTABLE "p2"
44-#define SSH_RELEASE SSH_VERSION SSH_PORTABLE 44-#define SSH_RELEASE SSH_VERSION SSH_PORTABLE
45+#define SSH_RELEASE_MINIMUM SSH_VERSION SSH_PORTABLE 45+#define SSH_RELEASE_MINIMUM SSH_VERSION SSH_PORTABLE
46+#ifdef SSH_EXTRAVERSION 46+#ifdef SSH_EXTRAVERSION
diff --git a/debian/patches/quieter-signals.patch b/debian/patches/quieter-signals.patch
index f8bc5fd4e..ff41f094d 100644
--- a/debian/patches/quieter-signals.patch
+++ b/debian/patches/quieter-signals.patch
@@ -16,7 +16,7 @@ Index: b/clientloop.c
16=================================================================== 16===================================================================
17--- a/clientloop.c 17--- a/clientloop.c
18+++ b/clientloop.c 18+++ b/clientloop.c
19@@ -1594,8 +1594,10 @@ 19@@ -1619,8 +1619,10 @@
20 exit_status = 0; 20 exit_status = 0;
21 } 21 }
22 22
diff --git a/debian/patches/selinux-build-failure.patch b/debian/patches/selinux-build-failure.patch
deleted file mode 100644
index 6c99e3f38..000000000
--- a/debian/patches/selinux-build-failure.patch
+++ /dev/null
@@ -1,19 +0,0 @@
1Description: Fix SELinux build failure
2Origin: other, https://bugzilla.mindrot.org/attachment.cgi?id=1991&action=diff
3Author: Leonardo Chiqitto <leonardo@ngdn.org>
4Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1851
5Last-Update: 2011-02-05
6
7Index: b/openbsd-compat/port-linux.c
8===================================================================
9--- a/openbsd-compat/port-linux.c
10+++ b/openbsd-compat/port-linux.c
11@@ -226,7 +226,7 @@
12
13 if (!ssh_selinux_enabled())
14 return;
15- if (path == NULL)
16+ if (path == NULL) {
17 setfscreatecon(NULL);
18 return;
19 }
diff --git a/debian/patches/selinux-role.patch b/debian/patches/selinux-role.patch
index 70364f9d5..b14402199 100644
--- a/debian/patches/selinux-role.patch
+++ b/debian/patches/selinux-role.patch
@@ -92,7 +92,7 @@ Index: b/monitor.c
92=================================================================== 92===================================================================
93--- a/monitor.c 93--- a/monitor.c
94+++ b/monitor.c 94+++ b/monitor.c
95@@ -137,6 +137,7 @@ 95@@ -145,6 +145,7 @@
96 int mm_answer_pwnamallow(int, Buffer *); 96 int mm_answer_pwnamallow(int, Buffer *);
97 int mm_answer_auth2_read_banner(int, Buffer *); 97 int mm_answer_auth2_read_banner(int, Buffer *);
98 int mm_answer_authserv(int, Buffer *); 98 int mm_answer_authserv(int, Buffer *);
@@ -100,7 +100,7 @@ Index: b/monitor.c
100 int mm_answer_authpassword(int, Buffer *); 100 int mm_answer_authpassword(int, Buffer *);
101 int mm_answer_bsdauthquery(int, Buffer *); 101 int mm_answer_bsdauthquery(int, Buffer *);
102 int mm_answer_bsdauthrespond(int, Buffer *); 102 int mm_answer_bsdauthrespond(int, Buffer *);
103@@ -215,6 +216,7 @@ 103@@ -225,6 +226,7 @@
104 {MONITOR_REQ_SIGN, MON_ONCE, mm_answer_sign}, 104 {MONITOR_REQ_SIGN, MON_ONCE, mm_answer_sign},
105 {MONITOR_REQ_PWNAM, MON_ONCE, mm_answer_pwnamallow}, 105 {MONITOR_REQ_PWNAM, MON_ONCE, mm_answer_pwnamallow},
106 {MONITOR_REQ_AUTHSERV, MON_ONCE, mm_answer_authserv}, 106 {MONITOR_REQ_AUTHSERV, MON_ONCE, mm_answer_authserv},
@@ -108,15 +108,15 @@ Index: b/monitor.c
108 {MONITOR_REQ_AUTH2_READ_BANNER, MON_ONCE, mm_answer_auth2_read_banner}, 108 {MONITOR_REQ_AUTH2_READ_BANNER, MON_ONCE, mm_answer_auth2_read_banner},
109 {MONITOR_REQ_AUTHPASSWORD, MON_AUTH, mm_answer_authpassword}, 109 {MONITOR_REQ_AUTHPASSWORD, MON_AUTH, mm_answer_authpassword},
110 #ifdef USE_PAM 110 #ifdef USE_PAM
111@@ -699,6 +701,7 @@ 111@@ -810,6 +812,7 @@
112 else { 112 else {
113 /* Allow service/style information on the auth context */ 113 /* Allow service/style information on the auth context */
114 monitor_permit(mon_dispatch, MONITOR_REQ_AUTHSERV, 1); 114 monitor_permit(mon_dispatch, MONITOR_REQ_AUTHSERV, 1);
115+ monitor_permit(mon_dispatch, MONITOR_REQ_AUTHROLE, 1); 115+ monitor_permit(mon_dispatch, MONITOR_REQ_AUTHROLE, 1);
116 monitor_permit(mon_dispatch, MONITOR_REQ_AUTH2_READ_BANNER, 1); 116 monitor_permit(mon_dispatch, MONITOR_REQ_AUTH2_READ_BANNER, 1);
117 } 117 }
118 118 #ifdef USE_PAM
119@@ -732,14 +735,37 @@ 119@@ -842,14 +845,37 @@
120 120
121 authctxt->service = buffer_get_string(m, NULL); 121 authctxt->service = buffer_get_string(m, NULL);
122 authctxt->style = buffer_get_string(m, NULL); 122 authctxt->style = buffer_get_string(m, NULL);
@@ -156,7 +156,7 @@ Index: b/monitor.c
156 return (0); 156 return (0);
157 } 157 }
158 158
159@@ -1327,7 +1353,7 @@ 159@@ -1437,7 +1463,7 @@
160 res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty)); 160 res = pty_allocate(&s->ptyfd, &s->ttyfd, s->tty, sizeof(s->tty));
161 if (res == 0) 161 if (res == 0)
162 goto error; 162 goto error;
@@ -182,7 +182,7 @@ Index: b/monitor_wrap.c
182=================================================================== 182===================================================================
183--- a/monitor_wrap.c 183--- a/monitor_wrap.c
184+++ b/monitor_wrap.c 184+++ b/monitor_wrap.c
185@@ -280,10 +280,10 @@ 185@@ -318,10 +318,10 @@
186 return (banner); 186 return (banner);
187 } 187 }
188 188
@@ -195,7 +195,7 @@ Index: b/monitor_wrap.c
195 { 195 {
196 Buffer m; 196 Buffer m;
197 197
198@@ -292,11 +292,29 @@ 198@@ -330,11 +330,29 @@
199 buffer_init(&m); 199 buffer_init(&m);
200 buffer_put_cstring(&m, service); 200 buffer_put_cstring(&m, service);
201 buffer_put_cstring(&m, style ? style : ""); 201 buffer_put_cstring(&m, style ? style : "");
@@ -229,7 +229,7 @@ Index: b/monitor_wrap.h
229=================================================================== 229===================================================================
230--- a/monitor_wrap.h 230--- a/monitor_wrap.h
231+++ b/monitor_wrap.h 231+++ b/monitor_wrap.h
232@@ -40,7 +40,8 @@ 232@@ -41,7 +41,8 @@
233 int mm_is_monitor(void); 233 int mm_is_monitor(void);
234 DH *mm_choose_dh(int, int, int); 234 DH *mm_choose_dh(int, int, int);
235 int mm_key_sign(Key *, u_char **, u_int *, u_char *, u_int); 235 int mm_key_sign(Key *, u_char **, u_int *, u_char *, u_int);
@@ -256,7 +256,7 @@ Index: b/openbsd-compat/port-linux.c
256 #include "log.h" 256 #include "log.h"
257 #include "xmalloc.h" 257 #include "xmalloc.h"
258 #include "port-linux.h" 258 #include "port-linux.h"
259@@ -54,9 +60,9 @@ 259@@ -58,9 +64,9 @@
260 260
261 /* Return the default security context for the given username */ 261 /* Return the default security context for the given username */
262 static security_context_t 262 static security_context_t
@@ -268,7 +268,7 @@ Index: b/openbsd-compat/port-linux.c
268 char *sename = NULL, *lvl = NULL; 268 char *sename = NULL, *lvl = NULL;
269 int r; 269 int r;
270 270
271@@ -69,9 +75,16 @@ 271@@ -73,9 +79,16 @@
272 #endif 272 #endif
273 273
274 #ifdef HAVE_GET_DEFAULT_CONTEXT_WITH_LEVEL 274 #ifdef HAVE_GET_DEFAULT_CONTEXT_WITH_LEVEL
@@ -287,7 +287,7 @@ Index: b/openbsd-compat/port-linux.c
287 #endif 287 #endif
288 288
289 if (r != 0) { 289 if (r != 0) {
290@@ -102,7 +115,7 @@ 290@@ -106,7 +119,7 @@
291 291
292 /* Set the execution context to the default for the specified user */ 292 /* Set the execution context to the default for the specified user */
293 void 293 void
@@ -296,7 +296,7 @@ Index: b/openbsd-compat/port-linux.c
296 { 296 {
297 security_context_t user_ctx = NULL; 297 security_context_t user_ctx = NULL;
298 298
299@@ -111,7 +124,7 @@ 299@@ -115,7 +128,7 @@
300 300
301 debug3("%s: setting execution context", __func__); 301 debug3("%s: setting execution context", __func__);
302 302
@@ -305,7 +305,7 @@ Index: b/openbsd-compat/port-linux.c
305 if (setexeccon(user_ctx) != 0) { 305 if (setexeccon(user_ctx) != 0) {
306 switch (security_getenforce()) { 306 switch (security_getenforce()) {
307 case -1: 307 case -1:
308@@ -133,7 +146,7 @@ 308@@ -137,7 +150,7 @@
309 309
310 /* Set the TTY context for the specified user */ 310 /* Set the TTY context for the specified user */
311 void 311 void
@@ -314,7 +314,7 @@ Index: b/openbsd-compat/port-linux.c
314 { 314 {
315 security_context_t new_tty_ctx = NULL; 315 security_context_t new_tty_ctx = NULL;
316 security_context_t user_ctx = NULL; 316 security_context_t user_ctx = NULL;
317@@ -144,7 +157,7 @@ 317@@ -148,7 +161,7 @@
318 318
319 debug3("%s: setting TTY context on %s", __func__, tty); 319 debug3("%s: setting TTY context on %s", __func__, tty);
320 320
@@ -377,7 +377,7 @@ Index: b/session.c
377=================================================================== 377===================================================================
378--- a/session.c 378--- a/session.c
379+++ b/session.c 379+++ b/session.c
380@@ -1467,7 +1467,7 @@ 380@@ -1471,7 +1471,7 @@
381 381
382 /* Set login name, uid, gid, and groups. */ 382 /* Set login name, uid, gid, and groups. */
383 void 383 void
@@ -386,7 +386,7 @@ Index: b/session.c
386 { 386 {
387 char *chroot_path, *tmp; 387 char *chroot_path, *tmp;
388 388
389@@ -1495,7 +1495,7 @@ 389@@ -1499,7 +1499,7 @@
390 endgrent(); 390 endgrent();
391 #endif 391 #endif
392 392
@@ -395,7 +395,7 @@ Index: b/session.c
395 395
396 if (options.chroot_directory != NULL && 396 if (options.chroot_directory != NULL &&
397 strcasecmp(options.chroot_directory, "none") != 0) { 397 strcasecmp(options.chroot_directory, "none") != 0) {
398@@ -1618,7 +1618,7 @@ 398@@ -1625,7 +1625,7 @@
399 399
400 /* Force a password change */ 400 /* Force a password change */
401 if (s->authctxt->force_pwchange) { 401 if (s->authctxt->force_pwchange) {
@@ -404,7 +404,7 @@ Index: b/session.c
404 child_close_fds(); 404 child_close_fds();
405 do_pwchange(s); 405 do_pwchange(s);
406 exit(1); 406 exit(1);
407@@ -1645,7 +1645,7 @@ 407@@ -1652,7 +1652,7 @@
408 /* When PAM is enabled we rely on it to do the nologin check */ 408 /* When PAM is enabled we rely on it to do the nologin check */
409 if (!options.use_pam) 409 if (!options.use_pam)
410 do_nologin(pw); 410 do_nologin(pw);
@@ -413,7 +413,7 @@ Index: b/session.c
413 /* 413 /*
414 * PAM session modules in do_setusercontext may have 414 * PAM session modules in do_setusercontext may have
415 * generated messages, so if this in an interactive 415 * generated messages, so if this in an interactive
416@@ -2057,7 +2057,7 @@ 416@@ -2064,7 +2064,7 @@
417 tty_parse_modes(s->ttyfd, &n_bytes); 417 tty_parse_modes(s->ttyfd, &n_bytes);
418 418
419 if (!use_privsep) 419 if (!use_privsep)
@@ -439,7 +439,7 @@ Index: b/sshd.c
439=================================================================== 439===================================================================
440--- a/sshd.c 440--- a/sshd.c
441+++ b/sshd.c 441+++ b/sshd.c
442@@ -707,7 +707,7 @@ 442@@ -730,7 +730,7 @@
443 RAND_seed(rnd, sizeof(rnd)); 443 RAND_seed(rnd, sizeof(rnd));
444 444
445 /* Drop privileges */ 445 /* Drop privileges */
diff --git a/debian/patches/series b/debian/patches/series
index 3450e4c55..2be7cf10a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,6 +1,5 @@
1# GSSAPI 1# GSSAPI
2gssapi.patch 2gssapi.patch
3gssapi-autoconf.patch
4 3
5# SELinux 4# SELinux
6selinux-role.patch 5selinux-role.patch
@@ -37,9 +36,6 @@ ssh-argv0.patch
37doc-hash-tab-completion.patch 36doc-hash-tab-completion.patch
38 37
39# Miscellaneous bug fixes 38# Miscellaneous bug fixes
40selinux-build-failure.patch
41ssh-add-fifo.patch
42hostbased-ecdsa.patch
43auth-log-verbosity.patch 39auth-log-verbosity.patch
44 40
45# Debian-specific configuration 41# Debian-specific configuration
diff --git a/debian/patches/shell-path.patch b/debian/patches/shell-path.patch
index 5100d8ec7..8c549128b 100644
--- a/debian/patches/shell-path.patch
+++ b/debian/patches/shell-path.patch
@@ -19,7 +19,7 @@ Index: b/sshconnect.c
19 perror(argv[0]); 19 perror(argv[0]);
20 exit(1); 20 exit(1);
21 } 21 }
22@@ -1274,7 +1274,7 @@ 22@@ -1273,7 +1273,7 @@
23 if (pid == 0) { 23 if (pid == 0) {
24 signal(SIGPIPE, SIG_DFL); 24 signal(SIGPIPE, SIG_DFL);
25 debug3("Executing %s -c \"%s\"", shell, args); 25 debug3("Executing %s -c \"%s\"", shell, args);
diff --git a/debian/patches/ssh-add-fifo.patch b/debian/patches/ssh-add-fifo.patch
deleted file mode 100644
index deac58e75..000000000
--- a/debian/patches/ssh-add-fifo.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1Description: Allow ssh-add to read from FIFOs
2Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
3Bug: https://bugzilla.mindrot.org/show_bug.cgi?id=1869
4Bug-Debian: http://bugs.debian.org/614897
5Origin: other, https://bugzilla.mindrot.org/attachment.cgi?id=2002&action=diff
6Forwarded: yes
7Last-Update: 2011-03-18
8
9Index: b/authfile.c
10===================================================================
11--- a/authfile.c
12+++ b/authfile.c
13@@ -317,7 +317,7 @@
14 static int
15 key_load_file(int fd, const char *filename, Buffer *blob)
16 {
17- size_t len;
18+ size_t len, readcount;
19 u_char *cp;
20 struct stat st;
21
22@@ -337,11 +337,14 @@
23 return 0;
24 }
25 len = (size_t)st.st_size; /* truncated */
26+ if (0 == len && S_ISFIFO(st.st_mode))
27+ len = 8192; /* we will try reading up to 8KiB from a FIFO */
28
29 buffer_init(blob);
30 cp = buffer_append_space(blob, len);
31
32- if (atomicio(read, fd, cp, len) != len) {
33+ readcount = atomicio(read, fd, cp, len);
34+ if (readcount != len && !(readcount > 0 && S_ISFIFO(st.st_mode))) {
35 debug("%s: read from key file %.200s%sfailed: %.100s", __func__,
36 filename == NULL ? "" : filename,
37 filename == NULL ? "" : " ",
diff --git a/debian/patches/ssh-argv0.patch b/debian/patches/ssh-argv0.patch
index 43d9d4d44..a7750ed23 100644
--- a/debian/patches/ssh-argv0.patch
+++ b/debian/patches/ssh-argv0.patch
@@ -11,7 +11,7 @@ Index: b/ssh.1
11=================================================================== 11===================================================================
12--- a/ssh.1 12--- a/ssh.1
13+++ b/ssh.1 13+++ b/ssh.1
14@@ -1406,6 +1406,7 @@ 14@@ -1411,6 +1411,7 @@
15 .Xr sftp 1 , 15 .Xr sftp 1 ,
16 .Xr ssh-add 1 , 16 .Xr ssh-add 1 ,
17 .Xr ssh-agent 1 , 17 .Xr ssh-agent 1 ,
diff --git a/debian/patches/ssh-vulnkey.patch b/debian/patches/ssh-vulnkey.patch
index f3e08b06d..4245319c3 100644
--- a/debian/patches/ssh-vulnkey.patch
+++ b/debian/patches/ssh-vulnkey.patch
@@ -14,47 +14,45 @@ Index: b/Makefile.in
14=================================================================== 14===================================================================
15--- a/Makefile.in 15--- a/Makefile.in
16+++ b/Makefile.in 16+++ b/Makefile.in
17@@ -27,6 +27,7 @@ 17@@ -26,6 +26,7 @@
18 SFTP_SERVER=$(libexecdir)/sftp-server
18 SSH_KEYSIGN=$(libexecdir)/ssh-keysign 19 SSH_KEYSIGN=$(libexecdir)/ssh-keysign
19 SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper 20 SSH_PKCS11_HELPER=$(libexecdir)/ssh-pkcs11-helper
20 RAND_HELPER=$(libexecdir)/ssh-rand-helper
21+SSH_DATADIR=$(datadir)/ssh 21+SSH_DATADIR=$(datadir)/ssh
22 PRIVSEP_PATH=@PRIVSEP_PATH@ 22 PRIVSEP_PATH=@PRIVSEP_PATH@
23 SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@ 23 SSH_PRIVSEP_USER=@SSH_PRIVSEP_USER@
24 STRIP_OPT=@STRIP_OPT@ 24 STRIP_OPT=@STRIP_OPT@
25@@ -39,7 +40,8 @@ 25@@ -38,6 +39,7 @@
26 -D_PATH_SSH_PKCS11_HELPER=\"$(SSH_PKCS11_HELPER)\" \ 26 -D_PATH_SSH_PKCS11_HELPER=\"$(SSH_PKCS11_HELPER)\" \
27 -D_PATH_SSH_PIDDIR=\"$(piddir)\" \ 27 -D_PATH_SSH_PIDDIR=\"$(piddir)\" \
28 -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \ 28 -D_PATH_PRIVSEP_CHROOT_DIR=\"$(PRIVSEP_PATH)\" \
29- -DSSH_RAND_HELPER=\"$(RAND_HELPER)\" 29+ -D_PATH_SSH_DATADIR=\"$(SSH_DATADIR)\" \
30+ -DSSH_RAND_HELPER=\"$(RAND_HELPER)\" \
31+ -D_PATH_SSH_DATADIR=\"$(SSH_DATADIR)\"
32 30
33 CC=@CC@ 31 CC=@CC@
34 LD=@LD@ 32 LD=@LD@
35@@ -64,7 +66,7 @@ 33@@ -59,7 +61,7 @@
36 INSTALL_SSH_PRNG_CMDS=@INSTALL_SSH_PRNG_CMDS@ 34 EXEEXT=@EXEEXT@
37 INSTALL_SSH_RAND_HELPER=@INSTALL_SSH_RAND_HELPER@ 35 MANFMT=@MANFMT@
38 36
39-TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} sftp-server$(EXEEXT) sftp$(EXEEXT) 37-TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT)
40+TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) ssh-rand-helper${EXEEXT} sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-vulnkey$(EXEEXT) 38+TARGETS=ssh$(EXEEXT) sshd$(EXEEXT) ssh-add$(EXEEXT) ssh-keygen$(EXEEXT) ssh-keyscan${EXEEXT} ssh-keysign${EXEEXT} ssh-pkcs11-helper$(EXEEXT) ssh-agent$(EXEEXT) scp$(EXEEXT) sftp-server$(EXEEXT) sftp$(EXEEXT) ssh-vulnkey$(EXEEXT)
41 39
42 LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \ 40 LIBSSH_OBJS=acss.o authfd.o authfile.o bufaux.o bufbn.o buffer.o \
43 canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \ 41 canohost.o channels.o cipher.o cipher-acss.o cipher-aes.o \
44@@ -97,8 +99,8 @@ 42@@ -93,8 +95,8 @@
45 sftp-server.o sftp-common.o \ 43 roaming_common.o roaming_serv.o \
46 roaming_common.o roaming_serv.o 44 sandbox-null.o sandbox-rlimit.o sandbox-systrace.o sandbox-darwin.o
47 45
48-MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-rand-helper.8.out ssh-keysign.8.out ssh-pkcs11-helper.8.out sshd_config.5.out ssh_config.5.out 46-MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-keysign.8.out ssh-pkcs11-helper.8.out sshd_config.5.out ssh_config.5.out
49-MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-rand-helper.8 ssh-keysign.8 ssh-pkcs11-helper.8 sshd_config.5 ssh_config.5 47-MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-keysign.8 ssh-pkcs11-helper.8 sshd_config.5 ssh_config.5
50+MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-rand-helper.8.out ssh-keysign.8.out ssh-pkcs11-helper.8.out ssh-vulnkey.1.out sshd_config.5.out ssh_config.5.out 48+MANPAGES = moduli.5.out scp.1.out ssh-add.1.out ssh-agent.1.out ssh-keygen.1.out ssh-keyscan.1.out ssh.1.out sshd.8.out sftp-server.8.out sftp.1.out ssh-keysign.8.out ssh-pkcs11-helper.8.out ssh-vulnkey.1.out sshd_config.5.out ssh_config.5.out
51+MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-rand-helper.8 ssh-keysign.8 ssh-pkcs11-helper.8 ssh-vulnkey.1 sshd_config.5 ssh_config.5 49+MANPAGES_IN = moduli.5 scp.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh-keyscan.1 ssh.1 sshd.8 sftp-server.8 sftp.1 ssh-keysign.8 ssh-pkcs11-helper.8 ssh-vulnkey.1 sshd_config.5 ssh_config.5
52 MANTYPE = @MANTYPE@ 50 MANTYPE = @MANTYPE@
53 51
54 CONFIGFILES=sshd_config.out ssh_config.out moduli.out 52 CONFIGFILES=sshd_config.out ssh_config.out moduli.out
55@@ -179,6 +181,9 @@ 53@@ -171,6 +173,9 @@
56 ssh-rand-helper${EXEEXT}: $(LIBCOMPAT) libssh.a ssh-rand-helper.o 54 sftp$(EXEEXT): $(LIBCOMPAT) libssh.a sftp.o sftp-client.o sftp-common.o sftp-glob.o progressmeter.o
57 $(LD) -o $@ ssh-rand-helper.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 55 $(LD) -o $@ progressmeter.o sftp.o sftp-client.o sftp-common.o sftp-glob.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) $(LIBEDIT)
58 56
59+ssh-vulnkey$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-vulnkey.o 57+ssh-vulnkey$(EXEEXT): $(LIBCOMPAT) libssh.a ssh-vulnkey.o
60+ $(LD) -o $@ ssh-vulnkey.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS) 58+ $(LD) -o $@ ssh-vulnkey.o $(LDFLAGS) -lssh -lopenbsd-compat $(LIBS)
@@ -62,7 +60,7 @@ Index: b/Makefile.in
62 # test driver for the loginrec code - not built by default 60 # test driver for the loginrec code - not built by default
63 logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o 61 logintest: logintest.o $(LIBCOMPAT) libssh.a loginrec.o
64 $(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh $(LIBS) 62 $(LD) -o $@ logintest.o $(LDFLAGS) loginrec.o -lopenbsd-compat -lssh $(LIBS)
65@@ -273,6 +278,7 @@ 63@@ -259,6 +264,7 @@
66 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-pkcs11-helper$(EXEEXT) $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT) 64 $(INSTALL) -m 0755 $(STRIP_OPT) ssh-pkcs11-helper$(EXEEXT) $(DESTDIR)$(SSH_PKCS11_HELPER)$(EXEEXT)
67 $(INSTALL) -m 0755 $(STRIP_OPT) sftp$(EXEEXT) $(DESTDIR)$(bindir)/sftp$(EXEEXT) 65 $(INSTALL) -m 0755 $(STRIP_OPT) sftp$(EXEEXT) $(DESTDIR)$(bindir)/sftp$(EXEEXT)
68 $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server$(EXEEXT) $(DESTDIR)$(SFTP_SERVER)$(EXEEXT) 66 $(INSTALL) -m 0755 $(STRIP_OPT) sftp-server$(EXEEXT) $(DESTDIR)$(SFTP_SERVER)$(EXEEXT)
@@ -70,7 +68,7 @@ Index: b/Makefile.in
70 $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1 68 $(INSTALL) -m 644 ssh.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh.1
71 $(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1 69 $(INSTALL) -m 644 scp.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/scp.1
72 $(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1 70 $(INSTALL) -m 644 ssh-add.1.out $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-add.1
73@@ -290,6 +296,7 @@ 71@@ -273,6 +279,7 @@
74 $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 72 $(INSTALL) -m 644 sftp-server.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
75 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8 73 $(INSTALL) -m 644 ssh-keysign.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
76 $(INSTALL) -m 644 ssh-pkcs11-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8 74 $(INSTALL) -m 644 ssh-pkcs11-helper.8.out $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-pkcs11-helper.8
@@ -78,7 +76,7 @@ Index: b/Makefile.in
78 -rm -f $(DESTDIR)$(bindir)/slogin 76 -rm -f $(DESTDIR)$(bindir)/slogin
79 ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin 77 ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
80 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1 78 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1
81@@ -379,6 +386,7 @@ 79@@ -354,6 +361,7 @@
82 -rm -f $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT) 80 -rm -f $(DESTDIR)$(bindir)/ssh-agent$(EXEEXT)
83 -rm -f $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT) 81 -rm -f $(DESTDIR)$(bindir)/ssh-keygen$(EXEEXT)
84 -rm -f $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT) 82 -rm -f $(DESTDIR)$(bindir)/ssh-keyscan$(EXEEXT)
@@ -86,14 +84,14 @@ Index: b/Makefile.in
86 -rm -f $(DESTDIR)$(bindir)/sftp$(EXEEXT) 84 -rm -f $(DESTDIR)$(bindir)/sftp$(EXEEXT)
87 -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT) 85 -rm -f $(DESTDIR)$(sbindir)/sshd$(EXEEXT)
88 -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT) 86 -rm -r $(DESTDIR)$(SFTP_SERVER)$(EXEEXT)
89@@ -392,6 +400,7 @@ 87@@ -366,6 +374,7 @@
90 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1 88 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keygen.1
91 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1 89 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/sftp.1
92 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1 90 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-keyscan.1
93+ -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-vulnkey.1 91+ -rm -f $(DESTDIR)$(mandir)/$(mansubdir)1/ssh-vulnkey.1
94 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8 92 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sshd.8
95 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-rand-helper.8
96 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8 93 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/sftp-server.8
94 -rm -f $(DESTDIR)$(mandir)/$(mansubdir)8/ssh-keysign.8
97Index: b/auth-rh-rsa.c 95Index: b/auth-rh-rsa.c
98=================================================================== 96===================================================================
99--- a/auth-rh-rsa.c 97--- a/auth-rh-rsa.c
@@ -111,7 +109,7 @@ Index: b/auth-rsa.c
111=================================================================== 109===================================================================
112--- a/auth-rsa.c 110--- a/auth-rsa.c
113+++ b/auth-rsa.c 111+++ b/auth-rsa.c
114@@ -247,7 +247,7 @@ 112@@ -233,7 +233,7 @@
115 file, linenum, BN_num_bits(key->rsa->n), bits); 113 file, linenum, BN_num_bits(key->rsa->n), bits);
116 114
117 /* Never accept a revoked key */ 115 /* Never accept a revoked key */
@@ -132,7 +130,7 @@ Index: b/auth.c
132 #include "auth.h" 130 #include "auth.h"
133 #include "auth-options.h" 131 #include "auth-options.h"
134 #include "canohost.h" 132 #include "canohost.h"
135@@ -621,10 +622,34 @@ 133@@ -606,10 +607,34 @@
136 134
137 /* Returns 1 if key is revoked by revoked_keys_file, 0 otherwise */ 135 /* Returns 1 if key is revoked by revoked_keys_file, 0 otherwise */
138 int 136 int
@@ -172,7 +170,7 @@ Index: b/auth.h
172=================================================================== 170===================================================================
173--- a/auth.h 171--- a/auth.h
174+++ b/auth.h 172+++ b/auth.h
175@@ -175,7 +175,7 @@ 173@@ -174,7 +174,7 @@
176 174
177 FILE *auth_openkeyfile(const char *, struct passwd *, int); 175 FILE *auth_openkeyfile(const char *, struct passwd *, int);
178 FILE *auth_openprincipals(const char *, struct passwd *, int); 176 FILE *auth_openprincipals(const char *, struct passwd *, int);
@@ -199,7 +197,7 @@ Index: b/auth2-pubkey.c
199--- a/auth2-pubkey.c 197--- a/auth2-pubkey.c
200+++ b/auth2-pubkey.c 198+++ b/auth2-pubkey.c
201@@ -439,9 +439,10 @@ 199@@ -439,9 +439,10 @@
202 int success; 200 u_int success, i;
203 char *file; 201 char *file;
204 202
205- if (auth_key_is_revoked(key)) 203- if (auth_key_is_revoked(key))
@@ -221,9 +219,9 @@ Index: b/authfile.c
221 #include "atomicio.h" 219 #include "atomicio.h"
222+#include "pathnames.h" 220+#include "pathnames.h"
223 221
224 /* Version identification string for SSH v1 identity files. */ 222 #define MAX_KEY_FILE_SIZE (1024 * 1024)
225 static const char authfile_id_string[] = 223
226@@ -906,3 +907,140 @@ 224@@ -944,3 +945,140 @@
227 return ret; 225 return ret;
228 } 226 }
229 227
@@ -368,7 +366,7 @@ Index: b/authfile.h
368=================================================================== 366===================================================================
369--- a/authfile.h 367--- a/authfile.h
370+++ b/authfile.h 368+++ b/authfile.h
371@@ -26,4 +26,6 @@ 369@@ -28,4 +28,6 @@
372 int key_perm_ok(int, const char *); 370 int key_perm_ok(int, const char *);
373 int key_in_file(Key *, const char *, int); 371 int key_in_file(Key *, const char *, int);
374 372
@@ -420,7 +418,7 @@ Index: b/readconf.c
420 { "rsaauthentication", oRSAAuthentication }, 418 { "rsaauthentication", oRSAAuthentication },
421 { "pubkeyauthentication", oPubkeyAuthentication }, 419 { "pubkeyauthentication", oPubkeyAuthentication },
422 { "dsaauthentication", oPubkeyAuthentication }, /* alias */ 420 { "dsaauthentication", oPubkeyAuthentication }, /* alias */
423@@ -486,6 +488,10 @@ 421@@ -489,6 +491,10 @@
424 intptr = &options->challenge_response_authentication; 422 intptr = &options->challenge_response_authentication;
425 goto parse_flag; 423 goto parse_flag;
426 424
@@ -431,7 +429,7 @@ Index: b/readconf.c
431 case oGssAuthentication: 429 case oGssAuthentication:
432 intptr = &options->gss_authentication; 430 intptr = &options->gss_authentication;
433 goto parse_flag; 431 goto parse_flag;
434@@ -1134,6 +1140,7 @@ 432@@ -1180,6 +1186,7 @@
435 options->kbd_interactive_devices = NULL; 433 options->kbd_interactive_devices = NULL;
436 options->rhosts_rsa_authentication = -1; 434 options->rhosts_rsa_authentication = -1;
437 options->hostbased_authentication = -1; 435 options->hostbased_authentication = -1;
@@ -439,7 +437,7 @@ Index: b/readconf.c
439 options->batch_mode = -1; 437 options->batch_mode = -1;
440 options->check_host_ip = -1; 438 options->check_host_ip = -1;
441 options->strict_host_key_checking = -1; 439 options->strict_host_key_checking = -1;
442@@ -1245,6 +1252,8 @@ 440@@ -1290,6 +1297,8 @@
443 options->rhosts_rsa_authentication = 0; 441 options->rhosts_rsa_authentication = 0;
444 if (options->hostbased_authentication == -1) 442 if (options->hostbased_authentication == -1)
445 options->hostbased_authentication = 0; 443 options->hostbased_authentication = 0;
@@ -452,7 +450,7 @@ Index: b/readconf.h
452=================================================================== 450===================================================================
453--- a/readconf.h 451--- a/readconf.h
454+++ b/readconf.h 452+++ b/readconf.h
455@@ -57,6 +57,7 @@ 453@@ -58,6 +58,7 @@
456 int kbd_interactive_authentication; /* Try keyboard-interactive auth. */ 454 int kbd_interactive_authentication; /* Try keyboard-interactive auth. */
457 char *kbd_interactive_devices; /* Keyboard-interactive auth devices. */ 455 char *kbd_interactive_devices; /* Keyboard-interactive auth devices. */
458 int zero_knowledge_password_authentication; /* Try jpake */ 456 int zero_knowledge_password_authentication; /* Try jpake */
@@ -472,7 +470,7 @@ Index: b/servconf.c
472 options->permit_empty_passwd = -1; 470 options->permit_empty_passwd = -1;
473 options->permit_user_env = -1; 471 options->permit_user_env = -1;
474 options->use_login = -1; 472 options->use_login = -1;
475@@ -243,6 +244,8 @@ 473@@ -242,6 +243,8 @@
476 options->kbd_interactive_authentication = 0; 474 options->kbd_interactive_authentication = 0;
477 if (options->challenge_response_authentication == -1) 475 if (options->challenge_response_authentication == -1)
478 options->challenge_response_authentication = 1; 476 options->challenge_response_authentication = 1;
@@ -481,7 +479,7 @@ Index: b/servconf.c
481 if (options->permit_empty_passwd == -1) 479 if (options->permit_empty_passwd == -1)
482 options->permit_empty_passwd = 0; 480 options->permit_empty_passwd = 0;
483 if (options->permit_user_env == -1) 481 if (options->permit_user_env == -1)
484@@ -322,7 +325,7 @@ 482@@ -318,7 +321,7 @@
485 sListenAddress, sAddressFamily, 483 sListenAddress, sAddressFamily,
486 sPrintMotd, sPrintLastLog, sIgnoreRhosts, 484 sPrintMotd, sPrintLastLog, sIgnoreRhosts,
487 sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost, 485 sX11Forwarding, sX11DisplayOffset, sX11UseLocalhost,
@@ -490,7 +488,7 @@ Index: b/servconf.c
490 sPermitUserEnvironment, sUseLogin, sAllowTcpForwarding, sCompression, 488 sPermitUserEnvironment, sUseLogin, sAllowTcpForwarding, sCompression,
491 sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, 489 sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups,
492 sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile, 490 sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile,
493@@ -432,6 +435,7 @@ 491@@ -428,6 +431,7 @@
494 { "x11uselocalhost", sX11UseLocalhost, SSHCFG_ALL }, 492 { "x11uselocalhost", sX11UseLocalhost, SSHCFG_ALL },
495 { "xauthlocation", sXAuthLocation, SSHCFG_GLOBAL }, 493 { "xauthlocation", sXAuthLocation, SSHCFG_GLOBAL },
496 { "strictmodes", sStrictModes, SSHCFG_GLOBAL }, 494 { "strictmodes", sStrictModes, SSHCFG_GLOBAL },
@@ -498,7 +496,7 @@ Index: b/servconf.c
498 { "permitemptypasswords", sEmptyPasswd, SSHCFG_ALL }, 496 { "permitemptypasswords", sEmptyPasswd, SSHCFG_ALL },
499 { "permituserenvironment", sPermitUserEnvironment, SSHCFG_GLOBAL }, 497 { "permituserenvironment", sPermitUserEnvironment, SSHCFG_GLOBAL },
500 { "uselogin", sUseLogin, SSHCFG_GLOBAL }, 498 { "uselogin", sUseLogin, SSHCFG_GLOBAL },
501@@ -1029,6 +1033,10 @@ 499@@ -1047,6 +1051,10 @@
502 intptr = &options->tcp_keep_alive; 500 intptr = &options->tcp_keep_alive;
503 goto parse_flag; 501 goto parse_flag;
504 502
@@ -509,7 +507,7 @@ Index: b/servconf.c
509 case sEmptyPasswd: 507 case sEmptyPasswd:
510 intptr = &options->permit_empty_passwd; 508 intptr = &options->permit_empty_passwd;
511 goto parse_flag; 509 goto parse_flag;
512@@ -1757,6 +1765,7 @@ 510@@ -1773,6 +1781,7 @@
513 dump_cfg_fmtint(sX11UseLocalhost, o->x11_use_localhost); 511 dump_cfg_fmtint(sX11UseLocalhost, o->x11_use_localhost);
514 dump_cfg_fmtint(sStrictModes, o->strict_modes); 512 dump_cfg_fmtint(sStrictModes, o->strict_modes);
515 dump_cfg_fmtint(sTCPKeepAlive, o->tcp_keep_alive); 513 dump_cfg_fmtint(sTCPKeepAlive, o->tcp_keep_alive);
@@ -521,7 +519,7 @@ Index: b/servconf.h
521=================================================================== 519===================================================================
522--- a/servconf.h 520--- a/servconf.h
523+++ b/servconf.h 521+++ b/servconf.h
524@@ -107,6 +107,7 @@ 522@@ -113,6 +113,7 @@
525 int challenge_response_authentication; 523 int challenge_response_authentication;
526 int zero_knowledge_password_authentication; 524 int zero_knowledge_password_authentication;
527 /* If true, permit jpake auth */ 525 /* If true, permit jpake auth */
@@ -564,10 +562,10 @@ Index: b/ssh-add.c
564+ char *comment = NULL, *fp; 562+ char *comment = NULL, *fp;
565 char msg[1024], *certpath; 563 char msg[1024], *certpath;
566 int fd, perms_ok, ret = -1; 564 int fd, perms_ok, ret = -1;
567 565 Buffer keyblob;
568@@ -187,6 +187,14 @@ 566@@ -218,6 +218,14 @@
569 "Bad passphrase, try again for %.200s: ", comment); 567 } else {
570 } 568 fprintf(stderr, "Could not add identity: %s\n", filename);
571 } 569 }
572+ if (blacklisted_key(private, &fp) == 1) { 570+ if (blacklisted_key(private, &fp) == 1) {
573+ fprintf(stderr, "Public key %s blacklisted (see " 571+ fprintf(stderr, "Public key %s blacklisted (see "
@@ -578,13 +576,13 @@ Index: b/ssh-add.c
578+ return -1; 576+ return -1;
579+ } 577+ }
580 578
581 if (ssh_add_identity_constrained(ac, private, comment, lifetime, 579
582 confirm)) { 580 /* Now try to add the certificate flavour too */
583Index: b/ssh-keygen.1 581Index: b/ssh-keygen.1
584=================================================================== 582===================================================================
585--- a/ssh-keygen.1 583--- a/ssh-keygen.1
586+++ b/ssh-keygen.1 584+++ b/ssh-keygen.1
587@@ -659,6 +659,7 @@ 585@@ -670,6 +670,7 @@
588 .Xr ssh 1 , 586 .Xr ssh 1 ,
589 .Xr ssh-add 1 , 587 .Xr ssh-add 1 ,
590 .Xr ssh-agent 1 , 588 .Xr ssh-agent 1 ,
@@ -843,7 +841,7 @@ Index: b/ssh-vulnkey.c
843=================================================================== 841===================================================================
844--- /dev/null 842--- /dev/null
845+++ b/ssh-vulnkey.c 843+++ b/ssh-vulnkey.c
846@@ -0,0 +1,388 @@ 844@@ -0,0 +1,387 @@
847+/* 845+/*
848+ * Copyright (c) 2008 Canonical Ltd. All rights reserved. 846+ * Copyright (c) 2008 Canonical Ltd. All rights reserved.
849+ * 847+ *
@@ -1157,7 +1155,6 @@ Index: b/ssh-vulnkey.c
1157+ /* We don't need the RNG ourselves, but symbol references here allow 1155+ /* We don't need the RNG ourselves, but symbol references here allow
1158+ * ld to link us properly. 1156+ * ld to link us properly.
1159+ */ 1157+ */
1160+ init_rng();
1161+ seed_rng(); 1158+ seed_rng();
1162+ 1159+
1163+ while ((opt = getopt(argc, argv, "ahqv")) != -1) { 1160+ while ((opt = getopt(argc, argv, "ahqv")) != -1) {
@@ -1236,7 +1233,7 @@ Index: b/ssh.1
1236=================================================================== 1233===================================================================
1237--- a/ssh.1 1234--- a/ssh.1
1238+++ b/ssh.1 1235+++ b/ssh.1
1239@@ -1402,6 +1402,7 @@ 1236@@ -1407,6 +1407,7 @@
1240 .Xr ssh-agent 1 , 1237 .Xr ssh-agent 1 ,
1241 .Xr ssh-keygen 1 , 1238 .Xr ssh-keygen 1 ,
1242 .Xr ssh-keyscan 1 , 1239 .Xr ssh-keyscan 1 ,
@@ -1248,7 +1245,7 @@ Index: b/ssh.c
1248=================================================================== 1245===================================================================
1249--- a/ssh.c 1246--- a/ssh.c
1250+++ b/ssh.c 1247+++ b/ssh.c
1251@@ -1445,7 +1445,7 @@ 1248@@ -1476,7 +1476,7 @@
1252 static void 1249 static void
1253 load_public_identity_files(void) 1250 load_public_identity_files(void)
1254 { 1251 {
@@ -1257,7 +1254,7 @@ Index: b/ssh.c
1257 char *pwdir = NULL, *pwname = NULL; 1254 char *pwdir = NULL, *pwname = NULL;
1258 int i = 0; 1255 int i = 0;
1259 Key *public; 1256 Key *public;
1260@@ -1502,6 +1502,22 @@ 1257@@ -1533,6 +1533,22 @@
1261 public = key_load_public(filename, NULL); 1258 public = key_load_public(filename, NULL);
1262 debug("identity file %s type %d", filename, 1259 debug("identity file %s type %d", filename,
1263 public ? public->type : -1); 1260 public ? public->type : -1);
@@ -1284,7 +1281,7 @@ Index: b/ssh_config.5
1284=================================================================== 1281===================================================================
1285--- a/ssh_config.5 1282--- a/ssh_config.5
1286+++ b/ssh_config.5 1283+++ b/ssh_config.5
1287@@ -1146,6 +1146,23 @@ 1284@@ -1188,6 +1188,23 @@
1288 .Dq any . 1285 .Dq any .
1289 The default is 1286 The default is
1290 .Dq any:any . 1287 .Dq any:any .
@@ -1312,7 +1309,7 @@ Index: b/sshconnect2.c
1312=================================================================== 1309===================================================================
1313--- a/sshconnect2.c 1310--- a/sshconnect2.c
1314+++ b/sshconnect2.c 1311+++ b/sshconnect2.c
1315@@ -1488,6 +1488,8 @@ 1312@@ -1489,6 +1489,8 @@
1316 1313
1317 /* list of keys stored in the filesystem */ 1314 /* list of keys stored in the filesystem */
1318 for (i = 0; i < options.num_identity_files; i++) { 1315 for (i = 0; i < options.num_identity_files; i++) {
@@ -1321,7 +1318,7 @@ Index: b/sshconnect2.c
1321 key = options.identity_keys[i]; 1318 key = options.identity_keys[i];
1322 if (key && key->type == KEY_RSA1) 1319 if (key && key->type == KEY_RSA1)
1323 continue; 1320 continue;
1324@@ -1581,7 +1583,7 @@ 1321@@ -1582,7 +1584,7 @@
1325 debug("Offering %s public key: %s", key_type(id->key), 1322 debug("Offering %s public key: %s", key_type(id->key),
1326 id->filename); 1323 id->filename);
1327 sent = send_pubkey_test(authctxt, id); 1324 sent = send_pubkey_test(authctxt, id);
@@ -1334,7 +1331,7 @@ Index: b/sshd.8
1334=================================================================== 1331===================================================================
1335--- a/sshd.8 1332--- a/sshd.8
1336+++ b/sshd.8 1333+++ b/sshd.8
1337@@ -945,6 +945,7 @@ 1334@@ -948,6 +948,7 @@
1338 .Xr ssh-agent 1 , 1335 .Xr ssh-agent 1 ,
1339 .Xr ssh-keygen 1 , 1336 .Xr ssh-keygen 1 ,
1340 .Xr ssh-keyscan 1 , 1337 .Xr ssh-keyscan 1 ,
@@ -1346,7 +1343,7 @@ Index: b/sshd.c
1346=================================================================== 1343===================================================================
1347--- a/sshd.c 1344--- a/sshd.c
1348+++ b/sshd.c 1345+++ b/sshd.c
1349@@ -1576,6 +1576,11 @@ 1346@@ -1598,6 +1598,11 @@
1350 sensitive_data.host_keys[i] = NULL; 1347 sensitive_data.host_keys[i] = NULL;
1351 continue; 1348 continue;
1352 } 1349 }
@@ -1362,7 +1359,7 @@ Index: b/sshd_config.5
1362=================================================================== 1359===================================================================
1363--- a/sshd_config.5 1360--- a/sshd_config.5
1364+++ b/sshd_config.5 1361+++ b/sshd_config.5
1365@@ -792,6 +792,20 @@ 1362@@ -795,6 +795,20 @@
1366 Specifies whether password authentication is allowed. 1363 Specifies whether password authentication is allowed.
1367 The default is 1364 The default is
1368 .Dq yes . 1365 .Dq yes .
diff --git a/debian/patches/ssh1-keepalive.patch b/debian/patches/ssh1-keepalive.patch
index 5f1caddc9..d5a7fe07a 100644
--- a/debian/patches/ssh1-keepalive.patch
+++ b/debian/patches/ssh1-keepalive.patch
@@ -7,7 +7,7 @@ Index: b/clientloop.c
7=================================================================== 7===================================================================
8--- a/clientloop.c 8--- a/clientloop.c
9+++ b/clientloop.c 9+++ b/clientloop.c
10@@ -547,16 +547,21 @@ 10@@ -545,16 +545,21 @@
11 static void 11 static void
12 server_alive_check(void) 12 server_alive_check(void)
13 { 13 {
@@ -38,7 +38,7 @@ Index: b/clientloop.c
38 } 38 }
39 39
40 /* 40 /*
41@@ -616,7 +621,7 @@ 41@@ -614,7 +619,7 @@
42 */ 42 */
43 43
44 timeout_secs = INT_MAX; /* we use INT_MAX to mean no timeout */ 44 timeout_secs = INT_MAX; /* we use INT_MAX to mean no timeout */
@@ -51,7 +51,7 @@ Index: b/ssh_config.5
51=================================================================== 51===================================================================
52--- a/ssh_config.5 52--- a/ssh_config.5
53+++ b/ssh_config.5 53+++ b/ssh_config.5
54@@ -1047,7 +1047,10 @@ 54@@ -1089,7 +1089,10 @@
55 .Cm ServerAliveCountMax 55 .Cm ServerAliveCountMax
56 is left at the default, if the server becomes unresponsive, 56 is left at the default, if the server becomes unresponsive,
57 ssh will disconnect after approximately 45 seconds. 57 ssh will disconnect after approximately 45 seconds.
diff --git a/debian/patches/syslog-level-silent.patch b/debian/patches/syslog-level-silent.patch
index 9b560217f..90ddca4ad 100644
--- a/debian/patches/syslog-level-silent.patch
+++ b/debian/patches/syslog-level-silent.patch
@@ -14,7 +14,7 @@ Index: b/log.c
14=================================================================== 14===================================================================
15--- a/log.c 15--- a/log.c
16+++ b/log.c 16+++ b/log.c
17@@ -90,6 +90,7 @@ 17@@ -92,6 +92,7 @@
18 LogLevel val; 18 LogLevel val;
19 } log_levels[] = 19 } log_levels[] =
20 { 20 {
@@ -26,10 +26,10 @@ Index: b/ssh.c
26=================================================================== 26===================================================================
27--- a/ssh.c 27--- a/ssh.c
28+++ b/ssh.c 28+++ b/ssh.c
29@@ -641,7 +641,7 @@ 29@@ -678,7 +678,7 @@
30 tty_flag = 0;
31 /* Do not allocate a tty if stdin is not a tty. */ 30 /* Do not allocate a tty if stdin is not a tty. */
32 if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { 31 if ((!isatty(fileno(stdin)) || stdin_null_flag) &&
32 options.request_tty != REQUEST_TTY_FORCE) {
33- if (tty_flag) 33- if (tty_flag)
34+ if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) 34+ if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET)
35 logit("Pseudo-terminal will not be allocated because " 35 logit("Pseudo-terminal will not be allocated because "
diff --git a/debian/patches/user-group-modes.patch b/debian/patches/user-group-modes.patch
index fe2d99be0..01ba05526 100644
--- a/debian/patches/user-group-modes.patch
+++ b/debian/patches/user-group-modes.patch
@@ -24,7 +24,7 @@ Index: b/readconf.c
24 24
25 #include "xmalloc.h" 25 #include "xmalloc.h"
26 #include "ssh.h" 26 #include "ssh.h"
27@@ -1085,8 +1087,7 @@ 27@@ -1131,8 +1133,7 @@
28 28
29 if (fstat(fileno(f), &sb) == -1) 29 if (fstat(fileno(f), &sb) == -1)
30 fatal("fstat %s: %s", filename, strerror(errno)); 30 fatal("fstat %s: %s", filename, strerror(errno));
@@ -38,7 +38,7 @@ Index: b/ssh.1
38=================================================================== 38===================================================================
39--- a/ssh.1 39--- a/ssh.1
40+++ b/ssh.1 40+++ b/ssh.1
41@@ -1293,6 +1293,8 @@ 41@@ -1298,6 +1298,8 @@
42 .Xr ssh_config 5 . 42 .Xr ssh_config 5 .
43 Because of the potential for abuse, this file must have strict permissions: 43 Because of the potential for abuse, this file must have strict permissions:
44 read/write for the user, and not accessible by others. 44 read/write for the user, and not accessible by others.
@@ -51,7 +51,7 @@ Index: b/ssh_config.5
51=================================================================== 51===================================================================
52--- a/ssh_config.5 52--- a/ssh_config.5
53+++ b/ssh_config.5 53+++ b/ssh_config.5
54@@ -1299,6 +1299,8 @@ 54@@ -1343,6 +1343,8 @@
55 This file is used by the SSH client. 55 This file is used by the SSH client.
56 Because of the potential for abuse, this file must have strict permissions: 56 Because of the potential for abuse, this file must have strict permissions:
57 read/write for the user, and not accessible by others. 57 read/write for the user, and not accessible by others.
@@ -64,7 +64,7 @@ Index: b/auth.c
64=================================================================== 64===================================================================
65--- a/auth.c 65--- a/auth.c
66+++ b/auth.c 66+++ b/auth.c
67@@ -392,8 +392,7 @@ 67@@ -380,8 +380,7 @@
68 user_hostfile = tilde_expand_filename(userfile, pw->pw_uid); 68 user_hostfile = tilde_expand_filename(userfile, pw->pw_uid);
69 if (options.strict_modes && 69 if (options.strict_modes &&
70 (stat(user_hostfile, &st) == 0) && 70 (stat(user_hostfile, &st) == 0) &&
@@ -74,7 +74,7 @@ Index: b/auth.c
74 logit("Authentication refused for %.100s: " 74 logit("Authentication refused for %.100s: "
75 "bad owner or modes for %.200s", 75 "bad owner or modes for %.200s",
76 pw->pw_name, user_hostfile); 76 pw->pw_name, user_hostfile);
77@@ -454,8 +453,7 @@ 77@@ -442,8 +441,7 @@
78 78
79 /* check the open file to avoid races */ 79 /* check the open file to avoid races */
80 if (fstat(fileno(f), &st) < 0 || 80 if (fstat(fileno(f), &st) < 0 ||
@@ -84,9 +84,9 @@ Index: b/auth.c
84 snprintf(err, errlen, "bad ownership or modes for file %s", 84 snprintf(err, errlen, "bad ownership or modes for file %s",
85 buf); 85 buf);
86 return -1; 86 return -1;
87@@ -471,8 +469,7 @@ 87@@ -458,8 +456,7 @@
88 strlcpy(buf, cp, sizeof(buf));
88 89
89 debug3("secure_filename: checking '%s'", buf);
90 if (stat(buf, &st) < 0 || 90 if (stat(buf, &st) < 0 ||
91- (st.st_uid != 0 && st.st_uid != uid) || 91- (st.st_uid != 0 && st.st_uid != uid) ||
92- (st.st_mode & 022) != 0) { 92- (st.st_mode & 022) != 0) {
@@ -169,7 +169,7 @@ Index: b/misc.h
169=================================================================== 169===================================================================
170--- a/misc.h 170--- a/misc.h
171+++ b/misc.h 171+++ b/misc.h
172@@ -102,4 +102,6 @@ 172@@ -103,4 +103,6 @@
173 int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2))); 173 int ask_permission(const char *, ...) __attribute__((format(printf, 1, 2)));
174 int read_keyfile_line(FILE *, const char *, char *, size_t, u_long *); 174 int read_keyfile_line(FILE *, const char *, char *, size_t, u_long *);
175 175
diff --git a/debian/rules b/debian/rules
index eb895e0c3..ce56fdea4 100755
--- a/debian/rules
+++ b/debian/rules
@@ -80,7 +80,6 @@ confflags += --disable-strip
80confflags += --with-mantype=doc 80confflags += --with-mantype=doc
81confflags += --with-4in6 81confflags += --with-4in6
82confflags += --with-privsep-path=/var/run/sshd 82confflags += --with-privsep-path=/var/run/sshd
83confflags += --without-rand-helper
84 83
85# The Hurd needs libcrypt for res_query et al. 84# The Hurd needs libcrypt for res_query et al.
86ifeq ($(DEB_HOST_ARCH_OS),hurd) 85ifeq ($(DEB_HOST_ARCH_OS),hurd)
diff --git a/defines.h b/defines.h
index cd273066d..e4ccc5407 100644
--- a/defines.h
+++ b/defines.h
@@ -25,7 +25,7 @@
25#ifndef _DEFINES_H 25#ifndef _DEFINES_H
26#define _DEFINES_H 26#define _DEFINES_H
27 27
28/* $Id: defines.h,v 1.164 2011/01/17 10:15:31 dtucker Exp $ */ 28/* $Id: defines.h,v 1.167 2011/06/03 01:17:49 tim Exp $ */
29 29
30 30
31/* Constants */ 31/* Constants */
@@ -45,6 +45,8 @@ enum
45/* 45/*
46 * Definitions for IP type of service (ip_tos) 46 * Definitions for IP type of service (ip_tos)
47 */ 47 */
48#include <netinet/in_systm.h>
49#include <netinet/ip.h>
48#ifndef IPTOS_LOWDELAY 50#ifndef IPTOS_LOWDELAY
49# define IPTOS_LOWDELAY 0x10 51# define IPTOS_LOWDELAY 0x10
50# define IPTOS_THROUGHPUT 0x08 52# define IPTOS_THROUGHPUT 0x08
@@ -56,8 +58,6 @@ enum
56/* 58/*
57 * Definitions for DiffServ Codepoints as per RFC2474 59 * Definitions for DiffServ Codepoints as per RFC2474
58 */ 60 */
59#include <netinet/in_systm.h>
60#include <netinet/ip.h>
61#ifndef IPTOS_DSCP_AF11 61#ifndef IPTOS_DSCP_AF11
62# define IPTOS_DSCP_AF11 0x28 62# define IPTOS_DSCP_AF11 0x28
63# define IPTOS_DSCP_AF12 0x30 63# define IPTOS_DSCP_AF12 0x30
@@ -131,6 +131,10 @@ enum
131# define O_NONBLOCK 00004 /* Non Blocking Open */ 131# define O_NONBLOCK 00004 /* Non Blocking Open */
132#endif 132#endif
133 133
134#ifndef S_IFSOCK
135# define S_IFSOCK 0
136#endif /* S_IFSOCK */
137
134#ifndef S_ISDIR 138#ifndef S_ISDIR
135# define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR)) 139# define S_ISDIR(mode) (((mode) & (_S_IFMT)) == (_S_IFDIR))
136#endif /* S_ISDIR */ 140#endif /* S_ISDIR */
@@ -385,18 +389,15 @@ struct winsize {
385# define _PATH_DEVNULL "/dev/null" 389# define _PATH_DEVNULL "/dev/null"
386#endif 390#endif
387 391
388#ifndef MAIL_DIRECTORY 392/* user may have set a different path */
389# define MAIL_DIRECTORY "/var/spool/mail" 393#if defined(_PATH_MAILDIR) && defined(MAIL_DIRECTORY)
390#endif 394# undef _PATH_MAILDIR MAILDIR
395#endif /* defined(_PATH_MAILDIR) && defined(MAIL_DIRECTORY) */
391 396
392#ifndef MAILDIR 397#ifdef MAIL_DIRECTORY
393# define MAILDIR MAIL_DIRECTORY 398# define _PATH_MAILDIR MAIL_DIRECTORY
394#endif 399#endif
395 400
396#if !defined(_PATH_MAILDIR) && defined(MAILDIR)
397# define _PATH_MAILDIR MAILDIR
398#endif /* !defined(_PATH_MAILDIR) && defined(MAILDIR) */
399
400#ifndef _PATH_NOLOGIN 401#ifndef _PATH_NOLOGIN
401# define _PATH_NOLOGIN "/etc/nologin" 402# define _PATH_NOLOGIN "/etc/nologin"
402#endif 403#endif
diff --git a/entropy.c b/entropy.c
index a82166258..2d6d3ec52 100644
--- a/entropy.c
+++ b/entropy.c
@@ -25,19 +25,19 @@
25#include "includes.h" 25#include "includes.h"
26 26
27#include <sys/types.h> 27#include <sys/types.h>
28#include <sys/wait.h> 28#include <sys/socket.h>
29 29#ifdef HAVE_SYS_UN_H
30#ifdef HAVE_SYS_STAT_H 30# include <sys/un.h>
31# include <sys/stat.h>
32#endif 31#endif
33 32
34#ifdef HAVE_FCNTL_H 33#include <netinet/in.h>
35# include <fcntl.h> 34#include <arpa/inet.h>
36#endif 35
37#include <stdarg.h> 36#include <errno.h>
38#include <string.h>
39#include <signal.h> 37#include <signal.h>
38#include <string.h>
40#include <unistd.h> 39#include <unistd.h>
40#include <stddef.h> /* for offsetof */
41 41
42#include <openssl/rand.h> 42#include <openssl/rand.h>
43#include <openssl/crypto.h> 43#include <openssl/crypto.h>
@@ -54,118 +54,128 @@
54/* 54/*
55 * Portable OpenSSH PRNG seeding: 55 * Portable OpenSSH PRNG seeding:
56 * If OpenSSL has not "internally seeded" itself (e.g. pulled data from 56 * If OpenSSL has not "internally seeded" itself (e.g. pulled data from
57 * /dev/random), then we execute a "ssh-rand-helper" program which 57 * /dev/random), then collect RANDOM_SEED_SIZE bytes of randomness from
58 * collects entropy and writes it to stdout. The child program must 58 * PRNGd.
59 * write at least RANDOM_SEED_SIZE bytes. The child is run with stderr
60 * attached, so error/debugging output should be visible.
61 *
62 * XXX: we should tell the child how many bytes we need.
63 */ 59 */
64
65#ifndef OPENSSL_PRNG_ONLY 60#ifndef OPENSSL_PRNG_ONLY
61
66#define RANDOM_SEED_SIZE 48 62#define RANDOM_SEED_SIZE 48
67static uid_t original_uid, original_euid;
68#endif
69 63
70void 64/*
71seed_rng(void) 65 * Collect 'len' bytes of entropy into 'buf' from PRNGD/EGD daemon
66 * listening either on 'tcp_port', or via Unix domain socket at *
67 * 'socket_path'.
68 * Either a non-zero tcp_port or a non-null socket_path must be
69 * supplied.
70 * Returns 0 on success, -1 on error
71 */
72int
73get_random_bytes_prngd(unsigned char *buf, int len,
74 unsigned short tcp_port, char *socket_path)
72{ 75{
73#ifndef OPENSSL_PRNG_ONLY 76 int fd, addr_len, rval, errors;
74 int devnull; 77 u_char msg[2];
75 int p[2]; 78 struct sockaddr_storage addr;
76 pid_t pid; 79 struct sockaddr_in *addr_in = (struct sockaddr_in *)&addr;
77 int ret; 80 struct sockaddr_un *addr_un = (struct sockaddr_un *)&addr;
78 unsigned char buf[RANDOM_SEED_SIZE]; 81 mysig_t old_sigpipe;
79 mysig_t old_sigchld; 82
83 /* Sanity checks */
84 if (socket_path == NULL && tcp_port == 0)
85 fatal("You must specify a port or a socket");
86 if (socket_path != NULL &&
87 strlen(socket_path) >= sizeof(addr_un->sun_path))
88 fatal("Random pool path is too long");
89 if (len <= 0 || len > 255)
90 fatal("Too many bytes (%d) to read from PRNGD", len);
91
92 memset(&addr, '\0', sizeof(addr));
93
94 if (tcp_port != 0) {
95 addr_in->sin_family = AF_INET;
96 addr_in->sin_addr.s_addr = htonl(INADDR_LOOPBACK);
97 addr_in->sin_port = htons(tcp_port);
98 addr_len = sizeof(*addr_in);
99 } else {
100 addr_un->sun_family = AF_UNIX;
101 strlcpy(addr_un->sun_path, socket_path,
102 sizeof(addr_un->sun_path));
103 addr_len = offsetof(struct sockaddr_un, sun_path) +
104 strlen(socket_path) + 1;
105 }
80 106
81 if (RAND_status() == 1) { 107 old_sigpipe = mysignal(SIGPIPE, SIG_IGN);
82 debug3("RNG is ready, skipping seeding"); 108
83 return; 109 errors = 0;
110 rval = -1;
111reopen:
112 fd = socket(addr.ss_family, SOCK_STREAM, 0);
113 if (fd == -1) {
114 error("Couldn't create socket: %s", strerror(errno));
115 goto done;
84 } 116 }
85 117
86 debug3("Seeding PRNG from %s", SSH_RAND_HELPER); 118 if (connect(fd, (struct sockaddr*)&addr, addr_len) == -1) {
87 119 if (tcp_port != 0) {
88 if ((devnull = open("/dev/null", O_RDWR)) == -1) 120 error("Couldn't connect to PRNGD port %d: %s",
89 fatal("Couldn't open /dev/null: %s", strerror(errno)); 121 tcp_port, strerror(errno));
90 if (pipe(p) == -1) 122 } else {
91 fatal("pipe: %s", strerror(errno)); 123 error("Couldn't connect to PRNGD socket \"%s\": %s",
92 124 addr_un->sun_path, strerror(errno));
93 old_sigchld = signal(SIGCHLD, SIG_DFL);
94 if ((pid = fork()) == -1)
95 fatal("Couldn't fork: %s", strerror(errno));
96 if (pid == 0) {
97 dup2(devnull, STDIN_FILENO);
98 dup2(p[1], STDOUT_FILENO);
99 /* Keep stderr open for errors */
100 close(p[0]);
101 close(p[1]);
102 close(devnull);
103
104 if (original_uid != original_euid &&
105 ( seteuid(getuid()) == -1 ||
106 setuid(original_uid) == -1) ) {
107 fprintf(stderr, "(rand child) setuid(%li): %s\n",
108 (long int)original_uid, strerror(errno));
109 _exit(1);
110 } 125 }
111 126 goto done;
112 execl(SSH_RAND_HELPER, "ssh-rand-helper", NULL);
113 fprintf(stderr, "(rand child) Couldn't exec '%s': %s\n",
114 SSH_RAND_HELPER, strerror(errno));
115 _exit(1);
116 } 127 }
117 128
118 close(devnull); 129 /* Send blocking read request to PRNGD */
119 close(p[1]); 130 msg[0] = 0x02;
131 msg[1] = len;
120 132
121 memset(buf, '\0', sizeof(buf)); 133 if (atomicio(vwrite, fd, msg, sizeof(msg)) != sizeof(msg)) {
122 ret = atomicio(read, p[0], buf, sizeof(buf)); 134 if (errno == EPIPE && errors < 10) {
123 if (ret == -1) 135 close(fd);
124 fatal("Couldn't read from ssh-rand-helper: %s", 136 errors++;
137 goto reopen;
138 }
139 error("Couldn't write to PRNGD socket: %s",
125 strerror(errno)); 140 strerror(errno));
126 if (ret != sizeof(buf)) 141 goto done;
127 fatal("ssh-rand-helper child produced insufficient data"); 142 }
128
129 close(p[0]);
130 143
131 if (waitpid(pid, &ret, 0) == -1) 144 if (atomicio(read, fd, buf, len) != (size_t)len) {
132 fatal("Couldn't wait for ssh-rand-helper completion: %s", 145 if (errno == EPIPE && errors < 10) {
146 close(fd);
147 errors++;
148 goto reopen;
149 }
150 error("Couldn't read from PRNGD socket: %s",
133 strerror(errno)); 151 strerror(errno));
134 signal(SIGCHLD, old_sigchld); 152 goto done;
135 153 }
136 /* We don't mind if the child exits upon a SIGPIPE */
137 if (!WIFEXITED(ret) &&
138 (!WIFSIGNALED(ret) || WTERMSIG(ret) != SIGPIPE))
139 fatal("ssh-rand-helper terminated abnormally");
140 if (WEXITSTATUS(ret) != 0)
141 fatal("ssh-rand-helper exit with exit status %d", ret);
142
143 RAND_add(buf, sizeof(buf), sizeof(buf));
144 memset(buf, '\0', sizeof(buf));
145 154
146#endif /* OPENSSL_PRNG_ONLY */ 155 rval = 0;
147 if (RAND_status() != 1) 156done:
148 fatal("PRNG is not seeded"); 157 mysignal(SIGPIPE, old_sigpipe);
158 if (fd != -1)
159 close(fd);
160 return rval;
149} 161}
150 162
151void 163static int
152init_rng(void) 164seed_from_prngd(unsigned char *buf, size_t bytes)
153{ 165{
154 /* 166#ifdef PRNGD_PORT
155 * OpenSSL version numbers: MNNFFPPS: major minor fix patch status 167 debug("trying egd/prngd port %d", PRNGD_PORT);
156 * We match major, minor, fix and status (not patch) 168 if (get_random_bytes_prngd(buf, bytes, PRNGD_PORT, NULL) == 0)
157 */ 169 return 0;
158 if ((SSLeay() ^ OPENSSL_VERSION_NUMBER) & ~0xff0L) 170#endif
159 fatal("OpenSSL version mismatch. Built against %lx, you " 171#ifdef PRNGD_SOCKET
160 "have %lx", (u_long)OPENSSL_VERSION_NUMBER, SSLeay()); 172 debug("trying egd/prngd socket %s", PRNGD_SOCKET);
161 173 if (get_random_bytes_prngd(buf, bytes, 0, PRNGD_SOCKET) == 0)
162#ifndef OPENSSL_PRNG_ONLY 174 return 0;
163 original_uid = getuid();
164 original_euid = geteuid();
165#endif 175#endif
176 return -1;
166} 177}
167 178
168#ifndef OPENSSL_PRNG_ONLY
169void 179void
170rexec_send_rng_seed(Buffer *m) 180rexec_send_rng_seed(Buffer *m)
171{ 181{
@@ -191,4 +201,34 @@ rexec_recv_rng_seed(Buffer *m)
191 RAND_add(buf, len, len); 201 RAND_add(buf, len, len);
192 } 202 }
193} 203}
204#endif /* OPENSSL_PRNG_ONLY */
205
206void
207seed_rng(void)
208{
209#ifndef OPENSSL_PRNG_ONLY
210 unsigned char buf[RANDOM_SEED_SIZE];
194#endif 211#endif
212 /*
213 * OpenSSL version numbers: MNNFFPPS: major minor fix patch status
214 * We match major, minor, fix and status (not patch)
215 */
216 if ((SSLeay() ^ OPENSSL_VERSION_NUMBER) & ~0xff0L)
217 fatal("OpenSSL version mismatch. Built against %lx, you "
218 "have %lx", (u_long)OPENSSL_VERSION_NUMBER, SSLeay());
219
220#ifndef OPENSSL_PRNG_ONLY
221 if (RAND_status() == 1) {
222 debug3("RNG is ready, skipping seeding");
223 return;
224 }
225
226 if (seed_from_prngd(buf, sizeof(buf)) == -1)
227 fatal("Could not obtain seed from PRNGd");
228 RAND_add(buf, sizeof(buf), sizeof(buf));
229 memset(buf, '\0', sizeof(buf));
230
231#endif /* OPENSSL_PRNG_ONLY */
232 if (RAND_status() != 1)
233 fatal("PRNG is not seeded");
234}
diff --git a/gss-serv.c b/gss-serv.c
index 365e48d88..380895ea5 100644
--- a/gss-serv.c
+++ b/gss-serv.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gss-serv.c,v 1.22 2008/05/08 12:02:23 djm Exp $ */ 1/* $OpenBSD: gss-serv.c,v 1.23 2011/08/01 19:18:15 markus Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved. 4 * Copyright (c) 2001-2009 Simon Wilkinson. All rights reserved.
@@ -266,6 +266,8 @@ ssh_gssapi_parse_ename(Gssctxt *ctx, gss_buffer_t ename, gss_buffer_t name)
266 name->length = get_u32(tok+offset); 266 name->length = get_u32(tok+offset);
267 offset += 4; 267 offset += 4;
268 268
269 if (UINT_MAX - offset < name->length)
270 return GSS_S_FAILURE;
269 if (ename->length < offset+name->length) 271 if (ename->length < offset+name->length)
270 return GSS_S_FAILURE; 272 return GSS_S_FAILURE;
271 273
diff --git a/key.c b/key.c
index d30dc5c3c..fc65c2948 100644
--- a/key.c
+++ b/key.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: key.c,v 1.96 2011/02/04 00:44:21 djm Exp $ */ 1/* $OpenBSD: key.c,v 1.97 2011/05/17 07:13:31 djm Exp $ */
2/* 2/*
3 * read_bignum(): 3 * read_bignum():
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1821,6 +1821,9 @@ key_to_certified(Key *k, int legacy)
1821 k->type = legacy ? KEY_DSA_CERT_V00 : KEY_DSA_CERT; 1821 k->type = legacy ? KEY_DSA_CERT_V00 : KEY_DSA_CERT;
1822 return 0; 1822 return 0;
1823 case KEY_ECDSA: 1823 case KEY_ECDSA:
1824 if (legacy)
1825 fatal("%s: legacy ECDSA certificates are not supported",
1826 __func__);
1824 k->cert = cert_new(); 1827 k->cert = cert_new();
1825 k->type = KEY_ECDSA_CERT; 1828 k->type = KEY_ECDSA_CERT;
1826 return 0; 1829 return 0;
diff --git a/log.c b/log.c
index d8a1f734e..201740893 100644
--- a/log.c
+++ b/log.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: log.c,v 1.41 2008/06/10 04:50:25 dtucker Exp $ */ 1/* $OpenBSD: log.c,v 1.42 2011/06/17 21:44:30 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -56,6 +56,8 @@ static LogLevel log_level = SYSLOG_LEVEL_INFO;
56static int log_on_stderr = 1; 56static int log_on_stderr = 1;
57static int log_facility = LOG_AUTH; 57static int log_facility = LOG_AUTH;
58static char *argv0; 58static char *argv0;
59static log_handler_fn *log_handler;
60static void *log_handler_ctx;
59 61
60extern char *__progname; 62extern char *__progname;
61 63
@@ -261,6 +263,9 @@ log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr)
261 exit(1); 263 exit(1);
262 } 264 }
263 265
266 log_handler = NULL;
267 log_handler_ctx = NULL;
268
264 log_on_stderr = on_stderr; 269 log_on_stderr = on_stderr;
265 if (on_stderr) 270 if (on_stderr)
266 return; 271 return;
@@ -328,6 +333,23 @@ log_init(char *av0, LogLevel level, SyslogFacility facility, int on_stderr)
328#define MSGBUFSIZ 1024 333#define MSGBUFSIZ 1024
329 334
330void 335void
336set_log_handler(log_handler_fn *handler, void *ctx)
337{
338 log_handler = handler;
339 log_handler_ctx = ctx;
340}
341
342void
343do_log2(LogLevel level, const char *fmt,...)
344{
345 va_list args;
346
347 va_start(args, fmt);
348 do_log(level, fmt, args);
349 va_end(args);
350}
351
352void
331do_log(LogLevel level, const char *fmt, va_list args) 353do_log(LogLevel level, const char *fmt, va_list args)
332{ 354{
333#if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT) 355#if defined(HAVE_OPENLOG_R) && defined(SYSLOG_DATA_INIT)
@@ -338,6 +360,7 @@ do_log(LogLevel level, const char *fmt, va_list args)
338 char *txt = NULL; 360 char *txt = NULL;
339 int pri = LOG_INFO; 361 int pri = LOG_INFO;
340 int saved_errno = errno; 362 int saved_errno = errno;
363 log_handler_fn *tmp_handler;
341 364
342 if (level > log_level) 365 if (level > log_level)
343 return; 366 return;
@@ -376,7 +399,7 @@ do_log(LogLevel level, const char *fmt, va_list args)
376 pri = LOG_ERR; 399 pri = LOG_ERR;
377 break; 400 break;
378 } 401 }
379 if (txt != NULL) { 402 if (txt != NULL && log_handler == NULL) {
380 snprintf(fmtbuf, sizeof(fmtbuf), "%s: %s", txt, fmt); 403 snprintf(fmtbuf, sizeof(fmtbuf), "%s: %s", txt, fmt);
381 vsnprintf(msgbuf, sizeof(msgbuf), fmtbuf, args); 404 vsnprintf(msgbuf, sizeof(msgbuf), fmtbuf, args);
382 } else { 405 } else {
@@ -384,7 +407,13 @@ do_log(LogLevel level, const char *fmt, va_list args)
384 } 407 }
385 strnvis(fmtbuf, msgbuf, sizeof(fmtbuf), 408 strnvis(fmtbuf, msgbuf, sizeof(fmtbuf),
386 log_on_stderr ? LOG_STDERR_VIS : LOG_SYSLOG_VIS); 409 log_on_stderr ? LOG_STDERR_VIS : LOG_SYSLOG_VIS);
387 if (log_on_stderr) { 410 if (log_handler != NULL) {
411 /* Avoid recursion */
412 tmp_handler = log_handler;
413 log_handler = NULL;
414 tmp_handler(level, fmtbuf, log_handler_ctx);
415 log_handler = tmp_handler;
416 } else if (log_on_stderr) {
388 snprintf(msgbuf, sizeof msgbuf, "%s\r\n", fmtbuf); 417 snprintf(msgbuf, sizeof msgbuf, "%s\r\n", fmtbuf);
389 write(STDERR_FILENO, msgbuf, strlen(msgbuf)); 418 write(STDERR_FILENO, msgbuf, strlen(msgbuf));
390 } else { 419 } else {
diff --git a/log.h b/log.h
index 650582791..1b8d2142b 100644
--- a/log.h
+++ b/log.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: log.h,v 1.17 2008/06/13 00:12:02 dtucker Exp $ */ 1/* $OpenBSD: log.h,v 1.18 2011/06/17 21:44:30 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -46,6 +46,8 @@ typedef enum {
46 SYSLOG_LEVEL_NOT_SET = -1 46 SYSLOG_LEVEL_NOT_SET = -1
47} LogLevel; 47} LogLevel;
48 48
49typedef void (log_handler_fn)(LogLevel, const char *, void *);
50
49void log_init(char *, LogLevel, SyslogFacility, int); 51void log_init(char *, LogLevel, SyslogFacility, int);
50 52
51SyslogFacility log_facility_number(char *); 53SyslogFacility log_facility_number(char *);
@@ -64,6 +66,10 @@ void debug(const char *, ...) __attribute__((format(printf, 1, 2)));
64void debug2(const char *, ...) __attribute__((format(printf, 1, 2))); 66void debug2(const char *, ...) __attribute__((format(printf, 1, 2)));
65void debug3(const char *, ...) __attribute__((format(printf, 1, 2))); 67void debug3(const char *, ...) __attribute__((format(printf, 1, 2)));
66 68
69
70void set_log_handler(log_handler_fn *, void *);
71void do_log2(LogLevel, const char *, ...)
72 __attribute__((format(printf, 2, 3)));
67void do_log(LogLevel, const char *, va_list); 73void do_log(LogLevel, const char *, va_list);
68void cleanup_exit(int) __attribute__((noreturn)); 74void cleanup_exit(int) __attribute__((noreturn));
69#endif 75#endif
diff --git a/mac.c b/mac.c
index fabc3ed66..eef50f48d 100644
--- a/mac.c
+++ b/mac.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: mac.c,v 1.15 2008/06/13 00:51:47 dtucker Exp $ */ 1/* $OpenBSD: mac.c,v 1.16 2011/08/02 01:22:11 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2001 Markus Friedl. All rights reserved. 3 * Copyright (c) 2001 Markus Friedl. All rights reserved.
4 * 4 *
@@ -57,6 +57,12 @@ struct {
57} macs[] = { 57} macs[] = {
58 { "hmac-sha1", SSH_EVP, EVP_sha1, 0, -1, -1 }, 58 { "hmac-sha1", SSH_EVP, EVP_sha1, 0, -1, -1 },
59 { "hmac-sha1-96", SSH_EVP, EVP_sha1, 96, -1, -1 }, 59 { "hmac-sha1-96", SSH_EVP, EVP_sha1, 96, -1, -1 },
60#ifdef HAVE_EVP_SHA256
61 { "hmac-sha2-256", SSH_EVP, EVP_sha256, 0, -1, -1 },
62 { "hmac-sha2-256-96", SSH_EVP, EVP_sha256, 96, -1, -1 },
63 { "hmac-sha2-512", SSH_EVP, EVP_sha512, 0, -1, -1 },
64 { "hmac-sha2-512-96", SSH_EVP, EVP_sha512, 96, -1, -1 },
65#endif
60 { "hmac-md5", SSH_EVP, EVP_md5, 0, -1, -1 }, 66 { "hmac-md5", SSH_EVP, EVP_md5, 0, -1, -1 },
61 { "hmac-md5-96", SSH_EVP, EVP_md5, 96, -1, -1 }, 67 { "hmac-md5-96", SSH_EVP, EVP_md5, 96, -1, -1 },
62 { "hmac-ripemd160", SSH_EVP, EVP_ripemd160, 0, -1, -1 }, 68 { "hmac-ripemd160", SSH_EVP, EVP_ripemd160, 0, -1, -1 },
diff --git a/misc.c b/misc.c
index ea614ce22..1814ae3af 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.c,v 1.84 2010/11/21 01:01:13 djm Exp $ */ 1/* $OpenBSD: misc.c,v 1.85 2011/03/29 18:54:17 stevesk Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved. 4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -1035,6 +1035,19 @@ parse_ipqos(const char *cp)
1035 return val; 1035 return val;
1036} 1036}
1037 1037
1038const char *
1039iptos2str(int iptos)
1040{
1041 int i;
1042 static char iptos_str[sizeof "0xff"];
1043
1044 for (i = 0; ipqos[i].name != NULL; i++) {
1045 if (ipqos[i].value == iptos)
1046 return ipqos[i].name;
1047 }
1048 snprintf(iptos_str, sizeof iptos_str, "0x%02x", iptos);
1049 return iptos_str;
1050}
1038void 1051void
1039sock_set_v6only(int s) 1052sock_set_v6only(int s)
1040{ 1053{
diff --git a/misc.h b/misc.h
index b8225eb90..904edc704 100644
--- a/misc.h
+++ b/misc.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.h,v 1.47 2010/11/21 01:01:13 djm Exp $ */ 1/* $OpenBSD: misc.h,v 1.48 2011/03/29 18:54:17 stevesk Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -89,6 +89,7 @@ void bandwidth_limit_init(struct bwlimit *, u_int64_t, size_t);
89void bandwidth_limit(struct bwlimit *, size_t); 89void bandwidth_limit(struct bwlimit *, size_t);
90 90
91int parse_ipqos(const char *); 91int parse_ipqos(const char *);
92const char *iptos2str(int);
92void mktemp_proto(char *, size_t); 93void mktemp_proto(char *, size_t);
93 94
94/* readpass.c */ 95/* readpass.c */
diff --git a/moduli.0 b/moduli.0
index ded094ff0..c529488b2 100644
--- a/moduli.0
+++ b/moduli.0
@@ -1,7 +1,7 @@
1MODULI(5) OpenBSD Programmer's Manual MODULI(5) 1MODULI(5) OpenBSD Programmer's Manual MODULI(5)
2 2
3NAME 3NAME
4 moduli - Diffie Hellman moduli 4 moduli - Diffie-Hellman moduli
5 5
6DESCRIPTION 6DESCRIPTION
7 The /etc/moduli file contains prime numbers and generators for use by 7 The /etc/moduli file contains prime numbers and generators for use by
@@ -10,12 +10,12 @@ DESCRIPTION
10 New moduli may be generated with ssh-keygen(1) using a two-step process. 10 New moduli may be generated with ssh-keygen(1) using a two-step process.
11 An initial candidate generation pass, using ssh-keygen -G, calculates 11 An initial candidate generation pass, using ssh-keygen -G, calculates
12 numbers that are likely to be useful. A second primality testing pass, 12 numbers that are likely to be useful. A second primality testing pass,
13 using ssh-keygen -T provides a high degree of assurance that the numbers 13 using ssh-keygen -T, provides a high degree of assurance that the numbers
14 are prime and are safe for use in Diffie Hellman operations by sshd(8). 14 are prime and are safe for use in Diffie-Hellman operations by sshd(8).
15 This moduli format is used as the output from each pass. 15 This moduli format is used as the output from each pass.
16 16
17 The file consists of newline-separated records, one per modulus, 17 The file consists of newline-separated records, one per modulus,
18 containing seven space separated fields. These fields are as follows: 18 containing seven space-separated fields. These fields are as follows:
19 19
20 timestamp The time that the modulus was last processed as 20 timestamp The time that the modulus was last processed as
21 YYYYMMDDHHMMSS. 21 YYYYMMDDHHMMSS.
@@ -23,12 +23,12 @@ DESCRIPTION
23 type Decimal number specifying the internal structure of 23 type Decimal number specifying the internal structure of
24 the prime modulus. Supported types are: 24 the prime modulus. Supported types are:
25 25
26 0 Unknown, not tested 26 0 Unknown, not tested.
27 2 "Safe" prime; (p-1)/2 is also prime. 27 2 "Safe" prime; (p-1)/2 is also prime.
28 4 Sophie Germain; (p+1)*2 is also prime. 28 4 Sophie Germain; (p+1)*2 is also prime.
29 29
30 Moduli candidates initially produced by ssh-keygen(1) 30 Moduli candidates initially produced by ssh-keygen(1)
31 are Sophie Germain primes (type 4). Futher primality 31 are Sophie Germain primes (type 4). Further primality
32 testing with ssh-keygen(1) produces safe prime moduli 32 testing with ssh-keygen(1) produces safe prime moduli
33 (type 2) that are ready for use in sshd(8). Other 33 (type 2) that are ready for use in sshd(8). Other
34 types are not used by OpenSSH. 34 types are not used by OpenSSH.
@@ -37,18 +37,18 @@ DESCRIPTION
37 that the number has been subjected to represented as a 37 that the number has been subjected to represented as a
38 bitmask of the following values: 38 bitmask of the following values:
39 39
40 0x00 Not tested 40 0x00 Not tested.
41 0x01 Composite number - not prime. 41 0x01 Composite number - not prime.
42 0x02 Sieve of Eratosthenes 42 0x02 Sieve of Eratosthenes.
43 0x04 Probabalistic Miller-Rabin primality tests. 43 0x04 Probabilistic Miller-Rabin primality tests.
44 44
45 The ssh-keygen(1) moduli candidate generation uses the 45 The ssh-keygen(1) moduli candidate generation uses the
46 Sieve of Eratosthenes (flag 0x02). Subsequent 46 Sieve of Eratosthenes (flag 0x02). Subsequent
47 ssh-keygen(1) primality tests are Miller-Rabin tests 47 ssh-keygen(1) primality tests are Miller-Rabin tests
48 (flag 0x04). 48 (flag 0x04).
49 49
50 trials Decimal number indicating of primaility trials that 50 trials Decimal number indicating the number of primality
51 have been performed on the modulus. 51 trials that have been performed on the modulus.
52 52
53 size Decimal number indicating the size of the prime in 53 size Decimal number indicating the size of the prime in
54 bits. 54 bits.
@@ -58,15 +58,15 @@ DESCRIPTION
58 58
59 modulus The modulus itself in hexadecimal. 59 modulus The modulus itself in hexadecimal.
60 60
61 When performing Diffie Hellman Group Exchange, sshd(8) first estimates 61 When performing Diffie-Hellman Group Exchange, sshd(8) first estimates
62 the size of the modulus required to produce enough Diffie Hellman output 62 the size of the modulus required to produce enough Diffie-Hellman output
63 to sufficiently key the selected symmetric cipher. sshd(8) then randomly 63 to sufficiently key the selected symmetric cipher. sshd(8) then randomly
64 selects a modulus from /etc/moduli that best meets the size requirement. 64 selects a modulus from /etc/moduli that best meets the size requirement.
65 65
66SEE ALSO 66SEE ALSO
67 ssh-keygen(1), sshd(8), 67 ssh-keygen(1), sshd(8)
68 68
69 Diffie-Hellman Group Exchange for the Secure Shell (SSH) Transport Layer 69 Diffie-Hellman Group Exchange for the Secure Shell (SSH) Transport Layer
70 Protocol, RFC 4419, 2006. 70 Protocol, RFC 4419, 2006.
71 71
72OpenBSD 4.9 June 26, 2008 OpenBSD 4.9 72OpenBSD 5.0 October 14, 2010 OpenBSD 5.0
diff --git a/moduli.5 b/moduli.5
index c64c08dfc..097abc109 100644
--- a/moduli.5
+++ b/moduli.5
@@ -1,4 +1,4 @@
1.\" $OpenBSD: moduli.5,v 1.12 2008/06/26 05:57:54 djm Exp $ 1.\" $OpenBSD: moduli.5,v 1.15 2010/10/14 20:41:28 jmc Exp $
2.\" 2.\"
3.\" Copyright (c) 2008 Damien Miller <djm@mindrot.org> 3.\" Copyright (c) 2008 Damien Miller <djm@mindrot.org>
4.\" 4.\"
@@ -13,16 +13,16 @@
13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 13.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF 14.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 15.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16.Dd $Mdocdate: June 26 2008 $ 16.Dd $Mdocdate: October 14 2010 $
17.Dt MODULI 5 17.Dt MODULI 5
18.Os 18.Os
19.Sh NAME 19.Sh NAME
20.Nm moduli 20.Nm moduli
21.Nd Diffie Hellman moduli 21.Nd Diffie-Hellman moduli
22.Sh DESCRIPTION 22.Sh DESCRIPTION
23The 23The
24.Pa /etc/ssh/moduli 24.Pa /etc/ssh/moduli
25file contains prime numbers and generators for use by 25file contains prime numbers and generators for use by
26.Xr sshd 8 26.Xr sshd 8
27in the Diffie-Hellman Group Exchange key exchange method. 27in the Diffie-Hellman Group Exchange key exchange method.
28.Pp 28.Pp
@@ -31,24 +31,23 @@ New moduli may be generated with
31using a two-step process. 31using a two-step process.
32An initial 32An initial
33.Em candidate generation 33.Em candidate generation
34pass, using 34pass, using
35.Ic ssh-keygen -G , 35.Ic ssh-keygen -G ,
36calculates numbers that are likely to be useful. 36calculates numbers that are likely to be useful.
37A second 37A second
38.Em primality testing 38.Em primality testing
39pass, using 39pass, using
40.Ic ssh-keygen -T 40.Ic ssh-keygen -T ,
41provides a high degree of assurance that the numbers are prime and are 41provides a high degree of assurance that the numbers are prime and are
42safe for use in Diffie Hellman operations by 42safe for use in Diffie-Hellman operations by
43.Xr sshd 8 . 43.Xr sshd 8 .
44This 44This
45.Nm 45.Nm
46format is used as the output from each pass. 46format is used as the output from each pass.
47.Pp 47.Pp
48The file consists of newline-separated records, one per modulus, 48The file consists of newline-separated records, one per modulus,
49containing seven space separated fields. 49containing seven space-separated fields.
50These fields are as follows: 50These fields are as follows:
51.Pp
52.Bl -tag -width Description -offset indent 51.Bl -tag -width Description -offset indent
53.It timestamp 52.It timestamp
54The time that the modulus was last processed as YYYYMMDDHHMMSS. 53The time that the modulus was last processed as YYYYMMDDHHMMSS.
@@ -58,7 +57,7 @@ Supported types are:
58.Pp 57.Pp
59.Bl -tag -width 0x00 -compact 58.Bl -tag -width 0x00 -compact
60.It 0 59.It 0
61Unknown, not tested 60Unknown, not tested.
62.It 2 61.It 2
63"Safe" prime; (p-1)/2 is also prime. 62"Safe" prime; (p-1)/2 is also prime.
64.It 4 63.It 4
@@ -68,7 +67,7 @@ Sophie Germain; (p+1)*2 is also prime.
68Moduli candidates initially produced by 67Moduli candidates initially produced by
69.Xr ssh-keygen 1 68.Xr ssh-keygen 1
70are Sophie Germain primes (type 4). 69are Sophie Germain primes (type 4).
71Futher primality testing with 70Further primality testing with
72.Xr ssh-keygen 1 71.Xr ssh-keygen 1
73produces safe prime moduli (type 2) that are ready for use in 72produces safe prime moduli (type 2) that are ready for use in
74.Xr sshd 8 . 73.Xr sshd 8 .
@@ -79,13 +78,13 @@ has been subjected to represented as a bitmask of the following values:
79.Pp 78.Pp
80.Bl -tag -width 0x00 -compact 79.Bl -tag -width 0x00 -compact
81.It 0x00 80.It 0x00
82Not tested 81Not tested.
83.It 0x01 82.It 0x01
84Composite number - not prime. 83Composite number \(en not prime.
85.It 0x02 84.It 0x02
86Sieve of Eratosthenes 85Sieve of Eratosthenes.
87.It 0x04 86.It 0x04
88Probabalistic Miller-Rabin primality tests. 87Probabilistic Miller-Rabin primality tests.
89.El 88.El
90.Pp 89.Pp
91The 90The
@@ -95,8 +94,8 @@ Subsequent
95.Xr ssh-keygen 1 94.Xr ssh-keygen 1
96primality tests are Miller-Rabin tests (flag 0x04). 95primality tests are Miller-Rabin tests (flag 0x04).
97.It trials 96.It trials
98Decimal number indicating of primaility trials that have been performed 97Decimal number indicating the number of primality trials
99on the modulus. 98that have been performed on the modulus.
100.It size 99.It size
101Decimal number indicating the size of the prime in bits. 100Decimal number indicating the size of the prime in bits.
102.It generator 101.It generator
@@ -105,18 +104,17 @@ The recommended generator for use with this modulus (hexadecimal).
105The modulus itself in hexadecimal. 104The modulus itself in hexadecimal.
106.El 105.El
107.Pp 106.Pp
108When performing Diffie Hellman Group Exchange, 107When performing Diffie-Hellman Group Exchange,
109.Xr sshd 8 108.Xr sshd 8
110first estimates the size of the modulus required to produce enough 109first estimates the size of the modulus required to produce enough
111Diffie Hellman output to sufficiently key the selected symmetric cipher. 110Diffie-Hellman output to sufficiently key the selected symmetric cipher.
112.Xr sshd 8 111.Xr sshd 8
113then randomly selects a modulus from 112then randomly selects a modulus from
114.Fa /etc/ssh/moduli 113.Fa /etc/ssh/moduli
115that best meets the size requirement. 114that best meets the size requirement.
116.Pp
117.Sh SEE ALSO 115.Sh SEE ALSO
118.Xr ssh-keygen 1 , 116.Xr ssh-keygen 1 ,
119.Xr sshd 8 , 117.Xr sshd 8
120.Rs 118.Rs
121.%R RFC 4419 119.%R RFC 4419
122.%T "Diffie-Hellman Group Exchange for the Secure Shell (SSH) Transport Layer Protocol" 120.%T "Diffie-Hellman Group Exchange for the Secure Shell (SSH) Transport Layer Protocol"
diff --git a/monitor.c b/monitor.c
index fa7fb0e25..985916b1e 100644
--- a/monitor.c
+++ b/monitor.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor.c,v 1.110 2010/09/09 10:45:45 djm Exp $ */ 1/* $OpenBSD: monitor.c,v 1.115 2011/06/23 23:35:42 djm Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -44,6 +44,13 @@
44#include <stdlib.h> 44#include <stdlib.h>
45#include <string.h> 45#include <string.h>
46#include <unistd.h> 46#include <unistd.h>
47#ifdef HAVE_POLL_H
48#include <poll.h>
49#else
50# ifdef HAVE_SYS_POLL_H
51# include <sys/poll.h>
52# endif
53#endif
47 54
48#ifdef SKEY 55#ifdef SKEY
49#include <skey.h> 56#include <skey.h>
@@ -52,6 +59,7 @@
52#include <openssl/dh.h> 59#include <openssl/dh.h>
53 60
54#include "openbsd-compat/sys-queue.h" 61#include "openbsd-compat/sys-queue.h"
62#include "atomicio.h"
55#include "xmalloc.h" 63#include "xmalloc.h"
56#include "ssh.h" 64#include "ssh.h"
57#include "key.h" 65#include "key.h"
@@ -182,6 +190,8 @@ int mm_answer_audit_event(int, Buffer *);
182int mm_answer_audit_command(int, Buffer *); 190int mm_answer_audit_command(int, Buffer *);
183#endif 191#endif
184 192
193static int monitor_read_log(struct monitor *);
194
185static Authctxt *authctxt; 195static Authctxt *authctxt;
186static BIGNUM *ssh1_challenge = NULL; /* used for ssh1 rsa auth */ 196static BIGNUM *ssh1_challenge = NULL; /* used for ssh1 rsa auth */
187 197
@@ -357,6 +367,10 @@ monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor)
357 367
358 debug3("preauth child monitor started"); 368 debug3("preauth child monitor started");
359 369
370 close(pmonitor->m_recvfd);
371 close(pmonitor->m_log_sendfd);
372 pmonitor->m_log_sendfd = pmonitor->m_recvfd = -1;
373
360 authctxt = _authctxt; 374 authctxt = _authctxt;
361 memset(authctxt, 0, sizeof(*authctxt)); 375 memset(authctxt, 0, sizeof(*authctxt));
362 376
@@ -420,6 +434,10 @@ monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor)
420#endif 434#endif
421 } 435 }
422 436
437 /* Drain any buffered messages from the child */
438 while (pmonitor->m_log_recvfd != -1 && monitor_read_log(pmonitor) == 0)
439 ;
440
423 if (!authctxt->valid) 441 if (!authctxt->valid)
424 fatal("%s: authenticated invalid user", __func__); 442 fatal("%s: authenticated invalid user", __func__);
425 if (strcmp(auth_method, "unknown") == 0) 443 if (strcmp(auth_method, "unknown") == 0)
@@ -429,6 +447,10 @@ monitor_child_preauth(Authctxt *_authctxt, struct monitor *pmonitor)
429 __func__, authctxt->user); 447 __func__, authctxt->user);
430 448
431 mm_get_keystate(pmonitor); 449 mm_get_keystate(pmonitor);
450
451 close(pmonitor->m_sendfd);
452 close(pmonitor->m_log_recvfd);
453 pmonitor->m_sendfd = pmonitor->m_log_recvfd = -1;
432} 454}
433 455
434static void 456static void
@@ -446,6 +468,9 @@ monitor_child_handler(int sig)
446void 468void
447monitor_child_postauth(struct monitor *pmonitor) 469monitor_child_postauth(struct monitor *pmonitor)
448{ 470{
471 close(pmonitor->m_recvfd);
472 pmonitor->m_recvfd = -1;
473
449 monitor_set_child_handler(pmonitor->m_pid); 474 monitor_set_child_handler(pmonitor->m_pid);
450 signal(SIGHUP, &monitor_child_handler); 475 signal(SIGHUP, &monitor_child_handler);
451 signal(SIGTERM, &monitor_child_handler); 476 signal(SIGTERM, &monitor_child_handler);
@@ -473,6 +498,9 @@ monitor_child_postauth(struct monitor *pmonitor)
473 498
474 for (;;) 499 for (;;)
475 monitor_read(pmonitor, mon_dispatch, NULL); 500 monitor_read(pmonitor, mon_dispatch, NULL);
501
502 close(pmonitor->m_sendfd);
503 pmonitor->m_sendfd = -1;
476} 504}
477 505
478void 506void
@@ -484,6 +512,52 @@ monitor_sync(struct monitor *pmonitor)
484 } 512 }
485} 513}
486 514
515static int
516monitor_read_log(struct monitor *pmonitor)
517{
518 Buffer logmsg;
519 u_int len, level;
520 char *msg;
521
522 buffer_init(&logmsg);
523
524 /* Read length */
525 buffer_append_space(&logmsg, 4);
526 if (atomicio(read, pmonitor->m_log_recvfd,
527 buffer_ptr(&logmsg), buffer_len(&logmsg)) != buffer_len(&logmsg)) {
528 if (errno == EPIPE) {
529 debug("%s: child log fd closed", __func__);
530 close(pmonitor->m_log_recvfd);
531 pmonitor->m_log_recvfd = -1;
532 return -1;
533 }
534 fatal("%s: log fd read: %s", __func__, strerror(errno));
535 }
536 len = buffer_get_int(&logmsg);
537 if (len <= 4 || len > 8192)
538 fatal("%s: invalid log message length %u", __func__, len);
539
540 /* Read severity, message */
541 buffer_clear(&logmsg);
542 buffer_append_space(&logmsg, len);
543 if (atomicio(read, pmonitor->m_log_recvfd,
544 buffer_ptr(&logmsg), buffer_len(&logmsg)) != buffer_len(&logmsg))
545 fatal("%s: log fd read: %s", __func__, strerror(errno));
546
547 /* Log it */
548 level = buffer_get_int(&logmsg);
549 msg = buffer_get_string(&logmsg, NULL);
550 if (log_level_name(level) == NULL)
551 fatal("%s: invalid log level %u (corrupted message?)",
552 __func__, level);
553 do_log2(level, "%s [preauth]", msg);
554
555 buffer_free(&logmsg);
556 xfree(msg);
557
558 return 0;
559}
560
487int 561int
488monitor_read(struct monitor *pmonitor, struct mon_table *ent, 562monitor_read(struct monitor *pmonitor, struct mon_table *ent,
489 struct mon_table **pent) 563 struct mon_table **pent)
@@ -491,6 +565,30 @@ monitor_read(struct monitor *pmonitor, struct mon_table *ent,
491 Buffer m; 565 Buffer m;
492 int ret; 566 int ret;
493 u_char type; 567 u_char type;
568 struct pollfd pfd[2];
569
570 for (;;) {
571 bzero(&pfd, sizeof(pfd));
572 pfd[0].fd = pmonitor->m_sendfd;
573 pfd[0].events = POLLIN;
574 pfd[1].fd = pmonitor->m_log_recvfd;
575 pfd[1].events = pfd[1].fd == -1 ? 0 : POLLIN;
576 if (poll(pfd, pfd[1].fd == -1 ? 1 : 2, -1) == -1) {
577 if (errno == EINTR || errno == EAGAIN)
578 continue;
579 fatal("%s: poll: %s", __func__, strerror(errno));
580 }
581 if (pfd[1].revents) {
582 /*
583 * Drain all log messages before processing next
584 * monitor request.
585 */
586 monitor_read_log(pmonitor);
587 continue;
588 }
589 if (pfd[0].revents)
590 break; /* Continues below */
591 }
494 592
495 buffer_init(&m); 593 buffer_init(&m);
496 594
@@ -651,6 +749,7 @@ mm_answer_pwnamallow(int sock, Buffer *m)
651 char *username; 749 char *username;
652 struct passwd *pwent; 750 struct passwd *pwent;
653 int allowed = 0; 751 int allowed = 0;
752 u_int i;
654 753
655 debug3("%s", __func__); 754 debug3("%s", __func__);
656 755
@@ -690,8 +789,20 @@ mm_answer_pwnamallow(int sock, Buffer *m)
690 789
691 out: 790 out:
692 buffer_put_string(m, &options, sizeof(options)); 791 buffer_put_string(m, &options, sizeof(options));
693 if (options.banner != NULL) 792
694 buffer_put_cstring(m, options.banner); 793#define M_CP_STROPT(x) do { \
794 if (options.x != NULL) \
795 buffer_put_cstring(m, options.x); \
796 } while (0)
797#define M_CP_STRARRAYOPT(x, nx) do { \
798 for (i = 0; i < options.nx; i++) \
799 buffer_put_cstring(m, options.x[i]); \
800 } while (0)
801 /* See comment in servconf.h */
802 COPY_MATCH_STRING_OPTS();
803#undef M_CP_STROPT
804#undef M_CP_STRARRAYOPT
805
695 debug3("%s: sending MONITOR_ANS_PWNAM: %d", __func__, allowed); 806 debug3("%s: sending MONITOR_ANS_PWNAM: %d", __func__, allowed);
696 mm_request_send(sock, MONITOR_ANS_PWNAM, m); 807 mm_request_send(sock, MONITOR_ANS_PWNAM, m);
697 808
@@ -704,7 +815,6 @@ mm_answer_pwnamallow(int sock, Buffer *m)
704 monitor_permit(mon_dispatch, MONITOR_REQ_AUTHROLE, 1); 815 monitor_permit(mon_dispatch, MONITOR_REQ_AUTHROLE, 1);
705 monitor_permit(mon_dispatch, MONITOR_REQ_AUTH2_READ_BANNER, 1); 816 monitor_permit(mon_dispatch, MONITOR_REQ_AUTH2_READ_BANNER, 1);
706 } 817 }
707
708#ifdef USE_PAM 818#ifdef USE_PAM
709 if (options.use_pam) 819 if (options.use_pam)
710 monitor_permit(mon_dispatch, MONITOR_REQ_PAM_START, 1); 820 monitor_permit(mon_dispatch, MONITOR_REQ_PAM_START, 1);
@@ -1884,22 +1994,31 @@ mm_init_compression(struct mm_master *mm)
1884/* XXX */ 1994/* XXX */
1885 1995
1886#define FD_CLOSEONEXEC(x) do { \ 1996#define FD_CLOSEONEXEC(x) do { \
1887 if (fcntl(x, F_SETFD, 1) == -1) \ 1997 if (fcntl(x, F_SETFD, FD_CLOEXEC) == -1) \
1888 fatal("fcntl(%d, F_SETFD)", x); \ 1998 fatal("fcntl(%d, F_SETFD)", x); \
1889} while (0) 1999} while (0)
1890 2000
1891static void 2001static void
1892monitor_socketpair(int *pair) 2002monitor_openfds(struct monitor *mon, int do_logfds)
1893{ 2003{
1894#ifdef HAVE_SOCKETPAIR 2004 int pair[2];
2005
1895 if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1) 2006 if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair) == -1)
1896 fatal("%s: socketpair", __func__); 2007 fatal("%s: socketpair: %s", __func__, strerror(errno));
1897#else
1898 fatal("%s: UsePrivilegeSeparation=yes not supported",
1899 __func__);
1900#endif
1901 FD_CLOSEONEXEC(pair[0]); 2008 FD_CLOSEONEXEC(pair[0]);
1902 FD_CLOSEONEXEC(pair[1]); 2009 FD_CLOSEONEXEC(pair[1]);
2010 mon->m_recvfd = pair[0];
2011 mon->m_sendfd = pair[1];
2012
2013 if (do_logfds) {
2014 if (pipe(pair) == -1)
2015 fatal("%s: pipe: %s", __func__, strerror(errno));
2016 FD_CLOSEONEXEC(pair[0]);
2017 FD_CLOSEONEXEC(pair[1]);
2018 mon->m_log_recvfd = pair[0];
2019 mon->m_log_sendfd = pair[1];
2020 } else
2021 mon->m_log_recvfd = mon->m_log_sendfd = -1;
1903} 2022}
1904 2023
1905#define MM_MEMSIZE 65536 2024#define MM_MEMSIZE 65536
@@ -1908,14 +2027,10 @@ struct monitor *
1908monitor_init(void) 2027monitor_init(void)
1909{ 2028{
1910 struct monitor *mon; 2029 struct monitor *mon;
1911 int pair[2];
1912 2030
1913 mon = xcalloc(1, sizeof(*mon)); 2031 mon = xcalloc(1, sizeof(*mon));
1914 2032
1915 monitor_socketpair(pair); 2033 monitor_openfds(mon, 1);
1916
1917 mon->m_recvfd = pair[0];
1918 mon->m_sendfd = pair[1];
1919 2034
1920 /* Used to share zlib space across processes */ 2035 /* Used to share zlib space across processes */
1921 if (options.compression) { 2036 if (options.compression) {
@@ -1932,12 +2047,7 @@ monitor_init(void)
1932void 2047void
1933monitor_reinit(struct monitor *mon) 2048monitor_reinit(struct monitor *mon)
1934{ 2049{
1935 int pair[2]; 2050 monitor_openfds(mon, 0);
1936
1937 monitor_socketpair(pair);
1938
1939 mon->m_recvfd = pair[0];
1940 mon->m_sendfd = pair[1];
1941} 2051}
1942 2052
1943#ifdef GSSAPI 2053#ifdef GSSAPI
diff --git a/monitor.h b/monitor.h
index 5cebb356b..42887ebd1 100644
--- a/monitor.h
+++ b/monitor.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor.h,v 1.15 2008/11/04 08:22:13 djm Exp $ */ 1/* $OpenBSD: monitor.h,v 1.16 2011/06/17 21:44:31 djm Exp $ */
2 2
3/* 3/*
4 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 4 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
@@ -74,6 +74,8 @@ struct mm_master;
74struct monitor { 74struct monitor {
75 int m_recvfd; 75 int m_recvfd;
76 int m_sendfd; 76 int m_sendfd;
77 int m_log_recvfd;
78 int m_log_sendfd;
77 struct mm_master *m_zback; 79 struct mm_master *m_zback;
78 struct mm_master *m_zlib; 80 struct mm_master *m_zlib;
79 struct Kex **m_pkex; 81 struct Kex **m_pkex;
diff --git a/monitor_wrap.c b/monitor_wrap.c
index d69e4cce7..f46be660d 100644
--- a/monitor_wrap.c
+++ b/monitor_wrap.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor_wrap.c,v 1.70 2010/08/31 11:54:45 djm Exp $ */ 1/* $OpenBSD: monitor_wrap.c,v 1.73 2011/06/17 21:44:31 djm Exp $ */
2/* 2/*
3 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 3 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
4 * Copyright 2002 Markus Friedl <markus@openbsd.org> 4 * Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -88,6 +88,32 @@ extern struct monitor *pmonitor;
88extern Buffer loginmsg; 88extern Buffer loginmsg;
89extern ServerOptions options; 89extern ServerOptions options;
90 90
91void
92mm_log_handler(LogLevel level, const char *msg, void *ctx)
93{
94 Buffer log_msg;
95 struct monitor *mon = (struct monitor *)ctx;
96
97 if (mon->m_log_sendfd == -1)
98 fatal("%s: no log channel", __func__);
99
100 buffer_init(&log_msg);
101 /*
102 * Placeholder for packet length. Will be filled in with the actual
103 * packet length once the packet has been constucted. This saves
104 * fragile math.
105 */
106 buffer_put_int(&log_msg, 0);
107
108 buffer_put_int(&log_msg, level);
109 buffer_put_cstring(&log_msg, msg);
110 put_u32(buffer_ptr(&log_msg), buffer_len(&log_msg) - 4);
111 if (atomicio(vwrite, mon->m_log_sendfd, buffer_ptr(&log_msg),
112 buffer_len(&log_msg)) != buffer_len(&log_msg))
113 fatal("%s: write: %s", __func__, strerror(errno));
114 buffer_free(&log_msg);
115}
116
91int 117int
92mm_is_monitor(void) 118mm_is_monitor(void)
93{ 119{
@@ -211,7 +237,7 @@ mm_getpwnamallow(const char *username)
211{ 237{
212 Buffer m; 238 Buffer m;
213 struct passwd *pw; 239 struct passwd *pw;
214 u_int len; 240 u_int len, i;
215 ServerOptions *newopts; 241 ServerOptions *newopts;
216 242
217 debug3("%s entering", __func__); 243 debug3("%s entering", __func__);
@@ -245,8 +271,20 @@ out:
245 newopts = buffer_get_string(&m, &len); 271 newopts = buffer_get_string(&m, &len);
246 if (len != sizeof(*newopts)) 272 if (len != sizeof(*newopts))
247 fatal("%s: option block size mismatch", __func__); 273 fatal("%s: option block size mismatch", __func__);
248 if (newopts->banner != NULL) 274
249 newopts->banner = buffer_get_string(&m, NULL); 275#define M_CP_STROPT(x) do { \
276 if (newopts->x != NULL) \
277 newopts->x = buffer_get_string(&m, NULL); \
278 } while (0)
279#define M_CP_STRARRAYOPT(x, nx) do { \
280 for (i = 0; i < newopts->nx; i++) \
281 newopts->x[i] = buffer_get_string(&m, NULL); \
282 } while (0)
283 /* See comment in servconf.h */
284 COPY_MATCH_STRING_OPTS();
285#undef M_CP_STROPT
286#undef M_CP_STRARRAYOPT
287
250 copy_set_server_options(&options, newopts, 1); 288 copy_set_server_options(&options, newopts, 1);
251 xfree(newopts); 289 xfree(newopts);
252 290
diff --git a/monitor_wrap.h b/monitor_wrap.h
index d2dad84aa..4d12e2956 100644
--- a/monitor_wrap.h
+++ b/monitor_wrap.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: monitor_wrap.h,v 1.22 2009/03/05 07:18:19 djm Exp $ */ 1/* $OpenBSD: monitor_wrap.h,v 1.23 2011/06/17 21:44:31 djm Exp $ */
2 2
3/* 3/*
4 * Copyright 2002 Niels Provos <provos@citi.umich.edu> 4 * Copyright 2002 Niels Provos <provos@citi.umich.edu>
@@ -37,6 +37,7 @@ struct monitor;
37struct mm_master; 37struct mm_master;
38struct Authctxt; 38struct Authctxt;
39 39
40void mm_log_handler(LogLevel, const char *, void *);
40int mm_is_monitor(void); 41int mm_is_monitor(void);
41DH *mm_choose_dh(int, int, int); 42DH *mm_choose_dh(int, int, int);
42int mm_key_sign(Key *, u_char **, u_int *, u_char *, u_int); 43int mm_key_sign(Key *, u_char **, u_int *, u_char *, u_int);
diff --git a/mux.c b/mux.c
index e370462db..add0e26b1 100644
--- a/mux.c
+++ b/mux.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: mux.c,v 1.24 2011/01/13 21:54:53 djm Exp $ */ 1/* $OpenBSD: mux.c,v 1.29 2011/06/22 22:08:42 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org> 3 * Copyright (c) 2002-2008 Damien Miller <djm@openbsd.org>
4 * 4 *
@@ -87,7 +87,6 @@
87 87
88/* from ssh.c */ 88/* from ssh.c */
89extern int tty_flag; 89extern int tty_flag;
90extern int force_tty_flag;
91extern Options options; 90extern Options options;
92extern int stdin_null_flag; 91extern int stdin_null_flag;
93extern char *host; 92extern char *host;
@@ -146,6 +145,7 @@ struct mux_master_state {
146#define MUX_C_OPEN_FWD 0x10000006 145#define MUX_C_OPEN_FWD 0x10000006
147#define MUX_C_CLOSE_FWD 0x10000007 146#define MUX_C_CLOSE_FWD 0x10000007
148#define MUX_C_NEW_STDIO_FWD 0x10000008 147#define MUX_C_NEW_STDIO_FWD 0x10000008
148#define MUX_C_STOP_LISTENING 0x10000009
149#define MUX_S_OK 0x80000001 149#define MUX_S_OK 0x80000001
150#define MUX_S_PERMISSION_DENIED 0x80000002 150#define MUX_S_PERMISSION_DENIED 0x80000002
151#define MUX_S_FAILURE 0x80000003 151#define MUX_S_FAILURE 0x80000003
@@ -153,6 +153,7 @@ struct mux_master_state {
153#define MUX_S_ALIVE 0x80000005 153#define MUX_S_ALIVE 0x80000005
154#define MUX_S_SESSION_OPENED 0x80000006 154#define MUX_S_SESSION_OPENED 0x80000006
155#define MUX_S_REMOTE_PORT 0x80000007 155#define MUX_S_REMOTE_PORT 0x80000007
156#define MUX_S_TTY_ALLOC_FAIL 0x80000008
156 157
157/* type codes for MUX_C_OPEN_FWD and MUX_C_CLOSE_FWD */ 158/* type codes for MUX_C_OPEN_FWD and MUX_C_CLOSE_FWD */
158#define MUX_FWD_LOCAL 1 159#define MUX_FWD_LOCAL 1
@@ -168,6 +169,7 @@ static int process_mux_terminate(u_int, Channel *, Buffer *, Buffer *);
168static int process_mux_open_fwd(u_int, Channel *, Buffer *, Buffer *); 169static int process_mux_open_fwd(u_int, Channel *, Buffer *, Buffer *);
169static int process_mux_close_fwd(u_int, Channel *, Buffer *, Buffer *); 170static int process_mux_close_fwd(u_int, Channel *, Buffer *, Buffer *);
170static int process_mux_stdio_fwd(u_int, Channel *, Buffer *, Buffer *); 171static int process_mux_stdio_fwd(u_int, Channel *, Buffer *, Buffer *);
172static int process_mux_stop_listening(u_int, Channel *, Buffer *, Buffer *);
171 173
172static const struct { 174static const struct {
173 u_int type; 175 u_int type;
@@ -180,6 +182,7 @@ static const struct {
180 { MUX_C_OPEN_FWD, process_mux_open_fwd }, 182 { MUX_C_OPEN_FWD, process_mux_open_fwd },
181 { MUX_C_CLOSE_FWD, process_mux_close_fwd }, 183 { MUX_C_CLOSE_FWD, process_mux_close_fwd },
182 { MUX_C_NEW_STDIO_FWD, process_mux_stdio_fwd }, 184 { MUX_C_NEW_STDIO_FWD, process_mux_stdio_fwd },
185 { MUX_C_STOP_LISTENING, process_mux_stop_listening },
183 { 0, NULL } 186 { 0, NULL }
184}; 187};
185 188
@@ -915,6 +918,39 @@ process_mux_stdio_fwd(u_int rid, Channel *c, Buffer *m, Buffer *r)
915 return 0; 918 return 0;
916} 919}
917 920
921static int
922process_mux_stop_listening(u_int rid, Channel *c, Buffer *m, Buffer *r)
923{
924 debug("%s: channel %d: stop listening", __func__, c->self);
925
926 if (options.control_master == SSHCTL_MASTER_ASK ||
927 options.control_master == SSHCTL_MASTER_AUTO_ASK) {
928 if (!ask_permission("Disable further multiplexing on shared "
929 "connection to %s? ", host)) {
930 debug2("%s: stop listen refused by user", __func__);
931 buffer_put_int(r, MUX_S_PERMISSION_DENIED);
932 buffer_put_int(r, rid);
933 buffer_put_cstring(r, "Permission denied");
934 return 0;
935 }
936 }
937
938 if (mux_listener_channel != NULL) {
939 channel_free(mux_listener_channel);
940 client_stop_mux();
941 xfree(options.control_path);
942 options.control_path = NULL;
943 mux_listener_channel = NULL;
944 muxserver_sock = -1;
945 }
946
947 /* prepare reply */
948 buffer_put_int(r, MUX_S_OK);
949 buffer_put_int(r, rid);
950
951 return 0;
952}
953
918/* Channel callbacks fired on read/write from mux slave fd */ 954/* Channel callbacks fired on read/write from mux slave fd */
919static int 955static int
920mux_master_read_cb(Channel *c) 956mux_master_read_cb(Channel *c)
@@ -1019,6 +1055,27 @@ mux_exit_message(Channel *c, int exitval)
1019 buffer_free(&m); 1055 buffer_free(&m);
1020} 1056}
1021 1057
1058void
1059mux_tty_alloc_failed(Channel *c)
1060{
1061 Buffer m;
1062 Channel *mux_chan;
1063
1064 debug3("%s: channel %d: TTY alloc failed", __func__, c->self);
1065
1066 if ((mux_chan = channel_by_id(c->ctl_chan)) == NULL)
1067 fatal("%s: channel %d missing mux channel %d",
1068 __func__, c->self, c->ctl_chan);
1069
1070 /* Append exit message packet to control socket output queue */
1071 buffer_init(&m);
1072 buffer_put_int(&m, MUX_S_TTY_ALLOC_FAIL);
1073 buffer_put_int(&m, c->self);
1074
1075 buffer_put_string(&mux_chan->output, buffer_ptr(&m), buffer_len(&m));
1076 buffer_free(&m);
1077}
1078
1022/* Prepare a mux master to listen on a Unix domain socket. */ 1079/* Prepare a mux master to listen on a Unix domain socket. */
1023void 1080void
1024muxserver_listen(void) 1081muxserver_listen(void)
@@ -1059,21 +1116,25 @@ muxserver_listen(void)
1059 strlen(options.control_path) + 1; 1116 strlen(options.control_path) + 1;
1060 1117
1061 if (strlcpy(addr.sun_path, options.control_path, 1118 if (strlcpy(addr.sun_path, options.control_path,
1062 sizeof(addr.sun_path)) >= sizeof(addr.sun_path)) 1119 sizeof(addr.sun_path)) >= sizeof(addr.sun_path)) {
1063 fatal("ControlPath too long"); 1120 error("ControlPath \"%s\" too long for Unix domain socket",
1121 options.control_path);
1122 goto disable_mux_master;
1123 }
1064 1124
1065 if ((muxserver_sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0) 1125 if ((muxserver_sock = socket(PF_UNIX, SOCK_STREAM, 0)) < 0)
1066 fatal("%s socket(): %s", __func__, strerror(errno)); 1126 fatal("%s socket(): %s", __func__, strerror(errno));
1067 1127
1068 old_umask = umask(0177); 1128 old_umask = umask(0177);
1069 if (bind(muxserver_sock, (struct sockaddr *)&addr, sun_len) == -1) { 1129 if (bind(muxserver_sock, (struct sockaddr *)&addr, sun_len) == -1) {
1070 muxserver_sock = -1;
1071 if (errno == EINVAL || errno == EADDRINUSE) { 1130 if (errno == EINVAL || errno == EADDRINUSE) {
1072 error("ControlSocket %s already exists, " 1131 error("ControlSocket %s already exists, "
1073 "disabling multiplexing", options.control_path); 1132 "disabling multiplexing", options.control_path);
1074 disable_mux_master: 1133 disable_mux_master:
1075 close(muxserver_sock); 1134 if (muxserver_sock != -1) {
1076 muxserver_sock = -1; 1135 close(muxserver_sock);
1136 muxserver_sock = -1;
1137 }
1077 xfree(options.control_path); 1138 xfree(options.control_path);
1078 options.control_path = NULL; 1139 options.control_path = NULL;
1079 options.control_master = SSHCTL_MASTER_NO; 1140 options.control_master = SSHCTL_MASTER_NO;
@@ -1153,8 +1214,10 @@ mux_session_confirm(int id, int success, void *arg)
1153 /* Request forwarding with authentication spoofing. */ 1214 /* Request forwarding with authentication spoofing. */
1154 debug("Requesting X11 forwarding with authentication " 1215 debug("Requesting X11 forwarding with authentication "
1155 "spoofing."); 1216 "spoofing.");
1156 x11_request_forwarding_with_spoofing(id, display, proto, data); 1217 x11_request_forwarding_with_spoofing(id, display, proto,
1157 /* XXX wait for reply */ 1218 data, 1);
1219 client_expect_confirm(id, "X11 forwarding", CONFIRM_WARN);
1220 /* XXX exit_on_forward_failure */
1158 } 1221 }
1159 1222
1160 if (cctx->want_agent_fwd && options.forward_agent) { 1223 if (cctx->want_agent_fwd && options.forward_agent) {
@@ -1573,7 +1636,7 @@ mux_client_request_session(int fd)
1573 char *e, *term; 1636 char *e, *term;
1574 u_int i, rid, sid, esid, exitval, type, exitval_seen; 1637 u_int i, rid, sid, esid, exitval, type, exitval_seen;
1575 extern char **environ; 1638 extern char **environ;
1576 int devnull; 1639 int devnull, rawmode;
1577 1640
1578 debug3("%s: entering", __func__); 1641 debug3("%s: entering", __func__);
1579 1642
@@ -1669,8 +1732,9 @@ mux_client_request_session(int fd)
1669 signal(SIGTERM, control_client_sighandler); 1732 signal(SIGTERM, control_client_sighandler);
1670 signal(SIGWINCH, control_client_sigrelay); 1733 signal(SIGWINCH, control_client_sigrelay);
1671 1734
1735 rawmode = tty_flag;
1672 if (tty_flag) 1736 if (tty_flag)
1673 enter_raw_mode(force_tty_flag); 1737 enter_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
1674 1738
1675 /* 1739 /*
1676 * Stick around until the controlee closes the client_fd. 1740 * Stick around until the controlee closes the client_fd.
@@ -1684,22 +1748,35 @@ mux_client_request_session(int fd)
1684 if (mux_client_read_packet(fd, &m) != 0) 1748 if (mux_client_read_packet(fd, &m) != 0)
1685 break; 1749 break;
1686 type = buffer_get_int(&m); 1750 type = buffer_get_int(&m);
1687 if (type != MUX_S_EXIT_MESSAGE) { 1751 switch (type) {
1752 case MUX_S_TTY_ALLOC_FAIL:
1753 if ((esid = buffer_get_int(&m)) != sid)
1754 fatal("%s: tty alloc fail on unknown session: "
1755 "my id %u theirs %u",
1756 __func__, sid, esid);
1757 leave_raw_mode(options.request_tty ==
1758 REQUEST_TTY_FORCE);
1759 rawmode = 0;
1760 continue;
1761 case MUX_S_EXIT_MESSAGE:
1762 if ((esid = buffer_get_int(&m)) != sid)
1763 fatal("%s: exit on unknown session: "
1764 "my id %u theirs %u",
1765 __func__, sid, esid);
1766 if (exitval_seen)
1767 fatal("%s: exitval sent twice", __func__);
1768 exitval = buffer_get_int(&m);
1769 exitval_seen = 1;
1770 continue;
1771 default:
1688 e = buffer_get_string(&m, NULL); 1772 e = buffer_get_string(&m, NULL);
1689 fatal("%s: master returned error: %s", __func__, e); 1773 fatal("%s: master returned error: %s", __func__, e);
1690 } 1774 }
1691 if ((esid = buffer_get_int(&m)) != sid)
1692 fatal("%s: exit on unknown session: my id %u theirs %u",
1693 __func__, sid, esid);
1694 debug("%s: master session id: %u", __func__, sid);
1695 if (exitval_seen)
1696 fatal("%s: exitval sent twice", __func__);
1697 exitval = buffer_get_int(&m);
1698 exitval_seen = 1;
1699 } 1775 }
1700 1776
1701 close(fd); 1777 close(fd);
1702 leave_raw_mode(force_tty_flag); 1778 if (rawmode)
1779 leave_raw_mode(options.request_tty == REQUEST_TTY_FORCE);
1703 1780
1704 if (muxclient_terminate) { 1781 if (muxclient_terminate) {
1705 debug2("Exiting on signal %d", muxclient_terminate); 1782 debug2("Exiting on signal %d", muxclient_terminate);
@@ -1813,6 +1890,50 @@ mux_client_request_stdio_fwd(int fd)
1813 fatal("%s: master returned unexpected message %u", __func__, type); 1890 fatal("%s: master returned unexpected message %u", __func__, type);
1814} 1891}
1815 1892
1893static void
1894mux_client_request_stop_listening(int fd)
1895{
1896 Buffer m;
1897 char *e;
1898 u_int type, rid;
1899
1900 debug3("%s: entering", __func__);
1901
1902 buffer_init(&m);
1903 buffer_put_int(&m, MUX_C_STOP_LISTENING);
1904 buffer_put_int(&m, muxclient_request_id);
1905
1906 if (mux_client_write_packet(fd, &m) != 0)
1907 fatal("%s: write packet: %s", __func__, strerror(errno));
1908
1909 buffer_clear(&m);
1910
1911 /* Read their reply */
1912 if (mux_client_read_packet(fd, &m) != 0)
1913 fatal("%s: read from master failed: %s",
1914 __func__, strerror(errno));
1915
1916 type = buffer_get_int(&m);
1917 if ((rid = buffer_get_int(&m)) != muxclient_request_id)
1918 fatal("%s: out of sequence reply: my id %u theirs %u",
1919 __func__, muxclient_request_id, rid);
1920 switch (type) {
1921 case MUX_S_OK:
1922 break;
1923 case MUX_S_PERMISSION_DENIED:
1924 e = buffer_get_string(&m, NULL);
1925 fatal("Master refused stop listening request: %s", e);
1926 case MUX_S_FAILURE:
1927 e = buffer_get_string(&m, NULL);
1928 fatal("%s: stop listening request failed: %s", __func__, e);
1929 default:
1930 fatal("%s: unexpected response from master 0x%08x",
1931 __func__, type);
1932 }
1933 buffer_free(&m);
1934 muxclient_request_id++;
1935}
1936
1816/* Multiplex client main loop. */ 1937/* Multiplex client main loop. */
1817void 1938void
1818muxclient(const char *path) 1939muxclient(const char *path)
@@ -1906,6 +2027,10 @@ muxclient(const char *path)
1906 case SSHMUX_COMMAND_STDIO_FWD: 2027 case SSHMUX_COMMAND_STDIO_FWD:
1907 mux_client_request_stdio_fwd(sock); 2028 mux_client_request_stdio_fwd(sock);
1908 exit(0); 2029 exit(0);
2030 case SSHMUX_COMMAND_STOP:
2031 mux_client_request_stop_listening(sock);
2032 fprintf(stderr, "Stop listening request sent.\r\n");
2033 exit(0);
1909 default: 2034 default:
1910 fatal("unrecognised muxclient_command %d", muxclient_command); 2035 fatal("unrecognised muxclient_command %d", muxclient_command);
1911 } 2036 }
diff --git a/myproposal.h b/myproposal.h
index 2c43607a7..0bc1c778c 100644
--- a/myproposal.h
+++ b/myproposal.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: myproposal.h,v 1.27 2010/09/01 22:42:13 djm Exp $ */ 1/* $OpenBSD: myproposal.h,v 1.28 2011/08/02 01:22:11 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000 Markus Friedl. All rights reserved. 4 * Copyright (c) 2000 Markus Friedl. All rights reserved.
@@ -75,10 +75,25 @@
75 "arcfour256,arcfour128," \ 75 "arcfour256,arcfour128," \
76 "aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc," \ 76 "aes128-cbc,3des-cbc,blowfish-cbc,cast128-cbc," \
77 "aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se" 77 "aes192-cbc,aes256-cbc,arcfour,rijndael-cbc@lysator.liu.se"
78#ifdef HAVE_EVP_SHA256
79#define SHA2_HMAC_MODES \
80 "hmac-sha2-256," \
81 "hmac-sha2-256-96," \
82 "hmac-sha2-512," \
83 "hmac-sha2-512-96,"
84#else
85# define SHA2_HMAC_MODES
86#endif
78#define KEX_DEFAULT_MAC \ 87#define KEX_DEFAULT_MAC \
79 "hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160," \ 88 "hmac-md5," \
89 "hmac-sha1," \
90 "umac-64@openssh.com," \
91 SHA2_HMAC_MODES \
92 "hmac-ripemd160," \
80 "hmac-ripemd160@openssh.com," \ 93 "hmac-ripemd160@openssh.com," \
81 "hmac-sha1-96,hmac-md5-96" 94 "hmac-sha1-96," \
95 "hmac-md5-96"
96
82#define KEX_DEFAULT_COMP "none,zlib@openssh.com,zlib" 97#define KEX_DEFAULT_COMP "none,zlib@openssh.com,zlib"
83#define KEX_DEFAULT_LANG "" 98#define KEX_DEFAULT_LANG ""
84 99
diff --git a/openbsd-compat/bsd-cygwin_util.c b/openbsd-compat/bsd-cygwin_util.c
index e9fa3a0e2..9eedc88d2 100644
--- a/openbsd-compat/bsd-cygwin_util.c
+++ b/openbsd-compat/bsd-cygwin_util.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2000, 2001, Corinna Vinschen <vinschen@cygnus.com> 2 * Copyright (c) 2000, 2001, 2011 Corinna Vinschen <vinschen@redhat.com>
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
@@ -34,9 +34,6 @@
34#if defined(open) && open == binary_open 34#if defined(open) && open == binary_open
35# undef open 35# undef open
36#endif 36#endif
37#if defined(pipe) && open == binary_pipe
38# undef pipe
39#endif
40 37
41#include <sys/types.h> 38#include <sys/types.h>
42 39
@@ -59,18 +56,6 @@ binary_open(const char *filename, int flags, ...)
59 return (open(filename, flags | O_BINARY, mode)); 56 return (open(filename, flags | O_BINARY, mode));
60} 57}
61 58
62int
63binary_pipe(int fd[2])
64{
65 int ret = pipe(fd);
66
67 if (!ret) {
68 setmode(fd[0], O_BINARY);
69 setmode(fd[1], O_BINARY);
70 }
71 return (ret);
72}
73
74int 59int
75check_ntsec(const char *filename) 60check_ntsec(const char *filename)
76{ 61{
diff --git a/openbsd-compat/bsd-cygwin_util.h b/openbsd-compat/bsd-cygwin_util.h
index 39b8eb788..48f64b740 100644
--- a/openbsd-compat/bsd-cygwin_util.h
+++ b/openbsd-compat/bsd-cygwin_util.h
@@ -1,7 +1,7 @@
1/* $Id: bsd-cygwin_util.h,v 1.12 2009/03/08 00:40:28 dtucker Exp $ */ 1/* $Id: bsd-cygwin_util.h,v 1.13 2011/08/17 01:31:09 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2000, 2001, Corinna Vinschen <vinschen@cygnus.com> 4 * Copyright (c) 2000, 2001, 2011 Corinna Vinschen <vinschen@redhat.com>
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
@@ -41,13 +41,11 @@
41#include <io.h> 41#include <io.h>
42 42
43int binary_open(const char *, int , ...); 43int binary_open(const char *, int , ...);
44int binary_pipe(int fd[2]);
45int check_ntsec(const char *); 44int check_ntsec(const char *);
46char **fetch_windows_environment(void); 45char **fetch_windows_environment(void);
47void free_windows_environment(char **); 46void free_windows_environment(char **);
48 47
49#define open binary_open 48#define open binary_open
50#define pipe binary_pipe
51 49
52#endif /* HAVE_CYGWIN */ 50#endif /* HAVE_CYGWIN */
53 51
diff --git a/openbsd-compat/openssl-compat.c b/openbsd-compat/openssl-compat.c
index b617fdf19..5189cab61 100644
--- a/openbsd-compat/openssl-compat.c
+++ b/openbsd-compat/openssl-compat.c
@@ -1,4 +1,4 @@
1/* $Id: openssl-compat.c,v 1.13 2011/01/21 22:37:06 dtucker Exp $ */ 1/* $Id: openssl-compat.c,v 1.14 2011/05/10 01:13:38 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au> 4 * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au>
@@ -134,9 +134,9 @@ RSA_get_default_method(void)
134 134
135#ifdef USE_OPENSSL_ENGINE 135#ifdef USE_OPENSSL_ENGINE
136void 136void
137ssh_SSLeay_add_all_algorithms(void) 137ssh_OpenSSL_add_all_algorithms(void)
138{ 138{
139 SSLeay_add_all_algorithms(); 139 OpenSSL_add_all_algorithms();
140 140
141 /* Enable use of crypto hardware */ 141 /* Enable use of crypto hardware */
142 ENGINE_load_builtin_engines(); 142 ENGINE_load_builtin_engines();
diff --git a/openbsd-compat/openssl-compat.h b/openbsd-compat/openssl-compat.h
index 6d4f3f215..c5fc24eb4 100644
--- a/openbsd-compat/openssl-compat.h
+++ b/openbsd-compat/openssl-compat.h
@@ -1,4 +1,4 @@
1/* $Id: openssl-compat.h,v 1.18 2011/01/21 22:37:06 dtucker Exp $ */ 1/* $Id: openssl-compat.h,v 1.19 2011/05/10 01:13:38 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au> 4 * Copyright (c) 2005 Darren Tucker <dtucker@zip.com.au>
@@ -106,10 +106,10 @@ RSA_METHOD *RSA_get_default_method(void);
106# endif 106# endif
107 107
108# ifdef USE_OPENSSL_ENGINE 108# ifdef USE_OPENSSL_ENGINE
109# ifdef SSLeay_add_all_algorithms 109# ifdef OpenSSL_add_all_algorithms
110# undef SSLeay_add_all_algorithms 110# undef OpenSSL_add_all_algorithms
111# endif 111# endif
112# define SSLeay_add_all_algorithms() ssh_SSLeay_add_all_algorithms() 112# define OpenSSL_add_all_algorithms() ssh_OpenSSL_add_all_algorithms()
113# endif 113# endif
114 114
115# ifndef HAVE_BN_IS_PRIME_EX 115# ifndef HAVE_BN_IS_PRIME_EX
@@ -129,6 +129,6 @@ int ssh_EVP_CipherInit(EVP_CIPHER_CTX *, const EVP_CIPHER *, unsigned char *,
129 unsigned char *, int); 129 unsigned char *, int);
130int ssh_EVP_Cipher(EVP_CIPHER_CTX *, char *, char *, int); 130int ssh_EVP_Cipher(EVP_CIPHER_CTX *, char *, char *, int);
131int ssh_EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *); 131int ssh_EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *);
132void ssh_SSLeay_add_all_algorithms(void); 132void ssh_OpenSSL_add_all_algorithms(void);
133#endif /* SSH_DONT_OVERLOAD_OPENSSL_FUNCS */ 133#endif /* SSH_DONT_OVERLOAD_OPENSSL_FUNCS */
134 134
diff --git a/openbsd-compat/port-linux.c b/openbsd-compat/port-linux.c
index dc8b1fa55..ef91e4446 100644
--- a/openbsd-compat/port-linux.c
+++ b/openbsd-compat/port-linux.c
@@ -1,4 +1,4 @@
1/* $Id: port-linux.c,v 1.11.4.2 2011/02/04 00:43:08 djm Exp $ */ 1/* $Id: port-linux.c,v 1.16 2011/08/29 06:09:57 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com> 4 * Copyright (c) 2005 Daniel Walsh <dwalsh@redhat.com>
@@ -44,6 +44,10 @@
44#include <selinux/flask.h> 44#include <selinux/flask.h>
45#include <selinux/get_context_list.h> 45#include <selinux/get_context_list.h>
46 46
47#ifndef SSH_SELINUX_UNCONFINED_TYPE
48# define SSH_SELINUX_UNCONFINED_TYPE ":unconfined_t:"
49#endif
50
47/* Wrapper around is_selinux_enabled() to log its return value once only */ 51/* Wrapper around is_selinux_enabled() to log its return value once only */
48int 52int
49ssh_selinux_enabled(void) 53ssh_selinux_enabled(void)
@@ -190,12 +194,13 @@ ssh_selinux_change_context(const char *newname)
190{ 194{
191 int len, newlen; 195 int len, newlen;
192 char *oldctx, *newctx, *cx; 196 char *oldctx, *newctx, *cx;
197 void (*switchlog) (const char *fmt,...) = logit;
193 198
194 if (!ssh_selinux_enabled()) 199 if (!ssh_selinux_enabled())
195 return; 200 return;
196 201
197 if (getcon((security_context_t *)&oldctx) < 0) { 202 if (getcon((security_context_t *)&oldctx) < 0) {
198 logit("%s: getcon failed with %s", __func__, strerror (errno)); 203 logit("%s: getcon failed with %s", __func__, strerror(errno));
199 return; 204 return;
200 } 205 }
201 if ((cx = index(oldctx, ':')) == NULL || (cx = index(cx + 1, ':')) == 206 if ((cx = index(oldctx, ':')) == NULL || (cx = index(cx + 1, ':')) ==
@@ -204,6 +209,14 @@ ssh_selinux_change_context(const char *newname)
204 return; 209 return;
205 } 210 }
206 211
212 /*
213 * Check whether we are attempting to switch away from an unconfined
214 * security context.
215 */
216 if (strncmp(cx, SSH_SELINUX_UNCONFINED_TYPE,
217 sizeof(SSH_SELINUX_UNCONFINED_TYPE) - 1) == 0)
218 switchlog = debug3;
219
207 newlen = strlen(oldctx) + strlen(newname) + 1; 220 newlen = strlen(oldctx) + strlen(newname) + 1;
208 newctx = xmalloc(newlen); 221 newctx = xmalloc(newlen);
209 len = cx - oldctx + 1; 222 len = cx - oldctx + 1;
@@ -211,10 +224,11 @@ ssh_selinux_change_context(const char *newname)
211 strlcpy(newctx + len, newname, newlen - len); 224 strlcpy(newctx + len, newname, newlen - len);
212 if ((cx = index(cx + 1, ':'))) 225 if ((cx = index(cx + 1, ':')))
213 strlcat(newctx, cx, newlen); 226 strlcat(newctx, cx, newlen);
214 debug3("%s: setting context from '%s' to '%s'", __func__, oldctx, 227 debug3("%s: setting context from '%s' to '%s'", __func__,
215 newctx); 228 oldctx, newctx);
216 if (setcon(newctx) < 0) 229 if (setcon(newctx) < 0)
217 logit("%s: setcon failed with %s", __func__, strerror (errno)); 230 switchlog("%s: setcon %s from %s failed with %s", __func__,
231 newctx, oldctx, strerror(errno));
218 xfree(oldctx); 232 xfree(oldctx);
219 xfree(newctx); 233 xfree(newctx);
220} 234}
diff --git a/openbsd-compat/port-linux.h b/openbsd-compat/port-linux.h
index 3804fa2d1..80ce13ad9 100644
--- a/openbsd-compat/port-linux.h
+++ b/openbsd-compat/port-linux.h
@@ -1,4 +1,4 @@
1/* $Id: port-linux.h,v 1.4.10.1 2011/02/04 00:42:21 djm Exp $ */ 1/* $Id: port-linux.h,v 1.5 2011/01/25 01:16:18 djm Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2006 Damien Miller <djm@openbsd.org> 4 * Copyright (c) 2006 Damien Miller <djm@openbsd.org>
diff --git a/openbsd-compat/regress/closefromtest.c b/openbsd-compat/regress/closefromtest.c
index 145b09d7b..82ffeb9a7 100644
--- a/openbsd-compat/regress/closefromtest.c
+++ b/openbsd-compat/regress/closefromtest.c
@@ -24,6 +24,8 @@
24 24
25#define NUM_OPENS 10 25#define NUM_OPENS 10
26 26
27int closefrom(int);
28
27void 29void
28fail(char *msg) 30fail(char *msg)
29{ 31{
diff --git a/packet.c b/packet.c
index b4e01f716..ba9341731 100644
--- a/packet.c
+++ b/packet.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.c,v 1.172 2010/11/13 23:27:50 djm Exp $ */ 1/* $OpenBSD: packet.c,v 1.173 2011/05/06 21:14:05 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -422,10 +422,8 @@ packet_set_state(int mode, u_int32_t seqnr, u_int64_t blocks, u_int32_t packets,
422 state->bytes = bytes; 422 state->bytes = bytes;
423} 423}
424 424
425/* returns 1 if connection is via ipv4 */ 425static int
426 426packet_connection_af(void)
427int
428packet_connection_is_ipv4(void)
429{ 427{
430 struct sockaddr_storage to; 428 struct sockaddr_storage to;
431 socklen_t tolen = sizeof(to); 429 socklen_t tolen = sizeof(to);
@@ -439,9 +437,9 @@ packet_connection_is_ipv4(void)
439#ifdef IPV4_IN_IPV6 437#ifdef IPV4_IN_IPV6
440 if (to.ss_family == AF_INET6 && 438 if (to.ss_family == AF_INET6 &&
441 IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)&to)->sin6_addr)) 439 IN6_IS_ADDR_V4MAPPED(&((struct sockaddr_in6 *)&to)->sin6_addr))
442 return 1; 440 return AF_INET;
443#endif 441#endif
444 return 0; 442 return to.ss_family;
445} 443}
446 444
447/* Sets the connection into non-blocking mode. */ 445/* Sets the connection into non-blocking mode. */
@@ -1752,16 +1750,30 @@ packet_not_very_much_data_to_write(void)
1752static void 1750static void
1753packet_set_tos(int tos) 1751packet_set_tos(int tos)
1754{ 1752{
1755#if defined(IP_TOS) && !defined(IP_TOS_IS_BROKEN) 1753#ifndef IP_TOS_IS_BROKEN
1756 if (!packet_connection_is_on_socket() || 1754 if (!packet_connection_is_on_socket())
1757 !packet_connection_is_ipv4())
1758 return; 1755 return;
1759 debug3("%s: set IP_TOS 0x%02x", __func__, tos); 1756 switch (packet_connection_af()) {
1760 if (setsockopt(active_state->connection_in, IPPROTO_IP, IP_TOS, &tos, 1757# ifdef IP_TOS
1761 sizeof(tos)) < 0) 1758 case AF_INET:
1762 error("setsockopt IP_TOS %d: %.100s:", 1759 debug3("%s: set IP_TOS 0x%02x", __func__, tos);
1763 tos, strerror(errno)); 1760 if (setsockopt(active_state->connection_in,
1764#endif 1761 IPPROTO_IP, IP_TOS, &tos, sizeof(tos)) < 0)
1762 error("setsockopt IP_TOS %d: %.100s:",
1763 tos, strerror(errno));
1764 break;
1765# endif /* IP_TOS */
1766# ifdef IPV6_TCLASS
1767 case AF_INET6:
1768 debug3("%s: set IPV6_TCLASS 0x%02x", __func__, tos);
1769 if (setsockopt(active_state->connection_in,
1770 IPPROTO_IPV6, IPV6_TCLASS, &tos, sizeof(tos)) < 0)
1771 error("setsockopt IPV6_TCLASS %d: %.100s:",
1772 tos, strerror(errno));
1773 break;
1774# endif /* IPV6_TCLASS */
1775 }
1776#endif /* IP_TOS_IS_BROKEN */
1765} 1777}
1766 1778
1767/* Informs that the current session is interactive. Sets IP flags for that. */ 1779/* Informs that the current session is interactive. Sets IP flags for that. */
diff --git a/packet.h b/packet.h
index d516aae8d..90eec17a9 100644
--- a/packet.h
+++ b/packet.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: packet.h,v 1.55 2010/11/13 23:27:50 djm Exp $ */ 1/* $OpenBSD: packet.h,v 1.56 2011/05/06 21:14:05 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -92,7 +92,6 @@ int packet_have_data_to_write(void);
92int packet_not_very_much_data_to_write(void); 92int packet_not_very_much_data_to_write(void);
93 93
94int packet_connection_is_on_socket(void); 94int packet_connection_is_on_socket(void);
95int packet_connection_is_ipv4(void);
96int packet_remaining(void); 95int packet_remaining(void);
97void packet_send_ignore(int); 96void packet_send_ignore(int);
98void packet_add_padding(u_char); 97void packet_add_padding(u_char);
diff --git a/pathnames.h b/pathnames.h
index 6a940c918..0cdfcef7f 100644
--- a/pathnames.h
+++ b/pathnames.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: pathnames.h,v 1.20 2010/08/31 11:54:45 djm Exp $ */ 1/* $OpenBSD: pathnames.h,v 1.22 2011/05/23 03:30:07 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
diff --git a/readconf.c b/readconf.c
index 656a2519f..7a26e923b 100644
--- a/readconf.c
+++ b/readconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.c,v 1.190 2010/11/13 23:27:50 djm Exp $ */ 1/* $OpenBSD: readconf.c,v 1.193 2011/05/24 07:15:47 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -139,7 +139,7 @@ typedef enum {
139 oHashKnownHosts, 139 oHashKnownHosts,
140 oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand, 140 oTunnel, oTunnelDevice, oLocalCommand, oPermitLocalCommand,
141 oVisualHostKey, oUseRoaming, oZeroKnowledgePasswordAuthentication, 141 oVisualHostKey, oUseRoaming, oZeroKnowledgePasswordAuthentication,
142 oKexAlgorithms, oIPQoS, 142 oKexAlgorithms, oIPQoS, oRequestTTY,
143 oProtocolKeepAlives, oSetupTimeOut, 143 oProtocolKeepAlives, oSetupTimeOut,
144 oDeprecated, oUnsupported 144 oDeprecated, oUnsupported
145} OpCodes; 145} OpCodes;
@@ -209,9 +209,9 @@ static struct {
209 { "host", oHost }, 209 { "host", oHost },
210 { "escapechar", oEscapeChar }, 210 { "escapechar", oEscapeChar },
211 { "globalknownhostsfile", oGlobalKnownHostsFile }, 211 { "globalknownhostsfile", oGlobalKnownHostsFile },
212 { "globalknownhostsfile2", oGlobalKnownHostsFile2 }, /* obsolete */ 212 { "globalknownhostsfile2", oDeprecated },
213 { "userknownhostsfile", oUserKnownHostsFile }, 213 { "userknownhostsfile", oUserKnownHostsFile },
214 { "userknownhostsfile2", oUserKnownHostsFile2 }, /* obsolete */ 214 { "userknownhostsfile2", oDeprecated },
215 { "connectionattempts", oConnectionAttempts }, 215 { "connectionattempts", oConnectionAttempts },
216 { "batchmode", oBatchMode }, 216 { "batchmode", oBatchMode },
217 { "checkhostip", oCheckHostIP }, 217 { "checkhostip", oCheckHostIP },
@@ -261,6 +261,7 @@ static struct {
261#endif 261#endif
262 { "kexalgorithms", oKexAlgorithms }, 262 { "kexalgorithms", oKexAlgorithms },
263 { "ipqos", oIPQoS }, 263 { "ipqos", oIPQoS },
264 { "requesttty", oRequestTTY },
264 { "protocolkeepalives", oProtocolKeepAlives }, 265 { "protocolkeepalives", oProtocolKeepAlives },
265 { "setuptimeout", oSetupTimeOut }, 266 { "setuptimeout", oSetupTimeOut },
266 267
@@ -371,8 +372,10 @@ process_config_line(Options *options, const char *host,
371 char *line, const char *filename, int linenum, 372 char *line, const char *filename, int linenum,
372 int *activep) 373 int *activep)
373{ 374{
374 char *s, **charptr, *endofnumber, *keyword, *arg, *arg2, fwdarg[256]; 375 char *s, **charptr, *endofnumber, *keyword, *arg, *arg2;
375 int opcode, *intptr, value, value2, scale; 376 char **cpptr, fwdarg[256];
377 u_int *uintptr, max_entries = 0;
378 int negated, opcode, *intptr, value, value2, scale;
376 LogLevel *log_level_ptr; 379 LogLevel *log_level_ptr;
377 long long orig, val64; 380 long long orig, val64;
378 size_t len; 381 size_t len;
@@ -639,26 +642,33 @@ parse_yesnoask:
639parse_string: 642parse_string:
640 arg = strdelim(&s); 643 arg = strdelim(&s);
641 if (!arg || *arg == '\0') 644 if (!arg || *arg == '\0')
642 fatal("%.200s line %d: Missing argument.", filename, linenum); 645 fatal("%.200s line %d: Missing argument.",
646 filename, linenum);
643 if (*activep && *charptr == NULL) 647 if (*activep && *charptr == NULL)
644 *charptr = xstrdup(arg); 648 *charptr = xstrdup(arg);
645 break; 649 break;
646 650
647 case oGlobalKnownHostsFile: 651 case oGlobalKnownHostsFile:
648 charptr = &options->system_hostfile; 652 cpptr = (char **)&options->system_hostfiles;
649 goto parse_string; 653 uintptr = &options->num_system_hostfiles;
654 max_entries = SSH_MAX_HOSTS_FILES;
655parse_char_array:
656 if (*activep && *uintptr == 0) {
657 while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
658 if ((*uintptr) >= max_entries)
659 fatal("%s line %d: "
660 "too many authorized keys files.",
661 filename, linenum);
662 cpptr[(*uintptr)++] = xstrdup(arg);
663 }
664 }
665 return 0;
650 666
651 case oUserKnownHostsFile: 667 case oUserKnownHostsFile:
652 charptr = &options->user_hostfile; 668 cpptr = (char **)&options->user_hostfiles;
653 goto parse_string; 669 uintptr = &options->num_user_hostfiles;
654 670 max_entries = SSH_MAX_HOSTS_FILES;
655 case oGlobalKnownHostsFile2: 671 goto parse_char_array;
656 charptr = &options->system_hostfile2;
657 goto parse_string;
658
659 case oUserKnownHostsFile2:
660 charptr = &options->user_hostfile2;
661 goto parse_string;
662 672
663 case oHostName: 673 case oHostName:
664 charptr = &options->hostname; 674 charptr = &options->hostname;
@@ -835,12 +845,28 @@ parse_int:
835 845
836 case oHost: 846 case oHost:
837 *activep = 0; 847 *activep = 0;
838 while ((arg = strdelim(&s)) != NULL && *arg != '\0') 848 arg2 = NULL;
849 while ((arg = strdelim(&s)) != NULL && *arg != '\0') {
850 negated = *arg == '!';
851 if (negated)
852 arg++;
839 if (match_pattern(host, arg)) { 853 if (match_pattern(host, arg)) {
840 debug("Applying options for %.100s", arg); 854 if (negated) {
855 debug("%.200s line %d: Skipping Host "
856 "block because of negated match "
857 "for %.100s", filename, linenum,
858 arg);
859 *activep = 0;
860 break;
861 }
862 if (!*activep)
863 arg2 = arg; /* logged below */
841 *activep = 1; 864 *activep = 1;
842 break;
843 } 865 }
866 }
867 if (*activep)
868 debug("%.200s line %d: Applying options for %.100s",
869 filename, linenum, arg2);
844 /* Avoid garbage check below, as strdelim is done. */ 870 /* Avoid garbage check below, as strdelim is done. */
845 return 0; 871 return 0;
846 872
@@ -1041,6 +1067,26 @@ parse_int:
1041 intptr = &options->use_roaming; 1067 intptr = &options->use_roaming;
1042 goto parse_flag; 1068 goto parse_flag;
1043 1069
1070 case oRequestTTY:
1071 arg = strdelim(&s);
1072 if (!arg || *arg == '\0')
1073 fatal("%s line %d: missing argument.",
1074 filename, linenum);
1075 intptr = &options->request_tty;
1076 if (strcasecmp(arg, "yes") == 0)
1077 value = REQUEST_TTY_YES;
1078 else if (strcasecmp(arg, "no") == 0)
1079 value = REQUEST_TTY_NO;
1080 else if (strcasecmp(arg, "force") == 0)
1081 value = REQUEST_TTY_FORCE;
1082 else if (strcasecmp(arg, "auto") == 0)
1083 value = REQUEST_TTY_AUTO;
1084 else
1085 fatal("Unsupported RequestTTY \"%s\"", arg);
1086 if (*activep && *intptr == -1)
1087 *intptr = value;
1088 break;
1089
1044 case oDeprecated: 1090 case oDeprecated:
1045 debug("%s line %d: Deprecated option \"%s\"", 1091 debug("%s line %d: Deprecated option \"%s\"",
1046 filename, linenum, keyword); 1092 filename, linenum, keyword);
@@ -1170,10 +1216,8 @@ initialize_options(Options * options)
1170 options->proxy_command = NULL; 1216 options->proxy_command = NULL;
1171 options->user = NULL; 1217 options->user = NULL;
1172 options->escape_char = -1; 1218 options->escape_char = -1;
1173 options->system_hostfile = NULL; 1219 options->num_system_hostfiles = 0;
1174 options->user_hostfile = NULL; 1220 options->num_user_hostfiles = 0;
1175 options->system_hostfile2 = NULL;
1176 options->user_hostfile2 = NULL;
1177 options->local_forwards = NULL; 1221 options->local_forwards = NULL;
1178 options->num_local_forwards = 0; 1222 options->num_local_forwards = 0;
1179 options->remote_forwards = NULL; 1223 options->remote_forwards = NULL;
@@ -1206,6 +1250,7 @@ initialize_options(Options * options)
1206 options->zero_knowledge_password_authentication = -1; 1250 options->zero_knowledge_password_authentication = -1;
1207 options->ip_qos_interactive = -1; 1251 options->ip_qos_interactive = -1;
1208 options->ip_qos_bulk = -1; 1252 options->ip_qos_bulk = -1;
1253 options->request_tty = -1;
1209} 1254}
1210 1255
1211/* 1256/*
@@ -1320,14 +1365,18 @@ fill_default_options(Options * options)
1320 } 1365 }
1321 if (options->escape_char == -1) 1366 if (options->escape_char == -1)
1322 options->escape_char = '~'; 1367 options->escape_char = '~';
1323 if (options->system_hostfile == NULL) 1368 if (options->num_system_hostfiles == 0) {
1324 options->system_hostfile = _PATH_SSH_SYSTEM_HOSTFILE; 1369 options->system_hostfiles[options->num_system_hostfiles++] =
1325 if (options->user_hostfile == NULL) 1370 xstrdup(_PATH_SSH_SYSTEM_HOSTFILE);
1326 options->user_hostfile = _PATH_SSH_USER_HOSTFILE; 1371 options->system_hostfiles[options->num_system_hostfiles++] =
1327 if (options->system_hostfile2 == NULL) 1372 xstrdup(_PATH_SSH_SYSTEM_HOSTFILE2);
1328 options->system_hostfile2 = _PATH_SSH_SYSTEM_HOSTFILE2; 1373 }
1329 if (options->user_hostfile2 == NULL) 1374 if (options->num_user_hostfiles == 0) {
1330 options->user_hostfile2 = _PATH_SSH_USER_HOSTFILE2; 1375 options->user_hostfiles[options->num_user_hostfiles++] =
1376 xstrdup(_PATH_SSH_USER_HOSTFILE);
1377 options->user_hostfiles[options->num_user_hostfiles++] =
1378 xstrdup(_PATH_SSH_USER_HOSTFILE2);
1379 }
1331 if (options->log_level == SYSLOG_LEVEL_NOT_SET) 1380 if (options->log_level == SYSLOG_LEVEL_NOT_SET)
1332 options->log_level = SYSLOG_LEVEL_INFO; 1381 options->log_level = SYSLOG_LEVEL_INFO;
1333 if (options->clear_forwardings == 1) 1382 if (options->clear_forwardings == 1)
@@ -1377,6 +1426,8 @@ fill_default_options(Options * options)
1377 options->ip_qos_interactive = IPTOS_LOWDELAY; 1426 options->ip_qos_interactive = IPTOS_LOWDELAY;
1378 if (options->ip_qos_bulk == -1) 1427 if (options->ip_qos_bulk == -1)
1379 options->ip_qos_bulk = IPTOS_THROUGHPUT; 1428 options->ip_qos_bulk = IPTOS_THROUGHPUT;
1429 if (options->request_tty == -1)
1430 options->request_tty = REQUEST_TTY_AUTO;
1380 /* options->local_command should not be set by default */ 1431 /* options->local_command should not be set by default */
1381 /* options->proxy_command should not be set by default */ 1432 /* options->proxy_command should not be set by default */
1382 /* options->user will be set in the main program if appropriate */ 1433 /* options->user will be set in the main program if appropriate */
diff --git a/readconf.h b/readconf.h
index c4391abe4..2d9005ffa 100644
--- a/readconf.h
+++ b/readconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: readconf.h,v 1.88 2010/11/13 23:27:50 djm Exp $ */ 1/* $OpenBSD: readconf.h,v 1.90 2011/05/24 07:15:47 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -27,7 +27,8 @@ typedef struct {
27} Forward; 27} Forward;
28/* Data structure for representing option data. */ 28/* Data structure for representing option data. */
29 29
30#define MAX_SEND_ENV 256 30#define MAX_SEND_ENV 256
31#define SSH_MAX_HOSTS_FILES 256
31 32
32typedef struct { 33typedef struct {
33 int forward_agent; /* Forward authentication agent. */ 34 int forward_agent; /* Forward authentication agent. */
@@ -89,10 +90,10 @@ typedef struct {
89 char *user; /* User to log in as. */ 90 char *user; /* User to log in as. */
90 int escape_char; /* Escape character; -2 = none */ 91 int escape_char; /* Escape character; -2 = none */
91 92
92 char *system_hostfile;/* Path for /etc/ssh/ssh_known_hosts. */ 93 u_int num_system_hostfiles; /* Paths for /etc/ssh/ssh_known_hosts */
93 char *user_hostfile; /* Path for $HOME/.ssh/known_hosts. */ 94 char *system_hostfiles[SSH_MAX_HOSTS_FILES];
94 char *system_hostfile2; 95 u_int num_user_hostfiles; /* Path for $HOME/.ssh/known_hosts */
95 char *user_hostfile2; 96 char *user_hostfiles[SSH_MAX_HOSTS_FILES];
96 char *preferred_authentications; 97 char *preferred_authentications;
97 char *bind_address; /* local socket address for connection to sshd */ 98 char *bind_address; /* local socket address for connection to sshd */
98 char *pkcs11_provider; /* PKCS#11 provider */ 99 char *pkcs11_provider; /* PKCS#11 provider */
@@ -138,6 +139,7 @@ typedef struct {
138 139
139 int use_roaming; 140 int use_roaming;
140 141
142 int request_tty;
141} Options; 143} Options;
142 144
143#define SSHCTL_MASTER_NO 0 145#define SSHCTL_MASTER_NO 0
@@ -146,6 +148,11 @@ typedef struct {
146#define SSHCTL_MASTER_ASK 3 148#define SSHCTL_MASTER_ASK 3
147#define SSHCTL_MASTER_AUTO_ASK 4 149#define SSHCTL_MASTER_AUTO_ASK 4
148 150
151#define REQUEST_TTY_AUTO 0
152#define REQUEST_TTY_NO 1
153#define REQUEST_TTY_YES 2
154#define REQUEST_TTY_FORCE 3
155
149void initialize_options(Options *); 156void initialize_options(Options *);
150void fill_default_options(Options *); 157void fill_default_options(Options *);
151int read_config_file(const char *, const char *, Options *, int); 158int read_config_file(const char *, const char *, Options *, int);
diff --git a/regress/README.regress b/regress/README.regress
index da9bb6a99..82e4cc751 100644
--- a/regress/README.regress
+++ b/regress/README.regress
@@ -93,10 +93,6 @@ Failed tests can be difficult to diagnose. Suggestions:
93 93
94Known Issues. 94Known Issues.
95 95
96- If your build requires ssh-rand-helper regress tests will fail
97 unless ssh-rand-helper is in pre-installed (the path to
98 ssh-rand-helper is hard coded).
99
100- Similarly, if you do not have "scp" in your system's $PATH then the 96- Similarly, if you do not have "scp" in your system's $PATH then the
101 multiplex scp tests will fail (since the system's shell startup scripts 97 multiplex scp tests will fail (since the system's shell startup scripts
102 will determine where the shell started by sshd will look for scp). 98 will determine where the shell started by sshd will look for scp).
@@ -105,4 +101,4 @@ Known Issues.
105 test to fail. The old behaviour can be restored by setting (and 101 test to fail. The old behaviour can be restored by setting (and
106 exporting) _POSIX2_VERSION=199209 before running the tests. 102 exporting) _POSIX2_VERSION=199209 before running the tests.
107 103
108$Id: README.regress,v 1.11 2010/08/16 21:04:29 djm Exp $ 104$Id: README.regress,v 1.12 2011/05/05 03:48:42 djm Exp $
diff --git a/regress/cert-hostkey.sh b/regress/cert-hostkey.sh
index 3b147b9f7..6216abd87 100644
--- a/regress/cert-hostkey.sh
+++ b/regress/cert-hostkey.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: cert-hostkey.sh,v 1.5 2010/08/31 12:24:09 djm Exp $ 1# $OpenBSD: cert-hostkey.sh,v 1.6 2011/05/20 02:43:36 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="certified host keys" 4tid="certified host keys"
diff --git a/regress/cert-userkey.sh b/regress/cert-userkey.sh
index fcca3708b..6700db274 100644
--- a/regress/cert-userkey.sh
+++ b/regress/cert-userkey.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: cert-userkey.sh,v 1.7 2010/08/31 12:24:09 djm Exp $ 1# $OpenBSD: cert-userkey.sh,v 1.8 2011/05/17 07:13:31 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="certified user keys" 4tid="certified user keys"
@@ -27,7 +27,7 @@ for ktype in rsa dsa $ecdsa ; do
27 -n ${USER},mekmitasdigoat $OBJ/cert_user_key_${ktype} || 27 -n ${USER},mekmitasdigoat $OBJ/cert_user_key_${ktype} ||
28 fail "couldn't sign cert_user_key_${ktype}" 28 fail "couldn't sign cert_user_key_${ktype}"
29 # v00 ecdsa certs do not exist 29 # v00 ecdsa certs do not exist
30 test "{ktype}" = "ecdsa" && continue 30 test "${ktype}" = "ecdsa" && continue
31 cp $OBJ/cert_user_key_${ktype} $OBJ/cert_user_key_${ktype}_v00 31 cp $OBJ/cert_user_key_${ktype} $OBJ/cert_user_key_${ktype}_v00
32 cp $OBJ/cert_user_key_${ktype}.pub $OBJ/cert_user_key_${ktype}_v00.pub 32 cp $OBJ/cert_user_key_${ktype}.pub $OBJ/cert_user_key_${ktype}_v00.pub
33 ${SSHKEYGEN} -q -t v00 -s $OBJ/user_ca_key -I \ 33 ${SSHKEYGEN} -q -t v00 -s $OBJ/user_ca_key -I \
diff --git a/regress/cfgmatch.sh b/regress/cfgmatch.sh
index 96badd51b..0603fab64 100644
--- a/regress/cfgmatch.sh
+++ b/regress/cfgmatch.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: cfgmatch.sh,v 1.4 2006/12/13 08:36:36 dtucker Exp $ 1# $OpenBSD: cfgmatch.sh,v 1.6 2011/06/03 05:35:10 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="sshd_config match" 4tid="sshd_config match"
@@ -7,6 +7,28 @@ pidfile=$OBJ/remote_pid
7fwdport=3301 7fwdport=3301
8fwd="-L $fwdport:127.0.0.1:$PORT" 8fwd="-L $fwdport:127.0.0.1:$PORT"
9 9
10echo "ExitOnForwardFailure=yes" >> $OBJ/ssh_config
11echo "ExitOnForwardFailure=yes" >> $OBJ/ssh_proxy
12
13start_client()
14{
15 rm -f $pidfile
16 ${SSH} -q -$p $fwd "$@" somehost \
17 exec sh -c \'"echo \$\$ > $pidfile; exec sleep 100"\' \
18 >>$TEST_SSH_LOGFILE 2>&1 &
19 client_pid=$!
20 # Wait for remote end
21 n=0
22 while test ! -f $pidfile ; do
23 sleep 1
24 n=`expr $n + 1`
25 if test $n -gt 60; then
26 kill $client_pid
27 fatal "timeout waiting for background ssh"
28 fi
29 done
30}
31
10stop_client() 32stop_client()
11{ 33{
12 pid=`cat $pidfile` 34 pid=`cat $pidfile`
@@ -14,11 +36,15 @@ stop_client()
14 kill $pid 36 kill $pid
15 sleep 1 37 sleep 1
16 fi 38 fi
39 wait
17} 40}
18 41
19cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak 42cp $OBJ/sshd_proxy $OBJ/sshd_proxy_bak
20 43grep -v AuthorizedKeysFile $OBJ/sshd_proxy_bak > $OBJ/sshd_proxy
44echo "AuthorizedKeysFile /dev/null" >>$OBJ/sshd_proxy
21echo "PermitOpen 127.0.0.1:1" >>$OBJ/sshd_config 45echo "PermitOpen 127.0.0.1:1" >>$OBJ/sshd_config
46echo "Match user $USER" >>$OBJ/sshd_proxy
47echo "AuthorizedKeysFile /dev/null $OBJ/authorized_keys_%u" >>$OBJ/sshd_proxy
22echo "Match Address 127.0.0.1" >>$OBJ/sshd_config 48echo "Match Address 127.0.0.1" >>$OBJ/sshd_config
23echo "PermitOpen 127.0.0.1:$PORT" >>$OBJ/sshd_config 49echo "PermitOpen 127.0.0.1:$PORT" >>$OBJ/sshd_config
24 50
@@ -32,12 +58,8 @@ start_sshd
32 58
33# Test Match + PermitOpen in sshd_config. This should be permitted 59# Test Match + PermitOpen in sshd_config. This should be permitted
34for p in 1 2; do 60for p in 1 2; do
35 rm -f $pidfile
36 trace "match permitopen localhost proto $p" 61 trace "match permitopen localhost proto $p"
37 ${SSH} -$p $fwd -F $OBJ/ssh_config -f somehost \ 62 start_client -F $OBJ/ssh_config
38 exec sh -c \'"echo \$\$ > $pidfile; exec sleep 100"\' >>$TEST_SSH_LOGFILE 2>&1 ||\
39 fail "match permitopen proto $p sshd failed"
40 sleep 1;
41 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true || \ 63 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true || \
42 fail "match permitopen permit proto $p" 64 fail "match permitopen permit proto $p"
43 stop_client 65 stop_client
@@ -45,12 +67,8 @@ done
45 67
46# Same but from different source. This should not be permitted 68# Same but from different source. This should not be permitted
47for p in 1 2; do 69for p in 1 2; do
48 rm -f $pidfile
49 trace "match permitopen proxy proto $p" 70 trace "match permitopen proxy proto $p"
50 ${SSH} -q -$p $fwd -F $OBJ/ssh_proxy -f somehost \ 71 start_client -F $OBJ/ssh_proxy
51 exec sh -c \'"echo \$\$ > $pidfile; exec sleep 100"\' >>$TEST_SSH_LOGFILE 2>&1 ||\
52 fail "match permitopen proxy proto $p sshd failed"
53 sleep 1;
54 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true && \ 72 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true && \
55 fail "match permitopen deny proto $p" 73 fail "match permitopen deny proto $p"
56 stop_client 74 stop_client
@@ -62,12 +80,8 @@ cat $OBJ/rsa.pub >> $OBJ/authorized_keys_$USER
62echon 'permitopen="127.0.0.1:'$PORT'" ' >>$OBJ/authorized_keys_$USER 80echon 'permitopen="127.0.0.1:'$PORT'" ' >>$OBJ/authorized_keys_$USER
63cat $OBJ/rsa1.pub >> $OBJ/authorized_keys_$USER 81cat $OBJ/rsa1.pub >> $OBJ/authorized_keys_$USER
64for p in 1 2; do 82for p in 1 2; do
65 rm -f $pidfile
66 trace "match permitopen proxy w/key opts proto $p" 83 trace "match permitopen proxy w/key opts proto $p"
67 ${SSH} -q -$p $fwd -F $OBJ/ssh_proxy -f somehost \ 84 start_client -F $OBJ/ssh_proxy
68 exec sh -c \'"echo \$\$ > $pidfile; exec sleep 100"\' >>$TEST_SSH_LOGFILE 2>&1 ||\
69 fail "match permitopen w/key opt proto $p sshd failed"
70 sleep 1;
71 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true && \ 85 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true && \
72 fail "match permitopen deny w/key opt proto $p" 86 fail "match permitopen deny w/key opt proto $p"
73 stop_client 87 stop_client
@@ -76,12 +90,8 @@ done
76# Test both sshd_config and key options permitting the same dst/port pair. 90# Test both sshd_config and key options permitting the same dst/port pair.
77# Should be permitted. 91# Should be permitted.
78for p in 1 2; do 92for p in 1 2; do
79 rm -f $pidfile
80 trace "match permitopen localhost proto $p" 93 trace "match permitopen localhost proto $p"
81 ${SSH} -$p $fwd -F $OBJ/ssh_config -f somehost \ 94 start_client -F $OBJ/ssh_config
82 exec sh -c \'"echo \$\$ > $pidfile; exec sleep 100"\' >>$TEST_SSH_LOGFILE 2>&1 ||\
83 fail "match permitopen proto $p sshd failed"
84 sleep 1;
85 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true || \ 95 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true || \
86 fail "match permitopen permit proto $p" 96 fail "match permitopen permit proto $p"
87 stop_client 97 stop_client
@@ -94,12 +104,8 @@ echo "PermitOpen 127.0.0.1:1 127.0.0.1:2" >>$OBJ/sshd_proxy
94 104
95# Test that a Match overrides a PermitOpen in the global section 105# Test that a Match overrides a PermitOpen in the global section
96for p in 1 2; do 106for p in 1 2; do
97 rm -f $pidfile
98 trace "match permitopen proxy w/key opts proto $p" 107 trace "match permitopen proxy w/key opts proto $p"
99 ${SSH} -q -$p $fwd -F $OBJ/ssh_proxy -f somehost \ 108 start_client -F $OBJ/ssh_proxy
100 exec sh -c \'"echo \$\$ > $pidfile; exec sleep 100"\' >>$TEST_SSH_LOGFILE 2>&1 ||\
101 fail "match override permitopen proto $p sshd failed"
102 sleep 1;
103 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true && \ 109 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true && \
104 fail "match override permitopen proto $p" 110 fail "match override permitopen proto $p"
105 stop_client 111 stop_client
@@ -113,12 +119,8 @@ echo "PermitOpen 127.0.0.1:1 127.0.0.1:2" >>$OBJ/sshd_proxy
113# Test that a rule that doesn't match doesn't override, plus test a 119# Test that a rule that doesn't match doesn't override, plus test a
114# PermitOpen entry that's not at the start of the list 120# PermitOpen entry that's not at the start of the list
115for p in 1 2; do 121for p in 1 2; do
116 rm -f $pidfile
117 trace "nomatch permitopen proxy w/key opts proto $p" 122 trace "nomatch permitopen proxy w/key opts proto $p"
118 ${SSH} -q -$p $fwd -F $OBJ/ssh_proxy -f somehost \ 123 start_client -F $OBJ/ssh_proxy
119 exec sh -c \'"echo \$\$ > $pidfile; exec sleep 100"\' >>$TEST_SSH_LOGFILE 2>&1 ||\
120 fail "nomatch override permitopen proto $p sshd failed"
121 sleep 1;
122 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true || \ 124 ${SSH} -q -$p -p $fwdport -F $OBJ/ssh_config somehost true || \
123 fail "nomatch override permitopen proto $p" 125 fail "nomatch override permitopen proto $p"
124 stop_client 126 stop_client
diff --git a/regress/cipher-speed.sh b/regress/cipher-speed.sh
index 85de6d585..257afd179 100644
--- a/regress/cipher-speed.sh
+++ b/regress/cipher-speed.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: cipher-speed.sh,v 1.3 2007/06/07 19:41:46 pvalchev Exp $ 1# $OpenBSD: cipher-speed.sh,v 1.4 2011/08/02 01:23:41 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="cipher speed" 4tid="cipher speed"
@@ -12,9 +12,13 @@ tries="1 2"
12DATA=/bin/ls 12DATA=/bin/ls
13DATA=/bsd 13DATA=/bsd
14 14
15macs="hmac-sha1 hmac-md5 umac-64@openssh.com hmac-sha1-96 hmac-md5-96"
16ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc 15ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
17 arcfour128 arcfour256 arcfour aes192-cbc aes256-cbc aes128-ctr" 16 arcfour128 arcfour256 arcfour
17 aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se
18 aes128-ctr aes192-ctr aes256-ctr"
19macs="hmac-sha1 hmac-md5 umac-64@openssh.com hmac-sha1-96 hmac-md5-96"
20config_defined HAVE_EVP_SHA256 &&
21 macs="$macs hmac-sha2-256 hmac-sha2-256-96 hmac-sha2-512 hmac-sha2-512-96"
18 22
19for c in $ciphers; do for m in $macs; do 23for c in $ciphers; do for m in $macs; do
20 trace "proto 2 cipher $c mac $m" 24 trace "proto 2 cipher $c mac $m"
diff --git a/regress/connect-privsep.sh b/regress/connect-privsep.sh
index d23cadba5..11fb9aef9 100644
--- a/regress/connect-privsep.sh
+++ b/regress/connect-privsep.sh
@@ -1,8 +1,9 @@
1# $OpenBSD: connect-privsep.sh,v 1.1 2002/03/21 21:45:07 markus Exp $ 1# $OpenBSD: connect-privsep.sh,v 1.2 2011/06/30 22:44:43 markus Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="proxy connect with privsep" 4tid="proxy connect with privsep"
5 5
6cp $OBJ/sshd_proxy $OBJ/sshd_proxy.orig
6echo 'UsePrivilegeSeparation yes' >> $OBJ/sshd_proxy 7echo 'UsePrivilegeSeparation yes' >> $OBJ/sshd_proxy
7 8
8for p in 1 2; do 9for p in 1 2; do
@@ -11,3 +12,14 @@ for p in 1 2; do
11 fail "ssh privsep+proxyconnect protocol $p failed" 12 fail "ssh privsep+proxyconnect protocol $p failed"
12 fi 13 fi
13done 14done
15
16cp $OBJ/sshd_proxy.orig $OBJ/sshd_proxy
17echo 'UsePrivilegeSeparation sandbox' >> $OBJ/sshd_proxy
18
19for p in 1 2; do
20 ${SSH} -$p -F $OBJ/ssh_proxy 999.999.999.999 true
21 if [ $? -ne 0 ]; then
22 # XXX replace this with fail once sandbox has stabilised
23 warn "ssh privsep/sandbox+proxyconnect protocol $p failed"
24 fi
25done
diff --git a/regress/dynamic-forward.sh b/regress/dynamic-forward.sh
index 4674a7baf..d1ab8059b 100644
--- a/regress/dynamic-forward.sh
+++ b/regress/dynamic-forward.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: dynamic-forward.sh,v 1.4 2004/06/22 22:55:56 dtucker Exp $ 1# $OpenBSD: dynamic-forward.sh,v 1.9 2011/06/03 00:29:52 dtucker Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="dynamic forwarding" 4tid="dynamic forwarding"
@@ -20,9 +20,23 @@ trace "will use ProxyCommand $proxycmd"
20start_sshd 20start_sshd
21 21
22for p in 1 2; do 22for p in 1 2; do
23 n=0
24 error="1"
23 trace "start dynamic forwarding, fork to background" 25 trace "start dynamic forwarding, fork to background"
24 ${SSH} -$p -F $OBJ/ssh_config -f -D $FWDPORT -q somehost \ 26 while [ "$error" -ne 0 -a "$n" -lt 3 ]; do
25 exec sh -c \'"echo \$\$ > $OBJ/remote_pid; exec sleep 444"\' 27 n=`expr $n + 1`
28 ${SSH} -$p -F $OBJ/ssh_config -f -D $FWDPORT -q \
29 -oExitOnForwardFailure=yes somehost exec sh -c \
30 \'"echo \$\$ > $OBJ/remote_pid; exec sleep 444"\'
31 error=$?
32 if [ "$error" -ne 0 ]; then
33 trace "forward failed proto $p attempt $n err $error"
34 sleep $n
35 fi
36 done
37 if [ "$error" -ne 0 ]; then
38 fatal "failed to start dynamic forwarding proto $p"
39 fi
26 40
27 for s in 4 5; do 41 for s in 4 5; do
28 for h in 127.0.0.1 localhost; do 42 for h in 127.0.0.1 localhost; do
@@ -44,7 +58,4 @@ for p in 1 2; do
44 else 58 else
45 fail "no pid file: $OBJ/remote_pid" 59 fail "no pid file: $OBJ/remote_pid"
46 fi 60 fi
47
48 # Must allow time for connection tear-down
49 sleep 2
50done 61done
diff --git a/regress/test-exec.sh b/regress/test-exec.sh
index 5c56aefff..092cfed5b 100644
--- a/regress/test-exec.sh
+++ b/regress/test-exec.sh
@@ -204,6 +204,11 @@ verbose ()
204 fi 204 fi
205} 205}
206 206
207warn ()
208{
209 echo "WARNING: $@" >>$TEST_SSH_LOGFILE
210 echo "WARNING: $@"
211}
207 212
208fail () 213fail ()
209{ 214{
diff --git a/regress/try-ciphers.sh b/regress/try-ciphers.sh
index ef776d2ee..0918d2245 100644
--- a/regress/try-ciphers.sh
+++ b/regress/try-ciphers.sh
@@ -1,4 +1,4 @@
1# $OpenBSD: try-ciphers.sh,v 1.11 2007/06/07 19:41:46 pvalchev Exp $ 1# $OpenBSD: try-ciphers.sh,v 1.12 2011/08/02 01:23:41 djm Exp $
2# Placed in the Public Domain. 2# Placed in the Public Domain.
3 3
4tid="try ciphers" 4tid="try ciphers"
@@ -8,6 +8,8 @@ ciphers="aes128-cbc 3des-cbc blowfish-cbc cast128-cbc
8 aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se 8 aes192-cbc aes256-cbc rijndael-cbc@lysator.liu.se
9 aes128-ctr aes192-ctr aes256-ctr" 9 aes128-ctr aes192-ctr aes256-ctr"
10macs="hmac-sha1 hmac-md5 umac-64@openssh.com hmac-sha1-96 hmac-md5-96" 10macs="hmac-sha1 hmac-md5 umac-64@openssh.com hmac-sha1-96 hmac-md5-96"
11config_defined HAVE_EVP_SHA256 &&
12 macs="$macs hmac-sha2-256 hmac-sha2-256-96 hmac-sha2-512 hmac-sha2-512-96"
11 13
12for c in $ciphers; do 14for c in $ciphers; do
13 for m in $macs; do 15 for m in $macs; do
diff --git a/sandbox-darwin.c b/sandbox-darwin.c
new file mode 100644
index 000000000..69901ef14
--- /dev/null
+++ b/sandbox-darwin.c
@@ -0,0 +1,98 @@
1/*
2 * Copyright (c) 2011 Damien Miller <djm@mindrot.org>
3 *
4 * Permission to use, copy, modify, and distribute this software for any
5 * purpose with or without fee is hereby granted, provided that the above
6 * copyright notice and this permission notice appear in all copies.
7 *
8 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15 */
16
17#include "includes.h"
18
19#ifdef SANDBOX_DARWIN
20
21#include <sys/types.h>
22
23#include <sandbox.h>
24
25#include <errno.h>
26#include <stdarg.h>
27#include <stdio.h>
28#include <stdlib.h>
29#include <string.h>
30#include <unistd.h>
31
32#include "log.h"
33#include "sandbox.h"
34#include "xmalloc.h"
35
36/* Darwin/OS X sandbox */
37
38struct ssh_sandbox {
39 pid_t child_pid;
40};
41
42struct ssh_sandbox *
43ssh_sandbox_init(void)
44{
45 struct ssh_sandbox *box;
46
47 /*
48 * Strictly, we don't need to maintain any state here but we need
49 * to return non-NULL to satisfy the API.
50 */
51 debug3("%s: preparing Darwin sandbox", __func__);
52 box = xcalloc(1, sizeof(*box));
53 box->child_pid = 0;
54
55 return box;
56}
57
58void
59ssh_sandbox_child(struct ssh_sandbox *box)
60{
61 char *errmsg;
62 struct rlimit rl_zero;
63
64 debug3("%s: starting Darwin sandbox", __func__);
65 if (sandbox_init(kSBXProfilePureComputation, SANDBOX_NAMED,
66 &errmsg) == -1)
67 fatal("%s: sandbox_init: %s", __func__, errmsg);
68
69 /*
70 * The kSBXProfilePureComputation still allows sockets, so
71 * we must disable these using rlimit.
72 */
73 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
74 if (setrlimit(RLIMIT_FSIZE, &rl_zero) == -1)
75 fatal("%s: setrlimit(RLIMIT_FSIZE, { 0, 0 }): %s",
76 __func__, strerror(errno));
77 if (setrlimit(RLIMIT_NOFILE, &rl_zero) == -1)
78 fatal("%s: setrlimit(RLIMIT_NOFILE, { 0, 0 }): %s",
79 __func__, strerror(errno));
80 if (setrlimit(RLIMIT_NPROC, &rl_zero) == -1)
81 fatal("%s: setrlimit(RLIMIT_NPROC, { 0, 0 }): %s",
82 __func__, strerror(errno));
83}
84
85void
86ssh_sandbox_parent_finish(struct ssh_sandbox *box)
87{
88 free(box);
89 debug3("%s: finished", __func__);
90}
91
92void
93ssh_sandbox_parent_preauth(struct ssh_sandbox *box, pid_t child_pid)
94{
95 box->child_pid = child_pid;
96}
97
98#endif /* SANDBOX_DARWIN */
diff --git a/sandbox-null.c b/sandbox-null.c
new file mode 100644
index 000000000..29fa9669f
--- /dev/null
+++ b/sandbox-null.c
@@ -0,0 +1,72 @@
1/* $OpenBSD$ */
2/*
3 * Copyright (c) 2011 Damien Miller <djm@mindrot.org>
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#include "includes.h"
19
20#ifdef SANDBOX_NULL
21
22#include <sys/types.h>
23
24#include <errno.h>
25#include <stdarg.h>
26#include <stdio.h>
27#include <stdlib.h>
28#include <string.h>
29#include <unistd.h>
30
31#include "log.h"
32#include "ssh-sandbox.h"
33#include "xmalloc.h"
34
35/* dummy sandbox */
36
37struct ssh_sandbox {
38 int junk;
39};
40
41struct ssh_sandbox *
42ssh_sandbox_init(void)
43{
44 struct ssh_sandbox *box;
45
46 /*
47 * Strictly, we don't need to maintain any state here but we need
48 * to return non-NULL to satisfy the API.
49 */
50 box = xcalloc(1, sizeof(*box));
51 return box;
52}
53
54void
55ssh_sandbox_child(struct ssh_sandbox *box)
56{
57 /* Nothing to do here */
58}
59
60void
61ssh_sandbox_parent_finish(struct ssh_sandbox *box)
62{
63 free(box);
64}
65
66void
67ssh_sandbox_parent_preauth(struct ssh_sandbox *box, pid_t child_pid)
68{
69 /* Nothing to do here */
70}
71
72#endif /* SANDBOX_NULL */
diff --git a/sandbox-rlimit.c b/sandbox-rlimit.c
new file mode 100644
index 000000000..761e9284f
--- /dev/null
+++ b/sandbox-rlimit.c
@@ -0,0 +1,93 @@
1/* $OpenBSD: sandbox-rlimit.c,v 1.3 2011/06/23 09:34:13 djm Exp $ */
2/*
3 * Copyright (c) 2011 Damien Miller <djm@mindrot.org>
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#include "includes.h"
19
20#ifdef SANDBOX_RLIMIT
21
22#include <sys/types.h>
23#include <sys/param.h>
24#include <sys/time.h>
25#include <sys/resource.h>
26
27#include <errno.h>
28#include <stdarg.h>
29#include <stdio.h>
30#include <stdlib.h>
31#include <string.h>
32#include <unistd.h>
33
34#include "log.h"
35#include "ssh-sandbox.h"
36#include "xmalloc.h"
37
38/* Minimal sandbox that sets zero nfiles, nprocs and filesize rlimits */
39
40struct ssh_sandbox {
41 pid_t child_pid;
42};
43
44struct ssh_sandbox *
45ssh_sandbox_init(void)
46{
47 struct ssh_sandbox *box;
48
49 /*
50 * Strictly, we don't need to maintain any state here but we need
51 * to return non-NULL to satisfy the API.
52 */
53 debug3("%s: preparing rlimit sandbox", __func__);
54 box = xcalloc(1, sizeof(*box));
55 box->child_pid = 0;
56
57 return box;
58}
59
60void
61ssh_sandbox_child(struct ssh_sandbox *box)
62{
63 struct rlimit rl_zero;
64
65 rl_zero.rlim_cur = rl_zero.rlim_max = 0;
66
67 if (setrlimit(RLIMIT_FSIZE, &rl_zero) == -1)
68 fatal("%s: setrlimit(RLIMIT_FSIZE, { 0, 0 }): %s",
69 __func__, strerror(errno));
70 if (setrlimit(RLIMIT_NOFILE, &rl_zero) == -1)
71 fatal("%s: setrlimit(RLIMIT_NOFILE, { 0, 0 }): %s",
72 __func__, strerror(errno));
73#ifdef HAVE_RLIMIT_NPROC
74 if (setrlimit(RLIMIT_NPROC, &rl_zero) == -1)
75 fatal("%s: setrlimit(RLIMIT_NPROC, { 0, 0 }): %s",
76 __func__, strerror(errno));
77#endif
78}
79
80void
81ssh_sandbox_parent_finish(struct ssh_sandbox *box)
82{
83 free(box);
84 debug3("%s: finished", __func__);
85}
86
87void
88ssh_sandbox_parent_preauth(struct ssh_sandbox *box, pid_t child_pid)
89{
90 box->child_pid = child_pid;
91}
92
93#endif /* SANDBOX_RLIMIT */
diff --git a/sandbox-systrace.c b/sandbox-systrace.c
new file mode 100644
index 000000000..5a39f4fe1
--- /dev/null
+++ b/sandbox-systrace.c
@@ -0,0 +1,198 @@
1/* $OpenBSD: sandbox-systrace.c,v 1.4 2011/07/29 14:42:45 djm Exp $ */
2/*
3 * Copyright (c) 2011 Damien Miller <djm@mindrot.org>
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#include "includes.h"
19
20#ifdef SANDBOX_SYSTRACE
21
22#include <sys/types.h>
23#include <sys/param.h>
24#include <sys/ioctl.h>
25#include <sys/syscall.h>
26#include <sys/socket.h>
27
28#include <dev/systrace.h>
29
30#include <errno.h>
31#include <fcntl.h>
32#include <limits.h>
33#include <stdarg.h>
34#include <stdio.h>
35#include <stdlib.h>
36#include <string.h>
37#include <unistd.h>
38
39#include "atomicio.h"
40#include "log.h"
41#include "ssh-sandbox.h"
42#include "xmalloc.h"
43
44struct sandbox_policy {
45 int syscall;
46 int action;
47};
48
49/* Permitted syscalls in preauth. Unlisted syscalls get SYSTR_POLICY_KILL */
50static const struct sandbox_policy preauth_policy[] = {
51 { SYS_open, SYSTR_POLICY_NEVER },
52
53 { SYS___sysctl, SYSTR_POLICY_PERMIT },
54 { SYS_close, SYSTR_POLICY_PERMIT },
55 { SYS_exit, SYSTR_POLICY_PERMIT },
56 { SYS_getpid, SYSTR_POLICY_PERMIT },
57 { SYS_gettimeofday, SYSTR_POLICY_PERMIT },
58 { SYS_madvise, SYSTR_POLICY_PERMIT },
59 { SYS_mmap, SYSTR_POLICY_PERMIT },
60 { SYS_mprotect, SYSTR_POLICY_PERMIT },
61 { SYS_poll, SYSTR_POLICY_PERMIT },
62 { SYS_munmap, SYSTR_POLICY_PERMIT },
63 { SYS_read, SYSTR_POLICY_PERMIT },
64 { SYS_select, SYSTR_POLICY_PERMIT },
65 { SYS_sigprocmask, SYSTR_POLICY_PERMIT },
66 { SYS_write, SYSTR_POLICY_PERMIT },
67 { -1, -1 }
68};
69
70struct ssh_sandbox {
71 int child_sock;
72 int parent_sock;
73 int systrace_fd;
74 pid_t child_pid;
75};
76
77struct ssh_sandbox *
78ssh_sandbox_init(void)
79{
80 struct ssh_sandbox *box;
81 int s[2];
82
83 debug3("%s: preparing systrace sandbox", __func__);
84 box = xcalloc(1, sizeof(*box));
85 if (socketpair(AF_UNIX, SOCK_STREAM, 0, s) == -1)
86 fatal("%s: socketpair: %s", __func__, strerror(errno));
87 box->child_sock = s[0];
88 box->parent_sock = s[1];
89 box->systrace_fd = -1;
90 box->child_pid = 0;
91
92 return box;
93}
94
95void
96ssh_sandbox_child(struct ssh_sandbox *box)
97{
98 char whatever = 0;
99
100 close(box->parent_sock);
101 /* Signal parent that we are ready */
102 debug3("%s: ready", __func__);
103 if (atomicio(vwrite, box->child_sock, &whatever, 1) != 1)
104 fatal("%s: write: %s", __func__, strerror(errno));
105 /* Wait for parent to signal for us to go */
106 if (atomicio(read, box->child_sock, &whatever, 1) != 1)
107 fatal("%s: read: %s", __func__, strerror(errno));
108 debug3("%s: started", __func__);
109 close(box->child_sock);
110}
111
112static void
113ssh_sandbox_parent(struct ssh_sandbox *box, pid_t child_pid,
114 const struct sandbox_policy *allowed_syscalls)
115{
116 int dev_systrace, i, j, found;
117 char whatever = 0;
118 struct systrace_policy policy;
119
120 debug3("%s: wait for child %ld", __func__, (long)child_pid);
121 box->child_pid = child_pid;
122 close(box->child_sock);
123 /* Wait for child to signal that it is ready */
124 if (atomicio(read, box->parent_sock, &whatever, 1) != 1)
125 fatal("%s: read: %s", __func__, strerror(errno));
126 debug3("%s: child %ld ready", __func__, (long)child_pid);
127
128 /* Set up systracing of child */
129 if ((dev_systrace = open("/dev/systrace", O_RDONLY)) == -1)
130 fatal("%s: open(\"/dev/systrace\"): %s", __func__,
131 strerror(errno));
132 if (ioctl(dev_systrace, STRIOCCLONE, &box->systrace_fd) == -1)
133 fatal("%s: ioctl(STRIOCCLONE, %d): %s", __func__,
134 dev_systrace, strerror(errno));
135 close(dev_systrace);
136 debug3("%s: systrace attach, fd=%d", __func__, box->systrace_fd);
137 if (ioctl(box->systrace_fd, STRIOCATTACH, &child_pid) == -1)
138 fatal("%s: ioctl(%d, STRIOCATTACH, %d): %s", __func__,
139 box->systrace_fd, child_pid, strerror(errno));
140
141 /* Allocate and assign policy */
142 bzero(&policy, sizeof(policy));
143 policy.strp_op = SYSTR_POLICY_NEW;
144 policy.strp_maxents = SYS_MAXSYSCALL;
145 if (ioctl(box->systrace_fd, STRIOCPOLICY, &policy) == -1)
146 fatal("%s: ioctl(%d, STRIOCPOLICY (new)): %s", __func__,
147 box->systrace_fd, strerror(errno));
148
149 policy.strp_op = SYSTR_POLICY_ASSIGN;
150 policy.strp_pid = box->child_pid;
151 if (ioctl(box->systrace_fd, STRIOCPOLICY, &policy) == -1)
152 fatal("%s: ioctl(%d, STRIOCPOLICY (assign)): %s",
153 __func__, box->systrace_fd, strerror(errno));
154
155 /* Set per-syscall policy */
156 for (i = 0; i < SYS_MAXSYSCALL; i++) {
157 found = 0;
158 for (j = 0; allowed_syscalls[j].syscall != -1; j++) {
159 if (allowed_syscalls[j].syscall == i) {
160 found = 1;
161 break;
162 }
163 }
164 policy.strp_op = SYSTR_POLICY_MODIFY;
165 policy.strp_code = i;
166 policy.strp_policy = found ?
167 allowed_syscalls[j].action : SYSTR_POLICY_KILL;
168 if (found)
169 debug3("%s: policy: enable syscall %d", __func__, i);
170 if (ioctl(box->systrace_fd, STRIOCPOLICY, &policy) == -1)
171 fatal("%s: ioctl(%d, STRIOCPOLICY (modify)): %s",
172 __func__, box->systrace_fd, strerror(errno));
173 }
174
175 /* Signal the child to start running */
176 debug3("%s: start child %ld", __func__, (long)child_pid);
177 if (atomicio(vwrite, box->parent_sock, &whatever, 1) != 1)
178 fatal("%s: write: %s", __func__, strerror(errno));
179 close(box->parent_sock);
180}
181
182void
183ssh_sandbox_parent_finish(struct ssh_sandbox *box)
184{
185 /* Closing this before the child exits will terminate it */
186 close(box->systrace_fd);
187
188 free(box);
189 debug3("%s: finished", __func__);
190}
191
192void
193ssh_sandbox_parent_preauth(struct ssh_sandbox *box, pid_t child_pid)
194{
195 ssh_sandbox_parent(box, child_pid, preauth_policy);
196}
197
198#endif /* SANDBOX_SYSTRACE */
diff --git a/scp.0 b/scp.0
index 72467c8ec..a4fad8ade 100644
--- a/scp.0
+++ b/scp.0
@@ -153,4 +153,4 @@ AUTHORS
153 Timo Rinne <tri@iki.fi> 153 Timo Rinne <tri@iki.fi>
154 Tatu Ylonen <ylo@cs.hut.fi> 154 Tatu Ylonen <ylo@cs.hut.fi>
155 155
156OpenBSD 4.9 December 9, 2010 OpenBSD 4.9 156OpenBSD 5.0 December 9, 2010 OpenBSD 5.0
diff --git a/servconf.c b/servconf.c
index 11a69f819..1911ac540 100644
--- a/servconf.c
+++ b/servconf.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: servconf.c,v 1.213 2010/11/13 23:27:50 djm Exp $ */ 1/* $OpenBSD: servconf.c,v 1.222 2011/06/22 21:57:01 djm Exp $ */
2/* 2/*
3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 3 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
4 * All rights reserved 4 * All rights reserved
@@ -130,8 +130,7 @@ initialize_server_options(ServerOptions *options)
130 options->use_dns = -1; 130 options->use_dns = -1;
131 options->client_alive_interval = -1; 131 options->client_alive_interval = -1;
132 options->client_alive_count_max = -1; 132 options->client_alive_count_max = -1;
133 options->authorized_keys_file = NULL; 133 options->num_authkeys_files = 0;
134 options->authorized_keys_file2 = NULL;
135 options->num_accept_env = 0; 134 options->num_accept_env = 0;
136 options->permit_tun = -1; 135 options->permit_tun = -1;
137 options->num_permitted_opens = -1; 136 options->num_permitted_opens = -1;
@@ -277,15 +276,12 @@ fill_default_server_options(ServerOptions *options)
277 options->client_alive_interval = 0; 276 options->client_alive_interval = 0;
278 if (options->client_alive_count_max == -1) 277 if (options->client_alive_count_max == -1)
279 options->client_alive_count_max = 3; 278 options->client_alive_count_max = 3;
280 if (options->authorized_keys_file2 == NULL) { 279 if (options->num_authkeys_files == 0) {
281 /* authorized_keys_file2 falls back to authorized_keys_file */ 280 options->authorized_keys_files[options->num_authkeys_files++] =
282 if (options->authorized_keys_file != NULL) 281 xstrdup(_PATH_SSH_USER_PERMITTED_KEYS);
283 options->authorized_keys_file2 = xstrdup(options->authorized_keys_file); 282 options->authorized_keys_files[options->num_authkeys_files++] =
284 else 283 xstrdup(_PATH_SSH_USER_PERMITTED_KEYS2);
285 options->authorized_keys_file2 = xstrdup(_PATH_SSH_USER_PERMITTED_KEYS2);
286 } 284 }
287 if (options->authorized_keys_file == NULL)
288 options->authorized_keys_file = xstrdup(_PATH_SSH_USER_PERMITTED_KEYS);
289 if (options->permit_tun == -1) 285 if (options->permit_tun == -1)
290 options->permit_tun = SSH_TUNMODE_NO; 286 options->permit_tun = SSH_TUNMODE_NO;
291 if (options->zero_knowledge_password_authentication == -1) 287 if (options->zero_knowledge_password_authentication == -1)
@@ -299,7 +295,7 @@ fill_default_server_options(ServerOptions *options)
299 295
300 /* Turn privilege separation on by default */ 296 /* Turn privilege separation on by default */
301 if (use_privsep == -1) 297 if (use_privsep == -1)
302 use_privsep = 1; 298 use_privsep = PRIVSEP_ON;
303 299
304#ifndef HAVE_MMAP 300#ifndef HAVE_MMAP
305 if (use_privsep && options->compression == 1) { 301 if (use_privsep && options->compression == 1) {
@@ -336,7 +332,7 @@ typedef enum {
336 sMaxStartups, sMaxAuthTries, sMaxSessions, 332 sMaxStartups, sMaxAuthTries, sMaxSessions,
337 sBanner, sUseDNS, sHostbasedAuthentication, 333 sBanner, sUseDNS, sHostbasedAuthentication,
338 sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, 334 sHostbasedUsesNameFromPacketOnly, sClientAliveInterval,
339 sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, 335 sClientAliveCountMax, sAuthorizedKeysFile,
340 sGssAuthentication, sGssCleanupCreds, sGssStrictAcceptor, 336 sGssAuthentication, sGssCleanupCreds, sGssStrictAcceptor,
341 sGssKeyEx, sGssStoreRekey, 337 sGssKeyEx, sGssStoreRekey,
342 sAcceptEnv, sPermitTunnel, 338 sAcceptEnv, sPermitTunnel,
@@ -467,7 +463,7 @@ static struct {
467 { "clientaliveinterval", sClientAliveInterval, SSHCFG_GLOBAL }, 463 { "clientaliveinterval", sClientAliveInterval, SSHCFG_GLOBAL },
468 { "clientalivecountmax", sClientAliveCountMax, SSHCFG_GLOBAL }, 464 { "clientalivecountmax", sClientAliveCountMax, SSHCFG_GLOBAL },
469 { "authorizedkeysfile", sAuthorizedKeysFile, SSHCFG_ALL }, 465 { "authorizedkeysfile", sAuthorizedKeysFile, SSHCFG_ALL },
470 { "authorizedkeysfile2", sAuthorizedKeysFile2, SSHCFG_ALL }, 466 { "authorizedkeysfile2", sDeprecated, SSHCFG_ALL },
471 { "useprivilegeseparation", sUsePrivilegeSeparation, SSHCFG_GLOBAL}, 467 { "useprivilegeseparation", sUsePrivilegeSeparation, SSHCFG_GLOBAL},
472 { "acceptenv", sAcceptEnv, SSHCFG_GLOBAL }, 468 { "acceptenv", sAcceptEnv, SSHCFG_GLOBAL },
473 { "permittunnel", sPermitTunnel, SSHCFG_ALL }, 469 { "permittunnel", sPermitTunnel, SSHCFG_ALL },
@@ -705,6 +701,43 @@ match_cfg_line(char **condition, int line, const char *user, const char *host,
705 701
706#define WHITESPACE " \t\r\n" 702#define WHITESPACE " \t\r\n"
707 703
704/* Multistate option parsing */
705struct multistate {
706 char *key;
707 int value;
708};
709static const struct multistate multistate_addressfamily[] = {
710 { "inet", AF_INET },
711 { "inet6", AF_INET6 },
712 { "any", AF_UNSPEC },
713 { NULL, -1 }
714};
715static const struct multistate multistate_permitrootlogin[] = {
716 { "without-password", PERMIT_NO_PASSWD },
717 { "forced-commands-only", PERMIT_FORCED_ONLY },
718 { "yes", PERMIT_YES },
719 { "no", PERMIT_NO },
720 { NULL, -1 }
721};
722static const struct multistate multistate_compression[] = {
723 { "delayed", COMP_DELAYED },
724 { "yes", COMP_ZLIB },
725 { "no", COMP_NONE },
726 { NULL, -1 }
727};
728static const struct multistate multistate_gatewayports[] = {
729 { "clientspecified", 2 },
730 { "yes", 1 },
731 { "no", 0 },
732 { NULL, -1 }
733};
734static const struct multistate multistate_privsep[] = {
735 { "sandbox", PRIVSEP_SANDBOX },
736 { "yes", PRIVSEP_ON },
737 { "no", PRIVSEP_OFF },
738 { NULL, -1 }
739};
740
708int 741int
709process_server_config_line(ServerOptions *options, char *line, 742process_server_config_line(ServerOptions *options, char *line,
710 const char *filename, int linenum, int *activep, const char *user, 743 const char *filename, int linenum, int *activep, const char *user,
@@ -718,6 +751,7 @@ process_server_config_line(ServerOptions *options, char *line,
718 int port; 751 int port;
719 u_int i, flags = 0; 752 u_int i, flags = 0;
720 size_t len; 753 size_t len;
754 const struct multistate *multistate_ptr;
721 755
722 cp = line; 756 cp = line;
723 if ((arg = strdelim(&cp)) == NULL) 757 if ((arg = strdelim(&cp)) == NULL)
@@ -833,24 +867,27 @@ process_server_config_line(ServerOptions *options, char *line,
833 break; 867 break;
834 868
835 case sAddressFamily: 869 case sAddressFamily:
870 intptr = &options->address_family;
871 multistate_ptr = multistate_addressfamily;
872 if (options->listen_addrs != NULL)
873 fatal("%s line %d: address family must be specified "
874 "before ListenAddress.", filename, linenum);
875 parse_multistate:
836 arg = strdelim(&cp); 876 arg = strdelim(&cp);
837 if (!arg || *arg == '\0') 877 if (!arg || *arg == '\0')
838 fatal("%s line %d: missing address family.", 878 fatal("%s line %d: missing argument.",
839 filename, linenum); 879 filename, linenum);
840 intptr = &options->address_family; 880 value = -1;
841 if (options->listen_addrs != NULL) 881 for (i = 0; multistate_ptr[i].key != NULL; i++) {
842 fatal("%s line %d: address family must be specified before " 882 if (strcasecmp(arg, multistate_ptr[i].key) == 0) {
843 "ListenAddress.", filename, linenum); 883 value = multistate_ptr[i].value;
844 if (strcasecmp(arg, "inet") == 0) 884 break;
845 value = AF_INET; 885 }
846 else if (strcasecmp(arg, "inet6") == 0) 886 }
847 value = AF_INET6; 887 if (value == -1)
848 else if (strcasecmp(arg, "any") == 0) 888 fatal("%s line %d: unsupported option \"%s\".",
849 value = AF_UNSPEC;
850 else
851 fatal("%s line %d: unsupported address family \"%s\".",
852 filename, linenum, arg); 889 filename, linenum, arg);
853 if (*intptr == -1) 890 if (*activep && *intptr == -1)
854 *intptr = value; 891 *intptr = value;
855 break; 892 break;
856 893
@@ -889,27 +926,8 @@ process_server_config_line(ServerOptions *options, char *line,
889 926
890 case sPermitRootLogin: 927 case sPermitRootLogin:
891 intptr = &options->permit_root_login; 928 intptr = &options->permit_root_login;
892 arg = strdelim(&cp); 929 multistate_ptr = multistate_permitrootlogin;
893 if (!arg || *arg == '\0') 930 goto parse_multistate;
894 fatal("%s line %d: missing yes/"
895 "without-password/forced-commands-only/no "
896 "argument.", filename, linenum);
897 value = 0; /* silence compiler */
898 if (strcmp(arg, "without-password") == 0)
899 value = PERMIT_NO_PASSWD;
900 else if (strcmp(arg, "forced-commands-only") == 0)
901 value = PERMIT_FORCED_ONLY;
902 else if (strcmp(arg, "yes") == 0)
903 value = PERMIT_YES;
904 else if (strcmp(arg, "no") == 0)
905 value = PERMIT_NO;
906 else
907 fatal("%s line %d: Bad yes/"
908 "without-password/forced-commands-only/no "
909 "argument: %s", filename, linenum, arg);
910 if (*activep && *intptr == -1)
911 *intptr = value;
912 break;
913 931
914 case sIgnoreRhosts: 932 case sIgnoreRhosts:
915 intptr = &options->ignore_rhosts; 933 intptr = &options->ignore_rhosts;
@@ -1056,43 +1074,13 @@ process_server_config_line(ServerOptions *options, char *line,
1056 1074
1057 case sCompression: 1075 case sCompression:
1058 intptr = &options->compression; 1076 intptr = &options->compression;
1059 arg = strdelim(&cp); 1077 multistate_ptr = multistate_compression;
1060 if (!arg || *arg == '\0') 1078 goto parse_multistate;
1061 fatal("%s line %d: missing yes/no/delayed "
1062 "argument.", filename, linenum);
1063 value = 0; /* silence compiler */
1064 if (strcmp(arg, "delayed") == 0)
1065 value = COMP_DELAYED;
1066 else if (strcmp(arg, "yes") == 0)
1067 value = COMP_ZLIB;
1068 else if (strcmp(arg, "no") == 0)
1069 value = COMP_NONE;
1070 else
1071 fatal("%s line %d: Bad yes/no/delayed "
1072 "argument: %s", filename, linenum, arg);
1073 if (*intptr == -1)
1074 *intptr = value;
1075 break;
1076 1079
1077 case sGatewayPorts: 1080 case sGatewayPorts:
1078 intptr = &options->gateway_ports; 1081 intptr = &options->gateway_ports;
1079 arg = strdelim(&cp); 1082 multistate_ptr = multistate_gatewayports;
1080 if (!arg || *arg == '\0') 1083 goto parse_multistate;
1081 fatal("%s line %d: missing yes/no/clientspecified "
1082 "argument.", filename, linenum);
1083 value = 0; /* silence compiler */
1084 if (strcmp(arg, "clientspecified") == 0)
1085 value = 2;
1086 else if (strcmp(arg, "yes") == 0)
1087 value = 1;
1088 else if (strcmp(arg, "no") == 0)
1089 value = 0;
1090 else
1091 fatal("%s line %d: Bad yes/no/clientspecified "
1092 "argument: %s", filename, linenum, arg);
1093 if (*activep && *intptr == -1)
1094 *intptr = value;
1095 break;
1096 1084
1097 case sUseDNS: 1085 case sUseDNS:
1098 intptr = &options->use_dns; 1086 intptr = &options->use_dns;
@@ -1130,7 +1118,8 @@ process_server_config_line(ServerOptions *options, char *line,
1130 1118
1131 case sUsePrivilegeSeparation: 1119 case sUsePrivilegeSeparation:
1132 intptr = &use_privsep; 1120 intptr = &use_privsep;
1133 goto parse_flag; 1121 multistate_ptr = multistate_privsep;
1122 goto parse_multistate;
1134 1123
1135 case sAllowUsers: 1124 case sAllowUsers:
1136 while ((arg = strdelim(&cp)) && *arg != '\0') { 1125 while ((arg = strdelim(&cp)) && *arg != '\0') {
@@ -1296,14 +1285,22 @@ process_server_config_line(ServerOptions *options, char *line,
1296 * AuthorizedKeysFile /etc/ssh_keys/%u 1285 * AuthorizedKeysFile /etc/ssh_keys/%u
1297 */ 1286 */
1298 case sAuthorizedKeysFile: 1287 case sAuthorizedKeysFile:
1299 charptr = &options->authorized_keys_file; 1288 if (*activep && options->num_authkeys_files == 0) {
1300 goto parse_tilde_filename; 1289 while ((arg = strdelim(&cp)) && *arg != '\0') {
1301 case sAuthorizedKeysFile2: 1290 if (options->num_authkeys_files >=
1302 charptr = &options->authorized_keys_file2; 1291 MAX_AUTHKEYS_FILES)
1303 goto parse_tilde_filename; 1292 fatal("%s line %d: "
1293 "too many authorized keys files.",
1294 filename, linenum);
1295 options->authorized_keys_files[
1296 options->num_authkeys_files++] =
1297 tilde_expand_filename(arg, getuid());
1298 }
1299 }
1300 return 0;
1301
1304 case sAuthorizedPrincipalsFile: 1302 case sAuthorizedPrincipalsFile:
1305 charptr = &options->authorized_principals_file; 1303 charptr = &options->authorized_principals_file;
1306 parse_tilde_filename:
1307 arg = strdelim(&cp); 1304 arg = strdelim(&cp);
1308 if (!arg || *arg == '\0') 1305 if (!arg || *arg == '\0')
1309 fatal("%s line %d: missing file name.", 1306 fatal("%s line %d: missing file name.",
@@ -1526,6 +1523,12 @@ parse_server_match_config(ServerOptions *options, const char *user,
1526 dst->n = src->n; \ 1523 dst->n = src->n; \
1527 } \ 1524 } \
1528} while(0) 1525} while(0)
1526#define M_CP_STRARRAYOPT(n, num_n) do {\
1527 if (src->num_n != 0) { \
1528 for (dst->num_n = 0; dst->num_n < src->num_n; dst->num_n++) \
1529 dst->n[dst->num_n] = xstrdup(src->n[dst->num_n]); \
1530 } \
1531} while(0)
1529 1532
1530/* 1533/*
1531 * Copy any supported values that are set. 1534 * Copy any supported values that are set.
@@ -1561,20 +1564,23 @@ copy_set_server_options(ServerOptions *dst, ServerOptions *src, int preauth)
1561 M_CP_INTOPT(ip_qos_interactive); 1564 M_CP_INTOPT(ip_qos_interactive);
1562 M_CP_INTOPT(ip_qos_bulk); 1565 M_CP_INTOPT(ip_qos_bulk);
1563 1566
1564 M_CP_STROPT(banner); 1567 /* See comment in servconf.h */
1568 COPY_MATCH_STRING_OPTS();
1569
1570 /*
1571 * The only things that should be below this point are string options
1572 * which are only used after authentication.
1573 */
1565 if (preauth) 1574 if (preauth)
1566 return; 1575 return;
1576
1567 M_CP_STROPT(adm_forced_command); 1577 M_CP_STROPT(adm_forced_command);
1568 M_CP_STROPT(chroot_directory); 1578 M_CP_STROPT(chroot_directory);
1569 M_CP_STROPT(trusted_user_ca_keys);
1570 M_CP_STROPT(revoked_keys_file);
1571 M_CP_STROPT(authorized_keys_file);
1572 M_CP_STROPT(authorized_keys_file2);
1573 M_CP_STROPT(authorized_principals_file);
1574} 1579}
1575 1580
1576#undef M_CP_INTOPT 1581#undef M_CP_INTOPT
1577#undef M_CP_STROPT 1582#undef M_CP_STROPT
1583#undef M_CP_STRARRAYOPT
1578 1584
1579void 1585void
1580parse_server_config(ServerOptions *options, const char *filename, Buffer *conf, 1586parse_server_config(ServerOptions *options, const char *filename, Buffer *conf,
@@ -1600,31 +1606,34 @@ parse_server_config(ServerOptions *options, const char *filename, Buffer *conf,
1600} 1606}
1601 1607
1602static const char * 1608static const char *
1603fmt_intarg(ServerOpCodes code, int val) 1609fmt_multistate_int(int val, const struct multistate *m)
1604{ 1610{
1605 if (code == sAddressFamily) { 1611 u_int i;
1606 switch (val) { 1612
1607 case AF_INET: 1613 for (i = 0; m[i].key != NULL; i++) {
1608 return "inet"; 1614 if (m[i].value == val)
1609 case AF_INET6: 1615 return m[i].key;
1610 return "inet6";
1611 case AF_UNSPEC:
1612 return "any";
1613 default:
1614 return "UNKNOWN";
1615 }
1616 }
1617 if (code == sPermitRootLogin) {
1618 switch (val) {
1619 case PERMIT_NO_PASSWD:
1620 return "without-password";
1621 case PERMIT_FORCED_ONLY:
1622 return "forced-commands-only";
1623 case PERMIT_YES:
1624 return "yes";
1625 }
1626 } 1616 }
1627 if (code == sProtocol) { 1617 return "UNKNOWN";
1618}
1619
1620static const char *
1621fmt_intarg(ServerOpCodes code, int val)
1622{
1623 if (val == -1)
1624 return "unset";
1625 switch (code) {
1626 case sAddressFamily:
1627 return fmt_multistate_int(val, multistate_addressfamily);
1628 case sPermitRootLogin:
1629 return fmt_multistate_int(val, multistate_permitrootlogin);
1630 case sGatewayPorts:
1631 return fmt_multistate_int(val, multistate_gatewayports);
1632 case sCompression:
1633 return fmt_multistate_int(val, multistate_compression);
1634 case sUsePrivilegeSeparation:
1635 return fmt_multistate_int(val, multistate_privsep);
1636 case sProtocol:
1628 switch (val) { 1637 switch (val) {
1629 case SSH_PROTO_1: 1638 case SSH_PROTO_1:
1630 return "1"; 1639 return "1";
@@ -1635,20 +1644,16 @@ fmt_intarg(ServerOpCodes code, int val)
1635 default: 1644 default:
1636 return "UNKNOWN"; 1645 return "UNKNOWN";
1637 } 1646 }
1647 default:
1648 switch (val) {
1649 case 0:
1650 return "no";
1651 case 1:
1652 return "yes";
1653 default:
1654 return "UNKNOWN";
1655 }
1638 } 1656 }
1639 if (code == sGatewayPorts && val == 2)
1640 return "clientspecified";
1641 if (code == sCompression && val == COMP_DELAYED)
1642 return "delayed";
1643 switch (val) {
1644 case -1:
1645 return "unset";
1646 case 0:
1647 return "no";
1648 case 1:
1649 return "yes";
1650 }
1651 return "UNKNOWN";
1652} 1657}
1653 1658
1654static const char * 1659static const char *
@@ -1688,7 +1693,18 @@ dump_cfg_strarray(ServerOpCodes code, u_int count, char **vals)
1688 u_int i; 1693 u_int i;
1689 1694
1690 for (i = 0; i < count; i++) 1695 for (i = 0; i < count; i++)
1691 printf("%s %s\n", lookup_opcode_name(code), vals[i]); 1696 printf("%s %s\n", lookup_opcode_name(code), vals[i]);
1697}
1698
1699static void
1700dump_cfg_strarray_oneline(ServerOpCodes code, u_int count, char **vals)
1701{
1702 u_int i;
1703
1704 printf("%s", lookup_opcode_name(code));
1705 for (i = 0; i < count; i++)
1706 printf(" %s", vals[i]);
1707 printf("\n");
1692} 1708}
1693 1709
1694void 1710void
@@ -1790,8 +1806,6 @@ dump_config(ServerOptions *o)
1790 dump_cfg_string(sCiphers, o->ciphers); 1806 dump_cfg_string(sCiphers, o->ciphers);
1791 dump_cfg_string(sMacs, o->macs); 1807 dump_cfg_string(sMacs, o->macs);
1792 dump_cfg_string(sBanner, o->banner); 1808 dump_cfg_string(sBanner, o->banner);
1793 dump_cfg_string(sAuthorizedKeysFile, o->authorized_keys_file);
1794 dump_cfg_string(sAuthorizedKeysFile2, o->authorized_keys_file2);
1795 dump_cfg_string(sForceCommand, o->adm_forced_command); 1809 dump_cfg_string(sForceCommand, o->adm_forced_command);
1796 dump_cfg_string(sChrootDirectory, o->chroot_directory); 1810 dump_cfg_string(sChrootDirectory, o->chroot_directory);
1797 dump_cfg_string(sTrustedUserCAKeys, o->trusted_user_ca_keys); 1811 dump_cfg_string(sTrustedUserCAKeys, o->trusted_user_ca_keys);
@@ -1804,6 +1818,8 @@ dump_config(ServerOptions *o)
1804 dump_cfg_string(sLogFacility, log_facility_name(o->log_facility)); 1818 dump_cfg_string(sLogFacility, log_facility_name(o->log_facility));
1805 1819
1806 /* string array arguments */ 1820 /* string array arguments */
1821 dump_cfg_strarray_oneline(sAuthorizedKeysFile, o->num_authkeys_files,
1822 o->authorized_keys_files);
1807 dump_cfg_strarray(sHostKeyFile, o->num_host_key_files, 1823 dump_cfg_strarray(sHostKeyFile, o->num_host_key_files,
1808 o->host_key_files); 1824 o->host_key_files);
1809 dump_cfg_strarray(sHostKeyFile, o->num_host_cert_files, 1825 dump_cfg_strarray(sHostKeyFile, o->num_host_cert_files,
@@ -1829,7 +1845,8 @@ dump_config(ServerOptions *o)
1829 } 1845 }
1830 dump_cfg_string(sPermitTunnel, s); 1846 dump_cfg_string(sPermitTunnel, s);
1831 1847
1832 printf("ipqos 0x%02x 0x%02x\n", o->ip_qos_interactive, o->ip_qos_bulk); 1848 printf("ipqos %s ", iptos2str(o->ip_qos_interactive));
1849 printf("%s\n", iptos2str(o->ip_qos_bulk));
1833 1850
1834 channel_print_adm_permitted_opens(); 1851 channel_print_adm_permitted_opens();
1835} 1852}
diff --git a/servconf.h b/servconf.h
index be3be0be3..0be15f09a 100644
--- a/servconf.h
+++ b/servconf.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: servconf.h,v 1.95 2010/11/13 23:27:50 djm Exp $ */ 1/* $OpenBSD: servconf.h,v 1.99 2011/06/22 21:57:01 djm Exp $ */
2 2
3/* 3/*
4 * Author: Tatu Ylonen <ylo@cs.hut.fi> 4 * Author: Tatu Ylonen <ylo@cs.hut.fi>
@@ -27,6 +27,7 @@
27#define MAX_HOSTCERTS 256 /* Max # host certificates. */ 27#define MAX_HOSTCERTS 256 /* Max # host certificates. */
28#define MAX_ACCEPT_ENV 256 /* Max # of env vars. */ 28#define MAX_ACCEPT_ENV 256 /* Max # of env vars. */
29#define MAX_MATCH_GROUPS 256 /* Max # of groups for Match. */ 29#define MAX_MATCH_GROUPS 256 /* Max # of groups for Match. */
30#define MAX_AUTHKEYS_FILES 256 /* Max # of authorized_keys files. */
30 31
31/* permit_root_login */ 32/* permit_root_login */
32#define PERMIT_NOT_SET -1 33#define PERMIT_NOT_SET -1
@@ -35,6 +36,11 @@
35#define PERMIT_NO_PASSWD 2 36#define PERMIT_NO_PASSWD 2
36#define PERMIT_YES 3 37#define PERMIT_YES 3
37 38
39/* use_privsep */
40#define PRIVSEP_OFF 0
41#define PRIVSEP_ON 1
42#define PRIVSEP_SANDBOX 2
43
38#define DEFAULT_AUTH_FAIL_MAX 6 /* Default for MaxAuthTries */ 44#define DEFAULT_AUTH_FAIL_MAX 6 /* Default for MaxAuthTries */
39#define DEFAULT_SESSIONS_MAX 10 /* Default for MaxSessions */ 45#define DEFAULT_SESSIONS_MAX 10 /* Default for MaxSessions */
40 46
@@ -149,8 +155,8 @@ typedef struct {
149 * disconnect the session 155 * disconnect the session
150 */ 156 */
151 157
152 char *authorized_keys_file; /* File containing public keys */ 158 u_int num_authkeys_files; /* Files containing public keys */
153 char *authorized_keys_file2; 159 char *authorized_keys_files[MAX_AUTHKEYS_FILES];
154 160
155 char *adm_forced_command; 161 char *adm_forced_command;
156 162
@@ -168,6 +174,20 @@ typedef struct {
168 char *authorized_principals_file; 174 char *authorized_principals_file;
169} ServerOptions; 175} ServerOptions;
170 176
177/*
178 * These are string config options that must be copied between the
179 * Match sub-config and the main config, and must be sent from the
180 * privsep slave to the privsep master. We use a macro to ensure all
181 * the options are copied and the copies are done in the correct order.
182 */
183#define COPY_MATCH_STRING_OPTS() do { \
184 M_CP_STROPT(banner); \
185 M_CP_STROPT(trusted_user_ca_keys); \
186 M_CP_STROPT(revoked_keys_file); \
187 M_CP_STROPT(authorized_principals_file); \
188 M_CP_STRARRAYOPT(authorized_keys_files, num_authkeys_files); \
189 } while (0)
190
171void initialize_server_options(ServerOptions *); 191void initialize_server_options(ServerOptions *);
172void fill_default_server_options(ServerOptions *); 192void fill_default_server_options(ServerOptions *);
173int process_server_config_line(ServerOptions *, char *, const char *, int, 193int process_server_config_line(ServerOptions *, char *, const char *, int,
diff --git a/serverloop.c b/serverloop.c
index db3c2514f..f7bbdad07 100644
--- a/serverloop.c
+++ b/serverloop.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: serverloop.c,v 1.159 2009/05/28 16:50:16 andreas Exp $ */ 1/* $OpenBSD: serverloop.c,v 1.160 2011/05/15 08:09:01 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -131,8 +131,8 @@ notify_setup(void)
131{ 131{
132 if (pipe(notify_pipe) < 0) { 132 if (pipe(notify_pipe) < 0) {
133 error("pipe(notify_pipe) failed %s", strerror(errno)); 133 error("pipe(notify_pipe) failed %s", strerror(errno));
134 } else if ((fcntl(notify_pipe[0], F_SETFD, 1) == -1) || 134 } else if ((fcntl(notify_pipe[0], F_SETFD, FD_CLOEXEC) == -1) ||
135 (fcntl(notify_pipe[1], F_SETFD, 1) == -1)) { 135 (fcntl(notify_pipe[1], F_SETFD, FD_CLOEXEC) == -1)) {
136 error("fcntl(notify_pipe, F_SETFD) failed %s", strerror(errno)); 136 error("fcntl(notify_pipe, F_SETFD) failed %s", strerror(errno));
137 close(notify_pipe[0]); 137 close(notify_pipe[0]);
138 close(notify_pipe[1]); 138 close(notify_pipe[1]);
diff --git a/session.c b/session.c
index 1eaacb528..5b34aa2a2 100644
--- a/session.c
+++ b/session.c
@@ -96,6 +96,10 @@
96#include <kafs.h> 96#include <kafs.h>
97#endif 97#endif
98 98
99#ifdef WITH_SELINUX
100#include <selinux/selinux.h>
101#endif
102
99#define IS_INTERNAL_SFTP(c) \ 103#define IS_INTERNAL_SFTP(c) \
100 (!strncmp(c, INTERNAL_SFTP_NAME, sizeof(INTERNAL_SFTP_NAME) - 1) && \ 104 (!strncmp(c, INTERNAL_SFTP_NAME, sizeof(INTERNAL_SFTP_NAME) - 1) && \
101 (c[sizeof(INTERNAL_SFTP_NAME) - 1] == '\0' || \ 105 (c[sizeof(INTERNAL_SFTP_NAME) - 1] == '\0' || \
@@ -1531,6 +1535,9 @@ do_pwchange(Session *s)
1531 if (s->ttyfd != -1) { 1535 if (s->ttyfd != -1) {
1532 fprintf(stderr, 1536 fprintf(stderr,
1533 "You must change your password now and login again!\n"); 1537 "You must change your password now and login again!\n");
1538#ifdef WITH_SELINUX
1539 setexeccon(NULL);
1540#endif
1534#ifdef PASSWD_NEEDS_USERNAME 1541#ifdef PASSWD_NEEDS_USERNAME
1535 execl(_PATH_PASSWD_PROG, "passwd", s->pw->pw_name, 1542 execl(_PATH_PASSWD_PROG, "passwd", s->pw->pw_name,
1536 (char *)NULL); 1543 (char *)NULL);
diff --git a/sftp-server.0 b/sftp-server.0
index b7d30ec09..08695a038 100644
--- a/sftp-server.0
+++ b/sftp-server.0
@@ -61,4 +61,4 @@ HISTORY
61AUTHORS 61AUTHORS
62 Markus Friedl <markus@openbsd.org> 62 Markus Friedl <markus@openbsd.org>
63 63
64OpenBSD 4.9 January 9, 2010 OpenBSD 4.9 64OpenBSD 5.0 January 9, 2010 OpenBSD 5.0
diff --git a/sftp-server.c b/sftp-server.c
index b268d0883..9d01c7d79 100644
--- a/sftp-server.c
+++ b/sftp-server.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sftp-server.c,v 1.93 2010/12/04 00:18:01 djm Exp $ */ 1/* $OpenBSD: sftp-server.c,v 1.94 2011/06/17 21:46:16 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000-2004 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000-2004 Markus Friedl. All rights reserved.
4 * 4 *
@@ -68,7 +68,7 @@ Buffer iqueue;
68Buffer oqueue; 68Buffer oqueue;
69 69
70/* Version of client */ 70/* Version of client */
71int version; 71u_int version;
72 72
73/* Disable writes */ 73/* Disable writes */
74int readonly; 74int readonly;
@@ -522,7 +522,7 @@ process_init(void)
522 Buffer msg; 522 Buffer msg;
523 523
524 version = get_int(); 524 version = get_int();
525 verbose("received client version %d", version); 525 verbose("received client version %u", version);
526 buffer_init(&msg); 526 buffer_init(&msg);
527 buffer_put_char(&msg, SSH2_FXP_VERSION); 527 buffer_put_char(&msg, SSH2_FXP_VERSION);
528 buffer_put_int(&msg, SSH2_FILEXFER_VERSION); 528 buffer_put_int(&msg, SSH2_FILEXFER_VERSION);
diff --git a/sftp.0 b/sftp.0
index 960ffb9df..f29776701 100644
--- a/sftp.0
+++ b/sftp.0
@@ -28,7 +28,13 @@ DESCRIPTION
28 The final usage format allows for automated sessions using the -b option. 28 The final usage format allows for automated sessions using the -b option.
29 In such cases, it is necessary to configure non-interactive 29 In such cases, it is necessary to configure non-interactive
30 authentication to obviate the need to enter a password at connection time 30 authentication to obviate the need to enter a password at connection time
31 (see sshd(8) and ssh-keygen(1) for details). The options are as follows: 31 (see sshd(8) and ssh-keygen(1) for details).
32
33 Since some usage formats use colon characters to delimit host names from
34 path names, IPv6 addresses must be enclosed in square brackets to avoid
35 ambiguity.
36
37 The options are as follows:
32 38
33 -1 Specify the use of protocol version 1. 39 -1 Specify the use of protocol version 1.
34 40
@@ -287,7 +293,7 @@ INTERACTIVE COMMANDS
287 remote-path is specified, then remote-path must specify a 293 remote-path is specified, then remote-path must specify a
288 directory. 294 directory.
289 295
290 If ether the -P or -p flag is specified, then full file 296 If either the -P or -p flag is specified, then full file
291 permissions and access times are copied too. 297 permissions and access times are copied too.
292 298
293 If the -r flag is specified then directories will be copied 299 If the -r flag is specified then directories will be copied
@@ -328,4 +334,4 @@ SEE ALSO
328 draft-ietf-secsh-filexfer-00.txt, January 2001, work in progress 334 draft-ietf-secsh-filexfer-00.txt, January 2001, work in progress
329 material. 335 material.
330 336
331OpenBSD 4.9 December 4, 2010 OpenBSD 4.9 337OpenBSD 5.0 August 7, 2011 OpenBSD 5.0
diff --git a/sftp.1 b/sftp.1
index 89b5d3544..eb88014e2 100644
--- a/sftp.1
+++ b/sftp.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: sftp.1,v 1.88 2010/12/04 00:18:01 djm Exp $ 1.\" $OpenBSD: sftp.1,v 1.90 2011/08/07 12:55:30 dtucker Exp $
2.\" 2.\"
3.\" Copyright (c) 2001 Damien Miller. All rights reserved. 3.\" Copyright (c) 2001 Damien Miller. All rights reserved.
4.\" 4.\"
@@ -22,7 +22,7 @@
22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24.\" 24.\"
25.Dd $Mdocdate: December 4 2010 $ 25.Dd $Mdocdate: August 7 2011 $
26.Dt SFTP 1 26.Dt SFTP 1
27.Os 27.Os
28.Sh NAME 28.Sh NAME
@@ -89,6 +89,10 @@ to obviate the need to enter a password at connection time (see
89and 89and
90.Xr ssh-keygen 1 90.Xr ssh-keygen 1
91for details). 91for details).
92.Pp
93Since some usage formats use colon characters to delimit host names from path
94names, IPv6 addresses must be enclosed in square brackets to avoid ambiguity.
95.Pp
92The options are as follows: 96The options are as follows:
93.Bl -tag -width Ds 97.Bl -tag -width Ds
94.It Fl 1 98.It Fl 1
@@ -479,7 +483,7 @@ is specified, then
479.Ar remote-path 483.Ar remote-path
480must specify a directory. 484must specify a directory.
481.Pp 485.Pp
482If ether the 486If either the
483.Fl P 487.Fl P
484or 488or
485.Fl p 489.Fl p
diff --git a/ssh-add.0 b/ssh-add.0
index d91512888..e1e2a6417 100644
--- a/ssh-add.0
+++ b/ssh-add.0
@@ -112,4 +112,4 @@ AUTHORS
112 created OpenSSH. Markus Friedl contributed the support for SSH protocol 112 created OpenSSH. Markus Friedl contributed the support for SSH protocol
113 versions 1.5 and 2.0. 113 versions 1.5 and 2.0.
114 114
115OpenBSD 4.9 October 28, 2010 OpenBSD 4.9 115OpenBSD 5.0 October 28, 2010 OpenBSD 5.0
diff --git a/ssh-add.c b/ssh-add.c
index 64bf89bc0..3e2f9f6ce 100644
--- a/ssh-add.c
+++ b/ssh-add.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-add.c,v 1.100 2010/08/31 12:33:38 djm Exp $ */ 1/* $OpenBSD: ssh-add.c,v 1.101 2011/05/04 21:15:29 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -145,8 +145,12 @@ add_file(AuthenticationConnection *ac, const char *filename)
145 char *comment = NULL, *fp; 145 char *comment = NULL, *fp;
146 char msg[1024], *certpath; 146 char msg[1024], *certpath;
147 int fd, perms_ok, ret = -1; 147 int fd, perms_ok, ret = -1;
148 Buffer keyblob;
148 149
149 if ((fd = open(filename, O_RDONLY)) < 0) { 150 if (strcmp(filename, "-") == 0) {
151 fd = STDIN_FILENO;
152 filename = "(stdin)";
153 } else if ((fd = open(filename, O_RDONLY)) < 0) {
150 perror(filename); 154 perror(filename);
151 return -1; 155 return -1;
152 } 156 }
@@ -155,18 +159,28 @@ add_file(AuthenticationConnection *ac, const char *filename)
155 * Since we'll try to load a keyfile multiple times, permission errors 159 * Since we'll try to load a keyfile multiple times, permission errors
156 * will occur multiple times, so check perms first and bail if wrong. 160 * will occur multiple times, so check perms first and bail if wrong.
157 */ 161 */
158 perms_ok = key_perm_ok(fd, filename); 162 if (fd != STDIN_FILENO) {
159 close(fd); 163 perms_ok = key_perm_ok(fd, filename);
160 if (!perms_ok) 164 if (!perms_ok) {
165 close(fd);
166 return -1;
167 }
168 }
169 buffer_init(&keyblob);
170 if (!key_load_file(fd, filename, &keyblob)) {
171 buffer_free(&keyblob);
172 close(fd);
161 return -1; 173 return -1;
174 }
175 close(fd);
162 176
163 /* At first, try empty passphrase */ 177 /* At first, try empty passphrase */
164 private = key_load_private(filename, "", &comment); 178 private = key_parse_private(&keyblob, filename, "", &comment);
165 if (comment == NULL) 179 if (comment == NULL)
166 comment = xstrdup(filename); 180 comment = xstrdup(filename);
167 /* try last */ 181 /* try last */
168 if (private == NULL && pass != NULL) 182 if (private == NULL && pass != NULL)
169 private = key_load_private(filename, pass, NULL); 183 private = key_parse_private(&keyblob, filename, pass, NULL);
170 if (private == NULL) { 184 if (private == NULL) {
171 /* clear passphrase since it did not work */ 185 /* clear passphrase since it did not work */
172 clear_pass(); 186 clear_pass();
@@ -177,9 +191,11 @@ add_file(AuthenticationConnection *ac, const char *filename)
177 if (strcmp(pass, "") == 0) { 191 if (strcmp(pass, "") == 0) {
178 clear_pass(); 192 clear_pass();
179 xfree(comment); 193 xfree(comment);
194 buffer_free(&keyblob);
180 return -1; 195 return -1;
181 } 196 }
182 private = key_load_private(filename, pass, &comment); 197 private = key_parse_private(&keyblob, filename, pass,
198 &comment);
183 if (private != NULL) 199 if (private != NULL)
184 break; 200 break;
185 clear_pass(); 201 clear_pass();
@@ -187,14 +203,7 @@ add_file(AuthenticationConnection *ac, const char *filename)
187 "Bad passphrase, try again for %.200s: ", comment); 203 "Bad passphrase, try again for %.200s: ", comment);
188 } 204 }
189 } 205 }
190 if (blacklisted_key(private, &fp) == 1) { 206 buffer_free(&keyblob);
191 fprintf(stderr, "Public key %s blacklisted (see "
192 "ssh-vulnkey(1)); refusing to add it\n", fp);
193 xfree(fp);
194 key_free(private);
195 xfree(comment);
196 return -1;
197 }
198 207
199 if (ssh_add_identity_constrained(ac, private, comment, lifetime, 208 if (ssh_add_identity_constrained(ac, private, comment, lifetime,
200 confirm)) { 209 confirm)) {
@@ -209,6 +218,14 @@ add_file(AuthenticationConnection *ac, const char *filename)
209 } else { 218 } else {
210 fprintf(stderr, "Could not add identity: %s\n", filename); 219 fprintf(stderr, "Could not add identity: %s\n", filename);
211 } 220 }
221 if (blacklisted_key(private, &fp) == 1) {
222 fprintf(stderr, "Public key %s blacklisted (see "
223 "ssh-vulnkey(1)); refusing to add it\n", fp);
224 xfree(fp);
225 key_free(private);
226 xfree(comment);
227 return -1;
228 }
212 229
213 230
214 /* Now try to add the certificate flavour too */ 231 /* Now try to add the certificate flavour too */
@@ -380,7 +397,6 @@ main(int argc, char **argv)
380 sanitise_stdfd(); 397 sanitise_stdfd();
381 398
382 __progname = ssh_get_progname(argv[0]); 399 __progname = ssh_get_progname(argv[0]);
383 init_rng();
384 seed_rng(); 400 seed_rng();
385 401
386 OpenSSL_add_all_algorithms(); 402 OpenSSL_add_all_algorithms();
diff --git a/ssh-agent.0 b/ssh-agent.0
index c3de21b42..751f49041 100644
--- a/ssh-agent.0
+++ b/ssh-agent.0
@@ -120,4 +120,4 @@ AUTHORS
120 created OpenSSH. Markus Friedl contributed the support for SSH protocol 120 created OpenSSH. Markus Friedl contributed the support for SSH protocol
121 versions 1.5 and 2.0. 121 versions 1.5 and 2.0.
122 122
123OpenBSD 4.9 November 21, 2010 OpenBSD 4.9 123OpenBSD 5.0 November 21, 2010 OpenBSD 5.0
diff --git a/ssh-agent.c b/ssh-agent.c
index afba413d7..b9498e6ef 100644
--- a/ssh-agent.c
+++ b/ssh-agent.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-agent.c,v 1.171 2010/11/21 01:01:13 djm Exp $ */ 1/* $OpenBSD: ssh-agent.c,v 1.172 2011/06/03 01:37:40 dtucker Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -1097,7 +1097,11 @@ cleanup_handler(int sig)
1097static void 1097static void
1098check_parent_exists(void) 1098check_parent_exists(void)
1099{ 1099{
1100 if (parent_pid != -1 && kill(parent_pid, 0) < 0) { 1100 /*
1101 * If our parent has exited then getppid() will return (pid_t)1,
1102 * so testing for that should be safe.
1103 */
1104 if (parent_pid != -1 && getppid() != parent_pid) {
1101 /* printf("Parent has died - Authentication agent exiting.\n"); */ 1105 /* printf("Parent has died - Authentication agent exiting.\n"); */
1102 cleanup_socket(); 1106 cleanup_socket();
1103 _exit(2); 1107 _exit(2);
@@ -1154,7 +1158,6 @@ main(int ac, char **av)
1154 OpenSSL_add_all_algorithms(); 1158 OpenSSL_add_all_algorithms();
1155 1159
1156 __progname = ssh_get_progname(av[0]); 1160 __progname = ssh_get_progname(av[0]);
1157 init_rng();
1158 seed_rng(); 1161 seed_rng();
1159 1162
1160 while ((ch = getopt(ac, av, "cdksa:t:")) != -1) { 1163 while ((ch = getopt(ac, av, "cdksa:t:")) != -1) {
diff --git a/ssh-keygen.0 b/ssh-keygen.0
index a01b30db0..6c1763d4d 100644
--- a/ssh-keygen.0
+++ b/ssh-keygen.0
@@ -24,6 +24,7 @@ SYNOPSIS
24 ssh-keygen -s ca_key -I certificate_identity [-h] [-n principals] 24 ssh-keygen -s ca_key -I certificate_identity [-h] [-n principals]
25 [-O option] [-V validity_interval] [-z serial_number] file ... 25 [-O option] [-V validity_interval] [-z serial_number] file ...
26 ssh-keygen -L [-f input_keyfile] 26 ssh-keygen -L [-f input_keyfile]
27 ssh-keygen -A
27 28
28DESCRIPTION 29DESCRIPTION
29 ssh-keygen generates, manages and converts authentication keys for 30 ssh-keygen generates, manages and converts authentication keys for
@@ -57,8 +58,8 @@ DESCRIPTION
57 the -p option. 58 the -p option.
58 59
59 There is no way to recover a lost passphrase. If the passphrase is lost 60 There is no way to recover a lost passphrase. If the passphrase is lost
60 or forgotten, a new key must be generated and copied to the corresponding 61 or forgotten, a new key must be generated and the corresponding public
61 public key to other machines. 62 key copied to other machines.
62 63
63 For RSA1 keys, there is also a comment field in the key file that is only 64 For RSA1 keys, there is also a comment field in the key file that is only
64 for convenience to the user to help identify the key. The comment can 65 for convenience to the user to help identify the key. The comment can
@@ -71,6 +72,12 @@ DESCRIPTION
71 72
72 The options are as follows: 73 The options are as follows:
73 74
75 -A For each of the key types (rsa1, rsa, dsa and ecdsa) for which
76 host keys do not exist, generate the host keys with the default
77 key file path, an empty passphrase, default bits for the key
78 type, and default comment. This is used by /etc/rc to generate
79 new host keys.
80
74 -a trials 81 -a trials
75 Specifies the number of primality tests to perform when screening 82 Specifies the number of primality tests to perform when screening
76 DH-GEX candidates using the -T command. 83 DH-GEX candidates using the -T command.
@@ -82,7 +89,11 @@ DESCRIPTION
82 Specifies the number of bits in the key to create. For RSA keys, 89 Specifies the number of bits in the key to create. For RSA keys,
83 the minimum size is 768 bits and the default is 2048 bits. 90 the minimum size is 768 bits and the default is 2048 bits.
84 Generally, 2048 bits is considered sufficient. DSA keys must be 91 Generally, 2048 bits is considered sufficient. DSA keys must be
85 exactly 1024 bits as specified by FIPS 186-2. 92 exactly 1024 bits as specified by FIPS 186-2. For ECDSA keys,
93 the -b flag determines they key length by selecting from one of
94 three elliptic curve sizes: 256, 384 or 521 bits. Attempting to
95 use bit lengths other than these three values for ECDSA keys will
96 fail.
86 97
87 -C comment 98 -C comment
88 Provides a new comment. 99 Provides a new comment.
@@ -231,7 +242,7 @@ DESCRIPTION
231 containing the private key, for the old passphrase, and twice for 242 containing the private key, for the old passphrase, and twice for
232 the new passphrase. 243 the new passphrase.
233 244
234 -q Silence ssh-keygen. Used by /etc/rc when creating a new key. 245 -q Silence ssh-keygen.
235 246
236 -R hostname 247 -R hostname
237 Removes all keys belonging to hostname from a known_hosts file. 248 Removes all keys belonging to hostname from a known_hosts file.
@@ -440,4 +451,4 @@ AUTHORS
440 created OpenSSH. Markus Friedl contributed the support for SSH protocol 451 created OpenSSH. Markus Friedl contributed the support for SSH protocol
441 versions 1.5 and 2.0. 452 versions 1.5 and 2.0.
442 453
443OpenBSD 4.9 October 28, 2010 OpenBSD 4.9 454OpenBSD 5.0 April 13, 2011 OpenBSD 5.0
diff --git a/ssh-keygen.1 b/ssh-keygen.1
index d0c00ebb0..7c8b1f202 100644
--- a/ssh-keygen.1
+++ b/ssh-keygen.1
@@ -1,4 +1,4 @@
1.\" $OpenBSD: ssh-keygen.1,v 1.101 2010/10/28 18:33:28 jmc Exp $ 1.\" $OpenBSD: ssh-keygen.1,v 1.106 2011/04/13 04:09:37 djm Exp $
2.\" 2.\"
3.\" Author: Tatu Ylonen <ylo@cs.hut.fi> 3.\" Author: Tatu Ylonen <ylo@cs.hut.fi>
4.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4.\" Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -35,7 +35,7 @@
35.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 35.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
36.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 36.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37.\" 37.\"
38.Dd $Mdocdate: October 28 2010 $ 38.Dd $Mdocdate: April 13 2011 $
39.Dt SSH-KEYGEN 1 39.Dt SSH-KEYGEN 1
40.Os 40.Os
41.Sh NAME 41.Sh NAME
@@ -117,6 +117,8 @@
117.Nm ssh-keygen 117.Nm ssh-keygen
118.Fl L 118.Fl L
119.Op Fl f Ar input_keyfile 119.Op Fl f Ar input_keyfile
120.Nm ssh-keygen
121.Fl A
120.Ek 122.Ek
121.Sh DESCRIPTION 123.Sh DESCRIPTION
122.Nm 124.Nm
@@ -171,9 +173,8 @@ The passphrase can be changed later by using the
171option. 173option.
172.Pp 174.Pp
173There is no way to recover a lost passphrase. 175There is no way to recover a lost passphrase.
174If the passphrase is 176If the passphrase is lost or forgotten, a new key must be generated
175lost or forgotten, a new key must be generated and copied to the 177and the corresponding public key copied to other machines.
176corresponding public key to other machines.
177.Pp 178.Pp
178For RSA1 keys, 179For RSA1 keys,
179there is also a comment field in the key file that is only for 180there is also a comment field in the key file that is only for
@@ -190,6 +191,11 @@ should be placed to be activated.
190.Pp 191.Pp
191The options are as follows: 192The options are as follows:
192.Bl -tag -width Ds 193.Bl -tag -width Ds
194.It Fl A
195For each of the key types (rsa1, rsa, dsa and ecdsa) for which host keys
196do not exist, generate the host keys with the default key file path,
197an empty passphrase, default bits for the key type, and default comment.
198This is used by system administration scripts to generate new host keys.
193.It Fl a Ar trials 199.It Fl a Ar trials
194Specifies the number of primality tests to perform when screening DH-GEX 200Specifies the number of primality tests to perform when screening DH-GEX
195candidates using the 201candidates using the
@@ -202,6 +208,12 @@ Specifies the number of bits in the key to create.
202For RSA keys, the minimum size is 768 bits and the default is 2048 bits. 208For RSA keys, the minimum size is 768 bits and the default is 2048 bits.
203Generally, 2048 bits is considered sufficient. 209Generally, 2048 bits is considered sufficient.
204DSA keys must be exactly 1024 bits as specified by FIPS 186-2. 210DSA keys must be exactly 1024 bits as specified by FIPS 186-2.
211For ECDSA keys, the
212.Fl b
213flag determines they key length by selecting from one of three elliptic
214curve sizes: 256, 384 or 521 bits.
215Attempting to use bit lengths other than these three values for ECDSA keys
216will fail.
205.It Fl C Ar comment 217.It Fl C Ar comment
206Provides a new comment. 218Provides a new comment.
207.It Fl c 219.It Fl c
@@ -391,7 +403,6 @@ new passphrase.
391.It Fl q 403.It Fl q
392Silence 404Silence
393.Nm ssh-keygen . 405.Nm ssh-keygen .
394Used by system administration scripts when creating a new key.
395.It Fl R Ar hostname 406.It Fl R Ar hostname
396Removes all keys belonging to 407Removes all keys belonging to
397.Ar hostname 408.Ar hostname
@@ -520,7 +531,7 @@ option.
520Valid generator values are 2, 3, and 5. 531Valid generator values are 2, 3, and 5.
521.Pp 532.Pp
522Screened DH groups may be installed in 533Screened DH groups may be installed in
523.Pa /etc/moduli . 534.Pa /etc/ssh/moduli .
524It is important that this file contains moduli of a range of bit lengths and 535It is important that this file contains moduli of a range of bit lengths and
525that both ends of a connection share common moduli. 536that both ends of a connection share common moduli.
526.Sh CERTIFICATES 537.Sh CERTIFICATES
@@ -646,7 +657,7 @@ on all machines
646where the user wishes to log in using public key authentication. 657where the user wishes to log in using public key authentication.
647There is no need to keep the contents of this file secret. 658There is no need to keep the contents of this file secret.
648.Pp 659.Pp
649.It Pa /etc/moduli 660.It Pa /etc/ssh/moduli
650Contains Diffie-Hellman groups used for DH-GEX. 661Contains Diffie-Hellman groups used for DH-GEX.
651The file format is described in 662The file format is described in
652.Xr moduli 5 . 663.Xr moduli 5 .
diff --git a/ssh-keygen.c b/ssh-keygen.c
index c95e4ab29..4b6218b10 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keygen.c,v 1.205 2011/01/11 06:13:10 djm Exp $ */ 1/* $OpenBSD: ssh-keygen.c,v 1.210 2011/04/18 00:46:05 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1994 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -49,10 +49,7 @@
49#include "hostfile.h" 49#include "hostfile.h"
50#include "dns.h" 50#include "dns.h"
51#include "ssh2.h" 51#include "ssh2.h"
52
53#ifdef ENABLE_PKCS11
54#include "ssh-pkcs11.h" 52#include "ssh-pkcs11.h"
55#endif
56 53
57/* Number of bits in the RSA/DSA key. This value can be set on the command line. */ 54/* Number of bits in the RSA/DSA key. This value can be set on the command line. */
58#define DEFAULT_BITS 2048 55#define DEFAULT_BITS 2048
@@ -160,6 +157,38 @@ int gen_candidates(FILE *, u_int32_t, u_int32_t, BIGNUM *);
160int prime_test(FILE *, FILE *, u_int32_t, u_int32_t); 157int prime_test(FILE *, FILE *, u_int32_t, u_int32_t);
161 158
162static void 159static void
160type_bits_valid(int type, u_int32_t *bitsp)
161{
162 u_int maxbits;
163
164 if (type == KEY_UNSPEC) {
165 fprintf(stderr, "unknown key type %s\n", key_type_name);
166 exit(1);
167 }
168 if (*bitsp == 0) {
169 if (type == KEY_DSA)
170 *bitsp = DEFAULT_BITS_DSA;
171 else if (type == KEY_ECDSA)
172 *bitsp = DEFAULT_BITS_ECDSA;
173 else
174 *bitsp = DEFAULT_BITS;
175 }
176 maxbits = (type == KEY_DSA) ?
177 OPENSSL_DSA_MAX_MODULUS_BITS : OPENSSL_RSA_MAX_MODULUS_BITS;
178 if (*bitsp > maxbits) {
179 fprintf(stderr, "key bits exceeds maximum %d\n", maxbits);
180 exit(1);
181 }
182 if (type == KEY_DSA && *bitsp != 1024)
183 fatal("DSA keys must be 1024 bits");
184 else if (type != KEY_ECDSA && *bitsp < 768)
185 fatal("Key must at least be 768 bits");
186 else if (type == KEY_ECDSA && key_ecdsa_bits_to_nid(*bitsp) == -1)
187 fatal("Invalid ECDSA key length - valid lengths are "
188 "256, 384 or 521 bits");
189}
190
191static void
163ask_filename(struct passwd *pw, const char *prompt) 192ask_filename(struct passwd *pw, const char *prompt)
164{ 193{
165 char buf[1024]; 194 char buf[1024];
@@ -818,6 +847,98 @@ do_fingerprint(struct passwd *pw)
818} 847}
819 848
820static void 849static void
850do_gen_all_hostkeys(struct passwd *pw)
851{
852 struct {
853 char *key_type;
854 char *key_type_display;
855 char *path;
856 } key_types[] = {
857 { "rsa1", "RSA1", _PATH_HOST_KEY_FILE },
858 { "rsa", "RSA" ,_PATH_HOST_RSA_KEY_FILE },
859 { "dsa", "DSA", _PATH_HOST_DSA_KEY_FILE },
860 { "ecdsa", "ECDSA",_PATH_HOST_ECDSA_KEY_FILE },
861 { NULL, NULL, NULL }
862 };
863
864 int first = 0;
865 struct stat st;
866 Key *private, *public;
867 char comment[1024];
868 int i, type, fd;
869 FILE *f;
870
871 for (i = 0; key_types[i].key_type; i++) {
872 if (stat(key_types[i].path, &st) == 0)
873 continue;
874 if (errno != ENOENT) {
875 printf("Could not stat %s: %s", key_types[i].path,
876 strerror(errno));
877 first = 0;
878 continue;
879 }
880
881 if (first == 0) {
882 first = 1;
883 printf("%s: generating new host keys: ", __progname);
884 }
885 printf("%s ", key_types[i].key_type_display);
886 fflush(stdout);
887 arc4random_stir();
888 type = key_type_from_name(key_types[i].key_type);
889 strlcpy(identity_file, key_types[i].path, sizeof(identity_file));
890 bits = 0;
891 type_bits_valid(type, &bits);
892 private = key_generate(type, bits);
893 if (private == NULL) {
894 fprintf(stderr, "key_generate failed\n");
895 first = 0;
896 continue;
897 }
898 public = key_from_private(private);
899 snprintf(comment, sizeof comment, "%s@%s", pw->pw_name,
900 hostname);
901 if (!key_save_private(private, identity_file, "", comment)) {
902 printf("Saving the key failed: %s.\n", identity_file);
903 key_free(private);
904 key_free(public);
905 first = 0;
906 continue;
907 }
908 key_free(private);
909 arc4random_stir();
910 strlcat(identity_file, ".pub", sizeof(identity_file));
911 fd = open(identity_file, O_WRONLY | O_CREAT | O_TRUNC, 0644);
912 if (fd == -1) {
913 printf("Could not save your public key in %s\n",
914 identity_file);
915 key_free(public);
916 first = 0;
917 continue;
918 }
919 f = fdopen(fd, "w");
920 if (f == NULL) {
921 printf("fdopen %s failed\n", identity_file);
922 key_free(public);
923 first = 0;
924 continue;
925 }
926 if (!key_write(public, f)) {
927 fprintf(stderr, "write key failed\n");
928 key_free(public);
929 first = 0;
930 continue;
931 }
932 fprintf(f, " %s\n", comment);
933 fclose(f);
934 key_free(public);
935
936 }
937 if (first != 0)
938 printf("\n");
939}
940
941static void
821printhost(FILE *f, const char *name, Key *public, int ca, int hash) 942printhost(FILE *f, const char *name, Key *public, int ca, int hash)
822{ 943{
823 if (print_fingerprint) { 944 if (print_fingerprint) {
@@ -1330,6 +1451,9 @@ prepare_options_buf(Buffer *c, int which)
1330 certflags_command != NULL) 1451 certflags_command != NULL)
1331 add_string_option(c, "force-command", certflags_command); 1452 add_string_option(c, "force-command", certflags_command);
1332 if ((which & OPTIONS_EXTENSIONS) != 0 && 1453 if ((which & OPTIONS_EXTENSIONS) != 0 &&
1454 (certflags_flags & CERTOPT_X_FWD) != 0)
1455 add_flag_option(c, "permit-X11-forwarding");
1456 if ((which & OPTIONS_EXTENSIONS) != 0 &&
1333 (certflags_flags & CERTOPT_AGENT_FWD) != 0) 1457 (certflags_flags & CERTOPT_AGENT_FWD) != 0)
1334 add_flag_option(c, "permit-agent-forwarding"); 1458 add_flag_option(c, "permit-agent-forwarding");
1335 if ((which & OPTIONS_EXTENSIONS) != 0 && 1459 if ((which & OPTIONS_EXTENSIONS) != 0 &&
@@ -1341,9 +1465,6 @@ prepare_options_buf(Buffer *c, int which)
1341 if ((which & OPTIONS_EXTENSIONS) != 0 && 1465 if ((which & OPTIONS_EXTENSIONS) != 0 &&
1342 (certflags_flags & CERTOPT_USER_RC) != 0) 1466 (certflags_flags & CERTOPT_USER_RC) != 0)
1343 add_flag_option(c, "permit-user-rc"); 1467 add_flag_option(c, "permit-user-rc");
1344 if ((which & OPTIONS_EXTENSIONS) != 0 &&
1345 (certflags_flags & CERTOPT_X_FWD) != 0)
1346 add_flag_option(c, "permit-X11-forwarding");
1347 if ((which & OPTIONS_CRITICAL) != 0 && 1468 if ((which & OPTIONS_CRITICAL) != 0 &&
1348 certflags_src_addr != NULL) 1469 certflags_src_addr != NULL)
1349 add_string_option(c, "source-address", certflags_src_addr); 1470 add_string_option(c, "source-address", certflags_src_addr);
@@ -1593,7 +1714,7 @@ add_cert_option(char *opt)
1593{ 1714{
1594 char *val; 1715 char *val;
1595 1716
1596 if (strcmp(opt, "clear") == 0) 1717 if (strcasecmp(opt, "clear") == 0)
1597 certflags_flags = 0; 1718 certflags_flags = 0;
1598 else if (strcasecmp(opt, "no-x11-forwarding") == 0) 1719 else if (strcasecmp(opt, "no-x11-forwarding") == 0)
1599 certflags_flags &= ~CERTOPT_X_FWD; 1720 certflags_flags &= ~CERTOPT_X_FWD;
@@ -1745,6 +1866,7 @@ usage(void)
1745{ 1866{
1746 fprintf(stderr, "usage: %s [options]\n", __progname); 1867 fprintf(stderr, "usage: %s [options]\n", __progname);
1747 fprintf(stderr, "Options:\n"); 1868 fprintf(stderr, "Options:\n");
1869 fprintf(stderr, " -A Generate non-existent host keys for all key types.\n");
1748 fprintf(stderr, " -a trials Number of trials for screening DH-GEX moduli.\n"); 1870 fprintf(stderr, " -a trials Number of trials for screening DH-GEX moduli.\n");
1749 fprintf(stderr, " -B Show bubblebabble digest of key file.\n"); 1871 fprintf(stderr, " -B Show bubblebabble digest of key file.\n");
1750 fprintf(stderr, " -b bits Number of bits in the key to create.\n"); 1872 fprintf(stderr, " -b bits Number of bits in the key to create.\n");
@@ -1799,9 +1921,9 @@ main(int argc, char **argv)
1799 struct passwd *pw; 1921 struct passwd *pw;
1800 struct stat st; 1922 struct stat st;
1801 int opt, type, fd; 1923 int opt, type, fd;
1802 u_int maxbits;
1803 u_int32_t memory = 0, generator_wanted = 0, trials = 100; 1924 u_int32_t memory = 0, generator_wanted = 0, trials = 100;
1804 int do_gen_candidates = 0, do_screen_candidates = 0; 1925 int do_gen_candidates = 0, do_screen_candidates = 0;
1926 int gen_all_hostkeys = 0;
1805 BIGNUM *start = NULL; 1927 BIGNUM *start = NULL;
1806 FILE *f; 1928 FILE *f;
1807 const char *errstr; 1929 const char *errstr;
@@ -1817,7 +1939,6 @@ main(int argc, char **argv)
1817 OpenSSL_add_all_algorithms(); 1939 OpenSSL_add_all_algorithms();
1818 log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1); 1940 log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1);
1819 1941
1820 init_rng();
1821 seed_rng(); 1942 seed_rng();
1822 1943
1823 /* we need this for the home * directory. */ 1944 /* we need this for the home * directory. */
@@ -1831,9 +1952,12 @@ main(int argc, char **argv)
1831 exit(1); 1952 exit(1);
1832 } 1953 }
1833 1954
1834 while ((opt = getopt(argc, argv, "degiqpclBHLhvxXyF:b:f:t:D:I:P:m:N:n:" 1955 while ((opt = getopt(argc, argv, "AegiqpclBHLhvxXyF:b:f:t:D:I:P:m:N:n:"
1835 "O:C:r:g:R:T:G:M:S:s:a:V:W:z:")) != -1) { 1956 "O:C:r:g:R:T:G:M:S:s:a:V:W:z:")) != -1) {
1836 switch (opt) { 1957 switch (opt) {
1958 case 'A':
1959 gen_all_hostkeys = 1;
1960 break;
1837 case 'b': 1961 case 'b':
1838 bits = (u_int32_t)strtonum(optarg, 256, 32768, &errstr); 1962 bits = (u_int32_t)strtonum(optarg, 256, 32768, &errstr);
1839 if (errstr) 1963 if (errstr)
@@ -1928,9 +2052,6 @@ main(int argc, char **argv)
1928 case 'y': 2052 case 'y':
1929 print_public = 1; 2053 print_public = 1;
1930 break; 2054 break;
1931 case 'd':
1932 key_type_name = "dsa";
1933 break;
1934 case 's': 2055 case 's':
1935 ca_key_path = optarg; 2056 ca_key_path = optarg;
1936 break; 2057 break;
@@ -2109,37 +2230,19 @@ main(int argc, char **argv)
2109 return (0); 2230 return (0);
2110 } 2231 }
2111 2232
2233 if (gen_all_hostkeys) {
2234 do_gen_all_hostkeys(pw);
2235 return (0);
2236 }
2237
2112 arc4random_stir(); 2238 arc4random_stir();
2113 2239
2114 if (key_type_name == NULL) 2240 if (key_type_name == NULL)
2115 key_type_name = "rsa"; 2241 key_type_name = "rsa";
2116 2242
2117 type = key_type_from_name(key_type_name); 2243 type = key_type_from_name(key_type_name);
2118 if (type == KEY_UNSPEC) { 2244 type_bits_valid(type, &bits);
2119 fprintf(stderr, "unknown key type %s\n", key_type_name); 2245
2120 exit(1);
2121 }
2122 if (bits == 0) {
2123 if (type == KEY_DSA)
2124 bits = DEFAULT_BITS_DSA;
2125 else if (type == KEY_ECDSA)
2126 bits = DEFAULT_BITS_ECDSA;
2127 else
2128 bits = DEFAULT_BITS;
2129 }
2130 maxbits = (type == KEY_DSA) ?
2131 OPENSSL_DSA_MAX_MODULUS_BITS : OPENSSL_RSA_MAX_MODULUS_BITS;
2132 if (bits > maxbits) {
2133 fprintf(stderr, "key bits exceeds maximum %d\n", maxbits);
2134 exit(1);
2135 }
2136 if (type == KEY_DSA && bits != 1024)
2137 fatal("DSA keys must be 1024 bits");
2138 else if (type != KEY_ECDSA && bits < 768)
2139 fatal("Key must at least be 768 bits");
2140 else if (type == KEY_ECDSA && key_ecdsa_bits_to_nid(bits) == -1)
2141 fatal("Invalid ECDSA key length - valid lengths are "
2142 "256, 384 or 521 bits");
2143 if (!quiet) 2246 if (!quiet)
2144 printf("Generating public/private %s key pair.\n", key_type_name); 2247 printf("Generating public/private %s key pair.\n", key_type_name);
2145 private = key_generate(type, bits); 2248 private = key_generate(type, bits);
diff --git a/ssh-keyscan.0 b/ssh-keyscan.0
index 4c3d2dbcc..d9db0d4c9 100644
--- a/ssh-keyscan.0
+++ b/ssh-keyscan.0
@@ -106,4 +106,4 @@ BUGS
106 This is because it opens a connection to the ssh port, reads the public 106 This is because it opens a connection to the ssh port, reads the public
107 key, and drops the connection as soon as it gets the key. 107 key, and drops the connection as soon as it gets the key.
108 108
109OpenBSD 4.9 August 31, 2010 OpenBSD 4.9 109OpenBSD 5.0 August 31, 2010 OpenBSD 5.0
diff --git a/ssh-keyscan.c b/ssh-keyscan.c
index 25d7ac66f..b085dd417 100644
--- a/ssh-keyscan.c
+++ b/ssh-keyscan.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keyscan.c,v 1.84 2011/01/04 20:44:13 otto Exp $ */ 1/* $OpenBSD: ssh-keyscan.c,v 1.85 2011/03/15 10:36:02 okan Exp $ */
2/* 2/*
3 * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>. 3 * Copyright 1995, 1996 by David Mazieres <dm@lcs.mit.edu>.
4 * 4 *
@@ -535,7 +535,7 @@ conloop(void)
535 seltime.tv_sec--; 535 seltime.tv_sec--;
536 } 536 }
537 } else 537 } else
538 seltime.tv_sec = seltime.tv_usec = 0; 538 timerclear(&seltime);
539 539
540 r = xcalloc(read_wait_nfdset, sizeof(fd_mask)); 540 r = xcalloc(read_wait_nfdset, sizeof(fd_mask));
541 e = xcalloc(read_wait_nfdset, sizeof(fd_mask)); 541 e = xcalloc(read_wait_nfdset, sizeof(fd_mask));
@@ -620,7 +620,6 @@ main(int argc, char **argv)
620 extern char *optarg; 620 extern char *optarg;
621 621
622 __progname = ssh_get_progname(argv[0]); 622 __progname = ssh_get_progname(argv[0]);
623 init_rng();
624 seed_rng(); 623 seed_rng();
625 TAILQ_INIT(&tq); 624 TAILQ_INIT(&tq);
626 625
diff --git a/ssh-keysign.0 b/ssh-keysign.0
index bff850f27..9252084c9 100644
--- a/ssh-keysign.0
+++ b/ssh-keysign.0
@@ -48,4 +48,4 @@ HISTORY
48AUTHORS 48AUTHORS
49 Markus Friedl <markus@openbsd.org> 49 Markus Friedl <markus@openbsd.org>
50 50
51OpenBSD 4.9 August 31, 2010 OpenBSD 4.9 51OpenBSD 5.0 August 31, 2010 OpenBSD 5.0
diff --git a/ssh-keysign.c b/ssh-keysign.c
index aa1be91f5..1deb7e141 100644
--- a/ssh-keysign.c
+++ b/ssh-keysign.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh-keysign.c,v 1.35 2010/08/31 12:33:38 djm Exp $ */ 1/* $OpenBSD: ssh-keysign.c,v 1.36 2011/02/16 00:31:14 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2002 Markus Friedl. All rights reserved. 3 * Copyright (c) 2002 Markus Friedl. All rights reserved.
4 * 4 *
@@ -178,7 +178,6 @@ main(int argc, char **argv)
178 178
179 permanently_set_uid(pw); 179 permanently_set_uid(pw);
180 180
181 init_rng();
182 seed_rng(); 181 seed_rng();
183 arc4random_stir(); 182 arc4random_stir();
184 183
diff --git a/ssh-pkcs11-helper.0 b/ssh-pkcs11-helper.0
index 22526781e..107117ed9 100644
--- a/ssh-pkcs11-helper.0
+++ b/ssh-pkcs11-helper.0
@@ -22,4 +22,4 @@ HISTORY
22AUTHORS 22AUTHORS
23 Markus Friedl <markus@openbsd.org> 23 Markus Friedl <markus@openbsd.org>
24 24
25OpenBSD 4.9 February 10, 2010 OpenBSD 4.9 25OpenBSD 5.0 February 10, 2010 OpenBSD 5.0
diff --git a/ssh-pkcs11-helper.c b/ssh-pkcs11-helper.c
index 8e3f57ace..cd33515f6 100644
--- a/ssh-pkcs11-helper.c
+++ b/ssh-pkcs11-helper.c
@@ -280,7 +280,6 @@ main(int argc, char **argv)
280 TAILQ_INIT(&pkcs11_keylist); 280 TAILQ_INIT(&pkcs11_keylist);
281 pkcs11_init(0); 281 pkcs11_init(0);
282 282
283 init_rng();
284 seed_rng(); 283 seed_rng();
285 __progname = ssh_get_progname(argv[0]); 284 __progname = ssh_get_progname(argv[0]);
286 285
diff --git a/ssh-pkcs11.c b/ssh-pkcs11.c
index 286c232c7..1f4c1c8e4 100644
--- a/ssh-pkcs11.c
+++ b/ssh-pkcs11.c
@@ -590,4 +590,18 @@ fail:
590 return (-1); 590 return (-1);
591} 591}
592 592
593#else
594
595int
596pkcs11_init(int interactive)
597{
598 return (0);
599}
600
601void
602pkcs11_terminate(void)
603{
604 return;
605}
606
593#endif /* ENABLE_PKCS11 */ 607#endif /* ENABLE_PKCS11 */
diff --git a/ssh-rand-helper.0 b/ssh-rand-helper.0
deleted file mode 100644
index 93d3554fc..000000000
--- a/ssh-rand-helper.0
+++ /dev/null
@@ -1,51 +0,0 @@
1SSH-RAND-HELPER(8) OpenBSD System Manager's Manual SSH-RAND-HELPER(8)
2
3NAME
4 ssh-rand-helper - random number gatherer for OpenSSH
5
6SYNOPSIS
7 ssh-rand-hlper [-vxXh] [-b bytes]
8
9DESCRIPTION
10 ssh-rand-helper is a small helper program used by ssh(1), ssh-add(1),
11 ssh-agent(1), ssh-keygen(1), ssh-keyscan(1) and sshd(8) to gather random
12 numbers of cryptographic quality if the openssl(4) library has not been
13 configured to provide them itself.
14
15 Normally ssh-rand-helper will generate a strong random seed and provide
16 it to the calling program via standard output. If standard output is a
17 tty, ssh-rand-helper will instead print the seed in hexidecimal format
18 unless told otherwise.
19
20 ssh-rand-helper will by default gather random numbers from the system
21 commands listed in /etc/ssh/ssh_prng_cmds. The output of each of the
22 commands listed will be hashed and used to generate a random seed for the
23 calling program. ssh-rand-helper will also store seed files in
24 ~/.ssh/prng_seed between executions.
25
26 Alternately, ssh-rand-helper may be configured at build time to collect
27 random numbers from a EGD/PRNGd server via a unix domain or localhost tcp
28 socket.
29
30 This program is not intended to be run by the end-user, so the few
31 commandline options are for debugging purposes only.
32
33 -b bytes
34 Specify the number of random bytes to include in the output.
35
36 -x Output a hexidecimal instead of a binary seed.
37
38 -X Force output of a binary seed, even if standard output is a tty
39
40 -v Turn on debugging message. Multiple -v options will increase the
41 debugging level.
42
43 -h Display a summary of options.
44
45AUTHORS
46 Damien Miller <djm@mindrot.org>
47
48SEE ALSO
49 ssh(1), ssh-add(1), ssh-keygen(1), sshd(8)
50
51OpenBSD 4.9 April 14, 2002 OpenBSD 4.9
diff --git a/ssh-rand-helper.8 b/ssh-rand-helper.8
deleted file mode 100644
index af5a72fcb..000000000
--- a/ssh-rand-helper.8
+++ /dev/null
@@ -1,94 +0,0 @@
1.\" $Id: ssh-rand-helper.8,v 1.3 2007/01/22 01:44:53 djm Exp $
2.\"
3.\" Copyright (c) 2002 Damien Miller. All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\" notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\" notice, this list of conditions and the following disclaimer in the
12.\" documentation and/or other materials provided with the distribution.
13.\"
14.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
15.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
16.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
17.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
18.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
19.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
20.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
21.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
22.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
23.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
24.\"
25.Dd April 14, 2002
26.Dt SSH-RAND-HELPER 8
27.Os
28.Sh NAME
29.Nm ssh-rand-helper
30.Nd random number gatherer for OpenSSH
31.Sh SYNOPSIS
32.Nm ssh-rand-hlper
33.Op Fl vxXh
34.Op Fl b Ar bytes
35.Sh DESCRIPTION
36.Nm
37is a small helper program used by
38.Xr ssh 1 ,
39.Xr ssh-add 1 ,
40.Xr ssh-agent 1 ,
41.Xr ssh-keygen 1 ,
42.Xr ssh-keyscan 1
43and
44.Xr sshd 8
45to gather random numbers of cryptographic quality if the
46.Xr openssl 4
47library has not been configured to provide them itself.
48.Pp
49Normally
50.Nm
51will generate a strong random seed and provide it to the calling
52program via standard output. If standard output is a tty,
53.Nm
54will instead print the seed in hexidecimal format unless told otherwise.
55.Pp
56.Nm
57will by default gather random numbers from the system commands listed
58in
59.Pa /etc/ssh/ssh_prng_cmds .
60The output of each of the commands listed will be hashed and used to
61generate a random seed for the calling program.
62.Nm
63will also store seed files in
64.Pa ~/.ssh/prng_seed
65between executions.
66.Pp
67Alternately,
68.Nm
69may be configured at build time to collect random numbers from a
70EGD/PRNGd server via a unix domain or localhost tcp socket.
71.Pp
72This program is not intended to be run by the end-user, so the few
73commandline options are for debugging purposes only.
74.Bl -tag -width Ds
75.It Fl b Ar bytes
76Specify the number of random bytes to include in the output.
77.It Fl x
78Output a hexidecimal instead of a binary seed.
79.It Fl X
80Force output of a binary seed, even if standard output is a tty
81.It Fl v
82Turn on debugging message. Multiple
83.Fl v
84options will increase the debugging level.
85.It Fl h
86Display a summary of options.
87.El
88.Sh AUTHORS
89Damien Miller <djm@mindrot.org>
90.Sh SEE ALSO
91.Xr ssh 1 ,
92.Xr ssh-add 1 ,
93.Xr ssh-keygen 1 ,
94.Xr sshd 8
diff --git a/ssh-rand-helper.c b/ssh-rand-helper.c
deleted file mode 100644
index fa5070499..000000000
--- a/ssh-rand-helper.c
+++ /dev/null
@@ -1,932 +0,0 @@
1/*
2 * Copyright (c) 2001-2002 Damien Miller. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions
6 * are met:
7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the
11 * documentation and/or other materials provided with the distribution.
12 *
13 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
14 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
15 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
16 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
17 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
18 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
19 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
20 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
21 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
22 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23 */
24
25#include "includes.h"
26
27#include <sys/types.h>
28#include <sys/resource.h>
29#include <sys/stat.h>
30#include <sys/wait.h>
31#include <sys/socket.h>
32
33#include <stdarg.h>
34#include <stddef.h>
35#include <string.h>
36
37#include <netinet/in.h>
38#include <arpa/inet.h>
39
40#ifdef HAVE_SYS_UN_H
41# include <sys/un.h>
42#endif
43
44#include <errno.h>
45#include <fcntl.h>
46#include <pwd.h>
47#include <signal.h>
48#include <time.h>
49#include <unistd.h>
50
51#include <openssl/rand.h>
52#include <openssl/sha.h>
53#include <openssl/crypto.h>
54
55/* SunOS 4.4.4 needs this */
56#ifdef HAVE_FLOATINGPOINT_H
57# include <floatingpoint.h>
58#endif /* HAVE_FLOATINGPOINT_H */
59
60#include "misc.h"
61#include "xmalloc.h"
62#include "atomicio.h"
63#include "pathnames.h"
64#include "log.h"
65
66/* Number of bytes we write out */
67#define OUTPUT_SEED_SIZE 48
68
69/* Length of on-disk seedfiles */
70#define SEED_FILE_SIZE 1024
71
72/* Maximum number of command-line arguments to read from file */
73#define NUM_ARGS 10
74
75/* Minimum number of usable commands to be considered sufficient */
76#define MIN_ENTROPY_SOURCES 16
77
78/* Path to on-disk seed file (relative to user's home directory */
79#ifndef SSH_PRNG_SEED_FILE
80# define SSH_PRNG_SEED_FILE _PATH_SSH_USER_DIR"/prng_seed"
81#endif
82
83/* Path to PRNG commands list */
84#ifndef SSH_PRNG_COMMAND_FILE
85# define SSH_PRNG_COMMAND_FILE SSHDIR "/ssh_prng_cmds"
86#endif
87
88extern char *__progname;
89
90#define WHITESPACE " \t\n"
91
92#ifndef RUSAGE_SELF
93# define RUSAGE_SELF 0
94#endif
95#ifndef RUSAGE_CHILDREN
96# define RUSAGE_CHILDREN 0
97#endif
98
99#if !defined(PRNGD_SOCKET) && !defined(PRNGD_PORT)
100# define USE_SEED_FILES
101#endif
102
103typedef struct {
104 /* Proportion of data that is entropy */
105 double rate;
106 /* Counter goes positive if this command times out */
107 unsigned int badness;
108 /* Increases by factor of two each timeout */
109 unsigned int sticky_badness;
110 /* Path to executable */
111 char *path;
112 /* argv to pass to executable */
113 char *args[NUM_ARGS]; /* XXX: arbitrary limit */
114 /* full command string (debug) */
115 char *cmdstring;
116} entropy_cmd_t;
117
118/* slow command timeouts (all in milliseconds) */
119/* static int entropy_timeout_default = ENTROPY_TIMEOUT_MSEC; */
120static int entropy_timeout_current = ENTROPY_TIMEOUT_MSEC;
121
122/* this is initialised from a file, by prng_read_commands() */
123static entropy_cmd_t *entropy_cmds = NULL;
124
125/* Prototypes */
126double stir_from_system(void);
127double stir_from_programs(void);
128double stir_gettimeofday(double entropy_estimate);
129double stir_clock(double entropy_estimate);
130double stir_rusage(int who, double entropy_estimate);
131double hash_command_output(entropy_cmd_t *src, unsigned char *hash);
132int get_random_bytes_prngd(unsigned char *buf, int len,
133 unsigned short tcp_port, char *socket_path);
134
135/*
136 * Collect 'len' bytes of entropy into 'buf' from PRNGD/EGD daemon
137 * listening either on 'tcp_port', or via Unix domain socket at *
138 * 'socket_path'.
139 * Either a non-zero tcp_port or a non-null socket_path must be
140 * supplied.
141 * Returns 0 on success, -1 on error
142 */
143int
144get_random_bytes_prngd(unsigned char *buf, int len,
145 unsigned short tcp_port, char *socket_path)
146{
147 int fd, addr_len, rval, errors;
148 u_char msg[2];
149 struct sockaddr_storage addr;
150 struct sockaddr_in *addr_in = (struct sockaddr_in *)&addr;
151 struct sockaddr_un *addr_un = (struct sockaddr_un *)&addr;
152 mysig_t old_sigpipe;
153
154 /* Sanity checks */
155 if (socket_path == NULL && tcp_port == 0)
156 fatal("You must specify a port or a socket");
157 if (socket_path != NULL &&
158 strlen(socket_path) >= sizeof(addr_un->sun_path))
159 fatal("Random pool path is too long");
160 if (len <= 0 || len > 255)
161 fatal("Too many bytes (%d) to read from PRNGD", len);
162
163 memset(&addr, '\0', sizeof(addr));
164
165 if (tcp_port != 0) {
166 addr_in->sin_family = AF_INET;
167 addr_in->sin_addr.s_addr = htonl(INADDR_LOOPBACK);
168 addr_in->sin_port = htons(tcp_port);
169 addr_len = sizeof(*addr_in);
170 } else {
171 addr_un->sun_family = AF_UNIX;
172 strlcpy(addr_un->sun_path, socket_path,
173 sizeof(addr_un->sun_path));
174 addr_len = offsetof(struct sockaddr_un, sun_path) +
175 strlen(socket_path) + 1;
176 }
177
178 old_sigpipe = mysignal(SIGPIPE, SIG_IGN);
179
180 errors = 0;
181 rval = -1;
182reopen:
183 fd = socket(addr.ss_family, SOCK_STREAM, 0);
184 if (fd == -1) {
185 error("Couldn't create socket: %s", strerror(errno));
186 goto done;
187 }
188
189 if (connect(fd, (struct sockaddr*)&addr, addr_len) == -1) {
190 if (tcp_port != 0) {
191 error("Couldn't connect to PRNGD port %d: %s",
192 tcp_port, strerror(errno));
193 } else {
194 error("Couldn't connect to PRNGD socket \"%s\": %s",
195 addr_un->sun_path, strerror(errno));
196 }
197 goto done;
198 }
199
200 /* Send blocking read request to PRNGD */
201 msg[0] = 0x02;
202 msg[1] = len;
203
204 if (atomicio(vwrite, fd, msg, sizeof(msg)) != sizeof(msg)) {
205 if (errno == EPIPE && errors < 10) {
206 close(fd);
207 errors++;
208 goto reopen;
209 }
210 error("Couldn't write to PRNGD socket: %s",
211 strerror(errno));
212 goto done;
213 }
214
215 if (atomicio(read, fd, buf, len) != (size_t)len) {
216 if (errno == EPIPE && errors < 10) {
217 close(fd);
218 errors++;
219 goto reopen;
220 }
221 error("Couldn't read from PRNGD socket: %s",
222 strerror(errno));
223 goto done;
224 }
225
226 rval = 0;
227done:
228 mysignal(SIGPIPE, old_sigpipe);
229 if (fd != -1)
230 close(fd);
231 return rval;
232}
233
234static int
235seed_from_prngd(unsigned char *buf, size_t bytes)
236{
237#ifdef PRNGD_PORT
238 debug("trying egd/prngd port %d", PRNGD_PORT);
239 if (get_random_bytes_prngd(buf, bytes, PRNGD_PORT, NULL) == 0)
240 return 0;
241#endif
242#ifdef PRNGD_SOCKET
243 debug("trying egd/prngd socket %s", PRNGD_SOCKET);
244 if (get_random_bytes_prngd(buf, bytes, 0, PRNGD_SOCKET) == 0)
245 return 0;
246#endif
247 return -1;
248}
249
250double
251stir_gettimeofday(double entropy_estimate)
252{
253 struct timeval tv;
254
255 if (gettimeofday(&tv, NULL) == -1)
256 fatal("Couldn't gettimeofday: %s", strerror(errno));
257
258 RAND_add(&tv, sizeof(tv), entropy_estimate);
259
260 return entropy_estimate;
261}
262
263double
264stir_clock(double entropy_estimate)
265{
266#ifdef HAVE_CLOCK
267 clock_t c;
268
269 c = clock();
270 RAND_add(&c, sizeof(c), entropy_estimate);
271
272 return entropy_estimate;
273#else /* _HAVE_CLOCK */
274 return 0;
275#endif /* _HAVE_CLOCK */
276}
277
278double
279stir_rusage(int who, double entropy_estimate)
280{
281#ifdef HAVE_GETRUSAGE
282 struct rusage ru;
283
284 if (getrusage(who, &ru) == -1)
285 return 0;
286
287 RAND_add(&ru, sizeof(ru), entropy_estimate);
288
289 return entropy_estimate;
290#else /* _HAVE_GETRUSAGE */
291 return 0;
292#endif /* _HAVE_GETRUSAGE */
293}
294
295static int
296timeval_diff(struct timeval *t1, struct timeval *t2)
297{
298 int secdiff, usecdiff;
299
300 secdiff = t2->tv_sec - t1->tv_sec;
301 usecdiff = (secdiff*1000000) + (t2->tv_usec - t1->tv_usec);
302 return (int)(usecdiff / 1000);
303}
304
305double
306hash_command_output(entropy_cmd_t *src, unsigned char *hash)
307{
308 char buf[8192];
309 fd_set rdset;
310 int bytes_read, cmd_eof, error_abort, msec_elapsed, p[2];
311 int status, total_bytes_read;
312 static int devnull = -1;
313 pid_t pid;
314 SHA_CTX sha;
315 struct timeval tv_start, tv_current;
316
317 debug3("Reading output from \'%s\'", src->cmdstring);
318
319 if (devnull == -1) {
320 devnull = open("/dev/null", O_RDWR);
321 if (devnull == -1)
322 fatal("Couldn't open /dev/null: %s",
323 strerror(errno));
324 }
325
326 if (pipe(p) == -1)
327 fatal("Couldn't open pipe: %s", strerror(errno));
328
329 (void)gettimeofday(&tv_start, NULL); /* record start time */
330
331 switch (pid = fork()) {
332 case -1: /* Error */
333 close(p[0]);
334 close(p[1]);
335 fatal("Couldn't fork: %s", strerror(errno));
336 /* NOTREACHED */
337 case 0: /* Child */
338 dup2(devnull, STDIN_FILENO);
339 dup2(p[1], STDOUT_FILENO);
340 dup2(p[1], STDERR_FILENO);
341 close(p[0]);
342 close(p[1]);
343 close(devnull);
344
345 execv(src->path, (char**)(src->args));
346
347 debug("(child) Couldn't exec '%s': %s",
348 src->cmdstring, strerror(errno));
349 _exit(-1);
350 default: /* Parent */
351 break;
352 }
353
354 RAND_add(&pid, sizeof(&pid), 0.0);
355
356 close(p[1]);
357
358 /* Hash output from child */
359 SHA1_Init(&sha);
360
361 cmd_eof = error_abort = msec_elapsed = total_bytes_read = 0;
362 while (!error_abort && !cmd_eof) {
363 int ret;
364 struct timeval tv;
365 int msec_remaining;
366
367 (void) gettimeofday(&tv_current, 0);
368 msec_elapsed = timeval_diff(&tv_start, &tv_current);
369 if (msec_elapsed >= entropy_timeout_current) {
370 error_abort=1;
371 continue;
372 }
373 msec_remaining = entropy_timeout_current - msec_elapsed;
374
375 FD_ZERO(&rdset);
376 FD_SET(p[0], &rdset);
377 tv.tv_sec = msec_remaining / 1000;
378 tv.tv_usec = (msec_remaining % 1000) * 1000;
379
380 ret = select(p[0] + 1, &rdset, NULL, NULL, &tv);
381
382 RAND_add(&tv, sizeof(tv), 0.0);
383
384 switch (ret) {
385 case 0:
386 /* timer expired */
387 error_abort = 1;
388 kill(pid, SIGINT);
389 break;
390 case 1:
391 /* command input */
392 do {
393 bytes_read = read(p[0], buf, sizeof(buf));
394 } while (bytes_read == -1 && errno == EINTR);
395 RAND_add(&bytes_read, sizeof(&bytes_read), 0.0);
396 if (bytes_read == -1) {
397 error_abort = 1;
398 break;
399 } else if (bytes_read) {
400 SHA1_Update(&sha, buf, bytes_read);
401 total_bytes_read += bytes_read;
402 } else {
403 cmd_eof = 1;
404 }
405 break;
406 case -1:
407 default:
408 /* error */
409 debug("Command '%s': select() failed: %s",
410 src->cmdstring, strerror(errno));
411 error_abort = 1;
412 break;
413 }
414 }
415
416 SHA1_Final(hash, &sha);
417
418 close(p[0]);
419
420 debug3("Time elapsed: %d msec", msec_elapsed);
421
422 if (waitpid(pid, &status, 0) == -1) {
423 error("Couldn't wait for child '%s' completion: %s",
424 src->cmdstring, strerror(errno));
425 return 0.0;
426 }
427
428 RAND_add(&status, sizeof(&status), 0.0);
429
430 if (error_abort) {
431 /*
432 * Closing p[0] on timeout causes the entropy command to
433 * SIGPIPE. Take whatever output we got, and mark this
434 * command as slow
435 */
436 debug2("Command '%s' timed out", src->cmdstring);
437 src->sticky_badness *= 2;
438 src->badness = src->sticky_badness;
439 return total_bytes_read;
440 }
441
442 if (WIFEXITED(status)) {
443 if (WEXITSTATUS(status) == 0) {
444 return total_bytes_read;
445 } else {
446 debug2("Command '%s' exit status was %d",
447 src->cmdstring, WEXITSTATUS(status));
448 src->badness = src->sticky_badness = 128;
449 return 0.0;
450 }
451 } else if (WIFSIGNALED(status)) {
452 debug2("Command '%s' returned on uncaught signal %d !",
453 src->cmdstring, status);
454 src->badness = src->sticky_badness = 128;
455 return 0.0;
456 } else
457 return 0.0;
458}
459
460double
461stir_from_system(void)
462{
463 double total_entropy_estimate;
464 long int i;
465
466 total_entropy_estimate = 0;
467
468 i = getpid();
469 RAND_add(&i, sizeof(i), 0.5);
470 total_entropy_estimate += 0.1;
471
472 i = getppid();
473 RAND_add(&i, sizeof(i), 0.5);
474 total_entropy_estimate += 0.1;
475
476 i = getuid();
477 RAND_add(&i, sizeof(i), 0.0);
478 i = getgid();
479 RAND_add(&i, sizeof(i), 0.0);
480
481 total_entropy_estimate += stir_gettimeofday(1.0);
482 total_entropy_estimate += stir_clock(0.5);
483 total_entropy_estimate += stir_rusage(RUSAGE_SELF, 2.0);
484
485 return total_entropy_estimate;
486}
487
488double
489stir_from_programs(void)
490{
491 int c;
492 double entropy, total_entropy;
493 unsigned char hash[SHA_DIGEST_LENGTH];
494
495 total_entropy = 0;
496 for(c = 0; entropy_cmds[c].path != NULL; c++) {
497 if (!entropy_cmds[c].badness) {
498 /* Hash output from command */
499 entropy = hash_command_output(&entropy_cmds[c],
500 hash);
501
502 /* Scale back estimate by command's rate */
503 entropy *= entropy_cmds[c].rate;
504
505 /* Upper bound of entropy is SHA_DIGEST_LENGTH */
506 if (entropy > SHA_DIGEST_LENGTH)
507 entropy = SHA_DIGEST_LENGTH;
508
509 /* Stir it in */
510 RAND_add(hash, sizeof(hash), entropy);
511
512 debug3("Got %0.2f bytes of entropy from '%s'",
513 entropy, entropy_cmds[c].cmdstring);
514
515 total_entropy += entropy;
516
517 /* Execution time should be a bit unpredictable */
518 total_entropy += stir_gettimeofday(0.05);
519 total_entropy += stir_clock(0.05);
520 total_entropy += stir_rusage(RUSAGE_SELF, 0.1);
521 total_entropy += stir_rusage(RUSAGE_CHILDREN, 0.1);
522 } else {
523 debug2("Command '%s' disabled (badness %d)",
524 entropy_cmds[c].cmdstring,
525 entropy_cmds[c].badness);
526
527 if (entropy_cmds[c].badness > 0)
528 entropy_cmds[c].badness--;
529 }
530 }
531
532 return total_entropy;
533}
534
535/*
536 * prng seedfile functions
537 */
538int
539prng_check_seedfile(char *filename)
540{
541 struct stat st;
542
543 /*
544 * XXX raceable: eg replace seed between this stat and subsequent
545 * open. Not such a problem because we don't really trust the
546 * seed file anyway.
547 * XXX: use secure path checking as elsewhere in OpenSSH
548 */
549 if (lstat(filename, &st) == -1) {
550 /* Give up on hard errors */
551 if (errno != ENOENT)
552 debug("WARNING: Couldn't stat random seed file "
553 "\"%.100s\": %s", filename, strerror(errno));
554 return 0;
555 }
556
557 /* regular file? */
558 if (!S_ISREG(st.st_mode))
559 fatal("PRNG seedfile %.100s is not a regular file",
560 filename);
561
562 /* mode 0600, owned by root or the current user? */
563 if (((st.st_mode & 0177) != 0) || !(st.st_uid == getuid())) {
564 debug("WARNING: PRNG seedfile %.100s must be mode 0600, "
565 "owned by uid %li", filename, (long int)getuid());
566 return 0;
567 }
568
569 return 1;
570}
571
572void
573prng_write_seedfile(void)
574{
575 int fd, save_errno;
576 unsigned char seed[SEED_FILE_SIZE];
577 char filename[MAXPATHLEN], tmpseed[MAXPATHLEN];
578 struct passwd *pw;
579 mode_t old_umask;
580
581 pw = getpwuid(getuid());
582 if (pw == NULL)
583 fatal("Couldn't get password entry for current user "
584 "(%li): %s", (long int)getuid(), strerror(errno));
585
586 /* Try to ensure that the parent directory is there */
587 snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir,
588 _PATH_SSH_USER_DIR);
589 if (mkdir(filename, 0700) < 0 && errno != EEXIST)
590 fatal("mkdir %.200s: %s", filename, strerror(errno));
591
592 snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir,
593 SSH_PRNG_SEED_FILE);
594
595 strlcpy(tmpseed, filename, sizeof(tmpseed));
596 if (strlcat(tmpseed, ".XXXXXXXXXX", sizeof(tmpseed)) >=
597 sizeof(tmpseed))
598 fatal("PRNG seed filename too long");
599
600 if (RAND_bytes(seed, sizeof(seed)) <= 0)
601 fatal("PRNG seed extraction failed");
602
603 /* Don't care if the seed doesn't exist */
604 prng_check_seedfile(filename);
605
606 old_umask = umask(0177);
607
608 if ((fd = mkstemp(tmpseed)) == -1) {
609 debug("WARNING: couldn't make temporary PRNG seedfile %.100s "
610 "(%.100s)", tmpseed, strerror(errno));
611 } else {
612 debug("writing PRNG seed to file %.100s", tmpseed);
613 if (atomicio(vwrite, fd, &seed, sizeof(seed)) < sizeof(seed)) {
614 save_errno = errno;
615 close(fd);
616 unlink(tmpseed);
617 fatal("problem writing PRNG seedfile %.100s "
618 "(%.100s)", filename, strerror(save_errno));
619 }
620 close(fd);
621 debug("moving temporary PRNG seed to file %.100s", filename);
622 if (rename(tmpseed, filename) == -1) {
623 save_errno = errno;
624 unlink(tmpseed);
625 fatal("problem renaming PRNG seedfile from %.100s "
626 "to %.100s (%.100s)", tmpseed, filename,
627 strerror(save_errno));
628 }
629 }
630 umask(old_umask);
631}
632
633void
634prng_read_seedfile(void)
635{
636 int fd;
637 char seed[SEED_FILE_SIZE], filename[MAXPATHLEN];
638 struct passwd *pw;
639
640 pw = getpwuid(getuid());
641 if (pw == NULL)
642 fatal("Couldn't get password entry for current user "
643 "(%li): %s", (long int)getuid(), strerror(errno));
644
645 snprintf(filename, sizeof(filename), "%.512s/%s", pw->pw_dir,
646 SSH_PRNG_SEED_FILE);
647
648 debug("loading PRNG seed from file %.100s", filename);
649
650 if (!prng_check_seedfile(filename)) {
651 verbose("Random seed file not found or invalid, ignoring.");
652 return;
653 }
654
655 /* open the file and read in the seed */
656 fd = open(filename, O_RDONLY);
657 if (fd == -1)
658 fatal("could not open PRNG seedfile %.100s (%.100s)",
659 filename, strerror(errno));
660
661 if (atomicio(read, fd, &seed, sizeof(seed)) < sizeof(seed)) {
662 verbose("invalid or short read from PRNG seedfile "
663 "%.100s - ignoring", filename);
664 memset(seed, '\0', sizeof(seed));
665 }
666 close(fd);
667
668 /* stir in the seed, with estimated entropy zero */
669 RAND_add(&seed, sizeof(seed), 0.0);
670}
671
672
673/*
674 * entropy command initialisation functions
675 */
676int
677prng_read_commands(char *cmdfilename)
678{
679 char cmd[SEED_FILE_SIZE], *cp, line[1024], path[SEED_FILE_SIZE];
680 double est;
681 entropy_cmd_t *entcmd;
682 FILE *f;
683 int cur_cmd, linenum, num_cmds, arg;
684
685 if ((f = fopen(cmdfilename, "r")) == NULL) {
686 fatal("couldn't read entropy commands file %.100s: %.100s",
687 cmdfilename, strerror(errno));
688 }
689
690 num_cmds = 64;
691 entcmd = xcalloc(num_cmds, sizeof(entropy_cmd_t));
692
693 /* Read in file */
694 cur_cmd = linenum = 0;
695 while (fgets(line, sizeof(line), f)) {
696 linenum++;
697
698 /* Skip leading whitespace, blank lines and comments */
699 cp = line + strspn(line, WHITESPACE);
700 if ((*cp == 0) || (*cp == '#'))
701 continue; /* done with this line */
702
703 /*
704 * The first non-whitespace char should be a double quote
705 * delimiting the commandline
706 */
707 if (*cp != '"') {
708 error("bad entropy command, %.100s line %d",
709 cmdfilename, linenum);
710 continue;
711 }
712
713 /*
714 * First token, command args (incl. argv[0]) in double
715 * quotes
716 */
717 cp = strtok(cp, "\"");
718 if (cp == NULL) {
719 error("missing or bad command string, %.100s "
720 "line %d -- ignored", cmdfilename, linenum);
721 continue;
722 }
723 strlcpy(cmd, cp, sizeof(cmd));
724
725 /* Second token, full command path */
726 if ((cp = strtok(NULL, WHITESPACE)) == NULL) {
727 error("missing command path, %.100s "
728 "line %d -- ignored", cmdfilename, linenum);
729 continue;
730 }
731
732 /* Did configure mark this as dead? */
733 if (strncmp("undef", cp, 5) == 0)
734 continue;
735
736 strlcpy(path, cp, sizeof(path));
737
738 /* Third token, entropy rate estimate for this command */
739 if ((cp = strtok(NULL, WHITESPACE)) == NULL) {
740 error("missing entropy estimate, %.100s "
741 "line %d -- ignored", cmdfilename, linenum);
742 continue;
743 }
744 est = strtod(cp, NULL);
745
746 /* end of line */
747 if ((cp = strtok(NULL, WHITESPACE)) != NULL) {
748 error("garbage at end of line %d in %.100s "
749 "-- ignored", linenum, cmdfilename);
750 continue;
751 }
752
753 /* save the command for debug messages */
754 entcmd[cur_cmd].cmdstring = xstrdup(cmd);
755
756 /* split the command args */
757 cp = strtok(cmd, WHITESPACE);
758 arg = 0;
759 do {
760 entcmd[cur_cmd].args[arg] = xstrdup(cp);
761 arg++;
762 } while(arg < NUM_ARGS && (cp = strtok(NULL, WHITESPACE)));
763
764 if (strtok(NULL, WHITESPACE))
765 error("ignored extra commands (max %d), %.100s "
766 "line %d", NUM_ARGS, cmdfilename, linenum);
767
768 /* Copy the command path and rate estimate */
769 entcmd[cur_cmd].path = xstrdup(path);
770 entcmd[cur_cmd].rate = est;
771
772 /* Initialise other values */
773 entcmd[cur_cmd].sticky_badness = 1;
774
775 cur_cmd++;
776
777 /*
778 * If we've filled the array, reallocate it twice the size
779 * Do this now because even if this we're on the last
780 * command we need another slot to mark the last entry
781 */
782 if (cur_cmd == num_cmds) {
783 num_cmds *= 2;
784 entcmd = xrealloc(entcmd, num_cmds,
785 sizeof(entropy_cmd_t));
786 }
787 }
788
789 /* zero the last entry */
790 memset(&entcmd[cur_cmd], '\0', sizeof(entropy_cmd_t));
791
792 /* trim to size */
793 entropy_cmds = xrealloc(entcmd, (cur_cmd + 1),
794 sizeof(entropy_cmd_t));
795
796 debug("Loaded %d entropy commands from %.100s", cur_cmd,
797 cmdfilename);
798
799 fclose(f);
800 return cur_cmd < MIN_ENTROPY_SOURCES ? -1 : 0;
801}
802
803void
804usage(void)
805{
806 fprintf(stderr, "Usage: %s [options]\n", __progname);
807 fprintf(stderr, " -v Verbose; display verbose debugging messages.\n");
808 fprintf(stderr, " Multiple -v increases verbosity.\n");
809 fprintf(stderr, " -x Force output in hexadecimal (for debugging)\n");
810 fprintf(stderr, " -X Force output in binary\n");
811 fprintf(stderr, " -b bytes Number of bytes to output (default %d)\n",
812 OUTPUT_SEED_SIZE);
813}
814
815int
816main(int argc, char **argv)
817{
818 unsigned char *buf;
819 int ret, ch, debug_level, output_hex, bytes;
820 extern char *optarg;
821 extern int optind;
822 LogLevel ll;
823
824 __progname = ssh_get_progname(argv[0]);
825 log_init(argv[0], SYSLOG_LEVEL_INFO, SYSLOG_FACILITY_USER, 1);
826
827 ll = SYSLOG_LEVEL_INFO;
828 debug_level = output_hex = 0;
829 bytes = OUTPUT_SEED_SIZE;
830
831 /* Don't write binary data to a tty, unless we are forced to */
832 if (isatty(STDOUT_FILENO))
833 output_hex = 1;
834
835 while ((ch = getopt(argc, argv, "vxXhb:")) != -1) {
836 switch (ch) {
837 case 'v':
838 if (debug_level < 3)
839 ll = SYSLOG_LEVEL_DEBUG1 + debug_level++;
840 break;
841 case 'x':
842 output_hex = 1;
843 break;
844 case 'X':
845 output_hex = 0;
846 break;
847 case 'b':
848 if ((bytes = atoi(optarg)) <= 0)
849 fatal("Invalid number of output bytes");
850 break;
851 case 'h':
852 usage();
853 exit(0);
854 default:
855 error("Invalid commandline option");
856 usage();
857 exit(1);
858 }
859 }
860 log_init(argv[0], ll, SYSLOG_FACILITY_USER, 1);
861
862 if (argc != optind) {
863 error("Unexpected commandline arguments.");
864 usage();
865 exit(1);
866 }
867
868#ifdef USE_SEED_FILES
869 prng_read_seedfile();
870#endif
871
872 buf = xmalloc(bytes);
873
874 /*
875 * Seed the RNG from wherever we can
876 */
877
878 /* Take whatever is on the stack, but don't credit it */
879 RAND_add(buf, bytes, 0);
880
881 debug("Seeded RNG with %i bytes from system calls",
882 (int)stir_from_system());
883
884 /* try prngd, fall back to commands if prngd fails or not configured */
885 if (seed_from_prngd(buf, bytes) == 0) {
886 RAND_add(buf, bytes, bytes);
887 } else {
888 /* Read in collection commands */
889 if (prng_read_commands(SSH_PRNG_COMMAND_FILE) == -1)
890 fatal("PRNG initialisation failed -- exiting.");
891 debug("Seeded RNG with %i bytes from programs",
892 (int)stir_from_programs());
893 }
894
895#ifdef USE_SEED_FILES
896 prng_write_seedfile();
897#endif
898
899 /*
900 * Write the seed to stdout
901 */
902
903 if (!RAND_status())
904 fatal("Not enough entropy in RNG");
905
906 if (RAND_bytes(buf, bytes) <= 0)
907 fatal("Couldn't extract entropy from PRNG");
908
909 if (output_hex) {
910 for(ret = 0; ret < bytes; ret++)
911 printf("%02x", (unsigned char)(buf[ret]));
912 printf("\n");
913 } else
914 ret = atomicio(vwrite, STDOUT_FILENO, buf, bytes);
915
916 memset(buf, '\0', bytes);
917 xfree(buf);
918
919 return ret == bytes ? 0 : 1;
920}
921
922/*
923 * We may attempt to re-seed during mkstemp if we are using the one in the
924 * compat library (via mkstemp -> _gettemp -> arc4random -> seed_rng) so we
925 * need our own seed_rng(). We must also check that we have enough entropy.
926 */
927void
928seed_rng(void)
929{
930 if (!RAND_status())
931 fatal("Not enough entropy in RNG");
932}
diff --git a/ssh-sandbox.h b/ssh-sandbox.h
new file mode 100755
index 000000000..dfecd5aa0
--- /dev/null
+++ b/ssh-sandbox.h
@@ -0,0 +1,23 @@
1/* $OpenBSD: ssh-sandbox.h,v 1.1 2011/06/23 09:34:13 djm Exp $ */
2/*
3 * Copyright (c) 2011 Damien Miller <djm@mindrot.org>
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18struct ssh_sandbox;
19
20struct ssh_sandbox *ssh_sandbox_init(void);
21void ssh_sandbox_child(struct ssh_sandbox *);
22void ssh_sandbox_parent_finish(struct ssh_sandbox *);
23void ssh_sandbox_parent_preauth(struct ssh_sandbox *, pid_t);
diff --git a/ssh-vulnkey.c b/ssh-vulnkey.c
index 2e29ba462..f8125e0bb 100644
--- a/ssh-vulnkey.c
+++ b/ssh-vulnkey.c
@@ -311,7 +311,6 @@ main(int argc, char **argv)
311 /* We don't need the RNG ourselves, but symbol references here allow 311 /* We don't need the RNG ourselves, but symbol references here allow
312 * ld to link us properly. 312 * ld to link us properly.
313 */ 313 */
314 init_rng();
315 seed_rng(); 314 seed_rng();
316 315
317 while ((opt = getopt(argc, argv, "ahqv")) != -1) { 316 while ((opt = getopt(argc, argv, "ahqv")) != -1) {
diff --git a/ssh.0 b/ssh.0
index c1d3135ce..1c98f7780 100644
--- a/ssh.0
+++ b/ssh.0
@@ -202,8 +202,9 @@ DESCRIPTION
202 the -O option is specified, the ctl_cmd argument is interpreted 202 the -O option is specified, the ctl_cmd argument is interpreted
203 and passed to the master process. Valid commands are: ``check'' 203 and passed to the master process. Valid commands are: ``check''
204 (check that the master process is running), ``forward'' (request 204 (check that the master process is running), ``forward'' (request
205 forwardings without command execution) and ``exit'' (request the 205 forwardings without command execution), ``exit'' (request the
206 master to exit). 206 master to exit), and ``stop'' (request the master to stop
207 accepting further multiplexing requests).
207 208
208 -o option 209 -o option
209 Can be used to give options in the format used in the 210 Can be used to give options in the format used in the
@@ -263,6 +264,7 @@ DESCRIPTION
263 PubkeyAuthentication 264 PubkeyAuthentication
264 RekeyLimit 265 RekeyLimit
265 RemoteForward 266 RemoteForward
267 RequestTTY
266 RhostsRSAAuthentication 268 RhostsRSAAuthentication
267 RSAAuthentication 269 RSAAuthentication
268 SendEnv 270 SendEnv
@@ -389,8 +391,9 @@ AUTHENTICATION
389 support similar authentication methods, but protocol 2 is the default 391 support similar authentication methods, but protocol 2 is the default
390 since it provides additional mechanisms for confidentiality (the traffic 392 since it provides additional mechanisms for confidentiality (the traffic
391 is encrypted using AES, 3DES, Blowfish, CAST128, or Arcfour) and 393 is encrypted using AES, 3DES, Blowfish, CAST128, or Arcfour) and
392 integrity (hmac-md5, hmac-sha1, umac-64, hmac-ripemd160). Protocol 1 394 integrity (hmac-md5, hmac-sha1, hmac-sha2-256, hmac-sha2-512, umac-64,
393 lacks a strong mechanism for ensuring the integrity of the connection. 395 hmac-ripemd160). Protocol 1 lacks a strong mechanism for ensuring the
396 integrity of the connection.
394 397
395 The methods available for authentication are: GSSAPI-based 398 The methods available for authentication are: GSSAPI-based
396 authentication, host-based authentication, public key authentication, 399 authentication, host-based authentication, public key authentication,
@@ -895,4 +898,4 @@ AUTHORS
895 created OpenSSH. Markus Friedl contributed the support for SSH protocol 898 created OpenSSH. Markus Friedl contributed the support for SSH protocol
896 versions 1.5 and 2.0. 899 versions 1.5 and 2.0.
897 900
898OpenBSD 4.9 November 18, 2010 OpenBSD 4.9 901OpenBSD 5.0 August 2, 2011 OpenBSD 5.0
diff --git a/ssh.1 b/ssh.1
index e0f237966..d20a5671e 100644
--- a/ssh.1
+++ b/ssh.1
@@ -33,8 +33,8 @@
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: ssh.1,v 1.316 2010/11/18 15:01:00 jmc Exp $ 36.\" $OpenBSD: ssh.1,v 1.320 2011/08/02 01:22:11 djm Exp $
37.Dd $Mdocdate: November 18 2010 $ 37.Dd $Mdocdate: August 2 2011 $
38.Dt SSH 1 38.Dt SSH 1
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -392,9 +392,11 @@ Valid commands are:
392.Dq check 392.Dq check
393(check that the master process is running), 393(check that the master process is running),
394.Dq forward 394.Dq forward
395(request forwardings without command execution) and 395(request forwardings without command execution),
396.Dq exit 396.Dq exit
397(request the master to exit). 397(request the master to exit), and
398.Dq stop
399(request the master to stop accepting further multiplexing requests).
398.It Fl o Ar option 400.It Fl o Ar option
399Can be used to give options in the format used in the configuration file. 401Can be used to give options in the format used in the configuration file.
400This is useful for specifying options for which there is no separate 402This is useful for specifying options for which there is no separate
@@ -454,6 +456,7 @@ For full details of the options listed below, and their possible values, see
454.It PubkeyAuthentication 456.It PubkeyAuthentication
455.It RekeyLimit 457.It RekeyLimit
456.It RemoteForward 458.It RemoteForward
459.It RequestTTY
457.It RhostsRSAAuthentication 460.It RhostsRSAAuthentication
458.It RSAAuthentication 461.It RSAAuthentication
459.It SendEnv 462.It SendEnv
@@ -664,7 +667,9 @@ Both protocols support similar authentication methods,
664but protocol 2 is the default since 667but protocol 2 is the default since
665it provides additional mechanisms for confidentiality 668it provides additional mechanisms for confidentiality
666(the traffic is encrypted using AES, 3DES, Blowfish, CAST128, or Arcfour) 669(the traffic is encrypted using AES, 3DES, Blowfish, CAST128, or Arcfour)
667and integrity (hmac-md5, hmac-sha1, umac-64, hmac-ripemd160). 670and integrity (hmac-md5, hmac-sha1,
671hmac-sha2-256, hmac-sha2-512,
672umac-64, hmac-ripemd160).
668Protocol 1 lacks a strong mechanism for ensuring the 673Protocol 1 lacks a strong mechanism for ensuring the
669integrity of the connection. 674integrity of the connection.
670.Pp 675.Pp
diff --git a/ssh.c b/ssh.c
index aa2ad4a2f..44b005687 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ssh.c,v 1.356 2011/01/06 22:23:53 djm Exp $ */ 1/* $OpenBSD: ssh.c,v 1.364 2011/08/02 23:15:03 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -111,13 +111,16 @@
111 111
112extern char *__progname; 112extern char *__progname;
113 113
114/* Saves a copy of argv for setproctitle emulation */
115#ifndef HAVE_SETPROCTITLE
116static char **saved_av;
117#endif
118
114/* Flag indicating whether debug mode is on. May be set on the command line. */ 119/* Flag indicating whether debug mode is on. May be set on the command line. */
115int debug_flag = 0; 120int debug_flag = 0;
116 121
117/* Flag indicating whether a tty should be allocated */ 122/* Flag indicating whether a tty should be requested */
118int tty_flag = 0; 123int tty_flag = 0;
119int no_tty_flag = 0;
120int force_tty_flag = 0;
121 124
122/* don't exec a shell */ 125/* don't exec a shell */
123int no_shell_flag = 0; 126int no_shell_flag = 0;
@@ -135,7 +138,7 @@ int stdin_null_flag = 0;
135int need_controlpersist_detach = 0; 138int need_controlpersist_detach = 0;
136 139
137/* Copies of flags for ControlPersist foreground slave */ 140/* Copies of flags for ControlPersist foreground slave */
138int ostdin_null_flag, ono_shell_flag, ono_tty_flag, otty_flag; 141int ostdin_null_flag, ono_shell_flag, otty_flag, orequest_tty;
139 142
140/* 143/*
141 * Flag indicating that ssh should fork after authentication. This is useful 144 * Flag indicating that ssh should fork after authentication. This is useful
@@ -214,6 +217,20 @@ static void main_sigchld_handler(int);
214void muxclient(const char *); 217void muxclient(const char *);
215void muxserver_listen(void); 218void muxserver_listen(void);
216 219
220/* ~/ expand a list of paths. NB. assumes path[n] is heap-allocated. */
221static void
222tilde_expand_paths(char **paths, u_int num_paths)
223{
224 u_int i;
225 char *cp;
226
227 for (i = 0; i < num_paths; i++) {
228 cp = tilde_expand_filename(paths[i], original_real_uid);
229 xfree(paths[i]);
230 paths[i] = cp;
231 }
232}
233
217/* 234/*
218 * Main program for the ssh client. 235 * Main program for the ssh client.
219 */ 236 */
@@ -222,11 +239,13 @@ main(int ac, char **av)
222{ 239{
223 int i, r, opt, exit_status, use_syslog; 240 int i, r, opt, exit_status, use_syslog;
224 char *p, *cp, *line, *argv0, buf[MAXPATHLEN], *host_arg; 241 char *p, *cp, *line, *argv0, buf[MAXPATHLEN], *host_arg;
242 char thishost[NI_MAXHOST], shorthost[NI_MAXHOST], portstr[NI_MAXSERV];
225 struct stat st; 243 struct stat st;
226 struct passwd *pw; 244 struct passwd *pw;
227 int dummy, timeout_ms; 245 int dummy, timeout_ms;
228 extern int optind, optreset; 246 extern int optind, optreset;
229 extern char *optarg; 247 extern char *optarg;
248
230 struct servent *sp; 249 struct servent *sp;
231 Forward fwd; 250 Forward fwd;
232 251
@@ -234,7 +253,17 @@ main(int ac, char **av)
234 sanitise_stdfd(); 253 sanitise_stdfd();
235 254
236 __progname = ssh_get_progname(av[0]); 255 __progname = ssh_get_progname(av[0]);
237 init_rng(); 256
257#ifndef HAVE_SETPROCTITLE
258 /* Prepare for later setproctitle emulation */
259 /* Save argv so it isn't clobbered by setproctitle() emulation */
260 saved_av = xcalloc(ac + 1, sizeof(*saved_av));
261 for (i = 0; i < ac; i++)
262 saved_av[i] = xstrdup(av[i]);
263 saved_av[i] = NULL;
264 compat_init_setproctitle(ac, av);
265 av = saved_av;
266#endif
238 267
239 /* 268 /*
240 * Discard other fds that are hanging around. These can cause problem 269 * Discard other fds that are hanging around. These can cause problem
@@ -346,6 +375,8 @@ main(int ac, char **av)
346 muxclient_command = SSHMUX_COMMAND_FORWARD; 375 muxclient_command = SSHMUX_COMMAND_FORWARD;
347 else if (strcmp(optarg, "exit") == 0) 376 else if (strcmp(optarg, "exit") == 0)
348 muxclient_command = SSHMUX_COMMAND_TERMINATE; 377 muxclient_command = SSHMUX_COMMAND_TERMINATE;
378 else if (strcmp(optarg, "stop") == 0)
379 muxclient_command = SSHMUX_COMMAND_STOP;
349 else 380 else
350 fatal("Invalid multiplex command."); 381 fatal("Invalid multiplex command.");
351 break; 382 break;
@@ -387,9 +418,10 @@ main(int ac, char **av)
387#endif 418#endif
388 break; 419 break;
389 case 't': 420 case 't':
390 if (tty_flag) 421 if (options.request_tty == REQUEST_TTY_YES)
391 force_tty_flag = 1; 422 options.request_tty = REQUEST_TTY_FORCE;
392 tty_flag = 1; 423 else
424 options.request_tty = REQUEST_TTY_YES;
393 break; 425 break;
394 case 'v': 426 case 'v':
395 if (debug_flag == 0) { 427 if (debug_flag == 0) {
@@ -432,7 +464,7 @@ main(int ac, char **av)
432 optarg); 464 optarg);
433 exit(255); 465 exit(255);
434 } 466 }
435 no_tty_flag = 1; 467 options.request_tty = REQUEST_TTY_NO;
436 no_shell_flag = 1; 468 no_shell_flag = 1;
437 options.clear_forwardings = 1; 469 options.clear_forwardings = 1;
438 options.exit_on_forward_failure = 1; 470 options.exit_on_forward_failure = 1;
@@ -541,10 +573,10 @@ main(int ac, char **av)
541 break; 573 break;
542 case 'N': 574 case 'N':
543 no_shell_flag = 1; 575 no_shell_flag = 1;
544 no_tty_flag = 1; 576 options.request_tty = REQUEST_TTY_NO;
545 break; 577 break;
546 case 'T': 578 case 'T':
547 no_tty_flag = 1; 579 options.request_tty = REQUEST_TTY_NO;
548 break; 580 break;
549 case 'o': 581 case 'o':
550 dummy = 1; 582 dummy = 1;
@@ -604,6 +636,10 @@ main(int ac, char **av)
604 /* Initialize the command to execute on remote host. */ 636 /* Initialize the command to execute on remote host. */
605 buffer_init(&command); 637 buffer_init(&command);
606 638
639 if (options.request_tty == REQUEST_TTY_YES ||
640 options.request_tty == REQUEST_TTY_FORCE)
641 tty_flag = 1;
642
607 /* 643 /*
608 * Save the command to execute on the remote host in a buffer. There 644 * Save the command to execute on the remote host in a buffer. There
609 * is no limit on the length of the command, except by the maximum 645 * is no limit on the length of the command, except by the maximum
@@ -611,7 +647,7 @@ main(int ac, char **av)
611 */ 647 */
612 if (!ac) { 648 if (!ac) {
613 /* No command specified - execute shell on a tty. */ 649 /* No command specified - execute shell on a tty. */
614 tty_flag = 1; 650 tty_flag = options.request_tty != REQUEST_TTY_NO;
615 if (subsystem_flag) { 651 if (subsystem_flag) {
616 fprintf(stderr, 652 fprintf(stderr,
617 "You must specify a subsystem to invoke.\n"); 653 "You must specify a subsystem to invoke.\n");
@@ -634,13 +670,14 @@ main(int ac, char **av)
634 670
635 /* Allocate a tty by default if no command specified. */ 671 /* Allocate a tty by default if no command specified. */
636 if (buffer_len(&command) == 0) 672 if (buffer_len(&command) == 0)
637 tty_flag = 1; 673 tty_flag = options.request_tty != REQUEST_TTY_NO;
638 674
639 /* Force no tty */ 675 /* Force no tty */
640 if (no_tty_flag || muxclient_command != 0) 676 if (options.request_tty == REQUEST_TTY_NO || muxclient_command != 0)
641 tty_flag = 0; 677 tty_flag = 0;
642 /* Do not allocate a tty if stdin is not a tty. */ 678 /* Do not allocate a tty if stdin is not a tty. */
643 if ((!isatty(fileno(stdin)) || stdin_null_flag) && !force_tty_flag) { 679 if ((!isatty(fileno(stdin)) || stdin_null_flag) &&
680 options.request_tty != REQUEST_TTY_FORCE) {
644 if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET) 681 if (tty_flag && options.log_level != SYSLOG_LEVEL_QUIET)
645 logit("Pseudo-terminal will not be allocated because " 682 logit("Pseudo-terminal will not be allocated because "
646 "stdin is not a terminal."); 683 "stdin is not a terminal.");
@@ -669,7 +706,7 @@ main(int ac, char **av)
669 if (r > 0 && (size_t)r < sizeof(buf)) 706 if (r > 0 && (size_t)r < sizeof(buf))
670 (void)read_config_file(buf, host, &options, 1); 707 (void)read_config_file(buf, host, &options, 1);
671 708
672 /* Read systemwide configuration file after use config. */ 709 /* Read systemwide configuration file after user config. */
673 (void)read_config_file(_PATH_HOST_CONFIG_FILE, host, 710 (void)read_config_file(_PATH_HOST_CONFIG_FILE, host,
674 &options, 0); 711 &options, 0);
675 } 712 }
@@ -700,17 +737,19 @@ main(int ac, char **av)
700 "h", host, (char *)NULL); 737 "h", host, (char *)NULL);
701 } 738 }
702 739
703 if (options.local_command != NULL) { 740 if (gethostname(thishost, sizeof(thishost)) == -1)
704 char thishost[NI_MAXHOST]; 741 fatal("gethostname: %s", strerror(errno));
742 strlcpy(shorthost, thishost, sizeof(shorthost));
743 shorthost[strcspn(thishost, ".")] = '\0';
744 snprintf(portstr, sizeof(portstr), "%d", options.port);
705 745
706 if (gethostname(thishost, sizeof(thishost)) == -1) 746 if (options.local_command != NULL) {
707 fatal("gethostname: %s", strerror(errno));
708 snprintf(buf, sizeof(buf), "%d", options.port);
709 debug3("expanding LocalCommand: %s", options.local_command); 747 debug3("expanding LocalCommand: %s", options.local_command);
710 cp = options.local_command; 748 cp = options.local_command;
711 options.local_command = percent_expand(cp, "d", pw->pw_dir, 749 options.local_command = percent_expand(cp, "d", pw->pw_dir,
712 "h", host, "l", thishost, "n", host_arg, "r", options.user, 750 "h", host, "l", thishost, "n", host_arg, "r", options.user,
713 "p", buf, "u", pw->pw_name, (char *)NULL); 751 "p", portstr, "u", pw->pw_name, "L", shorthost,
752 (char *)NULL);
714 debug3("expanded LocalCommand: %s", options.local_command); 753 debug3("expanded LocalCommand: %s", options.local_command);
715 xfree(cp); 754 xfree(cp);
716 } 755 }
@@ -734,16 +773,13 @@ main(int ac, char **av)
734 } 773 }
735 774
736 if (options.control_path != NULL) { 775 if (options.control_path != NULL) {
737 char thishost[NI_MAXHOST];
738
739 if (gethostname(thishost, sizeof(thishost)) == -1)
740 fatal("gethostname: %s", strerror(errno));
741 snprintf(buf, sizeof(buf), "%d", options.port);
742 cp = tilde_expand_filename(options.control_path, 776 cp = tilde_expand_filename(options.control_path,
743 original_real_uid); 777 original_real_uid);
744 xfree(options.control_path); 778 xfree(options.control_path);
745 options.control_path = percent_expand(cp, "p", buf, "h", host, 779 options.control_path = percent_expand(cp, "h", host,
746 "r", options.user, "l", thishost, (char *)NULL); 780 "l", thishost, "n", host_arg, "r", options.user,
781 "p", portstr, "u", pw->pw_name, "L", shorthost,
782 (char *)NULL);
747 xfree(cp); 783 xfree(cp);
748 } 784 }
749 if (muxclient_command != 0 && options.control_path == NULL) 785 if (muxclient_command != 0 && options.control_path == NULL)
@@ -864,15 +900,9 @@ main(int ac, char **av)
864 load_public_identity_files(); 900 load_public_identity_files();
865 901
866 /* Expand ~ in known host file names. */ 902 /* Expand ~ in known host file names. */
867 /* XXX mem-leaks: */ 903 tilde_expand_paths(options.system_hostfiles,
868 options.system_hostfile = 904 options.num_system_hostfiles);
869 tilde_expand_filename(options.system_hostfile, original_real_uid); 905 tilde_expand_paths(options.user_hostfiles, options.num_user_hostfiles);
870 options.user_hostfile =
871 tilde_expand_filename(options.user_hostfile, original_real_uid);
872 options.system_hostfile2 =
873 tilde_expand_filename(options.system_hostfile2, original_real_uid);
874 options.user_hostfile2 =
875 tilde_expand_filename(options.user_hostfile2, original_real_uid);
876 906
877 signal(SIGPIPE, SIG_IGN); /* ignore SIGPIPE early */ 907 signal(SIGPIPE, SIG_IGN); /* ignore SIGPIPE early */
878 signal(SIGCHLD, main_sigchld_handler); 908 signal(SIGCHLD, main_sigchld_handler);
@@ -945,8 +975,7 @@ control_persist_detach(void)
945 /* Parent: set up mux slave to connect to backgrounded master */ 975 /* Parent: set up mux slave to connect to backgrounded master */
946 debug2("%s: background process is %ld", __func__, (long)pid); 976 debug2("%s: background process is %ld", __func__, (long)pid);
947 stdin_null_flag = ostdin_null_flag; 977 stdin_null_flag = ostdin_null_flag;
948 no_shell_flag = ono_shell_flag; 978 options.request_tty = orequest_tty;
949 no_tty_flag = ono_tty_flag;
950 tty_flag = otty_flag; 979 tty_flag = otty_flag;
951 close(muxserver_sock); 980 close(muxserver_sock);
952 muxserver_sock = -1; 981 muxserver_sock = -1;
@@ -965,6 +994,7 @@ control_persist_detach(void)
965 if (devnull > STDERR_FILENO) 994 if (devnull > STDERR_FILENO)
966 close(devnull); 995 close(devnull);
967 } 996 }
997 setproctitle("%s [mux]", options.control_path);
968} 998}
969 999
970/* Do fork() after authentication. Used by "ssh -f" */ 1000/* Do fork() after authentication. Used by "ssh -f" */
@@ -1209,8 +1239,8 @@ ssh_session(void)
1209 /* Request forwarding with authentication spoofing. */ 1239 /* Request forwarding with authentication spoofing. */
1210 debug("Requesting X11 forwarding with authentication " 1240 debug("Requesting X11 forwarding with authentication "
1211 "spoofing."); 1241 "spoofing.");
1212 x11_request_forwarding_with_spoofing(0, display, proto, data); 1242 x11_request_forwarding_with_spoofing(0, display, proto,
1213 1243 data, 0);
1214 /* Read response from the server. */ 1244 /* Read response from the server. */
1215 type = packet_read(); 1245 type = packet_read();
1216 if (type == SSH_SMSG_SUCCESS) { 1246 if (type == SSH_SMSG_SUCCESS) {
@@ -1308,9 +1338,11 @@ ssh_session2_setup(int id, int success, void *arg)
1308 /* Request forwarding with authentication spoofing. */ 1338 /* Request forwarding with authentication spoofing. */
1309 debug("Requesting X11 forwarding with authentication " 1339 debug("Requesting X11 forwarding with authentication "
1310 "spoofing."); 1340 "spoofing.");
1311 x11_request_forwarding_with_spoofing(id, display, proto, data); 1341 x11_request_forwarding_with_spoofing(id, display, proto,
1342 data, 1);
1343 client_expect_confirm(id, "X11 forwarding", CONFIRM_WARN);
1344 /* XXX exit_on_forward_failure */
1312 interactive = 1; 1345 interactive = 1;
1313 /* XXX wait for reply */
1314 } 1346 }
1315 1347
1316 check_agent_present(); 1348 check_agent_present();
@@ -1393,11 +1425,10 @@ ssh_session2(void)
1393 if (options.control_persist && muxserver_sock != -1) { 1425 if (options.control_persist && muxserver_sock != -1) {
1394 ostdin_null_flag = stdin_null_flag; 1426 ostdin_null_flag = stdin_null_flag;
1395 ono_shell_flag = no_shell_flag; 1427 ono_shell_flag = no_shell_flag;
1396 ono_tty_flag = no_tty_flag; 1428 orequest_tty = options.request_tty;
1397 otty_flag = tty_flag; 1429 otty_flag = tty_flag;
1398 stdin_null_flag = 1; 1430 stdin_null_flag = 1;
1399 no_shell_flag = 1; 1431 no_shell_flag = 1;
1400 no_tty_flag = 1;
1401 tty_flag = 0; 1432 tty_flag = 0;
1402 if (!fork_after_authentication_flag) 1433 if (!fork_after_authentication_flag)
1403 need_controlpersist_detach = 1; 1434 need_controlpersist_detach = 1;
diff --git a/ssh_config.0 b/ssh_config.0
index c4a12f7bb..7b9205681 100644
--- a/ssh_config.0
+++ b/ssh_config.0
@@ -47,6 +47,12 @@ DESCRIPTION
47 line (i.e. the name is not converted to a canonicalized host name 47 line (i.e. the name is not converted to a canonicalized host name
48 before matching). 48 before matching).
49 49
50 A pattern entry may be negated by prefixing it with an
51 exclamation mark (`!'). If a negated entry is matched, then the
52 Host entry is ignored, regardless of whether any other patterns
53 on the line match. Negated matches are therefore useful to
54 provide exceptions for wildcard matches.
55
50 See PATTERNS for more information on patterns. 56 See PATTERNS for more information on patterns.
51 57
52 AddressFamily 58 AddressFamily
@@ -160,13 +166,16 @@ DESCRIPTION
160 ControlPath 166 ControlPath
161 Specify the path to the control socket used for connection 167 Specify the path to the control socket used for connection
162 sharing as described in the ControlMaster section above or the 168 sharing as described in the ControlMaster section above or the
163 string ``none'' to disable connection sharing. In the path, `%l' 169 string ``none'' to disable connection sharing. In the path, `%L'
164 will be substituted by the local host name, `%h' will be 170 will be substituted by the first component of the local host
165 substituted by the target host name, `%p' the port, and `%r' by 171 name, `%l' will be substituted by the local host name (including
166 the remote login username. It is recommended that any 172 any domain name), `%h' will be substituted by the target host
167 ControlPath used for opportunistic connection sharing include at 173 name, `%n' will be substituted by the original target host name
168 least %h, %p, and %r. This ensures that shared connections are 174 specified on the command line, `%p' the port, `%r' by the remote
169 uniquely identified. 175 login username, and `%u' by the username of the user running
176 ssh(1). It is recommended that any ControlPath used for
177 opportunistic connection sharing include at least %h, %p, and %r.
178 This ensures that shared connections are uniquely identified.
170 179
171 ControlPersist 180 ControlPersist
172 When used in conjunction with ControlMaster, specifies that the 181 When used in conjunction with ControlMaster, specifies that the
@@ -282,8 +291,9 @@ DESCRIPTION
282 default is ``no''. 291 default is ``no''.
283 292
284 GlobalKnownHostsFile 293 GlobalKnownHostsFile
285 Specifies a file to use for the global host key database instead 294 Specifies one or more files to use for the global host key
286 of /etc/ssh/ssh_known_hosts. 295 database, separated by whitespace. The default is
296 /etc/ssh/ssh_known_hosts, /etc/ssh/ssh_known_hosts2.
287 297
288 GSSAPIAuthentication 298 GSSAPIAuthentication
289 Specifies whether user authentication based on GSSAPI is allowed. 299 Specifies whether user authentication based on GSSAPI is allowed.
@@ -336,7 +346,7 @@ DESCRIPTION
336 Specifies the real host name to log into. This can be used to 346 Specifies the real host name to log into. This can be used to
337 specify nicknames or abbreviations for hosts. If the hostname 347 specify nicknames or abbreviations for hosts. If the hostname
338 contains the character sequence `%h', then this will be replaced 348 contains the character sequence `%h', then this will be replaced
339 with the host name specified on the commandline (this is useful 349 with the host name specified on the command line (this is useful
340 for manipulating unqualified names). The default is the name 350 for manipulating unqualified names). The default is the name
341 given on the command line. Numeric IP addresses are also 351 given on the command line. Numeric IP addresses are also
342 permitted (both on the command line and in HostName 352 permitted (both on the command line and in HostName
@@ -367,7 +377,9 @@ DESCRIPTION
367 377
368 It is possible to have multiple identity files specified in 378 It is possible to have multiple identity files specified in
369 configuration files; all these identities will be tried in 379 configuration files; all these identities will be tried in
370 sequence. 380 sequence. Multiple IdentityFile directives will add to the list
381 of identities tried (this behaviour differs from that of other
382 configuration directives).
371 383
372 IPQoS Specifies the IPv4 type-of-service or DSCP class for connections. 384 IPQoS Specifies the IPv4 type-of-service or DSCP class for connections.
373 Accepted values are ``af11'', ``af12'', ``af13'', ``af14'', 385 Accepted values are ``af11'', ``af12'', ``af13'', ``af14'',
@@ -451,7 +463,9 @@ DESCRIPTION
451 must be comma-separated. The default is: 463 must be comma-separated. The default is:
452 464
453 hmac-md5,hmac-sha1,umac-64@openssh.com, 465 hmac-md5,hmac-sha1,umac-64@openssh.com,
454 hmac-ripemd160,hmac-sha1-96,hmac-md5-96 466 hmac-ripemd160,hmac-sha1-96,hmac-md5-96,
467 hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,
468 hmac-sha2-512-96
455 469
456 NoHostAuthenticationForLocalhost 470 NoHostAuthenticationForLocalhost
457 This option can be used if the home directory is shared across 471 This option can be used if the home directory is shared across
@@ -555,6 +569,14 @@ DESCRIPTION
555 if the server's GatewayPorts option is enabled (see 569 if the server's GatewayPorts option is enabled (see
556 sshd_config(5)). 570 sshd_config(5)).
557 571
572 RequestTTY
573 Specifies whether to request a pseudo-tty for the session. The
574 argument may be one of: ``no'' (never request a TTY), ``yes''
575 (always request a TTY when standard input is a TTY), ``force''
576 (always request a TTY) or ``auto'' (request a TTY when opening a
577 login session). This option mirrors the -t and -T flags for
578 ssh(1).
579
558 RhostsRSAAuthentication 580 RhostsRSAAuthentication
559 Specifies whether to try rhosts based authentication with RSA 581 Specifies whether to try rhosts based authentication with RSA
560 host authentication. The argument must be ``yes'' or ``no''. 582 host authentication. The argument must be ``yes'' or ``no''.
@@ -666,8 +688,9 @@ DESCRIPTION
666 command line. 688 command line.
667 689
668 UserKnownHostsFile 690 UserKnownHostsFile
669 Specifies a file to use for the user host key database instead of 691 Specifies one or more files to use for the user host key
670 ~/.ssh/known_hosts. 692 database, separated by whitespace. The default is
693 ~/.ssh/known_hosts, ~/.ssh/known_hosts2.
671 694
672 VerifyHostKeyDNS 695 VerifyHostKeyDNS
673 Specifies whether to verify the remote key using DNS and SSHFP 696 Specifies whether to verify the remote key using DNS and SSHFP
@@ -741,4 +764,4 @@ AUTHORS
741 created OpenSSH. Markus Friedl contributed the support for SSH protocol 764 created OpenSSH. Markus Friedl contributed the support for SSH protocol
742 versions 1.5 and 2.0. 765 versions 1.5 and 2.0.
743 766
744OpenBSD 4.9 December 8, 2010 OpenBSD 4.9 767OpenBSD 5.0 August 2, 2011 OpenBSD 5.0
diff --git a/ssh_config.5 b/ssh_config.5
index fc994d482..19bff6d54 100644
--- a/ssh_config.5
+++ b/ssh_config.5
@@ -33,8 +33,8 @@
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: ssh_config.5,v 1.146 2010/12/08 04:02:47 djm Exp $ 36.\" $OpenBSD: ssh_config.5,v 1.153 2011/08/02 01:22:11 djm Exp $
37.Dd $Mdocdate: December 8 2010 $ 37.Dd $Mdocdate: August 2 2011 $
38.Dt SSH_CONFIG 5 38.Dt SSH_CONFIG 5
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -128,6 +128,15 @@ The host is the
128argument given on the command line (i.e. the name is not converted to 128argument given on the command line (i.e. the name is not converted to
129a canonicalized host name before matching). 129a canonicalized host name before matching).
130.Pp 130.Pp
131A pattern entry may be negated by prefixing it with an exclamation mark
132.Pq Sq !\& .
133If a negated entry is matched, then the
134.Cm Host
135entry is ignored, regardless of whether any other patterns on the line
136match.
137Negated matches are therefore useful to provide exceptions for wildcard
138matches.
139.Pp
131See 140See
132.Sx PATTERNS 141.Sx PATTERNS
133for more information on patterns. 142for more information on patterns.
@@ -325,14 +334,22 @@ section above or the string
325.Dq none 334.Dq none
326to disable connection sharing. 335to disable connection sharing.
327In the path, 336In the path,
337.Ql %L
338will be substituted by the first component of the local host name,
328.Ql %l 339.Ql %l
329will be substituted by the local host name, 340will be substituted by the local host name (including any domain name),
330.Ql %h 341.Ql %h
331will be substituted by the target host name, 342will be substituted by the target host name,
343.Ql %n
344will be substituted by the original target host name
345specified on the command line,
332.Ql %p 346.Ql %p
333the port, and 347the port,
334.Ql %r 348.Ql %r
335by the remote login username. 349by the remote login username, and
350.Ql %u
351by the username of the user running
352.Xr ssh 1 .
336It is recommended that any 353It is recommended that any
337.Cm ControlPath 354.Cm ControlPath
338used for opportunistic connection sharing include 355used for opportunistic connection sharing include
@@ -521,9 +538,11 @@ or
521The default is 538The default is
522.Dq no . 539.Dq no .
523.It Cm GlobalKnownHostsFile 540.It Cm GlobalKnownHostsFile
524Specifies a file to use for the global 541Specifies one or more files to use for the global
525host key database instead of 542host key database, separated by whitespace.
526.Pa /etc/ssh/ssh_known_hosts . 543The default is
544.Pa /etc/ssh/ssh_known_hosts ,
545.Pa /etc/ssh/ssh_known_hosts2 .
527.It Cm GSSAPIAuthentication 546.It Cm GSSAPIAuthentication
528Specifies whether user authentication based on GSSAPI is allowed. 547Specifies whether user authentication based on GSSAPI is allowed.
529The default is 548The default is
@@ -625,7 +644,7 @@ Specifies the real host name to log into.
625This can be used to specify nicknames or abbreviations for hosts. 644This can be used to specify nicknames or abbreviations for hosts.
626If the hostname contains the character sequence 645If the hostname contains the character sequence
627.Ql %h , 646.Ql %h ,
628then this will be replaced with the host name specified on the commandline 647then this will be replaced with the host name specified on the command line
629(this is useful for manipulating unqualified names). 648(this is useful for manipulating unqualified names).
630The default is the name given on the command line. 649The default is the name given on the command line.
631Numeric IP addresses are also permitted (both on the command line and in 650Numeric IP addresses are also permitted (both on the command line and in
@@ -685,6 +704,10 @@ escape characters:
685It is possible to have 704It is possible to have
686multiple identity files specified in configuration files; all these 705multiple identity files specified in configuration files; all these
687identities will be tried in sequence. 706identities will be tried in sequence.
707Multiple
708.Cm IdentityFile
709directives will add to the list of identities tried (this behaviour
710differs from that of other configuration directives).
688.It Cm IPQoS 711.It Cm IPQoS
689Specifies the IPv4 type-of-service or DSCP class for connections. 712Specifies the IPv4 type-of-service or DSCP class for connections.
690Accepted values are 713Accepted values are
@@ -826,7 +849,9 @@ Multiple algorithms must be comma-separated.
826The default is: 849The default is:
827.Bd -literal -offset indent 850.Bd -literal -offset indent
828hmac-md5,hmac-sha1,umac-64@openssh.com, 851hmac-md5,hmac-sha1,umac-64@openssh.com,
829hmac-ripemd160,hmac-sha1-96,hmac-md5-96 852hmac-ripemd160,hmac-sha1-96,hmac-md5-96,
853hmac-sha2-256,hmac-sha2-256-96,hmac-sha2-512,
854hmac-sha2-512-96
830.Ed 855.Ed
831.It Cm NoHostAuthenticationForLocalhost 856.It Cm NoHostAuthenticationForLocalhost
832This option can be used if the home directory is shared across machines. 857This option can be used if the home directory is shared across machines.
@@ -999,6 +1024,23 @@ will only succeed if the server's
999.Cm GatewayPorts 1024.Cm GatewayPorts
1000option is enabled (see 1025option is enabled (see
1001.Xr sshd_config 5 ) . 1026.Xr sshd_config 5 ) .
1027.It Cm RequestTTY
1028Specifies whether to request a pseudo-tty for the session.
1029The argument may be one of:
1030.Dq no
1031(never request a TTY),
1032.Dq yes
1033(always request a TTY when standard input is a TTY),
1034.Dq force
1035(always request a TTY) or
1036.Dq auto
1037(request a TTY when opening a login session).
1038This option mirrors the
1039.Fl t
1040and
1041.Fl T
1042flags for
1043.Xr ssh 1 .
1002.It Cm RhostsRSAAuthentication 1044.It Cm RhostsRSAAuthentication
1003Specifies whether to try rhosts based authentication with RSA host 1045Specifies whether to try rhosts based authentication with RSA host
1004authentication. 1046authentication.
@@ -1226,9 +1268,11 @@ This can be useful when a different user name is used on different machines.
1226This saves the trouble of 1268This saves the trouble of
1227having to remember to give the user name on the command line. 1269having to remember to give the user name on the command line.
1228.It Cm UserKnownHostsFile 1270.It Cm UserKnownHostsFile
1229Specifies a file to use for the user 1271Specifies one or more files to use for the user
1230host key database instead of 1272host key database, separated by whitespace.
1231.Pa ~/.ssh/known_hosts . 1273The default is
1274.Pa ~/.ssh/known_hosts ,
1275.Pa ~/.ssh/known_hosts2 .
1232.It Cm VerifyHostKeyDNS 1276.It Cm VerifyHostKeyDNS
1233Specifies whether to verify the remote key using DNS and SSHFP resource 1277Specifies whether to verify the remote key using DNS and SSHFP resource
1234records. 1278records.
diff --git a/ssh_prng_cmds.in b/ssh_prng_cmds.in
deleted file mode 100644
index 0d29d49f1..000000000
--- a/ssh_prng_cmds.in
+++ /dev/null
@@ -1,75 +0,0 @@
1# entropy gathering commands
2
3# Format is: "program-name args" path rate
4
5# The "rate" represents the number of bits of usuable entropy per
6# byte of command output. Be conservative.
7#
8# $Id: ssh_prng_cmds.in,v 1.9 2003/11/21 12:48:56 djm Exp $
9
10"ls -alni /var/log" @PROG_LS@ 0.02
11"ls -alni /var/adm" @PROG_LS@ 0.02
12"ls -alni /usr/adm" @PROG_LS@ 0.02
13"ls -alni /var/mail" @PROG_LS@ 0.02
14"ls -alni /usr/mail" @PROG_LS@ 0.02
15"ls -alni /var/adm/syslog" @PROG_LS@ 0.02
16"ls -alni /usr/adm/syslog" @PROG_LS@ 0.02
17"ls -alni /var/spool/mail" @PROG_LS@ 0.02
18"ls -alni /proc" @PROG_LS@ 0.02
19"ls -alni /tmp" @PROG_LS@ 0.02
20"ls -alni /var/tmp" @PROG_LS@ 0.02
21"ls -alni /usr/tmp" @PROG_LS@ 0.02
22"ls -alTi /var/log" @PROG_LS@ 0.02
23"ls -alTi /var/adm" @PROG_LS@ 0.02
24"ls -alTi /var/mail" @PROG_LS@ 0.02
25"ls -alTi /var/adm/syslog" @PROG_LS@ 0.02
26"ls -alTi /var/spool/mail" @PROG_LS@ 0.02
27"ls -alTi /proc" @PROG_LS@ 0.02
28"ls -alTi /tmp" @PROG_LS@ 0.02
29"ls -alTi /var/tmp" @PROG_LS@ 0.02
30"ls -alTi /usr/tmp" @PROG_LS@ 0.02
31
32"netstat -an" @PROG_NETSTAT@ 0.05
33"netstat -in" @PROG_NETSTAT@ 0.05
34"netstat -rn" @PROG_NETSTAT@ 0.02
35"netstat -pn" @PROG_NETSTAT@ 0.02
36"netstat -ia" @PROG_NETSTAT@ 0.05
37"netstat -s" @PROG_NETSTAT@ 0.02
38"netstat -is" @PROG_NETSTAT@ 0.07
39
40"arp -n -a" @PROG_ARP@ 0.02
41
42"ifconfig -a" @PROG_IFCONFIG@ 0.02
43
44"ps laxww" @PROG_PS@ 0.03
45"ps -al" @PROG_PS@ 0.03
46"ps -efl" @PROG_PS@ 0.03
47"jstat" @PROG_JSTAT@ 0.07
48
49"w" @PROG_W@ 0.05
50
51"who -i" @PROG_WHO@ 0.01
52
53"last" @PROG_LAST@ 0.01
54
55"lastlog" @PROG_LASTLOG@ 0.01
56
57"df" @PROG_DF@ 0.01
58"df -i" @PROG_DF@ 0.01
59
60"sar -d" @PROG_SAR@ 0.04
61
62"vmstat" @PROG_VMSTAT@ 0.01
63"uptime" @PROG_UPTIME@ 0.01
64
65"ipcs -a" @PROG_IPCS@ 0.01
66
67"tail -200 /var/log/messages" @PROG_TAIL@ 0.01
68"tail -200 /var/log/syslog" @PROG_TAIL@ 0.01
69"tail -200 /var/adm/messages" @PROG_TAIL@ 0.01
70"tail -200 /var/adm/syslog" @PROG_TAIL@ 0.01
71"tail -200 /var/adm/syslog/syslog.log" @PROG_TAIL@ 0.01
72"tail -200 /var/log/maillog" @PROG_TAIL@ 0.01
73"tail -200 /var/adm/maillog" @PROG_TAIL@ 0.01
74"tail -200 /var/adm/syslog/mail.log" @PROG_TAIL@ 0.01
75
diff --git a/sshconnect.c b/sshconnect.c
index 1c066b641..aed4c0bc7 100644
--- a/sshconnect.c
+++ b/sshconnect.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect.c,v 1.232 2011/01/16 11:50:36 djm Exp $ */ 1/* $OpenBSD: sshconnect.c,v 1.234 2011/05/24 07:15:47 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -683,28 +683,30 @@ get_hostfile_hostname_ipaddr(char *hostname, struct sockaddr *hostaddr,
683 683
684/* 684/*
685 * check whether the supplied host key is valid, return -1 if the key 685 * check whether the supplied host key is valid, return -1 if the key
686 * is not valid. the user_hostfile will not be updated if 'readonly' is true. 686 * is not valid. user_hostfile[0] will not be updated if 'readonly' is true.
687 */ 687 */
688#define RDRW 0 688#define RDRW 0
689#define RDONLY 1 689#define RDONLY 1
690#define ROQUIET 2 690#define ROQUIET 2
691static int 691static int
692check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port, 692check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
693 Key *host_key, int readonly, char *user_hostfile, 693 Key *host_key, int readonly,
694 char *system_hostfile) 694 char **user_hostfiles, u_int num_user_hostfiles,
695 char **system_hostfiles, u_int num_system_hostfiles)
695{ 696{
697 HostStatus host_status;
698 HostStatus ip_status;
696 Key *raw_key = NULL; 699 Key *raw_key = NULL;
697 const char *type;
698 char *ip = NULL, *host = NULL; 700 char *ip = NULL, *host = NULL;
699 char hostline[1000], *hostp, *fp, *ra; 701 char hostline[1000], *hostp, *fp, *ra;
700 HostStatus host_status;
701 HostStatus ip_status;
702 int r, want_cert = key_is_cert(host_key), host_ip_differ = 0;
703 int local = sockaddr_is_local(hostaddr);
704 char msg[1024]; 702 char msg[1024];
703 const char *type;
704 const struct hostkey_entry *host_found, *ip_found;
705 int len, cancelled_forwarding = 0; 705 int len, cancelled_forwarding = 0;
706 int local = sockaddr_is_local(hostaddr);
707 int r, want_cert = key_is_cert(host_key), host_ip_differ = 0;
706 struct hostkeys *host_hostkeys, *ip_hostkeys; 708 struct hostkeys *host_hostkeys, *ip_hostkeys;
707 const struct hostkey_entry *host_found, *ip_found; 709 u_int i;
708 710
709 /* 711 /*
710 * Force accepting of the host key for loopback/localhost. The 712 * Force accepting of the host key for loopback/localhost. The
@@ -736,14 +738,18 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
736 options.check_host_ip = 0; 738 options.check_host_ip = 0;
737 739
738 host_hostkeys = init_hostkeys(); 740 host_hostkeys = init_hostkeys();
739 load_hostkeys(host_hostkeys, host, user_hostfile); 741 for (i = 0; i < num_user_hostfiles; i++)
740 load_hostkeys(host_hostkeys, host, system_hostfile); 742 load_hostkeys(host_hostkeys, host, user_hostfiles[i]);
743 for (i = 0; i < num_system_hostfiles; i++)
744 load_hostkeys(host_hostkeys, host, system_hostfiles[i]);
741 745
742 ip_hostkeys = NULL; 746 ip_hostkeys = NULL;
743 if (!want_cert && options.check_host_ip) { 747 if (!want_cert && options.check_host_ip) {
744 ip_hostkeys = init_hostkeys(); 748 ip_hostkeys = init_hostkeys();
745 load_hostkeys(ip_hostkeys, ip, user_hostfile); 749 for (i = 0; i < num_user_hostfiles; i++)
746 load_hostkeys(ip_hostkeys, ip, system_hostfile); 750 load_hostkeys(ip_hostkeys, ip, user_hostfiles[i]);
751 for (i = 0; i < num_system_hostfiles; i++)
752 load_hostkeys(ip_hostkeys, ip, system_hostfiles[i]);
747 } 753 }
748 754
749 retry: 755 retry:
@@ -788,11 +794,12 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
788 logit("%s host key for IP address " 794 logit("%s host key for IP address "
789 "'%.128s' not in list of known hosts.", 795 "'%.128s' not in list of known hosts.",
790 type, ip); 796 type, ip);
791 else if (!add_host_to_hostfile(user_hostfile, ip, 797 else if (!add_host_to_hostfile(user_hostfiles[0], ip,
792 host_key, options.hash_known_hosts)) 798 host_key, options.hash_known_hosts))
793 logit("Failed to add the %s host key for IP " 799 logit("Failed to add the %s host key for IP "
794 "address '%.128s' to the list of known " 800 "address '%.128s' to the list of known "
795 "hosts (%.30s).", type, ip, user_hostfile); 801 "hosts (%.30s).", type, ip,
802 user_hostfiles[0]);
796 else 803 else
797 logit("Warning: Permanently added the %s host " 804 logit("Warning: Permanently added the %s host "
798 "key for IP address '%.128s' to the list " 805 "key for IP address '%.128s' to the list "
@@ -811,7 +818,8 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
811 port != SSH_DEFAULT_PORT) { 818 port != SSH_DEFAULT_PORT) {
812 debug("checking without port identifier"); 819 debug("checking without port identifier");
813 if (check_host_key(hostname, hostaddr, 0, host_key, 820 if (check_host_key(hostname, hostaddr, 0, host_key,
814 ROQUIET, user_hostfile, system_hostfile) == 0) { 821 ROQUIET, user_hostfiles, num_user_hostfiles,
822 system_hostfiles, num_system_hostfiles) == 0) {
815 debug("found matching key w/out port"); 823 debug("found matching key w/out port");
816 break; 824 break;
817 } 825 }
@@ -876,25 +884,25 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
876 hostp = hostline; 884 hostp = hostline;
877 if (options.hash_known_hosts) { 885 if (options.hash_known_hosts) {
878 /* Add hash of host and IP separately */ 886 /* Add hash of host and IP separately */
879 r = add_host_to_hostfile(user_hostfile, host, 887 r = add_host_to_hostfile(user_hostfiles[0],
880 host_key, options.hash_known_hosts) && 888 host, host_key, options.hash_known_hosts) &&
881 add_host_to_hostfile(user_hostfile, ip, 889 add_host_to_hostfile(user_hostfiles[0], ip,
882 host_key, options.hash_known_hosts); 890 host_key, options.hash_known_hosts);
883 } else { 891 } else {
884 /* Add unhashed "host,ip" */ 892 /* Add unhashed "host,ip" */
885 r = add_host_to_hostfile(user_hostfile, 893 r = add_host_to_hostfile(user_hostfiles[0],
886 hostline, host_key, 894 hostline, host_key,
887 options.hash_known_hosts); 895 options.hash_known_hosts);
888 } 896 }
889 } else { 897 } else {
890 r = add_host_to_hostfile(user_hostfile, host, host_key, 898 r = add_host_to_hostfile(user_hostfiles[0], host,
891 options.hash_known_hosts); 899 host_key, options.hash_known_hosts);
892 hostp = host; 900 hostp = host;
893 } 901 }
894 902
895 if (!r) 903 if (!r)
896 logit("Failed to add the host to the list of known " 904 logit("Failed to add the host to the list of known "
897 "hosts (%.500s).", user_hostfile); 905 "hosts (%.500s).", user_hostfiles[0]);
898 else 906 else
899 logit("Warning: Permanently added '%.200s' (%s) to the " 907 logit("Warning: Permanently added '%.200s' (%s) to the "
900 "list of known hosts.", hostp, type); 908 "list of known hosts.", hostp, type);
@@ -955,7 +963,7 @@ check_host_key(char *hostname, struct sockaddr *hostaddr, u_short port,
955 /* The host key has changed. */ 963 /* The host key has changed. */
956 warn_changed_key(host_key); 964 warn_changed_key(host_key);
957 error("Add correct host key in %.100s to get rid of this message.", 965 error("Add correct host key in %.100s to get rid of this message.",
958 user_hostfile); 966 user_hostfiles[0]);
959 error("Offending %s key in %s:%lu", key_type(host_found->key), 967 error("Offending %s key in %s:%lu", key_type(host_found->key),
960 host_found->file, host_found->line); 968 host_found->file, host_found->line);
961 969
@@ -1100,7 +1108,6 @@ fail:
1100int 1108int
1101verify_host_key(char *host, struct sockaddr *hostaddr, Key *host_key) 1109verify_host_key(char *host, struct sockaddr *hostaddr, Key *host_key)
1102{ 1110{
1103 struct stat st;
1104 int flags = 0; 1111 int flags = 0;
1105 char *fp; 1112 char *fp;
1106 1113
@@ -1111,7 +1118,6 @@ verify_host_key(char *host, struct sockaddr *hostaddr, Key *host_key)
1111 /* XXX certs are not yet supported for DNS */ 1118 /* XXX certs are not yet supported for DNS */
1112 if (!key_is_cert(host_key) && options.verify_host_key_dns && 1119 if (!key_is_cert(host_key) && options.verify_host_key_dns &&
1113 verify_host_key_dns(host, hostaddr, host_key, &flags) == 0) { 1120 verify_host_key_dns(host, hostaddr, host_key, &flags) == 0) {
1114
1115 if (flags & DNS_VERIFY_FOUND) { 1121 if (flags & DNS_VERIFY_FOUND) {
1116 1122
1117 if (options.verify_host_key_dns == 1 && 1123 if (options.verify_host_key_dns == 1 &&
@@ -1129,16 +1135,9 @@ verify_host_key(char *host, struct sockaddr *hostaddr, Key *host_key)
1129 } 1135 }
1130 } 1136 }
1131 1137
1132 /* return ok if the key can be found in an old keyfile */ 1138 return check_host_key(host, hostaddr, options.port, host_key, RDRW,
1133 if (stat(options.system_hostfile2, &st) == 0 || 1139 options.user_hostfiles, options.num_user_hostfiles,
1134 stat(options.user_hostfile2, &st) == 0) { 1140 options.system_hostfiles, options.num_system_hostfiles);
1135 if (check_host_key(host, hostaddr, options.port, host_key,
1136 RDONLY, options.user_hostfile2,
1137 options.system_hostfile2) == 0)
1138 return 0;
1139 }
1140 return check_host_key(host, hostaddr, options.port, host_key,
1141 RDRW, options.user_hostfile, options.system_hostfile);
1142} 1141}
1143 1142
1144/* 1143/*
diff --git a/sshconnect2.c b/sshconnect2.c
index e01721b73..8346372cb 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.186 2010/11/29 23:45:51 djm Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.188 2011/05/24 07:15:47 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Damien Miller. All rights reserved. 4 * Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -109,14 +109,15 @@ order_hostkeyalgs(char *host, struct sockaddr *hostaddr, u_short port)
109 size_t maxlen; 109 size_t maxlen;
110 struct hostkeys *hostkeys; 110 struct hostkeys *hostkeys;
111 int ktype; 111 int ktype;
112 u_int i;
112 113
113 /* Find all hostkeys for this hostname */ 114 /* Find all hostkeys for this hostname */
114 get_hostfile_hostname_ipaddr(host, hostaddr, port, &hostname, NULL); 115 get_hostfile_hostname_ipaddr(host, hostaddr, port, &hostname, NULL);
115 hostkeys = init_hostkeys(); 116 hostkeys = init_hostkeys();
116 load_hostkeys(hostkeys, hostname, options.user_hostfile2); 117 for (i = 0; i < options.num_user_hostfiles; i++)
117 load_hostkeys(hostkeys, hostname, options.system_hostfile2); 118 load_hostkeys(hostkeys, hostname, options.user_hostfiles[i]);
118 load_hostkeys(hostkeys, hostname, options.user_hostfile); 119 for (i = 0; i < options.num_system_hostfiles; i++)
119 load_hostkeys(hostkeys, hostname, options.system_hostfile); 120 load_hostkeys(hostkeys, hostname, options.system_hostfiles[i]);
120 121
121 oavail = avail = xstrdup(KEX_DEFAULT_PK_ALG); 122 oavail = avail = xstrdup(KEX_DEFAULT_PK_ALG);
122 maxlen = strlen(avail) + 1; 123 maxlen = strlen(avail) + 1;
@@ -2006,9 +2007,12 @@ authmethod_get(char *authlist)
2006 authmethod_is_enabled(current)) { 2007 authmethod_is_enabled(current)) {
2007 debug3("authmethod_is_enabled %s", name); 2008 debug3("authmethod_is_enabled %s", name);
2008 debug("Next authentication method: %s", name); 2009 debug("Next authentication method: %s", name);
2010 xfree(name);
2009 return current; 2011 return current;
2010 } 2012 }
2011 } 2013 }
2014 if (name != NULL)
2015 xfree(name);
2012} 2016}
2013 2017
2014static char * 2018static char *
diff --git a/sshd.0 b/sshd.0
index 873584d7d..e8b49831d 100644
--- a/sshd.0
+++ b/sshd.0
@@ -167,8 +167,8 @@ AUTHENTICATION
167 AES, Blowfish, 3DES, CAST128, Arcfour, 192-bit AES, or 256-bit AES. The 167 AES, Blowfish, 3DES, CAST128, Arcfour, 192-bit AES, or 256-bit AES. The
168 client selects the encryption algorithm to use from those offered by the 168 client selects the encryption algorithm to use from those offered by the
169 server. Additionally, session integrity is provided through a 169 server. Additionally, session integrity is provided through a
170 cryptographic message authentication code (hmac-md5, hmac-sha1, umac-64 170 cryptographic message authentication code (hmac-md5, hmac-sha1, umac-64,
171 or hmac-ripemd160). 171 hmac-ripemd160, hmac-sha2-256 or hmac-sha2-512).
172 172
173 Finally, the server and the client enter an authentication dialog. The 173 Finally, the server and the client enter an authentication dialog. The
174 client tries to authenticate itself using host-based authentication, 174 client tries to authenticate itself using host-based authentication,
@@ -261,20 +261,21 @@ SSHRC
261 exist either, xauth is used to add the cookie. 261 exist either, xauth is used to add the cookie.
262 262
263AUTHORIZED_KEYS FILE FORMAT 263AUTHORIZED_KEYS FILE FORMAT
264 AuthorizedKeysFile specifies the file containing public keys for public 264 AuthorizedKeysFile specifies the files containing public keys for public
265 key authentication; if none is specified, the default is 265 key authentication; if none is specified, the default is
266 ~/.ssh/authorized_keys. Each line of the file contains one key (empty 266 ~/.ssh/authorized_keys and ~/.ssh/authorized_keys2. Each line of the
267 lines and lines starting with a `#' are ignored as comments). Protocol 1 267 file contains one key (empty lines and lines starting with a `#' are
268 public keys consist of the following space-separated fields: options, 268 ignored as comments). Protocol 1 public keys consist of the following
269 bits, exponent, modulus, comment. Protocol 2 public key consist of: 269 space-separated fields: options, bits, exponent, modulus, comment.
270 options, keytype, base64-encoded key, comment. The options field is 270 Protocol 2 public key consist of: options, keytype, base64-encoded key,
271 optional; its presence is determined by whether the line starts with a 271 comment. The options field is optional; its presence is determined by
272 number or not (the options field never starts with a number). The bits, 272 whether the line starts with a number or not (the options field never
273 exponent, modulus, and comment fields give the RSA key for protocol 273 starts with a number). The bits, exponent, modulus, and comment fields
274 version 1; the comment field is not used for anything (but may be 274 give the RSA key for protocol version 1; the comment field is not used
275 convenient for the user to identify the key). For protocol version 2 the 275 for anything (but may be convenient for the user to identify the key).
276 keytype is ``ecdsa-sha2-nistp256'', ``ecdsa-sha2-nistp384'', 276 For protocol version 2 the keytype is ``ecdsa-sha2-nistp256'',
277 ``ecdsa-sha2-nistp521'', ``ssh-dss'' or ``ssh-rsa''. 277 ``ecdsa-sha2-nistp384'', ``ecdsa-sha2-nistp521'', ``ssh-dss'' or
278 ``ssh-rsa''.
278 279
279 Note that lines in this file are usually several hundred bytes long 280 Note that lines in this file are usually several hundred bytes long
280 (because of the size of the public key encoding) up to a limit of 8 281 (because of the size of the public key encoding) up to a limit of 8
@@ -631,4 +632,4 @@ CAVEATS
631 System security is not improved unless rshd, rlogind, and rexecd are 632 System security is not improved unless rshd, rlogind, and rexecd are
632 disabled (thus completely disabling rlogin and rsh into the machine). 633 disabled (thus completely disabling rlogin and rsh into the machine).
633 634
634OpenBSD 4.9 October 28, 2010 OpenBSD 4.9 635OpenBSD 5.0 August 2, 2011 OpenBSD 5.0
diff --git a/sshd.8 b/sshd.8
index 3466aeda1..80b3a1e45 100644
--- a/sshd.8
+++ b/sshd.8
@@ -33,8 +33,8 @@
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: sshd.8,v 1.260 2010/10/28 18:33:28 jmc Exp $ 36.\" $OpenBSD: sshd.8,v 1.263 2011/08/02 01:22:11 djm Exp $
37.Dd $Mdocdate: October 28 2010 $ 37.Dd $Mdocdate: August 2 2011 $
38.Dt SSHD 8 38.Dt SSHD 8
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -314,7 +314,8 @@ The client selects the encryption algorithm
314to use from those offered by the server. 314to use from those offered by the server.
315Additionally, session integrity is provided 315Additionally, session integrity is provided
316through a cryptographic message authentication code 316through a cryptographic message authentication code
317(hmac-md5, hmac-sha1, umac-64 or hmac-ripemd160). 317(hmac-md5, hmac-sha1, umac-64, hmac-ripemd160,
318hmac-sha2-256 or hmac-sha2-512).
318.Pp 319.Pp
319Finally, the server and the client enter an authentication dialog. 320Finally, the server and the client enter an authentication dialog.
320The client tries to authenticate itself using 321The client tries to authenticate itself using
@@ -462,10 +463,12 @@ is run, and if that
462does not exist either, xauth is used to add the cookie. 463does not exist either, xauth is used to add the cookie.
463.Sh AUTHORIZED_KEYS FILE FORMAT 464.Sh AUTHORIZED_KEYS FILE FORMAT
464.Cm AuthorizedKeysFile 465.Cm AuthorizedKeysFile
465specifies the file containing public keys for 466specifies the files containing public keys for
466public key authentication; 467public key authentication;
467if none is specified, the default is 468if none is specified, the default is
468.Pa ~/.ssh/authorized_keys . 469.Pa ~/.ssh/authorized_keys
470and
471.Pa ~/.ssh/authorized_keys2 .
469Each line of the file contains one 472Each line of the file contains one
470key (empty lines and lines starting with a 473key (empty lines and lines starting with a
471.Ql # 474.Ql #
diff --git a/sshd.c b/sshd.c
index 67a2f9d6b..9b32cb458 100644
--- a/sshd.c
+++ b/sshd.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshd.c,v 1.381 2011/01/11 06:13:10 djm Exp $ */ 1/* $OpenBSD: sshd.c,v 1.385 2011/06/23 09:34:13 djm Exp $ */
2/* 2/*
3 * Author: Tatu Ylonen <ylo@cs.hut.fi> 3 * Author: Tatu Ylonen <ylo@cs.hut.fi>
4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 4 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -118,6 +118,7 @@
118#endif 118#endif
119#include "monitor_wrap.h" 119#include "monitor_wrap.h"
120#include "roaming.h" 120#include "roaming.h"
121#include "ssh-sandbox.h"
121#include "version.h" 122#include "version.h"
122 123
123#ifdef USE_SECURITY_SESSION_API 124#ifdef USE_SECURITY_SESSION_API
@@ -629,42 +630,62 @@ privsep_preauth(Authctxt *authctxt)
629{ 630{
630 int status; 631 int status;
631 pid_t pid; 632 pid_t pid;
633 struct ssh_sandbox *box = NULL;
632 634
633 /* Set up unprivileged child process to deal with network data */ 635 /* Set up unprivileged child process to deal with network data */
634 pmonitor = monitor_init(); 636 pmonitor = monitor_init();
635 /* Store a pointer to the kex for later rekeying */ 637 /* Store a pointer to the kex for later rekeying */
636 pmonitor->m_pkex = &xxx_kex; 638 pmonitor->m_pkex = &xxx_kex;
637 639
640 if (use_privsep == PRIVSEP_SANDBOX)
641 box = ssh_sandbox_init();
638 pid = fork(); 642 pid = fork();
639 if (pid == -1) { 643 if (pid == -1) {
640 fatal("fork of unprivileged child failed"); 644 fatal("fork of unprivileged child failed");
641 } else if (pid != 0) { 645 } else if (pid != 0) {
642 debug2("Network child is on pid %ld", (long)pid); 646 debug2("Network child is on pid %ld", (long)pid);
643 647
644 close(pmonitor->m_recvfd); 648 if (box != NULL)
649 ssh_sandbox_parent_preauth(box, pid);
645 pmonitor->m_pid = pid; 650 pmonitor->m_pid = pid;
646 monitor_child_preauth(authctxt, pmonitor); 651 monitor_child_preauth(authctxt, pmonitor);
647 close(pmonitor->m_sendfd);
648 652
649 /* Sync memory */ 653 /* Sync memory */
650 monitor_sync(pmonitor); 654 monitor_sync(pmonitor);
651 655
652 /* Wait for the child's exit status */ 656 /* Wait for the child's exit status */
653 while (waitpid(pid, &status, 0) < 0) 657 while (waitpid(pid, &status, 0) < 0) {
654 if (errno != EINTR) 658 if (errno != EINTR)
655 break; 659 fatal("%s: waitpid: %s", __func__,
656 return (1); 660 strerror(errno));
661 }
662 if (WIFEXITED(status)) {
663 if (WEXITSTATUS(status) != 0)
664 fatal("%s: preauth child exited with status %d",
665 __func__, WEXITSTATUS(status));
666 } else if (WIFSIGNALED(status))
667 fatal("%s: preauth child terminated by signal %d",
668 __func__, WTERMSIG(status));
669 if (box != NULL)
670 ssh_sandbox_parent_finish(box);
671 return 1;
657 } else { 672 } else {
658 /* child */ 673 /* child */
659
660 close(pmonitor->m_sendfd); 674 close(pmonitor->m_sendfd);
675 close(pmonitor->m_log_recvfd);
676
677 /* Arrange for logging to be sent to the monitor */
678 set_log_handler(mm_log_handler, pmonitor);
661 679
662 /* Demote the child */ 680 /* Demote the child */
663 if (getuid() == 0 || geteuid() == 0) 681 if (getuid() == 0 || geteuid() == 0)
664 privsep_preauth_child(); 682 privsep_preauth_child();
665 setproctitle("%s", "[net]"); 683 setproctitle("%s", "[net]");
684 if (box != NULL)
685 ssh_sandbox_child(box);
686
687 return 0;
666 } 688 }
667 return (0);
668} 689}
669 690
670static void 691static void
@@ -690,7 +711,6 @@ privsep_postauth(Authctxt *authctxt)
690 fatal("fork of unprivileged child failed"); 711 fatal("fork of unprivileged child failed");
691 else if (pmonitor->m_pid != 0) { 712 else if (pmonitor->m_pid != 0) {
692 verbose("User child is on pid %ld", (long)pmonitor->m_pid); 713 verbose("User child is on pid %ld", (long)pmonitor->m_pid);
693 close(pmonitor->m_recvfd);
694 buffer_clear(&loginmsg); 714 buffer_clear(&loginmsg);
695 monitor_child_postauth(pmonitor); 715 monitor_child_postauth(pmonitor);
696 716
@@ -698,7 +718,10 @@ privsep_postauth(Authctxt *authctxt)
698 exit(0); 718 exit(0);
699 } 719 }
700 720
721 /* child */
722
701 close(pmonitor->m_sendfd); 723 close(pmonitor->m_sendfd);
724 pmonitor->m_sendfd = -1;
702 725
703 /* Demote the private keys to public keys. */ 726 /* Demote the private keys to public keys. */
704 demote_sensitive_data(); 727 demote_sensitive_data();
@@ -1120,7 +1143,7 @@ server_accept_loop(int *sock_in, int *sock_out, int *newsock, int *config_s)
1120 (int) received_sigterm); 1143 (int) received_sigterm);
1121 close_listen_socks(); 1144 close_listen_socks();
1122 unlink(options.pid_file); 1145 unlink(options.pid_file);
1123 exit(255); 1146 exit(received_sigterm == SIGTERM ? 0 : 255);
1124 } 1147 }
1125 if (key_used && key_do_regen) { 1148 if (key_used && key_do_regen) {
1126 generate_ephemeral_server_key(); 1149 generate_ephemeral_server_key();
@@ -1311,7 +1334,6 @@ main(int ac, char **av)
1311 (void)set_auth_parameters(ac, av); 1334 (void)set_auth_parameters(ac, av);
1312#endif 1335#endif
1313 __progname = ssh_get_progname(av[0]); 1336 __progname = ssh_get_progname(av[0]);
1314 init_rng();
1315 1337
1316 /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */ 1338 /* Save argv. Duplicate so setproctitle emulation doesn't clobber it */
1317 saved_argc = ac; 1339 saved_argc = ac;
diff --git a/sshd_config b/sshd_config
index c3ad1fe61..e7a33399b 100644
--- a/sshd_config
+++ b/sshd_config
@@ -1,4 +1,4 @@
1# $OpenBSD: sshd_config,v 1.82 2010/09/06 17:10:19 naddy Exp $ 1# $OpenBSD: sshd_config,v 1.84 2011/05/23 03:30:07 djm Exp $
2 2
3# This is the sshd server system-wide configuration file. See 3# This is the sshd server system-wide configuration file. See
4# sshd_config(5) for more information. 4# sshd_config(5) for more information.
@@ -7,7 +7,7 @@
7 7
8# The strategy used for options in the default sshd_config shipped with 8# The strategy used for options in the default sshd_config shipped with
9# OpenSSH is to specify options with their default value where 9# OpenSSH is to specify options with their default value where
10# possible, but leave them commented. Uncommented options change a 10# possible, but leave them commented. Uncommented options override the
11# default value. 11# default value.
12 12
13#Port 22 13#Port 22
@@ -45,7 +45,10 @@
45 45
46#RSAAuthentication yes 46#RSAAuthentication yes
47#PubkeyAuthentication yes 47#PubkeyAuthentication yes
48#AuthorizedKeysFile .ssh/authorized_keys 48
49# The default is to check both .ssh/authorized_keys and .ssh/authorized_keys2
50# but this is overridden so installations will only check .ssh/authorized_keys
51AuthorizedKeysFile .ssh/authorized_keys
49 52
50# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts 53# For this to work you will also need host keys in /etc/ssh/ssh_known_hosts
51#RhostsRSAAuthentication no 54#RhostsRSAAuthentication no
diff --git a/sshd_config.0 b/sshd_config.0
index ab0d79be6..e19ca875b 100644
--- a/sshd_config.0
+++ b/sshd_config.0
@@ -81,8 +81,9 @@ DESCRIPTION
81 home directory of the user being authenticated, and %u is 81 home directory of the user being authenticated, and %u is
82 replaced by the username of that user. After expansion, 82 replaced by the username of that user. After expansion,
83 AuthorizedKeysFile is taken to be an absolute path or one 83 AuthorizedKeysFile is taken to be an absolute path or one
84 relative to the user's home directory. The default is 84 relative to the user's home directory. Multiple files may be
85 ``.ssh/authorized_keys''. 85 listed, separated by whitespace. The default is
86 ``.ssh/authorized_keys .ssh/authorized_keys2''.
86 87
87 AuthorizedPrincipalsFile 88 AuthorizedPrincipalsFile
88 Specifies a file that lists principal names that are accepted for 89 Specifies a file that lists principal names that are accepted for
@@ -375,7 +376,9 @@ DESCRIPTION
375 separated. The default is: 376 separated. The default is:
376 377
377 hmac-md5,hmac-sha1,umac-64@openssh.com, 378 hmac-md5,hmac-sha1,umac-64@openssh.com,
378 hmac-ripemd160,hmac-sha1-96,hmac-md5-96 379 hmac-ripemd160,hmac-sha1-96,hmac-md5-96,
380 hmac-sha2-256,hmac-sha256-96,hmac-sha2-512,
381 hmac-sha2-512-96
379 382
380 Match Introduces a conditional block. If all of the criteria on the 383 Match Introduces a conditional block. If all of the criteria on the
381 Match line are satisfied, the keywords on the following lines 384 Match line are satisfied, the keywords on the following lines
@@ -625,7 +628,9 @@ DESCRIPTION
625 that has the privilege of the authenticated user. The goal of 628 that has the privilege of the authenticated user. The goal of
626 privilege separation is to prevent privilege escalation by 629 privilege separation is to prevent privilege escalation by
627 containing any corruption within the unprivileged processes. The 630 containing any corruption within the unprivileged processes. The
628 default is ``yes''. 631 default is ``yes''. If UsePrivilegeSeparation is set to
632 ``sandbox'' then the pre-authentication unprivileged process is
633 subject to additional restrictions.
629 634
630 X11DisplayOffset 635 X11DisplayOffset
631 Specifies the first display number available for sshd(8)'s X11 636 Specifies the first display number available for sshd(8)'s X11
@@ -710,4 +715,4 @@ AUTHORS
710 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support 715 versions 1.5 and 2.0. Niels Provos and Markus Friedl contributed support
711 for privilege separation. 716 for privilege separation.
712 717
713OpenBSD 4.9 December 8, 2010 OpenBSD 4.9 718OpenBSD 5.0 August 2, 2011 OpenBSD 5.0
diff --git a/sshd_config.5 b/sshd_config.5
index e7a5f0a08..e73624154 100644
--- a/sshd_config.5
+++ b/sshd_config.5
@@ -33,8 +33,8 @@
33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 33.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 34.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35.\" 35.\"
36.\" $OpenBSD: sshd_config.5,v 1.131 2010/12/08 04:02:47 djm Exp $ 36.\" $OpenBSD: sshd_config.5,v 1.135 2011/08/02 01:22:11 djm Exp $
37.Dd $Mdocdate: December 8 2010 $ 37.Dd $Mdocdate: August 2 2011 $
38.Dt SSHD_CONFIG 5 38.Dt SSHD_CONFIG 5
39.Os 39.Os
40.Sh NAME 40.Sh NAME
@@ -195,8 +195,9 @@ After expansion,
195.Cm AuthorizedKeysFile 195.Cm AuthorizedKeysFile
196is taken to be an absolute path or one relative to the user's home 196is taken to be an absolute path or one relative to the user's home
197directory. 197directory.
198Multiple files may be listed, separated by whitespace.
198The default is 199The default is
199.Dq .ssh/authorized_keys . 200.Dq .ssh/authorized_keys .ssh/authorized_keys2 .
200.It Cm AuthorizedPrincipalsFile 201.It Cm AuthorizedPrincipalsFile
201Specifies a file that lists principal names that are accepted for 202Specifies a file that lists principal names that are accepted for
202certificate authentication. 203certificate authentication.
@@ -713,7 +714,9 @@ Multiple algorithms must be comma-separated.
713The default is: 714The default is:
714.Bd -literal -offset indent 715.Bd -literal -offset indent
715hmac-md5,hmac-sha1,umac-64@openssh.com, 716hmac-md5,hmac-sha1,umac-64@openssh.com,
716hmac-ripemd160,hmac-sha1-96,hmac-md5-96 717hmac-ripemd160,hmac-sha1-96,hmac-md5-96,
718hmac-sha2-256,hmac-sha256-96,hmac-sha2-512,
719hmac-sha2-512-96
717.Ed 720.Ed
718.It Cm Match 721.It Cm Match
719Introduces a conditional block. 722Introduces a conditional block.
@@ -1146,6 +1149,12 @@ The goal of privilege separation is to prevent privilege
1146escalation by containing any corruption within the unprivileged processes. 1149escalation by containing any corruption within the unprivileged processes.
1147The default is 1150The default is
1148.Dq yes . 1151.Dq yes .
1152If
1153.Cm UsePrivilegeSeparation
1154is set to
1155.Dq sandbox
1156then the pre-authentication unprivileged process is subject to additional
1157restrictions.
1149.It Cm X11DisplayOffset 1158.It Cm X11DisplayOffset
1150Specifies the first display number available for 1159Specifies the first display number available for
1151.Xr sshd 8 Ns 's 1160.Xr sshd 8 Ns 's
diff --git a/version.h b/version.h
index 56809360c..577684554 100644
--- a/version.h
+++ b/version.h
@@ -1,8 +1,8 @@
1/* $OpenBSD: version.h,v 1.61 2011/02/04 00:44:43 djm Exp $ */ 1/* $OpenBSD: version.h,v 1.62 2011/08/02 23:13:01 djm Exp $ */
2 2
3#define SSH_VERSION "OpenSSH_5.8" 3#define SSH_VERSION "OpenSSH_5.9"
4 4
5#define SSH_PORTABLE "p1" 5#define SSH_PORTABLE "p2"
6#define SSH_RELEASE_MINIMUM SSH_VERSION SSH_PORTABLE 6#define SSH_RELEASE_MINIMUM SSH_VERSION SSH_PORTABLE
7#ifdef SSH_EXTRAVERSION 7#ifdef SSH_EXTRAVERSION
8#define SSH_RELEASE SSH_RELEASE_MINIMUM " " SSH_EXTRAVERSION 8#define SSH_RELEASE SSH_RELEASE_MINIMUM " " SSH_EXTRAVERSION